@trackunit/react-components 0.0.36
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 +36 -0
- package/common/CommonProps.d.ts +17 -0
- package/common/StorybookProps.d.ts +6 -0
- package/common/index.d.ts +3 -0
- package/common/useContainerProps.d.ts +8 -0
- package/components/NumberField/NumberField.d.ts +15 -0
- package/components/NumberInput/NumberInput.d.ts +12 -0
- package/components/TextInput/TextInput.d.ts +12 -0
- package/components/alert/Alert.d.ts +69 -0
- package/components/alert/index.d.ts +1 -0
- package/components/badge/Badge.d.ts +74 -0
- package/components/badge/index.d.ts +1 -0
- package/components/baseInput/BaseInput.d.ts +82 -0
- package/components/baseInput/index.d.ts +1 -0
- package/components/buttons/button/Button.d.ts +55 -0
- package/components/buttons/icon-button/IconButton.d.ts +33 -0
- package/components/buttons/index.d.ts +4 -0
- package/components/buttons/shared/ButtonProps.d.ts +61 -0
- package/components/buttons/shared/helpers.d.ts +9 -0
- package/components/buttons/star-button/StarButton.d.ts +7 -0
- package/components/card/Card.d.ts +33 -0
- package/components/card/CardBody.d.ts +21 -0
- package/components/card/CardFooter.d.ts +16 -0
- package/components/card/CardHeader.d.ts +39 -0
- package/components/card/DensityContainer.d.ts +36 -0
- package/components/card/index.d.ts +5 -0
- package/components/chart/Chart.d.ts +105 -0
- package/components/chart/index.d.ts +1 -0
- package/components/checkbox/CheckIcon.d.ts +4 -0
- package/components/checkbox/Checkbox.d.ts +53 -0
- package/components/checkbox/IndeterminateIcon.d.ts +4 -0
- package/components/checkbox/index.d.ts +1 -0
- package/components/collapse/Collapse.d.ts +33 -0
- package/components/collapse/index.d.ts +1 -0
- package/components/copyableText/CopyableText.d.ts +8 -0
- package/components/copyableText/index.d.ts +1 -0
- package/components/dateField/DateField.d.ts +46 -0
- package/components/dateField/index.d.ts +1 -0
- package/components/dayPicker/DayPicker.d.ts +9 -0
- package/components/dayPicker/DayPickerPopover.d.ts +16 -0
- package/components/dayPicker/DayRangePicker.d.ts +11 -0
- package/components/dayPicker/index.d.ts +21 -0
- package/components/dayPicker/useLocale.d.ts +2 -0
- package/components/drawer/Drawer.d.ts +32 -0
- package/components/drawer/index.d.ts +1 -0
- package/components/formGroup/FormGroup.d.ts +42 -0
- package/components/heading/Heading.d.ts +34 -0
- package/components/heading/index.d.ts +1 -0
- package/components/icon/Icon.d.ts +49 -0
- package/components/index.d.ts +37 -0
- package/components/indicator/Indicator.d.ts +34 -0
- package/components/indicator/index.d.ts +1 -0
- package/components/label/Label.d.ts +33 -0
- package/components/label/index.d.ts +1 -0
- package/components/legendItem/LegendItem.d.ts +11 -0
- package/components/legendItem/index.d.ts +1 -0
- package/components/menu/MenuButton.d.ts +7 -0
- package/components/menu/MenuItem.d.ts +9 -0
- package/components/menu/MenuList.d.ts +11 -0
- package/components/menu/index.d.ts +3 -0
- package/components/modal/Modal.d.ts +42 -0
- package/components/modal/ModalBackdrop.d.ts +7 -0
- package/components/modal/index.d.ts +3 -0
- package/components/modal/useModal.d.ts +15 -0
- package/components/multiRowTableCell/MultiRowTableCell.d.ts +30 -0
- package/components/multiRowTableCell/index.d.ts +1 -0
- package/components/pageHeading/PageHeading.d.ts +9 -0
- package/components/pageHeading/index.d.ts +1 -0
- package/components/popover/AnimatedPopover.d.ts +15 -0
- package/components/popover/PopoverList.d.ts +6 -0
- package/components/popover/PopoverListItem.d.ts +16 -0
- package/components/popover/PopoverTitle.d.ts +8 -0
- package/components/popover/index.d.ts +5 -0
- package/components/popover/usePopover.d.ts +24 -0
- package/components/prompt/Prompt.d.ts +10 -0
- package/components/prompt/index.d.ts +1 -0
- package/components/radioGroup/RadioGroup.d.ts +14 -0
- package/components/radioGroup/RadioGroupContext.d.ts +10 -0
- package/components/radioGroup/RadioItem.d.ts +8 -0
- package/components/radioGroup/index.d.ts +2 -0
- package/components/select/CreatableSelect.d.ts +4 -0
- package/components/select/FieldContainer.d.ts +14 -0
- package/components/select/Select.d.ts +4 -0
- package/components/select/index.d.ts +3 -0
- package/components/select/shared.d.ts +83 -0
- package/components/skeletonLines/SkeletonLines.d.ts +41 -0
- package/components/skeletonLines/index.d.ts +1 -0
- package/components/spacer/Spacer.d.ts +21 -0
- package/components/spacer/index.d.ts +1 -0
- package/components/spinner/Spinner.d.ts +24 -0
- package/components/spinner/index.d.ts +1 -0
- package/components/text/Text.d.ts +79 -0
- package/components/text/index.d.ts +1 -0
- package/components/textArea/TextArea.d.ts +25 -0
- package/components/textArea/index.d.ts +1 -0
- package/components/textField/TextField.d.ts +23 -0
- package/components/textField/TextLenghtIndicator.d.ts +6 -0
- package/components/textField/index.d.ts +1 -0
- package/components/theme/DefaultTheme.d.ts +2 -0
- package/components/theme/index.d.ts +1 -0
- package/components/tip/Tip.d.ts +13 -0
- package/components/tip/index.d.ts +1 -0
- package/components/toggle/Toggle.d.ts +15 -0
- package/components/toggle/index.d.ts +1 -0
- package/components/tooltip/Tooltip.d.ts +69 -0
- package/components/tooltip/index.d.ts +1 -0
- package/constants/colors.d.ts +65 -0
- package/constants/index.d.ts +1 -0
- package/hooks/index.d.ts +3 -0
- package/hooks/useDebounce.d.ts +1 -0
- package/hooks/useLocalStorage.d.ts +2 -0
- package/hooks/useTimeout.d.ts +9 -0
- package/index.d.ts +5 -0
- package/index.js +3829 -0
- package/layout/helper/MinTopFullContentLayout.d.ts +12 -0
- package/layout/index.d.ts +7 -0
- package/layout/responsive/FilterListMapLayout.d.ts +19 -0
- package/layout/responsive/FullWidthRepeatingLayout.d.ts +16 -0
- package/layout/responsive/GridArea.d.ts +12 -0
- package/layout/responsive/IntrinsicallyResponsiveGrid.d.ts +26 -0
- package/layout/responsive/TitleNavContentLayout.d.ts +6 -0
- package/layout/responsive/TwoColumnLayout.d.ts +6 -0
- package/package.json +32 -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,12 @@
|
|
|
1
|
+
/// <reference types="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 IMinTopFullContentLayoutProps extends CommonProps {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const MinTopFullContentLayout: ({ children, className, dataTestId }: IMinTopFullContentLayoutProps) => JSX.Element;
|
|
12
|
+
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,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Responsive layout component setting up three grid areas
|
|
4
|
+
* one for filtering, (result-)list and (result-map)
|
|
5
|
+
*
|
|
6
|
+
* List needs to handle its own min size - and map takes up the rest.
|
|
7
|
+
*
|
|
8
|
+
* Will be inlined to
|
|
9
|
+
* - filter
|
|
10
|
+
* - list
|
|
11
|
+
* - map
|
|
12
|
+
* on screens < mediaQuery.xxl
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
interface IProps {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare const FilterListMapLayout: ({ children }: IProps) => JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Layout component with repeating full width areas, default one height fraction each but option to use content height instead
|
|
4
|
+
* Row min height can optionally be set here or managed by children
|
|
5
|
+
* Scrolling happens if/when children's a min-height is reached
|
|
6
|
+
*/
|
|
7
|
+
declare type RowSizing = "Equal" | "MinContent" | "Unmanaged";
|
|
8
|
+
interface IFullWidthRepeatingLayoutProps {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
rowSizing?: RowSizing;
|
|
11
|
+
rowMinHeight?: number;
|
|
12
|
+
dataTestId?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const FullWidthRepeatingLayout: ({ children, rowSizing, rowMinHeight, dataTestId, className, }: IFullWidthRepeatingLayoutProps) => JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
interface GridAreaProps extends CommonProps {
|
|
4
|
+
area: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Simply applies a Grid Area to the element
|
|
9
|
+
* @param {string} area
|
|
10
|
+
*/
|
|
11
|
+
export declare const GridArea: ({ area, dataTestId, className, children }: GridAreaProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
declare type ColumnWidth = "slim" | "narrow" | "normal" | "wide";
|
|
4
|
+
declare type Space = "inherit" | "auto" | "none" | "tiny" | "mini" | "small" | "medium" | "large" | "giant" | "enormous";
|
|
5
|
+
declare type Occupation = "auto-fill" | "auto-fit";
|
|
6
|
+
interface IIntrinsicallyResponsiveGridProps extends CommonProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
occupation?: Occupation;
|
|
9
|
+
minColumnWidth?: ColumnWidth;
|
|
10
|
+
gap?: Space;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A grid container that has a flexible number of columns.
|
|
14
|
+
* Adds more columns if constraints allow it, otherwise wraps to next row
|
|
15
|
+
*
|
|
16
|
+
* @component
|
|
17
|
+
* @prop children - the children to be laid out,
|
|
18
|
+
* @prop occupation = "auto-fill" - stretch a little, till there's room for another column. Optionally set "auto-fit" to stretch children to fit entire container width,
|
|
19
|
+
* @prop minColumnWidth = "normal" - "small" | "normal" | "large"
|
|
20
|
+
* @prop gap = "auto" - the gap size between children,
|
|
21
|
+
* @prop dataTestId,
|
|
22
|
+
* @prop className ,
|
|
23
|
+
|
|
24
|
+
*/
|
|
25
|
+
export declare const IntrinsicallyResponsiveGrid: ({ children, occupation, minColumnWidth, gap, dataTestId, className, }: IIntrinsicallyResponsiveGridProps) => JSX.Element;
|
|
26
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@trackunit/react-components",
|
|
3
|
+
"version": "0.0.36",
|
|
4
|
+
"repository": "https://github.com/Trackunit/manager",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@trackunit/css-core": "0.0.31",
|
|
8
|
+
"@trackunit/ui-design-tokens": "0.0.31",
|
|
9
|
+
"@trackunit/ui-icons": "0.0.31",
|
|
10
|
+
"@trackunit/tailwind-styled-components": "0.0.31",
|
|
11
|
+
"echarts": "^5.3.2",
|
|
12
|
+
"react": "17.0.1",
|
|
13
|
+
"echarts-for-react": "^3.0.2",
|
|
14
|
+
"uuid": "^8.3.2",
|
|
15
|
+
"@react-spring/web": "^9.4.4",
|
|
16
|
+
"react-use": "^17.3.2",
|
|
17
|
+
"react-day-picker": "^8.0.3",
|
|
18
|
+
"date-fns": "^2.28.0",
|
|
19
|
+
"react-useportal": "^1.0.16",
|
|
20
|
+
"react-helmet": "^6.1.0",
|
|
21
|
+
"@popperjs/core": "^2.11.4",
|
|
22
|
+
"history": "^5.3.0",
|
|
23
|
+
"react-router-dom": "^6.2.2",
|
|
24
|
+
"react-select": "^5.2.2",
|
|
25
|
+
"faker": "^5.5.3"
|
|
26
|
+
},
|
|
27
|
+
"module": "./index.js",
|
|
28
|
+
"main": "./index.js",
|
|
29
|
+
"type": "module",
|
|
30
|
+
"types": "./index.d.ts",
|
|
31
|
+
"peerDependencies": {}
|
|
32
|
+
}
|
|
@@ -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 };
|