@trackunit/react-components 0.1.189 → 0.1.190
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/index.cjs.js
CHANGED
|
@@ -19346,7 +19346,7 @@ const cvaMenuItemSuffix = cssClassVarianceUtilities.cvaMerge(["self-center", "fl
|
|
|
19346
19346
|
},
|
|
19347
19347
|
},
|
|
19348
19348
|
});
|
|
19349
|
-
const cvaMenuItemPrefix = cssClassVarianceUtilities.cvaMerge(["self-center", "flex-grow-0", "text-slate-400", "group-hover:text-slate-600"], {
|
|
19349
|
+
const cvaMenuItemPrefix = cssClassVarianceUtilities.cvaMerge(["self-center", "flex-grow-0", "text-slate-400", "group-hover:text-slate-600", "h-min", "leading-[0]"], {
|
|
19350
19350
|
variants: {
|
|
19351
19351
|
selected: {
|
|
19352
19352
|
true: "text-primary-600 hover:text-primary-700",
|
|
@@ -19361,9 +19361,9 @@ const cvaMenuItemPrefix = cssClassVarianceUtilities.cvaMerge(["self-center", "fl
|
|
|
19361
19361
|
* @param {MenuItemProps} props - The props for the MenuItem component
|
|
19362
19362
|
* @returns {JSX.Element} MenuItem component
|
|
19363
19363
|
*/
|
|
19364
|
-
const MenuItem = ({ className, dataTestId, label, size, children, selected, focused, prefix, suffix, disabled, onClick, }) => {
|
|
19364
|
+
const MenuItem = ({ className, dataTestId, label, size, children, selected, focused, prefix, suffix, disabled, onClick, id, }) => {
|
|
19365
19365
|
const containerProps = useContainerProps({ className, dataTestId: dataTestId || "menu-item" });
|
|
19366
|
-
return (jsxRuntime.jsxs("div", Object.assign({}, containerProps, { className: cvaMenuItem({
|
|
19366
|
+
return (jsxRuntime.jsxs("div", Object.assign({}, containerProps, { id: id, className: cvaMenuItem({
|
|
19367
19367
|
selected,
|
|
19368
19368
|
focused,
|
|
19369
19369
|
disabled,
|
|
@@ -39375,6 +39375,7 @@ exports.useLocalStorage = useLocalStorage;
|
|
|
39375
39375
|
exports.useLocalStorageReducer = useLocalStorageReducer;
|
|
39376
39376
|
exports.useModal = useModal;
|
|
39377
39377
|
exports.useOptionallyElevatedState = useOptionallyElevatedState;
|
|
39378
|
+
exports.useOverflowItems = useOverflowItems;
|
|
39378
39379
|
exports.usePopoverContext = usePopoverContext;
|
|
39379
39380
|
exports.usePrompt = usePrompt;
|
|
39380
39381
|
exports.useResize = useResize;
|
package/index.esm.js
CHANGED
|
@@ -19317,7 +19317,7 @@ const cvaMenuItemSuffix = cvaMerge(["self-center", "flex-grow-0", "text-slate-40
|
|
|
19317
19317
|
},
|
|
19318
19318
|
},
|
|
19319
19319
|
});
|
|
19320
|
-
const cvaMenuItemPrefix = cvaMerge(["self-center", "flex-grow-0", "text-slate-400", "group-hover:text-slate-600"], {
|
|
19320
|
+
const cvaMenuItemPrefix = cvaMerge(["self-center", "flex-grow-0", "text-slate-400", "group-hover:text-slate-600", "h-min", "leading-[0]"], {
|
|
19321
19321
|
variants: {
|
|
19322
19322
|
selected: {
|
|
19323
19323
|
true: "text-primary-600 hover:text-primary-700",
|
|
@@ -19332,9 +19332,9 @@ const cvaMenuItemPrefix = cvaMerge(["self-center", "flex-grow-0", "text-slate-40
|
|
|
19332
19332
|
* @param {MenuItemProps} props - The props for the MenuItem component
|
|
19333
19333
|
* @returns {JSX.Element} MenuItem component
|
|
19334
19334
|
*/
|
|
19335
|
-
const MenuItem = ({ className, dataTestId, label, size, children, selected, focused, prefix, suffix, disabled, onClick, }) => {
|
|
19335
|
+
const MenuItem = ({ className, dataTestId, label, size, children, selected, focused, prefix, suffix, disabled, onClick, id, }) => {
|
|
19336
19336
|
const containerProps = useContainerProps({ className, dataTestId: dataTestId || "menu-item" });
|
|
19337
|
-
return (jsxs("div", Object.assign({}, containerProps, { className: cvaMenuItem({
|
|
19337
|
+
return (jsxs("div", Object.assign({}, containerProps, { id: id, className: cvaMenuItem({
|
|
19338
19338
|
selected,
|
|
19339
19339
|
focused,
|
|
19340
19340
|
disabled,
|
|
@@ -39267,4 +39267,4 @@ const useVisibilityChange = ({ onChange, targetState = "hidden" }) => {
|
|
|
39267
39267
|
}, [onChange, targetState]);
|
|
39268
39268
|
};
|
|
39269
39269
|
|
|
39270
|
-
export { Alert, Badge, Button$1 as Button, Card, CardBody, CardFooter, CardHeader, Collapse, CopyableText, DayPicker, DayPickerPopover, DayRangePicker, Drawer, EmptyState, ExternalLink, Heading, Icon, IconButton, Indicator, MenuItem, MenuList, Modal, ModalBackdrop, MoreMenu, PackageNameStoryComponent, PageHeader, Pagination, Popover, PopoverContent, PopoverTitle, PopoverTrigger, Prompt, ROLE_CARD, SectionHeader, Sidebar, SkeletonLines, Spacer, Spinner, StarButton, Tag, Text, Timeline, TimelineElement, Tip, Tooltip, ValueBar, WidgetBody, cvaButton, cvaButtonSpinner, cvaClickable, cvaIconButtonContainer, cvaIndicator, cvaIndicatorIcon, cvaIndicatorIconBackground, cvaIndicatorLabel, cvaIndicatorPing, cvaMenuItem, cvaMenuItemLabel, cvaMenuItemPrefix, cvaMenuItemSuffix, docs, getDevicePixelRatio, getValueBarColorByValue, iconColorNames, iconPalette, setLocalStorage, useClickOutside, useContainerProps, useContinuousTimeout, useDebounce, useDevicePixelRatio, useHover, useIsFirstRender, useIsFullscreen, useIsTextCutOff, useLocalStorage, useLocalStorageReducer, useModal, useOptionallyElevatedState, usePopoverContext, usePrompt, useResize, useTimeout, useVisibilityChange };
|
|
39270
|
+
export { Alert, Badge, Button$1 as Button, Card, CardBody, CardFooter, CardHeader, Collapse, CopyableText, DayPicker, DayPickerPopover, DayRangePicker, Drawer, EmptyState, ExternalLink, Heading, Icon, IconButton, Indicator, MenuItem, MenuList, Modal, ModalBackdrop, MoreMenu, PackageNameStoryComponent, PageHeader, Pagination, Popover, PopoverContent, PopoverTitle, PopoverTrigger, Prompt, ROLE_CARD, SectionHeader, Sidebar, SkeletonLines, Spacer, Spinner, StarButton, Tag, Text, Timeline, TimelineElement, Tip, Tooltip, ValueBar, WidgetBody, cvaButton, cvaButtonSpinner, cvaClickable, cvaIconButtonContainer, cvaIndicator, cvaIndicatorIcon, cvaIndicatorIconBackground, cvaIndicatorLabel, cvaIndicatorPing, cvaMenuItem, cvaMenuItemLabel, cvaMenuItemPrefix, cvaMenuItemSuffix, docs, getDevicePixelRatio, getValueBarColorByValue, iconColorNames, iconPalette, setLocalStorage, useClickOutside, useContainerProps, useContinuousTimeout, useDebounce, useDevicePixelRatio, useHover, useIsFirstRender, useIsFullscreen, useIsTextCutOff, useLocalStorage, useLocalStorageReducer, useModal, useOptionallyElevatedState, useOverflowItems, usePopoverContext, usePrompt, useResize, useTimeout, useVisibilityChange };
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { CommonProps } from "../../../common";
|
|
4
4
|
type MenuItemSize = Extract<Size, "small" | "medium">;
|
|
5
5
|
export interface MenuItemProps extends CommonProps {
|
|
6
|
+
id?: string;
|
|
6
7
|
/**
|
|
7
8
|
* Label of the menu item
|
|
8
9
|
*/
|
|
@@ -60,5 +61,5 @@ export interface MenuItemProps extends CommonProps {
|
|
|
60
61
|
* @param {MenuItemProps} props - The props for the MenuItem component
|
|
61
62
|
* @returns {JSX.Element} MenuItem component
|
|
62
63
|
*/
|
|
63
|
-
export declare const MenuItem: ({ className, dataTestId, label, size, children, selected, focused, prefix, suffix, disabled, onClick, }: MenuItemProps) => JSX.Element;
|
|
64
|
+
export declare const MenuItem: ({ className, dataTestId, label, size, children, selected, focused, prefix, suffix, disabled, onClick, id, }: MenuItemProps) => JSX.Element;
|
|
64
65
|
export {};
|
|
@@ -19,6 +19,7 @@ export * from "./Popover/Popover";
|
|
|
19
19
|
export * from "./Prompt";
|
|
20
20
|
export * from "./SectionHeader";
|
|
21
21
|
export * from "./Sidebar/Sidebar";
|
|
22
|
+
export * from "./Sidebar/useOverflowItems";
|
|
22
23
|
export * from "./SkeletonLines";
|
|
23
24
|
export * from "./Spacer";
|
|
24
25
|
export * from "./Spinner";
|