@geotab/zenith 3.16.0 → 3.17.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -1
- package/README.md.baseline +1 -0
- package/dist/absolute/absolute.js +5 -1
- package/dist/button/button.d.ts +2 -1
- package/dist/button/button.js +22 -5
- package/dist/checkboxListWithAction/checkboxListWithAction.d.ts +2 -0
- package/dist/checkboxListWithAction/checkboxListWithAction.js +1 -1
- package/dist/commonHelpers/ShowMoreCell.d.ts +5 -0
- package/dist/commonHelpers/ShowMoreCell.js +66 -0
- package/dist/commonHelpers/getAriaAttributes.js +6 -9
- package/dist/commonHelpers/getNonAriaProps.d.ts +11 -0
- package/dist/commonHelpers/getNonAriaProps.js +19 -0
- package/dist/commonHelpers/hooks/useScroll.d.ts +1 -1
- package/dist/commonHelpers/hooks/useScroll.js +6 -6
- package/dist/commonHelpers/isAriaProp.d.ts +9 -0
- package/dist/commonHelpers/isAriaProp.js +13 -0
- package/dist/commonHelpers/showMoreRow.d.ts +28 -0
- package/dist/commonHelpers/showMoreRow.js +29 -0
- package/dist/commonHelpers/tabsKeyboard.d.ts +1 -1
- package/dist/commonHelpers/tabsKeyboard.js +15 -1
- package/dist/commonStyles/colors/colors.less +18 -0
- package/dist/dataFeed/dataFeedColumnsItems.js +3 -1
- package/dist/dataGrid/columns/checkboxColumn/checkboxCell.d.ts +2 -1
- package/dist/dataGrid/columns/checkboxColumn/checkboxCell.js +1 -1
- package/dist/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.d.ts +4 -2
- package/dist/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.js +10 -1
- package/dist/dataGrid/dataGrid.d.ts +5 -1
- package/dist/dataGrid/dataGrid.js +39 -2
- package/dist/dataGrid/lazyLoadingEnd/lazyLoadingEnd.d.ts +3 -0
- package/dist/dataGrid/lazyLoadingEnd/lazyLoadingEnd.js +54 -0
- package/dist/dataGrid/row/row.js +20 -2
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +3 -1
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +39 -4
- package/dist/dataGrid/withSelectableRows/withSelectableRows.js +73 -12
- package/dist/dropdown/dropdownTrigger.d.ts +1 -1
- package/dist/dropdownRaw/dropdownHelper.d.ts +12 -0
- package/dist/dropdownRaw/dropdownHelper.js +32 -11
- package/dist/dropdownRaw/dropdownRaw.js +36 -8
- package/dist/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
- package/dist/dropdownRaw/dropdownSearchableTrigger.js +13 -6
- package/dist/dropdownRaw/dropdownTrigger.d.ts +2 -1
- package/dist/dropdownRaw/dropdownTrigger.js +2 -2
- package/dist/dropdownRaw/stateReducer/stateReducer.d.ts +8 -0
- package/dist/dropdownRaw/stateReducer/stateReducer.js +5 -2
- package/dist/dropdownRaw/types.d.ts +36 -0
- package/dist/filterButton/filterButton.d.ts +1 -1
- package/dist/formGroup/hooks/rowHooks/useLabelClasses.js +8 -2
- package/dist/formLayout/utils/applyLayoutPosition/applyLayoutPosition.d.ts +2 -1
- package/dist/formLayout/utils/applyLayoutPosition/applyLayoutPosition.js +37 -90
- package/dist/header/components/collapsedItemsControl/collapsedItemsControl.d.ts +1 -1
- package/dist/header/components/collapsedItemsControl/collapsedItemsControl.js +6 -2
- package/dist/header/headerButton.d.ts +3 -1
- package/dist/header/headerButton.js +4 -2
- package/dist/header/headerMenu.d.ts +2 -0
- package/dist/header/headerMenu.js +1 -1
- package/dist/index.css +319 -68
- package/dist/index.d.ts +3 -1
- package/dist/index.js +9 -3
- package/dist/menu/components/menuButton.d.ts +3 -1
- package/dist/menu/components/menuButton.js +66 -47
- package/dist/menu/components/menuItem.js +4 -4
- package/dist/miniTabs/miniTabs.js +4 -2
- package/dist/pageHeader/pageHeaderButton.d.ts +1 -1
- package/dist/pageHeader/pageHeaderButton.js +4 -2
- package/dist/pagination/pagination.d.ts +19 -4
- package/dist/pagination/pagination.js +21 -1
- package/dist/pagination/paginationText/paginationText.d.ts +7 -1
- package/dist/pagination/paginationText/paginationText.js +6 -3
- package/dist/pillExpandable/pillContent.d.ts +3 -2
- package/dist/pillExpandable/pillContent.js +2 -2
- package/dist/pillExpandable/pillExpandable.js +20 -5
- package/dist/pillExpandable/pillExpandablePopoverContent.d.ts +3 -2
- package/dist/pillExpandable/pillExpandablePopoverContent.js +1 -1
- package/dist/pillExpandable/pillExpandableSimple.d.ts +3 -1
- package/dist/pillExpandable/pillExpandableSimple.js +19 -9
- package/dist/selectList/selectList.js +1 -0
- package/dist/selectList/selectListItem.d.ts +10 -1
- package/dist/selectList/selectListItem.js +12 -9
- package/dist/table/children/tablePagination.d.ts +1 -1
- package/dist/table/children/useTableChildren.d.ts +4 -2
- package/dist/table/children/useTableChildren.js +64 -16
- package/dist/table/nested/nestedData.d.ts +29 -1
- package/dist/table/nested/nestedData.js +45 -4
- package/dist/table/nested/useNestedRows.js +18 -22
- package/dist/table/nested/useShowMore.d.ts +41 -0
- package/dist/table/nested/useShowMore.js +56 -0
- package/dist/table/selectable/interfaces.d.ts +17 -0
- package/dist/table/selectable/useDragSelection.d.ts +10 -0
- package/dist/table/selectable/useDragSelection.js +145 -0
- package/dist/table/selectable/useSelectableRows.d.ts +5 -2
- package/dist/table/selectable/useSelectableRows.js +131 -36
- package/dist/table/selectable/utils/calculateSelectionState.d.ts +1 -1
- package/dist/table/selectable/utils/calculateSelectionState.js +43 -7
- package/dist/table/selectable/utils/checkRow.js +4 -2
- package/dist/table/selectable/utils/getCurrentPageSelection.js +9 -5
- package/dist/table/selectable/utils/getDragSelectionRows.d.ts +15 -0
- package/dist/table/selectable/utils/getDragSelectionRows.js +28 -0
- package/dist/table/selectable/utils/getRangeIds.d.ts +2 -0
- package/dist/table/selectable/utils/getRangeIds.js +21 -0
- package/dist/table/selectable/utils/isRowChecked.d.ts +1 -1
- package/dist/table/selectable/utils/isRowChecked.js +40 -7
- package/dist/table/table.d.ts +1 -2
- package/dist/table/table.js +58 -31
- package/dist/tabs/tabs.d.ts +1 -0
- package/dist/tabs/tabs.js +50 -17
- package/dist/textInputRaw/textInputRaw.js +3 -2
- package/dist/tooltip/tooltip.d.ts +2 -0
- package/dist/tooltip/tooltip.js +19 -7
- package/dist/utils/localization/translations/ar-001.json +1 -0
- package/dist/utils/localization/translations/bg-BG.json +1 -0
- package/dist/utils/localization/translations/cs.json +1 -0
- package/dist/utils/localization/translations/da-DK.json +1 -0
- package/dist/utils/localization/translations/de.json +1 -0
- package/dist/utils/localization/translations/el-GR.json +1 -0
- package/dist/utils/localization/translations/en.json +4 -0
- package/dist/utils/localization/translations/es.json +1 -0
- package/dist/utils/localization/translations/et-EE.json +1 -0
- package/dist/utils/localization/translations/fi-FI.json +1 -0
- package/dist/utils/localization/translations/fr-FR.json +1 -0
- package/dist/utils/localization/translations/fr.json +1 -0
- package/dist/utils/localization/translations/hu-HU.json +1 -0
- package/dist/utils/localization/translations/id.json +1 -0
- package/dist/utils/localization/translations/it.json +1 -0
- package/dist/utils/localization/translations/ja.json +1 -0
- package/dist/utils/localization/translations/ka-GE.json +1 -0
- package/dist/utils/localization/translations/ko-KR.json +1 -0
- package/dist/utils/localization/translations/lt-LT.json +1 -0
- package/dist/utils/localization/translations/lv-LV.json +1 -0
- package/dist/utils/localization/translations/ms.json +1 -0
- package/dist/utils/localization/translations/nb-NO.json +1 -0
- package/dist/utils/localization/translations/nl.json +1 -0
- package/dist/utils/localization/translations/pl.json +1 -0
- package/dist/utils/localization/translations/pt-BR.json +1 -0
- package/dist/utils/localization/translations/pt-PT.json +1 -0
- package/dist/utils/localization/translations/ro-RO.json +1 -0
- package/dist/utils/localization/translations/sk-SK.json +1 -0
- package/dist/utils/localization/translations/sv.json +1 -0
- package/dist/utils/localization/translations/th.json +1 -0
- package/dist/utils/localization/translations/tr.json +1 -0
- package/dist/utils/localization/translations/zh-Hans.json +1 -0
- package/dist/utils/localization/translations/zh-TW.json +1 -0
- package/dist/waiting/waiting.js +97 -1
- package/esm/absolute/absolute.js +5 -1
- package/esm/button/button.d.ts +2 -1
- package/esm/button/button.js +22 -5
- package/esm/checkboxListWithAction/checkboxListWithAction.d.ts +2 -0
- package/esm/checkboxListWithAction/checkboxListWithAction.js +1 -1
- package/esm/commonHelpers/ShowMoreCell.d.ts +5 -0
- package/esm/commonHelpers/ShowMoreCell.js +57 -0
- package/esm/commonHelpers/getAriaAttributes.js +6 -9
- package/esm/commonHelpers/getNonAriaProps.d.ts +11 -0
- package/esm/commonHelpers/getNonAriaProps.js +15 -0
- package/esm/commonHelpers/hooks/useScroll.d.ts +1 -1
- package/esm/commonHelpers/hooks/useScroll.js +6 -6
- package/esm/commonHelpers/isAriaProp.d.ts +9 -0
- package/esm/commonHelpers/isAriaProp.js +9 -0
- package/esm/commonHelpers/showMoreRow.d.ts +28 -0
- package/esm/commonHelpers/showMoreRow.js +22 -0
- package/esm/commonHelpers/tabsKeyboard.d.ts +1 -1
- package/esm/commonHelpers/tabsKeyboard.js +15 -1
- package/esm/commonStyles/colors/colorsConstant.js +11 -11
- package/esm/dataFeed/dataFeedColumnsItems.js +3 -1
- package/esm/dataGrid/columns/checkboxColumn/checkboxCell.d.ts +2 -1
- package/esm/dataGrid/columns/checkboxColumn/checkboxCell.js +1 -1
- package/esm/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.d.ts +4 -2
- package/esm/dataGrid/columns/checkboxColumn/checkboxColumnWrapper.js +10 -1
- package/esm/dataGrid/dataGrid.d.ts +5 -1
- package/esm/dataGrid/dataGrid.js +38 -2
- package/esm/dataGrid/lazyLoadingEnd/lazyLoadingEnd.d.ts +3 -0
- package/esm/dataGrid/lazyLoadingEnd/lazyLoadingEnd.js +45 -0
- package/esm/dataGrid/row/row.js +20 -2
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +3 -1
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +39 -4
- package/esm/dataGrid/withSelectableRows/withSelectableRows.js +73 -12
- package/esm/dropdown/dropdownTrigger.d.ts +1 -1
- package/esm/dropdownRaw/dropdownHelper.d.ts +12 -0
- package/esm/dropdownRaw/dropdownHelper.js +30 -10
- package/esm/dropdownRaw/dropdownRaw.js +37 -9
- package/esm/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
- package/esm/dropdownRaw/dropdownSearchableTrigger.js +13 -6
- package/esm/dropdownRaw/dropdownTrigger.d.ts +2 -1
- package/esm/dropdownRaw/dropdownTrigger.js +2 -2
- package/esm/dropdownRaw/stateReducer/stateReducer.d.ts +8 -0
- package/esm/dropdownRaw/stateReducer/stateReducer.js +5 -2
- package/esm/dropdownRaw/types.d.ts +36 -0
- package/esm/filterButton/filterButton.d.ts +1 -1
- package/esm/formGroup/hooks/rowHooks/useLabelClasses.js +8 -2
- package/esm/formLayout/utils/applyLayoutPosition/applyLayoutPosition.d.ts +2 -1
- package/esm/formLayout/utils/applyLayoutPosition/applyLayoutPosition.js +37 -90
- package/esm/header/components/collapsedItemsControl/collapsedItemsControl.d.ts +1 -1
- package/esm/header/components/collapsedItemsControl/collapsedItemsControl.js +6 -2
- package/esm/header/headerButton.d.ts +3 -1
- package/esm/header/headerButton.js +4 -2
- package/esm/header/headerMenu.d.ts +2 -0
- package/esm/header/headerMenu.js +1 -1
- package/esm/index.d.ts +3 -1
- package/esm/index.js +3 -1
- package/esm/menu/components/menuButton.d.ts +3 -1
- package/esm/menu/components/menuButton.js +66 -47
- package/esm/menu/components/menuItem.js +4 -4
- package/esm/miniTabs/miniTabs.js +4 -2
- package/esm/pageHeader/pageHeaderButton.d.ts +1 -1
- package/esm/pageHeader/pageHeaderButton.js +4 -2
- package/esm/pagination/pagination.d.ts +19 -4
- package/esm/pagination/pagination.js +21 -1
- package/esm/pagination/paginationText/paginationText.d.ts +7 -1
- package/esm/pagination/paginationText/paginationText.js +6 -3
- package/esm/pillExpandable/pillContent.d.ts +3 -2
- package/esm/pillExpandable/pillContent.js +2 -2
- package/esm/pillExpandable/pillExpandable.js +20 -5
- package/esm/pillExpandable/pillExpandablePopoverContent.d.ts +3 -2
- package/esm/pillExpandable/pillExpandablePopoverContent.js +1 -1
- package/esm/pillExpandable/pillExpandableSimple.d.ts +3 -1
- package/esm/pillExpandable/pillExpandableSimple.js +20 -10
- package/esm/selectList/selectList.js +1 -0
- package/esm/selectList/selectListItem.d.ts +10 -1
- package/esm/selectList/selectListItem.js +12 -9
- package/esm/table/children/tablePagination.d.ts +1 -1
- package/esm/table/children/useTableChildren.d.ts +4 -2
- package/esm/table/children/useTableChildren.js +64 -16
- package/esm/table/nested/nestedData.d.ts +29 -1
- package/esm/table/nested/nestedData.js +44 -3
- package/esm/table/nested/useNestedRows.js +18 -22
- package/esm/table/nested/useShowMore.d.ts +41 -0
- package/esm/table/nested/useShowMore.js +52 -0
- package/esm/table/selectable/interfaces.d.ts +17 -0
- package/esm/table/selectable/useDragSelection.d.ts +10 -0
- package/esm/table/selectable/useDragSelection.js +141 -0
- package/esm/table/selectable/useSelectableRows.d.ts +5 -2
- package/esm/table/selectable/useSelectableRows.js +129 -35
- package/esm/table/selectable/utils/calculateSelectionState.d.ts +1 -1
- package/esm/table/selectable/utils/calculateSelectionState.js +43 -7
- package/esm/table/selectable/utils/checkRow.js +4 -2
- package/esm/table/selectable/utils/getCurrentPageSelection.js +9 -5
- package/esm/table/selectable/utils/getDragSelectionRows.d.ts +15 -0
- package/esm/table/selectable/utils/getDragSelectionRows.js +24 -0
- package/esm/table/selectable/utils/getRangeIds.d.ts +2 -0
- package/esm/table/selectable/utils/getRangeIds.js +17 -0
- package/esm/table/selectable/utils/isRowChecked.d.ts +1 -1
- package/esm/table/selectable/utils/isRowChecked.js +40 -7
- package/esm/table/table.d.ts +1 -2
- package/esm/table/table.js +43 -16
- package/esm/tabs/tabs.d.ts +1 -0
- package/esm/tabs/tabs.js +50 -17
- package/esm/textInputRaw/textInputRaw.js +3 -2
- package/esm/tooltip/tooltip.d.ts +2 -0
- package/esm/tooltip/tooltip.js +19 -7
- package/esm/utils/localization/translations/ar-001.json +1 -0
- package/esm/utils/localization/translations/bg-BG.json +1 -0
- package/esm/utils/localization/translations/cs.json +1 -0
- package/esm/utils/localization/translations/da-DK.json +1 -0
- package/esm/utils/localization/translations/de.json +1 -0
- package/esm/utils/localization/translations/el-GR.json +1 -0
- package/esm/utils/localization/translations/en.json +4 -0
- package/esm/utils/localization/translations/es.json +1 -0
- package/esm/utils/localization/translations/et-EE.json +1 -0
- package/esm/utils/localization/translations/fi-FI.json +1 -0
- package/esm/utils/localization/translations/fr-FR.json +1 -0
- package/esm/utils/localization/translations/fr.json +1 -0
- package/esm/utils/localization/translations/hu-HU.json +1 -0
- package/esm/utils/localization/translations/id.json +1 -0
- package/esm/utils/localization/translations/it.json +1 -0
- package/esm/utils/localization/translations/ja.json +1 -0
- package/esm/utils/localization/translations/ka-GE.json +1 -0
- package/esm/utils/localization/translations/ko-KR.json +1 -0
- package/esm/utils/localization/translations/lt-LT.json +1 -0
- package/esm/utils/localization/translations/lv-LV.json +1 -0
- package/esm/utils/localization/translations/ms.json +1 -0
- package/esm/utils/localization/translations/nb-NO.json +1 -0
- package/esm/utils/localization/translations/nl.json +1 -0
- package/esm/utils/localization/translations/pl.json +1 -0
- package/esm/utils/localization/translations/pt-BR.json +1 -0
- package/esm/utils/localization/translations/pt-PT.json +1 -0
- package/esm/utils/localization/translations/ro-RO.json +1 -0
- package/esm/utils/localization/translations/sk-SK.json +1 -0
- package/esm/utils/localization/translations/sv.json +1 -0
- package/esm/utils/localization/translations/th.json +1 -0
- package/esm/utils/localization/translations/tr.json +1 -0
- package/esm/utils/localization/translations/zh-Hans.json +1 -0
- package/esm/utils/localization/translations/zh-TW.json +1 -0
- package/esm/waiting/waiting.js +98 -2
- package/package.json +15 -3
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"GroupFuelCellElectricVehicleId": "Véhicule électrique à pile combustible",
|
|
116
116
|
"{1} selected": "{1} sélectionné(s)",
|
|
117
117
|
"and {0} more": "et {0} de plus",
|
|
118
|
+
"+{0} more": "+{0} autres",
|
|
118
119
|
"Clear selection": "Effacer la sélection",
|
|
119
120
|
"Select current page": "Sélectionner toute la page",
|
|
120
121
|
"OperatorOr": "OU",
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"GroupFuelCellElectricVehicleId": "Véhicule électrique à pile à combustible",
|
|
116
116
|
"{1} selected": "{1} sélectionné(s)",
|
|
117
117
|
"and {0} more": "et {0} de plus",
|
|
118
|
+
"+{0} more": "+{0} autres",
|
|
118
119
|
"Clear selection": "Effacer la sélection",
|
|
119
120
|
"Select current page": "Sélectionner la page actuelle",
|
|
120
121
|
"OperatorOr": "OU",
|
|
@@ -125,6 +125,7 @@
|
|
|
125
125
|
"GroupManuallyClassifiedPowertrainId": "Kézi besorolású hajtáslánc",
|
|
126
126
|
"GroupFuelCellElectricVehicleId": "Üzemanyagcellás elektromos jármű",
|
|
127
127
|
"and {0} more": "és még {0}",
|
|
128
|
+
"+{0} more": "+{0} több",
|
|
128
129
|
"Clear selection": "Töröld a kijelölést.",
|
|
129
130
|
"Select current page": "Válaszd ki az aktuális oldalt.",
|
|
130
131
|
"OperatorOr": "VAGY",
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"GroupFuelCellElectricVehicleId": "Kendaraan Listrik Sel Bahan Bakar",
|
|
116
116
|
"{1} selected": "{1} dipilih",
|
|
117
117
|
"and {0} more": "dan {0} lainnya",
|
|
118
|
+
"+{0} more": "+{0} lebih",
|
|
118
119
|
"Clear selection": "Hapus pilihan",
|
|
119
120
|
"Select current page": "Pilih halaman saat ini",
|
|
120
121
|
"OperatorOr": "ATAU",
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"GroupFuelCellElectricVehicleId": "Veicolo elettrico a celle a combustibile",
|
|
116
116
|
"{1} selected": "Elementi selezionati: {1}",
|
|
117
117
|
"and {0} more": "e altri {0}",
|
|
118
|
+
"+{0} more": "+{0} in più",
|
|
118
119
|
"Clear selection": "Cancellare selezione",
|
|
119
120
|
"Select current page": "Selezionare pagina corrente",
|
|
120
121
|
"OperatorOr": "O",
|
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"GroupManuallyClassifiedPowertrainId": "ხელით კლასიფიცირებული ძრავის სისტემა",
|
|
130
130
|
"GroupFuelCellElectricVehicleId": "საწვავის ელემენტის ელექტრო მანქანა",
|
|
131
131
|
"and {0} more": "და კიდევ {0}",
|
|
132
|
+
"+{0} more": "+{0} მეტი",
|
|
132
133
|
"Clear selection": "მონიშვნის გასუფთავება",
|
|
133
134
|
"Select current page": "მიმდინარე გვერდის არჩევა",
|
|
134
135
|
"OperatorOr": "ან",
|
|
@@ -125,6 +125,7 @@
|
|
|
125
125
|
"GroupManuallyClassifiedPowertrainId": "수동 분류 파워트레인",
|
|
126
126
|
"GroupFuelCellElectricVehicleId": "연료 전지 전기 자동차",
|
|
127
127
|
"and {0} more": "및 {0}개 더",
|
|
128
|
+
"+{0} more": "+{0} 더보기",
|
|
128
129
|
"Clear selection": "선택 지우기",
|
|
129
130
|
"Select current page": "현재 페이지 선택",
|
|
130
131
|
"OperatorOr": "OperatorOr",
|
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"GroupManuallyClassifiedPowertrainId": "Rankiniu būdu klasifikuota pavara",
|
|
130
130
|
"GroupFuelCellElectricVehicleId": "Kuro elementų elektrinis automobilis",
|
|
131
131
|
"and {0} more": "ir dar {0}",
|
|
132
|
+
"+{0} more": "+{0} daugiau",
|
|
132
133
|
"Clear selection": "Išvalyti pasirinkimą",
|
|
133
134
|
"Select current page": "Pasirinkti dabartinį puslapį",
|
|
134
135
|
"OperatorOr": "ARBA",
|
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"GroupManuallyClassifiedPowertrainId": "Manuāli klasificēta piedziņas sistēma",
|
|
130
130
|
"GroupFuelCellElectricVehicleId": "Degvielas elementu elektriskais transportlīdzeklis",
|
|
131
131
|
"and {0} more": "un vēl {0}",
|
|
132
|
+
"+{0} more": "+{0} vēl",
|
|
132
133
|
"Clear selection": "Notīrīt atlasi",
|
|
133
134
|
"Select current page": "Atlasīt pašreizējo lapu",
|
|
134
135
|
"OperatorOr": "VAI",
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"{1} selected": "{1} dipilih",
|
|
116
116
|
"GroupElectricHybridPluginId": "Pasang Masuk Elektrik atau Hibrid",
|
|
117
117
|
"and {0} more": "dan {0} lagi",
|
|
118
|
+
"+{0} more": "+{0} lagi",
|
|
118
119
|
"Clear selection": "Kosongkan pilihan",
|
|
119
120
|
"Select current page": "Pilih halaman semasa",
|
|
120
121
|
"OperatorOr": "ATAU",
|
|
@@ -125,6 +125,7 @@
|
|
|
125
125
|
"GroupManuallyClassifiedPowertrainId": "Manuelt klassifisert drivlinje",
|
|
126
126
|
"GroupFuelCellElectricVehicleId": "Brenselcelle-elektrisk kjøretøy",
|
|
127
127
|
"and {0} more": "og {0} flere",
|
|
128
|
+
"+{0} more": "+{0} mer",
|
|
128
129
|
"Clear selection": "Fjern utvalg",
|
|
129
130
|
"Select current page": "Velg nåværende side",
|
|
130
131
|
"OperatorOr": "ELLER",
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"GroupFuelCellElectricVehicleId": "Elektrisch voertuig met brandstofcel",
|
|
116
116
|
"{1} selected": "{1} geselecteerd",
|
|
117
117
|
"and {0} more": "en {0} meer",
|
|
118
|
+
"+{0} more": "+{0} meer",
|
|
118
119
|
"Clear selection": "Selectie wissen",
|
|
119
120
|
"Select current page": "Huidige pagina selecteren",
|
|
120
121
|
"OperatorOr": "OF",
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"GroupFuelCellElectricVehicleId": "Elektryczny pojazd z ogniwem paliwowym",
|
|
116
116
|
"{1} selected": "Wybrano {1}",
|
|
117
117
|
"and {0} more": "i jeszcze {0}",
|
|
118
|
+
"+{0} more": "Jeszcze {0}",
|
|
118
119
|
"Clear selection": "Wyczyść wybór",
|
|
119
120
|
"Select current page": "Wybierz bieżącą stronę",
|
|
120
121
|
"OperatorOr": "LUB",
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"GroupFuelCellElectricVehicleId": "Veículo elétrico com célula de combustível",
|
|
116
116
|
"{1} selected": "{1} selecionado(s)",
|
|
117
117
|
"and {0} more": "e {0} mais",
|
|
118
|
+
"+{0} more": "+{0} mais",
|
|
118
119
|
"Clear selection": "Limpar seleção",
|
|
119
120
|
"Select current page": "Selecionar página atual",
|
|
120
121
|
"OperatorOr": "OU",
|
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
"GroupManuallyClassifiedPowertrainId": "Grupo motopropulsor classificado manualmente",
|
|
128
128
|
"GroupFuelCellElectricVehicleId": "Veículo elétrico com célula de combustível",
|
|
129
129
|
"and {0} more": "e {0} mais",
|
|
130
|
+
"+{0} more": "+{0} mais",
|
|
130
131
|
"Clear selection": "Limpar seleção",
|
|
131
132
|
"Select current page": "Selecionar página atual",
|
|
132
133
|
"OperatorOr": "Operador Ou",
|
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
"GroupManuallyClassifiedPowertrainId": "Tren motopropulsor clasificat manual",
|
|
128
128
|
"GroupFuelCellElectricVehicleId": "Vehicul electric cu celulă de combustie",
|
|
129
129
|
"and {0} more": "și {0} în plus",
|
|
130
|
+
"+{0} more": "Încă {0}",
|
|
130
131
|
"Clear selection": "Ștergeți selecția",
|
|
131
132
|
"Select current page": "Selectați pagina actuală",
|
|
132
133
|
"OperatorOr": "OperatorOr",
|
|
@@ -125,6 +125,7 @@
|
|
|
125
125
|
"GroupManuallyClassifiedPowertrainId": "Ručne klasifikovaný hnací systém",
|
|
126
126
|
"GroupFuelCellElectricVehicleId": "Elektrické vozidlo s palivovými článkami",
|
|
127
127
|
"and {0} more": "a {0} ďalších",
|
|
128
|
+
"+{0} more": "+{0} viac",
|
|
128
129
|
"Clear selection": "Vymaž výber.",
|
|
129
130
|
"Select current page": "Vyber aktuálnu stránku.",
|
|
130
131
|
"OperatorOr": "ALEBO",
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"GroupFuelCellElectricVehicleId": "Elfordon med bränsleceller",
|
|
116
116
|
"{1} selected": "{1} vald",
|
|
117
117
|
"and {0} more": "och {0} till",
|
|
118
|
+
"+{0} more": "+{0} mer",
|
|
118
119
|
"Clear selection": "Rensa val",
|
|
119
120
|
"Select current page": "Välj nuvarande sida",
|
|
120
121
|
"OperatorOr": "ELLER",
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"GroupFuelCellElectricVehicleId": "รถพลังงานไฟฟ้าเซลล์เชื้อเพลิง",
|
|
116
116
|
"{1} selected": "เลือกแล้ว {1}",
|
|
117
117
|
"and {0} more": "และอีก {0}",
|
|
118
|
+
"+{0} more": "+{0} รายการเพิ่มเติม",
|
|
118
119
|
"Clear selection": "ล้างการเลือก",
|
|
119
120
|
"Select current page": "เลือกหน้าปัจจุบัน",
|
|
120
121
|
"OperatorOr": "หรือ",
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"GroupManuallyClassifiedPowertrainId": "Manuel Sınıflandırılmış Güç Aktarma Sistemi",
|
|
116
116
|
"{1} selected": "{1} seçildi",
|
|
117
117
|
"and {0} more": "ve {0} tane daha",
|
|
118
|
+
"+{0} more": "+{0} daha",
|
|
118
119
|
"Clear selection": "Seçimi temizle",
|
|
119
120
|
"Select current page": "Geçerli sayfayı seç",
|
|
120
121
|
"OperatorOr": "VEYA",
|
|
@@ -125,6 +125,7 @@
|
|
|
125
125
|
"GroupManuallyClassifiedPowertrainId": "人工分類動力裝置",
|
|
126
126
|
"GroupFuelCellElectricVehicleId": "燃料電池電動車",
|
|
127
127
|
"and {0} more": "還有 {0} 個",
|
|
128
|
+
"+{0} more": "還有 +{0} 個",
|
|
128
129
|
"Clear selection": "清除選取項目",
|
|
129
130
|
"Select current page": "選取目前頁面",
|
|
130
131
|
"OperatorOr": "OperatorOr",
|
package/dist/waiting/waiting.js
CHANGED
|
@@ -5,12 +5,49 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
7
7
|
const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
|
|
8
|
+
const useResizeObserver_1 = require("../commonHelpers/hooks/useResizeObserver");
|
|
8
9
|
const zen_1 = require("../utils/zen");
|
|
9
10
|
const Waiting = ({ isLoading = false, delay = 400, hideOverlay = false, className = "", description, label }) => {
|
|
10
11
|
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
11
12
|
const [statusText, setStatusText] = (0, react_1.useState)("");
|
|
13
|
+
const [coverageHeight, setCoverageHeight] = (0, react_1.useState)(undefined);
|
|
14
|
+
const waitingRef = (0, react_1.useRef)(null);
|
|
15
|
+
const statusRef = (0, react_1.useRef)(null);
|
|
16
|
+
const mutationFrameRef = (0, react_1.useRef)(undefined);
|
|
12
17
|
const spinnerDriveClassName = (0, useDriveClassName_1.useDriveClassName)("zen-waiting__spinner");
|
|
13
18
|
const showWaiting = isLoading && (delay <= 0 || visible);
|
|
19
|
+
// The full-area coverage/re-measure machinery only makes sense for the default overlay variant,
|
|
20
|
+
// which is meant to span its parent. The `--inline` variant is a fixed 40x24px spinner — stretching
|
|
21
|
+
// its coverage layer to the parent's scrollHeight would incorrectly block clicks below the spinner
|
|
22
|
+
// and grow the parent's own scrollHeight on every re-measure (a feedback loop).
|
|
23
|
+
const isInline = className.split(/\s+/).includes("zen-waiting--inline");
|
|
24
|
+
// Callers using hideOverlay intentionally keep the surrounding controls interactive (for
|
|
25
|
+
// example, the MiniMap address textarea while its preview is loading).
|
|
26
|
+
const canMeasureCoverage = showWaiting && !isInline && !hideOverlay;
|
|
27
|
+
const measureCoverage = (0, react_1.useCallback)(() => {
|
|
28
|
+
var _a;
|
|
29
|
+
const parent = (_a = waitingRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
30
|
+
if (!parent || isInline) {
|
|
31
|
+
setCoverageHeight(undefined);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
// The coverage layer defaults to 100% of this element's own box (see .zen-waiting__coverage),
|
|
35
|
+
// which only spans the parent's visible (clientHeight) box. When the parent's real content is
|
|
36
|
+
// taller (e.g. a scrollable page), stretch it to the full scrollHeight instead so it keeps
|
|
37
|
+
// covering content the user can scroll to while loading. The DOM guarantees
|
|
38
|
+
// scrollHeight >= clientHeight, so no Math.max is needed here.
|
|
39
|
+
setCoverageHeight(parent.scrollHeight > parent.clientHeight ? parent.scrollHeight : undefined);
|
|
40
|
+
}, [isInline]);
|
|
41
|
+
// The target is only non-null once the overlay is actually mounted (`waitingRef.current` is null
|
|
42
|
+
// until `showWaiting` flips true). Gating it on `showWaiting` (and skipping it for the `--inline`
|
|
43
|
+
// variant) — rather than passing a permanently stable getter — ensures the identity change (null ->
|
|
44
|
+
// getter) re-triggers useResizeObserver's setup effect once the ref is attached; a permanently
|
|
45
|
+
// stable getter would only ever run that effect once, against a still-null ref, and never attach
|
|
46
|
+
// when the overlay later appears (e.g. with the default delay).
|
|
47
|
+
const getResizeTarget = (0, react_1.useCallback)(() => { var _a, _b; return (_b = (_a = waitingRef.current) === null || _a === void 0 ? void 0 : _a.parentElement) !== null && _b !== void 0 ? _b : null; }, []);
|
|
48
|
+
// Re-measures when the containing element's own box resizes (e.g. viewport resize, layout reflow
|
|
49
|
+
// changing the parent's height).
|
|
50
|
+
const { result: containerResize } = (0, useResizeObserver_1.useResizeObserver)({ target: canMeasureCoverage ? getResizeTarget : null });
|
|
14
51
|
(0, react_1.useEffect)(() => {
|
|
15
52
|
var _a;
|
|
16
53
|
let timer;
|
|
@@ -40,6 +77,65 @@ const Waiting = ({ isLoading = false, delay = 400, hideOverlay = false, classNam
|
|
|
40
77
|
timer && ((_a = zen_1.zen.clearTimeout) === null || _a === void 0 ? void 0 : _a.call(zen_1.zen, timer));
|
|
41
78
|
};
|
|
42
79
|
}, [isLoading, showWaiting, description, label]);
|
|
43
|
-
|
|
80
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
81
|
+
if (!canMeasureCoverage) {
|
|
82
|
+
setCoverageHeight(undefined);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
measureCoverage();
|
|
86
|
+
}, [canMeasureCoverage, containerResize, measureCoverage]);
|
|
87
|
+
// A fixed-height scrollable parent can gain content without its own box ever resizing — that's
|
|
88
|
+
// the exact shape of the original bug, and ResizeObserver alone won't catch it. Watch for DOM
|
|
89
|
+
// mutations on the parent instead and re-measure, coalescing bursts of mutations (e.g. many rows
|
|
90
|
+
// streaming in) into a single measurement per animation frame.
|
|
91
|
+
(0, react_1.useEffect)(() => {
|
|
92
|
+
var _a;
|
|
93
|
+
const parent = (_a = waitingRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
94
|
+
const MutationObserverCtor = zen_1.zen.MutationObserver;
|
|
95
|
+
if (!canMeasureCoverage || !parent || !MutationObserverCtor) {
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
const scheduleMeasure = () => {
|
|
99
|
+
var _a, _b;
|
|
100
|
+
mutationFrameRef.current && ((_a = zen_1.zen.cancelAnimationFrame) === null || _a === void 0 ? void 0 : _a.call(zen_1.zen, mutationFrameRef.current));
|
|
101
|
+
mutationFrameRef.current = (_b = zen_1.zen.requestAnimationFrame) === null || _b === void 0 ? void 0 : _b.call(zen_1.zen, measureCoverage);
|
|
102
|
+
};
|
|
103
|
+
const observer = new MutationObserverCtor(scheduleMeasure);
|
|
104
|
+
observer.observe(parent, { childList: true, subtree: true, characterData: true });
|
|
105
|
+
return () => {
|
|
106
|
+
var _a;
|
|
107
|
+
mutationFrameRef.current && ((_a = zen_1.zen.cancelAnimationFrame) === null || _a === void 0 ? void 0 : _a.call(zen_1.zen, mutationFrameRef.current));
|
|
108
|
+
observer.disconnect();
|
|
109
|
+
};
|
|
110
|
+
}, [canMeasureCoverage, measureCoverage]);
|
|
111
|
+
// Content behind the overlay is only unclickable for mouse/pointer users (the coverage layer's
|
|
112
|
+
// pointer-events block that). Keyboard users could still Tab into it, so make every other direct
|
|
113
|
+
// child of the parent `inert` while loading — removing it from the tab order and from hit-testing
|
|
114
|
+
// — and restore only the children we changed once loading stops. Skipped for the `--inline`
|
|
115
|
+
// variant, which doesn't cover/block its surroundings.
|
|
116
|
+
(0, react_1.useEffect)(() => {
|
|
117
|
+
var _a;
|
|
118
|
+
const parent = (_a = waitingRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
119
|
+
if (!canMeasureCoverage || !parent) {
|
|
120
|
+
return undefined;
|
|
121
|
+
}
|
|
122
|
+
const ownElements = new Set([waitingRef.current, statusRef.current]);
|
|
123
|
+
const inertedSiblings = [];
|
|
124
|
+
// `setAttribute`/`hasAttribute` (rather than the `.inert` IDL property) so this correctly
|
|
125
|
+
// detects and restores elements marked inert via the HTML attribute or a JSX `inert` prop too
|
|
126
|
+
// — not just ones previously set via the property.
|
|
127
|
+
Array.from(parent.children).forEach(child => {
|
|
128
|
+
if (child instanceof HTMLElement && !ownElements.has(child) && !child.hasAttribute("inert")) {
|
|
129
|
+
child.setAttribute("inert", "");
|
|
130
|
+
inertedSiblings.push(child);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
return () => {
|
|
134
|
+
inertedSiblings.forEach(child => {
|
|
135
|
+
child.removeAttribute("inert");
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
}, [canMeasureCoverage]);
|
|
139
|
+
return isLoading ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { ref: statusRef, role: "status", className: "zen-waiting__status", children: statusText ? (0, jsx_runtime_1.jsx)("span", { className: "zen-visually-hidden", children: statusText }) : null }), showWaiting ? ((0, jsx_runtime_1.jsx)("div", { ref: waitingRef, className: (0, classNames_1.classNames)(["zen-waiting", className]), children: (0, jsx_runtime_1.jsxs)("div", { className: "zen-waiting__coverage", style: coverageHeight ? { height: `${coverageHeight}px` } : undefined, children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-waiting__overlay", hideOverlay ? "zen-waiting__overlay--hidden" : ""]) }), (0, jsx_runtime_1.jsxs)("div", { className: "zen-waiting__spinner-container", children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-waiting__spinner", spinnerDriveClassName || ""]), children: (0, jsx_runtime_1.jsxs)("svg", { viewBox: "0 0 64 64", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsxs)("linearGradient", { id: "spinnerGradient", x1: "0", y1: "0", x2: "1", y2: "0", gradientUnits: "objectBoundingBox", children: [(0, jsx_runtime_1.jsx)("stop", { offset: "0%", stopColor: "var(--borders-form-field--active)", stopOpacity: "1" }), (0, jsx_runtime_1.jsx)("stop", { offset: "33.33%", stopColor: "var(--borders-form-field--active)", stopOpacity: "0.8" }), (0, jsx_runtime_1.jsx)("stop", { offset: "50%", stopColor: "var(--borders-form-field--active)", stopOpacity: "0.5" }), (0, jsx_runtime_1.jsx)("stop", { offset: "66.67%", stopColor: "var(--borders-form-field--active)", stopOpacity: "0.2" }), (0, jsx_runtime_1.jsx)("stop", { offset: "100%", stopColor: "var(--borders-form-field--active)", stopOpacity: "0" })] }) }), (0, jsx_runtime_1.jsx)("path", { className: "zen-waiting__spinner-animation", stroke: "url(#spinnerGradient)", strokeWidth: "6", strokeLinecap: "round", d: "M 32 4 A 28 28 0 1 1 32 60 A 28 28 0 1 1 32 4 Z" })] }) }), description && (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-waiting__spinner-text"]), children: description })] })] }) })) : null] })) : null;
|
|
44
140
|
};
|
|
45
141
|
exports.Waiting = Waiting;
|
package/esm/absolute/absolute.js
CHANGED
|
@@ -17,6 +17,7 @@ import { getScrollableParent } from "../utils/getScrollableParent";
|
|
|
17
17
|
import { useClientReady } from "../commonHelpers/hooks/useClientReady";
|
|
18
18
|
import { zen } from "../utils/zen";
|
|
19
19
|
import { useDirection } from "../utils/localization/useDirection";
|
|
20
|
+
const CLOSE_ON_SCROLL_EVENTS = ["wheel", "touchmove"];
|
|
20
21
|
export 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 }) => {
|
|
21
22
|
const popupRef = useRef(null);
|
|
22
23
|
const prevScroll = useRef(0);
|
|
@@ -64,7 +65,10 @@ export const Absolute = ({ isOpen, id, paddingX, paddingY, className, children,
|
|
|
64
65
|
}, [onOpenChange]);
|
|
65
66
|
useResize(calculatePosition, isOpen);
|
|
66
67
|
useScroll(calculatePosition, isOpen && !!recalculateOnScroll, parent);
|
|
67
|
-
|
|
68
|
+
// Only "wheel"/"touchmove" are genuine user scroll gestures. The plain "scroll" event also fires for
|
|
69
|
+
// browser scroll-anchoring adjustments (e.g. a layout shift above the viewport pushing content down),
|
|
70
|
+
// which would otherwise close the popup the instant it opens.
|
|
71
|
+
useScroll(handleCloseOnScroll, isOpen && !!closeOnScroll, parent, CLOSE_ON_SCROLL_EVENTS);
|
|
68
72
|
useLayoutEffect(calculatePosition, [isOpen, children, recalculateTrigger, calculatePosition]);
|
|
69
73
|
const returnFocusToTrigger = useCallback(() => {
|
|
70
74
|
if (!triggerRef.current) {
|
package/esm/button/button.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface IButton extends IZenComponentProps, IZenGridItem {
|
|
|
9
9
|
title?: string;
|
|
10
10
|
type?: TButton;
|
|
11
11
|
disabled?: boolean;
|
|
12
|
+
focusableWhenDisabled?: boolean;
|
|
12
13
|
onClick?: React.MouseEventHandler;
|
|
13
14
|
onBlur?: React.FocusEventHandler;
|
|
14
15
|
onMouseOver?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
@@ -27,6 +28,6 @@ export interface IButton extends IZenComponentProps, IZenGridItem {
|
|
|
27
28
|
dataAnalyticsId?: string;
|
|
28
29
|
}
|
|
29
30
|
export declare const Button: {
|
|
30
|
-
({ className, type, disabled, id, title, onClick, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onKeyDown, onKeyUp, children, link, target, htmlType, rel, ref, name, onBlur, role, ariaLabel, dataAnalyticsId, ...other }: IButton): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
({ className, type, disabled, focusableWhenDisabled, id, title, onClick, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onKeyDown, onKeyUp, children, link, target, htmlType, rel, ref, name, onBlur, role, ariaLabel, dataAnalyticsId, ...other }: IButton): import("react/jsx-runtime").JSX.Element;
|
|
31
32
|
displayName: string;
|
|
32
33
|
};
|
package/esm/button/button.js
CHANGED
|
@@ -15,18 +15,35 @@ import { classNames } from "../commonHelpers/classNames/classNames";
|
|
|
15
15
|
import { useDriveClassName } from "../utils/theme/useDriveClassName";
|
|
16
16
|
import { filterGridProps } from "../gridLayout/utils/filterGridProps";
|
|
17
17
|
import { useMobileClassName } from "../utils/theme/useMobileClassName";
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const blockActivation = (event) => {
|
|
19
|
+
event.preventDefault();
|
|
20
|
+
event.stopPropagation();
|
|
21
|
+
};
|
|
22
|
+
// Guards on `disabled` alone, not just `focusableWhenDisabled`, so clicks are blocked in JS regardless of
|
|
23
|
+
// CSS. `onKeyDown`/`onKeyUp` stay unguarded — Tooltip needs them.
|
|
24
|
+
const getDisabledGuardedHandlers = (disabled, isFocusableWhenDisabled, onClick, onMouseDown, onMouseUp) => ({
|
|
25
|
+
onClick: disabled ? blockActivation : onClick,
|
|
26
|
+
onMouseDown: isFocusableWhenDisabled ? blockActivation : onMouseDown,
|
|
27
|
+
onMouseUp: isFocusableWhenDisabled ? blockActivation : onMouseUp
|
|
28
|
+
});
|
|
29
|
+
const getButtonClassName = (type, disabled, isFocusableWhenDisabled, mobileOrDriveClasses, className) => {
|
|
20
30
|
const modifierClassName = type && type !== ButtonType.Secondary ? `zen-button--${type}` : "";
|
|
21
31
|
const disabledClassName = disabled ? "zen-button--disabled" : "";
|
|
32
|
+
const disabledFocusableClassName = isFocusableWhenDisabled ? "zen-button--disabled-focusable" : "";
|
|
33
|
+
return classNames(["zen-button", mobileOrDriveClasses, modifierClassName, disabledClassName, disabledFocusableClassName, className !== null && className !== void 0 ? className : ""]);
|
|
34
|
+
};
|
|
35
|
+
export const Button = (_a) => {
|
|
36
|
+
var { className, type, disabled, focusableWhenDisabled, id, title, onClick, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onKeyDown, onKeyUp, children, link, target, htmlType, rel, ref, name, onBlur, role, ariaLabel, dataAnalyticsId } = _a, other = __rest(_a, ["className", "type", "disabled", "focusableWhenDisabled", "id", "title", "onClick", "onMouseOver", "onMouseOut", "onMouseDown", "onMouseUp", "onKeyDown", "onKeyUp", "children", "link", "target", "htmlType", "rel", "ref", "name", "onBlur", "role", "ariaLabel", "dataAnalyticsId"]);
|
|
37
|
+
const isFocusableWhenDisabled = Boolean(disabled) && Boolean(focusableWhenDisabled);
|
|
22
38
|
const driveClasses = useDriveClassName("zen-button");
|
|
23
39
|
const ariaLabelValue = ariaLabel || title;
|
|
24
40
|
const mobileClasses = useMobileClassName("zen-button");
|
|
25
41
|
const commonArgs = Object.assign(Object.assign(Object.assign({ id,
|
|
26
|
-
title }, (ariaLabelValue ? { "aria-label": ariaLabelValue } : {})), (dataAnalyticsId ? { "data-analytics-id": dataAnalyticsId } : {})), { className:
|
|
42
|
+
title }, (ariaLabelValue ? { "aria-label": ariaLabelValue } : {})), (dataAnalyticsId ? { "data-analytics-id": dataAnalyticsId } : {})), { className: getButtonClassName(type, disabled, isFocusableWhenDisabled, mobileClasses || driveClasses || "", className) });
|
|
43
|
+
const { onClick: onClickWithDisabledGuard, onMouseDown: onMouseDownWithDisabledGuard, onMouseUp: onMouseUpWithDisabledGuard } = getDisabledGuardedHandlers(disabled, isFocusableWhenDisabled, onClick, onMouseDown, onMouseUp);
|
|
27
44
|
if (link) {
|
|
28
|
-
return (_jsx("a", Object.assign({ role: "link", rel: rel, target: target, href: disabled ? undefined : link, "aria-disabled": disabled, onKeyDown: onKeyDown, onKeyUp: onKeyUp, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onClick:
|
|
45
|
+
return (_jsx("a", Object.assign({ role: "link", rel: rel, target: target, href: disabled ? undefined : link, tabIndex: isFocusableWhenDisabled ? 0 : undefined, "aria-disabled": disabled ? true : undefined, onKeyDown: onKeyDown, onKeyUp: onKeyUp, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onClick: onClickWithDisabledGuard }, commonArgs, filterGridProps(other), { children: children })));
|
|
29
46
|
}
|
|
30
|
-
return (_jsx("button", Object.assign({ name: name, onBlur: onBlur, onClick:
|
|
47
|
+
return (_jsx("button", Object.assign({ name: name, onBlur: onBlur, onClick: onClickWithDisabledGuard, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onMouseDown: onMouseDownWithDisabledGuard, onMouseUp: onMouseUpWithDisabledGuard, onKeyDown: onKeyDown, onKeyUp: onKeyUp, ref: ref, type: htmlType, disabled: isFocusableWhenDisabled ? undefined : disabled, "aria-disabled": isFocusableWhenDisabled ? true : undefined, role: role }, commonArgs, filterGridProps(other), { children: children })));
|
|
31
48
|
};
|
|
32
49
|
Button.displayName = "Button";
|
|
@@ -11,6 +11,8 @@ export interface ICheckboxListWithActionOption {
|
|
|
11
11
|
isWithAction: boolean;
|
|
12
12
|
countSelectedChild?: number;
|
|
13
13
|
color?: IColor;
|
|
14
|
+
/** When true, renders a 1px separator line below this item. */
|
|
15
|
+
divider?: boolean;
|
|
14
16
|
}
|
|
15
17
|
export interface IChangeCheckbox {
|
|
16
18
|
id: string;
|
|
@@ -435,7 +435,7 @@ export const CheckboxListWithAction = ({
|
|
|
435
435
|
const labelForRender = selectSearchTerm(opt.label);
|
|
436
436
|
const labelElement = renderLabel(opt, labelForRender, titleForRender, ind);
|
|
437
437
|
return _jsxs("li", {
|
|
438
|
-
className: classNames(["zen-checkbox-list-with-action__action-item", opt.isWithAction ? "zen-checkbox-list-with-action__action-item--action" : ""]),
|
|
438
|
+
className: classNames(["zen-checkbox-list-with-action__action-item", opt.isWithAction ? "zen-checkbox-list-with-action__action-item--action" : "", opt.divider && ind < optionsArr.length - 1 ? "zen-checkbox-list-with-action__action-item--divider" : ""]),
|
|
439
439
|
"data-item": opt.property,
|
|
440
440
|
children: [_jsx(Checkbox, {
|
|
441
441
|
id: `${checkboxId}${opt.property}`,
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { injectString } from "../utils/localization/translationsDictionary";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useLanguage } from "../utils/localization/useLanguage";
|
|
4
|
+
injectString("cs", "+{0} more", "+{0} dal\u0161\xED");
|
|
5
|
+
injectString("da-DK", "+{0} more", "+{0} mere");
|
|
6
|
+
injectString("de", "+{0} more", "+{0} weitere");
|
|
7
|
+
injectString("en", "+{0} more", "+{0} more");
|
|
8
|
+
injectString("es", "+{0} more", "+{0} m\xE1s");
|
|
9
|
+
injectString("fi-FI", "+{0} more", "+{0} lis\xE4\xE4");
|
|
10
|
+
injectString("fr", "+{0} more", "+{0} autres");
|
|
11
|
+
injectString("fr-FR", "+{0} more", "+{0} autres");
|
|
12
|
+
injectString("hu-HU", "+{0} more", "+{0} t\xF6bb");
|
|
13
|
+
injectString("id", "+{0} more", "+{0} lebih");
|
|
14
|
+
injectString("it", "+{0} more", "+{0} in pi\xF9");
|
|
15
|
+
injectString("ja", "+{0} more", "\u3055\u3089\u306B {0} \u500B");
|
|
16
|
+
injectString("ko-KR", "+{0} more", "+{0} \uB354\uBCF4\uAE30");
|
|
17
|
+
injectString("ms", "+{0} more", "+{0} lagi");
|
|
18
|
+
injectString("nb-NO", "+{0} more", "+{0} mer");
|
|
19
|
+
injectString("nl", "+{0} more", "+{0} meer");
|
|
20
|
+
injectString("pl", "+{0} more", "Jeszcze {0}");
|
|
21
|
+
injectString("pt-BR", "+{0} more", "+{0} mais");
|
|
22
|
+
injectString("pt-PT", "+{0} more", "+{0} mais");
|
|
23
|
+
injectString("sk-SK", "+{0} more", "+{0} viac");
|
|
24
|
+
injectString("sv", "+{0} more", "+{0} mer");
|
|
25
|
+
injectString("th", "+{0} more", "+{0} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21");
|
|
26
|
+
injectString("tr", "+{0} more", "+{0} daha");
|
|
27
|
+
injectString("zh-Hans", "+{0} more", "+{0}\u66F4\u591A");
|
|
28
|
+
injectString("zh-TW", "+{0} more", "\u9084\u6709 +{0} \u500B");
|
|
29
|
+
injectString("ro-RO", "+{0} more", "\xCEnc\u0103 {0}");
|
|
30
|
+
injectString("ar-001", "+{0} more", "+{0} \u0623\u062E\u0631\u0649");
|
|
31
|
+
injectString("lt-LT", "+{0} more", "+{0} daugiau");
|
|
32
|
+
injectString("lv-LV", "+{0} more", "+{0} v\u0113l");
|
|
33
|
+
injectString("ka-GE", "+{0} more", "+{0} \u10DB\u10D4\u10E2\u10D8");
|
|
34
|
+
injectString("el-GR", "+{0} more", "+{0} \u03B1\u03BA\u03CC\u03BC\u03B1");
|
|
35
|
+
injectString("et-EE", "+{0} more", "+{0} veel");
|
|
36
|
+
injectString("bg-BG", "+{0} more", "+ \u043E\u0449\u0435 {0}");
|
|
37
|
+
export const ShowMoreCell = ({
|
|
38
|
+
row
|
|
39
|
+
}) => {
|
|
40
|
+
const {
|
|
41
|
+
translate
|
|
42
|
+
} = useLanguage();
|
|
43
|
+
const content = row.label ? row.label(row.remaining) : translate("+{0} more").replace("{0}", String(row.remaining));
|
|
44
|
+
if (row.href) {
|
|
45
|
+
return _jsx("a", {
|
|
46
|
+
className: "zen-show-more__link",
|
|
47
|
+
href: row.href,
|
|
48
|
+
children: content
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return _jsx("button", {
|
|
52
|
+
type: "button",
|
|
53
|
+
className: "zen-show-more__link",
|
|
54
|
+
onClick: row.onActivate,
|
|
55
|
+
children: content
|
|
56
|
+
});
|
|
57
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isAriaProp } from "./isAriaProp";
|
|
1
2
|
const camelToKebab = (str) => str.replace(/[A-Z]/g, letter => `-${letter.toLowerCase()}`);
|
|
2
3
|
export const getAriaAttributes = (props) => {
|
|
3
4
|
if (!props) {
|
|
@@ -5,16 +6,12 @@ export const getAriaAttributes = (props) => {
|
|
|
5
6
|
}
|
|
6
7
|
const ariaAttributes = {};
|
|
7
8
|
for (const [key, value] of Object.entries(props)) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
ariaAttributes[key] = value;
|
|
11
|
-
}
|
|
12
|
-
// Handle camelCase aria attributes (ariaDescribedby, ariaLabel, etc.)
|
|
13
|
-
// Convert to hyphenated format (aria-describedby, aria-label, etc.)
|
|
14
|
-
else if (key.startsWith("aria") && key.length > 4 && key[4] === key[4].toUpperCase()) {
|
|
15
|
-
const hyphenated = camelToKebab(key);
|
|
16
|
-
ariaAttributes[hyphenated] = value;
|
|
9
|
+
if (!isAriaProp(key)) {
|
|
10
|
+
continue;
|
|
17
11
|
}
|
|
12
|
+
// Hyphenated keys (aria-*) pass through; camelCase keys (ariaDescribedby, ariaLabel, etc.)
|
|
13
|
+
// are converted to the hyphenated form the DOM expects.
|
|
14
|
+
ariaAttributes[key.startsWith("aria-") ? key : camelToKebab(key)] = value;
|
|
18
15
|
}
|
|
19
16
|
return ariaAttributes;
|
|
20
17
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The complement of `getAriaAttributes`: every prop that is *not* an aria attribute, returned
|
|
3
|
+
* under its original key and value.
|
|
4
|
+
*
|
|
5
|
+
* Use the two together when a component has to send its aria attributes to a different element
|
|
6
|
+
* than the rest of its props. Both sides test membership with `isAriaProp`, so no prop can fall
|
|
7
|
+
* between them and be dropped by both.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getNonAriaProps: (props?: object) => {
|
|
10
|
+
[k: string]: any;
|
|
11
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isAriaProp } from "./isAriaProp";
|
|
2
|
+
/**
|
|
3
|
+
* The complement of `getAriaAttributes`: every prop that is *not* an aria attribute, returned
|
|
4
|
+
* under its original key and value.
|
|
5
|
+
*
|
|
6
|
+
* Use the two together when a component has to send its aria attributes to a different element
|
|
7
|
+
* than the rest of its props. Both sides test membership with `isAriaProp`, so no prop can fall
|
|
8
|
+
* between them and be dropped by both.
|
|
9
|
+
*/
|
|
10
|
+
export const getNonAriaProps = (props) => {
|
|
11
|
+
if (!props) {
|
|
12
|
+
return {};
|
|
13
|
+
}
|
|
14
|
+
return Object.fromEntries(Object.entries(props).filter(([key]) => !isAriaProp(key)));
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useScroll: (callback: () => void, active: boolean, triggerRef?: Element | null) => void;
|
|
1
|
+
export declare const useScroll: (callback: () => void, active: boolean, triggerRef?: Element | null, events?: readonly string[]) => void;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
2
|
import { zen } from "../../utils/zen";
|
|
3
|
-
|
|
3
|
+
const DEFAULT_EVENTS = ["scroll", "wheel"];
|
|
4
|
+
export const useScroll = (callback, active, triggerRef, events) => {
|
|
4
5
|
var _a;
|
|
5
6
|
if (triggerRef === void 0) { triggerRef = (_a = zen.document) === null || _a === void 0 ? void 0 : _a.body; }
|
|
7
|
+
if (events === void 0) { events = DEFAULT_EVENTS; }
|
|
6
8
|
useEffect(() => {
|
|
7
9
|
if (!active || triggerRef === null) {
|
|
8
10
|
return;
|
|
9
11
|
}
|
|
10
|
-
triggerRef.addEventListener(
|
|
11
|
-
triggerRef.addEventListener("wheel", callback);
|
|
12
|
+
events.forEach(event => triggerRef.addEventListener(event, callback));
|
|
12
13
|
// eslint-disable-next-line consistent-return
|
|
13
14
|
return () => {
|
|
14
|
-
triggerRef.removeEventListener(
|
|
15
|
-
triggerRef.removeEventListener("wheel", callback);
|
|
15
|
+
events.forEach(event => triggerRef.removeEventListener(event, callback));
|
|
16
16
|
};
|
|
17
|
-
}, [callback, active, triggerRef]);
|
|
17
|
+
}, [callback, active, triggerRef, events]);
|
|
18
18
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a prop key is an aria attribute, in either the hyphenated (`aria-label`) or the
|
|
3
|
+
* camelCase (`ariaLabel`) spelling.
|
|
4
|
+
*
|
|
5
|
+
* Pair it with `getAriaAttributes` when a component has to split a rest-props object: the helper
|
|
6
|
+
* collects the aria half, this predicate identifies the half it leaves behind. Sharing one rule
|
|
7
|
+
* keeps the two halves from disagreeing and silently dropping a prop.
|
|
8
|
+
*/
|
|
9
|
+
export declare const isAriaProp: (key: string) => boolean;
|