@hexure/ui 1.11.10 → 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 +73 -66
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +5 -0
- package/dist/cjs/types/components/Radio/Radio.d.ts +6 -0
- package/dist/esm/index.js +73 -66
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +5 -0
- package/dist/esm/types/components/Radio/Radio.d.ts +6 -0
- package/dist/index.d.ts +21 -12
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -758,25 +758,76 @@ 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;
|
|
765
815
|
cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
|
|
766
816
|
display: flex;
|
|
767
|
-
align-items:
|
|
817
|
+
align-items: center;
|
|
768
818
|
font-size: ${FontSizes.DEFAULT};
|
|
769
819
|
line-height: 1.6em;
|
|
770
820
|
box-sizing: border-box;
|
|
821
|
+
background: ${props => (props.$invalid ? `rgba(${Colors.RED.Rgb}, 0.05)` : 'transparent')};
|
|
771
822
|
|
|
772
823
|
&:focus-within {
|
|
773
824
|
background: ${props => `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)`};
|
|
774
825
|
}
|
|
775
826
|
`;
|
|
776
|
-
Wrapper$
|
|
827
|
+
Wrapper$b.defaultProps = { theme: EditableTheme };
|
|
777
828
|
const Input$2 = styled.input `
|
|
778
829
|
font-size: 20px;
|
|
779
|
-
margin:
|
|
830
|
+
margin: 0px;
|
|
780
831
|
line-height: 1.1em;
|
|
781
832
|
box-sizing: border-box;
|
|
782
833
|
`;
|
|
@@ -790,10 +841,12 @@ const Label$3 = styled.span `
|
|
|
790
841
|
box-sizing: border-box;
|
|
791
842
|
`;
|
|
792
843
|
const Checkbox = (_a) => {
|
|
793
|
-
var { children, disabled, checked, onChange } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange"]);
|
|
794
|
-
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),
|
|
795
846
|
React.createElement(Input$2, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'checkbox' }),
|
|
796
|
-
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));
|
|
797
850
|
};
|
|
798
851
|
|
|
799
852
|
const SelectAll = styled.div `
|
|
@@ -842,7 +895,7 @@ const Checklist = (_a) => {
|
|
|
842
895
|
}))));
|
|
843
896
|
};
|
|
844
897
|
|
|
845
|
-
const Wrapper$
|
|
898
|
+
const Wrapper$a = styled.div `
|
|
846
899
|
border-radius: 4px;
|
|
847
900
|
height: 40px;
|
|
848
901
|
background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
|
|
@@ -863,7 +916,7 @@ const Wrapper$b = styled.div `
|
|
|
863
916
|
border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
|
|
864
917
|
}
|
|
865
918
|
`;
|
|
866
|
-
Wrapper$
|
|
919
|
+
Wrapper$a.defaultProps = { theme: EditableTheme };
|
|
867
920
|
const Trigger$1 = styled.select `
|
|
868
921
|
appearance: none;
|
|
869
922
|
box-shadow: none;
|
|
@@ -891,7 +944,7 @@ const IconWrapper$2 = styled(Icon) `
|
|
|
891
944
|
`;
|
|
892
945
|
const Select = (_a) => {
|
|
893
946
|
var { options, optionGroups, placeholder, readOnly, invalid, value, onChange, style } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "value", "onChange", "style"]);
|
|
894
|
-
return (React.createElement(Wrapper$
|
|
947
|
+
return (React.createElement(Wrapper$a, { "$invalid": invalid, "$readOnly": readOnly, "$style": style },
|
|
895
948
|
React.createElement(Trigger$1, Object.assign({ disabled: readOnly, onChange: onChange, placeholder: placeholder, value: value }, accessibleProps),
|
|
896
949
|
placeholder ? (React.createElement("option", { disabled: true, value: '' }, placeholder)) : null,
|
|
897
950
|
optionGroups &&
|
|
@@ -1064,56 +1117,6 @@ const Drawer = (_a) => {
|
|
|
1064
1117
|
scrim ? React.createElement(Scrim$1, { "$position": position, "$scrim": scrim, onClick: onClose }) : null));
|
|
1065
1118
|
};
|
|
1066
1119
|
|
|
1067
|
-
const Wrapper$a = styled.div `
|
|
1068
|
-
display: inline-block;
|
|
1069
|
-
position: relative;
|
|
1070
|
-
height: 16px;
|
|
1071
|
-
`;
|
|
1072
|
-
const StyledIcon$4 = styled(Icon) `
|
|
1073
|
-
width: 16px;
|
|
1074
|
-
height: 16px;
|
|
1075
|
-
margin: 0px 6px;
|
|
1076
|
-
color: ${props => props.theme.PRIMARY_COLOR.Hex};
|
|
1077
|
-
cursor: pointer;
|
|
1078
|
-
`;
|
|
1079
|
-
StyledIcon$4.defaultProps = { theme: EditableTheme };
|
|
1080
|
-
const positions = {
|
|
1081
|
-
'right-top': {
|
|
1082
|
-
top: '0px',
|
|
1083
|
-
left: '28px',
|
|
1084
|
-
},
|
|
1085
|
-
'right-bottom': {
|
|
1086
|
-
bottom: '0px',
|
|
1087
|
-
left: '28px',
|
|
1088
|
-
},
|
|
1089
|
-
'right-center': {
|
|
1090
|
-
top: '50%',
|
|
1091
|
-
left: '28px',
|
|
1092
|
-
transform: 'translateY(-50%)',
|
|
1093
|
-
},
|
|
1094
|
-
'left-top': {
|
|
1095
|
-
top: '0px',
|
|
1096
|
-
right: '28px',
|
|
1097
|
-
},
|
|
1098
|
-
'left-bottom': {
|
|
1099
|
-
bottom: '0px',
|
|
1100
|
-
right: '28px',
|
|
1101
|
-
},
|
|
1102
|
-
'left-center': {
|
|
1103
|
-
top: '50%',
|
|
1104
|
-
right: '28px',
|
|
1105
|
-
transform: 'translateY(-50%)',
|
|
1106
|
-
},
|
|
1107
|
-
};
|
|
1108
|
-
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])));
|
|
1109
|
-
Content$2.defaultProps = { theme: EditableTheme };
|
|
1110
|
-
const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, }) => {
|
|
1111
|
-
const [show_content, toggleContent] = React.useState(false);
|
|
1112
|
-
return (React.createElement(Wrapper$a, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
|
|
1113
|
-
trigger || React.createElement(StyledIcon$4, { path: js.mdiInformationOutline }),
|
|
1114
|
-
show_content ? (React.createElement(Content$2, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
|
|
1115
|
-
};
|
|
1116
|
-
|
|
1117
1120
|
const Wrapper$9 = styled.div(props => (Object.assign({ margin: '0px 0px 18px 0px' }, props.style)));
|
|
1118
1121
|
const LabelRow = styled.div `
|
|
1119
1122
|
display: flex;
|
|
@@ -2027,8 +2030,9 @@ const Wrapper$2 = styled.label `
|
|
|
2027
2030
|
display: flex;
|
|
2028
2031
|
align-items: center;
|
|
2029
2032
|
font-size: ${FontSizes.DEFAULT};
|
|
2030
|
-
line-height: 1.
|
|
2033
|
+
line-height: 1.6em;
|
|
2031
2034
|
box-sizing: border-box;
|
|
2035
|
+
background: ${props => (props.$invalid ? `rgba(${Colors.RED.Rgb}, 0.05)` : 'transparent')};
|
|
2032
2036
|
|
|
2033
2037
|
&:focus-within {
|
|
2034
2038
|
background: ${props => `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)`};
|
|
@@ -2037,8 +2041,9 @@ const Wrapper$2 = styled.label `
|
|
|
2037
2041
|
Wrapper$2.defaultProps = { theme: EditableTheme };
|
|
2038
2042
|
const Input = styled.input `
|
|
2039
2043
|
font-size: 20px;
|
|
2040
|
-
margin: 0px
|
|
2041
|
-
line-height: 1.
|
|
2044
|
+
margin: 0px;
|
|
2045
|
+
line-height: 1.6em;
|
|
2046
|
+
box-sizing: border-box;
|
|
2042
2047
|
`;
|
|
2043
2048
|
const Label = styled.span `
|
|
2044
2049
|
font-family: ${FontStyles.DEFAULT};
|
|
@@ -2049,10 +2054,12 @@ const Label = styled.span `
|
|
|
2049
2054
|
margin-left: 6px;
|
|
2050
2055
|
`;
|
|
2051
2056
|
const Radio = (_a) => {
|
|
2052
|
-
var { children, disabled, checked, onChange, value } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value"]);
|
|
2053
|
-
return (React.createElement(Wrapper$2, Object.assign({ "$disabled": disabled }, accessibleProps),
|
|
2057
|
+
var { children, disabled, checked, onChange, value, invalid, tooltip } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip"]);
|
|
2058
|
+
return (React.createElement(Wrapper$2, Object.assign({ "$disabled": disabled, "$invalid": invalid }, accessibleProps),
|
|
2054
2059
|
React.createElement(Input, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'radio', value: value }),
|
|
2055
|
-
React.createElement(Label, null,
|
|
2060
|
+
React.createElement(Label, null,
|
|
2061
|
+
children,
|
|
2062
|
+
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)));
|
|
2056
2063
|
};
|
|
2057
2064
|
|
|
2058
2065
|
const RadioList = (_a) => {
|