@geotab/zenith 3.11.0-beta.0 → 3.11.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 +3 -26
- package/dist/calendar/calendar.js +4 -7
- package/dist/card/components/title.js +1 -4
- package/dist/card/components/titleLink.js +2 -5
- package/dist/chart/barChart/getDefaultOptions.d.ts +1 -2
- package/dist/chart/barChart/getDefaultOptions.js +2 -5
- package/dist/chart/barChart.js +4 -6
- package/dist/chart/lineChart/getDefaultOptions.d.ts +1 -2
- package/dist/chart/lineChart/getDefaultOptions.js +2 -5
- package/dist/chart/lineChart.js +2 -4
- package/dist/checkboxListWithAction/checkboxListWithAction.js +1 -4
- package/dist/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +1 -4
- package/dist/commonStyles/pillStyles/pillContent.less +14 -13
- package/dist/commonStyles/pillStyles/pillStyles.less +5 -4
- package/dist/commonStyles/pillStyles/pillTextContent.less +2 -2
- package/dist/commonStyles/typography/typography.less +19 -579
- package/dist/controlledPopup/controlledPopup.d.ts +0 -1
- package/dist/controlledPopup/controlledPopup.js +1 -3
- package/dist/dataGrid/cell/cell.d.ts +1 -2
- package/dist/dataGrid/cell/cell.js +2 -2
- package/dist/dataGrid/dataGrid.js +4 -7
- package/dist/dataGrid/listColumn.d.ts +0 -2
- package/dist/dataGrid/row/row.d.ts +1 -2
- package/dist/dataGrid/row/row.js +9 -13
- package/dist/dataGrid/withFlexibleColumns/components/columnSettingsList.js +1 -2
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +0 -4
- package/dist/dateRangeInner/dateRangeInner.js +2 -5
- package/dist/dateRangeRaw/dateRangeRaw.js +2 -5
- package/dist/dateRangeRaw/utils/parseLabel.js +1 -1
- package/dist/dropdownRaw/dropdownRaw.js +6 -12
- package/dist/fileUpload/components/dropZoneContent.js +100 -100
- package/dist/fileUpload/fileUpload.js +100 -100
- package/dist/filters/components/filtersSearchList.js +1 -4
- package/dist/filtersBar/filtersContainer/filtersContainer.js +61 -62
- package/dist/formStepperButtons/formStepperButtons.js +1 -4
- package/dist/groupsFilterRaw/groupsFilterAdjustmentState.js +1 -4
- package/dist/groupsFilterRaw/groupsFilterInitialState.js +1 -4
- package/dist/header/headerBack.js +1 -4
- package/dist/icons/iconAlignLeft.js +3 -1
- package/dist/icons/iconAlignmentLeft.js +3 -1
- package/dist/icons/iconAlignmentRight.js +3 -1
- package/dist/icons/iconArrowBottomLeft.js +3 -1
- package/dist/icons/iconArrowBottomRight.js +3 -1
- package/dist/icons/iconArrowLeftPath.js +3 -1
- package/dist/icons/iconArrowRight.js +3 -1
- package/dist/icons/iconArrowRightCircle.js +3 -1
- package/dist/icons/iconArrowRightPath.js +3 -1
- package/dist/icons/iconArrowTopLeft.js +3 -1
- package/dist/icons/iconArrowTopRight.js +3 -1
- package/dist/icons/iconChevronDoubleRight.js +3 -1
- package/dist/icons/iconChevronRight.js +3 -1
- package/dist/icons/iconChevronRightSmall.js +3 -1
- package/dist/icons/iconCornerDownLeft.js +3 -1
- package/dist/icons/iconCornerDownRight.js +3 -1
- package/dist/icons/iconCornerLeftDown.js +3 -1
- package/dist/icons/iconCornerLeftUp.js +3 -1
- package/dist/icons/iconCornerRightDown.js +3 -1
- package/dist/icons/iconCornerRightUp.js +3 -1
- package/dist/icons/iconCornerUpLeft.js +3 -1
- package/dist/icons/iconCornerUpRight.js +3 -1
- package/dist/index.css +2920 -3245
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -3
- package/dist/lineChartMini/lineChartMini.js +3 -15
- package/dist/list/itemData/itemDataInternal.js +1 -4
- package/dist/list/listItem/listItem.js +1 -4
- package/dist/menu/components/controlledMenuList/controlledMenuList.js +1 -4
- package/dist/menu/components/menuButton.js +1 -4
- package/dist/menu/utils/useMenuItemCore.js +3 -4
- package/dist/nav/navItem/navItem.js +1 -4
- package/dist/pagination/paginationArrow.js +3 -10
- package/dist/radioGroupRaw/radioGroupRaw.js +1 -2
- package/dist/rangeRaw/rangeRaw.js +1 -0
- package/dist/selectList/selectList.helpers.d.ts +1 -1
- package/dist/selectList/selectList.helpers.js +4 -29
- package/dist/selectList/selectList.js +1 -3
- package/dist/selectList/selectList.reducer.js +2 -1
- package/dist/selectList/selectListItem.js +1 -4
- package/dist/sortControl/sortControl.js +4 -59
- package/dist/table/children/useTableChildren.d.ts +1 -1
- package/dist/table/children/useTableChildren.js +3 -3
- package/dist/table/flexible/columnsList.js +2 -4
- package/dist/table/selectable/useSelectableRows.d.ts +0 -8
- package/dist/table/selectable/useSelectableRows.js +6 -14
- package/dist/table/table.js +7 -1
- package/dist/tabs/tabs.js +58 -60
- package/dist/tabs/tabsTestHelper.js +2 -2
- package/dist/timePickerRaw/timePickerRaw.js +1 -1
- package/dist/toggleButtonRaw/toggleButtonRaw.js +2 -5
- package/dist/utils/localization/translations/ar.json +1 -3
- package/dist/utils/localization/translations/cs.json +5 -9
- package/dist/utils/localization/translations/da-DK.json +5 -9
- package/dist/utils/localization/translations/de.json +5 -9
- package/dist/utils/localization/translations/en.json +1 -5
- package/dist/utils/localization/translations/es.json +5 -9
- package/dist/utils/localization/translations/fi-FI.json +5 -9
- package/dist/utils/localization/translations/fr-FR.json +5 -9
- package/dist/utils/localization/translations/fr.json +5 -9
- package/dist/utils/localization/translations/hu-HU.json +5 -9
- package/dist/utils/localization/translations/id.json +5 -9
- package/dist/utils/localization/translations/it.json +5 -9
- package/dist/utils/localization/translations/ja.json +5 -9
- package/dist/utils/localization/translations/ko-KR.json +5 -9
- package/dist/utils/localization/translations/ms.json +5 -9
- package/dist/utils/localization/translations/nb-NO.json +5 -9
- package/dist/utils/localization/translations/nl.json +5 -9
- package/dist/utils/localization/translations/pl.json +5 -9
- package/dist/utils/localization/translations/pt-BR.json +5 -9
- package/dist/utils/localization/translations/pt-PT.json +5 -9
- package/dist/utils/localization/translations/ro-RO.json +5 -9
- package/dist/utils/localization/translations/sk-SK.json +5 -9
- package/dist/utils/localization/translations/sv.json +5 -9
- package/dist/utils/localization/translations/th.json +5 -9
- package/dist/utils/localization/translations/tr.json +5 -9
- package/dist/utils/localization/translations/zh-Hans.json +5 -9
- package/dist/utils/localization/translations/zh-TW.json +5 -9
- package/dist/utils/positioningUtils/alignments.d.ts +2 -2
- package/dist/utils/positioningUtils/alignments.js +2 -2
- package/dist/utils/positioningUtils/calculatePosition.js +6 -4
- package/esm/calendar/calendar.js +4 -7
- package/esm/card/components/title.js +1 -4
- package/esm/card/components/titleLink.js +2 -5
- package/esm/chart/barChart/getDefaultOptions.d.ts +1 -2
- package/esm/chart/barChart/getDefaultOptions.js +2 -5
- package/esm/chart/barChart.js +4 -6
- package/esm/chart/lineChart/getDefaultOptions.d.ts +1 -2
- package/esm/chart/lineChart/getDefaultOptions.js +2 -5
- package/esm/chart/lineChart.js +2 -4
- package/esm/checkboxListWithAction/checkboxListWithAction.js +1 -4
- package/esm/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +1 -4
- package/esm/controlledPopup/controlledPopup.d.ts +0 -1
- package/esm/controlledPopup/controlledPopup.js +1 -3
- package/esm/dataGrid/cell/cell.d.ts +1 -2
- package/esm/dataGrid/cell/cell.js +2 -2
- package/esm/dataGrid/dataGrid.js +4 -7
- package/esm/dataGrid/listColumn.d.ts +0 -2
- package/esm/dataGrid/row/row.d.ts +1 -2
- package/esm/dataGrid/row/row.js +9 -13
- package/esm/dataGrid/withFlexibleColumns/components/columnSettingsList.js +1 -2
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +0 -4
- package/esm/dateRangeInner/dateRangeInner.js +2 -5
- package/esm/dateRangeRaw/dateRangeRaw.js +2 -5
- package/esm/dateRangeRaw/utils/parseLabel.js +1 -1
- package/esm/dropdownRaw/dropdownRaw.js +6 -12
- package/esm/fileUpload/components/dropZoneContent.js +100 -100
- package/esm/fileUpload/fileUpload.js +100 -100
- package/esm/filters/components/filtersSearchList.js +1 -4
- package/esm/filtersBar/filtersContainer/filtersContainer.js +61 -62
- package/esm/formStepperButtons/formStepperButtons.js +1 -4
- package/esm/groupsFilterRaw/groupsFilterAdjustmentState.js +1 -4
- package/esm/groupsFilterRaw/groupsFilterInitialState.js +1 -4
- package/esm/header/headerBack.js +1 -4
- package/esm/icons/iconAlignLeft.js +3 -1
- package/esm/icons/iconAlignmentLeft.js +3 -1
- package/esm/icons/iconAlignmentRight.js +3 -1
- package/esm/icons/iconArrowBottomLeft.js +3 -1
- package/esm/icons/iconArrowBottomRight.js +3 -1
- package/esm/icons/iconArrowLeftPath.js +3 -1
- package/esm/icons/iconArrowRight.js +3 -1
- package/esm/icons/iconArrowRightCircle.js +3 -1
- package/esm/icons/iconArrowRightPath.js +3 -1
- package/esm/icons/iconArrowTopLeft.js +3 -1
- package/esm/icons/iconArrowTopRight.js +3 -1
- package/esm/icons/iconChevronDoubleRight.js +3 -1
- package/esm/icons/iconChevronRight.js +3 -1
- package/esm/icons/iconChevronRightSmall.js +3 -1
- package/esm/icons/iconCornerDownLeft.js +3 -1
- package/esm/icons/iconCornerDownRight.js +3 -1
- package/esm/icons/iconCornerLeftDown.js +3 -1
- package/esm/icons/iconCornerLeftUp.js +3 -1
- package/esm/icons/iconCornerRightDown.js +3 -1
- package/esm/icons/iconCornerRightUp.js +3 -1
- package/esm/icons/iconCornerUpLeft.js +3 -1
- package/esm/icons/iconCornerUpRight.js +3 -1
- package/esm/index.d.ts +0 -1
- package/esm/index.js +0 -1
- package/esm/lineChartMini/lineChartMini.js +3 -15
- package/esm/list/itemData/itemDataInternal.js +1 -4
- package/esm/list/listItem/listItem.js +1 -4
- package/esm/menu/components/controlledMenuList/controlledMenuList.js +1 -4
- package/esm/menu/components/menuButton.js +1 -4
- package/esm/menu/utils/useMenuItemCore.js +3 -4
- package/esm/nav/navItem/navItem.js +1 -4
- package/esm/pagination/paginationArrow.js +3 -10
- package/esm/radioGroupRaw/radioGroupRaw.js +1 -2
- package/esm/rangeRaw/rangeRaw.js +1 -0
- package/esm/selectList/selectList.helpers.d.ts +1 -1
- package/esm/selectList/selectList.helpers.js +4 -29
- package/esm/selectList/selectList.js +1 -3
- package/esm/selectList/selectList.reducer.js +2 -1
- package/esm/selectList/selectListItem.js +1 -4
- package/esm/sortControl/sortControl.js +4 -59
- package/esm/table/children/useTableChildren.d.ts +1 -1
- package/esm/table/children/useTableChildren.js +3 -3
- package/esm/table/flexible/columnsList.js +2 -4
- package/esm/table/selectable/useSelectableRows.d.ts +0 -8
- package/esm/table/selectable/useSelectableRows.js +6 -14
- package/esm/table/table.js +7 -1
- package/esm/tabs/tabs.js +58 -60
- package/esm/tabs/tabsTestHelper.js +2 -2
- package/esm/timePickerRaw/timePickerRaw.js +1 -1
- package/esm/toggleButtonRaw/toggleButtonRaw.js +2 -5
- package/esm/utils/localization/translations/ar.json +1 -3
- package/esm/utils/localization/translations/cs.json +5 -9
- package/esm/utils/localization/translations/da-DK.json +5 -9
- package/esm/utils/localization/translations/de.json +5 -9
- package/esm/utils/localization/translations/en.json +1 -5
- package/esm/utils/localization/translations/es.json +5 -9
- package/esm/utils/localization/translations/fi-FI.json +5 -9
- package/esm/utils/localization/translations/fr-FR.json +5 -9
- package/esm/utils/localization/translations/fr.json +5 -9
- package/esm/utils/localization/translations/hu-HU.json +5 -9
- package/esm/utils/localization/translations/id.json +5 -9
- package/esm/utils/localization/translations/it.json +5 -9
- package/esm/utils/localization/translations/ja.json +5 -9
- package/esm/utils/localization/translations/ko-KR.json +5 -9
- package/esm/utils/localization/translations/ms.json +5 -9
- package/esm/utils/localization/translations/nb-NO.json +5 -9
- package/esm/utils/localization/translations/nl.json +5 -9
- package/esm/utils/localization/translations/pl.json +5 -9
- package/esm/utils/localization/translations/pt-BR.json +5 -9
- package/esm/utils/localization/translations/pt-PT.json +5 -9
- package/esm/utils/localization/translations/ro-RO.json +5 -9
- package/esm/utils/localization/translations/sk-SK.json +5 -9
- package/esm/utils/localization/translations/sv.json +5 -9
- package/esm/utils/localization/translations/th.json +5 -9
- package/esm/utils/localization/translations/tr.json +5 -9
- package/esm/utils/localization/translations/zh-Hans.json +5 -9
- package/esm/utils/localization/translations/zh-TW.json +5 -9
- package/esm/utils/positioningUtils/alignments.d.ts +2 -2
- package/esm/utils/positioningUtils/alignments.js +2 -2
- package/esm/utils/positioningUtils/calculatePosition.js +6 -4
- package/package.json +122 -123
- package/dist/utils/localization/useDirectionalIcon.d.ts +0 -3
- package/dist/utils/localization/useDirectionalIcon.js +0 -9
- package/esm/testHelpers/mockAbsoluteAlignment.d.ts +0 -1
- package/esm/testHelpers/mockAbsoluteAlignment.js +0 -10
- package/esm/utils/localization/useDirectionalIcon.d.ts +0 -3
- package/esm/utils/localization/useDirectionalIcon.js +0 -5
package/README.md
CHANGED
|
@@ -49,32 +49,9 @@ Zenith library provides components defined in Zenith Design System. It includes
|
|
|
49
49
|
|
|
50
50
|
### 3.11.0
|
|
51
51
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
- Convert form structure and stepper components to rem units
|
|
56
|
-
- Convert modal, overlays, and popups to rem units
|
|
57
|
-
- Convert navigation and menus to rem units
|
|
58
|
-
- Convert filters, search, and column selector to rem units
|
|
59
|
-
- Fix prop in nested row
|
|
60
|
-
- Update typography CSS class names to avoid overlap with legacy classes
|
|
61
|
-
- Fix dialog content scroll issue
|
|
62
|
-
- Fix missing FileUploader drop zone translations in 25 locales
|
|
63
|
-
- Fix mobile view table content showing double line
|
|
64
|
-
- Fix calendar range showing incorrect edge
|
|
65
|
-
- Fix `Toggle` ScreenReader not announcing label on hover
|
|
66
|
-
- Fix `SideNav` nested `NavItem` keyboard navigation inside `NavSection`
|
|
67
|
-
- Fix `TimePicker` showing incorrect time
|
|
68
|
-
- Fix date range separator from hyphen to en dash
|
|
69
|
-
- Fix table column truncation with minWidth/maxWidth support
|
|
70
|
-
- Fix `SortControl` accessibility — remove redundant aria-label, add visually hidden sort direction text
|
|
71
|
-
- Fix RTL popup alignment across components
|
|
72
|
-
- Fix `RadioGroup` radio button misalignment for long option text
|
|
73
|
-
- Fix `Dropdown` loading state persisting when static dataItems and isLoading change simultaneously
|
|
74
|
-
- Restore `Select All` behavior for tables and cross-page selections
|
|
75
|
-
- Fix `Nav` content gap
|
|
76
|
-
- Fix keyboard accessibility in `SelectList` flexible columns popup — skip disabled items
|
|
77
|
-
- Fix RTL directional icons to use counterpart icons instead of CSS flip
|
|
52
|
+
- Add `ControlledMenuList` component and `createMenuItem`/`createControlledMenuList` factories for typed, path-based menu navigation with keyboard support
|
|
53
|
+
- Improve `NavItem` keyboard navigation
|
|
54
|
+
- Fix gap for `Nav` component
|
|
78
55
|
|
|
79
56
|
### 3.10.0
|
|
80
57
|
|
|
@@ -823,7 +823,6 @@ const dateUtils_1 = require("./dateUtils");
|
|
|
823
823
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
824
824
|
const iconChevronRightSmall_1 = require("../icons/iconChevronRightSmall");
|
|
825
825
|
const iconChevronLeftSmall_1 = require("../icons/iconChevronLeftSmall");
|
|
826
|
-
const useDirectionalIcon_1 = require("../utils/localization/useDirectionalIcon");
|
|
827
826
|
const parallelSelection_1 = require("../parallelSelection/parallelSelection");
|
|
828
827
|
const calendarUtils_1 = require("./calendarUtils");
|
|
829
828
|
const useLanguage_1 = require("../utils/localization/useLanguage");
|
|
@@ -854,8 +853,6 @@ const Calendar = ({
|
|
|
854
853
|
const {
|
|
855
854
|
translate
|
|
856
855
|
} = (0, useLanguage_1.useLanguage)();
|
|
857
|
-
const PrevMonthIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronLeftSmall_1.IconChevronLeftSmall, iconChevronRightSmall_1.IconChevronRightSmall);
|
|
858
|
-
const NextMonthIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronRightSmall_1.IconChevronRightSmall, iconChevronLeftSmall_1.IconChevronLeftSmall);
|
|
859
856
|
const fromDate = (0, react_1.useMemo)(() => value.from ? (0, dateUtils_1.toDayStart)(value.from) : undefined, [value.from]);
|
|
860
857
|
const toDate = (0, react_1.useMemo)(() => value.to ? (0, dateUtils_1.toDayStart)(value.to) : undefined, [value.to]);
|
|
861
858
|
const driveClassName = (0, useDriveClassName_1.useDriveClassName)("zen-calendar");
|
|
@@ -1109,7 +1106,7 @@ const Calendar = ({
|
|
|
1109
1106
|
children: [isMobileView ? null : (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
|
|
1110
1107
|
className: "zen-calendar__btn",
|
|
1111
1108
|
type: "tertiary-black",
|
|
1112
|
-
icon:
|
|
1109
|
+
icon: iconChevronLeftSmall_1.IconChevronLeftSmall,
|
|
1113
1110
|
title: translate("Previous month"),
|
|
1114
1111
|
onClick: () => changeView((0, dateUtils_1.addMonth)(viewDate, -1)),
|
|
1115
1112
|
iconPosition: textIconButton_2.ButtonIconPosition.Start
|
|
@@ -1143,14 +1140,14 @@ const Calendar = ({
|
|
|
1143
1140
|
children: [(0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
|
|
1144
1141
|
className: "zen-calendar__btn",
|
|
1145
1142
|
type: "tertiary-black",
|
|
1146
|
-
icon:
|
|
1143
|
+
icon: iconChevronLeftSmall_1.IconChevronLeftSmall,
|
|
1147
1144
|
title: translate("Previous month"),
|
|
1148
1145
|
onClick: () => changeView((0, dateUtils_1.addMonth)(viewDate, -1)),
|
|
1149
1146
|
iconPosition: textIconButton_2.ButtonIconPosition.Start
|
|
1150
1147
|
}), (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
|
|
1151
1148
|
className: "zen-calendar__btn",
|
|
1152
1149
|
type: "tertiary-black",
|
|
1153
|
-
icon:
|
|
1150
|
+
icon: iconChevronRightSmall_1.IconChevronRightSmall,
|
|
1154
1151
|
title: translate("Next month"),
|
|
1155
1152
|
onClick: () => changeView((0, dateUtils_1.addMonth)(viewDate, 1)),
|
|
1156
1153
|
iconPosition: textIconButton_2.ButtonIconPosition.Start
|
|
@@ -1158,7 +1155,7 @@ const Calendar = ({
|
|
|
1158
1155
|
}) : null, isMobileView ? null : (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
|
|
1159
1156
|
className: "zen-calendar__btn",
|
|
1160
1157
|
type: "tertiary-black",
|
|
1161
|
-
icon:
|
|
1158
|
+
icon: iconChevronRightSmall_1.IconChevronRightSmall,
|
|
1162
1159
|
title: translate("Next month"),
|
|
1163
1160
|
onClick: () => changeView((0, dateUtils_1.addMonth)(viewDate, 1)),
|
|
1164
1161
|
iconPosition: textIconButton_2.ButtonIconPosition.Start
|
|
@@ -7,8 +7,6 @@ const classNames_1 = require("../../commonHelpers/classNames/classNames");
|
|
|
7
7
|
const useDriveClassName_1 = require("../../utils/theme/useDriveClassName");
|
|
8
8
|
const useDrive_1 = require("../../utils/theme/useDrive");
|
|
9
9
|
const iconChevronRightSmall_1 = require("../../icons/iconChevronRightSmall");
|
|
10
|
-
const iconChevronLeftSmall_1 = require("../../icons/iconChevronLeftSmall");
|
|
11
|
-
const useDirectionalIcon_1 = require("../../utils/localization/useDirectionalIcon");
|
|
12
10
|
const VALID_HEADING_TAGS = new Set(["h1", "h2", "h3", "h4", "h5", "h6"]);
|
|
13
11
|
const Title = ({ isMobile, link, target, title, id, icon, iconType, className = "", onClick, titleAs }) => {
|
|
14
12
|
const driveClassNames = (0, useDriveClassName_1.useDriveClassName)("zen-card-title");
|
|
@@ -16,8 +14,7 @@ const Title = ({ isMobile, link, target, title, id, icon, iconType, className =
|
|
|
16
14
|
const iconClassName = iconType ? `zen-card-title__icon--${iconType}` : "";
|
|
17
15
|
const iconSize = (0, react_1.useMemo)(() => (isDrive ? "huge" : "large"), [isDrive]);
|
|
18
16
|
const iconElement = (0, react_1.useMemo)(() => (icon ? (0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)(["zen-card-title__icon", iconClassName]), children: (0, react_1.createElement)(icon, { size: iconSize }) }) : null), [icon, iconSize, iconClassName]);
|
|
19
|
-
const
|
|
20
|
-
const chevron = (0, react_1.useMemo)(() => ((0, jsx_runtime_1.jsx)("span", { className: "zen-card-title__link-chevron", children: (0, jsx_runtime_1.jsx)(ChevronIcon, { size: iconSize, className: "zen-card-title__chevron-icon" }) })), [ChevronIcon, iconSize]);
|
|
17
|
+
const chevron = (0, react_1.useMemo)(() => ((0, jsx_runtime_1.jsx)("span", { className: "zen-card-title__link-chevron", children: (0, jsx_runtime_1.jsx)(iconChevronRightSmall_1.IconChevronRightSmall, { size: iconSize, className: "zen-card-title__chevron-icon" }) })), [iconSize]);
|
|
21
18
|
const titleClasses = (0, classNames_1.classNames)(["zen-card-title", driveClassNames || "", onClick ? "zen-card-title__clickable" : ""]);
|
|
22
19
|
if (onClick) {
|
|
23
20
|
return ((0, jsx_runtime_1.jsxs)("button", { type: "button", className: titleClasses, onClick: onClick, children: [iconElement, (0, jsx_runtime_1.jsxs)("span", { title: title, id: id, className: (0, classNames_1.classNames)(["zen-card-title__text", isMobile && !isDrive ? "zen-card-title__text--mobile" : "", className]), children: [title, chevron] })] }));
|
|
@@ -5,8 +5,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const classNames_1 = require("../../commonHelpers/classNames/classNames");
|
|
6
6
|
const textIconButton_1 = require("../../textIconButton/textIconButton");
|
|
7
7
|
const iconArrowRight_1 = require("../../icons/iconArrowRight");
|
|
8
|
-
const iconArrowLeft_1 = require("../../icons/iconArrowLeft");
|
|
9
|
-
const useDirectionalIcon_1 = require("../../utils/localization/useDirectionalIcon");
|
|
10
8
|
const useDriveClassName_1 = require("../../utils/theme/useDriveClassName");
|
|
11
9
|
const useMobile_1 = require("../../commonHelpers/hooks/useMobile");
|
|
12
10
|
const useDrive_1 = require("../../utils/theme/useDrive");
|
|
@@ -16,10 +14,9 @@ const TitleLink = ({ titleIconClasses, ariaLabel, children, link, id, className
|
|
|
16
14
|
const isMobile = (0, useMobile_1.useMobile)();
|
|
17
15
|
const isDrive = (0, useDrive_1.useDrive)();
|
|
18
16
|
const titleAriaLabel = ariaLabel || "";
|
|
19
|
-
const ArrowIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconArrowRight_1.IconArrowRight, iconArrowLeft_1.IconArrowLeft);
|
|
20
17
|
if (!isMobile) {
|
|
21
|
-
return ((0, jsx_runtime_1.jsxs)("a", { id: id, className: (0, classNames_1.classNames)(["zen-link", "zen-title-link", className]), href: link, "aria-label": titleAriaLabel, children: [(0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)(["zen-title-link__text", titleLinkTextDriveClasses || ""]), children: children }), (0, jsx_runtime_1.jsx)(
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)("a", { id: id, className: (0, classNames_1.classNames)(["zen-link", "zen-title-link", className]), href: link, "aria-label": titleAriaLabel, children: [(0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)(["zen-title-link__text", titleLinkTextDriveClasses || ""]), children: children }), (0, jsx_runtime_1.jsx)(iconArrowRight_1.IconArrowRight, { size: isDrive ? "huge" : "large", className: (0, classNames_1.classNames)(["zen-title-link__icon", titleIconClasses || ""]) })] }));
|
|
22
19
|
}
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, { type: "tertiary", iconClasses: titleIconClasses, id: id, "aria-label": titleAriaLabel, link: link, iconPosition: textIconButton_1.ButtonIconPosition.End, icon:
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, { type: "tertiary", iconClasses: titleIconClasses, id: id, "aria-label": titleAriaLabel, link: link, iconPosition: textIconButton_1.ButtonIconPosition.End, icon: iconArrowRight_1.IconArrowRight, iconSize: isDrive ? "huge" : "large", className: (0, classNames_1.classNames)(["zen-title-link", "zen-title-link__icon", titleLinkClasses || "", className || ""]), children: children && (0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)(["zen-title-link__text", titleLinkTextDriveClasses || ""]), children: children }) }));
|
|
24
21
|
};
|
|
25
22
|
exports.TitleLink = TitleLink;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IYAxisMeta } from "../interfaces";
|
|
2
|
-
export declare const getDefaultOptions: (yAxis: IYAxisMeta[], isTimedData: boolean, isDark: boolean, translate: (s: string) => string
|
|
2
|
+
export declare const getDefaultOptions: (yAxis: IYAxisMeta[], isTimedData: boolean, isDark: boolean, translate: (s: string) => string) => {
|
|
3
3
|
responsive: boolean;
|
|
4
4
|
maintainAspectRatio: boolean;
|
|
5
5
|
scales: {
|
|
@@ -10,7 +10,6 @@ export declare const getDefaultOptions: (yAxis: IYAxisMeta[], isTimedData: boole
|
|
|
10
10
|
grid: {
|
|
11
11
|
display: boolean;
|
|
12
12
|
};
|
|
13
|
-
reverse: boolean;
|
|
14
13
|
type: string;
|
|
15
14
|
ticks: {
|
|
16
15
|
source: string;
|
|
@@ -10,10 +10,8 @@ const defaultGridBorderStyle = {
|
|
|
10
10
|
display: false,
|
|
11
11
|
dash: [2, 2]
|
|
12
12
|
};
|
|
13
|
-
const getDefaultOptions = (yAxis, isTimedData, isDark, translate
|
|
13
|
+
const getDefaultOptions = (yAxis, isTimedData, isDark, translate) => {
|
|
14
14
|
const textColor = isDark ? "#C0CCD8" : "#4E677E";
|
|
15
|
-
const primaryYPosition = isRtl ? "right" : "left";
|
|
16
|
-
const secondaryYPosition = isRtl ? "left" : "right";
|
|
17
15
|
const scales = {
|
|
18
16
|
x: {
|
|
19
17
|
title: {
|
|
@@ -22,7 +20,6 @@ const getDefaultOptions = (yAxis, isTimedData, isDark, translate, isRtl = false)
|
|
|
22
20
|
grid: {
|
|
23
21
|
display: false
|
|
24
22
|
},
|
|
25
|
-
reverse: isRtl,
|
|
26
23
|
type: isTimedData ? "time" : "category",
|
|
27
24
|
ticks: isTimedData
|
|
28
25
|
? {
|
|
@@ -60,7 +57,7 @@ const getDefaultOptions = (yAxis, isTimedData, isDark, translate, isRtl = false)
|
|
|
60
57
|
border: defaultGridBorderStyle,
|
|
61
58
|
min: yAxis[i].min,
|
|
62
59
|
max: yAxis[i].max,
|
|
63
|
-
position: i === 0 ?
|
|
60
|
+
position: i === 0 ? "left" : "right"
|
|
64
61
|
};
|
|
65
62
|
}
|
|
66
63
|
return {
|
package/dist/chart/barChart.js
CHANGED
|
@@ -25,7 +25,6 @@ const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
|
25
25
|
const legendPlugin_1 = require("./plugins/legend/legendPlugin");
|
|
26
26
|
const chartAxis_1 = require("./chartAxis/chartAxis");
|
|
27
27
|
const useLanguage_1 = require("../utils/localization/useLanguage");
|
|
28
|
-
const useIsRTL_1 = require("../utils/localization/useIsRTL");
|
|
29
28
|
const isDateRange_1 = require("./utils/isDateRange");
|
|
30
29
|
const getYAxisMeta_1 = require("./utils/getYAxisMeta");
|
|
31
30
|
const getDefaultOptions_1 = require("./barChart/getDefaultOptions");
|
|
@@ -45,7 +44,6 @@ const BarChart = (_a) => {
|
|
|
45
44
|
const { translate } = (0, useLanguage_1.useLanguage)();
|
|
46
45
|
const isDrive = (0, useDrive_1.useDrive)();
|
|
47
46
|
const isMobile = (0, useMobile_1.useMobile)();
|
|
48
|
-
const isRtl = (0, useIsRTL_1.useIsRTL)();
|
|
49
47
|
const fontSize = (0, react_1.useMemo)(() => (isDrive ? (isMobile ? 14 : 16) : 12), [isDrive, isMobile]);
|
|
50
48
|
const { dark } = (0, react_1.useContext)(themeContext_1.themeContext);
|
|
51
49
|
(0, react_1.useEffect)(() => {
|
|
@@ -61,15 +59,15 @@ const BarChart = (_a) => {
|
|
|
61
59
|
const isTimedData = (0, react_1.useMemo)(() => (0, isDateRange_1.isDateRange)(data, false), [data]);
|
|
62
60
|
const isStacked = (0, react_1.useMemo)(() => { var _a, _b; return ((_b = (_a = options.scales) === null || _a === void 0 ? void 0 : _a.y) === null || _b === void 0 ? void 0 : _b.stacked) === true; }, [options]);
|
|
63
61
|
const yAxisMeta = (0, react_1.useMemo)(() => (0, getYAxisMeta_1.getYAxisMeta)(data, isStacked), [data, isStacked]);
|
|
64
|
-
const defOptions = (0, react_1.useMemo)(() => (0, getDefaultOptions_1.getDefaultOptions)(yAxisMeta, isTimedData, dark, translate
|
|
62
|
+
const defOptions = (0, react_1.useMemo)(() => (0, getDefaultOptions_1.getDefaultOptions)(yAxisMeta, isTimedData, dark, translate), [yAxisMeta, isTimedData, dark, translate]);
|
|
65
63
|
const chartOptions = (0, utils_1.deepMerge)(defOptions, options);
|
|
66
64
|
const { isHidden, toggleHidden } = (0, useHidden_1.useHidden)();
|
|
67
65
|
const chartData = (0, react_1.useMemo)(() => {
|
|
68
66
|
const chData = (0, convertDates_1.convertDates)(data, toLocalDateTime);
|
|
69
67
|
chData.datasets = chData.datasets.map((ds, i) => (0, getDefaultDatasetStyle_1.getDefaultDatasetStyle)(ds, i));
|
|
70
|
-
chData.datasets = chData.datasets.map((ds, i) => (Object.assign(Object.assign({}, ds), { hidden: isHidden(i)
|
|
68
|
+
chData.datasets = chData.datasets.map((ds, i) => (Object.assign(Object.assign({}, ds), { hidden: isHidden(i) })));
|
|
71
69
|
return chData;
|
|
72
|
-
}, [data, isHidden, toLocalDateTime
|
|
70
|
+
}, [data, isHidden, toLocalDateTime]);
|
|
73
71
|
const chartTooltip = (0, react_1.useMemo)(() => (0, tooltipPlugin_1.TooltipPlugin)(tooltipId, tooltip, "top", isHidden, dark), [tooltipId, tooltip, isHidden, dark]);
|
|
74
72
|
const chartLegend = (0, react_1.useMemo)(() => (0, legendPlugin_1.legendPlugin)(legendId, legend, isDrive, isHidden, toggleHidden), [isDrive, isHidden, legend, legendId, toggleHidden]);
|
|
75
73
|
const chartPlugins = (0, react_1.useMemo)(() => [...(plugins || []), chartTooltip, chartLegend], [chartLegend, chartTooltip, plugins]);
|
|
@@ -77,6 +75,6 @@ const BarChart = (_a) => {
|
|
|
77
75
|
const intSummary = (0, useSummary_1.useSummary)(summary, chartData);
|
|
78
76
|
const isMainHidden = (0, react_1.useMemo)(() => isHidden(0), [isHidden]);
|
|
79
77
|
const toggleMainData = (0, react_1.useCallback)(() => toggleHidden(0), [toggleHidden]);
|
|
80
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-chart", className || ""]), children: [insight ? (0, jsx_runtime_1.jsx)(chartInsight_1.ChartInsight, Object.assign({}, insight)) : null, summary ? (0, jsx_runtime_1.jsx)(summary_1.Summary, Object.assign({ onToggle: toggleMainData, isEnabled: isMainHidden }, intSummary)) : null, (isDrive ? undefined : xLabels) || yLabels.length > 0 ? ((0, jsx_runtime_1.jsx)(chartAxis_1.ChartAxis, { xLabel: isDrive ? undefined : xLabels, yLabels: yLabels, yAxisPosition:
|
|
78
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-chart", className || ""]), children: [insight ? (0, jsx_runtime_1.jsx)(chartInsight_1.ChartInsight, Object.assign({}, insight)) : null, summary ? (0, jsx_runtime_1.jsx)(summary_1.Summary, Object.assign({ onToggle: toggleMainData, isEnabled: isMainHidden }, intSummary)) : null, (isDrive ? undefined : xLabels) || yLabels.length > 0 ? ((0, jsx_runtime_1.jsx)(chartAxis_1.ChartAxis, { xLabel: isDrive ? undefined : xLabels, yLabels: yLabels, yAxisPosition: "right" })) : null, (0, jsx_runtime_1.jsx)("div", { className: "zen-chart__chart", children: (0, jsx_runtime_1.jsx)(typedCharts_1.Bar, Object.assign({ options: chartOptions, data: chartData, plugins: chartPlugins }, rest, { "aria-hidden": true })) }), (0, jsx_runtime_1.jsx)("div", { className: "zen-chart__legend", id: legendId }), isDrive && xLabels ? (0, jsx_runtime_1.jsx)("div", { className: "zen-chart__x-axis", children: xLabels }) : null, (0, jsx_runtime_1.jsx)(accessibleChart_1.AccessibleChart, { type: "bar", data: chartData, options: chartOptions })] }));
|
|
81
79
|
};
|
|
82
80
|
exports.BarChart = BarChart;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IXAxisMeta, IYAxisMeta } from "../interfaces";
|
|
2
|
-
export declare const getDefaultOptions: (yAxis: IYAxisMeta[], xAxis: IXAxisMeta, isTimedData: boolean, ticks: number, isDark: boolean, translate: (s: string) => string
|
|
2
|
+
export declare const getDefaultOptions: (yAxis: IYAxisMeta[], xAxis: IXAxisMeta, isTimedData: boolean, ticks: number, isDark: boolean, translate: (s: string) => string) => {
|
|
3
3
|
responsive: boolean;
|
|
4
4
|
maintainAspectRatio: boolean;
|
|
5
5
|
scales: {
|
|
@@ -10,7 +10,6 @@ export declare const getDefaultOptions: (yAxis: IYAxisMeta[], xAxis: IXAxisMeta,
|
|
|
10
10
|
grid: {
|
|
11
11
|
display: boolean;
|
|
12
12
|
};
|
|
13
|
-
reverse: boolean;
|
|
14
13
|
type: string;
|
|
15
14
|
time: {
|
|
16
15
|
unit: string;
|
|
@@ -47,11 +47,9 @@ const getFormatFromDateRange = (minDate, maxDate, ticks) => {
|
|
|
47
47
|
}
|
|
48
48
|
return { unit: "millisecond", format: "HH:mm:ss.l" };
|
|
49
49
|
};
|
|
50
|
-
const getDefaultOptions = (yAxis, xAxis, isTimedData, ticks, isDark, translate
|
|
50
|
+
const getDefaultOptions = (yAxis, xAxis, isTimedData, ticks, isDark, translate) => {
|
|
51
51
|
const time = getFormatFromDateRange(xAxis.minDate, xAxis.maxDate, ticks);
|
|
52
52
|
const textColor = isDark ? "#C0CCD8" : "#4E677E";
|
|
53
|
-
const primaryYPosition = isRtl ? "right" : "left";
|
|
54
|
-
const secondaryYPosition = isRtl ? "left" : "right";
|
|
55
53
|
const scales = {
|
|
56
54
|
x: {
|
|
57
55
|
title: {
|
|
@@ -60,7 +58,6 @@ const getDefaultOptions = (yAxis, xAxis, isTimedData, ticks, isDark, translate,
|
|
|
60
58
|
grid: {
|
|
61
59
|
display: false
|
|
62
60
|
},
|
|
63
|
-
reverse: isRtl,
|
|
64
61
|
type: isTimedData ? "time" : "linear",
|
|
65
62
|
time: isTimedData
|
|
66
63
|
? {
|
|
@@ -107,7 +104,7 @@ const getDefaultOptions = (yAxis, xAxis, isTimedData, ticks, isDark, translate,
|
|
|
107
104
|
border: defaultGridBorderStyle,
|
|
108
105
|
min: yAxis[i].min,
|
|
109
106
|
max: yAxis[i].max,
|
|
110
|
-
position: i === 0 ?
|
|
107
|
+
position: i === 0 ? "left" : "right"
|
|
111
108
|
};
|
|
112
109
|
}
|
|
113
110
|
return {
|
package/dist/chart/lineChart.js
CHANGED
|
@@ -34,7 +34,6 @@ const getDefaultOptions_1 = require("./lineChart/getDefaultOptions");
|
|
|
34
34
|
const useHidden_1 = require("./utils/useHidden");
|
|
35
35
|
const linePlugin_1 = require("./plugins/linePlugin/linePlugin");
|
|
36
36
|
const useLanguage_1 = require("../utils/localization/useLanguage");
|
|
37
|
-
const useIsRTL_1 = require("../utils/localization/useIsRTL");
|
|
38
37
|
const useChartTicks_1 = require("./lineChart/useChartTicks");
|
|
39
38
|
const chartInsight_1 = require("./chartInsight/chartInsight");
|
|
40
39
|
const getXAxisMeta_1 = require("./utils/getXAxisMeta");
|
|
@@ -47,7 +46,6 @@ const LineChart = (_a) => {
|
|
|
47
46
|
const { translate } = (0, useLanguage_1.useLanguage)();
|
|
48
47
|
const isDrive = (0, useDrive_1.useDrive)();
|
|
49
48
|
const isMobile = (0, useMobile_1.useMobile)();
|
|
50
|
-
const isRtl = (0, useIsRTL_1.useIsRTL)();
|
|
51
49
|
const fontSize = (0, react_1.useMemo)(() => (isDrive ? (isMobile ? 14 : 16) : 12), [isDrive, isMobile]);
|
|
52
50
|
const { dark } = (0, react_1.useContext)(themeContext_1.themeContext);
|
|
53
51
|
(0, react_1.useEffect)(() => {
|
|
@@ -78,7 +76,7 @@ const LineChart = (_a) => {
|
|
|
78
76
|
const yAxisMeta = (0, react_1.useMemo)(() => (0, getYAxisMeta_1.getYAxisMeta)(chartData), [chartData]);
|
|
79
77
|
const xAxisMeta = (0, react_1.useMemo)(() => (0, getXAxisMeta_1.getXAxisMeta)(chartData, isTimedData), [chartData, isTimedData]);
|
|
80
78
|
const { chartRef, ticks } = (0, useChartTicks_1.useChartTicks)();
|
|
81
|
-
const defOptions = (0, react_1.useMemo)(() => (0, getDefaultOptions_1.getDefaultOptions)(yAxisMeta, xAxisMeta, isTimedData, ticks, dark, translate
|
|
79
|
+
const defOptions = (0, react_1.useMemo)(() => (0, getDefaultOptions_1.getDefaultOptions)(yAxisMeta, xAxisMeta, isTimedData, ticks, dark, translate), [yAxisMeta, xAxisMeta, isTimedData, ticks, dark, translate]);
|
|
82
80
|
const chartOptions = (0, utils_1.deepMerge)(defOptions, options);
|
|
83
81
|
const chartTooltip = (0, react_1.useMemo)(() => (0, linePlugin_1.LinePlugin)(tooltipId, tooltip, dark), [tooltip, tooltipId, dark]);
|
|
84
82
|
const chartLegend = (0, react_1.useMemo)(() => (0, legendPlugin_1.legendPlugin)(legendId, legend, isDrive, isHidden, toggleHidden), [isDrive, legend, legendId, isHidden, toggleHidden]);
|
|
@@ -87,6 +85,6 @@ const LineChart = (_a) => {
|
|
|
87
85
|
const intSummary = (0, useSummary_1.useSummary)(summary, chartData);
|
|
88
86
|
const isMainHidden = (0, react_1.useMemo)(() => isHidden(0), [isHidden]);
|
|
89
87
|
const toggleMainDataset = (0, react_1.useCallback)(() => toggleHidden(0), [toggleHidden]);
|
|
90
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-chart", className || ""]), ref: chartRef, children: [insight ? (0, jsx_runtime_1.jsx)(chartInsight_1.ChartInsight, Object.assign({}, insight)) : null, summary !== false ? (0, jsx_runtime_1.jsx)(summary_1.Summary, Object.assign({}, intSummary, { onToggle: toggleMainDataset, isEnabled: isMainHidden })) : null, (isDrive ? undefined : xLabels) || yLabels.length > 0 ? (
|
|
88
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-chart", className || ""]), ref: chartRef, children: [insight ? (0, jsx_runtime_1.jsx)(chartInsight_1.ChartInsight, Object.assign({}, insight)) : null, summary !== false ? (0, jsx_runtime_1.jsx)(summary_1.Summary, Object.assign({}, intSummary, { onToggle: toggleMainDataset, isEnabled: isMainHidden })) : null, (isDrive ? undefined : xLabels) || yLabels.length > 0 ? (0, jsx_runtime_1.jsx)(chartAxis_1.ChartAxis, { xLabel: isDrive ? undefined : xLabels, yLabels: yLabels }) : null, (0, jsx_runtime_1.jsx)("div", { className: "zen-chart__chart", children: (0, jsx_runtime_1.jsx)(typedCharts_1.Line, Object.assign({ width: 100, height: 100, options: chartOptions, data: chartData, plugins: chartPlugins, "aria-hidden": true }, rest)) }), (0, jsx_runtime_1.jsx)("div", { className: "zen-chart__legend", id: legendId }), isDrive && xLabels ? (0, jsx_runtime_1.jsx)("div", { className: "zen-chart__x-axis", children: xLabels }) : null, (0, jsx_runtime_1.jsx)(accessibleChart_1.AccessibleChart, { type: "line", data: chartData, options: chartOptions })] }));
|
|
91
89
|
};
|
|
92
90
|
exports.LineChart = LineChart;
|
|
@@ -120,8 +120,6 @@ injectString("ar-SA", "Has additional actions. Use right arrow to access button,
|
|
|
120
120
|
const checkbox_1 = require("../checkbox/checkbox");
|
|
121
121
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
122
122
|
const iconChevronRight_1 = require("../icons/iconChevronRight");
|
|
123
|
-
const iconChevronLeft_1 = require("../icons/iconChevronLeft");
|
|
124
|
-
const useDirectionalIcon_1 = require("../utils/localization/useDirectionalIcon");
|
|
125
123
|
const useLanguage_1 = require("../utils/localization/useLanguage");
|
|
126
124
|
const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
|
|
127
125
|
const CheckboxListWithAction = ({
|
|
@@ -137,7 +135,6 @@ const CheckboxListWithAction = ({
|
|
|
137
135
|
translate
|
|
138
136
|
} = (0, useLanguage_1.useLanguage)();
|
|
139
137
|
const driveComponentClass = (0, useDriveClassName_1.useDriveClassName)("zen-checkbox-list-with-action");
|
|
140
|
-
const ChevronIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronRight_1.IconChevronRight, iconChevronLeft_1.IconChevronLeft);
|
|
141
138
|
const listId = (0, react_1.useId)();
|
|
142
139
|
const checkboxId = `${listId}_check_list-item_`;
|
|
143
140
|
const navigationInstructionsId = `${listId}_navigation_instructions`;
|
|
@@ -372,7 +369,7 @@ const CheckboxListWithAction = ({
|
|
|
372
369
|
})), (0, jsx_runtime_1.jsxs)("div", Object.assign({
|
|
373
370
|
className: "zen-checkbox-list-with-action__label-info"
|
|
374
371
|
}, otherArgs, {
|
|
375
|
-
children: [getLabelColorInfo(option.color, option.isWithAction, option.partialChecked, otherArgs), option.isWithAction && (0, jsx_runtime_1.jsx)(
|
|
372
|
+
children: [getLabelColorInfo(option.color, option.isWithAction, option.partialChecked, otherArgs), option.isWithAction && (0, jsx_runtime_1.jsx)(iconChevronRight_1.IconChevronRight, {
|
|
376
373
|
size: "large"
|
|
377
374
|
})]
|
|
378
375
|
}))]
|
|
@@ -7,13 +7,10 @@ const button_1 = require("../../../../button/button");
|
|
|
7
7
|
const iconChevronLeft_1 = require("../../../../icons/iconChevronLeft");
|
|
8
8
|
const iconChevronRight_1 = require("../../../../icons/iconChevronRight");
|
|
9
9
|
const useDrive_1 = require("../../../../utils/theme/useDrive");
|
|
10
|
-
const useDirectionalIcon_1 = require("../../../../utils/localization/useDirectionalIcon");
|
|
11
10
|
const svgIconSize_1 = require("../../../../svgIcon/svgIconSize");
|
|
12
11
|
const ArrowNavButton = ({ value, isHidden, disabled, className, arrowButtonHandler, onMouseDown, onMouseUp }) => {
|
|
13
12
|
const isDrive = (0, useDrive_1.useDrive)();
|
|
14
13
|
const iconSize = isDrive ? (0, svgIconSize_1.driveIconSize)("large") : "large";
|
|
15
|
-
|
|
16
|
-
const RightIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronRight_1.IconChevronRight, iconChevronLeft_1.IconChevronLeft);
|
|
17
|
-
return ((0, jsx_runtime_1.jsx)(button_1.Button, { type: "tertiary-black", className: (0, classNames_1.classNames)(["zen-arrow-nav-button", isHidden ? "zen-arrow-nav-button--invisible" : "", className !== null && className !== void 0 ? className : ""]), "aria-label": value, disabled: disabled, onClick: arrowButtonHandler, "data-action": value, onMouseDown: onMouseDown, onMouseUp: onMouseUp, children: value === "left" ? ((0, jsx_runtime_1.jsx)(LeftIcon, { size: iconSize, className: "zen-arrow-nav-button__icon" })) : ((0, jsx_runtime_1.jsx)(RightIcon, { size: iconSize, className: "zen-arrow-nav-button__icon" })) }));
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(button_1.Button, { type: "tertiary-black", className: (0, classNames_1.classNames)(["zen-arrow-nav-button", isHidden ? "zen-arrow-nav-button--invisible" : "", className !== null && className !== void 0 ? className : ""]), "aria-label": value, disabled: disabled, onClick: arrowButtonHandler, "data-action": value, onMouseDown: onMouseDown, onMouseUp: onMouseUp, children: value === "left" ? ((0, jsx_runtime_1.jsx)(iconChevronLeft_1.IconChevronLeft, { size: iconSize, className: "zen-arrow-nav-button__icon" })) : ((0, jsx_runtime_1.jsx)(iconChevronRight_1.IconChevronRight, { size: iconSize, className: "zen-arrow-nav-button__icon" })) }));
|
|
18
15
|
};
|
|
19
16
|
exports.ArrowNavButton = ArrowNavButton;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@import "../common.less";
|
|
2
|
+
@import "../typography/typography.less";
|
|
2
3
|
|
|
3
|
-
@pill-min-width-default:
|
|
4
|
+
@pill-min-width-default: 30px;
|
|
4
5
|
@pill-max-width-default: 200px;
|
|
5
6
|
|
|
6
7
|
// TODO: update to .zen-pill-content after old pill component removed remove
|
|
@@ -9,16 +10,16 @@
|
|
|
9
10
|
@pill-height--drive: 34px;
|
|
10
11
|
@pill-height--mobile: 34px;
|
|
11
12
|
|
|
12
|
-
.
|
|
13
|
+
.body-04();
|
|
13
14
|
display: flex;
|
|
14
15
|
align-items: center;
|
|
15
16
|
justify-content: space-between;
|
|
16
|
-
border-radius:
|
|
17
|
+
border-radius: 30px;
|
|
17
18
|
height: @pill-height;
|
|
18
19
|
display: grid;
|
|
19
20
|
grid-auto-flow: column;
|
|
20
21
|
|
|
21
|
-
gap:
|
|
22
|
+
gap: 8px;
|
|
22
23
|
|
|
23
24
|
&--icon-left {
|
|
24
25
|
grid-template-columns: 12px 1fr;
|
|
@@ -37,18 +38,18 @@
|
|
|
37
38
|
|
|
38
39
|
&.zen-pill-new-content--empty {
|
|
39
40
|
grid-template-columns: 12px 18px;
|
|
40
|
-
gap:
|
|
41
|
+
gap: 8px;
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
&--hidden {
|
|
45
|
-
gap:
|
|
46
|
+
gap: 4px;
|
|
46
47
|
}
|
|
47
48
|
&.zen-pill-new-content--drive,
|
|
48
49
|
&.zen-pill-new-content--drive-tablet {
|
|
49
50
|
height: @pill-height--drive;
|
|
50
51
|
.zen-pill-non-actionable__icon {
|
|
51
|
-
min-width:
|
|
52
|
+
min-width: 16px;
|
|
52
53
|
max-width: 16px;
|
|
53
54
|
height: 16px;
|
|
54
55
|
}
|
|
@@ -66,15 +67,15 @@
|
|
|
66
67
|
|
|
67
68
|
&.zen-pill-new-content--empty {
|
|
68
69
|
grid-template-columns: 16px 22px;
|
|
69
|
-
gap:
|
|
70
|
+
gap: 8px;
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
&.zen-pill-new-content--mobile {
|
|
74
75
|
height: @pill-height--mobile;
|
|
75
|
-
.
|
|
76
|
+
.body-m-400-short();
|
|
76
77
|
.zen-pill-non-actionable__icon {
|
|
77
|
-
min-width:
|
|
78
|
+
min-width: 16px;
|
|
78
79
|
max-width: 16px;
|
|
79
80
|
height: 16px;
|
|
80
81
|
}
|
|
@@ -92,14 +93,14 @@
|
|
|
92
93
|
|
|
93
94
|
&.zen-pill-new-content--empty {
|
|
94
95
|
grid-template-columns: 16px 22px;
|
|
95
|
-
gap:
|
|
96
|
+
gap: 8px;
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
&.zen-pill-new-content--drive {
|
|
100
|
-
.
|
|
101
|
+
.body-04-mobile-drive();
|
|
101
102
|
}
|
|
102
103
|
&.zen-pill-new-content--drive-tablet {
|
|
103
|
-
.
|
|
104
|
+
.body-04-tablet-drive();
|
|
104
105
|
}
|
|
105
106
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
@import "../
|
|
1
|
+
@import "../typography/typography.less";
|
|
2
|
+
@import "../colors/colors.less";
|
|
2
3
|
|
|
3
4
|
.zen-pill-content {
|
|
4
|
-
.
|
|
5
|
+
.body-04();
|
|
5
6
|
display: flex;
|
|
6
7
|
color: var(--text-primary);
|
|
7
8
|
align-items: center;
|
|
8
9
|
justify-content: space-between;
|
|
9
|
-
padding:
|
|
10
|
-
border-radius:
|
|
10
|
+
padding: 4px 12px 4px 12px;
|
|
11
|
+
border-radius: 30px;
|
|
11
12
|
background: var(--backgrounds-content-1);
|
|
12
13
|
}
|