@geotab/zenith 3.0.1-beta.4 → 3.1.0-beta.0
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 +17 -0
- package/dist/advancedGroupsFilter/advancedGroupsFilter.d.ts +1 -0
- package/dist/advancedGroupsFilter/advancedGroupsFilter.js +2 -2
- package/dist/advancedGroupsFilter/advancedGroupsFilterFormSection.js +3 -1
- package/dist/chip/chip.js +5 -5
- package/dist/commonStyles/zIndex.less +5 -0
- package/dist/dateInput/dateInput.d.ts +2 -1
- package/dist/dateInput/dateInput.js +11 -2
- package/dist/dateRange/dateRange.js +9 -8
- package/dist/dropdown/dropdown.d.ts +2 -0
- package/dist/dropdown/dropdown.js +6 -5
- package/dist/dropdown/dropdownHelper.d.ts +4 -4
- package/dist/dropdown/dropdownHelper.js +2 -1
- package/dist/dropdown/dropdownList.js +2 -2
- package/dist/dropdown/dropdownPopup.d.ts +1 -0
- package/dist/dropdown/dropdownPopup.js +2 -2
- package/dist/dropdown/dropdownSearchableTrigger.js +1 -1
- package/dist/dropdown/stateReducer/stateReducer.d.ts +6 -2
- package/dist/dropdown/stateReducer/stateReducer.js +28 -42
- package/dist/dropdown/stateReducer/stateReducerHelper.d.ts +2 -0
- package/dist/dropdown/stateReducer/stateReducerHelper.js +12 -1
- package/dist/dropdown/useDropdownState.d.ts +1 -1
- package/dist/dropdown/useDropdownState.js +5 -2
- package/dist/filters/components/filtersContainer.d.ts +1 -0
- package/dist/filters/components/filtersContainer.js +10 -11
- package/dist/filters/components/filtersDateInput.d.ts +10 -0
- package/dist/filters/components/filtersDateInput.js +27 -0
- package/dist/filters/components/filtersDropdown.d.ts +5 -4
- package/dist/filters/components/filtersDropdown.js +3 -3
- package/dist/filters/components/filtersEmptySelectedList.d.ts +2 -0
- package/dist/filters/components/filtersEmptySelectedList.js +11 -0
- package/dist/filters/components/filtersItem.d.ts +5 -4
- package/dist/filters/components/filtersItem.js +2 -1
- package/dist/filters/components/filtersSaveModal.d.ts +3 -1
- package/dist/filters/components/filtersSaveModal.js +2 -2
- package/dist/filters/components/filtersSavedChipComponent.js +68 -6
- package/dist/filters/components/filtersSearch.d.ts +4 -4
- package/dist/filters/components/filtersSearch.js +20 -9
- package/dist/filters/components/filtersSearchItemData.js +18 -1
- package/dist/filters/components/filtersSearchList.d.ts +5 -1
- package/dist/filters/components/filtersSearchList.js +155 -27
- package/dist/filters/components/filtersSelect.d.ts +1 -0
- package/dist/filters/components/filtersSelect.js +35 -7
- package/dist/filters/components/filtersSelectListItem.d.ts +21 -15
- package/dist/filters/components/filtersSelectListItem.js +13 -3
- package/dist/filters/components/filtersSidePanel.d.ts +15 -0
- package/dist/filters/components/filtersSidePanel.js +212 -0
- package/dist/filters/components/filtersSidePanelChip.d.ts +9 -0
- package/dist/filters/components/filtersSidePanelChip.js +13 -0
- package/dist/filters/components/filtersSidePanelDropdown.d.ts +6 -0
- package/dist/filters/components/filtersSidePanelDropdown.js +85 -0
- package/dist/filters/components/filtersSidePanelItem.d.ts +16 -0
- package/dist/filters/components/filtersSidePanelItem.js +67 -0
- package/dist/filters/components/filtersSidePanelRange.d.ts +6 -0
- package/dist/filters/components/filtersSidePanelRange.js +28 -0
- package/dist/filters/filters.d.ts +5 -0
- package/dist/filters/filters.js +101 -38
- package/dist/filters/filtersHelper.d.ts +4 -2
- package/dist/filters/filtersHelper.js +40 -1
- package/dist/filters/filtersHooks.d.ts +12 -2
- package/dist/filters/filtersHooks.js +21 -3
- package/dist/formStepper/formStepper.d.ts +1 -1
- package/dist/formStepper/formStepper.js +5 -2
- package/dist/groupsFilter/groupsFilter.js +72 -37
- package/dist/groupsFilter/groupsFilterMenu.d.ts +1 -0
- package/dist/groupsFilter/groupsFilterMenu.js +2 -2
- package/dist/groupsFilter/groupsFilterTrigger.js +1 -1
- package/dist/images/imageLooking.d.ts +4 -0
- package/dist/images/imageLooking.js +16 -0
- package/dist/index.css +407 -83
- package/dist/index.d.ts +7 -4
- package/dist/index.js +26 -15
- package/dist/list/list.d.ts +3 -1
- package/dist/list/list.js +2 -2
- package/dist/mobileSheet/mobileSheet.d.ts +2 -0
- package/dist/mobileSheet/mobileSheet.js +4 -4
- package/dist/modal/modal.d.ts +1 -0
- package/dist/modal/modal.js +2 -2
- package/dist/radioGroup/radioGroup.d.ts +1 -0
- package/dist/radioGroup/radioGroup.js +3 -2
- package/dist/range/range.js +29 -10
- package/dist/searchInputRaw/searchInputRaw.js +1 -1
- package/dist/sidePanel/sidePanel.d.ts +1 -0
- package/dist/sidePanel/sidePanel.js +3 -3
- package/dist/tabs/tabItem/tabItem.d.ts +1 -0
- package/dist/tabs/tabItem/tabItem.js +2 -2
- package/dist/tabs/tabs.d.ts +1 -0
- package/dist/tabs/tabs.js +1 -1
- package/dist/utils/keyboardHelpers.d.ts +2 -0
- package/dist/utils/keyboardHelpers.js +49 -0
- package/dist/utils/localization/translations/cs-json.d.ts +1 -0
- package/dist/utils/localization/translations/cs-json.js +2 -1
- package/dist/utils/localization/translations/de-json.d.ts +1 -0
- package/dist/utils/localization/translations/de-json.js +2 -1
- package/dist/utils/localization/translations/en-json.d.ts +7 -0
- package/dist/utils/localization/translations/en-json.js +8 -1
- package/dist/utils/localization/translations/es-json.d.ts +1 -0
- package/dist/utils/localization/translations/es-json.js +2 -1
- package/dist/utils/localization/translations/fr-FR-json.d.ts +1 -0
- package/dist/utils/localization/translations/fr-FR-json.js +2 -1
- package/dist/utils/localization/translations/fr-json.d.ts +1 -0
- package/dist/utils/localization/translations/fr-json.js +2 -1
- package/dist/utils/localization/translations/id-json.d.ts +1 -0
- package/dist/utils/localization/translations/id-json.js +2 -1
- package/dist/utils/localization/translations/it-json.d.ts +1 -0
- package/dist/utils/localization/translations/it-json.js +2 -1
- package/dist/utils/localization/translations/ja-json.d.ts +1 -0
- package/dist/utils/localization/translations/ja-json.js +2 -1
- package/dist/utils/localization/translations/ko-KR-json.d.ts +1 -0
- package/dist/utils/localization/translations/ko-KR-json.js +2 -1
- package/dist/utils/localization/translations/ms-json.d.ts +1 -0
- package/dist/utils/localization/translations/ms-json.js +2 -1
- package/dist/utils/localization/translations/nl-json.d.ts +1 -0
- package/dist/utils/localization/translations/nl-json.js +2 -1
- package/dist/utils/localization/translations/pl-json.d.ts +1 -0
- package/dist/utils/localization/translations/pl-json.js +2 -1
- package/dist/utils/localization/translations/pt-BR-json.d.ts +1 -0
- package/dist/utils/localization/translations/pt-BR-json.js +2 -1
- package/dist/utils/localization/translations/sv-json.d.ts +1 -0
- package/dist/utils/localization/translations/sv-json.js +2 -1
- package/dist/utils/localization/translations/th-json.d.ts +1 -0
- package/dist/utils/localization/translations/th-json.js +2 -1
- package/dist/utils/localization/translations/tr-json.d.ts +1 -0
- package/dist/utils/localization/translations/tr-json.js +2 -1
- package/dist/utils/localization/translations/zh-Hans-json.d.ts +1 -0
- package/dist/utils/localization/translations/zh-Hans-json.js +2 -1
- package/dist/utils/localization/translations/zh-TW-json.d.ts +1 -0
- package/dist/utils/localization/translations/zh-TW-json.js +2 -1
- package/esm/advancedGroupsFilter/advancedGroupsFilter.d.ts +1 -0
- package/esm/advancedGroupsFilter/advancedGroupsFilter.js +2 -2
- package/esm/advancedGroupsFilter/advancedGroupsFilterFormSection.js +3 -1
- package/esm/chip/chip.js +5 -5
- package/esm/dateInput/dateInput.d.ts +2 -1
- package/esm/dateInput/dateInput.js +11 -2
- package/esm/dateRange/dateRange.js +9 -8
- package/esm/dropdown/dropdown.d.ts +2 -0
- package/esm/dropdown/dropdown.js +5 -4
- package/esm/dropdown/dropdownHelper.d.ts +4 -4
- package/esm/dropdown/dropdownHelper.js +2 -1
- package/esm/dropdown/dropdownList.js +2 -2
- package/esm/dropdown/dropdownPopup.d.ts +1 -0
- package/esm/dropdown/dropdownPopup.js +2 -2
- package/esm/dropdown/dropdownSearchableTrigger.js +1 -1
- package/esm/dropdown/stateReducer/stateReducer.d.ts +6 -2
- package/esm/dropdown/stateReducer/stateReducer.js +29 -43
- package/esm/dropdown/stateReducer/stateReducerHelper.d.ts +2 -0
- package/esm/dropdown/stateReducer/stateReducerHelper.js +10 -0
- package/esm/dropdown/useDropdownState.d.ts +1 -1
- package/esm/dropdown/useDropdownState.js +5 -2
- package/esm/filters/components/filtersContainer.d.ts +1 -0
- package/esm/filters/components/filtersContainer.js +12 -13
- package/esm/filters/components/filtersDateInput.d.ts +10 -0
- package/esm/filters/components/filtersDateInput.js +23 -0
- package/esm/filters/components/filtersDropdown.d.ts +5 -4
- package/esm/filters/components/filtersDropdown.js +3 -3
- package/esm/filters/components/filtersEmptySelectedList.d.ts +2 -0
- package/esm/filters/components/filtersEmptySelectedList.js +7 -0
- package/esm/filters/components/filtersItem.d.ts +5 -4
- package/esm/filters/components/filtersItem.js +2 -1
- package/esm/filters/components/filtersSaveModal.d.ts +3 -1
- package/esm/filters/components/filtersSaveModal.js +2 -2
- package/esm/filters/components/filtersSavedChipComponent.js +68 -6
- package/esm/filters/components/filtersSearch.d.ts +4 -4
- package/esm/filters/components/filtersSearch.js +20 -9
- package/esm/filters/components/filtersSearchItemData.js +18 -1
- package/esm/filters/components/filtersSearchList.d.ts +5 -1
- package/esm/filters/components/filtersSearchList.js +156 -28
- package/esm/filters/components/filtersSelect.d.ts +1 -0
- package/esm/filters/components/filtersSelect.js +36 -8
- package/esm/filters/components/filtersSelectListItem.d.ts +21 -15
- package/esm/filters/components/filtersSelectListItem.js +13 -3
- package/esm/filters/components/filtersSidePanel.d.ts +15 -0
- package/esm/filters/components/filtersSidePanel.js +208 -0
- package/esm/filters/components/filtersSidePanelChip.d.ts +9 -0
- package/esm/filters/components/filtersSidePanelChip.js +9 -0
- package/esm/filters/components/filtersSidePanelDropdown.d.ts +6 -0
- package/esm/filters/components/filtersSidePanelDropdown.js +81 -0
- package/esm/filters/components/filtersSidePanelItem.d.ts +16 -0
- package/esm/filters/components/filtersSidePanelItem.js +63 -0
- package/esm/filters/components/filtersSidePanelRange.d.ts +6 -0
- package/esm/filters/components/filtersSidePanelRange.js +24 -0
- package/esm/filters/filters.d.ts +5 -0
- package/esm/filters/filters.js +101 -38
- package/esm/filters/filtersHelper.d.ts +4 -2
- package/esm/filters/filtersHelper.js +37 -0
- package/esm/filters/filtersHooks.d.ts +12 -2
- package/esm/filters/filtersHooks.js +19 -2
- package/esm/formStepper/formStepper.d.ts +1 -1
- package/esm/formStepper/formStepper.js +5 -2
- package/esm/groupsFilter/groupsFilter.js +72 -37
- package/esm/groupsFilter/groupsFilterMenu.d.ts +1 -0
- package/esm/groupsFilter/groupsFilterMenu.js +2 -2
- package/esm/groupsFilter/groupsFilterTrigger.js +1 -1
- package/esm/images/imageLooking.d.ts +4 -0
- package/esm/images/imageLooking.js +12 -0
- package/esm/index.d.ts +7 -4
- package/esm/index.js +6 -3
- package/esm/list/list.d.ts +3 -1
- package/esm/list/list.js +2 -2
- package/esm/mobileSheet/mobileSheet.d.ts +2 -0
- package/esm/mobileSheet/mobileSheet.js +4 -4
- package/esm/modal/modal.d.ts +1 -0
- package/esm/modal/modal.js +2 -2
- package/esm/radioGroup/radioGroup.d.ts +1 -0
- package/esm/radioGroup/radioGroup.js +3 -2
- package/esm/range/range.js +29 -10
- package/esm/searchInputRaw/searchInputRaw.js +1 -1
- package/esm/sidePanel/sidePanel.d.ts +1 -0
- package/esm/sidePanel/sidePanel.js +3 -3
- package/esm/tabs/tabItem/tabItem.d.ts +1 -0
- package/esm/tabs/tabItem/tabItem.js +2 -2
- package/esm/tabs/tabs.d.ts +1 -0
- package/esm/tabs/tabs.js +1 -1
- package/esm/utils/keyboardHelpers.d.ts +2 -0
- package/esm/utils/keyboardHelpers.js +44 -0
- package/esm/utils/localization/translations/cs-json.d.ts +1 -0
- package/esm/utils/localization/translations/cs-json.js +2 -1
- package/esm/utils/localization/translations/de-json.d.ts +1 -0
- package/esm/utils/localization/translations/de-json.js +2 -1
- package/esm/utils/localization/translations/en-json.d.ts +7 -0
- package/esm/utils/localization/translations/en-json.js +8 -1
- package/esm/utils/localization/translations/es-json.d.ts +1 -0
- package/esm/utils/localization/translations/es-json.js +2 -1
- package/esm/utils/localization/translations/fr-FR-json.d.ts +1 -0
- package/esm/utils/localization/translations/fr-FR-json.js +2 -1
- package/esm/utils/localization/translations/fr-json.d.ts +1 -0
- package/esm/utils/localization/translations/fr-json.js +2 -1
- package/esm/utils/localization/translations/id-json.d.ts +1 -0
- package/esm/utils/localization/translations/id-json.js +2 -1
- package/esm/utils/localization/translations/it-json.d.ts +1 -0
- package/esm/utils/localization/translations/it-json.js +2 -1
- package/esm/utils/localization/translations/ja-json.d.ts +1 -0
- package/esm/utils/localization/translations/ja-json.js +2 -1
- package/esm/utils/localization/translations/ko-KR-json.d.ts +1 -0
- package/esm/utils/localization/translations/ko-KR-json.js +2 -1
- package/esm/utils/localization/translations/ms-json.d.ts +1 -0
- package/esm/utils/localization/translations/ms-json.js +2 -1
- package/esm/utils/localization/translations/nl-json.d.ts +1 -0
- package/esm/utils/localization/translations/nl-json.js +2 -1
- package/esm/utils/localization/translations/pl-json.d.ts +1 -0
- package/esm/utils/localization/translations/pl-json.js +2 -1
- package/esm/utils/localization/translations/pt-BR-json.d.ts +1 -0
- package/esm/utils/localization/translations/pt-BR-json.js +2 -1
- package/esm/utils/localization/translations/sv-json.d.ts +1 -0
- package/esm/utils/localization/translations/sv-json.js +2 -1
- package/esm/utils/localization/translations/th-json.d.ts +1 -0
- package/esm/utils/localization/translations/th-json.js +2 -1
- package/esm/utils/localization/translations/tr-json.d.ts +1 -0
- package/esm/utils/localization/translations/tr-json.js +2 -1
- package/esm/utils/localization/translations/zh-Hans-json.d.ts +1 -0
- package/esm/utils/localization/translations/zh-Hans-json.js +2 -1
- package/esm/utils/localization/translations/zh-TW-json.d.ts +1 -0
- package/esm/utils/localization/translations/zh-TW-json.js +2 -1
- package/package.json +6 -6
- package/dist/filters/components/filtersModal.d.ts +0 -17
- package/dist/filters/components/filtersModal.js +0 -107
- package/dist/filters/components/filtersModalItem.d.ts +0 -9
- package/dist/filters/components/filtersModalItem.js +0 -74
- package/esm/filters/components/filtersModal.d.ts +0 -17
- package/esm/filters/components/filtersModal.js +0 -103
- package/esm/filters/components/filtersModalItem.d.ts +0 -9
- package/esm/filters/components/filtersModalItem.js +0 -70
package/dist/index.d.ts
CHANGED
|
@@ -66,21 +66,22 @@ export { type IDateRange, type IDateRangeUnsetValue, DateRange } from "./dateRan
|
|
|
66
66
|
export { type IDateRangeValue, type IDateRangeValueOptionalLabel, type IDateRangeOption, type TDateRangeOption, GET_TODAY_OPTION, GET_YESTERDAY_OPTION, GET_THIS_WEEK_OPTION, GET_NEXT_WEEK_OPTION, GET_LAST_WEEK_OPTION, GET_THIS_MONTH_OPTION, GET_NEXT_MONTH_OPTION, GET_LAST_MONTH_OPTION, GET_LAST_SEVEN_DAYS_OPTION, GET_LAST_THIRTY_DAYS_OPTION, GET_LAST_TWELVE_MONTHS_OPTION, GET_LAST_THREE_MONTH_OPTION, GET_LAST_QUARTER_OPTION, GET_THIS_QUARTER_OPTION, GET_LAST_YEAR_OPTION, GET_THIS_YEAR_OPTION, GET_DEFAULT_DATE_OPTIONS } from "./dateRange/dateRangeUtils";
|
|
67
67
|
export { type IDialog, Dialog } from "./dialog/dialog";
|
|
68
68
|
export { isElementInsideContainer, isFocusable, getFocusableStartInd } from "./dialog/dialogHelpers";
|
|
69
|
-
export { type ISelectionItem, type IDropdownItem, type IFetchDropdownState, type IDropdownValueFullSelection, type IDropdownWithCheckboxValue, type IDropdownWithCheckboxSelected, type IDropdownValueFullSelectionWithCheckbox, type IDropdownFullSelectedValue, type IDropdownFullSelectedValueWithCheckbox, type IDropdownFullSelection, type IDropdown, type IDropdownWithCheckbox, type IDropdownFullSelectionWithCheckbox, Dropdown } from "./dropdown/dropdown";
|
|
69
|
+
export { LIST_LIMIT, type ISelectionItem, type IDropdownItem, type IFetchDropdownState, type IDropdownValueFullSelection, type IDropdownWithCheckboxValue, type IDropdownWithCheckboxSelected, type IDropdownValueFullSelectionWithCheckbox, type IDropdownFullSelectedValue, type IDropdownFullSelectedValueWithCheckbox, type IDropdownFullSelection, type IDropdown, type IDropdownWithCheckbox, type IDropdownFullSelectionWithCheckbox, Dropdown } from "./dropdown/dropdown";
|
|
70
70
|
export { useDropdownState } from "./dropdown/useDropdownState";
|
|
71
71
|
export { type IFavoriteButton, FavoriteButton } from "./favoriteButton/favoriteButton";
|
|
72
72
|
export { FeedbackProvider } from "./feedbackProvider/feedbackProvider";
|
|
73
73
|
export { type TFilterButton, type IFilterButton, FilterButton } from "./filterButton/filterButton";
|
|
74
74
|
export { type IFiltersChip, FiltersChip } from "./filters/components/filtersChip";
|
|
75
|
+
export { type IFiltersDateInputProps, type TFiltersDateInputState, type IFiltersDateInput, FiltersDateInputDisplayName, FiltersDateInput } from "./filters/components/filtersDateInput";
|
|
75
76
|
export { type IFiltersDateRangeState, type IFiltersDateRangeCompleteState, type IFiltersDateRangeDefaultState, type TFiltersDateRangeState, type TFiltersDateRangeCompleteState, type TFiltersDateRangeStateOptional, type TFiltersDateRangeStateRequired, type IFiltersDateRangeItem, type IFiltersDateRange, FiltersDateRange } from "./filters/components/filtersDateRange";
|
|
76
77
|
export { type TFiltersDropdownState, type IFiltersDropdownFullSelectionState, type IFiltersDropdownWithCheckboxState, type IFiltersDropdownFullSelectionWithCheckboxState, type TFiltersDropdownComplexState, type TInferOnChangeType, type IFiltersDropdown, FiltersDropdown } from "./filters/components/filtersDropdown";
|
|
77
78
|
export { type IFiltersGroupsItem, type IFiltersGroups, FiltersGroups } from "./filters/components/filtersGroups";
|
|
78
|
-
export { type IFiltersItem } from "./filters/components/filtersItem";
|
|
79
|
+
export { type IFiltersItem, type TFiltersComponentsItemState } from "./filters/components/filtersItem";
|
|
79
80
|
export { type IFiltersRangeState, type IFiltersRange, FiltersRange } from "./filters/components/filtersRange";
|
|
80
|
-
export { NO_TYPED_SEARCH_ITEM, KEYWORD_ID, KEYWORD_TYPE, type ISearchItem, type IRecentSearchItem, type IRecentSearchItemWithoutId } from "./filters/components/filtersSearchList";
|
|
81
|
+
export { NO_TYPED_SEARCH_ITEM, KEYWORD_ID, KEYWORD_TYPE, type ISearchItem, type IRecentSearchItem, type IRecentSearchItemWithoutId, NOT_POPULATED_NAME } from "./filters/components/filtersSearchList";
|
|
81
82
|
export { ALL_SELECT_OPTION_ID, type IFiltersSearchType, getFiltersSearchTypeAllOption, getAllOption } from "./filters/components/filtersSelect";
|
|
82
83
|
export { type ISavedFilters, type ISaveFilter, type IFetchState, type IFiltersSearchTypesSubItem, type IFiltersSearchTypesItem, type IFiltersBase, type IFiltersWithRecentSearches, type IFiltersWithSearchSelection, type IFiltersWithPin, type IFiltersWithSavedFilters, type IFiltersWithExternalState, type IFilters, type IFiltersBasic, type IFiltersWithModal, type IFiltersWithPinning, type IFiltersWithRecent, type IFiltersWithSaved, type TFiltersWithSearchSelection, type IFiltersWithModalAndPin, type IFiltersWithRecentAndSaved, type IFiltersComplete, FiltersDisplayName, Filters } from "./filters/filters";
|
|
83
|
-
export { useFiltersSearch, usePinnedFilters, useFiltersSelection } from "./filters/filtersHooks";
|
|
84
|
+
export { useFiltersSearch, usePinnedFilters, useFiltersSelection, useSearchData } from "./filters/filtersHooks";
|
|
84
85
|
export { type IFiltersBarDropdownFullSelectionState } from "./filtersBar/components/filtersBarDropdown/filtersBarDropdown";
|
|
85
86
|
export { type IFiltersBarDropdownWithCheckboxProps, type IFiltersBarDropdownFullSelectionWithCheckboxProps, type IFiltersBarDropdownWithCheckbox, type IFiltersBarDropdownWithCheckboxFullSelectionMode, type IFiltersBarDropdownWithCheckboxOnChange, type IFiltersBarDropdownWithCheckboxFullSelectionOnChange, FiltersBarDropdownWithCheckbox } from "./filtersBar/components/filtersBarDropdownWithCheckbox/filtersBarDropdownWithCheckbox";
|
|
86
87
|
export { type IDateRangeOptionId, type TDateRangeName, getRangeOption } from "./filtersBar/components/filtersBarPeriodPicker/getRangeOption";
|
|
@@ -617,6 +618,7 @@ export { IconYen } from "./icons/iconYen";
|
|
|
617
618
|
export { IconZone } from "./icons/iconZone";
|
|
618
619
|
export { IconZoom } from "./icons/iconZoom";
|
|
619
620
|
export { IconZoom2 } from "./icons/iconZoom2";
|
|
621
|
+
export { ImageLooking } from "./images/imageLooking";
|
|
620
622
|
export { ImageNothingFound } from "./images/imageNothingFound";
|
|
621
623
|
export { type ISvgImage } from "./images/svgImage";
|
|
622
624
|
export { type ILayout, Layout } from "./layout/layout";
|
|
@@ -695,6 +697,7 @@ export { removeArrowClasses } from "./tooltip/helpers/removeArrowClasses";
|
|
|
695
697
|
export { type TooltipSize, type TMobileView, Tooltip } from "./tooltip/tooltip";
|
|
696
698
|
export { type IAbortablePromiseOptions, type IAbortablePromiseConstructor, AbortablePromise } from "./utils/abortablePromise";
|
|
697
699
|
export { HeaderButtonsProvider } from "./utils/headerButtons/headerButtonsProvider";
|
|
700
|
+
export { getNewFocusableItem, getFirstFocusableItem } from "./utils/keyboardHelpers";
|
|
698
701
|
export { LanguageProvider } from "./utils/localization/languageProvider";
|
|
699
702
|
export { useLanguage } from "./utils/localization/useLanguage";
|
|
700
703
|
export { ThemeDark } from "./utils/theme/themeDark";
|
package/dist/index.js
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getMaxNumberOfActions = exports.getIconFromStatus = exports.getDefaultFullWidthValue = exports.TitleLink = exports.Title = exports.Status = exports.Content = exports.CardButton = exports.Actions = exports.Card = exports.isDifferentPeriod = exports.isValidationDateError = exports.isValidDate = exports.getSelectableYears = exports.isDisableDate = exports.isDisableYear = exports.getAvailablePeriod = exports.toDayStart = exports.setYear = exports.getSameDateOrTheLastForMonth = exports.addMonth = exports.getEndOfWeek = exports.getStartOfWeek = exports.getDayOfWeekOffset = exports.addMonths = exports.addDays = exports.addMinutes = exports.getNewEndDate = exports.getNewStartDate = exports.getCalendarMonthDates = exports.getEndOfMonth = exports.getStartOfMonth = exports.dayNames = exports.Calendar = exports.ButtonType = exports.Button = exports.Bookmark = exports.BetaPillProvider = exports.BetaPill = exports.getBannerOptions = exports.options = exports.DEFAULT_BANNER_UPSELL_SIZE = exports.BannerUpsell = exports.Banner = exports.Anchor = exports.useAlert = exports.Alert = exports.AccordionItem = exports.Accordion = exports.Absolute = void 0;
|
|
4
4
|
exports.GET_LAST_MONTH_OPTION = exports.GET_NEXT_MONTH_OPTION = exports.GET_THIS_MONTH_OPTION = exports.GET_LAST_WEEK_OPTION = exports.GET_NEXT_WEEK_OPTION = exports.GET_THIS_WEEK_OPTION = exports.GET_YESTERDAY_OPTION = exports.GET_TODAY_OPTION = exports.DateRange = exports.getLabel = exports.DateInput = exports.cutSeconds = exports.ControlledPopup = exports.deepClone = exports.deepMerge = exports.flattenArrays = exports.echo = exports.useThrottle = exports.useScroll = exports.useResize = exports.useMobile = exports.useGridSize = exports.useDeviceType = exports.useDebouncedMemo = exports.useDebounce = exports.DeviceType = exports.generateId = exports.hexToRGBA = exports.classNames = exports.getCheckboxState = exports.CheckboxState = exports.Checkbox = exports.resampleArrayEvenly = exports.removeTrendDataFromDatasets = exports.getFormattedLabel = exports.Chart = exports.AccessibleChartTable = exports.AccessibleChartNarrative = exports.simplifyData = exports.collectAllPoints = exports.AccessibleChart = exports.CardsRow = exports.Cards = exports.useAbsoluteSize = exports.isAbsoluteSize = exports.getSizeClass = exports.getContainerSize = exports.CardContainer = exports.useCardSizeState = exports.useCardSize = void 0;
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.Waiting = exports.UserFormatProvider = exports.useDrive = exports.ThemeProvider = exports.ThemeDrive = void 0;
|
|
5
|
+
exports.STEPPER_LAST_STEP = exports.FormField = exports.FooterButtons = exports.TriggerContextProvider = exports.TriggerContext = exports.FiltersBarActions = exports.FiltersBar = exports.FiltersBarDisplayName = exports.ResetButton = exports.getRangeOption = exports.FiltersBarDropdownWithCheckbox = exports.useSearchData = exports.useFiltersSelection = exports.usePinnedFilters = exports.useFiltersSearch = exports.Filters = exports.FiltersDisplayName = exports.getAllOption = exports.getFiltersSearchTypeAllOption = exports.ALL_SELECT_OPTION_ID = exports.NOT_POPULATED_NAME = exports.KEYWORD_TYPE = exports.KEYWORD_ID = exports.NO_TYPED_SEARCH_ITEM = exports.FiltersRange = exports.FiltersGroups = exports.FiltersDropdown = exports.FiltersDateRange = exports.FiltersDateInput = exports.FiltersDateInputDisplayName = exports.FiltersChip = exports.FilterButton = exports.FeedbackProvider = exports.FavoriteButton = exports.useDropdownState = exports.Dropdown = exports.LIST_LIMIT = exports.getFocusableStartInd = exports.isFocusable = exports.isElementInsideContainer = exports.Dialog = exports.GET_DEFAULT_DATE_OPTIONS = exports.GET_THIS_YEAR_OPTION = exports.GET_LAST_YEAR_OPTION = exports.GET_THIS_QUARTER_OPTION = exports.GET_LAST_QUARTER_OPTION = exports.GET_LAST_THREE_MONTH_OPTION = exports.GET_LAST_TWELVE_MONTHS_OPTION = exports.GET_LAST_THIRTY_DAYS_OPTION = exports.GET_LAST_SEVEN_DAYS_OPTION = void 0;
|
|
6
|
+
exports.IconAlignRightBox = exports.IconAlignLeft = exports.IconAlignBottom = exports.IconAirpods = exports.IconAirplay = exports.IconAiSparkles2 = exports.IconAiSparkles = exports.IconAiImages = exports.IconAddPeople = exports.IconActivity = exports.useCustomMenu = exports.HeaderMenu = exports.HeaderMenuDisplayName = exports.HeaderButton = exports.HeaderButtonDisplayName = exports.HeaderBack = exports.HeaderBackDisplayName = exports.HeaderDisplayName = exports.Header = exports.HeaderType = exports.compareFilters = exports.toFilterState = exports.simplifyFilterState = exports.mergeItems = exports.getId = exports.mapFilterState = exports.isFilterState = exports.isEntireOrganization = exports.isIdEntity = exports.createLinkedTree = exports.getGroupDescription = exports.isSystemGroup = exports.makeBoolHash = exports.allSystemGroups = exports.defaultPrivateGroupId = exports.rootDefectGroups = exports.rootGroups = exports.rootSecurityGroups = exports.systemSecurityGroups = exports.getDefaultFilterState = exports.DEFAULT_RELATION_OPERATOR = exports.ENTIRE_ORGANIZATION_GROUP_ID = exports.FilterMenuStep = exports.GroupsFilter = exports.groupsFilterTotalStateDefault = exports.GroupButton = exports.GridLayout = exports.getCurrentIndex = exports.FormStepperButtons = exports.FormStepper = void 0;
|
|
7
|
+
exports.IconBold = exports.IconBluetooth = exports.IconBitcoin = exports.IconBeta = exports.IconBell = exports.IconBatteryMedium = exports.IconBatteryLow2 = exports.IconBatteryLow = exports.IconBatteryLoading = exports.IconBatteryFull = exports.IconBatteryError = exports.IconBasket2 = exports.IconBasket = exports.IconBagLuggage2 = exports.IconBagLuggage = exports.IconBag2 = exports.IconBag = exports.IconBadge = exports.IconBackward = exports.IconAutoSize = exports.IconAudio = exports.IconAttachmentFile = exports.IconAttachment2 = exports.IconAttachment = exports.IconAt = exports.IconArrowUpPath = exports.IconArrowTopRight = exports.IconArrowTopLeft = exports.IconArrowTopCircle = exports.IconArrowTop = exports.IconArrowRightPath = exports.IconArrowRightCircle = exports.IconArrowRight = exports.IconArrowLeftPath = exports.IconArrowLeftCircle = exports.IconArrowLeft = exports.IconArrowDownPath = exports.IconArrowBottomRight = exports.IconArrowBottomLeft = exports.IconArrowBottomCircle = exports.IconArrowBottom = exports.IconArchive2 = exports.IconArchive = exports.IconAnchor2 = exports.IconAnchor = exports.IconAlignmentRight = exports.IconAlignmentLeft = exports.IconAlignmentJustify = exports.IconAlignmentCenter = exports.IconAlignTopBox = void 0;
|
|
8
|
+
exports.IconChevronDoubleDown = exports.IconChevronBottom = exports.IconCheckbox = exports.IconCheckRadio = exports.IconCheck = exports.IconChart8 = exports.IconChart7 = exports.IconChart6 = exports.IconChart5 = exports.IconChart4 = exports.IconChart3 = exports.IconChart2 = exports.IconChart = exports.IconCanBus = exports.IconCameraAction = exports.IconCamera3 = exports.IconCamera2 = exports.IconCamera = exports.IconCalendar = exports.IconCalculator = exports.IconBusiness = exports.IconBulletList = exports.IconBulkSelect = exports.IconBuilding = exports.IconBucket = exports.IconBubbles = exports.IconBubbleNotification = exports.IconBubbleAnnotation6 = exports.IconBubbleAnnotation5 = exports.IconBubbleAnnotation4 = exports.IconBubbleAnnotation2 = exports.IconBubbleAnnotation = exports.IconBubble6 = exports.IconBubble5 = exports.IconBubble4 = exports.IconBubble3 = exports.IconBubble2 = exports.IconBubble = exports.IconBrush = exports.IconBrowser = exports.IconBrokenLink = exports.IconBranches = exports.IconBookmarkSelectedHover = exports.IconBookmarkPlus = exports.IconBookmarkFill = exports.IconBookmarkDelete = exports.IconBookmarkCheck = exports.IconBookmark = exports.IconBook2 = exports.IconBook = void 0;
|
|
9
|
+
exports.IconCornerDownLeft = exports.IconCopy5 = exports.IconCopy4 = exports.IconCopy3 = exports.IconCopy2 = exports.IconCopy = exports.IconConstruction = exports.IconConsole = exports.IconConnectDevices = exports.IconCompass = exports.IconCommunity = exports.IconColorPicker = exports.IconColor = exports.IconCode2 = exports.IconCode = exports.IconCmd2 = exports.IconCmd = exports.IconCloudUpload = exports.IconCloudSync = exports.IconCloudQuestion = exports.IconCloudOff2 = exports.IconCloudOff = exports.IconCloudLines = exports.IconCloudDownload = exports.IconCloudCheck = exports.IconCloud2 = exports.IconCloud = exports.IconCloseSquare = exports.IconCloseCircle = exports.IconClose = exports.IconClockTimer = exports.IconClockSnooze = exports.IconClock2 = exports.IconClock = exports.IconClipboard2 = exports.IconClipboard = exports.IconCircle = exports.IconChromecast = exports.IconChevronTopSmall = exports.IconChevronTop = exports.IconChevronRightSmall = exports.IconChevronRight = exports.IconChevronLeftSmall = exports.IconChevronLeft = exports.IconChevronGrabberVertical = exports.IconChevronGrabberHorizontal = exports.IconChevronDownSmall = exports.IconChevronDoubleUp = exports.IconChevronDoubleRight = exports.IconChevronDoubleLeft = void 0;
|
|
10
|
+
exports.IconEuro = exports.IconEthereum = exports.IconEsc = exports.IconEmailNotification = exports.IconEmail2 = exports.IconEmail = exports.IconEditSmall = exports.IconEditBig = exports.IconEdit2 = exports.IconEdit = exports.IconDvir = exports.IconDriver = exports.IconDrive = exports.IconDownload = exports.IconDotVertical = exports.IconDotHorizontal = exports.IconDotGrid = exports.IconDollar = exports.IconDocumentWithLines = exports.IconDocument = exports.IconDock = exports.IconDispatchAsset = exports.IconDisk2 = exports.IconDisk = exports.IconDiamondWarning = exports.IconDeviceUptimeDisconnected = exports.IconDeviceUptime = exports.IconDelete3 = exports.IconDelete2 = exports.IconDelete = exports.IconCycle = exports.IconCursorClick = exports.IconCursorBox = exports.IconCursor3 = exports.IconCursor2 = exports.IconCursor = exports.IconCup = exports.IconCryptoCoin = exports.IconCrypto = exports.IconCrop = exports.IconCreditCard3 = exports.IconCreditCard2 = exports.IconCreditCard = exports.IconCornerUpRight = exports.IconCornerUpLeft = exports.IconCornerRightUp = exports.IconCornerRightDown = exports.IconCornerLeftUp = exports.IconCornerLeftDown = exports.IconCornerDownRight = void 0;
|
|
11
|
+
exports.IconGrids = exports.IconGraphStatistics = exports.IconGraphPresentation = exports.IconGraphLines = exports.IconGraphChart = exports.IconGraph = exports.IconGrab = exports.IconGlobus = exports.IconGift = exports.IconGeotabSales = exports.IconGeotabDrive = exports.IconGamepad = exports.IconFuelGas = exports.IconFork = exports.IconFolders = exports.IconFolderUpload = exports.IconFolderShared = exports.IconFolderRestricted = exports.IconFolderDownload = exports.IconFolderDelete = exports.IconFolderCloud2 = exports.IconFolderCloud = exports.IconFolderBookmarks = exports.IconFolderAdd = exports.IconFolder2 = exports.IconFolder = exports.IconFocus = exports.IconFingerPrint = exports.IconFilterDesc = exports.IconFilterAsc = exports.IconFilter3Desc = exports.IconFilter3Asc = exports.IconFilter3 = exports.IconFilter2 = exports.IconFilter = exports.IconFileSync5 = exports.IconFileSync4 = exports.IconFileSync3 = exports.IconFileSync2 = exports.IconFileSync = exports.IconFileLocked = exports.IconFileCopy = exports.IconFile = exports.IconFaceId = exports.IconEyeOff = exports.IconEye = exports.IconExpand = exports.IconException = exports.IconExcel = exports.IconEvse = void 0;
|
|
12
|
+
exports.IconLink3 = exports.IconLink2 = exports.IconLink = exports.IconLightning = exports.IconLightBulb = exports.IconLifeBuoy = exports.IconLeaf = exports.IconLayoutWindow5 = exports.IconLayoutWindow4 = exports.IconLayoutWindow3 = exports.IconLayoutWindow2 = exports.IconLayoutWindow = exports.IconLayoutTopbar = exports.IconLayoutTop = exports.IconLayoutSidebar = exports.IconLayoutSearch = exports.IconLayoutRight = exports.IconLayoutLeft = exports.IconLayoutColumn = exports.IconLayoutBottom = exports.IconLayout = exports.IconLayers = exports.IconLaptop = exports.IconLab = exports.IconKeyboardUp2 = exports.IconKeyboardUp = exports.IconKeyboardDown = exports.IconKeyboard = exports.IconItalic = exports.IconInspect = exports.IconInfoSquare = exports.IconInfoCircle = exports.IconInbox = exports.IconImages2 = exports.IconImages = exports.IconImage = exports.IconImac = exports.IconIcon = exports.IconITS = exports.IconHourglass = exports.IconHomeSimple = exports.IconHomeRoof = exports.IconHomeDoor2 = exports.IconHomeDoor = exports.IconHistory = exports.IconHexonalWarning = exports.IconHeart = exports.IconHeadphones = exports.IconHarness = exports.IconGrids2 = void 0;
|
|
13
|
+
exports.IconOnDuty = exports.IconNumberedList = exports.IconNotifications = exports.IconNotificationOff = exports.IconNotificationBell = exports.IconNotificationAlarm = exports.IconNote = exports.IconNewspaper = exports.IconNews = exports.IconNavigationFooterExpanded = exports.IconNavigationFooterCollapsed = exports.IconMyGeotab = exports.IconMyAdmin = exports.IconMove2 = exports.IconMove = exports.IconMouseScrollUp = exports.IconMouseScrollDown = exports.IconMouse = exports.IconMoon = exports.IconMoney = exports.IconMobi = exports.IconMinusSquare = exports.IconMinusCircle = exports.IconMinus = exports.IconMinimize = exports.IconMicrophone2 = exports.IconMicrophone = exports.IconMenuCircle = exports.IconMenu3 = exports.IconMenu2 = exports.IconMenu = exports.IconMemory2 = exports.IconMemory = exports.IconMedal = exports.IconMarketplace = exports.IconMap = exports.IconMagicEyes = exports.IconMagic2 = exports.IconMagic = exports.IconMacbook = exports.IconLowDataQuality = exports.IconLogout = exports.IconLogin = exports.IconLock = exports.IconLocationOff = exports.IconLocationMap = exports.IconLocationCompass = exports.IconLoader = exports.IconList = exports.IconLinkLines = void 0;
|
|
14
|
+
exports.IconRotateClockwise = exports.IconResizeSmall = exports.IconResizeBig = exports.IconRepeat2 = exports.IconRepeat = exports.IconRemovePeople = exports.IconRefrigeration = exports.IconRedo2 = exports.IconRedo = exports.IconRecord = exports.IconReceipt = exports.IconRadar = exports.IconQuestion = exports.IconPuzzle = exports.IconPullRequest = exports.IconProcessor = exports.IconPrinter = exports.IconPound = exports.IconPlusSquare = exports.IconPlusLines = exports.IconPlusFile = exports.IconPlusCircle = exports.IconPlus = exports.IconPlay = exports.IconPinLocation3 = exports.IconPinLocation2 = exports.IconPinLocation = exports.IconPin2 = exports.IconPin = exports.IconPhoneMobile = exports.IconPhone = exports.IconPerformance = exports.IconPercent = exports.IconPeopleLike = exports.IconPeopleGroup2 = exports.IconPeopleGroup = exports.IconPeople = exports.IconPencil2 = exports.IconPencil = exports.IconPause = exports.IconPassword = exports.IconPaperPlane = exports.IconPackage3 = exports.IconPackage2 = exports.IconPackage = exports.IconPDF = exports.IconOptAlt = exports.IconOpt = exports.IconOpen2 = exports.IconOpen = void 0;
|
|
15
|
+
exports.IconTachograph = exports.IconTable = exports.IconSupport = exports.IconSun = exports.IconStrikeThrough = exports.IconStore = exports.IconStorage = exports.IconStopwatch = exports.IconStarFilled = exports.IconStarAi = exports.IconStar = exports.IconSquare = exports.IconSpeaker = exports.IconSortVertical = exports.IconSortHorizontal = exports.IconSort2Vertical = exports.IconSort2Horizontal = exports.IconSmiley = exports.IconSign = exports.IconSidebar = exports.IconShield4 = exports.IconShield3 = exports.IconShield2 = exports.IconShield = exports.IconShare3 = exports.IconShare = exports.IconSettings8 = exports.IconSettings7 = exports.IconSettings6 = exports.IconSettings4 = exports.IconSettings3 = exports.IconSettings2 = exports.IconSettings1 = exports.IconServer3 = exports.IconServer2 = exports.IconServer = exports.IconSend = exports.IconSecuredLines = exports.IconSecured = exports.IconSeatbelt = exports.IconSearchPage = exports.IconSearchLines = exports.IconSearchDocument = exports.IconSearch = exports.IconSdCard = exports.IconRuler = exports.IconRoute = exports.IconRotateRepeat2 = exports.IconRotateRepeat = exports.IconRotateCounterclockwise = void 0;
|
|
16
|
+
exports.ImageLooking = exports.IconZoom2 = exports.IconZoom = exports.IconZone = exports.IconYen = exports.IconWrite = exports.IconWrench = exports.IconWorld = exports.IconWorkday = exports.IconWifi2 = exports.IconWifi = exports.IconWhisper = exports.IconWebcam = exports.IconWatch2 = exports.IconWatch = exports.IconWarning = exports.IconWallet1 = exports.IconWallet = exports.IconVolumeOn = exports.IconVolumeOff = exports.IconVolumeMinimum = exports.IconVolumeHalf = exports.IconVolumeFull = exports.IconVolumeDown = exports.IconVoice = exports.IconVisitPage = exports.IconVideoReplay = exports.IconVideo2 = exports.IconVideo = exports.IconUsbHub = exports.IconUsb = exports.IconUpload = exports.IconUnlocked = exports.IconUndock = exports.IconUndo2 = exports.IconUndo = exports.IconUnderline = exports.IconUmbrella = exports.IconTrailer = exports.IconThumbsUp = exports.IconThumbsDown = exports.IconThermometer = exports.IconThermograph = exports.IconTextSize = exports.IconTelevision2 = exports.IconTelevision = exports.IconTarget3 = exports.IconTarget2 = exports.IconTarget = exports.IconTachographTimeCard = void 0;
|
|
17
|
+
exports.Radio = exports.ProgressBar = exports.ProgreesBarSize = exports.ProgressBarType = exports.PrimaryIcon = exports.Popup = exports.PillExpandable = exports.Pill = exports.PaginationType = exports.Pagination = exports.PageLayout = exports.PageContentLayout = exports.PageHeaderMenu = exports.PageHeaderMenuDisplayName = exports.PageHeaderButton = exports.PageHeaderButtonDisplayName = exports.PageHeader = exports.PageHeaderDisplayName = exports.Notification = exports.getPredefinedFocusableItem = exports.DialogContentNew = exports.Modal = exports.MobileSheet = exports.MiniTabs = exports.MiniTabsSize = exports.isLink = exports.isButton = exports.findPrevFocusable = exports.findNextFocusable = exports.findLastFocusable = exports.findFirstFocusable = exports.Menu = exports.ControlledMenu = exports.changeOrder = exports.ListItem = exports.List = exports.ItemData = exports.ItemCompact = exports.LineChartMini = exports.getDefaultDatasetStyle = exports.htmlLegendPlugin = exports.LEGEND_PLUGIN_ID = exports.LineChart = exports.useLayoutSize = exports.LayoutFullScreenProvider = exports.useLayoutFullScreen = exports.LayoutFullScreenElementProvider = exports.useLayoutFullScreenElement = exports.Layout = exports.ImageNothingFound = void 0;
|
|
18
|
+
exports.removeArrowClasses = exports.calculateArrowPosition = exports.ToggleButton = exports.Toast = exports.useToast = exports.TimePicker = exports.TextareaRaw = exports.Textarea = exports.TextInputRaw = exports.TextInput = exports.TextIconButton = exports.ButtonIconPosition = exports.Tabs = exports.TabsDisplayName = exports.ActionLinkColumn = exports.CheckboxColumn = exports.MainColumn = exports.ActionsColumn = exports.getSortableValue = exports.ColumnSortDirection = exports.getEmptySelection = exports.Table = exports.useNestedRows = exports.NestedData = exports.TabBarContent = exports.TabBar = exports.SummaryTileBarDisplayName = exports.SummaryTileBar = exports.getTypeClassName = exports.SummaryTileTrigger = exports.SummaryTile = exports.SummaryTileDisplayName = exports.SummaryTileSize = exports.SummaryTileType = exports.Summary = exports.Summaries = exports.Stepper = exports.SortControl = exports.SortDirections = exports.Skeleton = exports.LazyContent = exports.SidePanel = exports.CUSTOM_POPUP_COMPONENT_CLASSNAME = exports.SidePanelCloseReason = exports.isChildPopup = exports.SelectField = exports.Select = exports.SearchInput = exports.Range = exports.RadioGroup = void 0;
|
|
19
|
+
exports.Waiting = exports.UserFormatProvider = exports.useDrive = exports.ThemeProvider = exports.ThemeDrive = exports.ThemeDark = exports.useLanguage = exports.LanguageProvider = exports.getFirstFocusableItem = exports.getNewFocusableItem = exports.HeaderButtonsProvider = exports.AbortablePromise = exports.Tooltip = void 0;
|
|
20
20
|
/* eslint-disable max-len */
|
|
21
21
|
var absolute_1 = require("./absolute/absolute");
|
|
22
22
|
Object.defineProperty(exports, "Absolute", { enumerable: true, get: function () { return absolute_1.Absolute; } });
|
|
@@ -198,6 +198,7 @@ Object.defineProperty(exports, "isElementInsideContainer", { enumerable: true, g
|
|
|
198
198
|
Object.defineProperty(exports, "isFocusable", { enumerable: true, get: function () { return dialogHelpers_1.isFocusable; } });
|
|
199
199
|
Object.defineProperty(exports, "getFocusableStartInd", { enumerable: true, get: function () { return dialogHelpers_1.getFocusableStartInd; } });
|
|
200
200
|
var dropdown_1 = require("./dropdown/dropdown");
|
|
201
|
+
Object.defineProperty(exports, "LIST_LIMIT", { enumerable: true, get: function () { return dropdown_1.LIST_LIMIT; } });
|
|
201
202
|
Object.defineProperty(exports, "Dropdown", { enumerable: true, get: function () { return dropdown_1.Dropdown; } });
|
|
202
203
|
var useDropdownState_1 = require("./dropdown/useDropdownState");
|
|
203
204
|
Object.defineProperty(exports, "useDropdownState", { enumerable: true, get: function () { return useDropdownState_1.useDropdownState; } });
|
|
@@ -209,6 +210,9 @@ var filterButton_1 = require("./filterButton/filterButton");
|
|
|
209
210
|
Object.defineProperty(exports, "FilterButton", { enumerable: true, get: function () { return filterButton_1.FilterButton; } });
|
|
210
211
|
var filtersChip_1 = require("./filters/components/filtersChip");
|
|
211
212
|
Object.defineProperty(exports, "FiltersChip", { enumerable: true, get: function () { return filtersChip_1.FiltersChip; } });
|
|
213
|
+
var filtersDateInput_1 = require("./filters/components/filtersDateInput");
|
|
214
|
+
Object.defineProperty(exports, "FiltersDateInputDisplayName", { enumerable: true, get: function () { return filtersDateInput_1.FiltersDateInputDisplayName; } });
|
|
215
|
+
Object.defineProperty(exports, "FiltersDateInput", { enumerable: true, get: function () { return filtersDateInput_1.FiltersDateInput; } });
|
|
212
216
|
var filtersDateRange_1 = require("./filters/components/filtersDateRange");
|
|
213
217
|
Object.defineProperty(exports, "FiltersDateRange", { enumerable: true, get: function () { return filtersDateRange_1.FiltersDateRange; } });
|
|
214
218
|
var filtersDropdown_1 = require("./filters/components/filtersDropdown");
|
|
@@ -221,6 +225,7 @@ var filtersSearchList_1 = require("./filters/components/filtersSearchList");
|
|
|
221
225
|
Object.defineProperty(exports, "NO_TYPED_SEARCH_ITEM", { enumerable: true, get: function () { return filtersSearchList_1.NO_TYPED_SEARCH_ITEM; } });
|
|
222
226
|
Object.defineProperty(exports, "KEYWORD_ID", { enumerable: true, get: function () { return filtersSearchList_1.KEYWORD_ID; } });
|
|
223
227
|
Object.defineProperty(exports, "KEYWORD_TYPE", { enumerable: true, get: function () { return filtersSearchList_1.KEYWORD_TYPE; } });
|
|
228
|
+
Object.defineProperty(exports, "NOT_POPULATED_NAME", { enumerable: true, get: function () { return filtersSearchList_1.NOT_POPULATED_NAME; } });
|
|
224
229
|
var filtersSelect_1 = require("./filters/components/filtersSelect");
|
|
225
230
|
Object.defineProperty(exports, "ALL_SELECT_OPTION_ID", { enumerable: true, get: function () { return filtersSelect_1.ALL_SELECT_OPTION_ID; } });
|
|
226
231
|
Object.defineProperty(exports, "getFiltersSearchTypeAllOption", { enumerable: true, get: function () { return filtersSelect_1.getFiltersSearchTypeAllOption; } });
|
|
@@ -232,6 +237,7 @@ var filtersHooks_1 = require("./filters/filtersHooks");
|
|
|
232
237
|
Object.defineProperty(exports, "useFiltersSearch", { enumerable: true, get: function () { return filtersHooks_1.useFiltersSearch; } });
|
|
233
238
|
Object.defineProperty(exports, "usePinnedFilters", { enumerable: true, get: function () { return filtersHooks_1.usePinnedFilters; } });
|
|
234
239
|
Object.defineProperty(exports, "useFiltersSelection", { enumerable: true, get: function () { return filtersHooks_1.useFiltersSelection; } });
|
|
240
|
+
Object.defineProperty(exports, "useSearchData", { enumerable: true, get: function () { return filtersHooks_1.useSearchData; } });
|
|
235
241
|
var filtersBarDropdownWithCheckbox_1 = require("./filtersBar/components/filtersBarDropdownWithCheckbox/filtersBarDropdownWithCheckbox");
|
|
236
242
|
Object.defineProperty(exports, "FiltersBarDropdownWithCheckbox", { enumerable: true, get: function () { return filtersBarDropdownWithCheckbox_1.FiltersBarDropdownWithCheckbox; } });
|
|
237
243
|
var getRangeOption_1 = require("./filtersBar/components/filtersBarPeriodPicker/getRangeOption");
|
|
@@ -1322,6 +1328,8 @@ var iconZoom_1 = require("./icons/iconZoom");
|
|
|
1322
1328
|
Object.defineProperty(exports, "IconZoom", { enumerable: true, get: function () { return iconZoom_1.IconZoom; } });
|
|
1323
1329
|
var iconZoom2_1 = require("./icons/iconZoom2");
|
|
1324
1330
|
Object.defineProperty(exports, "IconZoom2", { enumerable: true, get: function () { return iconZoom2_1.IconZoom2; } });
|
|
1331
|
+
var imageLooking_1 = require("./images/imageLooking");
|
|
1332
|
+
Object.defineProperty(exports, "ImageLooking", { enumerable: true, get: function () { return imageLooking_1.ImageLooking; } });
|
|
1325
1333
|
var imageNothingFound_1 = require("./images/imageNothingFound");
|
|
1326
1334
|
Object.defineProperty(exports, "ImageNothingFound", { enumerable: true, get: function () { return imageNothingFound_1.ImageNothingFound; } });
|
|
1327
1335
|
var layout_1 = require("./layout/layout");
|
|
@@ -1501,6 +1509,9 @@ var abortablePromise_1 = require("./utils/abortablePromise");
|
|
|
1501
1509
|
Object.defineProperty(exports, "AbortablePromise", { enumerable: true, get: function () { return abortablePromise_1.AbortablePromise; } });
|
|
1502
1510
|
var headerButtonsProvider_1 = require("./utils/headerButtons/headerButtonsProvider");
|
|
1503
1511
|
Object.defineProperty(exports, "HeaderButtonsProvider", { enumerable: true, get: function () { return headerButtonsProvider_1.HeaderButtonsProvider; } });
|
|
1512
|
+
var keyboardHelpers_1 = require("./utils/keyboardHelpers");
|
|
1513
|
+
Object.defineProperty(exports, "getNewFocusableItem", { enumerable: true, get: function () { return keyboardHelpers_1.getNewFocusableItem; } });
|
|
1514
|
+
Object.defineProperty(exports, "getFirstFocusableItem", { enumerable: true, get: function () { return keyboardHelpers_1.getFirstFocusableItem; } });
|
|
1504
1515
|
var languageProvider_1 = require("./utils/localization/languageProvider");
|
|
1505
1516
|
Object.defineProperty(exports, "LanguageProvider", { enumerable: true, get: function () { return languageProvider_1.LanguageProvider; } });
|
|
1506
1517
|
var useLanguage_1 = require("./utils/localization/useLanguage");
|
package/dist/list/list.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
2
3
|
import "./list.less";
|
|
3
4
|
import { TListType } from "./interfaces";
|
|
@@ -9,5 +10,6 @@ export interface IList extends IZenComponentProps {
|
|
|
9
10
|
onListEnd?: () => void;
|
|
10
11
|
isLoading?: boolean;
|
|
11
12
|
waitingItems?: number;
|
|
13
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLUListElement>) => void;
|
|
12
14
|
}
|
|
13
|
-
export declare const List: ({ type, children, onChangeOrder, checked, onCheck, onListEnd, isLoading, waitingItems, className }: IList) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const List: ({ type, children, onChangeOrder, checked, onCheck, onListEnd, onKeyDown, isLoading, waitingItems, className }: IList) => import("react/jsx-runtime").JSX.Element;
|
package/dist/list/list.js
CHANGED
|
@@ -13,7 +13,7 @@ const useVirtualScroll_1 = require("./hooks/useVirtualScroll");
|
|
|
13
13
|
const useLazyLoading_1 = require("./hooks/useLazyLoading");
|
|
14
14
|
const getLoadingItems_1 = require("./utils/getLoadingItems");
|
|
15
15
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
16
|
-
const List = ({ type, children, onChangeOrder, checked, onCheck, onListEnd, isLoading, waitingItems, className }) => {
|
|
16
|
+
const List = ({ type, children, onChangeOrder, checked, onCheck, onListEnd, onKeyDown, isLoading, waitingItems, className }) => {
|
|
17
17
|
const listId = (0, react_1.useId)();
|
|
18
18
|
const listRef = (0, react_1.useRef)(null);
|
|
19
19
|
const onChangeOrderCallback = (0, react_1.useCallback)((startPosition, endPosition) => {
|
|
@@ -51,6 +51,6 @@ const List = ({ type, children, onChangeOrder, checked, onCheck, onListEnd, isLo
|
|
|
51
51
|
const defaultWaitingItems = type === "data" ? 50 : 10;
|
|
52
52
|
return (0, getLoadingItems_1.getLoadingItems)(type || "standard", waitingItems || defaultWaitingItems, listId, isDrive, isMobile);
|
|
53
53
|
}, [isDrive, isLoading, isMobile, listId, type, waitingItems]);
|
|
54
|
-
return (0, jsx_runtime_1.jsx)(viewportProvider_1.ViewportProvider, { isInViewport: isInViewport, children: (0, jsx_runtime_1.jsxs)("ul", { className: (0, classNames_1.classNames)(["zen-list", className || ""]), ref: listRef, children: [childrenArray, loadingChildren] }) });
|
|
54
|
+
return (0, jsx_runtime_1.jsx)(viewportProvider_1.ViewportProvider, { isInViewport: isInViewport, children: (0, jsx_runtime_1.jsxs)("ul", { className: (0, classNames_1.classNames)(["zen-list", className || ""]), onKeyDown: onKeyDown, ref: listRef, children: [childrenArray, loadingChildren] }) });
|
|
55
55
|
};
|
|
56
56
|
exports.List = List;
|
|
@@ -10,10 +10,12 @@ export interface IMobileSheet extends IZenComponentProps, Pick<ISidePanel, "trig
|
|
|
10
10
|
isBackVisible?: boolean;
|
|
11
11
|
backButtonAriaLabel?: string;
|
|
12
12
|
useTrapFocusWithTrigger?: boolean;
|
|
13
|
+
preventFirstFocus?: boolean;
|
|
13
14
|
onCloseClick?: () => void;
|
|
14
15
|
onBackClick?: () => void;
|
|
15
16
|
onReadyForFocus?: (currentIsOpen: boolean) => void;
|
|
16
17
|
wrapperClassName?: string;
|
|
18
|
+
stackingClassName?: string;
|
|
17
19
|
}
|
|
18
20
|
export declare const MobileSheet: FC<IMobileSheet> & {
|
|
19
21
|
Footer: FC<IMobileSheetFooter>;
|
|
@@ -22,7 +22,7 @@ const useFadeComponent_1 = require("../utils/useFadeComponent");
|
|
|
22
22
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
23
23
|
const MobileSheet =
|
|
24
24
|
// eslint-disable-next-line react/prop-types
|
|
25
|
-
({ triggerRef, label, isOpen, onHidePanel, className = "", panelPosition = "bottom", onBackClick, onCloseClick, isBackVisible, backButtonAriaLabel, children, useTrapFocusWithTrigger, onReadyForFocus, wrapperClassName }) => {
|
|
25
|
+
({ triggerRef, label, isOpen, onHidePanel, className = "", panelPosition = "bottom", onBackClick, onCloseClick, isBackVisible, backButtonAriaLabel, children, useTrapFocusWithTrigger, onReadyForFocus, wrapperClassName, stackingClassName, preventFirstFocus }) => {
|
|
26
26
|
var _a, _b;
|
|
27
27
|
const { renderComponent, showContent, readyForFocus, setIsOpen, handleTransitionEnd } = (0, useFadeComponent_1.useFadeComponent)(isOpen, onReadyForFocus);
|
|
28
28
|
const dataShieldId = (0, useUniqueId_1.useUniqueId)();
|
|
@@ -69,8 +69,8 @@ const MobileSheet =
|
|
|
69
69
|
if ((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.closest(".zen-mobile-sheet")) {
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
|
-
showContent && ((_c = (_b = ref.current) === null || _b === void 0 ? void 0 : _b.querySelector(focusableSelector_1.FOCUSABLE_SELECTOR)) === null || _c === void 0 ? void 0 : _c.focus());
|
|
73
|
-
}, [content, showContent, readyForFocus, useTrapFocusWithTrigger]);
|
|
72
|
+
showContent && !preventFirstFocus && ((_c = (_b = ref.current) === null || _b === void 0 ? void 0 : _b.querySelector(focusableSelector_1.FOCUSABLE_SELECTOR)) === null || _c === void 0 ? void 0 : _c.focus());
|
|
73
|
+
}, [content, showContent, readyForFocus, useTrapFocusWithTrigger, preventFirstFocus]);
|
|
74
74
|
(0, react_1.useEffect)(() => {
|
|
75
75
|
var _a;
|
|
76
76
|
if (!renderComponent && !readyForFocus && ((_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.getAttribute("aria-expanded")) === "true") {
|
|
@@ -81,7 +81,7 @@ const MobileSheet =
|
|
|
81
81
|
if (!renderComponent && !isOpen) {
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(shield_1.Shield, { className: "zen-mobile-sheet-shield", dataShieldId: dataShieldId, isVisible: showContent }), (0, jsx_runtime_1.jsx)(sidePanel_1.SidePanel, { className: (0, classNames_1.classNames)(["zen-mobile-sheet-wrapper", wrapperClassName || "", driveWrapperMobileSheetClassName || ""]), panelPosition: panelPosition, triggerRef: triggerRef, label: label, isOpen: showContent, useTrapFocusWithTrigger: useTrapFocusWithTrigger, onHidePanel: onHidePanelAction, onTransitionEnd: handleTransitionEnd, children: (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-mobile-sheet", className]), ref: ref, children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-mobile-sheet__title", driveTitleClassName || ""]), children: [isBackVisible ?
|
|
84
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(shield_1.Shield, { className: (0, classNames_1.classNames)(["zen-mobile-sheet-shield", stackingClassName ? stackingClassName : ""]), dataShieldId: dataShieldId, isVisible: showContent }), (0, jsx_runtime_1.jsx)(sidePanel_1.SidePanel, { className: (0, classNames_1.classNames)(["zen-mobile-sheet-wrapper", wrapperClassName || "", stackingClassName ? stackingClassName : "", driveWrapperMobileSheetClassName || ""]), panelPosition: panelPosition, triggerRef: triggerRef, label: label, isOpen: showContent, useTrapFocusWithTrigger: useTrapFocusWithTrigger, preventFirstFocus: preventFirstFocus, onHidePanel: onHidePanelAction, onTransitionEnd: handleTransitionEnd, children: (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-mobile-sheet", className]), ref: ref, children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-mobile-sheet__title", driveTitleClassName || ""]), children: [isBackVisible ?
|
|
85
85
|
(0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, { onClick: (e) => {
|
|
86
86
|
e.stopPropagation();
|
|
87
87
|
onBackClick === null || onBackClick === void 0 ? void 0 : onBackClick();
|
package/dist/modal/modal.d.ts
CHANGED
package/dist/modal/modal.js
CHANGED
|
@@ -45,7 +45,7 @@ const dialogHelpers_1 = require("../dialog/dialogHelpers");
|
|
|
45
45
|
const themeContext_1 = require("../utils/theme/themeContext");
|
|
46
46
|
const modalHelpers_1 = require("./modalHelpers");
|
|
47
47
|
const textIconButton_1 = require("../textIconButton/textIconButton");
|
|
48
|
-
const Modal = ({ isOpen, children, onClose, closeOnClickOutside, maxWidth, title, type, className, focus }) => {
|
|
48
|
+
const Modal = ({ isOpen, children, onClose, closeOnClickOutside, maxWidth, title, type, className, focus, modalContainerClassName }) => {
|
|
49
49
|
const lastActiveOutsideElement = (0, react_1.useRef)(document.activeElement);
|
|
50
50
|
const modalRoot = document.fullscreenElement || document.body;
|
|
51
51
|
const [top, setTop] = (0, react_1.useState)(`${window.pageYOffset}px`);
|
|
@@ -94,7 +94,7 @@ const Modal = ({ isOpen, children, onClose, closeOnClickOutside, maxWidth, title
|
|
|
94
94
|
});
|
|
95
95
|
return someContent;
|
|
96
96
|
}, [children]);
|
|
97
|
-
const dialogHTML = (0, react_1.useCallback)((id) => (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-modal", darkClass]), "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, labeledId, top, onClose, maxWidth, title, className, type, focus, modalContent, onOutSideClick]);
|
|
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
98
|
if (!isOpen) {
|
|
99
99
|
return null;
|
|
100
100
|
}
|
|
@@ -15,5 +15,6 @@ export interface IRadioGroup extends IZenComponentProps {
|
|
|
15
15
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
16
16
|
selectItemOnFocus?: boolean;
|
|
17
17
|
wrappedInLabel?: boolean;
|
|
18
|
+
size?: "small";
|
|
18
19
|
}
|
|
19
20
|
export declare const RadioGroup: React.FC<IRadioGroup>;
|
|
@@ -30,7 +30,7 @@ const react_2 = __importStar(require("react"));
|
|
|
30
30
|
const radio_1 = require("../radio/radio");
|
|
31
31
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
32
32
|
const react_3 = require("react");
|
|
33
|
-
const RadioGroup = ({ fullWidth, reverse, id, items, className, name, value, disabled, type = "static", direction = "horizontal", onChange, selectItemOnFocus = true, wrappedInLabel }) => {
|
|
33
|
+
const RadioGroup = ({ fullWidth, reverse, id, items, className, name, value, disabled, type = "static", direction = "horizontal", onChange, selectItemOnFocus = true, wrappedInLabel, size }) => {
|
|
34
34
|
const generatedId = react_2.default.useId();
|
|
35
35
|
const intId = id || generatedId;
|
|
36
36
|
const [focusedIndex, setFocusedIndex] = (0, react_2.useState)(items.findIndex(el => el.value === value));
|
|
@@ -74,6 +74,7 @@ const RadioGroup = ({ fullWidth, reverse, id, items, className, name, value, dis
|
|
|
74
74
|
(_a = focusElementRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
75
75
|
}, [focusedIndex]);
|
|
76
76
|
const extraProps = selectItemOnFocus ? {} : ({ role: "radiogroup", tabIndex: 0 });
|
|
77
|
-
return (0, jsx_runtime_1.jsx)("div", { id: intId, className: (0, classNames_1.classNames)([classes, className || ""]), children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "zen-radio-group__wrapper", onKeyDown: selectItemOnFocus ? undefined : handleKeyDown }, extraProps, { children: items.map((item, ind) => (0, react_1.createElement)(radio_1.Radio, Object.assign({}, item, { className: (0, classNames_1.classNames)(["zen-radio-group__item", wrappedInLabel ? "zen-radio-group__item--no-paddings" : "", type === "interactive" ? "zen-radio--interactive" : ""
|
|
77
|
+
return (0, jsx_runtime_1.jsx)("div", { id: intId, className: (0, classNames_1.classNames)([classes, className || ""]), children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "zen-radio-group__wrapper", onKeyDown: selectItemOnFocus ? undefined : handleKeyDown }, extraProps, { children: items.map((item, ind) => (0, react_1.createElement)(radio_1.Radio, Object.assign({}, item, { className: (0, classNames_1.classNames)(["zen-radio-group__item", wrappedInLabel ? "zen-radio-group__item--no-paddings" : "", type === "interactive" ? "zen-radio--interactive" : "",
|
|
78
|
+
size === "small" ? "zen-radio-group__item--small" : ""]), key: ind, checked: item.value === value, disabled: disabled ? disabled : item.disabled, name: name, reverse: reverse, fullWidth: fullWidth, value: item.value, onChange: onChange, wrappedInLabel: wrappedInLabel, tabIndex: selectItemOnFocus || disabled || item.disabled ? undefined : (ind === focusedIndex ? 0 : -1), ref: selectItemOnFocus ? undefined : (ind === focusedIndex ? focusElementRef : undefined) }), item.children)) })) });
|
|
78
79
|
};
|
|
79
80
|
exports.RadioGroup = RadioGroup;
|
package/dist/range/range.js
CHANGED
|
@@ -15,8 +15,12 @@ const formFieldError_1 = require("../formFieldError/formFieldError");
|
|
|
15
15
|
const useDirection_1 = require("../filtersBar/filtersBarSidePanel/hooks/useDirection");
|
|
16
16
|
const chip_1 = require("../chip/chip");
|
|
17
17
|
const chipStatusProvider_1 = require("../chip/chipStatusProvider");
|
|
18
|
+
const useMobile_1 = require("../commonHelpers/hooks/useMobile");
|
|
19
|
+
const mobileSheet_1 = require("../mobileSheet/mobileSheet");
|
|
20
|
+
const footerButtons_1 = require("../footerButtons/footerButtons");
|
|
18
21
|
const Range = ({ className, onChange, value, labelMin, labelMax, unit, defaultValue, disabled, label, min, max, id, fullWidthTriggerButton, fullBounded, allowEqualMinMax, error, triggerAriaLabel, chip, chipIcon, chipId, chipName }) => {
|
|
19
22
|
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
23
|
+
const isMobile = (0, useMobile_1.useMobile)();
|
|
20
24
|
const [currentValue, setCurrentValue] = (0, react_1.useState)(value);
|
|
21
25
|
const [errorType, setErrorType] = (0, react_1.useState)(undefined);
|
|
22
26
|
const triggerId = (0, react_1.useId)();
|
|
@@ -33,6 +37,10 @@ const Range = ({ className, onChange, value, labelMin, labelMax, unit, defaultVa
|
|
|
33
37
|
const setFieldsContainerRef = (0, react_1.useCallback)((node) => {
|
|
34
38
|
setContainerNode(node);
|
|
35
39
|
}, [setContainerNode]);
|
|
40
|
+
const checkError = (0, react_1.useCallback)((val) => {
|
|
41
|
+
const isHasError = (0, rangeHelper_1.checkErrorType)(val.min, val.max, fullBounded, allowEqualMinMax, min, max);
|
|
42
|
+
setErrorType(isHasError);
|
|
43
|
+
}, [allowEqualMinMax, fullBounded, max, min]);
|
|
36
44
|
const getSelection = (0, react_1.useCallback)(() => {
|
|
37
45
|
let selection = value.min !== null && value.max !== null ? `${value.min} - ${value.max}` : "";
|
|
38
46
|
if (!selection && value.min !== null) {
|
|
@@ -44,8 +52,10 @@ const Range = ({ className, onChange, value, labelMin, labelMax, unit, defaultVa
|
|
|
44
52
|
return selection;
|
|
45
53
|
}, [labelMax, labelMin, translate, value.max, value.min]);
|
|
46
54
|
const handleTriggerClick = (0, react_1.useCallback)(() => {
|
|
55
|
+
var _a;
|
|
47
56
|
setIsOpen(curr => !curr);
|
|
48
|
-
|
|
57
|
+
isOpen && ((_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus());
|
|
58
|
+
}, [isOpen]);
|
|
49
59
|
const handleClearClick = (0, react_1.useCallback)(() => {
|
|
50
60
|
if (blurTimeoutRef.current) {
|
|
51
61
|
clearTimeout(blurTimeoutRef.current);
|
|
@@ -54,7 +64,8 @@ const Range = ({ className, onChange, value, labelMin, labelMax, unit, defaultVa
|
|
|
54
64
|
const isHasError = (0, rangeHelper_1.checkErrorType)((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.min) || null, (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.max) || null, fullBounded, allowEqualMinMax, min, max);
|
|
55
65
|
setErrorType(isHasError);
|
|
56
66
|
}, [allowEqualMinMax, defaultValue, fullBounded, max, min]);
|
|
57
|
-
const handleCancelClick = () => {
|
|
67
|
+
const handleCancelClick = (0, react_1.useCallback)(() => {
|
|
68
|
+
var _a;
|
|
58
69
|
if (blurTimeoutRef.current) {
|
|
59
70
|
clearTimeout(blurTimeoutRef.current);
|
|
60
71
|
}
|
|
@@ -62,8 +73,10 @@ const Range = ({ className, onChange, value, labelMin, labelMax, unit, defaultVa
|
|
|
62
73
|
const isHasError = (0, rangeHelper_1.checkErrorType)(value.min, value.max, fullBounded, allowEqualMinMax, min, max);
|
|
63
74
|
setErrorType(isHasError);
|
|
64
75
|
setIsOpen(false);
|
|
65
|
-
|
|
66
|
-
|
|
76
|
+
(_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
77
|
+
}, [allowEqualMinMax, fullBounded, max, min, value]);
|
|
78
|
+
const handleApplyClick = (0, react_1.useCallback)(() => {
|
|
79
|
+
var _a;
|
|
67
80
|
if (blurTimeoutRef.current) {
|
|
68
81
|
clearTimeout(blurTimeoutRef.current);
|
|
69
82
|
}
|
|
@@ -74,7 +87,8 @@ const Range = ({ className, onChange, value, labelMin, labelMax, unit, defaultVa
|
|
|
74
87
|
}
|
|
75
88
|
onChange(currentValue);
|
|
76
89
|
setIsOpen(false);
|
|
77
|
-
|
|
90
|
+
(_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
91
|
+
}, [allowEqualMinMax, currentValue, fullBounded, max, min, onChange]);
|
|
78
92
|
const handleClearChipClick = (0, react_1.useCallback)(() => {
|
|
79
93
|
handleClearClick();
|
|
80
94
|
defaultValue && onChange(defaultValue);
|
|
@@ -84,8 +98,8 @@ const Range = ({ className, onChange, value, labelMin, labelMax, unit, defaultVa
|
|
|
84
98
|
const newValues = { min: targetId === "min" ? newValue : currentValue.min, max: targetId === "max" ? newValue : currentValue.max };
|
|
85
99
|
setCurrentValue(newValues);
|
|
86
100
|
}, [currentValue.min, currentValue.max]);
|
|
87
|
-
const isClearDisabled = () => defaultValue ? defaultValue.min === currentValue.min && defaultValue.max === currentValue.max : currentValue.min === null && currentValue.max === null;
|
|
88
|
-
const isApplyDisabled = () => currentValue.min === value.min && currentValue.max === value.max;
|
|
101
|
+
const isClearDisabled = (0, react_1.useCallback)(() => defaultValue ? defaultValue.min === currentValue.min && defaultValue.max === currentValue.max : currentValue.min === null && currentValue.max === null, [defaultValue, currentValue.min, currentValue.max]);
|
|
102
|
+
const isApplyDisabled = (0, react_1.useCallback)(() => currentValue.min === value.min && currentValue.max === value.max, [currentValue.min, currentValue.max, value.min, value.max]);
|
|
89
103
|
const handleBlur = (0, react_1.useCallback)((e) => {
|
|
90
104
|
if (e.relatedTarget && e.relatedTarget.getAttribute("data-validated-button")) {
|
|
91
105
|
blurTimeoutRef.current = setTimeout(() => {
|
|
@@ -103,15 +117,20 @@ const Range = ({ className, onChange, value, labelMin, labelMax, unit, defaultVa
|
|
|
103
117
|
}
|
|
104
118
|
prevValueRef.current = value;
|
|
105
119
|
if (value.min !== currentValue.min || value.max !== currentValue.max) {
|
|
120
|
+
checkError(value);
|
|
106
121
|
setCurrentValue(value);
|
|
107
122
|
}
|
|
108
|
-
}, [currentValue.min, currentValue.max, value]);
|
|
123
|
+
}, [currentValue.min, currentValue.max, value, checkError]);
|
|
109
124
|
const memoizedMinRangeField = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsx)(rangeField_1.RangeField, { className: "zen-range__min-field", label: labelMin || translate("Min"), unit: unit, value: currentValue.min, id: "min", inputRef: minRef, errorString: (0, rangeHelper_1.getErrorString)("min", currentValue.min, translate, errorType, min, max), onChange: handleChange, onBlur: handleBlur, max: max, min: min, isMinField: true, direction: directionState }), [labelMin, translate, unit, currentValue.min, errorType, min, max, handleChange, handleBlur, directionState]);
|
|
110
125
|
const memoizedMaxRangeField = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsx)(rangeField_1.RangeField, { className: "zen-range__max-field", label: labelMax || translate("Max"), unit: unit, value: currentValue.max, id: "max", inputRef: maxRef, errorString: (0, rangeHelper_1.getErrorString)("max", currentValue.max, translate, errorType, min, max), onChange: handleChange, onBlur: handleBlur, max: max, min: min, isMinField: false, direction: directionState }), [max, min, labelMax, handleChange, handleBlur, currentValue.max, translate, unit, errorType, directionState]);
|
|
111
126
|
const selection = (0, react_1.useMemo)(() => getSelection(), [getSelection]);
|
|
127
|
+
const memoizedContent = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsxs)("div", { className: "zen-range__fields-wrapper", children: [(0, jsx_runtime_1.jsxs)("div", { ref: setFieldsContainerRef, className: (0, classNames_1.classNames)(["zen-range__fields-container", directionState === "row" ? "zen-range__fields-container--row" : "zen-range__fields-container--column"]), children: [memoizedMinRangeField, memoizedMaxRangeField] }), errorType !== undefined && directionState === "row" ? (0, jsx_runtime_1.jsx)(formFieldError_1.FormFieldError, { className: "zen-range__error", error: [(0, rangeHelper_1.getErrorString)("min", currentValue.min, translate, errorType, min, max) || "", (0, rangeHelper_1.getErrorString)("max", currentValue.max, translate, errorType, min, max) || ""] })
|
|
128
|
+
: null] }), [setFieldsContainerRef, directionState, memoizedMinRangeField, memoizedMaxRangeField, errorType, currentValue.min, currentValue.max, translate, min, max]);
|
|
129
|
+
const memoizedDesktopView = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsx)(controlledPopup_1.ControlledPopup, { isOpen: isOpen, className: (0, classNames_1.classNames)(["zen-range-popup zen-shadow-dropdown-default", className ? className : ""]), onOpenChange: handleTriggerClick, useTrapFocusWithTrigger: "on", alignment: "bottom-left", shouldHoldScroll: true, triggerRef: triggerRef, ariaLabel: translate("Range Filter popup"), recalculateOnScroll: true, children: (0, jsx_runtime_1.jsxs)("div", { ref: contentRef, className: "zen-range__content", children: [(0, jsx_runtime_1.jsx)("div", { className: "zen-range__label zen-ellipsis", children: label }), memoizedContent, (0, jsx_runtime_1.jsxs)("div", { className: "zen-range__footer", children: [(0, jsx_runtime_1.jsx)(button_1.Button, { onClick: handleClearClick, disabled: isClearDisabled(), className: "zen-range__clear-button", type: buttonType_1.ButtonType.Tertiary, title: translate("Clear"), "data-validated-button": true, children: translate("Clear") }), (0, jsx_runtime_1.jsxs)("div", { className: "zen-range__button-group", children: [(0, jsx_runtime_1.jsx)(button_1.Button, { onClick: handleCancelClick, className: "zen-range__cancel-button", title: translate("Cancel"), "data-validated-button": true, children: translate("Cancel") }), (0, jsx_runtime_1.jsx)(button_1.Button, { onClick: handleApplyClick, type: buttonType_1.ButtonType.Primary, disabled: isApplyDisabled(), className: "zen-range__apply-button", title: translate("Apply"), "data-validated-button": true, children: translate("Apply") })] })] })] }) }), [className, handleApplyClick, handleCancelClick, handleClearClick, handleTriggerClick, isApplyDisabled, isClearDisabled, isOpen, label, memoizedContent, translate]);
|
|
130
|
+
const memoizedMobileFooter = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsxs)(footerButtons_1.FooterButtons, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { onClick: handleApplyClick, type: buttonType_1.ButtonType.Primary, disabled: isApplyDisabled(), className: "zen-range__apply-button", title: translate("Apply"), "data-validated-button": true, children: translate("Apply") }), (0, jsx_runtime_1.jsx)(button_1.Button, { onClick: handleCancelClick, className: "zen-range__cancel-button", title: translate("Cancel"), "data-validated-button": true, children: translate("Cancel") }), (0, jsx_runtime_1.jsx)(button_1.Button, { type: buttonType_1.ButtonType.Tertiary, disabled: isClearDisabled(), onClick: handleClearClick, children: translate("Clear") })] }), [handleApplyClick, handleCancelClick, handleClearClick, isApplyDisabled, isClearDisabled, translate]);
|
|
131
|
+
const memoizedMobileView = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsxs)(mobileSheet_1.MobileSheet, { label: translate("Range Filter popup"), triggerRef: triggerRef, isOpen: isOpen, onHidePanel: handleTriggerClick, onCloseClick: handleTriggerClick, useTrapFocusWithTrigger: false, children: [(0, jsx_runtime_1.jsx)(mobileSheet_1.MobileSheet.Title, { children: label }), (0, jsx_runtime_1.jsx)(mobileSheet_1.MobileSheet.Content, { children: memoizedContent }), (0, jsx_runtime_1.jsx)(mobileSheet_1.MobileSheet.Footer, { children: memoizedMobileFooter })] }), [handleTriggerClick, isOpen, label, memoizedContent, memoizedMobileFooter, translate]);
|
|
112
132
|
return (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-range", error ? "zen-range--error" : "", className || ""]), children: [chip ? (0, jsx_runtime_1.jsx)(chip_1.Chip, { id: chipId, status: isClearDisabled() ? undefined : chipStatus || "active", isOpen: isOpen, disabled: disabled, onClick: handleTriggerClick, onClose: isClearDisabled() ? undefined : handleClearChipClick, triggerRef: triggerRef, icon: chipIcon, children: selection ? selection : chipName }) :
|
|
113
|
-
(0, jsx_runtime_1.jsx)(filterButton_1.FilterButton, { ariaLabel: triggerAriaLabel, ref: triggerRef, id: id || triggerId, className: "zen-range__trigger-button", onClick: handleTriggerClick, disabled: disabled, isActive: isOpen, fullWidth: fullWidthTriggerButton, title: selection ? translate("{rangeName} values {values}").replace("{rangeName}", label).replace("{values}", selection) : "", children: selection ? (0, jsx_runtime_1.jsx)("span", { className: "zen-range__trigger-button-text", children: selection }) : label }), (0, jsx_runtime_1.jsx)(formFieldError_1.FormFieldError, { error: error }),
|
|
114
|
-
: null] }), (0, jsx_runtime_1.jsxs)("div", { className: "zen-range__footer", children: [(0, jsx_runtime_1.jsx)(button_1.Button, { onClick: handleClearClick, disabled: isClearDisabled(), className: "zen-range__clear-button", type: buttonType_1.ButtonType.Tertiary, title: translate("Clear"), "data-validated-button": true, children: translate("Clear") }), (0, jsx_runtime_1.jsxs)("div", { className: "zen-range__button-group", children: [(0, jsx_runtime_1.jsx)(button_1.Button, { onClick: handleCancelClick, className: "zen-range__cancel-button", title: translate("Cancel"), "data-validated-button": true, children: translate("Cancel") }), (0, jsx_runtime_1.jsx)(button_1.Button, { onClick: handleApplyClick, type: buttonType_1.ButtonType.Primary, disabled: isApplyDisabled(), className: "zen-range__apply-button", title: translate("Apply"), "data-validated-button": true, children: translate("Apply") })] })] })] }) })] });
|
|
133
|
+
(0, jsx_runtime_1.jsx)(filterButton_1.FilterButton, { ariaLabel: triggerAriaLabel, ref: triggerRef, id: id || triggerId, className: "zen-range__trigger-button", onClick: handleTriggerClick, disabled: disabled, isActive: isOpen, fullWidth: fullWidthTriggerButton, title: selection ? translate("{rangeName} values {values}").replace("{rangeName}", label).replace("{values}", selection) : "", children: selection ? (0, jsx_runtime_1.jsx)("span", { className: "zen-range__trigger-button-text", children: selection }) : label }), (0, jsx_runtime_1.jsx)(formFieldError_1.FormFieldError, { error: error }), isMobile ? memoizedMobileView : memoizedDesktopView] });
|
|
115
134
|
};
|
|
116
135
|
exports.Range = Range;
|
|
117
136
|
exports.TRANSLATIONS = [
|
|
@@ -56,7 +56,7 @@ const SearchInputRaw = ({ value, className = "", disabled, onChange, onKeyDown,
|
|
|
56
56
|
const onClick = () => {
|
|
57
57
|
onChange === null || onChange === void 0 ? void 0 : onChange("");
|
|
58
58
|
};
|
|
59
|
-
closeButton = ((0, jsx_runtime_1.jsx)("button", { type: "button", className: closeButtonClassName, onClick: onClick, title: closeButtonTitleValue, children: (0, jsx_runtime_1.jsx)(iconClose_1.IconClose, { className: "zen-search-input__close-icon", size: isDrive ? "huge" : "large" }) }));
|
|
59
|
+
closeButton = ((0, jsx_runtime_1.jsx)("button", { type: "button", tabIndex: value.length ? 0 : -1, className: closeButtonClassName, onClick: onClick, title: closeButtonTitleValue, children: (0, jsx_runtime_1.jsx)(iconClose_1.IconClose, { className: "zen-search-input__close-icon", size: isDrive ? "huge" : "large" }) }));
|
|
60
60
|
}
|
|
61
61
|
const innerRef = React.useRef(null);
|
|
62
62
|
const onClickHandler = (0, react_1.useCallback)(() => {
|
|
@@ -20,6 +20,7 @@ export interface ISidePanel extends IZenComponentProps {
|
|
|
20
20
|
isOpen: boolean;
|
|
21
21
|
label: string;
|
|
22
22
|
useTrapFocusWithTrigger?: boolean;
|
|
23
|
+
preventFirstFocus?: boolean;
|
|
23
24
|
onTransitionEnd?: (isCurrentOpen: boolean) => void;
|
|
24
25
|
onHidePanel: (reason: SidePanelCloseReason, dataShieldId?: string) => void;
|
|
25
26
|
width?: number | string;
|
|
@@ -52,7 +52,7 @@ var SidePanelCloseReason;
|
|
|
52
52
|
SidePanelCloseReason["ClickOutside"] = "ClickOutside";
|
|
53
53
|
})(SidePanelCloseReason || (exports.SidePanelCloseReason = SidePanelCloseReason = {}));
|
|
54
54
|
exports.CUSTOM_POPUP_COMPONENT_CLASSNAME = "zen-custom-component-popup";
|
|
55
|
-
const SidePanel = ({ label, className, id, isOpen, onHidePanel, children, triggerRef, panelPosition = "right", useTrapFocusWithTrigger, width, onTransitionEnd }) => {
|
|
55
|
+
const SidePanel = ({ label, className, id, isOpen, onHidePanel, children, triggerRef, panelPosition = "right", useTrapFocusWithTrigger, preventFirstFocus, width, onTransitionEnd }) => {
|
|
56
56
|
const { renderComponent, showContent, readyForFocus, setIsOpen, handleTransitionEnd } = (0, useFadeComponent_1.useFadeComponent)(isOpen, onTransitionEnd);
|
|
57
57
|
const { dark } = (0, react_1.useContext)(themeContext_1.themeContext);
|
|
58
58
|
const isMobile = (0, useMobile_1.useMobile)();
|
|
@@ -124,7 +124,7 @@ const SidePanel = ({ label, className, id, isOpen, onHidePanel, children, trigge
|
|
|
124
124
|
if (renderComponent && readyForFocus && !prevReadyForFocus.current) {
|
|
125
125
|
const firstFocusable = (_a = sidePanelRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(focusableSelector_1.FOCUSABLE_SELECTOR);
|
|
126
126
|
prevReadyForFocus.current = readyForFocus;
|
|
127
|
-
if (!useTrapFocusWithTrigger) {
|
|
127
|
+
if (!useTrapFocusWithTrigger && !preventFirstFocus) {
|
|
128
128
|
firstFocusable ? firstFocusable.focus() : (_b = sidePanelRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
129
129
|
}
|
|
130
130
|
}
|
|
@@ -135,7 +135,7 @@ const SidePanel = ({ label, className, id, isOpen, onHidePanel, children, trigge
|
|
|
135
135
|
prevReadyForFocus.current = false;
|
|
136
136
|
}
|
|
137
137
|
return () => document.body.removeEventListener("click", closeOnClickOutside, true);
|
|
138
|
-
}, [renderComponent, readyForFocus, onHidePanel, triggerRef, useTrapFocusWithTrigger]);
|
|
138
|
+
}, [renderComponent, readyForFocus, onHidePanel, triggerRef, useTrapFocusWithTrigger, preventFirstFocus]);
|
|
139
139
|
(0, react_1.useEffect)(() => {
|
|
140
140
|
setIsOpen(isOpen);
|
|
141
141
|
}, [isOpen, setIsOpen]);
|
|
@@ -4,8 +4,8 @@ exports.TabItem = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const classNames_1 = require("../../commonHelpers/classNames/classNames");
|
|
6
6
|
const useDriveClassName_1 = require("../../utils/theme/useDriveClassName");
|
|
7
|
-
const TabItem = ({ tabId, tabName, icon, active, handleButtonClick, ariaControl }) => {
|
|
7
|
+
const TabItem = ({ tabId, tabName, icon, active, handleButtonClick, ariaControl, quantity }) => {
|
|
8
8
|
const driveClassname = (0, useDriveClassName_1.useDriveClassName)("zen-tab-item");
|
|
9
|
-
return (0, jsx_runtime_1.jsx)("button", { id: tabId, type: "button", className: (0, classNames_1.classNames)(["zen-tab-item", driveClassname || "", active ? "zen-tab-item--active" : ""]), role: "tab", "aria-controls": ariaControl, "aria-selected": active ? "true" : "false", "aria-label": tabName, title: tabName, onClick: handleButtonClick, children: (0, jsx_runtime_1.jsxs)("div", { className: "zen-tab-item__content", children: [icon && (0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)(["zen-tab-item__content-icon", active ? "zen-tab-item__content-icon--active" : ""]), children: icon }), (0, jsx_runtime_1.jsx)("span", { className: "zen-tab-item__content-text", children: tabName })] }) });
|
|
9
|
+
return (0, jsx_runtime_1.jsx)("button", { id: tabId, type: "button", className: (0, classNames_1.classNames)(["zen-tab-item", driveClassname || "", active ? "zen-tab-item--active" : ""]), role: "tab", "aria-controls": ariaControl, "aria-selected": active ? "true" : "false", "aria-label": tabName, title: tabName, onClick: handleButtonClick, children: (0, jsx_runtime_1.jsxs)("div", { className: "zen-tab-item__content", children: [icon && (0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)(["zen-tab-item__content-icon", active ? "zen-tab-item__content-icon--active" : ""]), children: icon }), (0, jsx_runtime_1.jsx)("span", { className: "zen-tab-item__content-text", children: tabName }), quantity && (0, jsx_runtime_1.jsx)("div", { className: "zen-tab-item__content-quantity", children: quantity })] }) });
|
|
10
10
|
};
|
|
11
11
|
exports.TabItem = TabItem;
|
package/dist/tabs/tabs.d.ts
CHANGED
package/dist/tabs/tabs.js
CHANGED
|
@@ -132,7 +132,7 @@ const Tabs = ({ className, tabs = [], activeTabId, onTabChange }) => {
|
|
|
132
132
|
// activeTab.focus();
|
|
133
133
|
}
|
|
134
134
|
}, [activeTabId]);
|
|
135
|
-
return (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-tabs", driveClassname || "", className !== null && className !== void 0 ? className : ""]), children: (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-tabs__tabs-container", className !== null && className !== void 0 ? className : "", scrollButtonType]), children: [scrollButtonType === "start" || scrollButtonType === "both" ? (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-tabs__gradient", driveClassNameGradient || "", "zen-tabs__gradient--left"]) }), (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, { title: translate("Scroll left"), className: (0, classNames_1.classNames)(["zen-tabs__scroller", driveClassNameScroller || "", "zen-tabs__start"]), icon: iconChevronRight_1.IconChevronRight, type: "tertiary", iconPosition: textIconButton_1.ButtonIconPosition.Start, onClick: handleScrollButtonClick(scrollableRef.current, -scrollableStep), iconClasses: "zen-tabs__start-icon" })] }) : null, (0, jsx_runtime_1.jsx)("div", { ref: scrollableRef, onKeyDown: keyDownHandler, className: "zen-tabs__scrollable", children: (0, jsx_runtime_1.jsx)("div", { className: "zen-tabs__tabs", role: "tablist", children: tabs.map(tab => ((0, jsx_runtime_1.jsx)(tabItem_1.TabItem, { className: "zen-tabs__tab-item", tabId: tab.id, tabName: tab.name, icon: typeof tab.icon === "function" ? (0, react_1.createElement)(tab.icon, { size: "large" }) : tab.icon, active: activeTabId === tab.id, ariaControl: `panel-${tab.id}`, handleButtonClick: handleButtonClick }, tab.id))) }) }), scrollButtonType === "end" || scrollButtonType === "both" ? (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-tabs__gradient", driveClassNameGradient || "", "zen-tabs__gradient--right"]) }), (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, { title: translate("Scroll right"), className: (0, classNames_1.classNames)(["zen-tabs__scroller", driveClassNameScroller || "", "zen-tabs__end"]), icon: iconChevronRight_1.IconChevronRight, type: "tertiary", onClick: handleScrollButtonClick(scrollableRef.current, scrollableStep), iconPosition: textIconButton_1.ButtonIconPosition.End })] }) : null] }) });
|
|
135
|
+
return (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-tabs", driveClassname || "", className !== null && className !== void 0 ? className : ""]), children: (0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-tabs__tabs-container", className !== null && className !== void 0 ? className : "", scrollButtonType]), children: [scrollButtonType === "start" || scrollButtonType === "both" ? (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-tabs__gradient", driveClassNameGradient || "", "zen-tabs__gradient--left"]) }), (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, { title: translate("Scroll left"), className: (0, classNames_1.classNames)(["zen-tabs__scroller", driveClassNameScroller || "", "zen-tabs__start"]), icon: iconChevronRight_1.IconChevronRight, type: "tertiary", iconPosition: textIconButton_1.ButtonIconPosition.Start, onClick: handleScrollButtonClick(scrollableRef.current, -scrollableStep), iconClasses: "zen-tabs__start-icon" })] }) : null, (0, jsx_runtime_1.jsx)("div", { ref: scrollableRef, onKeyDown: keyDownHandler, className: "zen-tabs__scrollable", children: (0, jsx_runtime_1.jsx)("div", { className: "zen-tabs__tabs", role: "tablist", children: tabs.map(tab => ((0, jsx_runtime_1.jsx)(tabItem_1.TabItem, { className: "zen-tabs__tab-item", tabId: tab.id, tabName: tab.name, icon: typeof tab.icon === "function" ? (0, react_1.createElement)(tab.icon, { size: "large" }) : tab.icon, quantity: tab.quantity, active: activeTabId === tab.id, ariaControl: `panel-${tab.id}`, handleButtonClick: handleButtonClick }, tab.id))) }) }), scrollButtonType === "end" || scrollButtonType === "both" ? (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-tabs__gradient", driveClassNameGradient || "", "zen-tabs__gradient--right"]) }), (0, jsx_runtime_1.jsx)(textIconButton_1.TextIconButton, { title: translate("Scroll right"), className: (0, classNames_1.classNames)(["zen-tabs__scroller", driveClassNameScroller || "", "zen-tabs__end"]), icon: iconChevronRight_1.IconChevronRight, type: "tertiary", onClick: handleScrollButtonClick(scrollableRef.current, scrollableStep), iconPosition: textIconButton_1.ButtonIconPosition.End })] }) : null] }) });
|
|
136
136
|
};
|
|
137
137
|
exports.Tabs = Tabs;
|
|
138
138
|
exports.Tabs.displayName = exports.TabsDisplayName;
|