@geotab/zenith 3.6.3 → 3.7.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/README.md +15 -0
- package/dist/absolute/absolute.d.ts +3 -1
- package/dist/absolute/absolute.js +4 -4
- package/dist/checkbox/checkbox.d.ts +3 -1
- package/dist/checkbox/checkbox.js +5 -8
- package/dist/checkboxListWithAction/checkboxListWithAction.d.ts +3 -1
- package/dist/checkboxListWithAction/checkboxListWithAction.js +185 -3
- package/dist/controlledPopup/controlledPopup.d.ts +3 -1
- package/dist/controlledPopup/controlledPopup.js +2 -2
- package/dist/dropdown/dropdownPopup.d.ts +1 -1
- package/dist/dropdown/dropdownTrigger.d.ts +1 -1
- package/dist/dropdownRaw/dropdownList.d.ts +2 -1
- package/dist/dropdownRaw/dropdownList.js +15 -4
- package/dist/dropdownRaw/dropdownPopup.d.ts +3 -1
- package/dist/dropdownRaw/dropdownPopup.js +35 -5
- package/dist/dropdownRaw/dropdownRaw.js +82 -7
- package/dist/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
- package/dist/dropdownRaw/dropdownSearchableTrigger.js +7 -2
- package/dist/dropdownRaw/dropdownTrigger.d.ts +2 -1
- package/dist/dropdownRaw/dropdownTrigger.js +3 -5
- package/dist/footerButtons/footerButtons.d.ts +6 -4
- package/dist/footerButtons/footerButtons.js +3 -8
- package/dist/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +8 -2
- package/dist/groupsFilterRaw/groupsFilterInitialState.js +16 -0
- package/dist/groupsFilterRaw/groupsFilterRaw.js +43 -9
- package/dist/groupsFilterRaw/groupsFilterTrigger.d.ts +2 -1
- package/dist/groupsFilterRaw/groupsFilterTrigger.js +13 -2
- package/dist/index.css +222 -18
- package/dist/index.d.ts +1 -1
- package/dist/list/hooks/useDragAndDrop.d.ts +3 -1
- package/dist/list/hooks/useDragAndDrop.js +11 -4
- package/dist/menu/components/menuItem.js +12 -2
- package/dist/menu/contexts/pathContext.d.ts +3 -1
- package/dist/menu/contexts/pathProvider.d.ts +1 -1
- package/dist/menu/contexts/pathProvider.js +1 -1
- package/dist/menu/controlledMenu.js +97 -29
- package/dist/nav/nav.d.ts +2 -1
- package/dist/nav/nav.js +3 -2
- package/dist/nav/navEditList/navEditList.js +2 -1
- package/dist/nav/navItem/navItem.d.ts +1 -0
- package/dist/nav/navItem/navItem.js +4 -1
- package/dist/pillExpandable/pillContent.d.ts +2 -1
- package/dist/pillExpandable/pillContent.js +8 -3
- package/dist/pillExpandable/pillExpandable.d.ts +27 -4
- package/dist/pillExpandable/pillExpandable.js +426 -196
- package/dist/pillExpandable/pillExpandablePopoverContent.d.ts +19 -0
- package/dist/pillExpandable/pillExpandablePopoverContent.js +7 -0
- package/dist/pillExpandable/pillExpandableSimple.d.ts +5 -3
- package/dist/pillExpandable/pillExpandableSimple.js +12 -5
- package/dist/summary/summary.js +29 -1
- package/dist/summaryTile/summaryTile.d.ts +2 -1
- package/dist/summaryTile/summaryTile.js +175 -65
- package/dist/summaryTile/summaryTileTrigger.d.ts +1 -1
- package/dist/summaryTile/summaryTileTrigger.js +1 -1
- package/dist/toggleButtonRaw/toggleButtonRaw.js +2 -1
- package/dist/utils/localization/getSupportedLanguage.d.ts +2 -2
- package/dist/utils/localization/getSupportedLanguage.js +28 -8
- package/dist/utils/localization/languageContext.d.ts +1 -1
- package/dist/utils/localization/translations/cs.json +2 -1
- package/dist/utils/localization/translations/de.json +2 -1
- package/dist/utils/localization/translations/en.json +2 -1
- package/dist/utils/localization/translations/es.json +2 -1
- package/dist/utils/localization/translations/fr-FR.json +2 -1
- package/dist/utils/localization/translations/fr.json +2 -1
- package/dist/utils/localization/translations/id.json +2 -1
- package/dist/utils/localization/translations/it.json +2 -1
- package/dist/utils/localization/translations/ja.json +2 -1
- package/dist/utils/localization/translations/ms.json +2 -1
- package/dist/utils/localization/translations/nl.json +2 -1
- package/dist/utils/localization/translations/pl.json +2 -1
- package/dist/utils/localization/translations/pt-BR.json +2 -1
- package/dist/utils/localization/translations/sv.json +2 -1
- package/dist/utils/localization/translations/th.json +2 -1
- package/dist/utils/localization/translations/tr.json +2 -1
- package/dist/utils/localization/translations/zh-Hans.json +2 -1
- package/esm/absolute/absolute.d.ts +3 -1
- package/esm/absolute/absolute.js +4 -4
- package/esm/checkbox/checkbox.d.ts +3 -1
- package/esm/checkbox/checkbox.js +5 -8
- package/esm/checkboxListWithAction/checkboxListWithAction.d.ts +3 -1
- package/esm/checkboxListWithAction/checkboxListWithAction.js +186 -4
- package/esm/controlledPopup/controlledPopup.d.ts +3 -1
- package/esm/controlledPopup/controlledPopup.js +2 -2
- package/esm/dropdown/dropdownPopup.d.ts +1 -1
- package/esm/dropdown/dropdownTrigger.d.ts +1 -1
- package/esm/dropdownRaw/dropdownList.d.ts +2 -1
- package/esm/dropdownRaw/dropdownList.js +16 -5
- package/esm/dropdownRaw/dropdownPopup.d.ts +3 -1
- package/esm/dropdownRaw/dropdownPopup.js +37 -7
- package/esm/dropdownRaw/dropdownRaw.js +82 -7
- package/esm/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
- package/esm/dropdownRaw/dropdownSearchableTrigger.js +7 -2
- package/esm/dropdownRaw/dropdownTrigger.d.ts +2 -1
- package/esm/dropdownRaw/dropdownTrigger.js +3 -5
- package/esm/footerButtons/footerButtons.d.ts +6 -4
- package/esm/footerButtons/footerButtons.js +3 -8
- package/esm/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +9 -3
- package/esm/groupsFilterRaw/groupsFilterInitialState.js +16 -0
- package/esm/groupsFilterRaw/groupsFilterRaw.js +43 -9
- package/esm/groupsFilterRaw/groupsFilterTrigger.d.ts +2 -1
- package/esm/groupsFilterRaw/groupsFilterTrigger.js +13 -2
- package/esm/index.d.ts +1 -1
- package/esm/list/hooks/useDragAndDrop.d.ts +3 -1
- package/esm/list/hooks/useDragAndDrop.js +11 -4
- package/esm/menu/components/menuItem.js +12 -2
- package/esm/menu/contexts/pathContext.d.ts +3 -1
- package/esm/menu/contexts/pathProvider.d.ts +1 -1
- package/esm/menu/contexts/pathProvider.js +1 -1
- package/esm/menu/controlledMenu.js +98 -30
- package/esm/nav/nav.d.ts +2 -1
- package/esm/nav/nav.js +3 -2
- package/esm/nav/navEditList/navEditList.js +2 -1
- package/esm/nav/navItem/navItem.d.ts +1 -0
- package/esm/nav/navItem/navItem.js +5 -2
- package/esm/pillExpandable/pillContent.d.ts +2 -1
- package/esm/pillExpandable/pillContent.js +8 -3
- package/esm/pillExpandable/pillExpandable.d.ts +27 -4
- package/esm/pillExpandable/pillExpandable.js +427 -197
- package/esm/pillExpandable/pillExpandablePopoverContent.d.ts +19 -0
- package/esm/pillExpandable/pillExpandablePopoverContent.js +3 -0
- package/esm/pillExpandable/pillExpandableSimple.d.ts +5 -3
- package/esm/pillExpandable/pillExpandableSimple.js +12 -5
- package/esm/summary/summary.js +29 -1
- package/esm/summaryTile/summaryTile.d.ts +2 -1
- package/esm/summaryTile/summaryTile.js +140 -43
- package/esm/summaryTile/summaryTileTrigger.d.ts +1 -1
- package/esm/summaryTile/summaryTileTrigger.js +1 -1
- package/esm/toggleButtonRaw/toggleButtonRaw.js +2 -1
- package/esm/utils/localization/getSupportedLanguage.d.ts +2 -2
- package/esm/utils/localization/getSupportedLanguage.js +28 -8
- package/esm/utils/localization/languageContext.d.ts +1 -1
- package/esm/utils/localization/translations/cs.json +2 -1
- package/esm/utils/localization/translations/de.json +2 -1
- package/esm/utils/localization/translations/en.json +2 -1
- package/esm/utils/localization/translations/es.json +2 -1
- package/esm/utils/localization/translations/fr-FR.json +2 -1
- package/esm/utils/localization/translations/fr.json +2 -1
- package/esm/utils/localization/translations/id.json +2 -1
- package/esm/utils/localization/translations/it.json +2 -1
- package/esm/utils/localization/translations/ja.json +2 -1
- package/esm/utils/localization/translations/ms.json +2 -1
- package/esm/utils/localization/translations/nl.json +2 -1
- package/esm/utils/localization/translations/pl.json +2 -1
- package/esm/utils/localization/translations/pt-BR.json +2 -1
- package/esm/utils/localization/translations/sv.json +2 -1
- package/esm/utils/localization/translations/th.json +2 -1
- package/esm/utils/localization/translations/tr.json +2 -1
- package/esm/utils/localization/translations/zh-Hans.json +2 -1
- package/package.json +4 -7
package/dist/nav/nav.js
CHANGED
|
@@ -54,7 +54,7 @@ const NavContent = ({ children }) => {
|
|
|
54
54
|
/**
|
|
55
55
|
* @beta This component is not fully ready yet and may change in future releases.
|
|
56
56
|
*/
|
|
57
|
-
const Nav = ({ children, className, collapsed = false, onCollapseToggle, onMenuVisibilityToggle, mobileBarContainer, isMobileMenuOpen = false, onIsMobileMenuOpenToggle
|
|
57
|
+
const Nav = ({ children, className, collapsed = false, onCollapseToggle, onMenuVisibilityToggle, mobileBarContainer, isMobileMenuOpen = false, onIsMobileMenuOpenToggle, onEditModeToggle
|
|
58
58
|
// eslint-disable-next-line complexity
|
|
59
59
|
}) => {
|
|
60
60
|
const menuRef = (0, react_1.useRef)(null);
|
|
@@ -97,7 +97,8 @@ const Nav = ({ children, className, collapsed = false, onCollapseToggle, onMenuV
|
|
|
97
97
|
const onEditStateToggle = (0, react_1.useCallback)((isEdit) => {
|
|
98
98
|
isEdit && !isMobile && onCollapseToggle && onCollapseToggle(false);
|
|
99
99
|
editListItems && editFooter && setIsEditState(isEdit);
|
|
100
|
-
|
|
100
|
+
onEditModeToggle && onEditModeToggle(isEdit);
|
|
101
|
+
}, [onCollapseToggle, setIsEditState, editListItems, editFooter, isMobile, onEditModeToggle]);
|
|
101
102
|
(0, react_1.useEffect)(() => {
|
|
102
103
|
const wasMobile = prevIsMobileRef.current;
|
|
103
104
|
prevIsMobileRef.current = isMobile;
|
|
@@ -12,10 +12,11 @@ const marksClassNames = {
|
|
|
12
12
|
dragging: "zen-nav-edit-list__item--dragging",
|
|
13
13
|
dragged: "zen-nav-edit-list__item--dragged"
|
|
14
14
|
};
|
|
15
|
+
const EDIT_ITEM_GAP = 10;
|
|
15
16
|
const NavEditList = ({ children, className, onItemsChangeOrder, onBeforeItemDrag }) => {
|
|
16
17
|
const appsListRef = (0, react_1.useRef)(null);
|
|
17
18
|
const dragHandler = onItemsChangeOrder ? onItemsChangeOrder : () => { };
|
|
18
|
-
const { onDragStart } = (0, useDragAndDrop_1.useDragAndDrop)(appsListRef, dragHandler, marksClassNames, onBeforeItemDrag);
|
|
19
|
+
const { onDragStart } = (0, useDragAndDrop_1.useDragAndDrop)(appsListRef, dragHandler, marksClassNames, onBeforeItemDrag, EDIT_ITEM_GAP);
|
|
19
20
|
const childrenArray = (0, react_1.useMemo)(() => onItemsChangeOrder ? react_1.Children.map(children, child => (0, navEditListUtils_1.attachDndHandler)(child, onDragStart)) : children, [children, onItemsChangeOrder, onDragStart]);
|
|
20
21
|
return (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-nav-edit-list", className || ""]), ref: appsListRef, children: childrenArray });
|
|
21
22
|
};
|
|
@@ -27,6 +27,7 @@ export interface ILinkNavItem extends INavItemCommon {
|
|
|
27
27
|
export interface IButtonNavItem extends INavItemCommon {
|
|
28
28
|
onClick?: () => void;
|
|
29
29
|
menuAlignment?: TAlignment;
|
|
30
|
+
onDropdownStateChange?: (isOpen: boolean) => void;
|
|
30
31
|
}
|
|
31
32
|
interface INavItemContext {
|
|
32
33
|
parentLevel?: number;
|
|
@@ -73,9 +73,12 @@ const LinkNavItem = (_a) => {
|
|
|
73
73
|
};
|
|
74
74
|
LinkNavItem.displayName = "LinkNavItem";
|
|
75
75
|
const ButtonNavItem = (_a) => {
|
|
76
|
-
var { className, title, onClick, collapsed, active, children, tabIndex, menuAlignment = "right-top", isMenuItem = true, tooltipAlignment = defaultTooltipAlignment, actionIcon, actionIconTitle, onActionIconClick } = _a, rest = __rest(_a, ["className", "title", "onClick", "collapsed", "active", "children", "tabIndex", "menuAlignment", "isMenuItem", "tooltipAlignment", "actionIcon", "actionIconTitle", "onActionIconClick"]);
|
|
76
|
+
var { className, title, onClick, collapsed, active, children, tabIndex, menuAlignment = "right-top", isMenuItem = true, tooltipAlignment = defaultTooltipAlignment, actionIcon, actionIconTitle, onActionIconClick, onDropdownStateChange } = _a, rest = __rest(_a, ["className", "title", "onClick", "collapsed", "active", "children", "tabIndex", "menuAlignment", "isMenuItem", "tooltipAlignment", "actionIcon", "actionIconTitle", "onActionIconClick", "onDropdownStateChange"]);
|
|
77
77
|
const [menuOpen, setMenuOpen] = (0, react_1.useState)(false);
|
|
78
78
|
const { parentLevel = 0, closeParentMenu } = (0, react_1.useContext)(exports.NavItemContext);
|
|
79
|
+
(0, react_1.useEffect)(() => {
|
|
80
|
+
onDropdownStateChange === null || onDropdownStateChange === void 0 ? void 0 : onDropdownStateChange(menuOpen);
|
|
81
|
+
}, [menuOpen, onDropdownStateChange]);
|
|
79
82
|
const triggerRef = (0, react_1.useRef)(null);
|
|
80
83
|
const currentLevel = parentLevel + 1;
|
|
81
84
|
const validChildren = react_1.Children.toArray(children).filter(child => {
|
|
@@ -7,10 +7,11 @@ interface IPillContent {
|
|
|
7
7
|
descriptionText?: TLazyContent<ReactNode>;
|
|
8
8
|
mainAction?: TLazyContent<IPillExpandableAction>;
|
|
9
9
|
secondaryAction?: TLazyContent<IPillExpandableAction>;
|
|
10
|
+
tertiaryAction?: TLazyContent<IPillExpandableAction>;
|
|
10
11
|
onActionClick: () => void;
|
|
11
12
|
isVisible?: boolean;
|
|
12
13
|
errorHandler: (err: any) => ReactNode | undefined;
|
|
13
14
|
descriptionId?: string;
|
|
14
15
|
}
|
|
15
|
-
export declare const PillContent: ({ date, count, descriptionText, mainAction, secondaryAction, onActionClick, isVisible, errorHandler, descriptionId }: IPillContent) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const PillContent: ({ date, count, descriptionText, mainAction, secondaryAction, tertiaryAction, onActionClick, isVisible, errorHandler, descriptionId }: IPillContent) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export {};
|
|
@@ -7,7 +7,7 @@ const button_1 = require("../button/button");
|
|
|
7
7
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
8
8
|
const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
|
|
9
9
|
const lazyContent_1 = require("../skeleton/lazyContent");
|
|
10
|
-
const PillContent = ({ date, count, descriptionText, mainAction, secondaryAction, onActionClick, isVisible = true, errorHandler, descriptionId }) => {
|
|
10
|
+
const PillContent = ({ date, count, descriptionText, mainAction, secondaryAction, tertiaryAction, onActionClick, isVisible = true, errorHandler, descriptionId }) => {
|
|
11
11
|
const headerDriveClassName = (0, useDriveClassName_1.useDriveClassName)("zen-status-pill-popup__header-text");
|
|
12
12
|
const descriptionDriveClassName = (0, useDriveClassName_1.useDriveClassName)("zen-status-pill-popup__description");
|
|
13
13
|
const mainActionClick = (0, react_1.useCallback)((onClick) => () => {
|
|
@@ -18,12 +18,17 @@ const PillContent = ({ date, count, descriptionText, mainAction, secondaryAction
|
|
|
18
18
|
onClick && onClick();
|
|
19
19
|
onActionClick();
|
|
20
20
|
}, [onActionClick]);
|
|
21
|
+
const tertiaryActionClick = (0, react_1.useCallback)((onClick) => () => {
|
|
22
|
+
onClick && onClick();
|
|
23
|
+
onActionClick();
|
|
24
|
+
}, [onActionClick]);
|
|
21
25
|
const renderMainButton = (0, react_1.useCallback)((data) => (0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ link: data.link }, data.linkOptions, { onClick: mainActionClick(data.onClick), type: "primary", children: data.text })), [mainActionClick]);
|
|
22
|
-
const renderSecondaryButton = (0, react_1.useCallback)((data) => (0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ link: data.link }, data.linkOptions, { onClick: secondaryActionClick(data.onClick), type: "
|
|
26
|
+
const renderSecondaryButton = (0, react_1.useCallback)((data) => (0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ link: data.link }, data.linkOptions, { onClick: secondaryActionClick(data.onClick), type: "secondary", children: data.text })), [secondaryActionClick]);
|
|
27
|
+
const renderTertiaryButton = (0, react_1.useCallback)((data) => (0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ link: data.link }, data.linkOptions, { onClick: tertiaryActionClick(data.onClick), type: "tertiary", children: data.text })), [tertiaryActionClick]);
|
|
23
28
|
const renderDescription = (0, react_1.useCallback)(data => (0, jsx_runtime_1.jsx)("div", { id: descriptionId, className: (0, classNames_1.classNames)(["zen-status-pill-popup__description", descriptionDriveClassName || ""]), children: data }), [descriptionDriveClassName, descriptionId]);
|
|
24
29
|
const renderCount = (0, react_1.useCallback)((data) => data ? (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-status-pill-popup__header-text zen-status-pill-popup__header-text--left", headerDriveClassName || ""]), children: data }) : null, [headerDriveClassName]);
|
|
25
30
|
const renderDate = (0, react_1.useCallback)((data) => data ? (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-status-pill-popup__header-text", headerDriveClassName || ""]), children: data }) : null, [headerDriveClassName]);
|
|
26
31
|
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(date || count) && isVisible && (0, jsx_runtime_1.jsxs)("div", { className: "zen-status-pill-popup__content-header", children: [date && (0, jsx_runtime_1.jsx)(lazyContent_1.LazyContent, { width: 80, type: "text", content: date, isVisible: isVisible, errorHandler: errorHandler, render: renderDate }), count && (0, jsx_runtime_1.jsx)(lazyContent_1.LazyContent, { width: 80, type: "text", content: count, isVisible: isVisible, errorHandler: errorHandler, render: renderCount })] }), descriptionText &&
|
|
27
|
-
(0, jsx_runtime_1.jsx)(lazyContent_1.LazyContent, { width: 200, type: "text", content: descriptionText, isVisible: isVisible, errorHandler: errorHandler, render: renderDescription }), (mainAction || secondaryAction) && isVisible && (0, jsx_runtime_1.jsxs)("div", { className: "zen-status-pill-popup__actions", children: [mainAction && (0, jsx_runtime_1.jsx)(lazyContent_1.LazyContent, { type: "button", content: mainAction, errorHandler: errorHandler, render: renderMainButton, isVisible: isVisible }), secondaryAction && (0, jsx_runtime_1.jsx)(lazyContent_1.LazyContent, { type: "button", content: secondaryAction, errorHandler: errorHandler, render: renderSecondaryButton, isVisible: isVisible })] })] });
|
|
32
|
+
(0, jsx_runtime_1.jsx)(lazyContent_1.LazyContent, { width: 200, type: "text", content: descriptionText, isVisible: isVisible, errorHandler: errorHandler, render: renderDescription }), (mainAction || secondaryAction || tertiaryAction) && isVisible && (0, jsx_runtime_1.jsxs)("div", { className: "zen-status-pill-popup__actions", children: [mainAction && (0, jsx_runtime_1.jsx)(lazyContent_1.LazyContent, { type: "button", content: mainAction, errorHandler: errorHandler, render: renderMainButton, isVisible: isVisible }), secondaryAction && (0, jsx_runtime_1.jsx)(lazyContent_1.LazyContent, { type: "button", content: secondaryAction, errorHandler: errorHandler, render: renderSecondaryButton, isVisible: isVisible }), tertiaryAction && (0, jsx_runtime_1.jsx)(lazyContent_1.LazyContent, { type: "button", content: tertiaryAction, errorHandler: errorHandler, render: renderTertiaryButton, isVisible: isVisible })] })] });
|
|
28
33
|
};
|
|
29
34
|
exports.PillContent = PillContent;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "./pillExpandable.less";
|
|
2
2
|
import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
3
|
+
import { Exclusive } from "../commonHelpers/types/exclusive";
|
|
3
4
|
import React, { FC, ReactNode } from "react";
|
|
4
5
|
import { TViewMoreButton } from "./getProps";
|
|
5
6
|
import { IIcon } from "../icons/icon";
|
|
@@ -20,6 +21,7 @@ export interface IBaseData {
|
|
|
20
21
|
count?: TLazyContent<number>;
|
|
21
22
|
mainAction?: TLazyContent<IPillExpandableAction>;
|
|
22
23
|
secondaryAction?: TLazyContent<IPillExpandableAction>;
|
|
24
|
+
tertiaryAction?: TLazyContent<IPillExpandableAction>;
|
|
23
25
|
getData?: undefined;
|
|
24
26
|
}
|
|
25
27
|
export interface IPromisedBaseData {
|
|
@@ -29,16 +31,20 @@ export interface IPromisedBaseData {
|
|
|
29
31
|
count?: undefined;
|
|
30
32
|
mainAction?: undefined;
|
|
31
33
|
secondaryAction?: undefined;
|
|
34
|
+
tertiaryAction?: undefined;
|
|
32
35
|
}
|
|
33
36
|
type TProps = IBaseData | IPromisedBaseData;
|
|
34
|
-
export
|
|
37
|
+
export type TPopoverVariant = "default" | "placeholder";
|
|
38
|
+
export type TPopoverSize = "small" | "medium" | "large";
|
|
39
|
+
type TPillTypeBase = "error" | "success" | "warning" | "info" | "default";
|
|
40
|
+
export type TPillType = TPillTypeBase | "upsell";
|
|
41
|
+
/** Base props shared by all PillExpandable variants */
|
|
42
|
+
export interface IPillExpandableBase extends IZenComponentProps {
|
|
35
43
|
uniquePills?: number;
|
|
36
44
|
text: string;
|
|
37
|
-
type?: "error" | "success" | "warning" | "info" | "default";
|
|
38
45
|
viewMoreAction?: TViewMoreButton;
|
|
39
46
|
className?: string;
|
|
40
47
|
popupClassName?: string;
|
|
41
|
-
icon?: FC<IIcon> | false;
|
|
42
48
|
secondaryIcon?: FC<IIcon> | false;
|
|
43
49
|
isFlat?: boolean;
|
|
44
50
|
isLoading?: boolean;
|
|
@@ -47,8 +53,25 @@ export interface IPillExpandable extends IZenComponentProps {
|
|
|
47
53
|
isBeta?: boolean;
|
|
48
54
|
hideCounterNumber?: boolean;
|
|
49
55
|
autoExpandChildren?: boolean;
|
|
56
|
+
/** Popover size: small (220px), medium (320px), large (420px). Default: "medium" */
|
|
57
|
+
popoverSize?: TPopoverSize;
|
|
58
|
+
/** Title displayed in the popover title bar. If provided, the title bar will be shown. */
|
|
59
|
+
title?: string;
|
|
60
|
+
}
|
|
61
|
+
/** Props for standard PillExpandable (non-upsell) */
|
|
62
|
+
interface IPillExpandableStandard extends IPillExpandableBase {
|
|
63
|
+
type?: TPillTypeBase;
|
|
64
|
+
icon?: FC<IIcon> | false;
|
|
65
|
+
}
|
|
66
|
+
/** Props for upsell PillExpandable - icon and children are not allowed */
|
|
67
|
+
interface IPillExpandableUpsell extends IPillExpandableBase {
|
|
68
|
+
type: "upsell";
|
|
69
|
+
icon?: never;
|
|
70
|
+
children?: never;
|
|
50
71
|
}
|
|
72
|
+
/** Combined type using Exclusive to prevent mixing upsell with standard props */
|
|
73
|
+
export type IPillExpandable = Exclusive<IPillExpandableStandard, IPillExpandableUpsell>;
|
|
51
74
|
type TPillExpandable = IPillExpandable & TProps;
|
|
52
|
-
export declare const PillExpandable: React.MemoExoticComponent<({ children, errorHandler, getData, text, description, date, count, mainAction, secondaryAction, viewMoreAction, uniquePills, type, className, popupClassName, isLoading, isFlat, icon, secondaryIcon, isBeta, loadingWidth, hideCounterNumber, autoExpandChildren }: TPillExpandable) => import("react/jsx-runtime").JSX.Element>;
|
|
75
|
+
export declare const PillExpandable: React.MemoExoticComponent<({ children, errorHandler, getData, text, description, date, count, mainAction, secondaryAction, tertiaryAction, viewMoreAction, uniquePills, type, className, popupClassName, isLoading, isFlat, icon, secondaryIcon, isBeta, loadingWidth, hideCounterNumber, autoExpandChildren, popoverSize, title }: TPillExpandable) => import("react/jsx-runtime").JSX.Element>;
|
|
53
76
|
export declare const TRANSLATIONS: string[];
|
|
54
77
|
export {};
|