@trackunit/react-components 0.1.210 → 0.1.216

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
@@ -6,6 +6,7 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var React = require('react');
7
7
  var uiDesignTokens = require('@trackunit/ui-design-tokens');
8
8
  var uiIcons = require('@trackunit/ui-icons');
9
+ var IconSpriteMini = require('@trackunit/ui-icons/icons-sprite-mini.svg');
9
10
  var IconSpriteOutline = require('@trackunit/ui-icons/icons-sprite-outline.svg');
10
11
  var IconSpriteSolid = require('@trackunit/ui-icons/icons-sprite-solid.svg');
11
12
  var cssClassVarianceUtilities = require('@trackunit/css-class-variance-utilities');
@@ -42,6 +43,7 @@ function _interopNamespace(e) {
42
43
 
43
44
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
44
45
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
46
+ var IconSpriteMini__default = /*#__PURE__*/_interopDefaultLegacy(IconSpriteMini);
45
47
  var IconSpriteOutline__default = /*#__PURE__*/_interopDefaultLegacy(IconSpriteOutline);
46
48
  var IconSpriteSolid__default = /*#__PURE__*/_interopDefaultLegacy(IconSpriteSolid);
47
49
  var usePortal__default = /*#__PURE__*/_interopDefaultLegacy(usePortal);
@@ -208,13 +210,22 @@ const isSafari = () => {
208
210
  * @param {IconProps} props - The props for the Icon component
209
211
  * @returns {JSX.Element} Icon component
210
212
  */
211
- const Icon = ({ name, size = "large", className, dataTestId, color, onClick, fillColor, type, style, forwardedRef, }) => {
213
+ const Icon = ({ name, size = "large", className, dataTestId, color, onClick, type, style, forwardedRef, }) => {
212
214
  const useTagRef = React.useRef(null);
213
- const correctIconType = React.useMemo(() => (type ? type : size === "large" ? "outline" : "solid"), [type, size]);
215
+ const correctIconType = React.useMemo(() => {
216
+ if (size === "small" || size === "medium") {
217
+ return "mini";
218
+ }
219
+ if (type === "solid") {
220
+ return "solid";
221
+ }
222
+ return "outline";
223
+ }, [type, size]);
214
224
  const iconName = uiIcons.iconNames[name];
215
225
  const href = React.useMemo(() => ({
216
226
  solid: `${IconSpriteSolid__default["default"]}#${iconName}`,
217
227
  outline: `${IconSpriteOutline__default["default"]}#${iconName}`,
228
+ mini: `${IconSpriteMini__default["default"]}#${iconName}`,
218
229
  }), [iconName]);
219
230
  React.useEffect(() => {
220
231
  if (isSafari() && useTagRef.current) {
@@ -224,7 +235,7 @@ const Icon = ({ name, size = "large", className, dataTestId, color, onClick, fil
224
235
  if (!iconName) {
225
236
  return null;
226
237
  }
227
- return (jsxRuntime.jsx("span", { className: cvaIcon({ color, size, className }), onClick: onClick, "data-testid": dataTestId, ref: forwardedRef, children: jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", "data-testid": dataTestId ? `${dataTestId}-${iconName}` : iconName, style: fillColor ? Object.assign(Object.assign({}, style), { fill: fillColor }) : Object.assign({}, style), children: jsxRuntime.jsx("use", { href: href[correctIconType], ref: useTagRef }) }) }));
238
+ return (jsxRuntime.jsx("span", { className: cvaIcon({ color, size, className }), onClick: onClick, "data-testid": dataTestId, ref: forwardedRef, children: jsxRuntime.jsx("svg", { viewBox: correctIconType === "mini" ? "0 0 20 20" : "0 0 24 24", "data-testid": dataTestId ? `${dataTestId}-${iconName}` : iconName, style: style, children: jsxRuntime.jsx("use", { href: href[correctIconType], ref: useTagRef }) }) }));
228
239
  };
229
240
 
230
241
  const cvaTag = cssClassVarianceUtilities.cvaMerge([
@@ -665,7 +676,7 @@ const IconButton = React__namespace.forwardRef((_a, ref) => {
665
676
  * @returns {JSX.Element} StarButton component
666
677
  */
667
678
  const StarButton = ({ starred, onClick }) => {
668
- return (jsxRuntime.jsx("div", { onClick: onClick, "data-test-id": "starred-filter", children: jsxRuntime.jsx(Icon, { name: "Star", color: starred ? "primary" : "neutral", type: starred ? "solid" : "outline", size: "medium" }) }));
679
+ return (jsxRuntime.jsx("div", { onClick: onClick, "data-test-id": "starred-filter", children: jsxRuntime.jsx(Icon, { name: "Star", color: starred ? "primary" : "neutral", size: "medium" }) }));
669
680
  };
670
681
 
671
682
  const cvaAlert = cssClassVarianceUtilities.cvaMerge(["flex", "relative", "p-4", "rounded"], {
@@ -1742,7 +1753,6 @@ const cvaMoreMenu = cssClassVarianceUtilities.cvaMerge(["p-4"]);
1742
1753
  */
1743
1754
  const MoreMenu = ({ className, dataTestId, popoverProps, iconProps = {
1744
1755
  size: "medium",
1745
- name: "EllipsisHorizontal",
1746
1756
  }, iconButtonProps = {
1747
1757
  size: "small",
1748
1758
  circular: true,
@@ -1750,7 +1760,7 @@ const MoreMenu = ({ className, dataTestId, popoverProps, iconProps = {
1750
1760
  color: "tertiary",
1751
1761
  }, customButton, customPortalId, children, }) => {
1752
1762
  const actionMenuRef = React.useRef(null);
1753
- 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: iconProps.name ? jsxRuntime.jsx(Icon, Object.assign({}, iconProps, { name: iconProps.name })) : null }))) }), jsxRuntime.jsx(PopoverContent, { portalId: customPortalId, children: close => (typeof children === "function" ? children(close) : children) })] })) }));
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: iconProps.name ? jsxRuntime.jsx(Icon, Object.assign({ name: "EllipsisHorizontal" }, iconProps)) : null }))) }), jsxRuntime.jsx(PopoverContent, { portalId: customPortalId, children: close => (typeof children === "function" ? children(close) : children) })] })) }));
1754
1764
  };
1755
1765
 
1756
1766
  const cvaModalContainer = cssClassVarianceUtilities.cvaMerge(["h-full", "w-full", "flex", "items-center"]);
@@ -1923,7 +1933,7 @@ const cvaPaginationText = cssClassVarianceUtilities.cvaMerge("whitespace-nowrap"
1923
1933
  /**
1924
1934
  * Pagination Description. It could be used when you need navigation for your paging feature.
1925
1935
 
1926
- * @param {IPaginationProps} props - The props for the Pagination component
1936
+ * @param {PaginationProps} props - The props for the Pagination component
1927
1937
  * @returns {JSX.Element} Pagination component
1928
1938
  */
1929
1939
  const Pagination = ({ previousPage, nextPage, canPreviousPage, canNextPage, pageCount, pageIndex, loading, className, dataTestId, getTranslatedCount, onPageChange, cursorBase, }) => {
@@ -2410,7 +2420,17 @@ const ValueBar = ({ value, min = 0, max = 100, unit, size = "small", levelColors
2410
2420
  return (jsxRuntime.jsx("svg", { className: cvaValueBar({ size, className }), "data-testid": dataTestId, children: jsxRuntime.jsxs("g", { children: [jsxRuntime.jsx("rect", { className: cvaValueBarProgress({ fill: "background" }), width: `${barWidth}%`, rx: "5" }), jsxRuntime.jsx("rect", { className: cvaValueBarProgress(), width: `${score * barWidth}%`, fill: barFillColor, rx: "5" }), showValue && size === "large" && (jsxRuntime.jsxs("text", { className: cvaValueBarText({ size }), x: "12", y: "23", fill: valueColor !== null && valueColor !== void 0 ? valueColor : "white", children: [Number(value.toFixed(1)), unit || ""] })), showValue && size === "small" && (jsxRuntime.jsxs("text", { className: cvaValueBarText({ size }), x: `${barWidth + 2}%`, y: "11", fill: valueColor !== null && valueColor !== void 0 ? valueColor : uiDesignTokens.color("NEUTRAL", 400, "CSS"), children: [Number(value.toFixed(1)), unit || ""] }))] }) }));
2411
2421
  };
2412
2422
 
2413
- const cvaWidgetBodyDensityContainer = cssClassVarianceUtilities.cvaMerge(["@container", "flex", "flex-grow", "overflow-auto", "w-full", "h-full", "place-items-center", "overflow-hidden"], {
2423
+ const cvaWidgetBodyDensityContainer = cssClassVarianceUtilities.cvaMerge([
2424
+ "@container",
2425
+ "flex",
2426
+ "flex-grow",
2427
+ "overflow-auto",
2428
+ "w-full",
2429
+ "h-full",
2430
+ "place-items-center",
2431
+ "bg-white",
2432
+ "overflow-hidden",
2433
+ ], {
2414
2434
  variants: {
2415
2435
  disableGap: {
2416
2436
  true: "gap-0",
@@ -2427,7 +2447,7 @@ const cvaWidgetBodyDensityContainer = cssClassVarianceUtilities.cvaMerge(["@cont
2427
2447
  compact: "gap-3 p-3",
2428
2448
  comfortable: "gap-4 p-4",
2429
2449
  spacious: "gap-4 p-6",
2430
- auto: "",
2450
+ auto: "p-2",
2431
2451
  },
2432
2452
  },
2433
2453
  defaultVariants: {
package/index.esm.js CHANGED
@@ -3,6 +3,7 @@ import * as React from 'react';
3
3
  import React__default, { useRef, useMemo, useEffect, useState, createContext, useContext, forwardRef, isValidElement, cloneElement, useCallback, memo, Children, useReducer } from 'react';
4
4
  import { rentalStatusPalette, intentPalette, generalPalette, criticalityPalette, activityPalette, utilizationPalette, sitesPalette, color } from '@trackunit/ui-design-tokens';
5
5
  import { iconNames } from '@trackunit/ui-icons';
6
+ import IconSpriteMini from '@trackunit/ui-icons/icons-sprite-mini.svg';
6
7
  import IconSpriteOutline from '@trackunit/ui-icons/icons-sprite-outline.svg';
7
8
  import IconSpriteSolid from '@trackunit/ui-icons/icons-sprite-solid.svg';
8
9
  import { cvaMerge } from '@trackunit/css-class-variance-utilities';
@@ -179,13 +180,22 @@ const isSafari = () => {
179
180
  * @param {IconProps} props - The props for the Icon component
180
181
  * @returns {JSX.Element} Icon component
181
182
  */
182
- const Icon = ({ name, size = "large", className, dataTestId, color, onClick, fillColor, type, style, forwardedRef, }) => {
183
+ const Icon = ({ name, size = "large", className, dataTestId, color, onClick, type, style, forwardedRef, }) => {
183
184
  const useTagRef = useRef(null);
184
- const correctIconType = useMemo(() => (type ? type : size === "large" ? "outline" : "solid"), [type, size]);
185
+ const correctIconType = useMemo(() => {
186
+ if (size === "small" || size === "medium") {
187
+ return "mini";
188
+ }
189
+ if (type === "solid") {
190
+ return "solid";
191
+ }
192
+ return "outline";
193
+ }, [type, size]);
185
194
  const iconName = iconNames[name];
186
195
  const href = useMemo(() => ({
187
196
  solid: `${IconSpriteSolid}#${iconName}`,
188
197
  outline: `${IconSpriteOutline}#${iconName}`,
198
+ mini: `${IconSpriteMini}#${iconName}`,
189
199
  }), [iconName]);
190
200
  useEffect(() => {
191
201
  if (isSafari() && useTagRef.current) {
@@ -195,7 +205,7 @@ const Icon = ({ name, size = "large", className, dataTestId, color, onClick, fil
195
205
  if (!iconName) {
196
206
  return null;
197
207
  }
198
- return (jsx("span", { className: cvaIcon({ color, size, className }), onClick: onClick, "data-testid": dataTestId, ref: forwardedRef, children: jsx("svg", { viewBox: "0 0 24 24", "data-testid": dataTestId ? `${dataTestId}-${iconName}` : iconName, style: fillColor ? Object.assign(Object.assign({}, style), { fill: fillColor }) : Object.assign({}, style), children: jsx("use", { href: href[correctIconType], ref: useTagRef }) }) }));
208
+ return (jsx("span", { className: cvaIcon({ color, size, className }), onClick: onClick, "data-testid": dataTestId, ref: forwardedRef, children: jsx("svg", { viewBox: correctIconType === "mini" ? "0 0 20 20" : "0 0 24 24", "data-testid": dataTestId ? `${dataTestId}-${iconName}` : iconName, style: style, children: jsx("use", { href: href[correctIconType], ref: useTagRef }) }) }));
199
209
  };
200
210
 
201
211
  const cvaTag = cvaMerge([
@@ -636,7 +646,7 @@ const IconButton = React.forwardRef((_a, ref) => {
636
646
  * @returns {JSX.Element} StarButton component
637
647
  */
638
648
  const StarButton = ({ starred, onClick }) => {
639
- return (jsx("div", { onClick: onClick, "data-test-id": "starred-filter", children: jsx(Icon, { name: "Star", color: starred ? "primary" : "neutral", type: starred ? "solid" : "outline", size: "medium" }) }));
649
+ return (jsx("div", { onClick: onClick, "data-test-id": "starred-filter", children: jsx(Icon, { name: "Star", color: starred ? "primary" : "neutral", size: "medium" }) }));
640
650
  };
641
651
 
642
652
  const cvaAlert = cvaMerge(["flex", "relative", "p-4", "rounded"], {
@@ -1713,7 +1723,6 @@ const cvaMoreMenu = cvaMerge(["p-4"]);
1713
1723
  */
1714
1724
  const MoreMenu = ({ className, dataTestId, popoverProps, iconProps = {
1715
1725
  size: "medium",
1716
- name: "EllipsisHorizontal",
1717
1726
  }, iconButtonProps = {
1718
1727
  size: "small",
1719
1728
  circular: true,
@@ -1721,7 +1730,7 @@ const MoreMenu = ({ className, dataTestId, popoverProps, iconProps = {
1721
1730
  color: "tertiary",
1722
1731
  }, customButton, customPortalId, children, }) => {
1723
1732
  const actionMenuRef = useRef(null);
1724
- 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: iconProps.name ? jsx(Icon, Object.assign({}, iconProps, { name: iconProps.name })) : null }))) }), jsx(PopoverContent, { portalId: customPortalId, children: close => (typeof children === "function" ? children(close) : children) })] })) }));
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: iconProps.name ? jsx(Icon, Object.assign({ name: "EllipsisHorizontal" }, iconProps)) : null }))) }), jsx(PopoverContent, { portalId: customPortalId, children: close => (typeof children === "function" ? children(close) : children) })] })) }));
1725
1734
  };
1726
1735
 
1727
1736
  const cvaModalContainer = cvaMerge(["h-full", "w-full", "flex", "items-center"]);
@@ -1894,7 +1903,7 @@ const cvaPaginationText = cvaMerge("whitespace-nowrap");
1894
1903
  /**
1895
1904
  * Pagination Description. It could be used when you need navigation for your paging feature.
1896
1905
 
1897
- * @param {IPaginationProps} props - The props for the Pagination component
1906
+ * @param {PaginationProps} props - The props for the Pagination component
1898
1907
  * @returns {JSX.Element} Pagination component
1899
1908
  */
1900
1909
  const Pagination = ({ previousPage, nextPage, canPreviousPage, canNextPage, pageCount, pageIndex, loading, className, dataTestId, getTranslatedCount, onPageChange, cursorBase, }) => {
@@ -2381,7 +2390,17 @@ const ValueBar = ({ value, min = 0, max = 100, unit, size = "small", levelColors
2381
2390
  return (jsx("svg", { className: cvaValueBar({ size, className }), "data-testid": dataTestId, children: jsxs("g", { children: [jsx("rect", { className: cvaValueBarProgress({ fill: "background" }), width: `${barWidth}%`, rx: "5" }), jsx("rect", { className: cvaValueBarProgress(), width: `${score * barWidth}%`, fill: barFillColor, rx: "5" }), showValue && size === "large" && (jsxs("text", { className: cvaValueBarText({ size }), x: "12", y: "23", fill: valueColor !== null && valueColor !== void 0 ? valueColor : "white", children: [Number(value.toFixed(1)), unit || ""] })), showValue && size === "small" && (jsxs("text", { className: cvaValueBarText({ size }), x: `${barWidth + 2}%`, y: "11", fill: valueColor !== null && valueColor !== void 0 ? valueColor : color("NEUTRAL", 400, "CSS"), children: [Number(value.toFixed(1)), unit || ""] }))] }) }));
2382
2391
  };
2383
2392
 
2384
- const cvaWidgetBodyDensityContainer = cvaMerge(["@container", "flex", "flex-grow", "overflow-auto", "w-full", "h-full", "place-items-center", "overflow-hidden"], {
2393
+ const cvaWidgetBodyDensityContainer = cvaMerge([
2394
+ "@container",
2395
+ "flex",
2396
+ "flex-grow",
2397
+ "overflow-auto",
2398
+ "w-full",
2399
+ "h-full",
2400
+ "place-items-center",
2401
+ "bg-white",
2402
+ "overflow-hidden",
2403
+ ], {
2385
2404
  variants: {
2386
2405
  disableGap: {
2387
2406
  true: "gap-0",
@@ -2398,7 +2417,7 @@ const cvaWidgetBodyDensityContainer = cvaMerge(["@container", "flex", "flex-grow
2398
2417
  compact: "gap-3 p-3",
2399
2418
  comfortable: "gap-4 p-4",
2400
2419
  spacious: "gap-4 p-6",
2401
- auto: "",
2420
+ auto: "p-2",
2402
2421
  },
2403
2422
  },
2404
2423
  defaultVariants: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.1.210",
3
+ "version": "0.1.216",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -209,14 +209,7 @@ export declare const iconPalette: {
209
209
  readonly 400: "96 165 250";
210
210
  readonly 500: "59 130 246";
211
211
  readonly 600: "37 99 235";
212
- readonly 700: "29 78 216"; /**
213
- * - The Icon component is used to display an Icon.
214
- * - Icons are semantic vector graphics that adds character and improves the visual appeal of elements when combined with.
215
- * - All the [HeroIcons](https://heroicons.dev/) as well as custom Trackunit icons are available.
216
-
217
- * @param {IconProps} props - The props for the Icon component
218
- * @returns {JSX.Element} Icon component
219
- */
212
+ readonly 700: "29 78 216";
220
213
  readonly 800: "30 64 175";
221
214
  readonly 900: "30 58 138";
222
215
  };
@@ -258,7 +251,24 @@ export declare const iconPalette: {
258
251
  };
259
252
  };
260
253
  export declare const iconColorNames: ("info" | "success" | "warning" | "danger" | "primary" | "secondary" | "accent" | "neutral" | "black" | "white" | "good" | "low" | "critical" | "working" | "idle" | "stopped" | "unknown" | "moving" | "active" | "unused" | "utilized" | "heavily_utilized" | "unknown_utilization" | "site" | "on_rent" | "returned" | "available" | "pickup_ready" | "transfer" | "in_repair" | "other_rental_status")[];
261
- export interface IconProps extends CommonProps {
254
+ type IconPropsFont = {
255
+ size?: "font";
256
+ type?: "solid" | "outline";
257
+ };
258
+ type IconPropsSmall = {
259
+ size?: "small";
260
+ type?: "solid";
261
+ };
262
+ type IconPropsMedium = {
263
+ size?: "medium";
264
+ type?: "solid";
265
+ };
266
+ type IconPropsLarge = {
267
+ size?: "large";
268
+ type?: "solid" | "outline";
269
+ };
270
+ type DiscriminatedIconProps = IconPropsFont | IconPropsSmall | IconPropsMedium | IconPropsLarge;
271
+ export type IconProps = DiscriminatedIconProps & CommonProps & {
262
272
  /**
263
273
  * The name of the icon to be rendered.
264
274
  * HeroIconName and TrackunitIconName are supported.
@@ -282,12 +292,13 @@ export interface IconProps extends CommonProps {
282
292
  * Default value depends on the Size prop, small == solid, medium == solid, large == outline.
283
293
  * Trackunit icons might not support both outline and Solid.
284
294
  */
285
- type?: "solid" | "outline";
295
+ type?: "solid" | "outline" | "mini";
286
296
  onClick?: (event: React.MouseEvent<HTMLElement>) => void;
287
297
  /**
288
- * @deprecated
298
+ * Ref forwarded to the span element
299
+ *
300
+ * @memberof IconProps
289
301
  */
290
- fillColor?: string;
291
302
  forwardedRef?: React.RefObject<HTMLSpanElement>;
292
303
  /**
293
304
  * Custom styles object used to override existing styles or add some extra styling
@@ -295,7 +306,7 @@ export interface IconProps extends CommonProps {
295
306
  * @memberof IconProps
296
307
  */
297
308
  style?: Record<string, string>;
298
- }
309
+ };
299
310
  /**
300
311
  * - The Icon component is used to display an Icon.
301
312
  * - Icons are semantic vector graphics that adds character and improves the visual appeal of elements when combined with.
@@ -304,4 +315,5 @@ export interface IconProps extends CommonProps {
304
315
  * @param {IconProps} props - The props for the Icon component
305
316
  * @returns {JSX.Element} Icon component
306
317
  */
307
- export declare const Icon: ({ name, size, className, dataTestId, color, onClick, fillColor, type, style, forwardedRef, }: IconProps) => JSX.Element | null;
318
+ export declare const Icon: ({ name, size, className, dataTestId, color, onClick, type, style, forwardedRef, }: IconProps) => JSX.Element | null;
319
+ export {};
@@ -1,10 +1,11 @@
1
+ import { MakePropertyOptional, MappedOmit } from "@trackunit/shared-utils";
1
2
  import { ReactNode } from "react";
2
3
  import { CommonProps } from "../../../common/CommonProps";
3
4
  import { IconProps } from "../../Icon/Icon";
4
5
  import { PopoverContentChildren, PopoverProps } from "../../Popover";
5
6
  import { IconButtonProps } from "../../buttons";
6
7
  export type MenuPlacement = "above" | "below";
7
- type FilteredIconProps = Omit<IconProps, "onClick" | "name"> & Pick<Partial<IconProps>, "name">;
8
+ type FilteredIconProps = MakePropertyOptional<MappedOmit<IconProps, "onClick">, "name">;
8
9
  type FilteredIconButtonProps = Omit<IconButtonProps, "icon" | "onClick">;
9
10
  export interface MoreMenuProps extends CommonProps {
10
11
  children: PopoverContentChildren;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export interface IPaginationProps {
2
+ export interface PaginationProps {
3
3
  /**
4
4
  * A go to previous page handler
5
5
  */
@@ -56,7 +56,7 @@ export interface IPaginationProps {
56
56
  /**
57
57
  * Pagination Description. It could be used when you need navigation for your paging feature.
58
58
 
59
- * @param {IPaginationProps} props - The props for the Pagination component
59
+ * @param {PaginationProps} props - The props for the Pagination component
60
60
  * @returns {JSX.Element} Pagination component
61
61
  */
62
- export declare const Pagination: ({ previousPage, nextPage, canPreviousPage, canNextPage, pageCount, pageIndex, loading, className, dataTestId, getTranslatedCount, onPageChange, cursorBase, }: IPaginationProps) => JSX.Element;
62
+ export declare const Pagination: ({ previousPage, nextPage, canPreviousPage, canNextPage, pageCount, pageIndex, loading, className, dataTestId, getTranslatedCount, onPageChange, cursorBase, }: PaginationProps) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { MakePropertyOptional, MappedOmit } from "@trackunit/shared-utils";
1
2
  import * as React from "react";
2
3
  import { CommonProps } from "../../common";
3
4
  import { IconProps } from "../Icon/Icon";
@@ -10,7 +11,7 @@ export interface TipProps extends CommonProps, Pick<TooltipProps, "placement" |
10
11
  /**
11
12
  * The props for setting the icon on this tip.
12
13
  */
13
- iconProps?: Partial<IconProps>;
14
+ iconProps?: MakePropertyOptional<MappedOmit<IconProps, "size" | "type">, "name">;
14
15
  /**
15
16
  * Shows an icon with link as the href attribute inside the tip.
16
17
  */
@@ -1,7 +1,7 @@
1
1
  import { LocalStorageCallbacks, LocalStorageParams } from "./types";
2
- type ValidateStateOptions<State> = Required<Pick<LocalStorageParams<State>, "schema">> & {
3
- state: State;
4
- defaultState: State;
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: <T>(value: T, delay?: number, direction?: DebounceDirection) => T;
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: <T>(initialState: T, customState?: [T, Dispatch<SetStateAction<T>>] | undefined) => [T, Dispatch<SetStateAction<T>>];
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: <T>(initialState: T) => import("react").MutableRefObject<T>;
7
+ export declare const useSelfUpdatingRef: <TState>(initialState: TState) => import("react").MutableRefObject<TState>;