@trackunit/react-components 0.1.168 → 0.1.171
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/index.cjs.js +54 -28
- package/index.esm.js +55 -28
- package/package.json +1 -1
- package/src/components/Card/Card.variants.d.ts +3 -2
- package/src/components/Card/index.d.ts +0 -1
- package/src/components/Text/Text.d.ts +5 -1
- package/src/components/Text/Text.variants.d.ts +3 -1
- package/src/components/Card/DensityContainer.d.ts +0 -30
package/index.cjs.js
CHANGED
|
@@ -486,7 +486,7 @@ const StarButton = ({ starred, onClick }) => {
|
|
|
486
486
|
return (jsxRuntime.jsx("div", { onClick: onClick, "data-test-id": "starred-filter", children: jsxRuntime.jsx(Icon, { name: "Star", color: starred ? "primary" : "neutral", type: starred ? "solid" : "outline", size: "medium" }) }));
|
|
487
487
|
};
|
|
488
488
|
|
|
489
|
-
const cvaText = cssClassVarianceUtilities.cvaMerge(["m-0", "relative", "text-sm", "font-normal"], {
|
|
489
|
+
const cvaText = cssClassVarianceUtilities.cvaMerge(["text-black", "m-0", "relative", "text-sm", "font-normal"], {
|
|
490
490
|
variants: {
|
|
491
491
|
align: {
|
|
492
492
|
left: "text-left",
|
|
@@ -524,11 +524,17 @@ const cvaText = cssClassVarianceUtilities.cvaMerge(["m-0", "relative", "text-sm"
|
|
|
524
524
|
medium: "text-sm",
|
|
525
525
|
large: "text-base",
|
|
526
526
|
},
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
527
|
+
inverted: {
|
|
528
|
+
true: "text-white",
|
|
529
|
+
false: "",
|
|
530
|
+
},
|
|
531
|
+
subtle: {
|
|
532
|
+
true: "opacity-70",
|
|
533
|
+
false: "",
|
|
534
|
+
},
|
|
535
|
+
disabled: {
|
|
536
|
+
true: "opacity-50",
|
|
537
|
+
false: "",
|
|
532
538
|
},
|
|
533
539
|
},
|
|
534
540
|
});
|
|
@@ -544,9 +550,19 @@ const cvaText = cssClassVarianceUtilities.cvaMerge(["m-0", "relative", "text-sm"
|
|
|
544
550
|
* @returns {JSX.Element} Text component
|
|
545
551
|
*/
|
|
546
552
|
const Text = (_a) => {
|
|
547
|
-
var { children, type = "p", size = "medium", align = "left", weight = "normal", underline = false, inverted = false, subtle = false, italicize = false, uppercase = false, className, dataTestId } = _a, rest = __rest$1(_a, ["children", "type", "size", "align", "weight", "underline", "inverted", "subtle", "italicize", "uppercase", "className", "dataTestId"]);
|
|
548
|
-
|
|
549
|
-
|
|
553
|
+
var { children, type = "p", size = "medium", align = "left", weight = "normal", underline = false, inverted = false, subtle = false, italicize = false, uppercase = false, disabled = false, className, dataTestId } = _a, rest = __rest$1(_a, ["children", "type", "size", "align", "weight", "underline", "inverted", "subtle", "italicize", "uppercase", "disabled", "className", "dataTestId"]);
|
|
554
|
+
return React__namespace.createElement(type, Object.assign({ className: cvaText({
|
|
555
|
+
inverted,
|
|
556
|
+
uppercase,
|
|
557
|
+
align,
|
|
558
|
+
italic: italicize,
|
|
559
|
+
size,
|
|
560
|
+
underline,
|
|
561
|
+
weight,
|
|
562
|
+
subtle,
|
|
563
|
+
disabled,
|
|
564
|
+
className,
|
|
565
|
+
}), "data-testid": dataTestId, children }, rest));
|
|
550
566
|
};
|
|
551
567
|
|
|
552
568
|
const cvaAlert = cssClassVarianceUtilities.cvaMerge(["flex", "relative", "p-4", "rounded"], {
|
|
@@ -727,16 +743,23 @@ const cvaCard = cssClassVarianceUtilities.cvaMerge([
|
|
|
727
743
|
fullHeight: false,
|
|
728
744
|
},
|
|
729
745
|
});
|
|
730
|
-
const
|
|
731
|
-
const cvaCardFooterDensityContainer = cssClassVarianceUtilities.cvaMerge(["border-t-2", "border-neutral-200", "justify-end"], {
|
|
746
|
+
const cvaCardFooterDensityContainer = cssClassVarianceUtilities.cvaMerge(["border-t-2", "border-neutral-200", "justify-end", "flex-row"], {
|
|
732
747
|
variants: {
|
|
733
748
|
border: {
|
|
734
749
|
default: "",
|
|
735
750
|
borderless: "border-t-0",
|
|
736
751
|
},
|
|
752
|
+
density: {
|
|
753
|
+
none: "",
|
|
754
|
+
compact: "gap-3 p-3",
|
|
755
|
+
comfortable: "gap-4 p-4",
|
|
756
|
+
spacious: "gap-4 p-6",
|
|
757
|
+
auto: " component-card-spacing sm:component-card-spacing-sm md:component-card-spacing-md",
|
|
758
|
+
},
|
|
737
759
|
},
|
|
738
760
|
defaultVariants: {
|
|
739
761
|
border: "default",
|
|
762
|
+
density: "auto",
|
|
740
763
|
},
|
|
741
764
|
});
|
|
742
765
|
const cvaCardHeader = cssClassVarianceUtilities.cvaMerge(["flex", "justify-between"]);
|
|
@@ -747,12 +770,20 @@ const cvaCardHeaderDensityContainer = cssClassVarianceUtilities.cvaMerge(["borde
|
|
|
747
770
|
default: "",
|
|
748
771
|
borderless: "border-b-0",
|
|
749
772
|
},
|
|
773
|
+
density: {
|
|
774
|
+
none: "",
|
|
775
|
+
compact: "gap-3 p-3",
|
|
776
|
+
comfortable: "gap-4 p-4",
|
|
777
|
+
spacious: "gap-4 p-6",
|
|
778
|
+
auto: " component-card-spacing sm:component-card-spacing-sm md:component-card-spacing-md",
|
|
779
|
+
},
|
|
750
780
|
},
|
|
751
781
|
defaultVariants: {
|
|
752
782
|
border: "default",
|
|
783
|
+
density: "auto",
|
|
753
784
|
},
|
|
754
785
|
});
|
|
755
|
-
const
|
|
786
|
+
const cvaCardBodyDensityContainer = cssClassVarianceUtilities.cvaMerge(["flex", "flex-grow", "overflow-auto"], {
|
|
756
787
|
variants: {
|
|
757
788
|
disableGap: {
|
|
758
789
|
true: "gap-0",
|
|
@@ -792,18 +823,6 @@ const Card = (_a) => {
|
|
|
792
823
|
return (jsxRuntime.jsx("div", Object.assign({ onClick: onClick, className: cvaCard({ fullHeight, clickable: Boolean(onClick), className }), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, "data-testid": dataTestId, role: ROLE_CARD }, rest, { children: children })));
|
|
793
824
|
};
|
|
794
825
|
|
|
795
|
-
/**
|
|
796
|
-
* The DensityContainer component applies gap and padding.
|
|
797
|
-
* The padding should live here, and not on the Card itself, as to not inset the scrollbar in case of overflow.
|
|
798
|
-
*
|
|
799
|
-
* @summary For applying auto padding and gap to a Card or Modal or whatever.
|
|
800
|
-
* @param {ContainerProps} props - The props for the DensityContainer component
|
|
801
|
-
* @returns {JSX.Element} DensityContainer component
|
|
802
|
-
*/
|
|
803
|
-
const DensityContainer = ({ children, className, dataTestId, density, disableGap, direction, }) => {
|
|
804
|
-
return (jsxRuntime.jsx("div", { className: cvaCardDensityContainer({ className, disableGap, density, direction }), "data-testid": dataTestId, children: children }));
|
|
805
|
-
};
|
|
806
|
-
|
|
807
826
|
/**
|
|
808
827
|
* The CardBody component should be used to inform the user of important information.
|
|
809
828
|
*
|
|
@@ -813,7 +832,7 @@ const DensityContainer = ({ children, className, dataTestId, density, disableGap
|
|
|
813
832
|
* @returns {JSX.Element} CardBody component
|
|
814
833
|
*/
|
|
815
834
|
const CardBody = ({ density = "auto", children, dataTestId, className, disableGap }) => {
|
|
816
|
-
return (jsxRuntime.jsx(
|
|
835
|
+
return (jsxRuntime.jsx("div", { "data-testid": dataTestId, className: cvaCardBodyDensityContainer({ density, disableGap, className }), children: children }));
|
|
817
836
|
};
|
|
818
837
|
|
|
819
838
|
/**
|
|
@@ -825,7 +844,11 @@ const CardBody = ({ density = "auto", children, dataTestId, className, disableGa
|
|
|
825
844
|
* @returns {JSX.Element} CardFooter component
|
|
826
845
|
*/
|
|
827
846
|
const CardFooter = ({ dataTestId, className, children, density, hideSeparator = false }) => {
|
|
828
|
-
return (jsxRuntime.jsx(
|
|
847
|
+
return (jsxRuntime.jsx("div", { "data-testid": dataTestId, className: cvaCardFooterDensityContainer({
|
|
848
|
+
density,
|
|
849
|
+
border: hideSeparator ? "borderless" : "default",
|
|
850
|
+
className,
|
|
851
|
+
}), children: children }));
|
|
829
852
|
};
|
|
830
853
|
|
|
831
854
|
const cvaHeading = cssClassVarianceUtilities.cvaMerge(["m-0", "leading-normal", "text-black"], {
|
|
@@ -883,7 +906,11 @@ const Heading = (_a) => {
|
|
|
883
906
|
* @returns {JSX.Element} CardHeader component
|
|
884
907
|
*/
|
|
885
908
|
const CardHeader = ({ heading, headingVariant = "primary", subHeading, onClose, dataTestId, className, children, accessories, density, extraClassName, hideSeparator = false, }) => {
|
|
886
|
-
return (jsxRuntime.jsx(
|
|
909
|
+
return (jsxRuntime.jsx("div", { "data-testid": dataTestId, className: cvaCardHeaderDensityContainer({
|
|
910
|
+
density,
|
|
911
|
+
border: hideSeparator ? "borderless" : "default",
|
|
912
|
+
className,
|
|
913
|
+
}), children: jsxRuntime.jsxs("div", { className: cvaCardHeader(), children: [jsxRuntime.jsxs("div", { className: extraClassName, children: [jsxRuntime.jsxs("div", { className: cvaCardHeaderHeadingContainer(), children: [jsxRuntime.jsx(Heading, { className: "self-center", variant: headingVariant, children: heading }), accessories] }), subHeading && (jsxRuntime.jsx(Heading, { subtle: true, variant: "subtitle", children: subHeading })), children] }), onClose && (jsxRuntime.jsx(IconButton, { dataTestId: "card-header-close-button", variant: "transparent", color: "secondary", onClick: onClose, icon: jsxRuntime.jsx(Icon, { name: "XMark", size: "small" }), className: "!h-min" }))] }) }));
|
|
887
914
|
};
|
|
888
915
|
|
|
889
916
|
function useMountedState() {
|
|
@@ -39211,7 +39238,6 @@ exports.CopyableText = CopyableText;
|
|
|
39211
39238
|
exports.DayPicker = DayPicker;
|
|
39212
39239
|
exports.DayPickerPopover = DayPickerPopover;
|
|
39213
39240
|
exports.DayRangePicker = DayRangePicker;
|
|
39214
|
-
exports.DensityContainer = DensityContainer;
|
|
39215
39241
|
exports.Drawer = Drawer;
|
|
39216
39242
|
exports.EmptyState = EmptyState;
|
|
39217
39243
|
exports.ExternalLink = ExternalLink;
|
package/index.esm.js
CHANGED
|
@@ -457,7 +457,7 @@ const StarButton = ({ starred, onClick }) => {
|
|
|
457
457
|
return (jsx("div", { onClick: onClick, "data-test-id": "starred-filter", children: jsx(Icon, { name: "Star", color: starred ? "primary" : "neutral", type: starred ? "solid" : "outline", size: "medium" }) }));
|
|
458
458
|
};
|
|
459
459
|
|
|
460
|
-
const cvaText = cvaMerge(["m-0", "relative", "text-sm", "font-normal"], {
|
|
460
|
+
const cvaText = cvaMerge(["text-black", "m-0", "relative", "text-sm", "font-normal"], {
|
|
461
461
|
variants: {
|
|
462
462
|
align: {
|
|
463
463
|
left: "text-left",
|
|
@@ -495,11 +495,17 @@ const cvaText = cvaMerge(["m-0", "relative", "text-sm", "font-normal"], {
|
|
|
495
495
|
medium: "text-sm",
|
|
496
496
|
large: "text-base",
|
|
497
497
|
},
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
498
|
+
inverted: {
|
|
499
|
+
true: "text-white",
|
|
500
|
+
false: "",
|
|
501
|
+
},
|
|
502
|
+
subtle: {
|
|
503
|
+
true: "opacity-70",
|
|
504
|
+
false: "",
|
|
505
|
+
},
|
|
506
|
+
disabled: {
|
|
507
|
+
true: "opacity-50",
|
|
508
|
+
false: "",
|
|
503
509
|
},
|
|
504
510
|
},
|
|
505
511
|
});
|
|
@@ -515,9 +521,19 @@ const cvaText = cvaMerge(["m-0", "relative", "text-sm", "font-normal"], {
|
|
|
515
521
|
* @returns {JSX.Element} Text component
|
|
516
522
|
*/
|
|
517
523
|
const Text = (_a) => {
|
|
518
|
-
var { children, type = "p", size = "medium", align = "left", weight = "normal", underline = false, inverted = false, subtle = false, italicize = false, uppercase = false, className, dataTestId } = _a, rest = __rest$1(_a, ["children", "type", "size", "align", "weight", "underline", "inverted", "subtle", "italicize", "uppercase", "className", "dataTestId"]);
|
|
519
|
-
|
|
520
|
-
|
|
524
|
+
var { children, type = "p", size = "medium", align = "left", weight = "normal", underline = false, inverted = false, subtle = false, italicize = false, uppercase = false, disabled = false, className, dataTestId } = _a, rest = __rest$1(_a, ["children", "type", "size", "align", "weight", "underline", "inverted", "subtle", "italicize", "uppercase", "disabled", "className", "dataTestId"]);
|
|
525
|
+
return React.createElement(type, Object.assign({ className: cvaText({
|
|
526
|
+
inverted,
|
|
527
|
+
uppercase,
|
|
528
|
+
align,
|
|
529
|
+
italic: italicize,
|
|
530
|
+
size,
|
|
531
|
+
underline,
|
|
532
|
+
weight,
|
|
533
|
+
subtle,
|
|
534
|
+
disabled,
|
|
535
|
+
className,
|
|
536
|
+
}), "data-testid": dataTestId, children }, rest));
|
|
521
537
|
};
|
|
522
538
|
|
|
523
539
|
const cvaAlert = cvaMerge(["flex", "relative", "p-4", "rounded"], {
|
|
@@ -698,16 +714,23 @@ const cvaCard = cvaMerge([
|
|
|
698
714
|
fullHeight: false,
|
|
699
715
|
},
|
|
700
716
|
});
|
|
701
|
-
const
|
|
702
|
-
const cvaCardFooterDensityContainer = cvaMerge(["border-t-2", "border-neutral-200", "justify-end"], {
|
|
717
|
+
const cvaCardFooterDensityContainer = cvaMerge(["border-t-2", "border-neutral-200", "justify-end", "flex-row"], {
|
|
703
718
|
variants: {
|
|
704
719
|
border: {
|
|
705
720
|
default: "",
|
|
706
721
|
borderless: "border-t-0",
|
|
707
722
|
},
|
|
723
|
+
density: {
|
|
724
|
+
none: "",
|
|
725
|
+
compact: "gap-3 p-3",
|
|
726
|
+
comfortable: "gap-4 p-4",
|
|
727
|
+
spacious: "gap-4 p-6",
|
|
728
|
+
auto: " component-card-spacing sm:component-card-spacing-sm md:component-card-spacing-md",
|
|
729
|
+
},
|
|
708
730
|
},
|
|
709
731
|
defaultVariants: {
|
|
710
732
|
border: "default",
|
|
733
|
+
density: "auto",
|
|
711
734
|
},
|
|
712
735
|
});
|
|
713
736
|
const cvaCardHeader = cvaMerge(["flex", "justify-between"]);
|
|
@@ -718,12 +741,20 @@ const cvaCardHeaderDensityContainer = cvaMerge(["border-b-2", "border-neutral-20
|
|
|
718
741
|
default: "",
|
|
719
742
|
borderless: "border-b-0",
|
|
720
743
|
},
|
|
744
|
+
density: {
|
|
745
|
+
none: "",
|
|
746
|
+
compact: "gap-3 p-3",
|
|
747
|
+
comfortable: "gap-4 p-4",
|
|
748
|
+
spacious: "gap-4 p-6",
|
|
749
|
+
auto: " component-card-spacing sm:component-card-spacing-sm md:component-card-spacing-md",
|
|
750
|
+
},
|
|
721
751
|
},
|
|
722
752
|
defaultVariants: {
|
|
723
753
|
border: "default",
|
|
754
|
+
density: "auto",
|
|
724
755
|
},
|
|
725
756
|
});
|
|
726
|
-
const
|
|
757
|
+
const cvaCardBodyDensityContainer = cvaMerge(["flex", "flex-grow", "overflow-auto"], {
|
|
727
758
|
variants: {
|
|
728
759
|
disableGap: {
|
|
729
760
|
true: "gap-0",
|
|
@@ -763,18 +794,6 @@ const Card = (_a) => {
|
|
|
763
794
|
return (jsx("div", Object.assign({ onClick: onClick, className: cvaCard({ fullHeight, clickable: Boolean(onClick), className }), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, "data-testid": dataTestId, role: ROLE_CARD }, rest, { children: children })));
|
|
764
795
|
};
|
|
765
796
|
|
|
766
|
-
/**
|
|
767
|
-
* The DensityContainer component applies gap and padding.
|
|
768
|
-
* The padding should live here, and not on the Card itself, as to not inset the scrollbar in case of overflow.
|
|
769
|
-
*
|
|
770
|
-
* @summary For applying auto padding and gap to a Card or Modal or whatever.
|
|
771
|
-
* @param {ContainerProps} props - The props for the DensityContainer component
|
|
772
|
-
* @returns {JSX.Element} DensityContainer component
|
|
773
|
-
*/
|
|
774
|
-
const DensityContainer = ({ children, className, dataTestId, density, disableGap, direction, }) => {
|
|
775
|
-
return (jsx("div", { className: cvaCardDensityContainer({ className, disableGap, density, direction }), "data-testid": dataTestId, children: children }));
|
|
776
|
-
};
|
|
777
|
-
|
|
778
797
|
/**
|
|
779
798
|
* The CardBody component should be used to inform the user of important information.
|
|
780
799
|
*
|
|
@@ -784,7 +803,7 @@ const DensityContainer = ({ children, className, dataTestId, density, disableGap
|
|
|
784
803
|
* @returns {JSX.Element} CardBody component
|
|
785
804
|
*/
|
|
786
805
|
const CardBody = ({ density = "auto", children, dataTestId, className, disableGap }) => {
|
|
787
|
-
return (jsx(
|
|
806
|
+
return (jsx("div", { "data-testid": dataTestId, className: cvaCardBodyDensityContainer({ density, disableGap, className }), children: children }));
|
|
788
807
|
};
|
|
789
808
|
|
|
790
809
|
/**
|
|
@@ -796,7 +815,11 @@ const CardBody = ({ density = "auto", children, dataTestId, className, disableGa
|
|
|
796
815
|
* @returns {JSX.Element} CardFooter component
|
|
797
816
|
*/
|
|
798
817
|
const CardFooter = ({ dataTestId, className, children, density, hideSeparator = false }) => {
|
|
799
|
-
return (jsx(
|
|
818
|
+
return (jsx("div", { "data-testid": dataTestId, className: cvaCardFooterDensityContainer({
|
|
819
|
+
density,
|
|
820
|
+
border: hideSeparator ? "borderless" : "default",
|
|
821
|
+
className,
|
|
822
|
+
}), children: children }));
|
|
800
823
|
};
|
|
801
824
|
|
|
802
825
|
const cvaHeading = cvaMerge(["m-0", "leading-normal", "text-black"], {
|
|
@@ -854,7 +877,11 @@ const Heading = (_a) => {
|
|
|
854
877
|
* @returns {JSX.Element} CardHeader component
|
|
855
878
|
*/
|
|
856
879
|
const CardHeader = ({ heading, headingVariant = "primary", subHeading, onClose, dataTestId, className, children, accessories, density, extraClassName, hideSeparator = false, }) => {
|
|
857
|
-
return (jsx(
|
|
880
|
+
return (jsx("div", { "data-testid": dataTestId, className: cvaCardHeaderDensityContainer({
|
|
881
|
+
density,
|
|
882
|
+
border: hideSeparator ? "borderless" : "default",
|
|
883
|
+
className,
|
|
884
|
+
}), children: jsxs("div", { className: cvaCardHeader(), children: [jsxs("div", { className: extraClassName, children: [jsxs("div", { className: cvaCardHeaderHeadingContainer(), children: [jsx(Heading, { className: "self-center", variant: headingVariant, children: heading }), accessories] }), subHeading && (jsx(Heading, { subtle: true, variant: "subtitle", children: subHeading })), children] }), onClose && (jsx(IconButton, { dataTestId: "card-header-close-button", variant: "transparent", color: "secondary", onClick: onClose, icon: jsx(Icon, { name: "XMark", size: "small" }), className: "!h-min" }))] }) }));
|
|
858
885
|
};
|
|
859
886
|
|
|
860
887
|
function useMountedState() {
|
|
@@ -39170,4 +39197,4 @@ const useVisibilityChange = ({ onChange, targetState }) => {
|
|
|
39170
39197
|
}, [onChange, targetState]);
|
|
39171
39198
|
};
|
|
39172
39199
|
|
|
39173
|
-
export { Alert, Badge, Button$1 as Button, Card, CardBody, CardFooter, CardHeader, Collapse, CopyableText, DayPicker, DayPickerPopover, DayRangePicker,
|
|
39200
|
+
export { Alert, Badge, Button$1 as Button, Card, CardBody, CardFooter, CardHeader, Collapse, CopyableText, DayPicker, DayPickerPopover, DayRangePicker, Drawer, EmptyState, ExternalLink, Heading, Icon, IconButton, Indicator, MenuItem, MenuList, Modal, ModalBackdrop, MoreMenu, PageHeader, Pagination, Popover, PopoverContent, PopoverTitle, PopoverTrigger, Prompt, ROLE_CARD, SectionHeader, Sidebar, SkeletonLines, Spacer, Spinner, StarButton, Tag, Text, Timeline, TimelineElement, Tip, Tooltip, ValueBar, cvaButton, cvaButtonSpinner, cvaClickable, cvaIconButtonContainer, cvaIndicator, cvaIndicatorIcon, cvaIndicatorIconBackground, cvaIndicatorLabel, cvaIndicatorPing, cvaMenuItem, cvaMenuItemLabel, cvaMenuItemPrefix, cvaMenuItemSuffix, docs, getDevicePixelRatio, getValueBarColorByValue, iconColorNames, iconPalette, setLocalStorage, useClickOutside, useContainerProps, useContinuousTimeout, useDebounce, useDevicePixelRatio, useHover, useIsFirstRender, useIsTextCutOff, useLocalStorage, useLocalStorageReducer, useModal, usePopoverContext, usePrompt, useResize, useTimeout, useVisibilityChange };
|
package/package.json
CHANGED
|
@@ -2,16 +2,17 @@ export declare const cvaCard: (props?: ({
|
|
|
2
2
|
clickable?: boolean | null | undefined;
|
|
3
3
|
fullHeight?: boolean | null | undefined;
|
|
4
4
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
5
|
-
export declare const cvaCardBody: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
6
5
|
export declare const cvaCardFooterDensityContainer: (props?: ({
|
|
7
6
|
border?: "default" | "borderless" | null | undefined;
|
|
7
|
+
density?: "none" | "compact" | "comfortable" | "spacious" | "auto" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
9
9
|
export declare const cvaCardHeader: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
10
10
|
export declare const cvaCardHeaderHeadingContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
11
11
|
export declare const cvaCardHeaderDensityContainer: (props?: ({
|
|
12
12
|
border?: "default" | "borderless" | null | undefined;
|
|
13
|
+
density?: "none" | "compact" | "comfortable" | "spacious" | "auto" | null | undefined;
|
|
13
14
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
14
|
-
export declare const
|
|
15
|
+
export declare const cvaCardBodyDensityContainer: (props?: ({
|
|
15
16
|
disableGap?: boolean | null | undefined;
|
|
16
17
|
direction?: "row" | "row-reverse" | "column" | "column-reverse" | null | undefined;
|
|
17
18
|
density?: "none" | "compact" | "comfortable" | "spacious" | "auto" | null | undefined;
|
|
@@ -44,6 +44,10 @@ export interface TextProps extends CommonProps {
|
|
|
44
44
|
* Whether text is underlined or not.
|
|
45
45
|
*/
|
|
46
46
|
underline?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether text is disabled or not.
|
|
49
|
+
*/
|
|
50
|
+
disabled?: boolean;
|
|
47
51
|
}
|
|
48
52
|
/**
|
|
49
53
|
* The Text component is used to apply Trackunit default typography styles to text.
|
|
@@ -55,4 +59,4 @@ export interface TextProps extends CommonProps {
|
|
|
55
59
|
* @param {TextProps} props - The props for the Text component
|
|
56
60
|
* @returns {JSX.Element} Text component
|
|
57
61
|
*/
|
|
58
|
-
export declare const Text: ({ children, type, size, align, weight, underline, inverted, subtle, italicize, uppercase, className, dataTestId, ...rest }: TextProps) => JSX.Element;
|
|
62
|
+
export declare const Text: ({ children, type, size, align, weight, underline, inverted, subtle, italicize, uppercase, disabled, className, dataTestId, ...rest }: TextProps) => JSX.Element;
|
|
@@ -5,5 +5,7 @@ export declare const cvaText: (props?: ({
|
|
|
5
5
|
underline?: boolean | null | undefined;
|
|
6
6
|
weight?: "normal" | "bold" | "thick" | null | undefined;
|
|
7
7
|
size?: "small" | "medium" | "large" | null | undefined;
|
|
8
|
-
|
|
8
|
+
inverted?: boolean | null | undefined;
|
|
9
|
+
subtle?: boolean | null | undefined;
|
|
10
|
+
disabled?: boolean | null | undefined;
|
|
9
11
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { CommonProps, Density } from "../../common/CommonProps";
|
|
3
|
-
interface ContainerProps extends CommonProps {
|
|
4
|
-
/**
|
|
5
|
-
* The density of the card components.
|
|
6
|
-
* "compact" = 12px gap and padding.
|
|
7
|
-
* "comfortable" = 16px gap and padding.
|
|
8
|
-
* "spacious" = 16px gap, 26px padding.
|
|
9
|
-
*/
|
|
10
|
-
density?: Density;
|
|
11
|
-
/**
|
|
12
|
-
* Set gap to be 0px (not preferable)
|
|
13
|
-
*/
|
|
14
|
-
disableGap?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* The flex direction of the Card. Defaults to "column".
|
|
17
|
-
*/
|
|
18
|
-
direction?: "row" | "row-reverse" | "column" | "column-reverse";
|
|
19
|
-
children?: React.ReactNode;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* The DensityContainer component applies gap and padding.
|
|
23
|
-
* The padding should live here, and not on the Card itself, as to not inset the scrollbar in case of overflow.
|
|
24
|
-
*
|
|
25
|
-
* @summary For applying auto padding and gap to a Card or Modal or whatever.
|
|
26
|
-
* @param {ContainerProps} props - The props for the DensityContainer component
|
|
27
|
-
* @returns {JSX.Element} DensityContainer component
|
|
28
|
-
*/
|
|
29
|
-
export declare const DensityContainer: ({ children, className, dataTestId, density, disableGap, direction, }: ContainerProps) => JSX.Element;
|
|
30
|
-
export {};
|