groundfloor-react-ui 1.2.1 → 1.2.2
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/components/Inputs/DropdownSelect.js +88 -102
- package/dist/index.es.js +1 -1
- package/dist/index.js +18 -18
- package/package.json +1 -1
|
@@ -173,7 +173,6 @@ const IconDiv = styled.div`
|
|
|
173
173
|
`;
|
|
174
174
|
|
|
175
175
|
export const DropdownSelect = ({
|
|
176
|
-
|
|
177
176
|
label,
|
|
178
177
|
labelStyle,
|
|
179
178
|
optionArr,
|
|
@@ -204,22 +203,17 @@ export const DropdownSelect = ({
|
|
|
204
203
|
leftIconSize,
|
|
205
204
|
...props
|
|
206
205
|
}) => {
|
|
207
|
-
|
|
208
|
-
const activeTheme = useTheme() || defaultThemeColor
|
|
206
|
+
const activeTheme = useTheme() || defaultThemeColor;
|
|
209
207
|
|
|
210
208
|
const DropdownIndicator = (p) => {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
</components.DropdownIndicator>
|
|
221
|
-
return showIndicator === true ? drpdwn : null;
|
|
222
|
-
|
|
209
|
+
const dropdown = (
|
|
210
|
+
<components.DropdownIndicator {...p}>
|
|
211
|
+
<IconDiv>
|
|
212
|
+
<Icon icon={iconName} color={iconColor} size={iconSize} />
|
|
213
|
+
</IconDiv>
|
|
214
|
+
</components.DropdownIndicator>
|
|
215
|
+
);
|
|
216
|
+
return showIndicator === true ? dropdown : null;
|
|
223
217
|
};
|
|
224
218
|
|
|
225
219
|
const ClearIndicator = (p) => {
|
|
@@ -235,21 +229,40 @@ export const DropdownSelect = ({
|
|
|
235
229
|
<Icon icon='cross-icon' color={'black'} size={8} />
|
|
236
230
|
</IconDiv>
|
|
237
231
|
) : null}
|
|
238
|
-
|
|
239
232
|
</components.ClearIndicator>
|
|
240
233
|
);
|
|
241
|
-
|
|
242
234
|
};
|
|
243
235
|
|
|
244
|
-
const LeftIcon = (props) => {
|
|
236
|
+
const LeftIcon = ({ getValue, children, ...props }) => {
|
|
237
|
+
const len = getValue().length;
|
|
238
|
+
|
|
245
239
|
return (
|
|
246
240
|
<components.ValueContainer {...props}>
|
|
247
|
-
{leftIcon === '' ? null :
|
|
248
|
-
<
|
|
249
|
-
|
|
250
|
-
|
|
241
|
+
{leftIcon === '' ? null : (
|
|
242
|
+
<IconDiv
|
|
243
|
+
style={{
|
|
244
|
+
paddingTop: '10px',
|
|
245
|
+
paddingRight: '8px',
|
|
246
|
+
marginLeft: '0',
|
|
247
|
+
marginTop: '-16px',
|
|
248
|
+
}}
|
|
249
|
+
>
|
|
250
|
+
<Icon icon={leftIcon} color={leftIconColor} size={leftIconSize} />
|
|
251
|
+
</IconDiv>
|
|
252
|
+
)}
|
|
253
|
+
|
|
254
|
+
{children}
|
|
255
|
+
{len > 1 && <div className={`text-more-alt`}>& {len - 1} more</div>}
|
|
256
|
+
</components.ValueContainer>
|
|
257
|
+
);
|
|
258
|
+
};
|
|
251
259
|
|
|
252
|
-
|
|
260
|
+
const ValueContainer = ({ getValue, children, ...props }) => {
|
|
261
|
+
const len = getValue().length;
|
|
262
|
+
return (
|
|
263
|
+
<components.ValueContainer {...props}>
|
|
264
|
+
{children}
|
|
265
|
+
{len > 1 && <div className={`text-more-alt`}>& {len - 1} more</div>}
|
|
253
266
|
</components.ValueContainer>
|
|
254
267
|
);
|
|
255
268
|
};
|
|
@@ -263,7 +276,7 @@ export const DropdownSelect = ({
|
|
|
263
276
|
fontSize: '8px',
|
|
264
277
|
lineHeight: '10px',
|
|
265
278
|
minWidth: '15px',
|
|
266
|
-
minHeight: '15px'
|
|
279
|
+
minHeight: '15px',
|
|
267
280
|
};
|
|
268
281
|
const checked = (
|
|
269
282
|
<div
|
|
@@ -302,16 +315,6 @@ export const DropdownSelect = ({
|
|
|
302
315
|
return !index && <div className='text-main-alt'>{firstSelected}</div>;
|
|
303
316
|
};
|
|
304
317
|
|
|
305
|
-
const ValueContainer = ({ getValue, children, ...props }) => {
|
|
306
|
-
const len = getValue().length;
|
|
307
|
-
return (
|
|
308
|
-
<components.ValueContainer {...props}>
|
|
309
|
-
{children}
|
|
310
|
-
{len > 1 && <div className={`text-more-alt`}>& {len - 1} more</div>}
|
|
311
|
-
</components.ValueContainer>
|
|
312
|
-
);
|
|
313
|
-
};
|
|
314
|
-
|
|
315
318
|
const stylesComp = {
|
|
316
319
|
control: (base, state) => ({
|
|
317
320
|
...base,
|
|
@@ -343,7 +346,6 @@ export const DropdownSelect = ({
|
|
|
343
346
|
justifyContent: 'center',
|
|
344
347
|
alignItems: 'center',
|
|
345
348
|
paddingLeft: '0px',
|
|
346
|
-
|
|
347
349
|
}),
|
|
348
350
|
valueContainer: (base) => ({
|
|
349
351
|
...base,
|
|
@@ -366,21 +368,17 @@ export const DropdownSelect = ({
|
|
|
366
368
|
borderRadius: '4.32px',
|
|
367
369
|
fontSize: fontSize + 'px',
|
|
368
370
|
width: '100%',
|
|
369
|
-
|
|
370
|
-
|
|
371
371
|
}),
|
|
372
372
|
singleValue: (base) => ({
|
|
373
373
|
...base,
|
|
374
374
|
fontSize: fontSize + 'px',
|
|
375
375
|
marginLeft: '0px',
|
|
376
|
-
width: 'auto'
|
|
377
|
-
|
|
376
|
+
width: 'auto',
|
|
378
377
|
}),
|
|
379
378
|
multiValue: (base) => ({
|
|
380
379
|
...base,
|
|
381
380
|
marginLeft: '0px',
|
|
382
|
-
width: 'auto'
|
|
383
|
-
|
|
381
|
+
width: 'auto',
|
|
384
382
|
}),
|
|
385
383
|
input: (base) => ({
|
|
386
384
|
...base,
|
|
@@ -389,19 +387,24 @@ export const DropdownSelect = ({
|
|
|
389
387
|
option: (provided, state) => ({
|
|
390
388
|
...provided,
|
|
391
389
|
backgroundColor:
|
|
392
|
-
state.isSelected || state.isFocused
|
|
390
|
+
state.isSelected || state.isFocused
|
|
391
|
+
? activeTheme.neutral['neutral-5']
|
|
392
|
+
: activeTheme.bgColor,
|
|
393
393
|
padding: '10px',
|
|
394
394
|
cursor: 'pointer',
|
|
395
395
|
color: '#081348',
|
|
396
396
|
width: 'inherit',
|
|
397
|
-
|
|
398
397
|
}),
|
|
399
398
|
|
|
400
|
-
|
|
401
399
|
...props.styles,
|
|
402
400
|
};
|
|
403
401
|
return (
|
|
404
|
-
<Wrapper
|
|
402
|
+
<Wrapper
|
|
403
|
+
style={customWrapperStyles}
|
|
404
|
+
isValid={isValid}
|
|
405
|
+
fontSize={fontSize}
|
|
406
|
+
theme={activeTheme}
|
|
407
|
+
>
|
|
405
408
|
{label && (
|
|
406
409
|
<LabelWrapper
|
|
407
410
|
inBuiltCss={defaultStyles}
|
|
@@ -432,8 +435,8 @@ export const DropdownSelect = ({
|
|
|
432
435
|
DropdownIndicator,
|
|
433
436
|
MultiValue,
|
|
434
437
|
Option,
|
|
435
|
-
|
|
436
|
-
ValueContainer,
|
|
438
|
+
ValueContainer: LeftIcon,
|
|
439
|
+
// ValueContainer,
|
|
437
440
|
IndicatorSeparator: () => null,
|
|
438
441
|
ClearIndicator,
|
|
439
442
|
}}
|
|
@@ -451,12 +454,8 @@ export const DropdownSelect = ({
|
|
|
451
454
|
closeMenuOnSelect={false}
|
|
452
455
|
isSearchable={true}
|
|
453
456
|
isLoading={isLoading}
|
|
454
|
-
|
|
455
457
|
id={id}
|
|
456
|
-
|
|
457
458
|
isClearable={isClearable}
|
|
458
|
-
|
|
459
|
-
|
|
460
459
|
{...props}
|
|
461
460
|
/>
|
|
462
461
|
) : dropdownType === 'asyncSingleSelect' ? (
|
|
@@ -467,8 +466,8 @@ export const DropdownSelect = ({
|
|
|
467
466
|
styles={stylesComp}
|
|
468
467
|
components={{
|
|
469
468
|
DropdownIndicator,
|
|
470
|
-
|
|
471
|
-
ValueContainer,
|
|
469
|
+
ValueContainer: LeftIcon,
|
|
470
|
+
// ValueContainer,
|
|
472
471
|
IndicatorSeparator: () => null,
|
|
473
472
|
ClearIndicator,
|
|
474
473
|
}}
|
|
@@ -479,12 +478,8 @@ export const DropdownSelect = ({
|
|
|
479
478
|
onChange={setSelectedValue}
|
|
480
479
|
isLoading={isLoading}
|
|
481
480
|
isDisabled={isDisabled}
|
|
482
|
-
|
|
483
481
|
id={id}
|
|
484
|
-
|
|
485
482
|
isClearable={isClearable}
|
|
486
|
-
|
|
487
|
-
|
|
488
483
|
{...props}
|
|
489
484
|
/>
|
|
490
485
|
) : dropdownType === 'asyncMultiSelect' ? (
|
|
@@ -492,8 +487,8 @@ export const DropdownSelect = ({
|
|
|
492
487
|
components={{
|
|
493
488
|
DropdownIndicator,
|
|
494
489
|
MultiValue,
|
|
495
|
-
|
|
496
|
-
ValueContainer,
|
|
490
|
+
ValueContainer: LeftIcon,
|
|
491
|
+
// ValueContainer,
|
|
497
492
|
Option,
|
|
498
493
|
IndicatorSeparator: () => null,
|
|
499
494
|
ClearIndicator,
|
|
@@ -513,20 +508,16 @@ export const DropdownSelect = ({
|
|
|
513
508
|
loadOptions={loadOptions}
|
|
514
509
|
defaultOptions
|
|
515
510
|
onInputChange={onInputChange}
|
|
516
|
-
|
|
517
511
|
id={id}
|
|
518
|
-
|
|
519
512
|
isClearable={isClearable}
|
|
520
|
-
|
|
521
|
-
|
|
522
513
|
{...props}
|
|
523
514
|
/>
|
|
524
515
|
) : (
|
|
525
516
|
<Select
|
|
526
517
|
components={{
|
|
527
518
|
DropdownIndicator,
|
|
528
|
-
|
|
529
|
-
ValueContainer,
|
|
519
|
+
ValueContainer: LeftIcon,
|
|
520
|
+
// ValueContainer,
|
|
530
521
|
IndicatorSeparator: () => null,
|
|
531
522
|
ClearIndicator,
|
|
532
523
|
}}
|
|
@@ -543,12 +534,8 @@ export const DropdownSelect = ({
|
|
|
543
534
|
styles={stylesComp}
|
|
544
535
|
onChange={setSelectedValue}
|
|
545
536
|
isLoading={isLoading}
|
|
546
|
-
|
|
547
537
|
id={id}
|
|
548
|
-
|
|
549
538
|
isClearable={isClearable}
|
|
550
|
-
|
|
551
|
-
|
|
552
539
|
{...props}
|
|
553
540
|
/>
|
|
554
541
|
)}
|
|
@@ -606,67 +593,66 @@ DropdownSelect.propTypes = {
|
|
|
606
593
|
*/
|
|
607
594
|
customWrapperStyles: PropTypes.object,
|
|
608
595
|
/**
|
|
609
|
-
|
|
610
|
-
|
|
596
|
+
* label styles
|
|
597
|
+
*/
|
|
611
598
|
customLabelStyles: PropTypes.object,
|
|
612
599
|
/**
|
|
613
|
-
* Mandatory or not
|
|
614
|
-
*/
|
|
600
|
+
* Mandatory or not
|
|
601
|
+
*/
|
|
615
602
|
isRequired: PropTypes.bool,
|
|
616
603
|
/**
|
|
617
|
-
* default dropdown type
|
|
618
|
-
*/
|
|
604
|
+
* default dropdown type
|
|
605
|
+
*/
|
|
619
606
|
dropdownType: PropTypes.string,
|
|
620
607
|
/**
|
|
621
|
-
* disabled or not
|
|
622
|
-
*/
|
|
608
|
+
* disabled or not
|
|
609
|
+
*/
|
|
623
610
|
isDisabled: PropTypes.bool,
|
|
624
611
|
/**
|
|
625
|
-
* show loader or not
|
|
626
|
-
*/
|
|
612
|
+
* show loader or not
|
|
613
|
+
*/
|
|
627
614
|
isLoading: PropTypes.bool,
|
|
628
615
|
/**
|
|
629
|
-
* valid or not
|
|
630
|
-
*/
|
|
616
|
+
* valid or not
|
|
617
|
+
*/
|
|
631
618
|
isValid: PropTypes.bool,
|
|
632
619
|
/**
|
|
633
|
-
|
|
634
|
-
|
|
620
|
+
* height of the component
|
|
621
|
+
*/
|
|
635
622
|
height: PropTypes.number,
|
|
636
623
|
/**
|
|
637
|
-
* clearable or not
|
|
638
|
-
*/
|
|
624
|
+
* clearable or not
|
|
625
|
+
*/
|
|
639
626
|
isClearable: PropTypes.bool,
|
|
640
627
|
/**
|
|
641
|
-
* id of the select
|
|
642
|
-
*/
|
|
628
|
+
* id of the select
|
|
629
|
+
*/
|
|
643
630
|
id: PropTypes.string,
|
|
644
631
|
/**
|
|
645
|
-
* iconName of the select
|
|
646
|
-
*/
|
|
632
|
+
* iconName of the select
|
|
633
|
+
*/
|
|
647
634
|
iconName: PropTypes.string,
|
|
648
635
|
/**
|
|
649
|
-
* iconColor of the select
|
|
650
|
-
*/
|
|
636
|
+
* iconColor of the select
|
|
637
|
+
*/
|
|
651
638
|
iconColor: PropTypes.string,
|
|
652
639
|
/**
|
|
653
|
-
* iconSize of the select
|
|
654
|
-
*/
|
|
640
|
+
* iconSize of the select
|
|
641
|
+
*/
|
|
655
642
|
iconSize: PropTypes.number,
|
|
656
643
|
/**
|
|
657
|
-
* leftIcon of the select
|
|
658
|
-
*/
|
|
644
|
+
* leftIcon of the select
|
|
645
|
+
*/
|
|
659
646
|
leftIcon: PropTypes.string,
|
|
660
647
|
/**
|
|
661
|
-
* iconColor of the select
|
|
662
|
-
*/
|
|
648
|
+
* iconColor of the select
|
|
649
|
+
*/
|
|
663
650
|
leftIconColor: PropTypes.string,
|
|
664
651
|
/**
|
|
665
|
-
* iconSize of the select
|
|
666
|
-
*/
|
|
652
|
+
* iconSize of the select
|
|
653
|
+
*/
|
|
667
654
|
leftIconSize: PropTypes.number,
|
|
668
|
-
showIndicator: PropTypes.bool
|
|
669
|
-
|
|
655
|
+
showIndicator: PropTypes.bool,
|
|
670
656
|
};
|
|
671
657
|
|
|
672
658
|
DropdownSelect.defaultProps = {
|
|
@@ -696,5 +682,5 @@ DropdownSelect.defaultProps = {
|
|
|
696
682
|
leftIcon: 'magnifier-icon',
|
|
697
683
|
leftIconColor: 'black',
|
|
698
684
|
leftIconSize: 10,
|
|
699
|
-
showIndicator: true
|
|
685
|
+
showIndicator: true,
|
|
700
686
|
};
|
package/dist/index.es.js
CHANGED
|
@@ -1347,7 +1347,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1347
1347
|
margin-left: 6px;
|
|
1348
1348
|
margin-top: -14px;
|
|
1349
1349
|
cursor: pointer;
|
|
1350
|
-
`,Ht=({label:e,labelStyle:o,optionArr:r,selectedValue:l,setSelectedValue:i,placeHolder:n,isClearable:a,isValid:c,height:s,fontSize:d,loadOptions:m,onInputChange:u,clearSelected:g,customWrapperStyles:b,customLabelStyles:x,isRequired:A,dropdownType:v,isDisabled:C,isLoading:S,id:E,iconName:k,iconColor:z,iconSize:V,showIndicator:B,leftIcon:R,leftIconColor:I,leftIconSize:W,...P})=>{const L=p()||M,q=e=>{const o=t.createElement(h.DropdownIndicator,e,t.createElement(qt,null,t.createElement(X,{icon:k,color:z,size:V})));return!0===B?o:null},T=e=>t.createElement(h.ClearIndicator,e,a?t.createElement(qt,{onClick:()=>{g(),e.clearValue()}},t.createElement(X,{icon:"cross-icon",color:"black",size:8})):null),j=e=>{const o={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px",minWidth:"15px",minHeight:"15px"},r=t.createElement("div",{style:{...o,backgroundColor:e?.data?.color??L.primary["primary-1"]}},t.createElement(X,{icon:"check-icon",color:"white"})),l=t.createElement("div",{style:{...o,backgroundColor:"#e0e7ff"}});return t.createElement(h.Option,e,t.createElement("div",{style:{display:"flex",justifyContent:"start",alignItems:"center",width:"100%"}},e.isSelected?r:l,t.createElement("div",{className:"text-main-alt",style:{marginLeft:"10px"}},e.label)))},
|
|
1350
|
+
`,Ht=({label:e,labelStyle:o,optionArr:r,selectedValue:l,setSelectedValue:i,placeHolder:n,isClearable:a,isValid:c,height:s,fontSize:d,loadOptions:m,onInputChange:u,clearSelected:g,customWrapperStyles:b,customLabelStyles:x,isRequired:A,dropdownType:v,isDisabled:C,isLoading:S,id:E,iconName:k,iconColor:z,iconSize:V,showIndicator:B,leftIcon:R,leftIconColor:I,leftIconSize:W,...P})=>{const L=p()||M,q=e=>{const o=t.createElement(h.DropdownIndicator,e,t.createElement(qt,null,t.createElement(X,{icon:k,color:z,size:V})));return!0===B?o:null},T=e=>t.createElement(h.ClearIndicator,e,a?t.createElement(qt,{onClick:()=>{g(),e.clearValue()}},t.createElement(X,{icon:"cross-icon",color:"black",size:8})):null),j=({getValue:e,children:o,...r})=>{const l=e().length;return t.createElement(h.ValueContainer,r,""===R?null:t.createElement(qt,{style:{paddingTop:"10px",paddingRight:"8px",marginLeft:"0",marginTop:"-16px"}},t.createElement(X,{icon:R,color:I,size:W})),o,l>1&&t.createElement("div",{className:"text-more-alt"},"& ",l-1," more"))},F=e=>{const o={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px",minWidth:"15px",minHeight:"15px"},r=t.createElement("div",{style:{...o,backgroundColor:e?.data?.color??L.primary["primary-1"]}},t.createElement(X,{icon:"check-icon",color:"white"})),l=t.createElement("div",{style:{...o,backgroundColor:"#e0e7ff"}});return t.createElement(h.Option,e,t.createElement("div",{style:{display:"flex",justifyContent:"start",alignItems:"center",width:"100%"}},e.isSelected?r:l,t.createElement("div",{className:"text-main-alt",style:{marginLeft:"10px"}},e.label)))},G=({index:e,...o})=>{const r=o?.data?.label||"Select";return!e&&t.createElement("div",{className:"text-main-alt"},r)},O={control:(e,t)=>({...e,border:c?"1px solid "+L.border:"1px solid "+L.ui.error,minWidth:"215px",height:`${s}px`,minHeight:`${s}px`,boxShadow:(t.isSelected||t.isFocused)&&"none"}),placeholder:e=>({...e,fontSize:d+"px",marginLeft:"0px"}),dropdownIndicator:e=>({...e,height:`${s}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),clearIndicator:e=>({...e,height:`${s}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),valueContainer:e=>({...e,display:"flex",fontSize:d+"px"}),indicatorsContainer:e=>({...e,padding:0,height:`${s}px`}),menu:e=>({...e,border:"none",marginTop:"1px",borderTopRightRadius:"0px",borderTopLeftRadius:"0px",outline:"none",boxShadow:"0px 6px 20px rgba(56, 66, 100, 0.15)",borderRadius:"4.32px",fontSize:d+"px",width:"100%"}),singleValue:e=>({...e,fontSize:d+"px",marginLeft:"0px",width:"auto"}),multiValue:e=>({...e,marginLeft:"0px",width:"auto"}),input:e=>({...e,fontSize:d+"px"}),option:(e,t)=>({...e,backgroundColor:t.isSelected||t.isFocused?L.neutral["neutral-5"]:L.bgColor,padding:"10px",cursor:"pointer",color:"#081348",width:"inherit"}),...P.styles};return t.createElement(Pt,{style:b,isValid:c,fontSize:d,theme:L},e&&t.createElement(Lt,{inBuiltCss:H,labelWrapperStyle:"selectComp-label-wrapper",style:x},t.createElement(bt,{customStyles:o,type:"label-text",text:e,style:{marginBottom:"7px",paddingBottom:"0px"}}),A&&t.createElement("div",{style:{marginLeft:"4px",color:`${L.ui.error}`}},"*")),"multiSelect"===v?t.createElement(f,w({components:{DropdownIndicator:q,MultiValue:G,Option:F,ValueContainer:j,IndicatorSeparator:()=>null,ClearIndicator:T},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",onChange:i,placeholder:n,value:l,options:r,styles:O,isMulti:!0,isDisabled:C,hideSelectedOptions:!1,closeMenuOnSelect:!1,isSearchable:!0,isLoading:S,id:E,isClearable:a},P)):"asyncSingleSelect"===v?t.createElement(y,w({loadOptions:m,defaultOptions:!0,onInputChange:u,styles:O,components:{DropdownIndicator:q,ValueContainer:j,IndicatorSeparator:()=>null,ClearIndicator:T},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",placeholder:n,onChange:i,isLoading:S,isDisabled:C,id:E,isClearable:a},P)):"asyncMultiSelect"===v?t.createElement(y,w({components:{DropdownIndicator:q,MultiValue:G,ValueContainer:j,Option:F,IndicatorSeparator:()=>null,ClearIndicator:T},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",onChange:i,placeholder:n,styles:O,isMulti:!0,isDisabled:C,hideSelectedOptions:!1,closeMenuOnSelect:!1,isSearchable:!0,isLoading:S,loadOptions:m,defaultOptions:!0,onInputChange:u,id:E,isClearable:a},P)):t.createElement(f,w({components:{DropdownIndicator:q,ValueContainer:j,IndicatorSeparator:()=>null,ClearIndicator:T},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",options:r,placeholder:n,isDisabled:C,value:{value:l?l.value:"",label:l?l.label:""},styles:O,onChange:i,isLoading:S,id:E,isClearable:a},P)))};Ht.propTypes={label:e.string,labelStyle:e.object,optionArr:e.array,selectedValue:e.object,setSelectedValue:e.func,placeHolder:e.string,fontSize:e.number,clearSelected:e.func,loadOptions:e.func,onInputChange:e.func,customWrapperStyles:e.object,customLabelStyles:e.object,isRequired:e.bool,dropdownType:e.string,isDisabled:e.bool,isLoading:e.bool,isValid:e.bool,height:e.number,isClearable:e.bool,id:e.string,iconName:e.string,iconColor:e.string,iconSize:e.number,leftIcon:e.string,leftIconColor:e.string,leftIconSize:e.number,showIndicator:e.bool},Ht.defaultProps={label:"",labelStyle:{},optionArr:[],selectedValue:{},setSelectedValue:void 0,placeHolder:"Select an option",isValid:!0,isClearable:!1,height:31,fontSize:14,loadOptions:()=>{},onInputChange:()=>{},clearSelected:()=>{},customWrapperStyles:()=>{},customLabelStyles:()=>{},isRequired:!1,dropdownType:"singleSelect",isDisabled:!1,isLoading:!1,id:"",iconName:"triangle-down",iconColor:"black",iconSize:8,leftIcon:"magnifier-icon",leftIconColor:"black",leftIconSize:10,showIndicator:!0};const Tt=s.div`
|
|
1351
1351
|
//Set the styles from the default styles object
|
|
1352
1352
|
${({inBuiltCss:e,defaultStyles:t})=>ye(e,t)}
|
|
1353
1353
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("prop-types"),t=require("react"),l=require("styled-components"),o=require("react-svg"),r=require("react-datepicker"),a=require("react-select"),i=require("react-select/async"),n=require("react-signature-pad-wrapper"),c=require("react-data-table-component"),s=require("react-popper-tooltip"),d=require("react-modal");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=u(e),f=u(t),m=u(l),g=u(r),b=u(a),h=u(i),y=u(n),x=u(c),A=u(d);function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var o in l)Object.prototype.hasOwnProperty.call(l,o)&&(e[o]=l[o])}return e},v.apply(this,arguments)}const C={"primary-1":"#2E56F4","primary-2":"#081348"},S={error:"#DD0000",success:"#00B904 "},w={"neutral-1":"#39424D","neutral-2":"#929EAC","neutral-3":"#BBC4CF","neutral-4":"#E2E6F5","neutral-5":"#F0F3F8"},E={"insight-purple":"#F8F2FF","insight-yellow":"#FFFAF2","error-bg":"#FCF2F2","selection-bg":"#F2F4FE"},k={"graph-1":"#2E56F4","graph-2":"#00D7F7","graph-3":"#8B2DFF","graph-4":"#FB9A00","graph-5":"#00B904"},z={primary:{...C},ui:{...S},neutral:{...w},shade:{...E},graph:{...k},variant:{...C,...S,...w,...E,...k},textColor:C["primary-2"],bgColor:"#FFFFFF",black:"#000000",border:"#D4D7E3"},V={sm:{cardWidth:"178px",cardMinHeight:"88px",borderRadius:"4px",border:"0.7px",bodyHeight:"55px",footerFontSize:"10px",footerMinHeight:"31px",footerPadding:"10.5px 16px",footerLineHeight:"16px",lineHeight:"12px"},md:{cardWidth:"215px",cardMinHeight:"123px",borderRadius:"6px",border:"1px",bodyHeight:"67px",footerFontSize:"14px",footerMinHeight:"54px",footerPadding:"18px 19px",footerLineHeight:"12px",lineHeight:"16px"}},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("prop-types"),t=require("react"),l=require("styled-components"),o=require("react-svg"),r=require("react-datepicker"),a=require("react-select"),i=require("react-select/async"),n=require("react-signature-pad-wrapper"),c=require("react-data-table-component"),s=require("react-popper-tooltip"),d=require("react-modal");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=u(e),f=u(t),m=u(l),g=u(r),b=u(a),h=u(i),y=u(n),x=u(c),A=u(d);function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var o in l)Object.prototype.hasOwnProperty.call(l,o)&&(e[o]=l[o])}return e},v.apply(this,arguments)}const C={"primary-1":"#2E56F4","primary-2":"#081348"},S={error:"#DD0000",success:"#00B904 "},w={"neutral-1":"#39424D","neutral-2":"#929EAC","neutral-3":"#BBC4CF","neutral-4":"#E2E6F5","neutral-5":"#F0F3F8"},E={"insight-purple":"#F8F2FF","insight-yellow":"#FFFAF2","error-bg":"#FCF2F2","selection-bg":"#F2F4FE"},k={"graph-1":"#2E56F4","graph-2":"#00D7F7","graph-3":"#8B2DFF","graph-4":"#FB9A00","graph-5":"#00B904"},z={primary:{...C},ui:{...S},neutral:{...w},shade:{...E},graph:{...k},variant:{...C,...S,...w,...E,...k},textColor:C["primary-2"],bgColor:"#FFFFFF",black:"#000000",border:"#D4D7E3"},V={sm:{cardWidth:"178px",cardMinHeight:"88px",borderRadius:"4px",border:"0.7px",bodyHeight:"55px",footerFontSize:"10px",footerMinHeight:"31px",footerPadding:"10.5px 16px",footerLineHeight:"16px",lineHeight:"12px"},md:{cardWidth:"215px",cardMinHeight:"123px",borderRadius:"6px",border:"1px",bodyHeight:"67px",footerFontSize:"14px",footerMinHeight:"54px",footerPadding:"18px 19px",footerLineHeight:"12px",lineHeight:"16px"}},R=m.default.div`
|
|
2
2
|
${({trimFileName:e})=>e?l.css`
|
|
3
3
|
height: ${({size:e})=>V[e].cardMinHeight};
|
|
4
4
|
`:l.css`
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,M=m.default.div`
|
|
23
23
|
display: flex;
|
|
24
24
|
justify-content: ${({buttons:e})=>"11"!==e?"center":"space-between"};
|
|
25
25
|
align-items: center;
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
line-height: ${({size:e})=>V[e].lineHeight};
|
|
60
60
|
border-bottom-left-radius: inherit;
|
|
61
61
|
border-bottom-right-radius: inherit;
|
|
62
|
-
`,I=({variant:e,variantBorder:t,variantBorderHover:o,variantBgBody:r,variantBgFooter:a,fileName:i,bgUrl:n,size:c,trimFileName:s,bodyContent:d,...u})=>{const p=l.useTheme()||z;return f.default.createElement(
|
|
62
|
+
`,I=({variant:e,variantBorder:t,variantBorderHover:o,variantBgBody:r,variantBgFooter:a,fileName:i,bgUrl:n,size:c,trimFileName:s,bodyContent:d,...u})=>{const p=l.useTheme()||z;return f.default.createElement(R,v({variantBorder:t,variantBorderHover:o,variantBgBody:r,size:c,trimFileName:s,theme:p},u),f.default.createElement(M,{bgUrl:n,size:c,theme:p},d),f.default.createElement(B,{theme:p,title:i,variant:e,variantBgFooter:a,trimFileName:s,size:c},i))};I.propTypes={variant:p.default.string,variantBorder:p.default.string,variantBorderHover:p.default.string,variantBgBody:p.default.string,variantBgFooter:p.default.string,fileName:p.default.string,bgUrl:p.default.string,size:p.default.oneOf(["sm","md"]),trimFileName:p.default.bool,bodyContent:p.default.element},I.defaultProps={variant:"black",variantBorder:"neutral-5",variantBorderHover:"primary-1",variantBgBody:"neutral-4",variantBgFooter:null,fileName:"",bgUrl:null,size:"md",trimFileName:!0,bodyContent:null};const W=m.default.div`
|
|
63
63
|
color: ${({activeTheme:e})=>e.textColor};
|
|
64
64
|
padding-top: 25px;
|
|
65
65
|
padding-bottom: 25px;
|
|
@@ -540,7 +540,7 @@ ${({inBuiltCss:e,type:t,customStyles:l})=>{if(e){let o={};if(e[t]){for(const t i
|
|
|
540
540
|
|
|
541
541
|
//Set the styles from the default styles object
|
|
542
542
|
${({theme:e,defaultStyle:t})=>be(e,t)}
|
|
543
|
-
`,
|
|
543
|
+
`,Re=({block:e,style:t,variant:o,disabled:r,type:a,id:i,...n})=>(l.useTheme(),f.default.createElement(Ve,v({id:i,block:e,variant:o,defaultStyle:"button",type:a,style:t,disabled:r},n),n.children));Re.propTypes={variant:p.default.string,disabled:p.default.bool,block:p.default.bool,onClick:p.default.func,theme:p.default.object,type:p.default.string,id:p.default.string},Ve.defaultProps={theme:z},Re.defaultProps={theme:z,variant:"primary-1",block:!1,disabled:!1,onClick:void 0,id:""};const Me=m.default.div`
|
|
544
544
|
//Set the styles from the default styles object
|
|
545
545
|
${({theme:e,type:t})=>be(e,t)}
|
|
546
546
|
@media (max-width: 980px) {
|
|
@@ -548,7 +548,7 @@ ${({inBuiltCss:e,type:t,customStyles:l})=>{if(e){let o={};if(e[t]){for(const t i
|
|
|
548
548
|
}
|
|
549
549
|
// custom styles
|
|
550
550
|
${({customStyles:e})=>e}
|
|
551
|
-
`,Be=({theme:e,type:t,customStyles:l,...o})=>f.default.createElement(
|
|
551
|
+
`,Be=({theme:e,type:t,customStyles:l,...o})=>f.default.createElement(Me,v({theme:e,customStyles:l,type:t},o),o.children);Be.propTypes={theme:p.default.object,customStyles:p.default.object,type:p.default.string},Be.defaultProps={theme:L,customStyles:null,type:"content"};const Ie=m.default.div`
|
|
552
552
|
width: 100%;
|
|
553
553
|
display: flex;
|
|
554
554
|
flex-direction: column;
|
|
@@ -1186,7 +1186,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1186
1186
|
background-color: ${({theme:e})=>e.neutral["neutral-4"]};
|
|
1187
1187
|
border-radius: 10px;
|
|
1188
1188
|
}
|
|
1189
|
-
`;Vt.defaultProps={theme:z};const
|
|
1189
|
+
`;Vt.defaultProps={theme:z};const Rt=m.default("li")`
|
|
1190
1190
|
text-align: left;
|
|
1191
1191
|
font-style: normal;
|
|
1192
1192
|
font-weight: normal;
|
|
@@ -1195,7 +1195,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1195
1195
|
padding-left: 12px;
|
|
1196
1196
|
padding-bottom: 12px;
|
|
1197
1197
|
cursor: pointer;
|
|
1198
|
-
`,
|
|
1198
|
+
`,Mt=({startDate:e,setStartDate:o,disabled:r,theme:a,...i})=>{const n=l.useTheme()||z,c=["January","February","March","April","May","June","July","August","September","October","November","December"];for(var s=[],d=2010;d<=(new Date).getFullYear()+10;d++)s.push(d);const u=t.useRef(null),p=t.useRef(null),[m,b]=t.useState(!1),[h,y]=t.useState(!1),[x,A]=t.useState(!1),[C,S]=t.useState(!1),[w,E]=t.useState(e.getFullYear()),[k,V]=t.useState(c[e.getMonth()]);t.useEffect((()=>{V(c[e.getMonth()]),E(e.getFullYear())}),[e]),t.useEffect((()=>(document.addEventListener("click",R,!0),()=>{document.removeEventListener("click",R,!0)})),[]);const R=e=>{u.current&&!u.current.contains(e.target)&&b(!1)},M=e=>{p.current&&!p.current.contains(e.target)&&y(!1)};return t.useEffect((()=>(document.addEventListener("click",M,!0),()=>{document.removeEventListener("click",M,!0)})),[]),f.default.createElement(Ct,v({disabled:r,theme:a},i),f.default.createElement(g.default,{selected:e,dateFormat:"dd/MM/yyyy",useWeekdaysShort:!0,onChange:e=>o(e),placeholderText:"select date",adjustDateOnChange:!0,disabled:r,dropdownMode:"select",renderCustomHeader:({date:e,changeYear:t,changeMonth:l})=>f.default.createElement(St,null,f.default.createElement("div",{style:{display:"flex"}},f.default.createElement(Et,{ref:u},f.default.createElement(kt,{onClick:()=>{b(!m),y(!1)}},f.default.createElement("span",{onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),style:{color:`${x?n.variant["primary-1"]:n.textColor}`}},c[e.getMonth()]),f.default.createElement(wt,null,f.default.createElement(F,{icon:"triangle-down",color:x?n.variant["primary-1"]:n.textColor,size:7}))),m&&f.default.createElement(zt,null,f.default.createElement(Vt,{theme:a,onMouseEnter:()=>A(!0)},c.map(((e,t)=>f.default.createElement(Rt,{selectedMonth:k,onClick:()=>{A(!1),l(t),b(!1),V(c[t])},key:Math.random()},f.default.createElement("span",{style:{color:`${k===e?n.variant["primary-1"]:n.textColor}`}},e))))))),f.default.createElement(Et,{ref:p},f.default.createElement(kt,{style:{marginLeft:"28px"},onClick:()=>{y(!h),b(!1)}},f.default.createElement("span",{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),style:{color:`${C?n.variant["primary-1"]:n.textColor}`}},e.getFullYear()),f.default.createElement(wt,null,f.default.createElement(F,{icon:"triangle-down",color:C?n.variant["primary-1"]:n.textColor,size:7}))),h&&f.default.createElement(zt,null,f.default.createElement(Vt,{onMouseEnter:()=>S(!0)},s.map(((e,l)=>f.default.createElement(Rt,{onClick:()=>{S(!1),t(e),E(e),y(!1)},key:Math.random()},f.default.createElement("span",{style:{color:`${w===e?n.variant["primary-1"]:n.textColor}`}},e)))))))))}))};Mt.propTypes={startDate:p.default.any,setStartDate:p.default.func,disabled:p.default.bool,theme:p.default.object},Mt.defaultProps={theme:z,startDate:"",setStartDate:()=>{},disabled:!1};const Bt=m.default.div`
|
|
1199
1199
|
|
|
1200
1200
|
.master-dropdown,
|
|
1201
1201
|
.new-select {
|
|
@@ -1347,7 +1347,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1347
1347
|
margin-left: 6px;
|
|
1348
1348
|
margin-top: -14px;
|
|
1349
1349
|
cursor: pointer;
|
|
1350
|
-
`,Pt=({label:e,labelStyle:t,optionArr:o,selectedValue:r,setSelectedValue:i,placeHolder:n,isClearable:c,isValid:s,height:d,fontSize:u,loadOptions:p,onInputChange:m,clearSelected:g,customWrapperStyles:y,customLabelStyles:x,isRequired:A,dropdownType:C,isDisabled:S,isLoading:w,id:E,iconName:k,iconColor:V,iconSize:
|
|
1350
|
+
`,Pt=({label:e,labelStyle:t,optionArr:o,selectedValue:r,setSelectedValue:i,placeHolder:n,isClearable:c,isValid:s,height:d,fontSize:u,loadOptions:p,onInputChange:m,clearSelected:g,customWrapperStyles:y,customLabelStyles:x,isRequired:A,dropdownType:C,isDisabled:S,isLoading:w,id:E,iconName:k,iconColor:V,iconSize:R,showIndicator:M,leftIcon:B,leftIconColor:I,leftIconSize:W,...P})=>{const T=l.useTheme()||z,q=e=>{const t=f.default.createElement(a.components.DropdownIndicator,e,f.default.createElement(Wt,null,f.default.createElement(F,{icon:k,color:V,size:R})));return!0===M?t:null},H=e=>f.default.createElement(a.components.ClearIndicator,e,c?f.default.createElement(Wt,{onClick:()=>{g(),e.clearValue()}},f.default.createElement(F,{icon:"cross-icon",color:"black",size:8})):null),j=({getValue:e,children:t,...l})=>{const o=e().length;return f.default.createElement(a.components.ValueContainer,l,""===B?null:f.default.createElement(Wt,{style:{paddingTop:"10px",paddingRight:"8px",marginLeft:"0",marginTop:"-16px"}},f.default.createElement(F,{icon:B,color:I,size:W})),t,o>1&&f.default.createElement("div",{className:"text-more-alt"},"& ",o-1," more"))},G=e=>{const t={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px",minWidth:"15px",minHeight:"15px"},l=f.default.createElement("div",{style:{...t,backgroundColor:e?.data?.color??T.primary["primary-1"]}},f.default.createElement(F,{icon:"check-icon",color:"white"})),o=f.default.createElement("div",{style:{...t,backgroundColor:"#e0e7ff"}});return f.default.createElement(a.components.Option,e,f.default.createElement("div",{style:{display:"flex",justifyContent:"start",alignItems:"center",width:"100%"}},e.isSelected?l:o,f.default.createElement("div",{className:"text-main-alt",style:{marginLeft:"10px"}},e.label)))},O=({index:e,...t})=>{const l=t?.data?.label||"Select";return!e&&f.default.createElement("div",{className:"text-main-alt"},l)},X={control:(e,t)=>({...e,border:s?"1px solid "+T.border:"1px solid "+T.ui.error,minWidth:"215px",height:`${d}px`,minHeight:`${d}px`,boxShadow:(t.isSelected||t.isFocused)&&"none"}),placeholder:e=>({...e,fontSize:u+"px",marginLeft:"0px"}),dropdownIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),clearIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),valueContainer:e=>({...e,display:"flex",fontSize:u+"px"}),indicatorsContainer:e=>({...e,padding:0,height:`${d}px`}),menu:e=>({...e,border:"none",marginTop:"1px",borderTopRightRadius:"0px",borderTopLeftRadius:"0px",outline:"none",boxShadow:"0px 6px 20px rgba(56, 66, 100, 0.15)",borderRadius:"4.32px",fontSize:u+"px",width:"100%"}),singleValue:e=>({...e,fontSize:u+"px",marginLeft:"0px",width:"auto"}),multiValue:e=>({...e,marginLeft:"0px",width:"auto"}),input:e=>({...e,fontSize:u+"px"}),option:(e,t)=>({...e,backgroundColor:t.isSelected||t.isFocused?T.neutral["neutral-5"]:T.bgColor,padding:"10px",cursor:"pointer",color:"#081348",width:"inherit"}),...P.styles};return f.default.createElement(Bt,{style:y,isValid:s,fontSize:u,theme:T},e&&f.default.createElement(It,{inBuiltCss:L,labelWrapperStyle:"selectComp-label-wrapper",style:x},f.default.createElement(pt,{customStyles:t,type:"label-text",text:e,style:{marginBottom:"7px",paddingBottom:"0px"}}),A&&f.default.createElement("div",{style:{marginLeft:"4px",color:`${T.ui.error}`}},"*")),"multiSelect"===C?f.default.createElement(b.default,v({components:{DropdownIndicator:q,MultiValue:O,Option:G,ValueContainer:j,IndicatorSeparator:()=>null,ClearIndicator:H},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",onChange:i,placeholder:n,value:r,options:o,styles:X,isMulti:!0,isDisabled:S,hideSelectedOptions:!1,closeMenuOnSelect:!1,isSearchable:!0,isLoading:w,id:E,isClearable:c},P)):"asyncSingleSelect"===C?f.default.createElement(h.default,v({loadOptions:p,defaultOptions:!0,onInputChange:m,styles:X,components:{DropdownIndicator:q,ValueContainer:j,IndicatorSeparator:()=>null,ClearIndicator:H},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",placeholder:n,onChange:i,isLoading:w,isDisabled:S,id:E,isClearable:c},P)):"asyncMultiSelect"===C?f.default.createElement(h.default,v({components:{DropdownIndicator:q,MultiValue:O,ValueContainer:j,Option:G,IndicatorSeparator:()=>null,ClearIndicator:H},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",onChange:i,placeholder:n,styles:X,isMulti:!0,isDisabled:S,hideSelectedOptions:!1,closeMenuOnSelect:!1,isSearchable:!0,isLoading:w,loadOptions:p,defaultOptions:!0,onInputChange:m,id:E,isClearable:c},P)):f.default.createElement(b.default,v({components:{DropdownIndicator:q,ValueContainer:j,IndicatorSeparator:()=>null,ClearIndicator:H},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",options:o,placeholder:n,isDisabled:S,value:{value:r?r.value:"",label:r?r.label:""},styles:X,onChange:i,isLoading:w,id:E,isClearable:c},P)))};Pt.propTypes={label:p.default.string,labelStyle:p.default.object,optionArr:p.default.array,selectedValue:p.default.object,setSelectedValue:p.default.func,placeHolder:p.default.string,fontSize:p.default.number,clearSelected:p.default.func,loadOptions:p.default.func,onInputChange:p.default.func,customWrapperStyles:p.default.object,customLabelStyles:p.default.object,isRequired:p.default.bool,dropdownType:p.default.string,isDisabled:p.default.bool,isLoading:p.default.bool,isValid:p.default.bool,height:p.default.number,isClearable:p.default.bool,id:p.default.string,iconName:p.default.string,iconColor:p.default.string,iconSize:p.default.number,leftIcon:p.default.string,leftIconColor:p.default.string,leftIconSize:p.default.number,showIndicator:p.default.bool},Pt.defaultProps={label:"",labelStyle:{},optionArr:[],selectedValue:{},setSelectedValue:void 0,placeHolder:"Select an option",isValid:!0,isClearable:!1,height:31,fontSize:14,loadOptions:()=>{},onInputChange:()=>{},clearSelected:()=>{},customWrapperStyles:()=>{},customLabelStyles:()=>{},isRequired:!1,dropdownType:"singleSelect",isDisabled:!1,isLoading:!1,id:"",iconName:"triangle-down",iconColor:"black",iconSize:8,leftIcon:"magnifier-icon",leftIconColor:"black",leftIconSize:10,showIndicator:!0};const Lt=m.default.div`
|
|
1351
1351
|
//Set the styles from the default styles object
|
|
1352
1352
|
${({inBuiltCss:e,defaultStyles:t})=>be(e,t)}
|
|
1353
1353
|
|
|
@@ -1405,7 +1405,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1405
1405
|
align-items: center;
|
|
1406
1406
|
margin: 20px 0px;
|
|
1407
1407
|
font-size: 14px;
|
|
1408
|
-
`,Zt=({isValid:e,label:o,labelStyle:r,labelInline:a,required:i,message:n,fileArr:c,setFileArr:s,deleteFile:d,customDropzoneStyles:u,customFileStyles:p,customTextStyles:m,customFileNameStyles:g,backgroundColor:b,singleFile:h,messageSize:y,additionalText:x,id:A,...C})=>{const S=l.useTheme()||z,[w,E]=t.useState(!1),k=t.createRef();function V(e){e.preventDefault(),e.stopPropagation()}function
|
|
1408
|
+
`,Zt=({isValid:e,label:o,labelStyle:r,labelInline:a,required:i,message:n,fileArr:c,setFileArr:s,deleteFile:d,customDropzoneStyles:u,customFileStyles:p,customTextStyles:m,customFileNameStyles:g,backgroundColor:b,singleFile:h,messageSize:y,additionalText:x,id:A,...C})=>{const S=l.useTheme()||z,[w,E]=t.useState(!1),k=t.createRef();function V(e){e.preventDefault(),e.stopPropagation()}function R(e,t){let l=1==t?[]:[...c];for(let t=0;t<e.length;t++)l.push(e.item(t));return t||(l=l.filter(((e,t,l)=>t===l.findIndex((t=>t.place===e.place&&t.name===e.name))))),s(l),E(!1),l}function M(e,t){if(e instanceof File){const t=c.filter((t=>t.name!==e.name));s(t)}else!function(e,t){const l=c.filter((t=>t.name!==e.name));s(l),d(e)}(e)}return f.default.createElement("div",null,f.default.createElement("div",{style:{display:"flex",width:"inherit"}},f.default.createElement(pt,v({customStyles:r,type:"label-text",labelInline:a,text:o,style:{display:"flex",marginBottom:""+(a?"":"7px"),paddingBottom:"0px"}},C)),i&&f.default.createElement("div",{style:{marginLeft:"4px",color:`${S.variant.error}`}},"*")),f.default.createElement(Lt,{theme:S,inBuiltCss:L,defaultStyles:"dropzone-parent",backgroundColor:b,customDropzoneStyles:u,onDragLeave:function(e){V(e),E(!1)},onDragOver:function(e){V(e),E(!0)},onDrop:function(e){V(e);const{files:t}=e.dataTransfer;E(!0),C.onFilesAdded(R(t,h))},onClick:function(){k.current.click()},hover:w,isValid:e,fileArr:c},f.default.createElement(qt,v({ref:k,type:"file",id:A,multiple:1!=h,onChange:function(e){const{files:t}=e.target;E(!1),C.onFilesAdded(R(t,h))},onClick:e=>e.target.value=null},C)),e?f.default.createElement(F,{icon:"file-upload",color:w?S.bgColor:S.primary["primary-1"],size:24}):null,f.default.createElement(Ht,{isValid:e,hover:w,customTextStyles:m,inBuiltCss:L,defaultStyles:"dropzone-text-div"},e?f.default.createElement("div",null,f.default.createElement("span",{style:{color:w?S.bgColor:S.primary["primary-1"]}},"Choose a file"," "),f.default.createElement("span",{style:{color:w?S.bgColor:S.neutral["neutral-2"]}},"or"," "),f.default.createElement("span",{style:{color:w?S.bgColor:S.textColor}},"drag ",h?"it":"them"," here")):f.default.createElement("div",null,f.default.createElement("span",{style:{color:S.variant.error}},"Try again!!"," "),f.default.createElement("span",{style:{color:S.textColor}},n.length>y?n.slice(0,y):n)))),x.length>0&&f.default.createElement(Xt,null,x)," ",c?.map(((e,t)=>f.default.createElement(Tt,{inBuiltCss:L,defaultStyles:"dropzone-file-div",key:`${e}-${t}`,customFileStyles:p},f.default.createElement(Gt,null,f.default.createElement(F,{icon:"file-icon",color:S.primary["primary-1"]})),e instanceof File?f.default.createElement(jt,{inBuiltCss:L,type:"dropzone-file-name",customFileNameStyles:g},e.name):f.default.createElement("a",{style:{color:S.variant["primary-1"],marginLeft:"5px"},href:e?.path,target:"_blank",rel:"noreferrer"}," ",e.name),f.default.createElement(Ot,null,e?.otherInfo),f.default.createElement(Ft,{key:101*Math.random()|0,onClick:()=>M(e)},f.default.createElement("div",{style:{marginRight:"7px"}},f.default.createElement(F,{icon:`${!(e instanceof File)&&"cloud-icon"}`,color:S.primary["primary-1"]})),f.default.createElement(F,{icon:"cross-icon",color:S.neutral["neutral-2"],size:13}))))))};Zt.propTypes={onFilesAdded:p.default.func,isValid:p.default.bool,message:p.default.string,fileArr:p.default.array,setFileArr:p.default.func,customDropzoneStyles:p.default.object,customFileStyles:p.default.object,customTextStyles:p.default.object,customFileNameStyles:p.default.object,backgroundColor:p.default.string,messageSize:p.default.number,additionalText:p.default.string,id:p.default.string},Zt.defaultProps={onFilesAdded:()=>null,isValid:!0,message:"",fileArr:[],setFileArr:()=>{},customDropzoneStyles:{},customFileStyles:{},customTextStyles:{},customFileNameStyles:{},messageSize:100,additionalText:"",id:""};const Jt=m.default.div`
|
|
1409
1409
|
border: 1px solid
|
|
1410
1410
|
${({theme:e})=>e.border};
|
|
1411
1411
|
border-radius: 4px;
|
|
@@ -1666,7 +1666,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1666
1666
|
display: flex;
|
|
1667
1667
|
justify-content: center;
|
|
1668
1668
|
cursor: pointer;
|
|
1669
|
-
`,Al=({onChange:e,activeColor:o,defaultColor:r,placeholderColor:a,placeholderText:i,customInputStyle:n,pointsArray:c,setPointsArray:s,value:d,setValue:u,valueForSignatureDrawing:p,setValueForSignatureDrawing:f,imageURL:m,setImageURL:g,id:b,...h})=>{const x=l.useTheme()||z,[A,v]=t.useState("default"),[C,S]=t.useState(!1),[w,E]=t.useState(!1),k=t.useRef(null);t.useEffect((()=>{w&&(
|
|
1669
|
+
`,Al=({onChange:e,activeColor:o,defaultColor:r,placeholderColor:a,placeholderText:i,customInputStyle:n,pointsArray:c,setPointsArray:s,value:d,setValue:u,valueForSignatureDrawing:p,setValueForSignatureDrawing:f,imageURL:m,setImageURL:g,id:b,...h})=>{const x=l.useTheme()||z,[A,v]=t.useState("default"),[C,S]=t.useState(!1),[w,E]=t.useState(!1),k=t.useRef(null);t.useEffect((()=>{w&&(R(),f(k.current))}),[!0===w]);const V=()=>{u(""),f(k.current),k.current&&k.current.clear(),S(!1),E(!1)},R=()=>(s(k.current.toData()),g(k.current.toDataURL("image/png")),[m,c]);return React.createElement(ml,{inBuiltCss:L,defaultParentDivStyle:"signature-parent-div",isMyInputFocused:C,selected:A,activeColor:o,defaultColor:r,theme:x},React.createElement(gl,{inBuiltCss:L,defaultWrapperDivStyle:"signature-wrapper-div",activeColor:o,defaultColor:r,selected:A,isMyInputFocused:C,signIcon:!0,theme:x},React.createElement(bl,{activeColor:o,defaultColor:r,isMyInputFocused:C,theme:x,penIcon:!0,onClick:()=>{v("default"),V()}},React.createElement(F,{icon:"pen-icon",color:"default"===A?o||x.primary["primary-1"]:x.black})),React.createElement(bl,{activeColor:o,defaultColor:r,theme:x,isMyInputFocused:C,penIcon:!1,onClick:()=>{v("sign"),V()}},React.createElement(F,{icon:"sign-icon",color:"default"!==A?o||x.primary["primary-1"]:x.black}))),React.createElement(gl,{inBuiltCss:L,defaultWrapperDivStyle:"signature-wrapper-div",activeColor:o,defaultColor:r,theme:x,selected:A,isMyInputFocused:C,signIcon:!1,onTouchStart:()=>{}},"default"===A?React.createElement(hl,{inBuiltCss:L,defaultInputStyle:"signature-input-text",placeholder:i,placeholderColor:a,customInputStyle:n,onBlur:()=>S(!1),onFocus:()=>S(!0),id:b,value:d,defaultColor:r,theme:x,onChange:e=>u(e.target.value)}):React.createElement(yl,{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),onClick:()=>{E(!0),R()}},React.createElement(y.default,{ref:k,id:b,redrawOnResize:!0,height:75,options:{minWidth:1,maxWidth:1,penColor:"#444444"}})),(d||w)&&React.createElement(xl,{selected:A,onClick:()=>V()},React.createElement(F,{icon:"cross-icon",color:r||x.neutral["neutral-3"]}))))};Al.propTypes={activeColor:p.default.string,defaultColor:p.default.string,placeholderColor:p.default.string,placeholderText:p.default.string,customInputStyle:p.default.object,pointsArray:p.default.any,setPointsArray:p.default.func,value:p.default.string,setValue:p.default.func,imageURL:p.default.string,setImageURL:p.default.func,id:p.default.string},Al.defaultProps={customInputStyle:{},placeholderText:"Type your signature here",pointsArray:null,setPointsArray:()=>{},value:"",setValue:()=>{},imageURL:"",setImageURL:()=>{},setValueForSignatureDrawing:()=>{},id:""};const vl=m.default.div`
|
|
1670
1670
|
//Set the styles from the default styles object
|
|
1671
1671
|
${({inBuiltCss:e,defaultWrapperStyle:t})=>be(e,t)}
|
|
1672
1672
|
|
|
@@ -1736,18 +1736,18 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1736
1736
|
content: ' *';
|
|
1737
1737
|
color: ${({theme:e})=>e.variant.error};
|
|
1738
1738
|
}
|
|
1739
|
-
`,
|
|
1739
|
+
`,Rl=m.default.label`
|
|
1740
1740
|
display: block;
|
|
1741
1741
|
margin-bottom: ${({labelInline:e,errMsg:t})=>e&&t?"18px":"7px"};
|
|
1742
1742
|
margin-right: ${({labelInline:e})=>e?"7px":""};
|
|
1743
1743
|
color: ${({theme:e})=>e.variant["neutral-2"]};
|
|
1744
1744
|
${({required:e})=>e?Vl:null}
|
|
1745
1745
|
padding-bottom: 0px;
|
|
1746
|
-
`,
|
|
1746
|
+
`,Ml=l.css`
|
|
1747
1747
|
display: flex;
|
|
1748
1748
|
align-items: center;
|
|
1749
1749
|
`,Bl=m.default.div`
|
|
1750
|
-
${({labelInline:e})=>e?
|
|
1750
|
+
${({labelInline:e})=>e?Ml:null}
|
|
1751
1751
|
.err-text {
|
|
1752
1752
|
color: ${({theme:e})=>e.variant.error};
|
|
1753
1753
|
margin-top: 5px;
|
|
@@ -1766,7 +1766,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1766
1766
|
padding: 5px 6px;
|
|
1767
1767
|
font-size: 18px;
|
|
1768
1768
|
cursor: pointer;
|
|
1769
|
-
`,Wl=({label:e,errMsg:t,hour:o,minute:r,period:a,onChange:i,id:n,...c})=>{const s=l.useTheme()||z;return f.default.createElement(Bl,v({theme:s},c),f.default.createElement(
|
|
1769
|
+
`,Wl=({label:e,errMsg:t,hour:o,minute:r,period:a,onChange:i,id:n,...c})=>{const s=l.useTheme()||z;return f.default.createElement(Bl,v({theme:s},c),f.default.createElement(Rl,v({theme:s},c,{errMsg:t}),e),f.default.createElement("div",null,f.default.createElement(kl,v({theme:s,id:n},c),f.default.createElement(zl,{theme:s,value:o,onChange:function(e){const t=e.currentTarget.value>12?12:parseFloat(e.currentTarget.value)||0;i({hour:t,minute:r,period:a})}}),":",f.default.createElement(zl,{theme:s,value:r,onChange:function(e){console.log("minute change",e.currentTarget.value);const t=e.currentTarget.value>59?59:parseFloat(e.currentTarget.value)||0;i({hour:o,minute:t,period:a})}}),f.default.createElement(Il,{theme:s,onClick:function(e){i({hour:o,minute:r,period:"AM"===a?"PM":"AM"})}},a)),f.default.createElement("div",{className:"err-text"},t)))};Wl.propTypes={label:p.default.string,hour:p.default.number.isRequired,minute:p.default.number.isRequired,period:p.default.string.isRequired,required:p.default.bool,labelInline:p.default.bool,isValid:p.default.bool,errMsg:p.default.string,id:p.default.string},Wl.defaultProps={label:"",hour:0,minute:0,period:"AM",required:!1,labelInline:!1,isValid:!0,errMsg:"",id:""};const Pl=m.default.div`
|
|
1770
1770
|
${({inBuiltCss:e,defaultCheckBoxWrapperStyle:t})=>be(e,t)}
|
|
1771
1771
|
`,Ll=m.default.label`
|
|
1772
1772
|
//Set the styles from the default styles object
|
|
@@ -2154,10 +2154,10 @@ svg {
|
|
|
2154
2154
|
top: 0px;
|
|
2155
2155
|
border-bottom: 1px solid ${({theme:e})=>e.border}
|
|
2156
2156
|
|
|
2157
|
-
`;try{A.default.setAppElement("#root")}catch(e){A.default.setAppElement("#__next")}const
|
|
2157
|
+
`;try{A.default.setAppElement("#root")}catch(e){A.default.setAppElement("#__next")}const Ro=({modalIsOpen:e,toggleModal:t,closeOnOutsideClick:o,headerContent:r,bodyContent:a,footerContent:i,customModalCloseStyle:n,customModalHeaderStyle:c,customModalBodyStyle:s,customModalFooterStyle:d,...u})=>{const p=l.useTheme()||z;return f.default.createElement(A.default,v({isOpen:e,onRequestClose:o?t:void 0,style:vo,contentLabel:"Modal"},u),f.default.createElement(Vo,{theme:p},f.default.createElement(Co,{theme:L,type:"modalComp-modal-close",style:n,onClick:t},f.default.createElement(F,{icon:"cross-icon",color:z.neutral["neutral-2"],size:15})),f.default.createElement(So,{style:c},f.default.createElement(zo,null,r))),f.default.createElement(Eo,null,f.default.createElement(wo,{theme:L,type:"modalComp-modal-body",style:s},f.default.createElement(zo,null," ",a)),f.default.createElement(ko,{theme:L,type:"modalComp-modal-footer",style:d},i)))};Ro.propTypes={modalIsOpen:p.default.bool,toggleModal:p.default.func,closeOnOutsideClick:p.default.bool,headerContent:p.default.any,bodyContent:p.default.any,footerContent:p.default.any,customModalCloseStyle:p.default.object,customModalHeaderStyle:p.default.object,customModalBodyStyle:p.default.object,customModalFooterStyle:p.default.object},Ro.defaultProps={modalIsOpen:!1,toggleModal:()=>{},closeOnOutsideClick:!1,headerContent:"",bodyContent:"",footerContent:"",customModalCloseStyle:{},customModalHeaderStyle:{},customModalBodyStyle:{},customModalFooterStyle:{}};const Mo=m.default.div`
|
|
2158
2158
|
${({theme:e,type:t,customStyles:l})=>{if(e){let o={};if(e[t]){for(const t in e.common)o[t]=e.common[t];for(const l in e[t])o[l]=e[t][l],delete e.common[l]}return{...o,...l}}}}
|
|
2159
2159
|
}
|
|
2160
|
-
`,Bo=({theme:e,toggleSimple:t,contentTrigger:l,contentOverlay:o,popperOptionsP:r,settingsP:a,customStyles:i,...n})=>{let c={},d={};t?(c={...c,modifiers:[{name:"offset",options:{offset:[0,5]}}],strategy:"absolute"},d={...d}):(c={...c,modifiers:[{name:"offset",options:{offset:[0,5]}}],strategy:"absolute"},d={...d,trigger:"click",closeOnOutsideClick:!0,interactive:!0}),c={...c,...r},d={...d,...a};const{getArrowProps:u,getTooltipProps:p,setTooltipRef:m,setTriggerRef:g,visible:b}=s.usePopperTooltip({...d},c);return f.default.createElement(f.default.Fragment,null,f.default.createElement("div",{ref:g,style:{width:"fit-content",height:"fit-content"}},l),b&&f.default.createElement(
|
|
2160
|
+
`,Bo=({theme:e,toggleSimple:t,contentTrigger:l,contentOverlay:o,popperOptionsP:r,settingsP:a,customStyles:i,...n})=>{let c={},d={};t?(c={...c,modifiers:[{name:"offset",options:{offset:[0,5]}}],strategy:"absolute"},d={...d}):(c={...c,modifiers:[{name:"offset",options:{offset:[0,5]}}],strategy:"absolute"},d={...d,trigger:"click",closeOnOutsideClick:!0,interactive:!0}),c={...c,...r},d={...d,...a};const{getArrowProps:u,getTooltipProps:p,setTooltipRef:m,setTriggerRef:g,visible:b}=s.usePopperTooltip({...d},c);return f.default.createElement(f.default.Fragment,null,f.default.createElement("div",{ref:g,style:{width:"fit-content",height:"fit-content"}},l),b&&f.default.createElement(Mo,v({type:t?"simple-overlay":"overlay",theme:e,ref:m},p({className:"tooltip-container"}),{customStyles:i}),o))};Bo.propTypes={theme:p.default.object,contentTrigger:p.default.any,contentOverlay:p.default.any,popperOptionsP:p.default.object,settingsP:p.default.object,customStyles:p.default.object,toggleSimple:p.default.bool},Bo.defaultProps={theme:L,contentTrigger:f.default.createElement("div",null,"Trigger"),contentOverlay:f.default.createElement("div",null,"I am the Overlay")};const Io=m.default.div`
|
|
2161
2161
|
display: flex;
|
|
2162
2162
|
align-items: center;
|
|
2163
2163
|
color: ${({theme:e})=>e.variant["neutral-2"]};
|
|
@@ -2500,9 +2500,9 @@ overflow: hidden;
|
|
|
2500
2500
|
// custom styles
|
|
2501
2501
|
${({customBodyStyle:e})=>e}
|
|
2502
2502
|
`,yr=m.default.div`
|
|
2503
|
-
`,xr=({inBuiltCss:e,contentTrigger:t,contentTooltip:o,popperOptionsP:r,settings:a,customStylesTPContainer:i,customStylesTPAbottom:n,customStylesTPAbottomBefore:c,customStylesTPAbottomAfter:d,customStylesTPAtop:u,customStylesTPAtopBefore:p,customStylesTPAtopAfter:m,customStylesTPAright:g,customStylesTPArightBefore:b,customStylesTPArightAfter:h,customStylesTPAleft:y,customStylesTPAleftBefore:x,customStylesTPAleftAfter:A,customStylesTPArrow:C,customStylesTPAbefore:S,customStylesTPAafter:w,customTooltipContentStyle:E,customContentStyle:k,customHeaderStyle:V,customBodyStyle:
|
|
2503
|
+
`,xr=({inBuiltCss:e,contentTrigger:t,contentTooltip:o,popperOptionsP:r,settings:a,customStylesTPContainer:i,customStylesTPAbottom:n,customStylesTPAbottomBefore:c,customStylesTPAbottomAfter:d,customStylesTPAtop:u,customStylesTPAtopBefore:p,customStylesTPAtopAfter:m,customStylesTPAright:g,customStylesTPArightBefore:b,customStylesTPArightAfter:h,customStylesTPAleft:y,customStylesTPAleftBefore:x,customStylesTPAleftAfter:A,customStylesTPArrow:C,customStylesTPAbefore:S,customStylesTPAafter:w,customTooltipContentStyle:E,customContentStyle:k,customHeaderStyle:V,customBodyStyle:R,headerTooltip:M,footerTooltip:B,...I})=>{const W=l.useTheme()||z,P={modifiers:[{name:"offset",options:{offset:[0,23]}}],strategy:"absolute",...r},{getArrowProps:T,getTooltipProps:q,setTooltipRef:H,setTriggerRef:j,visible:F}=s.usePopperTooltip({...a},P);return f.default.createElement(f.default.Fragment,null,f.default.createElement("div",{ref:j,style:{width:"fit-content",height:"fit-content",display:"inline-block"}},t),F&&f.default.createElement(fr,v({inBuiltCss:L,theme:W,ref:H},q({className:"tooltip-container"}),{customStylesTPContainer:i,customStylesTPAbottom:n,customStylesTPAbottomBefore:c,customStylesTPAbottomAfter:d,customStylesTPAtop:u,customStylesTPAtopBefore:p,customStylesTPAtopAfter:m,customStylesTPAright:g,customStylesTPArightBefore:b,customStylesTPArightAfter:h,customStylesTPAleft:y,customStylesTPAleftBefore:x,customStylesTPAleftAfter:A}),f.default.createElement(mr,v({inBuiltCss:L},T({className:"tooltip-arrow"}),{customStylesTPArrow:C,customStylesTPAbefore:S,customStylesTPAafter:w})),f.default.createElement(gr,v({defaultTooltipContentStyle:"popOver-Content",theme:W,inBuiltCss:L},I,{customContentStyle:k}),f.default.createElement(br,v({defaultTooltipHeaderStyle:"popOver-header",theme:W,inBuiltCss:L},I,{customHeaderStyle:V}),M),f.default.createElement(hr,v({defaultTooltipBodyStyle:"popOver-body",theme:W,inBuiltCss:L},I,{customBodyStyle:R}),o),f.default.createElement(yr,null,B))))};xr.propTypes={contentTrigger:p.default.any,headerTooltip:p.default.any,contentTooltip:p.default.any,footerTooltip:p.default.any,popperOptionsP:p.default.object,settings:p.default.object,customHeaderStyle:p.default.object,customBodyStyle:p.default.object,customStylesTPContainer:p.default.object,customStylesTPAbottom:p.default.object,customStylesTPAbottomBefore:p.default.object,customStylesTPAbottomAfter:p.default.object,customStylesTPAtop:p.default.object,customStylesTPAtopBefore:p.default.object,customStylesTPAtopAfter:p.default.object,customStylesTPAright:p.default.object,customStylesTPArightBefore:p.default.object,customStylesTPArightAfter:p.default.object,customStylesTPAleft:p.default.object,customStylesTPAleftBefore:p.default.object,customStylesTPAleftAfter:p.default.object,customStylesTPArrow:p.default.object,customStylesTPAbefore:p.default.object,customStylesTPAafter:p.default.object},xr.defaultProps={contentTrigger:f.default.createElement("div",null,"Trigger"),headerTooltip:"Lovely tooltip title",contentTooltip:"",footerTooltip:"",customStylesTPContainer:{border:"none"}};const Ar={xs:{fontSize:"12px",lineHeight:"120%"},sm:{fontSize:"14px",lineHeight:"120%"},md:{fontSize:"16px",lineHeight:"140%"},lg:{fontSize:"18px",lineHeight:"120%"}},vr=m.default.div`
|
|
2504
2504
|
color: ${({theme:e,text:t})=>t?e.variant[t]:e.textColor};
|
|
2505
2505
|
// background: ${({theme:e,bg:t})=>t?e.variant[t]:e.bgColor};
|
|
2506
2506
|
font-size: ${({size:e})=>Ar[e].fontSize};
|
|
2507
2507
|
line-height: ${({size:e})=>Ar[e].lineHeight};
|
|
2508
|
-
`,Cr=({size:e,children:t,bg:o,text:r,...a})=>{const i=l.useTheme()||z;return f.default.createElement(vr,v({theme:i,bg:o,text:r,size:e},a),f.default.createElement(Nl,{theme:i}),t)};Cr.propTypes={size:p.default.oneOf(["xs","sm","md","lg"]),text:p.default.string,bg:p.default.string,children:p.default.any,theme:p.default.object},Cr.defaultProps={size:"md"},exports.Accordion=O,exports.AccordionSB=X,exports.AccordionSBfooter=Z,exports.ActionContainer=Fe,exports.ActionItem=Xe,exports.ArrowBar=K,exports.Avatar=ee,exports.AvatarSB=re,exports.AvatarSBfooter=ce,exports.Banner=ue,exports.Breadcrumb=ge,exports.ButtonPopup=io,exports.Card=P,exports.CardRef=q,exports.CheckBoxInput=yt,exports.ColorInput=vt,exports.Content=Be,exports.DarkSecondaryLink=Uo,exports.DateSelect=
|
|
2508
|
+
`,Cr=({size:e,children:t,bg:o,text:r,...a})=>{const i=l.useTheme()||z;return f.default.createElement(vr,v({theme:i,bg:o,text:r,size:e},a),f.default.createElement(Nl,{theme:i}),t)};Cr.propTypes={size:p.default.oneOf(["xs","sm","md","lg"]),text:p.default.string,bg:p.default.string,children:p.default.any,theme:p.default.object},Cr.defaultProps={size:"md"},exports.Accordion=O,exports.AccordionSB=X,exports.AccordionSBfooter=Z,exports.ActionContainer=Fe,exports.ActionItem=Xe,exports.ArrowBar=K,exports.Avatar=ee,exports.AvatarSB=re,exports.AvatarSBfooter=ce,exports.Banner=ue,exports.Breadcrumb=ge,exports.ButtonPopup=io,exports.Card=P,exports.CardRef=q,exports.CheckBoxInput=yt,exports.ColorInput=vt,exports.Content=Be,exports.DarkSecondaryLink=Uo,exports.DateSelect=Mt,exports.Divider=Ye,exports.DocumentCard=I,exports.Drawer=$e,exports.DropdownSelect=Pt,exports.DropzoneInput=Zt,exports.ErrorBoundary=_e,exports.FilterChip=lt,exports.Footer=rt,exports.FooterContent=({variant:e,textColor:t,size:l,width:o,footerWidth:r,...a})=>f.default.createElement(at,v({variant:e,textColor:t,footerWidth:r},a),f.default.createElement(it,{footerWidth:r},f.default.createElement(nt,{footerWidth:r},"Premise HQ"),f.default.createElement(ct,{footerWidth:r},"|"),f.default.createElement(nt,{footerWidth:r},"All Rights Restricted 2020 ©")),f.default.createElement(it,{footerWidth:r},f.default.createElement(nt,{footerWidth:r},"Terms of use"),f.default.createElement(ct,{footerWidth:r},"|"),f.default.createElement(nt,{footerWidth:r},"Privacy Policy"))),exports.FormComponent=({formData:e,...l})=>{const o=e=>{switch(e.type){case"header":return(e=>f.default.createElement(t.Fragment,null,f.default.createElement(dt,v({},e,l),e.children),e))(e);case"label":return(e=>f.default.createElement(pt,v({style:{marginBottom:"7px",paddingBottom:"0"}},e,l)))(e);case"text":return(e=>f.default.createElement(pl,v({},e,l)))(e);case"textArea":return(e=>f.default.createElement(El,v({},e,l)))(e);case"number":return(e=>f.default.createElement(Yt,v({},e,l)))(e);case"radio":return(e=>f.default.createElement(nl,v({key:101*Math.random()|0},e,l)))(e);case"checkBox":return(e=>f.default.createElement(yt,v({},e,l)))(e);case"singleSelect":return(e=>f.default.createElement(Pt,v({dropdownType:"singleSelect"},e,l)))(e);case"multiSelect":return(e=>f.default.createElement(Pt,v({dropdownType:"multiSelect"},e,l)))(e);case"asyncSingleSelect":return(e=>f.default.createElement(Pt,v({dropdownType:"asyncSingleSelect"},e,l)))(e);case"asyncMultiSelect":return(e=>f.default.createElement(Pt,v({dropdownType:"asyncMultiSelect"},e,l)))(e);case"signature":return(e=>f.default.createElement(Al,v({},e,l)))(e);case"fileUpload":return(e=>f.default.createElement(Zt,v({},e,l)))(e);case"date":return(e=>f.default.createElement(Mt,v({},e,l)))(e);case"toggle":return(e=>f.default.createElement(Hl,v({},e,l)))(e);case"rating":return(e=>f.default.createElement(Jl,v({},e,l)))(e);case"buttonPrimary":return(e=>f.default.createElement(we,v({},e,l)))(e);case"buttonSecondary":return(e=>f.default.createElement(ze,v({},e,l)))(e);case"buttonTiny":return(e=>f.default.createElement(Re,v({},e,l)))(e);case"search":return(e=>f.default.createElement(fl,v({},e,l)))(e);case"table":return(e=>f.default.createElement(Ql,v({},e,l)))(e);case"passwordInput":return(e=>f.default.createElement(tl,v({},e,l)))(e);case"headerComponent":return(e=>f.default.createElement(Kl,v({},e,l)))(e)}};return f.default.createElement(t.Fragment,null,f.default.createElement(Ze,{defaultThemeColor:z},f.default.createElement(Ke,{onSubmit:()=>{console.log("form submit")}},e.map(((e,t)=>e.length>1?f.default.createElement(Ue,null,e.map(((t,l)=>f.default.createElement(Qe,{cols:e.length},o(t))))):o(e[0]))))))},exports.FormContainer=Ze,exports.FormWrapper=Ke,exports.GroupAvatars=$l,exports.GroupButtons=lo,exports.GroupButtonsPopup=uo,exports.GroupStatusCircle=ho,exports.Header=dt,exports.HeaderComponent=Kl,exports.HyperLink=Ao,exports.Icon=F,exports.Image=Y,exports.Label=pt,exports.LightSecondaryLink=Zo,exports.Loader=Ae,exports.ModalComp=Ro,exports.MultiColumnDiv=Qe,exports.MultiColumnWrapper=Ue,exports.Navbar=({headerContent:e,bodyContent:o,footerContent:r,selectedApp:a,setApp:i,toggleSideBarOpen:n,headerStyles:c,selectedStyle:s,notSelectedStyle:d,customStylesNameHover:u,listElementStyle:p,...m})=>{const g=l.useTheme()||z,[b,h]=t.useState(null),[y,x]=t.useState(null);return f.default.createElement("div",{onMouseLeave:()=>{h(null),x(null)},style:{display:"flex",flexDirection:"column",height:"100vh"},className:"NavbarDiv"},f.default.createElement(Yo,{theme:g,headerStyles:c},e),f.default.createElement(Do,null,o?.map(((e,t)=>f.default.createElement(X,{key:e.id,index:t,handleClick:e=>{!function(e){x(null),h(e)}(e)},isAccordionOpen:t===b,isSelected:e.userName===a.lev1,customStylesAccordionContainer:{padding:"0","box-shadow":"none","border-radius":"0px","background-color":"transparent"},customStylesAccordionTogggle:{padding:"0","box-shadow":"none","border-radius":"0px","background-color":"transparent","padding-left":"16px","padding-top":"7.5px","padding-bottom":"7.5px",cursor:"pointer"},customStylesAccordionContent:{transition:"height ease 0.2s",overflow:"hidden",padding:"0","background-color":"transparent",color:"white",position:"relative","box-shadow":"none"},contentToggle:f.default.createElement(re,{selectedStyle:s,notSelectedStyle:d,toggleName:n,customStylesName:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis",color:"white","font-weight":e.userName===a.lev1?"600":"400"},customStylesNameHover:u,size:"LG",user:e,isSelected:e.userName===a.lev1}),content:f.default.createElement("div",{style:{margin:"0",padding:"0",paddingLeft:"32px",marginBottom:"18.25px"}},e.subdirectory?.map(((t,l)=>f.default.createElement($o,{listElementStyle:p,key:e.id+t,onClick:()=>{console.log("Click: ",e.fullName,t),i({lev1:`${e.userName}`,lev2:`${t}`})}},f.default.createElement("span",{style:{visibility:a.lev2===t?"visible":"hidden"}}),f.default.createElement("p",{style:{marginTop:0===l&&"0px"}},t)))))})))),f.default.createElement(_o,null,f.default.createElement(Z,{index:0,handleClick:e=>{!function(e){h(null),x(e)}(e)},isAccordionOpen:0===y,customStylesAccordionContainer:{padding:"0","box-shadow":"none","border-radius":"0px","background-color":"transparent"},customStylesAccordionTogggle:{padding:"0","box-shadow":"none","border-radius":"0px","background-color":"transparent","padding-left":"16px","padding-top":"7.5px","padding-bottom":"7.5px",cursor:"pointer"},customStylesAccordionContent:{transition:"height ease 0.2s",overflow:"hidden",padding:"0","background-color":"transparent",color:"white",position:"relative","box-shadow":"none"},contentToggle:f.default.createElement(re,{selectedStyle:s,notSelectedStyle:d,toggleName:n,customStylesName:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis",color:"white","font-weight":"400"},customStylesNameHover:u,size:"LG",user:{fullName:"My Account",userName:"My Account",url:"https://picsum.photos/30"}}),content:f.default.createElement("div",{style:{margin:"0",padding:"0",paddingLeft:"32px",marginBottom:"18.25px"}},f.default.createElement(er,{listElementStyle:p,onClick:()=>{}},f.default.createElement("p",null,"Change Password")),f.default.createElement(er,{onClick:()=>{}},f.default.createElement("p",null,"Sign Out")))}),f.default.createElement(Z,{handleClick:()=>{},customStylesAccordionContainer:{padding:"0","box-shadow":"none","border-radius":"0px","background-color":"transparent"},customStylesAccordionTogggle:{padding:"0","box-shadow":"none","border-radius":"0px","background-color":"transparent","padding-left":"16px","padding-top":"7.5px","padding-bottom":"7.5px",cursor:"pointer"},customStylesAccordionContent:{transition:"height ease 0.2s",overflow:"hidden",padding:"0","background-color":"transparent",color:"white",position:"relative","box-shadow":"none"},contentToggle:f.default.createElement(ce,{selectedStyle:s,notSelectedStyle:d,toggleName:n,customStylesName:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis",color:"white","font-weight":"400"},customStylesNameHover:{"text-decoration":"underline"},size:"LG",user:{fullName:"Users",userName:"Users"},value:"+"+r.length}),disable:!0})))},exports.NumericInput=Yt,exports.Overlay=Bo,exports.OverlayOptionContainer=Ge,exports.OverlayOptionItemLabel=Oe,exports.PageContent=Ie,exports.Pagination=Wo,exports.PasswordInput=tl,exports.PrimaryButton=we,exports.PrimaryStatusChip=or,exports.ProgressBar=qo,exports.ProgressSteps=Oo,exports.RadioInput=nl,exports.Rating=Jl,exports.SearchInput=fl,exports.SecondaryButton=ze,exports.SecondaryStatusChip=ir,exports.Sidebar=No,exports.SignatureInput=Al,exports.SlimPrimaryStatusChip=sr,exports.SlimSecondaryStatusChip=pr,exports.StatusCircle=fo,exports.StyledCentralBar=Le,exports.StyledClearSearch=Pe,exports.StyledCreateRow=qe,exports.StyledRow=He,exports.StyledRowSearch=We,exports.StyledSearchRow=je,exports.StyledWarning=Te,exports.SubmitButtonContainer=Je,exports.SubmitComponent=({formData:e,onSubmit:l,onReset:o,style:r,...a})=>{const i=e=>{switch(e.type){case"submit":return(e=>f.default.createElement(we,{block:e.block,style:e.style,disabled:e.disabled,type:"submit",children:e.children,onClick:()=>{e.onClick()}}))(e);case"reset":case"cancel":return(e=>f.default.createElement(ze,{block:e.block,disabled:a.disabled,children:e.children,onClick:()=>{e.onClick()}}))(e)}};return f.default.createElement(t.Fragment,null,f.default.createElement(Je,{style:r},e&&e.map(((e,t)=>e.map(((e,t)=>i(e)))))))},exports.Table=Ql,exports.TextArea=El,exports.TextInput=pl,exports.TimeInput=Wl,exports.TinyButton=Re,exports.ToggleSwitch=Hl,exports.Tooltip=xr,exports.Typography=Cr,exports.graphColor=k,exports.hexToRGB=he,exports.neutralColor=w,exports.primaryColor=C,exports.shadeColor=E,exports.uiColor=S;
|