@hexure/ui 1.13.93 → 1.13.95
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 +7 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Button/Button.d.ts +2 -0
- package/dist/esm/index.js +7 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Button/Button.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -31,6 +31,8 @@ export interface ButtonProps extends AccessibleProps {
|
|
|
31
31
|
dataItemid?: string;
|
|
32
32
|
/** Optional type for the button */
|
|
33
33
|
type?: 'button' | 'submit' | 'reset' | null;
|
|
34
|
+
/** Optional section name for automation purposes */
|
|
35
|
+
dataSectionName?: string;
|
|
34
36
|
}
|
|
35
37
|
declare const Button: FC<ButtonProps>;
|
|
36
38
|
export default Button;
|
package/dist/esm/index.js
CHANGED
|
@@ -2886,7 +2886,7 @@ const Badge$1 = styled.span `
|
|
|
2886
2886
|
margin-right: ${props => (props.$small ? '-5px' : '-10px')};
|
|
2887
2887
|
`;
|
|
2888
2888
|
const Button = (_a) => {
|
|
2889
|
-
var { badge, children, disabled = false, icon, isForm = false, loading = false, margin = '', onClick, small = false, format = 'primary', iconPosition = 'after', toolTip, title = '', dataItemid, type = null } = _a, accessibleProps = __rest(_a, ["badge", "children", "disabled", "icon", "isForm", "loading", "margin", "onClick", "small", "format", "iconPosition", "toolTip", "title", "dataItemid", "type"]);
|
|
2889
|
+
var { badge, children, disabled = false, icon, isForm = false, loading = false, margin = '', onClick, small = false, format = 'primary', iconPosition = 'after', toolTip, title = '', dataItemid, type = null, dataSectionName } = _a, accessibleProps = __rest(_a, ["badge", "children", "disabled", "icon", "isForm", "loading", "margin", "onClick", "small", "format", "iconPosition", "toolTip", "title", "dataItemid", "type", "dataSectionName"]);
|
|
2890
2890
|
const theme = useContext(ThemeContext) || EditableTheme;
|
|
2891
2891
|
const has_children = children && children.length > 0;
|
|
2892
2892
|
const button_type_mapping = {
|
|
@@ -2921,7 +2921,7 @@ const Button = (_a) => {
|
|
|
2921
2921
|
};
|
|
2922
2922
|
const format_styles = button_type_mapping[format];
|
|
2923
2923
|
const baseId = dataItemid || 'button';
|
|
2924
|
-
const button_view = (React.createElement(StyledButton, Object.assign({ "$bg_color": format_styles.background_color, "$border_color": format_styles.border_color, "$disabled": disabled || loading, "$format": format, "$hasChildren": !!has_children, "$iconPosition": iconPosition, "$margin": margin, "$small": small, disabled: disabled || loading, onClick: disabled || loading ? undefined : onClick, title: title, type: type || (isForm ? 'submit' : undefined) }, accessibleProps, { "data-itemid": `${baseId}-styled-button
|
|
2924
|
+
const button_view = (React.createElement(StyledButton, Object.assign({ "$bg_color": format_styles.background_color, "$border_color": format_styles.border_color, "$disabled": disabled || loading, "$format": format, "$hasChildren": !!has_children, "$iconPosition": iconPosition, "$margin": margin, "$small": small, disabled: disabled || loading, onClick: disabled || loading ? undefined : onClick, title: title, type: type || (isForm ? 'submit' : undefined) }, accessibleProps, { "data-itemid": `${baseId}-styled-button`, "data-section-name": dataSectionName || '' }),
|
|
2925
2925
|
children ? (React.createElement(Label$5, { "$content_color": disabled || loading ? '#666666' : format_styles.content_color, "$small": small, "data-itemid": `${baseId}-label` }, children)) : null,
|
|
2926
2926
|
icon && !badge ? (React.createElement(StyledIcon$5, { "$hasChildren": !!has_children, "data-itemid": `${baseId}-icon` },
|
|
2927
2927
|
React.createElement(Icon, { color: (() => {
|
|
@@ -4014,7 +4014,7 @@ const Drawer = (_a) => {
|
|
|
4014
4014
|
title ? (React.createElement(Heading, { dataItemid: `${baseId}-title`, type: 'secondary' }, title)) : null,
|
|
4015
4015
|
description ? (React.createElement(Copy, { color: 'GRAY', "data-itemid": `${baseId}-description` }, description)) : null),
|
|
4016
4016
|
React.createElement(Close$1, { "data-itemid": `${baseId}-close`, onClick: onClose },
|
|
4017
|
-
React.createElement(Button, { dataItemid: `${baseId}-close-button`, format: 'secondary', icon: mdiClose, small: true }))),
|
|
4017
|
+
React.createElement(Button, { dataItemid: `${baseId}-close-button`, dataSectionName: 'drawer-close-icon-button', format: 'secondary', icon: mdiClose, small: true }))),
|
|
4018
4018
|
React.createElement(ContentWrapper$1, { "data-itemid": `${baseId}-content-wrapper` }, children),
|
|
4019
4019
|
primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar$1, { "data-itemid": `${baseId}-button-bar` },
|
|
4020
4020
|
React.createElement(Copy, { "data-itemid": `${baseId}-button-bar-notes`, type: 'small' }, bottomNotes),
|
|
@@ -5680,6 +5680,7 @@ const CloseMsg = styled.span `
|
|
|
5680
5680
|
line-height: 1em;
|
|
5681
5681
|
color: ${Colors.MEDIUM_GRAY.Hex};
|
|
5682
5682
|
`;
|
|
5683
|
+
const CloseIcon = styled.span ``;
|
|
5683
5684
|
const ContentWrapper = styled.div `
|
|
5684
5685
|
overflow-x: hidden;
|
|
5685
5686
|
overflow-y: auto;
|
|
@@ -5720,7 +5721,8 @@ const Modal = (_a) => {
|
|
|
5720
5721
|
title ? (React.createElement(Heading, { "data-itemid": `${baseId}-title`, style: headerTitleStyle, type: 'secondary' }, title)) : null,
|
|
5721
5722
|
React.createElement(Close, { "data-itemid": `${baseId}-close`, onClick: onClose },
|
|
5722
5723
|
React.createElement(CloseMsg, { "data-itemid": `${baseId}-close-msg` }, "(Esc)"),
|
|
5723
|
-
React.createElement(
|
|
5724
|
+
React.createElement(CloseIcon, { "data-itemid": `${baseId}-close-icon-wrapper` },
|
|
5725
|
+
React.createElement(Icon, { color: Colors.BLACK.Hex, "data-itemid": `${baseId}-close-icon`, path: mdiClose, size: '24px' })))),
|
|
5724
5726
|
steps ? React.createElement(ProgressBar, { steps: steps }) : null,
|
|
5725
5727
|
React.createElement(ContentWrapper, { "data-itemid": `${baseId}-content-wrapper` }, children),
|
|
5726
5728
|
primaryButton || secondaryButton || tertiaryButton || quarternaryButton ? (React.createElement(ButtonBar, { "data-itemid": `${baseId}-button-bar` },
|
|
@@ -5885,7 +5887,7 @@ const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu, tag, dataIte
|
|
|
5885
5887
|
return (React.createElement(Wrapper$4, { "data-itemid": `${baseId}-wrapper` },
|
|
5886
5888
|
React.createElement(Info, { "data-itemid": `${baseId}-info` },
|
|
5887
5889
|
React.createElement(Title, { "data-itemid": `${baseId}-title` },
|
|
5888
|
-
React.createElement(Heading, {
|
|
5890
|
+
React.createElement(Heading, { dataItemid: `${baseId}-heading`, type: 'secondary' }, title),
|
|
5889
5891
|
tag ? React.createElement(Tag, Object.assign({}, tag, { "data-itemid": `${baseId}-tag` })) : null),
|
|
5890
5892
|
breadcrumbs ? (React.createElement(Breadcrumbs, { "data-itemid": `${baseId}-breadcrumbs` }, breadcrumbs.map((crumb, i) => {
|
|
5891
5893
|
const crumbId = `${baseId}-breadcrumb-${i}`;
|