@hexure/ui 1.13.89 → 1.13.90
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 +11 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Heading/Heading.d.ts +3 -0
- package/dist/cjs/types/components/Modal/Modal.d.ts +7 -0
- package/dist/esm/index.js +11 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Heading/Heading.d.ts +3 -0
- package/dist/esm/types/components/Modal/Modal.d.ts +7 -0
- package/dist/index.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
+
import { CSSProperties } from 'styled-components';
|
|
2
3
|
import { AccessibleProps } from '../../utils/Accessibility';
|
|
3
4
|
export interface HeadingProps extends AccessibleProps {
|
|
4
5
|
/** Toggle between bold and normal font weights */
|
|
@@ -13,6 +14,8 @@ export interface HeadingProps extends AccessibleProps {
|
|
|
13
14
|
type?: 'primary' | 'secondary' | 'tertiary';
|
|
14
15
|
/** Optional ID for automation purposes */
|
|
15
16
|
dataItemid?: string;
|
|
17
|
+
/** Optional style for the header title */
|
|
18
|
+
style?: CSSProperties;
|
|
16
19
|
}
|
|
17
20
|
declare const Heading: FC<HeadingProps>;
|
|
18
21
|
export default Heading;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { CSSProperties } from 'styled-components';
|
|
2
3
|
import { AccessibleProps } from '../../utils/Accessibility';
|
|
3
4
|
import { StepProps } from '../ProgressBar/ProgressBar';
|
|
4
5
|
interface ButtonProps {
|
|
@@ -34,6 +35,12 @@ export interface ModalProps extends AccessibleProps {
|
|
|
34
35
|
steps?: StepProps[];
|
|
35
36
|
/** Optional ID for automation purposes */
|
|
36
37
|
dataItemid?: string;
|
|
38
|
+
/** Optional style for the modal */
|
|
39
|
+
modalStyle?: CSSProperties;
|
|
40
|
+
/** Optional style for the header */
|
|
41
|
+
headerStyle?: CSSProperties;
|
|
42
|
+
/** Optional style for the header title */
|
|
43
|
+
headerTitleStyle?: CSSProperties;
|
|
37
44
|
}
|
|
38
45
|
declare const Modal: FC<ModalProps>;
|
|
39
46
|
export default Modal;
|
package/dist/esm/index.js
CHANGED
|
@@ -2946,6 +2946,7 @@ const H1 = styled.h1 `
|
|
|
2946
2946
|
margin: ${props => props.$margin || '0px'};
|
|
2947
2947
|
padding: ${props => props.$padding || '0px'};
|
|
2948
2948
|
box-sizing: border-box;
|
|
2949
|
+
${props => props === null || props === void 0 ? void 0 : props.$customStyles};
|
|
2949
2950
|
`;
|
|
2950
2951
|
const H2 = styled.h2 `
|
|
2951
2952
|
color: ${Colors.BLACK.Hex};
|
|
@@ -2956,6 +2957,7 @@ const H2 = styled.h2 `
|
|
|
2956
2957
|
margin: ${props => props.$margin || '0px'};
|
|
2957
2958
|
padding: ${props => props.$padding || '0px'};
|
|
2958
2959
|
box-sizing: border-box;
|
|
2960
|
+
${props => props === null || props === void 0 ? void 0 : props.$customStyles};
|
|
2959
2961
|
`;
|
|
2960
2962
|
const H3 = styled.h3 `
|
|
2961
2963
|
color: ${Colors.BLACK.Hex};
|
|
@@ -2966,19 +2968,20 @@ const H3 = styled.h3 `
|
|
|
2966
2968
|
margin: ${props => props.$margin || '0px'};
|
|
2967
2969
|
padding: ${props => props.$padding || '0px'};
|
|
2968
2970
|
box-sizing: border-box;
|
|
2971
|
+
${props => props === null || props === void 0 ? void 0 : props.$customStyles};
|
|
2969
2972
|
`;
|
|
2970
2973
|
const Heading = (_a) => {
|
|
2971
|
-
var { bold, children, margin, padding, type, dataItemid } = _a, accessibleProps = __rest(_a, ["bold", "children", "margin", "padding", "type", "dataItemid"]);
|
|
2974
|
+
var { bold, children, margin, padding, type, dataItemid, style } = _a, accessibleProps = __rest(_a, ["bold", "children", "margin", "padding", "type", "dataItemid", "style"]);
|
|
2972
2975
|
const baseId = dataItemid || 'heading';
|
|
2973
2976
|
switch (type) {
|
|
2974
2977
|
case 'secondary': {
|
|
2975
|
-
return (React.createElement(H2, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { "data-itemid": `${baseId}-h2
|
|
2978
|
+
return (React.createElement(H2, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { "data-itemid": `${baseId}-h2`, style: style }), children));
|
|
2976
2979
|
}
|
|
2977
2980
|
case 'tertiary': {
|
|
2978
|
-
return (React.createElement(H3, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { "data-itemid": `${baseId}-h3
|
|
2981
|
+
return (React.createElement(H3, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { "data-itemid": `${baseId}-h3`, style: style }), children));
|
|
2979
2982
|
}
|
|
2980
2983
|
default: {
|
|
2981
|
-
return (React.createElement(H1, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { "data-itemid": `${baseId}-h1
|
|
2984
|
+
return (React.createElement(H1, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { "data-itemid": `${baseId}-h1`, style: style }), children));
|
|
2982
2985
|
}
|
|
2983
2986
|
}
|
|
2984
2987
|
};
|
|
@@ -5697,7 +5700,7 @@ const ButtonContainer = styled.div `
|
|
|
5697
5700
|
margin: 0 10px;
|
|
5698
5701
|
`;
|
|
5699
5702
|
const Modal = (_a) => {
|
|
5700
|
-
var { children, title, onClose, maxWidth, fullscreen, steps, primaryButton, secondaryButton, tertiaryButton, quarternaryButton, dataItemid } = _a, accessibleProps = __rest(_a, ["children", "title", "onClose", "maxWidth", "fullscreen", "steps", "primaryButton", "secondaryButton", "tertiaryButton", "quarternaryButton", "dataItemid"]);
|
|
5703
|
+
var { children, title, onClose, maxWidth, fullscreen, steps, primaryButton, secondaryButton, tertiaryButton, quarternaryButton, dataItemid, modalStyle, headerStyle, headerTitleStyle } = _a, accessibleProps = __rest(_a, ["children", "title", "onClose", "maxWidth", "fullscreen", "steps", "primaryButton", "secondaryButton", "tertiaryButton", "quarternaryButton", "dataItemid", "modalStyle", "headerStyle", "headerTitleStyle"]);
|
|
5701
5704
|
useEffect(() => {
|
|
5702
5705
|
document.onkeydown = e => {
|
|
5703
5706
|
if (e.key === 'Escape') {
|
|
@@ -5709,10 +5712,10 @@ const Modal = (_a) => {
|
|
|
5709
5712
|
};
|
|
5710
5713
|
}, [onClose]);
|
|
5711
5714
|
const baseId = dataItemid || 'modal';
|
|
5712
|
-
return (React.createElement(Wrapper$6, { "data-itemid": `${baseId}-wrapper
|
|
5715
|
+
return (React.createElement(Wrapper$6, { "data-itemid": `${baseId}-wrapper`, style: modalStyle },
|
|
5713
5716
|
React.createElement(Container$1, Object.assign({ "$fullscreen": fullscreen, "$maxWidth": maxWidth, open: true }, accessibleProps, { "data-itemid": `${baseId}-container` }),
|
|
5714
|
-
React.createElement(Header$1, { "data-itemid": `${baseId}-header
|
|
5715
|
-
title ? (React.createElement(Heading, { "data-itemid": `${baseId}-title`, type: 'secondary' }, title)) : null,
|
|
5717
|
+
React.createElement(Header$1, { "data-itemid": `${baseId}-header`, style: headerStyle },
|
|
5718
|
+
title ? (React.createElement(Heading, { "data-itemid": `${baseId}-title`, style: headerTitleStyle, type: 'secondary' }, title)) : null,
|
|
5716
5719
|
React.createElement(Close, { "data-itemid": `${baseId}-close`, onClick: onClose },
|
|
5717
5720
|
React.createElement(CloseMsg, { "data-itemid": `${baseId}-close-msg` }, "(Esc)"),
|
|
5718
5721
|
React.createElement(Icon, { color: Colors.BLACK.Hex, "data-itemid": `${baseId}-close-icon`, path: mdiClose, size: '24px' }))),
|