@geotab/zenith 3.16.0 → 3.17.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 (282) hide show
  1. package/README.md +67 -1
  2. package/README.md.baseline +1 -0
  3. package/dist/absolute/absolute.js +5 -1
  4. package/dist/button/button.d.ts +2 -1
  5. package/dist/button/button.js +22 -5
  6. package/dist/checkboxListWithAction/checkboxListWithAction.d.ts +2 -0
  7. package/dist/checkboxListWithAction/checkboxListWithAction.js +1 -1
  8. package/dist/commonHelpers/ShowMoreCell.d.ts +5 -0
  9. package/dist/commonHelpers/ShowMoreCell.js +66 -0
  10. package/dist/commonHelpers/getAriaAttributes.js +6 -9
  11. package/dist/commonHelpers/getNonAriaProps.d.ts +11 -0
  12. package/dist/commonHelpers/getNonAriaProps.js +19 -0
  13. package/dist/commonHelpers/hooks/useScroll.d.ts +1 -1
  14. package/dist/commonHelpers/hooks/useScroll.js +6 -6
  15. package/dist/commonHelpers/isAriaProp.d.ts +9 -0
  16. package/dist/commonHelpers/isAriaProp.js +13 -0
  17. package/dist/commonHelpers/showMoreRow.d.ts +28 -0
  18. package/dist/commonHelpers/showMoreRow.js +29 -0
  19. package/dist/commonHelpers/tabsKeyboard.d.ts +1 -1
  20. package/dist/commonHelpers/tabsKeyboard.js +15 -1
  21. package/dist/commonStyles/colors/colors.less +18 -0
  22. package/dist/dataFeed/dataFeedColumnsItems.js +3 -1
  23. package/dist/dataGrid/columns/checkboxColumn/checkboxCell.d.ts +2 -1
  24. package/dist/dataGrid/columns/checkboxColumn/checkboxCell.js +1 -1
  25. package/dist/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.d.ts +4 -2
  26. package/dist/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.js +10 -1
  27. package/dist/dataGrid/dataGrid.d.ts +5 -1
  28. package/dist/dataGrid/dataGrid.js +39 -2
  29. package/dist/dataGrid/lazyLoadingEnd/lazyLoadingEnd.d.ts +3 -0
  30. package/dist/dataGrid/lazyLoadingEnd/lazyLoadingEnd.js +54 -0
  31. package/dist/dataGrid/row/row.js +20 -2
  32. package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +3 -1
  33. package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +39 -4
  34. package/dist/dataGrid/withSelectableRows/withSelectableRows.js +73 -12
  35. package/dist/dropdown/dropdownTrigger.d.ts +1 -1
  36. package/dist/dropdownRaw/dropdownHelper.d.ts +12 -0
  37. package/dist/dropdownRaw/dropdownHelper.js +32 -11
  38. package/dist/dropdownRaw/dropdownRaw.js +36 -8
  39. package/dist/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
  40. package/dist/dropdownRaw/dropdownSearchableTrigger.js +13 -6
  41. package/dist/dropdownRaw/dropdownTrigger.d.ts +2 -1
  42. package/dist/dropdownRaw/dropdownTrigger.js +2 -2
  43. package/dist/dropdownRaw/stateReducer/stateReducer.d.ts +8 -0
  44. package/dist/dropdownRaw/stateReducer/stateReducer.js +5 -2
  45. package/dist/dropdownRaw/types.d.ts +36 -0
  46. package/dist/filterButton/filterButton.d.ts +1 -1
  47. package/dist/formGroup/hooks/rowHooks/useLabelClasses.js +8 -2
  48. package/dist/formLayout/utils/applyLayoutPosition/applyLayoutPosition.d.ts +2 -1
  49. package/dist/formLayout/utils/applyLayoutPosition/applyLayoutPosition.js +37 -90
  50. package/dist/header/components/collapsedItemsControl/collapsedItemsControl.d.ts +1 -1
  51. package/dist/header/components/collapsedItemsControl/collapsedItemsControl.js +6 -2
  52. package/dist/header/headerButton.d.ts +3 -1
  53. package/dist/header/headerButton.js +4 -2
  54. package/dist/header/headerMenu.d.ts +2 -0
  55. package/dist/header/headerMenu.js +1 -1
  56. package/dist/index.css +319 -68
  57. package/dist/index.d.ts +3 -1
  58. package/dist/index.js +9 -3
  59. package/dist/menu/components/menuButton.d.ts +3 -1
  60. package/dist/menu/components/menuButton.js +66 -47
  61. package/dist/menu/components/menuItem.js +4 -4
  62. package/dist/miniTabs/miniTabs.js +4 -2
  63. package/dist/pageHeader/pageHeaderButton.d.ts +1 -1
  64. package/dist/pageHeader/pageHeaderButton.js +4 -2
  65. package/dist/pagination/pagination.d.ts +19 -4
  66. package/dist/pagination/pagination.js +21 -1
  67. package/dist/pagination/paginationText/paginationText.d.ts +7 -1
  68. package/dist/pagination/paginationText/paginationText.js +6 -3
  69. package/dist/pillExpandable/pillContent.d.ts +3 -2
  70. package/dist/pillExpandable/pillContent.js +2 -2
  71. package/dist/pillExpandable/pillExpandable.js +20 -5
  72. package/dist/pillExpandable/pillExpandablePopoverContent.d.ts +3 -2
  73. package/dist/pillExpandable/pillExpandablePopoverContent.js +1 -1
  74. package/dist/pillExpandable/pillExpandableSimple.d.ts +3 -1
  75. package/dist/pillExpandable/pillExpandableSimple.js +19 -9
  76. package/dist/selectList/selectList.js +1 -0
  77. package/dist/selectList/selectListItem.d.ts +10 -1
  78. package/dist/selectList/selectListItem.js +12 -9
  79. package/dist/table/children/tablePagination.d.ts +1 -1
  80. package/dist/table/children/useTableChildren.d.ts +4 -2
  81. package/dist/table/children/useTableChildren.js +64 -16
  82. package/dist/table/nested/nestedData.d.ts +29 -1
  83. package/dist/table/nested/nestedData.js +45 -4
  84. package/dist/table/nested/useNestedRows.js +18 -22
  85. package/dist/table/nested/useShowMore.d.ts +41 -0
  86. package/dist/table/nested/useShowMore.js +56 -0
  87. package/dist/table/selectable/interfaces.d.ts +17 -0
  88. package/dist/table/selectable/useDragSelection.d.ts +10 -0
  89. package/dist/table/selectable/useDragSelection.js +145 -0
  90. package/dist/table/selectable/useSelectableRows.d.ts +5 -2
  91. package/dist/table/selectable/useSelectableRows.js +131 -36
  92. package/dist/table/selectable/utils/calculateSelectionState.d.ts +1 -1
  93. package/dist/table/selectable/utils/calculateSelectionState.js +43 -7
  94. package/dist/table/selectable/utils/checkRow.js +4 -2
  95. package/dist/table/selectable/utils/getCurrentPageSelection.js +9 -5
  96. package/dist/table/selectable/utils/getDragSelectionRows.d.ts +15 -0
  97. package/dist/table/selectable/utils/getDragSelectionRows.js +28 -0
  98. package/dist/table/selectable/utils/getRangeIds.d.ts +2 -0
  99. package/dist/table/selectable/utils/getRangeIds.js +21 -0
  100. package/dist/table/selectable/utils/isRowChecked.d.ts +1 -1
  101. package/dist/table/selectable/utils/isRowChecked.js +40 -7
  102. package/dist/table/table.d.ts +1 -2
  103. package/dist/table/table.js +58 -31
  104. package/dist/tabs/tabs.d.ts +1 -0
  105. package/dist/tabs/tabs.js +50 -17
  106. package/dist/textInputRaw/textInputRaw.js +3 -2
  107. package/dist/tooltip/tooltip.d.ts +2 -0
  108. package/dist/tooltip/tooltip.js +19 -7
  109. package/dist/utils/localization/translations/ar-001.json +1 -0
  110. package/dist/utils/localization/translations/bg-BG.json +1 -0
  111. package/dist/utils/localization/translations/cs.json +1 -0
  112. package/dist/utils/localization/translations/da-DK.json +1 -0
  113. package/dist/utils/localization/translations/de.json +1 -0
  114. package/dist/utils/localization/translations/el-GR.json +1 -0
  115. package/dist/utils/localization/translations/en.json +4 -0
  116. package/dist/utils/localization/translations/es.json +1 -0
  117. package/dist/utils/localization/translations/et-EE.json +1 -0
  118. package/dist/utils/localization/translations/fi-FI.json +1 -0
  119. package/dist/utils/localization/translations/fr-FR.json +1 -0
  120. package/dist/utils/localization/translations/fr.json +1 -0
  121. package/dist/utils/localization/translations/hu-HU.json +1 -0
  122. package/dist/utils/localization/translations/id.json +1 -0
  123. package/dist/utils/localization/translations/it.json +1 -0
  124. package/dist/utils/localization/translations/ja.json +1 -0
  125. package/dist/utils/localization/translations/ka-GE.json +1 -0
  126. package/dist/utils/localization/translations/ko-KR.json +1 -0
  127. package/dist/utils/localization/translations/lt-LT.json +1 -0
  128. package/dist/utils/localization/translations/lv-LV.json +1 -0
  129. package/dist/utils/localization/translations/ms.json +1 -0
  130. package/dist/utils/localization/translations/nb-NO.json +1 -0
  131. package/dist/utils/localization/translations/nl.json +1 -0
  132. package/dist/utils/localization/translations/pl.json +1 -0
  133. package/dist/utils/localization/translations/pt-BR.json +1 -0
  134. package/dist/utils/localization/translations/pt-PT.json +1 -0
  135. package/dist/utils/localization/translations/ro-RO.json +1 -0
  136. package/dist/utils/localization/translations/sk-SK.json +1 -0
  137. package/dist/utils/localization/translations/sv.json +1 -0
  138. package/dist/utils/localization/translations/th.json +1 -0
  139. package/dist/utils/localization/translations/tr.json +1 -0
  140. package/dist/utils/localization/translations/zh-Hans.json +1 -0
  141. package/dist/utils/localization/translations/zh-TW.json +1 -0
  142. package/dist/waiting/waiting.js +97 -1
  143. package/esm/absolute/absolute.js +5 -1
  144. package/esm/button/button.d.ts +2 -1
  145. package/esm/button/button.js +22 -5
  146. package/esm/checkboxListWithAction/checkboxListWithAction.d.ts +2 -0
  147. package/esm/checkboxListWithAction/checkboxListWithAction.js +1 -1
  148. package/esm/commonHelpers/ShowMoreCell.d.ts +5 -0
  149. package/esm/commonHelpers/ShowMoreCell.js +57 -0
  150. package/esm/commonHelpers/getAriaAttributes.js +6 -9
  151. package/esm/commonHelpers/getNonAriaProps.d.ts +11 -0
  152. package/esm/commonHelpers/getNonAriaProps.js +15 -0
  153. package/esm/commonHelpers/hooks/useScroll.d.ts +1 -1
  154. package/esm/commonHelpers/hooks/useScroll.js +6 -6
  155. package/esm/commonHelpers/isAriaProp.d.ts +9 -0
  156. package/esm/commonHelpers/isAriaProp.js +9 -0
  157. package/esm/commonHelpers/showMoreRow.d.ts +28 -0
  158. package/esm/commonHelpers/showMoreRow.js +22 -0
  159. package/esm/commonHelpers/tabsKeyboard.d.ts +1 -1
  160. package/esm/commonHelpers/tabsKeyboard.js +15 -1
  161. package/esm/commonStyles/colors/colorsConstant.js +11 -11
  162. package/esm/dataFeed/dataFeedColumnsItems.js +3 -1
  163. package/esm/dataGrid/columns/checkboxColumn/checkboxCell.d.ts +2 -1
  164. package/esm/dataGrid/columns/checkboxColumn/checkboxCell.js +1 -1
  165. package/esm/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.d.ts +4 -2
  166. package/esm/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.js +10 -1
  167. package/esm/dataGrid/dataGrid.d.ts +5 -1
  168. package/esm/dataGrid/dataGrid.js +38 -2
  169. package/esm/dataGrid/lazyLoadingEnd/lazyLoadingEnd.d.ts +3 -0
  170. package/esm/dataGrid/lazyLoadingEnd/lazyLoadingEnd.js +45 -0
  171. package/esm/dataGrid/row/row.js +20 -2
  172. package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +3 -1
  173. package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +39 -4
  174. package/esm/dataGrid/withSelectableRows/withSelectableRows.js +73 -12
  175. package/esm/dropdown/dropdownTrigger.d.ts +1 -1
  176. package/esm/dropdownRaw/dropdownHelper.d.ts +12 -0
  177. package/esm/dropdownRaw/dropdownHelper.js +30 -10
  178. package/esm/dropdownRaw/dropdownRaw.js +37 -9
  179. package/esm/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
  180. package/esm/dropdownRaw/dropdownSearchableTrigger.js +13 -6
  181. package/esm/dropdownRaw/dropdownTrigger.d.ts +2 -1
  182. package/esm/dropdownRaw/dropdownTrigger.js +2 -2
  183. package/esm/dropdownRaw/stateReducer/stateReducer.d.ts +8 -0
  184. package/esm/dropdownRaw/stateReducer/stateReducer.js +5 -2
  185. package/esm/dropdownRaw/types.d.ts +36 -0
  186. package/esm/filterButton/filterButton.d.ts +1 -1
  187. package/esm/formGroup/hooks/rowHooks/useLabelClasses.js +8 -2
  188. package/esm/formLayout/utils/applyLayoutPosition/applyLayoutPosition.d.ts +2 -1
  189. package/esm/formLayout/utils/applyLayoutPosition/applyLayoutPosition.js +37 -90
  190. package/esm/header/components/collapsedItemsControl/collapsedItemsControl.d.ts +1 -1
  191. package/esm/header/components/collapsedItemsControl/collapsedItemsControl.js +6 -2
  192. package/esm/header/headerButton.d.ts +3 -1
  193. package/esm/header/headerButton.js +4 -2
  194. package/esm/header/headerMenu.d.ts +2 -0
  195. package/esm/header/headerMenu.js +1 -1
  196. package/esm/index.d.ts +3 -1
  197. package/esm/index.js +3 -1
  198. package/esm/menu/components/menuButton.d.ts +3 -1
  199. package/esm/menu/components/menuButton.js +66 -47
  200. package/esm/menu/components/menuItem.js +4 -4
  201. package/esm/miniTabs/miniTabs.js +4 -2
  202. package/esm/pageHeader/pageHeaderButton.d.ts +1 -1
  203. package/esm/pageHeader/pageHeaderButton.js +4 -2
  204. package/esm/pagination/pagination.d.ts +19 -4
  205. package/esm/pagination/pagination.js +21 -1
  206. package/esm/pagination/paginationText/paginationText.d.ts +7 -1
  207. package/esm/pagination/paginationText/paginationText.js +6 -3
  208. package/esm/pillExpandable/pillContent.d.ts +3 -2
  209. package/esm/pillExpandable/pillContent.js +2 -2
  210. package/esm/pillExpandable/pillExpandable.js +20 -5
  211. package/esm/pillExpandable/pillExpandablePopoverContent.d.ts +3 -2
  212. package/esm/pillExpandable/pillExpandablePopoverContent.js +1 -1
  213. package/esm/pillExpandable/pillExpandableSimple.d.ts +3 -1
  214. package/esm/pillExpandable/pillExpandableSimple.js +20 -10
  215. package/esm/selectList/selectList.js +1 -0
  216. package/esm/selectList/selectListItem.d.ts +10 -1
  217. package/esm/selectList/selectListItem.js +12 -9
  218. package/esm/table/children/tablePagination.d.ts +1 -1
  219. package/esm/table/children/useTableChildren.d.ts +4 -2
  220. package/esm/table/children/useTableChildren.js +64 -16
  221. package/esm/table/nested/nestedData.d.ts +29 -1
  222. package/esm/table/nested/nestedData.js +44 -3
  223. package/esm/table/nested/useNestedRows.js +18 -22
  224. package/esm/table/nested/useShowMore.d.ts +41 -0
  225. package/esm/table/nested/useShowMore.js +52 -0
  226. package/esm/table/selectable/interfaces.d.ts +17 -0
  227. package/esm/table/selectable/useDragSelection.d.ts +10 -0
  228. package/esm/table/selectable/useDragSelection.js +141 -0
  229. package/esm/table/selectable/useSelectableRows.d.ts +5 -2
  230. package/esm/table/selectable/useSelectableRows.js +129 -35
  231. package/esm/table/selectable/utils/calculateSelectionState.d.ts +1 -1
  232. package/esm/table/selectable/utils/calculateSelectionState.js +43 -7
  233. package/esm/table/selectable/utils/checkRow.js +4 -2
  234. package/esm/table/selectable/utils/getCurrentPageSelection.js +9 -5
  235. package/esm/table/selectable/utils/getDragSelectionRows.d.ts +15 -0
  236. package/esm/table/selectable/utils/getDragSelectionRows.js +24 -0
  237. package/esm/table/selectable/utils/getRangeIds.d.ts +2 -0
  238. package/esm/table/selectable/utils/getRangeIds.js +17 -0
  239. package/esm/table/selectable/utils/isRowChecked.d.ts +1 -1
  240. package/esm/table/selectable/utils/isRowChecked.js +40 -7
  241. package/esm/table/table.d.ts +1 -2
  242. package/esm/table/table.js +43 -16
  243. package/esm/tabs/tabs.d.ts +1 -0
  244. package/esm/tabs/tabs.js +50 -17
  245. package/esm/textInputRaw/textInputRaw.js +3 -2
  246. package/esm/tooltip/tooltip.d.ts +2 -0
  247. package/esm/tooltip/tooltip.js +19 -7
  248. package/esm/utils/localization/translations/ar-001.json +1 -0
  249. package/esm/utils/localization/translations/bg-BG.json +1 -0
  250. package/esm/utils/localization/translations/cs.json +1 -0
  251. package/esm/utils/localization/translations/da-DK.json +1 -0
  252. package/esm/utils/localization/translations/de.json +1 -0
  253. package/esm/utils/localization/translations/el-GR.json +1 -0
  254. package/esm/utils/localization/translations/en.json +4 -0
  255. package/esm/utils/localization/translations/es.json +1 -0
  256. package/esm/utils/localization/translations/et-EE.json +1 -0
  257. package/esm/utils/localization/translations/fi-FI.json +1 -0
  258. package/esm/utils/localization/translations/fr-FR.json +1 -0
  259. package/esm/utils/localization/translations/fr.json +1 -0
  260. package/esm/utils/localization/translations/hu-HU.json +1 -0
  261. package/esm/utils/localization/translations/id.json +1 -0
  262. package/esm/utils/localization/translations/it.json +1 -0
  263. package/esm/utils/localization/translations/ja.json +1 -0
  264. package/esm/utils/localization/translations/ka-GE.json +1 -0
  265. package/esm/utils/localization/translations/ko-KR.json +1 -0
  266. package/esm/utils/localization/translations/lt-LT.json +1 -0
  267. package/esm/utils/localization/translations/lv-LV.json +1 -0
  268. package/esm/utils/localization/translations/ms.json +1 -0
  269. package/esm/utils/localization/translations/nb-NO.json +1 -0
  270. package/esm/utils/localization/translations/nl.json +1 -0
  271. package/esm/utils/localization/translations/pl.json +1 -0
  272. package/esm/utils/localization/translations/pt-BR.json +1 -0
  273. package/esm/utils/localization/translations/pt-PT.json +1 -0
  274. package/esm/utils/localization/translations/ro-RO.json +1 -0
  275. package/esm/utils/localization/translations/sk-SK.json +1 -0
  276. package/esm/utils/localization/translations/sv.json +1 -0
  277. package/esm/utils/localization/translations/th.json +1 -0
  278. package/esm/utils/localization/translations/tr.json +1 -0
  279. package/esm/utils/localization/translations/zh-Hans.json +1 -0
  280. package/esm/utils/localization/translations/zh-TW.json +1 -0
  281. package/esm/waiting/waiting.js +98 -2
  282. package/package.json +15 -3
package/README.md CHANGED
@@ -45,8 +45,40 @@ Now components are ready for usage.
45
45
 
46
46
  Zenith library provides components defined in Zenith Design System. It includes very basic blocks like colors, icons, font presets, atom components like buttons, checkboxes etc and high order components - header, table, filters bar etc. List of existing components can be found in [Storybook](https://developers.geotab.com/zenith-storybook/index.html).
47
47
 
48
+ ## Translations
49
+
50
+ Zenith has English and 32 non-English locale dictionaries, including Arabic (`ar-001`) with right-to-left support. The [translation process guide](./docs/TRANSLATIONS.md) covers adding strings, Tech Content and Localization handoffs, spreadsheet sync, build-time injection, and validation. Read it before adding or changing a user-facing string, reviewing English copy, or running the sync. Locale availability does not imply that every string has a reviewed translation.
51
+
48
52
  ## Change log
49
53
 
54
+ ### 3.17.0
55
+
56
+ - [MYG-138984](https://geotab.atlassian.net/browse/MYG-138984): Add Primary, Destructive, and TertiaryDestructive trigger variants to `Dropdown` / `FilterButton`
57
+ - [MYG-138985](https://geotab.atlassian.net/browse/MYG-138985): Add optional separators below single- and multi-select `Dropdown` items
58
+ - [MYG-138983](https://geotab.atlassian.net/browse/MYG-138983): Add destructive styling to single-select `Dropdown` items
59
+ - [MYG-105567](https://geotab.atlassian.net/browse/MYG-105567): Add `sortSelectedToTop` to float selected `Dropdown` options to the top when opened
60
+ - [MYG-147075](https://geotab.atlassian.net/browse/MYG-147075): Show full single-select `Dropdown` option labels on hover
61
+ - [MYG-147879](https://geotab.atlassian.net/browse/MYG-147879): Add loaded/total counts and an end-of-results message for desktop infinite-scroll tables; improve row-loading announcements
62
+ - [MYG-130553](https://geotab.atlassian.net/browse/MYG-130553): Add progressive loading of nested `Table` rows with a +N more control, plus the `useShowMore` hook and `DEFAULT_SHOW_MORE_CAP` export
63
+ - [MYG-148443](https://geotab.atlassian.net/browse/MYG-148443): Add seven sequential and seven diverging data-visualization color tokens
64
+ - [MYG-129023](https://geotab.atlassian.net/browse/MYG-129023): Support destructive menu items and open-in-new-page indicators, including collapsed `Header` actions
65
+ - [MYG-142469](https://geotab.atlassian.net/browse/MYG-142469): Export `PillBox`, `DEFAULT_MAX_PILLS`, `IPillData`, and `IPillBox` from the package entry point
66
+ - [MYG-139327](https://geotab.atlassian.net/browse/MYG-139327): Add mouse-drag and Shift-click range selection to `Table` and selectable `DataGrid` rows, including expanded nested rows
67
+ - [MYG-142234](https://geotab.atlassian.net/browse/MYG-142234): Add opt-in cross-page Select All exclusions when individual rows or the current-page header are unchecked
68
+ - [MYG-149449](https://geotab.atlassian.net/browse/MYG-149449): Preserve cross-page Select All and existing exclusions during drag and Shift-click range selection; correct exclusion counts, childless nested-row selection, and global selection commands; exclude loading and show-more placeholders from fully loaded selection counts
69
+ - [MYG-148015](https://geotab.atlassian.net/browse/MYG-148015): Make cross-page exclusions opt-in through `selectable.allowExclusions` while preserving the existing selection contract by default; correct selection feedback during reloads and empty-selection bulk actions
70
+ - [MYG-147924](https://geotab.atlassian.net/browse/MYG-147924): Preserve `Table` selection during append loading and refreshes
71
+ - [MYG-143552](https://geotab.atlassian.net/browse/MYG-143552): Keep `Waiting` overlays covering scrollable content, improve spinner positioning, and block keyboard interaction with sibling content while the overlay is visible
72
+ - [MYG-148751](https://geotab.atlassian.net/browse/MYG-148751): Remove special bold styling from the first `Table` / `DataGrid` column header
73
+ - [MYG-113389](https://geotab.atlassian.net/browse/MYG-113389): Reduce form label/control gaps and correct `Dropdown` form-field styling and width
74
+ - [MYG-148954](https://geotab.atlassian.net/browse/MYG-148954): Close `PillExpandable` popovers on user scrolling while ignoring browser scroll-anchoring adjustments
75
+ - [MYG-149705](https://geotab.atlassian.net/browse/MYG-149705): Fix RTL tab keyboard navigation, focus scrolling, and tab/pill/chip/accordion styling
76
+ - [MYG-145500](https://geotab.atlassian.net/browse/MYG-145500): Allow `Tabs` to associate tabs with explicitly named panels through `ariaControls`, including panels outside the default tab layout
77
+ - [MYG-148568](https://geotab.atlassian.net/browse/MYG-148568): Forward ARIA attributes to the appropriate input elements in `DropdownRaw` and `TextInputRaw`
78
+ - [MYG-150227](https://geotab.atlassian.net/browse/MYG-150227): Make `FormLayout` positioning deterministic for fractional and invalid positions
79
+ - [MYG-145929](https://geotab.atlassian.net/browse/MYG-145929): Keep disabled `Button` and related menu/header buttons keyboard-focusable while preventing activation
80
+ - [MYG-148696](https://geotab.atlassian.net/browse/MYG-148696): Improve `PillExpandable` popover focus management and accessible trigger/content relationships
81
+
50
82
  ### 3.16.0
51
83
 
52
84
  - Add `Tooltip.InlineTrigger` subcomponent for inline tooltip triggers
@@ -164,7 +196,7 @@ Zenith library provides components defined in Zenith Design System. It includes
164
196
 
165
197
  ### 3.10.0
166
198
 
167
- - Add `wrap` and `vertical` props to `ListItem`
199
+ - Add `vertical` props to `ListItem`
168
200
  - Add `data-analytics-id` prop to `Tab`, `TabItem`, and `Bookmark`
169
201
  - `Nav` component: support show/hide separator between Core and Apps sections
170
202
  - `Nav` empty state support
@@ -764,6 +796,40 @@ Upgrade today to take advantage of modern JavaScript module support and improved
764
796
  - Improve sizing of the title in Header
765
797
  - Add the property `triggerAriaLabel` to `Dropdown`
766
798
 
799
+ ### 1.14.0
800
+
801
+ - Create the Layout
802
+ - Update strings
803
+ - Add aria-label to Stepper, Range and FilterButton
804
+ - Improve accessibility of icons
805
+
806
+ ### 1.13.1
807
+
808
+ - Improve behavior of the DateRange selection
809
+ - Improve imports in Zenith
810
+ - Fix date position in PillExpandable
811
+ - Update package description, add license
812
+ - Add option to open links in new tab in PillExpandable
813
+ - Fix visual styles of MiniTabs
814
+ - Allow passing fragment as a child of the Header
815
+ - Stepper max value not working as expected
816
+ - Allow text formatting in the description of the PillExpandable
817
+ - Prevent rerendering in useMobile
818
+
819
+ ### 1.13.0
820
+
821
+ - New component Table
822
+ - Clean search input in Dropdown on close popup
823
+ - Fix tabbing through all rows in a table
824
+ - Rename "All filters" to "Filters" in FiltersBar
825
+ - Improve tooltip accessibility
826
+ - Add ecosystem icons
827
+ - Increase focus area in search input
828
+ - Fix issue with loosing seconds when changing date or time in calendar
829
+ - The new component Skeleton for loading animation
830
+ - Fix the Select component selection issue
831
+ - Update npm dependencies
832
+
767
833
  ## Feedback
768
834
 
769
835
  For any questions or feedback please email zenith@geotab.com.
@@ -0,0 +1 @@
1
+ ac687d695edcc0c6ffdc6c27e69c5729e7b02d180623c4f81049d72111f97d0d
@@ -20,6 +20,7 @@ const getScrollableParent_1 = require("../utils/getScrollableParent");
20
20
  const useClientReady_1 = require("../commonHelpers/hooks/useClientReady");
21
21
  const zen_1 = require("../utils/zen");
22
22
  const useDirection_1 = require("../utils/localization/useDirection");
23
+ const CLOSE_ON_SCROLL_EVENTS = ["wheel", "touchmove"];
23
24
  const Absolute = ({ isOpen, id, paddingX, paddingY, className, children, triggerRef, alignment, inline, onOpenChange, useTrapFocusWithTrigger = "off", shouldHoldScroll, stateFullChilds, role, ariaLabel, ariaLabelledby, alignmentsFn, recalculateOnScroll, closeOnScroll, recalculateTrigger = true, focusOnOpen = true }) => {
24
25
  const popupRef = (0, react_1.useRef)(null);
25
26
  const prevScroll = (0, react_1.useRef)(0);
@@ -67,7 +68,10 @@ const Absolute = ({ isOpen, id, paddingX, paddingY, className, children, trigger
67
68
  }, [onOpenChange]);
68
69
  (0, useResize_1.useResize)(calculatePosition, isOpen);
69
70
  (0, useScroll_1.useScroll)(calculatePosition, isOpen && !!recalculateOnScroll, parent);
70
- (0, useScroll_1.useScroll)(handleCloseOnScroll, isOpen && !!closeOnScroll, parent);
71
+ // Only "wheel"/"touchmove" are genuine user scroll gestures. The plain "scroll" event also fires for
72
+ // browser scroll-anchoring adjustments (e.g. a layout shift above the viewport pushing content down),
73
+ // which would otherwise close the popup the instant it opens.
74
+ (0, useScroll_1.useScroll)(handleCloseOnScroll, isOpen && !!closeOnScroll, parent, CLOSE_ON_SCROLL_EVENTS);
71
75
  (0, react_1.useLayoutEffect)(calculatePosition, [isOpen, children, recalculateTrigger, calculatePosition]);
72
76
  const returnFocusToTrigger = (0, react_1.useCallback)(() => {
73
77
  if (!triggerRef.current) {
@@ -9,6 +9,7 @@ export interface IButton extends IZenComponentProps, IZenGridItem {
9
9
  title?: string;
10
10
  type?: TButton;
11
11
  disabled?: boolean;
12
+ focusableWhenDisabled?: boolean;
12
13
  onClick?: React.MouseEventHandler;
13
14
  onBlur?: React.FocusEventHandler;
14
15
  onMouseOver?: (e: React.MouseEvent<HTMLElement>) => void;
@@ -27,6 +28,6 @@ export interface IButton extends IZenComponentProps, IZenGridItem {
27
28
  dataAnalyticsId?: string;
28
29
  }
29
30
  export declare const Button: {
30
- ({ className, type, disabled, id, title, onClick, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onKeyDown, onKeyUp, children, link, target, htmlType, rel, ref, name, onBlur, role, ariaLabel, dataAnalyticsId, ...other }: IButton): import("react/jsx-runtime").JSX.Element;
31
+ ({ className, type, disabled, focusableWhenDisabled, id, title, onClick, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onKeyDown, onKeyUp, children, link, target, htmlType, rel, ref, name, onBlur, role, ariaLabel, dataAnalyticsId, ...other }: IButton): import("react/jsx-runtime").JSX.Element;
31
32
  displayName: string;
32
33
  };
@@ -18,19 +18,36 @@ const classNames_1 = require("../commonHelpers/classNames/classNames");
18
18
  const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
19
19
  const filterGridProps_1 = require("../gridLayout/utils/filterGridProps");
20
20
  const useMobileClassName_1 = require("../utils/theme/useMobileClassName");
21
- const Button = (_a) => {
22
- var { className, type, disabled, id, title, onClick, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onKeyDown, onKeyUp, children, link, target, htmlType, rel, ref, name, onBlur, role, ariaLabel, dataAnalyticsId } = _a, other = __rest(_a, ["className", "type", "disabled", "id", "title", "onClick", "onMouseOver", "onMouseOut", "onMouseDown", "onMouseUp", "onKeyDown", "onKeyUp", "children", "link", "target", "htmlType", "rel", "ref", "name", "onBlur", "role", "ariaLabel", "dataAnalyticsId"]);
21
+ const blockActivation = (event) => {
22
+ event.preventDefault();
23
+ event.stopPropagation();
24
+ };
25
+ // Guards on `disabled` alone, not just `focusableWhenDisabled`, so clicks are blocked in JS regardless of
26
+ // CSS. `onKeyDown`/`onKeyUp` stay unguarded — Tooltip needs them.
27
+ const getDisabledGuardedHandlers = (disabled, isFocusableWhenDisabled, onClick, onMouseDown, onMouseUp) => ({
28
+ onClick: disabled ? blockActivation : onClick,
29
+ onMouseDown: isFocusableWhenDisabled ? blockActivation : onMouseDown,
30
+ onMouseUp: isFocusableWhenDisabled ? blockActivation : onMouseUp
31
+ });
32
+ const getButtonClassName = (type, disabled, isFocusableWhenDisabled, mobileOrDriveClasses, className) => {
23
33
  const modifierClassName = type && type !== buttonType_1.ButtonType.Secondary ? `zen-button--${type}` : "";
24
34
  const disabledClassName = disabled ? "zen-button--disabled" : "";
35
+ const disabledFocusableClassName = isFocusableWhenDisabled ? "zen-button--disabled-focusable" : "";
36
+ return (0, classNames_1.classNames)(["zen-button", mobileOrDriveClasses, modifierClassName, disabledClassName, disabledFocusableClassName, className !== null && className !== void 0 ? className : ""]);
37
+ };
38
+ const Button = (_a) => {
39
+ var { className, type, disabled, focusableWhenDisabled, id, title, onClick, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onKeyDown, onKeyUp, children, link, target, htmlType, rel, ref, name, onBlur, role, ariaLabel, dataAnalyticsId } = _a, other = __rest(_a, ["className", "type", "disabled", "focusableWhenDisabled", "id", "title", "onClick", "onMouseOver", "onMouseOut", "onMouseDown", "onMouseUp", "onKeyDown", "onKeyUp", "children", "link", "target", "htmlType", "rel", "ref", "name", "onBlur", "role", "ariaLabel", "dataAnalyticsId"]);
40
+ const isFocusableWhenDisabled = Boolean(disabled) && Boolean(focusableWhenDisabled);
25
41
  const driveClasses = (0, useDriveClassName_1.useDriveClassName)("zen-button");
26
42
  const ariaLabelValue = ariaLabel || title;
27
43
  const mobileClasses = (0, useMobileClassName_1.useMobileClassName)("zen-button");
28
44
  const commonArgs = Object.assign(Object.assign(Object.assign({ id,
29
- title }, (ariaLabelValue ? { "aria-label": ariaLabelValue } : {})), (dataAnalyticsId ? { "data-analytics-id": dataAnalyticsId } : {})), { className: (0, classNames_1.classNames)(["zen-button", mobileClasses || driveClasses || "", modifierClassName, disabledClassName, className !== null && className !== void 0 ? className : ""]) });
45
+ title }, (ariaLabelValue ? { "aria-label": ariaLabelValue } : {})), (dataAnalyticsId ? { "data-analytics-id": dataAnalyticsId } : {})), { className: getButtonClassName(type, disabled, isFocusableWhenDisabled, mobileClasses || driveClasses || "", className) });
46
+ const { onClick: onClickWithDisabledGuard, onMouseDown: onMouseDownWithDisabledGuard, onMouseUp: onMouseUpWithDisabledGuard } = getDisabledGuardedHandlers(disabled, isFocusableWhenDisabled, onClick, onMouseDown, onMouseUp);
30
47
  if (link) {
31
- return ((0, jsx_runtime_1.jsx)("a", Object.assign({ role: "link", rel: rel, target: target, href: disabled ? undefined : link, "aria-disabled": disabled, onKeyDown: onKeyDown, onKeyUp: onKeyUp, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onClick: onClick }, commonArgs, (0, filterGridProps_1.filterGridProps)(other), { children: children })));
48
+ return ((0, jsx_runtime_1.jsx)("a", Object.assign({ role: "link", rel: rel, target: target, href: disabled ? undefined : link, tabIndex: isFocusableWhenDisabled ? 0 : undefined, "aria-disabled": disabled ? true : undefined, onKeyDown: onKeyDown, onKeyUp: onKeyUp, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onClick: onClickWithDisabledGuard }, commonArgs, (0, filterGridProps_1.filterGridProps)(other), { children: children })));
32
49
  }
33
- return ((0, jsx_runtime_1.jsx)("button", Object.assign({ name: name, onBlur: onBlur, onClick: onClick, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onMouseDown: onMouseDown, onMouseUp: onMouseUp, onKeyDown: onKeyDown, onKeyUp: onKeyUp, ref: ref, type: htmlType, disabled: disabled, role: role }, commonArgs, (0, filterGridProps_1.filterGridProps)(other), { children: children })));
50
+ return ((0, jsx_runtime_1.jsx)("button", Object.assign({ name: name, onBlur: onBlur, onClick: onClickWithDisabledGuard, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onMouseDown: onMouseDownWithDisabledGuard, onMouseUp: onMouseUpWithDisabledGuard, onKeyDown: onKeyDown, onKeyUp: onKeyUp, ref: ref, type: htmlType, disabled: isFocusableWhenDisabled ? undefined : disabled, "aria-disabled": isFocusableWhenDisabled ? true : undefined, role: role }, commonArgs, (0, filterGridProps_1.filterGridProps)(other), { children: children })));
34
51
  };
35
52
  exports.Button = Button;
36
53
  exports.Button.displayName = "Button";
@@ -11,6 +11,8 @@ export interface ICheckboxListWithActionOption {
11
11
  isWithAction: boolean;
12
12
  countSelectedChild?: number;
13
13
  color?: IColor;
14
+ /** When true, renders a 1px separator line below this item. */
15
+ divider?: boolean;
14
16
  }
15
17
  export interface IChangeCheckbox {
16
18
  id: string;
@@ -443,7 +443,7 @@ const CheckboxListWithAction = ({
443
443
  const labelForRender = selectSearchTerm(opt.label);
444
444
  const labelElement = renderLabel(opt, labelForRender, titleForRender, ind);
445
445
  return (0, jsx_runtime_1.jsxs)("li", {
446
- className: (0, classNames_1.classNames)(["zen-checkbox-list-with-action__action-item", opt.isWithAction ? "zen-checkbox-list-with-action__action-item--action" : ""]),
446
+ className: (0, classNames_1.classNames)(["zen-checkbox-list-with-action__action-item", opt.isWithAction ? "zen-checkbox-list-with-action__action-item--action" : "", opt.divider && ind < optionsArr.length - 1 ? "zen-checkbox-list-with-action__action-item--divider" : ""]),
447
447
  "data-item": opt.property,
448
448
  children: [(0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, {
449
449
  id: `${checkboxId}${opt.property}`,
@@ -0,0 +1,5 @@
1
+ import { IShowMoreRow } from "./showMoreRow";
2
+ import "./showMoreRow.less";
3
+ export declare const ShowMoreCell: ({ row }: {
4
+ row: IShowMoreRow;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ const {
4
+ injectString
5
+ } = require("../utils/localization/translationsDictionary");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.ShowMoreCell = void 0;
10
+ const jsx_runtime_1 = require("react/jsx-runtime");
11
+ const useLanguage_1 = require("../utils/localization/useLanguage");
12
+ injectString("cs", "+{0} more", "+{0} dal\u0161\xED");
13
+ injectString("da-DK", "+{0} more", "+{0} mere");
14
+ injectString("de", "+{0} more", "+{0} weitere");
15
+ injectString("en", "+{0} more", "+{0} more");
16
+ injectString("es", "+{0} more", "+{0} m\xE1s");
17
+ injectString("fi-FI", "+{0} more", "+{0} lis\xE4\xE4");
18
+ injectString("fr", "+{0} more", "+{0} autres");
19
+ injectString("fr-FR", "+{0} more", "+{0} autres");
20
+ injectString("hu-HU", "+{0} more", "+{0} t\xF6bb");
21
+ injectString("id", "+{0} more", "+{0} lebih");
22
+ injectString("it", "+{0} more", "+{0} in pi\xF9");
23
+ injectString("ja", "+{0} more", "\u3055\u3089\u306B {0} \u500B");
24
+ injectString("ko-KR", "+{0} more", "+{0} \uB354\uBCF4\uAE30");
25
+ injectString("ms", "+{0} more", "+{0} lagi");
26
+ injectString("nb-NO", "+{0} more", "+{0} mer");
27
+ injectString("nl", "+{0} more", "+{0} meer");
28
+ injectString("pl", "+{0} more", "Jeszcze {0}");
29
+ injectString("pt-BR", "+{0} more", "+{0} mais");
30
+ injectString("pt-PT", "+{0} more", "+{0} mais");
31
+ injectString("sk-SK", "+{0} more", "+{0} viac");
32
+ injectString("sv", "+{0} more", "+{0} mer");
33
+ injectString("th", "+{0} more", "+{0} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21");
34
+ injectString("tr", "+{0} more", "+{0} daha");
35
+ injectString("zh-Hans", "+{0} more", "+{0}\u66F4\u591A");
36
+ injectString("zh-TW", "+{0} more", "\u9084\u6709 +{0} \u500B");
37
+ injectString("ro-RO", "+{0} more", "\xCEnc\u0103 {0}");
38
+ injectString("ar-001", "+{0} more", "+{0} \u0623\u062E\u0631\u0649");
39
+ injectString("lt-LT", "+{0} more", "+{0} daugiau");
40
+ injectString("lv-LV", "+{0} more", "+{0} v\u0113l");
41
+ injectString("ka-GE", "+{0} more", "+{0} \u10DB\u10D4\u10E2\u10D8");
42
+ injectString("el-GR", "+{0} more", "+{0} \u03B1\u03BA\u03CC\u03BC\u03B1");
43
+ injectString("et-EE", "+{0} more", "+{0} veel");
44
+ injectString("bg-BG", "+{0} more", "+ \u043E\u0449\u0435 {0}");
45
+ const ShowMoreCell = ({
46
+ row
47
+ }) => {
48
+ const {
49
+ translate
50
+ } = (0, useLanguage_1.useLanguage)();
51
+ const content = row.label ? row.label(row.remaining) : translate("+{0} more").replace("{0}", String(row.remaining));
52
+ if (row.href) {
53
+ return (0, jsx_runtime_1.jsx)("a", {
54
+ className: "zen-show-more__link",
55
+ href: row.href,
56
+ children: content
57
+ });
58
+ }
59
+ return (0, jsx_runtime_1.jsx)("button", {
60
+ type: "button",
61
+ className: "zen-show-more__link",
62
+ onClick: row.onActivate,
63
+ children: content
64
+ });
65
+ };
66
+ exports.ShowMoreCell = ShowMoreCell;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAriaAttributes = void 0;
4
+ const isAriaProp_1 = require("./isAriaProp");
4
5
  const camelToKebab = (str) => str.replace(/[A-Z]/g, letter => `-${letter.toLowerCase()}`);
5
6
  const getAriaAttributes = (props) => {
6
7
  if (!props) {
@@ -8,16 +9,12 @@ const getAriaAttributes = (props) => {
8
9
  }
9
10
  const ariaAttributes = {};
10
11
  for (const [key, value] of Object.entries(props)) {
11
- // Handle hyphenated aria attributes (aria-*)
12
- if (key.startsWith("aria-")) {
13
- ariaAttributes[key] = value;
14
- }
15
- // Handle camelCase aria attributes (ariaDescribedby, ariaLabel, etc.)
16
- // Convert to hyphenated format (aria-describedby, aria-label, etc.)
17
- else if (key.startsWith("aria") && key.length > 4 && key[4] === key[4].toUpperCase()) {
18
- const hyphenated = camelToKebab(key);
19
- ariaAttributes[hyphenated] = value;
12
+ if (!(0, isAriaProp_1.isAriaProp)(key)) {
13
+ continue;
20
14
  }
15
+ // Hyphenated keys (aria-*) pass through; camelCase keys (ariaDescribedby, ariaLabel, etc.)
16
+ // are converted to the hyphenated form the DOM expects.
17
+ ariaAttributes[key.startsWith("aria-") ? key : camelToKebab(key)] = value;
21
18
  }
22
19
  return ariaAttributes;
23
20
  };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The complement of `getAriaAttributes`: every prop that is *not* an aria attribute, returned
3
+ * under its original key and value.
4
+ *
5
+ * Use the two together when a component has to send its aria attributes to a different element
6
+ * than the rest of its props. Both sides test membership with `isAriaProp`, so no prop can fall
7
+ * between them and be dropped by both.
8
+ */
9
+ export declare const getNonAriaProps: (props?: object) => {
10
+ [k: string]: any;
11
+ };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getNonAriaProps = void 0;
4
+ const isAriaProp_1 = require("./isAriaProp");
5
+ /**
6
+ * The complement of `getAriaAttributes`: every prop that is *not* an aria attribute, returned
7
+ * under its original key and value.
8
+ *
9
+ * Use the two together when a component has to send its aria attributes to a different element
10
+ * than the rest of its props. Both sides test membership with `isAriaProp`, so no prop can fall
11
+ * between them and be dropped by both.
12
+ */
13
+ const getNonAriaProps = (props) => {
14
+ if (!props) {
15
+ return {};
16
+ }
17
+ return Object.fromEntries(Object.entries(props).filter(([key]) => !(0, isAriaProp_1.isAriaProp)(key)));
18
+ };
19
+ exports.getNonAriaProps = getNonAriaProps;
@@ -1 +1 @@
1
- export declare const useScroll: (callback: () => void, active: boolean, triggerRef?: Element | null) => void;
1
+ export declare const useScroll: (callback: () => void, active: boolean, triggerRef?: Element | null, events?: readonly string[]) => void;
@@ -3,20 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useScroll = void 0;
4
4
  const react_1 = require("react");
5
5
  const zen_1 = require("../../utils/zen");
6
- const useScroll = (callback, active, triggerRef) => {
6
+ const DEFAULT_EVENTS = ["scroll", "wheel"];
7
+ const useScroll = (callback, active, triggerRef, events) => {
7
8
  var _a;
8
9
  if (triggerRef === void 0) { triggerRef = (_a = zen_1.zen.document) === null || _a === void 0 ? void 0 : _a.body; }
10
+ if (events === void 0) { events = DEFAULT_EVENTS; }
9
11
  (0, react_1.useEffect)(() => {
10
12
  if (!active || triggerRef === null) {
11
13
  return;
12
14
  }
13
- triggerRef.addEventListener("scroll", callback);
14
- triggerRef.addEventListener("wheel", callback);
15
+ events.forEach(event => triggerRef.addEventListener(event, callback));
15
16
  // eslint-disable-next-line consistent-return
16
17
  return () => {
17
- triggerRef.removeEventListener("scroll", callback);
18
- triggerRef.removeEventListener("wheel", callback);
18
+ events.forEach(event => triggerRef.removeEventListener(event, callback));
19
19
  };
20
- }, [callback, active, triggerRef]);
20
+ }, [callback, active, triggerRef, events]);
21
21
  };
22
22
  exports.useScroll = useScroll;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Whether a prop key is an aria attribute, in either the hyphenated (`aria-label`) or the
3
+ * camelCase (`ariaLabel`) spelling.
4
+ *
5
+ * Pair it with `getAriaAttributes` when a component has to split a rest-props object: the helper
6
+ * collects the aria half, this predicate identifies the half it leaves behind. Sharing one rule
7
+ * keeps the two halves from disagreeing and silently dropping a prop.
8
+ */
9
+ export declare const isAriaProp: (key: string) => boolean;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isAriaProp = void 0;
4
+ /**
5
+ * Whether a prop key is an aria attribute, in either the hyphenated (`aria-label`) or the
6
+ * camelCase (`ariaLabel`) spelling.
7
+ *
8
+ * Pair it with `getAriaAttributes` when a component has to split a rest-props object: the helper
9
+ * collects the aria half, this predicate identifies the half it leaves behind. Sharing one rule
10
+ * keeps the two halves from disagreeing and silently dropping a prop.
11
+ */
12
+ const isAriaProp = (key) => key.startsWith("aria-") || (key.startsWith("aria") && key.length > 4 && key[4] === key[4].toUpperCase());
13
+ exports.isAriaProp = isAriaProp;
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from "react";
2
+ import { IEntityWithId } from "./entity";
3
+ export declare const SHOW_MORE_KIND = "showMore";
4
+ export type IShowMoreActivation = {
5
+ onActivate: () => void;
6
+ href?: never;
7
+ } | {
8
+ href: string;
9
+ onActivate?: never;
10
+ };
11
+ export type IShowMoreRow = IEntityWithId & {
12
+ __zenMoreRowsType: typeof SHOW_MORE_KIND;
13
+ remaining: number;
14
+ parentId: string;
15
+ label?: (remaining: number) => ReactNode;
16
+ } & IShowMoreActivation;
17
+ export declare const isShowMoreRow: (entity: IEntityWithId) => entity is IShowMoreRow;
18
+ export declare const createShowMoreRow: (params: {
19
+ parentId: string;
20
+ remaining: number;
21
+ label?: (remaining: number) => ReactNode;
22
+ } & IShowMoreActivation) => IShowMoreRow;
23
+ export declare const withFullChildren: <T extends {
24
+ children?: unknown[];
25
+ }>(entity: T, fullChildren: readonly unknown[]) => T;
26
+ export declare const getChildrenForSelection: <N extends IEntityWithId>(entity: {
27
+ children?: N[];
28
+ }) => N[] | undefined;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getChildrenForSelection = exports.withFullChildren = exports.createShowMoreRow = exports.isShowMoreRow = exports.SHOW_MORE_KIND = void 0;
4
+ exports.SHOW_MORE_KIND = "showMore";
5
+ const isShowMoreRow = (entity) =>
6
+ // eslint-disable-next-line @typescript-eslint/naming-convention, no-underscore-dangle
7
+ entity.__zenMoreRowsType === exports.SHOW_MORE_KIND;
8
+ exports.isShowMoreRow = isShowMoreRow;
9
+ const createShowMoreRow = (params) => {
10
+ const base = {
11
+ id: `__zen-show-more__${params.parentId}`,
12
+ __zenMoreRowsType: exports.SHOW_MORE_KIND,
13
+ remaining: params.remaining,
14
+ parentId: params.parentId,
15
+ label: params.label
16
+ };
17
+ if ("href" in params && params.href !== undefined) {
18
+ return Object.assign(Object.assign({}, base), { href: params.href });
19
+ }
20
+ return Object.assign(Object.assign({}, base), { onActivate: params.onActivate });
21
+ };
22
+ exports.createShowMoreRow = createShowMoreRow;
23
+ // `children` is sliced down for rendering, so the un-capped list is stashed here to keep
24
+ // selection operating on every real child.
25
+ const FULL_CHILDREN_KEY = "__zenFullChildren";
26
+ const withFullChildren = (entity, fullChildren) => (Object.assign(Object.assign({}, entity), { [FULL_CHILDREN_KEY]: fullChildren }));
27
+ exports.withFullChildren = withFullChildren;
28
+ const getChildrenForSelection = (entity) => { var _a; return (_a = entity[FULL_CHILDREN_KEY]) !== null && _a !== void 0 ? _a : entity.children; };
29
+ exports.getChildrenForSelection = getChildrenForSelection;
@@ -1,3 +1,3 @@
1
1
  import { IEntityWithId } from "./entity";
2
- export declare const tabsKeyboardHandler: (e: React.KeyboardEvent, tabsArr: IEntityWithId[], activeId: string) => string | null;
2
+ export declare const tabsKeyboardHandler: (e: React.KeyboardEvent, tabsArr: IEntityWithId[], activeId: string, isRTL?: boolean) => string | null;
3
3
  export declare const tabsKeyboardTabHandler: (e: React.KeyboardEvent, tabsArr: IEntityWithId[], activeElement: HTMLElement) => string | undefined;
@@ -1,10 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.tabsKeyboardTabHandler = exports.tabsKeyboardHandler = void 0;
4
- const tabsKeyboardHandler = (e, tabsArr, activeId) => {
4
+ const tabsKeyboardHandler = (e, tabsArr, activeId, isRTL = false) => {
5
5
  const getCurrentIndex = () => tabsArr.findIndex(el => el.id === activeId);
6
6
  switch (e.key) {
7
7
  case "ArrowLeft": {
8
+ e.preventDefault();
9
+ if (isRTL) {
10
+ const currentIndex = getCurrentIndex();
11
+ const nextPaneIndex = currentIndex > -1 ? currentIndex + 1 : undefined;
12
+ const newPaneId = nextPaneIndex !== undefined && nextPaneIndex < tabsArr.length ? tabsArr[nextPaneIndex].id : tabsArr[0].id;
13
+ return newPaneId;
14
+ }
8
15
  const currentIndex = getCurrentIndex();
9
16
  const prevPaneIndex = currentIndex > -1 ? currentIndex - 1 : undefined;
10
17
  const newPaneId = prevPaneIndex !== undefined && prevPaneIndex > -1 ? tabsArr[prevPaneIndex].id : tabsArr[tabsArr.length - 1].id;
@@ -15,6 +22,13 @@ const tabsKeyboardHandler = (e, tabsArr, activeId) => {
15
22
  return tabsArr[0].id;
16
23
  }
17
24
  case "ArrowRight": {
25
+ e.preventDefault();
26
+ if (isRTL) {
27
+ const currentIndex = getCurrentIndex();
28
+ const prevPaneIndex = currentIndex > -1 ? currentIndex - 1 : undefined;
29
+ const newPaneId = prevPaneIndex !== undefined && prevPaneIndex > -1 ? tabsArr[prevPaneIndex].id : tabsArr[tabsArr.length - 1].id;
30
+ return newPaneId;
31
+ }
18
32
  const currentIndex = getCurrentIndex();
19
33
  const nextPaneIndex = currentIndex > -1 ? currentIndex + 1 : undefined;
20
34
  const newPaneId = nextPaneIndex !== undefined && nextPaneIndex < tabsArr.length ? tabsArr[nextPaneIndex].id : tabsArr[0].id;
@@ -82,6 +82,24 @@
82
82
  --data--categorical-yellow: #f5bd60;
83
83
  --data--categorical-red: #e56a6a;
84
84
  --data--categorical-grey: #8a94a2;
85
+
86
+ // data visualization - sequential
87
+ --data--sequential-1: #8cb6f9;
88
+ --data--sequential-2: #6ca1f8;
89
+ --data--sequential-3: #428aff;
90
+ --data--sequential-4: #2e76ea;
91
+ --data--sequential-5: #1862d5;
92
+ --data--sequential-6: #0d51b7;
93
+ --data--sequential-7: #084197;
94
+
95
+ // data visualization - diverging
96
+ --data--diverging-1: #782c0e;
97
+ --data--diverging-2: #cb591f;
98
+ --data--diverging-3: #f98c41;
99
+ --data--diverging-4: #f5bd60;
100
+ --data--diverging-5: #428aff;
101
+ --data--diverging-6: #1862d5;
102
+ --data--diverging-7: #084197;
85
103
  }
86
104
 
87
105
  .zen-dark {
@@ -9,6 +9,8 @@ const dataFeedCell_1 = require("./dataFeedCell/dataFeedCell");
9
9
  const actionsMenu_1 = require("../table/actions/actionsMenu");
10
10
  const useVisibleColumns_1 = require("./hooks/useVisibleColumns");
11
11
  const menu_1 = require("../menu/menu");
12
+ const showMoreRow_1 = require("../commonHelpers/showMoreRow");
13
+ const ShowMoreCell_1 = require("../commonHelpers/ShowMoreCell");
12
14
  const getIconFromColumnComponent = (column, entity, isNested) => {
13
15
  const renderIcon = "renderIcon" in column.columnComponent ? column.columnComponent.renderIcon : undefined;
14
16
  if (renderIcon) {
@@ -129,7 +131,7 @@ const FeedItemInner = ({ columnsList, feedWrappers, expanded, collapsedColumnsQt
129
131
  entity,
130
132
  onClick
131
133
  ]);
132
- const nestedCells = (0, react_1.useMemo)(() => (entity.children && isRowExpanded ? entity.children : []).map(nestedEntity => renderCells(nestedEntity)), [entity.children, isRowExpanded, renderCells]);
134
+ const nestedCells = (0, react_1.useMemo)(() => (entity.children && isRowExpanded ? entity.children : []).map(nestedEntity => (0, showMoreRow_1.isShowMoreRow)(nestedEntity) ? (0, jsx_runtime_1.jsx)(ShowMoreCell_1.ShowMoreCell, { row: nestedEntity }, nestedEntity.id) : renderCells(nestedEntity)), [entity.children, isRowExpanded, renderCells]);
133
135
  const cells = (0, react_1.useMemo)(() => renderCells(entity, nestedCells), [entity, nestedCells, renderCells]);
134
136
  return cells;
135
137
  };
@@ -1,4 +1,4 @@
1
- import { FC, PropsWithChildren, ReactElement } from "react";
1
+ import { FC, MouseEvent as ReactMouseEvent, PropsWithChildren, ReactElement } from "react";
2
2
  import { IZenIdComponentProps } from "../../../commonHelpers/zenComponent";
3
3
  import "./checkboxColumn.less";
4
4
  interface ICheckboxCellProps extends IZenIdComponentProps {
@@ -8,6 +8,7 @@ interface ICheckboxCellProps extends IZenIdComponentProps {
8
8
  disabled?: boolean;
9
9
  children?: ReactElement<typeof CheckboxCell.Content>;
10
10
  onChange?: (id: string, checked: boolean) => void;
11
+ onMouseDown?: (id: string, checked: boolean, e: ReactMouseEvent) => void;
11
12
  }
12
13
  interface ICheckboxCell extends FC<ICheckboxCellProps> {
13
14
  Content: FC<PropsWithChildren>;
@@ -4,7 +4,7 @@ exports.CheckboxCell = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const checkbox_1 = require("../../../checkbox/checkbox");
6
6
  const classNames_1 = require("../../../commonHelpers/classNames/classNames");
7
- const CheckboxCell = ({ id, checked, indeterminate, label, disabled, className, onChange, children }) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-checkbox-column", className || ""]), children: [(0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { className: "zen-checkbox-column__checkbox", checked: checked, indeterminate: indeterminate, disabled: disabled, title: label, onChange: e => onChange && onChange(id, e.target.checked), wrapped: true }), children] }));
7
+ const CheckboxCell = ({ id, checked, indeterminate, label, disabled, className, onChange, onMouseDown, children }) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-checkbox-column", className || ""]), onMouseDown: onMouseDown ? e => onMouseDown(id, checked, e) : undefined, children: [(0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { className: "zen-checkbox-column__checkbox", checked: checked, indeterminate: indeterminate, disabled: disabled, title: label, onChange: e => onChange && onChange(id, e.target.checked), wrapped: true }), children] }));
8
8
  exports.CheckboxCell = CheckboxCell;
9
9
  exports.CheckboxCell.Content = function content({ children }) {
10
10
  return (0, jsx_runtime_1.jsx)("div", { className: "zen-checkbox-column__content", children: children });
@@ -1,4 +1,4 @@
1
- import { ReactNode, RefObject } from "react";
1
+ import { MouseEvent as ReactMouseEvent, ReactNode, RefObject } from "react";
2
2
  import { IListColumnWrapper } from "../../listColumn";
3
3
  import "./checkboxColumn.less";
4
4
  import { SimpleEventHandler } from "../../../commonHelpers/simpleEventHandler";
@@ -17,7 +17,8 @@ export interface ICheckboxColumnWrapper<T extends object> extends IListColumnWra
17
17
  attach(event: "toggle", handler: (state: [Event, HTMLButtonElement]) => void): this;
18
18
  attach(event: "change", handler: (state: [string, boolean]) => void): this;
19
19
  attach(event: "change-all", handler: (state: [boolean]) => void): this;
20
- detach(event: "change" | "toggle" | "change-all", handler?: (state: unknown) => void): this;
20
+ attach(event: "mousedown", handler: (state: [string, boolean, ReactMouseEvent]) => void): this;
21
+ detach(event: "change" | "toggle" | "change-all" | "mousedown", handler?: (state: unknown) => void): this;
21
22
  }
22
23
  export declare enum SelectionState {
23
24
  All = 0,
@@ -34,6 +35,7 @@ export declare class CheckboxColumnWrapper<T extends IEntityWithId> extends Simp
34
35
  private state;
35
36
  private readonly actionsClickHandler;
36
37
  private readonly changeHandler;
38
+ private readonly mouseDownHandler;
37
39
  private readonly changeHandlerAll;
38
40
  constructor(selections: Set<string>, options: ICheckboxColumnOptions<T>, menuTriggerRef: RefObject<HTMLButtonElement | null>);
39
41
  get selectionState(): SelectionState;
@@ -67,6 +67,15 @@ class CheckboxColumnWrapper extends simpleEventHandler_1.SimpleEventHandler {
67
67
  this.fire("change", [id, checked]);
68
68
  }
69
69
  });
70
+ // Only fired for enabled checkboxes, so a disabled row can never become a drag anchor.
71
+ Object.defineProperty(this, "mouseDownHandler", {
72
+ enumerable: true,
73
+ configurable: true,
74
+ writable: true,
75
+ value: (id, checked, e) => {
76
+ this.fire("mousedown", [id, checked, e]);
77
+ }
78
+ });
70
79
  Object.defineProperty(this, "changeHandlerAll", {
71
80
  enumerable: true,
72
81
  configurable: true,
@@ -92,7 +101,7 @@ class CheckboxColumnWrapper extends simpleEventHandler_1.SimpleEventHandler {
92
101
  }
93
102
  const allowed = this.condition(entity);
94
103
  const isDisable = this.disabled ? this.disabled(entity) : this.state === SelectionState.All;
95
- const cell = ((0, jsx_runtime_1.jsx)(checkboxCell_1.CheckboxCell, { id: entity.id, className: allowed ? "" : "zen-checkbox-column--no-checkbox", checked: this.state === SelectionState.All || this.selections.has(entity.id), indeterminate: false, disabled: isDisable, label: this.options.createTitle(entity), onChange: this.changeHandler, children: (0, jsx_runtime_1.jsx)(checkboxCell_1.CheckboxCell.Content, { children: value }) }));
104
+ const cell = ((0, jsx_runtime_1.jsx)(checkboxCell_1.CheckboxCell, { id: entity.id, className: allowed ? "" : "zen-checkbox-column--no-checkbox", checked: this.state === SelectionState.All || this.selections.has(entity.id), indeterminate: false, disabled: isDisable, label: this.options.createTitle(entity), onChange: this.changeHandler, onMouseDown: isDisable ? undefined : this.mouseDownHandler, children: (0, jsx_runtime_1.jsx)(checkboxCell_1.CheckboxCell.Content, { children: value }) }));
96
105
  return cell;
97
106
  }
98
107
  renderHeader(title) {