@geotab/zenith 3.17.0-beta.2 → 3.17.0-nightly.20261028.0fd371d
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 +2 -0
- package/dist/banner/banner.d.ts +2 -1
- package/dist/banner/bannerMultipLine.d.ts +1 -1
- package/dist/banner/bannerMultipLine.js +4 -2
- package/dist/banner/bannerSingleLine.d.ts +1 -1
- package/dist/banner/bannerSingleLine.js +2 -1
- package/dist/banner/typeIcon.d.ts +3 -1
- package/dist/banner/typeIcon.js +87 -14
- package/dist/button/button.d.ts +1 -2
- package/dist/button/button.js +5 -22
- package/dist/button/buttonDisabledProps.d.ts +35 -0
- package/dist/button/buttonDisabledProps.js +33 -0
- package/dist/chart/pieChart/pieLegendPlugin.js +3 -0
- package/dist/chart/pieChart/renderPieLegend.js +6 -4
- package/dist/chart/plugins/legend/legendFocus.d.ts +2 -0
- package/dist/chart/plugins/legend/legendFocus.js +20 -0
- package/dist/chart/plugins/legend/legendPlugin.js +3 -0
- package/dist/chart/plugins/legend/renderLegend.js +9 -5
- package/dist/checkboxListWithAction/checkboxListWithAction.d.ts +13 -0
- package/dist/checkboxListWithAction/checkboxListWithAction.js +112 -22
- package/dist/commonHelpers/hooks/useFormFieldValues/useFormFieldValues.d.ts +2 -1
- package/dist/commonHelpers/hooks/useFormFieldValues/useFormFieldValues.js +1 -0
- package/dist/commonHelpers/hooks/useMergedRef.d.ts +6 -0
- package/dist/commonHelpers/hooks/useMergedRef.js +37 -0
- package/dist/commonStyles/typography/typography.less +9 -0
- package/dist/dataGrid/cell/cell.d.ts +7 -1
- package/dist/dataGrid/cell/cell.js +8 -2
- package/dist/dataGrid/dataGrid.d.ts +2 -1
- package/dist/dataGrid/dataGrid.js +26 -8
- package/dist/dataGrid/extensions/getStickyOffsets.d.ts +32 -0
- package/dist/dataGrid/extensions/getStickyOffsets.js +47 -0
- package/dist/dataGrid/headerCell/headerCell.d.ts +7 -1
- package/dist/dataGrid/headerCell/headerCell.js +5 -3
- package/dist/dataGrid/listColumn.d.ts +7 -0
- package/dist/dataGrid/row/row.d.ts +2 -2
- package/dist/dataGrid/row/row.js +13 -7
- package/dist/dateRangeRaw/dateRangeRaw.js +50 -9
- package/dist/dropdown/dropdown.js +11 -1
- package/dist/dropdownRaw/dropdownHelper.d.ts +22 -0
- package/dist/dropdownRaw/dropdownHelper.js +234 -142
- package/dist/dropdownRaw/dropdownRaw.js +52 -35
- package/dist/dropdownRaw/types.d.ts +13 -0
- package/dist/fileUpload/components/filePreview.d.ts +15 -0
- package/dist/fileUpload/components/filePreview.js +272 -0
- package/dist/fileUpload/components/previewableFile.d.ts +16 -0
- package/dist/fileUpload/components/previewableFile.js +48 -0
- package/dist/fileUpload/components/resolveFileActions.d.ts +10 -0
- package/dist/fileUpload/components/resolveFileActions.js +11 -0
- package/dist/fileUpload/components/uploadedFilesSection.d.ts +9 -1
- package/dist/fileUpload/components/uploadedFilesSection.js +91 -16
- package/dist/fileUpload/components/useFilePreview.d.ts +12 -0
- package/dist/fileUpload/components/useFilePreview.js +85 -0
- package/dist/fileUpload/fileUpload.d.ts +1 -1
- package/dist/fileUpload/fileUpload.js +63 -2
- package/dist/fileUpload/fileUploadType.d.ts +35 -0
- package/dist/filters/components/filtersContainer.js +2 -2
- package/dist/filters/components/filtersDateRange.d.ts +1 -1
- package/dist/filters/components/filtersDropdown.js +2 -1
- package/dist/filters/components/filtersGroups.d.ts +1 -1
- package/dist/filters/components/filtersGroups.js +2 -4
- package/dist/filters/components/filtersSidePanelDateRange.js +1 -1
- package/dist/formSection/components/formSectionCard.js +1 -1
- package/dist/groupsFilterRaw/groupsFilterRaw.d.ts +2 -0
- package/dist/groupsFilterRaw/groupsFilterRaw.js +10 -2
- package/dist/groupsFilterRaw/types.d.ts +2 -0
- package/dist/header/headerButton.d.ts +15 -1
- package/dist/header/headerButton.js +11 -6
- package/dist/icons/iconDoorClosed.d.ts +3 -0
- package/dist/icons/iconDoorClosed.js +12 -0
- package/dist/icons/iconDoorOpen.d.ts +3 -0
- package/dist/icons/iconDoorOpen.js +12 -0
- package/dist/icons/iconHumidity.d.ts +3 -0
- package/dist/icons/iconHumidity.js +12 -0
- package/dist/index.css +420 -12
- package/dist/index.d.ts +4 -1
- package/dist/index.js +16 -10
- package/dist/menu/components/menuButton.js +40 -58
- package/dist/miniTabs/miniTabs.d.ts +2 -1
- package/dist/miniTabs/miniTabs.js +2 -2
- package/dist/miniTabs/miniTabsItem.js +1 -1
- package/dist/modal/modal.d.ts +2 -0
- package/dist/pageHeader/pageHeaderButton.d.ts +15 -1
- package/dist/pageHeader/pageHeaderButton.js +8 -6
- package/dist/selectList/selectList.js +25 -1
- package/dist/selectList/selectListItem.d.ts +14 -1
- package/dist/selectList/selectListItem.js +291 -43
- package/dist/stepperRaw/stepperRaw.js +5 -2
- package/dist/table/columnMenu/columnMenuHeader.d.ts +28 -0
- package/dist/table/columnMenu/columnMenuHeader.js +132 -0
- package/dist/table/columnMenu/useColumnMenu.d.ts +24 -0
- package/dist/table/columnMenu/useColumnMenu.js +61 -0
- package/dist/table/flexible/getDefaultSettings.d.ts +1 -0
- package/dist/table/flexible/getDefaultSettings.js +2 -1
- package/dist/table/flexible/interfaces.d.ts +7 -0
- package/dist/table/flexible/mergeColumnSettings.js +2 -1
- package/dist/table/flexible/useFlexibleColumns.d.ts +16 -0
- package/dist/table/flexible/useFlexibleColumns.js +123 -49
- package/dist/table/flexible/useSettingsStorage.d.ts +2 -1
- package/dist/table/loading/useLoading.d.ts +1 -0
- package/dist/table/sortable/useSortableColumns.d.ts +1 -0
- package/dist/table/sortable/useSortableColumns.js +4 -1
- package/dist/table/table.d.ts +14 -1
- package/dist/table/table.js +16 -3
- package/dist/textInputRaw/textInputRaw.js +4 -2
- package/dist/textareaRaw/textareaRaw.js +4 -2
- package/dist/tooltip/tooltip.d.ts +5 -3
- package/dist/tooltip/tooltip.js +11 -9
- package/dist/utils/localization/translations/en.json +10 -1
- package/esm/banner/banner.d.ts +2 -1
- package/esm/banner/bannerMultipLine.d.ts +1 -1
- package/esm/banner/bannerMultipLine.js +4 -2
- package/esm/banner/bannerSingleLine.d.ts +1 -1
- package/esm/banner/bannerSingleLine.js +2 -1
- package/esm/banner/typeIcon.d.ts +3 -1
- package/esm/banner/typeIcon.js +81 -14
- package/esm/button/button.d.ts +1 -2
- package/esm/button/button.js +5 -22
- package/esm/button/buttonDisabledProps.d.ts +35 -0
- package/esm/button/buttonDisabledProps.js +29 -0
- package/esm/chart/pieChart/pieLegendPlugin.js +3 -0
- package/esm/chart/pieChart/renderPieLegend.js +6 -4
- package/esm/chart/plugins/legend/legendFocus.d.ts +2 -0
- package/esm/chart/plugins/legend/legendFocus.js +15 -0
- package/esm/chart/plugins/legend/legendPlugin.js +3 -0
- package/esm/chart/plugins/legend/renderLegend.js +9 -5
- package/esm/checkboxListWithAction/checkboxListWithAction.d.ts +13 -0
- package/esm/checkboxListWithAction/checkboxListWithAction.js +107 -22
- package/esm/commonHelpers/hooks/useFormFieldValues/useFormFieldValues.d.ts +2 -1
- package/esm/commonHelpers/hooks/useFormFieldValues/useFormFieldValues.js +1 -0
- package/esm/commonHelpers/hooks/useMergedRef.d.ts +6 -0
- package/esm/commonHelpers/hooks/useMergedRef.js +33 -0
- package/esm/dataGrid/cell/cell.d.ts +7 -1
- package/esm/dataGrid/cell/cell.js +8 -2
- package/esm/dataGrid/dataGrid.d.ts +2 -1
- package/esm/dataGrid/dataGrid.js +18 -5
- package/esm/dataGrid/extensions/getStickyOffsets.d.ts +32 -0
- package/esm/dataGrid/extensions/getStickyOffsets.js +41 -0
- package/esm/dataGrid/headerCell/headerCell.d.ts +7 -1
- package/esm/dataGrid/headerCell/headerCell.js +5 -3
- package/esm/dataGrid/listColumn.d.ts +7 -0
- package/esm/dataGrid/row/row.d.ts +2 -2
- package/esm/dataGrid/row/row.js +12 -6
- package/esm/dateRangeRaw/dateRangeRaw.js +51 -10
- package/esm/dropdown/dropdown.js +11 -1
- package/esm/dropdownRaw/dropdownHelper.d.ts +22 -0
- package/esm/dropdownRaw/dropdownHelper.js +227 -142
- package/esm/dropdownRaw/dropdownRaw.js +53 -36
- package/esm/dropdownRaw/types.d.ts +13 -0
- package/esm/fileUpload/components/filePreview.d.ts +15 -0
- package/esm/fileUpload/components/filePreview.js +263 -0
- package/esm/fileUpload/components/previewableFile.d.ts +16 -0
- package/esm/fileUpload/components/previewableFile.js +43 -0
- package/esm/fileUpload/components/resolveFileActions.d.ts +10 -0
- package/esm/fileUpload/components/resolveFileActions.js +7 -0
- package/esm/fileUpload/components/uploadedFilesSection.d.ts +9 -1
- package/esm/fileUpload/components/uploadedFilesSection.js +91 -16
- package/esm/fileUpload/components/useFilePreview.d.ts +12 -0
- package/esm/fileUpload/components/useFilePreview.js +81 -0
- package/esm/fileUpload/fileUpload.d.ts +1 -1
- package/esm/fileUpload/fileUpload.js +63 -2
- package/esm/fileUpload/fileUploadType.d.ts +35 -0
- package/esm/filters/components/filtersContainer.js +2 -2
- package/esm/filters/components/filtersDateRange.d.ts +1 -1
- package/esm/filters/components/filtersDropdown.js +2 -1
- package/esm/filters/components/filtersGroups.d.ts +1 -1
- package/esm/filters/components/filtersGroups.js +2 -4
- package/esm/filters/components/filtersSidePanelDateRange.js +1 -1
- package/esm/formSection/components/formSectionCard.js +1 -1
- package/esm/groupsFilterRaw/groupsFilterRaw.d.ts +2 -0
- package/esm/groupsFilterRaw/groupsFilterRaw.js +10 -2
- package/esm/groupsFilterRaw/types.d.ts +2 -0
- package/esm/header/headerButton.d.ts +15 -1
- package/esm/header/headerButton.js +11 -6
- package/esm/icons/iconDoorClosed.d.ts +3 -0
- package/esm/icons/iconDoorClosed.js +8 -0
- package/esm/icons/iconDoorOpen.d.ts +3 -0
- package/esm/icons/iconDoorOpen.js +8 -0
- package/esm/icons/iconHumidity.d.ts +3 -0
- package/esm/icons/iconHumidity.js +8 -0
- package/esm/index.d.ts +4 -1
- package/esm/index.js +3 -0
- package/esm/menu/components/menuButton.js +40 -58
- package/esm/miniTabs/miniTabs.d.ts +2 -1
- package/esm/miniTabs/miniTabs.js +2 -2
- package/esm/miniTabs/miniTabsItem.js +1 -1
- package/esm/modal/modal.d.ts +2 -0
- package/esm/pageHeader/pageHeaderButton.d.ts +15 -1
- package/esm/pageHeader/pageHeaderButton.js +8 -6
- package/esm/selectList/selectList.js +25 -1
- package/esm/selectList/selectListItem.d.ts +14 -1
- package/esm/selectList/selectListItem.js +280 -42
- package/esm/stepperRaw/stepperRaw.js +5 -2
- package/esm/table/columnMenu/columnMenuHeader.d.ts +28 -0
- package/esm/table/columnMenu/columnMenuHeader.js +123 -0
- package/esm/table/columnMenu/useColumnMenu.d.ts +24 -0
- package/esm/table/columnMenu/useColumnMenu.js +57 -0
- package/esm/table/flexible/getDefaultSettings.d.ts +1 -0
- package/esm/table/flexible/getDefaultSettings.js +2 -1
- package/esm/table/flexible/interfaces.d.ts +7 -0
- package/esm/table/flexible/mergeColumnSettings.js +2 -1
- package/esm/table/flexible/useFlexibleColumns.d.ts +16 -0
- package/esm/table/flexible/useFlexibleColumns.js +123 -49
- package/esm/table/flexible/useSettingsStorage.d.ts +2 -1
- package/esm/table/loading/useLoading.d.ts +1 -0
- package/esm/table/sortable/useSortableColumns.d.ts +1 -0
- package/esm/table/sortable/useSortableColumns.js +4 -1
- package/esm/table/table.d.ts +14 -1
- package/esm/table/table.js +16 -3
- package/esm/testHelpers/renderAsync.d.ts +2 -1
- package/esm/textInputRaw/textInputRaw.js +4 -2
- package/esm/textareaRaw/textareaRaw.js +4 -2
- package/esm/tooltip/tooltip.d.ts +5 -3
- package/esm/tooltip/tooltip.js +11 -9
- package/esm/utils/localization/translations/en.json +10 -1
- package/package.json +155 -158
package/README.md
CHANGED
|
@@ -78,6 +78,8 @@ Zenith library provides components defined in Zenith Design System. It includes
|
|
|
78
78
|
|
|
79
79
|
### 3.16.0
|
|
80
80
|
|
|
81
|
+
- Add `stepper` support to `Filters.DateRange`; the stepper now renders as a single pill around the chip and shows the selected period
|
|
82
|
+
- Make the `Filters` side panel date range full width
|
|
81
83
|
- Add `Tooltip.InlineTrigger` subcomponent for inline tooltip triggers
|
|
82
84
|
- Add `TrendIndicator` component, the `getTrendIndicatorDirection` helper, and `Table.TrendIndicator`
|
|
83
85
|
- Add popup button variant for `Nav` items
|
package/dist/banner/banner.d.ts
CHANGED
|
@@ -17,7 +17,8 @@ export interface IBanner extends Partial<IZenIdComponentProps> {
|
|
|
17
17
|
header?: string;
|
|
18
18
|
type?: BannerType;
|
|
19
19
|
multiline?: boolean;
|
|
20
|
-
icon
|
|
20
|
+
/** Use "loading" to replace the banner type icon with an inline loading indicator. */
|
|
21
|
+
icon?: boolean | "loading";
|
|
21
22
|
action?: IBannerAction;
|
|
22
23
|
onClose?: (e: any) => void;
|
|
23
24
|
size?: TBannerSize;
|
|
@@ -8,7 +8,7 @@ export interface IBanner extends Partial<IZenIdComponentProps> {
|
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
header?: string;
|
|
10
10
|
type?: BannerType;
|
|
11
|
-
icon?: boolean;
|
|
11
|
+
icon?: boolean | "loading";
|
|
12
12
|
action?: IBannerAction;
|
|
13
13
|
onClose?: (e: any) => void;
|
|
14
14
|
size?: TBannerSize;
|
|
@@ -97,7 +97,8 @@ const BannerMultiline = ({
|
|
|
97
97
|
children: [(0, jsx_runtime_1.jsxs)("div", {
|
|
98
98
|
className: "zen-banner__header-container",
|
|
99
99
|
children: [icon && header && (0, jsx_runtime_1.jsx)(typeIcon_1.default, {
|
|
100
|
-
type: type
|
|
100
|
+
type: type,
|
|
101
|
+
loading: icon === "loading"
|
|
101
102
|
}), header && (0, jsx_runtime_1.jsx)("div", {
|
|
102
103
|
className: (0, classNames_1.classNames)(["zen-banner__header", bannerHeaderClassName || ""]),
|
|
103
104
|
children: header
|
|
@@ -116,7 +117,8 @@ const BannerMultiline = ({
|
|
|
116
117
|
className: "zen-banner__message-container",
|
|
117
118
|
children: [icon && !header && (0, jsx_runtime_1.jsx)(typeIcon_1.default, {
|
|
118
119
|
className: "zen-banner__icon-block--top-gap",
|
|
119
|
-
type: type
|
|
120
|
+
type: type,
|
|
121
|
+
loading: icon === "loading"
|
|
120
122
|
}), (0, jsx_runtime_1.jsx)("div", {
|
|
121
123
|
ref: contentRef,
|
|
122
124
|
title: text,
|
|
@@ -8,7 +8,7 @@ export interface IBanner extends Partial<IZenIdComponentProps> {
|
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
header?: string;
|
|
10
10
|
type?: BannerType;
|
|
11
|
-
icon?: boolean;
|
|
11
|
+
icon?: boolean | "loading";
|
|
12
12
|
action?: IBannerAction;
|
|
13
13
|
onClose?: (e: any) => void;
|
|
14
14
|
size?: TBannerSize;
|
|
@@ -93,7 +93,8 @@ const BannerSingleLine = ({
|
|
|
93
93
|
children: [(0, jsx_runtime_1.jsxs)("div", {
|
|
94
94
|
className: (0, classNames_1.classNames)(["zen-banner__content", `zen-banner__content--${size}`]),
|
|
95
95
|
children: [icon && (0, jsx_runtime_1.jsx)(typeIcon_1.default, {
|
|
96
|
-
type: type
|
|
96
|
+
type: type,
|
|
97
|
+
loading: icon === "loading"
|
|
97
98
|
}), header && (0, jsx_runtime_1.jsx)("div", {
|
|
98
99
|
className: (0, classNames_1.classNames)(["zen-banner__header", bannerHeaderClassName || ""]),
|
|
99
100
|
children: header
|
|
@@ -3,6 +3,8 @@ import "./banner.less";
|
|
|
3
3
|
interface ITypeIcon {
|
|
4
4
|
type: BannerType | "upsell";
|
|
5
5
|
className?: string;
|
|
6
|
+
loading?: boolean;
|
|
6
7
|
}
|
|
7
|
-
declare const TypeIcon: ({ type, className }: ITypeIcon) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const TypeIcon: ({ type, className, loading }: ITypeIcon) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export default TypeIcon;
|
|
10
|
+
export declare const TRANSLATIONS: string[];
|
package/dist/banner/typeIcon.js
CHANGED
|
@@ -1,26 +1,99 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
injectString
|
|
5
|
+
} = require("../utils/localization/translationsDictionary");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.TRANSLATIONS = void 0;
|
|
3
10
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
11
|
const react_1 = require("react");
|
|
5
12
|
const iconCheckRadio_1 = require("../icons/iconCheckRadio");
|
|
6
13
|
const iconInfoCircle_1 = require("../icons/iconInfoCircle");
|
|
14
|
+
injectString("cs", "Loading", "Na\u010D\xEDt\xE1n\xED");
|
|
15
|
+
injectString("da-DK", "Loading", "Indl\xE6ser");
|
|
16
|
+
injectString("de", "Loading", "Wird geladen");
|
|
17
|
+
injectString("en", "Loading", "Loading");
|
|
18
|
+
injectString("es", "Loading", "Cargando");
|
|
19
|
+
injectString("fi-FI", "Loading", "Ladataan");
|
|
20
|
+
injectString("fr", "Loading", "Chargement en cours");
|
|
21
|
+
injectString("fr-FR", "Loading", "En cours de chargement");
|
|
22
|
+
injectString("hu-HU", "Loading", "Bet\xF6lt\xE9s");
|
|
23
|
+
injectString("id", "Loading", "Memuat");
|
|
24
|
+
injectString("it", "Loading", "Caricamento in corso");
|
|
25
|
+
injectString("ja", "Loading", "\u8AAD\u307F\u8FBC\u307F\u4E2D");
|
|
26
|
+
injectString("ko-KR", "Loading", "\uB85C\uB4DC \uC911");
|
|
27
|
+
injectString("ms", "Loading", "Memuatkan");
|
|
28
|
+
injectString("nb-NO", "Loading", "Laster");
|
|
29
|
+
injectString("nl", "Loading", "Laden");
|
|
30
|
+
injectString("pl", "Loading", "\u0141adowanie");
|
|
31
|
+
injectString("pt-BR", "Loading", "Carregando");
|
|
32
|
+
injectString("pt-PT", "Loading", "A carregar");
|
|
33
|
+
injectString("sk-SK", "Loading", "Na\u010D\xEDtanie");
|
|
34
|
+
injectString("sv", "Loading", "Laddar");
|
|
35
|
+
injectString("th", "Loading", "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14");
|
|
36
|
+
injectString("tr", "Loading", "Y\xFCkleniyor");
|
|
37
|
+
injectString("zh-Hans", "Loading", "\u6B63\u5728\u52A0\u8F7D");
|
|
38
|
+
injectString("zh-TW", "Loading", "\u8F09\u5165\u4E2D");
|
|
39
|
+
injectString("ro-RO", "Loading", "Se \xEEncarc\u0103");
|
|
40
|
+
injectString("ar-001", "Loading", "\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644");
|
|
41
|
+
injectString("lt-LT", "Loading", "\u012Ekeliama");
|
|
42
|
+
injectString("lv-LV", "Loading", "Iel\u0101d\u0113");
|
|
43
|
+
injectString("ka-GE", "Loading", "\u10E9\u10D0\u10E2\u10D5\u10D8\u10E0\u10D7\u10D5\u10D0");
|
|
44
|
+
injectString("el-GR", "Loading", "\u03A6\u03CC\u03C1\u03C4\u03C9\u03C3\u03B7");
|
|
45
|
+
injectString("et-EE", "Loading", "Laadimine");
|
|
46
|
+
injectString("bg-BG", "Loading", "\u0417\u0430\u0440\u0435\u0436\u0434\u0430\u043D\u0435");
|
|
7
47
|
const iconWarning_1 = require("../icons/iconWarning");
|
|
8
48
|
const iconException_1 = require("../icons/iconException");
|
|
9
49
|
const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
|
|
10
50
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
11
51
|
const iconGraphPresentation_1 = require("../icons/iconGraphPresentation");
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
52
|
+
const useLanguage_1 = require("../utils/localization/useLanguage");
|
|
53
|
+
const TypeIcon = ({
|
|
54
|
+
type,
|
|
55
|
+
className,
|
|
56
|
+
loading = false
|
|
57
|
+
}) => {
|
|
58
|
+
const iconsByType = (0, react_1.useMemo)(() => ({
|
|
59
|
+
error: iconException_1.IconException,
|
|
60
|
+
success: iconCheckRadio_1.IconCheckRadio,
|
|
61
|
+
warning: iconWarning_1.IconWarning,
|
|
62
|
+
info: iconInfoCircle_1.IconInfoCircle,
|
|
63
|
+
upsell: iconGraphPresentation_1.IconGraphPresentation
|
|
64
|
+
}), []);
|
|
65
|
+
const bannerDriveClassName = (0, useDriveClassName_1.useDriveClassName)("zen-banner__icon-block");
|
|
66
|
+
const {
|
|
67
|
+
translate
|
|
68
|
+
} = (0, useLanguage_1.useLanguage)();
|
|
69
|
+
return (0, jsx_runtime_1.jsx)("div", {
|
|
70
|
+
className: (0, classNames_1.classNames)(["zen-banner__icon-block", className || ""]),
|
|
71
|
+
children: loading ? (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, {
|
|
72
|
+
children: [(0, jsx_runtime_1.jsxs)("svg", {
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
className: (0, classNames_1.classNames)(["zen-icon", bannerDriveClassName ? "zen-icon--huge" : "zen-icon--large", "zen-banner__loading-icon"]),
|
|
75
|
+
viewBox: "0 0 24 24",
|
|
76
|
+
children: [(0, jsx_runtime_1.jsx)("circle", {
|
|
77
|
+
className: "zen-banner__loading-icon-track",
|
|
78
|
+
cx: "12",
|
|
79
|
+
cy: "12",
|
|
80
|
+
r: "9"
|
|
81
|
+
}), (0, jsx_runtime_1.jsx)("circle", {
|
|
82
|
+
className: "zen-banner__loading-icon-arc",
|
|
83
|
+
cx: "12",
|
|
84
|
+
cy: "12",
|
|
85
|
+
r: "9",
|
|
86
|
+
pathLength: "100"
|
|
87
|
+
})]
|
|
88
|
+
}), (0, jsx_runtime_1.jsx)("span", {
|
|
89
|
+
className: "zen-visually-hidden",
|
|
90
|
+
children: translate("Loading")
|
|
91
|
+
})]
|
|
92
|
+
}) : (0, react_1.createElement)(iconsByType[type], {
|
|
93
|
+
size: bannerDriveClassName ? "huge" : "large",
|
|
94
|
+
className: `zen-push__icon--${type}`
|
|
95
|
+
})
|
|
96
|
+
});
|
|
25
97
|
};
|
|
26
98
|
exports.default = TypeIcon;
|
|
99
|
+
exports.TRANSLATIONS = ["Loading"];
|
package/dist/button/button.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export interface IButton extends IZenComponentProps, IZenGridItem {
|
|
|
9
9
|
title?: string;
|
|
10
10
|
type?: TButton;
|
|
11
11
|
disabled?: boolean;
|
|
12
|
-
focusableWhenDisabled?: boolean;
|
|
13
12
|
onClick?: React.MouseEventHandler;
|
|
14
13
|
onBlur?: React.FocusEventHandler;
|
|
15
14
|
onMouseOver?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
@@ -28,6 +27,6 @@ export interface IButton extends IZenComponentProps, IZenGridItem {
|
|
|
28
27
|
dataAnalyticsId?: string;
|
|
29
28
|
}
|
|
30
29
|
export declare const Button: {
|
|
31
|
-
({ className, type, disabled,
|
|
30
|
+
({ className, type, disabled, id, title, onClick, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onKeyDown, onKeyUp, children, link, target, htmlType, rel, ref, name, onBlur, role, ariaLabel, dataAnalyticsId, ...other }: IButton): import("react/jsx-runtime").JSX.Element;
|
|
32
31
|
displayName: string;
|
|
33
32
|
};
|
package/dist/button/button.js
CHANGED
|
@@ -18,36 +18,19 @@ const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
|
18
18
|
const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
|
|
19
19
|
const filterGridProps_1 = require("../gridLayout/utils/filterGridProps");
|
|
20
20
|
const useMobileClassName_1 = require("../utils/theme/useMobileClassName");
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
event.stopPropagation();
|
|
24
|
-
};
|
|
25
|
-
// Guards on `disabled` alone, not just `focusableWhenDisabled`, so clicks are blocked in JS regardless of
|
|
26
|
-
// CSS. `onKeyDown`/`onKeyUp` stay unguarded — Tooltip needs them.
|
|
27
|
-
const getDisabledGuardedHandlers = (disabled, isFocusableWhenDisabled, onClick, onMouseDown, onMouseUp) => ({
|
|
28
|
-
onClick: disabled ? blockActivation : onClick,
|
|
29
|
-
onMouseDown: isFocusableWhenDisabled ? blockActivation : onMouseDown,
|
|
30
|
-
onMouseUp: isFocusableWhenDisabled ? blockActivation : onMouseUp
|
|
31
|
-
});
|
|
32
|
-
const getButtonClassName = (type, disabled, isFocusableWhenDisabled, mobileOrDriveClasses, className) => {
|
|
21
|
+
const Button = (_a) => {
|
|
22
|
+
var { className, type, disabled, id, title, onClick, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onKeyDown, onKeyUp, children, link, target, htmlType, rel, ref, name, onBlur, role, ariaLabel, dataAnalyticsId } = _a, other = __rest(_a, ["className", "type", "disabled", "id", "title", "onClick", "onMouseOver", "onMouseOut", "onMouseDown", "onMouseUp", "onKeyDown", "onKeyUp", "children", "link", "target", "htmlType", "rel", "ref", "name", "onBlur", "role", "ariaLabel", "dataAnalyticsId"]);
|
|
33
23
|
const modifierClassName = type && type !== buttonType_1.ButtonType.Secondary ? `zen-button--${type}` : "";
|
|
34
24
|
const disabledClassName = disabled ? "zen-button--disabled" : "";
|
|
35
|
-
const disabledFocusableClassName = isFocusableWhenDisabled ? "zen-button--disabled-focusable" : "";
|
|
36
|
-
return (0, classNames_1.classNames)(["zen-button", mobileOrDriveClasses, modifierClassName, disabledClassName, disabledFocusableClassName, className !== null && className !== void 0 ? className : ""]);
|
|
37
|
-
};
|
|
38
|
-
const Button = (_a) => {
|
|
39
|
-
var { className, type, disabled, focusableWhenDisabled, id, title, onClick, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onKeyDown, onKeyUp, children, link, target, htmlType, rel, ref, name, onBlur, role, ariaLabel, dataAnalyticsId } = _a, other = __rest(_a, ["className", "type", "disabled", "focusableWhenDisabled", "id", "title", "onClick", "onMouseOver", "onMouseOut", "onMouseDown", "onMouseUp", "onKeyDown", "onKeyUp", "children", "link", "target", "htmlType", "rel", "ref", "name", "onBlur", "role", "ariaLabel", "dataAnalyticsId"]);
|
|
40
|
-
const isFocusableWhenDisabled = Boolean(disabled) && Boolean(focusableWhenDisabled);
|
|
41
25
|
const driveClasses = (0, useDriveClassName_1.useDriveClassName)("zen-button");
|
|
42
26
|
const ariaLabelValue = ariaLabel || title;
|
|
43
27
|
const mobileClasses = (0, useMobileClassName_1.useMobileClassName)("zen-button");
|
|
44
28
|
const commonArgs = Object.assign(Object.assign(Object.assign({ id,
|
|
45
|
-
title }, (ariaLabelValue ? { "aria-label": ariaLabelValue } : {})), (dataAnalyticsId ? { "data-analytics-id": dataAnalyticsId } : {})), { className:
|
|
46
|
-
const { onClick: onClickWithDisabledGuard, onMouseDown: onMouseDownWithDisabledGuard, onMouseUp: onMouseUpWithDisabledGuard } = getDisabledGuardedHandlers(disabled, isFocusableWhenDisabled, onClick, onMouseDown, onMouseUp);
|
|
29
|
+
title }, (ariaLabelValue ? { "aria-label": ariaLabelValue } : {})), (dataAnalyticsId ? { "data-analytics-id": dataAnalyticsId } : {})), { className: (0, classNames_1.classNames)(["zen-button", mobileClasses || driveClasses || "", modifierClassName, disabledClassName, className !== null && className !== void 0 ? className : ""]) });
|
|
47
30
|
if (link) {
|
|
48
|
-
return ((0, jsx_runtime_1.jsx)("a", Object.assign({ role: "link", rel: rel, target: target, href: disabled ? undefined : link,
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)("a", Object.assign({ role: "link", rel: rel, target: target, href: disabled ? undefined : link, "aria-disabled": disabled, onKeyDown: onKeyDown, onKeyUp: onKeyUp, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onClick: onClick }, commonArgs, (0, filterGridProps_1.filterGridProps)(other), { children: children })));
|
|
49
32
|
}
|
|
50
|
-
return ((0, jsx_runtime_1.jsx)("button", Object.assign({ name: name, onBlur: onBlur, onClick:
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)("button", Object.assign({ name: name, onBlur: onBlur, onClick: onClick, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onMouseDown: onMouseDown, onMouseUp: onMouseUp, onKeyDown: onKeyDown, onKeyUp: onKeyUp, ref: ref, type: htmlType, disabled: disabled, role: role }, commonArgs, (0, filterGridProps_1.filterGridProps)(other), { children: children })));
|
|
51
34
|
};
|
|
52
35
|
exports.Button = Button;
|
|
53
36
|
exports.Button.displayName = "Button";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const BUTTON_DISABLED_CLASS = "zen-button--disabled";
|
|
3
|
+
export declare const BUTTON_DISABLED_FOCUSABLE_CLASS = "zen-button--disabled-focusable";
|
|
4
|
+
export interface IButtonDisabledOptions {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Keeps a disabled button in the tab order and hoverable, using `aria-disabled` instead of the native
|
|
8
|
+
* `disabled` attribute. Has no effect while the button is enabled.
|
|
9
|
+
*/
|
|
10
|
+
focusable?: boolean;
|
|
11
|
+
/** The `link` prop of the button, a link without `href` is not tabbable, so it needs an explicit `tabIndex`. */
|
|
12
|
+
link?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IButtonDisabledProps {
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
"aria-disabled"?: boolean;
|
|
17
|
+
tabIndex?: number;
|
|
18
|
+
className?: string;
|
|
19
|
+
onClick?: (event: React.SyntheticEvent) => void;
|
|
20
|
+
onMouseDown?: (event: React.SyntheticEvent) => void;
|
|
21
|
+
onMouseUp?: (event: React.SyntheticEvent) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Props that make `Button` (or `TextIconButton`) disabled. `Button` itself only applies them.
|
|
25
|
+
*
|
|
26
|
+
* - enabled: `{ disabled }`
|
|
27
|
+
* - disabled: native `disabled`, the button leaves the tab order
|
|
28
|
+
* - disabled and `focusable`: `aria-disabled`, activation is blocked, the button stays focusable and hoverable
|
|
29
|
+
*
|
|
30
|
+
* `onKeyDown`/`onKeyUp` are left untouched: Tooltip needs them. Enter/Space on a focused button without the native
|
|
31
|
+
* `disabled` attribute fire a click, which is blocked here.
|
|
32
|
+
*
|
|
33
|
+
* The caller merges the returned `className` with its own and wraps the button in whatever explains the state.
|
|
34
|
+
*/
|
|
35
|
+
export declare const getButtonDisabledProps: ({ disabled, focusable, link }: IButtonDisabledOptions) => IButtonDisabledProps;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getButtonDisabledProps = exports.BUTTON_DISABLED_FOCUSABLE_CLASS = exports.BUTTON_DISABLED_CLASS = void 0;
|
|
4
|
+
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
5
|
+
// `button.less` styles these classes: `--disabled-focusable` keeps pointer events so hover/tooltip still work.
|
|
6
|
+
exports.BUTTON_DISABLED_CLASS = "zen-button--disabled";
|
|
7
|
+
exports.BUTTON_DISABLED_FOCUSABLE_CLASS = "zen-button--disabled-focusable";
|
|
8
|
+
const blockActivation = (event) => {
|
|
9
|
+
event.preventDefault();
|
|
10
|
+
event.stopPropagation();
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Props that make `Button` (or `TextIconButton`) disabled. `Button` itself only applies them.
|
|
14
|
+
*
|
|
15
|
+
* - enabled: `{ disabled }`
|
|
16
|
+
* - disabled: native `disabled`, the button leaves the tab order
|
|
17
|
+
* - disabled and `focusable`: `aria-disabled`, activation is blocked, the button stays focusable and hoverable
|
|
18
|
+
*
|
|
19
|
+
* `onKeyDown`/`onKeyUp` are left untouched: Tooltip needs them. Enter/Space on a focused button without the native
|
|
20
|
+
* `disabled` attribute fire a click, which is blocked here.
|
|
21
|
+
*
|
|
22
|
+
* The caller merges the returned `className` with its own and wraps the button in whatever explains the state.
|
|
23
|
+
*/
|
|
24
|
+
const getButtonDisabledProps = ({ disabled, focusable, link }) => {
|
|
25
|
+
if (!disabled || !focusable) {
|
|
26
|
+
return { disabled };
|
|
27
|
+
}
|
|
28
|
+
const hasLink = Boolean(link);
|
|
29
|
+
return Object.assign(Object.assign({}, (hasLink ? { disabled: true, tabIndex: 0 } : { "aria-disabled": true })), {
|
|
30
|
+
// Button adds `zen-button--disabled` to a disabled link itself.
|
|
31
|
+
className: (0, classNames_1.classNames)([hasLink ? "" : exports.BUTTON_DISABLED_CLASS, exports.BUTTON_DISABLED_FOCUSABLE_CLASS]), onClick: blockActivation, onMouseDown: blockActivation, onMouseUp: blockActivation });
|
|
32
|
+
};
|
|
33
|
+
exports.getButtonDisabledProps = getButtonDisabledProps;
|
|
@@ -4,6 +4,7 @@ exports.pieLegendPlugin = void 0;
|
|
|
4
4
|
const zen_1 = require("../../utils/zen");
|
|
5
5
|
const getPieLegendItems_1 = require("./getPieLegendItems");
|
|
6
6
|
const renderPieLegend_1 = require("./renderPieLegend");
|
|
7
|
+
const legendFocus_1 = require("../plugins/legend/legendFocus");
|
|
7
8
|
const pieLegendPlugin = (containerId, options, isDrive, rawData, isHidden, toggleHidden) => ({
|
|
8
9
|
id: "zenithPieLegend",
|
|
9
10
|
isDrive,
|
|
@@ -37,9 +38,11 @@ const pieLegendPlugin = (containerId, options, isDrive, rawData, isHidden, toggl
|
|
|
37
38
|
barWidth: hidden ? 0 : total > 0 ? (rawValues[item.index] / total) * 100 : 0
|
|
38
39
|
}));
|
|
39
40
|
});
|
|
41
|
+
const focusedIndex = (0, legendFocus_1.getFocusedLegendIndex)(container);
|
|
40
42
|
container.innerHTML = "";
|
|
41
43
|
container.classList.remove("zen-legend--hidden");
|
|
42
44
|
(0, renderPieLegend_1.renderPieLegend)(container, isDrive, items, options);
|
|
45
|
+
(0, legendFocus_1.restoreLegendFocus)(container, focusedIndex);
|
|
43
46
|
}
|
|
44
47
|
});
|
|
45
48
|
exports.pieLegendPlugin = pieLegendPlugin;
|
|
@@ -19,8 +19,7 @@ const renderPieLegend = (element, isDrive, items, options) => {
|
|
|
19
19
|
<div class="zen-pie-legend__item-bar" data-bar-width="${(_a = item.barWidth) !== null && _a !== void 0 ? _a : 0}"></div>
|
|
20
20
|
</div>`
|
|
21
21
|
: "";
|
|
22
|
-
|
|
23
|
-
<span class="zen-pie-legend__item-color"></span>
|
|
22
|
+
const content = `<span class="zen-pie-legend__item-color"></span>
|
|
24
23
|
<div class="zen-pie-legend__item-content">
|
|
25
24
|
<div class="zen-pie-legend__item-row">
|
|
26
25
|
<p class="${labelClass}">${(0, escapeHtml_1.htmlEscape)(item.text)}</p>
|
|
@@ -28,8 +27,11 @@ const renderPieLegend = (element, isDrive, items, options) => {
|
|
|
28
27
|
${percentageHtml}
|
|
29
28
|
</div>
|
|
30
29
|
${barHtml}
|
|
31
|
-
</div
|
|
32
|
-
|
|
30
|
+
</div>`;
|
|
31
|
+
const control = item.onClick
|
|
32
|
+
? `<button type="button" class="zen-pie-legend__button" aria-pressed="${!item.hidden}">${content}</button>`
|
|
33
|
+
: `<span class="zen-pie-legend__button">${content}</span>`;
|
|
34
|
+
return `<li class="zen-pie-legend__item" data-index="${item.index}">${control}</li>`;
|
|
33
35
|
})
|
|
34
36
|
.join("");
|
|
35
37
|
element.innerHTML = `<ul class="${classes}">${listItems}</ul>`;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.restoreLegendFocus = exports.getFocusedLegendIndex = void 0;
|
|
4
|
+
const getFocusedLegendIndex = (container) => {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
const active = container.ownerDocument.activeElement;
|
|
7
|
+
if (!active || !container.contains(active)) {
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
return (_b = (_a = active.closest("[data-index]")) === null || _a === void 0 ? void 0 : _a.getAttribute("data-index")) !== null && _b !== void 0 ? _b : undefined;
|
|
11
|
+
};
|
|
12
|
+
exports.getFocusedLegendIndex = getFocusedLegendIndex;
|
|
13
|
+
const restoreLegendFocus = (container, index) => {
|
|
14
|
+
var _a;
|
|
15
|
+
if (index === undefined) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
(_a = container.querySelector(`[data-index="${index}"] button`)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
19
|
+
};
|
|
20
|
+
exports.restoreLegendFocus = restoreLegendFocus;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.legendPlugin = exports.LEGEND_PLUGIN_ID = void 0;
|
|
4
4
|
const renderLegend_1 = require("./renderLegend");
|
|
5
|
+
const legendFocus_1 = require("./legendFocus");
|
|
5
6
|
const getLineLegendItems_1 = require("../../lineChart/getLineLegendItems");
|
|
6
7
|
const getBarLegendItems_1 = require("../../barChart/getBarLegendItems");
|
|
7
8
|
const getPieLegendItems_1 = require("../../pieChart/getPieLegendItems");
|
|
@@ -20,6 +21,7 @@ const legendPlugin = (containerId, options, isDrive, isHidden, toggleHidden) =>
|
|
|
20
21
|
container.classList.add("zen-legend--hidden");
|
|
21
22
|
return;
|
|
22
23
|
}
|
|
24
|
+
const focusedIndex = (0, legendFocus_1.getFocusedLegendIndex)(container);
|
|
23
25
|
container.innerHTML = "";
|
|
24
26
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
27
|
const chartType = chart.config.type;
|
|
@@ -46,6 +48,7 @@ const legendPlugin = (containerId, options, isDrive, isHidden, toggleHidden) =>
|
|
|
46
48
|
}
|
|
47
49
|
container.classList.remove("zen-legend--hidden");
|
|
48
50
|
(0, renderLegend_1.renderLegend)(container, this.isDrive, items);
|
|
51
|
+
(0, legendFocus_1.restoreLegendFocus)(container, focusedIndex);
|
|
49
52
|
}
|
|
50
53
|
});
|
|
51
54
|
exports.legendPlugin = legendPlugin;
|
|
@@ -6,13 +6,17 @@ const escapeHtml_1 = require("../../../utils/escapeHtml");
|
|
|
6
6
|
const renderLegend = (element, isDrive, items) => {
|
|
7
7
|
const classes = (0, classNames_1.classNames)(["zen-legend", isDrive ? "zen-legend--drive" : ""]);
|
|
8
8
|
const listItems = items
|
|
9
|
-
.map((item, index) =>
|
|
10
|
-
|
|
9
|
+
.map((item, index) => {
|
|
10
|
+
const content = `<span class="zen-legend__item-color" style="background-color: ${item.color};"></span>
|
|
11
11
|
<p class="${(0, classNames_1.classNames)(["zen-legend__item-label", item.hidden ? "zen-legend__item-label--hidden" : ""])}">${(0, escapeHtml_1.htmlEscape)(item.text)}</p>
|
|
12
12
|
${item.value !== undefined
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
? `<p class="${(0, classNames_1.classNames)(["zen-legend__item-value", item.hidden ? "zen-legend__item-value--hidden" : ""])}">${(0, escapeHtml_1.htmlEscape)(item.value)}</p>`
|
|
14
|
+
: ""}`;
|
|
15
|
+
const control = item.onClick
|
|
16
|
+
? `<button type="button" class="zen-legend__button" aria-pressed="${!item.hidden}">${content}</button>`
|
|
17
|
+
: `<span class="zen-legend__button">${content}</span>`;
|
|
18
|
+
return `<li class="zen-legend__item" data-index="${index}">${control}</li>`;
|
|
19
|
+
})
|
|
16
20
|
.join("");
|
|
17
21
|
element.innerHTML = `<ul class='${classes}'>${listItems}</ul>`;
|
|
18
22
|
const itemElements = element.querySelectorAll(".zen-legend__item");
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import React from "react";
|
|
1
3
|
import "./checkboxListWithAction.less";
|
|
2
4
|
import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
3
5
|
import { IColor } from "../groupsFilterRaw/groupsFilterInterfaces";
|
|
6
|
+
import { IIcon } from "../icons/icon";
|
|
4
7
|
export interface ICheckboxListWithActionOption {
|
|
5
8
|
label: string;
|
|
6
9
|
title?: string;
|
|
@@ -11,6 +14,16 @@ export interface ICheckboxListWithActionOption {
|
|
|
11
14
|
isWithAction: boolean;
|
|
12
15
|
countSelectedChild?: number;
|
|
13
16
|
color?: IColor;
|
|
17
|
+
/** Leading 16×16 icon rendered before the label text. */
|
|
18
|
+
icon?: FC<IIcon>;
|
|
19
|
+
/** Secondary text rendered on a second line below the primary label. */
|
|
20
|
+
metaData?: string;
|
|
21
|
+
/** Right-aligned trailing action button; clicking it does NOT toggle the checkbox. */
|
|
22
|
+
trailingAction?: {
|
|
23
|
+
icon: FC<IIcon>;
|
|
24
|
+
onClick: (id: string) => void;
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
};
|
|
14
27
|
/** When true, renders a 1px separator line below this item. */
|
|
15
28
|
divider?: boolean;
|
|
16
29
|
}
|