@hexure/ui 1.13.97 → 1.13.99

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.
@@ -12,6 +12,7 @@ export interface MenuItemType extends AccessibleProps {
12
12
  }[];
13
13
  title?: string;
14
14
  dataItemid?: string;
15
+ dataSectionName?: string;
15
16
  }
16
17
  export interface AppMenuProps extends AccessibleProps {
17
18
  menu: MenuItemType[];
@@ -19,6 +20,7 @@ export interface AppMenuProps extends AccessibleProps {
19
20
  footerTag?: string;
20
21
  defaultWidth?: string;
21
22
  dataItemid?: string;
23
+ dataSectionName?: string;
22
24
  onChange?: (isCollapsed: boolean) => void;
23
25
  }
24
26
  declare const AppMenu: FC<AppMenuProps>;
@@ -14,6 +14,7 @@ export interface ButtonMenuProps {
14
14
  show?: boolean;
15
15
  /** Optional ID for automation purposes */
16
16
  dataItemid?: string;
17
+ dataSectionName?: string;
17
18
  }
18
19
  declare const ButtonMenu: FC<ButtonMenuProps>;
19
20
  export default ButtonMenu;
@@ -19,6 +19,7 @@ export interface CheckboxProps extends AccessibleProps {
19
19
  dataItemid?: string;
20
20
  isInvalidRedBackground?: boolean;
21
21
  isWarningError?: boolean;
22
+ dataSectionName?: string;
22
23
  }
23
24
  declare const Checkbox: FC<CheckboxProps>;
24
25
  export default Checkbox;
@@ -12,6 +12,7 @@ export interface TagProps extends AccessibleProps {
12
12
  /** Optional ID for automation purposes */
13
13
  dataItemid?: string;
14
14
  rotate?: boolean;
15
+ dataSectionName?: string;
15
16
  }
16
17
  declare const Tag: FC<TagProps>;
17
18
  export default Tag;
package/dist/esm/index.js CHANGED
@@ -3190,10 +3190,10 @@ const Remove$1 = styled.div `
3190
3190
  align-items: center;
3191
3191
  `;
3192
3192
  const Tag = (_a) => {
3193
- var { children, color = 'PRIMARY', removable, onClick, dataItemid, rotate } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick", "dataItemid", "rotate"]);
3193
+ var { children, color = 'PRIMARY', removable, onClick, dataItemid, rotate, dataSectionName } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick", "dataItemid", "rotate", "dataSectionName"]);
3194
3194
  const baseId = dataItemid || 'tag';
3195
3195
  return (React.createElement(Wrapper$e, Object.assign({ "$color": color, "$removable": removable, "$rotate": rotate, onClick: onClick }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
3196
- React.createElement(Content$2, { "data-itemid": `${baseId}-content` },
3196
+ React.createElement(Content$2, { "data-itemid": `${baseId}-content`, "data-section-name": dataSectionName },
3197
3197
  React.createElement(Label$4, { "$color": color, "data-itemid": `${baseId}-label` }, children),
3198
3198
  removable ? (React.createElement(Remove$1, { "data-itemid": `${baseId}-remove` },
3199
3199
  React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', "data-itemid": `${baseId}-icon`, path: mdiClose, size: '15px' }))) : null)));
@@ -3290,7 +3290,7 @@ const FooterInfo = styled.div `
3290
3290
  const SidebarMenuContainer = styled.div `
3291
3291
  flex-grow: 1;
3292
3292
  `;
3293
- const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px', dataItemid, onChange, }) => {
3293
+ const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px', dataItemid, dataSectionName, onChange, }) => {
3294
3294
  const theme = useContext(ThemeContext) || EditableTheme;
3295
3295
  const [collapsed, toggleCollapse] = useState(isCollapsed);
3296
3296
  const baseId = dataItemid || 'app-menu';
@@ -3303,7 +3303,7 @@ const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px', dataIte
3303
3303
  ? `${baseId}-${nav_item.dataItemid}`
3304
3304
  : `${baseId}-nav-item-${navIndex}`;
3305
3305
  return (React.createElement(React.Fragment, { key: navItemId },
3306
- 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 : '', type: 'button' },
3306
+ React.createElement(MenuWrapper$1, { "$active": !!nav_item.is_active, "$color": theme.PRIMARY_COLOR, "data-itemid": `${navItemId}-menu-wrapper`, "data-section-name": dataSectionName, onClick: nav_item.onClick, title: collapsed ? (nav_item === null || nav_item === void 0 ? void 0 : nav_item.title) || nav_item.label : '', type: 'button' },
3307
3307
  React.createElement(MenuIcon, { "$active": !!nav_item.is_active, "data-itemid": `${navItemId}-menu-icon`, path: nav_item.icon }),
3308
3308
  collapsed ? null : (React.createElement(MenuLabel, { "$active": nav_item.is_active, "$color": theme.PRIMARY_COLOR, "data-itemid": `${navItemId}-menu-label` }, nav_item.label))),
3309
3309
  nav_item.is_active && nav_item.menu && !collapsed ? (React.createElement(SubMenu, { "data-itemid": `${navItemId}-sub-menu` }, nav_item.menu.map((menu_item, menuIndex) => {
@@ -3480,7 +3480,7 @@ const StyledMoreMenu = styled(MoreMenu) `
3480
3480
  max-height: ${props => props.maxHeight};
3481
3481
  z-index: 10;
3482
3482
  `;
3483
- const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'bottomLeft', format = 'primary', menuWidth = '200px', enableHover = true, enableClick = false, show = false, dataItemid, }) => {
3483
+ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'bottomLeft', format = 'primary', menuWidth = '200px', enableHover = true, enableClick = false, show = false, dataItemid, dataSectionName, }) => {
3484
3484
  const [showMenu, toggleMenu] = useState(false);
3485
3485
  const [menuPosition, setMenuPosition] = useState({ top: '0px', left: '0px' });
3486
3486
  const menuWrapperRef = useRef(null);
@@ -3551,7 +3551,7 @@ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = '
3551
3551
  }
3552
3552
  }, [showMenu, position, menuWidth]);
3553
3553
  return (React.createElement(MenuWrapper, { "data-itemid": `${baseId}-menu-wrapper`, onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ref: menuWrapperRef },
3554
- React.createElement(Button, { dataItemid: `${baseId}-button`, disabled: disabled, format: format, icon: mdiDotsHorizontal, small: small }, label),
3554
+ React.createElement(Button, { dataItemid: `${baseId}-button`, dataSectionName: dataSectionName, disabled: disabled, format: format, icon: mdiDotsHorizontal, small: small }, label),
3555
3555
  showMenu && (React.createElement(StyledMoreMenu, { "$left": menuPosition.left, "$menuWidth": menuWidth, "$top": menuPosition.top, dataItemid: `${baseId}-more-menu`, maxHeight: maxHeight, menuItems: menuItems }))));
3556
3556
  };
3557
3557
 
@@ -3657,10 +3657,10 @@ const Label$3 = styled.span `
3657
3657
  box-sizing: border-box;
3658
3658
  `;
3659
3659
  const Checkbox = (_a) => {
3660
- var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError"]);
3660
+ var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false, dataSectionName } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError", "dataSectionName"]);
3661
3661
  const baseId = dataItemid || 'checkbox';
3662
3662
  return (React.createElement(Wrapper$b, Object.assign({ "$disabled": disabled }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
3663
- React.createElement(Input$2, { "$invalid": invalid, checked: checked, "data-itemid": `${baseId}-input`, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'checkbox' }),
3663
+ React.createElement(Input$2, { "$invalid": invalid, checked: checked, "data-itemid": `${baseId}-input`, "data-section-name": dataSectionName, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'checkbox' }),
3664
3664
  React.createElement(Check$1, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "data-itemid": `${baseId}-check` }),
3665
3665
  children ? (React.createElement(Label$3, { color: color, "data-itemid": `${baseId}-label` },
3666
3666
  children,
@@ -5903,7 +5903,7 @@ const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu, tag, dataIte
5903
5903
  const actionId = `${baseId}-action-${i}`;
5904
5904
  return (React.createElement(Button, Object.assign({}, buttonProps, { "data-itemid": `${actionId}-button`, key: i, small: true }), label));
5905
5905
  }),
5906
- menuItems.length ? (React.createElement(ButtonMenu, { dataItemid: `${baseId}-button-menu`, enableClick: enableClick, enableHover: enableHover, format: format, label: label, maxHeight: maxHeight, menuItems: menuItems, show: show, small: true })) : null)) : null));
5906
+ menuItems.length ? (React.createElement(ButtonMenu, { dataItemid: `${baseId}-button-menu`, dataSectionName: 'more-actions', enableClick: enableClick, enableHover: enableHover, format: format, label: label, maxHeight: maxHeight, menuItems: menuItems, show: show, small: true })) : null)) : null));
5907
5907
  };
5908
5908
 
5909
5909
  const Wrapper$3 = styled.nav `