analytica-frontend-lib 1.1.78 → 1.1.79
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/DropdownMenu/index.d.mts +2 -2
- package/dist/DropdownMenu/index.d.ts +2 -2
- package/dist/DropdownMenu/index.js +27 -4
- package/dist/DropdownMenu/index.js.map +1 -1
- package/dist/DropdownMenu/index.mjs +27 -4
- package/dist/DropdownMenu/index.mjs.map +1 -1
- package/dist/NotificationCard/index.js +27 -4
- package/dist/NotificationCard/index.js.map +1 -1
- package/dist/NotificationCard/index.mjs +27 -4
- package/dist/NotificationCard/index.mjs.map +1 -1
- package/dist/Search/index.js +27 -4
- package/dist/Search/index.js.map +1 -1
- package/dist/Search/index.mjs +27 -4
- package/dist/Search/index.mjs.map +1 -1
- package/dist/index.js +27 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2274,9 +2274,23 @@ var injectStore3 = (children, store) => {
|
|
|
2274
2274
|
return Children3.map(children, (child) => {
|
|
2275
2275
|
if (isValidElement3(child)) {
|
|
2276
2276
|
const typedChild = child;
|
|
2277
|
-
const
|
|
2278
|
-
|
|
2279
|
-
|
|
2277
|
+
const displayName = typedChild.type.displayName;
|
|
2278
|
+
const allowed = [
|
|
2279
|
+
"DropdownMenuTrigger",
|
|
2280
|
+
"DropdownContent",
|
|
2281
|
+
"DropdownMenuContent",
|
|
2282
|
+
"DropdownMenuSeparator",
|
|
2283
|
+
"DropdownMenuItem",
|
|
2284
|
+
"MenuLabel",
|
|
2285
|
+
"ProfileMenuTrigger",
|
|
2286
|
+
"ProfileMenuHeader",
|
|
2287
|
+
"ProfileMenuFooter",
|
|
2288
|
+
"ProfileToggleTheme"
|
|
2289
|
+
];
|
|
2290
|
+
let newProps = {};
|
|
2291
|
+
if (allowed.includes(displayName)) {
|
|
2292
|
+
newProps.store = store;
|
|
2293
|
+
}
|
|
2280
2294
|
if (typedChild.props.children) {
|
|
2281
2295
|
newProps.children = injectStore3(typedChild.props.children, store);
|
|
2282
2296
|
}
|
|
@@ -2362,13 +2376,22 @@ var DropdownMenuTrigger = ({
|
|
|
2362
2376
|
const open = useStore3(store, (s) => s.open);
|
|
2363
2377
|
const toggleOpen = () => store.setState({ open: !open });
|
|
2364
2378
|
return /* @__PURE__ */ jsx20(
|
|
2365
|
-
"
|
|
2379
|
+
"div",
|
|
2366
2380
|
{
|
|
2367
2381
|
onClick: (e) => {
|
|
2368
2382
|
e.stopPropagation();
|
|
2369
2383
|
toggleOpen();
|
|
2370
2384
|
if (onClick) onClick(e);
|
|
2371
2385
|
},
|
|
2386
|
+
role: "button",
|
|
2387
|
+
onKeyDown: (e) => {
|
|
2388
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
2389
|
+
e.preventDefault();
|
|
2390
|
+
toggleOpen();
|
|
2391
|
+
if (onClick) onClick(e);
|
|
2392
|
+
}
|
|
2393
|
+
},
|
|
2394
|
+
tabIndex: 0,
|
|
2372
2395
|
"aria-expanded": open,
|
|
2373
2396
|
className: cn(className),
|
|
2374
2397
|
...props,
|