@capillarytech/blaze-ui 0.1.6-alpha.3 → 0.1.6-alpha.32

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.
Files changed (145) hide show
  1. package/components/CapInput/CapInput.js +60 -0
  2. package/components/CapInput/Number.js +39 -0
  3. package/components/CapInput/Search.js +34 -0
  4. package/components/CapInput/TextArea.js +41 -0
  5. package/components/CapInput/index.js +13 -0
  6. package/components/CapInput/messages.js +24 -0
  7. package/components/CapInput/styles.js +8 -0
  8. package/components/CapSkeleton/CapSkeleton.js +24 -0
  9. package/components/CapSkeleton/index.js +7 -0
  10. package/components/CapSpin/CapSpin.js +30 -0
  11. package/components/CapSpin/index.js +7 -0
  12. package/components/CapTable/CapTable.js +118 -0
  13. package/components/CapTable/index.js +7 -0
  14. package/components/CapTable/loadable.js +18 -0
  15. package/components/CapTable/styles.js +23 -0
  16. package/components/CapTestSelect/CapTestSelect.js +36 -0
  17. package/components/CapTestSelect/index.js +7 -0
  18. package/components/CapUnifiedSelect/CapUnifiedSelect.js +359 -0
  19. package/components/CapUnifiedSelect/index.js +7 -0
  20. package/components/CapUnifiedSelect/messages.js +27 -0
  21. package/components/CapUnifiedSelect/styles.js +36 -0
  22. package/components/LocaleHoc/index.js +42 -0
  23. package/components/index.js +33 -0
  24. package/components/styled/index.js +14 -0
  25. package/components/styled/variables.js +70 -0
  26. package/{translations → components/translations}/en.js +37 -35
  27. package/dist/components/CapSkeleton/CapSkeleton.js +29 -0
  28. package/dist/components/CapSkeleton/index.js +13 -0
  29. package/dist/components/CapSpin/CapSpin.js +35 -0
  30. package/dist/components/CapSpin/index.js +13 -0
  31. package/dist/{CapTable → components/CapTable}/loadable.js +4 -4
  32. package/dist/components/CapTestSelect/CapTestSelect.js +40 -0
  33. package/dist/components/CapTestSelect/index.js +13 -0
  34. package/dist/components/CapUnifiedSelect/CapUnifiedSelect.js +406 -0
  35. package/dist/components/CapUnifiedSelect/index.js +13 -0
  36. package/dist/components/CapUnifiedSelect/messages.js +29 -0
  37. package/dist/components/CapUnifiedSelect/styles.js +39 -0
  38. package/dist/{index.js → components/index.js} +27 -0
  39. package/dist/esm/{CapRow/CapRow.js → components/CapSkeleton/CapSkeleton.js} +12 -12
  40. package/dist/esm/components/CapSkeleton/index.js +1 -0
  41. package/dist/esm/components/CapSpin/CapSpin.js +28 -0
  42. package/dist/esm/components/CapSpin/index.js +1 -0
  43. package/dist/esm/components/CapTable/loadable.js +12 -0
  44. package/dist/esm/components/CapTestSelect/CapTestSelect.js +34 -0
  45. package/dist/esm/components/CapTestSelect/index.js +1 -0
  46. package/dist/esm/components/CapUnifiedSelect/CapUnifiedSelect.js +398 -0
  47. package/dist/esm/components/CapUnifiedSelect/index.js +1 -0
  48. package/dist/esm/components/CapUnifiedSelect/styles.js +31 -0
  49. package/dist/esm/{index.js → components/index.js} +5 -1
  50. package/dist/esm/utils/index.js +1 -0
  51. package/dist/esm/utils/withStyles.js +23 -0
  52. package/dist/utils/index.js +13 -0
  53. package/dist/utils/withStyles.js +29 -0
  54. package/package.json +6 -10
  55. package/utils/index.js +7 -0
  56. package/utils/withStyles.js +15 -0
  57. package/CapHeading/CapHeading.js +0 -71
  58. package/CapHeading/index.js +0 -1
  59. package/CapHeading/styles.js +0 -125
  60. package/CapInfoNote/CapInfoNote.js +0 -54
  61. package/CapInfoNote/index.js +0 -1
  62. package/CapInfoNote/styles.js +0 -63
  63. package/CapInput/CapInput.js +0 -67
  64. package/CapInput/Number.js +0 -38
  65. package/CapInput/Search.js +0 -32
  66. package/CapInput/TextArea.js +0 -45
  67. package/CapInput/index.js +0 -10
  68. package/CapInput/loadable.js +0 -9
  69. package/CapInput/messages.js +0 -27
  70. package/CapInput/styles.js +0 -81
  71. package/CapLabel/CapLabel.js +0 -106
  72. package/CapLabel/index.js +0 -1
  73. package/CapLabel/styles.js +0 -221
  74. package/CapRow/CapRow.js +0 -22
  75. package/CapRow/index.js +0 -1
  76. package/CapRow/styles.js +0 -9
  77. package/CapTable/CapTable.js +0 -146
  78. package/CapTable/index.js +0 -3
  79. package/CapTable/loadable.js +0 -13
  80. package/CapTable/styles.js +0 -134
  81. package/CapTooltip/CapTooltip.js +0 -36
  82. package/CapTooltip/index.js +0 -1
  83. package/CapTooltip/styles.js +0 -42
  84. package/CapUnifiedSelect/CapUnifiedSelect.js +0 -121
  85. package/CapUnifiedSelect/index.js +0 -4
  86. package/CapUnifiedSelect/loadable.js +0 -3
  87. package/CapUnifiedSelect/messages.js +0 -24
  88. package/CapUnifiedSelect/styles.js +0 -223
  89. package/LocaleHoc/index.js +0 -38
  90. package/dist/235.index.js +0 -2
  91. package/dist/235.index.js.LICENSE.txt +0 -29
  92. package/dist/603.index.js +0 -1
  93. package/dist/esm/CapHeading/CapHeading.js +0 -41
  94. package/dist/esm/CapHeading/index.js +0 -1
  95. package/dist/esm/CapHeading/styles.js +0 -123
  96. package/dist/esm/CapInfoNote/CapInfoNote.js +0 -62
  97. package/dist/esm/CapInfoNote/index.js +0 -1
  98. package/dist/esm/CapInfoNote/styles.js +0 -6
  99. package/dist/esm/CapInput/loadable.js +0 -9
  100. package/dist/esm/CapLabel/CapLabel.js +0 -50
  101. package/dist/esm/CapLabel/index.js +0 -1
  102. package/dist/esm/CapLabel/styles.js +0 -219
  103. package/dist/esm/CapRow/index.js +0 -1
  104. package/dist/esm/CapRow/styles.js +0 -5
  105. package/dist/esm/CapTable/loadable.js +0 -12
  106. package/dist/esm/CapTooltip/CapTooltip.js +0 -34
  107. package/dist/esm/CapTooltip/index.js +0 -1
  108. package/dist/esm/CapTooltip/styles.js +0 -6
  109. package/dist/esm/CapUnifiedSelect/CapUnifiedSelect.js +0 -101
  110. package/dist/esm/CapUnifiedSelect/index.js +0 -3
  111. package/dist/esm/CapUnifiedSelect/loadable.js +0 -4
  112. package/dist/esm/CapUnifiedSelect/styles.js +0 -15
  113. package/dist/index.js.LICENSE.txt +0 -7
  114. package/index.js +0 -10
  115. package/styled/index.js +0 -6
  116. package/styled/variables.js +0 -89
  117. /package/dist/{CapInput → components/CapInput}/CapInput.js +0 -0
  118. /package/dist/{CapInput → components/CapInput}/Number.js +0 -0
  119. /package/dist/{CapInput → components/CapInput}/Search.js +0 -0
  120. /package/dist/{CapInput → components/CapInput}/TextArea.js +0 -0
  121. /package/dist/{CapInput → components/CapInput}/index.js +0 -0
  122. /package/dist/{CapInput → components/CapInput}/messages.js +0 -0
  123. /package/dist/{CapInput → components/CapInput}/styles.js +0 -0
  124. /package/dist/{CapTable → components/CapTable}/CapTable.js +0 -0
  125. /package/dist/{CapTable → components/CapTable}/index.js +0 -0
  126. /package/dist/{CapTable → components/CapTable}/styles.js +0 -0
  127. /package/dist/{LocaleHoc → components/LocaleHoc}/index.js +0 -0
  128. /package/dist/{styled → components/styled}/index.js +0 -0
  129. /package/dist/{styled → components/styled}/variables.js +0 -0
  130. /package/dist/{translations → components/translations}/en.js +0 -0
  131. /package/dist/esm/{CapInput → components/CapInput}/CapInput.js +0 -0
  132. /package/dist/esm/{CapInput → components/CapInput}/Number.js +0 -0
  133. /package/dist/esm/{CapInput → components/CapInput}/Search.js +0 -0
  134. /package/dist/esm/{CapInput → components/CapInput}/TextArea.js +0 -0
  135. /package/dist/esm/{CapInput → components/CapInput}/index.js +0 -0
  136. /package/dist/esm/{CapInput → components/CapInput}/messages.js +0 -0
  137. /package/dist/esm/{CapInput → components/CapInput}/styles.js +0 -0
  138. /package/dist/esm/{CapTable → components/CapTable}/CapTable.js +0 -0
  139. /package/dist/esm/{CapTable → components/CapTable}/index.js +0 -0
  140. /package/dist/esm/{CapTable → components/CapTable}/styles.js +0 -0
  141. /package/dist/esm/{CapUnifiedSelect → components/CapUnifiedSelect}/messages.js +0 -0
  142. /package/dist/esm/{LocaleHoc → components/LocaleHoc}/index.js +0 -0
  143. /package/dist/esm/{styled → components/styled}/index.js +0 -0
  144. /package/dist/esm/{styled → components/styled}/variables.js +0 -0
  145. /package/dist/esm/{translations → components/translations}/en.js +0 -0
@@ -1,125 +0,0 @@
1
- import styled, { css } from 'styled-components';
2
- import * as styledVars from '../styled/variables';
3
-
4
- const headings = {
5
- h0: {
6
- fontSize: '28px',
7
- fontWeight: '500',
8
- color: styledVars.CAP_G01,
9
- lineHeight: '36px',
10
- },
11
- h1: {
12
- fontSize: '24px',
13
- fontWeight: '500',
14
- color: styledVars.CAP_G01,
15
- lineHeight: '32px',
16
- },
17
- h2: {
18
- fontSize: '20px',
19
- fontWeight: '500',
20
- color: styledVars.CAP_G01,
21
- lineHeight: '28px',
22
- },
23
- h3: {
24
- fontSize: '16px',
25
- fontWeight: '500',
26
- color: styledVars.CAP_G01,
27
- lineHeight: '24px',
28
- },
29
- h4: {
30
- fontSize: '14px',
31
- fontWeight: '500',
32
- color: styledVars.CAP_G01,
33
- lineHeight: '20px',
34
- },
35
- h5: {
36
- fontSize: '14px',
37
- fontWeight: 'normal',
38
- color: styledVars.CAP_G01,
39
- lineHeight: '20px',
40
- },
41
- h6: {
42
- color: styledVars.CAP_G04,
43
- fontSize: '14px',
44
- fontWeight: 'normal',
45
- lineHeight: '20px',
46
- },
47
- h7: {
48
- fontSize: '20px',
49
- fontWeight: '500',
50
- color: styledVars.CAP_G04,
51
- lineHeight: '28px',
52
- },
53
- h8: {
54
- fontSize: '14px',
55
- fontWeight: '400',
56
- color: styledVars.CAP_G01,
57
- lineHeight: '20px',
58
- },
59
- h9: {
60
- fontSize: '14px',
61
- fontWeight: '500',
62
- color: styledVars.CAP_WHITE,
63
- lineHeight: '20px',
64
- },
65
- h10: {
66
- fontSize: '12px',
67
- fontWeight: '500',
68
- color: styledVars.CAP_G01,
69
- lineHeight: '16px',
70
- },
71
- label1: {
72
- color: styledVars.CAP_G04,
73
- fontSize: '12px',
74
- fontWeight: 'normal',
75
- lineHeight: '20px',
76
- },
77
- label2: {
78
- color: styledVars.CAP_G01,
79
- fontSize: '12px',
80
- fontWeight: 'normal',
81
- lineHeight: '20px',
82
- },
83
- label3: {
84
- color: styledVars.CAP_G05,
85
- fontSize: '12px',
86
- fontWeight: 'normal',
87
- lineHeight: '20px',
88
- },
89
- label4: {
90
- color: styledVars.CAP_G04,
91
- fontSize: '12px',
92
- fontWeight: 'normal',
93
- lineHeight: '16px',
94
- },
95
- label5: {
96
- color: styledVars.CAP_G04,
97
- fontSize: '16px',
98
- fontWeight: 'normal',
99
- lineHeight: '24px',
100
- },
101
- label6: {
102
- color: styledVars.CAP_G01,
103
- fontSize: '16px',
104
- fontWeight: 'normal',
105
- lineHeight: '24px',
106
- },
107
- };
108
-
109
- const headingStyles = css`
110
- font-size: ${props => headings[props.type].fontSize};
111
- font-weight: ${props => headings[props.type].fontWeight};
112
- color: ${props => headings[props.type].color};
113
- line-height: ${props => headings[props.type].lineHeight};
114
- margin: 0;
115
- padding: 0;
116
- `;
117
-
118
- export const HeadingWrapper = styled.div`
119
- ${headingStyles}
120
- `;
121
-
122
- export const HeadingSpan = styled.span`
123
- ${headingStyles}
124
- display: inline-block;
125
- `;
@@ -1,54 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { Alert } from 'antd';
4
- import { InfoNoteWrapper } from './styles';
5
- import CapLabel from '../CapLabel';
6
- import CapRow from '../CapRow';
7
-
8
- const Note = ({ noteText }) => (
9
- <CapLabel.Inline type="label4" className="note-text">
10
- {noteText}
11
- </CapLabel.Inline>
12
- );
13
-
14
- Note.propTypes = {
15
- noteText: PropTypes.string,
16
- };
17
-
18
- const CapInfoNote = ({ message, style, noteText, type = 'info', className, ...rest }) => {
19
- return (
20
- <InfoNoteWrapper>
21
- <Alert
22
- message={(
23
- <CapRow className="note-message-container">
24
- <Note noteText={noteText} />:
25
- <CapRow className="message-text">{message}</CapRow>
26
- </CapRow>
27
- )}
28
- className={className}
29
- type={type}
30
- showIcon
31
- style={{
32
- marginTop: '0.857rem',
33
- marginBottom: '0.857rem',
34
- ...style,
35
- }}
36
- {...rest}
37
- />
38
- </InfoNoteWrapper>
39
- );
40
- };
41
-
42
- CapInfoNote.propTypes = {
43
- message: PropTypes.node,
44
- style: PropTypes.object,
45
- noteText: PropTypes.string,
46
- type: PropTypes.string,
47
- className: PropTypes.string,
48
- };
49
-
50
- CapInfoNote.defaultProps = {
51
- type: 'info',
52
- };
53
-
54
- export default CapInfoNote;
@@ -1 +0,0 @@
1
- export { default } from './CapInfoNote';
@@ -1,63 +0,0 @@
1
- import styled from 'styled-components';
2
- import * as styledVars from '../styled/variables';
3
-
4
- export const InfoNoteWrapper = styled.div`
5
- .note-text {
6
- padding-left: ${styledVars.CAP_SPACE_24};
7
- white-space: nowrap;
8
- line-height: inherit;
9
- }
10
-
11
- .note-message-container {
12
- display: flex;
13
- .message-text {
14
- margin-left: 0.22rem;
15
- }
16
- }
17
-
18
- .ant-alert {
19
- padding: 8px 12px;
20
- border-radius: ${styledVars.RADIUS_04};
21
-
22
- .ant-alert-icon {
23
- font-size: ${styledVars.ICON_SIZE_S};
24
- top: 9px;
25
- }
26
-
27
- &.ant-alert-info {
28
- background-color: ${styledVars.CAP_G09};
29
- border: 1px solid ${styledVars.CAP_G07};
30
-
31
- .ant-alert-icon {
32
- color: ${styledVars.CAP_G01};
33
- }
34
- }
35
-
36
- &.ant-alert-success {
37
- background-color: ${styledVars.CAP_COLOR_01};
38
- border: 1px solid ${styledVars.CAP_PRIMARY.base};
39
-
40
- .ant-alert-icon {
41
- color: ${styledVars.CAP_PRIMARY.base};
42
- }
43
- }
44
-
45
- &.ant-alert-warning {
46
- background-color: ${styledVars.CAP_COLOR_02};
47
- border: 1px solid ${styledVars.CAP_ORANGE};
48
-
49
- .ant-alert-icon {
50
- color: ${styledVars.CAP_ORANGE};
51
- }
52
- }
53
-
54
- &.ant-alert-error {
55
- background-color: ${styledVars.CAP_COLOR_05};
56
- border: 1px solid ${styledVars.CAP_RED};
57
-
58
- .ant-alert-icon {
59
- color: ${styledVars.CAP_RED};
60
- }
61
- }
62
- }
63
- `;
@@ -1,67 +0,0 @@
1
- import React, { useRef, useEffect } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { Input } from 'antd';
4
- import { WarningOutlined, CheckCircleOutlined } from '@ant-design/icons';
5
- import styled from 'styled-components';
6
- import * as styledVars from '../styled/variables';
7
-
8
- const StyledIcon = styled.span`
9
- color: ${(props) => props.status === "error" && styledVars.CAP_RED};
10
- color: ${(props) => props.status === "success" && styledVars.CAP_PRIMARY.base};
11
- `;
12
-
13
- const CapInput = React.forwardRef((props, ref) => {
14
- const {
15
- alwaysShowFocus,
16
- errorMessage,
17
- isVerified,
18
- suffix,
19
- showSuffix = true,
20
- ...rest
21
- } = props;
22
-
23
- const inputRef = useRef(null);
24
-
25
- useEffect(() => {
26
- if (alwaysShowFocus && inputRef.current) {
27
- inputRef.current.focus();
28
- }
29
- }, [alwaysShowFocus]);
30
-
31
- const inputSuffix = (errorMessage && (
32
- <StyledIcon status="error">
33
- <WarningOutlined />
34
- </StyledIcon>
35
- )) || (isVerified && (
36
- <StyledIcon status="success">
37
- <CheckCircleOutlined />
38
- </StyledIcon>
39
- )) || suffix || null;
40
-
41
- return (
42
- <Input
43
- {...rest}
44
- ref={ref || inputRef}
45
- suffix={showSuffix === false ? null : inputSuffix}
46
- status={errorMessage ? 'error' : undefined}
47
- />
48
- );
49
- });
50
-
51
- CapInput.displayName = 'CapInput';
52
-
53
- CapInput.propTypes = {
54
- alwaysShowFocus: PropTypes.bool,
55
- errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
56
- isVerified: PropTypes.bool,
57
- size: PropTypes.oneOf(['large', 'middle', 'small']),
58
- suffix: PropTypes.node,
59
- showSuffix: PropTypes.bool,
60
- };
61
-
62
- CapInput.defaultProps = {
63
- size: 'large',
64
- showSuffix: true,
65
- };
66
-
67
- export default CapInput;
@@ -1,38 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { InputNumber } from 'antd';
4
-
5
- const CapInputNumber = React.forwardRef((props, ref) => {
6
- const { size = 'large', ...rest } = props;
7
-
8
- return (
9
- <InputNumber
10
- {...rest}
11
- ref={ref}
12
- size={size}
13
- />
14
- );
15
- });
16
-
17
- CapInputNumber.displayName = 'CapInputNumber';
18
-
19
- CapInputNumber.propTypes = {
20
- size: PropTypes.oneOf(['large', 'middle', 'small']),
21
- min: PropTypes.number,
22
- max: PropTypes.number,
23
- step: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
24
- precision: PropTypes.number,
25
- decimalSeparator: PropTypes.string,
26
- formatter: PropTypes.func,
27
- parser: PropTypes.func,
28
- controls: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
29
- keyboard: PropTypes.bool,
30
- stringMode: PropTypes.bool,
31
- };
32
-
33
- CapInputNumber.defaultProps = {
34
- size: 'large',
35
- keyboard: true,
36
- };
37
-
38
- export default CapInputNumber;
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { Input } from 'antd';
4
-
5
- const { Search } = Input;
6
-
7
- const CapInputSearch = React.forwardRef((props, ref) => {
8
- const { size = 'large', ...rest } = props;
9
-
10
- return (
11
- <Search
12
- {...rest}
13
- ref={ref}
14
- size={size}
15
- />
16
- );
17
- });
18
-
19
- CapInputSearch.displayName = 'CapInputSearch';
20
-
21
- CapInputSearch.propTypes = {
22
- size: PropTypes.oneOf(['large', 'middle', 'small']),
23
- enterButton: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
24
- loading: PropTypes.bool,
25
- onSearch: PropTypes.func,
26
- };
27
-
28
- CapInputSearch.defaultProps = {
29
- size: 'large',
30
- };
31
-
32
- export default CapInputSearch;
@@ -1,45 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { Input } from 'antd';
4
-
5
- const { TextArea } = Input;
6
-
7
- const CapInputTextArea = React.forwardRef((props, ref) => {
8
- const { size = 'large', ...rest } = props;
9
-
10
- return (
11
- <TextArea
12
- {...rest}
13
- ref={ref}
14
- size={size}
15
- />
16
- );
17
- });
18
-
19
- CapInputTextArea.displayName = 'CapInputTextArea';
20
-
21
- CapInputTextArea.propTypes = {
22
- size: PropTypes.oneOf(['large', 'middle', 'small']),
23
- autoSize: PropTypes.oneOfType([
24
- PropTypes.bool,
25
- PropTypes.shape({
26
- minRows: PropTypes.number,
27
- maxRows: PropTypes.number,
28
- }),
29
- ]),
30
- rows: PropTypes.number,
31
- maxLength: PropTypes.number,
32
- showCount: PropTypes.oneOfType([
33
- PropTypes.bool,
34
- PropTypes.shape({
35
- formatter: PropTypes.func,
36
- }),
37
- ]),
38
- };
39
-
40
- CapInputTextArea.defaultProps = {
41
- size: 'large',
42
- rows: 4,
43
- };
44
-
45
- export default CapInputTextArea;
package/CapInput/index.js DELETED
@@ -1,10 +0,0 @@
1
- import CapInput from './CapInput';
2
- import Number from './Number';
3
- import Search from './Search';
4
- import TextArea from './TextArea';
5
-
6
- CapInput.Number = Number;
7
- CapInput.Search = Search;
8
- CapInput.TextArea = TextArea;
9
-
10
- export default CapInput;
@@ -1,9 +0,0 @@
1
- /**
2
- * Asynchronously loads the CapInput component
3
- */
4
-
5
- import { loadable } from '@capillarytech/cap-ui-utils';
6
-
7
- const CapInputLoadable = loadable(() => import('./CapInput'));
8
-
9
- export default CapInputLoadable;
@@ -1,27 +0,0 @@
1
- /*
2
- * CapInput Messages
3
- *
4
- * This contains all the text for the CapInput component.
5
- */
6
- import { defineMessages } from 'react-intl';
7
-
8
- const scope = 'blaze.components.CapInput';
9
-
10
- export default defineMessages({
11
- placeholder: {
12
- id: `${scope}.placeholder`,
13
- defaultMessage: 'Enter text...',
14
- },
15
- searchPlaceholder: {
16
- id: `${scope}.searchPlaceholder`,
17
- defaultMessage: 'Search...',
18
- },
19
- textAreaPlaceholder: {
20
- id: `${scope}.textAreaPlaceholder`,
21
- defaultMessage: 'Enter your text here...',
22
- },
23
- numberPlaceholder: {
24
- id: `${scope}.numberPlaceholder`,
25
- defaultMessage: 'Enter number...',
26
- },
27
- });
@@ -1,81 +0,0 @@
1
- import { css } from 'styled-components';
2
- import * as styledVars from '../styled/variables';
3
-
4
- export const inputStyles = css`
5
- &.ant-input,
6
- &.ant-input-affix-wrapper,
7
- &.ant-input-number,
8
- &.ant-input-textarea {
9
- font-family: ${styledVars.FONT_FAMILY};
10
- border-radius: ${styledVars.RADIUS_04};
11
- transition: ${styledVars.TRANSITION_ALL};
12
-
13
- &:hover {
14
- border-color: ${styledVars.CAP_G11};
15
- }
16
-
17
- &:focus,
18
- &.ant-input-affix-wrapper-focused {
19
- border-color: ${styledVars.CAP_G01};
20
- box-shadow: none;
21
- }
22
-
23
- &.ant-input-status-error,
24
- &.ant-input-affix-wrapper-status-error,
25
- &.ant-input-number-status-error {
26
- border-color: ${styledVars.CAP_RED};
27
-
28
- &:hover {
29
- border-color: ${styledVars.CAP_RED};
30
- }
31
-
32
- &:focus,
33
- &.ant-input-affix-wrapper-focused {
34
- border-color: ${styledVars.CAP_RED};
35
- box-shadow: none;
36
- }
37
- }
38
-
39
- &.ant-input-disabled,
40
- &.ant-input-affix-wrapper-disabled {
41
- background-color: ${styledVars.CAP_G08};
42
- cursor: not-allowed;
43
- }
44
- }
45
-
46
- /* Size variations */
47
- &.ant-input-lg,
48
- &.ant-input-affix-wrapper-lg {
49
- font-size: 14px;
50
- padding: 10px 12px;
51
- }
52
-
53
- /* TextArea specific */
54
- &.ant-input-textarea {
55
- .ant-input {
56
- font-family: ${styledVars.FONT_FAMILY};
57
- }
58
- }
59
-
60
- /* Number input specific */
61
- &.ant-input-number {
62
- width: 100%;
63
-
64
- .ant-input-number-handler-wrap {
65
- opacity: 1;
66
- }
67
- }
68
-
69
- /* Search input specific */
70
- &.ant-input-search {
71
- .ant-input-search-button {
72
- background-color: ${styledVars.CAP_PRIMARY.base};
73
- border-color: ${styledVars.CAP_PRIMARY.base};
74
-
75
- &:hover {
76
- background-color: ${styledVars.CAP_PRIMARY.hover};
77
- border-color: ${styledVars.CAP_PRIMARY.hover};
78
- }
79
- }
80
- }
81
- `;
@@ -1,106 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { LabelWrapper, LabelInline } from './styles';
4
-
5
- const CapLabel = ({ type = 'label1', children, fontWeight, lineHeight, ...rest }) => {
6
- return (
7
- <LabelWrapper type={type} fontWeight={fontWeight} lineHeight={lineHeight} {...rest}>
8
- {children}
9
- </LabelWrapper>
10
- );
11
- };
12
-
13
- CapLabel.propTypes = {
14
- type: PropTypes.oneOf([
15
- 'label1',
16
- 'label2',
17
- 'label3',
18
- 'label4',
19
- 'label5',
20
- 'label6',
21
- 'label7',
22
- 'label8',
23
- 'label9',
24
- 'label10',
25
- 'label11',
26
- 'label12',
27
- 'label13',
28
- 'label14',
29
- 'label15',
30
- 'label16',
31
- 'label17',
32
- 'label18',
33
- 'label19',
34
- 'label20',
35
- 'label21',
36
- 'label22',
37
- 'label23',
38
- 'label24',
39
- 'label25',
40
- 'label26',
41
- 'label27',
42
- 'label28',
43
- 'label29',
44
- 'label30',
45
- 'label31',
46
- 'label32',
47
- 'label33',
48
- ]),
49
- children: PropTypes.node,
50
- fontWeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
51
- lineHeight: PropTypes.string,
52
- };
53
-
54
- // Inline span version
55
- const CapLabelInline = ({ type = 'label1', children, fontWeight, lineHeight, ...rest }) => {
56
- return (
57
- <LabelInline type={type} fontWeight={fontWeight} lineHeight={lineHeight} {...rest}>
58
- {children}
59
- </LabelInline>
60
- );
61
- };
62
-
63
- CapLabelInline.propTypes = {
64
- type: PropTypes.oneOf([
65
- 'label1',
66
- 'label2',
67
- 'label3',
68
- 'label4',
69
- 'label5',
70
- 'label6',
71
- 'label7',
72
- 'label8',
73
- 'label9',
74
- 'label10',
75
- 'label11',
76
- 'label12',
77
- 'label13',
78
- 'label14',
79
- 'label15',
80
- 'label16',
81
- 'label17',
82
- 'label18',
83
- 'label19',
84
- 'label20',
85
- 'label21',
86
- 'label22',
87
- 'label23',
88
- 'label24',
89
- 'label25',
90
- 'label26',
91
- 'label27',
92
- 'label28',
93
- 'label29',
94
- 'label30',
95
- 'label31',
96
- 'label32',
97
- 'label33',
98
- ]),
99
- children: PropTypes.node,
100
- fontWeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
101
- lineHeight: PropTypes.string,
102
- };
103
-
104
- CapLabel.Inline = CapLabelInline;
105
-
106
- export default CapLabel;
package/CapLabel/index.js DELETED
@@ -1 +0,0 @@
1
- export { default } from './CapLabel';