@tracktor/design-system 4.17.1 → 4.18.4

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.
@@ -1,5 +1,5 @@
1
1
  import { ChipProps } from '@mui/material';
2
- import { MouseEvent, ReactElement } from 'react';
2
+ import { MouseEvent, ReactElement, ReactNode } from 'react';
3
3
  export type KanbanChipFormat = {
4
4
  color: ChipProps["color"];
5
5
  variant?: ChipProps["variant"];
@@ -23,7 +23,7 @@ export interface EmptyStateProps {
23
23
  * Props for each subtitle item in a Kanban card.
24
24
  */
25
25
  export interface SubtitleDataItemProps {
26
- text: string;
26
+ text: ReactNode;
27
27
  LeftIcon?: ReactElement;
28
28
  onClick?: (event: MouseEvent<HTMLElement>) => void;
29
29
  }
@@ -0,0 +1,17 @@
1
+ import { ChipProps } from '@mui/material';
2
+ import { ReactElement } from 'react';
3
+ import { defaultKanbanChip, HeaderColumnChip } from '../Kanban';
4
+ interface ChipStatusProps {
5
+ status?: keyof typeof defaultKanbanChip | keyof HeaderColumnChip | string;
6
+ size?: ChipProps["size"];
7
+ variant?: ChipProps["variant"];
8
+ lineThrough?: boolean;
9
+ dot?: boolean;
10
+ label?: string;
11
+ sx?: ChipProps["sx"];
12
+ deleteIcon?: ReactElement;
13
+ disabled?: boolean;
14
+ headerColumnChip?: HeaderColumnChip;
15
+ }
16
+ declare const ChipStatusKanban: ({ label, status, sx, deleteIcon, lineThrough, disabled, headerColumnChip, dot, variant, size, }: ChipStatusProps) => import("@emotion/react/jsx-runtime").JSX.Element;
17
+ export default ChipStatusKanban;
@@ -0,0 +1,5 @@
1
+ import { KanbanProps } from '../Kanban';
2
+ declare const EmptyStateOverlay: ({ emptyState }: {
3
+ emptyState?: KanbanProps["emptyState"];
4
+ }) => import("@emotion/react/jsx-runtime").JSX.Element;
5
+ export default EmptyStateOverlay;
@@ -0,0 +1,3 @@
1
+ import { KanbanDataItemProps } from '../Kanban';
2
+ declare const computeKanbanCardHeight: (item: KanbanDataItemProps) => number;
3
+ export default computeKanbanCardHeight;
@@ -0,0 +1,14 @@
1
+ export declare const HEIGHT_LINE_BODY3 = 18;
2
+ export declare const HEADER_HEIGHT = 25;
3
+ export declare const IMG_SIZE = 40;
4
+ type BaseHeightKey = "header-subtitles" | "header-only" | "footer-subtitles" | "footer-only" | "subtitles-only" | "default";
5
+ type FooterHeightKey = "header-subtitles" | "header-only" | "rightFooter" | "default";
6
+ export declare const BASE_HEIGHT_CONFIG: Record<BaseHeightKey, number>;
7
+ export declare const FOOTER_HEIGHT_CONFIG: Record<FooterHeightKey, number>;
8
+ export declare const getConfig: (hasHeader: boolean, hasSubtitles: boolean, hasFooter: boolean, hasRightFooter: boolean, subtitleLength?: number) => {
9
+ baseHeight: number;
10
+ footerHeight: number;
11
+ headerHeight: number;
12
+ subtitlesHeight: number;
13
+ };
14
+ export {};
@@ -0,0 +1,8 @@
1
+ import { MouseEvent, RefObject } from 'react';
2
+ declare const useDragScroll: (ref: RefObject<HTMLDivElement | null>) => {
3
+ isDragging: boolean;
4
+ onMouseDown: (e: MouseEvent<HTMLElement>) => void;
5
+ onMouseMove: (e: MouseEvent<HTMLElement>) => void;
6
+ onMouseUp: () => void;
7
+ };
8
+ export default useDragScroll;
@@ -51,7 +51,7 @@ export interface TimeLineItem {
51
51
  /**
52
52
  * Subtitle of the event.
53
53
  */
54
- subtitle?: string;
54
+ subtitle?: ReactNode;
55
55
  /**
56
56
  * If true, the event will be displayed as active.
57
57
  */
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tracktor/design-system",
3
3
  "description": "Tracktor Design System",
4
4
  "sideEffects": false,
5
- "version": "4.17.1",
5
+ "version": "4.18.4",
6
6
  "license": "ISC",
7
7
  "type": "module",
8
8
  "types": "./dist/src/main.d.ts",
@@ -37,12 +37,12 @@
37
37
  "build": "tsc && vite build",
38
38
  "build-storybook": "storybook build",
39
39
  "build-storybook-docs": "storybook build --docs",
40
- "lint": "biome check --diagnostic-level=error . && tsc --noEmit --incremental",
41
- "lint:fix": "biome check . --write",
42
- "prepare": "yarn run build && husky install",
43
- "preview": "vite preview",
40
+ "lint": "bun x biome check --diagnostic-level=error . && tsc --noEmit --incremental",
41
+ "lint:fix": "bun x biome check . --write",
42
+ "prepare": "bun run build && husky install",
43
+ "preview": "bun x vite preview",
44
44
  "storybook": "storybook dev -p 6006",
45
- "test": "yarn lint && vitest",
45
+ "test": "bun run lint && vitest",
46
46
  "test-ui": "vitest --ui",
47
47
  "test-visual": "chromatic --project-token=c9bbc986d0d6 --exit-zero-on-changes"
48
48
  },
package/CHANGELOG.md DELETED
@@ -1,9 +0,0 @@
1
- # [Releases](https://github.com/Tracktor/design-system/releases)
2
-
3
- ## v4.17.1
4
-
5
- ### Fix
6
- #### Change ESLint Config for Biome config
7
- - Update ESLint Config to be compatible with Biome
8
- - Add Biome Config file
9
- - Fix lint issues after switching to Biome
@@ -1,10 +0,0 @@
1
- import { MouseEvent, RefObject } from 'react';
2
- import { KanbanDataItemProps } from './Kanban';
3
- export declare const IMG_SIZE = 40;
4
- export declare const computeKanbanCardHeight: (item: KanbanDataItemProps) => number;
5
- export declare const useDragScroll: (ref: RefObject<HTMLDivElement | null>) => {
6
- isDragging: boolean;
7
- onMouseDown: (e: MouseEvent<HTMLElement>) => void;
8
- onMouseMove: (e: MouseEvent<HTMLElement>) => void;
9
- onMouseUp: () => void;
10
- };