@hexure/ui 1.13.42 → 1.13.44
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 +295 -295
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Accordion/Accordion.d.ts +1 -1
- package/dist/cjs/types/components/ActionDialog/ActionDialog.d.ts +1 -1
- package/dist/cjs/types/components/Alert/Alert.d.ts +1 -1
- package/dist/cjs/types/components/AppHeader/AppHeader.d.ts +1 -1
- package/dist/cjs/types/components/AppMenu/AppMenu.d.ts +1 -1
- package/dist/cjs/types/components/BulkActionBar/BulkActionBar.d.ts +1 -1
- package/dist/cjs/types/components/Button/Button.d.ts +1 -1
- package/dist/cjs/types/components/ButtonMenu/ButtonMenu.d.ts +1 -1
- package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/cjs/types/components/Checklist/Checklist.d.ts +1 -1
- package/dist/cjs/types/components/Copy/Copy.d.ts +1 -1
- package/dist/cjs/types/components/DatePicker/DatePicker.d.ts +7 -1
- package/dist/cjs/types/components/Drawer/Drawer.d.ts +1 -1
- package/dist/cjs/types/components/Field/Field.d.ts +2 -2
- package/dist/cjs/types/components/FieldGroup/FieldGroup.d.ts +1 -1
- package/dist/cjs/types/components/FileUpload/FileUpload.d.ts +1 -1
- package/dist/cjs/types/components/Heading/Heading.d.ts +1 -1
- package/dist/cjs/types/components/Input/Input.d.ts +1 -1
- package/dist/cjs/types/components/Link/Link.d.ts +1 -1
- package/dist/cjs/types/components/Loader/Loader.d.ts +1 -1
- package/dist/cjs/types/components/Logo/Logo.d.ts +1 -1
- package/dist/cjs/types/components/Modal/Modal.d.ts +1 -1
- package/dist/cjs/types/components/MoreMenu/MoreMenu.d.ts +1 -1
- package/dist/cjs/types/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/cjs/types/components/PageHeader/PageHeader.d.ts +1 -1
- package/dist/cjs/types/components/Pagination/Pagination.d.ts +1 -1
- package/dist/cjs/types/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/cjs/types/components/Radio/Radio.d.ts +2 -2
- package/dist/cjs/types/components/RadioList/RadioList.d.ts +1 -1
- package/dist/cjs/types/components/Select/Select.d.ts +1 -1
- package/dist/cjs/types/components/Table/Table.d.ts +2 -1
- package/dist/cjs/types/components/Tabs/Tabs.d.ts +1 -1
- package/dist/cjs/types/components/Tag/Tag.d.ts +1 -1
- package/dist/cjs/types/components/Toast/Toast.d.ts +1 -1
- package/dist/cjs/types/components/Toggle/Toggle.d.ts +1 -1
- package/dist/cjs/types/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/cjs/types/components/ZeroState/ZeroState.d.ts +1 -1
- package/dist/cjs/types/utils/Accessibility.d.ts +2 -1
- package/dist/esm/index.js +295 -295
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Accordion/Accordion.d.ts +1 -1
- package/dist/esm/types/components/ActionDialog/ActionDialog.d.ts +1 -1
- package/dist/esm/types/components/Alert/Alert.d.ts +1 -1
- package/dist/esm/types/components/AppHeader/AppHeader.d.ts +1 -1
- package/dist/esm/types/components/AppMenu/AppMenu.d.ts +1 -1
- package/dist/esm/types/components/BulkActionBar/BulkActionBar.d.ts +1 -1
- package/dist/esm/types/components/Button/Button.d.ts +1 -1
- package/dist/esm/types/components/ButtonMenu/ButtonMenu.d.ts +1 -1
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/esm/types/components/Checklist/Checklist.d.ts +1 -1
- package/dist/esm/types/components/Copy/Copy.d.ts +1 -1
- package/dist/esm/types/components/DatePicker/DatePicker.d.ts +7 -1
- package/dist/esm/types/components/Drawer/Drawer.d.ts +1 -1
- package/dist/esm/types/components/Field/Field.d.ts +2 -2
- package/dist/esm/types/components/FieldGroup/FieldGroup.d.ts +1 -1
- package/dist/esm/types/components/FileUpload/FileUpload.d.ts +1 -1
- package/dist/esm/types/components/Heading/Heading.d.ts +1 -1
- package/dist/esm/types/components/Input/Input.d.ts +1 -1
- package/dist/esm/types/components/Link/Link.d.ts +1 -1
- package/dist/esm/types/components/Loader/Loader.d.ts +1 -1
- package/dist/esm/types/components/Logo/Logo.d.ts +1 -1
- package/dist/esm/types/components/Modal/Modal.d.ts +1 -1
- package/dist/esm/types/components/MoreMenu/MoreMenu.d.ts +1 -1
- package/dist/esm/types/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/esm/types/components/PageHeader/PageHeader.d.ts +1 -1
- package/dist/esm/types/components/Pagination/Pagination.d.ts +1 -1
- package/dist/esm/types/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/esm/types/components/Radio/Radio.d.ts +2 -2
- package/dist/esm/types/components/RadioList/RadioList.d.ts +1 -1
- package/dist/esm/types/components/Select/Select.d.ts +1 -1
- package/dist/esm/types/components/Table/Table.d.ts +2 -1
- package/dist/esm/types/components/Tabs/Tabs.d.ts +1 -1
- package/dist/esm/types/components/Tag/Tag.d.ts +1 -1
- package/dist/esm/types/components/Toast/Toast.d.ts +1 -1
- package/dist/esm/types/components/Toggle/Toggle.d.ts +1 -1
- package/dist/esm/types/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/esm/types/components/ZeroState/ZeroState.d.ts +1 -1
- package/dist/esm/types/utils/Accessibility.d.ts +2 -1
- package/dist/index.d.ts +48 -40
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -107,13 +107,13 @@ const Title$2 = styled.div `
|
|
|
107
107
|
box-sizing: border-box;
|
|
108
108
|
`;
|
|
109
109
|
const Accordion = (_a) => {
|
|
110
|
-
var {
|
|
111
|
-
const baseId =
|
|
110
|
+
var { dataItemid, title, children, open, onClick } = _a, accessibleProps = __rest(_a, ["dataItemid", "title", "children", "open", "onClick"]);
|
|
111
|
+
const baseId = dataItemid || 'accordion';
|
|
112
112
|
return (React.createElement(React.Fragment, null,
|
|
113
|
-
React.createElement(Header$3, Object.assign({
|
|
114
|
-
React.createElement(Title$2, {
|
|
115
|
-
React.createElement(Icon, { color: Colors.BLACK.Hex,
|
|
116
|
-
open ? React.createElement("div", {
|
|
113
|
+
React.createElement(Header$3, Object.assign({ "data-itemid": `${baseId}-header`, onClick: onClick }, accessibleProps),
|
|
114
|
+
React.createElement(Title$2, { "data-itemid": `${baseId}-title` }, title),
|
|
115
|
+
React.createElement(Icon, { color: Colors.BLACK.Hex, "data-itemid": `${baseId}-icon`, path: open ? js.mdiChevronUp : js.mdiChevronDown, size: '24px' })),
|
|
116
|
+
open ? React.createElement("div", { "data-itemid": `${baseId}-content` }, children) : null));
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
const StyledComponent = styled.p `
|
|
@@ -131,9 +131,9 @@ const StyledComponent = styled.p `
|
|
|
131
131
|
box-sizing: border-box;
|
|
132
132
|
`;
|
|
133
133
|
const Copy = (_a) => {
|
|
134
|
-
var { children, align = '', margin = '', padding = '', type = 'default', color = 'BLACK',
|
|
135
|
-
const baseId =
|
|
136
|
-
return (React.createElement(StyledComponent, Object.assign({ "$align": align, "$color": color, "$margin": margin, "$padding": padding, "$type": type,
|
|
134
|
+
var { children, align = '', margin = '', padding = '', type = 'default', color = 'BLACK', dataItemid } = _a, accessibleProps = __rest(_a, ["children", "align", "margin", "padding", "type", "color", "dataItemid"]);
|
|
135
|
+
const baseId = dataItemid || 'copy';
|
|
136
|
+
return (React.createElement(StyledComponent, Object.assign({ "$align": align, "$color": color, "$margin": margin, "$padding": padding, "$type": type, "data-itemid": `${baseId}-styled-component` }, accessibleProps), children));
|
|
137
137
|
};
|
|
138
138
|
Copy.defaultProps = {
|
|
139
139
|
type: 'default',
|
|
@@ -182,12 +182,12 @@ 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,
|
|
185
|
+
const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, dataItemid, }) => {
|
|
186
186
|
const [show_content, toggleContent] = React.useState(false);
|
|
187
|
-
const baseId =
|
|
188
|
-
return (React.createElement(Wrapper$h, {
|
|
189
|
-
trigger || React.createElement(StyledIcon$6, {
|
|
190
|
-
show_content ? (React.createElement(Content$3, { "$position": position, "$width": width,
|
|
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) },
|
|
189
|
+
trigger || React.createElement(StyledIcon$6, { "data-itemid": `${baseId}-icon`, path: js.mdiInformationOutline }),
|
|
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
|
};
|
|
192
192
|
|
|
193
193
|
const StyledButton = styled.button `
|
|
@@ -267,7 +267,7 @@ const Badge$1 = styled.span `
|
|
|
267
267
|
margin-right: ${props => (props.$small ? '-5px' : '-10px')};
|
|
268
268
|
`;
|
|
269
269
|
const Button = (_a) => {
|
|
270
|
-
var { badge, children, disabled = false, icon, isForm = false, loading = false, margin = '', onClick, small = false, format = 'primary', iconPosition = 'after', toolTip, title = '',
|
|
270
|
+
var { badge, children, disabled = false, icon, isForm = false, loading = false, margin = '', onClick, small = false, format = 'primary', iconPosition = 'after', toolTip, title = '', dataItemid } = _a, accessibleProps = __rest(_a, ["badge", "children", "disabled", "icon", "isForm", "loading", "margin", "onClick", "small", "format", "iconPosition", "toolTip", "title", "dataItemid"]);
|
|
271
271
|
const theme = React.useContext(styled.ThemeContext) || EditableTheme;
|
|
272
272
|
const has_children = children && children.length > 0;
|
|
273
273
|
const button_type_mapping = {
|
|
@@ -301,12 +301,12 @@ const Button = (_a) => {
|
|
|
301
301
|
},
|
|
302
302
|
};
|
|
303
303
|
const format_styles = button_type_mapping[format];
|
|
304
|
-
const baseId =
|
|
305
|
-
const button_view = (React.createElement(StyledButton, Object.assign({ "$bg_color": format_styles.background_color, "$border_color": format_styles.border_color, "$disabled": disabled || loading, "$hasChildren": !!has_children, "$iconPosition": iconPosition, "$margin": margin, "$small": small, disabled: disabled || loading, onClick: disabled || loading ? undefined : onClick, title: title, type: isForm ? 'submit' : undefined }, accessibleProps, {
|
|
306
|
-
children ? (React.createElement(Label$5, { "$content_color": format_styles.content_color, "$small": small,
|
|
307
|
-
icon && !badge ? (React.createElement(StyledIcon$5, { "$hasChildren": !!has_children,
|
|
308
|
-
React.createElement(Icon, { color: format ? format_styles === null || format_styles === void 0 ? void 0 : format_styles.content_color : '#fff',
|
|
309
|
-
badge && !icon ? (React.createElement(Badge$1, { "$bg_color": format_styles.badge_bg_color, "$content_color": format_styles.badge_content_color, "$small": small,
|
|
304
|
+
const baseId = dataItemid || 'button';
|
|
305
|
+
const button_view = (React.createElement(StyledButton, Object.assign({ "$bg_color": format_styles.background_color, "$border_color": format_styles.border_color, "$disabled": disabled || loading, "$hasChildren": !!has_children, "$iconPosition": iconPosition, "$margin": margin, "$small": small, disabled: disabled || loading, onClick: disabled || loading ? undefined : onClick, title: title, type: isForm ? 'submit' : undefined }, accessibleProps, { "data-itemid": `${baseId}-styled-button` }),
|
|
306
|
+
children ? (React.createElement(Label$5, { "$content_color": format_styles.content_color, "$small": small, "data-itemid": `${baseId}-label` }, children)) : null,
|
|
307
|
+
icon && !badge ? (React.createElement(StyledIcon$5, { "$hasChildren": !!has_children, "data-itemid": `${baseId}-icon` },
|
|
308
|
+
React.createElement(Icon, { color: format ? format_styles === null || format_styles === void 0 ? void 0 : format_styles.content_color : '#fff', "data-itemid": `${baseId}-icon-svg`, path: loading ? js.mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
|
|
309
|
+
badge && !icon ? (React.createElement(Badge$1, { "$bg_color": format_styles.badge_bg_color, "$content_color": format_styles.badge_content_color, "$small": small, "data-itemid": `${baseId}-badge` }, badge)) : null));
|
|
310
310
|
if (toolTip && Object.keys(toolTip).length) {
|
|
311
311
|
return (React.createElement(Tooltip, Object.assign({}, toolTip, { trigger: (toolTip === null || toolTip === void 0 ? void 0 : toolTip.trigger) || button_view }), toolTip === null || toolTip === void 0 ? void 0 : toolTip.children));
|
|
312
312
|
}
|
|
@@ -344,17 +344,17 @@ const H3 = styled.h3 `
|
|
|
344
344
|
box-sizing: border-box;
|
|
345
345
|
`;
|
|
346
346
|
const Heading = (_a) => {
|
|
347
|
-
var { bold, children, margin, padding, type,
|
|
348
|
-
const baseId =
|
|
347
|
+
var { bold, children, margin, padding, type, dataItemid } = _a, accessibleProps = __rest(_a, ["bold", "children", "margin", "padding", "type", "dataItemid"]);
|
|
348
|
+
const baseId = dataItemid || 'heading';
|
|
349
349
|
switch (type) {
|
|
350
350
|
case 'secondary': {
|
|
351
|
-
return (React.createElement(H2, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, {
|
|
351
|
+
return (React.createElement(H2, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { "data-itemid": `${baseId}-h2` }), children));
|
|
352
352
|
}
|
|
353
353
|
case 'tertiary': {
|
|
354
|
-
return (React.createElement(H3, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, {
|
|
354
|
+
return (React.createElement(H3, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { "data-itemid": `${baseId}-h3` }), children));
|
|
355
355
|
}
|
|
356
356
|
default: {
|
|
357
|
-
return (React.createElement(H1, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, {
|
|
357
|
+
return (React.createElement(H1, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { "data-itemid": `${baseId}-h1` }), children));
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
};
|
|
@@ -386,16 +386,16 @@ const Buttons$1 = styled.div `
|
|
|
386
386
|
box-sizing: border-box;
|
|
387
387
|
`;
|
|
388
388
|
const ActionDialog = (_a) => {
|
|
389
|
-
var { description, title, primaryButton, secondaryButton, tertiaryButton, style = {},
|
|
390
|
-
const baseId =
|
|
391
|
-
return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps, {
|
|
392
|
-
React.createElement(Container$4, { "$customStyle": style,
|
|
393
|
-
title ? (React.createElement(Heading, {
|
|
394
|
-
description ? (React.createElement(Copy, { align: 'center',
|
|
395
|
-
primaryButton || secondaryButton || tertiaryButton ? (React.createElement(Buttons$1, {
|
|
396
|
-
tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary'
|
|
397
|
-
secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary'
|
|
398
|
-
primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary'
|
|
389
|
+
var { description, title, primaryButton, secondaryButton, tertiaryButton, style = {}, dataItemid } = _a, accessibleProps = __rest(_a, ["description", "title", "primaryButton", "secondaryButton", "tertiaryButton", "style", "dataItemid"]);
|
|
390
|
+
const baseId = dataItemid || 'action-dialog';
|
|
391
|
+
return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
392
|
+
React.createElement(Container$4, { "$customStyle": style, "data-itemid": `${baseId}-container`, open: true },
|
|
393
|
+
title ? (React.createElement(Heading, { "data-itemid": `${baseId}-title`, margin: '0px 0px 20px 0px', type: 'secondary' }, title)) : null,
|
|
394
|
+
description ? (React.createElement(Copy, { align: 'center', "data-itemid": `${baseId}-description` }, description)) : null,
|
|
395
|
+
primaryButton || secondaryButton || tertiaryButton ? (React.createElement(Buttons$1, { "data-itemid": `${baseId}-buttons` },
|
|
396
|
+
tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { "data-itemid": `${baseId}-tertiary-button`, format: tertiaryButton.format || 'secondary' }))) : null,
|
|
397
|
+
secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { "data-itemid": `${baseId}-secondary-button`, format: secondaryButton.format || 'secondary' }))) : null,
|
|
398
|
+
primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { "data-itemid": `${baseId}-primary-button`, format: primaryButton.format || 'primary' }))) : null)) : null)));
|
|
399
399
|
};
|
|
400
400
|
|
|
401
401
|
const Wrapper$f = styled.div `
|
|
@@ -422,9 +422,9 @@ const Action$1 = styled.div `
|
|
|
422
422
|
`;
|
|
423
423
|
Action$1.defaultProps = { theme: EditableTheme };
|
|
424
424
|
const Alert = (_a) => {
|
|
425
|
-
var { action, type = 'info', title, description, small = false,
|
|
425
|
+
var { action, type = 'info', title, description, small = false, dataItemid } = _a, accessibleProps = __rest(_a, ["action", "type", "title", "description", "small", "dataItemid"]);
|
|
426
426
|
const theme = React.useContext(styled.ThemeContext) || EditableTheme;
|
|
427
|
-
const baseId =
|
|
427
|
+
const baseId = dataItemid || 'alert';
|
|
428
428
|
const type_mapping = {
|
|
429
429
|
info: {
|
|
430
430
|
color: theme.PRIMARY_COLOR.Hex,
|
|
@@ -443,12 +443,12 @@ const Alert = (_a) => {
|
|
|
443
443
|
icon: js.mdiCheckboxMarkedCircleOutline,
|
|
444
444
|
},
|
|
445
445
|
};
|
|
446
|
-
return (React.createElement(Wrapper$f, Object.assign({}, accessibleProps, { "$small": small,
|
|
447
|
-
React.createElement(StyledIcon$4, { color: type_mapping[type].color,
|
|
448
|
-
React.createElement("div", {
|
|
449
|
-
title && !small ? (React.createElement(Heading, { bold: true,
|
|
450
|
-
description ? (React.createElement(Copy, {
|
|
451
|
-
action && !small ? (React.createElement(Action$1, {
|
|
446
|
+
return (React.createElement(Wrapper$f, Object.assign({}, accessibleProps, { "$small": small, "data-itemid": `${baseId}-wrapper`, style: { borderLeftColor: type_mapping[type].color } }),
|
|
447
|
+
React.createElement(StyledIcon$4, { color: type_mapping[type].color, "data-itemid": `${baseId}-icon`, path: type_mapping[type].icon, size: small ? '20px' : '30px' }),
|
|
448
|
+
React.createElement("div", { "data-itemid": `${baseId}-content` },
|
|
449
|
+
title && !small ? (React.createElement(Heading, { bold: true, "data-itemid": `${baseId}-title`, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
|
|
450
|
+
description ? (React.createElement(Copy, { "data-itemid": `${baseId}-description`, margin: small ? '' : '6px 0 0 0 !important' }, description)) : null,
|
|
451
|
+
action && !small ? (React.createElement(Action$1, { "data-itemid": `${baseId}-action`, onClick: action.onClick }, action.label)) : null)));
|
|
452
452
|
};
|
|
453
453
|
|
|
454
454
|
const colorMapping = {
|
|
@@ -474,23 +474,23 @@ const colorMapping = {
|
|
|
474
474
|
},
|
|
475
475
|
};
|
|
476
476
|
const Logo = (_a) => {
|
|
477
|
-
var { type = 'standard_full', height = '50px',
|
|
477
|
+
var { type = 'standard_full', height = '50px', dataItemid } = _a, accessibleProps = __rest(_a, ["type", "height", "dataItemid"]);
|
|
478
478
|
const type_parts = type.split('_');
|
|
479
|
-
const baseId =
|
|
479
|
+
const baseId = dataItemid || 'logo';
|
|
480
480
|
switch (type_parts[0]) {
|
|
481
481
|
case 'mark':
|
|
482
|
-
return (React.createElement("svg", Object.assign({ fill: 'none', height: height, viewBox: '0 0 58 51', width: '100%', xmlns: 'http://www.w3.org/2000/svg' }, accessibleProps, {
|
|
483
|
-
React.createElement("path", { d: 'M43.9348 -1.14441e-05H13.3724L0 25.2376L7.27148 38.0136L14.1215 50.0487H43.1856L57.3077 25.2376L43.9348 -1.14441e-05ZM38.206 9.49903L46.459 25.0743L37.6507 40.5497H19.6567L15.5417 33.3199L10.8487 25.0743L19.1013 9.49903H38.206Z',
|
|
482
|
+
return (React.createElement("svg", Object.assign({ fill: 'none', height: height, viewBox: '0 0 58 51', width: '100%', xmlns: 'http://www.w3.org/2000/svg' }, accessibleProps, { "data-itemid": `${baseId}-svg` }),
|
|
483
|
+
React.createElement("path", { d: 'M43.9348 -1.14441e-05H13.3724L0 25.2376L7.27148 38.0136L14.1215 50.0487H43.1856L57.3077 25.2376L43.9348 -1.14441e-05ZM38.206 9.49903L46.459 25.0743L37.6507 40.5497H19.6567L15.5417 33.3199L10.8487 25.0743L19.1013 9.49903H38.206Z', "data-itemid": `${baseId}-path`, fill: type_parts[1] })));
|
|
484
484
|
default:
|
|
485
|
-
return (React.createElement("svg", Object.assign({ fill: 'none', height: height, preserveAspectRatio: 'xMidYMid meet', viewBox: '0 0 236 50', width: '100%', xmlns: 'http://www.w3.org/2000/svg' }, accessibleProps, {
|
|
486
|
-
React.createElement("path", { d: 'M230.794 29.59H219.306L214.279 39.0907L217.012 43.9001L219.587 48.4308H230.512L235.821 39.0907L230.794 29.59V29.59ZM228.641 33.1659L231.743 39.0292L228.432 44.8549H221.668L220.121 42.1332L218.356 39.0292L221.459 33.1659H228.641Z', fill: colorMapping[type_parts[1]].fill_3
|
|
487
|
-
React.createElement("path", { d: 'M211.662 42.6033L199.206 42.6319C196.339 42.6319 193.862 41.6095 191.846 39.5923C189.828 37.5755 188.805 35.0985 188.805 32.2321C188.805 29.3656 189.828 26.8886 191.846 24.8718C193.848 22.8332 196.325 21.7975 199.206 21.7975C202.072 21.7975 204.549 22.8199 206.566 24.8374C207.613 25.8847 208.391 27.093 208.944 28.5312L209.253 29.3327H197.87L196.325 32.2579L197.921 35.0969H211.458L215.015 28.6192C214.296 25.5702 212.835 22.9293 210.672 20.7657C207.531 17.6257 203.674 16.0333 199.206 16.0333C194.737 16.0333 190.88 17.6257 187.739 20.7657C184.555 23.9501 183.007 27.7011 183.007 32.2321C183.007 36.7001 184.599 40.5577 187.739 43.6981C190.88 46.8384 194.737 48.4308 199.206 48.4308H210.095L214.745 48.3297L211.662 42.6033', fill: colorMapping[type_parts[1]].fill_1
|
|
488
|
-
React.createElement("path", { d: 'M160.945 19.133L158.826 20.8384C155.734 23.9359 154.141 27.8058 154.141 32.2967L154.141 47.7903L156.985 49.407L159.939 47.8778L159.94 32.2967C159.94 29.6632 160.778 27.3706 162.432 25.4846C162.615 25.2739 162.811 25.0666 163.018 24.8639C163.074 24.8155 164.138 24.0061 164.811 23.5592C166.321 22.5576 168.076 21.9876 170.024 21.8632L170.166 21.8621C172.923 21.8621 175.32 22.7325 177.301 24.4494L180.146 23.0088L180.246 19.3426C177.44 17.1664 174.132 16.0633 170.408 16.0633C166.909 16.0633 163.725 17.0962 160.945 19.133', fill: colorMapping[type_parts[1]].fill_1
|
|
489
|
-
React.createElement("path", { d: 'M131.392 50C135.884 50 139.753 48.4076 142.893 45.2676C146.033 42.1269 147.626 38.2581 147.626 33.7668V18.1124L144.782 16.4964L141.827 18.0251V33.7668C141.827 36.6932 140.792 39.1936 138.745 41.2034C136.684 43.1927 134.128 44.2013 131.151 44.2013L131.01 44.2002H131.81L131.669 44.2013C128.692 44.2013 126.136 43.1927 124.074 41.2034C122.028 39.1936 120.993 36.6932 120.993 33.7668V18.0251L118.038 16.4964L115.194 18.1124V33.7668C115.194 38.2581 116.786 42.1269 119.926 45.2676C123.067 48.4076 126.936 50 131.427 50H131.392Z', fill: colorMapping[type_parts[1]].fill_1
|
|
490
|
-
React.createElement("path", { d: 'M93.8353 26.9933L97.8468 31.2421L100.788 28.1521L107.791 20.4534L106.753 17.3567L103.584 16.5678', fill: colorMapping[type_parts[1]].fill_2
|
|
491
|
-
React.createElement("path", { d: 'M80.7509 16.5677L77.5821 17.3564L76.5441 20.4534L83.5514 28.1568L88.1484 32.9862L76.5412 45.2133L77.5187 48.3175C79.525 48.9571 80.359 49.1805 80.6985 49.2584L92.195 37.238L103.636 49.2584C103.976 49.1805 104.81 48.9571 106.817 48.3175L107.794 45.2133L80.7509 16.5677', fill: colorMapping[type_parts[1]].fill_1
|
|
492
|
-
React.createElement("path", { d: 'M67.8498 45.479C67.5109 44.893 66.7322 43.5486 66.2043 42.6319H55.1965C52.3299 42.6319 49.8532 41.6095 47.8364 39.5923C45.819 37.5755 44.7966 35.0985 44.7966 32.2321C44.7966 29.3656 45.819 26.8886 47.8364 24.8718C49.8388 22.8332 52.316 21.7975 55.1965 21.7975C58.0632 21.7975 60.5398 22.8199 62.5565 24.8374C63.6038 25.8847 64.3824 27.093 64.9357 28.5312L65.2435 29.3327H53.8141C53.231 30.2171 52.5673 31.6476 52.303 32.2354L53.912 35.0969H67.474L71.0059 28.6192C70.2872 25.5702 68.8261 22.9293 66.6625 20.7657C63.5219 17.6257 59.6649 16.0333 55.1965 16.0333C50.7283 16.0333 46.8708 17.6257 43.7303 20.7657C40.546 23.9501 38.9979 27.7011 38.9979 32.2321C38.9979 36.7001 40.5903 40.5577 43.7303 43.6981C46.8708 46.8384 50.7283 48.4308 55.1965 48.4308H66.0873C66.9322 47.0737 67.5668 45.977 67.8498 45.479', fill: colorMapping[type_parts[1]].fill_1
|
|
493
|
-
React.createElement("path", { d: 'M27.6655 20.7443C26.9235 20.002 26.2307 19.4097 25.608 18.9831C22.7338 17.0113 19.5684 16.0117 16.1992 16.0117C13.6229 16.0117 11.1676 16.5943 8.9002 17.7442C8.1016 18.1264 7.38657 18.6118 6.73074 19.0799L5.88805 19.6819C5.85364 19.711 5.81716 19.7449 5.78223 19.7749L5.77618 17.9067C5.78246 17.9022 5.7892 17.8965 5.79554 17.8921L5.72168 1.52402L2.84058 1.54784e-05L0 1.6145V24.9966V30.8918C0.0184614 30.8508 0.0393993 30.8108 0.0580857 30.7698C0.0216133 31.2417 0 31.7206 0 32.2105V47.6757L2.84688 49.2499C4.7412 48.3293 5.4988 47.9164 5.79866 47.7385V32.2105C5.79866 29.3439 6.82128 26.8672 8.83853 24.8504C10.8415 22.8118 13.319 21.7759 16.1992 21.7759C19.0796 21.7759 21.557 22.8118 23.5635 24.8538C25.3441 26.6351 26.3374 28.7976 26.5963 31.4625C26.6263 31.6669 26.6339 40.3058 26.6339 47.6694C27.2825 48.0147 28.6127 48.8167 29.5141 49.3059C29.9448 49.0814 32.0589 47.8425 32.3979 47.6669V32.2105C32.3979 27.6795 30.8499 23.9285 27.6655 20.7443Z', fill: colorMapping[type_parts[1]].fill_1
|
|
485
|
+
return (React.createElement("svg", Object.assign({ fill: 'none', height: height, preserveAspectRatio: 'xMidYMid meet', viewBox: '0 0 236 50', width: '100%', xmlns: 'http://www.w3.org/2000/svg' }, accessibleProps, { "data-itemid": `${baseId}-svg` }),
|
|
486
|
+
React.createElement("path", { d: 'M230.794 29.59H219.306L214.279 39.0907L217.012 43.9001L219.587 48.4308H230.512L235.821 39.0907L230.794 29.59V29.59ZM228.641 33.1659L231.743 39.0292L228.432 44.8549H221.668L220.121 42.1332L218.356 39.0292L221.459 33.1659H228.641Z', "data-itemid": `${baseId}-path-1`, fill: colorMapping[type_parts[1]].fill_3 }),
|
|
487
|
+
React.createElement("path", { d: 'M211.662 42.6033L199.206 42.6319C196.339 42.6319 193.862 41.6095 191.846 39.5923C189.828 37.5755 188.805 35.0985 188.805 32.2321C188.805 29.3656 189.828 26.8886 191.846 24.8718C193.848 22.8332 196.325 21.7975 199.206 21.7975C202.072 21.7975 204.549 22.8199 206.566 24.8374C207.613 25.8847 208.391 27.093 208.944 28.5312L209.253 29.3327H197.87L196.325 32.2579L197.921 35.0969H211.458L215.015 28.6192C214.296 25.5702 212.835 22.9293 210.672 20.7657C207.531 17.6257 203.674 16.0333 199.206 16.0333C194.737 16.0333 190.88 17.6257 187.739 20.7657C184.555 23.9501 183.007 27.7011 183.007 32.2321C183.007 36.7001 184.599 40.5577 187.739 43.6981C190.88 46.8384 194.737 48.4308 199.206 48.4308H210.095L214.745 48.3297L211.662 42.6033', "data-itemid": `${baseId}-path-2`, fill: colorMapping[type_parts[1]].fill_1 }),
|
|
488
|
+
React.createElement("path", { d: 'M160.945 19.133L158.826 20.8384C155.734 23.9359 154.141 27.8058 154.141 32.2967L154.141 47.7903L156.985 49.407L159.939 47.8778L159.94 32.2967C159.94 29.6632 160.778 27.3706 162.432 25.4846C162.615 25.2739 162.811 25.0666 163.018 24.8639C163.074 24.8155 164.138 24.0061 164.811 23.5592C166.321 22.5576 168.076 21.9876 170.024 21.8632L170.166 21.8621C172.923 21.8621 175.32 22.7325 177.301 24.4494L180.146 23.0088L180.246 19.3426C177.44 17.1664 174.132 16.0633 170.408 16.0633C166.909 16.0633 163.725 17.0962 160.945 19.133', "data-itemid": `${baseId}-path-3`, fill: colorMapping[type_parts[1]].fill_1 }),
|
|
489
|
+
React.createElement("path", { d: 'M131.392 50C135.884 50 139.753 48.4076 142.893 45.2676C146.033 42.1269 147.626 38.2581 147.626 33.7668V18.1124L144.782 16.4964L141.827 18.0251V33.7668C141.827 36.6932 140.792 39.1936 138.745 41.2034C136.684 43.1927 134.128 44.2013 131.151 44.2013L131.01 44.2002H131.81L131.669 44.2013C128.692 44.2013 126.136 43.1927 124.074 41.2034C122.028 39.1936 120.993 36.6932 120.993 33.7668V18.0251L118.038 16.4964L115.194 18.1124V33.7668C115.194 38.2581 116.786 42.1269 119.926 45.2676C123.067 48.4076 126.936 50 131.427 50H131.392Z', "data-itemid": `${baseId}-path-4`, fill: colorMapping[type_parts[1]].fill_1 }),
|
|
490
|
+
React.createElement("path", { d: 'M93.8353 26.9933L97.8468 31.2421L100.788 28.1521L107.791 20.4534L106.753 17.3567L103.584 16.5678', "data-itemid": `${baseId}-path-5`, fill: colorMapping[type_parts[1]].fill_2 }),
|
|
491
|
+
React.createElement("path", { d: 'M80.7509 16.5677L77.5821 17.3564L76.5441 20.4534L83.5514 28.1568L88.1484 32.9862L76.5412 45.2133L77.5187 48.3175C79.525 48.9571 80.359 49.1805 80.6985 49.2584L92.195 37.238L103.636 49.2584C103.976 49.1805 104.81 48.9571 106.817 48.3175L107.794 45.2133L80.7509 16.5677', "data-itemid": `${baseId}-path-6`, fill: colorMapping[type_parts[1]].fill_1 }),
|
|
492
|
+
React.createElement("path", { d: 'M67.8498 45.479C67.5109 44.893 66.7322 43.5486 66.2043 42.6319H55.1965C52.3299 42.6319 49.8532 41.6095 47.8364 39.5923C45.819 37.5755 44.7966 35.0985 44.7966 32.2321C44.7966 29.3656 45.819 26.8886 47.8364 24.8718C49.8388 22.8332 52.316 21.7975 55.1965 21.7975C58.0632 21.7975 60.5398 22.8199 62.5565 24.8374C63.6038 25.8847 64.3824 27.093 64.9357 28.5312L65.2435 29.3327H53.8141C53.231 30.2171 52.5673 31.6476 52.303 32.2354L53.912 35.0969H67.474L71.0059 28.6192C70.2872 25.5702 68.8261 22.9293 66.6625 20.7657C63.5219 17.6257 59.6649 16.0333 55.1965 16.0333C50.7283 16.0333 46.8708 17.6257 43.7303 20.7657C40.546 23.9501 38.9979 27.7011 38.9979 32.2321C38.9979 36.7001 40.5903 40.5577 43.7303 43.6981C46.8708 46.8384 50.7283 48.4308 55.1965 48.4308H66.0873C66.9322 47.0737 67.5668 45.977 67.8498 45.479', "data-itemid": `${baseId}-path-7`, fill: colorMapping[type_parts[1]].fill_1 }),
|
|
493
|
+
React.createElement("path", { d: 'M27.6655 20.7443C26.9235 20.002 26.2307 19.4097 25.608 18.9831C22.7338 17.0113 19.5684 16.0117 16.1992 16.0117C13.6229 16.0117 11.1676 16.5943 8.9002 17.7442C8.1016 18.1264 7.38657 18.6118 6.73074 19.0799L5.88805 19.6819C5.85364 19.711 5.81716 19.7449 5.78223 19.7749L5.77618 17.9067C5.78246 17.9022 5.7892 17.8965 5.79554 17.8921L5.72168 1.52402L2.84058 1.54784e-05L0 1.6145V24.9966V30.8918C0.0184614 30.8508 0.0393993 30.8108 0.0580857 30.7698C0.0216133 31.2417 0 31.7206 0 32.2105V47.6757L2.84688 49.2499C4.7412 48.3293 5.4988 47.9164 5.79866 47.7385V32.2105C5.79866 29.3439 6.82128 26.8672 8.83853 24.8504C10.8415 22.8118 13.319 21.7759 16.1992 21.7759C19.0796 21.7759 21.557 22.8118 23.5635 24.8538C25.3441 26.6351 26.3374 28.7976 26.5963 31.4625C26.6263 31.6669 26.6339 40.3058 26.6339 47.6694C27.2825 48.0147 28.6127 48.8167 29.5141 49.3059C29.9448 49.0814 32.0589 47.8425 32.3979 47.6669V32.2105C32.3979 27.6795 30.8499 23.9285 27.6655 20.7443Z', "data-itemid": `${baseId}-path-8`, fill: colorMapping[type_parts[1]].fill_1 })));
|
|
494
494
|
}
|
|
495
495
|
};
|
|
496
496
|
|
|
@@ -517,11 +517,11 @@ const Buttons = styled.div `
|
|
|
517
517
|
column-gap: 10px;
|
|
518
518
|
flex-direction: reverse;
|
|
519
519
|
`;
|
|
520
|
-
const AppHeader = ({ logoUrl, buttons = [],
|
|
521
|
-
const baseId =
|
|
522
|
-
return (React.createElement(Container$3, {
|
|
523
|
-
React.createElement(LogoWrapper, {
|
|
524
|
-
React.createElement(Buttons, {
|
|
520
|
+
const AppHeader = ({ logoUrl, buttons = [], dataItemid }) => {
|
|
521
|
+
const baseId = dataItemid || 'app-header';
|
|
522
|
+
return (React.createElement(Container$3, { "data-itemid": `${baseId}-container` },
|
|
523
|
+
React.createElement(LogoWrapper, { "data-itemid": `${baseId}-logo-wrapper` }, logoUrl ? (React.createElement(Image, { "data-itemid": `${baseId}-logo`, src: logoUrl })) : (React.createElement(Logo, { "data-itemid": `${baseId}-default-logo`, height: '30px' }))),
|
|
524
|
+
React.createElement(Buttons, { "data-itemid": `${baseId}-buttons` }, buttons.map((b, i) => (React.createElement(Button, Object.assign({ key: i }, b, { "data-itemid": `${baseId}-button-${i}` })))))));
|
|
525
525
|
};
|
|
526
526
|
|
|
527
527
|
const Wrapper$e = styled.div `
|
|
@@ -550,13 +550,13 @@ const Remove$1 = styled.div `
|
|
|
550
550
|
align-items: center;
|
|
551
551
|
`;
|
|
552
552
|
const Tag = (_a) => {
|
|
553
|
-
var { children, color = 'PRIMARY', removable, onClick,
|
|
554
|
-
const baseId =
|
|
555
|
-
return (React.createElement(Wrapper$e, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps, {
|
|
556
|
-
React.createElement(Content$2, {
|
|
557
|
-
React.createElement(Label$4, { "$color": color,
|
|
558
|
-
removable ? (React.createElement(Remove$1, {
|
|
559
|
-
React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff',
|
|
553
|
+
var { children, color = 'PRIMARY', removable, onClick, dataItemid } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick", "dataItemid"]);
|
|
554
|
+
const baseId = dataItemid || 'tag';
|
|
555
|
+
return (React.createElement(Wrapper$e, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
556
|
+
React.createElement(Content$2, { "data-itemid": `${baseId}-content` },
|
|
557
|
+
React.createElement(Label$4, { "$color": color, "data-itemid": `${baseId}-label` }, children),
|
|
558
|
+
removable ? (React.createElement(Remove$1, { "data-itemid": `${baseId}-remove` },
|
|
559
|
+
React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', "data-itemid": `${baseId}-icon`, path: js.mdiClose, size: '15px' }))) : null)));
|
|
560
560
|
};
|
|
561
561
|
|
|
562
562
|
const SidebarContainer = styled.div `
|
|
@@ -646,30 +646,30 @@ const FooterInfo = styled.div `
|
|
|
646
646
|
const SidebarMenuContainer = styled.div `
|
|
647
647
|
flex-grow: 1;
|
|
648
648
|
`;
|
|
649
|
-
const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px',
|
|
649
|
+
const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px', dataItemid, }) => {
|
|
650
650
|
const theme = React.useContext(styled.ThemeContext) || EditableTheme;
|
|
651
651
|
const [collapsed, toggleCollapse] = React.useState(isCollapsed);
|
|
652
|
-
const baseId =
|
|
653
|
-
return (React.createElement(SidebarContainer, { "$isOpen": !collapsed, "$width": defaultWidth,
|
|
654
|
-
React.createElement(SidebarMenuContainer, {
|
|
652
|
+
const baseId = dataItemid || 'app-menu';
|
|
653
|
+
return (React.createElement(SidebarContainer, { "$isOpen": !collapsed, "$width": defaultWidth, "data-itemid": `${baseId}-sidebar-container` },
|
|
654
|
+
React.createElement(SidebarMenuContainer, { "data-itemid": `${baseId}-sidebar-menu-container` }, menu.map((nav_item, navIndex) => {
|
|
655
655
|
const navItemId = `${baseId}-nav-item-${navIndex}`;
|
|
656
656
|
return (React.createElement(React.Fragment, { key: navItemId },
|
|
657
|
-
React.createElement(MenuWrapper$1, { "$active": !!nav_item.is_active, "$color": theme.PRIMARY_COLOR,
|
|
658
|
-
React.createElement(MenuIcon, { "$active": !!nav_item.is_active,
|
|
659
|
-
collapsed ? null : (React.createElement(MenuLabel, { "$active": nav_item.is_active, "$color": theme.PRIMARY_COLOR,
|
|
660
|
-
nav_item.is_active && nav_item.menu && !collapsed ? (React.createElement(SubMenu, {
|
|
657
|
+
React.createElement(MenuWrapper$1, { "$active": !!nav_item.is_active, "$color": theme.PRIMARY_COLOR, "data-itemid": `${navItemId}-menu-wrapper`, onClick: nav_item.onClick, title: collapsed ? (nav_item === null || nav_item === void 0 ? void 0 : nav_item.title) || nav_item.label : '' },
|
|
658
|
+
React.createElement(MenuIcon, { "$active": !!nav_item.is_active, "data-itemid": `${navItemId}-menu-icon`, path: nav_item.icon }),
|
|
659
|
+
collapsed ? null : (React.createElement(MenuLabel, { "$active": nav_item.is_active, "$color": theme.PRIMARY_COLOR, "data-itemid": `${navItemId}-menu-label` }, nav_item.label))),
|
|
660
|
+
nav_item.is_active && nav_item.menu && !collapsed ? (React.createElement(SubMenu, { "data-itemid": `${navItemId}-sub-menu` }, nav_item.menu.map((menu_item, menuIndex) => {
|
|
661
661
|
const menuItemId = `${navItemId}-menu-item-${menuIndex}`;
|
|
662
|
-
return (React.createElement(SubMenuItem, { "$active": menu_item.is_active, "$color": theme.PRIMARY_COLOR,
|
|
662
|
+
return (React.createElement(SubMenuItem, { "$active": menu_item.is_active, "$color": theme.PRIMARY_COLOR, "data-itemid": `${menuItemId}-sub-menu-item`, key: menuItemId, onClick: menu_item.onClick }, menu_item.label));
|
|
663
663
|
}))) : null));
|
|
664
664
|
})),
|
|
665
|
-
React.createElement(Footer, {
|
|
666
|
-
collapsed ? null : (React.createElement(FooterInfo, {
|
|
667
|
-
footerTag ? React.createElement(Tag, {
|
|
668
|
-
React.createElement(Copy, {
|
|
665
|
+
React.createElement(Footer, { "data-itemid": `${baseId}-footer` },
|
|
666
|
+
collapsed ? null : (React.createElement(FooterInfo, { "data-itemid": `${baseId}-footer-info` },
|
|
667
|
+
footerTag ? React.createElement(Tag, { "data-itemid": `${baseId}-footer-tag` }, footerTag) : null,
|
|
668
|
+
React.createElement(Copy, { "data-itemid": `${baseId}-footer-copy`, margin: '8px 0 0 0', type: 'small' },
|
|
669
669
|
"\u00A9 ",
|
|
670
670
|
new Date().getFullYear(),
|
|
671
671
|
" Hexure"))),
|
|
672
|
-
React.createElement(Button, { icon: collapsed ? js.mdiChevronRight : js.mdiChevronLeft,
|
|
672
|
+
React.createElement(Button, { "data-itemid": `${baseId}-collapse-button`, icon: collapsed ? js.mdiChevronRight : js.mdiChevronLeft, onClick: (e) => {
|
|
673
673
|
e.preventDefault();
|
|
674
674
|
toggleCollapse(!collapsed);
|
|
675
675
|
}, small: true }))));
|
|
@@ -744,19 +744,19 @@ const ErrorMsg = styled.span `
|
|
|
744
744
|
margin-left: 8px;
|
|
745
745
|
`;
|
|
746
746
|
const BulkActionBar = (_a) => {
|
|
747
|
-
var { actions = [], errorMsg, onClear, selectedCount = 0,
|
|
748
|
-
const baseId =
|
|
749
|
-
return (React.createElement(Wrapper$d, Object.assign({}, accessibleProps, {
|
|
750
|
-
React.createElement(Left, {
|
|
751
|
-
React.createElement(Info$1, {
|
|
752
|
-
React.createElement(Selected, {
|
|
747
|
+
var { actions = [], errorMsg, onClear, selectedCount = 0, dataItemid } = _a, accessibleProps = __rest(_a, ["actions", "errorMsg", "onClear", "selectedCount", "dataItemid"]);
|
|
748
|
+
const baseId = dataItemid || 'bulk-action-bar';
|
|
749
|
+
return (React.createElement(Wrapper$d, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
750
|
+
React.createElement(Left, { "data-itemid": `${baseId}-left` },
|
|
751
|
+
React.createElement(Info$1, { "data-itemid": `${baseId}-info` },
|
|
752
|
+
React.createElement(Selected, { "data-itemid": `${baseId}-selected` },
|
|
753
753
|
selectedCount,
|
|
754
754
|
" Selected"),
|
|
755
|
-
onClear ? (React.createElement(Clear, {
|
|
756
|
-
React.createElement(Actions$1, {
|
|
757
|
-
errorMsg ? (React.createElement(Error$1, {
|
|
758
|
-
React.createElement(Icon, { color: Colors.RED.Hex,
|
|
759
|
-
React.createElement(ErrorMsg, {
|
|
755
|
+
onClear ? (React.createElement(Clear, { "data-itemid": `${baseId}-clear`, onClick: onClear }, "Clear")) : null),
|
|
756
|
+
React.createElement(Actions$1, { "data-itemid": `${baseId}-actions` }, actions.map((action, i) => (React.createElement(Button, Object.assign({}, action, { "data-itemid": `${baseId}-action-${i}`, key: i, small: true })))))),
|
|
757
|
+
errorMsg ? (React.createElement(Error$1, { "data-itemid": `${baseId}-error` },
|
|
758
|
+
React.createElement(Icon, { color: Colors.RED.Hex, "data-itemid": `${baseId}-error-icon`, path: js.mdiInformationOutline, size: '20px' }),
|
|
759
|
+
React.createElement(ErrorMsg, { "data-itemid": `${baseId}-error-msg` }, errorMsg))) : null));
|
|
760
760
|
};
|
|
761
761
|
|
|
762
762
|
const Wrapper$c = styled.div `
|
|
@@ -804,14 +804,14 @@ Title$1.defaultProps = {
|
|
|
804
804
|
disabled: false,
|
|
805
805
|
};
|
|
806
806
|
const MoreMenu = (_a) => {
|
|
807
|
-
var { maxHeight, menuItems = [],
|
|
808
|
-
const baseId =
|
|
809
|
-
return (React.createElement(Wrapper$c, Object.assign({ "$maxHeight": maxHeight }, accessibleProps, {
|
|
807
|
+
var { maxHeight, menuItems = [], dataItemid } = _a, accessibleProps = __rest(_a, ["maxHeight", "menuItems", "dataItemid"]);
|
|
808
|
+
const baseId = dataItemid || 'more-menu';
|
|
809
|
+
return (React.createElement(Wrapper$c, Object.assign({ "$maxHeight": maxHeight }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }), menuItems.map((item, i) => {
|
|
810
810
|
var _a;
|
|
811
811
|
const itemId = `${baseId}-menu-item-${i}`;
|
|
812
|
-
return (React.createElement(MenuItem, {
|
|
813
|
-
item.icon ? (React.createElement(Icon, { color: item.disabled ? Colors.LIGHT_GRAY.Hex : Colors.MEDIUM_GRAY.Hex,
|
|
814
|
-
React.createElement(Title$1, { disabled: (_a = item.disabled) !== null && _a !== void 0 ? _a : false
|
|
812
|
+
return (React.createElement(MenuItem, { "data-itemid": `${itemId}-menu-item`, key: i, onClick: item.onClick },
|
|
813
|
+
item.icon ? (React.createElement(Icon, { color: item.disabled ? Colors.LIGHT_GRAY.Hex : Colors.MEDIUM_GRAY.Hex, "data-itemid": `${itemId}-icon`, path: item.icon, size: '20px' })) : null,
|
|
814
|
+
React.createElement(Title$1, { "data-itemid": `${itemId}-title`, disabled: (_a = item.disabled) !== null && _a !== void 0 ? _a : false }, item.label)));
|
|
815
815
|
})));
|
|
816
816
|
};
|
|
817
817
|
|
|
@@ -827,11 +827,11 @@ const StyledMoreMenu = styled(MoreMenu) `
|
|
|
827
827
|
max-height: ${props => props.maxHeight};
|
|
828
828
|
z-index: 10;
|
|
829
829
|
`;
|
|
830
|
-
const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'bottomLeft', format = 'primary', menuWidth = '200px', enableHover = true, enableClick = false, show = false,
|
|
830
|
+
const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'bottomLeft', format = 'primary', menuWidth = '200px', enableHover = true, enableClick = false, show = false, dataItemid, }) => {
|
|
831
831
|
const [showMenu, toggleMenu] = React.useState(false);
|
|
832
832
|
const [menuPosition, setMenuPosition] = React.useState({ top: '0px', left: '0px' });
|
|
833
833
|
const menuWrapperRef = React.useRef(null);
|
|
834
|
-
const baseId =
|
|
834
|
+
const baseId = dataItemid || 'button-menu';
|
|
835
835
|
React.useEffect(() => {
|
|
836
836
|
toggleMenu(show);
|
|
837
837
|
}, [show]);
|
|
@@ -897,9 +897,9 @@ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = '
|
|
|
897
897
|
setMenuPosition({ top: `${top}px`, left: `${left}px` });
|
|
898
898
|
}
|
|
899
899
|
}, [showMenu, position, menuWidth]);
|
|
900
|
-
return (React.createElement(MenuWrapper, {
|
|
901
|
-
React.createElement(Button, { disabled: disabled, format: format, icon: js.mdiDotsHorizontal,
|
|
902
|
-
showMenu && (React.createElement(StyledMoreMenu, { "$left": menuPosition.left, "$menuWidth": menuWidth, "$top": menuPosition.top,
|
|
900
|
+
return (React.createElement(MenuWrapper, { "data-itemid": `${baseId}-menu-wrapper`, onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ref: menuWrapperRef },
|
|
901
|
+
React.createElement(Button, { "data-itemid": `${baseId}-button`, disabled: disabled, format: format, icon: js.mdiDotsHorizontal, small: small }, label),
|
|
902
|
+
showMenu && (React.createElement(StyledMoreMenu, { "$left": menuPosition.left, "$menuWidth": menuWidth, "$top": menuPosition.top, "data-itemid": `${baseId}-more-menu`, maxHeight: maxHeight, menuItems: menuItems }))));
|
|
903
903
|
};
|
|
904
904
|
|
|
905
905
|
const Wrapper$b = styled.label `
|
|
@@ -981,12 +981,12 @@ const Label$3 = styled.span `
|
|
|
981
981
|
box-sizing: border-box;
|
|
982
982
|
`;
|
|
983
983
|
const Checkbox = (_a) => {
|
|
984
|
-
var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex,
|
|
985
|
-
const baseId =
|
|
986
|
-
return (React.createElement(Wrapper$b, Object.assign({ "$disabled": disabled }, accessibleProps, {
|
|
987
|
-
React.createElement(Input$2, { checked: checked,
|
|
988
|
-
React.createElement(Check$1, { "$invalid": invalid,
|
|
989
|
-
children ? (React.createElement(Label$3, { color: color,
|
|
984
|
+
var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex, dataItemid } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex", "dataItemid"]);
|
|
985
|
+
const baseId = dataItemid || 'checkbox';
|
|
986
|
+
return (React.createElement(Wrapper$b, Object.assign({ "$disabled": disabled }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
987
|
+
React.createElement(Input$2, { checked: checked, "data-itemid": `${baseId}-input`, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'checkbox' }),
|
|
988
|
+
React.createElement(Check$1, { "$invalid": invalid, "data-itemid": `${baseId}-check` }),
|
|
989
|
+
children ? (React.createElement(Label$3, { color: color, "data-itemid": `${baseId}-label` },
|
|
990
990
|
children,
|
|
991
991
|
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)) : null));
|
|
992
992
|
};
|
|
@@ -1001,10 +1001,10 @@ const Options$1 = styled.div `
|
|
|
1001
1001
|
box-sizing: border-box;
|
|
1002
1002
|
`;
|
|
1003
1003
|
const Checklist = (_a) => {
|
|
1004
|
-
var { disabled, onChange, options, selected = [], showSelectAll,
|
|
1004
|
+
var { disabled, onChange, options, selected = [], showSelectAll, dataItemid } = _a, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "selected", "showSelectAll", "dataItemid"]);
|
|
1005
1005
|
const values = options.map((option) => option.value);
|
|
1006
1006
|
const selected_options = options.filter(o => selected.includes(o.value));
|
|
1007
|
-
const baseId =
|
|
1007
|
+
const baseId = dataItemid || 'checklist';
|
|
1008
1008
|
const handleToggleAll = () => {
|
|
1009
1009
|
if (selected_options.length === options.length) {
|
|
1010
1010
|
triggerChange([]);
|
|
@@ -1029,13 +1029,13 @@ const Checklist = (_a) => {
|
|
|
1029
1029
|
});
|
|
1030
1030
|
};
|
|
1031
1031
|
return (React.createElement(React.Fragment, null,
|
|
1032
|
-
showSelectAll && values.length ? (React.createElement(SelectAll, {
|
|
1033
|
-
React.createElement(Checkbox, { checked: selected.length === values.length,
|
|
1034
|
-
React.createElement(Options$1, {
|
|
1032
|
+
showSelectAll && values.length ? (React.createElement(SelectAll, { "data-itemid": `${baseId}-select-all` },
|
|
1033
|
+
React.createElement(Checkbox, { checked: selected.length === values.length, "data-itemid": `${baseId}-checkbox-select-all`, disabled: disabled, onChange: handleToggleAll }, "Select All"))) : null,
|
|
1034
|
+
React.createElement(Options$1, { "data-itemid": `${baseId}-options` }, options.map((option, i) => {
|
|
1035
1035
|
const label = `${option.label || option.value}`;
|
|
1036
1036
|
const checked = selected.includes(option.value);
|
|
1037
1037
|
const optionId = `${baseId}-option-${i}`;
|
|
1038
|
-
return (React.createElement(Checkbox, Object.assign({
|
|
1038
|
+
return (React.createElement(Checkbox, Object.assign({ "data-itemid": `${optionId}-checkbox`, key: i }, accessibleProps, { checked: checked, color: option.color, disabled: disabled, onChange: handleChange.bind(null, option) }), label));
|
|
1039
1039
|
}))));
|
|
1040
1040
|
};
|
|
1041
1041
|
|
|
@@ -1103,10 +1103,10 @@ const SearchInput$1 = styled.input `
|
|
|
1103
1103
|
white-space: nowrap;
|
|
1104
1104
|
`;
|
|
1105
1105
|
const Select = (_a) => {
|
|
1106
|
-
var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex,
|
|
1106
|
+
var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex, dataItemid } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex", "dataItemid"]);
|
|
1107
1107
|
const [searchTerm, setSearchTerm] = React.useState('');
|
|
1108
1108
|
const [value, setValue] = React.useState(propValue || '');
|
|
1109
|
-
const baseId =
|
|
1109
|
+
const baseId = dataItemid || 'select';
|
|
1110
1110
|
// Update the value when the prop changes
|
|
1111
1111
|
React.useEffect(() => {
|
|
1112
1112
|
setValue(propValue || '');
|
|
@@ -1126,15 +1126,15 @@ const Select = (_a) => {
|
|
|
1126
1126
|
const filteredOptionGroups = searchable
|
|
1127
1127
|
? optionGroups === null || optionGroups === void 0 ? void 0 : optionGroups.map(group => (Object.assign(Object.assign({}, group), { options: group.options.filter(option => { var _a; return (_a = option.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTerm.toLowerCase()); }) })))
|
|
1128
1128
|
: optionGroups;
|
|
1129
|
-
return (React.createElement(Wrapper$a, { "$invalid": invalid, "$readOnly": readOnly, "$style": style,
|
|
1130
|
-
searchable && (React.createElement(SearchInput$1, Object.assign({
|
|
1131
|
-
React.createElement(Trigger$1, Object.assign({
|
|
1132
|
-
placeholder && !value && (React.createElement("option", {
|
|
1129
|
+
return (React.createElement(Wrapper$a, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "data-itemid": `${baseId}-wrapper` },
|
|
1130
|
+
searchable && (React.createElement(SearchInput$1, Object.assign({ "data-itemid": `${baseId}-search-input`, onChange: handleSearch, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, type: 'text', value: searchTerm }, accessibleProps))),
|
|
1131
|
+
React.createElement(Trigger$1, Object.assign({ "data-itemid": `${baseId}-trigger`, disabled: readOnly, onChange: handleChange, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, value: value }, accessibleProps),
|
|
1132
|
+
placeholder && !value && (React.createElement("option", { "data-itemid": `${baseId}-placeholder`, disabled: true, value: '' }, placeholder)),
|
|
1133
1133
|
filteredOptionGroups &&
|
|
1134
|
-
filteredOptionGroups.map((group, i) => (React.createElement("optgroup", {
|
|
1134
|
+
filteredOptionGroups.map((group, i) => (React.createElement("optgroup", { "data-itemid": `${baseId}-optgroup-${i}`, key: i, label: group.label || `Group ${i}` }, group.options.map((option, j) => (React.createElement("option", { "data-itemid": `${baseId}-option-${i}-${j}`, key: j, style: { color: option.color }, value: option.value }, option.label || option.value)))))),
|
|
1135
1135
|
filteredOptions &&
|
|
1136
|
-
filteredOptions.map((option, i) => (React.createElement("option", {
|
|
1137
|
-
React.createElement(IconWrapper$2, { color: Colors.BLACK.Hex,
|
|
1136
|
+
filteredOptions.map((option, i) => (React.createElement("option", { "data-itemid": `${baseId}-option-${i}`, key: i, style: { color: option.color }, value: option.value }, option.label || option.value)))),
|
|
1137
|
+
React.createElement(IconWrapper$2, { color: Colors.BLACK.Hex, "data-itemid": `${baseId}-icon`, path: js.mdiChevronDown, size: '22px' })));
|
|
1138
1138
|
};
|
|
1139
1139
|
|
|
1140
1140
|
const DatePickerWrapper = styled.div `
|
|
@@ -1147,7 +1147,7 @@ const Middle = styled.div `
|
|
|
1147
1147
|
`;
|
|
1148
1148
|
const DatePicker = ({ readOnly = false, invalid = false, maxDate = null, minDate = null, date,
|
|
1149
1149
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1150
|
-
onChange = () => { }, style,
|
|
1150
|
+
onChange = () => { }, style, dataItemid, locale, }) => {
|
|
1151
1151
|
const [selectedDay, setSelectedDay] = React.useState(date ? dayjs(date).date().toString() : '');
|
|
1152
1152
|
const [selectedMonth, setSelectedMonth] = React.useState(date ? (dayjs(date).month() + 1).toString() : '');
|
|
1153
1153
|
const [selectedYear, setSelectedYear] = React.useState(date ? dayjs(date).year().toString() : '');
|
|
@@ -1224,13 +1224,13 @@ onChange = () => { }, style, id, }) => {
|
|
|
1224
1224
|
setSelectedYear(e.target.value);
|
|
1225
1225
|
setDDate(new_date);
|
|
1226
1226
|
};
|
|
1227
|
-
const baseId =
|
|
1227
|
+
const baseId = dataItemid || 'date-picker';
|
|
1228
1228
|
return (React.createElement(React.Fragment, null,
|
|
1229
|
-
React.createElement(DatePickerWrapper, { "$style": style,
|
|
1230
|
-
React.createElement(Select, {
|
|
1231
|
-
React.createElement(Middle, {
|
|
1232
|
-
React.createElement(Select, {
|
|
1233
|
-
React.createElement(Select, {
|
|
1229
|
+
React.createElement(DatePickerWrapper, { "$style": style, "data-itemid": `${baseId}-wrapper` },
|
|
1230
|
+
React.createElement(Select, { "data-itemid": `${baseId}-month-select`, invalid: invalid, onChange: handleMonthChange, options: months, placeholder: (locale === null || locale === void 0 ? void 0 : locale.SelectMonth) ? locale === null || locale === void 0 ? void 0 : locale.SelectMonth : 'Select Month', readOnly: readOnly, style: { borderRadius: '4px 0px 0px 4px', flexGrow: 3 }, value: selectedMonth }),
|
|
1231
|
+
React.createElement(Middle, { "data-itemid": `${baseId}-middle` },
|
|
1232
|
+
React.createElement(Select, { "data-itemid": `${baseId}-day-select`, invalid: invalid, onChange: handleDayChange, options: dayOptions, placeholder: (locale === null || locale === void 0 ? void 0 : locale.SelectDay) ? locale === null || locale === void 0 ? void 0 : locale.SelectDay : 'Select Day', readOnly: readOnly, style: { borderRadius: '0px' }, value: selectedDay })),
|
|
1233
|
+
React.createElement(Select, { "data-itemid": `${baseId}-year-select`, invalid: invalid, onChange: handleYearChange, options: years, placeholder: (locale === null || locale === void 0 ? void 0 : locale.SelectYear) ? locale === null || locale === void 0 ? void 0 : locale.SelectYear : 'Select Year', readOnly: readOnly, style: { borderRadius: '0px 4px 4px 0px', flexGrow: 2 }, value: selectedYear }))));
|
|
1234
1234
|
};
|
|
1235
1235
|
|
|
1236
1236
|
const Scrim$1 = styled.div `
|
|
@@ -1293,7 +1293,7 @@ const ButtonBar$1 = styled.div `
|
|
|
1293
1293
|
background: #fff;
|
|
1294
1294
|
`;
|
|
1295
1295
|
const Drawer = (_a) => {
|
|
1296
|
-
var { children, description, title, onClose, primaryButton, position = 'fixed', secondaryButton, tertiaryButton, scrim = 'dark', width,
|
|
1296
|
+
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"]);
|
|
1297
1297
|
React.useEffect(() => {
|
|
1298
1298
|
document.onkeydown = e => {
|
|
1299
1299
|
if (e.key === 'Escape') {
|
|
@@ -1304,21 +1304,21 @@ const Drawer = (_a) => {
|
|
|
1304
1304
|
document.onkeydown = null;
|
|
1305
1305
|
};
|
|
1306
1306
|
}, [onClose]);
|
|
1307
|
-
const baseId =
|
|
1307
|
+
const baseId = dataItemid || 'drawer';
|
|
1308
1308
|
return (React.createElement(React.Fragment, null,
|
|
1309
|
-
React.createElement(Container$2, Object.assign({}, accessibleProps, { "$position": position, "$width": width,
|
|
1310
|
-
React.createElement(Header$2, {
|
|
1311
|
-
React.createElement("div", {
|
|
1312
|
-
title ? (React.createElement(Heading, {
|
|
1313
|
-
description ? (React.createElement(Copy, { color: 'GRAY',
|
|
1314
|
-
React.createElement(Close$1, {
|
|
1315
|
-
React.createElement(Button, { format: 'secondary', icon: js.mdiClose,
|
|
1316
|
-
React.createElement(ContentWrapper$1, {
|
|
1317
|
-
primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar$1, {
|
|
1318
|
-
tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary'
|
|
1319
|
-
secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary'
|
|
1320
|
-
primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary'
|
|
1321
|
-
scrim ? (React.createElement(Scrim$1, { "$position": position, "$scrim": scrim,
|
|
1309
|
+
React.createElement(Container$2, Object.assign({}, accessibleProps, { "$position": position, "$width": width, "data-itemid": `${baseId}-container` }),
|
|
1310
|
+
React.createElement(Header$2, { "data-itemid": `${baseId}-header` },
|
|
1311
|
+
React.createElement("div", { "data-itemid": `${baseId}-header-content` },
|
|
1312
|
+
title ? (React.createElement(Heading, { "data-itemid": `${baseId}-title`, type: 'secondary' }, title)) : null,
|
|
1313
|
+
description ? (React.createElement(Copy, { color: 'GRAY', "data-itemid": `${baseId}-description` }, description)) : null),
|
|
1314
|
+
React.createElement(Close$1, { "data-itemid": `${baseId}-close`, onClick: onClose },
|
|
1315
|
+
React.createElement(Button, { "data-itemid": `${baseId}-close-button`, format: 'secondary', icon: js.mdiClose, small: true }))),
|
|
1316
|
+
React.createElement(ContentWrapper$1, { "data-itemid": `${baseId}-content-wrapper` }, children),
|
|
1317
|
+
primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar$1, { "data-itemid": `${baseId}-button-bar` },
|
|
1318
|
+
tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { "data-itemid": `${baseId}-tertiary-button`, format: tertiaryButton.format || 'secondary' }))) : null,
|
|
1319
|
+
secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { "data-itemid": `${baseId}-secondary-button`, format: secondaryButton.format || 'secondary' }))) : null,
|
|
1320
|
+
primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { "data-itemid": `${baseId}-primary-button`, format: primaryButton.format || 'primary' }))) : null)) : null),
|
|
1321
|
+
scrim ? (React.createElement(Scrim$1, { "$position": position, "$scrim": scrim, "data-itemid": `${baseId}-scrim`, onClick: onClose })) : null));
|
|
1322
1322
|
};
|
|
1323
1323
|
|
|
1324
1324
|
const Wrapper$9 = styled.div(props => (Object.assign({ margin: '0px 0px 18px 0px' }, props.$customStyle)));
|
|
@@ -1370,18 +1370,18 @@ const Validation = styled.div `
|
|
|
1370
1370
|
box-sizing: border-box;
|
|
1371
1371
|
`;
|
|
1372
1372
|
const Field = (_a) => {
|
|
1373
|
-
var { action, children, validationText, label, description, required, htmlFor, style = {}, tooltip,
|
|
1374
|
-
const baseId =
|
|
1375
|
-
return (React.createElement(Wrapper$9, Object.assign({ "$customStyle": style }, accessibleProps, {
|
|
1376
|
-
React.createElement(LabelRow, {
|
|
1377
|
-
label || required || tooltip ? (React.createElement(Label$2, {
|
|
1373
|
+
var { action, children, validationText, label, description, required, htmlFor, style = {}, tooltip, dataItemid } = _a, accessibleProps = __rest(_a, ["action", "children", "validationText", "label", "description", "required", "htmlFor", "style", "tooltip", "dataItemid"]);
|
|
1374
|
+
const baseId = dataItemid || 'field';
|
|
1375
|
+
return (React.createElement(Wrapper$9, Object.assign({ "$customStyle": style }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
1376
|
+
React.createElement(LabelRow, { "data-itemid": `${baseId}-label-row` },
|
|
1377
|
+
label || required || tooltip ? (React.createElement(Label$2, { "data-itemid": `${baseId}-label`, htmlFor: htmlFor },
|
|
1378
1378
|
label,
|
|
1379
|
-
required ? React.createElement(Required, {
|
|
1379
|
+
required ? React.createElement(Required, { "data-itemid": `${baseId}-required` }, "*") : null,
|
|
1380
1380
|
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)) : null,
|
|
1381
|
-
action ? (React.createElement(Action, {
|
|
1382
|
-
description ? React.createElement(Description, {
|
|
1383
|
-
React.createElement("div", {
|
|
1384
|
-
React.createElement(Validation, { className: 'field-validation-wrapper',
|
|
1381
|
+
action ? (React.createElement(Action, { "data-itemid": `${baseId}-action`, onClick: action.onClick }, action.label)) : null),
|
|
1382
|
+
description ? (React.createElement(Description, { "data-itemid": `${baseId}-description` }, description)) : null,
|
|
1383
|
+
React.createElement("div", { "data-itemid": `${baseId}-children` }, children),
|
|
1384
|
+
React.createElement(Validation, { className: 'field-validation-wrapper', "data-itemid": `${baseId}-validation`, title: validationText }, validationText ? validationText : '\u00A0')));
|
|
1385
1385
|
};
|
|
1386
1386
|
|
|
1387
1387
|
const Wrapper$8 = styled.fieldset `
|
|
@@ -1413,11 +1413,11 @@ const Content$1 = styled.div `
|
|
|
1413
1413
|
border-radius: 8px;
|
|
1414
1414
|
background: #fcfcfc;
|
|
1415
1415
|
`;
|
|
1416
|
-
const FieldGroup = ({ children, label,
|
|
1417
|
-
const baseId =
|
|
1418
|
-
return (React.createElement(Wrapper$8, {
|
|
1419
|
-
React.createElement(Label$1, {
|
|
1420
|
-
React.createElement(Content$1, {
|
|
1416
|
+
const FieldGroup = ({ children, label, dataItemid }) => {
|
|
1417
|
+
const baseId = dataItemid || 'field-group';
|
|
1418
|
+
return (React.createElement(Wrapper$8, { "data-itemid": `${baseId}-wrapper` },
|
|
1419
|
+
React.createElement(Label$1, { "data-itemid": `${baseId}-label` }, label),
|
|
1420
|
+
React.createElement(Content$1, { "data-itemid": `${baseId}-content` }, children)));
|
|
1421
1421
|
};
|
|
1422
1422
|
|
|
1423
1423
|
const Dropzone = styled.div `
|
|
@@ -1491,7 +1491,7 @@ const Remove = styled(Icon) `
|
|
|
1491
1491
|
fill: ${Colors.RED.Hex} !important;
|
|
1492
1492
|
}
|
|
1493
1493
|
`;
|
|
1494
|
-
const FileUpload = ({ accept, onChange, onError, maxFiles = 10, maxSize = 2, value = [], message, tooltipInfo = '', validateFile,
|
|
1494
|
+
const FileUpload = ({ accept, onChange, onError, maxFiles = 10, maxSize = 2, value = [], message, tooltipInfo = '', validateFile, dataItemid, }) => {
|
|
1495
1495
|
const inputRef = React.useRef(null);
|
|
1496
1496
|
const [files, setFiles] = React.useState(value || []);
|
|
1497
1497
|
const [dragging, setDragging] = React.useState(false);
|
|
@@ -1590,24 +1590,24 @@ const FileUpload = ({ accept, onChange, onError, maxFiles = 10, maxSize = 2, val
|
|
|
1590
1590
|
setAllowMoreFiles(false);
|
|
1591
1591
|
}
|
|
1592
1592
|
}, [files]);
|
|
1593
|
-
const baseId =
|
|
1593
|
+
const baseId = dataItemid || 'file-upload';
|
|
1594
1594
|
return (React.createElement(React.Fragment, null,
|
|
1595
|
-
React.createElement("input", { accept: accept,
|
|
1596
|
-
React.createElement(Dropzone, { "$dragging": dragging,
|
|
1597
|
-
files.length ? (React.createElement(Files, {
|
|
1595
|
+
React.createElement("input", { accept: accept, "data-itemid": `${baseId}-input`, multiple: true, onChange: allowMoreFiles ? handleChange : undefined, ref: inputRef, style: { display: 'none' }, type: 'file' }),
|
|
1596
|
+
React.createElement(Dropzone, { "$dragging": dragging, "data-itemid": `${baseId}-dropzone`, onDragEnter: allowMoreFiles ? handleDrag : undefined, onDragLeave: allowMoreFiles ? handleDrag : undefined, onDragOver: allowMoreFiles ? handleDrag : undefined, onDrop: allowMoreFiles ? handleDrop : undefined, value: files ? files : [] },
|
|
1597
|
+
files.length ? (React.createElement(Files, { "data-itemid": `${baseId}-files` }, files.map((file, index) => {
|
|
1598
1598
|
const fileId = `${baseId}-file-${index}`;
|
|
1599
|
-
return (React.createElement(File, {
|
|
1600
|
-
React.createElement(Copy, {
|
|
1601
|
-
React.createElement(Remove, {
|
|
1599
|
+
return (React.createElement(File, { "data-itemid": `${fileId}-file`, key: file.name },
|
|
1600
|
+
React.createElement(Copy, { "data-itemid": `${fileId}-file-name`, type: 'bold' }, file.name),
|
|
1601
|
+
React.createElement(Remove, { "data-itemid": `${fileId}-remove`, onClick: handleRemove.bind(null, file), path: js.mdiMinusCircle })));
|
|
1602
1602
|
}))) : null,
|
|
1603
|
-
allowMoreFiles ? (React.createElement(ClickZone, {
|
|
1604
|
-
files.length ? null : (React.createElement(IconWrapper$1, { "$dragging": dragging,
|
|
1605
|
-
React.createElement(StyledIcon$3, {
|
|
1606
|
-
React.createElement(Content, {
|
|
1607
|
-
React.createElement(Copy, { align: 'center',
|
|
1608
|
-
message ? (React.createElement(MessageDiv, {
|
|
1609
|
-
React.createElement(Copy, { align: 'center', color: 'GRAY',
|
|
1610
|
-
tooltipInfo && (React.createElement("span", {
|
|
1603
|
+
allowMoreFiles ? (React.createElement(ClickZone, { "data-itemid": `${baseId}-click-zone`, onClick: triggerFileExplorer },
|
|
1604
|
+
files.length ? null : (React.createElement(IconWrapper$1, { "$dragging": dragging, "data-itemid": `${baseId}-icon-wrapper` },
|
|
1605
|
+
React.createElement(StyledIcon$3, { "data-itemid": `${baseId}-icon`, path: js.mdiFolderPlusOutline }))),
|
|
1606
|
+
React.createElement(Content, { "data-itemid": `${baseId}-content` },
|
|
1607
|
+
React.createElement(Copy, { align: 'center', "data-itemid": `${baseId}-copy`, type: 'bold' }, "Drag & drop files here or click to select files"),
|
|
1608
|
+
message ? (React.createElement(MessageDiv, { "data-itemid": `${baseId}-message-div` },
|
|
1609
|
+
React.createElement(Copy, { align: 'center', color: 'GRAY', "data-itemid": `${baseId}-message` }, message),
|
|
1610
|
+
tooltipInfo && (React.createElement("span", { "data-itemid": `${baseId}-tooltip` },
|
|
1611
1611
|
React.createElement(Tooltip, { children: tooltipInfo, position: 'left-center' }))))) : null))) : null)));
|
|
1612
1612
|
};
|
|
1613
1613
|
|
|
@@ -1830,7 +1830,7 @@ const Loader$1 = styled.div `
|
|
|
1830
1830
|
const Input$1 = (_a) => {
|
|
1831
1831
|
var { format, suffix, height, invalid, loading, max, maxLength, min, onBlur, onChange, onFocus, onKeyDown,
|
|
1832
1832
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1833
|
-
onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex, isAutoComplete = false,
|
|
1833
|
+
onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex, isAutoComplete = false, dataItemid } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "loading", "max", "maxLength", "min", "onBlur", "onChange", "onFocus", "onKeyDown", "onSuggestedSelect", "placeholder", "readOnly", "showCharCount", "step", "style", "suggestedValues", "showErrorTextColor", "type", "value", "innerRef", "tabIndex", "isAutoComplete", "dataItemid"]);
|
|
1834
1834
|
const [show_options, setShowOptions] = React.useState(false);
|
|
1835
1835
|
const [internalValue, setInternalValue] = React.useState(value);
|
|
1836
1836
|
const [internalSuggestedValues, setInternalSuggestedValues] = React.useState(suggestedValues || []);
|
|
@@ -1902,8 +1902,8 @@ const Input$1 = (_a) => {
|
|
|
1902
1902
|
if (format === 'ssn' && type !== 'password') {
|
|
1903
1903
|
formatted_value = formatAsSsn(internalValue);
|
|
1904
1904
|
}
|
|
1905
|
-
const baseId =
|
|
1906
|
-
return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length,
|
|
1905
|
+
const baseId = dataItemid || 'input';
|
|
1906
|
+
return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper` },
|
|
1907
1907
|
React.createElement(StyledTextArea, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, maxLength: maxLength, onBlur: readOnly
|
|
1908
1908
|
? e => e.preventDefault()
|
|
1909
1909
|
: e => {
|
|
@@ -1918,12 +1918,12 @@ const Input$1 = (_a) => {
|
|
|
1918
1918
|
setShowOptions(true);
|
|
1919
1919
|
if (onFocus)
|
|
1920
1920
|
onFocus(e);
|
|
1921
|
-
}, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, readOnly: readOnly, ref: innerRef, tabIndex: readOnly ? -1 : tabIndex, value: formatted_value }, accessibleProps, {
|
|
1922
|
-
loading ? (React.createElement(Loader$1, {
|
|
1921
|
+
}, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, readOnly: readOnly, ref: innerRef, tabIndex: readOnly ? -1 : tabIndex, value: formatted_value }, accessibleProps, { "data-itemid": `${baseId}-textarea` })),
|
|
1922
|
+
loading ? (React.createElement(Loader$1, { "data-itemid": `${baseId}-loader` },
|
|
1923
1923
|
React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: js.mdiLoading, size: '20px', spin: true }))) : null,
|
|
1924
|
-
showCharCount ? (React.createElement(CharacterCount, {
|
|
1924
|
+
showCharCount ? (React.createElement(CharacterCount, { "data-itemid": `${baseId}-char-count` },
|
|
1925
1925
|
internalValue.length,
|
|
1926
|
-
maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length,
|
|
1926
|
+
maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper` },
|
|
1927
1927
|
React.createElement(StyledInput, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, max: max, maxLength: maxLength, min: min, onBlur: readOnly
|
|
1928
1928
|
? e => e.preventDefault()
|
|
1929
1929
|
: e => {
|
|
@@ -1940,20 +1940,20 @@ const Input$1 = (_a) => {
|
|
|
1940
1940
|
setIsFocused(true);
|
|
1941
1941
|
if (onFocus)
|
|
1942
1942
|
onFocus(e);
|
|
1943
|
-
}, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, readOnly: readOnly, ref: innerRef, step: step, tabIndex: readOnly ? -1 : tabIndex, type: type, value: format === 'currency_decimal' && internalValue ? `$${formatted_value}` : formatted_value }, accessibleProps, {
|
|
1944
|
-
loading ? (React.createElement(Loader$1, {
|
|
1943
|
+
}, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, readOnly: readOnly, ref: innerRef, step: step, tabIndex: readOnly ? -1 : tabIndex, type: type, value: format === 'currency_decimal' && internalValue ? `$${formatted_value}` : formatted_value }, accessibleProps, { "data-itemid": `${baseId}-input` })),
|
|
1944
|
+
loading ? (React.createElement(Loader$1, { "data-itemid": `${baseId}-loader` },
|
|
1945
1945
|
React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: js.mdiLoading, size: '20px', spin: true }))) : null,
|
|
1946
|
-
showCharCount ? (React.createElement(CharacterCount, {
|
|
1946
|
+
showCharCount ? (React.createElement(CharacterCount, { "data-itemid": `${baseId}-char-count` },
|
|
1947
1947
|
internalValue.length,
|
|
1948
1948
|
maxLength ? ` / ${maxLength}` : null)) : null,
|
|
1949
|
-
suffix && React.createElement(StyledSuffix, {
|
|
1950
|
-
show_options && internalSuggestedValues.length ? (React.createElement(SuggestedValues, {
|
|
1951
|
-
isAutoComplete ? null : (React.createElement(SuggestedSummary, {
|
|
1949
|
+
suffix && React.createElement(StyledSuffix, { "data-itemid": `${baseId}-suffix` }, suffix),
|
|
1950
|
+
show_options && internalSuggestedValues.length ? (React.createElement(SuggestedValues, { "data-itemid": `${baseId}-suggested-values` },
|
|
1951
|
+
isAutoComplete ? null : (React.createElement(SuggestedSummary, { "data-itemid": `${baseId}-suggested-summary` },
|
|
1952
1952
|
internalSuggestedValues.length,
|
|
1953
1953
|
" Results Match \"",
|
|
1954
1954
|
internalValue,
|
|
1955
1955
|
"\"")),
|
|
1956
|
-
internalSuggestedValues.map((suggestedValue, index) => (React.createElement(SuggestedValue, {
|
|
1956
|
+
internalSuggestedValues.map((suggestedValue, index) => (React.createElement(SuggestedValue, { "data-itemid": `${baseId}-suggested-value-${index}`, key: index, onClick: () => {
|
|
1957
1957
|
handleInputChange({ target: { value: suggestedValue } });
|
|
1958
1958
|
onSuggestedSelect();
|
|
1959
1959
|
setShowOptions(false);
|
|
@@ -1976,9 +1976,9 @@ const Wrapper$7 = styled.a `
|
|
|
1976
1976
|
`;
|
|
1977
1977
|
Wrapper$7.defaultProps = { theme: EditableTheme };
|
|
1978
1978
|
const Link = (_a) => {
|
|
1979
|
-
var { children, onClick, small,
|
|
1980
|
-
const baseId =
|
|
1981
|
-
return (React.createElement(Wrapper$7, Object.assign({ "$small": small, onClick: onClick }, accessibleProps, {
|
|
1979
|
+
var { children, onClick, small, dataItemid } = _a, accessibleProps = __rest(_a, ["children", "onClick", "small", "dataItemid"]);
|
|
1980
|
+
const baseId = dataItemid || 'link';
|
|
1981
|
+
return (React.createElement(Wrapper$7, Object.assign({ "$small": small, onClick: onClick }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }), children));
|
|
1982
1982
|
};
|
|
1983
1983
|
|
|
1984
1984
|
const dash = styled.keyframes `
|
|
@@ -2011,10 +2011,10 @@ const Path = styled.path `
|
|
|
2011
2011
|
-webkit-animation: ${dash} 1.1s ease-in-out infinite;
|
|
2012
2012
|
animation: ${dash} 1.1s ease-in-out infinite;
|
|
2013
2013
|
`;
|
|
2014
|
-
const Loader = ({
|
|
2015
|
-
const baseId =
|
|
2016
|
-
return (React.createElement(Spinner, {
|
|
2017
|
-
React.createElement(Path, { d: 'M7.21487 1.2868C7.88431 0.9044 8.73031 0.9044 9.39974 1.2868L9.40283 1.28856L14.4613 4.20761C15.1684 4.598 15.5746 5.33558 15.5746 6.11465V8.99996V11.8853C15.5746 12.6507 15.1632 13.3848 14.4617 13.7721L9.37973 16.7132C8.71029 17.0956 7.86428 17.0956 7.19485 16.7132L7.19088 16.7109L2.11279 13.772C1.40602 13.3816 1 12.6441 1 11.8653V8.98995V6.11465C1 5.31458 1.44381 4.59039 2.10827 4.21051L7.21487 1.2868Z',
|
|
2014
|
+
const Loader = ({ dataItemid }) => {
|
|
2015
|
+
const baseId = dataItemid || 'loader';
|
|
2016
|
+
return (React.createElement(Spinner, { "data-itemid": `${baseId}-spinner`, viewBox: '0 0 16 18' },
|
|
2017
|
+
React.createElement(Path, { d: 'M7.21487 1.2868C7.88431 0.9044 8.73031 0.9044 9.39974 1.2868L9.40283 1.28856L14.4613 4.20761C15.1684 4.598 15.5746 5.33558 15.5746 6.11465V8.99996V11.8853C15.5746 12.6507 15.1632 13.3848 14.4617 13.7721L9.37973 16.7132C8.71029 17.0956 7.86428 17.0956 7.19485 16.7132L7.19088 16.7109L2.11279 13.772C1.40602 13.3816 1 12.6441 1 11.8653V8.98995V6.11465C1 5.31458 1.44381 4.59039 2.10827 4.21051L7.21487 1.2868Z', "data-itemid": `${baseId}-path`, fill: 'none', strokeWidth: '2' })));
|
|
2018
2018
|
};
|
|
2019
2019
|
|
|
2020
2020
|
const Steps = styled.div `
|
|
@@ -2065,15 +2065,15 @@ const StepLine = styled.div `
|
|
|
2065
2065
|
background-color: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.MEDIUM_GRAY.Hex)};
|
|
2066
2066
|
transition: background-color 0.5s ease-in-out;
|
|
2067
2067
|
`;
|
|
2068
|
-
const ProgressBar = ({ steps, showStepLine = false,
|
|
2069
|
-
const baseId =
|
|
2070
|
-
return (React.createElement(Steps, {
|
|
2068
|
+
const ProgressBar = ({ steps, showStepLine = false, dataItemid }) => {
|
|
2069
|
+
const baseId = dataItemid || 'progress-bar';
|
|
2070
|
+
return (React.createElement(Steps, { "data-itemid": `${baseId}-steps` }, steps.map((step, i) => {
|
|
2071
2071
|
const stepId = `${baseId}-step-${i}`;
|
|
2072
2072
|
return (React.createElement(React.Fragment, { key: i },
|
|
2073
|
-
i !== 0 && showStepLine && React.createElement(StepLine, { "$active": step.active,
|
|
2074
|
-
React.createElement(Step, {
|
|
2075
|
-
step.complete ? (React.createElement(StyledIcon$2, {
|
|
2076
|
-
React.createElement(StepLabel, {
|
|
2073
|
+
i !== 0 && showStepLine && (React.createElement(StepLine, { "$active": step.active, "data-itemid": `${stepId}-line` })),
|
|
2074
|
+
React.createElement(Step, { "data-itemid": `${stepId}-step` },
|
|
2075
|
+
step.complete ? (React.createElement(StyledIcon$2, { "data-itemid": `${stepId}-icon`, path: js.mdiCheckboxMarkedCircleOutline, size: '32px' })) : (React.createElement(StepIndicator, { "$active": step.active, "data-itemid": `${stepId}-indicator` }, i + 1)),
|
|
2076
|
+
React.createElement(StepLabel, { "data-itemid": `${stepId}-label` }, step.label))));
|
|
2077
2077
|
})));
|
|
2078
2078
|
};
|
|
2079
2079
|
|
|
@@ -2149,7 +2149,7 @@ const ButtonContainer = styled.div `
|
|
|
2149
2149
|
margin: 0 10px;
|
|
2150
2150
|
`;
|
|
2151
2151
|
const Modal = (_a) => {
|
|
2152
|
-
var { children, title, onClose, maxWidth, fullscreen, steps, primaryButton, secondaryButton, tertiaryButton, quarternaryButton,
|
|
2152
|
+
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"]);
|
|
2153
2153
|
React.useEffect(() => {
|
|
2154
2154
|
document.onkeydown = e => {
|
|
2155
2155
|
if (e.key === 'Escape') {
|
|
@@ -2160,35 +2160,35 @@ const Modal = (_a) => {
|
|
|
2160
2160
|
document.onkeydown = null;
|
|
2161
2161
|
};
|
|
2162
2162
|
}, [onClose]);
|
|
2163
|
-
const baseId =
|
|
2164
|
-
return (React.createElement(Wrapper$6, {
|
|
2165
|
-
React.createElement(Container$1, Object.assign({ "$fullscreen": fullscreen, "$maxWidth": maxWidth, open: true }, accessibleProps, {
|
|
2166
|
-
React.createElement(Header$1, {
|
|
2167
|
-
title ? (React.createElement(Heading, {
|
|
2168
|
-
React.createElement(Close, {
|
|
2169
|
-
React.createElement(CloseMsg, {
|
|
2170
|
-
React.createElement(Icon, { color: Colors.BLACK.Hex,
|
|
2163
|
+
const baseId = dataItemid || 'modal';
|
|
2164
|
+
return (React.createElement(Wrapper$6, { "data-itemid": `${baseId}-wrapper` },
|
|
2165
|
+
React.createElement(Container$1, Object.assign({ "$fullscreen": fullscreen, "$maxWidth": maxWidth, open: true }, accessibleProps, { "data-itemid": `${baseId}-container` }),
|
|
2166
|
+
React.createElement(Header$1, { "data-itemid": `${baseId}-header` },
|
|
2167
|
+
title ? (React.createElement(Heading, { "data-itemid": `${baseId}-title`, type: 'secondary' }, title)) : null,
|
|
2168
|
+
React.createElement(Close, { "data-itemid": `${baseId}-close`, onClick: onClose },
|
|
2169
|
+
React.createElement(CloseMsg, { "data-itemid": `${baseId}-close-msg` }, "(Esc)"),
|
|
2170
|
+
React.createElement(Icon, { color: Colors.BLACK.Hex, "data-itemid": `${baseId}-close-icon`, path: js.mdiClose, size: '24px' }))),
|
|
2171
2171
|
steps ? React.createElement(ProgressBar, { steps: steps }) : null,
|
|
2172
|
-
React.createElement(ContentWrapper, {
|
|
2173
|
-
primaryButton || secondaryButton || tertiaryButton || quarternaryButton ? (React.createElement(ButtonBar, {
|
|
2174
|
-
tertiaryButton || quarternaryButton ? (React.createElement("div", {
|
|
2172
|
+
React.createElement(ContentWrapper, { "data-itemid": `${baseId}-content-wrapper` }, children),
|
|
2173
|
+
primaryButton || secondaryButton || tertiaryButton || quarternaryButton ? (React.createElement(ButtonBar, { "data-itemid": `${baseId}-button-bar` },
|
|
2174
|
+
tertiaryButton || quarternaryButton ? (React.createElement("div", { "data-itemid": `${baseId}-left-buttons`, style: {
|
|
2175
2175
|
marginRight: 'auto',
|
|
2176
2176
|
paddingRight: 40,
|
|
2177
2177
|
display: 'flex',
|
|
2178
2178
|
alignItems: 'center',
|
|
2179
2179
|
} },
|
|
2180
|
-
tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary'
|
|
2181
|
-
quarternaryButton ? (React.createElement(ButtonContainer, {
|
|
2182
|
-
React.createElement(Button, Object.assign({}, quarternaryButton, { format: quarternaryButton.format || 'secondary'
|
|
2183
|
-
primaryButton || secondaryButton ? (React.createElement("div", {
|
|
2180
|
+
tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { "data-itemid": `${baseId}-tertiary-button`, format: tertiaryButton.format || 'secondary' }))) : null,
|
|
2181
|
+
quarternaryButton ? (React.createElement(ButtonContainer, { "data-itemid": `${baseId}-quarternary-button-container` },
|
|
2182
|
+
React.createElement(Button, Object.assign({}, quarternaryButton, { "data-itemid": `${baseId}-quarternary-button`, format: quarternaryButton.format || 'secondary' })))) : null)) : null,
|
|
2183
|
+
primaryButton || secondaryButton ? (React.createElement("div", { "data-itemid": `${baseId}-right-buttons`, style: {
|
|
2184
2184
|
marginLeft: 'auto',
|
|
2185
2185
|
paddingLeft: 40,
|
|
2186
2186
|
display: 'flex',
|
|
2187
2187
|
alignItems: 'center',
|
|
2188
2188
|
} },
|
|
2189
|
-
secondaryButton ? (React.createElement(ButtonContainer, {
|
|
2190
|
-
React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary'
|
|
2191
|
-
primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary'
|
|
2189
|
+
secondaryButton ? (React.createElement(ButtonContainer, { "data-itemid": `${baseId}-secondary-button-container` },
|
|
2190
|
+
React.createElement(Button, Object.assign({}, secondaryButton, { "data-itemid": `${baseId}-secondary-button`, format: secondaryButton.format || 'secondary' })))) : null,
|
|
2191
|
+
primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { "data-itemid": `${baseId}-primary-button`, format: primaryButton.format || 'primary' }))) : null)) : null)) : null)));
|
|
2192
2192
|
};
|
|
2193
2193
|
|
|
2194
2194
|
const Wrapper$5 = styled.div `
|
|
@@ -2277,23 +2277,23 @@ const SearchInput = styled.input `
|
|
|
2277
2277
|
white-space: nowrap;
|
|
2278
2278
|
`;
|
|
2279
2279
|
const MultiSelect = (_a) => {
|
|
2280
|
-
var { readOnly, displayCount = 3, invalid, onChange, options = [], selected = [], showSelectAll, searchable = false, style,
|
|
2280
|
+
var { readOnly, displayCount = 3, invalid, onChange, options = [], selected = [], showSelectAll, searchable = false, style, dataItemid } = _a, accessibleProps = __rest(_a, ["readOnly", "displayCount", "invalid", "onChange", "options", "selected", "showSelectAll", "searchable", "style", "dataItemid"]);
|
|
2281
2281
|
const [showOptions, setShowOptions] = React.useState(false);
|
|
2282
2282
|
const selected_options = options.filter(o => selected.includes(o.value));
|
|
2283
2283
|
const [filter, setFilter] = React.useState('');
|
|
2284
|
-
const baseId =
|
|
2284
|
+
const baseId = dataItemid || 'multiselect';
|
|
2285
2285
|
// Filter the options based on the filter state
|
|
2286
2286
|
const filteredOptions = options.filter(o => { var _a, _b; return ((_a = o.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(filter)) || ((_b = o.value) === null || _b === void 0 ? void 0 : _b.toString().toLowerCase().includes(filter)); });
|
|
2287
|
-
return (React.createElement(Wrapper$5, { "$style": style,
|
|
2288
|
-
searchable && (React.createElement(SearchInput, {
|
|
2289
|
-
React.createElement(Trigger, Object.assign({ "$invalid": invalid, "$readOnly": readOnly, "$showOptions": showOptions,
|
|
2290
|
-
React.createElement(Value, {
|
|
2287
|
+
return (React.createElement(Wrapper$5, { "$style": style, "data-itemid": `${baseId}-wrapper` },
|
|
2288
|
+
searchable && (React.createElement(SearchInput, { "data-itemid": `${baseId}-search-input`, onChange: e => setFilter(e.target.value), onClick: () => setShowOptions(!showOptions), placeholder: `${showSelectAll ? options.length : selected_options.length} Selected`, type: 'text', value: filter })),
|
|
2289
|
+
React.createElement(Trigger, Object.assign({ "$invalid": invalid, "$readOnly": readOnly, "$showOptions": showOptions, "data-itemid": `${baseId}-trigger`, onClick: readOnly ? undefined : setShowOptions.bind(null, !showOptions) }, accessibleProps),
|
|
2290
|
+
React.createElement(Value, { "data-itemid": `${baseId}-value` }, selected.length > 0 && selected.length <= displayCount
|
|
2291
2291
|
? selected_options.map(o => o.label || o.value).join(', ')
|
|
2292
2292
|
: `${selected_options.length} Selected`),
|
|
2293
|
-
React.createElement(Icon, { color: Colors.BLACK.Hex,
|
|
2294
|
-
showOptions ? (React.createElement(Options, {
|
|
2295
|
-
React.createElement(Checklist, {
|
|
2296
|
-
showOptions ? (React.createElement(Scrim, {
|
|
2293
|
+
React.createElement(Icon, { color: Colors.BLACK.Hex, "data-itemid": `${baseId}-icon`, path: showOptions ? js.mdiChevronUp : js.mdiChevronDown, size: '22px' })),
|
|
2294
|
+
showOptions ? (React.createElement(Options, { "data-itemid": `${baseId}-options` },
|
|
2295
|
+
React.createElement(Checklist, { "data-itemid": `${baseId}-checklist`, onChange: onChange, options: filteredOptions, selected: selected, showSelectAll: showSelectAll }))) : null,
|
|
2296
|
+
showOptions ? (React.createElement(Scrim, { "data-itemid": `${baseId}-scrim`, onClick: setShowOptions.bind(null, !showOptions) })) : null));
|
|
2297
2297
|
};
|
|
2298
2298
|
|
|
2299
2299
|
const Wrapper$4 = styled.div `
|
|
@@ -2326,27 +2326,27 @@ const Actions = styled.div `
|
|
|
2326
2326
|
align-items: center;
|
|
2327
2327
|
gap: 8px;
|
|
2328
2328
|
`;
|
|
2329
|
-
const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu, tag,
|
|
2329
|
+
const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu, tag, dataItemid, }) => {
|
|
2330
2330
|
const { format = 'primary', menuItems = [], label = '', enableHover = true, enableClick = false, show = false, maxHeight = '', } = buttonMenu || {};
|
|
2331
|
-
const baseId =
|
|
2332
|
-
return (React.createElement(Wrapper$4, {
|
|
2333
|
-
React.createElement(Info, {
|
|
2334
|
-
React.createElement(Title, {
|
|
2335
|
-
React.createElement(Heading, {
|
|
2336
|
-
tag ? React.createElement(Tag, Object.assign({}, tag, {
|
|
2337
|
-
breadcrumbs ? (React.createElement(Breadcrumbs, {
|
|
2331
|
+
const baseId = dataItemid || 'page-header';
|
|
2332
|
+
return (React.createElement(Wrapper$4, { "data-itemid": `${baseId}-wrapper` },
|
|
2333
|
+
React.createElement(Info, { "data-itemid": `${baseId}-info` },
|
|
2334
|
+
React.createElement(Title, { "data-itemid": `${baseId}-title` },
|
|
2335
|
+
React.createElement(Heading, { "data-itemid": `${baseId}-heading`, type: 'secondary' }, title),
|
|
2336
|
+
tag ? React.createElement(Tag, Object.assign({}, tag, { "data-itemid": `${baseId}-tag` })) : null),
|
|
2337
|
+
breadcrumbs ? (React.createElement(Breadcrumbs, { "data-itemid": `${baseId}-breadcrumbs` }, breadcrumbs.map((crumb, i) => {
|
|
2338
2338
|
const crumbId = `${baseId}-breadcrumb-${i}`;
|
|
2339
2339
|
return (React.createElement(React.Fragment, { key: i },
|
|
2340
|
-
crumb.onClick ? (React.createElement(Link, {
|
|
2341
|
-
i + 1 < breadcrumbs.length ? (React.createElement(Icon.Icon, {
|
|
2340
|
+
crumb.onClick ? (React.createElement(Link, { "data-itemid": `${crumbId}-link`, onClick: crumb.onClick, small: true }, crumb.label)) : (React.createElement(Copy, { "data-itemid": `${crumbId}-copy`, type: 'small' }, crumb.label)),
|
|
2341
|
+
i + 1 < breadcrumbs.length ? (React.createElement(Icon.Icon, { "data-itemid": `${crumbId}-icon`, path: js.mdiChevronRight, size: '14px' })) : null));
|
|
2342
2342
|
}))) : null),
|
|
2343
|
-
actions ? (React.createElement(Actions, {
|
|
2343
|
+
actions ? (React.createElement(Actions, { "data-itemid": `${baseId}-actions` },
|
|
2344
2344
|
actions.map((action, i) => {
|
|
2345
2345
|
const { label } = action, buttonProps = __rest(action, ["label"]);
|
|
2346
2346
|
const actionId = `${baseId}-action-${i}`;
|
|
2347
|
-
return (React.createElement(Button, Object.assign({}, buttonProps, {
|
|
2347
|
+
return (React.createElement(Button, Object.assign({}, buttonProps, { "data-itemid": `${actionId}-button`, key: i, small: true }), label));
|
|
2348
2348
|
}),
|
|
2349
|
-
menuItems.length ? (React.createElement(ButtonMenu, { enableClick: enableClick, enableHover: enableHover, format: format,
|
|
2349
|
+
menuItems.length ? (React.createElement(ButtonMenu, { "data-itemid": `${baseId}-button-menu`, enableClick: enableClick, enableHover: enableHover, format: format, label: label, maxHeight: maxHeight, menuItems: menuItems, show: show, small: true })) : null)) : null));
|
|
2350
2350
|
};
|
|
2351
2351
|
|
|
2352
2352
|
const Wrapper$3 = styled.nav `
|
|
@@ -2356,7 +2356,7 @@ const Wrapper$3 = styled.nav `
|
|
|
2356
2356
|
column-gap: 10px;
|
|
2357
2357
|
`;
|
|
2358
2358
|
const Pagination = (_a) => {
|
|
2359
|
-
var { currentPage = 1, onClick, pageCount = 0,
|
|
2359
|
+
var { currentPage = 1, onClick, pageCount = 0, dataItemid } = _a, accessibleProps = __rest(_a, ["currentPage", "onClick", "pageCount", "dataItemid"]);
|
|
2360
2360
|
const is_first_page = currentPage === 1;
|
|
2361
2361
|
const is_last_page = currentPage === pageCount;
|
|
2362
2362
|
const handlePrevClick = () => {
|
|
@@ -2375,14 +2375,14 @@ const Pagination = (_a) => {
|
|
|
2375
2375
|
onClick(new_page);
|
|
2376
2376
|
}
|
|
2377
2377
|
};
|
|
2378
|
-
const baseId =
|
|
2379
|
-
return (React.createElement(Wrapper$3, Object.assign({}, accessibleProps, {
|
|
2380
|
-
React.createElement(Button, { disabled: is_first_page, icon: js.mdiChevronLeft,
|
|
2381
|
-
React.createElement(Select, {
|
|
2378
|
+
const baseId = dataItemid || 'pagination';
|
|
2379
|
+
return (React.createElement(Wrapper$3, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
2380
|
+
React.createElement(Button, { "data-itemid": `${baseId}-prev-button`, disabled: is_first_page, icon: js.mdiChevronLeft, onClick: handlePrevClick, small: true }),
|
|
2381
|
+
React.createElement(Select, { "data-itemid": `${baseId}-select`, onChange: handlePageChange, options: Array.from(Array(pageCount).keys(), p => p + 1).map(p => ({
|
|
2382
2382
|
label: `Page ${p}`,
|
|
2383
2383
|
value: `${p}`,
|
|
2384
2384
|
})), value: `${currentPage}` }),
|
|
2385
|
-
React.createElement(Button, { disabled: is_last_page, icon: js.mdiChevronRight,
|
|
2385
|
+
React.createElement(Button, { "data-itemid": `${baseId}-next-button`, disabled: is_last_page, icon: js.mdiChevronRight, onClick: handleNextClick, small: true })));
|
|
2386
2386
|
};
|
|
2387
2387
|
|
|
2388
2388
|
const Wrapper$2 = styled.label `
|
|
@@ -2461,23 +2461,23 @@ const Label = styled.span `
|
|
|
2461
2461
|
margin-left: 6px;
|
|
2462
2462
|
`;
|
|
2463
2463
|
const Radio = (_a) => {
|
|
2464
|
-
var { children, disabled, checked, onChange, value, invalid, tooltip, tabIndex,
|
|
2465
|
-
const baseId =
|
|
2466
|
-
return (React.createElement(Wrapper$2, Object.assign({}, accessibleProps, {
|
|
2467
|
-
React.createElement(Input, { checked: checked,
|
|
2468
|
-
React.createElement(Check, { "$invalid": invalid,
|
|
2469
|
-
React.createElement(Label, {
|
|
2464
|
+
var { children, disabled, checked, onChange, value, invalid, tooltip, tabIndex, dataItemid } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip", "tabIndex", "dataItemid"]);
|
|
2465
|
+
const baseId = dataItemid || 'radio';
|
|
2466
|
+
return (React.createElement(Wrapper$2, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
2467
|
+
React.createElement(Input, { checked: checked, "data-itemid": `${baseId}-input`, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'radio', value: value }),
|
|
2468
|
+
React.createElement(Check, { "$invalid": invalid, "data-itemid": `${baseId}-check` }),
|
|
2469
|
+
React.createElement(Label, { "data-itemid": `${baseId}-label` },
|
|
2470
2470
|
children,
|
|
2471
2471
|
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)));
|
|
2472
2472
|
};
|
|
2473
2473
|
|
|
2474
2474
|
const RadioList = (_a) => {
|
|
2475
|
-
var { disabled, onChange, options, value,
|
|
2476
|
-
const baseId =
|
|
2475
|
+
var { disabled, onChange, options, value, dataItemid } = _a, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "value", "dataItemid"]);
|
|
2476
|
+
const baseId = dataItemid || 'radio-list';
|
|
2477
2477
|
return (React.createElement(React.Fragment, null, options.map((option, index) => {
|
|
2478
2478
|
const label = option.label || option.value;
|
|
2479
2479
|
const optionId = `${baseId}-option-${index}`;
|
|
2480
|
-
return (React.createElement(Radio, Object.assign({ checked: value === option.value,
|
|
2480
|
+
return (React.createElement(Radio, Object.assign({ checked: value === option.value, "data-itemid": optionId, disabled: disabled, key: option.value, onChange: onChange, value: option.value }, accessibleProps), label));
|
|
2481
2481
|
})));
|
|
2482
2482
|
};
|
|
2483
2483
|
|
|
@@ -2545,22 +2545,22 @@ const StyledIcon$1 = styled(Icon) `
|
|
|
2545
2545
|
`;
|
|
2546
2546
|
StyledIcon$1.defaultProps = { theme: EditableTheme };
|
|
2547
2547
|
const Table = (_a) => {
|
|
2548
|
-
var { columns = [], data = [], sortBy, sortDirection, hideHeaders, onRowClick, onSortChange, tableLayout,
|
|
2549
|
-
const baseId =
|
|
2550
|
-
return (React.createElement(StyledTable, Object.assign({ "$tableLayout": tableLayout }, accessibleProps, {
|
|
2551
|
-
hideHeaders ? null : (React.createElement("thead", {
|
|
2552
|
-
React.createElement("tr", {
|
|
2548
|
+
var { columns = [], data = [], sortBy, sortDirection, hideHeaders, onRowClick, onSortChange, tableLayout, dataItemid } = _a, accessibleProps = __rest(_a, ["columns", "data", "sortBy", "sortDirection", "hideHeaders", "onRowClick", "onSortChange", "tableLayout", "dataItemid"]);
|
|
2549
|
+
const baseId = dataItemid || 'table';
|
|
2550
|
+
return (React.createElement(StyledTable, Object.assign({ "$tableLayout": tableLayout }, accessibleProps, { "data-itemid": `${baseId}-styled-table` }),
|
|
2551
|
+
hideHeaders ? null : (React.createElement("thead", { "data-itemid": `${baseId}-thead` },
|
|
2552
|
+
React.createElement("tr", { "data-itemid": `${baseId}-header-row` }, columns.map((column, i) => {
|
|
2553
2553
|
const columnId = `${baseId}-column-${i}`;
|
|
2554
|
-
return (React.createElement(Header, { "$isSortable": column.isSortable, "$width": column.width,
|
|
2554
|
+
return (React.createElement(Header, { "$isSortable": column.isSortable, "$width": column.width, "data-itemid": `${columnId}-header`, key: i, onClick: onSortChange === null || onSortChange === void 0 ? void 0 : onSortChange.bind(null, column.id) },
|
|
2555
2555
|
column.label,
|
|
2556
|
-
column.isSortable && sortBy === column.id ? (React.createElement(IconWrapper, {
|
|
2557
|
-
React.createElement(StyledIcon$1, {
|
|
2556
|
+
column.isSortable && sortBy === column.id ? (React.createElement(IconWrapper, { "data-itemid": `${columnId}-icon-wrapper` },
|
|
2557
|
+
React.createElement(StyledIcon$1, { "data-itemid": `${columnId}-icon`, path: sortDirection === 'asc' ? js.mdiChevronUp : js.mdiChevronDown, size: '20px' }))) : null));
|
|
2558
2558
|
})))),
|
|
2559
|
-
data.length ? (React.createElement("tbody", {
|
|
2559
|
+
data.length ? (React.createElement("tbody", { "data-itemid": `${baseId}-tbody` }, data.map((row, i) => {
|
|
2560
2560
|
const rowId = `${baseId}-row-${i}`;
|
|
2561
|
-
return (React.createElement(Row, { "$bgColor": i % 2 === 0 ? '#ffffff' : '#f9f9f9', "$isClickable": !!onRowClick,
|
|
2561
|
+
return (React.createElement(Row, { "$bgColor": i % 2 === 0 ? '#ffffff' : '#f9f9f9', "$isClickable": !!onRowClick, "data-itemid": `${rowId}-row`, key: i, onClick: onRowClick ? onRowClick.bind(null, row) : undefined }, columns.map((column, j) => {
|
|
2562
2562
|
const columnId = `${baseId}-column-${j}`;
|
|
2563
|
-
return (React.createElement(Column, { "$align": columns[j].align, "$width": columns[j].width,
|
|
2563
|
+
return (React.createElement(Column, { "$align": columns[j].align, "$width": columns[j].width, "data-itemid": `${columnId}-column`, key: j }, column.render ? column.render(row) : row[column.id] || 'N/A'));
|
|
2564
2564
|
})));
|
|
2565
2565
|
}))) : null));
|
|
2566
2566
|
};
|
|
@@ -2615,13 +2615,13 @@ const Badge = styled.div `
|
|
|
2615
2615
|
`;
|
|
2616
2616
|
Badge.defaultProps = { theme: EditableTheme };
|
|
2617
2617
|
const Tabs = (_a) => {
|
|
2618
|
-
var { tabs,
|
|
2619
|
-
const baseId =
|
|
2620
|
-
return (React.createElement(Wrapper$1, Object.assign({}, accessibleProps, {
|
|
2618
|
+
var { tabs, dataItemid } = _a, accessibleProps = __rest(_a, ["tabs", "dataItemid"]);
|
|
2619
|
+
const baseId = dataItemid || 'tabs';
|
|
2620
|
+
return (React.createElement(Wrapper$1, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }), tabs.map((_a, i) => {
|
|
2621
2621
|
var { isActive, label, badgeCount, errorBadge, onClick } = _a, accessibleProps = __rest(_a, ["isActive", "label", "badgeCount", "errorBadge", "onClick"]);
|
|
2622
2622
|
const tabId = `${baseId}-tab-${i}`;
|
|
2623
|
-
return (React.createElement(Tab, Object.assign({ "$isActive": isActive || false, key: i, onClick: isActive ? undefined : onClick }, accessibleProps, {
|
|
2624
|
-
badgeCount ? (React.createElement(Badge, { "$isError": errorBadge || false,
|
|
2623
|
+
return (React.createElement(Tab, Object.assign({ "$isActive": isActive || false, key: i, onClick: isActive ? undefined : onClick }, accessibleProps, { "data-itemid": `${tabId}-tab` }),
|
|
2624
|
+
badgeCount ? (React.createElement(Badge, { "$isError": errorBadge || false, "data-itemid": `${tabId}-badge` }, badgeCount)) : null,
|
|
2625
2625
|
label));
|
|
2626
2626
|
})));
|
|
2627
2627
|
};
|
|
@@ -2650,12 +2650,12 @@ const Handle = styled.div `
|
|
|
2650
2650
|
box-sizing: border-box;
|
|
2651
2651
|
`;
|
|
2652
2652
|
const Toggle = (_a) => {
|
|
2653
|
-
var { onClick, on,
|
|
2654
|
-
const baseId =
|
|
2655
|
-
return (React.createElement(Track, Object.assign({ "$on": on, onClick: onClick }, accessibleProps, {
|
|
2656
|
-
React.createElement("input", { checked: on,
|
|
2657
|
-
React.createElement(Handle, { "$on": on,
|
|
2658
|
-
React.createElement(Icon, { color: on ? Colors.GREEN.Hex : Colors.BLACK.Hex,
|
|
2653
|
+
var { onClick, on, dataItemid } = _a, accessibleProps = __rest(_a, ["onClick", "on", "dataItemid"]);
|
|
2654
|
+
const baseId = dataItemid || 'toggle';
|
|
2655
|
+
return (React.createElement(Track, Object.assign({ "$on": on, onClick: onClick }, accessibleProps, { "data-itemid": `${baseId}-track` }),
|
|
2656
|
+
React.createElement("input", { checked: on, "data-itemid": `${baseId}-input`, name: accessibleProps.name, type: 'hidden' }),
|
|
2657
|
+
React.createElement(Handle, { "$on": on, "data-itemid": `${baseId}-handle` },
|
|
2658
|
+
React.createElement(Icon, { color: on ? Colors.GREEN.Hex : Colors.BLACK.Hex, "data-itemid": `${baseId}-icon`, path: on ? js.mdiCheck : js.mdiClose, size: '16px' }))));
|
|
2659
2659
|
};
|
|
2660
2660
|
Toggle.defaultProps = {};
|
|
2661
2661
|
|
|
@@ -2685,15 +2685,15 @@ const StyledIcon = styled.div `
|
|
|
2685
2685
|
background: #f5f5f5;
|
|
2686
2686
|
`;
|
|
2687
2687
|
const ZeroState = (_a) => {
|
|
2688
|
-
var { icon, title, description, action,
|
|
2689
|
-
const baseId =
|
|
2690
|
-
return (React.createElement(Container, Object.assign({}, accessibleProps, {
|
|
2691
|
-
React.createElement(StyledIcon, {
|
|
2692
|
-
React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex,
|
|
2693
|
-
React.createElement(Wrapper, {
|
|
2694
|
-
React.createElement(Heading, { children: title,
|
|
2695
|
-
description && (React.createElement(Copy, { align: 'center', children: description, color: 'GRAY',
|
|
2696
|
-
action && (React.createElement(Button, { children: action.children, disabled: action.disabled, format: action.format, icon: action.icon,
|
|
2688
|
+
var { icon, title, description, action, dataItemid } = _a, accessibleProps = __rest(_a, ["icon", "title", "description", "action", "dataItemid"]);
|
|
2689
|
+
const baseId = dataItemid || 'zero-state';
|
|
2690
|
+
return (React.createElement(Container, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-container` }),
|
|
2691
|
+
React.createElement(StyledIcon, { "data-itemid": `${baseId}-icon-wrapper` },
|
|
2692
|
+
React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, "data-itemid": `${baseId}-icon`, path: icon, size: '40px' })),
|
|
2693
|
+
React.createElement(Wrapper, { "data-itemid": `${baseId}-wrapper` },
|
|
2694
|
+
React.createElement(Heading, { children: title, "data-itemid": `${baseId}-heading`, type: 'tertiary' }),
|
|
2695
|
+
description && (React.createElement(Copy, { align: 'center', children: description, color: 'GRAY', "data-itemid": `${baseId}-description`, type: 'default' }))),
|
|
2696
|
+
action && (React.createElement(Button, { children: action.children, "data-itemid": `${baseId}-button`, disabled: action.disabled, format: action.format, icon: action.icon, onClick: action.onClick }))));
|
|
2697
2697
|
};
|
|
2698
2698
|
|
|
2699
2699
|
exports.Accordion = Accordion;
|