@trackunit/react-components 0.0.53 → 0.0.56
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/common/CommonProps.d.ts +0 -4
- package/common/useContainerProps.d.ts +4 -4
- package/components/{alert → Alert}/Alert.d.ts +0 -16
- package/components/{alert → Alert}/index.d.ts +0 -0
- package/components/{badge → Badge}/Badge.d.ts +3 -31
- package/components/{badge → Badge}/index.d.ts +0 -0
- package/components/{baseInput → BaseInput}/BaseInput.d.ts +0 -16
- package/components/{baseInput → BaseInput}/index.d.ts +0 -0
- package/components/{card → Card}/Card.d.ts +0 -4
- package/components/{card → Card}/CardBody.d.ts +0 -0
- package/components/{card → Card}/CardFooter.d.ts +0 -0
- package/components/{card → Card}/CardHeader.d.ts +1 -1
- package/components/{card → Card}/DensityContainer.d.ts +0 -6
- package/components/{card → Card}/index.d.ts +0 -0
- package/components/{chart → Chart}/Chart.d.ts +3 -31
- package/components/{chart → Chart}/index.d.ts +0 -0
- package/components/{checkbox → Checkbox}/CheckIcon.d.ts +0 -0
- package/components/{checkbox → Checkbox}/Checkbox.d.ts +0 -12
- package/components/{checkbox → Checkbox}/IndeterminateIcon.d.ts +0 -0
- package/components/{checkbox → Checkbox}/index.d.ts +0 -0
- package/components/{collapse → Collapse}/Collapse.d.ts +0 -8
- package/components/{collapse → Collapse}/index.d.ts +0 -0
- package/components/{copyableText → CopyableText}/CopyableText.d.ts +0 -6
- package/components/{copyableText → CopyableText}/index.d.ts +0 -0
- package/components/{dateField → DateField}/DateField.d.ts +1 -13
- package/components/{dateField → DateField}/index.d.ts +0 -0
- package/components/{dayPicker → DayPicker}/DayPicker.d.ts +0 -0
- package/components/{dayPicker → DayPicker}/DayPickerPopover.d.ts +1 -1
- package/components/{dayPicker → DayPicker}/DayRangePicker.d.ts +0 -0
- package/components/{dayPicker → DayPicker}/index.d.ts +0 -0
- package/components/{dayPicker → DayPicker}/useLocale.d.ts +0 -0
- package/components/{formGroup → FormGroup}/FormGroup.d.ts +0 -10
- package/components/{heading → Heading}/Heading.d.ts +0 -8
- package/components/{heading → Heading}/index.d.ts +0 -0
- package/components/{icon → Icon}/Icon.d.ts +7 -9
- package/components/{indicator → Indicator}/Indicator.d.ts +0 -0
- package/components/{indicator → Indicator}/index.d.ts +0 -0
- package/components/{label → Label}/Label.d.ts +0 -8
- package/components/{label → Label}/index.d.ts +0 -0
- package/components/{legendItem → LegendItem}/LegendItem.d.ts +0 -0
- package/components/{legendItem → LegendItem}/index.d.ts +0 -0
- package/components/{menu → Menu}/MenuButton.d.ts +0 -0
- package/components/{menu → Menu}/MenuItem.d.ts +3 -13
- package/components/{menu → Menu}/MenuList.d.ts +6 -12
- package/components/{menu → Menu}/index.d.ts +0 -0
- package/components/{modal → Modal}/Modal.d.ts +0 -10
- package/components/{modal → Modal}/ModalBackdrop.d.ts +0 -0
- package/components/{modal → Modal}/index.d.ts +0 -0
- package/components/{modal → Modal}/useModal.d.ts +0 -0
- package/components/{multiRowTableCell → MultiRowTableCell}/MultiRowTableCell.d.ts +3 -9
- package/components/{multiRowTableCell → MultiRowTableCell}/index.d.ts +0 -0
- package/components/NumberField/NumberField.d.ts +1 -3
- package/components/NumberInput/NumberInput.d.ts +1 -1
- package/components/{pageHeading → PageHeading}/PageHeading.d.ts +0 -6
- package/components/{pageHeading → PageHeading}/index.d.ts +0 -0
- package/components/{popover → Popover}/AnimatedPopover.d.ts +0 -0
- package/components/{popover → Popover}/PopoverList.d.ts +0 -0
- package/components/{popover → Popover}/PopoverListItem.d.ts +0 -0
- package/components/{popover → Popover}/PopoverTitle.d.ts +0 -0
- package/components/{popover → Popover}/index.d.ts +0 -0
- package/components/{popover → Popover}/usePopover.d.ts +0 -0
- package/components/{prompt → Prompt}/Prompt.d.ts +3 -3
- package/components/{prompt → Prompt}/index.d.ts +0 -0
- package/components/{radioGroup → RadioGroup}/RadioGroup.d.ts +0 -16
- package/components/{radioGroup → RadioGroup}/RadioGroupContext.d.ts +0 -0
- package/components/{radioGroup → RadioGroup}/RadioItem.d.ts +0 -4
- package/components/{radioGroup → RadioGroup}/index.d.ts +0 -0
- package/components/{select → Select}/CreatableSelect.d.ts +0 -0
- package/components/{select → Select}/FieldContainer.d.ts +0 -0
- package/components/{select → Select}/Select.d.ts +0 -0
- package/components/{select → Select}/index.d.ts +0 -0
- package/components/{select → Select}/shared.d.ts +0 -18
- package/components/{skeletonLines → SkeletonLines}/SkeletonLines.d.ts +2 -12
- package/components/{skeletonLines → SkeletonLines}/index.d.ts +0 -0
- package/components/{spacer → Spacer}/Spacer.d.ts +0 -4
- package/components/{spacer → Spacer}/index.d.ts +0 -0
- package/components/{spinner → Spinner}/Spinner.d.ts +0 -0
- package/components/{spinner → Spinner}/index.d.ts +0 -0
- package/components/Tag/Tag.d.ts +44 -0
- package/components/Tag/index.d.ts +1 -0
- package/components/{text → Text}/Text.d.ts +0 -20
- package/components/{text → Text}/index.d.ts +0 -0
- package/components/{textArea → TextArea}/TextArea.d.ts +0 -0
- package/components/{textArea → TextArea}/index.d.ts +0 -0
- package/components/{textField → TextField}/TextField.d.ts +1 -5
- package/components/{textField → TextField}/TextLenghtIndicator.d.ts +0 -0
- package/components/{textField → TextField}/index.d.ts +0 -0
- package/components/TextInput/TextInput.d.ts +1 -1
- package/components/{tip → Tip}/Tip.d.ts +2 -4
- package/components/{tip → Tip}/index.d.ts +0 -0
- package/components/{toggle → Toggle}/Toggle.d.ts +0 -0
- package/components/{toggle → Toggle}/index.d.ts +0 -0
- package/components/{tooltip → Tooltip}/Tooltip.d.ts +2 -20
- package/components/{tooltip → Tooltip}/index.d.ts +0 -0
- package/components/buttons/{button → Button}/Button.d.ts +0 -12
- package/components/buttons/{icon-button → IconButton}/IconButton.d.ts +0 -6
- package/components/buttons/{star-button → StarButton}/StarButton.d.ts +0 -0
- package/components/buttons/index.d.ts +3 -3
- package/components/buttons/shared/ButtonProps.d.ts +0 -14
- package/components/buttons/shared/helpers.d.ts +1 -1
- package/components/index.d.ts +34 -33
- package/index.js +121 -52
- package/layout/helper/MinTopFullContentLayout.d.ts +3 -3
- package/layout/responsive/FilterListMapLayout.d.ts +3 -3
- package/layout/responsive/FullWidthRepeatingLayout.d.ts +3 -3
- package/layout/responsive/IntrinsicallyResponsiveGrid.d.ts +3 -3
- package/package.json +1 -1
|
File without changes
|
|
@@ -1,59 +1,41 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PopoverPlacement } from "../
|
|
3
|
-
import { TextType } from "../
|
|
2
|
+
import { PopoverPlacement } from "../Popover";
|
|
3
|
+
import { TextType } from "../Text";
|
|
4
4
|
export interface TooltipProps {
|
|
5
5
|
/**
|
|
6
6
|
* The text to be displayed in the tooltip.
|
|
7
|
-
*
|
|
8
|
-
* @memberof TooltipProps
|
|
9
7
|
*/
|
|
10
8
|
label: string | React.ReactNode;
|
|
11
9
|
/**
|
|
12
10
|
* Where the tooltip should be placed.
|
|
13
|
-
*
|
|
14
|
-
* @memberof TooltipProps
|
|
15
11
|
*/
|
|
16
12
|
placement?: PopoverPlacement;
|
|
17
13
|
/**
|
|
18
14
|
* Child nodes
|
|
19
|
-
*
|
|
20
|
-
* @memberof TooltipProps
|
|
21
15
|
*/
|
|
22
16
|
children?: React.ReactNode;
|
|
23
17
|
/**
|
|
24
18
|
* Id of test component.
|
|
25
|
-
*
|
|
26
|
-
* @memberof TooltipProps
|
|
27
19
|
*/
|
|
28
20
|
dataTestId?: string;
|
|
29
21
|
/**
|
|
30
22
|
* Whether the tooltip is disabled or not.
|
|
31
|
-
*
|
|
32
|
-
* @memberof TooltipProps
|
|
33
23
|
*/
|
|
34
24
|
disabled?: boolean;
|
|
35
25
|
/**
|
|
36
26
|
* To select either "light" or "dark" mode.
|
|
37
|
-
*
|
|
38
|
-
* @memberof TooltipProps
|
|
39
27
|
*/
|
|
40
28
|
mode?: "light" | "dark";
|
|
41
29
|
/**
|
|
42
30
|
* Offset value of the tooltip.
|
|
43
|
-
*
|
|
44
|
-
* @memberof TooltipProps
|
|
45
31
|
*/
|
|
46
32
|
offset?: [number, number];
|
|
47
33
|
/**
|
|
48
34
|
* Additional classes to the component.
|
|
49
|
-
*
|
|
50
|
-
* @memberof TooltipProps
|
|
51
35
|
*/
|
|
52
36
|
className?: string;
|
|
53
37
|
/**
|
|
54
38
|
* Type of content.
|
|
55
|
-
*
|
|
56
|
-
* @memberof TooltipProps
|
|
57
39
|
*/
|
|
58
40
|
contentTextType?: TextType;
|
|
59
41
|
}
|
|
File without changes
|
|
@@ -11,38 +11,26 @@ export interface ButtonProps extends ButtonCommonProps {
|
|
|
11
11
|
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
12
12
|
/**
|
|
13
13
|
* Child nodes. Can be used to pass in text to be displayed on the button.
|
|
14
|
-
*
|
|
15
|
-
* @memberof ButtonProps
|
|
16
14
|
*/
|
|
17
15
|
children?: React.ReactNode;
|
|
18
16
|
/**
|
|
19
17
|
* Whether button is fullWidth or not.
|
|
20
|
-
*
|
|
21
|
-
* @memberof ButtonProps
|
|
22
18
|
*/
|
|
23
19
|
fullWidth?: boolean;
|
|
24
20
|
/**
|
|
25
21
|
* The button prefix.
|
|
26
|
-
*
|
|
27
|
-
* @memberof ButtonProps
|
|
28
22
|
*/
|
|
29
23
|
prefix?: React.ReactNode;
|
|
30
24
|
/**
|
|
31
25
|
* The button suffix.
|
|
32
|
-
*
|
|
33
|
-
* @memberof ButtonProps
|
|
34
26
|
*/
|
|
35
27
|
suffix?: React.ReactNode;
|
|
36
28
|
/**
|
|
37
29
|
* The type of the button. Values can be "submit" or "button".
|
|
38
|
-
*
|
|
39
|
-
* @memberof ButtonProps
|
|
40
30
|
*/
|
|
41
31
|
type?: ButtonType;
|
|
42
32
|
/**
|
|
43
33
|
* The element type the button will be rendered as.
|
|
44
|
-
*
|
|
45
|
-
* @memberof ButtonProps
|
|
46
34
|
*/
|
|
47
35
|
renderAs?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
|
|
48
36
|
/**
|
|
@@ -3,14 +3,10 @@ import { ButtonCommonProps, ButtonSize } from "../shared/ButtonProps";
|
|
|
3
3
|
export interface IconButtonProps extends ButtonCommonProps {
|
|
4
4
|
/**
|
|
5
5
|
* The icon to display.
|
|
6
|
-
*
|
|
7
|
-
* @memberof IconButtonProps
|
|
8
6
|
*/
|
|
9
7
|
icon: React.ReactNode;
|
|
10
8
|
/**
|
|
11
9
|
* Whether the button is circular or not.
|
|
12
|
-
*
|
|
13
|
-
* @memberof IconButtonProps
|
|
14
10
|
*/
|
|
15
11
|
circular?: boolean;
|
|
16
12
|
/**
|
|
@@ -22,8 +18,6 @@ export interface IconButtonProps extends ButtonCommonProps {
|
|
|
22
18
|
renderAs?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
|
|
23
19
|
/**
|
|
24
20
|
* The size of the button. Defaults to "small".
|
|
25
|
-
*
|
|
26
|
-
* @memberof IconButtonProps
|
|
27
21
|
*/
|
|
28
22
|
size?: ButtonSize;
|
|
29
23
|
}
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
1
|
+
export * from "./Button/Button";
|
|
2
|
+
export * from "./IconButton/IconButton";
|
|
3
3
|
export * from "./shared/ButtonProps";
|
|
4
|
-
export * from "./
|
|
4
|
+
export * from "./StarButton/StarButton";
|
|
@@ -8,44 +8,30 @@ export interface ButtonCommonProps extends CommonProps {
|
|
|
8
8
|
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
9
9
|
/**
|
|
10
10
|
* Whether the button is loading.
|
|
11
|
-
*
|
|
12
|
-
* @memberof ButtonCommonProps
|
|
13
11
|
*/
|
|
14
12
|
loading?: boolean;
|
|
15
13
|
/**
|
|
16
14
|
* Whether the button is disabled.
|
|
17
|
-
*
|
|
18
|
-
* @memberof ButtonCommonProps
|
|
19
15
|
*/
|
|
20
16
|
disabled?: boolean;
|
|
21
17
|
/**
|
|
22
18
|
* Button with square aspect ratio.
|
|
23
|
-
*
|
|
24
|
-
* @memberof ButtonCommonProps
|
|
25
19
|
*/
|
|
26
20
|
square?: boolean;
|
|
27
21
|
/**
|
|
28
22
|
* The button's variant. Values are filled, transparent, plain.
|
|
29
|
-
*
|
|
30
|
-
* @memberof ButtonCommonProps
|
|
31
23
|
*/
|
|
32
24
|
intent?: ButtonIntent;
|
|
33
25
|
/**
|
|
34
26
|
* The variant of the button.
|
|
35
|
-
*
|
|
36
|
-
* @memberof ButtonCommonProps
|
|
37
27
|
*/
|
|
38
28
|
variant?: ButtonVariant;
|
|
39
29
|
/**
|
|
40
30
|
* The size of the button.
|
|
41
|
-
*
|
|
42
|
-
* @memberof ButtonCommonProps
|
|
43
31
|
*/
|
|
44
32
|
size?: ButtonSize;
|
|
45
33
|
/**
|
|
46
34
|
* The link to be used for the button.
|
|
47
|
-
*
|
|
48
|
-
* @memberof ButtonCommonProps
|
|
49
35
|
*/
|
|
50
36
|
to?: string;
|
|
51
37
|
title?: string;
|
package/components/index.d.ts
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
1
|
+
export * from "./Alert";
|
|
2
|
+
export * from "./Badge";
|
|
3
|
+
export * from "./BaseInput";
|
|
4
4
|
export * from "./buttons";
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./
|
|
13
|
-
export * from "./
|
|
14
|
-
export * from "./
|
|
15
|
-
export * from "./
|
|
16
|
-
export * from "./
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./
|
|
20
|
-
export * from "./
|
|
5
|
+
export * from "./Card";
|
|
6
|
+
export * from "./Chart";
|
|
7
|
+
export * from "./Checkbox";
|
|
8
|
+
export * from "./Collapse";
|
|
9
|
+
export * from "./CopyableText";
|
|
10
|
+
export * from "./DateField";
|
|
11
|
+
export * from "./DayPicker";
|
|
12
|
+
export * from "./FormGroup/FormGroup";
|
|
13
|
+
export * from "./Heading";
|
|
14
|
+
export * from "./Icon/Icon";
|
|
15
|
+
export * from "./Indicator";
|
|
16
|
+
export * from "./Label";
|
|
17
|
+
export * from "./LegendItem";
|
|
18
|
+
export * from "./Menu";
|
|
19
|
+
export * from "./Modal";
|
|
20
|
+
export * from "./MultiRowTableCell";
|
|
21
21
|
export * from "./NumberField/NumberField";
|
|
22
22
|
export * from "./NumberInput/NumberInput";
|
|
23
|
-
export * from "./
|
|
24
|
-
export * from "./
|
|
25
|
-
export * from "./
|
|
26
|
-
export * from "./
|
|
27
|
-
export * from "./
|
|
28
|
-
export * from "./
|
|
29
|
-
export * from "./
|
|
30
|
-
export * from "./
|
|
31
|
-
export * from "./
|
|
32
|
-
export * from "./
|
|
33
|
-
export * from "./
|
|
23
|
+
export * from "./PageHeading";
|
|
24
|
+
export * from "./Popover";
|
|
25
|
+
export * from "./Prompt";
|
|
26
|
+
export * from "./RadioGroup";
|
|
27
|
+
export * from "./Select";
|
|
28
|
+
export * from "./SkeletonLines";
|
|
29
|
+
export * from "./Spacer";
|
|
30
|
+
export * from "./Spinner";
|
|
31
|
+
export * from "./Tag";
|
|
32
|
+
export * from "./Text";
|
|
33
|
+
export * from "./TextArea";
|
|
34
|
+
export * from "./TextField";
|
|
34
35
|
export * from "./TextInput/TextInput";
|
|
35
|
-
export * from "./
|
|
36
|
-
export * from "./
|
|
37
|
-
export * from "./
|
|
36
|
+
export * from "./Tip";
|
|
37
|
+
export * from "./Toggle";
|
|
38
|
+
export * from "./Tooltip";
|
package/index.js
CHANGED
|
@@ -28,10 +28,10 @@ const docs = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Utility for common props on containers.
|
|
30
30
|
*
|
|
31
|
-
* @param {
|
|
31
|
+
* @param {UseContainerProps} ContainerProps - Props for the utility
|
|
32
32
|
* @param {string} ContainerProps.className - Optional custom className
|
|
33
33
|
* @param {string} ContainerProps.dataTestId - Optional custom data-TestId
|
|
34
|
-
* @returns {
|
|
34
|
+
* @returns {UseContainerProps} - Object with undefined values removed
|
|
35
35
|
*/
|
|
36
36
|
const useContainerProps = ({
|
|
37
37
|
className,
|
|
@@ -350,6 +350,7 @@ const Icon$1 = ({
|
|
|
350
350
|
onClick,
|
|
351
351
|
fillColor,
|
|
352
352
|
type,
|
|
353
|
+
style,
|
|
353
354
|
forwardedRef
|
|
354
355
|
}) => {
|
|
355
356
|
const iconSizeClassName = React.useMemo(() => IconSizeClassMap[size], [size]);
|
|
@@ -381,9 +382,9 @@ const Icon$1 = ({
|
|
|
381
382
|
children: jsx(IconComponent, {
|
|
382
383
|
"data-testid": `${dataTestId}-${name}`,
|
|
383
384
|
className: `${iconSizeClassName} ${colorClassNames} ${className} ${name} aspect-square`,
|
|
384
|
-
style: fillColor ? {
|
|
385
|
+
style: fillColor ? Object.assign(Object.assign({}, style), {
|
|
385
386
|
fill: fillColor
|
|
386
|
-
} : {}
|
|
387
|
+
}) : Object.assign({}, style)
|
|
387
388
|
})
|
|
388
389
|
}))
|
|
389
390
|
}));
|
|
@@ -514,7 +515,7 @@ const Text = ({
|
|
|
514
515
|
className,
|
|
515
516
|
dataTestId
|
|
516
517
|
}) => {
|
|
517
|
-
return jsx(StyledText$
|
|
518
|
+
return jsx(StyledText$4, Object.assign({
|
|
518
519
|
"$as": type,
|
|
519
520
|
className: className,
|
|
520
521
|
"$align": align,
|
|
@@ -573,7 +574,7 @@ const getTextAlignment = () => ({
|
|
|
573
574
|
return alignments[$align];
|
|
574
575
|
};
|
|
575
576
|
|
|
576
|
-
const StyledText$
|
|
577
|
+
const StyledText$4 = tw.text`
|
|
577
578
|
tu-text
|
|
578
579
|
${getFontColor$1()}
|
|
579
580
|
${p => p.$italicize ? tws`tu-text--italic` : ""}
|
|
@@ -681,7 +682,7 @@ const Alert = ({
|
|
|
681
682
|
ref: ref,
|
|
682
683
|
role: "alert"
|
|
683
684
|
}, {
|
|
684
|
-
children: [jsx(IconContainer, Object.assign({
|
|
685
|
+
children: [jsx(IconContainer$1, Object.assign({
|
|
685
686
|
"$inline": inline
|
|
686
687
|
}, {
|
|
687
688
|
children: getIconFromIntent()
|
|
@@ -757,7 +758,7 @@ const RightAligned = tw.div`
|
|
|
757
758
|
alert__right-aligned
|
|
758
759
|
${p => p.$inline ? tws`alert__right-aligned--inline` : null}
|
|
759
760
|
`;
|
|
760
|
-
const IconContainer = tw.div`
|
|
761
|
+
const IconContainer$1 = tw.div`
|
|
761
762
|
alert__icon-container
|
|
762
763
|
${p => p.$inline ? tws`alert__icon-container--inline` : null}
|
|
763
764
|
`;
|
|
@@ -778,49 +779,36 @@ const Badge = _a => {
|
|
|
778
779
|
color = "neutral",
|
|
779
780
|
subtle = false,
|
|
780
781
|
className,
|
|
781
|
-
variant = "
|
|
782
|
+
variant = "pill",
|
|
782
783
|
dataTestId,
|
|
783
784
|
children,
|
|
784
785
|
size = "default"
|
|
785
|
-
} = _a
|
|
786
|
-
|
|
786
|
+
} = _a;
|
|
787
|
+
__rest(_a, ["color", "subtle", "className", "variant", "dataTestId", "children", "size"]);
|
|
787
788
|
|
|
788
789
|
const isPill = variant === "pill";
|
|
789
|
-
|
|
790
|
-
return jsxs(StyledText$2, Object.assign({
|
|
790
|
+
return jsx(StyledText$3, Object.assign({
|
|
791
791
|
"$variant": variant,
|
|
792
792
|
className: className,
|
|
793
793
|
"$color": color,
|
|
794
794
|
"$size": size,
|
|
795
795
|
"$subtle": subtle ? subtle : isPill,
|
|
796
796
|
"data-testid": dataTestId,
|
|
797
|
-
"$as": "span"
|
|
798
|
-
"$withXIcon": tagProps.onClose ? true : false
|
|
797
|
+
"$as": "span"
|
|
799
798
|
}, {
|
|
800
|
-
children:
|
|
801
|
-
name: "XCircleIcon",
|
|
802
|
-
dataTestId: dataTestId + "Icon",
|
|
803
|
-
onClick: tagProps.onClose,
|
|
804
|
-
type: "solid",
|
|
805
|
-
size: size === "default" ? "normal" : "large"
|
|
806
|
-
})]
|
|
799
|
+
children: isPill ? children !== undefined && children !== null ? children > 99 ? "99+" : children : "" : children
|
|
807
800
|
}));
|
|
808
801
|
};
|
|
809
802
|
|
|
810
|
-
const getSizeModifierClass = () => ({
|
|
803
|
+
const getSizeModifierClass$1 = () => ({
|
|
811
804
|
$size,
|
|
812
|
-
$variant
|
|
813
|
-
$withXIcon
|
|
805
|
+
$variant
|
|
814
806
|
}) => {
|
|
815
807
|
const sizeModifierClass = {
|
|
816
808
|
large: tws`badge--large`,
|
|
817
809
|
default: ""
|
|
818
810
|
};
|
|
819
|
-
|
|
820
|
-
large: $withXIcon ? tws`tag--icon tag--icon-large` : tws`tag--icon tag--large`,
|
|
821
|
-
default: $withXIcon ? tws`tag--icon tag--icon-small` : ""
|
|
822
|
-
};
|
|
823
|
-
return $variant === "tag" ? tagSizeModifierClass[$size] : sizeModifierClass[$size];
|
|
811
|
+
return sizeModifierClass[$size];
|
|
824
812
|
};
|
|
825
813
|
|
|
826
814
|
const getBadgeModifierClass = () => ({
|
|
@@ -846,15 +834,12 @@ const getBadgeModifierClass = () => ({
|
|
|
846
834
|
return colorClasses[$color];
|
|
847
835
|
};
|
|
848
836
|
|
|
849
|
-
const StyledText$
|
|
837
|
+
const StyledText$3 = tw.text`
|
|
850
838
|
${p => {
|
|
851
839
|
switch (p.$variant) {
|
|
852
840
|
case "badge":
|
|
853
841
|
return tws`badge`;
|
|
854
842
|
|
|
855
|
-
case "tag":
|
|
856
|
-
return tws`badge--tag`;
|
|
857
|
-
|
|
858
843
|
case "pill":
|
|
859
844
|
return tws`badge--pill`;
|
|
860
845
|
|
|
@@ -863,10 +848,7 @@ const StyledText$2 = tw.text`
|
|
|
863
848
|
}
|
|
864
849
|
}}
|
|
865
850
|
${getBadgeModifierClass()}
|
|
866
|
-
${getSizeModifierClass()}
|
|
867
|
-
`;
|
|
868
|
-
const StyledIcon = tw(Icon$1)`
|
|
869
|
-
tag__icon
|
|
851
|
+
${getSizeModifierClass$1()}
|
|
870
852
|
`;
|
|
871
853
|
|
|
872
854
|
/**
|
|
@@ -1301,7 +1283,7 @@ gap-4
|
|
|
1301
1283
|
* The Chart component is a wrapper component for ECharts.
|
|
1302
1284
|
* Handles events and click functionality.
|
|
1303
1285
|
*
|
|
1304
|
-
* @param {
|
|
1286
|
+
* @param {ChartProps} props - The props for the Chart component
|
|
1305
1287
|
* @returns {JSX.Element} Chart component
|
|
1306
1288
|
*/
|
|
1307
1289
|
|
|
@@ -2086,7 +2068,7 @@ const PopoverListItem = ({
|
|
|
2086
2068
|
}, {
|
|
2087
2069
|
children: [prefix && jsx("div", {
|
|
2088
2070
|
children: prefix
|
|
2089
|
-
}), jsx(StyledText$
|
|
2071
|
+
}), jsx(StyledText$2, Object.assign({
|
|
2090
2072
|
weight: selected ? "bold" : "default",
|
|
2091
2073
|
"$selected": selected
|
|
2092
2074
|
}, {
|
|
@@ -2111,7 +2093,7 @@ const PopoverListItem = ({
|
|
|
2111
2093
|
})) : content
|
|
2112
2094
|
}));
|
|
2113
2095
|
};
|
|
2114
|
-
const StyledText$
|
|
2096
|
+
const StyledText$2 = tw(Text)`
|
|
2115
2097
|
${p => p.$selected ? tws`text-primary-600` : tws`text-neutral-600`}
|
|
2116
2098
|
group-hover:text-primary-500
|
|
2117
2099
|
`;
|
|
@@ -2148,7 +2130,7 @@ const PopoverTitle = ({
|
|
|
2148
2130
|
className: className,
|
|
2149
2131
|
"data-testid": dataTestId
|
|
2150
2132
|
}, {
|
|
2151
|
-
children: [jsx(StyledText, Object.assign({
|
|
2133
|
+
children: [jsx(StyledText$1, Object.assign({
|
|
2152
2134
|
type: "div",
|
|
2153
2135
|
subtle: true,
|
|
2154
2136
|
size: "small",
|
|
@@ -2172,7 +2154,7 @@ const Container$5 = tw.div`
|
|
|
2172
2154
|
mb-1
|
|
2173
2155
|
` : null}
|
|
2174
2156
|
`;
|
|
2175
|
-
const StyledText = tw(Text)`
|
|
2157
|
+
const StyledText$1 = tw(Text)`
|
|
2176
2158
|
flex-1
|
|
2177
2159
|
text-neutral-500
|
|
2178
2160
|
`;
|
|
@@ -2709,7 +2691,7 @@ const MobileIconButton = tw(IconButton)`
|
|
|
2709
2691
|
/**
|
|
2710
2692
|
* The MenuItem component should be used to inform the user of important information.
|
|
2711
2693
|
*
|
|
2712
|
-
* @param {
|
|
2694
|
+
* @param {MenuItemProps} props - The props for the MenuItem component
|
|
2713
2695
|
* @returns {JSX.Element} MenuItem component
|
|
2714
2696
|
*/
|
|
2715
2697
|
|
|
@@ -2752,7 +2734,7 @@ const Label = tw.div`
|
|
|
2752
2734
|
/**
|
|
2753
2735
|
* The MenuList component is used for menus and selects.
|
|
2754
2736
|
*
|
|
2755
|
-
* @param {
|
|
2737
|
+
* @param {MenuListProps} props - The props for the MenuList component
|
|
2756
2738
|
* @returns {JSX.Element} MenuList component
|
|
2757
2739
|
*/
|
|
2758
2740
|
|
|
@@ -2973,7 +2955,7 @@ const useModal = ({
|
|
|
2973
2955
|
/**
|
|
2974
2956
|
* The MinTopFullContentLayout component.
|
|
2975
2957
|
*
|
|
2976
|
-
* @param {
|
|
2958
|
+
* @param {MinTopFullContentLayoutProps} props - The props for the MinTopFullContentLayout component
|
|
2977
2959
|
* @returns {JSX.Element} MinTopFullContentLayout component
|
|
2978
2960
|
*/
|
|
2979
2961
|
|
|
@@ -3006,7 +2988,7 @@ const Layout$5 = tw.span`
|
|
|
3006
2988
|
* on screens < mediaQuery.xxl
|
|
3007
2989
|
*
|
|
3008
2990
|
*
|
|
3009
|
-
* @param {
|
|
2991
|
+
* @param {FilterListMapLayoutProps} props - The props for the FilterListMapLayout component
|
|
3010
2992
|
* @returns {JSX.Element} FilterListMapLayout component
|
|
3011
2993
|
*/
|
|
3012
2994
|
|
|
@@ -3024,7 +3006,7 @@ const Layout$4 = tw.span`
|
|
|
3024
3006
|
* Row min height can optionally be set here or managed by children
|
|
3025
3007
|
* Scrolling happens if/when children's a min-height is reached
|
|
3026
3008
|
*
|
|
3027
|
-
* @param {
|
|
3009
|
+
* @param {FullWidthRepeatingLayoutProps} props - The props for the FullWidthRepeatingLayout component
|
|
3028
3010
|
* @returns {JSX.Element} FullWidthRepeatingLayout component
|
|
3029
3011
|
*/
|
|
3030
3012
|
|
|
@@ -3088,7 +3070,7 @@ const GridArea = ({
|
|
|
3088
3070
|
* A grid container that has a flexible number of columns.
|
|
3089
3071
|
* Adds more columns if constraints allow it, otherwise wraps to next row
|
|
3090
3072
|
*
|
|
3091
|
-
* @param {
|
|
3073
|
+
* @param {IntrinsicallyResponsiveGridProps} props - The props for the IntrinsicallyResponsiveGrid component
|
|
3092
3074
|
* @returns {JSX.Element} IntrinsicallyResponsiveGrid component
|
|
3093
3075
|
*/
|
|
3094
3076
|
|
|
@@ -3215,7 +3197,7 @@ const Layout = tw.div`
|
|
|
3215
3197
|
/**
|
|
3216
3198
|
* The MultiRowTableCell component extendins Table Cell component and formats your content supporting 2 rows.
|
|
3217
3199
|
*
|
|
3218
|
-
* @param {
|
|
3200
|
+
* @param {MultiRowTableCellProps} props - The props for the MultiRowTableCell component
|
|
3219
3201
|
* @returns {JSX.Element} MultiRowTableCell component
|
|
3220
3202
|
*/
|
|
3221
3203
|
|
|
@@ -3448,7 +3430,7 @@ function usePrompt(message, when = true) {
|
|
|
3448
3430
|
/**
|
|
3449
3431
|
* The Prompt function.
|
|
3450
3432
|
*
|
|
3451
|
-
* @param {
|
|
3433
|
+
* @param {PromptProps} Props -
|
|
3452
3434
|
* @returns {void} void
|
|
3453
3435
|
*/
|
|
3454
3436
|
|
|
@@ -3868,6 +3850,93 @@ const SkeletonLine = tw.div`
|
|
|
3868
3850
|
`;
|
|
3869
3851
|
SkeletonLines.displayName = "SkeletonLines";
|
|
3870
3852
|
|
|
3853
|
+
/**
|
|
3854
|
+
* Tags allow users to enter information and filter content.
|
|
3855
|
+
* Multiple or single tags can be used to categorise items.
|
|
3856
|
+
* Use short labels for easy scanning. Use two words only if necessary to describe the status and differentiate it from other tags.
|
|
3857
|
+
*
|
|
3858
|
+
* @param {TagProps} props - The props for the tag component
|
|
3859
|
+
* @returns {JSX.Element} tag component
|
|
3860
|
+
*/
|
|
3861
|
+
|
|
3862
|
+
const Tag = _a => {
|
|
3863
|
+
var {
|
|
3864
|
+
className,
|
|
3865
|
+
dataTestId,
|
|
3866
|
+
children,
|
|
3867
|
+
size = "default",
|
|
3868
|
+
onClose,
|
|
3869
|
+
color = "primary"
|
|
3870
|
+
} = _a;
|
|
3871
|
+
__rest(_a, ["className", "dataTestId", "children", "size", "onClose", "color"]);
|
|
3872
|
+
|
|
3873
|
+
return jsxs(StyledText, Object.assign({
|
|
3874
|
+
className: className,
|
|
3875
|
+
"$size": size,
|
|
3876
|
+
"data-testid": dataTestId,
|
|
3877
|
+
"$as": "span",
|
|
3878
|
+
"$color": color,
|
|
3879
|
+
"$withXIcon": !!onClose
|
|
3880
|
+
}, {
|
|
3881
|
+
children: [children, onClose && jsx(IconContainer, Object.assign({
|
|
3882
|
+
onClick: onClose
|
|
3883
|
+
}, {
|
|
3884
|
+
children: jsx(Icon$1, {
|
|
3885
|
+
name: "XCircleIcon",
|
|
3886
|
+
dataTestId: dataTestId + "Icon",
|
|
3887
|
+
type: "solid",
|
|
3888
|
+
style: {
|
|
3889
|
+
"-webkit-transition": "-webkit-transform 0.150s"
|
|
3890
|
+
},
|
|
3891
|
+
className: size === "default" ? tws`tag__icon` : tws`tag__icon tag__icon--small`
|
|
3892
|
+
})
|
|
3893
|
+
}))]
|
|
3894
|
+
}));
|
|
3895
|
+
};
|
|
3896
|
+
|
|
3897
|
+
const getSizeModifierClass = () => ({
|
|
3898
|
+
$size,
|
|
3899
|
+
$withXIcon
|
|
3900
|
+
}) => {
|
|
3901
|
+
const tagSizeModifierClass = {
|
|
3902
|
+
default: $withXIcon ? tws`tag--withIcon ` : tws` `,
|
|
3903
|
+
small: $withXIcon ? tws`tag--small tag--withIcon` : tws`tag--small`
|
|
3904
|
+
};
|
|
3905
|
+
return tagSizeModifierClass[$size];
|
|
3906
|
+
};
|
|
3907
|
+
|
|
3908
|
+
const getColorModifierClass = () => ({
|
|
3909
|
+
$color
|
|
3910
|
+
}) => {
|
|
3911
|
+
const colorClasses = {
|
|
3912
|
+
primary: tws`tag--primary`,
|
|
3913
|
+
accent: tws`tag--accent`,
|
|
3914
|
+
success: tws`tag--success`,
|
|
3915
|
+
danger: tws`tag--danger`,
|
|
3916
|
+
warning: tws`tag--warning`,
|
|
3917
|
+
info: tws`tag--info`,
|
|
3918
|
+
neutral: tws`tag--neutral`,
|
|
3919
|
+
good: tws`tag--good`,
|
|
3920
|
+
low: tws`tag--low`,
|
|
3921
|
+
critical: tws`tag--critical`,
|
|
3922
|
+
working: tws`tag--working`,
|
|
3923
|
+
idle: tws`tag--idle`,
|
|
3924
|
+
stopped: tws`tag--stopped`,
|
|
3925
|
+
unknown: tws`tag--unknown`
|
|
3926
|
+
};
|
|
3927
|
+
return colorClasses[$color];
|
|
3928
|
+
};
|
|
3929
|
+
|
|
3930
|
+
const StyledText = tw.text`
|
|
3931
|
+
tag
|
|
3932
|
+
${getSizeModifierClass()}
|
|
3933
|
+
${getColorModifierClass()}
|
|
3934
|
+
`;
|
|
3935
|
+
const IconContainer = tw.div`
|
|
3936
|
+
flex
|
|
3937
|
+
self-center
|
|
3938
|
+
`;
|
|
3939
|
+
|
|
3871
3940
|
const TextArea = React.forwardRef(({
|
|
3872
3941
|
id,
|
|
3873
3942
|
name,
|
|
@@ -4269,4 +4338,4 @@ const useTimeout = ({
|
|
|
4269
4338
|
};
|
|
4270
4339
|
};
|
|
4271
4340
|
|
|
4272
|
-
export { Alert, AnimatedPopover, Badge, BaseInput, Button, Card, CardBody, CardFooter, CardHeader, Chart, Checkbox, Collapse, CopyableText, CreatableSelect, DateField, DayPicker, DayPickerPopover, DayRangePicker, DensityContainer, FilterListMapLayout, FormGroup, FullWidthRepeatingLayout, GridArea, Heading, Icon$1 as Icon, IconButton, Indicator$1 as Indicator, IntrinsicallyResponsiveGrid, Label$2 as Label, LegendItem, MenuButton, MenuItem, MenuList, MinTopFullContentLayout, Modal, ModalBackdrop, MultiRowTableCell, NumberField, NumberInput, PageHeading, PopoverLifecycle, PopoverList, PopoverListItem, PopoverTitle, Prompt, ROLE_CARD, RadioGroup, RadioItem, Select, SkeletonLines, Spacer, Spinner, StarButton, Text, TextArea, TextField, TextInput, Tip, TitleNavContentLayout, Toggle, Tooltip, TwoColumnLayout, activityColors, colors, criticalityColors, docs, generalColors, intentColors, useContainerProps, useCustomComponents, useCustomStyles, useDebounce, useLocalStorage, useModal, usePopover, usePrompt, useTimeout };
|
|
4341
|
+
export { Alert, AnimatedPopover, Badge, BaseInput, Button, Card, CardBody, CardFooter, CardHeader, Chart, Checkbox, Collapse, CopyableText, CreatableSelect, DateField, DayPicker, DayPickerPopover, DayRangePicker, DensityContainer, FilterListMapLayout, FormGroup, FullWidthRepeatingLayout, GridArea, Heading, Icon$1 as Icon, IconButton, Indicator$1 as Indicator, IntrinsicallyResponsiveGrid, Label$2 as Label, LegendItem, MenuButton, MenuItem, MenuList, MinTopFullContentLayout, Modal, ModalBackdrop, MultiRowTableCell, NumberField, NumberInput, PageHeading, PopoverLifecycle, PopoverList, PopoverListItem, PopoverTitle, Prompt, ROLE_CARD, RadioGroup, RadioItem, Select, SkeletonLines, Spacer, Spinner, StarButton, Tag, Text, TextArea, TextField, TextInput, Tip, TitleNavContentLayout, Toggle, Tooltip, TwoColumnLayout, activityColors, colors, criticalityColors, docs, generalColors, intentColors, useContainerProps, useCustomComponents, useCustomStyles, useDebounce, useLocalStorage, useModal, usePopover, usePrompt, useTimeout };
|
|
@@ -5,14 +5,14 @@ import { CommonProps } from "../../common/CommonProps";
|
|
|
5
5
|
* Useful when toy want the second child to have 100% height and be scrollable
|
|
6
6
|
* Example: FilterBar + Fleet List
|
|
7
7
|
*/
|
|
8
|
-
interface
|
|
8
|
+
interface MinTopFullContentLayoutProps extends CommonProps {
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* The MinTopFullContentLayout component.
|
|
13
13
|
*
|
|
14
|
-
* @param {
|
|
14
|
+
* @param {MinTopFullContentLayoutProps} props - The props for the MinTopFullContentLayout component
|
|
15
15
|
* @returns {JSX.Element} MinTopFullContentLayout component
|
|
16
16
|
*/
|
|
17
|
-
export declare const MinTopFullContentLayout: ({ children, className, dataTestId }:
|
|
17
|
+
export declare const MinTopFullContentLayout: ({ children, className, dataTestId }: MinTopFullContentLayoutProps) => JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
interface
|
|
2
|
+
interface FilterListMapLayoutProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
@@ -15,8 +15,8 @@ interface IProps {
|
|
|
15
15
|
* on screens < mediaQuery.xxl
|
|
16
16
|
*
|
|
17
17
|
*
|
|
18
|
-
* @param {
|
|
18
|
+
* @param {FilterListMapLayoutProps} props - The props for the FilterListMapLayout component
|
|
19
19
|
* @returns {JSX.Element} FilterListMapLayout component
|
|
20
20
|
*/
|
|
21
|
-
export declare const FilterListMapLayout: ({ children }:
|
|
21
|
+
export declare const FilterListMapLayout: ({ children }: FilterListMapLayoutProps) => JSX.Element;
|
|
22
22
|
export {};
|