@hexure/ui 1.13.58 → 1.13.59
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 +19 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Drawer/Drawer.d.ts +6 -0
- package/dist/cjs/types/components/Tooltip/Tooltip.d.ts +2 -0
- package/dist/esm/index.js +19 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Drawer/Drawer.d.ts +6 -0
- package/dist/esm/types/components/Tooltip/Tooltip.d.ts +2 -0
- package/dist/index.d.ts +7 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -139,11 +139,11 @@ Copy.defaultProps = {
|
|
|
139
139
|
type: 'default',
|
|
140
140
|
};
|
|
141
141
|
|
|
142
|
-
const Wrapper$h = styled.div
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
const Wrapper$h = styled.div(props => ({
|
|
143
|
+
display: 'inline-block',
|
|
144
|
+
position: 'relative',
|
|
145
|
+
height: props.$height || '16px',
|
|
146
|
+
}));
|
|
147
147
|
const StyledIcon$6 = styled(Icon) `
|
|
148
148
|
width: 16px;
|
|
149
149
|
height: 16px;
|
|
@@ -182,10 +182,10 @@ const positions = {
|
|
|
182
182
|
};
|
|
183
183
|
const Content$3 = 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: 9999 }, positions[props.$position])));
|
|
184
184
|
Content$3.defaultProps = { theme: EditableTheme };
|
|
185
|
-
const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, dataItemid, }) => {
|
|
185
|
+
const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, dataItemid, height, }) => {
|
|
186
186
|
const [show_content, toggleContent] = React.useState(false);
|
|
187
187
|
const baseId = dataItemid || 'tooltip';
|
|
188
|
-
return (React.createElement(Wrapper$h, { "data-itemid": `${baseId}-wrapper`, onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
|
|
188
|
+
return (React.createElement(Wrapper$h, { "$height": height, "data-itemid": `${baseId}-wrapper`, onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
|
|
189
189
|
trigger || React.createElement(StyledIcon$6, { "data-itemid": `${baseId}-icon`, path: js.mdiInformationOutline }),
|
|
190
190
|
show_content ? (React.createElement(Content$3, { "$position": position, "$width": width, "data-itemid": `${baseId}-content` }, children && (React.createElement(Copy, { "data-itemid": `${baseId}-copy`, type: 'small' }, children)))) : null));
|
|
191
191
|
};
|
|
@@ -1049,7 +1049,7 @@ const Wrapper$a = styled.div `
|
|
|
1049
1049
|
border-width: 1px;
|
|
1050
1050
|
border-style: solid;
|
|
1051
1051
|
border-color: ${props => (props.$invalid ? Colors.RED.Hex : '#cccccc')};
|
|
1052
|
-
background-color: ${props =>
|
|
1052
|
+
background-color: ${props => props.$invalid && props.$isInvalidRedBackground ? '#ffe5e5' : '#ffffff'};
|
|
1053
1053
|
border-radius: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px'};
|
|
1054
1054
|
flex-grow: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0};
|
|
1055
1055
|
box-sizing: border-box;
|
|
@@ -1293,9 +1293,14 @@ const ButtonBar$1 = styled.div `
|
|
|
1293
1293
|
gap: 10px;
|
|
1294
1294
|
flex-shrink: 0;
|
|
1295
1295
|
background: #fff;
|
|
1296
|
+
flex-direction: column;
|
|
1297
|
+
`;
|
|
1298
|
+
const ButtonBarNote = styled.div `
|
|
1299
|
+
display: flex;
|
|
1300
|
+
gap: 10px;
|
|
1296
1301
|
`;
|
|
1297
1302
|
const Drawer = (_a) => {
|
|
1298
|
-
var { children, description, title, onClose, primaryButton, position = 'fixed', secondaryButton, tertiaryButton, scrim = 'dark', width, dataItemid } = _a, accessibleProps = __rest(_a, ["children", "description", "title", "onClose", "primaryButton", "position", "secondaryButton", "tertiaryButton", "scrim", "width", "dataItemid"]);
|
|
1303
|
+
var { children, description, title, onClose, primaryButton, position = 'fixed', secondaryButton, tertiaryButton, scrim = 'dark', width, dataItemid, bottomNotes } = _a, accessibleProps = __rest(_a, ["children", "description", "title", "onClose", "primaryButton", "position", "secondaryButton", "tertiaryButton", "scrim", "width", "dataItemid", "bottomNotes"]);
|
|
1299
1304
|
React.useEffect(() => {
|
|
1300
1305
|
document.onkeydown = e => {
|
|
1301
1306
|
if (e.key === 'Escape') {
|
|
@@ -1317,9 +1322,11 @@ const Drawer = (_a) => {
|
|
|
1317
1322
|
React.createElement(Button, { dataItemid: `${baseId}-close-button`, format: 'secondary', icon: js.mdiClose, small: true }))),
|
|
1318
1323
|
React.createElement(ContentWrapper$1, { "data-itemid": `${baseId}-content-wrapper` }, children),
|
|
1319
1324
|
primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar$1, { "data-itemid": `${baseId}-button-bar` },
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1325
|
+
React.createElement(Copy, { "data-itemid": `${baseId}-button-bar-notes`, type: 'small' }, bottomNotes),
|
|
1326
|
+
React.createElement(ButtonBarNote, null,
|
|
1327
|
+
tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { "data-itemid": `${baseId}-tertiary-button`, format: tertiaryButton.format || 'secondary' }))) : null,
|
|
1328
|
+
secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { "data-itemid": `${baseId}-secondary-button`, format: secondaryButton.format || 'secondary' }))) : null,
|
|
1329
|
+
primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { "data-itemid": `${baseId}-primary-button`, format: primaryButton.format || 'primary' }))) : null))) : null),
|
|
1323
1330
|
scrim ? (React.createElement(Scrim$1, { "$position": position, "$scrim": scrim, "data-itemid": `${baseId}-scrim`, onClick: onClose })) : null));
|
|
1324
1331
|
};
|
|
1325
1332
|
|