@hexure/ui 1.11.11 → 1.11.12
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 +64 -60
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/cjs/types/components/Radio/Radio.d.ts +3 -0
- package/dist/esm/index.js +64 -60
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/esm/types/components/Radio/Radio.d.ts +3 -0
- package/dist/index.d.ts +16 -12
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -758,7 +758,57 @@ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = '
|
|
|
758
758
|
show_menu ? (React.createElement(StyledMoreMenu, { "$menuWidth": menuWidth, "$position": position, "$small": small, maxHeight: maxHeight, menuItems: menuItems })) : null));
|
|
759
759
|
};
|
|
760
760
|
|
|
761
|
-
const Wrapper$c = styled.
|
|
761
|
+
const Wrapper$c = styled.div `
|
|
762
|
+
display: inline-block;
|
|
763
|
+
position: relative;
|
|
764
|
+
height: 16px;
|
|
765
|
+
`;
|
|
766
|
+
const StyledIcon$4 = styled(Icon) `
|
|
767
|
+
width: 16px;
|
|
768
|
+
height: 16px;
|
|
769
|
+
margin: 0px 6px;
|
|
770
|
+
color: ${props => props.theme.PRIMARY_COLOR.Hex};
|
|
771
|
+
cursor: pointer;
|
|
772
|
+
`;
|
|
773
|
+
StyledIcon$4.defaultProps = { theme: EditableTheme };
|
|
774
|
+
const positions = {
|
|
775
|
+
'right-top': {
|
|
776
|
+
top: '0px',
|
|
777
|
+
left: '28px',
|
|
778
|
+
},
|
|
779
|
+
'right-bottom': {
|
|
780
|
+
bottom: '0px',
|
|
781
|
+
left: '28px',
|
|
782
|
+
},
|
|
783
|
+
'right-center': {
|
|
784
|
+
top: '50%',
|
|
785
|
+
left: '28px',
|
|
786
|
+
transform: 'translateY(-50%)',
|
|
787
|
+
},
|
|
788
|
+
'left-top': {
|
|
789
|
+
top: '0px',
|
|
790
|
+
right: '28px',
|
|
791
|
+
},
|
|
792
|
+
'left-bottom': {
|
|
793
|
+
bottom: '0px',
|
|
794
|
+
right: '28px',
|
|
795
|
+
},
|
|
796
|
+
'left-center': {
|
|
797
|
+
top: '50%',
|
|
798
|
+
right: '28px',
|
|
799
|
+
transform: 'translateY(-50%)',
|
|
800
|
+
},
|
|
801
|
+
};
|
|
802
|
+
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])));
|
|
803
|
+
Content$2.defaultProps = { theme: EditableTheme };
|
|
804
|
+
const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, }) => {
|
|
805
|
+
const [show_content, toggleContent] = React.useState(false);
|
|
806
|
+
return (React.createElement(Wrapper$c, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
|
|
807
|
+
trigger || React.createElement(StyledIcon$4, { path: js.mdiInformationOutline }),
|
|
808
|
+
show_content ? (React.createElement(Content$2, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
const Wrapper$b = styled.label `
|
|
762
812
|
border-radius: 4px;
|
|
763
813
|
padding: 4px 0px 4px 6px;
|
|
764
814
|
margin-left: -6px;
|
|
@@ -774,7 +824,7 @@ const Wrapper$c = styled.label `
|
|
|
774
824
|
background: ${props => `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)`};
|
|
775
825
|
}
|
|
776
826
|
`;
|
|
777
|
-
Wrapper$
|
|
827
|
+
Wrapper$b.defaultProps = { theme: EditableTheme };
|
|
778
828
|
const Input$2 = styled.input `
|
|
779
829
|
font-size: 20px;
|
|
780
830
|
margin: 0px;
|
|
@@ -791,10 +841,12 @@ const Label$3 = styled.span `
|
|
|
791
841
|
box-sizing: border-box;
|
|
792
842
|
`;
|
|
793
843
|
const Checkbox = (_a) => {
|
|
794
|
-
var { children, disabled, checked, onChange, invalid } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "invalid"]);
|
|
795
|
-
return (React.createElement(Wrapper$
|
|
844
|
+
var { children, disabled, checked, onChange, invalid, tooltip } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "invalid", "tooltip"]);
|
|
845
|
+
return (React.createElement(Wrapper$b, Object.assign({ "$disabled": disabled, "$invalid": invalid }, accessibleProps),
|
|
796
846
|
React.createElement(Input$2, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'checkbox' }),
|
|
797
|
-
children ? React.createElement(Label$3, null,
|
|
847
|
+
children ? (React.createElement(Label$3, null,
|
|
848
|
+
children,
|
|
849
|
+
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)) : null));
|
|
798
850
|
};
|
|
799
851
|
|
|
800
852
|
const SelectAll = styled.div `
|
|
@@ -843,7 +895,7 @@ const Checklist = (_a) => {
|
|
|
843
895
|
}))));
|
|
844
896
|
};
|
|
845
897
|
|
|
846
|
-
const Wrapper$
|
|
898
|
+
const Wrapper$a = styled.div `
|
|
847
899
|
border-radius: 4px;
|
|
848
900
|
height: 40px;
|
|
849
901
|
background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
|
|
@@ -864,7 +916,7 @@ const Wrapper$b = styled.div `
|
|
|
864
916
|
border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
|
|
865
917
|
}
|
|
866
918
|
`;
|
|
867
|
-
Wrapper$
|
|
919
|
+
Wrapper$a.defaultProps = { theme: EditableTheme };
|
|
868
920
|
const Trigger$1 = styled.select `
|
|
869
921
|
appearance: none;
|
|
870
922
|
box-shadow: none;
|
|
@@ -892,7 +944,7 @@ const IconWrapper$2 = styled(Icon) `
|
|
|
892
944
|
`;
|
|
893
945
|
const Select = (_a) => {
|
|
894
946
|
var { options, optionGroups, placeholder, readOnly, invalid, value, onChange, style } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "value", "onChange", "style"]);
|
|
895
|
-
return (React.createElement(Wrapper$
|
|
947
|
+
return (React.createElement(Wrapper$a, { "$invalid": invalid, "$readOnly": readOnly, "$style": style },
|
|
896
948
|
React.createElement(Trigger$1, Object.assign({ disabled: readOnly, onChange: onChange, placeholder: placeholder, value: value }, accessibleProps),
|
|
897
949
|
placeholder ? (React.createElement("option", { disabled: true, value: '' }, placeholder)) : null,
|
|
898
950
|
optionGroups &&
|
|
@@ -1065,56 +1117,6 @@ const Drawer = (_a) => {
|
|
|
1065
1117
|
scrim ? React.createElement(Scrim$1, { "$position": position, "$scrim": scrim, onClick: onClose }) : null));
|
|
1066
1118
|
};
|
|
1067
1119
|
|
|
1068
|
-
const Wrapper$a = styled.div `
|
|
1069
|
-
display: inline-block;
|
|
1070
|
-
position: relative;
|
|
1071
|
-
height: 16px;
|
|
1072
|
-
`;
|
|
1073
|
-
const StyledIcon$4 = styled(Icon) `
|
|
1074
|
-
width: 16px;
|
|
1075
|
-
height: 16px;
|
|
1076
|
-
margin: 0px 6px;
|
|
1077
|
-
color: ${props => props.theme.PRIMARY_COLOR.Hex};
|
|
1078
|
-
cursor: pointer;
|
|
1079
|
-
`;
|
|
1080
|
-
StyledIcon$4.defaultProps = { theme: EditableTheme };
|
|
1081
|
-
const positions = {
|
|
1082
|
-
'right-top': {
|
|
1083
|
-
top: '0px',
|
|
1084
|
-
left: '28px',
|
|
1085
|
-
},
|
|
1086
|
-
'right-bottom': {
|
|
1087
|
-
bottom: '0px',
|
|
1088
|
-
left: '28px',
|
|
1089
|
-
},
|
|
1090
|
-
'right-center': {
|
|
1091
|
-
top: '50%',
|
|
1092
|
-
left: '28px',
|
|
1093
|
-
transform: 'translateY(-50%)',
|
|
1094
|
-
},
|
|
1095
|
-
'left-top': {
|
|
1096
|
-
top: '0px',
|
|
1097
|
-
right: '28px',
|
|
1098
|
-
},
|
|
1099
|
-
'left-bottom': {
|
|
1100
|
-
bottom: '0px',
|
|
1101
|
-
right: '28px',
|
|
1102
|
-
},
|
|
1103
|
-
'left-center': {
|
|
1104
|
-
top: '50%',
|
|
1105
|
-
right: '28px',
|
|
1106
|
-
transform: 'translateY(-50%)',
|
|
1107
|
-
},
|
|
1108
|
-
};
|
|
1109
|
-
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])));
|
|
1110
|
-
Content$2.defaultProps = { theme: EditableTheme };
|
|
1111
|
-
const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, }) => {
|
|
1112
|
-
const [show_content, toggleContent] = React.useState(false);
|
|
1113
|
-
return (React.createElement(Wrapper$a, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
|
|
1114
|
-
trigger || React.createElement(StyledIcon$4, { path: js.mdiInformationOutline }),
|
|
1115
|
-
show_content ? (React.createElement(Content$2, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
|
|
1116
|
-
};
|
|
1117
|
-
|
|
1118
1120
|
const Wrapper$9 = styled.div(props => (Object.assign({ margin: '0px 0px 18px 0px' }, props.style)));
|
|
1119
1121
|
const LabelRow = styled.div `
|
|
1120
1122
|
display: flex;
|
|
@@ -2052,10 +2054,12 @@ const Label = styled.span `
|
|
|
2052
2054
|
margin-left: 6px;
|
|
2053
2055
|
`;
|
|
2054
2056
|
const Radio = (_a) => {
|
|
2055
|
-
var { children, disabled, checked, onChange, value, invalid } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid"]);
|
|
2057
|
+
var { children, disabled, checked, onChange, value, invalid, tooltip } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip"]);
|
|
2056
2058
|
return (React.createElement(Wrapper$2, Object.assign({ "$disabled": disabled, "$invalid": invalid }, accessibleProps),
|
|
2057
2059
|
React.createElement(Input, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'radio', value: value }),
|
|
2058
|
-
React.createElement(Label, null,
|
|
2060
|
+
React.createElement(Label, null,
|
|
2061
|
+
children,
|
|
2062
|
+
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)));
|
|
2059
2063
|
};
|
|
2060
2064
|
|
|
2061
2065
|
const RadioList = (_a) => {
|