@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.
- package/README.md +20 -0
- package/dist/advancedGroupsFilter/advancedGroupsFilter.js +136 -30
- package/dist/advancedGroupsFilter/advancedGroupsFilterForm.js +139 -34
- package/dist/advancedGroupsFilter/advancedGroupsFilterFormSection.js +352 -87
- package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.d.ts +0 -1
- package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +83 -9
- package/dist/alertRaw/alertRaw.js +175 -54
- package/dist/banner/bannerMultipLine.js +131 -23
- package/dist/banner/bannerSingleLine.js +110 -16
- package/dist/betaPill/betaPill.js +111 -20
- package/dist/bookmark/bookmark.js +95 -28
- package/dist/bulkEditControl/bulkEditControl.js +167 -34
- package/dist/calendar/calendar.js +943 -273
- package/dist/calendar/calendarUtils.js +157 -85
- package/dist/card/card.js +268 -123
- package/dist/chart/accessibleChart/accessibleChartNarrative.js +648 -555
- package/dist/chart/accessibleChart/accessibleChartTable.js +245 -86
- package/dist/chart/chart.js +36 -21
- package/dist/chart/chartAxis/chartAxis.js +85 -7
- package/dist/checkboxListWithAction/checkboxListWithAction.js +224 -69
- package/dist/chip/chip.js +195 -91
- package/dist/columnsSelector/columnsSelector.js +97 -12
- package/dist/columnsSelector/columnsTab/columnsTab.js +59 -15
- package/dist/columnsSelector/columnsTabGroup/columnsTabGroup.js +81 -34
- package/dist/comboboxSelected/comboboxSelected.js +1 -3
- package/dist/dataFeed/feedExpandControl/feedExpandControl.js +25 -10
- package/dist/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +92 -11
- package/dist/dataGrid/dataGrid.js +227 -117
- package/dist/dataGrid/emptySearchList/emptySearchList.js +56 -9
- package/dist/dataGrid/entitiesListActions/actions/columnsListButton.js +51 -7
- package/dist/dataGrid/entitiesListActions/actions/fullscreenButton.js +64 -18
- package/dist/dataGrid/withFlexibleColumns/components/columnSettings.js +84 -10
- package/dist/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +48 -16
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +223 -32
- package/dist/dataGrid/withSelectableRows/withSelectableRows.js +286 -213
- package/dist/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +178 -95
- package/dist/dateInputInner/dateInputInner.js +791 -476
- package/dist/dateInputInner/dateInputInnerControlBlock.js +125 -22
- package/dist/dateInputRaw/dateInputRaw.js +315 -104
- package/dist/dateInputRaw/utils/getLabel.js +38 -7
- package/dist/dateRangeInner/dateRangeInner.js +173 -59
- package/dist/dateRangeRaw/dateRangeRaw.js +601 -239
- package/dist/dateRangeRaw/utils/dateRangeUtils.js +629 -241
- package/dist/dateSelectionWrapper/dateSelectionWrapper.js +152 -14
- package/dist/dialog/dialogContent.js +123 -40
- package/dist/dropdownRaw/dropdownHelper.d.ts +2 -2
- package/dist/dropdownRaw/dropdownHelper.js +9 -9
- package/dist/dropdownRaw/dropdownList.js +447 -78
- package/dist/dropdownRaw/dropdownPopup.js +218 -20
- package/dist/dropdownRaw/dropdownRaw.js +866 -506
- package/dist/dropdownRaw/dropdownSearchableTrigger.js +223 -46
- package/dist/dropdownRaw/stateReducer/stateAction.d.ts +5 -1
- package/dist/dropdownRaw/stateReducer/stateActionType.d.ts +2 -1
- package/dist/dropdownRaw/stateReducer/stateActionType.js +1 -0
- package/dist/dropdownRaw/stateReducer/stateReducer.d.ts +6 -1
- package/dist/dropdownRaw/stateReducer/stateReducer.js +24 -12
- package/dist/dropdownRaw/stateReducer/stateReducerHelper.d.ts +2 -0
- package/dist/dropdownRaw/stateReducer/stateReducerHelper.js +20 -1
- package/dist/dropdownRaw/stateReducer/stateReducerTestData.d.ts +39 -0
- package/dist/dropdownRaw/stateReducer/stateReducerTestData.js +74 -0
- package/dist/dropdownRaw/types.d.ts +1 -0
- package/dist/favoriteButton/favoriteButton.js +59 -10
- package/dist/filters/components/filtersContainer.js +151 -64
- package/dist/filters/components/filtersEmptySelectedList.js +30 -4
- package/dist/filters/components/filtersSaveModal.js +140 -42
- package/dist/filters/components/filtersSavedChipComponent.js +318 -108
- package/dist/filters/components/filtersSearchItemData.js +127 -47
- package/dist/filters/components/filtersSearchList.js +381 -179
- package/dist/filters/components/filtersSelect.js +128 -61
- package/dist/filters/components/filtersSelectListItem.js +125 -13
- package/dist/filters/components/filtersSidePanel.js +510 -178
- package/dist/filters/components/filtersSidePanelDropdown.js +2 -2
- package/dist/filters/filters.js +445 -268
- package/dist/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +729 -272
- package/dist/filtersBar/components/resetComponentButton.js +45 -5
- package/dist/filtersBar/filtersBarActions/filtersBarActions.js +126 -15
- package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRadioGroup/filtersBarSidePanelRadioGroup.js +2 -2
- package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +155 -49
- package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +360 -104
- package/dist/filtersBar/filtersContainer/filtersContainer.js +204 -134
- package/dist/formField/components/formFieldWithLabel.d.ts +2 -1
- package/dist/formField/components/formFieldWithLabel.js +3 -2
- package/dist/formField/components/formFieldWithoutLabel.d.ts +2 -1
- package/dist/formField/components/formFieldWithoutLabel.js +3 -3
- package/dist/formField/components/trailingComponent.d.ts +8 -0
- package/dist/formField/components/trailingComponent.js +11 -0
- package/dist/formField/formField.js +26 -11
- package/dist/formField/hooks/useError.js +100 -36
- package/dist/formGroup/components/reviewListToggle/reviewListToggle.js +72 -7
- package/dist/formGroup/hooks/useToggle.js +37 -11
- package/dist/formGroup/utils/getControls.js +8 -7
- package/dist/formLayout/hooks/useError.js +55 -15
- package/dist/formLayout/hooks/useFormButtons.js +128 -27
- package/dist/formSection/components/formSectionModal.js +1 -1
- package/dist/formSection/formSection.js +1 -1
- package/dist/formSection/hooks/useError.js +70 -22
- package/dist/formStepper/components/formStep.js +65 -10
- package/dist/formStepper/formStepper.js +129 -33
- package/dist/formStepperButtons/formStepperButtons.js +184 -38
- package/dist/groupsFilter/groupsHelper.d.ts +1 -1
- package/dist/groupsFilterRaw/groupsFilterAdjustmentState.js +162 -17
- package/dist/groupsFilterRaw/groupsFilterBox.js +137 -32
- package/dist/groupsFilterRaw/groupsFilterCommon.js +75 -8
- package/dist/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +184 -25
- package/dist/groupsFilterRaw/groupsFilterHelper.d.ts +2 -1
- package/dist/groupsFilterRaw/groupsFilterHelper.js +284 -168
- package/dist/groupsFilterRaw/groupsFilterInitialState.js +266 -18
- package/dist/groupsFilterRaw/groupsFilterMenu.js +124 -9
- package/dist/groupsFilterRaw/groupsFilterRaw.d.ts +1 -0
- package/dist/groupsFilterRaw/groupsFilterRaw.js +816 -308
- package/dist/groupsFilterRaw/groupsFilterTestData.d.ts +155 -2
- package/dist/groupsFilterRaw/groupsFilterTestData.js +153 -58
- package/dist/groupsFilterRaw/groupsFilterTrigger.js +139 -35
- package/dist/groupsFilterRaw/groupsHelper.js +739 -208
- package/dist/groupsFilterRaw/stateReducer/stateReducerHelper.js +3 -1
- package/dist/groupsFilterRaw/types.d.ts +1 -0
- package/dist/header/components/collapsedItemsControl/collapsedItemsControl.js +107 -52
- package/dist/header/components/mobileFilterControl/mobileFilterControl.js +62 -9
- package/dist/header/components/mobileSearchControl/mobileSearchControl.js +119 -14
- package/dist/header/headerBack.js +64 -20
- package/dist/index.css +116 -74
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -1
- package/dist/list/itemData/itemDataInternal.js +216 -51
- package/dist/list/listItem/listItem.js +168 -55
- package/dist/menu/components/menuErrorItem.js +33 -5
- package/dist/mobileSheet/mobileSheet.js +195 -69
- package/dist/modal/modal.js +300 -142
- package/dist/nav/nav.js +1 -1
- package/dist/nav/navFooter/navFooter.js +82 -39
- package/dist/nav/navFooter/navFooterAction/navFooterAction.js +52 -13
- package/dist/nav/navHeader/navHeader.js +86 -36
- package/dist/nav/navHeader/navHeaderSearch/navHeaderSearch.js +88 -29
- package/dist/nav/navItem/navItem.d.ts +3 -3
- package/dist/nav/navItem/navItem.js +35 -33
- package/dist/nav/navMobileBar/navMobileBar.js +67 -21
- package/dist/notification/notification.js +124 -21
- package/dist/pagination/paginationArrow.js +81 -11
- package/dist/pagination/paginationText/paginationText.js +45 -11
- package/dist/pill/components/pillNonActionable/pillNonActionable.js +93 -24
- package/dist/pillBox/components/pillBoxItem.js +52 -9
- package/dist/pillBox/pillBox.js +121 -20
- package/dist/pillExpandable/pillExpandable.js +333 -139
- package/dist/rangeRaw/rangeRaw.js +486 -141
- package/dist/rangeRaw/utils/rangeHelper.js +209 -39
- package/dist/searchInputRaw/searchInputRaw.js +180 -65
- package/dist/skeleton/skeleton.js +51 -6
- package/dist/sortControl/sortControl.js +152 -42
- package/dist/stepperRaw/stepperRaw.js +116 -42
- package/dist/summary/summary.js +94 -8
- package/dist/table/actions/actionsMenu.js +171 -78
- package/dist/table/flexible/columnSettings.js +80 -10
- package/dist/table/flexible/columnsList.js +110 -43
- package/dist/table/flexible/columnsPopup.js +77 -20
- package/dist/table/nested/useNestedRows.js +167 -77
- package/dist/table/selectable/selectableHeader.js +180 -41
- package/dist/table/selectable/useSelectableRows.js +270 -191
- package/dist/table/sortable/sortableHeader.js +153 -75
- package/dist/tabs/tabs.js +227 -118
- package/dist/timePickerRaw/timePickerRaw.js +278 -58
- package/dist/toastRaw/toastRaw.js +138 -32
- package/dist/toggleButton/toggleButton.d.ts +0 -1
- package/dist/toggleButtonRaw/toggleButtonRaw.d.ts +1 -0
- package/dist/toggleButtonRaw/toggleButtonRaw.js +146 -40
- package/dist/utils/formatDate.js +1001 -117
- package/{esm/utils/localization/translations/cs-json.js → dist/utils/localization/translations/cs.json} +11 -12
- package/{esm/utils/localization/translations/da-DK-json.js → dist/utils/localization/translations/da-DK.json} +31 -23
- package/{esm/utils/localization/translations/de-json.js → dist/utils/localization/translations/de.json} +12 -13
- package/dist/utils/localization/translations/en.json +308 -0
- package/{esm/utils/localization/translations/es-json.js → dist/utils/localization/translations/es.json} +11 -12
- package/{esm/utils/localization/translations/fi-FI-json.js → dist/utils/localization/translations/fi-FI.json} +31 -23
- package/{esm/utils/localization/translations/fr-FR-json.js → dist/utils/localization/translations/fr-FR.json} +12 -12
- package/{esm/utils/localization/translations/fr-json.js → dist/utils/localization/translations/fr.json} +11 -12
- package/{esm/utils/localization/translations/hu-HU-json.js → dist/utils/localization/translations/hu-HU.json} +31 -23
- package/{esm/utils/localization/translations/id-json.js → dist/utils/localization/translations/id.json} +11 -13
- package/{esm/utils/localization/translations/it-json.js → dist/utils/localization/translations/it.json} +11 -12
- package/{esm/utils/localization/translations/ja-json.js → dist/utils/localization/translations/ja.json} +11 -12
- package/{esm/utils/localization/translations/ko-KR-json.js → dist/utils/localization/translations/ko-KR.json} +24 -23
- package/{esm/utils/localization/translations/ms-json.js → dist/utils/localization/translations/ms.json} +11 -12
- package/{esm/utils/localization/translations/nb-NO-json.js → dist/utils/localization/translations/nb-NO.json} +31 -23
- package/{esm/utils/localization/translations/nl-json.js → dist/utils/localization/translations/nl.json} +11 -12
- package/{esm/utils/localization/translations/pl-json.js → dist/utils/localization/translations/pl.json} +11 -12
- package/{esm/utils/localization/translations/pt-BR-json.js → dist/utils/localization/translations/pt-BR.json} +11 -12
- package/{esm/utils/localization/translations/sk-SK-json.js → dist/utils/localization/translations/sk-SK.json} +31 -23
- package/{esm/utils/localization/translations/sv-json.js → dist/utils/localization/translations/sv.json} +11 -12
- package/{esm/utils/localization/translations/th-json.js → dist/utils/localization/translations/th.json} +11 -12
- package/{esm/utils/localization/translations/tr-json.js → dist/utils/localization/translations/tr.json} +11 -12
- package/{esm/utils/localization/translations/zh-Hans-json.js → dist/utils/localization/translations/zh-Hans.json} +11 -12
- package/{esm/utils/localization/translations/zh-TW-json.js → dist/utils/localization/translations/zh-TW.json} +11 -23
- package/dist/utils/localization/translationsDictionary.d.ts +2 -0
- package/dist/utils/localization/translationsDictionary.js +63 -0
- package/dist/utils/localization/useLanguage.js +2 -74
- package/esm/advancedGroupsFilter/advancedGroupsFilter.js +130 -29
- package/esm/advancedGroupsFilter/advancedGroupsFilterForm.js +133 -33
- package/esm/advancedGroupsFilter/advancedGroupsFilterFormSection.js +317 -65
- package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.d.ts +0 -1
- package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +77 -8
- package/esm/alertRaw/alertRaw.js +165 -51
- package/esm/banner/bannerMultipLine.js +121 -20
- package/esm/banner/bannerSingleLine.js +100 -13
- package/esm/betaPill/betaPill.js +105 -19
- package/esm/bookmark/bookmark.js +89 -27
- package/esm/bulkEditControl/bulkEditControl.js +161 -33
- package/esm/calendar/calendar.js +937 -272
- package/esm/calendar/calendarUtils.js +151 -84
- package/esm/card/card.js +233 -101
- package/esm/chart/accessibleChart/accessibleChartNarrative.js +642 -554
- package/esm/chart/accessibleChart/accessibleChartTable.js +239 -85
- package/esm/chart/chart.js +30 -20
- package/esm/chart/chartAxis/chartAxis.js +79 -6
- package/esm/checkboxListWithAction/checkboxListWithAction.js +218 -68
- package/esm/chip/chip.js +189 -90
- package/esm/columnsSelector/columnsSelector.js +91 -11
- package/esm/columnsSelector/columnsTab/columnsTab.js +53 -14
- package/esm/columnsSelector/columnsTabGroup/columnsTabGroup.js +75 -33
- package/esm/comboboxSelected/comboboxSelected.js +1 -3
- package/esm/dataFeed/feedExpandControl/feedExpandControl.js +21 -9
- package/esm/dataGrid/columns/checkboxColumn/checkboxHeaderCell.js +86 -10
- package/esm/dataGrid/dataGrid.js +221 -116
- package/esm/dataGrid/emptySearchList/emptySearchList.js +50 -8
- package/esm/dataGrid/entitiesListActions/actions/columnsListButton.js +45 -6
- package/esm/dataGrid/entitiesListActions/actions/fullscreenButton.js +58 -17
- package/esm/dataGrid/withFlexibleColumns/components/columnSettings.js +78 -9
- package/esm/dataGrid/withFlexibleColumns/components/columnSettingsSidePanel.js +44 -15
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +217 -31
- package/esm/dataGrid/withSelectableRows/withSelectableRows.js +280 -212
- package/esm/dataGrid/withSortableColumns/columns/sortableColumnWrapper.js +172 -94
- package/esm/dateInputInner/dateInputInner.js +785 -475
- package/esm/dateInputInner/dateInputInnerControlBlock.js +119 -21
- package/esm/dateInputRaw/dateInputRaw.js +309 -103
- package/esm/dateInputRaw/utils/getLabel.js +32 -6
- package/esm/dateRangeInner/dateRangeInner.js +167 -58
- package/esm/dateRangeRaw/dateRangeRaw.js +595 -238
- package/esm/dateRangeRaw/utils/dateRangeUtils.js +622 -239
- package/esm/dateSelectionWrapper/dateSelectionWrapper.js +146 -13
- package/esm/dialog/dialogContent.js +117 -39
- package/esm/dropdownRaw/dropdownHelper.d.ts +2 -2
- package/esm/dropdownRaw/dropdownHelper.js +10 -10
- package/esm/dropdownRaw/dropdownList.js +412 -56
- package/esm/dropdownRaw/dropdownPopup.js +212 -19
- package/esm/dropdownRaw/dropdownRaw.js +862 -507
- package/esm/dropdownRaw/dropdownSearchableTrigger.js +217 -45
- package/esm/dropdownRaw/stateReducer/stateAction.d.ts +5 -1
- package/esm/dropdownRaw/stateReducer/stateActionType.d.ts +2 -1
- package/esm/dropdownRaw/stateReducer/stateActionType.js +1 -0
- package/esm/dropdownRaw/stateReducer/stateReducer.d.ts +6 -1
- package/esm/dropdownRaw/stateReducer/stateReducer.js +24 -12
- package/esm/dropdownRaw/stateReducer/stateReducerHelper.d.ts +2 -0
- package/esm/dropdownRaw/stateReducer/stateReducerHelper.js +18 -0
- package/esm/dropdownRaw/stateReducer/stateReducerTestData.d.ts +39 -0
- package/esm/dropdownRaw/stateReducer/stateReducerTestData.js +71 -0
- package/esm/dropdownRaw/types.d.ts +1 -0
- package/esm/favoriteButton/favoriteButton.js +53 -9
- package/esm/filters/components/filtersContainer.js +141 -61
- package/esm/filters/components/filtersEmptySelectedList.js +24 -3
- package/esm/filters/components/filtersSaveModal.js +134 -41
- package/esm/filters/components/filtersSavedChipComponent.js +312 -107
- package/esm/filters/components/filtersSearchItemData.js +121 -46
- package/esm/filters/components/filtersSearchList.js +375 -178
- package/esm/filters/components/filtersSelect.js +122 -60
- package/esm/filters/components/filtersSelectListItem.js +119 -12
- package/esm/filters/components/filtersSidePanel.js +504 -177
- package/esm/filters/components/filtersSidePanelDropdown.js +2 -2
- package/esm/filters/filters.js +435 -265
- package/esm/filtersBar/components/filtersBarPeriodPicker/getRangeOption.js +722 -270
- package/esm/filtersBar/components/resetComponentButton.js +39 -4
- package/esm/filtersBar/filtersBarActions/filtersBarActions.js +120 -14
- package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRadioGroup/filtersBarSidePanelRadioGroup.js +2 -2
- package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +149 -48
- package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +354 -103
- package/esm/filtersBar/filtersContainer/filtersContainer.js +198 -133
- package/esm/formField/components/formFieldWithLabel.d.ts +2 -1
- package/esm/formField/components/formFieldWithLabel.js +3 -2
- package/esm/formField/components/formFieldWithoutLabel.d.ts +2 -1
- package/esm/formField/components/formFieldWithoutLabel.js +3 -3
- package/esm/formField/components/trailingComponent.d.ts +8 -0
- package/esm/formField/components/trailingComponent.js +7 -0
- package/esm/formField/formField.js +27 -12
- package/esm/formField/hooks/useError.js +94 -35
- package/esm/formGroup/components/reviewListToggle/reviewListToggle.js +66 -6
- package/esm/formGroup/hooks/useToggle.js +31 -10
- package/esm/formGroup/utils/getControls.js +8 -7
- package/esm/formLayout/hooks/useError.js +49 -14
- package/esm/formLayout/hooks/useFormButtons.js +122 -26
- package/esm/formSection/components/formSectionModal.js +1 -1
- package/esm/formSection/formSection.js +1 -1
- package/esm/formSection/hooks/useError.js +64 -21
- package/esm/formStepper/components/formStep.js +59 -9
- package/esm/formStepper/formStepper.js +123 -32
- package/esm/formStepperButtons/formStepperButtons.js +178 -37
- package/esm/groupsFilter/groupsHelper.d.ts +1 -1
- package/esm/groupsFilterRaw/groupsFilterAdjustmentState.js +152 -14
- package/esm/groupsFilterRaw/groupsFilterBox.js +131 -31
- package/esm/groupsFilterRaw/groupsFilterCommon.js +69 -7
- package/esm/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +178 -24
- package/esm/groupsFilterRaw/groupsFilterHelper.d.ts +2 -1
- package/esm/groupsFilterRaw/groupsFilterHelper.js +279 -168
- package/esm/groupsFilterRaw/groupsFilterInitialState.js +260 -17
- package/esm/groupsFilterRaw/groupsFilterMenu.js +118 -8
- package/esm/groupsFilterRaw/groupsFilterRaw.d.ts +1 -0
- package/esm/groupsFilterRaw/groupsFilterRaw.js +811 -308
- package/esm/groupsFilterRaw/groupsFilterTestData.d.ts +155 -2
- package/esm/groupsFilterRaw/groupsFilterTestData.js +152 -57
- package/esm/groupsFilterRaw/groupsFilterTrigger.js +133 -34
- package/esm/groupsFilterRaw/groupsHelper.js +733 -207
- package/esm/groupsFilterRaw/stateReducer/stateReducerHelper.js +3 -1
- package/esm/groupsFilterRaw/types.d.ts +1 -0
- package/esm/header/components/collapsedItemsControl/collapsedItemsControl.js +101 -51
- package/esm/header/components/mobileFilterControl/mobileFilterControl.js +56 -8
- package/esm/header/components/mobileSearchControl/mobileSearchControl.js +113 -13
- package/esm/header/headerBack.js +58 -19
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/list/itemData/itemDataInternal.js +210 -50
- package/esm/list/listItem/listItem.js +162 -54
- package/esm/menu/components/menuErrorItem.js +27 -4
- package/esm/mobileSheet/mobileSheet.js +189 -68
- package/esm/modal/modal.js +265 -120
- package/esm/nav/nav.js +1 -1
- package/esm/nav/navFooter/navFooter.js +76 -38
- package/esm/nav/navFooter/navFooterAction/navFooterAction.js +46 -12
- package/esm/nav/navHeader/navHeader.js +80 -35
- package/esm/nav/navHeader/navHeaderSearch/navHeaderSearch.js +82 -28
- package/esm/nav/navItem/navItem.d.ts +3 -3
- package/esm/nav/navItem/navItem.js +35 -33
- package/esm/nav/navMobileBar/navMobileBar.js +61 -20
- package/esm/notification/notification.js +114 -18
- package/esm/pagination/paginationArrow.js +75 -10
- package/esm/pagination/paginationText/paginationText.js +39 -10
- package/esm/pill/components/pillNonActionable/pillNonActionable.js +87 -23
- package/esm/pillBox/components/pillBoxItem.js +46 -8
- package/esm/pillBox/pillBox.js +115 -19
- package/esm/pillExpandable/pillExpandable.js +327 -138
- package/esm/rangeRaw/rangeRaw.js +480 -140
- package/esm/rangeRaw/utils/rangeHelper.js +203 -38
- package/esm/searchInputRaw/searchInputRaw.js +145 -43
- package/esm/skeleton/skeleton.js +45 -5
- package/esm/sortControl/sortControl.js +146 -41
- package/esm/stepperRaw/stepperRaw.js +112 -41
- package/esm/storybookHelpers/dataGridWithDifferentCellOptions/components/EntitiesListAction.js +178 -19
- package/esm/summary/summary.js +88 -7
- package/esm/table/actions/actionsMenu.js +165 -77
- package/esm/table/flexible/columnSettings.js +74 -9
- package/esm/table/flexible/columnsList.js +104 -42
- package/esm/table/flexible/columnsPopup.js +71 -19
- package/esm/table/nested/useNestedRows.js +161 -76
- package/esm/table/selectable/selectableHeader.js +174 -40
- package/esm/table/selectable/useSelectableRows.js +264 -190
- package/esm/table/sortable/sortableHeader.js +147 -74
- package/esm/tabs/tabs.js +221 -117
- package/esm/timePickerRaw/timePickerRaw.js +272 -57
- package/esm/toastRaw/toastRaw.js +132 -31
- package/esm/toggleButton/toggleButton.d.ts +0 -1
- package/esm/toggleButtonRaw/toggleButtonRaw.d.ts +1 -0
- package/esm/toggleButtonRaw/toggleButtonRaw.js +111 -18
- package/esm/utils/formatDate.js +995 -116
- package/{dist/utils/localization/translations/cs-json.js → esm/utils/localization/translations/cs.json} +11 -15
- package/{dist/utils/localization/translations/da-DK-json.js → esm/utils/localization/translations/da-DK.json} +31 -26
- package/{dist/utils/localization/translations/de-json.js → esm/utils/localization/translations/de.json} +12 -16
- package/esm/utils/localization/translations/en.json +308 -0
- package/{dist/utils/localization/translations/es-json.js → esm/utils/localization/translations/es.json} +11 -15
- package/{dist/utils/localization/translations/fi-FI-json.js → esm/utils/localization/translations/fi-FI.json} +31 -26
- package/{dist/utils/localization/translations/fr-FR-json.js → esm/utils/localization/translations/fr-FR.json} +12 -15
- package/{dist/utils/localization/translations/fr-json.js → esm/utils/localization/translations/fr.json} +11 -15
- package/{dist/utils/localization/translations/hu-HU-json.js → esm/utils/localization/translations/hu-HU.json} +31 -26
- package/{dist/utils/localization/translations/id-json.js → esm/utils/localization/translations/id.json} +11 -16
- package/{dist/utils/localization/translations/it-json.js → esm/utils/localization/translations/it.json} +11 -15
- package/{dist/utils/localization/translations/ja-json.js → esm/utils/localization/translations/ja.json} +11 -15
- package/{dist/utils/localization/translations/ko-KR-json.js → esm/utils/localization/translations/ko-KR.json} +24 -26
- package/{dist/utils/localization/translations/ms-json.js → esm/utils/localization/translations/ms.json} +11 -15
- package/{dist/utils/localization/translations/nb-NO-json.js → esm/utils/localization/translations/nb-NO.json} +31 -26
- package/{dist/utils/localization/translations/nl-json.js → esm/utils/localization/translations/nl.json} +11 -15
- package/{dist/utils/localization/translations/pl-json.js → esm/utils/localization/translations/pl.json} +11 -15
- package/{dist/utils/localization/translations/pt-BR-json.js → esm/utils/localization/translations/pt-BR.json} +11 -15
- package/{dist/utils/localization/translations/sk-SK-json.js → esm/utils/localization/translations/sk-SK.json} +31 -26
- package/{dist/utils/localization/translations/sv-json.js → esm/utils/localization/translations/sv.json} +11 -15
- package/{dist/utils/localization/translations/th-json.js → esm/utils/localization/translations/th.json} +11 -15
- package/{dist/utils/localization/translations/tr-json.js → esm/utils/localization/translations/tr.json} +11 -15
- package/{dist/utils/localization/translations/zh-Hans-json.js → esm/utils/localization/translations/zh-Hans.json} +11 -15
- package/{dist/utils/localization/translations/zh-TW-json.js → esm/utils/localization/translations/zh-TW.json} +11 -26
- package/esm/utils/localization/translationsDictionary.d.ts +2 -0
- package/esm/utils/localization/translationsDictionary.js +59 -0
- package/esm/utils/localization/useLanguage.js +1 -50
- package/package.json +19 -12
- package/dist/utils/localization/translations/cs-json.d.ts +0 -251
- package/dist/utils/localization/translations/da-DK-json.d.ts +0 -252
- package/dist/utils/localization/translations/de-json.d.ts +0 -251
- package/dist/utils/localization/translations/en-json.d.ts +0 -314
- package/dist/utils/localization/translations/en-json.js +0 -317
- package/dist/utils/localization/translations/es-json.d.ts +0 -251
- package/dist/utils/localization/translations/fi-FI-json.d.ts +0 -252
- package/dist/utils/localization/translations/fr-FR-json.d.ts +0 -250
- package/dist/utils/localization/translations/fr-json.d.ts +0 -251
- package/dist/utils/localization/translations/hu-HU-json.d.ts +0 -252
- package/dist/utils/localization/translations/id-json.d.ts +0 -252
- package/dist/utils/localization/translations/it-json.d.ts +0 -251
- package/dist/utils/localization/translations/ja-json.d.ts +0 -251
- package/dist/utils/localization/translations/ko-KR-json.d.ts +0 -258
- package/dist/utils/localization/translations/ms-json.d.ts +0 -251
- package/dist/utils/localization/translations/nb-NO-json.d.ts +0 -252
- package/dist/utils/localization/translations/nl-json.d.ts +0 -251
- package/dist/utils/localization/translations/pl-json.d.ts +0 -251
- package/dist/utils/localization/translations/pt-BR-json.d.ts +0 -251
- package/dist/utils/localization/translations/sk-SK-json.d.ts +0 -251
- package/dist/utils/localization/translations/sv-json.d.ts +0 -251
- package/dist/utils/localization/translations/th-json.d.ts +0 -251
- package/dist/utils/localization/translations/tr-json.d.ts +0 -251
- package/dist/utils/localization/translations/zh-Hans-json.d.ts +0 -251
- package/dist/utils/localization/translations/zh-TW-json.d.ts +0 -271
- package/esm/utils/localization/translations/cs-json.d.ts +0 -251
- package/esm/utils/localization/translations/da-DK-json.d.ts +0 -252
- package/esm/utils/localization/translations/de-json.d.ts +0 -251
- package/esm/utils/localization/translations/en-json.d.ts +0 -314
- package/esm/utils/localization/translations/en-json.js +0 -314
- package/esm/utils/localization/translations/es-json.d.ts +0 -251
- package/esm/utils/localization/translations/fi-FI-json.d.ts +0 -252
- package/esm/utils/localization/translations/fr-FR-json.d.ts +0 -250
- package/esm/utils/localization/translations/fr-json.d.ts +0 -251
- package/esm/utils/localization/translations/hu-HU-json.d.ts +0 -252
- package/esm/utils/localization/translations/id-json.d.ts +0 -252
- package/esm/utils/localization/translations/it-json.d.ts +0 -251
- package/esm/utils/localization/translations/ja-json.d.ts +0 -251
- package/esm/utils/localization/translations/ko-KR-json.d.ts +0 -258
- package/esm/utils/localization/translations/ms-json.d.ts +0 -251
- package/esm/utils/localization/translations/nb-NO-json.d.ts +0 -252
- package/esm/utils/localization/translations/nl-json.d.ts +0 -251
- package/esm/utils/localization/translations/pl-json.d.ts +0 -251
- package/esm/utils/localization/translations/pt-BR-json.d.ts +0 -251
- package/esm/utils/localization/translations/sk-SK-json.d.ts +0 -251
- package/esm/utils/localization/translations/sv-json.d.ts +0 -251
- package/esm/utils/localization/translations/th-json.d.ts +0 -251
- package/esm/utils/localization/translations/tr-json.d.ts +0 -251
- package/esm/utils/localization/translations/zh-Hans-json.d.ts +0 -251
- package/esm/utils/localization/translations/zh-TW-json.d.ts +0 -271
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
injectString
|
|
5
|
+
} = require("../../utils/localization/translationsDictionary");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
3
9
|
exports.SortableHeaderCell = void 0;
|
|
4
10
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
11
|
const react_1 = require("react");
|
|
@@ -9,88 +15,160 @@ const iconFilter3Asc_1 = require("../../icons/iconFilter3Asc");
|
|
|
9
15
|
const useLanguage_1 = require("../../utils/localization/useLanguage");
|
|
10
16
|
const iconFilter3Desc_1 = require("../../icons/iconFilter3Desc");
|
|
11
17
|
const classNames_1 = require("../../commonHelpers/classNames/classNames");
|
|
18
|
+
injectString("cs", "Sort by {COLUMN_NAME} descending", "Se\u0159adit sestupn\u011B podle {COLUMN_NAME}");
|
|
19
|
+
injectString("da-DK", "Sort by {COLUMN_NAME} descending", "Sorter efter {COLUMN_NAME} faldende");
|
|
20
|
+
injectString("de", "Sort by {COLUMN_NAME} descending", "Absteigend nach {COLUMN_NAME} sortieren");
|
|
21
|
+
injectString("en", "Sort by {COLUMN_NAME} descending", "Sort by {COLUMN_NAME} descending");
|
|
22
|
+
injectString("es", "Sort by {COLUMN_NAME} descending", "Ordenar por {COLUMN_NAME} de manera descendente");
|
|
23
|
+
injectString("fi-FI", "Sort by {COLUMN_NAME} descending", "J\xE4rjest\xE4 {COLUMN_NAME} laskevasti");
|
|
24
|
+
injectString("fr", "Sort by {COLUMN_NAME} descending", "Trier par {COLUMN_NAME} en ordre d\xE9croissant");
|
|
25
|
+
injectString("fr-FR", "Sort by {COLUMN_NAME} descending", "Trier par {COLUMN_NAME} d\xE9croissant");
|
|
26
|
+
injectString("hu-HU", "Sort by {COLUMN_NAME} descending", "Rendezd cs\xF6kken\u0151 sorrendben a(z) {COLUMN_NAME} alapj\xE1n.");
|
|
27
|
+
injectString("id", "Sort by {COLUMN_NAME} descending", "Urutkan menurut {COLUMN_NAME} ke bawah");
|
|
28
|
+
injectString("it", "Sort by {COLUMN_NAME} descending", "Consente di ordinare per {COLUMN_NAME} in ordine decrescente");
|
|
29
|
+
injectString("ja", "Sort by {COLUMN_NAME} descending", "{COLUMN_NAME} \u3092\u964D\u9806\u3067\u30BD\u30FC\u30C8");
|
|
30
|
+
injectString("ko-KR", "Sort by {COLUMN_NAME} descending", "{COLUMN_NAME} \uC5F4\uC744 \uB0B4\uB9BC\uCC28\uC21C\uC73C\uB85C \uC815\uB82C");
|
|
31
|
+
injectString("ms", "Sort by {COLUMN_NAME} descending", "Isih mengikut {COLUMN_NAME} secara menurun");
|
|
32
|
+
injectString("nb-NO", "Sort by {COLUMN_NAME} descending", "Sorter etter {COLUMN_NAME} fallende");
|
|
33
|
+
injectString("nl", "Sort by {COLUMN_NAME} descending", "Sorteren op {COLUMN_NAME}, aflopend");
|
|
34
|
+
injectString("pl", "Sort by {COLUMN_NAME} descending", "Sortuj wed\u0142ug {COLUMN_NAME} malej\u0105co");
|
|
35
|
+
injectString("pt-BR", "Sort by {COLUMN_NAME} descending", "Classificar por {COLUMN_NAME} em ordem descendente");
|
|
36
|
+
injectString("sk-SK", "Sort by {COLUMN_NAME} descending", "Zoradi\u0165 pod\u013Ea {COLUMN_NAME} zostupne");
|
|
37
|
+
injectString("sv", "Sort by {COLUMN_NAME} descending", "Sortera efter {COLUMN_NAME} i fallande ordning");
|
|
38
|
+
injectString("th", "Sort by {COLUMN_NAME} descending", "\u0E40\u0E23\u0E35\u0E22\u0E07\u0E15\u0E32\u0E21 {COLUMN_NAME} \u0E08\u0E32\u0E01\u0E21\u0E32\u0E01\u0E44\u0E1B\u0E2B\u0E32\u0E19\u0E49\u0E2D\u0E22");
|
|
39
|
+
injectString("tr", "Sort by {COLUMN_NAME} descending", "{COLUMN_NAME} s\xFCtununa g\xF6re azalan s\u0131rada g\xF6ster");
|
|
40
|
+
injectString("zh-Hans", "Sort by {COLUMN_NAME} descending", "\u6309 {COLUMN_NAME} \u964D\u5E8F\u6392\u5E8F");
|
|
41
|
+
injectString("zh-TW", "Sort by {COLUMN_NAME} descending", "\u4F9D\u300C{COLUMN_NAME}\u300D\u905E\u6E1B\u6392\u5E8F");
|
|
42
|
+
injectString("cs", "Sort by {COLUMN_NAME} ascending", "Se\u0159adit vzestupn\u011B podle {COLUMN_NAME}");
|
|
43
|
+
injectString("da-DK", "Sort by {COLUMN_NAME} ascending", "Sorter efter {COLUMN_NAME} stigende");
|
|
44
|
+
injectString("de", "Sort by {COLUMN_NAME} ascending", "Aufsteigend nach {COLUMN_NAME} sortieren");
|
|
45
|
+
injectString("en", "Sort by {COLUMN_NAME} ascending", "Sort by {COLUMN_NAME} ascending");
|
|
46
|
+
injectString("es", "Sort by {COLUMN_NAME} ascending", "Ordenar por {COLUMN_NAME} de manera ascendente");
|
|
47
|
+
injectString("fi-FI", "Sort by {COLUMN_NAME} ascending", "J\xE4rjest\xE4 {COLUMN_NAME} nousevasti");
|
|
48
|
+
injectString("fr", "Sort by {COLUMN_NAME} ascending", "Trier par {COLUMN_NAME} en ordre croissant");
|
|
49
|
+
injectString("fr-FR", "Sort by {COLUMN_NAME} ascending", "Trier par {COLUMN_NAME} croissant");
|
|
50
|
+
injectString("hu-HU", "Sort by {COLUMN_NAME} ascending", "Rendezd n\xF6vekv\u0151 sorrendben a(z) {COLUMN_NAME} szerint.");
|
|
51
|
+
injectString("id", "Sort by {COLUMN_NAME} ascending", "Urutkan menurut {COLUMN_NAME} ke atas");
|
|
52
|
+
injectString("it", "Sort by {COLUMN_NAME} ascending", "Consente di ordinare per {COLUMN_NAME} in ordine crescente");
|
|
53
|
+
injectString("ja", "Sort by {COLUMN_NAME} ascending", "{COLUMN_NAME} \u3092\u6607\u9806\u3067\u30BD\u30FC\u30C8");
|
|
54
|
+
injectString("ko-KR", "Sort by {COLUMN_NAME} ascending", "{COLUMN_NAME} \uC5F4\uC744 \uC624\uB984\uCC28\uC21C\uC73C\uB85C \uC815\uB82C");
|
|
55
|
+
injectString("ms", "Sort by {COLUMN_NAME} ascending", "Isih mengikut {COLUMN_NAME} secara menaik");
|
|
56
|
+
injectString("nb-NO", "Sort by {COLUMN_NAME} ascending", "Sorter etter {COLUMN_NAME} stigende");
|
|
57
|
+
injectString("nl", "Sort by {COLUMN_NAME} ascending", "Sorteren op {COLUMN_NAME}, oplopend");
|
|
58
|
+
injectString("pl", "Sort by {COLUMN_NAME} ascending", "Sortuj wed\u0142ug {COLUMN_NAME} rosn\u0105co");
|
|
59
|
+
injectString("pt-BR", "Sort by {COLUMN_NAME} ascending", "Classificar por {COLUMN_NAME} em ordem ascendente");
|
|
60
|
+
injectString("sk-SK", "Sort by {COLUMN_NAME} ascending", "Zoradi\u0165 pod\u013Ea {COLUMN_NAME} vzostupne");
|
|
61
|
+
injectString("sv", "Sort by {COLUMN_NAME} ascending", "Sortera efter {COLUMN_NAME} i stigande ordning");
|
|
62
|
+
injectString("th", "Sort by {COLUMN_NAME} ascending", "\u0E40\u0E23\u0E35\u0E22\u0E07\u0E15\u0E32\u0E21 {COLUMN_NAME} \u0E08\u0E32\u0E01\u0E19\u0E49\u0E2D\u0E22\u0E44\u0E1B\u0E2B\u0E32\u0E21\u0E32\u0E01");
|
|
63
|
+
injectString("tr", "Sort by {COLUMN_NAME} ascending", "{COLUMN_NAME} s\xFCtununa g\xF6re artan s\u0131rada g\xF6ster");
|
|
64
|
+
injectString("zh-Hans", "Sort by {COLUMN_NAME} ascending", "\u6309 {COLUMN_NAME} \u5347\u5E8F\u6392\u5E8F");
|
|
65
|
+
injectString("zh-TW", "Sort by {COLUMN_NAME} ascending", "\u4F9D\u300C{COLUMN_NAME}\u300D\u905E\u589E\u6392\u5E8F");
|
|
12
66
|
const getSortButtonTitle = (sortDirection, title, translate) => {
|
|
13
|
-
|
|
14
|
-
|
|
67
|
+
const titleTemplate = sortDirection === interfaces_1.ColumnSortDirection.Descending ? translate("Sort by {COLUMN_NAME} descending") : translate("Sort by {COLUMN_NAME} ascending");
|
|
68
|
+
return titleTemplate.replace("{COLUMN_NAME}", title);
|
|
15
69
|
};
|
|
16
70
|
const activeElementNames = new Set(["BUTTON", "A", "LABEL", "INPUT"]);
|
|
17
|
-
const isActiveElement =
|
|
71
|
+
const isActiveElement = element => activeElementNames.has(element.nodeName);
|
|
18
72
|
const findParent = (element, className) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
73
|
+
if (element.classList.contains(className)) {
|
|
74
|
+
return element;
|
|
75
|
+
}
|
|
76
|
+
if (isActiveElement(element)) {
|
|
77
|
+
return element;
|
|
78
|
+
}
|
|
79
|
+
if (!element.parentElement) {
|
|
80
|
+
return element;
|
|
81
|
+
}
|
|
82
|
+
return findParent(element.parentElement, className);
|
|
29
83
|
};
|
|
30
|
-
const isClickOnSortableParent =
|
|
31
|
-
|
|
32
|
-
|
|
84
|
+
const isClickOnSortableParent = element => {
|
|
85
|
+
const parent = findParent(element, "zen-sortable-column-button");
|
|
86
|
+
return parent.classList.contains("zen-sortable-column-button") || parent.classList.contains("zen-sortable-column-button__dir-icon");
|
|
33
87
|
};
|
|
34
|
-
const SortableHeaderCell = ({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
88
|
+
const SortableHeaderCell = ({
|
|
89
|
+
columnName,
|
|
90
|
+
isSortedBy,
|
|
91
|
+
sortDirection,
|
|
92
|
+
title,
|
|
93
|
+
tooltip,
|
|
94
|
+
onSortChange,
|
|
95
|
+
isMobile = false,
|
|
96
|
+
initialSortDirection = interfaces_1.ColumnSortDirection.Ascending
|
|
97
|
+
}) => {
|
|
98
|
+
const {
|
|
99
|
+
translate
|
|
100
|
+
} = (0, useLanguage_1.useLanguage)();
|
|
101
|
+
const [isHovered, setIsHovered] = (0, react_1.useState)(false);
|
|
102
|
+
const [isFocused, setIsFocused] = (0, react_1.useState)(false);
|
|
103
|
+
const isActive = isHovered || isFocused;
|
|
104
|
+
const iconTitleText = (0, react_1.useMemo)(() => {
|
|
105
|
+
switch (sortDirection) {
|
|
106
|
+
case interfaces_1.ColumnSortDirection.Ascending:
|
|
107
|
+
{
|
|
108
|
+
return interfaces_1.ColumnSortDirection.Descending;
|
|
50
109
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
switch (sortDirection) {
|
|
55
|
-
case interfaces_1.ColumnSortDirection.Ascending: {
|
|
56
|
-
return isActive ? iconFilter3Desc_1.IconFilter3Desc : iconFilter3Asc_1.IconFilter3Asc;
|
|
57
|
-
}
|
|
58
|
-
case interfaces_1.ColumnSortDirection.Descending:
|
|
59
|
-
return isActive ? iconFilter3Asc_1.IconFilter3Asc : iconFilter3Desc_1.IconFilter3Desc;
|
|
60
|
-
case undefined:
|
|
61
|
-
default: {
|
|
62
|
-
return initialSortDirection === interfaces_1.ColumnSortDirection.Ascending ? iconFilter3Asc_1.IconFilter3Asc : iconFilter3Desc_1.IconFilter3Desc;
|
|
63
|
-
}
|
|
110
|
+
case interfaces_1.ColumnSortDirection.Descending:
|
|
111
|
+
{
|
|
112
|
+
return interfaces_1.ColumnSortDirection.Ascending;
|
|
64
113
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
114
|
+
case undefined:
|
|
115
|
+
default:
|
|
116
|
+
return initialSortDirection;
|
|
117
|
+
}
|
|
118
|
+
}, [sortDirection, initialSortDirection]);
|
|
119
|
+
const iconTitle = getSortButtonTitle(iconTitleText, tooltip, translate);
|
|
120
|
+
const icon = (0, react_1.useMemo)(() => {
|
|
121
|
+
switch (sortDirection) {
|
|
122
|
+
case interfaces_1.ColumnSortDirection.Ascending:
|
|
123
|
+
{
|
|
124
|
+
return isActive ? iconFilter3Desc_1.IconFilter3Desc : iconFilter3Asc_1.IconFilter3Asc;
|
|
71
125
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
: interfaces_1.ColumnSortDirection.Ascending
|
|
79
|
-
});
|
|
126
|
+
case interfaces_1.ColumnSortDirection.Descending:
|
|
127
|
+
return isActive ? iconFilter3Asc_1.IconFilter3Asc : iconFilter3Desc_1.IconFilter3Desc;
|
|
128
|
+
case undefined:
|
|
129
|
+
default:
|
|
130
|
+
{
|
|
131
|
+
return initialSortDirection === interfaces_1.ColumnSortDirection.Ascending ? iconFilter3Asc_1.IconFilter3Asc : iconFilter3Desc_1.IconFilter3Desc;
|
|
80
132
|
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
133
|
+
}
|
|
134
|
+
}, [sortDirection, isActive, initialSortDirection]);
|
|
135
|
+
const iconButton = (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
|
|
136
|
+
className: "zen-sortable-column-button__dir-icon zen-caption__post-icon",
|
|
137
|
+
icon: icon,
|
|
138
|
+
iconPosition: isMobile ? textIconButton_1.ButtonIconPosition.Start : textIconButton_1.ButtonIconPosition.End,
|
|
139
|
+
type: "tertiary-black",
|
|
140
|
+
title: iconTitle
|
|
141
|
+
});
|
|
142
|
+
const onHeaderClick = (0, react_1.useCallback)(e => {
|
|
143
|
+
const target = e && e.target;
|
|
144
|
+
if (!target) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (isClickOnSortableParent(target)) {
|
|
148
|
+
onSortChange({
|
|
149
|
+
sortColumn: columnName,
|
|
150
|
+
sortDirection: sortDirection === undefined ? initialSortDirection : sortDirection === interfaces_1.ColumnSortDirection.Ascending ? interfaces_1.ColumnSortDirection.Descending : interfaces_1.ColumnSortDirection.Ascending
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}, [onSortChange, columnName, sortDirection, initialSortDirection]);
|
|
154
|
+
return (0, jsx_runtime_1.jsx)("div", {
|
|
155
|
+
onMouseEnter: () => setIsHovered(true),
|
|
156
|
+
onMouseLeave: () => setIsHovered(false),
|
|
157
|
+
onFocus: () => setIsFocused(true),
|
|
158
|
+
onBlur: () => setIsFocused(false),
|
|
159
|
+
className: (0, classNames_1.classNames)(["zen-sortable-column", isSortedBy ? `zen-sortable-column--active` : "", isMobile ? `zen-sortable-column--mobile` : ""]),
|
|
160
|
+
children: (0, jsx_runtime_1.jsx)("div", {
|
|
161
|
+
className: (0, classNames_1.classNames)(["zen-caption", "zen-sortable-column__button", "zen-sortable-column-button", isSortedBy ? `zen-sortable-column-button--active` : "", sortDirection === interfaces_1.ColumnSortDirection.Ascending ? "zen-sortable-column-button--dir-asc" : "zen-sortable-column-button--dir-desc"]),
|
|
162
|
+
title: iconTitle,
|
|
163
|
+
"aria-label": iconTitle,
|
|
164
|
+
onClick: onHeaderClick,
|
|
165
|
+
children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, {
|
|
166
|
+
children: [isMobile ? iconButton : null, (0, jsx_runtime_1.jsx)("div", {
|
|
167
|
+
className: "zen-sortable-column-button__content zen-caption__content",
|
|
168
|
+
children: title
|
|
169
|
+
}), isMobile ? null : iconButton]
|
|
170
|
+
})
|
|
171
|
+
})
|
|
172
|
+
});
|
|
95
173
|
};
|
|
96
|
-
exports.SortableHeaderCell = SortableHeaderCell;
|
|
174
|
+
exports.SortableHeaderCell = SortableHeaderCell;
|
package/dist/tabs/tabs.js
CHANGED
|
@@ -1,8 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
injectString
|
|
5
|
+
} = require("../utils/localization/translationsDictionary");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
3
9
|
exports.Tabs = exports.TabsDisplayName = void 0;
|
|
4
10
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
11
|
const react_1 = require("react");
|
|
12
|
+
injectString("cs", "Scroll left", "P\u0159ej\xEDt doleva");
|
|
13
|
+
injectString("da-DK", "Scroll left", "Rul til venstre");
|
|
14
|
+
injectString("de", "Scroll left", "Nach links scrollen");
|
|
15
|
+
injectString("en", "Scroll left", "Scroll left");
|
|
16
|
+
injectString("es", "Scroll left", "Desplazarse a la izquierda");
|
|
17
|
+
injectString("fi-FI", "Scroll left", "Selaa vasemmalle");
|
|
18
|
+
injectString("fr", "Scroll left", "D\xE9filer vers la gauche");
|
|
19
|
+
injectString("fr-FR", "Scroll left", "Faire d\xE9filer vers la gauche");
|
|
20
|
+
injectString("hu-HU", "Scroll left", "Lapozz balra.");
|
|
21
|
+
injectString("id", "Scroll left", "Gulir ke kiri");
|
|
22
|
+
injectString("it", "Scroll left", "Scorrere verso sinistra");
|
|
23
|
+
injectString("ja", "Scroll left", "\u5DE6\u306B\u30B9\u30AF\u30ED\u30FC\u30EB");
|
|
24
|
+
injectString("ko-KR", "Scroll left", "\uC67C\uCABD\uC73C\uB85C \uC2A4\uD06C\uB864");
|
|
25
|
+
injectString("ms", "Scroll left", "Skrol ke kiri");
|
|
26
|
+
injectString("nb-NO", "Scroll left", "Rull til venstre");
|
|
27
|
+
injectString("nl", "Scroll left", "Blader naar links");
|
|
28
|
+
injectString("pl", "Scroll left", "Przewi\u0144 w lewo");
|
|
29
|
+
injectString("pt-BR", "Scroll left", "Rolar para a esquerda");
|
|
30
|
+
injectString("sk-SK", "Scroll left", "Posu\u0148 do\u013Eava");
|
|
31
|
+
injectString("sv", "Scroll left", "Bl\xE4ddra \xE5t v\xE4nster");
|
|
32
|
+
injectString("th", "Scroll left", "\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E1B\u0E17\u0E32\u0E07\u0E0B\u0E49\u0E32\u0E22");
|
|
33
|
+
injectString("tr", "Scroll left", "Sola kayd\u0131r");
|
|
34
|
+
injectString("zh-Hans", "Scroll left", "\u5411\u5DE6\u6EDA\u52A8");
|
|
35
|
+
injectString("zh-TW", "Scroll left", "\u5411\u5DE6\u6372\u52D5");
|
|
36
|
+
injectString("cs", "Scroll right", "P\u0159ej\xEDt doprava");
|
|
37
|
+
injectString("da-DK", "Scroll right", "Rul til h\xF8jre");
|
|
38
|
+
injectString("de", "Scroll right", "Nach rechts scrollen");
|
|
39
|
+
injectString("en", "Scroll right", "Scroll right");
|
|
40
|
+
injectString("es", "Scroll right", "Desplazarse a la derecha");
|
|
41
|
+
injectString("fi-FI", "Scroll right", "Selaa oikealle");
|
|
42
|
+
injectString("fr", "Scroll right", "D\xE9filer vers la droite");
|
|
43
|
+
injectString("fr-FR", "Scroll right", "Faire d\xE9filer vers la droite");
|
|
44
|
+
injectString("hu-HU", "Scroll right", "Lapozz jobbra.");
|
|
45
|
+
injectString("id", "Scroll right", "Gulir ke kanan");
|
|
46
|
+
injectString("it", "Scroll right", "Scorrere verso destra");
|
|
47
|
+
injectString("ja", "Scroll right", "\u53F3\u306B\u30B9\u30AF\u30ED\u30FC\u30EB");
|
|
48
|
+
injectString("ko-KR", "Scroll right", "\uC624\uB978\uCABD\uC73C\uB85C \uC2A4\uD06C\uB864");
|
|
49
|
+
injectString("ms", "Scroll right", "Skrol ke kanan");
|
|
50
|
+
injectString("nb-NO", "Scroll right", "Rull til h\xF8yre");
|
|
51
|
+
injectString("nl", "Scroll right", "Blader naar rechts");
|
|
52
|
+
injectString("pl", "Scroll right", "Przewi\u0144 w prawo");
|
|
53
|
+
injectString("pt-BR", "Scroll right", "Rolar para a direita");
|
|
54
|
+
injectString("sk-SK", "Scroll right", "Posu\u0148 doprava");
|
|
55
|
+
injectString("sv", "Scroll right", "Bl\xE4ddra \xE5t h\xF6ger");
|
|
56
|
+
injectString("th", "Scroll right", "\u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19\u0E44\u0E1B\u0E17\u0E32\u0E07\u0E02\u0E27\u0E32");
|
|
57
|
+
injectString("tr", "Scroll right", "Sa\u011Fa Kayd\u0131r");
|
|
58
|
+
injectString("zh-Hans", "Scroll right", "\u5411\u53F3\u6EDA\u52A8");
|
|
59
|
+
injectString("zh-TW", "Scroll right", "\u5411\u53F3\u6372\u52D5");
|
|
6
60
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
7
61
|
const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
|
|
8
62
|
const useLanguage_1 = require("../utils/localization/useLanguage");
|
|
@@ -11,128 +65,183 @@ const iconChevronRight_1 = require("../icons/iconChevronRight");
|
|
|
11
65
|
const textIconButton_1 = require("../textIconButton/textIconButton");
|
|
12
66
|
const tabsKeyboard_1 = require("../commonHelpers/tabsKeyboard");
|
|
13
67
|
exports.TabsDisplayName = "Tabs";
|
|
14
|
-
const getScrollButtonType =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
68
|
+
const getScrollButtonType = element => {
|
|
69
|
+
const scrollLeft = element.scrollLeft;
|
|
70
|
+
const scrollWidth = element.scrollWidth;
|
|
71
|
+
const clientWidth = element.clientWidth;
|
|
72
|
+
if (scrollLeft === 0 && scrollWidth === clientWidth) {
|
|
73
|
+
return "";
|
|
74
|
+
}
|
|
75
|
+
if (scrollLeft > 0 && scrollWidth > clientWidth + scrollLeft + 1) {
|
|
76
|
+
return "both";
|
|
77
|
+
}
|
|
78
|
+
if (scrollLeft === 0) {
|
|
79
|
+
return "end";
|
|
80
|
+
}
|
|
81
|
+
return "start";
|
|
82
|
+
};
|
|
83
|
+
const Tabs = ({
|
|
84
|
+
className,
|
|
85
|
+
tabs = [],
|
|
86
|
+
activeTabId,
|
|
87
|
+
onTabChange
|
|
88
|
+
}) => {
|
|
89
|
+
const driveClassname = (0, useDriveClassName_1.useDriveClassName)("zen-tabs");
|
|
90
|
+
const scrollableStep = 200;
|
|
91
|
+
const {
|
|
92
|
+
translate
|
|
93
|
+
} = (0, useLanguage_1.useLanguage)();
|
|
94
|
+
const driveClassNameScroller = (0, useDriveClassName_1.useDriveClassName)("zen-tabs__scroller");
|
|
95
|
+
const driveClassNameGradient = (0, useDriveClassName_1.useDriveClassName)("zen-tabs__gradient");
|
|
96
|
+
const [scrollButtonType, setScrollButtonType] = (0, react_1.useState)("");
|
|
97
|
+
const scrollableRef = (0, react_1.useRef)(null);
|
|
98
|
+
const scrollRef = (0, react_1.useRef)(0);
|
|
99
|
+
const focusableTabIdRef = (0, react_1.useRef)("");
|
|
100
|
+
const handleButtonClick = e => {
|
|
101
|
+
const newState = e.currentTarget.id;
|
|
102
|
+
focusableTabIdRef.current = newState;
|
|
103
|
+
if (newState !== activeTabId) {
|
|
104
|
+
onTabChange(newState);
|
|
20
105
|
}
|
|
21
|
-
|
|
22
|
-
|
|
106
|
+
};
|
|
107
|
+
const keyDownHandler = (0, react_1.useCallback)(e => {
|
|
108
|
+
var _a;
|
|
109
|
+
if (e.key === "Shift") {
|
|
110
|
+
return;
|
|
23
111
|
}
|
|
24
|
-
if (
|
|
25
|
-
|
|
112
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
113
|
+
const target = e.target;
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
115
|
+
if (target && target.id && tabs.some(tab => tab.id === target.id)) {
|
|
116
|
+
focusableTabIdRef.current = target.id;
|
|
117
|
+
onTabChange(target.id);
|
|
118
|
+
}
|
|
119
|
+
return;
|
|
26
120
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
121
|
+
if (e.key === "Tab") {
|
|
122
|
+
const nextTabId = (0, tabsKeyboard_1.tabsKeyboardTabHandler)(e, tabs, document.activeElement);
|
|
123
|
+
if (nextTabId) {
|
|
124
|
+
focusableTabIdRef.current = nextTabId;
|
|
125
|
+
}
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const newActiveTabId = (0, tabsKeyboard_1.tabsKeyboardHandler)(e, tabs, focusableTabIdRef.current) || activeTabId;
|
|
129
|
+
focusableTabIdRef.current = newActiveTabId;
|
|
130
|
+
const focusableTab = (_a = scrollableRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`.zen-tab-item[id='${newActiveTabId}']`);
|
|
131
|
+
focusableTab === null || focusableTab === void 0 ? void 0 : focusableTab.focus();
|
|
132
|
+
}, [tabs, activeTabId, onTabChange]);
|
|
133
|
+
(0, react_1.useEffect)(() => {
|
|
134
|
+
if (!scrollableRef.current) {
|
|
135
|
+
return () => {};
|
|
136
|
+
}
|
|
137
|
+
let timer = undefined;
|
|
138
|
+
const resizeHandler = () => {
|
|
139
|
+
const scrollableElt = scrollableRef.current;
|
|
140
|
+
if (scrollableElt) {
|
|
141
|
+
timer && window.clearTimeout(timer);
|
|
142
|
+
timer = window.setTimeout(() => {
|
|
143
|
+
setScrollButtonType(getScrollButtonType(scrollableElt));
|
|
144
|
+
}, 200);
|
|
145
|
+
}
|
|
45
146
|
};
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}, [tabs, activeTabId, onTabChange]);
|
|
72
|
-
(0, react_1.useEffect)(() => {
|
|
73
|
-
if (!scrollableRef.current) {
|
|
74
|
-
return () => { };
|
|
75
|
-
}
|
|
76
|
-
let timer = undefined;
|
|
77
|
-
const resizeHandler = () => {
|
|
78
|
-
const scrollableElt = scrollableRef.current;
|
|
79
|
-
if (scrollableElt) {
|
|
80
|
-
timer && window.clearTimeout(timer);
|
|
81
|
-
timer = window.setTimeout(() => {
|
|
82
|
-
setScrollButtonType(getScrollButtonType(scrollableElt));
|
|
83
|
-
}, 200);
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
const scrollableElement = scrollableRef.current;
|
|
87
|
-
scrollableElement.addEventListener("scroll", resizeHandler);
|
|
88
|
-
window.addEventListener("resize", resizeHandler);
|
|
89
|
-
resizeHandler();
|
|
90
|
-
return () => {
|
|
91
|
-
timer && window.clearTimeout(timer);
|
|
92
|
-
scrollableElement.removeEventListener("scroll", resizeHandler);
|
|
93
|
-
window.removeEventListener("resize", resizeHandler);
|
|
94
|
-
};
|
|
95
|
-
}, [scrollableRef]);
|
|
96
|
-
(0, react_1.useEffect)(() => {
|
|
97
|
-
if (scrollableRef.current) {
|
|
98
|
-
setScrollButtonType(getScrollButtonType(scrollableRef.current));
|
|
99
|
-
}
|
|
100
|
-
}, [scrollableRef, tabs, activeTabId]);
|
|
101
|
-
const handleScrollButtonClick = (0, react_1.useCallback)((scrollableElt, delta) => () => {
|
|
102
|
-
if (scrollableElt) {
|
|
103
|
-
let iterations = 0;
|
|
104
|
-
const maxIterations = 100;
|
|
105
|
-
const start = scrollableElt.scrollLeft;
|
|
106
|
-
const end = start + delta;
|
|
107
|
-
const duration = 300;
|
|
108
|
-
const animateScroll = (timestamp) => {
|
|
109
|
-
if (!scrollRef.current) {
|
|
110
|
-
scrollRef.current = timestamp;
|
|
111
|
-
}
|
|
112
|
-
const progress = Math.min((timestamp - scrollRef.current) / duration, 1);
|
|
113
|
-
scrollableElt.scrollLeft = start + (end - start) * progress;
|
|
114
|
-
if (progress < 1 && iterations < maxIterations) {
|
|
115
|
-
iterations++;
|
|
116
|
-
window.requestAnimationFrame(animateScroll);
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
scrollRef.current = 0;
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
window.requestAnimationFrame(animateScroll);
|
|
123
|
-
}
|
|
124
|
-
}, []);
|
|
125
|
-
(0, react_1.useEffect)(() => {
|
|
126
|
-
if (!scrollableRef.current || !activeTabId) {
|
|
127
|
-
return;
|
|
147
|
+
const scrollableElement = scrollableRef.current;
|
|
148
|
+
scrollableElement.addEventListener("scroll", resizeHandler);
|
|
149
|
+
window.addEventListener("resize", resizeHandler);
|
|
150
|
+
resizeHandler();
|
|
151
|
+
return () => {
|
|
152
|
+
timer && window.clearTimeout(timer);
|
|
153
|
+
scrollableElement.removeEventListener("scroll", resizeHandler);
|
|
154
|
+
window.removeEventListener("resize", resizeHandler);
|
|
155
|
+
};
|
|
156
|
+
}, [scrollableRef]);
|
|
157
|
+
(0, react_1.useEffect)(() => {
|
|
158
|
+
if (scrollableRef.current) {
|
|
159
|
+
setScrollButtonType(getScrollButtonType(scrollableRef.current));
|
|
160
|
+
}
|
|
161
|
+
}, [scrollableRef, tabs, activeTabId]);
|
|
162
|
+
const handleScrollButtonClick = (0, react_1.useCallback)((scrollableElt, delta) => () => {
|
|
163
|
+
if (scrollableElt) {
|
|
164
|
+
let iterations = 0;
|
|
165
|
+
const maxIterations = 100;
|
|
166
|
+
const start = scrollableElt.scrollLeft;
|
|
167
|
+
const end = start + delta;
|
|
168
|
+
const duration = 300;
|
|
169
|
+
const animateScroll = timestamp => {
|
|
170
|
+
if (!scrollRef.current) {
|
|
171
|
+
scrollRef.current = timestamp;
|
|
128
172
|
}
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
173
|
+
const progress = Math.min((timestamp - scrollRef.current) / duration, 1);
|
|
174
|
+
scrollableElt.scrollLeft = start + (end - start) * progress;
|
|
175
|
+
if (progress < 1 && iterations < maxIterations) {
|
|
176
|
+
iterations++;
|
|
177
|
+
window.requestAnimationFrame(animateScroll);
|
|
178
|
+
} else {
|
|
179
|
+
scrollRef.current = 0;
|
|
133
180
|
}
|
|
134
|
-
|
|
135
|
-
|
|
181
|
+
};
|
|
182
|
+
window.requestAnimationFrame(animateScroll);
|
|
183
|
+
}
|
|
184
|
+
}, []);
|
|
185
|
+
(0, react_1.useEffect)(() => {
|
|
186
|
+
if (!scrollableRef.current || !activeTabId) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
const activeTab = scrollableRef.current.querySelector(`.zen-tab-item[id='${activeTabId}']`);
|
|
190
|
+
if (activeTab instanceof HTMLElement) {
|
|
191
|
+
focusableTabIdRef.current = activeTab.getAttribute("id") || "";
|
|
192
|
+
// activeTab.focus();
|
|
193
|
+
}
|
|
194
|
+
}, [activeTabId]);
|
|
195
|
+
return (0, jsx_runtime_1.jsx)("div", {
|
|
196
|
+
className: (0, classNames_1.classNames)(["zen-tabs", driveClassname || "", className !== null && className !== void 0 ? className : ""]),
|
|
197
|
+
children: (0, jsx_runtime_1.jsxs)("div", {
|
|
198
|
+
className: (0, classNames_1.classNames)(["zen-tabs__tabs-container", className !== null && className !== void 0 ? className : "", scrollButtonType]),
|
|
199
|
+
children: [scrollButtonType === "start" || scrollButtonType === "both" ? (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, {
|
|
200
|
+
children: [(0, jsx_runtime_1.jsx)("div", {
|
|
201
|
+
className: (0, classNames_1.classNames)(["zen-tabs__gradient", driveClassNameGradient || "", "zen-tabs__gradient--left"])
|
|
202
|
+
}), (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
|
|
203
|
+
title: translate("Scroll left"),
|
|
204
|
+
className: (0, classNames_1.classNames)(["zen-tabs__scroller", driveClassNameScroller || "", "zen-tabs__start"]),
|
|
205
|
+
icon: iconChevronRight_1.IconChevronRight,
|
|
206
|
+
type: "tertiary",
|
|
207
|
+
iconPosition: textIconButton_1.ButtonIconPosition.Start,
|
|
208
|
+
onClick: handleScrollButtonClick(scrollableRef.current, -scrollableStep),
|
|
209
|
+
iconClasses: "zen-tabs__start-icon"
|
|
210
|
+
})]
|
|
211
|
+
}) : null, (0, jsx_runtime_1.jsx)("div", {
|
|
212
|
+
ref: scrollableRef,
|
|
213
|
+
onKeyDown: keyDownHandler,
|
|
214
|
+
className: "zen-tabs__scrollable",
|
|
215
|
+
children: (0, jsx_runtime_1.jsx)("div", {
|
|
216
|
+
className: "zen-tabs__tabs",
|
|
217
|
+
role: "tablist",
|
|
218
|
+
children: tabs.map(tab => (0, jsx_runtime_1.jsx)(tabItem_1.TabItem, {
|
|
219
|
+
className: "zen-tabs__tab-item",
|
|
220
|
+
tabId: tab.id,
|
|
221
|
+
tabName: tab.name,
|
|
222
|
+
icon: typeof tab.icon === "function" ? (0, react_1.createElement)(tab.icon, {
|
|
223
|
+
size: "large"
|
|
224
|
+
}) : tab.icon,
|
|
225
|
+
quantity: tab.quantity,
|
|
226
|
+
active: activeTabId === tab.id,
|
|
227
|
+
ariaControl: `panel-${tab.id}`,
|
|
228
|
+
handleButtonClick: handleButtonClick
|
|
229
|
+
}, tab.id))
|
|
230
|
+
})
|
|
231
|
+
}), scrollButtonType === "end" || scrollButtonType === "both" ? (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, {
|
|
232
|
+
children: [(0, jsx_runtime_1.jsx)("div", {
|
|
233
|
+
className: (0, classNames_1.classNames)(["zen-tabs__gradient", driveClassNameGradient || "", "zen-tabs__gradient--right"])
|
|
234
|
+
}), (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, {
|
|
235
|
+
title: translate("Scroll right"),
|
|
236
|
+
className: (0, classNames_1.classNames)(["zen-tabs__scroller", driveClassNameScroller || "", "zen-tabs__end"]),
|
|
237
|
+
icon: iconChevronRight_1.IconChevronRight,
|
|
238
|
+
type: "tertiary",
|
|
239
|
+
onClick: handleScrollButtonClick(scrollableRef.current, scrollableStep),
|
|
240
|
+
iconPosition: textIconButton_1.ButtonIconPosition.End
|
|
241
|
+
})]
|
|
242
|
+
}) : null]
|
|
243
|
+
})
|
|
244
|
+
});
|
|
136
245
|
};
|
|
137
246
|
exports.Tabs = Tabs;
|
|
138
|
-
exports.Tabs.displayName = exports.TabsDisplayName;
|
|
247
|
+
exports.Tabs.displayName = exports.TabsDisplayName;
|