@trackunit/react-components 0.0.1-alpha-59a0a75488.0
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/README.md +22 -0
- package/common/CommonProps.d.ts +12 -0
- package/common/LegacyComponentStory.d.ts +7 -0
- package/common/StorybookProps.d.ts +6 -0
- package/common/index.d.ts +3 -0
- package/common/useContainerProps.d.ts +16 -0
- package/components/ActionButton/ActionButton.d.ts +30 -0
- package/components/ActionButton/index.d.ts +1 -0
- package/components/Alert/Alert.d.ts +53 -0
- package/components/Alert/index.d.ts +1 -0
- package/components/Badge/Badge.d.ts +47 -0
- package/components/Badge/index.d.ts +1 -0
- package/components/BaseInput/BaseInput.d.ts +62 -0
- package/components/BaseInput/index.d.ts +1 -0
- package/components/Card/Card.d.ts +45 -0
- package/components/Card/CardBody.d.ts +32 -0
- package/components/Card/CardFooter.d.ts +21 -0
- package/components/Card/CardHeader.d.ts +43 -0
- package/components/Card/DensityContainer.d.ts +30 -0
- package/components/Card/index.d.ts +5 -0
- package/components/Chart/Chart.d.ts +81 -0
- package/components/Chart/index.d.ts +1 -0
- package/components/Checkbox/CheckIcon.d.ts +12 -0
- package/components/Checkbox/Checkbox.d.ts +40 -0
- package/components/Checkbox/IndeterminateIcon.d.ts +10 -0
- package/components/Checkbox/index.d.ts +1 -0
- package/components/Collapse/Collapse.d.ts +28 -0
- package/components/Collapse/index.d.ts +1 -0
- package/components/CopyableText/CopyableText.d.ts +21 -0
- package/components/CopyableText/index.d.ts +1 -0
- package/components/DateField/DateField.d.ts +19 -0
- package/components/DateInput/DateInput.d.ts +28 -0
- package/components/DayPicker/DayPicker.d.ts +28 -0
- package/components/DayPicker/DayPickerPopover.d.ts +23 -0
- package/components/DayPicker/DayRangePicker.d.ts +18 -0
- package/components/DayPicker/index.d.ts +21 -0
- package/components/DayPicker/useLocale.d.ts +8 -0
- package/components/EmailInput/EmailInput.d.ts +20 -0
- package/components/FormGroup/FormGroup.d.ts +38 -0
- package/components/Heading/Heading.d.ts +28 -0
- package/components/Heading/index.d.ts +1 -0
- package/components/Icon/Icon.d.ts +51 -0
- package/components/Indicator/Indicator.d.ts +42 -0
- package/components/Indicator/index.d.ts +1 -0
- package/components/Label/Label.d.ts +34 -0
- package/components/Label/index.d.ts +1 -0
- package/components/LegendItem/LegendItem.d.ts +17 -0
- package/components/LegendItem/index.d.ts +1 -0
- package/components/Menu/MenuItem.d.ts +58 -0
- package/components/Menu/MenuList.d.ts +34 -0
- package/components/Menu/index.d.ts +2 -0
- package/components/Modal/Modal.d.ts +32 -0
- package/components/Modal/ModalBackdrop.d.ts +13 -0
- package/components/Modal/index.d.ts +3 -0
- package/components/Modal/useModal.d.ts +21 -0
- package/components/NumberField/NumberField.d.ts +19 -0
- package/components/NumberInput/NumberInput.d.ts +12 -0
- package/components/PageHeader/PageHeader.d.ts +47 -0
- package/components/PageHeader/index.d.ts +1 -0
- package/components/Pagination/Pagination.d.ts +71 -0
- package/components/PhoneInput/PhoneInput.d.ts +20 -0
- package/components/Popover/AnimatedPopover.d.ts +43 -0
- package/components/Popover/PopoverList.d.ts +12 -0
- package/components/Popover/PopoverListItem.d.ts +30 -0
- package/components/Popover/PopoverTitle.d.ts +20 -0
- package/components/Popover/index.d.ts +5 -0
- package/components/Popover/usePopover.d.ts +42 -0
- package/components/Prompt/Prompt.d.ts +20 -0
- package/components/Prompt/index.d.ts +1 -0
- package/components/RadioGroup/RadioGroup.d.ts +57 -0
- package/components/RadioGroup/RadioGroupContext.d.ts +11 -0
- package/components/RadioGroup/RadioItem.d.ts +24 -0
- package/components/RadioGroup/index.d.ts +2 -0
- package/components/SectionHeader/SectionHeader.d.ts +24 -0
- package/components/SectionHeader/index.d.ts +1 -0
- package/components/Select/CreatableSelect.d.ts +38 -0
- package/components/Select/FieldContainer.d.ts +20 -0
- package/components/Select/Select.d.ts +18 -0
- package/components/Select/SelectMenuItem/SelectMenuItem.d.ts +49 -0
- package/components/Select/TagWithWidth.d.ts +17 -0
- package/components/Select/TagsContainer.d.ts +45 -0
- package/components/Select/index.d.ts +7 -0
- package/components/Select/shared.d.ts +15 -0
- package/components/Select/useCustomComponents.d.ts +19 -0
- package/components/Select/useCustomStyles.d.ts +14 -0
- package/components/Select/useSelect.d.ts +143 -0
- package/components/SkeletonLines/SkeletonLines.d.ts +25 -0
- package/components/SkeletonLines/index.d.ts +1 -0
- package/components/Spacer/Spacer.d.ts +20 -0
- package/components/Spacer/index.d.ts +1 -0
- package/components/Spinner/Spinner.d.ts +37 -0
- package/components/Spinner/index.d.ts +1 -0
- package/components/Tag/Tag.d.ts +39 -0
- package/components/Tag/index.d.ts +1 -0
- package/components/Text/Text.d.ts +58 -0
- package/components/Text/index.d.ts +1 -0
- package/components/TextArea/TextArea.d.ts +30 -0
- package/components/TextArea/index.d.ts +1 -0
- package/components/TextAreaField/TextAreaField.d.ts +19 -0
- package/components/TextAreaField/index.d.ts +1 -0
- package/components/TextField/TextField.d.ts +24 -0
- package/components/TextField/TextLenghtIndicator.d.ts +19 -0
- package/components/TextField/index.d.ts +1 -0
- package/components/TextInput/TextInput.d.ts +12 -0
- package/components/Timeline/Timeline.d.ts +30 -0
- package/components/Tip/Tip.d.ts +34 -0
- package/components/Tip/index.d.ts +1 -0
- package/components/Toggle/Toggle.d.ts +57 -0
- package/components/Toggle/index.d.ts +1 -0
- package/components/Tooltip/Tooltip.d.ts +48 -0
- package/components/Tooltip/index.d.ts +1 -0
- package/components/ValueBar/ValueBar.d.ts +44 -0
- package/components/ValueBar/ValueBarHelper.d.ts +35 -0
- package/components/ValueBar/ValueBarTypes.d.ts +9 -0
- package/components/ValueBar/index.d.ts +3 -0
- package/components/buttons/Button/Button.d.ts +48 -0
- package/components/buttons/IconButton/IconButton.d.ts +25 -0
- package/components/buttons/StarButton/StarButton.d.ts +13 -0
- package/components/buttons/index.d.ts +4 -0
- package/components/buttons/shared/ButtonProps.d.ts +40 -0
- package/components/buttons/shared/helpers.d.ts +20 -0
- package/components/index.d.ts +44 -0
- package/components/theme/DefaultTheme.d.ts +2 -0
- package/components/theme/index.d.ts +1 -0
- package/hooks/index.d.ts +3 -0
- package/hooks/useDebounce.d.ts +8 -0
- package/hooks/useLocalStorage.d.ts +9 -0
- package/hooks/useTimeout.d.ts +15 -0
- package/index.css +488 -0
- package/index.d.ts +4 -0
- package/index.js +5553 -0
- package/layout/helper/MinTopFullContentLayout.d.ts +18 -0
- package/layout/index.d.ts +7 -0
- package/layout/responsive/FilterListMapLayout.d.ts +22 -0
- package/layout/responsive/FullWidthRepeatingLayout.d.ts +19 -0
- package/layout/responsive/GridArea.d.ts +13 -0
- package/layout/responsive/IntrinsicallyResponsiveGrid.d.ts +30 -0
- package/layout/responsive/TitleNavContentLayout.d.ts +12 -0
- package/layout/responsive/TwoColumnLayout.d.ts +12 -0
- package/package.json +31 -0
- package/test-config/jest.setup.d.ts +1 -0
- package/test-utils/hooks.d.ts +4 -0
- package/test-utils/test-utils.d.ts +5 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
/**
|
|
4
|
+
* Pass two children. The first will be min-content and the second full height
|
|
5
|
+
* Useful when toy want the second child to have 100% height and be scrollable
|
|
6
|
+
* Example: FilterBar + Fleet List
|
|
7
|
+
*/
|
|
8
|
+
interface MinTopFullContentLayoutProps extends CommonProps {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The MinTopFullContentLayout component.
|
|
13
|
+
*
|
|
14
|
+
* @param {MinTopFullContentLayoutProps} props - The props for the MinTopFullContentLayout component
|
|
15
|
+
* @returns {JSX.Element} MinTopFullContentLayout component
|
|
16
|
+
*/
|
|
17
|
+
export declare const MinTopFullContentLayout: ({ children, className, dataTestId }: MinTopFullContentLayoutProps) => JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./helper/MinTopFullContentLayout";
|
|
2
|
+
export * from "./responsive/FilterListMapLayout";
|
|
3
|
+
export * from "./responsive/FullWidthRepeatingLayout";
|
|
4
|
+
export * from "./responsive/GridArea";
|
|
5
|
+
export * from "./responsive/IntrinsicallyResponsiveGrid";
|
|
6
|
+
export * from "./responsive/TitleNavContentLayout";
|
|
7
|
+
export * from "./responsive/TwoColumnLayout";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface FilterListMapLayoutProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Responsive layout component setting up three grid areas
|
|
7
|
+
* one for filtering, (result-)list and (result-map)
|
|
8
|
+
*
|
|
9
|
+
* List needs to handle its own min size - and map takes up the rest.
|
|
10
|
+
*
|
|
11
|
+
* Will be inlined to
|
|
12
|
+
* - filter
|
|
13
|
+
* - list
|
|
14
|
+
* - map
|
|
15
|
+
* on screens < mediaQuery.xxl
|
|
16
|
+
*
|
|
17
|
+
*
|
|
18
|
+
* @param {FilterListMapLayoutProps} props - The props for the FilterListMapLayout component
|
|
19
|
+
* @returns {JSX.Element} FilterListMapLayout component
|
|
20
|
+
*/
|
|
21
|
+
export declare const FilterListMapLayout: ({ children }: FilterListMapLayoutProps) => JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type RowSizing = "Equal" | "MinContent" | "Unmanaged";
|
|
3
|
+
interface FullWidthRepeatingLayoutProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
rowSizing?: RowSizing;
|
|
6
|
+
rowMinHeight?: number;
|
|
7
|
+
dataTestId?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Layout component with repeating full width areas, default one height fraction each but option to use content height instead
|
|
12
|
+
* Row min height can optionally be set here or managed by children
|
|
13
|
+
* Scrolling happens if/when children's a min-height is reached
|
|
14
|
+
*
|
|
15
|
+
* @param {FullWidthRepeatingLayoutProps} props - The props for the FullWidthRepeatingLayout component
|
|
16
|
+
* @returns {JSX.Element} FullWidthRepeatingLayout component
|
|
17
|
+
*/
|
|
18
|
+
export declare const FullWidthRepeatingLayout: ({ children, rowSizing, rowMinHeight, dataTestId, className, }: FullWidthRepeatingLayoutProps) => JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
export interface GridAreaProps extends CommonProps {
|
|
4
|
+
area: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Simply applies a Grid Area to the element
|
|
9
|
+
*
|
|
10
|
+
* @param {GridAreaProps} props - The props for the GridArea component
|
|
11
|
+
* @returns {JSX.Element} GridArea component
|
|
12
|
+
*/
|
|
13
|
+
export declare const GridArea: ({ area, dataTestId, className, children }: GridAreaProps) => JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
declare type ColumnWidth = "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
|
+
declare type Space = "inherit" | "auto" | "none" | "tiny" | "mini" | "small" | "medium" | "large" | "giant" | "enormous";
|
|
5
|
+
declare type Occupation = "auto-fill" | "auto-fit";
|
|
6
|
+
interface IntrinsicallyResponsiveGridProps extends CommonProps {
|
|
7
|
+
/**
|
|
8
|
+
* The children to be laid out
|
|
9
|
+
*/
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Default "auto-fill" stretch a little, till there's room for another column.
|
|
13
|
+
* Optionally set "auto-fit" to stretch children to fit entire container width,
|
|
14
|
+
*/
|
|
15
|
+
occupation?: Occupation;
|
|
16
|
+
minColumnWidth?: ColumnWidth;
|
|
17
|
+
/**
|
|
18
|
+
* The gap size between children
|
|
19
|
+
*/
|
|
20
|
+
gap?: Space;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A grid container that has a flexible number of columns.
|
|
24
|
+
* Adds more columns if constraints allow it, otherwise wraps to next row
|
|
25
|
+
*
|
|
26
|
+
* @param {IntrinsicallyResponsiveGridProps} props - The props for the IntrinsicallyResponsiveGrid component
|
|
27
|
+
* @returns {JSX.Element} IntrinsicallyResponsiveGrid component
|
|
28
|
+
*/
|
|
29
|
+
export declare const IntrinsicallyResponsiveGrid: ({ children, occupation, minColumnWidth, gap, dataTestId, className, }: IntrinsicallyResponsiveGridProps) => JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface TitleNavContentLayoutProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The TitleNavContentLayout.
|
|
7
|
+
*
|
|
8
|
+
* @param {TitleNavContentLayoutProps} props - The props for the TitleNavContentLayout component
|
|
9
|
+
* @returns {JSX.Element} TitleNavContentLayout component
|
|
10
|
+
*/
|
|
11
|
+
export declare const TitleNavContentLayout: ({ children }: TitleNavContentLayoutProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface TwoColumnLayoutProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* TwoColumnLayout.
|
|
7
|
+
*
|
|
8
|
+
* @param {TwoColumnLayoutProps} props - The props for the TwoColumnLayout component
|
|
9
|
+
* @returns {JSX.Element} TwoColumnLayout component
|
|
10
|
+
*/
|
|
11
|
+
export declare const TwoColumnLayout: ({ children }: TwoColumnLayoutProps) => JSX.Element;
|
|
12
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@trackunit/react-components",
|
|
3
|
+
"version": "0.0.1-alpha-59a0a75488.0",
|
|
4
|
+
"repository": "https://github.com/Trackunit/manager",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@trackunit/css-core": "0.0.1-alpha-59a0a75488.0",
|
|
8
|
+
"@trackunit/tailwind-styled-components": "0.0.46",
|
|
9
|
+
"react": "17.0.2",
|
|
10
|
+
"@trackunit/ui-design-tokens": "0.0.47",
|
|
11
|
+
"echarts-for-react": "^3.0.2",
|
|
12
|
+
"echarts": "^5.4.0",
|
|
13
|
+
"uuid": "^8.3.2",
|
|
14
|
+
"react-use": "^17.4.0",
|
|
15
|
+
"date-fns": "^2.29.3",
|
|
16
|
+
"react-day-picker": "^8.3.0",
|
|
17
|
+
"@trackunit/ui-icons": "0.0.49",
|
|
18
|
+
"react-useportal": "1.0.17",
|
|
19
|
+
"@react-spring/web": "9.5.4",
|
|
20
|
+
"react-router-dom": "6.4.1",
|
|
21
|
+
"@popperjs/core": "^2.11.6",
|
|
22
|
+
"react-helmet": "^6.1.0",
|
|
23
|
+
"react-select": "^5.4.0",
|
|
24
|
+
"jest-canvas-mock": "^2.4.0"
|
|
25
|
+
},
|
|
26
|
+
"module": "./index.js",
|
|
27
|
+
"main": "./index.js",
|
|
28
|
+
"type": "module",
|
|
29
|
+
"types": "./index.d.ts",
|
|
30
|
+
"peerDependencies": {}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RenderHookOptions } from "@testing-library/react-hooks";
|
|
2
|
+
declare const customRenderHook: <T, K>(callback: (props: T) => K, options?: RenderHookOptions<T> | undefined) => import("@testing-library/react-hooks").RenderHookResult<T, K, import("@testing-library/react-hooks").Renderer<T>>;
|
|
3
|
+
export * from "@testing-library/react-hooks";
|
|
4
|
+
export { customRenderHook as renderHook };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RenderOptions } from "@testing-library/react";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const customRender: (ui: React.ReactElement, options?: Omit<RenderOptions, "queries">) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
|
|
4
|
+
export * from "@testing-library/react";
|
|
5
|
+
export { customRender as render };
|