groovinads-ui 1.0.9 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +240 -0
- package/dist/index.es.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/components/Button/Button.jsx +1 -1
- package/src/components/Inputs/Checkbox.jsx +1 -1
- package/src/components/Inputs/Input.jsx +3 -5
- package/src/components/Inputs/Radio.jsx +1 -1
- package/src/components/Inputs/Switch.jsx +1 -1
- package/src/components/Inputs/Textarea.jsx +6 -2
- package/src/components/Labels/LoginSource.jsx +19 -0
- package/src/components/Labels/PillComponent.jsx +40 -0
- package/src/components/Labels/StatusIcon.jsx +67 -0
- package/src/components/Labels/index.js +5 -0
- package/src/stories/LoginSource.stories.jsx +11 -0
- package/src/stories/PillComponent.stories.jsx +11 -0
- package/src/stories/StatusIcon.stories.jsx +11 -0
- package/README (test).md +0 -141
- package/assets/groovinads-logo.png +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
<img src="https://ui.groovinads.com/assets/groovinads-logo.png" alt="Groovinads logo" width="200">
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Groovinads UI
|
|
6
|
+
Groovinads UI is a React component library that provides ready-to-use UI elements based on the Groovinads UI kit. This library is designed to facilitate the implementation of common UI elements in Groovinads applications.
|
|
7
|
+
|
|
8
|
+
## Included Components (v 1.1.0)
|
|
9
|
+
|
|
10
|
+
The library includes the following components:
|
|
11
|
+
|
|
12
|
+
- **Buttons**: For user actions.
|
|
13
|
+
- **Checkbox**: For multiple option selections.
|
|
14
|
+
- **Input**: For user data entry.
|
|
15
|
+
- **LoginSource**: For login source selection.
|
|
16
|
+
- **PillComponent**: For displaying information.
|
|
17
|
+
- **StatusIcon**: For displaying status icons.
|
|
18
|
+
- **Radio**: For exclusive selections.
|
|
19
|
+
- **Switch**: For toggle states.
|
|
20
|
+
- **Textarea**: For multiline text input.
|
|
21
|
+
|
|
22
|
+
## Requirements
|
|
23
|
+
- The component styles must be included from: `https://ui.groovinads.com/styles.min.css`.
|
|
24
|
+
- **npm** (v18 or higher).
|
|
25
|
+
- [Font Awesome](https://fontawesome.com/) icons must be included in the project.
|
|
26
|
+
|
|
27
|
+
### Important: Use of additional CSS libraries
|
|
28
|
+
When utilizing external libraries that require additional CSS styles, it is important to ensure that these styles are not added directly to individual components.
|
|
29
|
+
Instead, they should be included in the `index.html` file of your project. This ensures that all styles are loaded correctly and in the desired order. Specifically, make sure that the CSS file `https://ui.groovinads.com/styles.min.css` is the last one to be loaded to avoid style conflicts and ensure that the default Groovinads styles have the proper priority.
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<!-- Example of how to include additional CSS styles in index.html -->
|
|
33
|
+
<head>
|
|
34
|
+
<!-- Other CSS files -->
|
|
35
|
+
<link rel="stylesheet" href="https://example.com/external-library.css">
|
|
36
|
+
<!-- Groovinads CSS file, ensure it is the last to be loaded -->
|
|
37
|
+
<link rel="stylesheet" href="https://ui.groovinads.com/styles.min.css">
|
|
38
|
+
</head>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
To use the Groovinads UI library in your project, run the following command:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
yarn add groovinads-ui
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
Here are examples of how to use the components included in the Groovinads UI library:
|
|
51
|
+
|
|
52
|
+
### Button
|
|
53
|
+
```jsx
|
|
54
|
+
import { Button } from 'groovinads-ui';
|
|
55
|
+
|
|
56
|
+
<Button
|
|
57
|
+
variant={'primary'}
|
|
58
|
+
onClick={()=>{console.log('Button clicked')}}
|
|
59
|
+
icon={'fa-plus'}
|
|
60
|
+
className={'mb-5'}
|
|
61
|
+
>
|
|
62
|
+
Let's groove!
|
|
63
|
+
</Button>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
| Property | Type | Options | Default | Description |
|
|
67
|
+
|--------------|--------------|--------------|--------------|--------------|
|
|
68
|
+
| ```variant``` | String | ``` primary ``` ``` secondary ``` ``` terciary ``` ``` outline ```| ``` primary ```| Defines the visual style of the button. It's optional. |
|
|
69
|
+
| ```size``` | String | ```xs``` ```md``` ```lg``` | ```md``` | Defines the size of the button. It's optional. |
|
|
70
|
+
| ```onClick``` | Function | n/a | n/a | Function to be executed when the button is clicked. |
|
|
71
|
+
| ```icon``` | String | n/a | n/a | Defines the size of the button. It's optional. |
|
|
72
|
+
| ```iconPosition``` | String | n/a | ```start``` | Determines the position of the icon relative to the text inside the button. It's optional. |
|
|
73
|
+
| ```className``` | String | n/a | n/a | Additional CSS class names that can be applied to the button. Defaults to an empty string. |
|
|
74
|
+
| ```style``` | String | ```default``` ```success``` ```danger``` ```warning``` ```link```| ```default``` | Specifies the style variant of the button, which can change its color and visual appearance. It's optional. |
|
|
75
|
+
| ```processing``` | Boolean | ```true``` ```false``` | ```false``` | If true, displays a spinner animation and appends '...' to the button label to indicate processing status. It's optional. |
|
|
76
|
+
|
|
77
|
+
### Inputs
|
|
78
|
+
|
|
79
|
+
#### Checkbox
|
|
80
|
+
```jsx
|
|
81
|
+
<Checkbox
|
|
82
|
+
className={'mb-5'}
|
|
83
|
+
id={'checkbox'}
|
|
84
|
+
name={'checkbox'}
|
|
85
|
+
setStatus={(status) => console.log(status)}
|
|
86
|
+
>
|
|
87
|
+
This is a checkbox
|
|
88
|
+
</Checkbox>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
| Property | Type | Options | Default | Description |
|
|
92
|
+
|--------------|--------------|--------------|--------------|--------------|
|
|
93
|
+
| ```className``` | String | n/a | n/a | Additional CSS class names that can be applied to the checkbox. Defaults to an empty string. |
|
|
94
|
+
| ```id``` | String | n/a | n/a | The unique identifier for the checkbox. It's required for associating the label and checkbox. |
|
|
95
|
+
| ```name``` | String | n/a | n/a | The name attribute of the checkbox. Used to identify the form data after it's submitted. |
|
|
96
|
+
| ```status``` | Boolean | ```true``` ```false``` | ```false``` | Indicates whether the checkbox is checked (```true```) or unchecked (```false```). Defaults to false. |
|
|
97
|
+
| ```setStatus``` | Function | n/a | n/a | Function to set the ```status``` of the checkbox. This is a handler function typically used for state management. |
|
|
98
|
+
|
|
99
|
+
#### Input
|
|
100
|
+
```jsx
|
|
101
|
+
<Input
|
|
102
|
+
className={'mb-5'}
|
|
103
|
+
helpText={'This is a help text'}
|
|
104
|
+
label={'Input label'}
|
|
105
|
+
name={'input'}
|
|
106
|
+
onChange={() => console.log('Input changed')}
|
|
107
|
+
requiredText={'This field is required'}
|
|
108
|
+
showError={false}
|
|
109
|
+
setShowError={(showError) => console.log(showError)}
|
|
110
|
+
/>
|
|
111
|
+
```
|
|
112
|
+
| Property | Type | Options | Default | Description |
|
|
113
|
+
|--------------|--------------|--------------|--------------|--------------|
|
|
114
|
+
| ```className``` | String | n/a | n/a | Additional CSS class names that can be applied to the input. Defaults to an empty string. |
|
|
115
|
+
| ```disabled``` | Boolean | ```true``` ```false``` | ```false``` | If true, disables the input field. |
|
|
116
|
+
| ```helpText``` | String | n/a | n/a | Optional text under the input to guide the user or provide additional information. |
|
|
117
|
+
| ```icon``` | String | n/a | n/a | Icon to be displayed inside the input field, typically used for decoration or interaction. |
|
|
118
|
+
| ```label``` | String | n/a | ```Label``` | Text label for the input field. Also used as the ```id``` attribute of the input for accessibility purposes. |
|
|
119
|
+
| ```name``` | String | n/a | n/a | The name attribute for the input element, which represents the form data after it's submitted. |
|
|
120
|
+
| ```onChange``` | Function | n/a | n/a | Function to handle changes to the input's value. Typically used to update state. |
|
|
121
|
+
| ```prefix``` | String | n/a | n/a | Text or characters to display at the start of the input, e.g., 'USD' for currency.|
|
|
122
|
+
| ```requiredText``` | String | n/a | n/a | Text displayed when input validation fails, typically used to indicate an error. |
|
|
123
|
+
| ```size``` | String | ```xs``` ```md``` ```lg``` | ```md``` | Sets the size of the input field. |
|
|
124
|
+
| ```showError``` | Boolean | ```true``` ```false``` | ```false``` | If true, indicates that an error message should be displayed, usually controlled by ```setShowError```. |
|
|
125
|
+
| ```setShowError``` | Function | n/a | n/a | Function to set the visibility of the error message. |
|
|
126
|
+
| ```type``` | String | n/a | n/a | Text or characters to display at the end of the input, e.g., 'USD' for currency. |
|
|
127
|
+
| ```value``` | String or Number| n/a | n/a | The value of the input. |
|
|
128
|
+
|
|
129
|
+
#### Radio
|
|
130
|
+
```jsx
|
|
131
|
+
<Radio
|
|
132
|
+
className={'mb-5'}
|
|
133
|
+
id={'radio'}
|
|
134
|
+
name={'radio'}
|
|
135
|
+
setStatus={(status) => console.log(status)}
|
|
136
|
+
status={true}
|
|
137
|
+
>
|
|
138
|
+
This is a radio button
|
|
139
|
+
</Radio>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
| Property | Type | Options | Default | Description |
|
|
143
|
+
|--------------|--------------|--------------|--------------|--------------|
|
|
144
|
+
| ```className``` | String | n/a | n/a | Additional CSS class names that can be applied to the radio button. Defaults to an empty string. |
|
|
145
|
+
| ```id``` | String | n/a | n/a | The unique identifier for the radio button. It is used for linking the label and the radio button.|
|
|
146
|
+
| ```name``` | String | n/a | n/a | The name attribute of the radio button. Used to group multiple radios into a single group. |
|
|
147
|
+
| ```setStatus``` | Function | n/a | n/a | Function to set the ```status``` of the radio button. This is a handler function typically used for state management. |
|
|
148
|
+
| ```status``` | Boolean | ```true``` ```false``` | ```false``` | Indicates whether the radio button is checked (```true```) or unchecked (```false```). Defaults to ```false```. |
|
|
149
|
+
|
|
150
|
+
#### Switch
|
|
151
|
+
```jsx
|
|
152
|
+
<Switch
|
|
153
|
+
className={'mb-5'}
|
|
154
|
+
name={'switch'}
|
|
155
|
+
setStatus={(status) => console.log(status)}
|
|
156
|
+
status={boolean}
|
|
157
|
+
>
|
|
158
|
+
This is a switch
|
|
159
|
+
</Switch>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
| Property | Type | Options | Default | Description |
|
|
163
|
+
|--------------|--------------|--------------|--------------|--------------|
|
|
164
|
+
| ```className``` | String | n/a | n/a | Additional CSS class names that can be applied to the switch. Defaults to an empty string. |
|
|
165
|
+
| ```icon``` | Boolean | ```true``` ```false``` | ```false``` | If ```true```, displays an icon (play/pause) inside the switch. |
|
|
166
|
+
| ```id``` | String | Automatically generated | n/a | The ID is generated automatically based on the component's children, ensuring unique identifiers for accessibility. |
|
|
167
|
+
| ```name``` | String | n/a | n/a | The name attribute of the switch. Used to identify the form data after it's submitted. |
|
|
168
|
+
| ```setStatus``` | Function | n/a | n/a | Function to set the ```status``` of the switch. This is a handler function typically used for state management. |
|
|
169
|
+
| ```status``` | Boolean | ```true``` ```false``` | ```false``` | Indicates whether the switch is on (```true```) or off (```false```). Defaults to ```false```. |
|
|
170
|
+
| ```switchPosition``` | String |```start``` ```end``` | ```start``` | Determines the position of the switch relative to the label. Defaults to ```start```. |
|
|
171
|
+
|
|
172
|
+
#### Textarea
|
|
173
|
+
```jsx
|
|
174
|
+
<Textarea
|
|
175
|
+
className={'mb-5'}
|
|
176
|
+
label={'Textarea label'}
|
|
177
|
+
name={'textarea'}
|
|
178
|
+
requiredText={'This field is required'}
|
|
179
|
+
setShowError={(showError) => console.log(showError)}
|
|
180
|
+
/>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
| Property | Type | Options | Default | Description |
|
|
184
|
+
|--------------|--------------|--------------|--------------|--------------|
|
|
185
|
+
| ```className``` | String | n/a | n/a | Additional CSS class names that can be applied to the textarea. Defaults to an empty string. |
|
|
186
|
+
| ```helpText``` | String | n/a | n/a | Optional text under the textarea to guide the user or provide additional information. |
|
|
187
|
+
| ```label``` | String | n/a | ```Label``` | Text label for the textarea field. Also used as the ```id``` attribute of the textarea for accessibility purposes. |
|
|
188
|
+
| ```name``` | String | n/a | n/a | The name attribute of the textarea. Used to identify the form data after it's submitted.|
|
|
189
|
+
| ```onChange``` | Function | n/a | n/a | Function to handle changes to the textarea's value. Typically used to update state. |
|
|
190
|
+
| ```requiredText``` | String | n/a | n/a | ext displayed when textarea validation fails, typically used to indicate an error. |
|
|
191
|
+
| ```showError``` | Boolean | ```true``` ```false``` | ```false``` | If true, indicates that an error message should be displayed, usually controlled by ```setShowError```. |
|
|
192
|
+
| ```setShowError``` | Function | n/a | n/a | Function to set the visibility of the error message. |
|
|
193
|
+
| ```size``` | String | ```xs``` ```md``` ```lg``` | ```md``` | Sets the size of the textarea field. |
|
|
194
|
+
| ```value``` | String | n/a | n/a | The value of the textarea |
|
|
195
|
+
|
|
196
|
+
### Labels
|
|
197
|
+
#### LoginSource
|
|
198
|
+
```jsx
|
|
199
|
+
<LoginSource logo={'groovinads'} />
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
| Property | Type | Options | Default | Description |
|
|
203
|
+
|--------------|--------------|--------------|--------------|--------------|
|
|
204
|
+
| ```logo``` | String | ```groovinads``` ```google``` ```microsoft``` ```linkedin``` | ```groovinads``` | Specifies the logo to be displayed on the login source button. This indicates the login method used. |
|
|
205
|
+
|
|
206
|
+
#### PillComponent
|
|
207
|
+
```jsx
|
|
208
|
+
<PillComponent color='green'>
|
|
209
|
+
Active
|
|
210
|
+
</PillComponent>
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
| Property | Type | Options | Default | Description |
|
|
214
|
+
|--------------|--------------|--------------|--------------|--------------|
|
|
215
|
+
| ```className``` | String | n/a | n/a | Additional CSS class names that can be applied to the pill. Defaults to an empty string. |
|
|
216
|
+
| ```color``` | String | ```blue``` ```danger``` ```dark``` ```green``` ```light``` ```midtone``` ```neutral``` ```red``` ```yellow``` | ```neutral``` | Specifies the background color of the pill. This helps to differentiate pills by context or severity. |
|
|
217
|
+
| ```closeButton``` | Boolean | ```true``` ```false``` | ```false``` | If true, a close button is displayed on the pill, allowing it to be dismissed.|
|
|
218
|
+
| ```onClose``` | Function | n/a | n/a | Function to handle the click event on the close button. This property is only relevant if ```closeButton``` is ```true```. |
|
|
219
|
+
|
|
220
|
+
#### StatusIcon
|
|
221
|
+
```jsx
|
|
222
|
+
<StatusIcon status={1} />
|
|
223
|
+
```
|
|
224
|
+
| Property | Type | Options | Default | Description |
|
|
225
|
+
|--------------|--------------|--------------|--------------|--------------|
|
|
226
|
+
| ```animated``` | Boolean | ```true``` ```false``` | ```false``` | If true, the icon will include animation effects on active status. Defaults to false, indicating no animation. |
|
|
227
|
+
| ```className``` | String | n/a | n/a | Additional CSS class names that can be applied to the status icon. Defaults to an empty string. |
|
|
228
|
+
| ```status``` | Number | ```0``` ```1``` ```3``` | ```0``` | Specifies the visual state of the icon: ```0``` for inactive, ```1``` for active, and ```3``` for active with a warning. |
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
## Customization
|
|
233
|
+
Currently, the components are not customizable.
|
|
234
|
+
|
|
235
|
+
## Contributions
|
|
236
|
+
This library is for internal use by Groovinads and is not open to external contributions.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
For more information or support, contact the [Groovinads development team](mailto:helpdesk@groovinads.com).
|
package/dist/index.es.js
CHANGED
|
@@ -6,9 +6,9 @@ import e,{useCallback as t,useEffect as r}from"react";function n(e,t){return e(t
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/}var o="function"==typeof Symbol&&Symbol.for,a=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,l=o?Symbol.for("react.profiler"):60114,u=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.async_mode"):60111,m=o?Symbol.for("react.concurrent_mode"):60111,d=o?Symbol.for("react.forward_ref"):60112,y=o?Symbol.for("react.suspense"):60113,b=o?Symbol.for("react.suspense_list"):60120,g=o?Symbol.for("react.memo"):60115,
|
|
9
|
+
*/}var o="function"==typeof Symbol&&Symbol.for,a=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,l=o?Symbol.for("react.profiler"):60114,u=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.async_mode"):60111,m=o?Symbol.for("react.concurrent_mode"):60111,d=o?Symbol.for("react.forward_ref"):60112,y=o?Symbol.for("react.suspense"):60113,b=o?Symbol.for("react.suspense_list"):60120,g=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,h=o?Symbol.for("react.block"):60121,E=o?Symbol.for("react.fundamental"):60117,x=o?Symbol.for("react.responder"):60118,S=o?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case p:case m:case s:case l:case c:case y:return e;default:switch(e=e&&e.$$typeof){case f:case d:case v:case g:case u:return e;default:return t}}case i:return t}}}function O(e){return w(e)===m}var N={AsyncMode:p,ConcurrentMode:m,ContextConsumer:f,ContextProvider:u,Element:a,ForwardRef:d,Fragment:s,Lazy:v,Memo:g,Portal:i,Profiler:l,StrictMode:c,Suspense:y,isAsyncMode:function(e){return O(e)||w(e)===p},isConcurrentMode:O,isContextConsumer:function(e){return w(e)===f},isContextProvider:function(e){return w(e)===u},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},isForwardRef:function(e){return w(e)===d},isFragment:function(e){return w(e)===s},isLazy:function(e){return w(e)===v},isMemo:function(e){return w(e)===g},isPortal:function(e){return w(e)===i},isProfiler:function(e){return w(e)===l},isStrictMode:function(e){return w(e)===c},isSuspense:function(e){return w(e)===y},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===s||e===m||e===l||e===c||e===y||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===u||e.$$typeof===f||e.$$typeof===d||e.$$typeof===E||e.$$typeof===x||e.$$typeof===S||e.$$typeof===h)},typeOf:w},$=n((function(e,t){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,h=e?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:var m=e.type;switch(m){case l:case u:case o:case i:case a:case p:return m;default:var b=m&&m.$$typeof;switch(b){case c:case f:case y:case d:case s:return b;default:return t}}case n:return t}}}var x=l,S=u,w=c,O=s,N=r,$=f,C=o,T=y,P=d,k=n,j=i,_=a,I=p,M=!1;function R(e){return E(e)===u}t.AsyncMode=x,t.ConcurrentMode=S,t.ContextConsumer=w,t.ContextProvider=O,t.Element=N,t.ForwardRef=$,t.Fragment=C,t.Lazy=T,t.Memo=P,t.Portal=k,t.Profiler=j,t.StrictMode=_,t.Suspense=I,t.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),R(e)||E(e)===l},t.isConcurrentMode=R,t.isContextConsumer=function(e){return E(e)===c},t.isContextProvider=function(e){return E(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===f},t.isFragment=function(e){return E(e)===o},t.isLazy=function(e){return E(e)===y},t.isMemo=function(e){return E(e)===d},t.isPortal=function(e){return E(e)===n},t.isProfiler=function(e){return E(e)===i},t.isStrictMode=function(e){return E(e)===a},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===u||e===i||e===a||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===d||e.$$typeof===s||e.$$typeof===c||e.$$typeof===f||e.$$typeof===g||e.$$typeof===v||e.$$typeof===h||e.$$typeof===b)},t.typeOf=E}()}));$.AsyncMode,$.ConcurrentMode,$.ContextConsumer,$.ContextProvider,$.Element,$.ForwardRef,$.Fragment,$.Lazy,$.Memo,$.Portal,$.Profiler,$.StrictMode,$.Suspense,$.isAsyncMode,$.isConcurrentMode,$.isContextConsumer,$.isContextProvider,$.isElement,$.isForwardRef,$.isFragment,$.isLazy,$.isMemo,$.isPortal,$.isProfiler,$.isStrictMode,$.isSuspense,$.isValidElementType,$.typeOf;var C=n((function(e){"production"===process.env.NODE_ENV?e.exports=N:e.exports=$})),T=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;
|
|
10
10
|
/*
|
|
11
11
|
object-assign
|
|
12
12
|
(c) Sindre Sorhus
|
|
13
13
|
@license MIT
|
|
14
|
-
*/var j=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==n.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),a=1;a<arguments.length;a++){for(var i in r=Object(arguments[a]))P.call(r,i)&&(o[i]=r[i]);if(T){n=T(r);for(var s=0;s<n.length;s++)k.call(r,n[s])&&(o[n[s]]=r[n[s]])}}return o},_="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",I=Function.call.bind(Object.prototype.hasOwnProperty),M=function(){};if("production"!==process.env.NODE_ENV){var R=_,A={},F=I;M=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function V(e,t,r,n,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(F(e,a)){var i;try{if("function"!=typeof e[a]){var s=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}i=e[a](t,a,n,r,null,R)}catch(e){i=e}if(!i||i instanceof Error||M((n||"React class")+": type specification of "+r+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in A)){A[i.message]=!0;var c=o?o():"";M("Failed "+r+" type: "+i.message+(null!=c?c:""))}}}V.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(A={})};var z=V,q=function(){};function D(){return null}"production"!==process.env.NODE_ENV&&(q=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}});var L=function(e,t){var r="function"==typeof Symbol&&Symbol.iterator,n="@@iterator";var o="<<anonymous>>",a={array:l("array"),bigint:l("bigint"),bool:l("boolean"),func:l("function"),number:l("number"),object:l("object"),string:l("string"),symbol:l("symbol"),any:c(D),arrayOf:function(e){return c((function(t,r,n,o,a){if("function"!=typeof e)return new s("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var i=t[r];if(!Array.isArray(i))return new s("Invalid "+o+" `"+a+"` of type `"+p(i)+"` supplied to `"+n+"`, expected an array.");for(var c=0;c<i.length;c++){var l=e(i,c,n,o,a+"["+c+"]",_);if(l instanceof Error)return l}return null}))},element:c((function(t,r,n,o,a){var i=t[r];return e(i)?null:new s("Invalid "+o+" `"+a+"` of type `"+p(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:c((function(e,t,r,n,o){var a=e[t];return C.isValidElementType(a)?null:new s("Invalid "+n+" `"+o+"` of type `"+p(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return c((function(t,r,n,a,i){if(!(t[r]instanceof e)){var c=e.name||o;return new s("Invalid "+a+" `"+i+"` of type `"+(((l=t[r]).constructor&&l.constructor.name?l.constructor.name:o)+"` supplied to `")+n+"`, expected instance of `"+c+"`.")}var l;return null}))},node:c((function(e,t,r,n,o){return f(e[t])?null:new s("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return c((function(t,r,n,o,a){if("function"!=typeof e)return new s("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var i=t[r],c=p(i);if("object"!==c)return new s("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected an object.");for(var l in i)if(I(i,l)){var u=e(i,l,n,o,a+"."+l,_);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&q(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),D;return c((function(t,r,n,o,a){for(var c=t[r],l=0;l<e.length;l++)if(i(c,e[l]))return null;var u=JSON.stringify(e,(function(e,t){return"symbol"===m(t)?String(t):t}));return new s("Invalid "+o+" `"+a+"` of value `"+String(c)+"` supplied to `"+n+"`, expected one of "+u+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&q("Invalid argument supplied to oneOfType, expected an instance of array."),D;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return q("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+d(r)+" at index "+t+"."),D}return c((function(t,r,n,o,a){for(var i=[],c=0;c<e.length;c++){var l=(0,e[c])(t,r,n,o,a,_);if(null==l)return null;l.data&&I(l.data,"expectedType")&&i.push(l.data.expectedType)}return new s("Invalid "+o+" `"+a+"` supplied to `"+n+"`"+(i.length>0?", expected one of type ["+i.join(", ")+"]":"")+".")}))},shape:function(e){return c((function(t,r,n,o,a){var i=t[r],c=p(i);if("object"!==c)return new s("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected `object`.");for(var l in e){var f=e[l];if("function"!=typeof f)return u(n,o,a,l,m(f));var d=f(i,l,n,o,a+"."+l,_);if(d)return d}return null}))},exact:function(e){return c((function(t,r,n,o,a){var i=t[r],c=p(i);if("object"!==c)return new s("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected `object`.");var l=j({},t[r],e);for(var f in l){var d=e[f];if(I(e,f)&&"function"!=typeof d)return u(n,o,a,f,m(d));if(!d)return new s("Invalid "+o+" `"+a+"` key `"+f+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(t[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var y=d(i,f,n,o,a+"."+f,_);if(y)return y}return null}))}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function s(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function c(e){if("production"!==process.env.NODE_ENV)var r={},n=0;function a(a,i,c,l,u,f,p){if(l=l||o,f=f||c,p!==_){if(t){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var d=l+":"+c;!r[d]&&n<3&&(q("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),r[d]=!0,n++)}}return null==i[c]?a?null===i[c]?new s("The "+u+" `"+f+"` is marked as required in `"+l+"`, but its value is `null`."):new s("The "+u+" `"+f+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(i,c,l,u,f)}var i=a.bind(null,!1);return i.isRequired=a.bind(null,!0),i}function l(e){return c((function(t,r,n,o,a,i){var c=t[r];return p(c)!==e?new s("Invalid "+o+" `"+a+"` of type `"+m(c)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function u(e,t,r,n,o){return new s((e||"React class")+": "+t+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function f(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(f);if(null===t||e(t))return!0;var o=function(e){var t=e&&(r&&e[r]||e[n]);if("function"==typeof t)return t}(t);if(!o)return!1;var a,i=o.call(t);if(o!==t.entries){for(;!(a=i.next()).done;)if(!f(a.value))return!1}else for(;!(a=i.next()).done;){var s=a.value;if(s&&!f(s[1]))return!1}return!0;default:return!1}}function p(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function m(e){if(null==e)return""+e;var t=p(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function d(e){var t=m(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return s.prototype=Error.prototype,a.checkPropTypes=z,a.resetWarningCache=z.resetWarningCache,a.PropTypes=a,a};function W(){}function U(){}U.resetWarningCache=W;var Y=n((function(e){if("production"!==process.env.NODE_ENV){var t=C;e.exports=L(t.isElement,!0)}else e.exports=function(){function e(e,t,r,n,o,a){if(a!==_){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:U,resetWarningCache:W};return r.PropTypes=r,r}()}));const J=({variant:t="primary",size:r="md",onClick:n,children:o,icon:a,iconPosition:i="start",className:s,style:c="default",processing:l=!1})=>{let u=`btn ${s}`;"default"!==t&&(u+=` btn-${t}`),"md"!==r&&(u+=` btn-${r}`),"default"!==c&&(u+=` btn-${c}`),l&&(u+=" btn-processing");const f=l?e.createElement(e.Fragment,null,e.createElement("i",{className:"fa-solid fa-spinner-third fa-spin","aria-hidden":"true"}),o&&e.createElement("span",null,o,"…")):a?"end"===i?e.createElement(e.Fragment,null,o&&e.createElement("span",null,o),e.createElement("i",{className:`fa-solid ${a}`,"aria-hidden":"true"})):e.createElement(e.Fragment,null,e.createElement("i",{className:`fa-solid ${a}`,"aria-hidden":"true"}),o&&e.createElement("span",null,o)):o&&e.createElement("span",null,o);return e.createElement("button",{className:u,onClick:n},f)};J.propTypes={variant:Y.oneOf(["primary","secondary","terciary","outline"]),size:Y.oneOf(["xs","md","lg"]),onClick:Y.func,children:Y.node,icon:Y.string,iconPosition:Y.oneOf(["start","end"]),className:Y.string,style:Y.oneOf(["default","success","danger","warning","link"]),processing:Y.bool};const B=()=>({toCamelCase:t((e=>{let t=e?.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g,(function(e,t){return 0==+e?"":0===t?e?.toLowerCase():e?.toUpperCase()}));return t=t?.replace(/^\d+/,""),t=t?.replace(/[^a-zA-Z0-9_]/g,""),t}),[])}),Z=({children:t,className:r,id:n,name:o,status:a=!1,setStatus:i})=>{const{toCamelCase:s}=B();let c=n;n||"string"!=typeof t||(c=s(t));return e.createElement("div",{className:`form-group form-check ${r}`},e.createElement("label",{className:"checkbox"},e.createElement("input",{type:"checkbox",checked:a,onChange:e=>{i(e.target.checked)},minLength:"1",id:c,name:o}),e.createElement("span",{className:"outer"},e.createElement("span",{className:"inner"})),t))};Z.propTypes={className:Y.string,id:Y.string,name:Y.string,status:Y.bool,setStatus:Y.func};const H=({className:t,disabled:n,helpText:o,icon:a,label:i="Label",name:s,onChange:c,prefix:l,requiredText:u,showError:f,setShowError:p,size:m="md",suffix:d,type:y="text",value:b})=>{const{toCamelCase:g}=B(),h="lg"===m?"form-control-lg":"xs"===m?"form-control-xs":"",v=g(i);return r((()=>{f&&setTimeout((()=>{p(!1)}),3e3)}),[f]),e.createElement("div",{className:`position-relative ${t}`},l||d||a?e.createElement("div",{className:"input-group "+(f?"not-validated":""),"data-error":u},a&&e.createElement("span",{className:"input-group-text"},e.createElement("i",{className:`fa-solid ${a}`})),l&&e.createElement("span",{className:"input-group-text"},l),e.createElement("div",{className:"form-floating"},e.createElement("input",{type:y,className:`form-control ${h}`,value:b,id:v,name:s,placeholder:i,onChange:c,required:!!u}),e.createElement("label",{htmlFor:v},i)),d&&e.createElement("span",{className:"input-group-text"},d)):e.createElement("div",{className:"form-floating "+(f?"not-validated":""),"data-error":u},e.createElement("input",{type:y,className:`form-control ${h}`,value:b,id:v,placeholder:i,onChange:c,required:!!u,name:s,disabled:n}),e.createElement("label",{htmlFor:v},i)),o&&e.createElement("small",{className:"form-text text-muted"},o))};H.propTypes={className:Y.string,disabled:Y.bool,helpText:Y.string,icon:Y.string,label:Y.string,name:Y.string,onChange:Y.func,prefix:Y.string,requiredText:Y.string,size:Y.oneOf(["xs","md","lg"]),showError:Y.bool,setShowError:Y.func,suffix:Y.string,type:Y.oneOf(["color","date","datetime-local","email","file","image","month","number","password","tel","text","time","url","week"]),value:Y.oneOfType([Y.string,Y.number])};const G=({children:t,className:r,id:n,name:o,setStatus:a,status:i=!1})=>{const{toCamelCase:s}=B();let c=n;n||"string"!=typeof t||(c=s(t));return e.createElement("div",{className:`form-group form-check ${r}`},e.createElement("label",{className:"radio"},e.createElement("input",{type:"radio",checked:i,onChange:e=>{a(e.target.checked)},minLength:"1",id:c,name:o}),e.createElement("span",{className:"outer"},e.createElement("span",{className:"inner"})),t))};G.propTypes={className:Y.string,id:Y.string,name:Y.string,setStatus:Y.func,status:Y.bool};const K=({children:t,className:r,icon:n=!1,id:o,name:a,size:i,setStatus:s,status:c=!1,switchPosition:l="start"})=>{const{toCamelCase:u}=B(),f="lg"===i?"form-switch-lg":"xs"===i?"form-switch-xs":"",p=o||u(t);return e.createElement("div",{className:`form-check form-switch ${f} ${r} ${"end"===l?"switch-end":""} ${n?"switch-icon":""}`},e.createElement("input",{className:"form-check-input",type:"checkbox",role:"switch",onChange:e=>{s(e.target.checked)},id:p,name:a,checked:c}),t&&e.createElement("label",{className:"form-check-label",htmlFor:p},t))};K.propTypes={className:Y.string,icon:Y.bool,id:Y.string,name:Y.string,setStatus:Y.func,status:Y.bool,switchPosition:Y.oneOf(["start","end"])};const Q=({className:t,helpText:n,label:o="Label",name:a,onChange:i,requiredText:s,showError:c,setShowError:l,size:u="md"})=>{const{toCamelCase:f}=B(),p="lg"===u?"form-control-lg":"xs"===u?"form-control-xs":"",m=f(o);return r((()=>{c&&setTimeout((()=>{l(!1)}),3e3)}),[c]),e.createElement("div",{className:`position-relative ${t}`},e.createElement("div",{className:"form-floating "+(c?"not-validated":""),"data-error":s},e.createElement("textarea",{className:`form-control ${p}`,onChange:i,placeholder:o,id:m,name:a,required:!!s}),e.createElement("label",{htmlFor:m},o),n&&e.createElement("small",{className:"form-text text-muted"},n)))};Q.propTypes={className:Y.string,helpText:Y.string,label:Y.string,name:Y.string,onChange:Y.func,requiredText:Y.string,showError:Y.bool,size:Y.oneOf(["xs","md","lg"])};export{J as Button,Z as Checkbox,H as Input,G as Radio,K as Switch,Q as Textarea};
|
|
14
|
+
*/var j=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==n.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),a=1;a<arguments.length;a++){for(var i in r=Object(arguments[a]))P.call(r,i)&&(o[i]=r[i]);if(T){n=T(r);for(var s=0;s<n.length;s++)k.call(r,n[s])&&(o[n[s]]=r[n[s]])}}return o},_="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",I=Function.call.bind(Object.prototype.hasOwnProperty),M=function(){};if("production"!==process.env.NODE_ENV){var R=_,A={},F=I;M=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function V(e,t,r,n,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(F(e,a)){var i;try{if("function"!=typeof e[a]){var s=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}i=e[a](t,a,n,r,null,R)}catch(e){i=e}if(!i||i instanceof Error||M((n||"React class")+": type specification of "+r+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in A)){A[i.message]=!0;var c=o?o():"";M("Failed "+r+" type: "+i.message+(null!=c?c:""))}}}V.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(A={})};var z=V,q=function(){};function D(){return null}"production"!==process.env.NODE_ENV&&(q=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}});var L=function(e,t){var r="function"==typeof Symbol&&Symbol.iterator,n="@@iterator";var o="<<anonymous>>",a={array:l("array"),bigint:l("bigint"),bool:l("boolean"),func:l("function"),number:l("number"),object:l("object"),string:l("string"),symbol:l("symbol"),any:c(D),arrayOf:function(e){return c((function(t,r,n,o,a){if("function"!=typeof e)return new s("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var i=t[r];if(!Array.isArray(i))return new s("Invalid "+o+" `"+a+"` of type `"+p(i)+"` supplied to `"+n+"`, expected an array.");for(var c=0;c<i.length;c++){var l=e(i,c,n,o,a+"["+c+"]",_);if(l instanceof Error)return l}return null}))},element:c((function(t,r,n,o,a){var i=t[r];return e(i)?null:new s("Invalid "+o+" `"+a+"` of type `"+p(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:c((function(e,t,r,n,o){var a=e[t];return C.isValidElementType(a)?null:new s("Invalid "+n+" `"+o+"` of type `"+p(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return c((function(t,r,n,a,i){if(!(t[r]instanceof e)){var c=e.name||o;return new s("Invalid "+a+" `"+i+"` of type `"+(((l=t[r]).constructor&&l.constructor.name?l.constructor.name:o)+"` supplied to `")+n+"`, expected instance of `"+c+"`.")}var l;return null}))},node:c((function(e,t,r,n,o){return f(e[t])?null:new s("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return c((function(t,r,n,o,a){if("function"!=typeof e)return new s("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var i=t[r],c=p(i);if("object"!==c)return new s("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected an object.");for(var l in i)if(I(i,l)){var u=e(i,l,n,o,a+"."+l,_);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&q(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),D;return c((function(t,r,n,o,a){for(var c=t[r],l=0;l<e.length;l++)if(i(c,e[l]))return null;var u=JSON.stringify(e,(function(e,t){return"symbol"===m(t)?String(t):t}));return new s("Invalid "+o+" `"+a+"` of value `"+String(c)+"` supplied to `"+n+"`, expected one of "+u+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&q("Invalid argument supplied to oneOfType, expected an instance of array."),D;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return q("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+d(r)+" at index "+t+"."),D}return c((function(t,r,n,o,a){for(var i=[],c=0;c<e.length;c++){var l=(0,e[c])(t,r,n,o,a,_);if(null==l)return null;l.data&&I(l.data,"expectedType")&&i.push(l.data.expectedType)}return new s("Invalid "+o+" `"+a+"` supplied to `"+n+"`"+(i.length>0?", expected one of type ["+i.join(", ")+"]":"")+".")}))},shape:function(e){return c((function(t,r,n,o,a){var i=t[r],c=p(i);if("object"!==c)return new s("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected `object`.");for(var l in e){var f=e[l];if("function"!=typeof f)return u(n,o,a,l,m(f));var d=f(i,l,n,o,a+"."+l,_);if(d)return d}return null}))},exact:function(e){return c((function(t,r,n,o,a){var i=t[r],c=p(i);if("object"!==c)return new s("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected `object`.");var l=j({},t[r],e);for(var f in l){var d=e[f];if(I(e,f)&&"function"!=typeof d)return u(n,o,a,f,m(d));if(!d)return new s("Invalid "+o+" `"+a+"` key `"+f+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(t[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var y=d(i,f,n,o,a+"."+f,_);if(y)return y}return null}))}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function s(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function c(e){if("production"!==process.env.NODE_ENV)var r={},n=0;function a(a,i,c,l,u,f,p){if(l=l||o,f=f||c,p!==_){if(t){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var d=l+":"+c;!r[d]&&n<3&&(q("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),r[d]=!0,n++)}}return null==i[c]?a?null===i[c]?new s("The "+u+" `"+f+"` is marked as required in `"+l+"`, but its value is `null`."):new s("The "+u+" `"+f+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(i,c,l,u,f)}var i=a.bind(null,!1);return i.isRequired=a.bind(null,!0),i}function l(e){return c((function(t,r,n,o,a,i){var c=t[r];return p(c)!==e?new s("Invalid "+o+" `"+a+"` of type `"+m(c)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function u(e,t,r,n,o){return new s((e||"React class")+": "+t+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function f(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(f);if(null===t||e(t))return!0;var o=function(e){var t=e&&(r&&e[r]||e[n]);if("function"==typeof t)return t}(t);if(!o)return!1;var a,i=o.call(t);if(o!==t.entries){for(;!(a=i.next()).done;)if(!f(a.value))return!1}else for(;!(a=i.next()).done;){var s=a.value;if(s&&!f(s[1]))return!1}return!0;default:return!1}}function p(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function m(e){if(null==e)return""+e;var t=p(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function d(e){var t=m(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return s.prototype=Error.prototype,a.checkPropTypes=z,a.resetWarningCache=z.resetWarningCache,a.PropTypes=a,a};function W(){}function U(){}U.resetWarningCache=W;var Y=n((function(e){if("production"!==process.env.NODE_ENV){var t=C;e.exports=L(t.isElement,!0)}else e.exports=function(){function e(e,t,r,n,o,a){if(a!==_){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:U,resetWarningCache:W};return r.PropTypes=r,r}()}));const J=({variant:t="primary",size:r="md",onClick:n,children:o,icon:a,iconPosition:i="start",className:s="",style:c="default",processing:l=!1})=>{let u=`btn ${s}`;"default"!==t&&(u+=` btn-${t}`),"md"!==r&&(u+=` btn-${r}`),"default"!==c&&(u+=` btn-${c}`),l&&(u+=" btn-processing");const f=l?e.createElement(e.Fragment,null,e.createElement("i",{className:"fa-solid fa-spinner-third fa-spin","aria-hidden":"true"}),o&&e.createElement("span",null,o,"…")):a?"end"===i?e.createElement(e.Fragment,null,o&&e.createElement("span",null,o),e.createElement("i",{className:`fa-solid ${a}`,"aria-hidden":"true"})):e.createElement(e.Fragment,null,e.createElement("i",{className:`fa-solid ${a}`,"aria-hidden":"true"}),o&&e.createElement("span",null,o)):o&&e.createElement("span",null,o);return e.createElement("button",{className:u,onClick:n},f)};J.propTypes={variant:Y.oneOf(["primary","secondary","terciary","outline"]),size:Y.oneOf(["xs","md","lg"]),onClick:Y.func,children:Y.node,icon:Y.string,iconPosition:Y.oneOf(["start","end"]),className:Y.string,style:Y.oneOf(["default","success","danger","warning","link"]),processing:Y.bool};const B=()=>({toCamelCase:t((e=>{let t=e?.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g,(function(e,t){return 0==+e?"":0===t?e?.toLowerCase():e?.toUpperCase()}));return t=t?.replace(/^\d+/,""),t=t?.replace(/[^a-zA-Z0-9_]/g,""),t}),[])}),Z=({children:t,className:r="",id:n,name:o,status:a=!1,setStatus:i})=>{const{toCamelCase:s}=B();let c=n;n||"string"!=typeof t||(c=s(t));return e.createElement("div",{className:`form-group form-check ${r}`},e.createElement("label",{className:"checkbox"},e.createElement("input",{type:"checkbox",checked:a,onChange:e=>{i(e.target.checked)},minLength:"1",id:c,name:o}),e.createElement("span",{className:"outer"},e.createElement("span",{className:"inner"})),t))};Z.propTypes={className:Y.string,id:Y.string,name:Y.string,status:Y.bool,setStatus:Y.func};const H=({className:t="",disabled:n,helpText:o,icon:a,label:i="Label",name:s,onChange:c,prefix:l,requiredText:u,showError:f,setShowError:p,size:m="md",suffix:d,type:y="text",value:b})=>{const{toCamelCase:g}=B(),v=g(i);return r((()=>{f&&setTimeout((()=>{p(!1)}),3e3)}),[f]),e.createElement("div",{className:`position-relative ${t}`},l||d||a?e.createElement("div",{className:"input-group "+(f?"not-validated":""),"data-error":u},a&&e.createElement("span",{className:"input-group-text"},e.createElement("i",{className:`fa-solid ${a}`})),l&&e.createElement("span",{className:"input-group-text"},l),e.createElement("div",{className:"form-floating"},e.createElement("input",{type:y,className:"form-control "+("md"!==m?`form-control-${m}`:""),value:b,id:v,name:s,placeholder:i,onChange:c,required:!!u}),e.createElement("label",{htmlFor:v},i)),d&&e.createElement("span",{className:"input-group-text"},d)):e.createElement("div",{className:"form-floating "+(f?"not-validated":""),"data-error":u},e.createElement("input",{type:y,className:"form-control "+("md"!==m?`form-control-${m}`:""),value:b,id:v,placeholder:i,onChange:c,required:!!u,name:s,disabled:n}),e.createElement("label",{htmlFor:v},i)),o&&e.createElement("small",{className:"form-text text-muted"},o))};H.propTypes={className:Y.string,disabled:Y.bool,helpText:Y.string,icon:Y.string,label:Y.string,name:Y.string,onChange:Y.func,prefix:Y.string,requiredText:Y.string,size:Y.oneOf(["xs","md","lg"]),showError:Y.bool,setShowError:Y.func,suffix:Y.string,type:Y.oneOf(["color","date","datetime-local","email","file","image","month","number","password","tel","text","time","url","week"]),value:Y.oneOfType([Y.string,Y.number])};const G=({children:t,className:r="",id:n,name:o,setStatus:a,status:i=!1})=>{const{toCamelCase:s}=B();let c=n;n||"string"!=typeof t||(c=s(t));return e.createElement("div",{className:`form-group form-check ${r}`},e.createElement("label",{className:"radio"},e.createElement("input",{type:"radio",checked:i,onChange:e=>{a(e.target.checked)},minLength:"1",id:c,name:o}),e.createElement("span",{className:"outer"},e.createElement("span",{className:"inner"})),t))};G.propTypes={className:Y.string,id:Y.string,name:Y.string,setStatus:Y.func,status:Y.bool};const K=({children:t,className:r="",icon:n=!1,id:o,name:a,size:i,setStatus:s,status:c=!1,switchPosition:l="start"})=>{const{toCamelCase:u}=B(),f="lg"===i?"form-switch-lg":"xs"===i?"form-switch-xs":"",p=o||u(t);return e.createElement("div",{className:`form-check form-switch ${f} ${r} ${"end"===l?"switch-end":""} ${n?"switch-icon":""}`},e.createElement("input",{className:"form-check-input",type:"checkbox",role:"switch",onChange:e=>{s(e.target.checked)},id:p,name:a,checked:c}),t&&e.createElement("label",{className:"form-check-label",htmlFor:p},t))};K.propTypes={className:Y.string,icon:Y.bool,id:Y.string,name:Y.string,setStatus:Y.func,status:Y.bool,switchPosition:Y.oneOf(["start","end"])};const Q=({className:t="",helpText:n,label:o="Label",name:a,onChange:i,requiredText:s,showError:c,setShowError:l,size:u="md",value:f})=>{const{toCamelCase:p}=B(),m="lg"===u?"form-control-lg":"xs"===u?"form-control-xs":"",d=p(o);return r((()=>{c&&setTimeout((()=>{l(!1)}),3e3)}),[c]),e.createElement("div",{className:`position-relative ${t}`},e.createElement("div",{className:"form-floating "+(c?"not-validated":""),"data-error":s},e.createElement("textarea",{className:`form-control ${m}`,onChange:i,placeholder:o,id:d,name:a,required:!!s,value:f}),e.createElement("label",{htmlFor:d},o),n&&e.createElement("small",{className:"form-text text-muted"},n)))};Q.propTypes={className:Y.string,helpText:Y.string,label:Y.string,name:Y.string,onChange:Y.func,requiredText:Y.string,showError:Y.bool,setShowError:Y.func,size:Y.oneOf(["xs","md","lg"]),value:Y.string};export{J as Button,Z as Checkbox,H as Input,G as Radio,K as Switch,Q as Textarea};
|
package/dist/index.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/}var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,m=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,
|
|
9
|
+
*/}var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,m=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,h=r?Symbol.for("react.responder"):60118,E=r?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case f:case a:case s:case i:case m:return e;default:switch(e=e&&e.$$typeof){case l:case p:case b:case y:case c:return e;default:return t}}case o:return t}}}function S(e){return x(e)===f}var w={AsyncMode:u,ConcurrentMode:f,ContextConsumer:l,ContextProvider:c,Element:n,ForwardRef:p,Fragment:a,Lazy:b,Memo:y,Portal:o,Profiler:s,StrictMode:i,Suspense:m,isAsyncMode:function(e){return S(e)||x(e)===u},isConcurrentMode:S,isContextConsumer:function(e){return x(e)===l},isContextProvider:function(e){return x(e)===c},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},isForwardRef:function(e){return x(e)===p},isFragment:function(e){return x(e)===a},isLazy:function(e){return x(e)===b},isMemo:function(e){return x(e)===y},isPortal:function(e){return x(e)===o},isProfiler:function(e){return x(e)===s},isStrictMode:function(e){return x(e)===i},isSuspense:function(e){return x(e)===m},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===s||e===i||e===m||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===y||e.$$typeof===c||e.$$typeof===l||e.$$typeof===p||e.$$typeof===v||e.$$typeof===h||e.$$typeof===E||e.$$typeof===g)},typeOf:x},O=t((function(e,t){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,h=e?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:var m=e.type;switch(m){case l:case u:case o:case i:case a:case p:return m;default:var b=m&&m.$$typeof;switch(b){case c:case f:case y:case d:case s:return b;default:return t}}case n:return t}}}var x=l,S=u,w=c,O=s,N=r,$=f,C=o,T=y,k=d,P=n,j=i,_=a,I=p,M=!1;function R(e){return E(e)===u}t.AsyncMode=x,t.ConcurrentMode=S,t.ContextConsumer=w,t.ContextProvider=O,t.Element=N,t.ForwardRef=$,t.Fragment=C,t.Lazy=T,t.Memo=k,t.Portal=P,t.Profiler=j,t.StrictMode=_,t.Suspense=I,t.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),R(e)||E(e)===l},t.isConcurrentMode=R,t.isContextConsumer=function(e){return E(e)===c},t.isContextProvider=function(e){return E(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===f},t.isFragment=function(e){return E(e)===o},t.isLazy=function(e){return E(e)===y},t.isMemo=function(e){return E(e)===d},t.isPortal=function(e){return E(e)===n},t.isProfiler=function(e){return E(e)===i},t.isStrictMode=function(e){return E(e)===a},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===u||e===i||e===a||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===d||e.$$typeof===s||e.$$typeof===c||e.$$typeof===f||e.$$typeof===g||e.$$typeof===v||e.$$typeof===h||e.$$typeof===b)},t.typeOf=E}()}));O.AsyncMode,O.ConcurrentMode,O.ContextConsumer,O.ContextProvider,O.Element,O.ForwardRef,O.Fragment,O.Lazy,O.Memo,O.Portal,O.Profiler,O.StrictMode,O.Suspense,O.isAsyncMode,O.isConcurrentMode,O.isContextConsumer,O.isContextProvider,O.isElement,O.isForwardRef,O.isFragment,O.isLazy,O.isMemo,O.isPortal,O.isProfiler,O.isStrictMode,O.isSuspense,O.isValidElementType,O.typeOf;var N=t((function(e){"production"===process.env.NODE_ENV?e.exports=w:e.exports=O})),$=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;
|
|
10
10
|
/*
|
|
11
11
|
object-assign
|
|
12
12
|
(c) Sindre Sorhus
|
|
13
13
|
@license MIT
|
|
14
|
-
*/var k=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==n.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),a=1;a<arguments.length;a++){for(var i in r=Object(arguments[a]))C.call(r,i)&&(o[i]=r[i]);if($){n=$(r);for(var s=0;s<n.length;s++)T.call(r,n[s])&&(o[n[s]]=r[n[s]])}}return o},P="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",j=Function.call.bind(Object.prototype.hasOwnProperty),_=function(){};if("production"!==process.env.NODE_ENV){var I=P,M={},R=j;_=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function A(e,t,r,n,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(R(e,a)){var i;try{if("function"!=typeof e[a]){var s=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}i=e[a](t,a,n,r,null,I)}catch(e){i=e}if(!i||i instanceof Error||_((n||"React class")+": type specification of "+r+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in M)){M[i.message]=!0;var c=o?o():"";_("Failed "+r+" type: "+i.message+(null!=c?c:""))}}}A.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(M={})};var F=A,V=function(){};function z(){return null}"production"!==process.env.NODE_ENV&&(V=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}});var q=function(e,t){var r="function"==typeof Symbol&&Symbol.iterator,n="@@iterator";var o="<<anonymous>>",a={array:l("array"),bigint:l("bigint"),bool:l("boolean"),func:l("function"),number:l("number"),object:l("object"),string:l("string"),symbol:l("symbol"),any:c(z),arrayOf:function(e){return c((function(t,r,n,o,a){if("function"!=typeof e)return new s("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var i=t[r];if(!Array.isArray(i))return new s("Invalid "+o+" `"+a+"` of type `"+p(i)+"` supplied to `"+n+"`, expected an array.");for(var c=0;c<i.length;c++){var l=e(i,c,n,o,a+"["+c+"]",P);if(l instanceof Error)return l}return null}))},element:c((function(t,r,n,o,a){var i=t[r];return e(i)?null:new s("Invalid "+o+" `"+a+"` of type `"+p(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:c((function(e,t,r,n,o){var a=e[t];return N.isValidElementType(a)?null:new s("Invalid "+n+" `"+o+"` of type `"+p(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return c((function(t,r,n,a,i){if(!(t[r]instanceof e)){var c=e.name||o;return new s("Invalid "+a+" `"+i+"` of type `"+(((l=t[r]).constructor&&l.constructor.name?l.constructor.name:o)+"` supplied to `")+n+"`, expected instance of `"+c+"`.")}var l;return null}))},node:c((function(e,t,r,n,o){return f(e[t])?null:new s("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return c((function(t,r,n,o,a){if("function"!=typeof e)return new s("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var i=t[r],c=p(i);if("object"!==c)return new s("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected an object.");for(var l in i)if(j(i,l)){var u=e(i,l,n,o,a+"."+l,P);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&V(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),z;return c((function(t,r,n,o,a){for(var c=t[r],l=0;l<e.length;l++)if(i(c,e[l]))return null;var u=JSON.stringify(e,(function(e,t){return"symbol"===m(t)?String(t):t}));return new s("Invalid "+o+" `"+a+"` of value `"+String(c)+"` supplied to `"+n+"`, expected one of "+u+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&V("Invalid argument supplied to oneOfType, expected an instance of array."),z;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return V("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+d(r)+" at index "+t+"."),z}return c((function(t,r,n,o,a){for(var i=[],c=0;c<e.length;c++){var l=(0,e[c])(t,r,n,o,a,P);if(null==l)return null;l.data&&j(l.data,"expectedType")&&i.push(l.data.expectedType)}return new s("Invalid "+o+" `"+a+"` supplied to `"+n+"`"+(i.length>0?", expected one of type ["+i.join(", ")+"]":"")+".")}))},shape:function(e){return c((function(t,r,n,o,a){var i=t[r],c=p(i);if("object"!==c)return new s("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected `object`.");for(var l in e){var f=e[l];if("function"!=typeof f)return u(n,o,a,l,m(f));var d=f(i,l,n,o,a+"."+l,P);if(d)return d}return null}))},exact:function(e){return c((function(t,r,n,o,a){var i=t[r],c=p(i);if("object"!==c)return new s("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected `object`.");var l=k({},t[r],e);for(var f in l){var d=e[f];if(j(e,f)&&"function"!=typeof d)return u(n,o,a,f,m(d));if(!d)return new s("Invalid "+o+" `"+a+"` key `"+f+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(t[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var y=d(i,f,n,o,a+"."+f,P);if(y)return y}return null}))}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function s(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function c(e){if("production"!==process.env.NODE_ENV)var r={},n=0;function a(a,i,c,l,u,f,p){if(l=l||o,f=f||c,p!==P){if(t){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var d=l+":"+c;!r[d]&&n<3&&(V("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),r[d]=!0,n++)}}return null==i[c]?a?null===i[c]?new s("The "+u+" `"+f+"` is marked as required in `"+l+"`, but its value is `null`."):new s("The "+u+" `"+f+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(i,c,l,u,f)}var i=a.bind(null,!1);return i.isRequired=a.bind(null,!0),i}function l(e){return c((function(t,r,n,o,a,i){var c=t[r];return p(c)!==e?new s("Invalid "+o+" `"+a+"` of type `"+m(c)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function u(e,t,r,n,o){return new s((e||"React class")+": "+t+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function f(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(f);if(null===t||e(t))return!0;var o=function(e){var t=e&&(r&&e[r]||e[n]);if("function"==typeof t)return t}(t);if(!o)return!1;var a,i=o.call(t);if(o!==t.entries){for(;!(a=i.next()).done;)if(!f(a.value))return!1}else for(;!(a=i.next()).done;){var s=a.value;if(s&&!f(s[1]))return!1}return!0;default:return!1}}function p(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function m(e){if(null==e)return""+e;var t=p(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function d(e){var t=m(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return s.prototype=Error.prototype,a.checkPropTypes=F,a.resetWarningCache=F.resetWarningCache,a.PropTypes=a,a};function D(){}function L(){}L.resetWarningCache=D;var W=t((function(e){if("production"!==process.env.NODE_ENV){var t=N;e.exports=q(t.isElement,!0)}else e.exports=function(){function e(e,t,r,n,o,a){if(a!==P){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:L,resetWarningCache:D};return r.PropTypes=r,r}()}));const U=({variant:t="primary",size:r="md",onClick:n,children:o,icon:a,iconPosition:i="start",className:s,style:c="default",processing:l=!1})=>{let u=`btn ${s}`;"default"!==t&&(u+=` btn-${t}`),"md"!==r&&(u+=` btn-${r}`),"default"!==c&&(u+=` btn-${c}`),l&&(u+=" btn-processing");const f=l?e.createElement(e.Fragment,null,e.createElement("i",{className:"fa-solid fa-spinner-third fa-spin","aria-hidden":"true"}),o&&e.createElement("span",null,o,"…")):a?"end"===i?e.createElement(e.Fragment,null,o&&e.createElement("span",null,o),e.createElement("i",{className:`fa-solid ${a}`,"aria-hidden":"true"})):e.createElement(e.Fragment,null,e.createElement("i",{className:`fa-solid ${a}`,"aria-hidden":"true"}),o&&e.createElement("span",null,o)):o&&e.createElement("span",null,o);return e.createElement("button",{className:u,onClick:n},f)};U.propTypes={variant:W.oneOf(["primary","secondary","terciary","outline"]),size:W.oneOf(["xs","md","lg"]),onClick:W.func,children:W.node,icon:W.string,iconPosition:W.oneOf(["start","end"]),className:W.string,style:W.oneOf(["default","success","danger","warning","link"]),processing:W.bool};const Y=()=>({toCamelCase:e.useCallback((e=>{let t=e?.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g,(function(e,t){return 0==+e?"":0===t?e?.toLowerCase():e?.toUpperCase()}));return t=t?.replace(/^\d+/,""),t=t?.replace(/[^a-zA-Z0-9_]/g,""),t}),[])}),B=({children:t,className:r,id:n,name:o,status:a=!1,setStatus:i})=>{const{toCamelCase:s}=Y();let c=n;n||"string"!=typeof t||(c=s(t));return e.createElement("div",{className:`form-group form-check ${r}`},e.createElement("label",{className:"checkbox"},e.createElement("input",{type:"checkbox",checked:a,onChange:e=>{i(e.target.checked)},minLength:"1",id:c,name:o}),e.createElement("span",{className:"outer"},e.createElement("span",{className:"inner"})),t))};B.propTypes={className:W.string,id:W.string,name:W.string,status:W.bool,setStatus:W.func};const J=({className:t,disabled:r,helpText:n,icon:o,label:a="Label",name:i,onChange:s,prefix:c,requiredText:l,showError:u,setShowError:f,size:p="md",suffix:m,type:d="text",value:y})=>{const{toCamelCase:b}=Y(),g="lg"===p?"form-control-lg":"xs"===p?"form-control-xs":"",h=b(a);return e.useEffect((()=>{u&&setTimeout((()=>{f(!1)}),3e3)}),[u]),e.createElement("div",{className:`position-relative ${t}`},c||m||o?e.createElement("div",{className:"input-group "+(u?"not-validated":""),"data-error":l},o&&e.createElement("span",{className:"input-group-text"},e.createElement("i",{className:`fa-solid ${o}`})),c&&e.createElement("span",{className:"input-group-text"},c),e.createElement("div",{className:"form-floating"},e.createElement("input",{type:d,className:`form-control ${g}`,value:y,id:h,name:i,placeholder:a,onChange:s,required:!!l}),e.createElement("label",{htmlFor:h},a)),m&&e.createElement("span",{className:"input-group-text"},m)):e.createElement("div",{className:"form-floating "+(u?"not-validated":""),"data-error":l},e.createElement("input",{type:d,className:`form-control ${g}`,value:y,id:h,placeholder:a,onChange:s,required:!!l,name:i,disabled:r}),e.createElement("label",{htmlFor:h},a)),n&&e.createElement("small",{className:"form-text text-muted"},n))};J.propTypes={className:W.string,disabled:W.bool,helpText:W.string,icon:W.string,label:W.string,name:W.string,onChange:W.func,prefix:W.string,requiredText:W.string,size:W.oneOf(["xs","md","lg"]),showError:W.bool,setShowError:W.func,suffix:W.string,type:W.oneOf(["color","date","datetime-local","email","file","image","month","number","password","tel","text","time","url","week"]),value:W.oneOfType([W.string,W.number])};const Z=({children:t,className:r,id:n,name:o,setStatus:a,status:i=!1})=>{const{toCamelCase:s}=Y();let c=n;n||"string"!=typeof t||(c=s(t));return e.createElement("div",{className:`form-group form-check ${r}`},e.createElement("label",{className:"radio"},e.createElement("input",{type:"radio",checked:i,onChange:e=>{a(e.target.checked)},minLength:"1",id:c,name:o}),e.createElement("span",{className:"outer"},e.createElement("span",{className:"inner"})),t))};Z.propTypes={className:W.string,id:W.string,name:W.string,setStatus:W.func,status:W.bool};const H=({children:t,className:r,icon:n=!1,id:o,name:a,size:i,setStatus:s,status:c=!1,switchPosition:l="start"})=>{const{toCamelCase:u}=Y(),f="lg"===i?"form-switch-lg":"xs"===i?"form-switch-xs":"",p=o||u(t);return e.createElement("div",{className:`form-check form-switch ${f} ${r} ${"end"===l?"switch-end":""} ${n?"switch-icon":""}`},e.createElement("input",{className:"form-check-input",type:"checkbox",role:"switch",onChange:e=>{s(e.target.checked)},id:p,name:a,checked:c}),t&&e.createElement("label",{className:"form-check-label",htmlFor:p},t))};H.propTypes={className:W.string,icon:W.bool,id:W.string,name:W.string,setStatus:W.func,status:W.bool,switchPosition:W.oneOf(["start","end"])};const G=({className:t,helpText:r,label:n="Label",name:o,onChange:a,requiredText:i,showError:s,setShowError:c,size:l="md"})=>{const{toCamelCase:u}=Y(),f="lg"===l?"form-control-lg":"xs"===l?"form-control-xs":"",p=u(n);return e.useEffect((()=>{s&&setTimeout((()=>{c(!1)}),3e3)}),[s]),e.createElement("div",{className:`position-relative ${t}`},e.createElement("div",{className:"form-floating "+(s?"not-validated":""),"data-error":i},e.createElement("textarea",{className:`form-control ${f}`,onChange:a,placeholder:n,id:p,name:o,required:!!i}),e.createElement("label",{htmlFor:p},n),r&&e.createElement("small",{className:"form-text text-muted"},r)))};G.propTypes={className:W.string,helpText:W.string,label:W.string,name:W.string,onChange:W.func,requiredText:W.string,showError:W.bool,size:W.oneOf(["xs","md","lg"])},exports.Button=U,exports.Checkbox=B,exports.Input=J,exports.Radio=Z,exports.Switch=H,exports.Textarea=G;
|
|
14
|
+
*/var k=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==n.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),a=1;a<arguments.length;a++){for(var i in r=Object(arguments[a]))C.call(r,i)&&(o[i]=r[i]);if($){n=$(r);for(var s=0;s<n.length;s++)T.call(r,n[s])&&(o[n[s]]=r[n[s]])}}return o},P="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",j=Function.call.bind(Object.prototype.hasOwnProperty),_=function(){};if("production"!==process.env.NODE_ENV){var I=P,M={},R=j;_=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function A(e,t,r,n,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(R(e,a)){var i;try{if("function"!=typeof e[a]){var s=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}i=e[a](t,a,n,r,null,I)}catch(e){i=e}if(!i||i instanceof Error||_((n||"React class")+": type specification of "+r+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in M)){M[i.message]=!0;var c=o?o():"";_("Failed "+r+" type: "+i.message+(null!=c?c:""))}}}A.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(M={})};var F=A,V=function(){};function z(){return null}"production"!==process.env.NODE_ENV&&(V=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}});var q=function(e,t){var r="function"==typeof Symbol&&Symbol.iterator,n="@@iterator";var o="<<anonymous>>",a={array:l("array"),bigint:l("bigint"),bool:l("boolean"),func:l("function"),number:l("number"),object:l("object"),string:l("string"),symbol:l("symbol"),any:c(z),arrayOf:function(e){return c((function(t,r,n,o,a){if("function"!=typeof e)return new s("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var i=t[r];if(!Array.isArray(i))return new s("Invalid "+o+" `"+a+"` of type `"+p(i)+"` supplied to `"+n+"`, expected an array.");for(var c=0;c<i.length;c++){var l=e(i,c,n,o,a+"["+c+"]",P);if(l instanceof Error)return l}return null}))},element:c((function(t,r,n,o,a){var i=t[r];return e(i)?null:new s("Invalid "+o+" `"+a+"` of type `"+p(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:c((function(e,t,r,n,o){var a=e[t];return N.isValidElementType(a)?null:new s("Invalid "+n+" `"+o+"` of type `"+p(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return c((function(t,r,n,a,i){if(!(t[r]instanceof e)){var c=e.name||o;return new s("Invalid "+a+" `"+i+"` of type `"+(((l=t[r]).constructor&&l.constructor.name?l.constructor.name:o)+"` supplied to `")+n+"`, expected instance of `"+c+"`.")}var l;return null}))},node:c((function(e,t,r,n,o){return f(e[t])?null:new s("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return c((function(t,r,n,o,a){if("function"!=typeof e)return new s("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var i=t[r],c=p(i);if("object"!==c)return new s("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected an object.");for(var l in i)if(j(i,l)){var u=e(i,l,n,o,a+"."+l,P);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&V(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),z;return c((function(t,r,n,o,a){for(var c=t[r],l=0;l<e.length;l++)if(i(c,e[l]))return null;var u=JSON.stringify(e,(function(e,t){return"symbol"===m(t)?String(t):t}));return new s("Invalid "+o+" `"+a+"` of value `"+String(c)+"` supplied to `"+n+"`, expected one of "+u+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&V("Invalid argument supplied to oneOfType, expected an instance of array."),z;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return V("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+d(r)+" at index "+t+"."),z}return c((function(t,r,n,o,a){for(var i=[],c=0;c<e.length;c++){var l=(0,e[c])(t,r,n,o,a,P);if(null==l)return null;l.data&&j(l.data,"expectedType")&&i.push(l.data.expectedType)}return new s("Invalid "+o+" `"+a+"` supplied to `"+n+"`"+(i.length>0?", expected one of type ["+i.join(", ")+"]":"")+".")}))},shape:function(e){return c((function(t,r,n,o,a){var i=t[r],c=p(i);if("object"!==c)return new s("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected `object`.");for(var l in e){var f=e[l];if("function"!=typeof f)return u(n,o,a,l,m(f));var d=f(i,l,n,o,a+"."+l,P);if(d)return d}return null}))},exact:function(e){return c((function(t,r,n,o,a){var i=t[r],c=p(i);if("object"!==c)return new s("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected `object`.");var l=k({},t[r],e);for(var f in l){var d=e[f];if(j(e,f)&&"function"!=typeof d)return u(n,o,a,f,m(d));if(!d)return new s("Invalid "+o+" `"+a+"` key `"+f+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(t[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var y=d(i,f,n,o,a+"."+f,P);if(y)return y}return null}))}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function s(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function c(e){if("production"!==process.env.NODE_ENV)var r={},n=0;function a(a,i,c,l,u,f,p){if(l=l||o,f=f||c,p!==P){if(t){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var d=l+":"+c;!r[d]&&n<3&&(V("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),r[d]=!0,n++)}}return null==i[c]?a?null===i[c]?new s("The "+u+" `"+f+"` is marked as required in `"+l+"`, but its value is `null`."):new s("The "+u+" `"+f+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(i,c,l,u,f)}var i=a.bind(null,!1);return i.isRequired=a.bind(null,!0),i}function l(e){return c((function(t,r,n,o,a,i){var c=t[r];return p(c)!==e?new s("Invalid "+o+" `"+a+"` of type `"+m(c)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function u(e,t,r,n,o){return new s((e||"React class")+": "+t+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function f(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(f);if(null===t||e(t))return!0;var o=function(e){var t=e&&(r&&e[r]||e[n]);if("function"==typeof t)return t}(t);if(!o)return!1;var a,i=o.call(t);if(o!==t.entries){for(;!(a=i.next()).done;)if(!f(a.value))return!1}else for(;!(a=i.next()).done;){var s=a.value;if(s&&!f(s[1]))return!1}return!0;default:return!1}}function p(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function m(e){if(null==e)return""+e;var t=p(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function d(e){var t=m(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return s.prototype=Error.prototype,a.checkPropTypes=F,a.resetWarningCache=F.resetWarningCache,a.PropTypes=a,a};function D(){}function L(){}L.resetWarningCache=D;var W=t((function(e){if("production"!==process.env.NODE_ENV){var t=N;e.exports=q(t.isElement,!0)}else e.exports=function(){function e(e,t,r,n,o,a){if(a!==P){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:L,resetWarningCache:D};return r.PropTypes=r,r}()}));const U=({variant:t="primary",size:r="md",onClick:n,children:o,icon:a,iconPosition:i="start",className:s="",style:c="default",processing:l=!1})=>{let u=`btn ${s}`;"default"!==t&&(u+=` btn-${t}`),"md"!==r&&(u+=` btn-${r}`),"default"!==c&&(u+=` btn-${c}`),l&&(u+=" btn-processing");const f=l?e.createElement(e.Fragment,null,e.createElement("i",{className:"fa-solid fa-spinner-third fa-spin","aria-hidden":"true"}),o&&e.createElement("span",null,o,"…")):a?"end"===i?e.createElement(e.Fragment,null,o&&e.createElement("span",null,o),e.createElement("i",{className:`fa-solid ${a}`,"aria-hidden":"true"})):e.createElement(e.Fragment,null,e.createElement("i",{className:`fa-solid ${a}`,"aria-hidden":"true"}),o&&e.createElement("span",null,o)):o&&e.createElement("span",null,o);return e.createElement("button",{className:u,onClick:n},f)};U.propTypes={variant:W.oneOf(["primary","secondary","terciary","outline"]),size:W.oneOf(["xs","md","lg"]),onClick:W.func,children:W.node,icon:W.string,iconPosition:W.oneOf(["start","end"]),className:W.string,style:W.oneOf(["default","success","danger","warning","link"]),processing:W.bool};const Y=()=>({toCamelCase:e.useCallback((e=>{let t=e?.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g,(function(e,t){return 0==+e?"":0===t?e?.toLowerCase():e?.toUpperCase()}));return t=t?.replace(/^\d+/,""),t=t?.replace(/[^a-zA-Z0-9_]/g,""),t}),[])}),B=({children:t,className:r="",id:n,name:o,status:a=!1,setStatus:i})=>{const{toCamelCase:s}=Y();let c=n;n||"string"!=typeof t||(c=s(t));return e.createElement("div",{className:`form-group form-check ${r}`},e.createElement("label",{className:"checkbox"},e.createElement("input",{type:"checkbox",checked:a,onChange:e=>{i(e.target.checked)},minLength:"1",id:c,name:o}),e.createElement("span",{className:"outer"},e.createElement("span",{className:"inner"})),t))};B.propTypes={className:W.string,id:W.string,name:W.string,status:W.bool,setStatus:W.func};const J=({className:t="",disabled:r,helpText:n,icon:o,label:a="Label",name:i,onChange:s,prefix:c,requiredText:l,showError:u,setShowError:f,size:p="md",suffix:m,type:d="text",value:y})=>{const{toCamelCase:b}=Y(),g=b(a);return e.useEffect((()=>{u&&setTimeout((()=>{f(!1)}),3e3)}),[u]),e.createElement("div",{className:`position-relative ${t}`},c||m||o?e.createElement("div",{className:"input-group "+(u?"not-validated":""),"data-error":l},o&&e.createElement("span",{className:"input-group-text"},e.createElement("i",{className:`fa-solid ${o}`})),c&&e.createElement("span",{className:"input-group-text"},c),e.createElement("div",{className:"form-floating"},e.createElement("input",{type:d,className:"form-control "+("md"!==p?`form-control-${p}`:""),value:y,id:g,name:i,placeholder:a,onChange:s,required:!!l}),e.createElement("label",{htmlFor:g},a)),m&&e.createElement("span",{className:"input-group-text"},m)):e.createElement("div",{className:"form-floating "+(u?"not-validated":""),"data-error":l},e.createElement("input",{type:d,className:"form-control "+("md"!==p?`form-control-${p}`:""),value:y,id:g,placeholder:a,onChange:s,required:!!l,name:i,disabled:r}),e.createElement("label",{htmlFor:g},a)),n&&e.createElement("small",{className:"form-text text-muted"},n))};J.propTypes={className:W.string,disabled:W.bool,helpText:W.string,icon:W.string,label:W.string,name:W.string,onChange:W.func,prefix:W.string,requiredText:W.string,size:W.oneOf(["xs","md","lg"]),showError:W.bool,setShowError:W.func,suffix:W.string,type:W.oneOf(["color","date","datetime-local","email","file","image","month","number","password","tel","text","time","url","week"]),value:W.oneOfType([W.string,W.number])};const Z=({children:t,className:r="",id:n,name:o,setStatus:a,status:i=!1})=>{const{toCamelCase:s}=Y();let c=n;n||"string"!=typeof t||(c=s(t));return e.createElement("div",{className:`form-group form-check ${r}`},e.createElement("label",{className:"radio"},e.createElement("input",{type:"radio",checked:i,onChange:e=>{a(e.target.checked)},minLength:"1",id:c,name:o}),e.createElement("span",{className:"outer"},e.createElement("span",{className:"inner"})),t))};Z.propTypes={className:W.string,id:W.string,name:W.string,setStatus:W.func,status:W.bool};const H=({children:t,className:r="",icon:n=!1,id:o,name:a,size:i,setStatus:s,status:c=!1,switchPosition:l="start"})=>{const{toCamelCase:u}=Y(),f="lg"===i?"form-switch-lg":"xs"===i?"form-switch-xs":"",p=o||u(t);return e.createElement("div",{className:`form-check form-switch ${f} ${r} ${"end"===l?"switch-end":""} ${n?"switch-icon":""}`},e.createElement("input",{className:"form-check-input",type:"checkbox",role:"switch",onChange:e=>{s(e.target.checked)},id:p,name:a,checked:c}),t&&e.createElement("label",{className:"form-check-label",htmlFor:p},t))};H.propTypes={className:W.string,icon:W.bool,id:W.string,name:W.string,setStatus:W.func,status:W.bool,switchPosition:W.oneOf(["start","end"])};const G=({className:t="",helpText:r,label:n="Label",name:o,onChange:a,requiredText:i,showError:s,setShowError:c,size:l="md",value:u})=>{const{toCamelCase:f}=Y(),p="lg"===l?"form-control-lg":"xs"===l?"form-control-xs":"",m=f(n);return e.useEffect((()=>{s&&setTimeout((()=>{c(!1)}),3e3)}),[s]),e.createElement("div",{className:`position-relative ${t}`},e.createElement("div",{className:"form-floating "+(s?"not-validated":""),"data-error":i},e.createElement("textarea",{className:`form-control ${p}`,onChange:a,placeholder:n,id:m,name:o,required:!!i,value:u}),e.createElement("label",{htmlFor:m},n),r&&e.createElement("small",{className:"form-text text-muted"},r)))};G.propTypes={className:W.string,helpText:W.string,label:W.string,name:W.string,onChange:W.func,requiredText:W.string,showError:W.bool,setShowError:W.func,size:W.oneOf(["xs","md","lg"]),value:W.string},exports.Button=U,exports.Checkbox=B,exports.Input=J,exports.Radio=Z,exports.Switch=H,exports.Textarea=G;
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ import useTextFormatter from '../../hooks/textFormatter';
|
|
|
6
6
|
|
|
7
7
|
// Input
|
|
8
8
|
const Input = ({
|
|
9
|
-
className,
|
|
9
|
+
className = '',
|
|
10
10
|
disabled,
|
|
11
11
|
helpText,
|
|
12
12
|
icon,
|
|
@@ -24,8 +24,6 @@ const Input = ({
|
|
|
24
24
|
}) => {
|
|
25
25
|
const { toCamelCase } = useTextFormatter();
|
|
26
26
|
|
|
27
|
-
const sizeClass =
|
|
28
|
-
size === 'lg' ? 'form-control-lg' : size === 'xs' ? 'form-control-xs' : '';
|
|
29
27
|
const id = toCamelCase(label);
|
|
30
28
|
|
|
31
29
|
useEffect(() => {
|
|
@@ -52,7 +50,7 @@ const Input = ({
|
|
|
52
50
|
<div className='form-floating'>
|
|
53
51
|
<input
|
|
54
52
|
type={type}
|
|
55
|
-
className={`form-control ${
|
|
53
|
+
className={`form-control ${size !== 'md' ? `form-control-${size}` : ''}`}
|
|
56
54
|
value={value}
|
|
57
55
|
id={id}
|
|
58
56
|
name={name}
|
|
@@ -71,7 +69,7 @@ const Input = ({
|
|
|
71
69
|
>
|
|
72
70
|
<input
|
|
73
71
|
type={type}
|
|
74
|
-
className={`form-control ${
|
|
72
|
+
className={`form-control ${size !== 'md' ? `form-control-${size}` : ''}`}
|
|
75
73
|
value={value}
|
|
76
74
|
id={id}
|
|
77
75
|
placeholder={label}
|
|
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import useTextFormatter from '../../hooks/textFormatter';
|
|
6
6
|
|
|
7
7
|
const Textarea = ({
|
|
8
|
-
className,
|
|
8
|
+
className = '',
|
|
9
9
|
helpText,
|
|
10
10
|
label = 'Label',
|
|
11
11
|
name,
|
|
@@ -13,7 +13,8 @@ const Textarea = ({
|
|
|
13
13
|
requiredText,
|
|
14
14
|
showError,
|
|
15
15
|
setShowError,
|
|
16
|
-
size = 'md'
|
|
16
|
+
size = 'md',
|
|
17
|
+
value
|
|
17
18
|
}) => {
|
|
18
19
|
const { toCamelCase } = useTextFormatter();
|
|
19
20
|
|
|
@@ -42,6 +43,7 @@ const Textarea = ({
|
|
|
42
43
|
id={id}
|
|
43
44
|
name={name}
|
|
44
45
|
required={!!requiredText}
|
|
46
|
+
value={value}
|
|
45
47
|
/>
|
|
46
48
|
<label htmlFor={id}>{label}</label>
|
|
47
49
|
{helpText && <small className='form-text text-muted'>{helpText}</small>}
|
|
@@ -58,7 +60,9 @@ Textarea.propTypes = {
|
|
|
58
60
|
onChange: PropTypes.func,
|
|
59
61
|
requiredText: PropTypes.string,
|
|
60
62
|
showError: PropTypes.bool,
|
|
63
|
+
setShowError: PropTypes.func,
|
|
61
64
|
size: PropTypes.oneOf(['xs', 'md', 'lg']),
|
|
65
|
+
value: PropTypes.string
|
|
62
66
|
};
|
|
63
67
|
|
|
64
68
|
export default Textarea;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
const LoginSource = ({
|
|
5
|
+
logo = 'groovinads'
|
|
6
|
+
}) => {
|
|
7
|
+
return (
|
|
8
|
+
<div
|
|
9
|
+
className={`login-source ${logo || ''}`}
|
|
10
|
+
aria-label={`${logo} logo`}
|
|
11
|
+
></div>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
LoginSource.propTypes = {
|
|
16
|
+
logo: PropTypes.oneOf(['groovinads', 'google', 'microsoft', 'linkedin']),
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default LoginSource;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
const PillComponent = ({
|
|
5
|
+
children,
|
|
6
|
+
className = '',
|
|
7
|
+
color = 'neutral',
|
|
8
|
+
closeButton = false,
|
|
9
|
+
onClick,
|
|
10
|
+
}) => {
|
|
11
|
+
return (
|
|
12
|
+
<div className={`pill ${color} ${className}`}>
|
|
13
|
+
<span>{children}</span>
|
|
14
|
+
{closeButton && (
|
|
15
|
+
<button onClick={onClick}>
|
|
16
|
+
<i className='fa-solid fa-xmark'></i>
|
|
17
|
+
</button>
|
|
18
|
+
)}
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
PillComponent.propTypes = {
|
|
24
|
+
color: PropTypes.oneOf([
|
|
25
|
+
'green',
|
|
26
|
+
'yellow',
|
|
27
|
+
'red',
|
|
28
|
+
'danger',
|
|
29
|
+
'neutral',
|
|
30
|
+
'blue',
|
|
31
|
+
'light',
|
|
32
|
+
'midtone',
|
|
33
|
+
'dark',
|
|
34
|
+
]),
|
|
35
|
+
closeButton: PropTypes.bool,
|
|
36
|
+
onClick: PropTypes.func,
|
|
37
|
+
className: PropTypes.string,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default PillComponent;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
const StatusIcon = ({
|
|
5
|
+
animated = false,
|
|
6
|
+
className = '',
|
|
7
|
+
status = 0
|
|
8
|
+
}) => {
|
|
9
|
+
|
|
10
|
+
const getStatusClass = (status) => {
|
|
11
|
+
switch (status) {
|
|
12
|
+
case 1:
|
|
13
|
+
return 'active';
|
|
14
|
+
case 3:
|
|
15
|
+
return 'active-warning';
|
|
16
|
+
default:
|
|
17
|
+
return '';
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<svg
|
|
23
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
24
|
+
viewBox={status === 3 ? '0 0 24 16' : '0 0 16 16'}
|
|
25
|
+
className={`status-icon ${getStatusClass(status)} ${className} ${animated ? 'animated' : ''}`}
|
|
26
|
+
>
|
|
27
|
+
<circle cx={status === 3 ? '12' : '8'} cy='8' r='8' />
|
|
28
|
+
|
|
29
|
+
{(() => {
|
|
30
|
+
switch (status) {
|
|
31
|
+
case 1:
|
|
32
|
+
return (
|
|
33
|
+
<>
|
|
34
|
+
<polyline
|
|
35
|
+
className='line-back'
|
|
36
|
+
points='0 7.99 4.99 7.99 6.29 12 9.82 4 10.99 8 16 8'
|
|
37
|
+
/>
|
|
38
|
+
<polyline
|
|
39
|
+
className='line-front'
|
|
40
|
+
points='0 7.99 4.99 7.99 6.29 12 9.82 4 10.99 8 16 8'
|
|
41
|
+
/>
|
|
42
|
+
</>
|
|
43
|
+
);
|
|
44
|
+
case 3:
|
|
45
|
+
return (
|
|
46
|
+
<>
|
|
47
|
+
<path d='M3.5304 1.14718C4.00269 1.4241 4.13257 1.9886 3.83739 2.37202C2.69207 4.0229 2.01906 5.94004 2.01906 7.96369C2.01906 9.98735 2.69207 11.979 3.83739 13.5873C4.14438 14.0133 4.00269 14.5778 3.5304 14.8548C3.0581 15.1317 2.43231 15.0039 2.13713 14.5459C0.779285 12.682 0 10.424 0 7.96369C0 5.50336 0.779285 3.31995 2.12532 1.41345C2.43231 0.998071 3.0581 0.870262 3.5304 1.14718Z' />
|
|
48
|
+
<path d='M20.4682 1.14658C20.9391 0.869859 21.5631 0.997576 21.8692 1.4233C23.223 3.31777 24 5.5741 24 7.96879C24 10.3635 23.223 12.6837 21.8692 14.5462C21.5631 15.0039 20.9391 15.1316 20.4682 14.8549C19.9973 14.5781 19.8678 14.0141 20.1621 13.5883C21.3158 11.9812 21.9751 10.0655 21.9751 7.96879C21.9751 5.87211 21.3158 4.03085 20.1621 2.38118C19.856 1.98738 19.9973 1.4233 20.4682 1.15722V1.14658Z' />
|
|
49
|
+
<path d='M12 12C12.5523 12 13 11.5523 13 11C13 10.4477 12.5523 10 12 10C11.4477 10 11 10.4477 11 11C11 11.5523 11.4477 12 12 12Z' />
|
|
50
|
+
<path d='M12 3C12.5465 3 13 3.3986 13 3.9021V8.0979C13 8.59091 12.5581 9 12 9C11.4419 9 11 8.6014 11 8.0979V3.9021C11 3.40909 11.4419 3 12 3Z' />
|
|
51
|
+
</>
|
|
52
|
+
);
|
|
53
|
+
default:
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
})()}
|
|
57
|
+
</svg>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
StatusIcon.propTypes = {
|
|
62
|
+
className: PropTypes.string,
|
|
63
|
+
status: PropTypes.number.isRequired,
|
|
64
|
+
animated: PropTypes.bool,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default StatusIcon;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import LoginSource from '../components/Labels/LoginSource';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Labels/LoginSource',
|
|
6
|
+
component: LoginSource,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args) => <LoginSource {...args}/>;
|
|
10
|
+
|
|
11
|
+
export const Default = Template.bind({});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PillComponent from '../components/Labels/PillComponent';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Labels/PillComponent',
|
|
6
|
+
component: PillComponent,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args) => <PillComponent {...args}>Pill component</PillComponent>;
|
|
10
|
+
|
|
11
|
+
export const Default = Template.bind({});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import StatusIcon from '../components/Labels/StatusIcon';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Labels/StatusIcon',
|
|
6
|
+
component: StatusIcon,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args) => <StatusIcon {...args} />;
|
|
10
|
+
|
|
11
|
+
export const Default = Template.bind({});
|
package/README (test).md
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
<img src="assets/groovinads-logo.png" alt="Groovinads logo" width="200">
|
|
2
|
-
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Groovinads UI
|
|
6
|
-
Groovinads UI is a React component library that provides ready-to-use UI elements based on the Groovinads UI kit. This library is designed to facilitate the implementation of common UI elements in Groovinads applications.
|
|
7
|
-
|
|
8
|
-
## Included Components (v 1.0.9)
|
|
9
|
-
|
|
10
|
-
The library includes the following components:
|
|
11
|
-
|
|
12
|
-
- **Buttons**: For user actions.
|
|
13
|
-
- **Checkbox**: For multiple option selections.
|
|
14
|
-
- **Input**: For user data entry.
|
|
15
|
-
- **Radio**: For exclusive selections.
|
|
16
|
-
- **Switch**: For toggle states.
|
|
17
|
-
- **Textarea**: For multiline text input.
|
|
18
|
-
|
|
19
|
-
## Requirements
|
|
20
|
-
- The component styles must be included from: `https://ui.groovinads.com/styles.min.css`.
|
|
21
|
-
- **npm** (v18 or higher).
|
|
22
|
-
- [Font Awesome](https://fontawesome.com/) icons must be included in the project.
|
|
23
|
-
|
|
24
|
-
## Installation
|
|
25
|
-
|
|
26
|
-
To use the Groovinads UI library in your project, run the following command:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
yarn add groovinads-ui
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Usage
|
|
33
|
-
Here are examples of how to use the components included in the Groovinads UI library:
|
|
34
|
-
|
|
35
|
-
### Button
|
|
36
|
-
```jsx
|
|
37
|
-
<Button
|
|
38
|
-
variant={'primary | secondary | tertiary | outline'}
|
|
39
|
-
size={'xs | md | lg'}
|
|
40
|
-
onClick={function}
|
|
41
|
-
icon?={FontAwesome Icon string}
|
|
42
|
-
iconPosition={'start | end'}
|
|
43
|
-
className={string}
|
|
44
|
-
processing={boolean}
|
|
45
|
-
>
|
|
46
|
-
children
|
|
47
|
-
</Button>
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
| Prop name | Description | Options | Default values | Type |
|
|
51
|
-
|--------------|--------------|--------------|--------------|--------------|
|
|
52
|
-
| ```variant``` | Fila 1, Col 2 | ``` primary ``` ``` secondary ``` ``` terciary ``` ``` outline ```| ``` primary ```| String |
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### Checkbox
|
|
57
|
-
```jsx
|
|
58
|
-
<Checkbox
|
|
59
|
-
className={string}
|
|
60
|
-
id={string}
|
|
61
|
-
name={id}
|
|
62
|
-
status={boolean}
|
|
63
|
-
setStatus={function}
|
|
64
|
-
>
|
|
65
|
-
children
|
|
66
|
-
</Checkbox>
|
|
67
|
-
```
|
|
68
|
-
### Input
|
|
69
|
-
```jsx
|
|
70
|
-
<Input
|
|
71
|
-
className={string}
|
|
72
|
-
disabled={boolean}
|
|
73
|
-
helpText={string}
|
|
74
|
-
icon={string}
|
|
75
|
-
label={string}
|
|
76
|
-
name={string}
|
|
77
|
-
onChange={function}
|
|
78
|
-
prefix={string}
|
|
79
|
-
requiredText={string}
|
|
80
|
-
showError={boolean}
|
|
81
|
-
setShowError={function}
|
|
82
|
-
size={'xs | md | xl'}
|
|
83
|
-
suffix={string}
|
|
84
|
-
type={'color | date | datetime-local | email | file | image | month | number | password | tel | text | time | url | week'}
|
|
85
|
-
value={string | number}
|
|
86
|
-
/>
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Radio
|
|
90
|
-
```jsx
|
|
91
|
-
<Radio
|
|
92
|
-
className={string}
|
|
93
|
-
id={string}
|
|
94
|
-
name={string}
|
|
95
|
-
setStatus={function}
|
|
96
|
-
status={boolean}
|
|
97
|
-
>
|
|
98
|
-
children
|
|
99
|
-
</Radio>
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Switch
|
|
103
|
-
```jsx
|
|
104
|
-
<Switch
|
|
105
|
-
className={string}
|
|
106
|
-
icon={boolean}
|
|
107
|
-
id={string}
|
|
108
|
-
name={string}
|
|
109
|
-
size={'xs | md | xl'}
|
|
110
|
-
setStatus={function}
|
|
111
|
-
status={boolean}
|
|
112
|
-
switchPosition={'start | end'}
|
|
113
|
-
>
|
|
114
|
-
children
|
|
115
|
-
</Switch>
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Textarea
|
|
119
|
-
```jsx
|
|
120
|
-
<Textarea
|
|
121
|
-
className={string}
|
|
122
|
-
helpText={string}
|
|
123
|
-
label={string}
|
|
124
|
-
name={string}
|
|
125
|
-
onChange={function}
|
|
126
|
-
requiredText={string}
|
|
127
|
-
showError={boolean}
|
|
128
|
-
setShowError={function}
|
|
129
|
-
size={'xs | md | xl'}
|
|
130
|
-
/>
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## Customization
|
|
134
|
-
Currently, the components are not customizable.
|
|
135
|
-
|
|
136
|
-
## Contributions
|
|
137
|
-
This library is for internal use by Groovinads and is not open to external contributions.
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
For more information or support, contact the [Groovinads development team](mailto:helpdesk@groovinads.com).
|
|
Binary file
|