@bitrise/bitkit 9.4.1-alpha.2 → 9.5.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/.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 +12 -3
- 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 -12
- 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 -12
- 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 -20
- 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,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,38 +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
|
-
var react_1 = __importDefault(require("react"));
|
|
18
|
-
var react_2 = require("@chakra-ui/react");
|
|
19
|
-
/**
|
|
20
|
-
* Basic `Text` component
|
|
21
|
-
*/
|
|
22
|
-
var Text = function (props) {
|
|
23
|
-
var size = props.size, textTransform = props.textTransform;
|
|
24
|
-
var properties = __assign({}, props);
|
|
25
|
-
if (size === '1' && (!textTransform || textTransform === 'none')) {
|
|
26
|
-
properties.textTransform = 'uppercase';
|
|
27
|
-
}
|
|
28
|
-
if (size === '5' || size === '6' || size === '7' || size === '8') {
|
|
29
|
-
properties.fontWeight = 'bold';
|
|
30
|
-
}
|
|
31
|
-
return react_1.default.createElement(react_2.Text, __assign({}, properties));
|
|
32
|
-
};
|
|
33
|
-
Text.defaultProps = {
|
|
34
|
-
as: 'span',
|
|
35
|
-
size: '4',
|
|
36
|
-
};
|
|
37
|
-
exports.default = Text;
|
|
38
|
-
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../../../src/chakra/components/Text/Text.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,0CAAiE;AAmDjE;;GAEG;AACH,IAAM,IAAI,GAAG,UAAC,KAAY;IAChB,IAAA,IAAI,GAAoB,KAAK,KAAzB,EAAE,aAAa,GAAK,KAAK,cAAV,CAAW;IACtC,IAAM,UAAU,gBAAmB,KAAK,CAAE,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,8BAAC,YAAU,eAAK,UAAU,EAAI,CAAC;AACxC,CAAC,CAAC;AAEF,IAAI,CAAC,YAAY,GAAG;IAClB,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,GAAG;CACD,CAAC;AAEX,kBAAe,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,42 +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
|
-
exports.WithProps = void 0;
|
|
29
|
-
var react_1 = __importDefault(require("react"));
|
|
30
|
-
var shared_1 = require("../../shared");
|
|
31
|
-
var Text_1 = __importDefault(require("./Text"));
|
|
32
|
-
exports.default = {
|
|
33
|
-
title: 'Components/Text',
|
|
34
|
-
component: Text_1.default,
|
|
35
|
-
};
|
|
36
|
-
var Template = function (_a) {
|
|
37
|
-
var props = __rest(_a, []);
|
|
38
|
-
return react_1.default.createElement(Text_1.default, __assign({}, props));
|
|
39
|
-
};
|
|
40
|
-
exports.WithProps = Template.bind({});
|
|
41
|
-
exports.WithProps.args = (0, shared_1.sortObjectByKey)(__assign({ align: 'left', className: '', children: 'The quick brown fox jumps over the lazy dog.', fontWeight: 'normal', letterSpacing: 'normal', textTransform: 'none' }, Text_1.default.defaultProps));
|
|
42
|
-
//# 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,gDAA0B;AAE1B,uCAA+C;AAC/C,gDAA0B;AAE1B,kBAAe;IACb,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,cAAI;CACc,CAAC;AAEhC,IAAM,QAAQ,GAAgC,UAAC,EAAY;QAAP,KAAK,cAAV,EAAY,CAAF;IAAO,OAAA,8BAAC,cAAI,eAAK,KAAK,EAAI,CAAA;CAAA,CAAC;AAEvE,QAAA,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,iBAAS,CAAC,IAAI,GAAG,IAAA,wBAAe,aAC9B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,EAAE,EACb,QAAQ,EAAE,8CAA8C,EACxD,UAAU,EAAE,QAAQ,EACpB,aAAa,EAAE,QAAQ,EACvB,aAAa,EAAE,MAAM,IAClB,cAAI,CAAC,YAAY,EACpB,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/cjs/chakra/shared.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.sortObjectByKey = void 0;
|
|
5
|
-
var sortObjectByKey = function (unordered) {
|
|
6
|
-
return Object.keys(unordered)
|
|
7
|
-
.sort()
|
|
8
|
-
.reduce(function (obj, key) {
|
|
9
|
-
/* @ts-ignore */
|
|
10
|
-
obj[key] = unordered[key];
|
|
11
|
-
return obj;
|
|
12
|
-
}, {});
|
|
13
|
-
};
|
|
14
|
-
exports.sortObjectByKey = sortObjectByKey;
|
|
15
|
-
//# sourceMappingURL=shared.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/chakra/shared.ts"],"names":[],"mappings":";AAAA,oBAAoB;;;AAEb,IAAM,eAAe,GAAG,UAAC,SAAc;IAC5C,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;SAC1B,IAAI,EAAE;SACN,MAAM,CAAC,UAAC,GAAG,EAAE,GAAG;QACf,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;AARW,QAAA,eAAe,mBAQ1B"}
|
|
@@ -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,54 +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 = require("@chakra-ui/react");
|
|
7
|
-
var bitkit_1 = require("@bitrise/bitkit");
|
|
8
|
-
var Button_theme_1 = __importDefault(require("../components/Button/Button.theme"));
|
|
9
|
-
var StatusTag_theme_1 = __importDefault(require("../components/StatusTag/StatusTag.theme"));
|
|
10
|
-
var Menu_theme_1 = __importDefault(require("../components/Menu/Menu.theme"));
|
|
11
|
-
var typographyConfig_1 = __importDefault(require("./typographyConfig"));
|
|
12
|
-
var theme = (0, react_1.extendTheme)({
|
|
13
|
-
config: {
|
|
14
|
-
cssVarPrefix: 'bitkit',
|
|
15
|
-
},
|
|
16
|
-
colors: bitkit_1.variables.colorMap,
|
|
17
|
-
fonts: {
|
|
18
|
-
body: "\"TT Norms Pro\", sans-serif",
|
|
19
|
-
heading: "\"TT Norms Pro\", sans-serif",
|
|
20
|
-
},
|
|
21
|
-
fontSizes: {
|
|
22
|
-
1: '11px',
|
|
23
|
-
2: '14px',
|
|
24
|
-
3: '16px',
|
|
25
|
-
4: '19px',
|
|
26
|
-
5: '24px',
|
|
27
|
-
6: '30px',
|
|
28
|
-
7: '36px',
|
|
29
|
-
8: '48px',
|
|
30
|
-
},
|
|
31
|
-
lineHeights: {
|
|
32
|
-
1: '16px',
|
|
33
|
-
2: '20px',
|
|
34
|
-
3: '24px',
|
|
35
|
-
4: '28px',
|
|
36
|
-
5: '36px',
|
|
37
|
-
6: '40px',
|
|
38
|
-
7: '48px',
|
|
39
|
-
8: '60px',
|
|
40
|
-
},
|
|
41
|
-
components: {
|
|
42
|
-
Button: Button_theme_1.default,
|
|
43
|
-
Heading: {
|
|
44
|
-
sizes: typographyConfig_1.default,
|
|
45
|
-
},
|
|
46
|
-
Menu: Menu_theme_1.default,
|
|
47
|
-
StatusTag: StatusTag_theme_1.default,
|
|
48
|
-
Text: {
|
|
49
|
-
sizes: typographyConfig_1.default,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
exports.default = theme;
|
|
54
|
-
//# sourceMappingURL=theme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../../src/chakra/theme/theme.ts"],"names":[],"mappings":";;;;;AAAA,0CAA+C;AAC/C,0CAA4C;AAC5C,mFAA4D;AAC5D,4FAAqE;AACrE,6EAAsD;AACtD,wEAAkD;AAElD,IAAM,KAAK,GAAG,IAAA,mBAAW,EAAC;IACxB,MAAM,EAAE;QACN,YAAY,EAAE,QAAQ;KACvB;IACD,MAAM,EAAE,kBAAS,CAAC,QAAQ;IAC1B,KAAK,EAAE;QACL,IAAI,EAAE,8BAA4B;QAClC,OAAO,EAAE,8BAA4B;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,sBAAW;QACnB,OAAO,EAAE;YACP,KAAK,EAAE,0BAAgB;SACxB;QACD,IAAI,EAAE,oBAAS;QACf,SAAS,EAAE,yBAAc;QACzB,IAAI,EAAE;YACJ,KAAK,EAAE,0BAAgB;SACxB;KACF;CACF,CAAC,CAAC;AAEH,kBAAe,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,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var config = {
|
|
4
|
-
1: {
|
|
5
|
-
fontSize: '11px',
|
|
6
|
-
lineHeight: '16px',
|
|
7
|
-
},
|
|
8
|
-
2: {
|
|
9
|
-
fontSize: '14px',
|
|
10
|
-
lineHeight: '20px',
|
|
11
|
-
},
|
|
12
|
-
3: {
|
|
13
|
-
fontSize: '16px',
|
|
14
|
-
lineHeight: '24px',
|
|
15
|
-
},
|
|
16
|
-
4: {
|
|
17
|
-
fontSize: '19px',
|
|
18
|
-
lineHeight: '28px',
|
|
19
|
-
},
|
|
20
|
-
5: {
|
|
21
|
-
fontSize: '24px',
|
|
22
|
-
lineHeight: '36px',
|
|
23
|
-
},
|
|
24
|
-
6: {
|
|
25
|
-
fontSize: '30px',
|
|
26
|
-
lineHeight: '40px',
|
|
27
|
-
},
|
|
28
|
-
7: {
|
|
29
|
-
fontSize: '36px',
|
|
30
|
-
lineHeight: '48px',
|
|
31
|
-
},
|
|
32
|
-
8: {
|
|
33
|
-
fontSize: '48px',
|
|
34
|
-
lineHeight: '60px',
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
exports.default = config;
|
|
38
|
-
//# sourceMappingURL=typographyConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typographyConfig.js","sourceRoot":"","sources":["../../../../src/chakra/theme/typographyConfig.ts"],"names":[],"mappings":";;AAEA,IAAM,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,kBAAe,MAAM,CAAC"}
|
|
@@ -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,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ChakraProvider } from '@chakra-ui/react';
|
|
3
|
-
import theme from './theme/theme';
|
|
4
|
-
const BitkitProvider = ({ children }) => {
|
|
5
|
-
return React.createElement(ChakraProvider, { theme: theme }, children);
|
|
6
|
-
};
|
|
7
|
-
export default BitkitProvider;
|
|
8
|
-
//# sourceMappingURL=BitkitProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitProvider.js","sourceRoot":"","sources":["../../../src/chakra/BitkitProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,MAAM,eAAe,CAAC;AAElC,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAuB,EAAE,EAAE;IAC3D,OAAO,oBAAC,cAAc,IAAC,KAAK,EAAE,KAAK,IAAG,QAAQ,CAAkB,CAAC;AACnE,CAAC,CAAC;AAEF,eAAe,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,34 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Button as ChakraButton } from '@chakra-ui/react';
|
|
4
|
-
import { Icon } from '@bitrise/bitkit';
|
|
5
|
-
const Button = React.forwardRef((props, ref) => {
|
|
6
|
-
const { as, leftIconName, rightIconName, size, ...rest } = props;
|
|
7
|
-
const properties = { as, size, ...rest };
|
|
8
|
-
if (leftIconName) {
|
|
9
|
-
properties.leftIcon = React.createElement(Icon, { name: leftIconName });
|
|
10
|
-
}
|
|
11
|
-
if (rightIconName) {
|
|
12
|
-
properties.rightIcon = React.createElement(Icon, { name: rightIconName });
|
|
13
|
-
}
|
|
14
|
-
if (leftIconName || rightIconName) {
|
|
15
|
-
properties.iconSpacing = size === 'medium' ? '10px' : '6px';
|
|
16
|
-
}
|
|
17
|
-
if (as === 'a') {
|
|
18
|
-
delete properties.type;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
/* @ts-ignore */
|
|
22
|
-
delete properties.href;
|
|
23
|
-
/* @ts-ignore */
|
|
24
|
-
delete properties.target;
|
|
25
|
-
}
|
|
26
|
-
return React.createElement(ChakraButton, { ref: ref, ...properties });
|
|
27
|
-
});
|
|
28
|
-
Button.defaultProps = {
|
|
29
|
-
as: 'button',
|
|
30
|
-
size: 'medium',
|
|
31
|
-
variant: 'primary',
|
|
32
|
-
};
|
|
33
|
-
export default Button;
|
|
34
|
-
//# 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,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,IAAI,YAAY,EAAe,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,IAAI,EAAgB,MAAM,iBAAiB,CAAC;AAmBrD,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAA2B,CAAC,KAAY,EAAE,GAAG,EAAE,EAAE;IAC9E,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACjE,MAAM,UAAU,GAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC;IACtD,IAAI,YAAY,EAAE;QAChB,UAAU,CAAC,QAAQ,GAAG,oBAAC,IAAI,IAAC,IAAI,EAAE,YAAY,GAAI,CAAC;KACpD;IACD,IAAI,aAAa,EAAE;QACjB,UAAU,CAAC,SAAS,GAAG,oBAAC,IAAI,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,oBAAC,YAAY,IAAC,GAAG,EAAE,GAAG,KAAM,UAAU,GAAI,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,eAAe,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,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { sortObjectByKey } from '../../shared';
|
|
3
|
-
import { IconList } from '../../../Icon/tsx';
|
|
4
|
-
import Button from './Button';
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Components/Button',
|
|
7
|
-
component: Button,
|
|
8
|
-
argTypes: {
|
|
9
|
-
leftIconName: {
|
|
10
|
-
options: IconList,
|
|
11
|
-
},
|
|
12
|
-
rightIconName: {
|
|
13
|
-
options: IconList,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
const Template = (props) => React.createElement(Button, { ...props });
|
|
18
|
-
export const WithProps = Template.bind({});
|
|
19
|
-
WithProps.args = sortObjectByKey({
|
|
20
|
-
...Button.defaultProps,
|
|
21
|
-
as: 'button',
|
|
22
|
-
className: '',
|
|
23
|
-
isDisabled: false,
|
|
24
|
-
href: '',
|
|
25
|
-
target: '_self',
|
|
26
|
-
type: 'button',
|
|
27
|
-
children: 'Button',
|
|
28
|
-
});
|
|
29
|
-
//# 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,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,OAAO,EAAE,QAAQ;SAClB;QACD,aAAa,EAAE;YACb,OAAO,EAAE,QAAQ;SAClB;KACF;CAC8B,CAAC;AAElC,MAAM,QAAQ,GAAkC,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAC,MAAM,OAAK,KAAK,GAAI,CAAC;AAEjF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG,eAAe,CAAC;IAC/B,GAAG,MAAM,CAAC,YAAY;IACtB,EAAE,EAAE,QAAQ;IACZ,SAAS,EAAE,EAAE;IACb,UAAU,EAAE,KAAK;IACjB,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,QAAQ;CACnB,CAAC,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"}
|