@hexure/ui 1.13.90 → 1.13.92

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/esm/index.js CHANGED
@@ -2736,7 +2736,7 @@ const Content$3 = styled.div(props => (Object.assign({ position: 'absolute', bor
2736
2736
  Content$3.defaultProps = { theme: EditableTheme };
2737
2737
  const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, dataItemid, height, auto = false, }) => {
2738
2738
  const [show_content, toggleContent] = useState(false);
2739
- const baseId = dataItemid || 'tooltip';
2739
+ const baseId = dataItemid || `tooltip-${Math.random().toString(36).slice(2, 9)}`;
2740
2740
  if (auto) {
2741
2741
  return (React.createElement(StyledDiv, { "data-itemid": `${baseId}-wrapper` },
2742
2742
  React.createElement("style", null, `
@@ -2758,13 +2758,13 @@ const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, d
2758
2758
  }
2759
2759
 
2760
2760
  `),
2761
- React.createElement(StyledAnchor, { "data-itemid": `${baseId}-icon-wrapper`, "data-tooltip-html": children, "data-tooltip-id": 'auto-tooltip-data-html' }, trigger || React.createElement(StyledIcon$6, { "data-itemid": `${baseId}-icon`, path: mdiInformationOutline })),
2761
+ React.createElement(StyledAnchor, { "data-itemid": `${baseId}-icon-wrapper`, "data-tooltip-id": `${baseId}-auto-tooltip-data-html` }, trigger || React.createElement(StyledIcon$6, { "data-itemid": `${baseId}-icon`, path: mdiInformationOutline })),
2762
2762
  React.createElement(TooltipPortal, null,
2763
- React.createElement(M, { className: 'custom-tooltip', classNameArrow: 'custom-tooltip-arrow', "data-itemid": `${baseId}-content`, id: 'auto-tooltip-data-html' }))));
2763
+ React.createElement(M, { className: 'custom-tooltip', classNameArrow: 'custom-tooltip-arrow', "data-itemid": `${baseId}-content`, id: `${baseId}-auto-tooltip-data-html`, render: () => React.createElement("p", { "data-itemid": `${baseId}-text` }, children) }))));
2764
2764
  }
2765
2765
  return (React.createElement(Wrapper$h, { "$height": height, "data-itemid": `${baseId}-wrapper`, onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
2766
2766
  trigger || React.createElement(StyledIcon$6, { "data-itemid": `${baseId}-icon`, path: mdiInformationOutline }),
2767
- 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));
2767
+ show_content ? (React.createElement(Content$3, { "$position": position, "$width": width, "data-itemid": `${baseId}-content` }, children && (React.createElement(Copy, { "data-itemid": `${baseId}-text`, type: 'small' }, children)))) : null));
2768
2768
  };
2769
2769
  const TooltipPortal = ({ children }) => {
2770
2770
  const [container, setContainer] = useState();
@@ -3304,9 +3304,10 @@ const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px', dataIte
3304
3304
  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' },
3305
3305
  React.createElement(MenuIcon, { "$active": !!nav_item.is_active, "data-itemid": `${navItemId}-menu-icon`, path: nav_item.icon }),
3306
3306
  collapsed ? null : (React.createElement(MenuLabel, { "$active": nav_item.is_active, "$color": theme.PRIMARY_COLOR, "data-itemid": `${navItemId}-menu-label` }, nav_item.label))),
3307
- nav_item.is_active && nav_item.menu && !collapsed ? (React.createElement(SubMenu, { "data-itemid": `${navItemId}-sub-menu` }, nav_item.menu.map(menu_item => {
3307
+ nav_item.is_active && nav_item.menu && !collapsed ? (React.createElement(SubMenu, { "data-itemid": `${navItemId}-sub-menu` }, nav_item.menu.map((menu_item, menuIndex) => {
3308
3308
  const menuItemId = `${navItemId}-menu-item`;
3309
- 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));
3309
+ const newKey = `${navItemId}-menu-item-${menuIndex}`;
3310
+ return (React.createElement(SubMenuItem, { "$active": menu_item.is_active, "$color": theme.PRIMARY_COLOR, "data-itemid": `${menuItemId}-sub-menu-item`, key: newKey, onClick: menu_item.onClick }, menu_item.label));
3310
3311
  }))) : null));
3311
3312
  })),
3312
3313
  React.createElement(Footer, { "$isOpen": !collapsed, "data-itemid": `${baseId}-footer` },
@@ -5700,6 +5701,7 @@ const ButtonContainer = styled.div `
5700
5701
  margin: 0 10px;
5701
5702
  `;
5702
5703
  const Modal = (_a) => {
5704
+ var _b, _c, _d, _e;
5703
5705
  var { children, title, onClose, maxWidth, fullscreen, steps, primaryButton, secondaryButton, tertiaryButton, quarternaryButton, dataItemid, modalStyle, headerStyle, headerTitleStyle } = _a, accessibleProps = __rest(_a, ["children", "title", "onClose", "maxWidth", "fullscreen", "steps", "primaryButton", "secondaryButton", "tertiaryButton", "quarternaryButton", "dataItemid", "modalStyle", "headerStyle", "headerTitleStyle"]);
5704
5706
  useEffect(() => {
5705
5707
  document.onkeydown = e => {
@@ -5728,9 +5730,9 @@ const Modal = (_a) => {
5728
5730
  display: 'flex',
5729
5731
  alignItems: 'center',
5730
5732
  } },
5731
- tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { "data-itemid": tertiaryButton.children || `${baseId}-${tertiaryButton.children}`, dataItemid: tertiaryButton.children || `${baseId}-${tertiaryButton.children}`, format: tertiaryButton.format || 'secondary' }))) : null,
5733
+ tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { dataItemid: (_b = tertiaryButton.dataItemid) !== null && _b !== void 0 ? _b : tertiaryButton.children, format: tertiaryButton.format || 'secondary' }))) : null,
5732
5734
  quarternaryButton ? (React.createElement(ButtonContainer, { "data-itemid": `${baseId}-quarternary-button-container` },
5733
- React.createElement(Button, Object.assign({}, quarternaryButton, { "data-itemid": quarternaryButton.children || `${baseId}-${quarternaryButton.children}`, dataItemid: quarternaryButton.children || `${baseId}-${quarternaryButton.children}`, format: quarternaryButton.format || 'secondary' })))) : null)) : null,
5735
+ React.createElement(Button, Object.assign({}, quarternaryButton, { dataItemid: (_c = quarternaryButton.dataItemid) !== null && _c !== void 0 ? _c : quarternaryButton.children, format: quarternaryButton.format || 'secondary' })))) : null)) : null,
5734
5736
  primaryButton || secondaryButton ? (React.createElement("div", { "data-itemid": `${baseId}-right-buttons`, style: {
5735
5737
  marginLeft: 'auto',
5736
5738
  paddingLeft: 40,
@@ -5738,8 +5740,8 @@ const Modal = (_a) => {
5738
5740
  alignItems: 'center',
5739
5741
  } },
5740
5742
  secondaryButton ? (React.createElement(ButtonContainer, { "data-itemid": `${baseId}-secondary-button-container` },
5741
- React.createElement(Button, Object.assign({}, secondaryButton, { "data-itemid": secondaryButton.children || `${baseId}-${secondaryButton.children}`, dataItemid: secondaryButton.children || `${baseId}-${secondaryButton.children}`, format: secondaryButton.format || 'secondary' })))) : null,
5742
- primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { "data-itemid": primaryButton.children || `${baseId}-${primaryButton.children}`, dataItemid: primaryButton.children || `${baseId}-${primaryButton.children}`, format: primaryButton.format || 'primary' }))) : null)) : null)) : null)));
5743
+ React.createElement(Button, Object.assign({}, secondaryButton, { dataItemid: (_d = secondaryButton.dataItemid) !== null && _d !== void 0 ? _d : secondaryButton.children, format: secondaryButton.format || 'secondary' })))) : null,
5744
+ primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { dataItemid: (_e = primaryButton.dataItemid) !== null && _e !== void 0 ? _e : primaryButton.children, format: primaryButton.format || 'primary' }))) : null)) : null)) : null)));
5743
5745
  };
5744
5746
 
5745
5747
  const Wrapper$5 = styled.div `