@geotab/zenith 3.1.1-beta.6 → 3.2.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 (434) hide show
  1. package/README.md +20 -0
  2. package/dist/advancedGroupsFilter/advancedGroupsFilter.js +136 -30
  3. package/dist/advancedGroupsFilter/advancedGroupsFilterForm.js +139 -34
  4. package/dist/advancedGroupsFilter/advancedGroupsFilterFormSection.js +352 -87
  5. package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.d.ts +0 -1
  6. package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +83 -9
  7. package/dist/alertRaw/alertRaw.js +175 -54
  8. package/dist/banner/bannerMultipLine.js +131 -23
  9. package/dist/banner/bannerSingleLine.js +110 -16
  10. package/dist/betaPill/betaPill.js +111 -20
  11. package/dist/bookmark/bookmark.js +95 -28
  12. package/dist/bulkEditControl/bulkEditControl.js +167 -34
  13. package/dist/calendar/calendar.js +943 -273
  14. package/dist/calendar/calendarUtils.js +157 -85
  15. package/dist/card/card.js +268 -123
  16. package/dist/chart/accessibleChart/accessibleChartNarrative.js +648 -555
  17. package/dist/chart/accessibleChart/accessibleChartTable.js +245 -86
  18. package/dist/chart/chart.js +36 -21
  19. package/dist/chart/chartAxis/chartAxis.js +85 -7
  20. package/dist/checkboxListWithAction/checkboxListWithAction.js +224 -69
  21. package/dist/chip/chip.js +195 -91
  22. package/dist/columnsSelector/columnsSelector.js +97 -12
  23. package/dist/columnsSelector/columnsTab/columnsTab.js +59 -15
  24. package/dist/columnsSelector/columnsTabGroup/columnsTabGroup.js +81 -34
  25. package/dist/comboboxSelected/comboboxSelected.js +1 -3
  26. package/dist/dataFeed/feedExpandControl/feedExpandControl.js +25 -10
  27. package/dist/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +92 -11
  28. package/dist/dataGrid/dataGrid.js +227 -117
  29. package/dist/dataGrid/emptySearchList/emptySearchList.js +56 -9
  30. package/dist/dataGrid/entitiesListActions/actions/columnsListButton.js +51 -7
  31. package/dist/dataGrid/entitiesListActions/actions/fullscreenButton.js +64 -18
  32. package/dist/dataGrid/withFlexibleColumns/components/columnSettings.js +84 -10
  33. package/dist/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +48 -16
  34. package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +223 -32
  35. package/dist/dataGrid/withSelectableRows/withSelectableRows.js +286 -213
  36. package/dist/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +178 -95
  37. package/dist/dateInputInner/dateInputInner.js +791 -476
  38. package/dist/dateInputInner/dateInputInnerControlBlock.js +125 -22
  39. package/dist/dateInputRaw/dateInputRaw.js +315 -104
  40. package/dist/dateInputRaw/utils/getLabel.js +38 -7
  41. package/dist/dateRangeInner/dateRangeInner.js +173 -59
  42. package/dist/dateRangeRaw/dateRangeRaw.js +601 -239
  43. package/dist/dateRangeRaw/utils/dateRangeUtils.js +629 -241
  44. package/dist/dateSelectionWrapper/dateSelectionWrapper.js +152 -14
  45. package/dist/dialog/dialogContent.js +123 -40
  46. package/dist/dropdownRaw/dropdownHelper.d.ts +2 -2
  47. package/dist/dropdownRaw/dropdownHelper.js +9 -9
  48. package/dist/dropdownRaw/dropdownList.js +447 -78
  49. package/dist/dropdownRaw/dropdownPopup.js +218 -20
  50. package/dist/dropdownRaw/dropdownRaw.js +866 -506
  51. package/dist/dropdownRaw/dropdownSearchableTrigger.js +223 -46
  52. package/dist/dropdownRaw/stateReducer/stateAction.d.ts +5 -1
  53. package/dist/dropdownRaw/stateReducer/stateActionType.d.ts +2 -1
  54. package/dist/dropdownRaw/stateReducer/stateActionType.js +1 -0
  55. package/dist/dropdownRaw/stateReducer/stateReducer.d.ts +6 -1
  56. package/dist/dropdownRaw/stateReducer/stateReducer.js +24 -12
  57. package/dist/dropdownRaw/stateReducer/stateReducerHelper.d.ts +2 -0
  58. package/dist/dropdownRaw/stateReducer/stateReducerHelper.js +20 -1
  59. package/dist/dropdownRaw/stateReducer/stateReducerTestData.d.ts +39 -0
  60. package/dist/dropdownRaw/stateReducer/stateReducerTestData.js +74 -0
  61. package/dist/dropdownRaw/types.d.ts +1 -0
  62. package/dist/favoriteButton/favoriteButton.js +59 -10
  63. package/dist/filters/components/filtersContainer.js +151 -64
  64. package/dist/filters/components/filtersEmptySelectedList.js +30 -4
  65. package/dist/filters/components/filtersSaveModal.js +140 -42
  66. package/dist/filters/components/filtersSavedChipComponent.js +318 -108
  67. package/dist/filters/components/filtersSearchItemData.js +127 -47
  68. package/dist/filters/components/filtersSearchList.js +381 -179
  69. package/dist/filters/components/filtersSelect.js +128 -61
  70. package/dist/filters/components/filtersSelectListItem.js +125 -13
  71. package/dist/filters/components/filtersSidePanel.js +510 -178
  72. package/dist/filters/components/filtersSidePanelDropdown.js +2 -2
  73. package/dist/filters/filters.js +445 -268
  74. package/dist/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +729 -272
  75. package/dist/filtersBar/components/resetComponentButton.js +45 -5
  76. package/dist/filtersBar/filtersBarActions/filtersBarActions.js +126 -15
  77. package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRadioGroup/filtersBarSidePanelRadioGroup.js +2 -2
  78. package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +155 -49
  79. package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +360 -104
  80. package/dist/filtersBar/filtersContainer/filtersContainer.js +204 -134
  81. package/dist/formField/components/formFieldWithLabel.d.ts +2 -1
  82. package/dist/formField/components/formFieldWithLabel.js +3 -2
  83. package/dist/formField/components/formFieldWithoutLabel.d.ts +2 -1
  84. package/dist/formField/components/formFieldWithoutLabel.js +3 -3
  85. package/dist/formField/components/trailingComponent.d.ts +8 -0
  86. package/dist/formField/components/trailingComponent.js +11 -0
  87. package/dist/formField/formField.js +26 -11
  88. package/dist/formField/hooks/useError.js +100 -36
  89. package/dist/formGroup/components/reviewListToggle/reviewListToggle.js +72 -7
  90. package/dist/formGroup/hooks/useToggle.js +37 -11
  91. package/dist/formGroup/utils/getControls.js +8 -7
  92. package/dist/formLayout/hooks/useError.js +55 -15
  93. package/dist/formLayout/hooks/useFormButtons.js +128 -27
  94. package/dist/formSection/components/formSectionModal.js +1 -1
  95. package/dist/formSection/formSection.js +1 -1
  96. package/dist/formSection/hooks/useError.js +70 -22
  97. package/dist/formStepper/components/formStep.js +65 -10
  98. package/dist/formStepper/formStepper.js +129 -33
  99. package/dist/formStepperButtons/formStepperButtons.js +184 -38
  100. package/dist/groupsFilter/groupsHelper.d.ts +1 -1
  101. package/dist/groupsFilterRaw/groupsFilterAdjustmentState.js +162 -17
  102. package/dist/groupsFilterRaw/groupsFilterBox.js +137 -32
  103. package/dist/groupsFilterRaw/groupsFilterCommon.js +75 -8
  104. package/dist/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +184 -25
  105. package/dist/groupsFilterRaw/groupsFilterHelper.d.ts +2 -1
  106. package/dist/groupsFilterRaw/groupsFilterHelper.js +284 -168
  107. package/dist/groupsFilterRaw/groupsFilterInitialState.js +266 -18
  108. package/dist/groupsFilterRaw/groupsFilterMenu.js +124 -9
  109. package/dist/groupsFilterRaw/groupsFilterRaw.d.ts +1 -0
  110. package/dist/groupsFilterRaw/groupsFilterRaw.js +816 -308
  111. package/dist/groupsFilterRaw/groupsFilterTestData.d.ts +155 -2
  112. package/dist/groupsFilterRaw/groupsFilterTestData.js +153 -58
  113. package/dist/groupsFilterRaw/groupsFilterTrigger.js +139 -35
  114. package/dist/groupsFilterRaw/groupsHelper.js +739 -208
  115. package/dist/groupsFilterRaw/stateReducer/stateReducerHelper.js +3 -1
  116. package/dist/groupsFilterRaw/types.d.ts +1 -0
  117. package/dist/header/components/collapsedItemsControl/collapsedItemsControl.js +107 -52
  118. package/dist/header/components/mobileFilterControl/mobileFilterControl.js +62 -9
  119. package/dist/header/components/mobileSearchControl/mobileSearchControl.js +119 -14
  120. package/dist/header/headerBack.js +64 -20
  121. package/dist/index.css +116 -74
  122. package/dist/index.d.ts +1 -0
  123. package/dist/index.js +4 -1
  124. package/dist/list/itemData/itemDataInternal.js +216 -51
  125. package/dist/list/listItem/listItem.js +168 -55
  126. package/dist/menu/components/menuErrorItem.js +33 -5
  127. package/dist/mobileSheet/mobileSheet.js +195 -69
  128. package/dist/modal/modal.js +300 -142
  129. package/dist/nav/nav.js +1 -1
  130. package/dist/nav/navFooter/navFooter.js +82 -39
  131. package/dist/nav/navFooter/navFooterAction/navFooterAction.js +52 -13
  132. package/dist/nav/navHeader/navHeader.js +86 -36
  133. package/dist/nav/navHeader/navHeaderSearch/navHeaderSearch.js +88 -29
  134. package/dist/nav/navItem/navItem.d.ts +3 -3
  135. package/dist/nav/navItem/navItem.js +35 -33
  136. package/dist/nav/navMobileBar/navMobileBar.js +67 -21
  137. package/dist/notification/notification.js +124 -21
  138. package/dist/pagination/paginationArrow.js +81 -11
  139. package/dist/pagination/paginationText/paginationText.js +45 -11
  140. package/dist/pill/components/pillNonActionable/pillNonActionable.js +93 -24
  141. package/dist/pillBox/components/pillBoxItem.js +52 -9
  142. package/dist/pillBox/pillBox.js +121 -20
  143. package/dist/pillExpandable/pillExpandable.js +333 -139
  144. package/dist/rangeRaw/rangeRaw.js +486 -141
  145. package/dist/rangeRaw/utils/rangeHelper.js +209 -39
  146. package/dist/searchInputRaw/searchInputRaw.js +180 -65
  147. package/dist/skeleton/skeleton.js +51 -6
  148. package/dist/sortControl/sortControl.js +152 -42
  149. package/dist/stepperRaw/stepperRaw.js +116 -42
  150. package/dist/summary/summary.js +94 -8
  151. package/dist/table/actions/actionsMenu.js +171 -78
  152. package/dist/table/flexible/columnSettings.js +80 -10
  153. package/dist/table/flexible/columnsList.js +110 -43
  154. package/dist/table/flexible/columnsPopup.js +77 -20
  155. package/dist/table/nested/useNestedRows.js +167 -77
  156. package/dist/table/selectable/selectableHeader.js +180 -41
  157. package/dist/table/selectable/useSelectableRows.js +270 -191
  158. package/dist/table/sortable/sortableHeader.js +153 -75
  159. package/dist/tabs/tabs.js +227 -118
  160. package/dist/timePickerRaw/timePickerRaw.js +278 -58
  161. package/dist/toastRaw/toastRaw.js +138 -32
  162. package/dist/toggleButton/toggleButton.d.ts +0 -1
  163. package/dist/toggleButtonRaw/toggleButtonRaw.d.ts +1 -0
  164. package/dist/toggleButtonRaw/toggleButtonRaw.js +146 -40
  165. package/dist/utils/formatDate.js +1001 -117
  166. package/{esm/utils/localization/translations/cs-json.js → dist/utils/localization/translations/cs.json} +11 -12
  167. package/{esm/utils/localization/translations/da-DK-json.js → dist/utils/localization/translations/da-DK.json} +31 -23
  168. package/{esm/utils/localization/translations/de-json.js → dist/utils/localization/translations/de.json} +12 -13
  169. package/dist/utils/localization/translations/en.json +308 -0
  170. package/{esm/utils/localization/translations/es-json.js → dist/utils/localization/translations/es.json} +11 -12
  171. package/{esm/utils/localization/translations/fi-FI-json.js → dist/utils/localization/translations/fi-FI.json} +31 -23
  172. package/{esm/utils/localization/translations/fr-FR-json.js → dist/utils/localization/translations/fr-FR.json} +12 -12
  173. package/{esm/utils/localization/translations/fr-json.js → dist/utils/localization/translations/fr.json} +11 -12
  174. package/{esm/utils/localization/translations/hu-HU-json.js → dist/utils/localization/translations/hu-HU.json} +31 -23
  175. package/{esm/utils/localization/translations/id-json.js → dist/utils/localization/translations/id.json} +11 -13
  176. package/{esm/utils/localization/translations/it-json.js → dist/utils/localization/translations/it.json} +11 -12
  177. package/{esm/utils/localization/translations/ja-json.js → dist/utils/localization/translations/ja.json} +11 -12
  178. package/{esm/utils/localization/translations/ko-KR-json.js → dist/utils/localization/translations/ko-KR.json} +24 -23
  179. package/{esm/utils/localization/translations/ms-json.js → dist/utils/localization/translations/ms.json} +11 -12
  180. package/{esm/utils/localization/translations/nb-NO-json.js → dist/utils/localization/translations/nb-NO.json} +31 -23
  181. package/{esm/utils/localization/translations/nl-json.js → dist/utils/localization/translations/nl.json} +11 -12
  182. package/{esm/utils/localization/translations/pl-json.js → dist/utils/localization/translations/pl.json} +11 -12
  183. package/{esm/utils/localization/translations/pt-BR-json.js → dist/utils/localization/translations/pt-BR.json} +11 -12
  184. package/{esm/utils/localization/translations/sk-SK-json.js → dist/utils/localization/translations/sk-SK.json} +31 -23
  185. package/{esm/utils/localization/translations/sv-json.js → dist/utils/localization/translations/sv.json} +11 -12
  186. package/{esm/utils/localization/translations/th-json.js → dist/utils/localization/translations/th.json} +11 -12
  187. package/{esm/utils/localization/translations/tr-json.js → dist/utils/localization/translations/tr.json} +11 -12
  188. package/{esm/utils/localization/translations/zh-Hans-json.js → dist/utils/localization/translations/zh-Hans.json} +11 -12
  189. package/{esm/utils/localization/translations/zh-TW-json.js → dist/utils/localization/translations/zh-TW.json} +11 -23
  190. package/dist/utils/localization/translationsDictionary.d.ts +2 -0
  191. package/dist/utils/localization/translationsDictionary.js +63 -0
  192. package/dist/utils/localization/useLanguage.js +2 -74
  193. package/esm/advancedGroupsFilter/advancedGroupsFilter.js +130 -29
  194. package/esm/advancedGroupsFilter/advancedGroupsFilterForm.js +133 -33
  195. package/esm/advancedGroupsFilter/advancedGroupsFilterFormSection.js +317 -65
  196. package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.d.ts +0 -1
  197. package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +77 -8
  198. package/esm/alertRaw/alertRaw.js +165 -51
  199. package/esm/banner/bannerMultipLine.js +121 -20
  200. package/esm/banner/bannerSingleLine.js +100 -13
  201. package/esm/betaPill/betaPill.js +105 -19
  202. package/esm/bookmark/bookmark.js +89 -27
  203. package/esm/bulkEditControl/bulkEditControl.js +161 -33
  204. package/esm/calendar/calendar.js +937 -272
  205. package/esm/calendar/calendarUtils.js +151 -84
  206. package/esm/card/card.js +233 -101
  207. package/esm/chart/accessibleChart/accessibleChartNarrative.js +642 -554
  208. package/esm/chart/accessibleChart/accessibleChartTable.js +239 -85
  209. package/esm/chart/chart.js +30 -20
  210. package/esm/chart/chartAxis/chartAxis.js +79 -6
  211. package/esm/checkboxListWithAction/checkboxListWithAction.js +218 -68
  212. package/esm/chip/chip.js +189 -90
  213. package/esm/columnsSelector/columnsSelector.js +91 -11
  214. package/esm/columnsSelector/columnsTab/columnsTab.js +53 -14
  215. package/esm/columnsSelector/columnsTabGroup/columnsTabGroup.js +75 -33
  216. package/esm/comboboxSelected/comboboxSelected.js +1 -3
  217. package/esm/dataFeed/feedExpandControl/feedExpandControl.js +21 -9
  218. package/esm/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +86 -10
  219. package/esm/dataGrid/dataGrid.js +221 -116
  220. package/esm/dataGrid/emptySearchList/emptySearchList.js +50 -8
  221. package/esm/dataGrid/entitiesListActions/actions/columnsListButton.js +45 -6
  222. package/esm/dataGrid/entitiesListActions/actions/fullscreenButton.js +58 -17
  223. package/esm/dataGrid/withFlexibleColumns/components/columnSettings.js +78 -9
  224. package/esm/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +44 -15
  225. package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +217 -31
  226. package/esm/dataGrid/withSelectableRows/withSelectableRows.js +280 -212
  227. package/esm/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +172 -94
  228. package/esm/dateInputInner/dateInputInner.js +785 -475
  229. package/esm/dateInputInner/dateInputInnerControlBlock.js +119 -21
  230. package/esm/dateInputRaw/dateInputRaw.js +309 -103
  231. package/esm/dateInputRaw/utils/getLabel.js +32 -6
  232. package/esm/dateRangeInner/dateRangeInner.js +167 -58
  233. package/esm/dateRangeRaw/dateRangeRaw.js +595 -238
  234. package/esm/dateRangeRaw/utils/dateRangeUtils.js +622 -239
  235. package/esm/dateSelectionWrapper/dateSelectionWrapper.js +146 -13
  236. package/esm/dialog/dialogContent.js +117 -39
  237. package/esm/dropdownRaw/dropdownHelper.d.ts +2 -2
  238. package/esm/dropdownRaw/dropdownHelper.js +10 -10
  239. package/esm/dropdownRaw/dropdownList.js +412 -56
  240. package/esm/dropdownRaw/dropdownPopup.js +212 -19
  241. package/esm/dropdownRaw/dropdownRaw.js +862 -507
  242. package/esm/dropdownRaw/dropdownSearchableTrigger.js +217 -45
  243. package/esm/dropdownRaw/stateReducer/stateAction.d.ts +5 -1
  244. package/esm/dropdownRaw/stateReducer/stateActionType.d.ts +2 -1
  245. package/esm/dropdownRaw/stateReducer/stateActionType.js +1 -0
  246. package/esm/dropdownRaw/stateReducer/stateReducer.d.ts +6 -1
  247. package/esm/dropdownRaw/stateReducer/stateReducer.js +24 -12
  248. package/esm/dropdownRaw/stateReducer/stateReducerHelper.d.ts +2 -0
  249. package/esm/dropdownRaw/stateReducer/stateReducerHelper.js +18 -0
  250. package/esm/dropdownRaw/stateReducer/stateReducerTestData.d.ts +39 -0
  251. package/esm/dropdownRaw/stateReducer/stateReducerTestData.js +71 -0
  252. package/esm/dropdownRaw/types.d.ts +1 -0
  253. package/esm/favoriteButton/favoriteButton.js +53 -9
  254. package/esm/filters/components/filtersContainer.js +141 -61
  255. package/esm/filters/components/filtersEmptySelectedList.js +24 -3
  256. package/esm/filters/components/filtersSaveModal.js +134 -41
  257. package/esm/filters/components/filtersSavedChipComponent.js +312 -107
  258. package/esm/filters/components/filtersSearchItemData.js +121 -46
  259. package/esm/filters/components/filtersSearchList.js +375 -178
  260. package/esm/filters/components/filtersSelect.js +122 -60
  261. package/esm/filters/components/filtersSelectListItem.js +119 -12
  262. package/esm/filters/components/filtersSidePanel.js +504 -177
  263. package/esm/filters/components/filtersSidePanelDropdown.js +2 -2
  264. package/esm/filters/filters.js +435 -265
  265. package/esm/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +722 -270
  266. package/esm/filtersBar/components/resetComponentButton.js +39 -4
  267. package/esm/filtersBar/filtersBarActions/filtersBarActions.js +120 -14
  268. package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRadioGroup/filtersBarSidePanelRadioGroup.js +2 -2
  269. package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +149 -48
  270. package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +354 -103
  271. package/esm/filtersBar/filtersContainer/filtersContainer.js +198 -133
  272. package/esm/formField/components/formFieldWithLabel.d.ts +2 -1
  273. package/esm/formField/components/formFieldWithLabel.js +3 -2
  274. package/esm/formField/components/formFieldWithoutLabel.d.ts +2 -1
  275. package/esm/formField/components/formFieldWithoutLabel.js +3 -3
  276. package/esm/formField/components/trailingComponent.d.ts +8 -0
  277. package/esm/formField/components/trailingComponent.js +7 -0
  278. package/esm/formField/formField.js +27 -12
  279. package/esm/formField/hooks/useError.js +94 -35
  280. package/esm/formGroup/components/reviewListToggle/reviewListToggle.js +66 -6
  281. package/esm/formGroup/hooks/useToggle.js +31 -10
  282. package/esm/formGroup/utils/getControls.js +8 -7
  283. package/esm/formLayout/hooks/useError.js +49 -14
  284. package/esm/formLayout/hooks/useFormButtons.js +122 -26
  285. package/esm/formSection/components/formSectionModal.js +1 -1
  286. package/esm/formSection/formSection.js +1 -1
  287. package/esm/formSection/hooks/useError.js +64 -21
  288. package/esm/formStepper/components/formStep.js +59 -9
  289. package/esm/formStepper/formStepper.js +123 -32
  290. package/esm/formStepperButtons/formStepperButtons.js +178 -37
  291. package/esm/groupsFilter/groupsHelper.d.ts +1 -1
  292. package/esm/groupsFilterRaw/groupsFilterAdjustmentState.js +152 -14
  293. package/esm/groupsFilterRaw/groupsFilterBox.js +131 -31
  294. package/esm/groupsFilterRaw/groupsFilterCommon.js +69 -7
  295. package/esm/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +178 -24
  296. package/esm/groupsFilterRaw/groupsFilterHelper.d.ts +2 -1
  297. package/esm/groupsFilterRaw/groupsFilterHelper.js +279 -168
  298. package/esm/groupsFilterRaw/groupsFilterInitialState.js +260 -17
  299. package/esm/groupsFilterRaw/groupsFilterMenu.js +118 -8
  300. package/esm/groupsFilterRaw/groupsFilterRaw.d.ts +1 -0
  301. package/esm/groupsFilterRaw/groupsFilterRaw.js +811 -308
  302. package/esm/groupsFilterRaw/groupsFilterTestData.d.ts +155 -2
  303. package/esm/groupsFilterRaw/groupsFilterTestData.js +152 -57
  304. package/esm/groupsFilterRaw/groupsFilterTrigger.js +133 -34
  305. package/esm/groupsFilterRaw/groupsHelper.js +733 -207
  306. package/esm/groupsFilterRaw/stateReducer/stateReducerHelper.js +3 -1
  307. package/esm/groupsFilterRaw/types.d.ts +1 -0
  308. package/esm/header/components/collapsedItemsControl/collapsedItemsControl.js +101 -51
  309. package/esm/header/components/mobileFilterControl/mobileFilterControl.js +56 -8
  310. package/esm/header/components/mobileSearchControl/mobileSearchControl.js +113 -13
  311. package/esm/header/headerBack.js +58 -19
  312. package/esm/index.d.ts +1 -0
  313. package/esm/index.js +1 -0
  314. package/esm/list/itemData/itemDataInternal.js +210 -50
  315. package/esm/list/listItem/listItem.js +162 -54
  316. package/esm/menu/components/menuErrorItem.js +27 -4
  317. package/esm/mobileSheet/mobileSheet.js +189 -68
  318. package/esm/modal/modal.js +265 -120
  319. package/esm/nav/nav.js +1 -1
  320. package/esm/nav/navFooter/navFooter.js +76 -38
  321. package/esm/nav/navFooter/navFooterAction/navFooterAction.js +46 -12
  322. package/esm/nav/navHeader/navHeader.js +80 -35
  323. package/esm/nav/navHeader/navHeaderSearch/navHeaderSearch.js +82 -28
  324. package/esm/nav/navItem/navItem.d.ts +3 -3
  325. package/esm/nav/navItem/navItem.js +35 -33
  326. package/esm/nav/navMobileBar/navMobileBar.js +61 -20
  327. package/esm/notification/notification.js +114 -18
  328. package/esm/pagination/paginationArrow.js +75 -10
  329. package/esm/pagination/paginationText/paginationText.js +39 -10
  330. package/esm/pill/components/pillNonActionable/pillNonActionable.js +87 -23
  331. package/esm/pillBox/components/pillBoxItem.js +46 -8
  332. package/esm/pillBox/pillBox.js +115 -19
  333. package/esm/pillExpandable/pillExpandable.js +327 -138
  334. package/esm/rangeRaw/rangeRaw.js +480 -140
  335. package/esm/rangeRaw/utils/rangeHelper.js +203 -38
  336. package/esm/searchInputRaw/searchInputRaw.js +145 -43
  337. package/esm/skeleton/skeleton.js +45 -5
  338. package/esm/sortControl/sortControl.js +146 -41
  339. package/esm/stepperRaw/stepperRaw.js +112 -41
  340. package/esm/storybookHelpers/dataGridWithDifferentCellOptions/components/EntitiesListAction.js +178 -19
  341. package/esm/summary/summary.js +88 -7
  342. package/esm/table/actions/actionsMenu.js +165 -77
  343. package/esm/table/flexible/columnSettings.js +74 -9
  344. package/esm/table/flexible/columnsList.js +104 -42
  345. package/esm/table/flexible/columnsPopup.js +71 -19
  346. package/esm/table/nested/useNestedRows.js +161 -76
  347. package/esm/table/selectable/selectableHeader.js +174 -40
  348. package/esm/table/selectable/useSelectableRows.js +264 -190
  349. package/esm/table/sortable/sortableHeader.js +147 -74
  350. package/esm/tabs/tabs.js +221 -117
  351. package/esm/timePickerRaw/timePickerRaw.js +272 -57
  352. package/esm/toastRaw/toastRaw.js +132 -31
  353. package/esm/toggleButton/toggleButton.d.ts +0 -1
  354. package/esm/toggleButtonRaw/toggleButtonRaw.d.ts +1 -0
  355. package/esm/toggleButtonRaw/toggleButtonRaw.js +111 -18
  356. package/esm/utils/formatDate.js +995 -116
  357. package/{dist/utils/localization/translations/cs-json.js → esm/utils/localization/translations/cs.json} +11 -15
  358. package/{dist/utils/localization/translations/da-DK-json.js → esm/utils/localization/translations/da-DK.json} +31 -26
  359. package/{dist/utils/localization/translations/de-json.js → esm/utils/localization/translations/de.json} +12 -16
  360. package/esm/utils/localization/translations/en.json +308 -0
  361. package/{dist/utils/localization/translations/es-json.js → esm/utils/localization/translations/es.json} +11 -15
  362. package/{dist/utils/localization/translations/fi-FI-json.js → esm/utils/localization/translations/fi-FI.json} +31 -26
  363. package/{dist/utils/localization/translations/fr-FR-json.js → esm/utils/localization/translations/fr-FR.json} +12 -15
  364. package/{dist/utils/localization/translations/fr-json.js → esm/utils/localization/translations/fr.json} +11 -15
  365. package/{dist/utils/localization/translations/hu-HU-json.js → esm/utils/localization/translations/hu-HU.json} +31 -26
  366. package/{dist/utils/localization/translations/id-json.js → esm/utils/localization/translations/id.json} +11 -16
  367. package/{dist/utils/localization/translations/it-json.js → esm/utils/localization/translations/it.json} +11 -15
  368. package/{dist/utils/localization/translations/ja-json.js → esm/utils/localization/translations/ja.json} +11 -15
  369. package/{dist/utils/localization/translations/ko-KR-json.js → esm/utils/localization/translations/ko-KR.json} +24 -26
  370. package/{dist/utils/localization/translations/ms-json.js → esm/utils/localization/translations/ms.json} +11 -15
  371. package/{dist/utils/localization/translations/nb-NO-json.js → esm/utils/localization/translations/nb-NO.json} +31 -26
  372. package/{dist/utils/localization/translations/nl-json.js → esm/utils/localization/translations/nl.json} +11 -15
  373. package/{dist/utils/localization/translations/pl-json.js → esm/utils/localization/translations/pl.json} +11 -15
  374. package/{dist/utils/localization/translations/pt-BR-json.js → esm/utils/localization/translations/pt-BR.json} +11 -15
  375. package/{dist/utils/localization/translations/sk-SK-json.js → esm/utils/localization/translations/sk-SK.json} +31 -26
  376. package/{dist/utils/localization/translations/sv-json.js → esm/utils/localization/translations/sv.json} +11 -15
  377. package/{dist/utils/localization/translations/th-json.js → esm/utils/localization/translations/th.json} +11 -15
  378. package/{dist/utils/localization/translations/tr-json.js → esm/utils/localization/translations/tr.json} +11 -15
  379. package/{dist/utils/localization/translations/zh-Hans-json.js → esm/utils/localization/translations/zh-Hans.json} +11 -15
  380. package/{dist/utils/localization/translations/zh-TW-json.js → esm/utils/localization/translations/zh-TW.json} +11 -26
  381. package/esm/utils/localization/translationsDictionary.d.ts +2 -0
  382. package/esm/utils/localization/translationsDictionary.js +59 -0
  383. package/esm/utils/localization/useLanguage.js +1 -50
  384. package/package.json +19 -12
  385. package/dist/utils/localization/translations/cs-json.d.ts +0 -251
  386. package/dist/utils/localization/translations/da-DK-json.d.ts +0 -252
  387. package/dist/utils/localization/translations/de-json.d.ts +0 -251
  388. package/dist/utils/localization/translations/en-json.d.ts +0 -314
  389. package/dist/utils/localization/translations/en-json.js +0 -317
  390. package/dist/utils/localization/translations/es-json.d.ts +0 -251
  391. package/dist/utils/localization/translations/fi-FI-json.d.ts +0 -252
  392. package/dist/utils/localization/translations/fr-FR-json.d.ts +0 -250
  393. package/dist/utils/localization/translations/fr-json.d.ts +0 -251
  394. package/dist/utils/localization/translations/hu-HU-json.d.ts +0 -252
  395. package/dist/utils/localization/translations/id-json.d.ts +0 -252
  396. package/dist/utils/localization/translations/it-json.d.ts +0 -251
  397. package/dist/utils/localization/translations/ja-json.d.ts +0 -251
  398. package/dist/utils/localization/translations/ko-KR-json.d.ts +0 -258
  399. package/dist/utils/localization/translations/ms-json.d.ts +0 -251
  400. package/dist/utils/localization/translations/nb-NO-json.d.ts +0 -252
  401. package/dist/utils/localization/translations/nl-json.d.ts +0 -251
  402. package/dist/utils/localization/translations/pl-json.d.ts +0 -251
  403. package/dist/utils/localization/translations/pt-BR-json.d.ts +0 -251
  404. package/dist/utils/localization/translations/sk-SK-json.d.ts +0 -251
  405. package/dist/utils/localization/translations/sv-json.d.ts +0 -251
  406. package/dist/utils/localization/translations/th-json.d.ts +0 -251
  407. package/dist/utils/localization/translations/tr-json.d.ts +0 -251
  408. package/dist/utils/localization/translations/zh-Hans-json.d.ts +0 -251
  409. package/dist/utils/localization/translations/zh-TW-json.d.ts +0 -271
  410. package/esm/utils/localization/translations/cs-json.d.ts +0 -251
  411. package/esm/utils/localization/translations/da-DK-json.d.ts +0 -252
  412. package/esm/utils/localization/translations/de-json.d.ts +0 -251
  413. package/esm/utils/localization/translations/en-json.d.ts +0 -314
  414. package/esm/utils/localization/translations/en-json.js +0 -314
  415. package/esm/utils/localization/translations/es-json.d.ts +0 -251
  416. package/esm/utils/localization/translations/fi-FI-json.d.ts +0 -252
  417. package/esm/utils/localization/translations/fr-FR-json.d.ts +0 -250
  418. package/esm/utils/localization/translations/fr-json.d.ts +0 -251
  419. package/esm/utils/localization/translations/hu-HU-json.d.ts +0 -252
  420. package/esm/utils/localization/translations/id-json.d.ts +0 -252
  421. package/esm/utils/localization/translations/it-json.d.ts +0 -251
  422. package/esm/utils/localization/translations/ja-json.d.ts +0 -251
  423. package/esm/utils/localization/translations/ko-KR-json.d.ts +0 -258
  424. package/esm/utils/localization/translations/ms-json.d.ts +0 -251
  425. package/esm/utils/localization/translations/nb-NO-json.d.ts +0 -252
  426. package/esm/utils/localization/translations/nl-json.d.ts +0 -251
  427. package/esm/utils/localization/translations/pl-json.d.ts +0 -251
  428. package/esm/utils/localization/translations/pt-BR-json.d.ts +0 -251
  429. package/esm/utils/localization/translations/sk-SK-json.d.ts +0 -251
  430. package/esm/utils/localization/translations/sv-json.d.ts +0 -251
  431. package/esm/utils/localization/translations/th-json.d.ts +0 -251
  432. package/esm/utils/localization/translations/tr-json.d.ts +0 -251
  433. package/esm/utils/localization/translations/zh-Hans-json.d.ts +0 -251
  434. package/esm/utils/localization/translations/zh-TW-json.d.ts +0 -271
@@ -1,3 +1,4 @@
1
+ import { injectString } from "../utils/localization/translationsDictionary";
1
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
3
  import { Fragment, useId } from "react";
3
4
  import { Checkbox } from "../checkbox/checkbox";
@@ -5,73 +6,222 @@ import { classNames } from "../commonHelpers/classNames/classNames";
5
6
  import { IconChevronRight } from "../icons/iconChevronRight";
6
7
  import { useLanguage } from "../utils/localization/useLanguage";
7
8
  import { useDriveClassName } from "../utils/theme/useDriveClassName";
8
- export const CheckboxListWithAction = ({ label, options, onChange, onClick, search = [], className }) => {
9
- const { translate } = useLanguage();
10
- const driveComponentClass = useDriveClassName("zen-checkbox-list-with-action");
11
- const listId = useId();
12
- const checkboxId = `${listId}_check_list-item_`;
13
- const handleChange = (e) => {
14
- const evtTarget = e.target;
15
- const elId = evtTarget.getAttribute("id").replace(checkboxId, "");
16
- onChange({ id: elId, state: evtTarget.checked, partial: e.target.dataset.indeterminate === "true" });
9
+ injectString("cs", "Number of selected child groups - {count}", "Po\u010Det vybran\xFDch pod\u0159\xEDzen\xFDch skupin\xA0\u2013 {count}");
10
+ injectString("da-DK", "Number of selected child groups - {count}", "Antal valgte underordnede grupper - {count}");
11
+ injectString("de", "Number of selected child groups - {count}", "Anzahl ausgew\xE4hlter Untergruppen \u2013 {count}");
12
+ injectString("en", "Number of selected child groups - {count}", "Number of selected child groups - {count}");
13
+ injectString("es", "Number of selected child groups - {count}", "Cantidad de grupos secundarios seleccionados: {count}");
14
+ injectString("fi-FI", "Number of selected child groups - {count}", "Valittujen alaryhmien m\xE4\xE4r\xE4 - {count}");
15
+ injectString("fr", "Number of selected child groups - {count}", "Nombre de groupes enfants s\xE9lectionn\xE9s\xA0\u2013 {count}");
16
+ injectString("fr-FR", "Number of selected child groups - {count}", "Nombre de groupes enfants s\xE9lectionn\xE9s - {count}");
17
+ injectString("hu-HU", "Number of selected child groups - {count}", "Kiv\xE1lasztott gyermekcsoportok sz\xE1ma: {count}.");
18
+ injectString("id", "Number of selected child groups - {count}", "Jumlah kelompok anak yang dipilih - {count}");
19
+ injectString("it", "Number of selected child groups - {count}", "Numero di gruppi secondari selezionati: {count}");
20
+ injectString("ja", "Number of selected child groups - {count}", "\u9078\u629E\u3057\u305F\u5B50\u30B0\u30EB\u30FC\u30D7\u306E\u6570 - {count}");
21
+ injectString("ko-KR", "Number of selected child groups - {count}", "\uC120\uD0DD\uD55C \uD558\uC704 \uADF8\uB8F9 \uC218 - {count}");
22
+ injectString("ms", "Number of selected child groups - {count}", "Bilangan kumpulan anak yang dipilih - {count}");
23
+ injectString("nb-NO", "Number of selected child groups - {count}", "Antall utvalgte barnegrupper - {telling}");
24
+ injectString("nl", "Number of selected child groups - {count}", "Aantal geselecteerde onderliggende groepen - {count}");
25
+ injectString("pl", "Number of selected child groups - {count}", "Liczba wybranych grup podrz\u0119dnych: {count}");
26
+ injectString("pt-BR", "Number of selected child groups - {count}", "N\xFAmero de subgrupos selecionados - \u200B{count}");
27
+ injectString("sk-SK", "Number of selected child groups - {count}", "Po\u010Det vybran\xFDch podskup\xEDn - {count}");
28
+ injectString("sv", "Number of selected child groups - {count}", "Antal valda underordnade grupper: {count}");
29
+ injectString("th", "Number of selected child groups - {count}", "\u0E08\u0E33\u0E19\u0E27\u0E19\u0E01\u0E25\u0E38\u0E48\u0E21\u0E22\u0E48\u0E2D\u0E22\u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01 - {count}");
30
+ injectString("tr", "Number of selected child groups - {count}", "Se\xE7ilen alt grup say\u0131s\u0131 - {count}");
31
+ injectString("zh-Hans", "Number of selected child groups - {count}", "\u9009\u4E2D\u7684\u5B50\u7EC4\u6570\u91CF - {count}");
32
+ injectString("zh-TW", "Number of selected child groups - {count}", "\u6240\u9078\u5B50\u7FA4\u7D44\u7684\u6578\u76EE - {count}");
33
+ injectString("cs", "View {groupName} children", "Zobrazit pod\u0159\xEDzen\xE9 pro {groupName}");
34
+ injectString("da-DK", "View {groupName} children", "Se {groupName} b\xF8rn");
35
+ injectString("de", "View {groupName} children", "Untergruppen von {groupName} ansehen");
36
+ injectString("en", "View {groupName} children", "View {groupName} children");
37
+ injectString("es", "View {groupName} children", "Ver subgrupos de {groupName}");
38
+ injectString("fi-FI", "View {groupName} children", "N\xE4yt\xE4 {groupName} alaryhm\xE4t");
39
+ injectString("fr", "View {groupName} children", "Afficher les enfants de {groupName}");
40
+ injectString("fr-FR", "View {groupName} children", "Voir les enfants de {groupName}");
41
+ injectString("hu-HU", "View {groupName} children", "N\xE9zd meg a {groupName} gyermekcsoportokat.");
42
+ injectString("id", "View {groupName} children", "Lihat turunan {groupName}");
43
+ injectString("it", "View {groupName} children", "Visualizzare i sottogruppi di {groupName}");
44
+ injectString("ja", "View {groupName} children", "{groupName} \u306E\u5B50\u3092\u8868\u793A");
45
+ injectString("ko-KR", "View {groupName} children", "{groupName} \uD558\uC704 \uD56D\uBAA9 \uBCF4\uAE30");
46
+ injectString("ms", "View {groupName} children", "Lihat anak {groupName}");
47
+ injectString("nb-NO", "View {groupName} children", "Vis {groupName} barn");
48
+ injectString("nl", "View {groupName} children", "Subgroepen voor {groupName} weergeven");
49
+ injectString("pl", "View {groupName} children", "Wy\u015Bwietl podgrupy {groupName}");
50
+ injectString("pt-BR", "View {groupName} children", "Visualizar subgrupos de {groupName}");
51
+ injectString("sk-SK", "View {groupName} children", "Zobraz podskupiny {groupName}.");
52
+ injectString("sv", "View {groupName} children", "Visa {groupName} barn");
53
+ injectString("th", "View {groupName} children", "\u0E14\u0E39\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E22\u0E48\u0E2D\u0E22\u0E02\u0E2D\u0E07 {groupName}");
54
+ injectString("tr", "View {groupName} children", "{groupName} alt \xF6\u011Felerini g\xF6r\xFCnt\xFCle");
55
+ injectString("zh-Hans", "View {groupName} children", "\u67E5\u770B {groupName} \u5B50\u7EC4");
56
+ injectString("zh-TW", "View {groupName} children", "\u6AA2\u8996\u300C{groupName}\u300D\u5B50\u7FA4\u7D44");
57
+ injectString("cs", "Toggle {groupName} filter", "P\u0159epnout filtr pro {groupName}");
58
+ injectString("da-DK", "Toggle {groupName} filter", "Sl\xE5 {groupName} filter til og fra");
59
+ injectString("de", "Toggle {groupName} filter", "Filter f\xFCr {groupName} ein-/ausschalten");
60
+ injectString("en", "Toggle {groupName} filter", "Toggle {groupName} filter");
61
+ injectString("es", "Toggle {groupName} filter", "Alternar filtro {groupName}");
62
+ injectString("fi-FI", "Toggle {groupName} filter", "Vaihda {groupName} suodatinta");
63
+ injectString("fr", "Toggle {groupName} filter", "Basculer le filtre {groupName}");
64
+ injectString("fr-FR", "Toggle {groupName} filter", "Activer le filtre {groupName}");
65
+ injectString("hu-HU", "Toggle {groupName} filter", "Kapcsold be/ki a {groupName} sz\u0171r\u0151t.");
66
+ injectString("id", "Toggle {groupName} filter", "Aktifkan/nonaktifkan filter {groupName}");
67
+ injectString("it", "Toggle {groupName} filter", "Attivare/disattivare filtro {groupName}");
68
+ injectString("ja", "Toggle {groupName} filter", "{groupName} \u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u5207\u308A\u66FF\u3048\u308B");
69
+ injectString("ko-KR", "Toggle {groupName} filter", "{groupName} \uD544\uD130 \uC804\uD658");
70
+ injectString("ms", "Toggle {groupName} filter", "Togol penyaring {groupName}");
71
+ injectString("nb-NO", "Toggle {groupName} filter", "Sl\xE5 av/p\xE5 {groupName}-filter");
72
+ injectString("nl", "Toggle {groupName} filter", "Filter {groupName} in- of uitschakelen");
73
+ injectString("pl", "Toggle {groupName} filter", "Prze\u0142\u0105cz filtr {groupName}");
74
+ injectString("pt-BR", "Toggle {groupName} filter", "Alternar filtro {groupName}");
75
+ injectString("sk-SK", "Toggle {groupName} filter", "Prepn\xFA\u0165 filter {groupName}");
76
+ injectString("sv", "Toggle {groupName} filter", "V\xE4xla {groupName}-filter");
77
+ injectString("th", "Toggle {groupName} filter", "\u0E2A\u0E25\u0E31\u0E1A\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07 {groupName}");
78
+ injectString("tr", "Toggle {groupName} filter", "{groupName} filtresini de\u011Fi\u015Ftir");
79
+ injectString("zh-Hans", "Toggle {groupName} filter", "\u5207\u6362 {groupName} \u7B5B\u9009\u5668");
80
+ injectString("zh-TW", "Toggle {groupName} filter", "\u5207\u63DB\u300C{groupName}\u300D\u7BE9\u9078\u689D\u4EF6");
81
+ export const CheckboxListWithAction = ({
82
+ label,
83
+ options,
84
+ onChange,
85
+ onClick,
86
+ search = [],
87
+ className
88
+ }) => {
89
+ const {
90
+ translate
91
+ } = useLanguage();
92
+ const driveComponentClass = useDriveClassName("zen-checkbox-list-with-action");
93
+ const listId = useId();
94
+ const checkboxId = `${listId}_check_list-item_`;
95
+ const handleChange = e => {
96
+ const evtTarget = e.target;
97
+ const elId = evtTarget.getAttribute("id").replace(checkboxId, "");
98
+ onChange({
99
+ id: elId,
100
+ state: evtTarget.checked,
101
+ partial: e.target.dataset.indeterminate === "true"
102
+ });
103
+ };
104
+ const handleClick = e => {
105
+ var _a;
106
+ const evtTarget = e.target;
107
+ const elId = evtTarget.getAttribute("data-btn") || ((_a = evtTarget.parentElement) === null || _a === void 0 ? void 0 : _a.getAttribute("data-btn")) || "";
108
+ onClick(elId);
109
+ };
110
+ const getLabelColorInfo = (color, withRightPadding, isHidden, extraArgs) => {
111
+ if (!color) {
112
+ return null;
113
+ }
114
+ const colorAlpha = Math.round(color.a * 100 / 255) / 100;
115
+ const opacityValue = colorAlpha < 0.1 ? 0.1 : colorAlpha;
116
+ const colorString = `rgba(${color.r},${color.g},${color.b},${opacityValue})`;
117
+ return _jsx("div", Object.assign({}, extraArgs, {
118
+ className: classNames(["zen-checkbox-list-with-action__color-info", withRightPadding ? "zen-checkbox-list-with-action__color-info--right-indent" : "", isHidden ? "zen-checkbox-list-with-action__color-info--hidden" : ""]),
119
+ style: {
120
+ backgroundColor: colorString
121
+ }
122
+ }));
123
+ };
124
+ const getLabelCountSelectedChild = (countSelectedChild, extraArgs) => {
125
+ if (!countSelectedChild) {
126
+ return null;
127
+ }
128
+ return _jsx("div", Object.assign({}, extraArgs, {
129
+ "aria-hidden": "true",
130
+ className: "zen-checkbox-list-with-action__label-count",
131
+ children: _jsx("div", {
132
+ className: "zen-checkbox-list-with-action__counter",
133
+ children: _jsx("span", {
134
+ children: countSelectedChild
135
+ })
136
+ })
137
+ }));
138
+ };
139
+ const renderLabel = (option, lbl, ttl) => {
140
+ const additionalTitle = option.countSelectedChild && option.isWithAction ? translate("Number of selected child groups - {count}").replace("{count}", option.countSelectedChild.toString()) : "";
141
+ const title = option.isWithAction ? translate("View {groupName} children").replace("{groupName}", ttl).concat(additionalTitle ? `${". "}${additionalTitle}` : "") : translate("Toggle {groupName} filter").replace("{groupName}", ttl);
142
+ const classN = classNames(["zen-checkbox-list-with-action__label", "zen-ellipsis", option.isWithAction ? "zen-checkbox-list-with-action__label--action" : ""]);
143
+ const otherArgs = option.isWithAction ? {
144
+ "data-btn": option.property
145
+ } : {};
146
+ const childEl = _jsxs(_Fragment, {
147
+ children: [_jsxs("div", Object.assign({
148
+ className: "zen-checkbox-list-with-action__label-text zen-ellipsis"
149
+ }, otherArgs, {
150
+ children: [_jsx("span", Object.assign({
151
+ className: "zen-ellipsis"
152
+ }, otherArgs, {
153
+ children: lbl
154
+ })), getLabelCountSelectedChild(option.countSelectedChild, otherArgs)]
155
+ })), _jsxs("div", Object.assign({
156
+ className: "zen-checkbox-list-with-action__label-info"
157
+ }, otherArgs, {
158
+ children: [getLabelColorInfo(option.color, option.isWithAction, option.partialChecked, otherArgs), option.isWithAction && _jsx(IconChevronRight, {
159
+ size: "large"
160
+ })]
161
+ }))]
162
+ });
163
+ return option.isWithAction ? _jsx("button", Object.assign({
164
+ type: "button",
165
+ onClick: handleClick,
166
+ title: title,
167
+ className: classN
168
+ }, otherArgs, {
169
+ children: childEl
170
+ })) : _jsx("div", {
171
+ className: classN,
172
+ title: title,
173
+ children: childEl
174
+ });
175
+ };
176
+ const build = optionsArr => {
177
+ const selectSearchTerm = wholeString => {
178
+ if (!search.length) {
179
+ return wholeString;
180
+ }
181
+ let selectedString = wholeString;
182
+ search.forEach(searchPart => {
183
+ const strArr = selectedString.split(searchPart);
184
+ selectedString = strArr.map((str, ind) => _jsxs(Fragment, {
185
+ children: [ind ? _jsx("span", {
186
+ className: "zen-checkbox-list-with-action__singled",
187
+ children: searchPart
188
+ }, `searchTerm_${ind}_search`) : null, _jsx("span", {
189
+ children: str
190
+ }, `searchTerm_${ind}`)]
191
+ }, ind));
192
+ });
193
+ return selectedString;
17
194
  };
18
- const handleClick = (e) => {
19
- var _a;
20
- const evtTarget = e.target;
21
- const elId = evtTarget.getAttribute("data-btn") || ((_a = evtTarget.parentElement) === null || _a === void 0 ? void 0 : _a.getAttribute("data-btn")) || "";
22
- onClick(elId);
23
- };
24
- const getLabelColorInfo = (color, withRightPadding, isHidden, extraArgs) => {
25
- if (!color) {
26
- return null;
27
- }
28
- const colorAlpha = Math.round(color.a * 100 / 255) / 100;
29
- const opacityValue = colorAlpha < 0.1 ? 0.1 : colorAlpha;
30
- const colorString = `rgba(${color.r},${color.g},${color.b},${opacityValue})`;
31
- return _jsx("div", Object.assign({}, extraArgs, { className: classNames(["zen-checkbox-list-with-action__color-info", withRightPadding ? "zen-checkbox-list-with-action__color-info--right-indent" : "",
32
- isHidden ? "zen-checkbox-list-with-action__color-info--hidden" : ""]), style: { backgroundColor: colorString } }));
33
- };
34
- const getLabelCountSelectedChild = (countSelectedChild, extraArgs) => {
35
- if (!countSelectedChild) {
36
- return null;
37
- }
38
- return _jsx("div", Object.assign({}, extraArgs, { "aria-hidden": "true", className: "zen-checkbox-list-with-action__label-count", children: _jsx("div", { className: "zen-checkbox-list-with-action__counter", children: _jsx("span", { children: countSelectedChild }) }) }));
39
- };
40
- const renderLabel = (option, lbl, ttl) => {
41
- const additionalTitle = option.countSelectedChild && option.isWithAction ?
42
- translate("Number of selected child groups - {count}").replace("{count}", option.countSelectedChild.toString()) : "";
43
- const title = option.isWithAction ? translate("View {groupName} children").replace("{groupName}", ttl).concat(additionalTitle ? `${". "}${additionalTitle}` : "")
44
- : translate("Toggle {groupName} filter").replace("{groupName}", ttl);
45
- const classN = classNames(["zen-checkbox-list-with-action__label", "zen-ellipsis",
46
- option.isWithAction ? "zen-checkbox-list-with-action__label--action" : ""]);
47
- const otherArgs = option.isWithAction ? { "data-btn": option.property } : {};
48
- const childEl = _jsxs(_Fragment, { children: [_jsxs("div", Object.assign({ className: "zen-checkbox-list-with-action__label-text zen-ellipsis" }, otherArgs, { children: [_jsx("span", Object.assign({ className: "zen-ellipsis" }, otherArgs, { children: lbl })), getLabelCountSelectedChild(option.countSelectedChild, otherArgs)] })), _jsxs("div", Object.assign({ className: "zen-checkbox-list-with-action__label-info" }, otherArgs, { children: [getLabelColorInfo(option.color, option.isWithAction, option.partialChecked, otherArgs), option.isWithAction && _jsx(IconChevronRight, { size: "large" })] }))] });
49
- return option.isWithAction ? _jsx("button", Object.assign({ type: "button", onClick: handleClick, title: title, className: classN }, otherArgs, { children: childEl })) : _jsx("div", { className: classN, title: title, children: childEl });
50
- };
51
- const build = (optionsArr) => {
52
- const selectSearchTerm = (wholeString) => {
53
- if (!search.length) {
54
- return wholeString;
55
- }
56
- let selectedString = wholeString;
57
- search.forEach(searchPart => {
58
- const strArr = selectedString.split(searchPart);
59
- selectedString = strArr.map((str, ind) => _jsxs(Fragment, { children: [ind ? _jsx("span", { className: "zen-checkbox-list-with-action__singled", children: searchPart }, `searchTerm_${ind}_search`) : null, _jsx("span", { children: str }, `searchTerm_${ind}`)] }, ind));
60
- });
61
- return selectedString;
62
- };
63
- return optionsArr ? _jsx("ul", { className: "zen-checkbox-list-with-action__list", children: optionsArr.map((opt, ind) => {
64
- const titleForRender = opt.title || opt.label;
65
- const labelForRender = selectSearchTerm(opt.label);
66
- const labelElement = renderLabel(opt, labelForRender, titleForRender);
67
- return _jsxs("li", { className: classNames(["zen-checkbox-list-with-action__action-item", opt.isWithAction ? "zen-checkbox-list-with-action__action-item--action" : ""]), "data-item": opt.property, children: [_jsx(Checkbox, { id: `${checkboxId}${opt.property}`, onChange: handleChange, className: classNames(["zen-checkbox-list-with-action__list-item zen-checkbox-list-with-action__action-checkbox",
68
- opt.isWithAction ? "" : "zen-checkbox-list-with-action__action-checkbox--full-width"]), indeterminate: opt.partialChecked, checked: opt.checked, disabled: opt.blocked, title: translate("Toggle {groupName} filter").replace("{groupName}", titleForRender), "data-indeterminate": opt.partialChecked, children: opt.isWithAction ? null : labelElement }), opt.isWithAction && labelElement] }, `li_${ind}_${opt.property}`);
69
- }) }) : null;
70
- };
71
- return _jsxs("div", { className: classNames(["zen-checkbox-list-with-action", driveComponentClass || "", className || ""]), children: [label ? _jsx("div", { className: "zen-checkbox-list-with-action__title", children: label }) : null, build(options)] });
195
+ return optionsArr ? _jsx("ul", {
196
+ className: "zen-checkbox-list-with-action__list",
197
+ children: optionsArr.map((opt, ind) => {
198
+ const titleForRender = opt.title || opt.label;
199
+ const labelForRender = selectSearchTerm(opt.label);
200
+ const labelElement = renderLabel(opt, labelForRender, titleForRender);
201
+ return _jsxs("li", {
202
+ className: classNames(["zen-checkbox-list-with-action__action-item", opt.isWithAction ? "zen-checkbox-list-with-action__action-item--action" : ""]),
203
+ "data-item": opt.property,
204
+ children: [_jsx(Checkbox, {
205
+ id: `${checkboxId}${opt.property}`,
206
+ onChange: handleChange,
207
+ className: classNames(["zen-checkbox-list-with-action__list-item zen-checkbox-list-with-action__action-checkbox", opt.isWithAction ? "" : "zen-checkbox-list-with-action__action-checkbox--full-width"]),
208
+ indeterminate: opt.partialChecked,
209
+ checked: opt.checked,
210
+ disabled: opt.blocked,
211
+ title: translate("Toggle {groupName} filter").replace("{groupName}", titleForRender),
212
+ "data-indeterminate": opt.partialChecked,
213
+ children: opt.isWithAction ? null : labelElement
214
+ }), opt.isWithAction && labelElement]
215
+ }, `li_${ind}_${opt.property}`);
216
+ })
217
+ }) : null;
218
+ };
219
+ return _jsxs("div", {
220
+ className: classNames(["zen-checkbox-list-with-action", driveComponentClass || "", className || ""]),
221
+ children: [label ? _jsx("div", {
222
+ className: "zen-checkbox-list-with-action__title",
223
+ children: label
224
+ }) : null, build(options)]
225
+ });
72
226
  };
73
- export const TRANSLATIONS = [
74
- "View {groupName} children",
75
- "Toggle {groupName} filter",
76
- "Number of selected child groups - {count}"
77
- ];
227
+ export const TRANSLATIONS = ["View {groupName} children", "Toggle {groupName} filter", "Number of selected child groups - {count}"];
package/esm/chip/chip.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { injectString } from "../utils/localization/translationsDictionary";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { createElement, useCallback, useId, useMemo } from "react";
3
4
  import { useDrive } from "../utils/theme/useDrive";
@@ -7,95 +8,193 @@ import { getChipStateClassName, getChipTriggerStateClassName } from "./utils/get
7
8
  import { IconClose } from "../icons/iconClose";
8
9
  import { useLanguage } from "../utils/localization/useLanguage";
9
10
  import { useChip } from "./utils/useChip";
11
+ injectString("cs", "Close", "Zav\u0159\xEDt");
12
+ injectString("da-DK", "Close", "Luk");
13
+ injectString("de", "Close", "Schlie\xDFen");
14
+ injectString("en", "Close", "Close");
15
+ injectString("es", "Close", "Cerrar");
16
+ injectString("fi-FI", "Close", "Sulje");
17
+ injectString("fr", "Close", "Fermer");
18
+ injectString("fr-FR", "Close", "Fermer");
19
+ injectString("hu-HU", "Close", "Z\xE1rd be.");
20
+ injectString("id", "Close", "Tutup");
21
+ injectString("it", "Close", "Chiudere");
22
+ injectString("ja", "Close", "\u9589\u3058\u308B");
23
+ injectString("ko-KR", "Close", "\uB2EB\uAE30");
24
+ injectString("ms", "Close", "Tutup");
25
+ injectString("nb-NO", "Close", "Lukk");
26
+ injectString("nl", "Close", "Sluiten");
27
+ injectString("pl", "Close", "Zamknij");
28
+ injectString("pt-BR", "Close", "Fechar");
29
+ injectString("sk-SK", "Close", "Zatvor");
30
+ injectString("sv", "Close", "St\xE4ng");
31
+ injectString("th", "Close", "\u0E1B\u0E34\u0E14");
32
+ injectString("tr", "Close", "Kapat");
33
+ injectString("zh-Hans", "Close", "\u5173\u95ED");
34
+ injectString("zh-TW", "Close", "\u95DC\u9589");
10
35
  function isChipTrigger(props) {
11
- return "triggerRef" in props;
36
+ return "triggerRef" in props;
12
37
  }
13
- export const Chip = (props) => {
14
- const { className, children, disabled, icon, id, status, quantity, onClose, title } = props;
15
- const isTriggerMode = isChipTrigger(props);
16
- const readonly = !isTriggerMode ? props.readonly : undefined;
17
- const onChange = !isTriggerMode ? props.onChange : undefined;
18
- const active = !isTriggerMode ? props.active : false;
19
- const triggerRef = isTriggerMode ? props.triggerRef : undefined;
20
- const closeAriaText = isTriggerMode ? props.closeAriaText : undefined;
21
- const isOpen = isTriggerMode ? props.isOpen : false;
22
- const onClick = isTriggerMode ? props.onClick : undefined;
23
- const hasQuantity = typeof quantity === "number";
24
- const chipId = useId();
25
- const isDrive = useDrive();
26
- const { translate } = useLanguage();
27
- const driveTextClass = useDriveClassName("zen-chip-text-content");
28
- const driveChipClass = useDriveClassName("zen-chip");
29
- const hasIcon = !!icon;
30
- const isClosable = !!onClose;
31
- const hasContent = !!children;
32
- const { ref, title: chipTitle } = useChip(title, isTriggerMode ? { triggerRef: triggerRef, children } : undefined);
33
- const svgIcon = useMemo(() => hasIcon ? createElement(icon, {
34
- className: "zen-chip__icon",
35
- size: isDrive ? "huger" : "large"
36
- }) : null, [hasIcon, icon, isDrive]);
37
- const onChangeHandler = useCallback((e) => {
38
- if (readonly || !onChange) {
39
- return;
40
- }
41
- onChange(e.target.checked);
42
- }, [onChange, readonly]);
43
- const handleClick = useCallback(() => {
44
- if (onClick) {
45
- onClick(!isOpen);
46
- }
47
- }, [onClick, isOpen]);
48
- const onKeyDownHandler = useCallback((e) => {
49
- if (e.key === "Enter" && !disabled && !readonly && onChange) {
50
- onChange(!active);
51
- return;
52
- }
53
- if (e.key === " " && !disabled && !readonly && onChange) {
54
- e.preventDefault();
55
- onChange(!active);
56
- }
57
- }, [disabled, readonly, active, onChange]);
58
- const chipTriggerKeyDownHandler = useCallback((e) => {
59
- var _a;
60
- if ((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.classList.contains("zen-chip__close-button")) {
61
- return;
62
- }
63
- if (e.key === "Enter" && !disabled && !readonly) {
64
- e.preventDefault();
65
- handleClick();
66
- return;
67
- }
68
- if (e.key === " " && !disabled && !readonly) {
69
- handleClick();
70
- }
71
- }, [disabled, readonly, handleClick]);
72
- const onKeyUpHandler = useCallback((e) => {
73
- var _a;
74
- if (e.key === "Tab" || e.key === "Enter" || e.key === " ") {
75
- (_a = ref.current) === null || _a === void 0 ? void 0 : _a.classList.add("zen-chip--keyboard-nav");
76
- }
77
- }, [ref]);
78
- const onBlurHandler = useCallback(() => {
79
- var _a;
80
- (_a = ref.current) === null || _a === void 0 ? void 0 : _a.classList.remove("zen-chip--keyboard-nav");
81
- }, [ref]);
82
- const handleClose = useCallback((e) => {
83
- e.stopPropagation();
84
- e.preventDefault();
85
- isClosable && onClose(id || chipId);
86
- }, [isClosable, onClose, id, chipId]);
87
- const memoizedClasses = useMemo(() => [
88
- "zen-chip",
89
- driveChipClass !== null && driveChipClass !== void 0 ? driveChipClass : "",
90
- isTriggerMode ? getChipTriggerStateClassName(!!disabled, isOpen, status) : getChipStateClassName(!!disabled, !!readonly, active, status),
91
- className !== null && className !== void 0 ? className : ""
92
- ], [driveChipClass, isTriggerMode, disabled, isOpen, status, readonly, active, className]);
93
- const chipComponent = useMemo(() => _jsxs("label", { className: classNames(memoizedClasses), ref: ref, title: title || chipTitle, htmlFor: id || chipId, children: [_jsx("input", { checked: active, onBlur: onBlurHandler, onKeyUp: onKeyUpHandler, onKeyDown: onKeyDownHandler, onChange: onChangeHandler, id: id || chipId, className: "zen-chip__input", type: "checkbox", disabled: disabled, readOnly: readonly }), children ? _jsx("div", { className: classNames(["zen-chip-text-content", driveTextClass !== null && driveTextClass !== void 0 ? driveTextClass : ""]), children: children }) : null, svgIcon, isClosable && _jsx("button", { type: "button", className: "zen-chip__close-button", onClick: handleClose, title: closeAriaText || translate("Close"), "aria-label": closeAriaText || translate("Close"), children: _jsx(IconClose, { size: isDrive ? "huger" : "large", className: "zen-pill-non-actionable__close-icon" }) })] }), [memoizedClasses, ref, title, chipTitle, id, chipId, active, onBlurHandler, onKeyUpHandler, onKeyDownHandler, onChangeHandler, disabled, readonly,
94
- children, driveTextClass, svgIcon, isClosable, handleClose, closeAriaText, translate, isDrive]);
95
- const chipTriggerComponent = useMemo(() => {
96
- const extraAttributes = title ? { "aria-label": title } : chipTitle ? { "aria-label": chipTitle } : {};
97
- return _jsx("div", Object.assign({ role: "button", tabIndex: 0 }, extraAttributes, { onClick: handleClick, onKeyDown: chipTriggerKeyDownHandler, className: classNames(memoizedClasses), "data-id": id || chipId, ref: triggerRef, children: _jsxs("div", { className: "zen-chip__content-wrapper", children: [hasContent ? _jsx("div", { className: classNames(["zen-chip-text-content", driveTextClass !== null && driveTextClass !== void 0 ? driveTextClass : ""]), children: children }) : null, svgIcon, isClosable && _jsx("button", { type: "button", className: "zen-chip__close-button", onClick: handleClose, title: closeAriaText || translate("Close"), "aria-label": closeAriaText || translate("Close"), children: _jsx(IconClose, { size: isDrive ? "huger" : "large", className: "zen-pill-non-actionable__close-icon" }) }), hasQuantity && quantity ? _jsx("div", { className: "zen-chip__quantity", children: quantity }) : null] }) }));
98
- }, [title, chipTitle, handleClick, chipTriggerKeyDownHandler, memoizedClasses, id, chipId, triggerRef, hasContent, driveTextClass,
99
- children, svgIcon, isClosable, handleClose, closeAriaText, translate, isDrive, hasQuantity, quantity]);
100
- return isTriggerMode ? chipTriggerComponent : chipComponent;
101
- };
38
+ export const Chip = props => {
39
+ const {
40
+ className,
41
+ children,
42
+ disabled,
43
+ icon,
44
+ id,
45
+ status,
46
+ quantity,
47
+ onClose,
48
+ title
49
+ } = props;
50
+ const isTriggerMode = isChipTrigger(props);
51
+ const readonly = !isTriggerMode ? props.readonly : undefined;
52
+ const onChange = !isTriggerMode ? props.onChange : undefined;
53
+ const active = !isTriggerMode ? props.active : false;
54
+ const triggerRef = isTriggerMode ? props.triggerRef : undefined;
55
+ const closeAriaText = isTriggerMode ? props.closeAriaText : undefined;
56
+ const isOpen = isTriggerMode ? props.isOpen : false;
57
+ const onClick = isTriggerMode ? props.onClick : undefined;
58
+ const hasQuantity = typeof quantity === "number";
59
+ const chipId = useId();
60
+ const isDrive = useDrive();
61
+ const {
62
+ translate
63
+ } = useLanguage();
64
+ const driveTextClass = useDriveClassName("zen-chip-text-content");
65
+ const driveChipClass = useDriveClassName("zen-chip");
66
+ const hasIcon = !!icon;
67
+ const isClosable = !!onClose;
68
+ const hasContent = !!children;
69
+ const {
70
+ ref,
71
+ title: chipTitle
72
+ } = useChip(title, isTriggerMode ? {
73
+ triggerRef: triggerRef,
74
+ children
75
+ } : undefined);
76
+ const svgIcon = useMemo(() => hasIcon ? createElement(icon, {
77
+ className: "zen-chip__icon",
78
+ size: isDrive ? "huger" : "large"
79
+ }) : null, [hasIcon, icon, isDrive]);
80
+ const onChangeHandler = useCallback(e => {
81
+ if (readonly || !onChange) {
82
+ return;
83
+ }
84
+ onChange(e.target.checked);
85
+ }, [onChange, readonly]);
86
+ const handleClick = useCallback(() => {
87
+ if (onClick) {
88
+ onClick(!isOpen);
89
+ }
90
+ }, [onClick, isOpen]);
91
+ const onKeyDownHandler = useCallback(e => {
92
+ if (e.key === "Enter" && !disabled && !readonly && onChange) {
93
+ onChange(!active);
94
+ return;
95
+ }
96
+ if (e.key === " " && !disabled && !readonly && onChange) {
97
+ e.preventDefault();
98
+ onChange(!active);
99
+ }
100
+ }, [disabled, readonly, active, onChange]);
101
+ const chipTriggerKeyDownHandler = useCallback(e => {
102
+ var _a;
103
+ if ((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.classList.contains("zen-chip__close-button")) {
104
+ return;
105
+ }
106
+ if (e.key === "Enter" && !disabled && !readonly) {
107
+ e.preventDefault();
108
+ handleClick();
109
+ return;
110
+ }
111
+ if (e.key === " " && !disabled && !readonly) {
112
+ handleClick();
113
+ }
114
+ }, [disabled, readonly, handleClick]);
115
+ const onKeyUpHandler = useCallback(e => {
116
+ var _a;
117
+ if (e.key === "Tab" || e.key === "Enter" || e.key === " ") {
118
+ (_a = ref.current) === null || _a === void 0 ? void 0 : _a.classList.add("zen-chip--keyboard-nav");
119
+ }
120
+ }, [ref]);
121
+ const onBlurHandler = useCallback(() => {
122
+ var _a;
123
+ (_a = ref.current) === null || _a === void 0 ? void 0 : _a.classList.remove("zen-chip--keyboard-nav");
124
+ }, [ref]);
125
+ const handleClose = useCallback(e => {
126
+ e.stopPropagation();
127
+ e.preventDefault();
128
+ isClosable && onClose(id || chipId);
129
+ }, [isClosable, onClose, id, chipId]);
130
+ const memoizedClasses = useMemo(() => ["zen-chip", driveChipClass !== null && driveChipClass !== void 0 ? driveChipClass : "", isTriggerMode ? getChipTriggerStateClassName(!!disabled, isOpen, status) : getChipStateClassName(!!disabled, !!readonly, active, status), className !== null && className !== void 0 ? className : ""], [driveChipClass, isTriggerMode, disabled, isOpen, status, readonly, active, className]);
131
+ const chipComponent = useMemo(() => _jsxs("label", {
132
+ className: classNames(memoizedClasses),
133
+ ref: ref,
134
+ title: title || chipTitle,
135
+ htmlFor: id || chipId,
136
+ children: [_jsx("input", {
137
+ checked: active,
138
+ onBlur: onBlurHandler,
139
+ onKeyUp: onKeyUpHandler,
140
+ onKeyDown: onKeyDownHandler,
141
+ onChange: onChangeHandler,
142
+ id: id || chipId,
143
+ className: "zen-chip__input",
144
+ type: "checkbox",
145
+ disabled: disabled,
146
+ readOnly: readonly
147
+ }), children ? _jsx("div", {
148
+ className: classNames(["zen-chip-text-content", driveTextClass !== null && driveTextClass !== void 0 ? driveTextClass : ""]),
149
+ children: children
150
+ }) : null, svgIcon, isClosable && _jsx("button", {
151
+ type: "button",
152
+ className: "zen-chip__close-button",
153
+ onClick: handleClose,
154
+ title: closeAriaText || translate("Close"),
155
+ "aria-label": closeAriaText || translate("Close"),
156
+ children: _jsx(IconClose, {
157
+ size: isDrive ? "huger" : "large",
158
+ className: "zen-pill-non-actionable__close-icon"
159
+ })
160
+ })]
161
+ }), [memoizedClasses, ref, title, chipTitle, id, chipId, active, onBlurHandler, onKeyUpHandler, onKeyDownHandler, onChangeHandler, disabled, readonly, children, driveTextClass, svgIcon, isClosable, handleClose, closeAriaText, translate, isDrive]);
162
+ const chipTriggerComponent = useMemo(() => {
163
+ const extraAttributes = title ? {
164
+ "aria-label": title
165
+ } : chipTitle ? {
166
+ "aria-label": chipTitle
167
+ } : {};
168
+ return _jsx("div", Object.assign({
169
+ role: "button",
170
+ tabIndex: 0
171
+ }, extraAttributes, {
172
+ onClick: handleClick,
173
+ onKeyDown: chipTriggerKeyDownHandler,
174
+ className: classNames(memoizedClasses),
175
+ "data-id": id || chipId,
176
+ ref: triggerRef,
177
+ children: _jsxs("div", {
178
+ className: "zen-chip__content-wrapper",
179
+ children: [hasContent ? _jsx("div", {
180
+ className: classNames(["zen-chip-text-content", driveTextClass !== null && driveTextClass !== void 0 ? driveTextClass : ""]),
181
+ children: children
182
+ }) : null, svgIcon, isClosable && _jsx("button", {
183
+ type: "button",
184
+ className: "zen-chip__close-button",
185
+ onClick: handleClose,
186
+ title: closeAriaText || translate("Close"),
187
+ "aria-label": closeAriaText || translate("Close"),
188
+ children: _jsx(IconClose, {
189
+ size: isDrive ? "huger" : "large",
190
+ className: "zen-pill-non-actionable__close-icon"
191
+ })
192
+ }), hasQuantity && quantity ? _jsx("div", {
193
+ className: "zen-chip__quantity",
194
+ children: quantity
195
+ }) : null]
196
+ })
197
+ }));
198
+ }, [title, chipTitle, handleClick, chipTriggerKeyDownHandler, memoizedClasses, id, chipId, triggerRef, hasContent, driveTextClass, children, svgIcon, isClosable, handleClose, closeAriaText, translate, isDrive, hasQuantity, quantity]);
199
+ return isTriggerMode ? chipTriggerComponent : chipComponent;
200
+ };