@trackunit/react-components 0.1.216-alpha-9c359562be.0 → 0.1.217
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
|
@@ -1760,7 +1760,7 @@ const MoreMenu = ({ className, dataTestId, popoverProps, iconProps = {
|
|
|
1760
1760
|
color: "tertiary",
|
|
1761
1761
|
}, customButton, customPortalId, children, }) => {
|
|
1762
1762
|
const actionMenuRef = React.useRef(null);
|
|
1763
|
-
return (jsxRuntime.jsx("div", { ref: actionMenuRef, className: cvaMoreMenu({ className }), "data-testid": dataTestId, children: jsxRuntime.jsxs(Popover, Object.assign({}, popoverProps, { children: [jsxRuntime.jsx(PopoverTrigger, { children: customButton !== null && customButton !== void 0 ? customButton :
|
|
1763
|
+
return (jsxRuntime.jsx("div", { ref: actionMenuRef, className: cvaMoreMenu({ className }), "data-testid": dataTestId, children: jsxRuntime.jsxs(Popover, Object.assign({}, popoverProps, { children: [jsxRuntime.jsx(PopoverTrigger, { children: customButton !== null && customButton !== void 0 ? customButton : jsxRuntime.jsx(IconButton, Object.assign({}, iconButtonProps, { icon: jsxRuntime.jsx(Icon, Object.assign({ name: "EllipsisHorizontal" }, iconProps)) })) }), jsxRuntime.jsx(PopoverContent, { portalId: customPortalId, children: close => (typeof children === "function" ? children(close) : children) })] })) }));
|
|
1764
1764
|
};
|
|
1765
1765
|
|
|
1766
1766
|
const cvaModalContainer = cssClassVarianceUtilities.cvaMerge(["h-full", "w-full", "flex", "items-center"]);
|
package/index.esm.js
CHANGED
|
@@ -1730,7 +1730,7 @@ const MoreMenu = ({ className, dataTestId, popoverProps, iconProps = {
|
|
|
1730
1730
|
color: "tertiary",
|
|
1731
1731
|
}, customButton, customPortalId, children, }) => {
|
|
1732
1732
|
const actionMenuRef = useRef(null);
|
|
1733
|
-
return (jsx("div", { ref: actionMenuRef, className: cvaMoreMenu({ className }), "data-testid": dataTestId, children: jsxs(Popover, Object.assign({}, popoverProps, { children: [jsx(PopoverTrigger, { children: customButton !== null && customButton !== void 0 ? customButton :
|
|
1733
|
+
return (jsx("div", { ref: actionMenuRef, className: cvaMoreMenu({ className }), "data-testid": dataTestId, children: jsxs(Popover, Object.assign({}, popoverProps, { children: [jsx(PopoverTrigger, { children: customButton !== null && customButton !== void 0 ? customButton : jsx(IconButton, Object.assign({}, iconButtonProps, { icon: jsx(Icon, Object.assign({ name: "EllipsisHorizontal" }, iconProps)) })) }), jsx(PopoverContent, { portalId: customPortalId, children: close => (typeof children === "function" ? children(close) : children) })] })) }));
|
|
1734
1734
|
};
|
|
1735
1735
|
|
|
1736
1736
|
const cvaModalContainer = cvaMerge(["h-full", "w-full", "flex", "items-center"]);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LocalStorageCallbacks, LocalStorageParams } from "./types";
|
|
2
|
-
type ValidateStateOptions<
|
|
3
|
-
state:
|
|
4
|
-
defaultState:
|
|
2
|
+
type ValidateStateOptions<TState> = Required<Pick<LocalStorageParams<TState>, "schema">> & {
|
|
3
|
+
state: TState;
|
|
4
|
+
defaultState: TState;
|
|
5
5
|
} & LocalStorageCallbacks;
|
|
6
6
|
/**
|
|
7
7
|
* Validates the state object using a Zod schema.
|
|
@@ -10,4 +10,4 @@ export type DebounceDirection = "in" | "out" | "both";
|
|
|
10
10
|
/**
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
export declare const useDebounce: <
|
|
13
|
+
export declare const useDebounce: <TValue>(value: TValue, delay?: number, direction?: DebounceDirection) => TValue;
|
|
@@ -6,4 +6,4 @@ import { Dispatch, SetStateAction } from "react";
|
|
|
6
6
|
*
|
|
7
7
|
* If no custom state is provided, the fallback state will be used and it works like a normal useState hook.
|
|
8
8
|
*/
|
|
9
|
-
export declare const useOptionallyElevatedState: <
|
|
9
|
+
export declare const useOptionallyElevatedState: <TState>(initialState: TState, customState?: [TState, Dispatch<SetStateAction<TState>>] | undefined) => [TState, Dispatch<SetStateAction<TState>>];
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @returns {boolean} Returns true if it is the first render, false otherwise.
|
|
6
6
|
*/
|
|
7
|
-
export declare const useSelfUpdatingRef: <
|
|
7
|
+
export declare const useSelfUpdatingRef: <TState>(initialState: TState) => import("react").MutableRefObject<TState>;
|