@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/cjs/index.js
CHANGED
|
@@ -2738,7 +2738,7 @@ const Content$3 = styled.div(props => (Object.assign({ position: 'absolute', bor
|
|
|
2738
2738
|
Content$3.defaultProps = { theme: EditableTheme };
|
|
2739
2739
|
const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, dataItemid, height, auto = false, }) => {
|
|
2740
2740
|
const [show_content, toggleContent] = React.useState(false);
|
|
2741
|
-
const baseId = dataItemid ||
|
|
2741
|
+
const baseId = dataItemid || `tooltip-${Math.random().toString(36).slice(2, 9)}`;
|
|
2742
2742
|
if (auto) {
|
|
2743
2743
|
return (React.createElement(StyledDiv, { "data-itemid": `${baseId}-wrapper` },
|
|
2744
2744
|
React.createElement("style", null, `
|
|
@@ -2760,9 +2760,9 @@ const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, d
|
|
|
2760
2760
|
}
|
|
2761
2761
|
|
|
2762
2762
|
`),
|
|
2763
|
-
React.createElement(StyledAnchor, { "data-itemid": `${baseId}-icon-wrapper`, "data-tooltip-id":
|
|
2763
|
+
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: js.mdiInformationOutline })),
|
|
2764
2764
|
React.createElement(TooltipPortal, null,
|
|
2765
|
-
React.createElement(M, { className: 'custom-tooltip', classNameArrow: 'custom-tooltip-arrow', "data-itemid": `${baseId}-content`, id:
|
|
2765
|
+
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) }))));
|
|
2766
2766
|
}
|
|
2767
2767
|
return (React.createElement(Wrapper$h, { "$height": height, "data-itemid": `${baseId}-wrapper`, onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
|
|
2768
2768
|
trigger || React.createElement(StyledIcon$6, { "data-itemid": `${baseId}-icon`, path: js.mdiInformationOutline }),
|
|
@@ -3306,9 +3306,10 @@ const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px', dataIte
|
|
|
3306
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' },
|
|
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
|
-
nav_item.is_active && nav_item.menu && !collapsed ? (React.createElement(SubMenu, { "data-itemid": `${navItemId}-sub-menu` }, nav_item.menu.map(menu_item => {
|
|
3309
|
+
nav_item.is_active && nav_item.menu && !collapsed ? (React.createElement(SubMenu, { "data-itemid": `${navItemId}-sub-menu` }, nav_item.menu.map((menu_item, menuIndex) => {
|
|
3310
3310
|
const menuItemId = `${navItemId}-menu-item`;
|
|
3311
|
-
|
|
3311
|
+
const newKey = `${navItemId}-menu-item-${menuIndex}`;
|
|
3312
|
+
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));
|
|
3312
3313
|
}))) : null));
|
|
3313
3314
|
})),
|
|
3314
3315
|
React.createElement(Footer, { "$isOpen": !collapsed, "data-itemid": `${baseId}-footer` },
|
|
@@ -3801,7 +3802,7 @@ const SearchInput$1 = styled.input `
|
|
|
3801
3802
|
white-space: nowrap;
|
|
3802
3803
|
`;
|
|
3803
3804
|
const Select = (_a) => {
|
|
3804
|
-
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"]);
|
|
3805
|
+
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"]);
|
|
3805
3806
|
const [searchTerm, setSearchTerm] = React.useState('');
|
|
3806
3807
|
const [value, setValue] = React.useState(propValue || '');
|
|
3807
3808
|
const baseId = dataItemid || 'select';
|
|
@@ -3826,7 +3827,7 @@ const Select = (_a) => {
|
|
|
3826
3827
|
: optionGroups;
|
|
3827
3828
|
return (React.createElement(Wrapper$a, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "$readOnly": readOnly, "$style": style, "data-itemid": `${baseId}-wrapper`, style: style },
|
|
3828
3829
|
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))),
|
|
3829
|
-
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),
|
|
3830
|
+
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),
|
|
3830
3831
|
placeholder && !value && (React.createElement("option", { "data-itemid": `${baseId}-placeholder`, disabled: true, value: '' }, placeholder)),
|
|
3831
3832
|
filteredOptionGroups &&
|
|
3832
3833
|
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)))))),
|