@hexure/ui 1.11.0 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +180 -74
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/AppHeader/AppHeader.d.ts +1 -1
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/esm/index.js +181 -76
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/AppHeader/AppHeader.d.ts +1 -1
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/index.d.ts +20 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -467,6 +467,145 @@ const AppHeader = ({ logoUrl, buttons = [] }) => {
|
|
|
467
467
|
};
|
|
468
468
|
|
|
469
469
|
const Wrapper$g = styled.div `
|
|
470
|
+
display: inline-block;
|
|
471
|
+
border-radius: 4px;
|
|
472
|
+
padding: 4px 6px;
|
|
473
|
+
background: ${props => Colors[props.$color].Hex};
|
|
474
|
+
color: #ffffff;
|
|
475
|
+
box-sizing: border-box;
|
|
476
|
+
cursor: ${props => (props.$removable ? 'pointer' : 'default')};
|
|
477
|
+
`;
|
|
478
|
+
const Content$3 = styled.div `
|
|
479
|
+
display: flex;
|
|
480
|
+
align-items: center;
|
|
481
|
+
`;
|
|
482
|
+
const Label$4 = styled.div `
|
|
483
|
+
color: ${props => (props.$color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff')};
|
|
484
|
+
font-size: ${FontSizes.SMALL};
|
|
485
|
+
font-weight: 500;
|
|
486
|
+
font-family: ${FontStyles.DEFAULT};
|
|
487
|
+
line-height: 1.2em;
|
|
488
|
+
`;
|
|
489
|
+
const Remove$1 = styled.div `
|
|
490
|
+
margin-left: 10px;
|
|
491
|
+
display: flex;
|
|
492
|
+
align-items: center;
|
|
493
|
+
`;
|
|
494
|
+
const Tag = (_a) => {
|
|
495
|
+
var { children, color = 'PRIMARY', removable, onClick } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick"]);
|
|
496
|
+
return (React.createElement(Wrapper$g, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps),
|
|
497
|
+
React.createElement(Content$3, null,
|
|
498
|
+
React.createElement(Label$4, { "$color": color }, children),
|
|
499
|
+
removable ? (React.createElement(Remove$1, null,
|
|
500
|
+
React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', path: js.mdiClose, size: '15px' }))) : null)));
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
const SidebarContainer = styled.div `
|
|
504
|
+
border-right: 1px solid ${Colors.LIGHT_GRAY.Hex};
|
|
505
|
+
display: flex;
|
|
506
|
+
flex-direction: column;
|
|
507
|
+
height: 100%;
|
|
508
|
+
padding: 12px 0px;
|
|
509
|
+
width: ${props => (props.$isOpen ? '280px' : '60px')};
|
|
510
|
+
`;
|
|
511
|
+
const MenuWrapper = styled.div `
|
|
512
|
+
display: flex;
|
|
513
|
+
align-items: center;
|
|
514
|
+
border-left-width: 4px;
|
|
515
|
+
border-left-style: solid;
|
|
516
|
+
border-left-color: ${props => (props.$active ? props.$color.Hex : 'transparent')};
|
|
517
|
+
cursor: pointer;
|
|
518
|
+
height: 40px;
|
|
519
|
+
|
|
520
|
+
&:hover > div {
|
|
521
|
+
color: ${props => props.$color.Hex};
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
&:hover > svg > path {
|
|
525
|
+
fill: ${Colors.BLACK.Hex} !important;
|
|
526
|
+
}
|
|
527
|
+
`;
|
|
528
|
+
const MenuIcon = styled(Icon) `
|
|
529
|
+
width: 20px;
|
|
530
|
+
height: 20px;
|
|
531
|
+
margin: 0px 16px;
|
|
532
|
+
flex-shrink: 0;
|
|
533
|
+
|
|
534
|
+
> path {
|
|
535
|
+
fill: ${({ $active }) => ($active ? Colors.BLACK.Hex : Colors.MEDIUM_GRAY.Hex)} !important;
|
|
536
|
+
}
|
|
537
|
+
`;
|
|
538
|
+
const MenuLabel = styled.div `
|
|
539
|
+
color: ${props => (props.$active ? props.$color.Hex : Colors.BLACK.Hex)};
|
|
540
|
+
flex: 1;
|
|
541
|
+
font-size: 12px;
|
|
542
|
+
font-style: normal;
|
|
543
|
+
font-weight: 600;
|
|
544
|
+
font-family: 'Roboto', Helvetica, Arial, sans-serif;
|
|
545
|
+
line-height: 16px;
|
|
546
|
+
padding: 12px 0px;
|
|
547
|
+
letter-spacing: 1px;
|
|
548
|
+
`;
|
|
549
|
+
const SubMenu = styled.div `
|
|
550
|
+
overflow-y: auto;
|
|
551
|
+
padding-left: 44px;
|
|
552
|
+
padding-right: 20px;
|
|
553
|
+
padding-bottom: 10px;
|
|
554
|
+
`;
|
|
555
|
+
const SubMenuItem = styled.a `
|
|
556
|
+
display: block;
|
|
557
|
+
padding: 8px 12px;
|
|
558
|
+
border-radius: 8px;
|
|
559
|
+
font-size: 13px;
|
|
560
|
+
font-family: 'Roboto', Helvetica, Arial, sans-serif;
|
|
561
|
+
line-height: 20px;
|
|
562
|
+
text-decoration: none;
|
|
563
|
+
font-weight: ${({ $active }) => ($active ? '500' : '400')};
|
|
564
|
+
color: ${({ $active }) => ($active ? Colors.BLACK.Hex : Colors.GRAY.Hex)};
|
|
565
|
+
background: ${props => (props.$active ? `rgba(${props.$color.Rgb}, 0.1)` : '#fff')};
|
|
566
|
+
cursor: pointer;
|
|
567
|
+
|
|
568
|
+
&:hover {
|
|
569
|
+
color: ${props => props.$color.Hex};
|
|
570
|
+
font-weight: 500;
|
|
571
|
+
}
|
|
572
|
+
`;
|
|
573
|
+
const Footer = styled.div `
|
|
574
|
+
padding: 20px 14px 0px;
|
|
575
|
+
display: flex;
|
|
576
|
+
align-items: center;
|
|
577
|
+
`;
|
|
578
|
+
const FooterInfo = styled.div `
|
|
579
|
+
display: flex;
|
|
580
|
+
flex-direction: column;
|
|
581
|
+
flex: 1;
|
|
582
|
+
align-items: flex-start;
|
|
583
|
+
`;
|
|
584
|
+
const SidebarMenuContainer = styled.div `
|
|
585
|
+
flex-grow: 1;
|
|
586
|
+
`;
|
|
587
|
+
const AppMenu = ({ menu, isCollapsed, footerTag }) => {
|
|
588
|
+
const theme = React.useContext(styled.ThemeContext) || EditableTheme;
|
|
589
|
+
const [collapsed, toggleCollapse] = React.useState(isCollapsed);
|
|
590
|
+
return (React.createElement(SidebarContainer, { "$isOpen": !collapsed },
|
|
591
|
+
React.createElement(SidebarMenuContainer, null, menu.map(nav_item => {
|
|
592
|
+
return (React.createElement(React.Fragment, { key: nav_item.label },
|
|
593
|
+
React.createElement(MenuWrapper, { "$active": !!nav_item.is_active, "$color": theme.PRIMARY_COLOR, onClick: nav_item.onClick },
|
|
594
|
+
React.createElement(MenuIcon, { "$active": !!nav_item.is_active, path: nav_item.icon }),
|
|
595
|
+
collapsed ? null : (React.createElement(MenuLabel, { "$active": nav_item.is_active, "$color": theme.PRIMARY_COLOR }, nav_item.label))),
|
|
596
|
+
nav_item.is_active && nav_item.menu && !collapsed ? (React.createElement(SubMenu, null, nav_item.menu.map(menu_item => (React.createElement(SubMenuItem, { "$active": menu_item.is_active, "$color": theme.PRIMARY_COLOR, key: menu_item.label, onClick: menu_item.onClick }, menu_item.label))))) : null));
|
|
597
|
+
})),
|
|
598
|
+
React.createElement(Footer, null,
|
|
599
|
+
collapsed ? null : (React.createElement(FooterInfo, null,
|
|
600
|
+
footerTag ? React.createElement(Tag, null, footerTag) : null,
|
|
601
|
+
React.createElement(Copy, { margin: '8px 0 0 0', type: 'small' },
|
|
602
|
+
"\u00A9 ",
|
|
603
|
+
new Date().getFullYear(),
|
|
604
|
+
" Hexure"))),
|
|
605
|
+
React.createElement(Button, { icon: collapsed ? js.mdiChevronRight : js.mdiChevronLeft, onClick: () => toggleCollapse(!collapsed), small: true }))));
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
const Wrapper$f = styled.div `
|
|
470
609
|
border: 1px solid ${props => props.theme.PRIMARY_COLOR.Hex};
|
|
471
610
|
border-radius: 8px;
|
|
472
611
|
box-sizing: border-box;
|
|
@@ -475,7 +614,7 @@ const Wrapper$g = styled.div `
|
|
|
475
614
|
justify-content: space-between;
|
|
476
615
|
padding: 16px 20px;
|
|
477
616
|
`;
|
|
478
|
-
Wrapper$
|
|
617
|
+
Wrapper$f.defaultProps = { theme: EditableTheme };
|
|
479
618
|
const Left = styled.div `
|
|
480
619
|
box-sizing: border-box;
|
|
481
620
|
display: flex;
|
|
@@ -536,7 +675,7 @@ const ErrorMsg = styled.span `
|
|
|
536
675
|
`;
|
|
537
676
|
const BulkActionBar = (_a) => {
|
|
538
677
|
var { actions = [], errorMsg, onClear, selectedCount = 0 } = _a, accessibleProps = __rest(_a, ["actions", "errorMsg", "onClear", "selectedCount"]);
|
|
539
|
-
return (React.createElement(Wrapper$
|
|
678
|
+
return (React.createElement(Wrapper$f, Object.assign({}, accessibleProps),
|
|
540
679
|
React.createElement(Left, null,
|
|
541
680
|
React.createElement(Info$1, null,
|
|
542
681
|
React.createElement(Selected, null,
|
|
@@ -549,7 +688,7 @@ const BulkActionBar = (_a) => {
|
|
|
549
688
|
React.createElement(ErrorMsg, null, errorMsg))) : null));
|
|
550
689
|
};
|
|
551
690
|
|
|
552
|
-
const Wrapper$
|
|
691
|
+
const Wrapper$e = styled.div `
|
|
553
692
|
background: #fff;
|
|
554
693
|
border-radius: 8px;
|
|
555
694
|
box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
|
|
@@ -590,14 +729,14 @@ const Title$1 = styled.span `
|
|
|
590
729
|
`;
|
|
591
730
|
const MoreMenu = (_a) => {
|
|
592
731
|
var { maxHeight, menuItems = [] } = _a, accessibleProps = __rest(_a, ["maxHeight", "menuItems"]);
|
|
593
|
-
return (React.createElement(Wrapper$
|
|
732
|
+
return (React.createElement(Wrapper$e, Object.assign({ "$maxHeight": maxHeight }, accessibleProps), menuItems.map((item, i) => {
|
|
594
733
|
return (React.createElement(MenuItem, { key: i, onClick: item.onClick },
|
|
595
734
|
item.icon ? (React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: item.icon, size: '20px' })) : null,
|
|
596
735
|
React.createElement(Title$1, null, item.label)));
|
|
597
736
|
})));
|
|
598
737
|
};
|
|
599
738
|
|
|
600
|
-
const Wrapper$
|
|
739
|
+
const Wrapper$d = styled.div `
|
|
601
740
|
position: relative;
|
|
602
741
|
display: inline-block;
|
|
603
742
|
`;
|
|
@@ -611,12 +750,12 @@ const StyledMoreMenu = styled(MoreMenu) `
|
|
|
611
750
|
`;
|
|
612
751
|
const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'right', format = 'primary', menuWidth = '200px', }) => {
|
|
613
752
|
const [show_menu, toggleMenu] = React.useState(false);
|
|
614
|
-
return (React.createElement(Wrapper$
|
|
753
|
+
return (React.createElement(Wrapper$d, { onMouseEnter: disabled ? undefined : toggleMenu.bind(null, true), onMouseLeave: disabled ? undefined : toggleMenu.bind(null, false) },
|
|
615
754
|
React.createElement(Button, { disabled: disabled, format: format, icon: js.mdiDotsHorizontal, small: small }, label),
|
|
616
755
|
show_menu ? (React.createElement(StyledMoreMenu, { "$menuWidth": menuWidth, "$position": position, "$small": small, maxHeight: maxHeight, menuItems: menuItems })) : null));
|
|
617
756
|
};
|
|
618
757
|
|
|
619
|
-
const Wrapper$
|
|
758
|
+
const Wrapper$c = styled.label `
|
|
620
759
|
border-radius: 4px;
|
|
621
760
|
padding: 4px 0px 4px 6px;
|
|
622
761
|
margin-left: -6px;
|
|
@@ -631,14 +770,14 @@ const Wrapper$d = styled.label `
|
|
|
631
770
|
background: ${props => `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)`};
|
|
632
771
|
}
|
|
633
772
|
`;
|
|
634
|
-
Wrapper$
|
|
773
|
+
Wrapper$c.defaultProps = { theme: EditableTheme };
|
|
635
774
|
const Input$2 = styled.input `
|
|
636
775
|
font-size: 20px;
|
|
637
776
|
margin: 5px 0px 0px 0px;
|
|
638
777
|
line-height: 1.1em;
|
|
639
778
|
box-sizing: border-box;
|
|
640
779
|
`;
|
|
641
|
-
const Label$
|
|
780
|
+
const Label$3 = styled.span `
|
|
642
781
|
font-family: ${FontStyles.DEFAULT};
|
|
643
782
|
font-size: ${FontSizes.DEFAULT};
|
|
644
783
|
font-weight: 400;
|
|
@@ -649,9 +788,9 @@ const Label$4 = styled.span `
|
|
|
649
788
|
`;
|
|
650
789
|
const Checkbox = (_a) => {
|
|
651
790
|
var { children, disabled, checked, onChange } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange"]);
|
|
652
|
-
return (React.createElement(Wrapper$
|
|
791
|
+
return (React.createElement(Wrapper$c, Object.assign({}, accessibleProps),
|
|
653
792
|
React.createElement(Input$2, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'checkbox' }),
|
|
654
|
-
children ? React.createElement(Label$
|
|
793
|
+
children ? React.createElement(Label$3, null, children) : null));
|
|
655
794
|
};
|
|
656
795
|
|
|
657
796
|
const SelectAll = styled.div `
|
|
@@ -700,7 +839,7 @@ const Checklist = (_a) => {
|
|
|
700
839
|
}))));
|
|
701
840
|
};
|
|
702
841
|
|
|
703
|
-
const Wrapper$
|
|
842
|
+
const Wrapper$b = styled.div `
|
|
704
843
|
border-radius: 4px;
|
|
705
844
|
height: 40px;
|
|
706
845
|
background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
|
|
@@ -721,7 +860,7 @@ const Wrapper$c = styled.div `
|
|
|
721
860
|
border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
|
|
722
861
|
}
|
|
723
862
|
`;
|
|
724
|
-
Wrapper$
|
|
863
|
+
Wrapper$b.defaultProps = { theme: EditableTheme };
|
|
725
864
|
const Trigger$1 = styled.select `
|
|
726
865
|
appearance: none;
|
|
727
866
|
box-shadow: none;
|
|
@@ -749,7 +888,7 @@ const IconWrapper$2 = styled(Icon) `
|
|
|
749
888
|
`;
|
|
750
889
|
const Select = (_a) => {
|
|
751
890
|
var { options, optionGroups, placeholder, readOnly, invalid, value, onChange, style } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "value", "onChange", "style"]);
|
|
752
|
-
return (React.createElement(Wrapper$
|
|
891
|
+
return (React.createElement(Wrapper$b, { "$invalid": invalid, "$readOnly": readOnly, "$style": style },
|
|
753
892
|
React.createElement(Trigger$1, Object.assign({ disabled: readOnly, onChange: onChange, placeholder: placeholder, value: value }, accessibleProps),
|
|
754
893
|
placeholder ? (React.createElement("option", { disabled: true, value: '' }, placeholder)) : null,
|
|
755
894
|
optionGroups &&
|
|
@@ -922,7 +1061,7 @@ const Drawer = (_a) => {
|
|
|
922
1061
|
scrim ? React.createElement(Scrim$1, { "$position": position, "$scrim": scrim, onClick: onClose }) : null));
|
|
923
1062
|
};
|
|
924
1063
|
|
|
925
|
-
const Wrapper$
|
|
1064
|
+
const Wrapper$a = styled.div `
|
|
926
1065
|
display: inline-block;
|
|
927
1066
|
position: relative;
|
|
928
1067
|
height: 16px;
|
|
@@ -963,16 +1102,16 @@ const positions = {
|
|
|
963
1102
|
transform: 'translateY(-50%)',
|
|
964
1103
|
},
|
|
965
1104
|
};
|
|
966
|
-
const Content$
|
|
967
|
-
Content$
|
|
1105
|
+
const Content$2 = styled.div(props => (Object.assign({ position: 'absolute', borderRadius: '4px', borderWidth: '1px', borderStyle: 'solid', borderColor: props.theme.PRIMARY_COLOR.Hex, background: '#ffffff', boxShadow: '0px 5px 30px -10px rgba(0, 0, 0, 0.5)', width: props.$width || '240px', padding: '10px 12px', zIndex: 10 }, positions[props.$position])));
|
|
1106
|
+
Content$2.defaultProps = { theme: EditableTheme };
|
|
968
1107
|
const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, }) => {
|
|
969
1108
|
const [show_content, toggleContent] = React.useState(false);
|
|
970
|
-
return (React.createElement(Wrapper$
|
|
1109
|
+
return (React.createElement(Wrapper$a, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
|
|
971
1110
|
trigger || React.createElement(StyledIcon$4, { path: js.mdiInformationOutline }),
|
|
972
|
-
show_content ? (React.createElement(Content$
|
|
1111
|
+
show_content ? (React.createElement(Content$2, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
|
|
973
1112
|
};
|
|
974
1113
|
|
|
975
|
-
const Wrapper$
|
|
1114
|
+
const Wrapper$9 = styled.div(props => (Object.assign({ margin: '0px 0px 18px 0px' }, props.style)));
|
|
976
1115
|
const LabelRow = styled.div `
|
|
977
1116
|
display: flex;
|
|
978
1117
|
align-items: center;
|
|
@@ -980,7 +1119,7 @@ const LabelRow = styled.div `
|
|
|
980
1119
|
margin: 0 0 4px 0;
|
|
981
1120
|
box-sizing: border-box;
|
|
982
1121
|
`;
|
|
983
|
-
const Label$
|
|
1122
|
+
const Label$2 = styled.label `
|
|
984
1123
|
font-size: ${FontSizes.DEFAULT};
|
|
985
1124
|
font-weight: 500;
|
|
986
1125
|
line-height: 1em;
|
|
@@ -1022,9 +1161,9 @@ const Validation = styled.div `
|
|
|
1022
1161
|
`;
|
|
1023
1162
|
const Field = (_a) => {
|
|
1024
1163
|
var { action, children, validationText, label, description, required, htmlFor, style, tooltip } = _a, accessibleProps = __rest(_a, ["action", "children", "validationText", "label", "description", "required", "htmlFor", "style", "tooltip"]);
|
|
1025
|
-
return (React.createElement(Wrapper$
|
|
1164
|
+
return (React.createElement(Wrapper$9, Object.assign({ style: style }, accessibleProps),
|
|
1026
1165
|
React.createElement(LabelRow, null,
|
|
1027
|
-
React.createElement(Label$
|
|
1166
|
+
React.createElement(Label$2, { htmlFor: htmlFor },
|
|
1028
1167
|
label,
|
|
1029
1168
|
required ? React.createElement(Required, null, "*") : null,
|
|
1030
1169
|
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null),
|
|
@@ -1034,7 +1173,7 @@ const Field = (_a) => {
|
|
|
1034
1173
|
validationText ? React.createElement(Validation, null, validationText) : null));
|
|
1035
1174
|
};
|
|
1036
1175
|
|
|
1037
|
-
const Wrapper$
|
|
1176
|
+
const Wrapper$8 = styled.fieldset `
|
|
1038
1177
|
margin-inline-start: 0px;
|
|
1039
1178
|
margin-inline-end: 0px;
|
|
1040
1179
|
padding-block-start: 0px;
|
|
@@ -1047,7 +1186,7 @@ const Wrapper$9 = styled.fieldset `
|
|
|
1047
1186
|
border-color: transparent;
|
|
1048
1187
|
border-image: none;
|
|
1049
1188
|
`;
|
|
1050
|
-
const Label$
|
|
1189
|
+
const Label$1 = styled.legend `
|
|
1051
1190
|
padding-inline-start: 0px;
|
|
1052
1191
|
padding-inline-end: 0px;
|
|
1053
1192
|
|
|
@@ -1058,15 +1197,15 @@ const Label$2 = styled.legend `
|
|
|
1058
1197
|
line-height: 22px;
|
|
1059
1198
|
margin-bottom: 6px;
|
|
1060
1199
|
`;
|
|
1061
|
-
const Content$
|
|
1200
|
+
const Content$1 = styled.div `
|
|
1062
1201
|
padding: 20px;
|
|
1063
1202
|
border-radius: 8px;
|
|
1064
1203
|
background: #fcfcfc;
|
|
1065
1204
|
`;
|
|
1066
1205
|
const FieldGroup = ({ children, label }) => {
|
|
1067
|
-
return (React.createElement(Wrapper$
|
|
1068
|
-
React.createElement(Label$
|
|
1069
|
-
React.createElement(Content$
|
|
1206
|
+
return (React.createElement(Wrapper$8, null,
|
|
1207
|
+
React.createElement(Label$1, null, label),
|
|
1208
|
+
React.createElement(Content$1, null, children)));
|
|
1070
1209
|
};
|
|
1071
1210
|
|
|
1072
1211
|
const Dropzone = styled.div `
|
|
@@ -1102,7 +1241,7 @@ const ClickZone = styled.div `
|
|
|
1102
1241
|
align-items: center;
|
|
1103
1242
|
gap: 16px;
|
|
1104
1243
|
`;
|
|
1105
|
-
const Content
|
|
1244
|
+
const Content = styled.div `
|
|
1106
1245
|
display: flex;
|
|
1107
1246
|
flex-direction: column;
|
|
1108
1247
|
align-items: center;
|
|
@@ -1125,7 +1264,7 @@ const File = styled.div `
|
|
|
1125
1264
|
border: 1px solid #cccccc;
|
|
1126
1265
|
background: #ffffff;
|
|
1127
1266
|
`;
|
|
1128
|
-
const Remove
|
|
1267
|
+
const Remove = styled(Icon) `
|
|
1129
1268
|
width: 24px;
|
|
1130
1269
|
height: 24px;
|
|
1131
1270
|
cursor: pointer;
|
|
@@ -1235,12 +1374,12 @@ const FileUpload = ({ accept, onChange, onError, maxFiles = 10, maxSize = 2, mes
|
|
|
1235
1374
|
files.length ? (React.createElement(Files, null, files.map(file => {
|
|
1236
1375
|
return (React.createElement(File, { key: file.name },
|
|
1237
1376
|
React.createElement(Copy, { type: 'bold' }, file.name),
|
|
1238
|
-
React.createElement(Remove
|
|
1377
|
+
React.createElement(Remove, { onClick: handleRemove.bind(null, file), path: js.mdiMinusCircle })));
|
|
1239
1378
|
}))) : null,
|
|
1240
1379
|
allowMoreFiles ? (React.createElement(ClickZone, { onClick: triggerFileExplorer },
|
|
1241
1380
|
files.length ? null : (React.createElement(IconWrapper$1, { "$dragging": dragging },
|
|
1242
1381
|
React.createElement(StyledIcon$3, { path: js.mdiFolderPlusOutline }))),
|
|
1243
|
-
React.createElement(Content
|
|
1382
|
+
React.createElement(Content, null,
|
|
1244
1383
|
React.createElement(Copy, { align: 'center', type: 'bold' }, "Drag & drop files here or click to select files"),
|
|
1245
1384
|
message ? (React.createElement(Copy, { align: 'center', color: 'GRAY' }, message)) : null))) : null)));
|
|
1246
1385
|
};
|
|
@@ -1505,7 +1644,7 @@ const Input$1 = (_a) => {
|
|
|
1505
1644
|
}))) : null));
|
|
1506
1645
|
};
|
|
1507
1646
|
|
|
1508
|
-
const Wrapper$
|
|
1647
|
+
const Wrapper$7 = styled.a `
|
|
1509
1648
|
color: ${props => props.theme.PRIMARY_COLOR.Hex};
|
|
1510
1649
|
font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
|
|
1511
1650
|
line-height: ${props => (props.$small ? '1.5em' : '1.6em')};
|
|
@@ -1519,10 +1658,10 @@ const Wrapper$8 = styled.a `
|
|
|
1519
1658
|
box-sizing: border-box;
|
|
1520
1659
|
cursor: pointer;
|
|
1521
1660
|
`;
|
|
1522
|
-
Wrapper$
|
|
1661
|
+
Wrapper$7.defaultProps = { theme: EditableTheme };
|
|
1523
1662
|
const Link = (_a) => {
|
|
1524
1663
|
var { children, onClick, small } = _a, accessibleProps = __rest(_a, ["children", "onClick", "small"]);
|
|
1525
|
-
return (React.createElement(Wrapper$
|
|
1664
|
+
return (React.createElement(Wrapper$7, Object.assign({ "$small": small, onClick: onClick }, accessibleProps), children));
|
|
1526
1665
|
};
|
|
1527
1666
|
|
|
1528
1667
|
const dash = styled.keyframes `
|
|
@@ -1609,7 +1748,7 @@ const ProgressBar = ({ steps }) => {
|
|
|
1609
1748
|
})));
|
|
1610
1749
|
};
|
|
1611
1750
|
|
|
1612
|
-
const Wrapper$
|
|
1751
|
+
const Wrapper$6 = styled.div `
|
|
1613
1752
|
position: fixed;
|
|
1614
1753
|
top: 0;
|
|
1615
1754
|
right: 0;
|
|
@@ -1689,7 +1828,7 @@ const Modal = (_a) => {
|
|
|
1689
1828
|
document.onkeydown = null;
|
|
1690
1829
|
};
|
|
1691
1830
|
}, []);
|
|
1692
|
-
return (React.createElement(Wrapper$
|
|
1831
|
+
return (React.createElement(Wrapper$6, null,
|
|
1693
1832
|
React.createElement(Container$1, Object.assign({ "$fullscreen": fullscreen, "$maxWidth": maxWidth, open: true }, accessibleProps),
|
|
1694
1833
|
React.createElement(Header$1, null,
|
|
1695
1834
|
title ? React.createElement(Heading, { type: 'secondary' }, title) : null,
|
|
@@ -1710,7 +1849,7 @@ const Modal = (_a) => {
|
|
|
1710
1849
|
primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: 'primary', margin: '0px 0px 0px 10px' }))) : null)) : null)) : null)));
|
|
1711
1850
|
};
|
|
1712
1851
|
|
|
1713
|
-
const Wrapper$
|
|
1852
|
+
const Wrapper$5 = styled.div `
|
|
1714
1853
|
position: relative;
|
|
1715
1854
|
width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
|
|
1716
1855
|
`;
|
|
@@ -1782,7 +1921,7 @@ const MultiSelect = (_a) => {
|
|
|
1782
1921
|
var { readOnly, displayCount = 3, invalid, onChange, options = [], selected = [], showSelectAll, style } = _a, accessibleProps = __rest(_a, ["readOnly", "displayCount", "invalid", "onChange", "options", "selected", "showSelectAll", "style"]);
|
|
1783
1922
|
const [showOptions, setShowOptions] = React.useState(false);
|
|
1784
1923
|
const selected_options = options.filter(o => selected.includes(o.value));
|
|
1785
|
-
return (React.createElement(Wrapper$
|
|
1924
|
+
return (React.createElement(Wrapper$5, { "$style": style },
|
|
1786
1925
|
React.createElement(Trigger, Object.assign({ "$invalid": invalid, "$readOnly": readOnly, "$showOptions": showOptions, onClick: readOnly ? undefined : setShowOptions.bind(null, !showOptions) }, accessibleProps),
|
|
1787
1926
|
React.createElement(Value, null, selected.length > 0 && selected.length <= displayCount
|
|
1788
1927
|
? selected_options.map(o => o.label || o.value).join(', ')
|
|
@@ -1793,40 +1932,6 @@ const MultiSelect = (_a) => {
|
|
|
1793
1932
|
showOptions ? React.createElement(Scrim, { onClick: setShowOptions.bind(null, !showOptions) }) : null));
|
|
1794
1933
|
};
|
|
1795
1934
|
|
|
1796
|
-
const Wrapper$5 = styled.div `
|
|
1797
|
-
display: inline-block;
|
|
1798
|
-
border-radius: 4px;
|
|
1799
|
-
padding: 4px 6px;
|
|
1800
|
-
background: ${props => Colors[props.$color].Hex};
|
|
1801
|
-
color: #ffffff;
|
|
1802
|
-
box-sizing: border-box;
|
|
1803
|
-
cursor: ${props => (props.$removable ? 'pointer' : 'default')};
|
|
1804
|
-
`;
|
|
1805
|
-
const Content = styled.div `
|
|
1806
|
-
display: flex;
|
|
1807
|
-
align-items: center;
|
|
1808
|
-
`;
|
|
1809
|
-
const Label$1 = styled.div `
|
|
1810
|
-
color: ${props => (props.$color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff')};
|
|
1811
|
-
font-size: ${FontSizes.SMALL};
|
|
1812
|
-
font-weight: 500;
|
|
1813
|
-
font-family: ${FontStyles.DEFAULT};
|
|
1814
|
-
line-height: 1.2em;
|
|
1815
|
-
`;
|
|
1816
|
-
const Remove = styled.div `
|
|
1817
|
-
margin-left: 10px;
|
|
1818
|
-
display: flex;
|
|
1819
|
-
align-items: center;
|
|
1820
|
-
`;
|
|
1821
|
-
const Tag = (_a) => {
|
|
1822
|
-
var { children, color = 'PRIMARY', removable, onClick } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick"]);
|
|
1823
|
-
return (React.createElement(Wrapper$5, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps),
|
|
1824
|
-
React.createElement(Content, null,
|
|
1825
|
-
React.createElement(Label$1, { "$color": color }, children),
|
|
1826
|
-
removable ? (React.createElement(Remove, null,
|
|
1827
|
-
React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', path: js.mdiClose, size: '15px' }))) : null)));
|
|
1828
|
-
};
|
|
1829
|
-
|
|
1830
1935
|
const Wrapper$4 = styled.div `
|
|
1831
1936
|
display: flex;
|
|
1832
1937
|
padding: 16px 30px;
|
|
@@ -2166,6 +2271,7 @@ exports.Accordion = Accordion;
|
|
|
2166
2271
|
exports.ActionDialog = ActionDialog;
|
|
2167
2272
|
exports.Alert = Alert;
|
|
2168
2273
|
exports.AppHeader = AppHeader;
|
|
2274
|
+
exports.AppMenu = AppMenu;
|
|
2169
2275
|
exports.BulkActionBar = BulkActionBar;
|
|
2170
2276
|
exports.Button = Button;
|
|
2171
2277
|
exports.ButtonMenu = ButtonMenu;
|