groovinads-ui 1.1.2 → 1.1.3
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 +23 -21
- package/dist/index.es.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/index.js +8 -1
package/README.md
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<a href="https://www.groovinads.com/">
|
|
3
|
-
<img src="https://ui.groovinads.com/assets/groovinads-logo.png" alt="Groovinads logo" width="
|
|
3
|
+
<img src="https://ui.groovinads.com/assets/groovinads-logo.png" alt="Groovinads logo" width="250">
|
|
4
4
|
</a>
|
|
5
5
|
</p>
|
|
6
|
+
<p align="center">
|
|
7
|
+
<strong>Groovinads UI</strong> is a React component library that provides <strong>ready-to-use UI elements</strong> based on the Groovinads UI kit. This library is designed to facilitate the implementation of common UI elements in Groovinads applications.
|
|
8
|
+
</p>
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
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.
|
|
10
|
+
---
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
# Included components
|
|
11
13
|
|
|
12
14
|
The library includes the following components:
|
|
13
15
|
|
|
@@ -21,12 +23,12 @@ The library includes the following components:
|
|
|
21
23
|
- **Switch**: For toggle states.
|
|
22
24
|
- **Textarea**: For multiline text input.
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
# Requirements
|
|
25
27
|
- The component styles must be included from: `https://ui.groovinads.com/styles.min.css`.
|
|
26
28
|
- **npm** (v18 or higher).
|
|
27
29
|
- [Font Awesome](https://fontawesome.com/) icons must be included in the project.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
## ⚠️ Important: Use of additional CSS libraries
|
|
30
32
|
When utilizing external libraries that require additional CSS styles, it is important to ensure that these styles are not added directly to individual components.
|
|
31
33
|
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.
|
|
32
34
|
|
|
@@ -40,7 +42,7 @@ Instead, they should be included in the `index.html` file of your project. This
|
|
|
40
42
|
</head>
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
# Installation
|
|
44
46
|
|
|
45
47
|
To use the Groovinads UI library in your project, run the following command:
|
|
46
48
|
|
|
@@ -48,10 +50,10 @@ To use the Groovinads UI library in your project, run the following command:
|
|
|
48
50
|
yarn add groovinads-ui
|
|
49
51
|
```
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
# Usage
|
|
52
54
|
Here are examples of how to use the components included in the Groovinads UI library:
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
## Button
|
|
55
57
|
```jsx
|
|
56
58
|
import { Button } from 'groovinads-ui';
|
|
57
59
|
|
|
@@ -76,9 +78,9 @@ import { Button } from 'groovinads-ui';
|
|
|
76
78
|
| ```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. |
|
|
77
79
|
| ```processing``` | Boolean | ```true``` ```false``` | ```false``` | If true, displays a spinner animation and appends '...' to the button label to indicate processing status. It's optional. |
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
## Inputs
|
|
80
82
|
|
|
81
|
-
|
|
83
|
+
### Checkbox
|
|
82
84
|
```jsx
|
|
83
85
|
import { Checkbox } from 'groovinads-ui';
|
|
84
86
|
|
|
@@ -100,7 +102,7 @@ import { Checkbox } from 'groovinads-ui';
|
|
|
100
102
|
| ```status``` | Boolean | ```true``` ```false``` | ```false``` | Indicates whether the checkbox is checked (```true```) or unchecked (```false```). Defaults to false. |
|
|
101
103
|
| ```setStatus``` | Function | n/a | n/a | Function to set the ```status``` of the checkbox. This is a handler function typically used for state management. |
|
|
102
104
|
|
|
103
|
-
|
|
105
|
+
### Input
|
|
104
106
|
```jsx
|
|
105
107
|
import { Input } from 'groovinads-ui';
|
|
106
108
|
|
|
@@ -132,7 +134,7 @@ import { Input } from 'groovinads-ui';
|
|
|
132
134
|
| ```type``` | String | n/a | n/a | Text or characters to display at the end of the input, e.g., 'USD' for currency. |
|
|
133
135
|
| ```value``` | String or Number| n/a | n/a | The value of the input. |
|
|
134
136
|
|
|
135
|
-
|
|
137
|
+
### Radio
|
|
136
138
|
```jsx
|
|
137
139
|
import { Radio } from 'groovinads-ui';
|
|
138
140
|
|
|
@@ -155,7 +157,7 @@ import { Radio } from 'groovinads-ui';
|
|
|
155
157
|
| ```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. |
|
|
156
158
|
| ```status``` | Boolean | ```true``` ```false``` | ```false``` | Indicates whether the radio button is checked (```true```) or unchecked (```false```). Defaults to ```false```. |
|
|
157
159
|
|
|
158
|
-
|
|
160
|
+
### Switch
|
|
159
161
|
```jsx
|
|
160
162
|
import { Switch } from 'groovinads-ui';
|
|
161
163
|
|
|
@@ -179,7 +181,7 @@ import { Switch } from 'groovinads-ui';
|
|
|
179
181
|
| ```status``` | Boolean | ```true``` ```false``` | ```false``` | Indicates whether the switch is on (```true```) or off (```false```). Defaults to ```false```. |
|
|
180
182
|
| ```switchPosition``` | String |```start``` ```end``` | ```start``` | Determines the position of the switch relative to the label. Defaults to ```start```. |
|
|
181
183
|
|
|
182
|
-
|
|
184
|
+
### Textarea
|
|
183
185
|
```jsx
|
|
184
186
|
import { Textarea } from 'groovinads-ui';
|
|
185
187
|
|
|
@@ -205,8 +207,8 @@ import { Textarea } from 'groovinads-ui';
|
|
|
205
207
|
| ```size``` | String | ```xs``` ```md``` ```lg``` | ```md``` | Sets the size of the textarea field. |
|
|
206
208
|
| ```value``` | String | n/a | n/a | The value of the textarea |
|
|
207
209
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
## Labels
|
|
211
|
+
### LoginSource
|
|
210
212
|
```jsx
|
|
211
213
|
import { LoginSource } from 'groovinads-ui';
|
|
212
214
|
|
|
@@ -217,7 +219,7 @@ import { LoginSource } from 'groovinads-ui';
|
|
|
217
219
|
|--------------|--------------|--------------|--------------|--------------|
|
|
218
220
|
| ```logo``` | String | ```groovinads``` ```google``` ```microsoft``` ```linkedin``` | ```groovinads``` | Specifies the logo to be displayed on the login source button. This indicates the login method used. |
|
|
219
221
|
|
|
220
|
-
|
|
222
|
+
### PillComponent
|
|
221
223
|
```jsx
|
|
222
224
|
import { PillComponent } from 'groovinads-ui';
|
|
223
225
|
|
|
@@ -233,7 +235,7 @@ import { PillComponent } from 'groovinads-ui';
|
|
|
233
235
|
| ```closeButton``` | Boolean | ```true``` ```false``` | ```false``` | If true, a close button is displayed on the pill, allowing it to be dismissed.|
|
|
234
236
|
| ```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```. |
|
|
235
237
|
|
|
236
|
-
|
|
238
|
+
### StatusIcon
|
|
237
239
|
```jsx
|
|
238
240
|
import { StatusIcon } from 'groovinads-ui';
|
|
239
241
|
|
|
@@ -247,10 +249,10 @@ import { StatusIcon } from 'groovinads-ui';
|
|
|
247
249
|
|
|
248
250
|
|
|
249
251
|
|
|
250
|
-
|
|
252
|
+
# Customization
|
|
251
253
|
Currently, the components are not customizable.
|
|
252
254
|
|
|
253
|
-
|
|
255
|
+
# Contributions
|
|
254
256
|
This library is for internal use by Groovinads and is not open to external contributions.
|
|
255
257
|
|
|
256
258
|
---
|
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,
|
|
9
|
+
*/}var o="function"==typeof Symbol&&Symbol.for,a=o?Symbol.for("react.element"):60103,s=o?Symbol.for("react.portal"):60106,i=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,w=o?Symbol.for("react.responder"):60118,C=o?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case p:case m:case i: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 s:return t}}}function N(e){return x(e)===m}var S={AsyncMode:p,ConcurrentMode:m,ContextConsumer:f,ContextProvider:u,Element:a,ForwardRef:d,Fragment:i,Lazy:v,Memo:g,Portal:s,Profiler:l,StrictMode:c,Suspense:y,isAsyncMode:function(e){return N(e)||x(e)===p},isConcurrentMode:N,isContextConsumer:function(e){return x(e)===f},isContextProvider:function(e){return x(e)===u},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},isForwardRef:function(e){return x(e)===d},isFragment:function(e){return x(e)===i},isLazy:function(e){return x(e)===v},isMemo:function(e){return x(e)===g},isPortal:function(e){return x(e)===s},isProfiler:function(e){return x(e)===l},isStrictMode:function(e){return x(e)===c},isSuspense:function(e){return x(e)===y},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===i||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===w||e.$$typeof===C||e.$$typeof===h)},typeOf:x},O=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,s=e?Symbol.for("react.profiler"):60114,i=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 s:case a:case p:return m;default:var b=m&&m.$$typeof;switch(b){case c:case f:case y:case d:case i:return b;default:return t}}case n:return t}}}var w=l,C=u,x=c,N=i,S=r,O=f,$=o,T=y,k=d,P=n,j=s,_=a,M=p,I=!1;function R(e){return E(e)===u}t.AsyncMode=w,t.ConcurrentMode=C,t.ContextConsumer=x,t.ContextProvider=N,t.Element=S,t.ForwardRef=O,t.Fragment=$,t.Lazy=T,t.Memo=k,t.Portal=P,t.Profiler=j,t.StrictMode=_,t.Suspense=M,t.isAsyncMode=function(e){return I||(I=!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)===i},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)===s},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===s||e===a||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===d||e.$$typeof===i||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((function(e){"production"===process.env.NODE_ENV?e.exports=S:e.exports=O})),T=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,P=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(),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};
|
|
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 s in r=Object(arguments[a]))k.call(r,s)&&(o[s]=r[s]);if(T){n=T(r);for(var i=0;i<n.length;i++)P.call(r,n[i])&&(o[n[i]]=r[n[i]])}}return o},_="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",M=Function.call.bind(Object.prototype.hasOwnProperty),I=function(){};if("production"!==process.env.NODE_ENV){var R=_,F={},A=M;I=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(A(e,a)){var s;try{if("function"!=typeof e[a]){var i=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 i.name="Invariant Violation",i}s=e[a](t,a,n,r,null,R)}catch(e){s=e}if(!s||s instanceof Error||I((n||"React class")+": type specification of "+r+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in F)){F[s.message]=!0;var c=o?o():"";I("Failed "+r+" type: "+s.message+(null!=c?c:""))}}}V.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(F={})};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 i("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new i("Invalid "+o+" `"+a+"` of type `"+p(s)+"` supplied to `"+n+"`, expected an array.");for(var c=0;c<s.length;c++){var l=e(s,c,n,o,a+"["+c+"]",_);if(l instanceof Error)return l}return null}))},element:c((function(t,r,n,o,a){var s=t[r];return e(s)?null:new i("Invalid "+o+" `"+a+"` of type `"+p(s)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:c((function(e,t,r,n,o){var a=e[t];return $.isValidElementType(a)?null:new i("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,s){if(!(t[r]instanceof e)){var c=e.name||o;return new i("Invalid "+a+" `"+s+"` 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 i("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 i("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var s=t[r],c=p(s);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected an object.");for(var l in s)if(M(s,l)){var u=e(s,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(s(c,e[l]))return null;var u=JSON.stringify(e,(function(e,t){return"symbol"===m(t)?String(t):t}));return new i("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 s=[],c=0;c<e.length;c++){var l=(0,e[c])(t,r,n,o,a,_);if(null==l)return null;l.data&&M(l.data,"expectedType")&&s.push(l.data.expectedType)}return new i("Invalid "+o+" `"+a+"` supplied to `"+n+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return c((function(t,r,n,o,a){var s=t[r],c=p(s);if("object"!==c)return new i("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(s,l,n,o,a+"."+l,_);if(d)return d}return null}))},exact:function(e){return c((function(t,r,n,o,a){var s=t[r],c=p(s);if("object"!==c)return new i("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(M(e,f)&&"function"!=typeof d)return u(n,o,a,f,m(d));if(!d)return new i("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(s,f,n,o,a+"."+f,_);if(y)return y}return null}))}};function s(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function i(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,s,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==s[c]?a?null===s[c]?new i("The "+u+" `"+f+"` is marked as required in `"+l+"`, but its value is `null`."):new i("The "+u+" `"+f+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(s,c,l,u,f)}var s=a.bind(null,!1);return s.isRequired=a.bind(null,!0),s}function l(e){return c((function(t,r,n,o,a,s){var c=t[r];return p(c)!==e?new i("Invalid "+o+" `"+a+"` of type `"+m(c)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function u(e,t,r,n,o){return new i((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,s=o.call(t);if(o!==t.entries){for(;!(a=s.next()).done;)if(!f(a.value))return!1}else for(;!(a=s.next()).done;){var i=a.value;if(i&&!f(i[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 i.prototype=Error.prototype,a.checkPropTypes=z,a.resetWarningCache=z.resetWarningCache,a.PropTypes=a,a};function W(){}function Z(){}Z.resetWarningCache=W;var B=n((function(e){if("production"!==process.env.NODE_ENV){var t=$;e.exports=L(t.isElement,!0)}else e.exports=function(){function e(e,t,r,n,o,a){if(a!==_){var s=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 s.name="Invariant Violation",s}}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:Z,resetWarningCache:W};return r.PropTypes=r,r}()}));const U=({variant:t="primary",size:r="md",onClick:n,children:o,icon:a,iconPosition:s="start",className:i="",style:c="default",processing:l=!1})=>{let u=`btn ${i}`;"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"===s?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:B.oneOf(["primary","secondary","terciary","outline"]),size:B.oneOf(["xs","md","lg"]),onClick:B.func,children:B.node,icon:B.string,iconPosition:B.oneOf(["start","end"]),className:B.string,style:B.oneOf(["default","success","danger","warning","link"]),processing:B.bool};const Y=()=>({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}),[])}),J=({children:t,className:r="",id:n,name:o,status:a=!1,setStatus:s})=>{const{toCamelCase:i}=Y();let c=n;n||"string"!=typeof t||(c=i(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=>{s(e.target.checked)},minLength:"1",id:c,name:o}),e.createElement("span",{className:"outer"},e.createElement("span",{className:"inner"})),t))};J.propTypes={className:B.string,id:B.string,name:B.string,status:B.bool,setStatus:B.func};const H=({className:t="",disabled:n,helpText:o,icon:a,label:s="Label",name:i,onChange:c,prefix:l,requiredText:u,showError:f,setShowError:p,size:m="md",suffix:d,type:y="text",value:b})=>{const{toCamelCase:g}=Y(),v=g(s);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:i,placeholder:s,onChange:c,required:!!u}),e.createElement("label",{htmlFor:v},s)),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:s,onChange:c,required:!!u,name:i,disabled:n}),e.createElement("label",{htmlFor:v},s)),o&&e.createElement("small",{className:"form-text text-muted"},o))};H.propTypes={className:B.string,disabled:B.bool,helpText:B.string,icon:B.string,label:B.string,name:B.string,onChange:B.func,prefix:B.string,requiredText:B.string,size:B.oneOf(["xs","md","lg"]),showError:B.bool,setShowError:B.func,suffix:B.string,type:B.oneOf(["color","date","datetime-local","email","file","image","month","number","password","tel","text","time","url","week"]),value:B.oneOfType([B.string,B.number])};const G=({children:t,className:r="",id:n,name:o,setStatus:a,status:s=!1})=>{const{toCamelCase:i}=Y();let c=n;n||"string"!=typeof t||(c=i(t));return e.createElement("div",{className:`form-group form-check ${r}`},e.createElement("label",{className:"radio"},e.createElement("input",{type:"radio",checked:s,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:B.string,id:B.string,name:B.string,setStatus:B.func,status:B.bool};const K=({children:t,className:r="",icon:n=!1,id:o,name:a,size:s,setStatus:i,status:c=!1,switchPosition:l="start"})=>{const{toCamelCase:u}=Y(),f="lg"===s?"form-switch-lg":"xs"===s?"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=>{i(e.target.checked)},id:p,name:a,checked:c}),t&&e.createElement("label",{className:"form-check-label",htmlFor:p},t))};K.propTypes={className:B.string,icon:B.bool,id:B.string,name:B.string,setStatus:B.func,status:B.bool,switchPosition:B.oneOf(["start","end"])};const Q=({className:t="",helpText:n,label:o="Label",name:a,onChange:s,requiredText:i,showError:c,setShowError:l,size:u="md",value:f})=>{const{toCamelCase:p}=Y(),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":i},e.createElement("textarea",{className:`form-control ${m}`,onChange:s,placeholder:o,id:d,name:a,required:!!i,value:f}),e.createElement("label",{htmlFor:d},o),n&&e.createElement("small",{className:"form-text text-muted"},n)))};Q.propTypes={className:B.string,helpText:B.string,label:B.string,name:B.string,onChange:B.func,requiredText:B.string,showError:B.bool,setShowError:B.func,size:B.oneOf(["xs","md","lg"]),value:B.string};const X=({logo:t="groovinads"})=>e.createElement("div",{className:`login-source ${t||""}`,"aria-label":`${t} logo`});X.propTypes={logo:B.oneOf(["groovinads","google","microsoft","linkedin"])};const ee=({children:t,className:r="",color:n="neutral",closeButton:o=!1,onClick:a})=>e.createElement("div",{className:`pill ${n} ${r}`},e.createElement("span",null,t),o&&e.createElement("button",{onClick:a},e.createElement("i",{className:"fa-solid fa-xmark"})));ee.propTypes={color:B.oneOf(["green","yellow","red","danger","neutral","blue","light","midtone","dark"]),closeButton:B.bool,onClick:B.func,className:B.string};const te=({animated:t=!1,className:r="",status:n=0})=>e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:3===n?"0 0 24 16":"0 0 16 16",className:`status-icon ${(e=>{switch(e){case 1:return"active";case 3:return"active-warning";default:return""}})(n)} ${r} ${t?"animated":""}`},e.createElement("circle",{cx:3===n?"12":"8",cy:"8",r:"8"}),(()=>{switch(n){case 1:return e.createElement(e.Fragment,null,e.createElement("polyline",{className:"line-back",points:"0 7.99 4.99 7.99 6.29 12 9.82 4 10.99 8 16 8"}),e.createElement("polyline",{className:"line-front",points:"0 7.99 4.99 7.99 6.29 12 9.82 4 10.99 8 16 8"}));case 3:return e.createElement(e.Fragment,null,e.createElement("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"}),e.createElement("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"}),e.createElement("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"}),e.createElement("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"}));default:return null}})());te.propTypes={className:B.string,status:B.number.isRequired,animated:B.bool};export{U as Button,J as Checkbox,H as Input,X as LoginSource,ee as PillComponent,G as Radio,te as StatusIcon,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,
|
|
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,s=r?Symbol.for("react.strict_mode"):60108,i=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 i:case s: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 C(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:i,StrictMode:s,Suspense:m,isAsyncMode:function(e){return C(e)||x(e)===u},isConcurrentMode:C,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)===i},isStrictMode:function(e){return x(e)===s},isSuspense:function(e){return x(e)===m},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===i||e===s||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},S=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,s=e?Symbol.for("react.profiler"):60114,i=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 s:case a:case p:return m;default:var b=m&&m.$$typeof;switch(b){case c:case f:case y:case d:case i:return b;default:return t}}case n:return t}}}var x=l,C=u,w=c,S=i,N=r,O=f,$=o,T=y,k=d,P=n,j=s,_=a,M=p,I=!1;function R(e){return E(e)===u}t.AsyncMode=x,t.ConcurrentMode=C,t.ContextConsumer=w,t.ContextProvider=S,t.Element=N,t.ForwardRef=O,t.Fragment=$,t.Lazy=T,t.Memo=k,t.Portal=P,t.Profiler=j,t.StrictMode=_,t.Suspense=M,t.isAsyncMode=function(e){return I||(I=!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)===i},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)===s},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===s||e===a||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===d||e.$$typeof===i||e.$$typeof===c||e.$$typeof===f||e.$$typeof===g||e.$$typeof===v||e.$$typeof===h||e.$$typeof===b)},t.typeOf=E}()}));S.AsyncMode,S.ConcurrentMode,S.ContextConsumer,S.ContextProvider,S.Element,S.ForwardRef,S.Fragment,S.Lazy,S.Memo,S.Portal,S.Profiler,S.StrictMode,S.Suspense,S.isAsyncMode,S.isConcurrentMode,S.isContextConsumer,S.isContextProvider,S.isElement,S.isForwardRef,S.isFragment,S.isLazy,S.isMemo,S.isPortal,S.isProfiler,S.isStrictMode,S.isSuspense,S.isValidElementType,S.typeOf;var N=t((function(e){"production"===process.env.NODE_ENV?e.exports=w:e.exports=S})),O=Object.getOwnPropertySymbols,$=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=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;
|
|
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 s in r=Object(arguments[a]))$.call(r,s)&&(o[s]=r[s]);if(O){n=O(r);for(var i=0;i<n.length;i++)T.call(r,n[i])&&(o[n[i]]=r[n[i]])}}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 M=P,I={},R=j;_=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function F(e,t,r,n,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(R(e,a)){var s;try{if("function"!=typeof e[a]){var i=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 i.name="Invariant Violation",i}s=e[a](t,a,n,r,null,M)}catch(e){s=e}if(!s||s 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 s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in I)){I[s.message]=!0;var c=o?o():"";_("Failed "+r+" type: "+s.message+(null!=c?c:""))}}}F.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(I={})};var A=F,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 i("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new i("Invalid "+o+" `"+a+"` of type `"+p(s)+"` supplied to `"+n+"`, expected an array.");for(var c=0;c<s.length;c++){var l=e(s,c,n,o,a+"["+c+"]",P);if(l instanceof Error)return l}return null}))},element:c((function(t,r,n,o,a){var s=t[r];return e(s)?null:new i("Invalid "+o+" `"+a+"` of type `"+p(s)+"` 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 i("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,s){if(!(t[r]instanceof e)){var c=e.name||o;return new i("Invalid "+a+" `"+s+"` 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 i("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 i("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var s=t[r],c=p(s);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected an object.");for(var l in s)if(j(s,l)){var u=e(s,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(s(c,e[l]))return null;var u=JSON.stringify(e,(function(e,t){return"symbol"===m(t)?String(t):t}));return new i("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 s=[],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")&&s.push(l.data.expectedType)}return new i("Invalid "+o+" `"+a+"` supplied to `"+n+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return c((function(t,r,n,o,a){var s=t[r],c=p(s);if("object"!==c)return new i("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(s,l,n,o,a+"."+l,P);if(d)return d}return null}))},exact:function(e){return c((function(t,r,n,o,a){var s=t[r],c=p(s);if("object"!==c)return new i("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 i("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(s,f,n,o,a+"."+f,P);if(y)return y}return null}))}};function s(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function i(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,s,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==s[c]?a?null===s[c]?new i("The "+u+" `"+f+"` is marked as required in `"+l+"`, but its value is `null`."):new i("The "+u+" `"+f+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(s,c,l,u,f)}var s=a.bind(null,!1);return s.isRequired=a.bind(null,!0),s}function l(e){return c((function(t,r,n,o,a,s){var c=t[r];return p(c)!==e?new i("Invalid "+o+" `"+a+"` of type `"+m(c)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function u(e,t,r,n,o){return new i((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,s=o.call(t);if(o!==t.entries){for(;!(a=s.next()).done;)if(!f(a.value))return!1}else for(;!(a=s.next()).done;){var i=a.value;if(i&&!f(i[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 i.prototype=Error.prototype,a.checkPropTypes=A,a.resetWarningCache=A.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 s=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 s.name="Invariant Violation",s}}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 B=({variant:t="primary",size:r="md",onClick:n,children:o,icon:a,iconPosition:s="start",className:i="",style:c="default",processing:l=!1})=>{let u=`btn ${i}`;"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"===s?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)};B.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 Z=()=>({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}),[])}),U=({children:t,className:r="",id:n,name:o,status:a=!1,setStatus:s})=>{const{toCamelCase:i}=Z();let c=n;n||"string"!=typeof t||(c=i(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=>{s(e.target.checked)},minLength:"1",id:c,name:o}),e.createElement("span",{className:"outer"},e.createElement("span",{className:"inner"})),t))};U.propTypes={className:W.string,id:W.string,name:W.string,status:W.bool,setStatus:W.func};const Y=({className:t="",disabled:r,helpText:n,icon:o,label:a="Label",name:s,onChange:i,prefix:c,requiredText:l,showError:u,setShowError:f,size:p="md",suffix:m,type:d="text",value:y})=>{const{toCamelCase:b}=Z(),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:s,placeholder:a,onChange:i,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:i,required:!!l,name:s,disabled:r}),e.createElement("label",{htmlFor:g},a)),n&&e.createElement("small",{className:"form-text text-muted"},n))};Y.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 J=({children:t,className:r="",id:n,name:o,setStatus:a,status:s=!1})=>{const{toCamelCase:i}=Z();let c=n;n||"string"!=typeof t||(c=i(t));return e.createElement("div",{className:`form-group form-check ${r}`},e.createElement("label",{className:"radio"},e.createElement("input",{type:"radio",checked:s,onChange:e=>{a(e.target.checked)},minLength:"1",id:c,name:o}),e.createElement("span",{className:"outer"},e.createElement("span",{className:"inner"})),t))};J.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:s,setStatus:i,status:c=!1,switchPosition:l="start"})=>{const{toCamelCase:u}=Z(),f="lg"===s?"form-switch-lg":"xs"===s?"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=>{i(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:s,showError:i,setShowError:c,size:l="md",value:u})=>{const{toCamelCase:f}=Z(),p="lg"===l?"form-control-lg":"xs"===l?"form-control-xs":"",m=f(n);return e.useEffect((()=>{i&&setTimeout((()=>{c(!1)}),3e3)}),[i]),e.createElement("div",{className:`position-relative ${t}`},e.createElement("div",{className:"form-floating "+(i?"not-validated":""),"data-error":s},e.createElement("textarea",{className:`form-control ${p}`,onChange:a,placeholder:n,id:m,name:o,required:!!s,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};const K=({logo:t="groovinads"})=>e.createElement("div",{className:`login-source ${t||""}`,"aria-label":`${t} logo`});K.propTypes={logo:W.oneOf(["groovinads","google","microsoft","linkedin"])};const Q=({children:t,className:r="",color:n="neutral",closeButton:o=!1,onClick:a})=>e.createElement("div",{className:`pill ${n} ${r}`},e.createElement("span",null,t),o&&e.createElement("button",{onClick:a},e.createElement("i",{className:"fa-solid fa-xmark"})));Q.propTypes={color:W.oneOf(["green","yellow","red","danger","neutral","blue","light","midtone","dark"]),closeButton:W.bool,onClick:W.func,className:W.string};const X=({animated:t=!1,className:r="",status:n=0})=>e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:3===n?"0 0 24 16":"0 0 16 16",className:`status-icon ${(e=>{switch(e){case 1:return"active";case 3:return"active-warning";default:return""}})(n)} ${r} ${t?"animated":""}`},e.createElement("circle",{cx:3===n?"12":"8",cy:"8",r:"8"}),(()=>{switch(n){case 1:return e.createElement(e.Fragment,null,e.createElement("polyline",{className:"line-back",points:"0 7.99 4.99 7.99 6.29 12 9.82 4 10.99 8 16 8"}),e.createElement("polyline",{className:"line-front",points:"0 7.99 4.99 7.99 6.29 12 9.82 4 10.99 8 16 8"}));case 3:return e.createElement(e.Fragment,null,e.createElement("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"}),e.createElement("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"}),e.createElement("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"}),e.createElement("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"}));default:return null}})());X.propTypes={className:W.string,status:W.number.isRequired,animated:W.bool},exports.Button=B,exports.Checkbox=U,exports.Input=Y,exports.LoginSource=K,exports.PillComponent=Q,exports.Radio=J,exports.StatusIcon=X,exports.Switch=H,exports.Textarea=G;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "groovinads-ui",
|
|
3
3
|
"description": "Groovinads UI is a React component library designed exclusively for Groovinads applications. It provides ready-to-use UI elements styled according to Groovinads design guidelines to facilitate rapid development.",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
7
7
|
"sass",
|
package/src/index.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
// Buttons
|
|
1
2
|
import Button from "./components/Button/Button";
|
|
2
3
|
|
|
4
|
+
// Inputs
|
|
3
5
|
import Checkbox from './components/Inputs/Checkbox';
|
|
4
6
|
import Input from './components/Inputs/Input';
|
|
5
7
|
import Radio from './components/Inputs/Radio';
|
|
6
8
|
import Switch from './components/Inputs/Switch';
|
|
7
9
|
import Textarea from './components/Inputs/Textarea';
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
// Labels
|
|
12
|
+
import LoginSource from './components/Labels/LoginSource';
|
|
13
|
+
import PillComponent from './components/Labels/PillComponent';
|
|
14
|
+
import StatusIcon from './components/Labels/StatusIcon';
|
|
15
|
+
|
|
16
|
+
export { Button, Checkbox, Input, Radio, Switch, Textarea, LoginSource, PillComponent, StatusIcon }
|