@trackunit/react-components 0.0.52 → 0.0.55
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 +8 -32
- 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 +7 -9
- 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 +8 -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 +9 -1
- 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 +8 -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 +159 -56
- 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
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,
|
|
@@ -81,7 +81,15 @@ function __rest(s, e) {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
|
-
* The
|
|
84
|
+
* The spinner component provides visual feedback that data is being processed.
|
|
85
|
+
*
|
|
86
|
+
* Spinners are used when performing actions. They notify to the user that their request is being processed. Although they do not provide details about what is occurring on the back-end, they reassure the user that their action is being processed.
|
|
87
|
+
*
|
|
88
|
+
* Common actions that benefit from spinners include any create, update, or delete actions that may have a lot of data to process. It can be used in a table, after a primary or secondary button click, or even in a modal.
|
|
89
|
+
*
|
|
90
|
+
* Use a spinner component for any action that cannot be performed instantly and will only require a short time (between 1 to 5 seconds) to process.
|
|
91
|
+
*
|
|
92
|
+
* Use when retrieving or refreshing small data amounts, such as status.
|
|
85
93
|
*
|
|
86
94
|
* @param {SpinnerProps} props - The props for the Spinner component
|
|
87
95
|
* @returns {JSX.Element} Spinner component
|
|
@@ -342,6 +350,7 @@ const Icon$1 = ({
|
|
|
342
350
|
onClick,
|
|
343
351
|
fillColor,
|
|
344
352
|
type,
|
|
353
|
+
style,
|
|
345
354
|
forwardedRef
|
|
346
355
|
}) => {
|
|
347
356
|
const iconSizeClassName = React.useMemo(() => IconSizeClassMap[size], [size]);
|
|
@@ -373,9 +382,9 @@ const Icon$1 = ({
|
|
|
373
382
|
children: jsx(IconComponent, {
|
|
374
383
|
"data-testid": `${dataTestId}-${name}`,
|
|
375
384
|
className: `${iconSizeClassName} ${colorClassNames} ${className} ${name} aspect-square`,
|
|
376
|
-
style: fillColor ? {
|
|
385
|
+
style: fillColor ? Object.assign(Object.assign({}, style), {
|
|
377
386
|
fill: fillColor
|
|
378
|
-
} : {}
|
|
387
|
+
}) : Object.assign({}, style)
|
|
379
388
|
})
|
|
380
389
|
}))
|
|
381
390
|
}));
|
|
@@ -506,7 +515,7 @@ const Text = ({
|
|
|
506
515
|
className,
|
|
507
516
|
dataTestId
|
|
508
517
|
}) => {
|
|
509
|
-
return jsx(StyledText$
|
|
518
|
+
return jsx(StyledText$4, Object.assign({
|
|
510
519
|
"$as": type,
|
|
511
520
|
className: className,
|
|
512
521
|
"$align": align,
|
|
@@ -565,7 +574,7 @@ const getTextAlignment = () => ({
|
|
|
565
574
|
return alignments[$align];
|
|
566
575
|
};
|
|
567
576
|
|
|
568
|
-
const StyledText$
|
|
577
|
+
const StyledText$4 = tw.text`
|
|
569
578
|
tu-text
|
|
570
579
|
${getFontColor$1()}
|
|
571
580
|
${p => p.$italicize ? tws`tu-text--italic` : ""}
|
|
@@ -673,7 +682,7 @@ const Alert = ({
|
|
|
673
682
|
ref: ref,
|
|
674
683
|
role: "alert"
|
|
675
684
|
}, {
|
|
676
|
-
children: [jsx(IconContainer, Object.assign({
|
|
685
|
+
children: [jsx(IconContainer$1, Object.assign({
|
|
677
686
|
"$inline": inline
|
|
678
687
|
}, {
|
|
679
688
|
children: getIconFromIntent()
|
|
@@ -749,13 +758,17 @@ const RightAligned = tw.div`
|
|
|
749
758
|
alert__right-aligned
|
|
750
759
|
${p => p.$inline ? tws`alert__right-aligned--inline` : null}
|
|
751
760
|
`;
|
|
752
|
-
const IconContainer = tw.div`
|
|
761
|
+
const IconContainer$1 = tw.div`
|
|
753
762
|
alert__icon-container
|
|
754
763
|
${p => p.$inline ? tws`alert__icon-container--inline` : null}
|
|
755
764
|
`;
|
|
756
765
|
|
|
757
766
|
/**
|
|
758
|
-
* The Badge component us used to display states or similar short
|
|
767
|
+
* The Badge component us used to display states or similar short informative text.
|
|
768
|
+
*
|
|
769
|
+
* _**Do use** badges to show highlighted text based on the state._
|
|
770
|
+
*
|
|
771
|
+
* _**Do not use** badges for regular text in places where it makes no sense to use highlighted text._
|
|
759
772
|
*
|
|
760
773
|
* @param {BadgeProps} props - The props for the Badge component
|
|
761
774
|
* @returns {JSX.Element} Badge component
|
|
@@ -766,49 +779,36 @@ const Badge = _a => {
|
|
|
766
779
|
color = "neutral",
|
|
767
780
|
subtle = false,
|
|
768
781
|
className,
|
|
769
|
-
variant = "
|
|
782
|
+
variant = "pill",
|
|
770
783
|
dataTestId,
|
|
771
784
|
children,
|
|
772
785
|
size = "default"
|
|
773
|
-
} = _a
|
|
774
|
-
|
|
786
|
+
} = _a;
|
|
787
|
+
__rest(_a, ["color", "subtle", "className", "variant", "dataTestId", "children", "size"]);
|
|
775
788
|
|
|
776
789
|
const isPill = variant === "pill";
|
|
777
|
-
|
|
778
|
-
return jsxs(StyledText$2, Object.assign({
|
|
790
|
+
return jsx(StyledText$3, Object.assign({
|
|
779
791
|
"$variant": variant,
|
|
780
792
|
className: className,
|
|
781
793
|
"$color": color,
|
|
782
794
|
"$size": size,
|
|
783
795
|
"$subtle": subtle ? subtle : isPill,
|
|
784
796
|
"data-testid": dataTestId,
|
|
785
|
-
"$as": "span"
|
|
786
|
-
"$withXIcon": tagProps.onClose ? true : false
|
|
797
|
+
"$as": "span"
|
|
787
798
|
}, {
|
|
788
|
-
children:
|
|
789
|
-
name: "XCircleIcon",
|
|
790
|
-
dataTestId: dataTestId + "Icon",
|
|
791
|
-
onClick: tagProps.onClose,
|
|
792
|
-
type: "solid",
|
|
793
|
-
size: size === "default" ? "normal" : "large"
|
|
794
|
-
})]
|
|
799
|
+
children: isPill ? children !== undefined && children !== null ? children > 99 ? "99+" : children : "" : children
|
|
795
800
|
}));
|
|
796
801
|
};
|
|
797
802
|
|
|
798
|
-
const getSizeModifierClass = () => ({
|
|
803
|
+
const getSizeModifierClass$1 = () => ({
|
|
799
804
|
$size,
|
|
800
|
-
$variant
|
|
801
|
-
$withXIcon
|
|
805
|
+
$variant
|
|
802
806
|
}) => {
|
|
803
807
|
const sizeModifierClass = {
|
|
804
808
|
large: tws`badge--large`,
|
|
805
809
|
default: ""
|
|
806
810
|
};
|
|
807
|
-
|
|
808
|
-
large: $withXIcon ? tws`tag--icon tag--icon-large` : tws`tag--icon tag--large`,
|
|
809
|
-
default: $withXIcon ? tws`tag--icon tag--icon-small` : ""
|
|
810
|
-
};
|
|
811
|
-
return $variant === "tag" ? tagSizeModifierClass[$size] : sizeModifierClass[$size];
|
|
811
|
+
return sizeModifierClass[$size];
|
|
812
812
|
};
|
|
813
813
|
|
|
814
814
|
const getBadgeModifierClass = () => ({
|
|
@@ -834,15 +834,12 @@ const getBadgeModifierClass = () => ({
|
|
|
834
834
|
return colorClasses[$color];
|
|
835
835
|
};
|
|
836
836
|
|
|
837
|
-
const StyledText$
|
|
837
|
+
const StyledText$3 = tw.text`
|
|
838
838
|
${p => {
|
|
839
839
|
switch (p.$variant) {
|
|
840
840
|
case "badge":
|
|
841
841
|
return tws`badge`;
|
|
842
842
|
|
|
843
|
-
case "tag":
|
|
844
|
-
return tws`badge--tag`;
|
|
845
|
-
|
|
846
843
|
case "pill":
|
|
847
844
|
return tws`badge--pill`;
|
|
848
845
|
|
|
@@ -851,10 +848,7 @@ const StyledText$2 = tw.text`
|
|
|
851
848
|
}
|
|
852
849
|
}}
|
|
853
850
|
${getBadgeModifierClass()}
|
|
854
|
-
${getSizeModifierClass()}
|
|
855
|
-
`;
|
|
856
|
-
const StyledIcon = tw(Icon$1)`
|
|
857
|
-
tag__icon
|
|
851
|
+
${getSizeModifierClass$1()}
|
|
858
852
|
`;
|
|
859
853
|
|
|
860
854
|
/**
|
|
@@ -1289,7 +1283,7 @@ gap-4
|
|
|
1289
1283
|
* The Chart component is a wrapper component for ECharts.
|
|
1290
1284
|
* Handles events and click functionality.
|
|
1291
1285
|
*
|
|
1292
|
-
* @param {
|
|
1286
|
+
* @param {ChartProps} props - The props for the Chart component
|
|
1293
1287
|
* @returns {JSX.Element} Chart component
|
|
1294
1288
|
*/
|
|
1295
1289
|
|
|
@@ -2074,7 +2068,7 @@ const PopoverListItem = ({
|
|
|
2074
2068
|
}, {
|
|
2075
2069
|
children: [prefix && jsx("div", {
|
|
2076
2070
|
children: prefix
|
|
2077
|
-
}), jsx(StyledText$
|
|
2071
|
+
}), jsx(StyledText$2, Object.assign({
|
|
2078
2072
|
weight: selected ? "bold" : "default",
|
|
2079
2073
|
"$selected": selected
|
|
2080
2074
|
}, {
|
|
@@ -2099,7 +2093,7 @@ const PopoverListItem = ({
|
|
|
2099
2093
|
})) : content
|
|
2100
2094
|
}));
|
|
2101
2095
|
};
|
|
2102
|
-
const StyledText$
|
|
2096
|
+
const StyledText$2 = tw(Text)`
|
|
2103
2097
|
${p => p.$selected ? tws`text-primary-600` : tws`text-neutral-600`}
|
|
2104
2098
|
group-hover:text-primary-500
|
|
2105
2099
|
`;
|
|
@@ -2136,7 +2130,7 @@ const PopoverTitle = ({
|
|
|
2136
2130
|
className: className,
|
|
2137
2131
|
"data-testid": dataTestId
|
|
2138
2132
|
}, {
|
|
2139
|
-
children: [jsx(StyledText, Object.assign({
|
|
2133
|
+
children: [jsx(StyledText$1, Object.assign({
|
|
2140
2134
|
type: "div",
|
|
2141
2135
|
subtle: true,
|
|
2142
2136
|
size: "small",
|
|
@@ -2160,7 +2154,7 @@ const Container$5 = tw.div`
|
|
|
2160
2154
|
mb-1
|
|
2161
2155
|
` : null}
|
|
2162
2156
|
`;
|
|
2163
|
-
const StyledText = tw(Text)`
|
|
2157
|
+
const StyledText$1 = tw(Text)`
|
|
2164
2158
|
flex-1
|
|
2165
2159
|
text-neutral-500
|
|
2166
2160
|
`;
|
|
@@ -2459,7 +2453,13 @@ const HelpAddon = tw.span`
|
|
|
2459
2453
|
`;
|
|
2460
2454
|
|
|
2461
2455
|
/**
|
|
2462
|
-
*
|
|
2456
|
+
* Indicators are non-interactive elements that communicate essential aspects of the state of an asset.
|
|
2457
|
+
*
|
|
2458
|
+
* Whenever an asset is presented, indicators provide the necessary information for a user to comprehend the state of the asset.
|
|
2459
|
+
*
|
|
2460
|
+
* _**Do use** indicators to communicate essential aspects of the state of an asset._
|
|
2461
|
+
*
|
|
2462
|
+
* _**Do not use** indicators for non-essential information, or to communicate information unrelated to the state of an asset._
|
|
2463
2463
|
*
|
|
2464
2464
|
* @param {IndicatorProps} props - The props for the Indicator component
|
|
2465
2465
|
* @returns {JSX.Element} Indicator component
|
|
@@ -2470,7 +2470,7 @@ const Indicator$1 = _a => {
|
|
|
2470
2470
|
dataTestId,
|
|
2471
2471
|
icon,
|
|
2472
2472
|
label,
|
|
2473
|
-
color,
|
|
2473
|
+
color = colors.UNKNOWN,
|
|
2474
2474
|
withBackground = true
|
|
2475
2475
|
} = _a,
|
|
2476
2476
|
rest = __rest(_a, ["dataTestId", "icon", "label", "color", "withBackground"]);
|
|
@@ -2691,7 +2691,7 @@ const MobileIconButton = tw(IconButton)`
|
|
|
2691
2691
|
/**
|
|
2692
2692
|
* The MenuItem component should be used to inform the user of important information.
|
|
2693
2693
|
*
|
|
2694
|
-
* @param {
|
|
2694
|
+
* @param {MenuItemProps} props - The props for the MenuItem component
|
|
2695
2695
|
* @returns {JSX.Element} MenuItem component
|
|
2696
2696
|
*/
|
|
2697
2697
|
|
|
@@ -2734,7 +2734,7 @@ const Label = tw.div`
|
|
|
2734
2734
|
/**
|
|
2735
2735
|
* The MenuList component is used for menus and selects.
|
|
2736
2736
|
*
|
|
2737
|
-
* @param {
|
|
2737
|
+
* @param {MenuListProps} props - The props for the MenuList component
|
|
2738
2738
|
* @returns {JSX.Element} MenuList component
|
|
2739
2739
|
*/
|
|
2740
2740
|
|
|
@@ -2955,7 +2955,7 @@ const useModal = ({
|
|
|
2955
2955
|
/**
|
|
2956
2956
|
* The MinTopFullContentLayout component.
|
|
2957
2957
|
*
|
|
2958
|
-
* @param {
|
|
2958
|
+
* @param {MinTopFullContentLayoutProps} props - The props for the MinTopFullContentLayout component
|
|
2959
2959
|
* @returns {JSX.Element} MinTopFullContentLayout component
|
|
2960
2960
|
*/
|
|
2961
2961
|
|
|
@@ -2988,7 +2988,7 @@ const Layout$5 = tw.span`
|
|
|
2988
2988
|
* on screens < mediaQuery.xxl
|
|
2989
2989
|
*
|
|
2990
2990
|
*
|
|
2991
|
-
* @param {
|
|
2991
|
+
* @param {FilterListMapLayoutProps} props - The props for the FilterListMapLayout component
|
|
2992
2992
|
* @returns {JSX.Element} FilterListMapLayout component
|
|
2993
2993
|
*/
|
|
2994
2994
|
|
|
@@ -3006,7 +3006,7 @@ const Layout$4 = tw.span`
|
|
|
3006
3006
|
* Row min height can optionally be set here or managed by children
|
|
3007
3007
|
* Scrolling happens if/when children's a min-height is reached
|
|
3008
3008
|
*
|
|
3009
|
-
* @param {
|
|
3009
|
+
* @param {FullWidthRepeatingLayoutProps} props - The props for the FullWidthRepeatingLayout component
|
|
3010
3010
|
* @returns {JSX.Element} FullWidthRepeatingLayout component
|
|
3011
3011
|
*/
|
|
3012
3012
|
|
|
@@ -3070,7 +3070,7 @@ const GridArea = ({
|
|
|
3070
3070
|
* A grid container that has a flexible number of columns.
|
|
3071
3071
|
* Adds more columns if constraints allow it, otherwise wraps to next row
|
|
3072
3072
|
*
|
|
3073
|
-
* @param {
|
|
3073
|
+
* @param {IntrinsicallyResponsiveGridProps} props - The props for the IntrinsicallyResponsiveGrid component
|
|
3074
3074
|
* @returns {JSX.Element} IntrinsicallyResponsiveGrid component
|
|
3075
3075
|
*/
|
|
3076
3076
|
|
|
@@ -3197,7 +3197,7 @@ const Layout = tw.div`
|
|
|
3197
3197
|
/**
|
|
3198
3198
|
* The MultiRowTableCell component extendins Table Cell component and formats your content supporting 2 rows.
|
|
3199
3199
|
*
|
|
3200
|
-
* @param {
|
|
3200
|
+
* @param {MultiRowTableCellProps} props - The props for the MultiRowTableCell component
|
|
3201
3201
|
* @returns {JSX.Element} MultiRowTableCell component
|
|
3202
3202
|
*/
|
|
3203
3203
|
|
|
@@ -3242,6 +3242,14 @@ const NumberInput = forwardRef((props, ref) => jsx(BaseInput, Object.assign({
|
|
|
3242
3242
|
}, props)));
|
|
3243
3243
|
NumberInput.displayName = "NumberInput";
|
|
3244
3244
|
|
|
3245
|
+
/**
|
|
3246
|
+
* The number field component is used for entering numeric values and includes controls for incrementally increasing or decreasing the value.
|
|
3247
|
+
*
|
|
3248
|
+
* _**Do use**_ the NumberField when the controls to incrementally increase or decrease makes the task easier for the user.
|
|
3249
|
+
*
|
|
3250
|
+
* _**Do not use**_ this fields for non-serialized numbers. Use TextField instead.
|
|
3251
|
+
*/
|
|
3252
|
+
|
|
3245
3253
|
const NumberField = forwardRef((_a, ref) => {
|
|
3246
3254
|
var {
|
|
3247
3255
|
label,
|
|
@@ -3422,7 +3430,7 @@ function usePrompt(message, when = true) {
|
|
|
3422
3430
|
/**
|
|
3423
3431
|
* The Prompt function.
|
|
3424
3432
|
*
|
|
3425
|
-
* @param {
|
|
3433
|
+
* @param {PromptProps} Props -
|
|
3426
3434
|
* @returns {void} void
|
|
3427
3435
|
*/
|
|
3428
3436
|
|
|
@@ -3842,6 +3850,93 @@ const SkeletonLine = tw.div`
|
|
|
3842
3850
|
`;
|
|
3843
3851
|
SkeletonLines.displayName = "SkeletonLines";
|
|
3844
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
|
+
|
|
3845
3940
|
const TextArea = React.forwardRef(({
|
|
3846
3941
|
id,
|
|
3847
3942
|
name,
|
|
@@ -3984,6 +4079,14 @@ const Root = tw.span`
|
|
|
3984
4079
|
font-mono
|
|
3985
4080
|
`;
|
|
3986
4081
|
|
|
4082
|
+
/**
|
|
4083
|
+
* Text fields enable the user to interact with and input content and data. This component can be used for long and short form entries. Allow the size of the text input box to reflect the length of the content you expect the user to enter.
|
|
4084
|
+
*
|
|
4085
|
+
* _**Do use** when the user has to input or edit simple text based information, such as metadata._
|
|
4086
|
+
*
|
|
4087
|
+
* _**Do not use** to confirm user actions, such as deleting. Use a checkbox for such flows._
|
|
4088
|
+
*/
|
|
4089
|
+
|
|
3987
4090
|
const TextField = React.forwardRef((_a, ref) => {
|
|
3988
4091
|
var {
|
|
3989
4092
|
label,
|
|
@@ -4235,4 +4338,4 @@ const useTimeout = ({
|
|
|
4235
4338
|
};
|
|
4236
4339
|
};
|
|
4237
4340
|
|
|
4238
|
-
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 {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare type RowSizing = "Equal" | "MinContent" | "Unmanaged";
|
|
3
|
-
interface
|
|
3
|
+
interface FullWidthRepeatingLayoutProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
rowSizing?: RowSizing;
|
|
6
6
|
rowMinHeight?: number;
|
|
@@ -12,8 +12,8 @@ interface IFullWidthRepeatingLayoutProps {
|
|
|
12
12
|
* Row min height can optionally be set here or managed by children
|
|
13
13
|
* Scrolling happens if/when children's a min-height is reached
|
|
14
14
|
*
|
|
15
|
-
* @param {
|
|
15
|
+
* @param {FullWidthRepeatingLayoutProps} props - The props for the FullWidthRepeatingLayout component
|
|
16
16
|
* @returns {JSX.Element} FullWidthRepeatingLayout component
|
|
17
17
|
*/
|
|
18
|
-
export declare const FullWidthRepeatingLayout: ({ children, rowSizing, rowMinHeight, dataTestId, className, }:
|
|
18
|
+
export declare const FullWidthRepeatingLayout: ({ children, rowSizing, rowMinHeight, dataTestId, className, }: FullWidthRepeatingLayoutProps) => JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -3,7 +3,7 @@ import { CommonProps } from "../../common/CommonProps";
|
|
|
3
3
|
declare type ColumnWidth = "slim" | "narrow" | "normal" | "wide";
|
|
4
4
|
declare type Space = "inherit" | "auto" | "none" | "tiny" | "mini" | "small" | "medium" | "large" | "giant" | "enormous";
|
|
5
5
|
declare type Occupation = "auto-fill" | "auto-fit";
|
|
6
|
-
interface
|
|
6
|
+
interface IntrinsicallyResponsiveGridProps extends CommonProps {
|
|
7
7
|
/**
|
|
8
8
|
* The children to be laid out
|
|
9
9
|
*/
|
|
@@ -23,8 +23,8 @@ interface IIntrinsicallyResponsiveGridProps extends CommonProps {
|
|
|
23
23
|
* A grid container that has a flexible number of columns.
|
|
24
24
|
* Adds more columns if constraints allow it, otherwise wraps to next row
|
|
25
25
|
*
|
|
26
|
-
* @param {
|
|
26
|
+
* @param {IntrinsicallyResponsiveGridProps} props - The props for the IntrinsicallyResponsiveGrid component
|
|
27
27
|
* @returns {JSX.Element} IntrinsicallyResponsiveGrid component
|
|
28
28
|
*/
|
|
29
|
-
export declare const IntrinsicallyResponsiveGrid: ({ children, occupation, minColumnWidth, gap, dataTestId, className, }:
|
|
29
|
+
export declare const IntrinsicallyResponsiveGrid: ({ children, occupation, minColumnWidth, gap, dataTestId, className, }: IntrinsicallyResponsiveGridProps) => JSX.Element;
|
|
30
30
|
export {};
|