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,267 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import React, { useState } from 'react';
3
- import styled, { css } from 'styled-components';
4
- import defaultStyles from '../constants/defaultStyle';
5
- import defaultThemeColor from '../constants/defaultThemeColor';
6
- import getDefaultStyles from '../constants/utils';
7
- import { Icon } from '../Icon';
8
- import { Label } from '../Label';
9
-
10
- const TextWrapper = styled.div`
11
- //Set the styles from the default styles object
12
- ${({ inBuiltCss, defaultWrapperStyle }) => {
13
- return getDefaultStyles(inBuiltCss, defaultWrapperStyle);
14
- }}
15
-
16
- border: ${({ isValid, theme }) =>
17
- !isValid
18
- ? '1px solid ' + theme.variant['error']
19
- : '1px solid ' + theme.border};
20
-
21
- .input-icon svg path {
22
- fill: ${({ theme }) => theme.variant['neutral-1']};
23
- }
24
- .input-icon {
25
- cursor: pointer;
26
- }
27
-
28
- &:focus-within {
29
- border: 1px solid ${({ theme }) => theme.variant['primary-1']};
30
- outline: none;
31
-
32
- .input-icon svg path {
33
- fill: ${({ theme }) => theme.variant['primary-1']};
34
- }
35
- }
36
-
37
- // custom styles
38
- ${({ textBoxStyle }) => textBoxStyle}
39
- `;
40
-
41
- TextWrapper.defaultProps = {
42
- theme: defaultThemeColor,
43
- };
44
-
45
- const Input = styled.input`
46
- width: 85%;
47
- -webkit-text-security: ${({ showEye }) => (showEye ? 'none' : 'disc')};
48
-
49
- //Set the styles from the default styles object
50
- ${({ inBuiltCss, defaultInputStyle }) => {
51
- return getDefaultStyles(inBuiltCss, defaultInputStyle);
52
- }}
53
-
54
- // custom styles
55
- ${({ inputStyle }) => inputStyle}
56
-
57
- .sc-furwcr bxRAoq {
58
- color: ${({ theme }) => theme.variant['neutral-3']};
59
- }
60
- `;
61
- Input.defaultProps = {
62
- theme: defaultThemeColor,
63
- };
64
- const inline = css`
65
- display: flex;
66
- gap: 7px;
67
- align-items: start;
68
- `;
69
-
70
- const Form = styled.div`
71
- ${({ labelInline }) => (labelInline ? inline : null)}
72
- .err-text {
73
- color: ${({ errMsgColor }) => errMsgColor};
74
- margin-top: 5px;
75
- font-size: 10px;
76
- }
77
- `;
78
-
79
- Form.defaultProps = {
80
- theme: defaultThemeColor,
81
- };
82
-
83
- export const PasswordInput = ({
84
- theme,
85
- passwordRules,
86
- textBoxStyle,
87
- labelStyle,
88
- inputStyle,
89
- errMsg,
90
- required,
91
- label,
92
- labelInline,
93
- isValid,
94
- rulesStyle,
95
- id,
96
- showHideIcon,
97
- errMsgColor,
98
- ...props
99
- }) => {
100
- const [showEye, setShowEye] = useState(false);
101
-
102
- return (
103
- <Form
104
- onPaste={(e) => {
105
- e.preventDefault();
106
- return false;
107
- }}
108
- onCopy={(e) => {
109
- e.preventDefault();
110
- return false;
111
- }}
112
- labelInline={labelInline}
113
- inBuiltCss={defaultStyles}
114
- errMsgColor={errMsgColor}
115
- {...props}
116
- >
117
- <div style={{ display: 'flex' }}>
118
- <Label
119
- customStyles={labelStyle}
120
- type={'label-text'}
121
- text={label}
122
- errMsg={errMsg}
123
- style={{
124
- display: 'flex',
125
- marginBottom: `${!labelInline ? '7px' : '0px'}`,
126
- paddingBottom: '0px',
127
- }}
128
- {...props}
129
- />
130
- {required && (
131
- <div
132
- style={{
133
- marginLeft: '4px',
134
- marginRight: '5px',
135
- color: `${theme.variant['error']}`,
136
- }}
137
- >
138
- *
139
- </div>
140
- )}
141
- </div>
142
- <div
143
- style={{
144
- display: 'flex',
145
- justifyContent: 'start',
146
- alignItems: 'start',
147
- }}
148
- >
149
- <div style={{ width: '100%' }}>
150
- <TextWrapper
151
- required={required}
152
- theme={theme}
153
- textBoxStyle={textBoxStyle}
154
- isValid={isValid}
155
- defaultWrapperStyle={'textbox-wrapper'}
156
- inBuiltCss={defaultStyles}
157
- {...props}
158
- >
159
- <Input
160
- inputStyle={inputStyle}
161
- type={'text'}
162
- id={id}
163
- showEye={showEye}
164
- theme={theme}
165
- defaultInputStyle={'input-wrapper'}
166
- inBuiltCss={defaultStyles}
167
- {...props}
168
- />
169
- {showHideIcon === true ? (
170
- <div
171
- className='input-icon'
172
- onClick={() => setShowEye(!showEye)}
173
- style={{ position: 'absolute', right: '7px' }}
174
- >
175
- {showEye ? <Icon icon='eye-show' /> : <Icon icon='eye-hide' />}
176
- </div>
177
- ) : (
178
- ''
179
- )}
180
- </TextWrapper>
181
- {errMsg.length > 0 && <div className='err-text'>{errMsg}</div>}
182
- </div>
183
- {passwordRules ? (
184
- <div style={{ ...rulesStyle, marginLeft: '5px' }}>
185
- {passwordRules}
186
- </div>
187
- ) : (
188
- ''
189
- )}
190
- </div>
191
- </Form>
192
- );
193
- };
194
-
195
- PasswordInput.propTypes = {
196
- /**
197
- * Theme props of default in-built css
198
- */
199
- inBuiltCss: PropTypes.object,
200
- /**
201
- * Color props of default theme
202
- */
203
- theme: PropTypes.object,
204
- /**
205
- * Label of Input
206
- */
207
- label: PropTypes.string,
208
- /**
209
- * Is the input required?
210
- */
211
- required: PropTypes.bool,
212
- /**
213
- * Should label be inline with textbox?
214
- */
215
- labelInline: PropTypes.bool,
216
- /**
217
- * Error Message
218
- */
219
- errMsg: PropTypes.string,
220
-
221
- /**
222
- * custom style of textbox Wrapper
223
- */
224
- textBoxStyle: PropTypes.object,
225
- /**
226
- * custom style of textbox input
227
- */
228
- labelStyle: PropTypes.object,
229
- /**
230
- * custom style of textbox label
231
- */
232
- inputStyle: PropTypes.object,
233
- /**
234
- * rules of password
235
- */
236
- passwordRules: PropTypes.string,
237
- /**
238
- * styles of password rules
239
- */
240
- rulesStyle: PropTypes.object,
241
- /**
242
- * id of the password input
243
- */
244
- id: PropTypes.string,
245
- /**
246
- * hide icon shows or not
247
- */
248
- showHideIcon: PropTypes.bool,
249
- };
250
-
251
- PasswordInput.defaultProps = {
252
- theme: defaultThemeColor,
253
- inBuiltCss: defaultStyles,
254
- label: '',
255
- required: false,
256
- isValid: true,
257
- labelInline: false,
258
- errMsg: '',
259
- textBoxStyle: {},
260
- labelStyle: {},
261
- inputStyle: {},
262
- passwordRules: '',
263
- rulesStyle: {},
264
- id: '',
265
- showHideIcon: true,
266
- errMsgColor: defaultThemeColor.variant['error'],
267
- };
@@ -1,292 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react';
3
- import styled, { useTheme } from 'styled-components';
4
- import defaultStyles from '../constants/defaultStyle';
5
- import defaultThemeColor from '../constants/defaultThemeColor';
6
- import getDefaultStyles from '../constants/utils';
7
- import { Label } from '../Label';
8
-
9
- const RadioOuterCircle = styled.div`
10
- box-sizing: initial;
11
-
12
- //Set the styles from the default styles object
13
- ${({ inBuiltCss, defaultRadioOuterCircleStyle }) => {
14
- return getDefaultStyles(inBuiltCss, defaultRadioOuterCircleStyle);
15
- }}
16
-
17
- border: 2px solid ${({
18
- value,
19
- selected,
20
- selectedCircleColor,
21
- defaultBorderColor,
22
- theme,
23
- }) => {
24
- if (value !== selected && defaultBorderColor) return defaultBorderColor;
25
- else if (value !== selected && !defaultBorderColor) return theme.border;
26
- else if (value === selected && selectedCircleColor)
27
- return selectedCircleColor;
28
- else if (value === selected && !selectedCircleColor)
29
- return theme.primary['primary-1'];
30
- }};
31
-
32
- // custom styles
33
- ${({ radioOuterCircleStyle }) => radioOuterCircleStyle}
34
- `;
35
-
36
- RadioOuterCircle.defaultProps = {
37
- theme: defaultThemeColor,
38
- };
39
-
40
- const RadioInnerCircle = styled.div`
41
- box-sizing: initial;
42
-
43
- //Set the styles from the default styles object
44
- ${({ inBuiltCss, defaultRadioInnerCircleStyle }) => {
45
- return getDefaultStyles(inBuiltCss, defaultRadioInnerCircleStyle);
46
- }}
47
-
48
- width: ${({ value, selected, width }) => (value === selected ? width : 0)};
49
- height: ${({ value, selected, height }) => (value === selected ? height : 0)};
50
- background-color: ${({ value, selected, selectedCircleColor, theme }) => {
51
- if (value === selected && selectedCircleColor) return selectedCircleColor;
52
- else if (value === selected && !selectedCircleColor)
53
- return theme.primary['primary-1'];
54
- else if (value !== selected) return 'transparent';
55
- }};
56
-
57
- // custom styles
58
- ${({ radioInnerCircleStyle }) => radioInnerCircleStyle}
59
- `;
60
- RadioInnerCircle.defaultProps = {
61
- theme: defaultThemeColor,
62
- };
63
-
64
- const OptionText = styled.div`
65
- //Set the styles from the default styles object
66
- ${({ inBuiltCss, defaultOptionStyle }) => {
67
- return getDefaultStyles(inBuiltCss, defaultOptionStyle);
68
- }}
69
- margin-right: ${({ inline }) => (!inline ? '30px' : '')};
70
- color: ${({
71
- selected,
72
- selectedOptionTextColor,
73
- defaultOptionColor,
74
- theme,
75
- }) => {
76
- if (selected && selectedOptionTextColor) return selectedOptionTextColor;
77
- else if (selected && !selectedOptionTextColor)
78
- return theme.neutral['neutral-1'];
79
- else if (!selected && defaultOptionColor) return defaultOptionColor;
80
- else if (!selected && !defaultOptionColor)
81
- return theme.neutral['neutral-2'];
82
- }};
83
-
84
- // custom styles
85
- ${({ optionStyle }) => optionStyle}
86
- `;
87
- OptionText.defaultProps = {
88
- theme: defaultThemeColor,
89
- };
90
-
91
- const WrapperDiv = styled.div`
92
- margin-bottom: ${({ inline }) => (!inline ? '14px' : '')};
93
- cursor: pointer;
94
- align-items: center;
95
- display: flex;
96
- gap: 10px;
97
-
98
- // custom styles
99
- ${({ WrapperDivStyle }) => WrapperDivStyle}
100
- `;
101
-
102
- const ParentDiv = styled.div`
103
- display: ${({ inline }) => (!inline ? 'inline-block' : 'flex')};
104
- width: max-content;
105
- margin: 0;
106
- `;
107
-
108
- export const RadioInput = ({
109
- radioOuterCircleStyle,
110
- radioInnerCircleStyle,
111
- labelStyle,
112
- label,
113
- optionStyle,
114
- options,
115
- selectedCircleColor,
116
- selectedOptionTextColor,
117
- onChange,
118
- selected,
119
- width,
120
- height,
121
- inline,
122
- defaultBorderColor,
123
- defaultOptionColor,
124
- WrapperDivStyle,
125
- ...props
126
- }) => {
127
- const activeTheme = useTheme() || defaultThemeColor;
128
-
129
- return (
130
- <div>
131
- <Label customStyles={labelStyle} type={'radio-label'} text={label} />
132
- <ParentDiv inline={inline}>
133
- {options.map((item, i) => {
134
- return (
135
- <WrapperDiv
136
- WrapperDivStyle={WrapperDivStyle}
137
- key={i + Math.random() * 101}
138
- id={item.id}
139
- inline={inline}
140
- onClick={() => {
141
- !item?.disabled && onChange(item.value);
142
- }}
143
- >
144
- <RadioOuterCircle
145
- theme={activeTheme}
146
- inBuiltCss={defaultStyles}
147
- defaultBorderColor={defaultBorderColor}
148
- selectedCircleColor={selectedCircleColor}
149
- radioOuterCircleStyle={{
150
- ...radioOuterCircleStyle,
151
- cursor: item?.disabled ? 'not-allowed ' : ' pointer',
152
- borderColor: item?.disabled && item?.disabledColor,
153
- }}
154
- defaultRadioOuterCircleStyle={'radio-outer-circle'}
155
- value={item.value}
156
- selected={!item?.disabled && selected}
157
- >
158
- <RadioInnerCircle
159
- inBuiltCss={defaultStyles}
160
- theme={activeTheme}
161
- width={width}
162
- height={height}
163
- selectedCircleColor={selectedCircleColor}
164
- radioInnerCircleStyle={{
165
- ...radioInnerCircleStyle,
166
- cursor: item?.disabled ? 'not-allowed ' : ' pointer',
167
- backgroundColor: item?.disabled
168
- ? 'transparent'
169
- : item?.value === selected
170
- ? radioInnerCircleStyle?.backgroundColor
171
- : 'transparent',
172
- }}
173
- defaultRadioInnerCircleStyle={'radio-inner-circle'}
174
- value={item.value}
175
- selected={selected}
176
- />
177
- </RadioOuterCircle>
178
- <OptionText
179
- defaultOptionColor={defaultOptionColor}
180
- optionStyle={{
181
- ...optionStyle,
182
- cursor: item?.disabled ? 'not-allowed ' : ' pointer',
183
- color: item?.disabled && item?.disabledColor,
184
- }}
185
- inBuiltCss={defaultStyles}
186
- defaultOptionStyle={'option-text'}
187
- selectedOptionTextColor={selectedOptionTextColor}
188
- theme={activeTheme}
189
- selected={!item?.disabled && item.value === selected}
190
- >
191
- {item.label}
192
- </OptionText>
193
- </WrapperDiv>
194
- );
195
- })}
196
- </ParentDiv>
197
- </div>
198
- );
199
- };
200
-
201
- RadioInput.propTypes = {
202
- /**
203
- * Label of RadioButtons
204
- */
205
- label: PropTypes.string,
206
- /**
207
- * Label Style of RadioButtons
208
- */
209
- labelStyle: PropTypes.object,
210
- /**
211
- * Should RadioButtones be inline?
212
- */
213
- inline: PropTypes.bool,
214
- /**
215
- * RadioButton Contents i.e:-
216
- [
217
- {
218
- label: 'First Radio Button',
219
- value: 'first',
220
- disabled: true,
221
- disabledColor: '#ae3232',
222
- id: '1'
223
- },
224
- { label: 'Second Radio Button', value: 'second', id: '2' },
225
- { label: 'Third Radio Button', value: 'third', id: '3' },
226
- ]
227
- */
228
- options: PropTypes.array,
229
- /**
230
- * RadioButton style object
231
- */
232
- optionStyle: PropTypes.object,
233
- /**
234
- * RadioButton wraperdiv style object
235
- */
236
- WrapperDivStyle: PropTypes.object,
237
- /**
238
- * RadioButton checked value
239
- */
240
- selected: PropTypes.string,
241
- /**
242
- * RadioButton function
243
- */
244
- onChange: PropTypes.func,
245
- /**
246
- * Default option color when not selected
247
- */
248
- defaultOptionColor: PropTypes.string,
249
- /**
250
- * Default border color when not selectecd
251
- */
252
- defaultBorderColor: PropTypes.string,
253
- /**
254
- * RadioButton outside design
255
- */
256
- radioOuterCircleStyle: PropTypes.object,
257
- /**
258
- * RadioButton inner design
259
- */
260
- radioInnerCircleStyle: PropTypes.object,
261
- /**
262
- * RadioButton selected circle width
263
- */
264
- width: PropTypes.string,
265
- /**
266
- * RadioButton selected circle height
267
- */
268
- height: PropTypes.string,
269
- /**
270
- * RadioButton selected circle color
271
- */
272
- selectedCircleColor: PropTypes.string,
273
- /**
274
- * RadioButton selected option
275
- */
276
- selectedOptionTextColor: PropTypes.string,
277
- };
278
-
279
- RadioInput.defaultProps = {
280
- label: '',
281
- labelStyle: {},
282
- inline: false,
283
- options: [],
284
- optionStyle: {},
285
- selected: 'one',
286
- onChange: () => { },
287
- radioOuterCircleStyle: {},
288
- radioInnerCircleStyle: {},
289
- width: '14px',
290
- height: '14px',
291
- WrapperDivStyle: {}
292
- };
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { Icon } from '../Icon';
3
- import { TextInput } from './TextInput';
4
-
5
- export const SearchInput = ({ label, placeholder, handleSearch, searchInput, customStylesForm, customStyleObject, textBoxStyle, id, ...props }) => {
6
-
7
- return <TextInput
8
- iconAfter={<Icon icon='magnifier-icon' />}
9
- label={label}
10
- textBoxStyle={textBoxStyle}
11
- placeholder={placeholder}
12
- ref={searchInput}
13
- onChange={handleSearch}
14
- id={id}
15
- {...props}
16
- />
17
- }
18
-
19
-