@geotab/zenith 3.11.0-beta.0 → 3.11.0-beta.1

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.
Files changed (239) hide show
  1. package/README.md +3 -26
  2. package/dist/calendar/calendar.js +4 -7
  3. package/dist/card/components/title.js +1 -4
  4. package/dist/card/components/titleLink.js +2 -5
  5. package/dist/chart/barChart/getDefaultOptions.d.ts +1 -2
  6. package/dist/chart/barChart/getDefaultOptions.js +2 -5
  7. package/dist/chart/barChart.js +4 -6
  8. package/dist/chart/lineChart/getDefaultOptions.d.ts +1 -2
  9. package/dist/chart/lineChart/getDefaultOptions.js +2 -5
  10. package/dist/chart/lineChart.js +2 -4
  11. package/dist/checkboxListWithAction/checkboxListWithAction.js +1 -4
  12. package/dist/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +1 -4
  13. package/dist/commonStyles/pillStyles/pillContent.less +14 -13
  14. package/dist/commonStyles/pillStyles/pillStyles.less +5 -4
  15. package/dist/commonStyles/pillStyles/pillTextContent.less +2 -2
  16. package/dist/commonStyles/typography/typography.less +19 -579
  17. package/dist/controlledPopup/controlledPopup.d.ts +0 -1
  18. package/dist/controlledPopup/controlledPopup.js +1 -3
  19. package/dist/dataGrid/cell/cell.d.ts +1 -2
  20. package/dist/dataGrid/cell/cell.js +2 -2
  21. package/dist/dataGrid/dataGrid.js +4 -7
  22. package/dist/dataGrid/listColumn.d.ts +0 -2
  23. package/dist/dataGrid/row/row.d.ts +1 -2
  24. package/dist/dataGrid/row/row.js +9 -13
  25. package/dist/dataGrid/withFlexibleColumns/components/columnSettingsList.js +1 -2
  26. package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +0 -4
  27. package/dist/dateRangeInner/dateRangeInner.js +2 -5
  28. package/dist/dateRangeRaw/dateRangeRaw.js +2 -5
  29. package/dist/dateRangeRaw/utils/parseLabel.js +1 -1
  30. package/dist/dropdownRaw/dropdownRaw.js +6 -12
  31. package/dist/fileUpload/components/dropZoneContent.js +100 -100
  32. package/dist/fileUpload/fileUpload.js +100 -100
  33. package/dist/filters/components/filtersSearchList.js +1 -4
  34. package/dist/filtersBar/filtersContainer/filtersContainer.js +61 -62
  35. package/dist/formStepperButtons/formStepperButtons.js +1 -4
  36. package/dist/groupsFilterRaw/groupsFilterAdjustmentState.js +1 -4
  37. package/dist/groupsFilterRaw/groupsFilterInitialState.js +1 -4
  38. package/dist/header/headerBack.js +1 -4
  39. package/dist/icons/iconAlignLeft.js +3 -1
  40. package/dist/icons/iconAlignmentLeft.js +3 -1
  41. package/dist/icons/iconAlignmentRight.js +3 -1
  42. package/dist/icons/iconArrowBottomLeft.js +3 -1
  43. package/dist/icons/iconArrowBottomRight.js +3 -1
  44. package/dist/icons/iconArrowLeftPath.js +3 -1
  45. package/dist/icons/iconArrowRight.js +3 -1
  46. package/dist/icons/iconArrowRightCircle.js +3 -1
  47. package/dist/icons/iconArrowRightPath.js +3 -1
  48. package/dist/icons/iconArrowTopLeft.js +3 -1
  49. package/dist/icons/iconArrowTopRight.js +3 -1
  50. package/dist/icons/iconChevronDoubleRight.js +3 -1
  51. package/dist/icons/iconChevronRight.js +3 -1
  52. package/dist/icons/iconChevronRightSmall.js +3 -1
  53. package/dist/icons/iconCornerDownLeft.js +3 -1
  54. package/dist/icons/iconCornerDownRight.js +3 -1
  55. package/dist/icons/iconCornerLeftDown.js +3 -1
  56. package/dist/icons/iconCornerLeftUp.js +3 -1
  57. package/dist/icons/iconCornerRightDown.js +3 -1
  58. package/dist/icons/iconCornerRightUp.js +3 -1
  59. package/dist/icons/iconCornerUpLeft.js +3 -1
  60. package/dist/icons/iconCornerUpRight.js +3 -1
  61. package/dist/index.css +2920 -3245
  62. package/dist/index.d.ts +0 -1
  63. package/dist/index.js +1 -3
  64. package/dist/lineChartMini/lineChartMini.js +3 -15
  65. package/dist/list/itemData/itemDataInternal.js +1 -4
  66. package/dist/list/listItem/listItem.js +1 -4
  67. package/dist/menu/components/controlledMenuList/controlledMenuList.js +1 -4
  68. package/dist/menu/components/menuButton.js +1 -4
  69. package/dist/menu/utils/useMenuItemCore.js +1 -4
  70. package/dist/nav/navItem/navItem.js +1 -4
  71. package/dist/pagination/paginationArrow.js +3 -10
  72. package/dist/radioGroupRaw/radioGroupRaw.js +1 -2
  73. package/dist/rangeRaw/rangeRaw.js +1 -0
  74. package/dist/selectList/selectList.helpers.d.ts +1 -1
  75. package/dist/selectList/selectList.helpers.js +4 -29
  76. package/dist/selectList/selectList.js +1 -3
  77. package/dist/selectList/selectList.reducer.js +2 -1
  78. package/dist/selectList/selectListItem.js +1 -4
  79. package/dist/sortControl/sortControl.js +4 -59
  80. package/dist/table/children/useTableChildren.d.ts +1 -1
  81. package/dist/table/children/useTableChildren.js +3 -3
  82. package/dist/table/flexible/columnsList.js +2 -4
  83. package/dist/table/selectable/useSelectableRows.d.ts +0 -8
  84. package/dist/table/selectable/useSelectableRows.js +6 -14
  85. package/dist/table/table.js +7 -1
  86. package/dist/tabs/tabs.js +58 -60
  87. package/dist/tabs/tabsTestHelper.js +2 -2
  88. package/dist/timePickerRaw/timePickerRaw.js +1 -1
  89. package/dist/toggleButtonRaw/toggleButtonRaw.js +2 -5
  90. package/dist/utils/localization/translations/ar.json +1 -3
  91. package/dist/utils/localization/translations/cs.json +5 -9
  92. package/dist/utils/localization/translations/da-DK.json +5 -9
  93. package/dist/utils/localization/translations/de.json +5 -9
  94. package/dist/utils/localization/translations/en.json +1 -5
  95. package/dist/utils/localization/translations/es.json +5 -9
  96. package/dist/utils/localization/translations/fi-FI.json +5 -9
  97. package/dist/utils/localization/translations/fr-FR.json +5 -9
  98. package/dist/utils/localization/translations/fr.json +5 -9
  99. package/dist/utils/localization/translations/hu-HU.json +5 -9
  100. package/dist/utils/localization/translations/id.json +5 -9
  101. package/dist/utils/localization/translations/it.json +5 -9
  102. package/dist/utils/localization/translations/ja.json +5 -9
  103. package/dist/utils/localization/translations/ko-KR.json +5 -9
  104. package/dist/utils/localization/translations/ms.json +5 -9
  105. package/dist/utils/localization/translations/nb-NO.json +5 -9
  106. package/dist/utils/localization/translations/nl.json +5 -9
  107. package/dist/utils/localization/translations/pl.json +5 -9
  108. package/dist/utils/localization/translations/pt-BR.json +5 -9
  109. package/dist/utils/localization/translations/pt-PT.json +5 -9
  110. package/dist/utils/localization/translations/ro-RO.json +5 -9
  111. package/dist/utils/localization/translations/sk-SK.json +5 -9
  112. package/dist/utils/localization/translations/sv.json +5 -9
  113. package/dist/utils/localization/translations/th.json +5 -9
  114. package/dist/utils/localization/translations/tr.json +5 -9
  115. package/dist/utils/localization/translations/zh-Hans.json +5 -9
  116. package/dist/utils/localization/translations/zh-TW.json +5 -9
  117. package/dist/utils/positioningUtils/alignments.d.ts +2 -2
  118. package/dist/utils/positioningUtils/alignments.js +2 -2
  119. package/dist/utils/positioningUtils/calculatePosition.js +6 -4
  120. package/esm/calendar/calendar.js +4 -7
  121. package/esm/card/components/title.js +1 -4
  122. package/esm/card/components/titleLink.js +2 -5
  123. package/esm/chart/barChart/getDefaultOptions.d.ts +1 -2
  124. package/esm/chart/barChart/getDefaultOptions.js +2 -5
  125. package/esm/chart/barChart.js +4 -6
  126. package/esm/chart/lineChart/getDefaultOptions.d.ts +1 -2
  127. package/esm/chart/lineChart/getDefaultOptions.js +2 -5
  128. package/esm/chart/lineChart.js +2 -4
  129. package/esm/checkboxListWithAction/checkboxListWithAction.js +1 -4
  130. package/esm/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +1 -4
  131. package/esm/controlledPopup/controlledPopup.d.ts +0 -1
  132. package/esm/controlledPopup/controlledPopup.js +1 -3
  133. package/esm/dataGrid/cell/cell.d.ts +1 -2
  134. package/esm/dataGrid/cell/cell.js +2 -2
  135. package/esm/dataGrid/dataGrid.js +4 -7
  136. package/esm/dataGrid/listColumn.d.ts +0 -2
  137. package/esm/dataGrid/row/row.d.ts +1 -2
  138. package/esm/dataGrid/row/row.js +9 -13
  139. package/esm/dataGrid/withFlexibleColumns/components/columnSettingsList.js +1 -2
  140. package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +0 -4
  141. package/esm/dateRangeInner/dateRangeInner.js +2 -5
  142. package/esm/dateRangeRaw/dateRangeRaw.js +2 -5
  143. package/esm/dateRangeRaw/utils/parseLabel.js +1 -1
  144. package/esm/dropdownRaw/dropdownRaw.js +6 -12
  145. package/esm/fileUpload/components/dropZoneContent.js +100 -100
  146. package/esm/fileUpload/fileUpload.js +100 -100
  147. package/esm/filters/components/filtersSearchList.js +1 -4
  148. package/esm/filtersBar/filtersContainer/filtersContainer.js +61 -62
  149. package/esm/formStepperButtons/formStepperButtons.js +1 -4
  150. package/esm/groupsFilterRaw/groupsFilterAdjustmentState.js +1 -4
  151. package/esm/groupsFilterRaw/groupsFilterInitialState.js +1 -4
  152. package/esm/header/headerBack.js +1 -4
  153. package/esm/icons/iconAlignLeft.js +3 -1
  154. package/esm/icons/iconAlignmentLeft.js +3 -1
  155. package/esm/icons/iconAlignmentRight.js +3 -1
  156. package/esm/icons/iconArrowBottomLeft.js +3 -1
  157. package/esm/icons/iconArrowBottomRight.js +3 -1
  158. package/esm/icons/iconArrowLeftPath.js +3 -1
  159. package/esm/icons/iconArrowRight.js +3 -1
  160. package/esm/icons/iconArrowRightCircle.js +3 -1
  161. package/esm/icons/iconArrowRightPath.js +3 -1
  162. package/esm/icons/iconArrowTopLeft.js +3 -1
  163. package/esm/icons/iconArrowTopRight.js +3 -1
  164. package/esm/icons/iconChevronDoubleRight.js +3 -1
  165. package/esm/icons/iconChevronRight.js +3 -1
  166. package/esm/icons/iconChevronRightSmall.js +3 -1
  167. package/esm/icons/iconCornerDownLeft.js +3 -1
  168. package/esm/icons/iconCornerDownRight.js +3 -1
  169. package/esm/icons/iconCornerLeftDown.js +3 -1
  170. package/esm/icons/iconCornerLeftUp.js +3 -1
  171. package/esm/icons/iconCornerRightDown.js +3 -1
  172. package/esm/icons/iconCornerRightUp.js +3 -1
  173. package/esm/icons/iconCornerUpLeft.js +3 -1
  174. package/esm/icons/iconCornerUpRight.js +3 -1
  175. package/esm/index.d.ts +0 -1
  176. package/esm/index.js +0 -1
  177. package/esm/lineChartMini/lineChartMini.js +3 -15
  178. package/esm/list/itemData/itemDataInternal.js +1 -4
  179. package/esm/list/listItem/listItem.js +1 -4
  180. package/esm/menu/components/controlledMenuList/controlledMenuList.js +1 -4
  181. package/esm/menu/components/menuButton.js +1 -4
  182. package/esm/menu/utils/useMenuItemCore.js +1 -4
  183. package/esm/nav/navItem/navItem.js +1 -4
  184. package/esm/pagination/paginationArrow.js +3 -10
  185. package/esm/radioGroupRaw/radioGroupRaw.js +1 -2
  186. package/esm/rangeRaw/rangeRaw.js +1 -0
  187. package/esm/selectList/selectList.helpers.d.ts +1 -1
  188. package/esm/selectList/selectList.helpers.js +4 -29
  189. package/esm/selectList/selectList.js +1 -3
  190. package/esm/selectList/selectList.reducer.js +2 -1
  191. package/esm/selectList/selectListItem.js +1 -4
  192. package/esm/sortControl/sortControl.js +4 -59
  193. package/esm/table/children/useTableChildren.d.ts +1 -1
  194. package/esm/table/children/useTableChildren.js +3 -3
  195. package/esm/table/flexible/columnsList.js +2 -4
  196. package/esm/table/selectable/useSelectableRows.d.ts +0 -8
  197. package/esm/table/selectable/useSelectableRows.js +6 -14
  198. package/esm/table/table.js +7 -1
  199. package/esm/tabs/tabs.js +58 -60
  200. package/esm/tabs/tabsTestHelper.js +2 -2
  201. package/esm/timePickerRaw/timePickerRaw.js +1 -1
  202. package/esm/toggleButtonRaw/toggleButtonRaw.js +2 -5
  203. package/esm/utils/localization/translations/ar.json +1 -3
  204. package/esm/utils/localization/translations/cs.json +5 -9
  205. package/esm/utils/localization/translations/da-DK.json +5 -9
  206. package/esm/utils/localization/translations/de.json +5 -9
  207. package/esm/utils/localization/translations/en.json +1 -5
  208. package/esm/utils/localization/translations/es.json +5 -9
  209. package/esm/utils/localization/translations/fi-FI.json +5 -9
  210. package/esm/utils/localization/translations/fr-FR.json +5 -9
  211. package/esm/utils/localization/translations/fr.json +5 -9
  212. package/esm/utils/localization/translations/hu-HU.json +5 -9
  213. package/esm/utils/localization/translations/id.json +5 -9
  214. package/esm/utils/localization/translations/it.json +5 -9
  215. package/esm/utils/localization/translations/ja.json +5 -9
  216. package/esm/utils/localization/translations/ko-KR.json +5 -9
  217. package/esm/utils/localization/translations/ms.json +5 -9
  218. package/esm/utils/localization/translations/nb-NO.json +5 -9
  219. package/esm/utils/localization/translations/nl.json +5 -9
  220. package/esm/utils/localization/translations/pl.json +5 -9
  221. package/esm/utils/localization/translations/pt-BR.json +5 -9
  222. package/esm/utils/localization/translations/pt-PT.json +5 -9
  223. package/esm/utils/localization/translations/ro-RO.json +5 -9
  224. package/esm/utils/localization/translations/sk-SK.json +5 -9
  225. package/esm/utils/localization/translations/sv.json +5 -9
  226. package/esm/utils/localization/translations/th.json +5 -9
  227. package/esm/utils/localization/translations/tr.json +5 -9
  228. package/esm/utils/localization/translations/zh-Hans.json +5 -9
  229. package/esm/utils/localization/translations/zh-TW.json +5 -9
  230. package/esm/utils/positioningUtils/alignments.d.ts +2 -2
  231. package/esm/utils/positioningUtils/alignments.js +2 -2
  232. package/esm/utils/positioningUtils/calculatePosition.js +6 -4
  233. package/package.json +122 -123
  234. package/dist/utils/localization/useDirectionalIcon.d.ts +0 -3
  235. package/dist/utils/localization/useDirectionalIcon.js +0 -9
  236. package/esm/testHelpers/mockAbsoluteAlignment.d.ts +0 -1
  237. package/esm/testHelpers/mockAbsoluteAlignment.js +0 -10
  238. package/esm/utils/localization/useDirectionalIcon.d.ts +0 -3
  239. package/esm/utils/localization/useDirectionalIcon.js +0 -5
@@ -1,8 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useId, useMemo } from "react";
3
3
  import { classNames } from "../commonHelpers/classNames/classNames";
4
+ import { useIsRTL } from "../utils/localization/useIsRTL";
4
5
  export const IconCornerUpRight = ({ className, size, title, description, focusable = false }) => {
5
6
  const uniqueId = useId();
6
- const classes = useMemo(() => classNames(["zen-icon", size ? `zen-icon--${size}` : "", className !== null && className !== void 0 ? className : ""]), [size, className]);
7
+ const isRTL = useIsRTL();
8
+ const classes = useMemo(() => classNames(["zen-icon", size ? `zen-icon--${size}` : "", isRTL ? "zen-icon--rtl" : "", className !== null && className !== void 0 ? className : ""]), [size, isRTL, className]);
7
9
  return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 25", focusable: focusable ? "true" : undefined, tabIndex: focusable ? 0 : undefined, role: focusable || title || description ? undefined : "presentation", className: classes, "aria-labelledby": title && focusable ? uniqueId : undefined, "data-name": "IconCornerUpRight", children: [title ? _jsx("title", { id: uniqueId, children: title }) : null, description ? _jsx("desc", { children: description }) : null, _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4 20.87a1 1 0 001-1v-9h12.586l-2.293 2.293a1 1 0 001.414 1.414l4-4a1 1 0 000-1.414l-4-4a1 1 0 10-1.414 1.414l2.293 2.293H4a1 1 0 00-1 1v10a1 1 0 001 1z" })] }));
8
10
  };
package/esm/index.d.ts CHANGED
@@ -775,7 +775,6 @@ export { getNewFocusableItem, getFirstFocusableItem } from "./utils/keyboardHelp
775
775
  export { LanguageProvider } from "./utils/localization/languageProvider";
776
776
  export { dictionaries, injectString } from "./utils/localization/translationsDictionary";
777
777
  export { useDirection } from "./utils/localization/useDirection";
778
- export { useDirectionalIcon } from "./utils/localization/useDirectionalIcon";
779
778
  export { useLanguage } from "./utils/localization/useLanguage";
780
779
  export { ThemeDark } from "./utils/theme/themeDark";
781
780
  export { ThemeDrive } from "./utils/theme/themeDrive";
package/esm/index.js CHANGED
@@ -759,7 +759,6 @@ export { getNewFocusableItem, getFirstFocusableItem } from "./utils/keyboardHelp
759
759
  export { LanguageProvider } from "./utils/localization/languageProvider";
760
760
  export { dictionaries, injectString } from "./utils/localization/translationsDictionary";
761
761
  export { useDirection } from "./utils/localization/useDirection";
762
- export { useDirectionalIcon } from "./utils/localization/useDirectionalIcon";
763
762
  export { useLanguage } from "./utils/localization/useLanguage";
764
763
  export { ThemeDark } from "./utils/theme/themeDark";
765
764
  export { ThemeDrive } from "./utils/theme/themeDrive";
@@ -18,7 +18,6 @@ import { getDefaultDatasetStyle } from "../lineChart/utils";
18
18
  import { useDrive } from "../utils/theme/useDrive";
19
19
  import { useMobile } from "../commonHelpers/hooks/useMobile";
20
20
  import { themeContext } from "../utils/theme/themeContext";
21
- import { useIsRTL } from "../utils/localization/useIsRTL";
22
21
  import { AccessibleChart } from "../chart/accessibleChart/accessibleChart";
23
22
  ChartJS.defaults.font = {
24
23
  family: "Roboto",
@@ -31,26 +30,17 @@ const defaultGridStyle = {
31
30
  const defaultGridBorderStyle = {
32
31
  display: false
33
32
  };
34
- const getDefaultOptions = (isRtl) => ({
33
+ const defaultOptions = {
35
34
  responsive: true,
36
35
  maintainAspectRatio: false,
37
- layout: {
38
- padding: {
39
- left: isRtl ? 16 : 0,
40
- right: isRtl ? 0 : 16
41
- }
42
- },
43
36
  scales: {
44
37
  x: {
45
38
  grid: defaultGridStyle,
46
- border: defaultGridBorderStyle,
47
- reverse: isRtl,
48
- offset: false
39
+ border: defaultGridBorderStyle
49
40
  },
50
41
  y: {
51
42
  grid: defaultGridStyle,
52
43
  border: defaultGridBorderStyle,
53
- position: isRtl ? "right" : "left",
54
44
  ticks: {
55
45
  display: false
56
46
  }
@@ -64,7 +54,7 @@ const getDefaultOptions = (isRtl) => ({
64
54
  enabled: false
65
55
  }
66
56
  }
67
- });
57
+ };
68
58
  export const LineChartMini = (_a) => {
69
59
  var _b, _c;
70
60
  var { data, options = {} } = _a, rest = __rest(_a, ["data", "options"]);
@@ -72,7 +62,6 @@ export const LineChartMini = (_a) => {
72
62
  const isMobile = useMobile();
73
63
  const memoizedFontSize = useMemo(() => (isDrive ? (isMobile ? 14 : 16) : 12), [isDrive, isMobile]);
74
64
  const { dark } = useContext(themeContext);
75
- const isRtl = useIsRTL();
76
65
  useEffect(() => {
77
66
  ChartJS.defaults.font = {
78
67
  family: "Roboto",
@@ -81,7 +70,6 @@ export const LineChartMini = (_a) => {
81
70
  ChartJS.defaults.color = dark ? "#FFFFFF" : "#1F2833";
82
71
  }, [memoizedFontSize, dark]);
83
72
  const adaptedData = Object.assign({}, data);
84
- const defaultOptions = useMemo(() => getDefaultOptions(isRtl), [isRtl]);
85
73
  const adaptedOptions = deepMerge(defaultOptions, options);
86
74
  if (((_b = adaptedData.labels) === null || _b === void 0 ? void 0 : _b.length) === 2) {
87
75
  const maxLabelsCount = Math.max(...data.datasets.map(ds => ds.data.length));
@@ -6,8 +6,6 @@ import { useLanguage } from "../../utils/localization/useLanguage";
6
6
  import { Button } from "../../button/button";
7
7
  import { classNames } from "../../commonHelpers/classNames/classNames";
8
8
  import { IconChevronRight } from "../../icons/iconChevronRight";
9
- import { IconChevronLeft } from "../../icons/iconChevronLeft";
10
- import { useDirectionalIcon } from "../../utils/localization/useDirectionalIcon";
11
9
  import { IconDotVertical } from "../../icons/iconDotVertical";
12
10
  import { Menu } from "../../menu/menu";
13
11
  import { isActiveElement } from "../utils/isActiveElement";
@@ -89,7 +87,6 @@ const ItemDataInternalInner = ({
89
87
  const {
90
88
  translate
91
89
  } = useLanguage();
92
- const ChevronIcon = useDirectionalIcon(IconChevronRight, IconChevronLeft);
93
90
  const driveClassName = useMemo(() => isDrive ? isMobile ? "zen-item-data-drive" : "zen-item-data-drive-tablet" : "", [isDrive, isMobile]);
94
91
  const mobileClassName = useMobileClassName("zen-item-data");
95
92
  const aceClassName = useMemo(() => isTall ? "zen-item-data--tall" : "", [isTall]);
@@ -197,7 +194,7 @@ const ItemDataInternalInner = ({
197
194
  onClick: onClick,
198
195
  title: translate("Open"),
199
196
  "aria-label": translate("Open"),
200
- children: _jsx(ChevronIcon, {
197
+ children: _jsx(IconChevronRight, {
201
198
  size: "large",
202
199
  className: "zen-item-data__click-icon"
203
200
  })
@@ -12,8 +12,6 @@ import { useDriveClassName } from "../../utils/theme/useDriveClassName";
12
12
  import { classNames } from "../../commonHelpers/classNames/classNames";
13
13
  import { useIconSize } from "../../utils/theme/useIconSize";
14
14
  import { IconChevronRight } from "../../icons/iconChevronRight";
15
- import { IconChevronLeft } from "../../icons/iconChevronLeft";
16
- import { useDirectionalIcon } from "../../utils/localization/useDirectionalIcon";
17
15
  import { isActiveElement } from "../utils/isActiveElement";
18
16
  import { useMobileClassName } from "../../utils/theme/useMobileClassName";
19
17
  injectString("cs", "More", "V\xEDce");
@@ -91,7 +89,6 @@ export const ListItem = ({
91
89
  translate
92
90
  } = useLanguage();
93
91
  const itemRef = useRef(null);
94
- const ChevronIcon = useDirectionalIcon(IconChevronRight, IconChevronLeft);
95
92
  const renderActions = useCallback(() => {
96
93
  if (!actions || actions.length === 0) {
97
94
  return null;
@@ -204,7 +201,7 @@ export const ListItem = ({
204
201
  link: link,
205
202
  target: target,
206
203
  title: translate("View details"),
207
- children: _jsx(ChevronIcon, {
204
+ children: _jsx(IconChevronRight, {
208
205
  size: isMobile ? "huge" : "large",
209
206
  className: "zen-list-item__click-icon"
210
207
  })
@@ -17,12 +17,9 @@ import { generateId } from "../../../commonHelpers/generateId";
17
17
  import { PathProvider } from "../../contexts/pathProvider";
18
18
  import { MobileSheet } from "../../../mobileSheet/mobileSheet";
19
19
  import { isSeparator, MenuSeparator } from "../menuSeparator";
20
- import { IconArrowRight } from "../../../icons/iconArrowRight";
21
- import { useDirectionalIcon } from "../../../utils/localization/useDirectionalIcon";
22
20
  const ControlledMenuListBase = forwardRef(({ children, setIsOpen, isOpen, className = "", listClassName = "", ariaLabel, defaultTooltipAlignment, defaultAlignment, direction = "vertical" }, ref) => {
23
21
  const [deviceType, setDeviceType] = useState(DeviceType.Desktop);
24
22
  const isMobile = deviceType === DeviceType.Mobile;
25
- const BackArrowIcon = useDirectionalIcon(IconArrowLeft, IconArrowRight);
26
23
  useDeviceType(setDeviceType);
27
24
  // True when mounted inside ControlledMenu, which injects setIsOpen and isOpen.
28
25
  // Standalone usage leaves both undefined.
@@ -113,7 +110,7 @@ const ControlledMenuListBase = forwardRef(({ children, setIsOpen, isOpen, classN
113
110
  className,
114
111
  listClassName,
115
112
  applyDirection && direction === "horizontal" ? "zen-menu-item--horizontal" : ""
116
- ]), children: [backParent ? (_jsx(MenuButton, { id: "root", name: getItemLabel(backParent), icon: BackArrowIcon, onClick: closeBranch, hasChildren: false, disabled: false }, "root")) : null, listContent] }) }));
113
+ ]), children: [backParent ? (_jsx(MenuButton, { id: "root", name: getItemLabel(backParent), icon: IconArrowLeft, onClick: closeBranch, hasChildren: false, disabled: false }, "root")) : null, listContent] }) }));
117
114
  const { sheetContent, sheetParent, sheetPathLength, sheetParentName } = useLastValidSheet(nestedContent, nestedParent, path, children);
118
115
  return (_jsxs(PathProvider, { path: path, onOpenBranch: onOpenBranch, closeBranch: closeBranch, navigatedViaKeyboardRef: navigatedViaKeyboardRef, keyboardActiveRef: keyboardActiveRef, children: [renderList(content, parent, divRefCallback), !isEmbedded && isMobile && (_jsxs(MobileSheet, { label: sheetParentName, isOpen: path.length > 0, triggerRef: internalRef, onHidePanel: closeAll, onCloseClick: closeAll, children: [_jsx(MobileSheet.Title, { children: sheetParentName }), _jsx(MobileSheet.Content, { children: renderList(sheetContent, sheetPathLength > 1 ? sheetParent : null, undefined, false, onKeyDownVertical) })] }))] }));
119
116
  });
@@ -2,8 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createElement, useCallback, useMemo } from "react";
3
3
  import { classNames } from "../../commonHelpers/classNames/classNames";
4
4
  import { IconChevronRight } from "../../icons/iconChevronRight";
5
- import { IconChevronLeft } from "../../icons/iconChevronLeft";
6
- import { useDirectionalIcon } from "../../utils/localization/useDirectionalIcon";
7
5
  import { useDriveClassName } from "../../utils/theme/useDriveClassName";
8
6
  import { useDrive } from "../../utils/theme/useDrive";
9
7
  import { getMenuButtonState } from "../utils/getMenuButtonState";
@@ -13,7 +11,6 @@ export const MenuButton = ({ id, onClick, hasChildren, disabled, icon, name, lin
13
11
  const { hasState, isActive } = getMenuButtonState(active, disabled);
14
12
  const driveMenuButtonActionClasses = useDriveClassName("zen-menu-button__action");
15
13
  const isDrive = useDrive();
16
- const ChevronIcon = useDirectionalIcon(IconChevronRight, IconChevronLeft);
17
14
  const linkEvents = useMemo(() => ({
18
15
  onKeyDown: e => {
19
16
  if (e.key === " ") {
@@ -49,7 +46,7 @@ export const MenuButton = ({ id, onClick, hasChildren, disabled, icon, name, lin
49
46
  createElement(icon, {
50
47
  size: isDrive ? "huge" : "large",
51
48
  className: classNames(["zen-caption__pre-content", "zen-menu-button__icon"])
52
- }), _jsx("span", { className: "zen-menu-button__action-text", children: name }), !!hasChildren && (_jsx(ChevronIcon, { size: isDrive ? "huge" : "large", className: classNames(["zen-caption__pre-content", "zen-menu-button__more-icon"]) }))] }));
49
+ }), _jsx("span", { className: "zen-menu-button__action-text", children: name }), !!hasChildren && (_jsx(IconChevronRight, { size: isDrive ? "huge" : "large", className: classNames(["zen-caption__pre-content", "zen-menu-button__more-icon"]) }))] }));
53
50
  const linkTemplate = (_jsxs("a", Object.assign({ "data-id": id, role: "menuitem", className: classNames([
54
51
  "zen-menu-button__action",
55
52
  "zen-caption",
@@ -3,16 +3,13 @@ import { PathContext } from "../contexts/pathContext";
3
3
  import { MenuAlignmentContext } from "../../header/headerContext";
4
4
  import { buildMenuContent } from "./buildMenuContent";
5
5
  import { useMenuItemKeyboardNav } from "./useMenuItemKeyboardNav";
6
- import { directionContext } from "../../utils/localization/directionContext";
7
6
  /**
8
7
  * Core menu item logic shared between MenuItem and createMenuItem.
9
8
  * Consolidates context access, state computation, and callback memoization.
10
9
  */
11
10
  export const useMenuItemCore = ({ id, children, className, alignment, isMobile = false, setIsOpen, onClick, onOpenChange }) => {
12
11
  const alignmentContext = useContext(MenuAlignmentContext);
13
- const direction = useContext(directionContext);
14
- const defaultAlignment = direction === "rtl" ? "left-top" : "right-top";
15
- const contentAlignment = alignment || alignmentContext.alignment || defaultAlignment;
12
+ const contentAlignment = alignment || alignmentContext.alignment || "right-top";
16
13
  const { path, onOpenBranch, closeBranch, navigatedViaKeyboardRef } = useContext(PathContext);
17
14
  const ref = useRef(null);
18
15
  const content = useMemo(() => buildMenuContent(children, isMobile, setIsOpen, className), [children, isMobile, setIsOpen, className]);
@@ -14,9 +14,7 @@ import { classNames } from "../../commonHelpers/classNames/classNames";
14
14
  import { useRef, useState, useEffect, Children, cloneElement, createContext, useContext, useId } from "react";
15
15
  import { IconBeta } from "../../icons/iconBeta";
16
16
  import { IconChevronRight } from "../../icons/iconChevronRight";
17
- import { IconChevronLeft } from "../../icons/iconChevronLeft";
18
17
  import { IconOpen2 } from "../../icons/iconOpen2";
19
- import { useDirectionalIcon } from "../../utils/localization/useDirectionalIcon";
20
18
  import { Tooltip } from "../../tooltip/tooltip";
21
19
  import { ControlledMenu } from "../../menu/controlledMenu";
22
20
  import { useNavContext } from "../context/nav.context";
@@ -28,12 +26,11 @@ const defaultTooltipAlignment = "right";
28
26
  const isLinkNavItem = (item) => !!item.link;
29
27
  const NavItemContent = ({ primaryIcon, secondaryIcon, isBeta, counter, collapsed, hasSubmenu, iconClass, level = 1, children }) => {
30
28
  const primaryIconRef = useRef(null);
31
- const ChevronIcon = useDirectionalIcon(IconChevronRight, IconChevronLeft);
32
29
  const PrimaryIconComponent = typeof primaryIcon === "function" ? primaryIcon : null;
33
30
  const SecondaryIconComponent = secondaryIcon;
34
31
  const iconSize = level > 1 ? SUBMENU_ICON_SIZE : ICON_SIZE;
35
32
  const primaryIconComponent = primaryIcon ? (_jsx("span", { ref: primaryIconRef, className: classNames(["zen-nav-item__icon", counter ? "zen-nav-item__icon--with-counter" : "", iconClass || ""]), children: PrimaryIconComponent ? _jsx(PrimaryIconComponent, { size: iconSize }) : primaryIcon })) : null;
36
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "zen-nav-item__content-left", children: [isBeta && !collapsed ? (_jsx("span", { className: "zen-nav-item__beta", children: _jsx(IconBeta, { size: "big" }) })) : null, primaryIconComponent, SecondaryIconComponent && !collapsed ? (_jsx("span", { className: "zen-nav-item__icon", children: _jsx(SecondaryIconComponent, { size: iconSize }) })) : null, !collapsed ? _jsx("span", { className: "zen-nav-item__title", children: children }) : null] }), !collapsed && (counter || hasSubmenu) ? (_jsxs("div", { className: "zen-nav-item__content-right", children: [counter ? _jsx("div", { className: "zen-nav-item__counter", children: counter }) : null, hasSubmenu ? _jsx(ChevronIcon, { className: "zen-nav-item__title-icon", size: iconSize }) : null] })) : null] }));
33
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "zen-nav-item__content-left", children: [isBeta && !collapsed ? (_jsx("span", { className: "zen-nav-item__beta", children: _jsx(IconBeta, { size: "big" }) })) : null, primaryIconComponent, SecondaryIconComponent && !collapsed ? (_jsx("span", { className: "zen-nav-item__icon", children: _jsx(SecondaryIconComponent, { size: iconSize }) })) : null, !collapsed ? _jsx("span", { className: "zen-nav-item__title", children: children }) : null] }), !collapsed && (counter || hasSubmenu) ? (_jsxs("div", { className: "zen-nav-item__content-right", children: [counter ? _jsx("div", { className: "zen-nav-item__counter", children: counter }) : null, hasSubmenu ? _jsx(IconChevronRight, { className: "zen-nav-item__title-icon", size: iconSize }) : null] })) : null] }));
37
34
  };
38
35
  const NavItemAction = ({ actionIcon, actionIconTitle = "", onActionIconClick, collapsed, isMenuItem, level = 1 }) => {
39
36
  const ActionIconComponent = actionIcon;
@@ -1,15 +1,13 @@
1
1
  import { injectString } from "../utils/localization/translationsDictionary";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { classNames } from "../commonHelpers/classNames/classNames";
3
4
  import { SvgIconSize } from "../svgIcon/svgIconSize";
4
5
  import { PaginationType } from "./paginationType";
5
6
  import { ButtonIconPosition, TextIconButton } from "../textIconButton/textIconButton";
6
7
  import { ButtonType } from "../button/buttonType";
7
8
  import { useLanguage } from "../utils/localization/useLanguage";
8
9
  import { IconChevronRight } from "../icons/iconChevronRight";
9
- import { IconChevronLeft } from "../icons/iconChevronLeft";
10
10
  import { IconArrowRight } from "../icons/iconArrowRight";
11
- import { IconArrowLeft } from "../icons/iconArrowLeft";
12
- import { useDirectionalIcon } from "../utils/localization/useDirectionalIcon";
13
11
  injectString("cs", "Previous page", "P\u0159edchoz\xED str\xE1nka");
14
12
  injectString("da-DK", "Previous page", "Forrige side");
15
13
  injectString("de", "Previous page", "Vorherige Seite");
@@ -73,11 +71,6 @@ export const PaginationArrow = ({
73
71
  const {
74
72
  translate
75
73
  } = useLanguage();
76
- const isPrevious = value === "previous";
77
- const [ltrCompact, rtlCompact] = isPrevious ? [IconChevronLeft, IconChevronRight] : [IconChevronRight, IconChevronLeft];
78
- const [ltrNormal, rtlNormal] = isPrevious ? [IconArrowLeft, IconArrowRight] : [IconArrowRight, IconArrowLeft];
79
- const CompactIcon = useDirectionalIcon(ltrCompact, rtlCompact);
80
- const NormalIcon = useDirectionalIcon(ltrNormal, rtlNormal);
81
74
  const previousButtonTitle = translate("Previous page");
82
75
  const nextButtonTitle = translate("Next page");
83
76
  const buttonTitle = value === "next" ? nextButtonTitle : previousButtonTitle;
@@ -89,10 +82,10 @@ export const PaginationArrow = ({
89
82
  disabled: disabled,
90
83
  onClick: arrowButtonHandler,
91
84
  type: type === PaginationType.Compact ? ButtonType.TertiaryBlack : ButtonType.Secondary,
92
- icon: type === PaginationType.Compact ? CompactIcon : NormalIcon,
85
+ icon: type === PaginationType.Compact ? IconChevronRight : IconArrowRight,
93
86
  iconSize: type === PaginationType.Compact ? SvgIconSize.Big : SvgIconSize.Large,
94
87
  iconPosition: ButtonIconPosition.Start,
95
- iconClasses: "zen-pagination__arrow-navigation-button-icon"
88
+ iconClasses: classNames(["zen-pagination__arrow-navigation-button-icon", value === "previous" ? "zen-pagination__arrow-navigation-button-icon--rotate" : ""])
96
89
  });
97
90
  };
98
91
  export const TRANSLATIONS = ["Previous page", "Next page"];
@@ -63,7 +63,6 @@ export const RadioGroupRaw = (props) => {
63
63
  "zen-radio-group__item",
64
64
  wrappedInLabel ? "zen-radio-group__item--no-paddings" : "",
65
65
  type === "interactive" ? "zen-radio--interactive" : "",
66
- size === "small" ? "zen-radio-group__item--small" : "",
67
- direction === "horizontal" ? "zen-radio--align-start" : ""
66
+ size === "small" ? "zen-radio-group__item--small" : ""
68
67
  ]), key: ind, checked: item.value === value, disabled: disabled ? disabled : item.disabled, name: name, reverse: reverse, fullWidth: fullWidth, value: item.value, onChange: onChangeInner, wrappedInLabel: wrappedInLabel, tabIndex: selectItemOnFocus || disabled || item.disabled ? undefined : ind === focusedIndex ? 0 : -1, ref: selectItemOnFocus ? undefined : ind === focusedIndex ? focusElementRef : undefined, role: itemRole }), item.children) }, `${ind}-li`))) })) }));
69
68
  };
@@ -419,6 +419,7 @@ export const RangeRaw = props => {
419
419
  className: classNames(["zen-range-popup zen-shadow-dropdown-default", className ? className : ""]),
420
420
  onOpenChange: handleTriggerClick,
421
421
  useTrapFocusWithTrigger: "on",
422
+ alignment: "bottom-left",
422
423
  shouldHoldScroll: true,
423
424
  triggerRef: triggerRef,
424
425
  ariaLabel: translate("Range Filter popup"),
@@ -5,7 +5,7 @@ export declare const getItemIdByIndex: (state: Map<string, CheckboxState>, index
5
5
  export declare const getItemIndexById: (state: Map<string, CheckboxState>, id: string) => number;
6
6
  export declare const updateItemState: (initialState: Map<string, CheckboxState>, multiselect: boolean, updatedId: string, newState: CheckboxState) => [Map<string, CheckboxState>, boolean];
7
7
  export declare const searchItemIndex: (items: ISelectListItem[], searchStr: string) => number;
8
- export declare const getFirstIndex: (items: ISelectListItem[]) => number;
8
+ export declare const getFirstIndex: (items: ISelectListItem[]) => 0 | -1;
9
9
  export declare const getLastIndex: (items: ISelectListItem[]) => number;
10
10
  export declare const getNextIndex: (currIndex: number, items: ISelectListItem[]) => number;
11
11
  export declare const getPrevIndex: (currIndex: number, items: ISelectListItem[]) => number;
@@ -35,44 +35,19 @@ export const searchItemIndex = (items, searchStr) => {
35
35
  return content.toLocaleLowerCase().indexOf(searchStr.toLocaleLowerCase()) > -1;
36
36
  });
37
37
  };
38
- export const getFirstIndex = (items) => items.findIndex(item => !item.disabled);
39
- export const getLastIndex = (items) => {
40
- for (let i = items.length - 1; i >= 0; i--) {
41
- if (!items[i].disabled) {
42
- return i;
43
- }
44
- }
45
- return -1;
46
- };
38
+ export const getFirstIndex = (items) => (items.length > 0 ? 0 : -1);
39
+ export const getLastIndex = (items) => (items.length > 0 ? items.length - 1 : -1);
47
40
  export const getNextIndex = (currIndex, items) => {
48
- var _a;
49
41
  if (items.length === 0) {
50
42
  return -1;
51
43
  }
52
- let nextIndex = currIndex + 1 >= items.length ? 0 : currIndex + 1;
53
- const startIndex = nextIndex;
54
- while ((_a = items[nextIndex]) === null || _a === void 0 ? void 0 : _a.disabled) {
55
- nextIndex = nextIndex + 1 >= items.length ? 0 : nextIndex + 1;
56
- if (nextIndex === startIndex) {
57
- return currIndex;
58
- }
59
- }
60
- return nextIndex;
44
+ return currIndex + 1 >= items.length ? 0 : currIndex + 1;
61
45
  };
62
46
  export const getPrevIndex = (currIndex, items) => {
63
- var _a;
64
47
  if (items.length === 0) {
65
48
  return -1;
66
49
  }
67
- let prevIndex = currIndex <= 0 || currIndex >= items.length ? items.length - 1 : currIndex - 1;
68
- const startIndex = prevIndex;
69
- while ((_a = items[prevIndex]) === null || _a === void 0 ? void 0 : _a.disabled) {
70
- prevIndex = prevIndex <= 0 ? items.length - 1 : prevIndex - 1;
71
- if (prevIndex === startIndex) {
72
- return currIndex;
73
- }
74
- }
75
- return prevIndex;
50
+ return currIndex <= 0 || currIndex >= items.length ? items.length - 1 : currIndex - 1;
76
51
  };
77
52
  export const getFirstActiveIndex = (state, items, multiselect) => {
78
53
  for (let i = 0; i < items.length; i++) {
@@ -48,9 +48,7 @@ export const SelectList = (_a) => {
48
48
  if (!multiselect && selectItemOnFocus) {
49
49
  dispatchState({ type: ListAction.FocusFirst, payload: { items } });
50
50
  }
51
- if (!multiselect) {
52
- dispatchState({ type: ListAction.Focus, payload: { items, multiselect } });
53
- }
51
+ dispatchState({ type: ListAction.Focus, payload: { items, multiselect } });
54
52
  }, [multiselect, items, selectItemOnFocus]);
55
53
  useEffect(() => {
56
54
  onChange && state.isItemsStateChanged && onChange(new Map(state.itemsState));
@@ -117,7 +117,8 @@ export const selectListReducer = (state, action) => {
117
117
  newItemsState = updatedState;
118
118
  });
119
119
  const prevActiveItemId = getItemIdByIndex(state.itemsState, state.activeIndex);
120
- const activeIndex = prevActiveItemId !== undefined ? getItemIndexById(newItemsState, prevActiveItemId) : -1;
120
+ const newActiveItemIndex = !!prevActiveItemId && getItemIndexById(newItemsState, prevActiveItemId);
121
+ const activeIndex = newActiveItemIndex ? newActiveItemIndex : -1;
121
122
  return Object.assign(Object.assign({}, state), { itemsState: newItemsState, activeIndex, isItemsStateChanged: false });
122
123
  }
123
124
  case ListAction.SetLevel: {
@@ -3,12 +3,9 @@ import { CheckboxState } from "../checkbox/checkboxState";
3
3
  import { CheckboxNonInteractive } from "../checkboxNonInteractive/checkboxNonInteractive";
4
4
  import { classNames } from "../commonHelpers/classNames/classNames";
5
5
  import { IconChevronRight } from "../icons/iconChevronRight";
6
- import { IconChevronLeft } from "../icons/iconChevronLeft";
7
- import { useDirectionalIcon } from "../utils/localization/useDirectionalIcon";
8
6
  import { useDriveClassName } from "../utils/theme/useDriveClassName";
9
7
  export const SelectListItem = ({ id, disabled = false, state = CheckboxState.Off, showCheckbox = false, focused = false, onChange, onClick, multiLevel, className = "", children }) => {
10
8
  const driveClassName = useDriveClassName("zen-select-item");
11
- const ChevronIcon = useDirectionalIcon(IconChevronRight, IconChevronLeft);
12
9
  const onClickFunc = () => {
13
10
  if (disabled) {
14
11
  return;
@@ -30,5 +27,5 @@ export const SelectListItem = ({ id, disabled = false, state = CheckboxState.Off
30
27
  "zen-select-item__wrapper",
31
28
  "zen-ellipsis",
32
29
  multiLevel ? "zen-select-item__wrapper--with-arrow" : ""
33
- ]), children: [showCheckbox ? (_jsx(CheckboxNonInteractive, { className: "zen-select-item__control-view", checked: state === CheckboxState.On, indeterminate: state === CheckboxState.Indeterminate, disabled: disabled, children: children })) : (children), multiLevel && !showCheckbox ? _jsx(ChevronIcon, { size: "large" }) : null] }) }));
30
+ ]), children: [showCheckbox ? (_jsx(CheckboxNonInteractive, { className: "zen-select-item__control-view", checked: state === CheckboxState.On, indeterminate: state === CheckboxState.Indeterminate, disabled: disabled, children: children })) : (children), multiLevel && !showCheckbox ? _jsx(IconChevronRight, { size: "large" }) : null] }) }));
34
31
  };
@@ -65,60 +65,6 @@ injectString("zh-Hans", "Change sort direction", "\u66F4\u6539\u6392\u5E8F");
65
65
  injectString("zh-TW", "Change sort direction", "\u8B8A\u66F4\u6392\u5E8F\u65B9\u5411");
66
66
  injectString("ro-RO", "Change sort direction", "Schimba\u021Bi direc\u021Bia sort\u0103rii");
67
67
  injectString("ar-SA", "Change sort direction", "\u062A\u063A\u064A\u064A\u0631 \u0627\u062A\u062C\u0627\u0647 \u0627\u0644\u062A\u0631\u062A\u064A\u0628");
68
- injectString("cs", "Ascending", "Vzestupn\u011B");
69
- injectString("da-DK", "Ascending", "Stigende");
70
- injectString("de", "Ascending", "Aufsteigend");
71
- injectString("en", "Ascending", "Ascending");
72
- injectString("es", "Ascending", "Ascendente");
73
- injectString("fi-FI", "Ascending", "Nouseva");
74
- injectString("fr", "Ascending", "Croissant");
75
- injectString("fr-FR", "Ascending", "Croissant");
76
- injectString("hu-HU", "Ascending", "N\xF6vekv\u0151");
77
- injectString("id", "Ascending", "Naik");
78
- injectString("it", "Ascending", "Crescente");
79
- injectString("ja", "Ascending", "\u6607\u9806");
80
- injectString("ko-KR", "Ascending", "\uC624\uB984\uCC28\uC21C");
81
- injectString("ms", "Ascending", "Menaik");
82
- injectString("nb-NO", "Ascending", "Stigende");
83
- injectString("nl", "Ascending", "Oplopend");
84
- injectString("pl", "Ascending", "Rosn\u0105co");
85
- injectString("pt-BR", "Ascending", "Crescente");
86
- injectString("pt-PT", "Ascending", "Ascendente");
87
- injectString("sk-SK", "Ascending", "Vzostupne");
88
- injectString("sv", "Ascending", "Stigande");
89
- injectString("th", "Ascending", "\u0E08\u0E32\u0E01\u0E19\u0E49\u0E2D\u0E22\u0E44\u0E1B\u0E21\u0E32\u0E01");
90
- injectString("tr", "Ascending", "Artan");
91
- injectString("zh-Hans", "Ascending", "\u5347\u5E8F");
92
- injectString("zh-TW", "Ascending", "\u905E\u589E");
93
- injectString("ro-RO", "Ascending", "Ascensiune");
94
- injectString("ar-SA", "Ascending", "\u062A\u0635\u0627\u0639\u062F\u064A");
95
- injectString("cs", "Descending", "Sestupn\u011B");
96
- injectString("da-DK", "Descending", "Faldende");
97
- injectString("de", "Descending", "Absteigend");
98
- injectString("en", "Descending", "Descending");
99
- injectString("es", "Descending", "Descendente");
100
- injectString("fi-FI", "Descending", "Laskeva");
101
- injectString("fr", "Descending", "D\xE9croissant");
102
- injectString("fr-FR", "Descending", "Descendant");
103
- injectString("hu-HU", "Descending", "Cs\xF6kken\u0151");
104
- injectString("id", "Descending", "Menurun");
105
- injectString("it", "Descending", "Decrescente");
106
- injectString("ja", "Descending", "\u964D\u9806");
107
- injectString("ko-KR", "Descending", "\uB0B4\uB9BC\uCC28\uC21C");
108
- injectString("ms", "Descending", "Menurun");
109
- injectString("nb-NO", "Descending", "Synkende");
110
- injectString("nl", "Descending", "Aflopend");
111
- injectString("pl", "Descending", "Malej\u0105co");
112
- injectString("pt-BR", "Descending", "Decrescente");
113
- injectString("pt-PT", "Descending", "Descendente");
114
- injectString("sk-SK", "Descending", "Zostupne");
115
- injectString("sv", "Descending", "Fallande");
116
- injectString("th", "Descending", "\u0E08\u0E32\u0E01\u0E21\u0E32\u0E01\u0E44\u0E1B\u0E19\u0E49\u0E2D\u0E22");
117
- injectString("tr", "Descending", "Azalan");
118
- injectString("zh-Hans", "Descending", "\u964D\u5E8F");
119
- injectString("zh-TW", "Descending", "\u905E\u6E1B");
120
- injectString("ro-RO", "Descending", "Cobor\xE2re");
121
- injectString("ar-SA", "Descending", "\u062A\u0646\u0627\u0632\u0644\u064A");
122
68
  injectString("cs", "Sort Options", "Sort Options");
123
69
  injectString("da-DK", "Sort Options", "Sorteringsmuligheder");
124
70
  injectString("de", "Sort Options", "Sort Options");
@@ -146,6 +92,7 @@ injectString("zh-Hans", "Sort Options", "Sort Options");
146
92
  injectString("zh-TW", "Sort Options", "\u6392\u5E8F\u9078\u9805");
147
93
  injectString("ro-RO", "Sort Options", "Op\u021Biuni de sortare");
148
94
  injectString("ar-SA", "Sort Options", "\u062E\u064A\u0627\u0631\u0627\u062A \u0627\u0644\u062A\u0631\u062A\u064A\u0628");
95
+ const MENU_POSITION = "bottom-left";
149
96
  const BUTTON_TEXT_DEFAULT = "Sort by";
150
97
  export var SortDirections;
151
98
  (function (SortDirections) {
@@ -202,6 +149,7 @@ export const SortControl = ({
202
149
  onClick: () => onSortDirectionToggle(),
203
150
  disabled: disabled,
204
151
  title: translate("Change sort direction"),
152
+ "aria-label": translate("Change sort direction"),
205
153
  children: [directionIcon ? sortDirection === SortDirections.Ascending ? _jsx(IconFilter3Asc, {
206
154
  className: "zen-sort-container__sort-icon",
207
155
  size: isDrive ? "huge" : "large"
@@ -214,9 +162,6 @@ export const SortControl = ({
214
162
  children: [buttonTextValue, ": "]
215
163
  }), _jsx("span", {
216
164
  children: (items.find(item => item.id === sortBy) || items[0]).children
217
- }), _jsxs("span", {
218
- className: "zen-visually-hidden",
219
- children: [" ", sortDirection === SortDirections.Ascending ? translate("Ascending") : translate("Descending")]
220
165
  })]
221
166
  })]
222
167
  }), isSingleItem ? "" : _jsx(Popup, {
@@ -230,7 +175,7 @@ export const SortControl = ({
230
175
  size: isDrive ? "huge" : "large"
231
176
  })
232
177
  }),
233
- alignment: "bottom-left",
178
+ alignment: MENU_POSITION,
234
179
  onOpenChange: isCurrentlyOpen => onOptionsToggle(isCurrentlyOpen),
235
180
  children: _jsx(SelectList, {
236
181
  id: "sortControlSelectList",
@@ -243,4 +188,4 @@ export const SortControl = ({
243
188
  }, popupKey)]
244
189
  });
245
190
  };
246
- export const TRANSLATIONS = ["Sort by", "Sort Options", "Change sort direction", "Ascending", "Descending"];
191
+ export const TRANSLATIONS = ["Sort by", "Sort Options", "Change sort direction"];
@@ -1,5 +1,5 @@
1
1
  import { ReactElement, ReactNode, RefObject } from "react";
2
- export declare const useTableChildren: (children: ReactNode, isMobile: boolean, selected: number, allSelected: boolean, clearSelection: () => void, activeId?: string, gridRef?: RefObject<HTMLElement | null>, onCloseDetailPanel?: () => void) => {
2
+ export declare const useTableChildren: (children: ReactNode, isMobile: boolean, selected: number, allSelected: boolean, clearSelection: () => void, selectAll: () => void, turnOffSelectAll?: boolean, activeId?: string, gridRef?: RefObject<HTMLElement | null>, onCloseDetailPanel?: () => void) => {
3
3
  bulkActions: ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | undefined;
4
4
  pagination: ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | undefined;
5
5
  activePage: number | undefined;
@@ -24,7 +24,7 @@ const isChildElement = function (child, expectedType) {
24
24
  }
25
25
  return false;
26
26
  };
27
- export const useTableChildren = (children, isMobile, selected, allSelected, clearSelection, activeId, gridRef, onCloseDetailPanel) => useMemo(() => {
27
+ export const useTableChildren = (children, isMobile, selected, allSelected, clearSelection, selectAll, turnOffSelectAll, activeId, gridRef, onCloseDetailPanel) => useMemo(() => {
28
28
  let bulkActions = undefined;
29
29
  let tablePagination = undefined;
30
30
  let activePage = undefined;
@@ -39,7 +39,7 @@ export const useTableChildren = (children, isMobile, selected, allSelected, clea
39
39
  }
40
40
  if (isChildElement(child, TableBulkActions.displayName)) {
41
41
  const bulkActionButtons = child.props.children || [];
42
- bulkActions = (_jsx(BulkActions, { gridType: isMobile ? DeviceType.Mobile : DeviceType.Desktop, selected: selected, allSelected: allSelected, onClearSelection: clearSelection, children: bulkActionButtons }));
42
+ bulkActions = (_jsx(BulkActions, { gridType: isMobile ? DeviceType.Mobile : DeviceType.Desktop, selected: selected, allSelected: allSelected, onClearSelection: clearSelection, onSelectAll: selectAll, turnOffSelectAll: turnOffSelectAll, children: bulkActionButtons }));
43
43
  return;
44
44
  }
45
45
  if (isChildElement(child, TablePagination.displayName)) {
@@ -100,4 +100,4 @@ export const useTableChildren = (children, isMobile, selected, allSelected, clea
100
100
  detailPanel: detailPanel,
101
101
  other: other
102
102
  };
103
- }, [children, clearSelection, isMobile, selected, gridRef, allSelected, activeId, onCloseDetailPanel]);
103
+ }, [children, clearSelection, isMobile, selected, gridRef, allSelected, selectAll, turnOffSelectAll, activeId, onCloseDetailPanel]);
@@ -57,7 +57,6 @@ const SubColumnsList = ({
57
57
  showCheckbox: true,
58
58
  children: c.title
59
59
  })), [columns, sortColumnsInt, lastVisibleColumnId]);
60
- const allDisabled = useMemo(() => items.every(item => item.disabled), [items]);
61
60
  const state = columns.reduce((res, c) => {
62
61
  res.set(c.id, settings.get(c.id) !== false ? CheckboxState.On : CheckboxState.Off);
63
62
  return res;
@@ -77,9 +76,8 @@ const SubColumnsList = ({
77
76
  title: title || translate("Select visible columns"),
78
77
  multiselect: true,
79
78
  showCheckbox: true,
80
- onChange: onChangeItem,
81
- disabled: allDisabled
82
- }), [id, items, state, title, translate, onChangeItem, allDisabled]);
79
+ onChange: onChangeItem
80
+ }), [id, items, state, title, translate, onChangeItem]);
83
81
  if (!title) {
84
82
  return list;
85
83
  }
@@ -16,14 +16,6 @@ export interface ISelectableRowsOptions<T extends IRowEntity<N>, N extends IEnti
16
16
  checkboxTitle?: (entity: T | N) => string;
17
17
  headerTitle?: (state: SelectionState) => string;
18
18
  turnOffSelectAll?: boolean;
19
- /**
20
- * When `true`, the header checkbox emits the current page's IDs instead of `{ all: true }`.
21
- * When `undefined`, falls back to `turnOffSelectAll` for backward compatibility.
22
- *
23
- * Note: avoid setting this to `false` alongside `turnOffSelectAll: true` — the checkbox
24
- * will emit `{ all: true }` while the dropdown hides the "Select all" option, which is inconsistent.
25
- */
26
- checkboxSelectsCurrentPage?: boolean;
27
19
  checkboxPlaceholder?: boolean;
28
20
  strategy?: TSelectionStrategy;
29
21
  selectAll?: boolean;