@geotab/zenith 3.9.1 → 3.9.2-nightly.20260529.308557e

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 (332) hide show
  1. package/README.md +4 -0
  2. package/dist/absolute/absolute.d.ts +7 -1
  3. package/dist/absolute/absolute.js +8 -4
  4. package/dist/alertRaw/alertRaw.js +4 -4
  5. package/dist/alertRaw/components/alertAnimation.js +2 -2
  6. package/dist/banner/bannerMultipLine.js +4 -4
  7. package/dist/banner/bannerSingleLine.js +4 -4
  8. package/dist/betaPill/betaPill.d.ts +18 -2
  9. package/dist/betaPill/betaPill.js +11 -8
  10. package/dist/bookmark/bookmark.d.ts +2 -1
  11. package/dist/bookmark/bookmark.js +4 -2
  12. package/dist/calendar/calendar.js +7 -4
  13. package/dist/card/card.d.ts +2 -1
  14. package/dist/card/card.js +4 -2
  15. package/dist/card/components/cardButton/cardButton.d.ts +2 -1
  16. package/dist/card/components/cardButton/cardButton.js +3 -3
  17. package/dist/card/components/title.d.ts +3 -1
  18. package/dist/card/components/title.js +9 -4
  19. package/dist/card/components/titleLink.js +5 -2
  20. package/dist/checkbox/checkbox.js +2 -2
  21. package/dist/checkboxListWithAction/checkboxListWithAction.js +6 -2
  22. package/dist/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +4 -1
  23. package/dist/commonStyles/pillStyles/pillContent.less +9 -9
  24. package/dist/commonStyles/pillStyles/pillStyles.less +2 -2
  25. package/dist/commonStyles/rangeFieldMixin.less +9 -9
  26. package/dist/controlledPopup/controlledPopup.d.ts +3 -1
  27. package/dist/controlledPopup/controlledPopup.js +4 -2
  28. package/dist/dataFeed/hooks/useVisibleColumns.js +1 -1
  29. package/dist/dataGrid/cell/cell.d.ts +2 -1
  30. package/dist/dataGrid/cell/cell.js +2 -2
  31. package/dist/dataGrid/dataGrid.js +6 -4
  32. package/dist/dataGrid/extensions/toBasicColumn.js +2 -1
  33. package/dist/dataGrid/listColumn.d.ts +3 -0
  34. package/dist/dataGrid/row/row.js +11 -7
  35. package/dist/dataGrid/withFlexibleColumns/components/columnSettingsList.d.ts +2 -2
  36. package/dist/dataGrid/withFlexibleColumns/components/columnSettingsList.js +7 -6
  37. package/dist/dataGrid/withFlexibleColumns/withFlexibleColumns.js +15 -6
  38. package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +4 -0
  39. package/dist/dateRangeInner/dateRangeInner.js +5 -2
  40. package/dist/dateRangeRaw/dateRangeRaw.js +5 -2
  41. package/dist/dateRangeRaw/utils/parseLabel.js +1 -1
  42. package/dist/dialog/dialogContent.js +4 -4
  43. package/dist/dropdown/dropdown.js +1 -1
  44. package/dist/dropdownRaw/dropdownHelper.d.ts +4 -1
  45. package/dist/dropdownRaw/dropdownHelper.js +2 -1
  46. package/dist/dropdownRaw/dropdownList.d.ts +4 -2
  47. package/dist/dropdownRaw/dropdownList.js +15 -36
  48. package/dist/dropdownRaw/dropdownRaw.js +23 -31
  49. package/dist/dropdownRaw/dropdownTrigger.d.ts +1 -1
  50. package/dist/dropdownRaw/dropdownTrigger.js +1 -1
  51. package/dist/dropdownRaw/stateReducer/stateReducer.d.ts +1 -0
  52. package/dist/dropdownRaw/stateReducer/stateReducer.js +13 -14
  53. package/dist/dropdownRaw/stateReducer/stateReducerHelper.d.ts +1 -2
  54. package/dist/dropdownRaw/stateReducer/stateReducerHelper.js +5 -12
  55. package/dist/fileUpload/components/uploadedFilesSection.js +3 -3
  56. package/dist/filters/components/filtersSavedChipComponent.js +3 -3
  57. package/dist/filters/components/filtersSearchItemData.js +3 -3
  58. package/dist/filters/components/filtersSearchList.js +4 -1
  59. package/dist/filters/components/filtersSidePanel.js +4 -4
  60. package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +4 -4
  61. package/dist/filtersBar/filtersContainer/filtersContainer.js +62 -61
  62. package/dist/formGroup/components/reviewListToggle/reviewListToggle.js +13 -13
  63. package/dist/formStepperButtons/formStepperButtons.js +4 -1
  64. package/dist/groupsFilterRaw/groupsFilterAdjustmentState.js +4 -1
  65. package/dist/groupsFilterRaw/groupsFilterInitialState.js +5 -2
  66. package/dist/header/headerBack.js +4 -1
  67. package/dist/headerTitle/headerTitle.d.ts +9 -1
  68. package/dist/headerTitle/headerTitle.js +3 -2
  69. package/dist/icons/iconLayoutSidebar.js +3 -1
  70. package/dist/icons/iconPinFilled.d.ts +3 -0
  71. package/dist/icons/iconPinFilled.js +12 -0
  72. package/dist/icons/iconSidebar.js +3 -1
  73. package/dist/icons/iconUndock.js +3 -1
  74. package/dist/index.css +1454 -1330
  75. package/dist/index.d.ts +3 -1
  76. package/dist/index.js +10 -6
  77. package/dist/list/itemData/itemDataInternal.js +4 -1
  78. package/dist/list/listItem/listItem.d.ts +3 -1
  79. package/dist/list/listItem/listItem.js +8 -3
  80. package/dist/menu/components/menuButton.js +4 -1
  81. package/dist/menu/components/menuItem.js +4 -1
  82. package/dist/menu/controlledMenu.d.ts +1 -0
  83. package/dist/menu/controlledMenu.js +6 -3
  84. package/dist/mobileSheet/mobileSheet.js +4 -4
  85. package/dist/modal/modal.js +4 -4
  86. package/dist/nav/nav.d.ts +7 -1
  87. package/dist/nav/nav.js +11 -6
  88. package/dist/nav/navEmpty/navEmpty.d.ts +10 -0
  89. package/dist/nav/navEmpty/navEmpty.js +7 -0
  90. package/dist/nav/navItem/navItem.js +4 -1
  91. package/dist/notification/notification.js +4 -4
  92. package/dist/notification/pushNotification/pushNotification.js +1 -1
  93. package/dist/pagination/paginationArrow.js +10 -3
  94. package/dist/pill/components/pillNonActionable/pillNonActionable.js +4 -4
  95. package/dist/pillExpandable/pillExpandable.js +4 -4
  96. package/dist/radioGroupRaw/radioGroupRaw.js +2 -1
  97. package/dist/rangeRaw/rangeRaw.js +0 -1
  98. package/dist/selectList/selectList.helpers.d.ts +1 -1
  99. package/dist/selectList/selectList.helpers.js +31 -6
  100. package/dist/selectList/selectList.js +3 -1
  101. package/dist/selectList/selectList.reducer.js +1 -2
  102. package/dist/selectList/selectListItem.js +4 -1
  103. package/dist/sortControl/sortControl.js +59 -4
  104. package/dist/table/children/useTableChildren.d.ts +1 -1
  105. package/dist/table/children/useTableChildren.js +3 -3
  106. package/dist/table/detailPanel/detailPanelHeader.js +4 -4
  107. package/dist/table/flexible/columnsList.d.ts +1 -2
  108. package/dist/table/flexible/columnsList.js +10 -7
  109. package/dist/table/flexible/columnsPopup.js +0 -3
  110. package/dist/table/flexible/useFlexibleColumns.d.ts +1 -0
  111. package/dist/table/flexible/useFlexibleColumns.js +4 -3
  112. package/dist/table/loading/useLoading.d.ts +1 -0
  113. package/dist/table/loading/useLoading.js +1 -1
  114. package/dist/table/nested/useNestedRows.d.ts +1 -0
  115. package/dist/table/selectable/useSelectableRows.d.ts +8 -0
  116. package/dist/table/selectable/useSelectableRows.js +35 -9
  117. package/dist/table/table.d.ts +1 -0
  118. package/dist/table/table.js +8 -9
  119. package/dist/tabs/tabItem/tabItem.d.ts +2 -1
  120. package/dist/tabs/tabItem/tabItem.js +4 -2
  121. package/dist/tabs/tabs.d.ts +1 -0
  122. package/dist/tabs/tabs.js +62 -59
  123. package/dist/tabs/tabsTestHelper.js +2 -2
  124. package/dist/toastRaw/components/toastAnimation.js +2 -2
  125. package/dist/toastRaw/toastRaw.js +4 -4
  126. package/dist/toggleButtonRaw/toggleButtonRaw.js +13 -13
  127. package/dist/tooltip/tooltip.js +4 -4
  128. package/dist/utils/localization/flipAlignment.d.ts +2 -0
  129. package/dist/utils/localization/flipAlignment.js +19 -0
  130. package/dist/utils/localization/makeLanguageWrapper.d.ts +8 -0
  131. package/dist/utils/localization/makeLanguageWrapper.js +11 -0
  132. package/dist/utils/localization/translations/ar.json +3 -1
  133. package/dist/utils/localization/translations/cs.json +7 -3
  134. package/dist/utils/localization/translations/da-DK.json +7 -3
  135. package/dist/utils/localization/translations/de.json +5 -1
  136. package/dist/utils/localization/translations/en.json +5 -1
  137. package/dist/utils/localization/translations/es.json +7 -3
  138. package/dist/utils/localization/translations/fi-FI.json +6 -2
  139. package/dist/utils/localization/translations/fr-FR.json +5 -1
  140. package/dist/utils/localization/translations/fr.json +5 -1
  141. package/dist/utils/localization/translations/hu-HU.json +7 -3
  142. package/dist/utils/localization/translations/id.json +5 -1
  143. package/dist/utils/localization/translations/it.json +5 -1
  144. package/dist/utils/localization/translations/ja.json +5 -1
  145. package/dist/utils/localization/translations/ko-KR.json +7 -3
  146. package/dist/utils/localization/translations/ms.json +6 -2
  147. package/dist/utils/localization/translations/nb-NO.json +6 -2
  148. package/dist/utils/localization/translations/nl.json +5 -1
  149. package/dist/utils/localization/translations/pl.json +5 -1
  150. package/dist/utils/localization/translations/pt-BR.json +7 -3
  151. package/dist/utils/localization/translations/pt-PT.json +8 -4
  152. package/dist/utils/localization/translations/ro-RO.json +10 -6
  153. package/dist/utils/localization/translations/sk-SK.json +6 -2
  154. package/dist/utils/localization/translations/sv.json +5 -1
  155. package/dist/utils/localization/translations/th.json +5 -1
  156. package/dist/utils/localization/translations/tr.json +5 -1
  157. package/dist/utils/localization/translations/zh-Hans.json +6 -2
  158. package/dist/utils/localization/translations/zh-TW.json +5 -1
  159. package/dist/utils/localization/useDirectionalIcon.d.ts +3 -0
  160. package/dist/utils/localization/useDirectionalIcon.js +9 -0
  161. package/dist/utils/localization/useIsRTL.d.ts +1 -0
  162. package/dist/utils/localization/useIsRTL.js +6 -0
  163. package/dist/utils/localization/useRTLAlignment.d.ts +2 -0
  164. package/dist/utils/localization/useRTLAlignment.js +10 -0
  165. package/dist/utils/positioningUtils/alignments.d.ts +2 -2
  166. package/dist/utils/positioningUtils/alignments.js +2 -2
  167. package/dist/utils/positioningUtils/calculatePosition.js +4 -6
  168. package/esm/absolute/absolute.d.ts +7 -1
  169. package/esm/absolute/absolute.js +8 -4
  170. package/esm/alertRaw/alertRaw.js +4 -4
  171. package/esm/alertRaw/components/alertAnimation.js +2 -2
  172. package/esm/banner/bannerMultipLine.js +4 -4
  173. package/esm/banner/bannerSingleLine.js +4 -4
  174. package/esm/betaPill/betaPill.d.ts +18 -2
  175. package/esm/betaPill/betaPill.js +11 -8
  176. package/esm/bookmark/bookmark.d.ts +2 -1
  177. package/esm/bookmark/bookmark.js +4 -2
  178. package/esm/calendar/calendar.js +7 -4
  179. package/esm/card/card.d.ts +2 -1
  180. package/esm/card/card.js +4 -2
  181. package/esm/card/components/cardButton/cardButton.d.ts +2 -1
  182. package/esm/card/components/cardButton/cardButton.js +3 -3
  183. package/esm/card/components/title.d.ts +3 -1
  184. package/esm/card/components/title.js +9 -4
  185. package/esm/card/components/titleLink.js +5 -2
  186. package/esm/checkbox/checkbox.js +2 -2
  187. package/esm/checkboxListWithAction/checkboxListWithAction.js +6 -2
  188. package/esm/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +4 -1
  189. package/esm/controlledPopup/controlledPopup.d.ts +3 -1
  190. package/esm/controlledPopup/controlledPopup.js +4 -2
  191. package/esm/dataFeed/hooks/useVisibleColumns.js +1 -1
  192. package/esm/dataGrid/cell/cell.d.ts +2 -1
  193. package/esm/dataGrid/cell/cell.js +2 -2
  194. package/esm/dataGrid/dataGrid.js +6 -4
  195. package/esm/dataGrid/extensions/toBasicColumn.js +2 -1
  196. package/esm/dataGrid/listColumn.d.ts +3 -0
  197. package/esm/dataGrid/row/row.js +11 -7
  198. package/esm/dataGrid/withFlexibleColumns/components/columnSettingsList.d.ts +2 -2
  199. package/esm/dataGrid/withFlexibleColumns/components/columnSettingsList.js +7 -6
  200. package/esm/dataGrid/withFlexibleColumns/withFlexibleColumns.js +15 -6
  201. package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +4 -0
  202. package/esm/dateRangeInner/dateRangeInner.js +5 -2
  203. package/esm/dateRangeRaw/dateRangeRaw.js +5 -2
  204. package/esm/dateRangeRaw/utils/parseLabel.js +1 -1
  205. package/esm/dialog/dialogContent.js +4 -4
  206. package/esm/dropdown/dropdown.js +1 -1
  207. package/esm/dropdownRaw/dropdownHelper.d.ts +4 -1
  208. package/esm/dropdownRaw/dropdownHelper.js +2 -1
  209. package/esm/dropdownRaw/dropdownList.d.ts +4 -2
  210. package/esm/dropdownRaw/dropdownList.js +15 -36
  211. package/esm/dropdownRaw/dropdownRaw.js +24 -32
  212. package/esm/dropdownRaw/dropdownTrigger.d.ts +1 -1
  213. package/esm/dropdownRaw/dropdownTrigger.js +1 -1
  214. package/esm/dropdownRaw/stateReducer/stateReducer.d.ts +1 -0
  215. package/esm/dropdownRaw/stateReducer/stateReducer.js +14 -15
  216. package/esm/dropdownRaw/stateReducer/stateReducerHelper.d.ts +1 -2
  217. package/esm/dropdownRaw/stateReducer/stateReducerHelper.js +3 -10
  218. package/esm/fileUpload/components/uploadedFilesSection.js +3 -3
  219. package/esm/filters/components/filtersSavedChipComponent.js +3 -3
  220. package/esm/filters/components/filtersSearchItemData.js +3 -3
  221. package/esm/filters/components/filtersSearchList.js +4 -1
  222. package/esm/filters/components/filtersSidePanel.js +4 -4
  223. package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +4 -4
  224. package/esm/filtersBar/filtersContainer/filtersContainer.js +62 -61
  225. package/esm/formGroup/components/reviewListToggle/reviewListToggle.js +13 -13
  226. package/esm/formStepperButtons/formStepperButtons.js +4 -1
  227. package/esm/groupsFilterRaw/groupsFilterAdjustmentState.js +4 -1
  228. package/esm/groupsFilterRaw/groupsFilterInitialState.js +5 -2
  229. package/esm/header/headerBack.js +4 -1
  230. package/esm/headerTitle/headerTitle.d.ts +9 -1
  231. package/esm/headerTitle/headerTitle.js +3 -2
  232. package/esm/icons/iconLayoutSidebar.js +3 -1
  233. package/esm/icons/iconPinFilled.d.ts +3 -0
  234. package/esm/icons/iconPinFilled.js +8 -0
  235. package/esm/icons/iconSidebar.js +3 -1
  236. package/esm/icons/iconUndock.js +3 -1
  237. package/esm/index.d.ts +3 -1
  238. package/esm/index.js +2 -0
  239. package/esm/list/itemData/itemDataInternal.js +4 -1
  240. package/esm/list/listItem/listItem.d.ts +3 -1
  241. package/esm/list/listItem/listItem.js +8 -3
  242. package/esm/menu/components/menuButton.js +4 -1
  243. package/esm/menu/components/menuItem.js +4 -1
  244. package/esm/menu/controlledMenu.d.ts +1 -0
  245. package/esm/menu/controlledMenu.js +6 -3
  246. package/esm/mobileSheet/mobileSheet.js +4 -4
  247. package/esm/modal/modal.js +4 -4
  248. package/esm/nav/nav.d.ts +7 -1
  249. package/esm/nav/nav.js +11 -6
  250. package/esm/nav/navEmpty/navEmpty.d.ts +10 -0
  251. package/esm/nav/navEmpty/navEmpty.js +3 -0
  252. package/esm/nav/navItem/navItem.js +4 -1
  253. package/esm/notification/notification.js +4 -4
  254. package/esm/notification/pushNotification/pushNotification.js +1 -1
  255. package/esm/pagination/paginationArrow.js +10 -3
  256. package/esm/pill/components/pillNonActionable/pillNonActionable.js +4 -4
  257. package/esm/pillExpandable/pillExpandable.js +4 -4
  258. package/esm/radioGroupRaw/radioGroupRaw.js +2 -1
  259. package/esm/rangeRaw/rangeRaw.js +0 -1
  260. package/esm/selectList/selectList.helpers.d.ts +1 -1
  261. package/esm/selectList/selectList.helpers.js +31 -6
  262. package/esm/selectList/selectList.js +3 -1
  263. package/esm/selectList/selectList.reducer.js +1 -2
  264. package/esm/selectList/selectListItem.js +4 -1
  265. package/esm/sortControl/sortControl.js +59 -4
  266. package/esm/table/children/useTableChildren.d.ts +1 -1
  267. package/esm/table/children/useTableChildren.js +3 -3
  268. package/esm/table/detailPanel/detailPanelHeader.js +4 -4
  269. package/esm/table/flexible/columnsList.d.ts +1 -2
  270. package/esm/table/flexible/columnsList.js +10 -7
  271. package/esm/table/flexible/columnsPopup.js +0 -3
  272. package/esm/table/flexible/useFlexibleColumns.d.ts +1 -0
  273. package/esm/table/flexible/useFlexibleColumns.js +4 -3
  274. package/esm/table/loading/useLoading.d.ts +1 -0
  275. package/esm/table/loading/useLoading.js +1 -1
  276. package/esm/table/nested/useNestedRows.d.ts +1 -0
  277. package/esm/table/selectable/useSelectableRows.d.ts +8 -0
  278. package/esm/table/selectable/useSelectableRows.js +35 -9
  279. package/esm/table/table.d.ts +1 -0
  280. package/esm/table/table.js +8 -9
  281. package/esm/tabs/tabItem/tabItem.d.ts +2 -1
  282. package/esm/tabs/tabItem/tabItem.js +4 -2
  283. package/esm/tabs/tabs.d.ts +1 -0
  284. package/esm/tabs/tabs.js +62 -59
  285. package/esm/tabs/tabsTestHelper.js +2 -2
  286. package/esm/testHelpers/mockAbsoluteAlignment.d.ts +1 -0
  287. package/esm/testHelpers/mockAbsoluteAlignment.js +10 -0
  288. package/esm/toastRaw/components/toastAnimation.js +2 -2
  289. package/esm/toastRaw/toastRaw.js +4 -4
  290. package/esm/toggleButtonRaw/toggleButtonRaw.js +13 -13
  291. package/esm/tooltip/tooltip.js +4 -4
  292. package/esm/utils/localization/flipAlignment.d.ts +2 -0
  293. package/esm/utils/localization/flipAlignment.js +15 -0
  294. package/esm/utils/localization/makeLanguageWrapper.d.ts +8 -0
  295. package/esm/utils/localization/makeLanguageWrapper.js +7 -0
  296. package/esm/utils/localization/translations/ar.json +3 -1
  297. package/esm/utils/localization/translations/cs.json +7 -3
  298. package/esm/utils/localization/translations/da-DK.json +7 -3
  299. package/esm/utils/localization/translations/de.json +5 -1
  300. package/esm/utils/localization/translations/en.json +5 -1
  301. package/esm/utils/localization/translations/es.json +7 -3
  302. package/esm/utils/localization/translations/fi-FI.json +6 -2
  303. package/esm/utils/localization/translations/fr-FR.json +5 -1
  304. package/esm/utils/localization/translations/fr.json +5 -1
  305. package/esm/utils/localization/translations/hu-HU.json +7 -3
  306. package/esm/utils/localization/translations/id.json +5 -1
  307. package/esm/utils/localization/translations/it.json +5 -1
  308. package/esm/utils/localization/translations/ja.json +5 -1
  309. package/esm/utils/localization/translations/ko-KR.json +7 -3
  310. package/esm/utils/localization/translations/ms.json +6 -2
  311. package/esm/utils/localization/translations/nb-NO.json +6 -2
  312. package/esm/utils/localization/translations/nl.json +5 -1
  313. package/esm/utils/localization/translations/pl.json +5 -1
  314. package/esm/utils/localization/translations/pt-BR.json +7 -3
  315. package/esm/utils/localization/translations/pt-PT.json +8 -4
  316. package/esm/utils/localization/translations/ro-RO.json +10 -6
  317. package/esm/utils/localization/translations/sk-SK.json +6 -2
  318. package/esm/utils/localization/translations/sv.json +5 -1
  319. package/esm/utils/localization/translations/th.json +5 -1
  320. package/esm/utils/localization/translations/tr.json +5 -1
  321. package/esm/utils/localization/translations/zh-Hans.json +6 -2
  322. package/esm/utils/localization/translations/zh-TW.json +5 -1
  323. package/esm/utils/localization/useDirectionalIcon.d.ts +3 -0
  324. package/esm/utils/localization/useDirectionalIcon.js +5 -0
  325. package/esm/utils/localization/useIsRTL.d.ts +1 -0
  326. package/esm/utils/localization/useIsRTL.js +2 -0
  327. package/esm/utils/localization/useRTLAlignment.d.ts +2 -0
  328. package/esm/utils/localization/useRTLAlignment.js +6 -0
  329. package/esm/utils/positioningUtils/alignments.d.ts +2 -2
  330. package/esm/utils/positioningUtils/alignments.js +2 -2
  331. package/esm/utils/positioningUtils/calculatePosition.js +4 -6
  332. package/package.json +4 -1
package/README.md CHANGED
@@ -47,6 +47,10 @@ Zenith library provides components defined in Zenith Design System. It includes
47
47
 
48
48
  ## Change log
49
49
 
50
+ ### 3.9.2
51
+
52
+ - Fix `ControlledPopup` max-height
53
+
50
54
  ### 3.9.1
51
55
 
52
56
  - Fix `GroupsButton` styles
@@ -22,8 +22,14 @@ export interface IAbsolute extends IZenComponentProps {
22
22
  ariaLabelledby?: string;
23
23
  alignmentsFn?: IAlignment;
24
24
  recalculateOnScroll?: boolean;
25
+ /**
26
+ * When true, closes the popup on scroll instead of repositioning it.
27
+ * Mutually exclusive with `recalculateOnScroll` — setting both causes a
28
+ * wasted position recalculation before the popup closes.
29
+ */
30
+ closeOnScroll?: boolean;
25
31
  recalculateTrigger?: boolean;
26
32
  /** Whether to focus the first focusable element when popup opens. Default: true */
27
33
  focusOnOpen?: boolean;
28
34
  }
29
- export declare const Absolute: ({ isOpen, id, paddingX, paddingY, className, children, triggerRef, alignment, inline, onOpenChange, useTrapFocusWithTrigger, shouldHoldScroll, stateFullChilds, role, ariaLabel, ariaLabelledby, alignmentsFn, recalculateOnScroll, recalculateTrigger, focusOnOpen }: IAbsolute) => import("react/jsx-runtime").JSX.Element | "" | null;
35
+ export declare const Absolute: ({ isOpen, id, paddingX, paddingY, className, children, triggerRef, alignment, inline, onOpenChange, useTrapFocusWithTrigger, shouldHoldScroll, stateFullChilds, role, ariaLabel, ariaLabelledby, alignmentsFn, recalculateOnScroll, closeOnScroll, recalculateTrigger, focusOnOpen }: IAbsolute) => import("react/jsx-runtime").JSX.Element | "" | null;
@@ -19,7 +19,7 @@ const useScroll_1 = require("../commonHelpers/hooks/useScroll");
19
19
  const getScrollableParent_1 = require("../utils/getScrollableParent");
20
20
  const useClientReady_1 = require("../commonHelpers/hooks/useClientReady");
21
21
  const zen_1 = require("../utils/zen");
22
- const Absolute = ({ isOpen, id, paddingX, paddingY, className, children, triggerRef, alignment, inline, onOpenChange, useTrapFocusWithTrigger = "off", shouldHoldScroll, stateFullChilds, role, ariaLabel, ariaLabelledby, alignmentsFn, recalculateOnScroll, recalculateTrigger = true, focusOnOpen = true }) => {
22
+ 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 }) => {
23
23
  const popupRef = (0, react_1.useRef)(null);
24
24
  const prevScroll = (0, react_1.useRef)(0);
25
25
  const { dark } = (0, react_1.useContext)(themeContext_1.themeContext);
@@ -47,14 +47,18 @@ const Absolute = ({ isOpen, id, paddingX, paddingY, className, children, trigger
47
47
  return "";
48
48
  };
49
49
  const parent = (0, react_1.useMemo)(() => {
50
- if (!isOpen || !recalculateOnScroll) {
50
+ if (!isOpen || (!recalculateOnScroll && !closeOnScroll)) {
51
51
  return null;
52
52
  }
53
53
  return (0, getScrollableParent_1.getScrollableParent)(triggerRef.current);
54
- }, [triggerRef, isOpen, recalculateOnScroll]);
54
+ }, [triggerRef, isOpen, recalculateOnScroll, closeOnScroll]);
55
55
  const calculatePosition = (0, react_1.useCallback)(() => (0, calculatePosition_1.calculatePosition)(triggerRef, popupRef, paddingX, paddingY, inline, alignment, alignmentsFn, parent ? parent : undefined), [triggerRef, paddingX, paddingY, inline, alignment, alignmentsFn, popupRef, parent]);
56
+ const handleCloseOnScroll = (0, react_1.useCallback)(() => {
57
+ onOpenChange(false);
58
+ }, [onOpenChange]);
56
59
  (0, useResize_1.useResize)(calculatePosition, isOpen);
57
- (0, useScroll_1.useScroll)(calculatePosition, isOpen, parent);
60
+ (0, useScroll_1.useScroll)(calculatePosition, isOpen && !!recalculateOnScroll, parent);
61
+ (0, useScroll_1.useScroll)(handleCloseOnScroll, isOpen && !!closeOnScroll, parent);
58
62
  (0, react_1.useLayoutEffect)(calculatePosition, [isOpen, children, recalculateTrigger, calculatePosition]);
59
63
  function handleEscape() {
60
64
  onOpenChange(false);
@@ -19,10 +19,10 @@ injectString("da-DK", "Close", "Luk");
19
19
  injectString("de", "Close", "Schlie\xDFen");
20
20
  injectString("en", "Close", "Close");
21
21
  injectString("es", "Close", "Cerrar");
22
- injectString("fi-FI", "Close", "Sulje");
22
+ injectString("fi-FI", "Close", "Sulkea");
23
23
  injectString("fr", "Close", "Fermer");
24
24
  injectString("fr-FR", "Close", "Fermer");
25
- injectString("hu-HU", "Close", "Z\xE1rd be.");
25
+ injectString("hu-HU", "Close", "Bez\xE1r\xE1s");
26
26
  injectString("id", "Close", "Tutup");
27
27
  injectString("it", "Close", "Chiudere");
28
28
  injectString("ja", "Close", "\u9589\u3058\u308B");
@@ -33,13 +33,13 @@ injectString("nl", "Close", "Sluiten");
33
33
  injectString("pl", "Close", "Zamknij");
34
34
  injectString("pt-BR", "Close", "Fechar");
35
35
  injectString("pt-PT", "Close", "Fechar");
36
- injectString("sk-SK", "Close", "Zatvor");
36
+ injectString("sk-SK", "Close", "Zatvori\u0165");
37
37
  injectString("sv", "Close", "St\xE4ng");
38
38
  injectString("th", "Close", "\u0E1B\u0E34\u0E14");
39
39
  injectString("tr", "Close", "Kapat");
40
40
  injectString("zh-Hans", "Close", "\u5173\u95ED");
41
41
  injectString("zh-TW", "Close", "\u95DC\u9589");
42
- injectString("ro-RO", "Close", "\xCEnchide\u021Bi");
42
+ injectString("ro-RO", "Close", "\xCEnchide");
43
43
  injectString("ar-SA", "Close", "\u0625\u063A\u0644\u0627\u0642");
44
44
  const alertAnimation_1 = __importDefault(require("./components/alertAnimation"));
45
45
  const classNames_1 = require("../commonHelpers/classNames/classNames");
@@ -35,7 +35,7 @@ const AlertAnimation = ({ id, children, isOpen, animation }) => {
35
35
  return;
36
36
  }
37
37
  if (animation === "left-right") {
38
- ref.current.animate([{ left: "0%" }, { left: "120%" }], {
38
+ ref.current.animate([{ insetInlineStart: "0%" }, { insetInlineStart: "120%" }], {
39
39
  duration: 300,
40
40
  iterations: 1,
41
41
  delay: 0,
@@ -46,7 +46,7 @@ const AlertAnimation = ({ id, children, isOpen, animation }) => {
46
46
  };
47
47
  return;
48
48
  }
49
- ref.current.animate([{ left: "120%" }, { left: "0%" }], {
49
+ ref.current.animate([{ insetInlineStart: "120%" }, { insetInlineStart: "0%" }], {
50
50
  duration: 300,
51
51
  iterations: 1,
52
52
  delay: 0,
@@ -19,10 +19,10 @@ injectString("da-DK", "Close", "Luk");
19
19
  injectString("de", "Close", "Schlie\xDFen");
20
20
  injectString("en", "Close", "Close");
21
21
  injectString("es", "Close", "Cerrar");
22
- injectString("fi-FI", "Close", "Sulje");
22
+ injectString("fi-FI", "Close", "Sulkea");
23
23
  injectString("fr", "Close", "Fermer");
24
24
  injectString("fr-FR", "Close", "Fermer");
25
- injectString("hu-HU", "Close", "Z\xE1rd be.");
25
+ injectString("hu-HU", "Close", "Bez\xE1r\xE1s");
26
26
  injectString("id", "Close", "Tutup");
27
27
  injectString("it", "Close", "Chiudere");
28
28
  injectString("ja", "Close", "\u9589\u3058\u308B");
@@ -33,13 +33,13 @@ injectString("nl", "Close", "Sluiten");
33
33
  injectString("pl", "Close", "Zamknij");
34
34
  injectString("pt-BR", "Close", "Fechar");
35
35
  injectString("pt-PT", "Close", "Fechar");
36
- injectString("sk-SK", "Close", "Zatvor");
36
+ injectString("sk-SK", "Close", "Zatvori\u0165");
37
37
  injectString("sv", "Close", "St\xE4ng");
38
38
  injectString("th", "Close", "\u0E1B\u0E34\u0E14");
39
39
  injectString("tr", "Close", "Kapat");
40
40
  injectString("zh-Hans", "Close", "\u5173\u95ED");
41
41
  injectString("zh-TW", "Close", "\u95DC\u9589");
42
- injectString("ro-RO", "Close", "\xCEnchide\u021Bi");
42
+ injectString("ro-RO", "Close", "\xCEnchide");
43
43
  injectString("ar-SA", "Close", "\u0625\u063A\u0644\u0627\u0642");
44
44
  const bannerUtils_1 = require("./bannerUtils");
45
45
  const useLanguage_1 = require("../utils/localization/useLanguage");
@@ -19,10 +19,10 @@ injectString("da-DK", "Close", "Luk");
19
19
  injectString("de", "Close", "Schlie\xDFen");
20
20
  injectString("en", "Close", "Close");
21
21
  injectString("es", "Close", "Cerrar");
22
- injectString("fi-FI", "Close", "Sulje");
22
+ injectString("fi-FI", "Close", "Sulkea");
23
23
  injectString("fr", "Close", "Fermer");
24
24
  injectString("fr-FR", "Close", "Fermer");
25
- injectString("hu-HU", "Close", "Z\xE1rd be.");
25
+ injectString("hu-HU", "Close", "Bez\xE1r\xE1s");
26
26
  injectString("id", "Close", "Tutup");
27
27
  injectString("it", "Close", "Chiudere");
28
28
  injectString("ja", "Close", "\u9589\u3058\u308B");
@@ -33,13 +33,13 @@ injectString("nl", "Close", "Sluiten");
33
33
  injectString("pl", "Close", "Zamknij");
34
34
  injectString("pt-BR", "Close", "Fechar");
35
35
  injectString("pt-PT", "Close", "Fechar");
36
- injectString("sk-SK", "Close", "Zatvor");
36
+ injectString("sk-SK", "Close", "Zatvori\u0165");
37
37
  injectString("sv", "Close", "St\xE4ng");
38
38
  injectString("th", "Close", "\u0E1B\u0E34\u0E14");
39
39
  injectString("tr", "Close", "Kapat");
40
40
  injectString("zh-Hans", "Close", "\u5173\u95ED");
41
41
  injectString("zh-TW", "Close", "\u95DC\u9589");
42
- injectString("ro-RO", "Close", "\xCEnchide\u021Bi");
42
+ injectString("ro-RO", "Close", "\xCEnchide");
43
43
  injectString("ar-SA", "Close", "\u0625\u063A\u0644\u0627\u0642");
44
44
  const button_1 = require("../button/button");
45
45
  const buttonType_1 = require("../button/buttonType");
@@ -6,10 +6,26 @@ export interface IBetaPillActions {
6
6
  link?: string;
7
7
  linkOptions?: ILinkOptions;
8
8
  }
9
- export interface IBetaPill {
9
+ /**
10
+ * @internal - temporary escape hatch
11
+ * @deprecated
12
+ */
13
+ export interface IBetaPillBaseInternal {
14
+ name?: string;
15
+ description?: string;
16
+ }
17
+ interface IBetaPillBase {
10
18
  className?: string;
19
+ }
20
+ interface IBetaPillWithActions extends IBetaPillBase {
11
21
  feedbackAction?: IBetaPillActions;
12
22
  betaOptionAction?: IBetaPillActions;
13
23
  }
14
- export declare const BetaPill: ({ className, feedbackAction, betaOptionAction }: IBetaPill) => import("react/jsx-runtime").JSX.Element;
24
+ interface IBetaPillWithoutActions extends IBetaPillBase {
25
+ feedbackAction?: never;
26
+ betaOptionAction?: never;
27
+ }
28
+ export type IBetaPill = IBetaPillWithActions | IBetaPillWithoutActions;
29
+ export declare const BetaPill: (props: IBetaPill) => import("react/jsx-runtime").JSX.Element;
15
30
  export declare const TRANSLATIONS: string[];
31
+ export {};
@@ -124,11 +124,14 @@ injectString("zh-Hans", "Beta", "\u6D4B\u8BD5\u7248");
124
124
  injectString("zh-TW", "Beta", "\u6E2C\u8A66\u7248");
125
125
  injectString("ro-RO", "Beta", "Beta");
126
126
  injectString("ar-SA", "Beta", "\u062A\u062C\u0631\u064A\u0628\u064A");
127
- const BetaPill = ({
128
- className,
129
- feedbackAction,
130
- betaOptionAction
131
- }) => {
127
+ const BetaPill = props => {
128
+ const {
129
+ className,
130
+ feedbackAction,
131
+ betaOptionAction,
132
+ name,
133
+ description
134
+ } = props;
132
135
  const {
133
136
  translate
134
137
  } = (0, useLanguage_1.useLanguage)();
@@ -147,8 +150,8 @@ const BetaPill = ({
147
150
  return (0, jsx_runtime_1.jsx)(pillExpandable_1.PillExpandable, {
148
151
  isBeta: true,
149
152
  icon: iconLab_1.IconLab,
150
- description: translate("This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements."),
151
- text: translate("Beta"),
153
+ description: description !== null && description !== void 0 ? description : translate("This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements."),
154
+ text: name !== null && name !== void 0 ? name : translate("Beta"),
152
155
  type: "info",
153
156
  className: pillClasses,
154
157
  mainAction: resolvedMainAction,
@@ -161,7 +164,7 @@ const BetaPill = ({
161
164
  type: "info",
162
165
  children: !isMobile && (0, jsx_runtime_1.jsx)("span", {
163
166
  className: "zen-caption__content",
164
- children: translate("Beta")
167
+ children: name !== null && name !== void 0 ? name : translate("Beta")
165
168
  })
166
169
  });
167
170
  };
@@ -3,6 +3,7 @@ import { IZenComponentProps } from "../commonHelpers/zenComponent";
3
3
  export interface IBookmark extends IZenComponentProps {
4
4
  bookmarked: boolean;
5
5
  onChange: (bookmarkState: boolean) => void;
6
+ dataAnalyticsId?: string;
6
7
  }
7
- export declare const Bookmark: ({ className, bookmarked, onChange }: IBookmark) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const Bookmark: ({ className, bookmarked, onChange, dataAnalyticsId }: IBookmark) => import("react/jsx-runtime").JSX.Element;
8
9
  export declare const TRANSLATIONS: string[];
@@ -75,7 +75,8 @@ const iconBookmarkSelectedHover_1 = require("../icons/iconBookmarkSelectedHover"
75
75
  const Bookmark = ({
76
76
  className,
77
77
  bookmarked,
78
- onChange
78
+ onChange,
79
+ dataAnalyticsId
79
80
  }) => {
80
81
  const [isHovered, setIsHovered] = (0, react_1.useState)(false);
81
82
  const {
@@ -108,7 +109,8 @@ const Bookmark = ({
108
109
  iconSize: isDrive ? (0, svgIconSize_1.driveIconSize)("large") : "large",
109
110
  iconClasses: `zen-page-bookmark__icon zen-page-bookmark__icon${bookmarked ? "--active" : "--inactive"}`,
110
111
  "aria-label": title,
111
- title: title
112
+ title: title,
113
+ dataAnalyticsId: dataAnalyticsId
112
114
  })
113
115
  });
114
116
  };
@@ -823,6 +823,7 @@ const dateUtils_1 = require("./dateUtils");
823
823
  const classNames_1 = require("../commonHelpers/classNames/classNames");
824
824
  const iconChevronRightSmall_1 = require("../icons/iconChevronRightSmall");
825
825
  const iconChevronLeftSmall_1 = require("../icons/iconChevronLeftSmall");
826
+ const useDirectionalIcon_1 = require("../utils/localization/useDirectionalIcon");
826
827
  const parallelSelection_1 = require("../parallelSelection/parallelSelection");
827
828
  const calendarUtils_1 = require("./calendarUtils");
828
829
  const useLanguage_1 = require("../utils/localization/useLanguage");
@@ -853,6 +854,8 @@ const Calendar = ({
853
854
  const {
854
855
  translate
855
856
  } = (0, useLanguage_1.useLanguage)();
857
+ const PrevMonthIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronLeftSmall_1.IconChevronLeftSmall, iconChevronRightSmall_1.IconChevronRightSmall);
858
+ const NextMonthIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronRightSmall_1.IconChevronRightSmall, iconChevronLeftSmall_1.IconChevronLeftSmall);
856
859
  const fromDate = (0, react_1.useMemo)(() => value.from ? (0, dateUtils_1.toDayStart)(value.from) : undefined, [value.from]);
857
860
  const toDate = (0, react_1.useMemo)(() => value.to ? (0, dateUtils_1.toDayStart)(value.to) : undefined, [value.to]);
858
861
  const driveClassName = (0, useDriveClassName_1.useDriveClassName)("zen-calendar");
@@ -1106,7 +1109,7 @@ const Calendar = ({
1106
1109
  children: [isMobileView ? null : (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
1107
1110
  className: "zen-calendar__btn",
1108
1111
  type: "tertiary-black",
1109
- icon: iconChevronLeftSmall_1.IconChevronLeftSmall,
1112
+ icon: PrevMonthIcon,
1110
1113
  title: translate("Previous month"),
1111
1114
  onClick: () => changeView((0, dateUtils_1.addMonth)(viewDate, -1)),
1112
1115
  iconPosition: textIconButton_2.ButtonIconPosition.Start
@@ -1140,14 +1143,14 @@ const Calendar = ({
1140
1143
  children: [(0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
1141
1144
  className: "zen-calendar__btn",
1142
1145
  type: "tertiary-black",
1143
- icon: iconChevronLeftSmall_1.IconChevronLeftSmall,
1146
+ icon: PrevMonthIcon,
1144
1147
  title: translate("Previous month"),
1145
1148
  onClick: () => changeView((0, dateUtils_1.addMonth)(viewDate, -1)),
1146
1149
  iconPosition: textIconButton_2.ButtonIconPosition.Start
1147
1150
  }), (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
1148
1151
  className: "zen-calendar__btn",
1149
1152
  type: "tertiary-black",
1150
- icon: iconChevronRightSmall_1.IconChevronRightSmall,
1153
+ icon: NextMonthIcon,
1151
1154
  title: translate("Next month"),
1152
1155
  onClick: () => changeView((0, dateUtils_1.addMonth)(viewDate, 1)),
1153
1156
  iconPosition: textIconButton_2.ButtonIconPosition.Start
@@ -1155,7 +1158,7 @@ const Calendar = ({
1155
1158
  }) : null, isMobileView ? null : (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
1156
1159
  className: "zen-calendar__btn",
1157
1160
  type: "tertiary-black",
1158
- icon: iconChevronRightSmall_1.IconChevronRightSmall,
1161
+ icon: NextMonthIcon,
1159
1162
  title: translate("Next month"),
1160
1163
  onClick: () => changeView((0, dateUtils_1.addMonth)(viewDate, 1)),
1161
1164
  iconPosition: textIconButton_2.ButtonIconPosition.Start
@@ -1,7 +1,7 @@
1
1
  import React, { FC, FunctionComponent, ReactNode } from "react";
2
2
  import { IAbsoluteSize, TContainerSize } from "../cardContainer/cardContainer";
3
3
  import { TCardStatus } from "./components/status";
4
- import { TIconType } from "./components/title";
4
+ import { THeadingTag, TIconType } from "./components/title";
5
5
  import { IActions } from "./components/actions";
6
6
  import { IContent } from "./components/content";
7
7
  import "./card.less";
@@ -42,6 +42,7 @@ export interface ICard extends IZenComponentProps, IZenGridItem, IZenFormLayoutI
42
42
  scrollableContent?: boolean;
43
43
  autoHeight?: boolean;
44
44
  fullHeight?: boolean;
45
+ titleAs?: THeadingTag;
45
46
  }
46
47
  export declare const Card: FC<ICard> & {
47
48
  Actions: FC<IActions>;
package/dist/card/card.js CHANGED
@@ -121,7 +121,8 @@ props => {
121
121
  fullWidth,
122
122
  scrollableContent = true,
123
123
  autoHeight = false,
124
- fullHeight = false
124
+ fullHeight = false,
125
+ titleAs
125
126
  } = props;
126
127
  const {
127
128
  translate
@@ -281,7 +282,8 @@ props => {
281
282
  isMobile: isMobile,
282
283
  title: title,
283
284
  icon: titleIcon,
284
- iconType: titleIconType
285
+ iconType: titleIconType,
286
+ titleAs: titleAs
285
287
  }), (0, jsx_runtime_1.jsxs)("div", {
286
288
  className: "zen-card__header-right",
287
289
  children: [!!headerActions.length && headerActions, date ? (0, jsx_runtime_1.jsx)("span", {
@@ -11,5 +11,6 @@ export interface ICardButton extends IZenIdComponentProps {
11
11
  link?: string;
12
12
  target?: HTMLAttributeAnchorTarget;
13
13
  dataAnalyticsId?: string;
14
+ ariaLabel?: string;
14
15
  }
15
- export declare const CardButton: ({ children, disabled, icon, name, onClick, link, className, target: linkTarget, dataAnalyticsId }: ICardButton) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const CardButton: ({ children, disabled, icon, name, onClick, link, className, target: linkTarget, dataAnalyticsId, ariaLabel }: ICardButton) => import("react/jsx-runtime").JSX.Element;
@@ -12,7 +12,7 @@ const menu_1 = require("../../../menu/menu");
12
12
  const useDriveClassName_1 = require("../../../utils/theme/useDriveClassName");
13
13
  const useDrive_1 = require("../../../utils/theme/useDrive");
14
14
  const toKebabCase_1 = require("../../../utils/toKebabCase");
15
- const CardButton = ({ children, disabled = false, icon, name, onClick, link, className, target: linkTarget, dataAnalyticsId }) => {
15
+ const CardButton = ({ children, disabled = false, icon, name, onClick, link, className, target: linkTarget, dataAnalyticsId, ariaLabel }) => {
16
16
  const [isOpen, setIsOpen] = (0, react_1.useState)(false);
17
17
  const triggerRef = (0, react_1.useRef)(null);
18
18
  const content = [];
@@ -32,9 +32,9 @@ const CardButton = ({ children, disabled = false, icon, name, onClick, link, cla
32
32
  }
33
33
  onClick === null || onClick === void 0 ? void 0 : onClick(...args);
34
34
  };
35
- const renderLink = () => ((0, jsx_runtime_1.jsxs)(button_1.Button, { disabled: disabled, type: "tertiary", link: link, target: linkTarget, title: name, dataAnalyticsId: analyticsId, className: (0, classNames_1.classNames)([className || "", "zen-card-button", "zen-caption", cardButtonDriveClasses || ""]), children: [icon && (0, react_1.createElement)(icon, { size: isDrive ? "huge" : "large", className: "zen-caption__pre-content" }), (0, jsx_runtime_1.jsx)("span", { className: "zen-caption__content", children: name })] }));
35
+ const renderLink = () => ((0, jsx_runtime_1.jsxs)(button_1.Button, { disabled: disabled, type: "tertiary", link: link, target: linkTarget, title: name, ariaLabel: ariaLabel, dataAnalyticsId: analyticsId, className: (0, classNames_1.classNames)([className || "", "zen-card-button", "zen-caption", cardButtonDriveClasses || ""]), children: [icon && (0, react_1.createElement)(icon, { size: isDrive ? "huge" : "large", className: "zen-caption__pre-content" }), (0, jsx_runtime_1.jsx)("span", { className: "zen-caption__content", children: name })] }));
36
36
  const renderButton = () => {
37
- const trigger = ((0, jsx_runtime_1.jsxs)(button_1.Button, { htmlType: "button", ref: triggerRef, disabled: disabled, type: "tertiary", onClick: onButtonClickHandler, title: name, dataAnalyticsId: analyticsId, className: (0, classNames_1.classNames)([className || "", "zen-card-button", "zen-caption", cardButtonDriveClasses || ""]), children: [icon && (0, react_1.createElement)(icon, { size: isDrive ? "huge" : "large", className: "zen-caption__pre-content" }), (0, jsx_runtime_1.jsx)("span", { className: "zen-caption__content", children: name }), !!content.length &&
37
+ const trigger = ((0, jsx_runtime_1.jsxs)(button_1.Button, { htmlType: "button", ref: triggerRef, disabled: disabled, type: "tertiary", onClick: onButtonClickHandler, title: name, ariaLabel: ariaLabel, dataAnalyticsId: analyticsId, className: (0, classNames_1.classNames)([className || "", "zen-card-button", "zen-caption", cardButtonDriveClasses || ""]), children: [icon && (0, react_1.createElement)(icon, { size: isDrive ? "huge" : "large", className: "zen-caption__pre-content" }), (0, jsx_runtime_1.jsx)("span", { className: "zen-caption__content", children: name }), !!content.length &&
38
38
  (isOpen ? ((0, jsx_runtime_1.jsx)(iconChevronTopSmall_1.IconChevronTopSmall, { size: isDrive ? "huge" : "large", className: "zen-caption__post-content" })) : ((0, jsx_runtime_1.jsx)(iconChevronDownSmall_1.IconChevronDownSmall, { size: isDrive ? "huge" : "large", className: "zen-caption__post-content" })))] }));
39
39
  return content.length ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [trigger, (0, jsx_runtime_1.jsx)(controlledMenu_1.ControlledMenu, { title: name, isOpen: isOpen, setIsOpen: setIsOpen, triggerRef: triggerRef, children: content })] })) : (trigger);
40
40
  };
@@ -2,6 +2,7 @@ import { FunctionComponent } from "react";
2
2
  import "./title.less";
3
3
  import { IIcon } from "../../icons/icon";
4
4
  export type TIconType = "info" | "warning" | "error" | "success" | "default";
5
+ export type THeadingTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
5
6
  interface ITitle {
6
7
  isMobile: boolean;
7
8
  title: string;
@@ -12,6 +13,7 @@ interface ITitle {
12
13
  icon?: FunctionComponent<IIcon>;
13
14
  iconType?: TIconType;
14
15
  onClick?: () => void;
16
+ titleAs?: THeadingTag;
15
17
  }
16
- export declare const Title: ({ isMobile, link, target, title, id, icon, iconType, className, onClick }: ITitle) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const Title: ({ isMobile, link, target, title, id, icon, iconType, className, onClick, titleAs }: ITitle) => import("react/jsx-runtime").JSX.Element;
17
19
  export {};
@@ -7,13 +7,17 @@ const classNames_1 = require("../../commonHelpers/classNames/classNames");
7
7
  const useDriveClassName_1 = require("../../utils/theme/useDriveClassName");
8
8
  const useDrive_1 = require("../../utils/theme/useDrive");
9
9
  const iconChevronRightSmall_1 = require("../../icons/iconChevronRightSmall");
10
- const Title = ({ isMobile, link, target, title, id, icon, iconType, className = "", onClick }) => {
10
+ const iconChevronLeftSmall_1 = require("../../icons/iconChevronLeftSmall");
11
+ const useDirectionalIcon_1 = require("../../utils/localization/useDirectionalIcon");
12
+ const VALID_HEADING_TAGS = new Set(["h1", "h2", "h3", "h4", "h5", "h6"]);
13
+ const Title = ({ isMobile, link, target, title, id, icon, iconType, className = "", onClick, titleAs }) => {
11
14
  const driveClassNames = (0, useDriveClassName_1.useDriveClassName)("zen-card-title");
12
15
  const isDrive = (0, useDrive_1.useDrive)();
13
16
  const iconClassName = iconType ? `zen-card-title__icon--${iconType}` : "";
14
17
  const iconSize = (0, react_1.useMemo)(() => (isDrive ? "huge" : "large"), [isDrive]);
15
- const iconElement = (0, react_1.useMemo)(() => (icon ? (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-card-title__icon", iconClassName]), children: (0, react_1.createElement)(icon, { size: iconSize }) }) : null), [icon, iconSize, iconClassName]);
16
- const chevron = (0, react_1.useMemo)(() => ((0, jsx_runtime_1.jsx)("span", { className: "zen-card-title__link-chevron", children: (0, jsx_runtime_1.jsx)(iconChevronRightSmall_1.IconChevronRightSmall, { size: iconSize, className: "zen-card-title__chevron-icon" }) })), [iconSize]);
18
+ const iconElement = (0, react_1.useMemo)(() => (icon ? (0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)(["zen-card-title__icon", iconClassName]), children: (0, react_1.createElement)(icon, { size: iconSize }) }) : null), [icon, iconSize, iconClassName]);
19
+ const ChevronIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronRightSmall_1.IconChevronRightSmall, iconChevronLeftSmall_1.IconChevronLeftSmall);
20
+ const chevron = (0, react_1.useMemo)(() => ((0, jsx_runtime_1.jsx)("span", { className: "zen-card-title__link-chevron", children: (0, jsx_runtime_1.jsx)(ChevronIcon, { size: iconSize, className: "zen-card-title__chevron-icon" }) })), [ChevronIcon, iconSize]);
17
21
  const titleClasses = (0, classNames_1.classNames)(["zen-card-title", driveClassNames || "", onClick ? "zen-card-title__clickable" : ""]);
18
22
  if (onClick) {
19
23
  return ((0, jsx_runtime_1.jsxs)("button", { type: "button", className: titleClasses, onClick: onClick, children: [iconElement, (0, jsx_runtime_1.jsxs)("span", { title: title, id: id, className: (0, classNames_1.classNames)(["zen-card-title__text", isMobile && !isDrive ? "zen-card-title__text--mobile" : "", className]), children: [title, chevron] })] }));
@@ -21,6 +25,7 @@ const Title = ({ isMobile, link, target, title, id, icon, iconType, className =
21
25
  if (link) {
22
26
  return ((0, jsx_runtime_1.jsxs)("a", { id: id, className: titleClasses, href: link, target: target, children: [iconElement, (0, jsx_runtime_1.jsxs)("span", { title: title, className: (0, classNames_1.classNames)(["zen-card-title__link-text"]), children: [title, chevron] })] }));
23
27
  }
24
- return ((0, jsx_runtime_1.jsxs)("div", { className: titleClasses, children: [iconElement, (0, jsx_runtime_1.jsx)("span", { title: title, id: id, className: (0, classNames_1.classNames)(["zen-card-title__text", isMobile && !isDrive ? "zen-card-title__text--mobile" : "", className]), children: title })] }));
28
+ const tag = titleAs && VALID_HEADING_TAGS.has(titleAs) ? titleAs : "div";
29
+ return (0, react_1.createElement)(tag, { className: titleClasses }, iconElement, (0, jsx_runtime_1.jsx)("span", { title: title, id: id, className: (0, classNames_1.classNames)(["zen-card-title__text", isMobile && !isDrive ? "zen-card-title__text--mobile" : "", className]), children: title }, "text"));
25
30
  };
26
31
  exports.Title = Title;
@@ -5,6 +5,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const classNames_1 = require("../../commonHelpers/classNames/classNames");
6
6
  const textIconButton_1 = require("../../textIconButton/textIconButton");
7
7
  const iconArrowRight_1 = require("../../icons/iconArrowRight");
8
+ const iconArrowLeft_1 = require("../../icons/iconArrowLeft");
9
+ const useDirectionalIcon_1 = require("../../utils/localization/useDirectionalIcon");
8
10
  const useDriveClassName_1 = require("../../utils/theme/useDriveClassName");
9
11
  const useMobile_1 = require("../../commonHelpers/hooks/useMobile");
10
12
  const useDrive_1 = require("../../utils/theme/useDrive");
@@ -14,9 +16,10 @@ const TitleLink = ({ titleIconClasses, ariaLabel, children, link, id, className
14
16
  const isMobile = (0, useMobile_1.useMobile)();
15
17
  const isDrive = (0, useDrive_1.useDrive)();
16
18
  const titleAriaLabel = ariaLabel || "";
19
+ const ArrowIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconArrowRight_1.IconArrowRight, iconArrowLeft_1.IconArrowLeft);
17
20
  if (!isMobile) {
18
- return ((0, jsx_runtime_1.jsxs)("a", { id: id, className: (0, classNames_1.classNames)(["zen-link", "zen-title-link", className]), href: link, "aria-label": titleAriaLabel, children: [(0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)(["zen-title-link__text", titleLinkTextDriveClasses || ""]), children: children }), (0, jsx_runtime_1.jsx)(iconArrowRight_1.IconArrowRight, { size: isDrive ? "huge" : "large", className: (0, classNames_1.classNames)(["zen-title-link__icon", titleIconClasses || ""]) })] }));
21
+ return ((0, jsx_runtime_1.jsxs)("a", { id: id, className: (0, classNames_1.classNames)(["zen-link", "zen-title-link", className]), href: link, "aria-label": titleAriaLabel, children: [(0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)(["zen-title-link__text", titleLinkTextDriveClasses || ""]), children: children }), (0, jsx_runtime_1.jsx)(ArrowIcon, { size: isDrive ? "huge" : "large", className: (0, classNames_1.classNames)(["zen-title-link__icon", titleIconClasses || ""]) })] }));
19
22
  }
20
- return ((0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, { type: "tertiary", iconClasses: titleIconClasses, id: id, "aria-label": titleAriaLabel, link: link, iconPosition: textIconButton_1.ButtonIconPosition.End, icon: iconArrowRight_1.IconArrowRight, iconSize: isDrive ? "huge" : "large", className: (0, classNames_1.classNames)(["zen-title-link", "zen-title-link__icon", titleLinkClasses || "", className || ""]), children: children && (0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)(["zen-title-link__text", titleLinkTextDriveClasses || ""]), children: children }) }));
23
+ return ((0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, { type: "tertiary", iconClasses: titleIconClasses, id: id, "aria-label": titleAriaLabel, link: link, iconPosition: textIconButton_1.ButtonIconPosition.End, icon: ArrowIcon, iconSize: isDrive ? "huge" : "large", className: (0, classNames_1.classNames)(["zen-title-link", "zen-title-link__icon", titleLinkClasses || "", className || ""]), children: children && (0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)(["zen-title-link__text", titleLinkTextDriveClasses || ""]), children: children }) }));
21
24
  };
22
25
  exports.TitleLink = TitleLink;
@@ -54,10 +54,10 @@ const Checkbox = (_a) => {
54
54
  const isMobile = (0, useMobile_1.useMobile)();
55
55
  const checkboxIconClasses = (0, react_1.useMemo)(() => (0, classNames_1.classNames)(["zen-checkbox__icon", disabled ? "zen-checkbox__icon--disabled" : ""]), [disabled]);
56
56
  const checkbox = ((0, jsx_runtime_1.jsx)(triStateCheckbox_1.TriStateCheckbox, Object.assign({ className: "zen-checkbox__input", id: intId, checked: checked, indeterminate: indeterminate, disabled: disabled, "aria-label": title, "aria-describedby": describedBy }, rest)));
57
- const iconAndLabel = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "zen-checkbox__box", children: state === checkboxState_1.CheckboxState.Indeterminate ? ((0, jsx_runtime_1.jsx)(checkboxIconMinus_1.CheckboxIconMinus, { className: checkboxIconClasses, size: driveClasses ? "bigger" : "medium" })) : state === checkboxState_1.CheckboxState.On ? ((0, jsx_runtime_1.jsx)(checkboxIconCheckmark_1.CheckboxIconCheckmark, { className: checkboxIconClasses, size: driveClasses ? "bigger" : "medium" })) : null }), children ? ((0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-checkbox__label-text", fullWidth ? "zen-checkbox__label-text--full-width" : ""]), children: children })) : null] }));
57
+ const iconAndLabel = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "zen-checkbox__box", "aria-hidden": true, children: state === checkboxState_1.CheckboxState.Indeterminate ? ((0, jsx_runtime_1.jsx)(checkboxIconMinus_1.CheckboxIconMinus, { className: checkboxIconClasses, size: driveClasses ? "bigger" : "medium" })) : state === checkboxState_1.CheckboxState.On ? ((0, jsx_runtime_1.jsx)(checkboxIconCheckmark_1.CheckboxIconCheckmark, { className: checkboxIconClasses, size: driveClasses ? "bigger" : "medium" })) : null }), children ? ((0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-checkbox__label-text", fullWidth ? "zen-checkbox__label-text--full-width" : ""]), children: children })) : null] }));
58
58
  if (wrapped) {
59
59
  return ((0, jsx_runtime_1.jsxs)("label", { className: (0, classNames_1.classNames)(["zen-checkbox", driveClasses || "", className]), title: title, children: [checkbox, (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-checkbox__label", reverse ? "zen-checkbox__label--reverse" : ""]), children: iconAndLabel })] }));
60
60
  }
61
- return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-checkbox", isMobile && !driveClasses ? "zen-checkbox--mobile" : "", driveClasses || "", className]), children: [checkbox, (0, jsx_runtime_1.jsx)("label", { className: (0, classNames_1.classNames)(["zen-checkbox__label", reverse ? "zen-checkbox__label--reverse" : ""]), htmlFor: intId, title: title, children: iconAndLabel })] }));
61
+ return ((0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-checkbox", isMobile && !driveClasses ? "zen-checkbox--mobile" : "", driveClasses || "", className]), children: (0, jsx_runtime_1.jsxs)("label", { className: (0, classNames_1.classNames)(["zen-checkbox__label", reverse ? "zen-checkbox__label--reverse" : ""]), title: title, children: [checkbox, iconAndLabel] }) }));
62
62
  };
63
63
  exports.Checkbox = Checkbox;
@@ -120,6 +120,8 @@ injectString("ar-SA", "Has additional actions. Use right arrow to access button,
120
120
  const checkbox_1 = require("../checkbox/checkbox");
121
121
  const classNames_1 = require("../commonHelpers/classNames/classNames");
122
122
  const iconChevronRight_1 = require("../icons/iconChevronRight");
123
+ const iconChevronLeft_1 = require("../icons/iconChevronLeft");
124
+ const useDirectionalIcon_1 = require("../utils/localization/useDirectionalIcon");
123
125
  const useLanguage_1 = require("../utils/localization/useLanguage");
124
126
  const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
125
127
  const CheckboxListWithAction = ({
@@ -135,6 +137,7 @@ const CheckboxListWithAction = ({
135
137
  translate
136
138
  } = (0, useLanguage_1.useLanguage)();
137
139
  const driveComponentClass = (0, useDriveClassName_1.useDriveClassName)("zen-checkbox-list-with-action");
140
+ const ChevronIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronRight_1.IconChevronRight, iconChevronLeft_1.IconChevronLeft);
138
141
  const listId = (0, react_1.useId)();
139
142
  const checkboxId = `${listId}_check_list-item_`;
140
143
  const navigationInstructionsId = `${listId}_navigation_instructions`;
@@ -369,7 +372,7 @@ const CheckboxListWithAction = ({
369
372
  })), (0, jsx_runtime_1.jsxs)("div", Object.assign({
370
373
  className: "zen-checkbox-list-with-action__label-info"
371
374
  }, otherArgs, {
372
- children: [getLabelColorInfo(option.color, option.isWithAction, option.partialChecked, otherArgs), option.isWithAction && (0, jsx_runtime_1.jsx)(iconChevronRight_1.IconChevronRight, {
375
+ children: [getLabelColorInfo(option.color, option.isWithAction, option.partialChecked, otherArgs), option.isWithAction && (0, jsx_runtime_1.jsx)(ChevronIcon, {
373
376
  size: "large"
374
377
  })]
375
378
  }))]
@@ -379,7 +382,8 @@ const CheckboxListWithAction = ({
379
382
  onClick: handleClick,
380
383
  title: title,
381
384
  className: classN,
382
- tabIndex: -1
385
+ tabIndex: -1,
386
+ disabled: option.blocked
383
387
  }, otherArgs, {
384
388
  children: childEl
385
389
  })) : (0, jsx_runtime_1.jsx)("div", {
@@ -7,10 +7,13 @@ const button_1 = require("../../../../button/button");
7
7
  const iconChevronLeft_1 = require("../../../../icons/iconChevronLeft");
8
8
  const iconChevronRight_1 = require("../../../../icons/iconChevronRight");
9
9
  const useDrive_1 = require("../../../../utils/theme/useDrive");
10
+ const useDirectionalIcon_1 = require("../../../../utils/localization/useDirectionalIcon");
10
11
  const svgIconSize_1 = require("../../../../svgIcon/svgIconSize");
11
12
  const ArrowNavButton = ({ value, isHidden, disabled, className, arrowButtonHandler, onMouseDown, onMouseUp }) => {
12
13
  const isDrive = (0, useDrive_1.useDrive)();
13
14
  const iconSize = isDrive ? (0, svgIconSize_1.driveIconSize)("large") : "large";
14
- return ((0, jsx_runtime_1.jsx)(button_1.Button, { type: "tertiary-black", className: (0, classNames_1.classNames)(["zen-arrow-nav-button", isHidden ? "zen-arrow-nav-button--invisible" : "", className !== null && className !== void 0 ? className : ""]), "aria-label": value, disabled: disabled, onClick: arrowButtonHandler, "data-action": value, onMouseDown: onMouseDown, onMouseUp: onMouseUp, children: value === "left" ? ((0, jsx_runtime_1.jsx)(iconChevronLeft_1.IconChevronLeft, { size: iconSize, className: "zen-arrow-nav-button__icon" })) : ((0, jsx_runtime_1.jsx)(iconChevronRight_1.IconChevronRight, { size: iconSize, className: "zen-arrow-nav-button__icon" })) }));
15
+ const LeftIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronLeft_1.IconChevronLeft, iconChevronRight_1.IconChevronRight);
16
+ const RightIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronRight_1.IconChevronRight, iconChevronLeft_1.IconChevronLeft);
17
+ return ((0, jsx_runtime_1.jsx)(button_1.Button, { type: "tertiary-black", className: (0, classNames_1.classNames)(["zen-arrow-nav-button", isHidden ? "zen-arrow-nav-button--invisible" : "", className !== null && className !== void 0 ? className : ""]), "aria-label": value, disabled: disabled, onClick: arrowButtonHandler, "data-action": value, onMouseDown: onMouseDown, onMouseUp: onMouseUp, children: value === "left" ? ((0, jsx_runtime_1.jsx)(LeftIcon, { size: iconSize, className: "zen-arrow-nav-button__icon" })) : ((0, jsx_runtime_1.jsx)(RightIcon, { size: iconSize, className: "zen-arrow-nav-button__icon" })) }));
15
18
  };
16
19
  exports.ArrowNavButton = ArrowNavButton;
@@ -1,7 +1,7 @@
1
1
  @import "../common.less";
2
2
  @import "../typography/typography.less";
3
3
 
4
- @pill-min-width-default: 30px;
4
+ @pill-min-width-default: (30 / @rem);
5
5
  @pill-max-width-default: 200px;
6
6
 
7
7
  // TODO: update to .zen-pill-content after old pill component removed remove
@@ -14,12 +14,12 @@
14
14
  display: flex;
15
15
  align-items: center;
16
16
  justify-content: space-between;
17
- border-radius: 30px;
17
+ border-radius: (30 / @rem);
18
18
  height: @pill-height;
19
19
  display: grid;
20
20
  grid-auto-flow: column;
21
21
 
22
- gap: 8px;
22
+ gap: (8 / @rem);
23
23
 
24
24
  &--icon-left {
25
25
  grid-template-columns: 12px 1fr;
@@ -38,18 +38,18 @@
38
38
 
39
39
  &.zen-pill-new-content--empty {
40
40
  grid-template-columns: 12px 18px;
41
- gap: 8px;
41
+ gap: (8 / @rem);
42
42
  }
43
43
  }
44
44
 
45
45
  &--hidden {
46
- gap: 4px;
46
+ gap: (4 / @rem);
47
47
  }
48
48
  &.zen-pill-new-content--drive,
49
49
  &.zen-pill-new-content--drive-tablet {
50
50
  height: @pill-height--drive;
51
51
  .zen-pill-non-actionable__icon {
52
- min-width: 16px;
52
+ min-width: (16 / @rem);
53
53
  max-width: 16px;
54
54
  height: 16px;
55
55
  }
@@ -67,7 +67,7 @@
67
67
 
68
68
  &.zen-pill-new-content--empty {
69
69
  grid-template-columns: 16px 22px;
70
- gap: 8px;
70
+ gap: (8 / @rem);
71
71
  }
72
72
  }
73
73
  }
@@ -75,7 +75,7 @@
75
75
  height: @pill-height--mobile;
76
76
  .body-m-400-short();
77
77
  .zen-pill-non-actionable__icon {
78
- min-width: 16px;
78
+ min-width: (16 / @rem);
79
79
  max-width: 16px;
80
80
  height: 16px;
81
81
  }
@@ -93,7 +93,7 @@
93
93
 
94
94
  &.zen-pill-new-content--empty {
95
95
  grid-template-columns: 16px 22px;
96
- gap: 8px;
96
+ gap: (8 / @rem);
97
97
  }
98
98
  }
99
99
  }