@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
package/dist/modal/modal.js
CHANGED
|
@@ -1,31 +1,69 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
injectString
|
|
5
|
+
} = require("../utils/localization/translationsDictionary");
|
|
6
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return m[k];
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
Object.defineProperty(o, k2, desc);
|
|
18
|
+
} : function (o, m, k, k2) {
|
|
19
|
+
if (k2 === undefined) k2 = k;
|
|
20
|
+
o[k2] = m[k];
|
|
21
|
+
});
|
|
22
|
+
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
|
23
|
+
Object.defineProperty(o, "default", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
value: v
|
|
26
|
+
});
|
|
27
|
+
} : function (o, v) {
|
|
28
|
+
o["default"] = v;
|
|
17
29
|
});
|
|
18
|
-
var __importStar =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
var __importStar = this && this.__importStar || function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
24
36
|
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", {
|
|
37
|
+
Object.defineProperty(exports, "__esModule", {
|
|
38
|
+
value: true
|
|
39
|
+
});
|
|
26
40
|
exports.DialogContentNew = exports.Modal = void 0;
|
|
27
41
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
42
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
43
|
+
injectString("cs", "Close", "Zav\u0159\xEDt");
|
|
44
|
+
injectString("da-DK", "Close", "Luk");
|
|
45
|
+
injectString("de", "Close", "Schlie\xDFen");
|
|
46
|
+
injectString("en", "Close", "Close");
|
|
47
|
+
injectString("es", "Close", "Cerrar");
|
|
48
|
+
injectString("fi-FI", "Close", "Sulje");
|
|
49
|
+
injectString("fr", "Close", "Fermer");
|
|
50
|
+
injectString("fr-FR", "Close", "Fermer");
|
|
51
|
+
injectString("hu-HU", "Close", "Z\xE1rd be.");
|
|
52
|
+
injectString("id", "Close", "Tutup");
|
|
53
|
+
injectString("it", "Close", "Chiudere");
|
|
54
|
+
injectString("ja", "Close", "\u9589\u3058\u308B");
|
|
55
|
+
injectString("ko-KR", "Close", "\uB2EB\uAE30");
|
|
56
|
+
injectString("ms", "Close", "Tutup");
|
|
57
|
+
injectString("nb-NO", "Close", "Lukk");
|
|
58
|
+
injectString("nl", "Close", "Sluiten");
|
|
59
|
+
injectString("pl", "Close", "Zamknij");
|
|
60
|
+
injectString("pt-BR", "Close", "Fechar");
|
|
61
|
+
injectString("sk-SK", "Close", "Zatvor");
|
|
62
|
+
injectString("sv", "Close", "St\xE4ng");
|
|
63
|
+
injectString("th", "Close", "\u0E1B\u0E34\u0E14");
|
|
64
|
+
injectString("tr", "Close", "Kapat");
|
|
65
|
+
injectString("zh-Hans", "Close", "\u5173\u95ED");
|
|
66
|
+
injectString("zh-TW", "Close", "\u95DC\u9589");
|
|
29
67
|
const react_1 = __importStar(require("react"));
|
|
30
68
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
31
69
|
const button_1 = require("../button/button");
|
|
@@ -45,131 +83,251 @@ const dialogHelpers_1 = require("../dialog/dialogHelpers");
|
|
|
45
83
|
const themeContext_1 = require("../utils/theme/themeContext");
|
|
46
84
|
const modalHelpers_1 = require("./modalHelpers");
|
|
47
85
|
const textIconButton_1 = require("../textIconButton/textIconButton");
|
|
48
|
-
const Modal = ({
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
window.removeEventListener("scroll", changeTopSpace);
|
|
83
|
-
};
|
|
84
|
-
}, []);
|
|
85
|
-
const labeledId = (0, react_1.useId)();
|
|
86
|
-
const darkClass = dark ? "zen-dark" : "";
|
|
87
|
-
const modalContent = (0, react_1.useMemo)(() => {
|
|
88
|
-
const someContent = [];
|
|
89
|
-
react_1.default.Children.forEach(children, (child, index) => {
|
|
90
|
-
const childrenWithProps = (0, react_1.isValidElement)(child)
|
|
91
|
-
? (0, react_1.cloneElement)(child, Object.assign(Object.assign({}, child.props), { key: index }))
|
|
92
|
-
: child;
|
|
93
|
-
someContent.push(childrenWithProps);
|
|
94
|
-
});
|
|
95
|
-
return someContent;
|
|
96
|
-
}, [children]);
|
|
97
|
-
const dialogHTML = (0, react_1.useCallback)((id) => (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-modal", darkClass, modalContainerClassName || ""]), "aria-labelledby": labeledId, "aria-modal": "true", role: "dialog", style: { top: top }, children: [(0, jsx_runtime_1.jsx)(exports.Modal.Content, { onClose: onClose, maxWidth: maxWidth, title: title, className: className, type: type, labeledId: id, focus: focus, children: modalContent.length > 0 && modalContent.map((el) => el) }), (0, jsx_runtime_1.jsx)("div", { className: "zen-modal__shield", onClick: onOutSideClick })] }), [darkClass, modalContainerClassName, labeledId, top, onClose, maxWidth, title, className, type, focus, modalContent, onOutSideClick]);
|
|
98
|
-
if (!isOpen) {
|
|
99
|
-
return null;
|
|
86
|
+
const Modal = ({
|
|
87
|
+
isOpen,
|
|
88
|
+
children,
|
|
89
|
+
onClose,
|
|
90
|
+
closeOnClickOutside,
|
|
91
|
+
maxWidth,
|
|
92
|
+
title,
|
|
93
|
+
type,
|
|
94
|
+
className,
|
|
95
|
+
focus,
|
|
96
|
+
modalContainerClassName
|
|
97
|
+
}) => {
|
|
98
|
+
const lastActiveOutsideElement = (0, react_1.useRef)(document.activeElement);
|
|
99
|
+
const modalRoot = document.fullscreenElement || document.body;
|
|
100
|
+
const [top, setTop] = (0, react_1.useState)(`${window.pageYOffset}px`);
|
|
101
|
+
const {
|
|
102
|
+
dark
|
|
103
|
+
} = (0, react_1.useContext)(themeContext_1.themeContext);
|
|
104
|
+
const onOutSideClick = (0, react_1.useCallback)(() => {
|
|
105
|
+
if (!isOpen || !closeOnClickOutside || !onClose) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
onClose();
|
|
109
|
+
}, [onClose, isOpen, closeOnClickOutside]);
|
|
110
|
+
(0, react_1.useEffect)(() => {
|
|
111
|
+
const copyActive = lastActiveOutsideElement.current;
|
|
112
|
+
return () => {
|
|
113
|
+
(0, dialogHelpers_1.isFocusable)(copyActive) && copyActive.focus();
|
|
114
|
+
};
|
|
115
|
+
}, []);
|
|
116
|
+
(0, react_1.useEffect)(() => {
|
|
117
|
+
document.body.classList.remove("zen-modal-content--hidden-overflow");
|
|
118
|
+
if (isOpen) {
|
|
119
|
+
document.body.classList.add("zen-modal-content--hidden-overflow");
|
|
100
120
|
}
|
|
101
|
-
return (
|
|
121
|
+
return () => {
|
|
122
|
+
document.body.classList.remove("zen-modal-content--hidden-overflow");
|
|
123
|
+
};
|
|
124
|
+
}, [isOpen]);
|
|
125
|
+
(0, react_1.useEffect)(() => {
|
|
126
|
+
const changeTopSpace = () => {
|
|
127
|
+
setTop(`${window.pageYOffset}px`);
|
|
128
|
+
};
|
|
129
|
+
window.addEventListener("resize", changeTopSpace);
|
|
130
|
+
window.addEventListener("scroll", changeTopSpace);
|
|
131
|
+
return () => {
|
|
132
|
+
window.removeEventListener("resize", changeTopSpace);
|
|
133
|
+
window.removeEventListener("scroll", changeTopSpace);
|
|
134
|
+
};
|
|
135
|
+
}, []);
|
|
136
|
+
const labeledId = (0, react_1.useId)();
|
|
137
|
+
const darkClass = dark ? "zen-dark" : "";
|
|
138
|
+
const modalContent = (0, react_1.useMemo)(() => {
|
|
139
|
+
const someContent = [];
|
|
140
|
+
react_1.default.Children.forEach(children, (child, index) => {
|
|
141
|
+
const childrenWithProps = (0, react_1.isValidElement)(child) ? (0, react_1.cloneElement)(child, Object.assign(Object.assign({}, child.props), {
|
|
142
|
+
key: index
|
|
143
|
+
})) : child;
|
|
144
|
+
someContent.push(childrenWithProps);
|
|
145
|
+
});
|
|
146
|
+
return someContent;
|
|
147
|
+
}, [children]);
|
|
148
|
+
const dialogHTML = (0, react_1.useCallback)(id => (0, jsx_runtime_1.jsxs)("div", {
|
|
149
|
+
className: (0, classNames_1.classNames)(["zen-modal", darkClass, modalContainerClassName || ""]),
|
|
150
|
+
"aria-labelledby": labeledId,
|
|
151
|
+
"aria-modal": "true",
|
|
152
|
+
role: "dialog",
|
|
153
|
+
style: {
|
|
154
|
+
top: top
|
|
155
|
+
},
|
|
156
|
+
children: [(0, jsx_runtime_1.jsx)(exports.Modal.Content, {
|
|
157
|
+
onClose: onClose,
|
|
158
|
+
maxWidth: maxWidth,
|
|
159
|
+
title: title,
|
|
160
|
+
className: className,
|
|
161
|
+
type: type,
|
|
162
|
+
labeledId: id,
|
|
163
|
+
focus: focus,
|
|
164
|
+
children: modalContent.length > 0 && modalContent.map(el => el)
|
|
165
|
+
}), (0, jsx_runtime_1.jsx)("div", {
|
|
166
|
+
className: "zen-modal__shield",
|
|
167
|
+
onClick: onOutSideClick
|
|
168
|
+
})]
|
|
169
|
+
}), [darkClass, modalContainerClassName, labeledId, top, onClose, maxWidth, title, className, type, focus, modalContent, onOutSideClick]);
|
|
170
|
+
if (!isOpen) {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
return (0, react_dom_1.createPortal)(dialogHTML(labeledId), modalRoot, "ModalPortal" + labeledId);
|
|
102
174
|
};
|
|
103
175
|
exports.Modal = Modal;
|
|
104
|
-
const dummyOnClose = () => {
|
|
105
|
-
const DialogContentNew = ({
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
176
|
+
const dummyOnClose = () => {};
|
|
177
|
+
const DialogContentNew = ({
|
|
178
|
+
onClose,
|
|
179
|
+
className,
|
|
180
|
+
title,
|
|
181
|
+
type,
|
|
182
|
+
maxWidth = "600px",
|
|
183
|
+
labeledId,
|
|
184
|
+
focus,
|
|
185
|
+
children
|
|
186
|
+
}) => {
|
|
187
|
+
const {
|
|
188
|
+
translate
|
|
189
|
+
} = (0, useLanguage_1.useLanguage)();
|
|
190
|
+
const isMobile = (0, useMobile_1.useMobile)();
|
|
191
|
+
const contentRef = (0, react_1.useRef)(null);
|
|
192
|
+
const iconDriveClassName = (0, useDriveClassName_1.useDriveClassName)("icon");
|
|
193
|
+
const iconsByType = (0, react_1.useMemo)(() => ({
|
|
194
|
+
"error": iconException_1.IconException,
|
|
195
|
+
"success": iconCheckRadio_1.IconCheckRadio,
|
|
196
|
+
"warning": iconWarning_1.IconWarning,
|
|
197
|
+
"info": iconInfoCircle_1.IconInfoCircle
|
|
198
|
+
}), []);
|
|
199
|
+
const subscriptionCondition = (0, react_1.useCallback)(trigger => trigger.current !== null, []);
|
|
200
|
+
(0, useTrapFocus_1.useTrapFocus)(contentRef, undefined, contentRef, subscriptionCondition);
|
|
201
|
+
(0, useEscape_1.useEscape)(contentRef, onClose || dummyOnClose, contentRef, subscriptionCondition);
|
|
202
|
+
(0, react_1.useEffect)(() => {
|
|
203
|
+
if (contentRef.current === null) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
const firstFocusableElement = (0, modalHelpers_1.getPredefinedFocusableItem)(contentRef.current, focus);
|
|
207
|
+
if (firstFocusableElement) {
|
|
208
|
+
firstFocusableElement.focus();
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const focusable = contentRef.current.querySelectorAll(focusableSelector_1.FOCUSABLE_SELECTOR);
|
|
212
|
+
focusable.length && focusable[focusable.length - 1].focus();
|
|
213
|
+
}, [contentRef, focus]);
|
|
214
|
+
const bodyContent = (0, react_1.useMemo)(() => {
|
|
215
|
+
const modalContent = [];
|
|
216
|
+
let tertiaryButton;
|
|
217
|
+
let primaryButton;
|
|
218
|
+
let secondaryButton;
|
|
219
|
+
react_1.default.Children.forEach(children, child => {
|
|
220
|
+
if (!(0, react_1.isValidElement)(child)) {
|
|
221
|
+
modalContent.push(child);
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
if (child.type === exports.Modal.PrimaryButton) {
|
|
225
|
+
primaryButton = child;
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (child.type === exports.Modal.SecondaryButton) {
|
|
229
|
+
secondaryButton = child;
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (child.type === exports.Modal.TertiaryButton) {
|
|
233
|
+
tertiaryButton = child;
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
modalContent.push(child);
|
|
237
|
+
});
|
|
238
|
+
return {
|
|
239
|
+
modalContent,
|
|
240
|
+
primaryButton,
|
|
241
|
+
secondaryButton,
|
|
242
|
+
tertiaryButton
|
|
243
|
+
};
|
|
244
|
+
}, [children]);
|
|
245
|
+
const isFooterVisible = !!bodyContent.tertiaryButton || !!bodyContent.secondaryButton || !!bodyContent.primaryButton;
|
|
246
|
+
const modalContentClasses = (0, classNames_1.classNames)(["zen-modal-content__body", "body-02-short", !isFooterVisible ? "zen-modal-content__body--no-footer" : ""]);
|
|
247
|
+
return (0, jsx_runtime_1.jsxs)("div", {
|
|
248
|
+
className: (0, classNames_1.classNames)(["zen-modal-content", "body-02", className ? className : ""]),
|
|
249
|
+
// TODO implement sizing for modal and get rid of style
|
|
250
|
+
style: {
|
|
251
|
+
maxWidth: maxWidth
|
|
252
|
+
},
|
|
253
|
+
ref: contentRef,
|
|
254
|
+
children: [(0, jsx_runtime_1.jsxs)("div", {
|
|
255
|
+
className: "zen-modal-content__header",
|
|
256
|
+
children: [(0, jsx_runtime_1.jsxs)("div", {
|
|
257
|
+
className: "zen-modal-content__header-title heading-04 zen-ellipsis",
|
|
258
|
+
id: labeledId,
|
|
259
|
+
children: [type && (0, jsx_runtime_1.jsx)("div", {
|
|
260
|
+
className: (0, classNames_1.classNames)(["zen-modal-content__icon", `${"zen-modal-content__icon--" + type}`]),
|
|
261
|
+
children: (0, react_1.createElement)(iconsByType[type], {
|
|
262
|
+
size: iconDriveClassName ? "huge" : "large"
|
|
263
|
+
})
|
|
264
|
+
}), title]
|
|
265
|
+
}), onClose && (0, jsx_runtime_1.jsx)(button_1.Button, {
|
|
266
|
+
type: "tertiary",
|
|
267
|
+
"data-focusable": "close",
|
|
268
|
+
className: "zen-modal-content__header-close-button",
|
|
269
|
+
title: translate("Close"),
|
|
270
|
+
"aria-label": translate("Close"),
|
|
271
|
+
onClick: onClose,
|
|
272
|
+
children: (0, jsx_runtime_1.jsx)(iconClose_1.IconClose, {
|
|
273
|
+
description: translate("Close"),
|
|
274
|
+
className: "svgIcon",
|
|
275
|
+
size: iconDriveClassName ? "huge" : "large"
|
|
276
|
+
})
|
|
277
|
+
})]
|
|
278
|
+
}), bodyContent.modalContent.length > 0 && (0, jsx_runtime_1.jsx)("div", {
|
|
279
|
+
className: modalContentClasses,
|
|
280
|
+
children: bodyContent.modalContent.map((el, index) => (0, jsx_runtime_1.jsx)(react_1.Fragment, {
|
|
281
|
+
children: el
|
|
282
|
+
}, index))
|
|
283
|
+
}), isFooterVisible && (0, jsx_runtime_1.jsxs)("div", {
|
|
284
|
+
className: (0, classNames_1.classNames)(["zen-modal-content__footer", isMobile ? "zen-modal-content__footer--mobile" : ""]),
|
|
285
|
+
children: [(0, jsx_runtime_1.jsx)("div", {
|
|
286
|
+
className: (0, classNames_1.classNames)(["zen-modal-content__footer-left", isMobile ? "zen-modal-content__footer-left--mobile" : ""]),
|
|
287
|
+
children: bodyContent.tertiaryButton
|
|
288
|
+
}), (bodyContent.secondaryButton || bodyContent.primaryButton) && (0, jsx_runtime_1.jsxs)("div", {
|
|
289
|
+
className: (0, classNames_1.classNames)(["zen-modal-content__footer-right", isMobile ? "zen-modal-content__footer-right--mobile" : ""]),
|
|
290
|
+
children: [bodyContent.secondaryButton, bodyContent.primaryButton]
|
|
291
|
+
})]
|
|
292
|
+
})]
|
|
293
|
+
});
|
|
165
294
|
};
|
|
166
295
|
exports.DialogContentNew = DialogContentNew;
|
|
167
|
-
const SecondaryButton =
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
296
|
+
const SecondaryButton = secondaryButton => secondaryButton.icon ? (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, Object.assign({
|
|
297
|
+
className: "zen-modal-content__icon-button"
|
|
298
|
+
}, secondaryButton, {
|
|
299
|
+
icon: secondaryButton.icon,
|
|
300
|
+
"data-focusable": "secondary",
|
|
301
|
+
children: secondaryButton.children
|
|
302
|
+
})) : (0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({}, secondaryButton, {
|
|
303
|
+
"data-focusable": "secondary",
|
|
304
|
+
children: secondaryButton.children
|
|
305
|
+
}));
|
|
306
|
+
const PrimaryButton = primaryButton => primaryButton.icon ? (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, Object.assign({
|
|
307
|
+
className: "zen-modal-content__icon-button"
|
|
308
|
+
}, primaryButton, {
|
|
309
|
+
type: primaryButton.type || "primary",
|
|
310
|
+
icon: primaryButton.icon,
|
|
311
|
+
"data-focusable": "primary",
|
|
312
|
+
children: primaryButton.children
|
|
313
|
+
})) : (0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({}, primaryButton, {
|
|
314
|
+
"data-focusable": "primary",
|
|
315
|
+
type: primaryButton.type || "primary",
|
|
316
|
+
children: primaryButton.children
|
|
317
|
+
}));
|
|
318
|
+
const TertiaryButton = tertiaryButton => tertiaryButton.icon ? (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, Object.assign({}, tertiaryButton, {
|
|
319
|
+
icon: tertiaryButton.icon,
|
|
320
|
+
className: "zen-modal-content__left-button zen-modal-content__icon-button",
|
|
321
|
+
"data-focusable": "tertiary",
|
|
322
|
+
type: tertiaryButton.type || "tertiary",
|
|
323
|
+
children: tertiaryButton.children
|
|
324
|
+
})) : (0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({}, tertiaryButton, {
|
|
325
|
+
type: tertiaryButton.type || "tertiary",
|
|
326
|
+
className: "zen-modal-content__left-button",
|
|
327
|
+
"data-focusable": "tertiary",
|
|
328
|
+
children: tertiaryButton.children
|
|
329
|
+
}));
|
|
172
330
|
exports.Modal.Content = exports.DialogContentNew;
|
|
173
331
|
exports.Modal.SecondaryButton = SecondaryButton;
|
|
174
332
|
exports.Modal.PrimaryButton = PrimaryButton;
|
|
175
|
-
exports.Modal.TertiaryButton = TertiaryButton;
|
|
333
|
+
exports.Modal.TertiaryButton = TertiaryButton;
|
package/dist/nav/nav.js
CHANGED
|
@@ -128,7 +128,7 @@ const Nav = ({ children, className, collapsed = false, onCollapseToggle, onMenuV
|
|
|
128
128
|
onSearch: setSearchTerm,
|
|
129
129
|
onNavigate: () => setIsMobileMenuOpen(false)
|
|
130
130
|
}, children: [(!isMobile || isMobileMenuOpen)
|
|
131
|
-
? (0, jsx_runtime_1.jsxs)("div", { ref: menuRef, className: (0, classNames_1.classNames)(["zen-nav", isMobile ? "zen-nav--mobile" : "", collapsed ? "zen-nav--collapsed" : "", className || ""]), children: [header ? (0, react_1.cloneElement)(header, Object.assign(Object.assign({}, header.props), { className: (0, classNames_1.classNames)(["zen-nav__header", header.props.className || ""]) })) : null,
|
|
131
|
+
? (0, jsx_runtime_1.jsxs)("div", { ref: menuRef, className: (0, classNames_1.classNames)(["zen-nav", isMobile ? "zen-nav--mobile" : "", collapsed ? "zen-nav--collapsed" : "", className || ""]), children: [header ? (0, react_1.cloneElement)(header, Object.assign(Object.assign({}, header.props), { className: (0, classNames_1.classNames)(["zen-nav__header", header.props.className || ""]) })) : null, (0, jsx_runtime_1.jsx)(NavContent, { children: sectionsToRender.map((section, index) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, react_1.cloneElement)(section, {
|
|
132
132
|
className: (0, classNames_1.classNames)(["zen-nav__section", section.props.className || ""])
|
|
133
133
|
}), isMobile || index < sectionsToRender.length - 1 ? (0, jsx_runtime_1.jsx)(navDivider_1.NavDivider, {}) : null] }, index))) }), footerToRender] })
|
|
134
134
|
: null, mobileBarContainer && isMobile && (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(navMobileBar_1.NavMobileBar, { onMenuToggle: onMobileMenuToggle, isMenuOpen: isMobileMenuOpen, children: primaryItems }), mobileBarContainer)] });
|
|
@@ -1,7 +1,14 @@
|
|
|
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.NavFooter = void 0;
|
|
4
10
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
11
|
+
injectString("en", "Edit Navigation", "Edit Navigation");
|
|
5
12
|
const classNames_1 = require("../../commonHelpers/classNames/classNames");
|
|
6
13
|
const react_1 = require("react");
|
|
7
14
|
const navItem_1 = require("../navItem/navItem");
|
|
@@ -10,51 +17,87 @@ const useMobile_1 = require("../../commonHelpers/hooks/useMobile");
|
|
|
10
17
|
const navFooterAction_1 = require("./navFooterAction/navFooterAction");
|
|
11
18
|
const iconEdit_1 = require("../../icons/iconEdit");
|
|
12
19
|
const nav_context_1 = require("../context/nav.context");
|
|
13
|
-
const NavFooterComponent = ({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const NavFooterComponent = ({
|
|
21
|
+
className,
|
|
22
|
+
children
|
|
23
|
+
}) => {
|
|
24
|
+
const {
|
|
25
|
+
collapsed
|
|
26
|
+
} = (0, nav_context_1.useNavContext)();
|
|
27
|
+
const footerAction = react_1.Children.toArray(children).find(child => {
|
|
28
|
+
const element = child;
|
|
29
|
+
return element.type && element.type.displayName === "NavFooterAction";
|
|
30
|
+
});
|
|
31
|
+
const bottom = react_1.Children.toArray(children).find(child => {
|
|
32
|
+
const element = child;
|
|
33
|
+
return element.type && element.type.displayName === "NavFooterBottom";
|
|
34
|
+
});
|
|
35
|
+
return (0, jsx_runtime_1.jsxs)("div", {
|
|
36
|
+
className: (0, classNames_1.classNames)(["zen-nav-footer", collapsed ? "zen-nav-footer--collapsed" : "", className || ""]),
|
|
37
|
+
children: [(0, jsx_runtime_1.jsx)("div", {
|
|
38
|
+
className: "zen-nav-footer__top",
|
|
39
|
+
children: footerAction
|
|
40
|
+
}), bottom]
|
|
41
|
+
});
|
|
24
42
|
};
|
|
25
|
-
const NavFooterBottom = ({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
const NavFooterBottom = ({
|
|
44
|
+
className,
|
|
45
|
+
children
|
|
46
|
+
}) => {
|
|
47
|
+
const isMobile = (0, useMobile_1.useMobile)();
|
|
48
|
+
const {
|
|
49
|
+
collapsed
|
|
50
|
+
} = (0, nav_context_1.useNavContext)();
|
|
51
|
+
const childrenArray = react_1.Children.toArray(children).filter(child => {
|
|
52
|
+
const element = child;
|
|
53
|
+
if (!element.type) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
const displayName = element.type.displayName;
|
|
57
|
+
return displayName === "NavItem" || displayName === "NavAddMenu" || displayName === "NavFooterEditButton";
|
|
58
|
+
});
|
|
59
|
+
return (0, jsx_runtime_1.jsx)("div", {
|
|
60
|
+
className: (0, classNames_1.classNames)(["zen-nav-footer__bottom", isMobile ? "zen-nav-footer__bottom--mobile" : "", className || ""]),
|
|
61
|
+
children: childrenArray.map(child => {
|
|
62
|
+
const childElement = child;
|
|
63
|
+
return (0, react_1.cloneElement)(childElement, Object.assign(Object.assign({}, childElement.props), {
|
|
64
|
+
collapsed: !isMobile,
|
|
65
|
+
className: (0, classNames_1.classNames)([childElement.props.className || "", "zen-nav-footer__button"]),
|
|
66
|
+
menuAlignment: "right-bottom",
|
|
67
|
+
tooltipAlignment: collapsed ? "right" : "top"
|
|
68
|
+
}));
|
|
69
|
+
})
|
|
70
|
+
});
|
|
43
71
|
};
|
|
44
72
|
NavFooterBottom.displayName = "NavFooterBottom";
|
|
45
|
-
const NavFooterEditButton = ({
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
73
|
+
const NavFooterEditButton = ({
|
|
74
|
+
className,
|
|
75
|
+
onClick
|
|
76
|
+
}) => {
|
|
77
|
+
const {
|
|
78
|
+
translate
|
|
79
|
+
} = (0, useLanguage_1.useLanguage)();
|
|
80
|
+
const {
|
|
81
|
+
collapsed
|
|
82
|
+
} = (0, nav_context_1.useNavContext)();
|
|
83
|
+
const isMobile = (0, useMobile_1.useMobile)();
|
|
84
|
+
return (0, jsx_runtime_1.jsx)(navItem_1.NavItem, {
|
|
85
|
+
className: (0, classNames_1.classNames)(["zen-nav-footer__button", className || ""]),
|
|
86
|
+
title: translate("Edit Navigation"),
|
|
87
|
+
collapsed: !isMobile,
|
|
88
|
+
primaryIcon: iconEdit_1.IconEdit,
|
|
89
|
+
onClick: () => onClick && onClick(),
|
|
90
|
+
menuAlignment: "right-bottom",
|
|
91
|
+
tooltipAlignment: collapsed ? "right" : "top"
|
|
92
|
+
}, "edit-button");
|
|
50
93
|
};
|
|
51
94
|
NavFooterEditButton.displayName = "NavFooterEditButton";
|
|
52
95
|
/**
|
|
53
96
|
* @beta This component is not fully ready yet and may change in future releases.
|
|
54
97
|
*/
|
|
55
98
|
exports.NavFooter = Object.assign(NavFooterComponent, {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
99
|
+
Action: navFooterAction_1.NavFooterAction,
|
|
100
|
+
Bottom: NavFooterBottom,
|
|
101
|
+
EditButton: NavFooterEditButton
|
|
59
102
|
});
|
|
60
|
-
exports.NavFooter.displayName = "NavFooter";
|
|
103
|
+
exports.NavFooter.displayName = "NavFooter";
|