Socket
Socket
Sign inDemoInstall

@axelor/ui

Package Overview
Dependencies
67
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.35 to 0.0.36

2

core/overflow-list/overflow-list.js

@@ -12,3 +12,3 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";

[styles.vertical]: overflowProps?.overflowAxis === "vertical",
}), style: style, children: [items.map((item) => (_jsx(OverflowItem, { id: item.id, groupId: item.groupId, priority: item.priority, children: _jsx(ListItem, { ...props, item: item }, item.id) }, item.id))), _jsx(ListMenu, { ...props })] }) }));
}), style: style, children: [items.map((item) => (_jsx(OverflowItem, { id: item.id, groupId: item.groupId, priority: item.priority, children: _jsx(ListItem, { ...props, item: item }, item.id) }, item.id))), _jsx(ListMenu, { ...props })] }) }, items.length));
});

@@ -15,0 +15,0 @@ const ListItem = forwardRef((props, ref) => {

@@ -102,8 +102,10 @@ import { createOverflowManager, } from "@fluentui/priority-overflow";

export const useOverflowCount = () => useOverflowContext((v) => {
return Object.entries(v.itemVisibility).reduce((acc, [id, visible]) => {
if (!visible) {
acc++;
}
return acc;
}, 0);
return v.hasOverflow
? Object.entries(v.itemVisibility).reduce((acc, [id, visible]) => {
if (!visible) {
acc++;
}
return acc;
}, 0)
: 0;
});

@@ -110,0 +112,0 @@ export function useOverflowMenu(id) {

import { jsx as _jsx } from "react/jsx-runtime";
import React, { cloneElement, forwardRef, useCallback } from "react";
import React, { cloneElement, forwardRef, useCallback, useRef } from "react";
import { clsx } from "../clsx";

@@ -10,2 +10,3 @@ import { OverflowContext } from "./context";

const { children, minimumVisible, overflowAxis = "horizontal", overflowDirection, padding, } = props;
const childrenRef = useRef();
const [overflowState, setOverflowState] = React.useState({

@@ -23,3 +24,6 @@ hasOverflow: false,

return {
hasOverflow: data.invisibleItems.length > 0,
hasOverflow:
// is container visible by checking it's offsetWidth
(childrenRef.current?.offsetWidth ?? 0) > 0 &&
data.invisibleItems.length > 0,
itemVisibility,

@@ -38,3 +42,3 @@ groupVisibility,

const clonedChild = cloneElement(children, {
ref: useRefs(containerRef, ref),
ref: useRefs(childrenRef, containerRef, ref),
className: clsx(styles.overflowMenu, styles.overflowingItems, children.props.className),

@@ -41,0 +45,0 @@ });

{
"name": "@axelor/ui",
"version": "0.0.35",
"version": "0.0.36",
"author": "Axelor",

@@ -5,0 +5,0 @@ "license": "AGPL-3.0-only",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc