@televet/kibble-ui 1.17.5 → 1.17.6-beta.43w39py.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/Feedback/Alert/alert.component.d.ts +5 -3
- package/build/components/Feedback/Alert/components/AlertButton/alertButton.component.d.ts +1 -2
- package/build/components/Feedback/feedback.model.d.ts +3 -0
- package/build/components/Feedback/index.d.ts +2 -0
- package/build/index.js +157 -146
- package/build/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { AlertProps as CAlertProps } from '@chakra-ui/react';
|
|
3
3
|
import { IconProps } from 'components/MediaAndIcons';
|
|
4
4
|
import { AlertVariant } from './alert.types';
|
|
5
5
|
import { ButtonProps } from 'components/Forms/Button';
|
|
6
6
|
import { TextProps } from 'components/Typography/Text';
|
|
7
7
|
import { Status } from '../feedback.types';
|
|
8
|
+
import { HeadingProps } from '../../Typography';
|
|
8
9
|
export interface AlertProps extends CAlertProps {
|
|
10
|
+
children?: ReactNode;
|
|
9
11
|
status?: AlertVariant | Status;
|
|
10
12
|
showIcon?: boolean;
|
|
11
13
|
iconProps?: IconProps;
|
|
@@ -13,10 +15,10 @@ export interface AlertProps extends CAlertProps {
|
|
|
13
15
|
buttonProps?: ButtonProps;
|
|
14
16
|
buttonTitle?: string;
|
|
15
17
|
alertTitle: string;
|
|
16
|
-
titleProps?:
|
|
18
|
+
titleProps?: HeadingProps;
|
|
17
19
|
description?: string;
|
|
18
20
|
descriptionProps?: TextProps;
|
|
19
21
|
showCloseButton?: boolean;
|
|
20
22
|
onClose?: React.MouseEventHandler<HTMLButtonElement>;
|
|
21
23
|
}
|
|
22
|
-
export declare const Alert: ({ status, showIcon, iconProps, showButton, buttonProps, buttonTitle, alertTitle, titleProps, description, descriptionProps, showCloseButton, onClose, ...rest }: AlertProps) => JSX.Element;
|
|
24
|
+
export declare const Alert: ({ children, status, showIcon, iconProps, showButton, buttonProps, buttonTitle, alertTitle, titleProps, description, descriptionProps, showCloseButton, onClose, ...rest }: AlertProps) => JSX.Element;
|
|
@@ -2,6 +2,5 @@ import { AlertButtonAlignment } from '../../alert.types';
|
|
|
2
2
|
import { ButtonProps } from 'components/Forms/Button';
|
|
3
3
|
export interface AlertButtonProps extends ButtonProps {
|
|
4
4
|
alignment: AlertButtonAlignment;
|
|
5
|
-
pairedWithCloseButton?: boolean;
|
|
6
5
|
}
|
|
7
|
-
export declare const AlertButton: ({ alignment, variant, size,
|
|
6
|
+
export declare const AlertButton: ({ alignment, variant, size, ...rest }: AlertButtonProps) => JSX.Element;
|
package/build/index.js
CHANGED
|
@@ -3494,8 +3494,8 @@ var ButtonSizeConfig = {
|
|
|
3494
3494
|
};
|
|
3495
3495
|
|
|
3496
3496
|
var AlertButton = function (_a) {
|
|
3497
|
-
var alignment = _a.alignment, _b = _a.variant, variant = _b === void 0 ? 'secondary' : _b, _c = _a.size, size = _c === void 0 ? 'xs' : _c,
|
|
3498
|
-
return (React__default["default"].createElement(Button, __assign({ size: size, variant: variant }, rest, (alignment === 'bottom' && { mt: 2, mb: 1 })
|
|
3497
|
+
var alignment = _a.alignment, _b = _a.variant, variant = _b === void 0 ? 'secondary' : _b, _c = _a.size, size = _c === void 0 ? 'xs' : _c, rest = __rest(_a, ["alignment", "variant", "size"]);
|
|
3498
|
+
return (React__default["default"].createElement(Button, __assign({ size: size, variant: variant }, rest, (alignment === 'bottom' && { mt: 2, mb: 1 })), rest.children));
|
|
3499
3499
|
};
|
|
3500
3500
|
|
|
3501
3501
|
var AlertIconColorMap = {
|
|
@@ -3630,25 +3630,165 @@ var useOverflowingText = function (text, textRef) {
|
|
|
3630
3630
|
return isTextOverFlowing;
|
|
3631
3631
|
};
|
|
3632
3632
|
|
|
3633
|
+
var Heading = function (_a) {
|
|
3634
|
+
var children = _a.children, _b = _a.size, size = _b === void 0 ? 'lg' : _b, color = _a.color, _c = _a.colorToken, colorToken = _c === void 0 ? 'headline' : _c, _d = _a.darkMode, darkMode = _d === void 0 ? false : _d, rest = __rest(_a, ["children", "size", "color", "colorToken", "darkMode"]);
|
|
3635
|
+
var _e = useTheme(), components = _e.components, colors = _e.colors;
|
|
3636
|
+
var adaptiveColor = useAdaptiveColorMap(colors.text, colorToken, darkMode);
|
|
3637
|
+
var variant = react.useBreakpointValue({ base: 'small', md: 'large' }) || 'small';
|
|
3638
|
+
var sizes = components.Heading.variants[variant].sizes;
|
|
3639
|
+
var sizeProps = !sizes ? undefined : sizes[size];
|
|
3640
|
+
return (React__default["default"].createElement(react.Heading, __assign({ variant: variant }, sizeProps, { color: color || adaptiveColor }, rest), children));
|
|
3641
|
+
};
|
|
3642
|
+
|
|
3643
|
+
var HeadingConfig = {
|
|
3644
|
+
variants: {
|
|
3645
|
+
large: {
|
|
3646
|
+
sizes: {
|
|
3647
|
+
xs: {
|
|
3648
|
+
fontSize: '14px',
|
|
3649
|
+
lineHeight: '120%',
|
|
3650
|
+
fontWeight: fontWeights.semibold,
|
|
3651
|
+
},
|
|
3652
|
+
sm: {
|
|
3653
|
+
fontSize: '16px',
|
|
3654
|
+
lineHeight: '120%',
|
|
3655
|
+
fontWeight: fontWeights.semibold,
|
|
3656
|
+
},
|
|
3657
|
+
md: {
|
|
3658
|
+
fontSize: '20px',
|
|
3659
|
+
lineHeight: '120%',
|
|
3660
|
+
fontWeight: fontWeights.semibold,
|
|
3661
|
+
},
|
|
3662
|
+
lg: {
|
|
3663
|
+
fontSize: '30px',
|
|
3664
|
+
lineHeight: '133%',
|
|
3665
|
+
fontWeight: fontWeights.semibold,
|
|
3666
|
+
},
|
|
3667
|
+
xl: {
|
|
3668
|
+
fontSize: '36px',
|
|
3669
|
+
lineHeight: '133%',
|
|
3670
|
+
fontWeight: fontWeights.semibold,
|
|
3671
|
+
},
|
|
3672
|
+
'2xl': {
|
|
3673
|
+
fontSize: '48px',
|
|
3674
|
+
lineHeight: '120%',
|
|
3675
|
+
fontWeight: fontWeights.semibold,
|
|
3676
|
+
},
|
|
3677
|
+
'3xl': {
|
|
3678
|
+
fontSize: '60px',
|
|
3679
|
+
lineHeight: '100%',
|
|
3680
|
+
fontWeight: fontWeights.semibold,
|
|
3681
|
+
},
|
|
3682
|
+
'4xl': {
|
|
3683
|
+
fontSize: '72px',
|
|
3684
|
+
lineHeight: '100%',
|
|
3685
|
+
fontWeight: fontWeights.semibold,
|
|
3686
|
+
},
|
|
3687
|
+
},
|
|
3688
|
+
},
|
|
3689
|
+
small: {
|
|
3690
|
+
sizes: {
|
|
3691
|
+
xs: {
|
|
3692
|
+
fontSize: '14px',
|
|
3693
|
+
lineHeight: '120%',
|
|
3694
|
+
fontWeight: fontWeights.semibold,
|
|
3695
|
+
},
|
|
3696
|
+
sm: {
|
|
3697
|
+
fontSize: '16px',
|
|
3698
|
+
lineHeight: '120%',
|
|
3699
|
+
fontWeight: fontWeights.semibold,
|
|
3700
|
+
},
|
|
3701
|
+
md: {
|
|
3702
|
+
fontSize: '20px',
|
|
3703
|
+
lineHeight: '120%',
|
|
3704
|
+
fontWeight: fontWeights.semibold,
|
|
3705
|
+
},
|
|
3706
|
+
lg: {
|
|
3707
|
+
fontSize: '24px',
|
|
3708
|
+
lineHeight: '133%',
|
|
3709
|
+
fontWeight: fontWeights.semibold,
|
|
3710
|
+
},
|
|
3711
|
+
xl: {
|
|
3712
|
+
fontSize: '30px',
|
|
3713
|
+
lineHeight: '133%',
|
|
3714
|
+
fontWeight: fontWeights.semibold,
|
|
3715
|
+
},
|
|
3716
|
+
'2xl': {
|
|
3717
|
+
fontSize: '36px',
|
|
3718
|
+
lineHeight: '120%',
|
|
3719
|
+
fontWeight: fontWeights.semibold,
|
|
3720
|
+
},
|
|
3721
|
+
'3xl': {
|
|
3722
|
+
fontSize: '48px',
|
|
3723
|
+
lineHeight: '100%',
|
|
3724
|
+
fontWeight: fontWeights.semibold,
|
|
3725
|
+
},
|
|
3726
|
+
'4xl': {
|
|
3727
|
+
fontSize: '60px',
|
|
3728
|
+
lineHeight: '100%',
|
|
3729
|
+
fontWeight: fontWeights.semibold,
|
|
3730
|
+
},
|
|
3731
|
+
},
|
|
3732
|
+
},
|
|
3733
|
+
},
|
|
3734
|
+
};
|
|
3735
|
+
|
|
3736
|
+
var TruncatedText = function (_a) {
|
|
3737
|
+
var _b = _a.noOfLines, noOfLines = _b === void 0 ? 1 : _b, textContent = _a.textContent, placement = _a.placement, titleCaseTooltipLabel = _a.titleCaseTooltipLabel, rest = __rest(_a, ["noOfLines", "textContent", "placement", "titleCaseTooltipLabel"]);
|
|
3738
|
+
var _c = __read(React.useState(false), 2), isTextOverFlowing = _c[0], setIsTextOverFlowing = _c[1];
|
|
3739
|
+
var containerRef = React.useRef(null);
|
|
3740
|
+
var onCheckTextOverFlowing = React.useCallback(function (containerRefValue) {
|
|
3741
|
+
var _a, _b;
|
|
3742
|
+
if (containerRefValue && containerRefValue.current) {
|
|
3743
|
+
var textScrollHeight = ((_a = containerRefValue.current) === null || _a === void 0 ? void 0 : _a.children[0].scrollHeight) || 0;
|
|
3744
|
+
var containerOffsetHeight = ((_b = containerRefValue.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) || 0;
|
|
3745
|
+
return textScrollHeight > containerOffsetHeight;
|
|
3746
|
+
}
|
|
3747
|
+
return false;
|
|
3748
|
+
}, []);
|
|
3749
|
+
React.useEffect(function () {
|
|
3750
|
+
var checkValue = onCheckTextOverFlowing(containerRef);
|
|
3751
|
+
setIsTextOverFlowing(checkValue);
|
|
3752
|
+
}, [containerRef, onCheckTextOverFlowing]);
|
|
3753
|
+
return (React__default["default"].createElement(react.Box, { ref: containerRef, className: "TruncatedText__Wrapper" },
|
|
3754
|
+
React__default["default"].createElement(Tooltip, { className: "TruncatedText__Tooltip", label: textContent || '', isDisabled: !isTextOverFlowing, placement: placement, titleCaseLabel: titleCaseTooltipLabel },
|
|
3755
|
+
React__default["default"].createElement(react.Text, __assign({ className: "TruncatedText__TextContent", noOfLines: noOfLines, as: "p" }, rest), textContent))));
|
|
3756
|
+
};
|
|
3757
|
+
|
|
3758
|
+
var LightStatusVariantMap = {
|
|
3759
|
+
info: 'info',
|
|
3760
|
+
success: 'success',
|
|
3761
|
+
warning: 'warning',
|
|
3762
|
+
error: 'error',
|
|
3763
|
+
};
|
|
3764
|
+
var DarkStatusVariantMap = {
|
|
3765
|
+
info: 'infoDark',
|
|
3766
|
+
success: 'successDark',
|
|
3767
|
+
warning: 'warningDark',
|
|
3768
|
+
error: 'errorDark',
|
|
3769
|
+
};
|
|
3770
|
+
|
|
3633
3771
|
var Alert = function (_a) {
|
|
3634
|
-
var _b = _a.status, status = _b === void 0 ? exports.AlertVariant.Success : _b, _c = _a.showIcon, showIcon = _c === void 0 ? true : _c, iconProps = _a.iconProps, _d = _a.showButton, showButton = _d === void 0 ? false : _d, buttonProps = _a.buttonProps, buttonTitle = _a.buttonTitle, alertTitle = _a.alertTitle, titleProps = _a.titleProps, description = _a.description, descriptionProps = _a.descriptionProps, _e = _a.showCloseButton, showCloseButton = _e === void 0 ? true : _e, onClose = _a.onClose, rest = __rest(_a, ["status", "showIcon", "iconProps", "showButton", "buttonProps", "buttonTitle", "alertTitle", "titleProps", "description", "descriptionProps", "showCloseButton", "onClose"]);
|
|
3772
|
+
var children = _a.children, _b = _a.status, status = _b === void 0 ? exports.AlertVariant.Success : _b, _c = _a.showIcon, showIcon = _c === void 0 ? true : _c, iconProps = _a.iconProps, _d = _a.showButton, showButton = _d === void 0 ? false : _d, buttonProps = _a.buttonProps, buttonTitle = _a.buttonTitle, alertTitle = _a.alertTitle, titleProps = _a.titleProps, description = _a.description, descriptionProps = _a.descriptionProps, _e = _a.showCloseButton, showCloseButton = _e === void 0 ? true : _e, onClose = _a.onClose, rest = __rest(_a, ["children", "status", "showIcon", "iconProps", "showButton", "buttonProps", "buttonTitle", "alertTitle", "titleProps", "description", "descriptionProps", "showCloseButton", "onClose"]);
|
|
3635
3773
|
var titleRef = React.useRef(null);
|
|
3636
3774
|
var isTitleOverflowing = useOverflowingText(alertTitle, titleRef);
|
|
3775
|
+
var variant = react.useColorModeValue(LightStatusVariantMap[status], DarkStatusVariantMap[status]);
|
|
3637
3776
|
var showButtonInline = showButton && !description && !isTitleOverflowing;
|
|
3638
3777
|
var showButtonBottom = (showButton && description) || (showButton && !description && isTitleOverflowing);
|
|
3639
|
-
return (React__default["default"].createElement(react.Alert, __assign({ justifyContent: "space-between", overflow: "visible", variant:
|
|
3640
|
-
React__default["default"].createElement(react.
|
|
3641
|
-
showIcon && (React__default["default"].createElement(react.
|
|
3778
|
+
return (React__default["default"].createElement(react.Alert, __assign({ justifyContent: "space-between", overflow: "visible", variant: variant, pl: 3, pr: showCloseButton ? 2 : 3 }, rest),
|
|
3779
|
+
React__default["default"].createElement(react.Flex, { justify: "space-between", w: "100%" },
|
|
3780
|
+
showIcon && (React__default["default"].createElement(react.Box, { mr: 2 },
|
|
3642
3781
|
React__default["default"].createElement(AlertIcon, __assign({ status: status, name: (iconProps === null || iconProps === void 0 ? void 0 : iconProps.name) || exports.AlertStatusIcon[status] }, iconProps)))),
|
|
3643
|
-
React__default["default"].createElement(react.Flex,
|
|
3644
|
-
React__default["default"].createElement(react.Flex, { alignItems: "flex-start", w: "100%", justifyContent: "space-between" },
|
|
3645
|
-
React__default["default"].createElement(react.Box, { ref: titleRef,
|
|
3646
|
-
React__default["default"].createElement(
|
|
3647
|
-
React__default["default"].createElement(
|
|
3648
|
-
|
|
3649
|
-
showCloseButton && React__default["default"].createElement(Button, { variant: "ghostNeutral", iconName: "close", size: "xs", onClick: onClose }))),
|
|
3782
|
+
React__default["default"].createElement(react.Flex, { flexGrow: 1, flexDirection: "column" },
|
|
3783
|
+
React__default["default"].createElement(react.Flex, { alignItems: "flex-start", w: "100%", justifyContent: "space-between", align: "center" },
|
|
3784
|
+
React__default["default"].createElement(react.Box, { ref: titleRef, pt: 0.5 },
|
|
3785
|
+
React__default["default"].createElement(Heading, __assign({ size: "sm", colorToken: "default" }, titleProps), alertTitle)),
|
|
3786
|
+
showButtonInline && (React__default["default"].createElement(AlertButton, __assign({ alignment: "right", ml: 2 }, buttonProps), buttonTitle))),
|
|
3787
|
+
children,
|
|
3650
3788
|
description && (React__default["default"].createElement(Text, __assign({ size: "md" }, descriptionProps), description)),
|
|
3651
|
-
React__default["default"].createElement(react.Box, null, showButtonBottom && (React__default["default"].createElement(AlertButton, __assign({ alignment: "bottom" }, buttonProps), buttonTitle))))
|
|
3789
|
+
React__default["default"].createElement(react.Box, null, showButtonBottom && (React__default["default"].createElement(AlertButton, __assign({ alignment: "bottom" }, buttonProps), buttonTitle)))),
|
|
3790
|
+
showCloseButton && (React__default["default"].createElement(react.Box, { ml: 2 },
|
|
3791
|
+
React__default["default"].createElement(Button, { variant: "ghostNeutral", iconName: "close", size: "xs", onClick: onClose }))))));
|
|
3652
3792
|
};
|
|
3653
3793
|
|
|
3654
3794
|
var AlertConfig = {
|
|
@@ -14228,17 +14368,11 @@ function getToastPlacement(position, dir) {
|
|
|
14228
14368
|
return (_a = logical === null || logical === void 0 ? void 0 : logical[dir]) !== null && _a !== void 0 ? _a : position;
|
|
14229
14369
|
}
|
|
14230
14370
|
|
|
14231
|
-
var StatusVariantMap = {
|
|
14232
|
-
info: 'infoDark',
|
|
14233
|
-
success: 'successDark',
|
|
14234
|
-
warning: 'warningDark',
|
|
14235
|
-
error: 'errorDark',
|
|
14236
|
-
};
|
|
14237
14371
|
var Toast = function (props) {
|
|
14238
14372
|
var _a = props.status, status = _a === void 0 ? 'info' : _a, id = props.id, title = props.title, isClosable = props.isClosable, onClose = props.onClose, description = props.description, buttonTitle = props.buttonTitle, onButtonClick = props.onButtonClick, _b = props.hideIcon, hideIcon = _b === void 0 ? false : _b;
|
|
14239
14373
|
var buttonProps = { onClick: onButtonClick };
|
|
14240
14374
|
return (React__namespace.createElement(react.DarkMode, null,
|
|
14241
|
-
React__namespace.createElement(Alert, { id: id, alertTitle: title, buttonTitle: buttonTitle, description: description, showIcon: !hideIcon, status: status, showCloseButton: isClosable, onClose: onClose, variant:
|
|
14375
|
+
React__namespace.createElement(Alert, { id: id, alertTitle: title, buttonTitle: buttonTitle, description: description, showIcon: !hideIcon, status: status, showCloseButton: isClosable, onClose: onClose, variant: DarkStatusVariantMap[status], showButton: !!onButtonClick && !!buttonTitle, buttonProps: buttonProps })));
|
|
14242
14376
|
};
|
|
14243
14377
|
var defaults = {
|
|
14244
14378
|
title: '',
|
|
@@ -14809,131 +14943,6 @@ var RatingDot = function (_a) {
|
|
|
14809
14943
|
} }, number))) : (React__default["default"].createElement(react.Flex, { as: "div", bgColor: colors.background.brand, h: "40px", w: "40px", borderRadius: "20px", border: "2px solid ".concat(colors.background.brand), color: colors.text.dark.default, mr: 1, mb: 1, justifyContent: "center", alignItems: "center", fontSize: "lg", cursor: "default" }, number))));
|
|
14810
14944
|
};
|
|
14811
14945
|
|
|
14812
|
-
var Heading = function (_a) {
|
|
14813
|
-
var children = _a.children, _b = _a.size, size = _b === void 0 ? 'lg' : _b, color = _a.color, _c = _a.colorToken, colorToken = _c === void 0 ? 'headline' : _c, _d = _a.darkMode, darkMode = _d === void 0 ? false : _d, rest = __rest(_a, ["children", "size", "color", "colorToken", "darkMode"]);
|
|
14814
|
-
var _e = useTheme(), components = _e.components, colors = _e.colors;
|
|
14815
|
-
var adaptiveColor = useAdaptiveColorMap(colors.text, colorToken, darkMode);
|
|
14816
|
-
var variant = react.useBreakpointValue({ base: 'small', md: 'large' }) || 'small';
|
|
14817
|
-
var sizes = components.Heading.variants[variant].sizes;
|
|
14818
|
-
var sizeProps = !sizes ? undefined : sizes[size];
|
|
14819
|
-
return (React__default["default"].createElement(react.Heading, __assign({ variant: variant }, sizeProps, { color: color || adaptiveColor }, rest), children));
|
|
14820
|
-
};
|
|
14821
|
-
|
|
14822
|
-
var HeadingConfig = {
|
|
14823
|
-
variants: {
|
|
14824
|
-
large: {
|
|
14825
|
-
sizes: {
|
|
14826
|
-
xs: {
|
|
14827
|
-
fontSize: '14px',
|
|
14828
|
-
lineHeight: '120%',
|
|
14829
|
-
fontWeight: fontWeights.semibold,
|
|
14830
|
-
},
|
|
14831
|
-
sm: {
|
|
14832
|
-
fontSize: '16px',
|
|
14833
|
-
lineHeight: '120%',
|
|
14834
|
-
fontWeight: fontWeights.semibold,
|
|
14835
|
-
},
|
|
14836
|
-
md: {
|
|
14837
|
-
fontSize: '20px',
|
|
14838
|
-
lineHeight: '120%',
|
|
14839
|
-
fontWeight: fontWeights.semibold,
|
|
14840
|
-
},
|
|
14841
|
-
lg: {
|
|
14842
|
-
fontSize: '30px',
|
|
14843
|
-
lineHeight: '133%',
|
|
14844
|
-
fontWeight: fontWeights.semibold,
|
|
14845
|
-
},
|
|
14846
|
-
xl: {
|
|
14847
|
-
fontSize: '36px',
|
|
14848
|
-
lineHeight: '133%',
|
|
14849
|
-
fontWeight: fontWeights.semibold,
|
|
14850
|
-
},
|
|
14851
|
-
'2xl': {
|
|
14852
|
-
fontSize: '48px',
|
|
14853
|
-
lineHeight: '120%',
|
|
14854
|
-
fontWeight: fontWeights.semibold,
|
|
14855
|
-
},
|
|
14856
|
-
'3xl': {
|
|
14857
|
-
fontSize: '60px',
|
|
14858
|
-
lineHeight: '100%',
|
|
14859
|
-
fontWeight: fontWeights.semibold,
|
|
14860
|
-
},
|
|
14861
|
-
'4xl': {
|
|
14862
|
-
fontSize: '72px',
|
|
14863
|
-
lineHeight: '100%',
|
|
14864
|
-
fontWeight: fontWeights.semibold,
|
|
14865
|
-
},
|
|
14866
|
-
},
|
|
14867
|
-
},
|
|
14868
|
-
small: {
|
|
14869
|
-
sizes: {
|
|
14870
|
-
xs: {
|
|
14871
|
-
fontSize: '14px',
|
|
14872
|
-
lineHeight: '120%',
|
|
14873
|
-
fontWeight: fontWeights.semibold,
|
|
14874
|
-
},
|
|
14875
|
-
sm: {
|
|
14876
|
-
fontSize: '16px',
|
|
14877
|
-
lineHeight: '120%',
|
|
14878
|
-
fontWeight: fontWeights.semibold,
|
|
14879
|
-
},
|
|
14880
|
-
md: {
|
|
14881
|
-
fontSize: '20px',
|
|
14882
|
-
lineHeight: '120%',
|
|
14883
|
-
fontWeight: fontWeights.semibold,
|
|
14884
|
-
},
|
|
14885
|
-
lg: {
|
|
14886
|
-
fontSize: '24px',
|
|
14887
|
-
lineHeight: '133%',
|
|
14888
|
-
fontWeight: fontWeights.semibold,
|
|
14889
|
-
},
|
|
14890
|
-
xl: {
|
|
14891
|
-
fontSize: '30px',
|
|
14892
|
-
lineHeight: '133%',
|
|
14893
|
-
fontWeight: fontWeights.semibold,
|
|
14894
|
-
},
|
|
14895
|
-
'2xl': {
|
|
14896
|
-
fontSize: '36px',
|
|
14897
|
-
lineHeight: '120%',
|
|
14898
|
-
fontWeight: fontWeights.semibold,
|
|
14899
|
-
},
|
|
14900
|
-
'3xl': {
|
|
14901
|
-
fontSize: '48px',
|
|
14902
|
-
lineHeight: '100%',
|
|
14903
|
-
fontWeight: fontWeights.semibold,
|
|
14904
|
-
},
|
|
14905
|
-
'4xl': {
|
|
14906
|
-
fontSize: '60px',
|
|
14907
|
-
lineHeight: '100%',
|
|
14908
|
-
fontWeight: fontWeights.semibold,
|
|
14909
|
-
},
|
|
14910
|
-
},
|
|
14911
|
-
},
|
|
14912
|
-
},
|
|
14913
|
-
};
|
|
14914
|
-
|
|
14915
|
-
var TruncatedText = function (_a) {
|
|
14916
|
-
var _b = _a.noOfLines, noOfLines = _b === void 0 ? 1 : _b, textContent = _a.textContent, placement = _a.placement, titleCaseTooltipLabel = _a.titleCaseTooltipLabel, rest = __rest(_a, ["noOfLines", "textContent", "placement", "titleCaseTooltipLabel"]);
|
|
14917
|
-
var _c = __read(React.useState(false), 2), isTextOverFlowing = _c[0], setIsTextOverFlowing = _c[1];
|
|
14918
|
-
var containerRef = React.useRef(null);
|
|
14919
|
-
var onCheckTextOverFlowing = React.useCallback(function (containerRefValue) {
|
|
14920
|
-
var _a, _b;
|
|
14921
|
-
if (containerRefValue && containerRefValue.current) {
|
|
14922
|
-
var textScrollHeight = ((_a = containerRefValue.current) === null || _a === void 0 ? void 0 : _a.children[0].scrollHeight) || 0;
|
|
14923
|
-
var containerOffsetHeight = ((_b = containerRefValue.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) || 0;
|
|
14924
|
-
return textScrollHeight > containerOffsetHeight;
|
|
14925
|
-
}
|
|
14926
|
-
return false;
|
|
14927
|
-
}, []);
|
|
14928
|
-
React.useEffect(function () {
|
|
14929
|
-
var checkValue = onCheckTextOverFlowing(containerRef);
|
|
14930
|
-
setIsTextOverFlowing(checkValue);
|
|
14931
|
-
}, [containerRef, onCheckTextOverFlowing]);
|
|
14932
|
-
return (React__default["default"].createElement(react.Box, { ref: containerRef, className: "TruncatedText__Wrapper" },
|
|
14933
|
-
React__default["default"].createElement(Tooltip, { className: "TruncatedText__Tooltip", label: textContent || '', isDisabled: !isTextOverFlowing, placement: placement, titleCaseLabel: titleCaseTooltipLabel },
|
|
14934
|
-
React__default["default"].createElement(react.Text, __assign({ className: "TruncatedText__TextContent", noOfLines: noOfLines, as: "p" }, rest), textContent))));
|
|
14935
|
-
};
|
|
14936
|
-
|
|
14937
14946
|
var RatingDots = function (_a) {
|
|
14938
14947
|
var minValue = _a.minValue, maxValue = _a.maxValue, minLabel = _a.minLabel, maxLabel = _a.maxLabel, centeredLabel = _a.centeredLabel, isDisabled = _a.isDisabled, isInteractive = _a.isInteractive, onClick = _a.onClick, selected = _a.selected;
|
|
14939
14948
|
var _b = __read(React.useState(), 2), selectedValue = _b[0], setSelectedValue = _b[1];
|
|
@@ -24599,6 +24608,7 @@ exports.ButtonVariantConfig = ButtonVariantConfig;
|
|
|
24599
24608
|
exports.Checkbox = Checkbox;
|
|
24600
24609
|
exports.CheckboxConfig = CheckboxConfig;
|
|
24601
24610
|
exports.CheckboxGroup = WrappedCheckboxGroup;
|
|
24611
|
+
exports.DarkStatusVariantMap = DarkStatusVariantMap;
|
|
24602
24612
|
exports.DatePicker = DatePicker;
|
|
24603
24613
|
exports.DatePickerContext = DatePickerContext;
|
|
24604
24614
|
exports.DrawerConfig = DrawerConfig;
|
|
@@ -24606,6 +24616,7 @@ exports.Heading = Heading;
|
|
|
24606
24616
|
exports.HeadingConfig = HeadingConfig;
|
|
24607
24617
|
exports.Icon = Icon;
|
|
24608
24618
|
exports.KibbleThemeProvider = KibbleThemeProvider;
|
|
24619
|
+
exports.LightStatusVariantMap = LightStatusVariantMap;
|
|
24609
24620
|
exports.Logo = Logo;
|
|
24610
24621
|
exports.MenuConfig = MenuConfig;
|
|
24611
24622
|
exports.MenuContext = MenuContext;
|