@hexure/ui 1.13.91 → 1.13.93
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 +8 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Select/Select.d.ts +1 -0
- package/dist/esm/index.js +8 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Select/Select.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
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 ||
|
|
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,9 +2758,9 @@ 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-id":
|
|
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:
|
|
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 }),
|
|
@@ -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
|
-
|
|
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` },
|
|
@@ -3799,7 +3800,7 @@ const SearchInput$1 = styled.input `
|
|
|
3799
3800
|
white-space: nowrap;
|
|
3800
3801
|
`;
|
|
3801
3802
|
const Select = (_a) => {
|
|
3802
|
-
var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError"]);
|
|
3803
|
+
var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false, innerRef = null } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError", "innerRef"]);
|
|
3803
3804
|
const [searchTerm, setSearchTerm] = useState('');
|
|
3804
3805
|
const [value, setValue] = useState(propValue || '');
|
|
3805
3806
|
const baseId = dataItemid || 'select';
|
|
@@ -3824,7 +3825,7 @@ const Select = (_a) => {
|
|
|
3824
3825
|
: optionGroups;
|
|
3825
3826
|
return (React.createElement(Wrapper$a, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "$readOnly": readOnly, "$style": style, "data-itemid": `${baseId}-wrapper`, style: style },
|
|
3826
3827
|
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))),
|
|
3827
|
-
React.createElement(Trigger$1, Object.assign({ "data-itemid": `${baseId}-trigger`, disabled: readOnly, id: `${baseId}-trigger`, name: baseId, onChange: handleChange, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, value: value }, accessibleProps),
|
|
3828
|
+
React.createElement(Trigger$1, Object.assign({ "data-itemid": `${baseId}-trigger`, disabled: readOnly, id: `${baseId}-trigger`, name: baseId, onChange: handleChange, placeholder: placeholder, ref: innerRef, tabIndex: readOnly ? -1 : tabIndex, value: value }, accessibleProps),
|
|
3828
3829
|
placeholder && !value && (React.createElement("option", { "data-itemid": `${baseId}-placeholder`, disabled: true, value: '' }, placeholder)),
|
|
3829
3830
|
filteredOptionGroups &&
|
|
3830
3831
|
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)))))),
|