groundfloor-react-ui 1.2.9 → 1.2.11

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 (186) hide show
  1. package/dist/index.es.js +432 -422
  2. package/dist/index.js +459 -449
  3. package/package.json +15 -43
  4. package/rollup.config.js +6 -6
  5. package/assets/fonts/Averta/Averta-Black.woff2 +0 -0
  6. package/assets/fonts/Averta/Averta-BlackItalic.woff2 +0 -0
  7. package/assets/fonts/Averta/Averta-Bold.woff2 +0 -0
  8. package/assets/fonts/Averta/Averta-BoldItalic.woff2 +0 -0
  9. package/assets/fonts/Averta/Averta-ExtraBold.woff2 +0 -0
  10. package/assets/fonts/Averta/Averta-ExtraBoldItalic.woff2 +0 -0
  11. package/assets/fonts/Averta/Averta-ExtraThin.woff2 +0 -0
  12. package/assets/fonts/Averta/Averta-ExtraThinItalic.woff2 +0 -0
  13. package/assets/fonts/Averta/Averta-Light.woff2 +0 -0
  14. package/assets/fonts/Averta/Averta-LightItalic.woff2 +0 -0
  15. package/assets/fonts/Averta/Averta-Regular.woff2 +0 -0
  16. package/assets/fonts/Averta/Averta-RegularItalic.woff2 +0 -0
  17. package/assets/fonts/Averta/Averta-SemiBold.woff2 +0 -0
  18. package/assets/fonts/Averta/Averta-SemiBoldItalic.woff2 +0 -0
  19. package/assets/fonts/Averta/Averta-Thin.woff2 +0 -0
  20. package/assets/fonts/Averta/Averta-ThinItalic.woff2 +0 -0
  21. package/assets/fonts/Beauty/BeautyDemo.woff +0 -0
  22. package/assets/icons/app-logo.svg +0 -3
  23. package/assets/icons/arrow-down.svg +0 -3
  24. package/assets/icons/arrow-rotate.svg +0 -1
  25. package/assets/icons/arrow-up.svg +0 -3
  26. package/assets/icons/bell.svg +0 -3
  27. package/assets/icons/check.svg +0 -3
  28. package/assets/icons/checkmark.svg +0 -3
  29. package/assets/icons/chevron-down.svg +0 -3
  30. package/assets/icons/chevron-left.svg +0 -3
  31. package/assets/icons/chevron-right.svg +0 -3
  32. package/assets/icons/cloud-icon.svg +0 -3
  33. package/assets/icons/connection.svg +0 -3
  34. package/assets/icons/cross-icon.svg +0 -3
  35. package/assets/icons/default.svg +0 -1
  36. package/assets/icons/door-internal-active.svg +0 -1
  37. package/assets/icons/edit-icon.svg +0 -3
  38. package/assets/icons/ellipses-horizontal.svg +0 -3
  39. package/assets/icons/ellipses.svg +0 -3
  40. package/assets/icons/email.svg +0 -3
  41. package/assets/icons/eye-hide-view.svg +0 -1
  42. package/assets/icons/eye-hide.svg +0 -1
  43. package/assets/icons/file-attach-white.svg +0 -3
  44. package/assets/icons/file-attach.svg +0 -3
  45. package/assets/icons/file-icon.svg +0 -1
  46. package/assets/icons/file-upload.svg +0 -3
  47. package/assets/icons/functional-equation-regular.svg +0 -147
  48. package/assets/icons/hamburger-menu.svg +0 -3
  49. package/assets/icons/heart.svg +0 -18
  50. package/assets/icons/image.svg +0 -3
  51. package/assets/icons/info.svg +0 -3
  52. package/assets/icons/jpg-icon.svg +0 -3
  53. package/assets/icons/magnifier.svg +0 -3
  54. package/assets/icons/menu-ellipse-two.svg +0 -1
  55. package/assets/icons/menu-ellipse.svg +0 -53
  56. package/assets/icons/pause-all.svg +0 -1
  57. package/assets/icons/pdf-icon.svg +0 -3
  58. package/assets/icons/pen-icon.svg +0 -3
  59. package/assets/icons/plus-outlined.svg +0 -3
  60. package/assets/icons/resume.svg +0 -1
  61. package/assets/icons/sign-icon.svg +0 -3
  62. package/assets/icons/star.svg +0 -3
  63. package/assets/icons/trash-icon.svg +0 -59
  64. package/assets/icons/triangle-down.svg +0 -3
  65. package/assets/icons/users.svg +0 -11
  66. package/assets/icons/view.svg +0 -3
  67. package/assets/icons/watcher.svg +0 -3
  68. package/assets/icons/zoom-in-white.svg +0 -1
  69. package/assets/styles/global.css +0 -0
  70. package/assets/styles/global.scss +0 -0
  71. package/components/Accordion/Accordion.js +0 -167
  72. package/components/Accordion/AccordionSB.js +0 -170
  73. package/components/Accordion/AccordionSBfooter.js +0 -171
  74. package/components/Accordion/index.js +0 -4
  75. package/components/ArrowBar/ArrowBar.js +0 -276
  76. package/components/ArrowBar/index.js +0 -2
  77. package/components/Avatar/Avatar.js +0 -171
  78. package/components/Avatar/AvatarSB.js +0 -255
  79. package/components/Avatar/AvatarSBfooter.js +0 -279
  80. package/components/Avatar/index.js +0 -4
  81. package/components/Banner/Banner.js +0 -70
  82. package/components/Banner/index.js +0 -2
  83. package/components/Breadcrumb/Breadcrumb.js +0 -225
  84. package/components/Breadcrumb/index.js +0 -2
  85. package/components/Button/PrimaryButton.js +0 -167
  86. package/components/Button/SecondaryButton.js +0 -156
  87. package/components/Button/TinyButton.js +0 -101
  88. package/components/Button/index.js +0 -6
  89. package/components/Cards/Card.js +0 -43
  90. package/components/Cards/CardRef.js +0 -71
  91. package/components/Cards/DocumentCard.js +0 -215
  92. package/components/Cards/index.js +0 -5
  93. package/components/Content/Content.js +0 -50
  94. package/components/Content/index.js +0 -1
  95. package/components/DesignComponent/StyledComponent/StyledComponent.js +0 -326
  96. package/components/DesignComponent/StyledComponent/index.js +0 -1
  97. package/components/DesignComponent/index.js +0 -1
  98. package/components/Divider/Divider.js +0 -56
  99. package/components/Divider/index.js +0 -2
  100. package/components/Drawer/Drawer.js +0 -84
  101. package/components/Drawer/index.js +0 -2
  102. package/components/ErrorBoundary/ErrorBoundary.js +0 -44
  103. package/components/ErrorBoundary/index.js +0 -1
  104. package/components/FilterChip/FilterChip.js +0 -70
  105. package/components/FilterChip/index.js +0 -1
  106. package/components/Footer/Footer.js +0 -57
  107. package/components/Footer/FooterContent.js +0 -98
  108. package/components/Footer/index.js +0 -3
  109. package/components/Form/FormComponent.js +0 -244
  110. package/components/Form/HeaderComponent.js +0 -64
  111. package/components/Form/SubmitComponent.js +0 -63
  112. package/components/Form/index.js +0 -5
  113. package/components/GroupAvatars/GroupAvatars.js +0 -139
  114. package/components/GroupAvatars/index.js +0 -1
  115. package/components/GroupButtons/ButtonPopup.js +0 -191
  116. package/components/GroupButtons/GroupButtons.js +0 -150
  117. package/components/GroupButtons/GroupButtonsPopup.js +0 -163
  118. package/components/GroupButtons/index.js +0 -3
  119. package/components/GroupStatusCircle/GroupStatusCircle.js +0 -135
  120. package/components/GroupStatusCircle/index.js +0 -1
  121. package/components/Header/Header.js +0 -58
  122. package/components/Header/index.js +0 -1
  123. package/components/HyperLink/HyperLink.js +0 -114
  124. package/components/HyperLink/index.js +0 -1
  125. package/components/Icon/Icon.js +0 -176
  126. package/components/Icon/index.js +0 -1
  127. package/components/Images/Image.js +0 -107
  128. package/components/Images/index.js +0 -2
  129. package/components/Inputs/CheckBoxInput.js +0 -341
  130. package/components/Inputs/ColorInput.js +0 -145
  131. package/components/Inputs/DateSelect.js +0 -461
  132. package/components/Inputs/DropdownSelect.js +0 -689
  133. package/components/Inputs/DropzoneInput.js +0 -450
  134. package/components/Inputs/NumericInput.js +0 -177
  135. package/components/Inputs/PasswordInput.js +0 -267
  136. package/components/Inputs/RadioInput.js +0 -292
  137. package/components/Inputs/SearchInput.js +0 -19
  138. package/components/Inputs/Signature.js +0 -369
  139. package/components/Inputs/TextArea.js +0 -214
  140. package/components/Inputs/TextInput.js +0 -251
  141. package/components/Inputs/TimeInput.js +0 -186
  142. package/components/Inputs/ToggleSwitch.js +0 -189
  143. package/components/Inputs/index.js +0 -15
  144. package/components/Label/Label.js +0 -48
  145. package/components/Label/index.js +0 -1
  146. package/components/Loaders/Loader.js +0 -179
  147. package/components/Loaders/index.js +0 -2
  148. package/components/Modal/ModalComp.js +0 -216
  149. package/components/Modal/index.js +0 -1
  150. package/components/Overlay/Overlay.js +0 -158
  151. package/components/Overlay/index.js +0 -1
  152. package/components/Pagination/Pagination.js +0 -59
  153. package/components/Pagination/index.js +0 -1
  154. package/components/ProgressBar/ProgressBar.js +0 -101
  155. package/components/ProgressBar/index.js +0 -1
  156. package/components/ProgressSteps/ProgressSteps.js +0 -121
  157. package/components/ProgressSteps/index.js +0 -1
  158. package/components/Rating/Rating.js +0 -258
  159. package/components/Rating/index.js +0 -1
  160. package/components/SecondaryLink/DarkSecondaryLink.js +0 -97
  161. package/components/SecondaryLink/LightSecondaryLink.js +0 -93
  162. package/components/SecondaryLink/index.js +0 -3
  163. package/components/Sidebar/Navbar.js +0 -306
  164. package/components/Sidebar/Sidebar.js +0 -207
  165. package/components/Sidebar/index.js +0 -3
  166. package/components/StatusChip/PrimaryStatusChip.js +0 -78
  167. package/components/StatusChip/SecondaryStatusChip.js +0 -78
  168. package/components/StatusChip/SlimPrimaryStatusChip.js +0 -92
  169. package/components/StatusChip/SlimSecondaryStatusChip.js +0 -93
  170. package/components/StatusChip/index.js +0 -6
  171. package/components/StatusCircle/StatusCircle.js +0 -64
  172. package/components/StatusCircle/index.js +0 -1
  173. package/components/Tables/Table.js +0 -178
  174. package/components/Tables/index.js +0 -1
  175. package/components/Tooltip/Tooltip.js +0 -581
  176. package/components/Tooltip/index.js +0 -1
  177. package/components/Typography/Typography.js +0 -77
  178. package/components/Typography/index.js +0 -2
  179. package/components/constants/colors.js +0 -33
  180. package/components/constants/defaultStyle.js +0 -804
  181. package/components/constants/defaultThemeColor.js +0 -16
  182. package/components/constants/index.js +0 -7
  183. package/components/constants/utils.js +0 -31
  184. package/components/global/FontStyle.js +0 -131
  185. package/components/global/index.js +0 -1
  186. package/index.js +0 -41
@@ -1,163 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react';
3
- import styled, { useTheme } from 'styled-components';
4
- import defaultThemeColor from '../constants/defaultThemeColor';
5
- import { ButtonPopup } from './ButtonPopup';
6
-
7
- /**
8
- * Primary UI component for user interaction
9
- */
10
-
11
-
12
- const StyledContainer = styled.div`
13
- display: flex;
14
- justify-content: space-evenly;
15
- align-items: stretch;
16
- height: 42px;
17
- border: 1px solid ${({ theme, borderVariant }) => theme.variant[borderVariant]};
18
- border-radius: 3px;
19
- `;
20
-
21
-
22
-
23
- const StyledItem = styled.div`
24
- display: flex;
25
- justify-content: space-evenly;
26
- flex-grow: 1;
27
- align-items: stretch;
28
- `;
29
-
30
- const StyledButton = styled.div`
31
- display: flex;
32
- color: ${({ theme, disabled, variant, variantDisable }) => disabled ? theme.variant[variantDisable] : theme.variant[variant]};
33
- background: ${({ theme, disabled, bgVariant, variantBgDisable }) => disabled ? theme.variant[variantBgDisable] : theme.variant[bgVariant]};
34
- justify-content: space-evenly;
35
- align-items: center;
36
- cursor: ${({ disabled }) => disabled ? 'not-allowed' : 'pointer'};
37
- border: none;
38
- margin: 0;
39
- padding: 0;
40
- flex-grow: 1;
41
-
42
- svg path {
43
- fill: ${({ theme, disabled, variant, variantDisable }) => disabled ? theme.variant[variantDisable] : theme.variant[variant]};
44
- }
45
- `;
46
-
47
- export const GroupButtonsPopup = ({ style, items, variant, borderVariant, bgVariant, variantDisable, variantBgDisable, allDisabled, divider, indexPrefix, onClick, variantTPtext, variantTPbg, ...props }) => {
48
- const theme = useTheme() || defaultThemeColor;
49
-
50
- return (
51
- <StyledContainer
52
- variant={variant}
53
- borderVariant={borderVariant}
54
- {...props}
55
- >
56
- {items?.map((item, i) => {
57
- return (
58
- <ButtonPopup
59
- key={indexPrefix.concat(i)}
60
- variant={variant}
61
- borderVariant={borderVariant}
62
- bgVariant={bgVariant}
63
- variantDisable={variantDisable}
64
- variantBgDisable={variantBgDisable}
65
- // title={item.label}
66
- disabled={allDisabled || item.disabled}
67
- onClick={allDisabled || item.disabled ? null : () => { onClick(item.label) }}
68
- divider={items?.length - 1 !== i && divider}
69
- icon={item.icon}
70
- index={i}
71
- label={item.label}
72
- variantTPtext={variantTPtext}
73
- variantTPbg={variantTPbg}
74
- />
75
- );
76
- })}
77
- </StyledContainer>
78
- );
79
- };
80
-
81
- GroupButtonsPopup.propTypes = {
82
- /**
83
- * Common color of icons. primary-1, 2, error, etc.
84
- * If this props is not pass each Icon will have its own color
85
- */
86
- variant: PropTypes.string,
87
- /**
88
- * Color of the border. primary-1, 2, error, etc.
89
- */
90
- borderVariant: PropTypes.string,
91
- /**
92
- * Color of the background. primary-1, 2, error, etc.
93
- */
94
- bgVariant: PropTypes.string,
95
- /**
96
- * Color of icon when disabled. primary-1, 2, error, etc.
97
- */
98
- variantDisable: PropTypes.string,
99
- /**
100
- * Color of background when disabled. primary-1, 2, error, etc.
101
- */
102
- variantBgDisable: PropTypes.string,
103
- /**
104
- * String to prefix the index number in the map function
105
- */
106
- indexPrefix: PropTypes.string,
107
- /**
108
- * Theme object
109
- */
110
- theme: PropTypes.object,
111
- /**
112
- * Array of items. Each item must be an object in this format:
113
- * {
114
- * label: "Test1",
115
- * icon: <Icon icon='plus-outlined' size={18} />,
116
- * disabled: true
117
- * }
118
- */
119
- items: PropTypes.array,
120
- /**
121
- * Optional boolean to disable all buttons
122
- */
123
- allDisabled: PropTypes.bool,
124
- /**
125
- * Divider component with vertical prop
126
- */
127
- divider: PropTypes.any,
128
- /**
129
- * onClick function to handle click
130
- */
131
- onClick: PropTypes.func,
132
- /**
133
- * Color of the text of the tooltip. primary-1, 2, error, etc.
134
- */
135
- variantTPtext: PropTypes.string,
136
- /**
137
- * Color of the background of the tooltip. primary-1, 2, error, etc.
138
- */
139
- variantTPbg: PropTypes.string,
140
- };
141
-
142
- StyledContainer.defaultProps = {
143
- theme: defaultThemeColor,
144
- }
145
-
146
- StyledItem.defaultProps = {
147
- theme: defaultThemeColor,
148
- }
149
-
150
- StyledButton.defaultProps = {
151
- theme: defaultThemeColor,
152
- }
153
-
154
- GroupButtonsPopup.defaultProps = {
155
- theme: defaultThemeColor,
156
- indexPrefix: 'btn-group',
157
- borderVariant: 'neutral-4',
158
- bgVariant: 'bgColor',
159
- variantDisable: 'neutral-2',
160
- variantBgDisable: 'bgColor',
161
- variantTPtext: null,
162
- variantTPbg: null,
163
- };
@@ -1,3 +0,0 @@
1
- export * from './ButtonPopup';
2
- export * from './GroupButtons';
3
- export * from './GroupButtonsPopup';
@@ -1,135 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react';
3
- import styled, { useTheme } from 'styled-components';
4
- import defaultThemeColor from '../constants/defaultThemeColor';
5
- import { StatusCircle } from '../StatusCircle';
6
-
7
-
8
- /**
9
- * Primary UI component for user interaction
10
- */
11
-
12
- const StyledDiv = styled.div`
13
- display: inline-flex;
14
- align-items: center;
15
- background-color: transparent;
16
- min-height: 24px;
17
- `;
18
-
19
- const StyledContainer = styled.div`
20
- display: flex;
21
- justify-content: space-evenly;
22
- width: 69px;
23
- `;
24
-
25
- const StyledText = styled.p`
26
- display: flex;
27
- color: ${({ theme, variantText, colorText }) => colorText ? colorText : theme.variant[variantText]};
28
- font-size: 16px;
29
- margin: 0 5px;
30
- `;
31
-
32
- export const GroupStatusCircle = ({ style, variantCircle, variantText, level, textArray, colorArray, indexPrefix, colorText, ...props }) => {
33
- const theme = useTheme() || defaultThemeColor;
34
-
35
- return (
36
- <StyledDiv
37
- {...props}
38
- >
39
- <StyledContainer>
40
- {[1, 2, 3, 4].map((el, i) => {
41
-
42
- let colorBorder = '#D4D7E3';
43
- let colorBg = null;
44
- let colorBgVariant = null;
45
-
46
- // Limit level value between 0 and 4
47
- if (level <= 0) level = 0;
48
- if (level >= 4) level = 4;
49
-
50
- if (colorArray) {
51
- if (level >= el) {
52
- colorBg = colorArray[level]
53
- colorBorder = colorArray[level]
54
- } else {
55
- colorBg = colorArray[0]
56
- }
57
- } else {
58
- //If level 0 cannot apply variant to keep the circle white
59
- if (level >= el) {
60
- colorBgVariant = variantCircle
61
- colorBorder = variantCircle
62
- } else {
63
- colorBgVariant = '#FFFFFF'
64
- }
65
- }
66
-
67
- return (
68
- <StatusCircle
69
- key={indexPrefix.concat(i)}
70
- variant={colorBgVariant}
71
- borderColor={colorBorder}
72
- bgColor={colorBg}
73
- size={11}
74
- />
75
- );
76
- })}
77
- </StyledContainer>
78
- {textArray && <StyledText variantText={variantText} colorText={colorText}>{textArray[level]}</StyledText>}
79
- </StyledDiv>
80
- );
81
- };
82
-
83
- GroupStatusCircle.propTypes = {
84
- /**
85
- * Color of Circle. primary-1, 2, error, etc.
86
- */
87
- variantCircle: PropTypes.string,
88
- /**
89
- * Color of Text. primary-1, 2, error, etc.
90
- */
91
- variantText: PropTypes.string,
92
- /**
93
- * Level value min 0, max 4
94
- */
95
- level: PropTypes.number,
96
- /**
97
- * String to prefix the index number in the map function
98
- */
99
- indexPrefix: PropTypes.string,
100
- /**
101
- * Theme object
102
- */
103
- theme: PropTypes.object,
104
- /**
105
- * Optional width selector
106
- */
107
- block: PropTypes.bool,
108
- /**
109
- * Optional text array. If present the text of each index will be show for the corresponding level
110
- */
111
- textArray: PropTypes.array,
112
- /**
113
- * Optional color array. If present the circle color of the level will match the index color of the array.
114
- * If no colorArray the color of the circles will be the variant color.
115
- */
116
- colorArray: PropTypes.array,
117
- /**
118
- * Optional Custom color of the text
119
- */
120
- colorText: PropTypes.string,
121
- };
122
-
123
- StyledText.defaultProps = {
124
- theme: defaultThemeColor,
125
- }
126
-
127
- GroupStatusCircle.defaultProps = {
128
- theme: defaultThemeColor,
129
- variantCircle: 'primary-1',
130
- variantText: 'primary-2',
131
- block: false,
132
- level: 0,
133
- indexPrefix: 'circle-group'
134
- };
135
-
@@ -1 +0,0 @@
1
- export * from './GroupStatusCircle';
@@ -1,58 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react';
3
- import styled from 'styled-components';
4
- import defaultStyles from '../constants/defaultStyle';
5
- import getDefaultStyles from '../constants/utils';
6
-
7
- /**
8
- * Primary UI component for user interaction
9
- */
10
-
11
- const StyledHeader = styled.header`
12
- //Set the styles from the default styles object
13
- ${({ theme, type }) => {
14
- return getDefaultStyles(theme, type);
15
- }}
16
- // custom styles
17
- ${({ customStyles }) => customStyles}
18
- `;
19
-
20
- export const Header = ({ theme, type, customStyles, ...props }) => {
21
-
22
- return (
23
- <StyledHeader
24
- theme={theme}
25
- type='header'
26
- customStyles={customStyles}
27
- {...props}
28
- >
29
- {props.children}
30
- </StyledHeader>
31
- );
32
- };
33
-
34
- Header.propTypes = {
35
- /**
36
- * Theme props
37
- */
38
- theme: PropTypes.object,
39
- /**
40
- * Custom style object
41
- */
42
- customStyles: PropTypes.object,
43
- /**
44
- * Type of the component which define the default style
45
- */
46
- type: PropTypes.string,
47
- };
48
-
49
- StyledHeader.defaultProps = {
50
- theme: PropTypes.object,
51
- }
52
-
53
- Header.defaultProps = {
54
- theme: defaultStyles,
55
- type: 'header',
56
- customStyles: null,
57
-
58
- };
@@ -1 +0,0 @@
1
- export * from './Header';
@@ -1,114 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react';
3
- import styled, { css, useTheme } from 'styled-components';
4
- import defaultThemeColor from '../constants/defaultThemeColor';
5
-
6
- /**
7
- * Primary UI component for user interaction
8
- */
9
-
10
- const sizes = {
11
- xsm: {
12
- fontSize: '12px'
13
- },
14
- sm: {
15
- fontSize: '14px'
16
- },
17
- md: {
18
- fontSize: '16px'
19
- },
20
- lg: {
21
- fontSize: '18px'
22
- },
23
- }
24
-
25
- // Define style css
26
- const StyledHyperLink = styled.button`
27
- ${({ underlined }) => !underlined ? css`&:hover {text-decoration: underline}` : null};
28
- background: transparent;
29
- color: ${({ theme, variant }) => theme.variant[variant]};
30
- text-decoration: ${({ underlined }) => underlined ? 'underline' : 'none'};
31
- display: flex;
32
- width: ${({ block }) => block ? '100%' : 'auto'};
33
- align-items: center;
34
- justify-content: start;
35
- border: none;
36
- cursor: pointer;
37
- font-size: ${({ size }) => sizes[size].fontSize};
38
-
39
- &:disabled {
40
- color: ${({ theme }) => theme.variant['neutral-3']};
41
- cursor: not-allowed;
42
- }
43
-
44
- * {
45
- outline: none;
46
- }
47
- `;
48
-
49
- export const HyperLink = ({ block, size, style, variant, disabled, underlined, ...props }) => {
50
- const theme = useTheme() || defaultThemeColor;
51
-
52
- return (
53
- <StyledHyperLink
54
- block={block}
55
- variant={variant}
56
- type="button"
57
- style={style}
58
- size={size}
59
- disabled={disabled}
60
- underlined={underlined}
61
- {...props}
62
- >
63
- {props.children}
64
- </StyledHyperLink>
65
- );
66
- };
67
-
68
- HyperLink.propTypes = {
69
- /**
70
- * HyperLink color: 'primary-1', 'primary-2', 'error', etc.
71
- */
72
- variant: PropTypes.string,
73
- /**
74
- * Is the button disabled?
75
- */
76
- disabled: PropTypes.bool,
77
- /**
78
- * How big should the text be?
79
- */
80
- size: PropTypes.oneOf(['xsm', 'sm', 'md', 'lg']),
81
- /**
82
- * Optional width (block true width = 100%)
83
- */
84
- block: PropTypes.bool,
85
- /**
86
- * Optional click handler
87
- */
88
- onClick: PropTypes.func,
89
- /**
90
- * Theme object
91
- */
92
- theme: PropTypes.object,
93
- /**
94
- * Optional: add underline
95
- */
96
- underlined: PropTypes.bool,
97
-
98
- };
99
-
100
- StyledHyperLink.defaultProps = {
101
- theme: defaultThemeColor,
102
- }
103
-
104
- HyperLink.defaultProps = {
105
- theme: defaultThemeColor,
106
- variant: "primary-1",
107
- block: false,
108
- disabled: false,
109
- size: "sm",
110
- onClick: undefined,
111
- label: "Remove",
112
- underlined: false
113
- };
114
-
@@ -1 +0,0 @@
1
- export * from './HyperLink';
@@ -1,176 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react';
3
- import { ReactSVG } from "react-svg";
4
- import styled, { css } from 'styled-components';
5
- import defaultThemeColor from '../constants/defaultThemeColor';
6
-
7
- /** import icons from assets here */
8
- import appLogo from '../../assets/icons/app-logo.svg';
9
- import arrowDown from '../../assets/icons/arrow-down.svg';
10
- import arrowRotate from '../../assets/icons/arrow-rotate.svg';
11
- import arrowUp from '../../assets/icons/arrow-up.svg';
12
- import bell from '../../assets/icons/bell.svg';
13
- import checkIcon from '../../assets/icons/check.svg';
14
- import checkMark from '../../assets/icons/checkmark.svg';
15
- import chevronDown from '../../assets/icons/chevron-down.svg';
16
- import chevronLeft from '../../assets/icons/chevron-left.svg';
17
- import chevronRight from '../../assets/icons/chevron-right.svg';
18
- import cloudIcon from '../../assets/icons/cloud-icon.svg';
19
- import connection from '../../assets/icons/connection.svg';
20
- import crossIcon from '../../assets/icons/cross-icon.svg';
21
- import defaultIcon from '../../assets/icons/default.svg';
22
- import doorInternalActive from '../../assets/icons/door-internal-active.svg';
23
- import editIcon from '../../assets/icons/edit-icon.svg';
24
- import ellipsesHorizontal from '../../assets/icons/ellipses-horizontal.svg';
25
- import ellipses from '../../assets/icons/ellipses.svg';
26
- import email from '../../assets/icons/email.svg';
27
- import eyeView from '../../assets/icons/eye-hide-view.svg';
28
- import eyeHide from '../../assets/icons/eye-hide.svg';
29
- import fileAttachWhite from '../../assets/icons/file-attach-white.svg';
30
- import fileAttach from '../../assets/icons/file-attach.svg';
31
- import fileIcon from '../../assets/icons/file-icon.svg';
32
- import fileUpload from '../../assets/icons/file-upload.svg';
33
- import equation from '../../assets/icons/functional-equation-regular.svg';
34
- import hamburgerMenu from '../../assets/icons/hamburger-menu.svg';
35
- import info from '../../assets/icons/info.svg';
36
- import jpgIcon from '../../assets/icons/jpg-icon.svg';
37
- import magnifier from '../../assets/icons/magnifier.svg';
38
- import menuEllipseTwo from '../../assets/icons/menu-ellipse-two.svg';
39
- import menuEllipse from '../../assets/icons/menu-ellipse.svg';
40
- import pauseAll from '../../assets/icons/pause-all.svg';
41
- import pdfIcon from '../../assets/icons/pdf-icon.svg';
42
- import penIcon from '../../assets/icons/pen-icon.svg';
43
- import plusOutline from '../../assets/icons/plus-outlined.svg';
44
- import resume from '../../assets/icons/resume.svg';
45
- import signIcon from '../../assets/icons/sign-icon.svg';
46
- import star from '../../assets/icons/star.svg';
47
- import trashIcon from '../../assets/icons/trash-icon.svg';
48
- import triangleDown from '../../assets/icons/triangle-down.svg';
49
- import user from '../../assets/icons/users.svg';
50
- import view from '../../assets/icons/view.svg';
51
- import watcher from '../../assets/icons/watcher.svg';
52
- import zoomInWhite from '../../assets/icons/zoom-in-white.svg';
53
-
54
-
55
- /** icon name should be kebab-case, e.g "plus-outline" */
56
- const iconObj = {
57
- 'plus-outlined': plusOutline,
58
- 'check-mark': checkMark,
59
- 'chevron-right': chevronRight,
60
- 'chevron-left': chevronLeft,
61
- 'app-logo': appLogo,
62
- 'email': email,
63
- 'chevron-down': chevronDown,
64
- 'triangle-down': triangleDown,
65
- 'info': info,
66
- 'cross-icon': crossIcon,
67
- 'file-attach': fileAttach,
68
- 'jpg-icon': jpgIcon,
69
- 'pdf-icon': pdfIcon,
70
- 'arrow-up': arrowUp,
71
- 'arrow-down': arrowDown,
72
- 'pen-icon': penIcon,
73
- 'sign-icon': signIcon,
74
- 'edit-icon': editIcon,
75
- 'hamburger-menu': hamburgerMenu,
76
- 'bell': bell,
77
- 'star': star,
78
- 'cloud-icon': cloudIcon,
79
- 'check-icon': checkIcon,
80
- 'arrow-rotate': arrowRotate,
81
- 'magnifier-icon': magnifier,
82
- 'connection': connection,
83
- 'door-internal-active': doorInternalActive,
84
- 'ellipses-horizontal': ellipsesHorizontal,
85
- 'ellipses': ellipses,
86
- 'file-attach-white': fileAttachWhite,
87
- 'functional-equation': equation,
88
- "menu-ellipse-two": menuEllipseTwo,
89
- 'menu-ellipse': menuEllipse,
90
- 'pause-all': pauseAll,
91
- 'resume': resume,
92
- 'trash-icon': trashIcon,
93
- 'zoom-in-white': zoomInWhite,
94
- 'watcher': watcher,
95
- 'view': view,
96
- 'user-icon': user,
97
- 'file-upload': fileUpload,
98
- 'eye-hide': eyeHide,
99
- 'eye-show': eyeView,
100
- 'file-icon': fileIcon,
101
- 'default-icon': defaultIcon,
102
- }
103
-
104
- const StyledSVGIcon = styled(ReactSVG)`
105
- div {
106
- ${({ size }) =>
107
- size &&
108
- css`
109
- width: ${size}px;
110
- height: ${size}px;
111
- `}
112
- }
113
- svg {
114
- fill: black;
115
-
116
- ${({ size }) =>
117
- size &&
118
- css`
119
- width: ${size}px;
120
- height: ${size}px;
121
- `}
122
-
123
- ${({ transform }) =>
124
- transform &&
125
- css`
126
- transform: ${transform};
127
- `}
128
-
129
- path {
130
- ${({ color }) =>
131
- color &&
132
- css`
133
- fill: ${color};
134
- `}
135
- }
136
- outline: none;
137
- border:none;
138
- &:focus: {
139
- outline: none;
140
- border:none;
141
- }
142
- vertical-align: initial;
143
- }
144
- `;
145
-
146
- export const Icon = ({ icon, color, size, transform, ...props }) => {
147
- return (
148
- <StyledSVGIcon
149
- src={iconObj[icon]}
150
- color={color}
151
- size={size}
152
- transform={transform}
153
- {...props}
154
- />
155
- );
156
- };
157
-
158
- Icon.propTypes = {
159
- /**
160
- * name of icon
161
- */
162
- icon: PropTypes.string.isRequired,
163
- /**
164
- * set size of icon in px
165
- */
166
- size: PropTypes.number,
167
- /**
168
- * color of icon
169
- */
170
- color: PropTypes.string,
171
- }
172
-
173
- Icon.defaultProps = {
174
- size: 16,
175
- color: defaultThemeColor.primary['primary-1'],
176
- }
@@ -1 +0,0 @@
1
- export * from './Icon';