@gooddata/sdk-ui-kit 11.48.0-alpha.1 → 11.48.0-alpha.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultUiMenuInteractiveItem.d.ts","sourceRoot":"","sources":["../../../../../src/@ui/UiMenu/components/defaults/DefaultUiMenuInteractiveItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuC,KAAK,SAAS,EAAe,MAAM,OAAO,CAAC;AAQzF,OAAO,EAEH,KAAK,2BAA2B,EAChC,KAAK,kCAAkC,EACvC,KAAK,eAAe,EACvB,MAAM,gBAAgB,CAAC;AAUxB;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,CAAC,SAAS,eAAe,GAAG,MAAM,EAAE,EACpF,IAAI,EACP,EAAE,kCAAkC,CAAC,CAAC,CAAC,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"DefaultUiMenuInteractiveItem.d.ts","sourceRoot":"","sources":["../../../../../src/@ui/UiMenu/components/defaults/DefaultUiMenuInteractiveItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuC,KAAK,SAAS,EAAe,MAAM,OAAO,CAAC;AAQzF,OAAO,EAEH,KAAK,2BAA2B,EAChC,KAAK,kCAAkC,EACvC,KAAK,eAAe,EACvB,MAAM,gBAAgB,CAAC;AAUxB;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,CAAC,SAAS,eAAe,GAAG,MAAM,EAAE,EACpF,IAAI,EACP,EAAE,kCAAkC,CAAC,CAAC,CAAC,GAAG,SAAS,CAoGnD;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,SAAS,eAAe,GAAG,MAAM,EAAE,EAC7E,IAAI,EACJ,SAAS,EACZ,EAAE,2BAA2B,CAAC,CAAC,CAAC,GAAG,SAAS,CAkC5C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2025-2026 GoodData Corporation
|
|
3
3
|
import { useCallback } from "react";
|
|
4
4
|
import cx from "classnames";
|
|
@@ -52,20 +52,23 @@ export function DefaultUiMenuInteractiveItemWrapper({ item, }) {
|
|
|
52
52
|
}), typeof itemClassName === "function" ? itemClassName(item) : itemClassName);
|
|
53
53
|
const dataTestId = typeof itemDataTestId === "function" ? itemDataTestId(item) : itemDataTestId;
|
|
54
54
|
const tooltipId = getTooltipId(item, makeItemId);
|
|
55
|
-
return (
|
|
55
|
+
return (_jsxs(_Fragment, { children: [
|
|
56
|
+
_jsx("li", { ref: scrollToItem, role: "menuitem", ...item.ariaAttributes, "aria-haspopup": item.subItems ? "menu" : item.ariaAttributes?.["aria-haspopup"], "aria-disabled": item.isDisabled, "aria-describedby": [tooltipId, item.ariaAttributes?.["aria-describedby"]].filter(Boolean).join(" ") ||
|
|
57
|
+
undefined, onMouseMove: handleMouseFocus, onClick: item.isDisabled ? undefined : handleSelect, tabIndex: -1, id: makeItemId(item), className: classNames, "data-testid": dataTestId, children: _jsx(InteractiveItemComponent, { item: item, isFocused: isFocused }) }), tooltipId ? (_jsx("li", { role: "none", className: "sr-only", children: _jsx("span", { id: tooltipId, children: item.tooltip }) })) : null] }));
|
|
56
58
|
}
|
|
57
59
|
/**
|
|
58
60
|
* @internal
|
|
59
61
|
*/
|
|
60
62
|
export function DefaultUiMenuInteractiveItem({ item, isFocused, }) {
|
|
61
|
-
|
|
62
|
-
const selector = createSelector((ctx) => ({ makeItemId: ctx.makeItemId }));
|
|
63
|
-
const { makeItemId } = useContextStore(selector);
|
|
64
|
-
const tooltipId = getTooltipId(item, makeItemId);
|
|
65
|
-
return (_jsx(UiTooltip, { id: tooltipId, anchor: _jsxs("div", { className: e("item", {
|
|
63
|
+
return (_jsx(UiTooltip, { anchor: _jsxs("div", { className: e("item", {
|
|
66
64
|
isFocused,
|
|
67
65
|
isSelected: !!item.isSelected,
|
|
68
66
|
isDisabled: !!item.isDisabled,
|
|
69
67
|
isDestructive: !!item.isDestructive,
|
|
70
|
-
}), children: [item.iconLeft ? item.iconLeft : null, _jsx(ShortenedText, { className: e("item-title"), ellipsisPosition: "end", children: item.stringTitle }), !!item.subItems && _jsx("i", { className: "gd-icon-navigateright" }), item.iconRight ? item.iconRight : null] }), content: item.tooltip, disabled: !item.tooltip, optimalPlacement: true, triggerBy: ["hover"], arrowPlacement: "left", width: item.tooltipWidth
|
|
68
|
+
}), children: [item.iconLeft ? item.iconLeft : null, _jsx(ShortenedText, { className: e("item-title"), ellipsisPosition: "end", children: item.stringTitle }), !!item.subItems && _jsx("i", { className: "gd-icon-navigateright" }), item.iconRight ? item.iconRight : null] }), content: item.tooltip, disabled: !item.tooltip, optimalPlacement: true, triggerBy: ["hover"], arrowPlacement: "left", width: item.tooltipWidth,
|
|
69
|
+
// The accessible description is provided by the dedicated sr-only <li> in
|
|
70
|
+
// DefaultUiMenuInteractiveItemWrapper; suppress UiTooltip's own internal
|
|
71
|
+
// screen-reader copy so its (hover-gated) text isn't also folded into this
|
|
72
|
+
// menu item's accessible name as a descendant of the <li>.
|
|
73
|
+
accessibilityHidden: true }));
|
|
71
74
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-kit",
|
|
3
|
-
"version": "11.48.0-alpha.
|
|
3
|
+
"version": "11.48.0-alpha.2",
|
|
4
4
|
"description": "GoodData SDK - UI Building Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -76,11 +76,11 @@
|
|
|
76
76
|
"tslib": "2.8.1",
|
|
77
77
|
"unified": "^11.0.5",
|
|
78
78
|
"uuid": "11.1.1",
|
|
79
|
-
"@gooddata/sdk-backend-spi": "11.48.0-alpha.
|
|
80
|
-
"@gooddata/sdk-model": "11.48.0-alpha.
|
|
81
|
-
"@gooddata/sdk-ui": "11.48.0-alpha.
|
|
82
|
-
"@gooddata/util": "11.48.0-alpha.
|
|
83
|
-
"@gooddata/sdk-ui
|
|
79
|
+
"@gooddata/sdk-backend-spi": "11.48.0-alpha.2",
|
|
80
|
+
"@gooddata/sdk-model": "11.48.0-alpha.2",
|
|
81
|
+
"@gooddata/sdk-ui-theme-provider": "11.48.0-alpha.2",
|
|
82
|
+
"@gooddata/util": "11.48.0-alpha.2",
|
|
83
|
+
"@gooddata/sdk-ui": "11.48.0-alpha.2"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@microsoft/api-documenter": "^7.17.0",
|
|
@@ -129,11 +129,11 @@
|
|
|
129
129
|
"typescript": "5.9.3",
|
|
130
130
|
"vitest": "4.1.8",
|
|
131
131
|
"vitest-dom": "0.1.1",
|
|
132
|
-
"@gooddata/eslint-config": "11.48.0-alpha.
|
|
133
|
-
"@gooddata/oxlint-config": "11.48.0-alpha.
|
|
134
|
-
"@gooddata/reference-workspace": "11.48.0-alpha.
|
|
135
|
-
"@gooddata/sdk-backend-mockingbird": "11.48.0-alpha.
|
|
136
|
-
"@gooddata/stylelint-config": "11.48.0-alpha.
|
|
132
|
+
"@gooddata/eslint-config": "11.48.0-alpha.2",
|
|
133
|
+
"@gooddata/oxlint-config": "11.48.0-alpha.2",
|
|
134
|
+
"@gooddata/reference-workspace": "11.48.0-alpha.2",
|
|
135
|
+
"@gooddata/sdk-backend-mockingbird": "11.48.0-alpha.2",
|
|
136
|
+
"@gooddata/stylelint-config": "11.48.0-alpha.2"
|
|
137
137
|
},
|
|
138
138
|
"peerDependencies": {
|
|
139
139
|
"react": "^18.0.0 || ^19.0.0",
|