@trackunit/react-components 0.1.238 → 0.1.241

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.1.238",
3
+ "version": "0.1.241",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -19,9 +19,10 @@ export interface CollapseProps extends CommonProps {
19
19
  */
20
20
  label: React.ReactNode;
21
21
  /**
22
- * layout - The layout of the Collapse component. (full width is default)
22
+ * An addon to add to the header.
23
+ * This can be used for a status indicator or similar.
23
24
  */
24
- layout?: "fullwidth" | "compact";
25
+ headerAddon?: React.ReactNode;
25
26
  }
26
27
  /**
27
28
  * The Collapse component is used to condense non-important information.
@@ -29,4 +30,4 @@ export interface CollapseProps extends CommonProps {
29
30
  * @param {CollapseProps} props - The props for the Collapse component
30
31
  * @returns {JSX.Element} Collapse component
31
32
  */
32
- export declare const Collapse: ({ id, initialExpanded, onToggle, label, children, layout, className, dataTestId, }: CollapseProps) => JSX.Element;
33
+ export declare const Collapse: ({ id, initialExpanded, onToggle, label, children, className, headerAddon, dataTestId, }: CollapseProps) => JSX.Element;
@@ -1,10 +1,7 @@
1
1
  export declare const cvaCollapse: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
2
- export declare const cvaCollapseLabel: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
3
- export declare const cvaCollapseLabelContainer: (props?: ({
4
- layout?: "fullwidth" | "compact" | null | undefined;
2
+ export declare const cvaCollapseHeader: (props?: ({
3
+ expanded?: boolean | null | undefined;
5
4
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
5
+ export declare const cvaCollapseLabelContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
6
6
  export declare const cvaCollapsible: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
7
7
  export declare const cvaCollapseAnimated: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
8
- export declare const cvaCollapseIcon: (props?: ({
9
- expanded?: boolean | null | undefined;
10
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
1
  import { ActivityColors, CriticalityColors, GeneralColors, IntentColors, RentalStatusColors, SitesColors, UtilizationColors } from "@trackunit/ui-design-tokens";
3
2
  import { IconName } from "@trackunit/ui-icons";
3
+ import { CSSProperties } from "react";
4
4
  import { CommonProps, Size } from "../../common/CommonProps";
5
5
  export type IconColors = IntentColors | GeneralColors | CriticalityColors | ActivityColors | UtilizationColors | SitesColors | RentalStatusColors;
6
6
  export declare const iconPalette: {
@@ -205,7 +205,11 @@ export declare const iconPalette: {
205
205
  readonly 50: "239 246 255";
206
206
  readonly 100: "219 234 254";
207
207
  readonly 200: "191 219 254";
208
- readonly 300: "147 197 253";
208
+ readonly 300: "147 197 253"; /**
209
+ * Select if the icon should be rendered as solid or outline.
210
+ * Default value depends on the Size prop, mini == solid, medium == solid, large == outline.
211
+ * Trackunit icons might not support both outline and Solid.
212
+ */
209
213
  readonly 400: "96 165 250";
210
214
  readonly 500: "59 130 246";
211
215
  readonly 600: "37 99 235";
@@ -305,7 +309,7 @@ export type IconProps = DiscriminatedIconProps & CommonProps & {
305
309
  *
306
310
  * @memberof IconProps
307
311
  */
308
- style?: Record<string, string>;
312
+ style?: CSSProperties;
309
313
  };
310
314
  /**
311
315
  * - The Icon component is used to display an Icon.
@@ -315,5 +319,5 @@ export type IconProps = DiscriminatedIconProps & CommonProps & {
315
319
  * @param {IconProps} props - The props for the Icon component
316
320
  * @returns {JSX.Element} Icon component
317
321
  */
318
- export declare const Icon: ({ name, size, className, dataTestId, color, onClick, type, style, forwardedRef, }: IconProps) => JSX.Element | null;
322
+ export declare const Icon: ({ name, size, className, dataTestId, color, onClick, type, style, forwardedRef, }: IconProps) => JSX.Element;
319
323
  export {};
@@ -6,3 +6,5 @@ export declare const cvaPageHeaderHeading: (props?: import("class-variance-autho
6
6
  export declare const cvaPageHeaderHeadingContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
7
7
  export declare const cvaPageHeaderHeadingAccessoriesContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
8
8
  export declare const cvaPageHeaderChildContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
9
+ export declare const cvaPageHeaderDescriptionAndLinkContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
10
+ export declare const cvaPageHeaderLink: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
@@ -20,7 +20,5 @@ export interface SkeletonLinesProps extends CommonProps {
20
20
  }
21
21
  /**
22
22
  * Display placeholder lines before the data gets loaded to reduce load-time frustration.
23
-
24
23
  */
25
24
  export declare const SkeletonLines: import("react").MemoExoticComponent<({ margin, lines, height, width, className, dataTestId }: SkeletonLinesProps) => JSX.Element>;
26
- export default SkeletonLines;
@@ -7,7 +7,3 @@ export declare const cvaButton: (props?: ({
7
7
  disabled?: boolean | null | undefined;
8
8
  variant?: "transparent" | "filled" | null | undefined;
9
9
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
10
- export declare const cvaButtonSpinner: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
11
- export declare const cvaIconButtonContainer: (props?: ({
12
- size?: "small" | "medium" | "large" | null | undefined;
13
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;