groundfloor-react-ui 1.0.0

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 (185) hide show
  1. package/README.md +20 -0
  2. package/assets/fonts/Averta/Averta-Black.woff2 +0 -0
  3. package/assets/fonts/Averta/Averta-BlackItalic.woff2 +0 -0
  4. package/assets/fonts/Averta/Averta-Bold.woff2 +0 -0
  5. package/assets/fonts/Averta/Averta-BoldItalic.woff2 +0 -0
  6. package/assets/fonts/Averta/Averta-ExtraBold.woff2 +0 -0
  7. package/assets/fonts/Averta/Averta-ExtraBoldItalic.woff2 +0 -0
  8. package/assets/fonts/Averta/Averta-ExtraThin.woff2 +0 -0
  9. package/assets/fonts/Averta/Averta-ExtraThinItalic.woff2 +0 -0
  10. package/assets/fonts/Averta/Averta-Light.woff2 +0 -0
  11. package/assets/fonts/Averta/Averta-LightItalic.woff2 +0 -0
  12. package/assets/fonts/Averta/Averta-Regular.woff2 +0 -0
  13. package/assets/fonts/Averta/Averta-RegularItalic.woff2 +0 -0
  14. package/assets/fonts/Averta/Averta-SemiBold.woff2 +0 -0
  15. package/assets/fonts/Averta/Averta-SemiBoldItalic.woff2 +0 -0
  16. package/assets/fonts/Averta/Averta-Thin.woff2 +0 -0
  17. package/assets/fonts/Averta/Averta-ThinItalic.woff2 +0 -0
  18. package/assets/fonts/Beauty/BeautyDemo.woff +0 -0
  19. package/assets/icons/app-logo.svg +3 -0
  20. package/assets/icons/arrow-down.svg +3 -0
  21. package/assets/icons/arrow-rotate.svg +1 -0
  22. package/assets/icons/arrow-up.svg +3 -0
  23. package/assets/icons/bell.svg +3 -0
  24. package/assets/icons/check.svg +3 -0
  25. package/assets/icons/checkmark.svg +3 -0
  26. package/assets/icons/chevron-down.svg +3 -0
  27. package/assets/icons/chevron-left.svg +3 -0
  28. package/assets/icons/chevron-right.svg +3 -0
  29. package/assets/icons/cloud-icon.svg +3 -0
  30. package/assets/icons/connection.svg +3 -0
  31. package/assets/icons/cross-icon.svg +3 -0
  32. package/assets/icons/door-internal-active.svg +1 -0
  33. package/assets/icons/edit-icon.svg +3 -0
  34. package/assets/icons/ellipses-horizontal.svg +3 -0
  35. package/assets/icons/ellipses.svg +3 -0
  36. package/assets/icons/email.svg +3 -0
  37. package/assets/icons/eye-hide-view.svg +1 -0
  38. package/assets/icons/eye-hide.svg +1 -0
  39. package/assets/icons/file-attach-white.svg +3 -0
  40. package/assets/icons/file-attach.svg +3 -0
  41. package/assets/icons/functional-equation-regular.svg +147 -0
  42. package/assets/icons/hamburger-menu.svg +3 -0
  43. package/assets/icons/heart.svg +18 -0
  44. package/assets/icons/image.svg +3 -0
  45. package/assets/icons/info.svg +3 -0
  46. package/assets/icons/jpg-icon.svg +3 -0
  47. package/assets/icons/magnifier.svg +3 -0
  48. package/assets/icons/menu-ellipse-two.svg +1 -0
  49. package/assets/icons/menu-ellipse.svg +53 -0
  50. package/assets/icons/pause-all.svg +1 -0
  51. package/assets/icons/pdf-icon.svg +3 -0
  52. package/assets/icons/pen-icon.svg +3 -0
  53. package/assets/icons/plus-outlined.svg +3 -0
  54. package/assets/icons/resume.svg +1 -0
  55. package/assets/icons/sign-icon.svg +3 -0
  56. package/assets/icons/star.svg +3 -0
  57. package/assets/icons/trash-icon.svg +59 -0
  58. package/assets/icons/triangle-down.svg +3 -0
  59. package/assets/icons/users.svg +11 -0
  60. package/assets/icons/view.svg +3 -0
  61. package/assets/icons/watcher.svg +3 -0
  62. package/assets/icons/zoom-in-white.svg +1 -0
  63. package/assets/styles/global.css +0 -0
  64. package/assets/styles/global.scss +0 -0
  65. package/components/Accordion/Accordion.js +114 -0
  66. package/components/Accordion/AccordionSB.js +168 -0
  67. package/components/Accordion/AccordionSBfooter.js +171 -0
  68. package/components/Accordion/index.js +4 -0
  69. package/components/ArrowBar/ArrowBar.js +293 -0
  70. package/components/ArrowBar/index.js +2 -0
  71. package/components/Avatar/Avatar.js +167 -0
  72. package/components/Avatar/AvatarSB.js +226 -0
  73. package/components/Avatar/AvatarSBfooter.js +226 -0
  74. package/components/Avatar/index.js +4 -0
  75. package/components/Banner/Banner.js +65 -0
  76. package/components/Banner/index.js +2 -0
  77. package/components/Breadcrumb/Breadcrumb.js +192 -0
  78. package/components/Breadcrumb/index.js +2 -0
  79. package/components/Button/PrimaryButton.js +125 -0
  80. package/components/Button/SecondaryButton.js +114 -0
  81. package/components/Button/TinyButton.js +94 -0
  82. package/components/Button/index.js +6 -0
  83. package/components/Cards/Card.js +48 -0
  84. package/components/Cards/CardRef.js +64 -0
  85. package/components/Cards/DocumentCard.js +221 -0
  86. package/components/Cards/index.js +5 -0
  87. package/components/Content/Content.js +51 -0
  88. package/components/Content/index.js +1 -0
  89. package/components/Divider/Divider.js +63 -0
  90. package/components/Divider/index.js +2 -0
  91. package/components/Drawer/Drawer.js +93 -0
  92. package/components/Drawer/index.js +2 -0
  93. package/components/ErrorBoundary/ErrorBoundary.js +44 -0
  94. package/components/ErrorBoundary/index.js +1 -0
  95. package/components/FilterChip/FilterChip.js +68 -0
  96. package/components/FilterChip/index.js +1 -0
  97. package/components/Footer/Footer.js +58 -0
  98. package/components/Footer/FooterContentLev3.js +96 -0
  99. package/components/Footer/index.js +2 -0
  100. package/components/Form/FormComponent.js +273 -0
  101. package/components/Form/HeaderComponent.js +39 -0
  102. package/components/Form/StyledComponent.js +323 -0
  103. package/components/Form/SubmitComponent.js +63 -0
  104. package/components/Form/index.js +4 -0
  105. package/components/GroupAvatars/GroupAvatars.js +143 -0
  106. package/components/GroupAvatars/index.js +1 -0
  107. package/components/GroupButtons/ButtonPopup.js +192 -0
  108. package/components/GroupButtons/GroupButtons.js +150 -0
  109. package/components/GroupButtons/GroupButtonsPopup.js +169 -0
  110. package/components/GroupButtons/index.js +3 -0
  111. package/components/GroupStatusCircle/GroupStatusCircle.js +135 -0
  112. package/components/GroupStatusCircle/index.js +1 -0
  113. package/components/Header/Header.js +58 -0
  114. package/components/Header/index.js +1 -0
  115. package/components/HyperLink/HyperLink.js +114 -0
  116. package/components/HyperLink/index.js +1 -0
  117. package/components/Icon/Icon.js +161 -0
  118. package/components/Icon/index.js +1 -0
  119. package/components/Images/Image.js +112 -0
  120. package/components/Images/index.js +2 -0
  121. package/components/Inputs/CheckBoxEditableInput.js +352 -0
  122. package/components/Inputs/CheckBoxInput.js +195 -0
  123. package/components/Inputs/CheckBoxInputMS.js +160 -0
  124. package/components/Inputs/DateSelect.js +411 -0
  125. package/components/Inputs/DropdownSelect.js +466 -0
  126. package/components/Inputs/DropzoneInput.js +335 -0
  127. package/components/Inputs/NumericInput.js +155 -0
  128. package/components/Inputs/RadioInput.js +205 -0
  129. package/components/Inputs/SearchInput.js +18 -0
  130. package/components/Inputs/Signature.js +278 -0
  131. package/components/Inputs/TextArea.js +196 -0
  132. package/components/Inputs/TextInput.js +182 -0
  133. package/components/Inputs/TextInputClicable.js +198 -0
  134. package/components/Inputs/TextInputClicableMS.js +255 -0
  135. package/components/Inputs/TimeInput.js +181 -0
  136. package/components/Inputs/ToggleSwitch.js +123 -0
  137. package/components/Inputs/index.js +13 -0
  138. package/components/Label/Label.js +48 -0
  139. package/components/Label/index.js +1 -0
  140. package/components/Loaders/Loader.js +179 -0
  141. package/components/Loaders/index.js +2 -0
  142. package/components/Modal/Modal.js +116 -0
  143. package/components/Modal/ModalComp.js +158 -0
  144. package/components/Modal/index.js +2 -0
  145. package/components/Overlay/Overlay.js +159 -0
  146. package/components/Overlay/index.js +1 -0
  147. package/components/Pagination/Pagination.js +83 -0
  148. package/components/Pagination/index.js +1 -0
  149. package/components/ProgressBar/ProgressBar.js +84 -0
  150. package/components/ProgressBar/index.js +1 -0
  151. package/components/ProgressSteps/ProgressSteps.js +121 -0
  152. package/components/ProgressSteps/index.js +1 -0
  153. package/components/Rating/Rating.js +264 -0
  154. package/components/Rating/index.js +1 -0
  155. package/components/SecondaryLink/DarkSecondaryLink.js +97 -0
  156. package/components/SecondaryLink/LightSecondaryLink.js +93 -0
  157. package/components/SecondaryLink/index.js +3 -0
  158. package/components/Sidebar/Navbar.js +328 -0
  159. package/components/Sidebar/Sidebar.js +180 -0
  160. package/components/Sidebar/index.js +3 -0
  161. package/components/StatusChip/PrimaryStatusChip.js +78 -0
  162. package/components/StatusChip/SecondaryStatusChip.js +78 -0
  163. package/components/StatusChip/SlimPrimaryStatusChip.js +92 -0
  164. package/components/StatusChip/SlimSecondaryStatusChip.js +93 -0
  165. package/components/StatusChip/index.js +6 -0
  166. package/components/StatusCircle/StatusCircle.js +64 -0
  167. package/components/StatusCircle/index.js +1 -0
  168. package/components/Tables/Table.js +156 -0
  169. package/components/Tables/index.js +1 -0
  170. package/components/Tooltip/Tooltip.js +479 -0
  171. package/components/Tooltip/index.js +1 -0
  172. package/components/Typography/Typography.js +78 -0
  173. package/components/Typography/index.js +2 -0
  174. package/components/constants/colors.js +33 -0
  175. package/components/constants/defaultStyle.js +781 -0
  176. package/components/constants/defaultThemeColor.js +15 -0
  177. package/components/constants/index.js +7 -0
  178. package/components/constants/utils.js +31 -0
  179. package/components/global/FontStyle.js +131 -0
  180. package/components/global/index.js +1 -0
  181. package/dist/index.es.js +2302 -0
  182. package/dist/index.js +2302 -0
  183. package/index.js +40 -0
  184. package/package.json +67 -0
  185. package/rollup.config.js +53 -0
@@ -0,0 +1,264 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled, { css } from 'styled-components';
4
+ import defaultStyles from '../constants/defaultStyle';
5
+ import getDefaultStyles from '../constants/utils';
6
+
7
+ const StyledContainer = styled.div`
8
+ box-sizing: border-box;
9
+ display: flex;
10
+ justify-content: center;
11
+ align-items: center;
12
+ width: auto;
13
+
14
+ ${({ size }) => css`height: ${size}px;`}
15
+ `;
16
+
17
+ const StyledPercentage = styled.div`
18
+ `;
19
+
20
+ const StyledStar = styled.div`
21
+ box-sizing: border-box;
22
+ display: flex;
23
+ justify-content: center;
24
+ align-items: center;
25
+ ${({ size }) =>
26
+ css`
27
+ width: ${size}px;
28
+ height: ${size}px;
29
+ `}
30
+ cursor: ${({ toggleSet }) => toggleSet ? 'pointer' : 'default'};
31
+
32
+ svg {
33
+ fill: black;
34
+
35
+ ${({ size }) =>
36
+ size &&
37
+ css`
38
+ width: ${size}px;
39
+ height: ${size}px;
40
+ `}
41
+
42
+ ${({ transform }) =>
43
+ transform &&
44
+ css`
45
+ transform: ${transform};
46
+ `}
47
+
48
+ path {
49
+ ${({ color }) =>
50
+ color &&
51
+ css`
52
+ fill: ${color};
53
+ `}
54
+ }
55
+ }
56
+ `;
57
+
58
+ const Star = ({ theme, toggleSet, slide, color, size, transform, ratingValue, starVal, hover, ...props }) => {
59
+ return (
60
+ <StyledStar
61
+ theme={theme}
62
+ ratingValue={ratingValue}
63
+ starVal={starVal}
64
+ hover={hover}
65
+ toggleSet={toggleSet}
66
+ color={color}
67
+ size={size}
68
+ transform={transform}
69
+ {...props}>
70
+ <svg width="24px" height="24px" viewBox="0 0 24 24" id="star_filled" data-name="star filled" xmlns="http://www.w3.org/2000/svg">
71
+ <defs>
72
+ <clipPath id="starFilled">
73
+ <path id="Star" d="M10,15,4.122,18.09l1.123-6.545L.489,6.91l6.572-.955L10,0l2.939,5.955,6.572.955-4.755,4.635,1.123,6.545Z" transform="translate(2 3)" stroke="#000" strokeMiterlimit="10" strokeWidth="1.5" />
74
+ </clipPath>
75
+ </defs>
76
+ <rect x="0" y="0" fill="rgb(217,217,217)" width="100%" height="100%" clipPath="url(#starFilled)" />
77
+ <rect x={slide} y="0" fill={color} width="100%" height="100%" clipPath="url(#starFilled)" />
78
+ </svg>
79
+ </StyledStar>
80
+ )
81
+ }
82
+
83
+ function getStarArray(value, maxRange) {
84
+ //Convert the value from the actual range to the 0-5 range for the stars
85
+ let newVal = value * 5 / maxRange;
86
+ const starArr = [];
87
+ const valueStars = newVal;
88
+ //create array of 1 element each element has the value to fill the star
89
+ //convert the value to fill the star into the value to pass to the svg
90
+ //base on the way the svg is donethe range is:
91
+ //slide '-24' 0% 0
92
+ // slide '-12' 50% 0.5
93
+ // slide '0' 100% 1
94
+ for (let i = 0; i < 5; i++) {
95
+ if (newVal - 1 >= 0) {
96
+ starArr.push('0');
97
+ } else if (newVal - 1 < 0 && newVal - 1 > -1) {
98
+ const tmpVal = ((newVal * 24) - 24).toString();
99
+ starArr.push(tmpVal);
100
+ } else {
101
+ starArr.push('-24');
102
+ }
103
+ newVal = newVal - 1;
104
+ }
105
+ return { array: starArr, value: valueStars };
106
+ }
107
+
108
+ function getPercentage(value, maxRange) {
109
+ //Convert the value from the actual range to the 0-5 range for the stars
110
+ let newVal = value * 100 / maxRange;
111
+ return newVal;
112
+ }
113
+
114
+ export const Rating = ({
115
+ theme,
116
+ type,
117
+ customStylesContainer,
118
+ customStylesStar,
119
+ customStylesPercentage,
120
+ color,
121
+ size,
122
+ handleClick,
123
+ transform,
124
+ maxRange,
125
+ value,
126
+ toggleStar,
127
+ toggleSet,
128
+ identifier,
129
+ ...props }) => {
130
+
131
+ const [starArr, setStarArr] = useState(undefined);
132
+ const [starVal, setStarVal] = useState(undefined);
133
+ const [percentage, setPercentage] = useState(undefined);
134
+ const [hover, setHover] = useState(undefined);
135
+
136
+ useEffect(() => {
137
+ setStarArr(getStarArray(value, maxRange).array);
138
+ setStarVal(getStarArray(value, maxRange).value);
139
+ setPercentage(getPercentage(value, maxRange));
140
+ }, [value, maxRange]);
141
+
142
+ /**
143
+ * When hover the stars the actual value is ovveridden by the value of the
144
+ * hover star, but it go back to the original value if no click
145
+ * Also assume that if the original value is not 0 a previous rating was done already
146
+ * therefore cannot give less than 1 star
147
+ */
148
+ useEffect(() => {
149
+ if (hover) {
150
+ setStarArr(getStarArray(hover, maxRange).array);
151
+ } else {
152
+ setStarArr(getStarArray(value, maxRange).array);
153
+ setStarVal(getStarArray(value, maxRange).value);
154
+ setPercentage(getPercentage(value, maxRange));
155
+ }
156
+ }, [hover]);
157
+
158
+ const stars =
159
+ <>
160
+ {starArr?.map((val, i) => {
161
+ const ratingValue = (i + 1) * 20;
162
+ return (
163
+ <Star
164
+ ratingValue={ratingValue}
165
+ starVal={starVal}
166
+ hover={hover}
167
+ toggleSet={toggleSet}
168
+ onClick={toggleSet ? () => handleClick(ratingValue) : null}
169
+ onMouseEnter={toggleSet ? () => { setHover(ratingValue); } : null}
170
+ onMouseLeave={toggleSet ? () => { setHover(null); } : null}
171
+ slide={val}
172
+ color={color}
173
+ className={'star'}
174
+ size={size}
175
+ transform={transform}
176
+ key={identifier?.concat(i)}
177
+ customStyles={customStylesStar}
178
+ />
179
+ )
180
+ })
181
+ }
182
+ </>
183
+
184
+ return (
185
+ <StyledContainer theme={theme} customStyles={customStylesContainer} type={type} size={size} {...props} className={'container'} >
186
+ {toggleStar ? stars :
187
+ <StyledPercentage theme={theme} type={type} customStyles={customStylesPercentage}>{percentage}%</StyledPercentage>}
188
+ </StyledContainer>
189
+ )
190
+ }
191
+
192
+ Rating.propTypes = {
193
+ /**
194
+ * Theme props
195
+ */
196
+ theme: PropTypes.object,
197
+ /**
198
+ * Custom style object for container
199
+ */
200
+ customStylesContainer: PropTypes.object,
201
+ /**
202
+ * Custom style object for start
203
+ */
204
+ customStylesStar: PropTypes.object,
205
+ /**
206
+ * Custom style object for percentage
207
+ */
208
+ customStylesPercentage: PropTypes.object,
209
+ /**
210
+ * type of component to define styling
211
+ */
212
+ type: PropTypes.string,
213
+ /**
214
+ * color of the star when rated
215
+ */
216
+ color: PropTypes.string,
217
+ /**
218
+ * size of the star
219
+ */
220
+ size: PropTypes.number,
221
+ /**
222
+ * object to translate the icon if required
223
+ */
224
+ transform: PropTypes.object,
225
+ /**
226
+ * Function to manage the click of the star
227
+ */
228
+ handleClick: PropTypes.func,
229
+ /**
230
+ * Value to define the max range. The min is always 0
231
+ */
232
+ maxRange: PropTypes.number,
233
+ /**
234
+ * Value of the rating
235
+ */
236
+ value: PropTypes.number,
237
+ /**
238
+ * If true the component display starts, else a number in percentage
239
+ */
240
+ toggleStar: PropTypes.bool,
241
+ /**
242
+ * If true the user can click on the stars and set a new rating value
243
+ */
244
+ toggleSet: PropTypes.bool,
245
+ /**
246
+ * String to use as key for the mapping
247
+ */
248
+ identifier: PropTypes.string,
249
+ }
250
+
251
+ Rating.defaultProps = {
252
+ theme: defaultStyles,
253
+ customStylesContainer: null,
254
+ customStylesStar: null,
255
+ customStylesPercentage: null,
256
+ type: 'star',
257
+ maxRange: 100,
258
+ value: 0,
259
+ identifier: 'ratingKey',
260
+ toggleStar: true,
261
+ toggleSet: false,
262
+ color: '#F7B001'
263
+ }
264
+
@@ -0,0 +1 @@
1
+ export * from './Rating';
@@ -0,0 +1,97 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled, { useTheme } from 'styled-components';
4
+ import defaultThemeColor from '../constants/defaultThemeColor';
5
+
6
+ /**
7
+ * Primary UI component for user interaction
8
+ */
9
+
10
+ const buttonDisabledBg = '#BBC4CF';
11
+
12
+ const StyledButton = styled.button`
13
+ background: ${({ disabled, theme, bgVariant }) => disabled ? buttonDisabledBg : theme.variant[bgVariant]};
14
+ color: ${({ theme, variant }) => theme.variant[variant]};
15
+ padding: 6px 17px;
16
+ border: 1px solid ${({ theme, bgVariant }) => theme.variant[bgVariant]};
17
+ border-radius: 999px;
18
+ font-size: 14px;
19
+ line-height: 17px;
20
+ display: flex;
21
+ align-items: center;
22
+ width: ${({ block }) => block ? '100%' : 'auto'};
23
+ cursor: pointer;
24
+
25
+ &:disabled {
26
+ color: #929EAC;
27
+ background: ${buttonDisabledBg};
28
+ border: 1px solid ${buttonDisabledBg};
29
+ cursor: not-allowed;
30
+
31
+ svg>path{
32
+ fill: #929EAC;
33
+ }
34
+ }
35
+
36
+ * {
37
+ outline: none;
38
+ }
39
+ `;
40
+
41
+ export const DarkSecondaryLink = ({ block, style, variant, bgVariant, disabled, ...props }) => {
42
+ const theme = useTheme() || defaultThemeColor;
43
+ return (
44
+ <StyledButton
45
+ block={block}
46
+ variant={variant}
47
+ bgVariant={bgVariant}
48
+ type="button"
49
+ style={style}
50
+ disabled={disabled}
51
+ {...props}
52
+ >
53
+ {props.children}
54
+ </StyledButton>
55
+ );
56
+ };
57
+
58
+ DarkSecondaryLink.propTypes = {
59
+ /**
60
+ * Type of Button. primary-1, 2, error, etc.
61
+ */
62
+ variant: PropTypes.string,
63
+ /**
64
+ * Color background. primary-1, 2, error, etc.
65
+ */
66
+ bgVariant: PropTypes.string,
67
+ /**
68
+ * Is the button disabled?
69
+ */
70
+ disabled: PropTypes.bool,
71
+ /**
72
+ * Optional click handler
73
+ */
74
+ block: PropTypes.bool,
75
+ /**
76
+ * Optional click handler
77
+ */
78
+ onClick: PropTypes.func,
79
+ /**
80
+ * Theme object
81
+ */
82
+ theme: PropTypes.object,
83
+ };
84
+
85
+ StyledButton.defaultProps = {
86
+ theme: defaultThemeColor,
87
+ }
88
+
89
+ DarkSecondaryLink.defaultProps = {
90
+ theme: defaultThemeColor,
91
+ variant: 'primary-2',
92
+ bgVariant: 'neutral-4',
93
+ block: false,
94
+ disabled: false,
95
+ onClick: undefined,
96
+ };
97
+
@@ -0,0 +1,93 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled, { useTheme } from 'styled-components';
4
+ import defaultThemeColor from '../constants/defaultThemeColor';
5
+
6
+ /**
7
+ * Primary UI component for user interaction
8
+ */
9
+
10
+ const buttonDisabledBg = '#BBC4CF';
11
+
12
+ const StyledButton = styled.button`
13
+ background: ${({ disabled, theme }) => disabled ? buttonDisabledBg : theme.bgColor};
14
+ color: ${({ theme, variant }) => theme.variant[variant]};
15
+ padding: 6px 17px;
16
+ border: 1px solid ${({ theme, borderVariant }) => theme.variant[borderVariant]};
17
+ border-radius: 999px;
18
+ font-size: 14px;
19
+ line-height: 17px;
20
+ display: flex;
21
+ align-items: center;
22
+ width: ${({ block }) => block ? '100%' : 'auto'};
23
+ cursor: pointer;
24
+
25
+ &:disabled {
26
+ color: #929EAC;
27
+ background: ${buttonDisabledBg};
28
+ border: 1px solid ${buttonDisabledBg};
29
+ cursor: not-allowed;
30
+
31
+ svg>path{
32
+ fill: #929EAC;
33
+ }
34
+ }
35
+ `;
36
+
37
+ export const LightSecondaryLink = ({ block, style, variant, borderVariant, disabled, ...props }) => {
38
+ const theme = useTheme() || defaultThemeColor;
39
+ return (
40
+ <StyledButton
41
+ block={block}
42
+ variant={variant}
43
+ borderVariant={borderVariant}
44
+ type="button"
45
+ style={style}
46
+ disabled={disabled}
47
+ {...props}
48
+ >
49
+ {props.children}
50
+ </StyledButton>
51
+ );
52
+ };
53
+
54
+ LightSecondaryLink.propTypes = {
55
+ /**
56
+ * Color text. primary-1, 2, error, etc.
57
+ */
58
+ variant: PropTypes.string,
59
+ /**
60
+ * Color border. primary-1, 2, error, etc.
61
+ */
62
+ borderVariant: PropTypes.string,
63
+ /**
64
+ * Is the button disabled?
65
+ */
66
+ disabled: PropTypes.bool,
67
+ /**
68
+ * Optional click handler
69
+ */
70
+ block: PropTypes.bool,
71
+ /**
72
+ * Optional click handler
73
+ */
74
+ onClick: PropTypes.func,
75
+ /**
76
+ * Theme object
77
+ */
78
+ theme: PropTypes.object,
79
+ };
80
+
81
+ StyledButton.defaultProps = {
82
+ theme: defaultThemeColor,
83
+ }
84
+
85
+ LightSecondaryLink.defaultProps = {
86
+ theme: defaultThemeColor,
87
+ variant: 'primary-2',
88
+ borderVariant: 'neutral-3',
89
+ block: false,
90
+ disabled: false,
91
+ onClick: undefined,
92
+ };
93
+
@@ -0,0 +1,3 @@
1
+ export * from './LightSecondaryLink';
2
+ export * from './DarkSecondaryLink';
3
+