@expressms/smartapp-ui 2.9.4-alpha.1 → 2.9.4
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/build/main/assets/icons/arrow-back.svg +3 -0
- package/build/main/assets/icons/arrow-down.svg +3 -0
- package/build/main/assets/icons/arrow-up.svg +3 -0
- package/build/main/assets/icons/attachment-loader.svg +3 -0
- package/build/main/assets/icons/avatar-loader.svg +3 -0
- package/build/main/assets/icons/button-loader.svg +3 -0
- package/build/main/assets/icons/cancel-cross.svg +3 -0
- package/build/main/assets/icons/check-mark.svg +4 -0
- package/build/main/assets/icons/clear.svg +3 -0
- package/build/main/assets/icons/close-stories.svg +4 -0
- package/build/main/assets/icons/close.svg +10 -0
- package/build/main/assets/icons/contact-info.svg +12 -0
- package/build/main/assets/icons/corporate-user.svg +10 -0
- package/build/main/assets/icons/crown.svg +5 -0
- package/build/main/assets/icons/delete-chip.svg +3 -0
- package/build/main/assets/icons/distribution.svg +12 -0
- package/build/main/assets/icons/download.svg +4 -0
- package/build/main/assets/icons/error.svg +5 -0
- package/build/main/assets/icons/external-link.svg +3 -0
- package/build/main/assets/icons/eye-off.svg +10 -0
- package/build/main/assets/icons/eye.svg +10 -0
- package/build/main/assets/icons/file.svg +3 -0
- package/build/main/assets/icons/group.svg +3 -0
- package/build/main/assets/icons/info.svg +5 -0
- package/build/main/assets/icons/loader.svg +3 -0
- package/build/main/assets/icons/logout.svg +4 -0
- package/build/main/assets/icons/magnifying-glass.svg +3 -0
- package/build/main/assets/icons/mail.svg +3 -0
- package/build/main/assets/icons/meeting-room.svg +3 -0
- package/build/main/assets/icons/meeting-rooms-list.svg +5 -0
- package/build/main/assets/icons/more.svg +3 -0
- package/build/main/assets/icons/my-contact-user.svg +10 -0
- package/build/main/assets/icons/notification-close.svg +3 -0
- package/build/main/assets/icons/notification-error.svg +3 -0
- package/build/main/assets/icons/notification-failure.svg +3 -0
- package/build/main/assets/icons/notification-info.svg +5 -0
- package/build/main/assets/icons/notification-success.svg +4 -0
- package/build/main/assets/icons/notification-warning.svg +5 -0
- package/build/main/assets/icons/order.svg +6 -0
- package/build/main/assets/icons/plus.svg +4 -0
- package/build/main/assets/icons/private.svg +12 -0
- package/build/main/assets/icons/refresh.svg +3 -0
- package/build/main/assets/icons/search.svg +3 -0
- package/build/main/assets/icons/story-loader.svg +3 -0
- package/build/main/assets/icons/tick.svg +10 -0
- package/build/main/assets/icons/trash.svg +3 -0
- package/build/main/assets/icons/unread-mails.svg +4 -0
- package/build/main/assets/icons/warning-avatar.svg +4 -0
- package/build/main/assets/storybook/index.d.ts +22 -0
- package/build/main/assets/storybook/index.js +23 -0
- package/build/main/assets/storybook/index.js.map +1 -0
- package/build/main/constants/constants.d.ts +164 -0
- package/build/main/constants/constants.js +184 -0
- package/build/main/constants/constants.js.map +1 -0
- package/build/main/constants/index.d.ts +2 -0
- package/build/main/constants/index.js +3 -0
- package/build/main/constants/index.js.map +1 -0
- package/build/main/constants/types.d.ts +29 -0
- package/build/main/constants/types.js +2 -0
- package/build/main/constants/types.js.map +1 -0
- package/build/main/helpers/index.d.ts +25 -0
- package/build/main/helpers/index.js +113 -0
- package/build/main/helpers/index.js.map +1 -0
- package/build/main/hooks/useLongTap.d.ts +12 -0
- package/build/main/hooks/useLongTap.js +29 -0
- package/build/main/hooks/useLongTap.js.map +1 -0
- package/build/main/hooks/useModal.d.ts +21 -0
- package/build/main/hooks/useModal.js +60 -0
- package/build/main/hooks/useModal.js.map +1 -0
- package/build/main/index.d.ts +36 -0
- package/build/main/index.js +37 -0
- package/build/main/index.js.map +1 -0
- package/build/main/styles/index.d.ts +1 -0
- package/build/main/styles/index.js +2 -0
- package/build/main/styles/index.js.map +1 -0
- package/build/main/styles/main.js +0 -0
- package/build/main/styles/styles.scss +14 -0
- package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +4 -0
- package/build/main//321/201omponents/ActionModal/ActionModal.js +55 -0
- package/build/main//321/201omponents/ActionModal/ActionModal.js.map +1 -0
- package/build/main//321/201omponents/ActionModal/index.d.ts +1 -0
- package/build/main//321/201omponents/ActionModal/index.js +2 -0
- package/build/main//321/201omponents/ActionModal/index.js.map +1 -0
- package/build/main//321/201omponents/ActionModal/types.d.ts +24 -0
- package/build/main//321/201omponents/ActionModal/types.js +2 -0
- package/build/main//321/201omponents/ActionModal/types.js.map +1 -0
- package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +8 -0
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js +60 -0
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +1 -0
- package/build/main//321/201omponents/AttachedFile/index.d.ts +1 -0
- package/build/main//321/201omponents/AttachedFile/index.js +2 -0
- package/build/main//321/201omponents/AttachedFile/index.js.map +1 -0
- package/build/main//321/201omponents/AttachedFile/types.d.ts +25 -0
- package/build/main//321/201omponents/AttachedFile/types.js +2 -0
- package/build/main//321/201omponents/AttachedFile/types.js.map +1 -0
- package/build/main//321/201omponents/Avatar/Avatar.d.ts +4 -0
- package/build/main//321/201omponents/Avatar/Avatar.js +151 -0
- package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -0
- package/build/main//321/201omponents/Avatar/index.d.ts +1 -0
- package/build/main//321/201omponents/Avatar/index.js +2 -0
- package/build/main//321/201omponents/Avatar/index.js.map +1 -0
- package/build/main//321/201omponents/Avatar/types.d.ts +59 -0
- package/build/main//321/201omponents/Avatar/types.js +29 -0
- package/build/main//321/201omponents/Avatar/types.js.map +1 -0
- package/build/main//321/201omponents/Button/Button.d.ts +4 -0
- package/build/main//321/201omponents/Button/Button.js +63 -0
- package/build/main//321/201omponents/Button/Button.js.map +1 -0
- package/build/main//321/201omponents/Button/index.d.ts +1 -0
- package/build/main//321/201omponents/Button/index.js +2 -0
- package/build/main//321/201omponents/Button/index.js.map +1 -0
- package/build/main//321/201omponents/Button/types.d.ts +28 -0
- package/build/main//321/201omponents/Button/types.js +11 -0
- package/build/main//321/201omponents/Button/types.js.map +1 -0
- package/build/main//321/201omponents/CachedImage/CachedImage.d.ts +4 -0
- package/build/main//321/201omponents/CachedImage/CachedImage.js +59 -0
- package/build/main//321/201omponents/CachedImage/CachedImage.js.map +1 -0
- package/build/main//321/201omponents/CachedImage/helpers.d.ts +3 -0
- package/build/main//321/201omponents/CachedImage/helpers.js +40 -0
- package/build/main//321/201omponents/CachedImage/helpers.js.map +1 -0
- package/build/main//321/201omponents/CachedImage/index.d.ts +1 -0
- package/build/main//321/201omponents/CachedImage/index.js +2 -0
- package/build/main//321/201omponents/CachedImage/index.js.map +1 -0
- package/build/main//321/201omponents/CachedImage/types.d.ts +10 -0
- package/build/main//321/201omponents/CachedImage/types.js +2 -0
- package/build/main//321/201omponents/CachedImage/types.js.map +1 -0
- package/build/main//321/201omponents/Calendar/Calendar.d.ts +4 -0
- package/build/main//321/201omponents/Calendar/Calendar.js +97 -0
- package/build/main//321/201omponents/Calendar/Calendar.js.map +1 -0
- package/build/main//321/201omponents/Calendar/index.d.ts +1 -0
- package/build/main//321/201omponents/Calendar/index.js +2 -0
- package/build/main//321/201omponents/Calendar/index.js.map +1 -0
- package/build/main//321/201omponents/Calendar/types.d.ts +13 -0
- package/build/main//321/201omponents/Calendar/types.js +2 -0
- package/build/main//321/201omponents/Calendar/types.js.map +1 -0
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.d.ts +4 -0
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +46 -0
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js.map +1 -0
- package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.d.ts +4 -0
- package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js +71 -0
- package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js.map +1 -0
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.d.ts +4 -0
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +41 -0
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js.map +1 -0
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.d.ts +4 -0
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +63 -0
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js.map +1 -0
- package/build/main//321/201omponents/Charts/colors.d.ts +3 -0
- package/build/main//321/201omponents/Charts/colors.js +4 -0
- package/build/main//321/201omponents/Charts/colors.js.map +1 -0
- package/build/main//321/201omponents/Charts/constants.d.ts +46 -0
- package/build/main//321/201omponents/Charts/constants.js +43 -0
- package/build/main//321/201omponents/Charts/constants.js.map +1 -0
- package/build/main//321/201omponents/Charts/helpers.d.ts +17 -0
- package/build/main//321/201omponents/Charts/helpers.js +73 -0
- package/build/main//321/201omponents/Charts/helpers.js.map +1 -0
- package/build/main//321/201omponents/Charts/index.d.ts +3 -0
- package/build/main//321/201omponents/Charts/index.js +4 -0
- package/build/main//321/201omponents/Charts/index.js.map +1 -0
- package/build/main//321/201omponents/Charts/types.d.ts +88 -0
- package/build/main//321/201omponents/Charts/types.js +2 -0
- package/build/main//321/201omponents/Charts/types.js.map +1 -0
- package/build/main//321/201omponents/Charts/useEvents.d.ts +5 -0
- package/build/main//321/201omponents/Charts/useEvents.js +45 -0
- package/build/main//321/201omponents/Charts/useEvents.js.map +1 -0
- package/build/main//321/201omponents/Charts/usePieEvents.d.ts +6 -0
- package/build/main//321/201omponents/Charts/usePieEvents.js +57 -0
- package/build/main//321/201omponents/Charts/usePieEvents.js.map +1 -0
- package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +4 -0
- package/build/main//321/201omponents/Checkbox/Checkbox.js +38 -0
- package/build/main//321/201omponents/Checkbox/Checkbox.js.map +1 -0
- package/build/main//321/201omponents/Checkbox/index.d.ts +1 -0
- package/build/main//321/201omponents/Checkbox/index.js +2 -0
- package/build/main//321/201omponents/Checkbox/index.js.map +1 -0
- package/build/main//321/201omponents/Checkbox/types.d.ts +12 -0
- package/build/main//321/201omponents/Checkbox/types.js +2 -0
- package/build/main//321/201omponents/Checkbox/types.js.map +1 -0
- package/build/main//321/201omponents/Chip/Chip.d.ts +4 -0
- package/build/main//321/201omponents/Chip/Chip.js +74 -0
- package/build/main//321/201omponents/Chip/Chip.js.map +1 -0
- package/build/main//321/201omponents/Chip/index.d.ts +1 -0
- package/build/main//321/201omponents/Chip/index.js +2 -0
- package/build/main//321/201omponents/Chip/index.js.map +1 -0
- package/build/main//321/201omponents/Chip/types.d.ts +21 -0
- package/build/main//321/201omponents/Chip/types.js +2 -0
- package/build/main//321/201omponents/Chip/types.js.map +1 -0
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +4 -0
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +70 -0
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +1 -0
- package/build/main//321/201omponents/ConfirmationModal/index.d.ts +1 -0
- package/build/main//321/201omponents/ConfirmationModal/index.js +2 -0
- package/build/main//321/201omponents/ConfirmationModal/index.js.map +1 -0
- package/build/main//321/201omponents/ConfirmationModal/types.d.ts +28 -0
- package/build/main//321/201omponents/ConfirmationModal/types.js +2 -0
- package/build/main//321/201omponents/ConfirmationModal/types.js.map +1 -0
- package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +4 -0
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js +81 -0
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -0
- package/build/main//321/201omponents/ContextMenu/index.d.ts +1 -0
- package/build/main//321/201omponents/ContextMenu/index.js +2 -0
- package/build/main//321/201omponents/ContextMenu/index.js.map +1 -0
- package/build/main//321/201omponents/ContextMenu/types.d.ts +34 -0
- package/build/main//321/201omponents/ContextMenu/types.js +2 -0
- package/build/main//321/201omponents/ContextMenu/types.js.map +1 -0
- package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +12 -0
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js +243 -0
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +1 -0
- package/build/main//321/201omponents/CustomSelect/index.d.ts +1 -0
- package/build/main//321/201omponents/CustomSelect/index.js +2 -0
- package/build/main//321/201omponents/CustomSelect/index.js.map +1 -0
- package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +16 -0
- package/build/main//321/201omponents/CustomSelect/selectStyles.js +67 -0
- package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -0
- package/build/main//321/201omponents/CustomSelect/types.d.ts +65 -0
- package/build/main//321/201omponents/CustomSelect/types.js +2 -0
- package/build/main//321/201omponents/CustomSelect/types.js.map +1 -0
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +4 -0
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +58 -0
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +1 -0
- package/build/main//321/201omponents/CustomSelectProfiles/index.d.ts +1 -0
- package/build/main//321/201omponents/CustomSelectProfiles/index.js +2 -0
- package/build/main//321/201omponents/CustomSelectProfiles/index.js.map +1 -0
- package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +12 -0
- package/build/main//321/201omponents/CustomSelectProfiles/types.js +2 -0
- package/build/main//321/201omponents/CustomSelectProfiles/types.js.map +1 -0
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.d.ts +4 -0
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +57 -0
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +1 -0
- package/build/main//321/201omponents/DragAndDrop/index.d.ts +1 -0
- package/build/main//321/201omponents/DragAndDrop/index.js +2 -0
- package/build/main//321/201omponents/DragAndDrop/index.js.map +1 -0
- package/build/main//321/201omponents/DragAndDrop/types.d.ts +24 -0
- package/build/main//321/201omponents/DragAndDrop/types.js +2 -0
- package/build/main//321/201omponents/DragAndDrop/types.js.map +1 -0
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.d.ts +4 -0
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js +223 -0
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +1 -0
- package/build/main//321/201omponents/DraggablePopup/index.d.ts +1 -0
- package/build/main//321/201omponents/DraggablePopup/index.js +2 -0
- package/build/main//321/201omponents/DraggablePopup/index.js.map +1 -0
- package/build/main//321/201omponents/DraggablePopup/types.d.ts +88 -0
- package/build/main//321/201omponents/DraggablePopup/types.js +2 -0
- package/build/main//321/201omponents/DraggablePopup/types.js.map +1 -0
- package/build/main//321/201omponents/Error/Error.d.ts +4 -0
- package/build/main//321/201omponents/Error/Error.js +23 -0
- package/build/main//321/201omponents/Error/Error.js.map +1 -0
- package/build/main//321/201omponents/Error/index.d.ts +1 -0
- package/build/main//321/201omponents/Error/index.js +2 -0
- package/build/main//321/201omponents/Error/index.js.map +1 -0
- package/build/main//321/201omponents/Error/types.d.ts +10 -0
- package/build/main//321/201omponents/Error/types.js +2 -0
- package/build/main//321/201omponents/Error/types.js.map +1 -0
- package/build/main//321/201omponents/Flex/Flex.d.ts +2 -0
- package/build/main//321/201omponents/Flex/Flex.js +49 -0
- package/build/main//321/201omponents/Flex/Flex.js.map +1 -0
- package/build/main//321/201omponents/Flex/HFlex/HFlex.d.ts +5 -0
- package/build/main//321/201omponents/Flex/HFlex/HFlex.js +16 -0
- package/build/main//321/201omponents/Flex/HFlex/HFlex.js.map +1 -0
- package/build/main//321/201omponents/Flex/HFlex/index.d.ts +1 -0
- package/build/main//321/201omponents/Flex/HFlex/index.js +2 -0
- package/build/main//321/201omponents/Flex/HFlex/index.js.map +1 -0
- package/build/main//321/201omponents/Flex/VFlex/VFlex.d.ts +5 -0
- package/build/main//321/201omponents/Flex/VFlex/VFlex.js +16 -0
- package/build/main//321/201omponents/Flex/VFlex/VFlex.js.map +1 -0
- package/build/main//321/201omponents/Flex/VFlex/index.d.ts +1 -0
- package/build/main//321/201omponents/Flex/VFlex/index.js +2 -0
- package/build/main//321/201omponents/Flex/VFlex/index.js.map +1 -0
- package/build/main//321/201omponents/Flex/index.d.ts +3 -0
- package/build/main//321/201omponents/Flex/index.js +4 -0
- package/build/main//321/201omponents/Flex/index.js.map +1 -0
- package/build/main//321/201omponents/Flex/types.d.ts +15 -0
- package/build/main//321/201omponents/Flex/types.js +2 -0
- package/build/main//321/201omponents/Flex/types.js.map +1 -0
- package/build/main//321/201omponents/Header/Header.d.ts +5 -0
- package/build/main//321/201omponents/Header/Header.js +125 -0
- package/build/main//321/201omponents/Header/Header.js.map +1 -0
- package/build/main//321/201omponents/Header/index.d.ts +1 -0
- package/build/main//321/201omponents/Header/index.js +2 -0
- package/build/main//321/201omponents/Header/index.js.map +1 -0
- package/build/main//321/201omponents/Header/types.d.ts +46 -0
- package/build/main//321/201omponents/Header/types.js +2 -0
- package/build/main//321/201omponents/Header/types.js.map +1 -0
- package/build/main//321/201omponents/Input/Input.d.ts +4 -0
- package/build/main//321/201omponents/Input/Input.js +207 -0
- package/build/main//321/201omponents/Input/Input.js.map +1 -0
- package/build/main//321/201omponents/Input/index.d.ts +1 -0
- package/build/main//321/201omponents/Input/index.js +2 -0
- package/build/main//321/201omponents/Input/index.js.map +1 -0
- package/build/main//321/201omponents/Input/types.d.ts +29 -0
- package/build/main//321/201omponents/Input/types.js +2 -0
- package/build/main//321/201omponents/Input/types.js.map +1 -0
- package/build/main//321/201omponents/ListItem/ListItem.d.ts +23 -0
- package/build/main//321/201omponents/ListItem/ListItem.js +208 -0
- package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -0
- package/build/main//321/201omponents/ListItem/index.d.ts +1 -0
- package/build/main//321/201omponents/ListItem/index.js +2 -0
- package/build/main//321/201omponents/ListItem/index.js.map +1 -0
- package/build/main//321/201omponents/ListItem/types.d.ts +42 -0
- package/build/main//321/201omponents/ListItem/types.js +2 -0
- package/build/main//321/201omponents/ListItem/types.js.map +1 -0
- package/build/main//321/201omponents/Loader/Loader.d.ts +4 -0
- package/build/main//321/201omponents/Loader/Loader.js +44 -0
- package/build/main//321/201omponents/Loader/Loader.js.map +1 -0
- package/build/main//321/201omponents/Loader/index.d.ts +1 -0
- package/build/main//321/201omponents/Loader/index.js +2 -0
- package/build/main//321/201omponents/Loader/index.js.map +1 -0
- package/build/main//321/201omponents/Loader/types.d.ts +18 -0
- package/build/main//321/201omponents/Loader/types.js +2 -0
- package/build/main//321/201omponents/Loader/types.js.map +1 -0
- package/build/main//321/201omponents/Modal/Modal.d.ts +4 -0
- package/build/main//321/201omponents/Modal/Modal.js +147 -0
- package/build/main//321/201omponents/Modal/Modal.js.map +1 -0
- package/build/main//321/201omponents/Modal/index.d.ts +1 -0
- package/build/main//321/201omponents/Modal/index.js +2 -0
- package/build/main//321/201omponents/Modal/index.js.map +1 -0
- package/build/main//321/201omponents/Modal/types.d.ts +36 -0
- package/build/main//321/201omponents/Modal/types.js +2 -0
- package/build/main//321/201omponents/Modal/types.js.map +1 -0
- package/build/main//321/201omponents/Notification/Notification.d.ts +8 -0
- package/build/main//321/201omponents/Notification/Notification.js +218 -0
- package/build/main//321/201omponents/Notification/Notification.js.map +1 -0
- package/build/main//321/201omponents/Notification/index.d.ts +1 -0
- package/build/main//321/201omponents/Notification/index.js +2 -0
- package/build/main//321/201omponents/Notification/index.js.map +1 -0
- package/build/main//321/201omponents/Notification/types.d.ts +45 -0
- package/build/main//321/201omponents/Notification/types.js +2 -0
- package/build/main//321/201omponents/Notification/types.js.map +1 -0
- package/build/main//321/201omponents/Profile/Profile.d.ts +4 -0
- package/build/main//321/201omponents/Profile/Profile.js +42 -0
- package/build/main//321/201omponents/Profile/Profile.js.map +1 -0
- package/build/main//321/201omponents/Profile/index.d.ts +1 -0
- package/build/main//321/201omponents/Profile/index.js +2 -0
- package/build/main//321/201omponents/Profile/index.js.map +1 -0
- package/build/main//321/201omponents/Profile/types.d.ts +14 -0
- package/build/main//321/201omponents/Profile/types.js +2 -0
- package/build/main//321/201omponents/Profile/types.js.map +1 -0
- package/build/main//321/201omponents/ProgressBar/ProgressBar.d.ts +4 -0
- package/build/main//321/201omponents/ProgressBar/ProgressBar.js +66 -0
- package/build/main//321/201omponents/ProgressBar/ProgressBar.js.map +1 -0
- package/build/main//321/201omponents/ProgressBar/index.d.ts +1 -0
- package/build/main//321/201omponents/ProgressBar/index.js +2 -0
- package/build/main//321/201omponents/ProgressBar/index.js.map +1 -0
- package/build/main//321/201omponents/ProgressBar/types.d.ts +7 -0
- package/build/main//321/201omponents/ProgressBar/types.js +2 -0
- package/build/main//321/201omponents/ProgressBar/types.js.map +1 -0
- package/build/main//321/201omponents/RadioButton/RadioButton.d.ts +4 -0
- package/build/main//321/201omponents/RadioButton/RadioButton.js +37 -0
- package/build/main//321/201omponents/RadioButton/RadioButton.js.map +1 -0
- package/build/main//321/201omponents/RadioButton/index.d.ts +1 -0
- package/build/main//321/201omponents/RadioButton/index.js +2 -0
- package/build/main//321/201omponents/RadioButton/index.js.map +1 -0
- package/build/main//321/201omponents/RadioButton/types.d.ts +12 -0
- package/build/main//321/201omponents/RadioButton/types.js +2 -0
- package/build/main//321/201omponents/RadioButton/types.js.map +1 -0
- package/build/main//321/201omponents/ScrollBar/ScrollBar.d.ts +5 -0
- package/build/main//321/201omponents/ScrollBar/ScrollBar.js +138 -0
- package/build/main//321/201omponents/ScrollBar/ScrollBar.js.map +1 -0
- package/build/main//321/201omponents/ScrollBar/index.d.ts +1 -0
- package/build/main//321/201omponents/ScrollBar/index.js +2 -0
- package/build/main//321/201omponents/ScrollBar/index.js.map +1 -0
- package/build/main//321/201omponents/ScrollBar/types.d.ts +23 -0
- package/build/main//321/201omponents/ScrollBar/types.js +2 -0
- package/build/main//321/201omponents/ScrollBar/types.js.map +1 -0
- package/build/main//321/201omponents/Skeleton/Skeleton.d.ts +4 -0
- package/build/main//321/201omponents/Skeleton/Skeleton.js +59 -0
- package/build/main//321/201omponents/Skeleton/Skeleton.js.map +1 -0
- package/build/main//321/201omponents/Skeleton/index.d.ts +1 -0
- package/build/main//321/201omponents/Skeleton/index.js +2 -0
- package/build/main//321/201omponents/Skeleton/index.js.map +1 -0
- package/build/main//321/201omponents/Skeleton/types.d.ts +17 -0
- package/build/main//321/201omponents/Skeleton/types.js +2 -0
- package/build/main//321/201omponents/Skeleton/types.js.map +1 -0
- package/build/main//321/201omponents/Stories/Stories.d.ts +4 -0
- package/build/main//321/201omponents/Stories/Stories.js +300 -0
- package/build/main//321/201omponents/Stories/Stories.js.map +1 -0
- package/build/main//321/201omponents/Stories/index.d.ts +1 -0
- package/build/main//321/201omponents/Stories/index.js +2 -0
- package/build/main//321/201omponents/Stories/index.js.map +1 -0
- package/build/main//321/201omponents/Stories/types.d.ts +70 -0
- package/build/main//321/201omponents/Stories/types.js +16 -0
- package/build/main//321/201omponents/Stories/types.js.map +1 -0
- package/build/main//321/201omponents/Switcher/Switcher.d.ts +4 -0
- package/build/main//321/201omponents/Switcher/Switcher.js +34 -0
- package/build/main//321/201omponents/Switcher/Switcher.js.map +1 -0
- package/build/main//321/201omponents/Switcher/index.d.ts +1 -0
- package/build/main//321/201omponents/Switcher/index.js +2 -0
- package/build/main//321/201omponents/Switcher/index.js.map +1 -0
- package/build/main//321/201omponents/Switcher/types.d.ts +8 -0
- package/build/main//321/201omponents/Switcher/types.js +2 -0
- package/build/main//321/201omponents/Switcher/types.js.map +1 -0
- package/build/main//321/201omponents/SyncLoader/SyncLoader.d.ts +5 -0
- package/build/main//321/201omponents/SyncLoader/SyncLoader.js +65 -0
- package/build/main//321/201omponents/SyncLoader/SyncLoader.js.map +1 -0
- package/build/main//321/201omponents/SyncLoader/index.d.ts +1 -0
- package/build/main//321/201omponents/SyncLoader/index.js +2 -0
- package/build/main//321/201omponents/SyncLoader/index.js.map +1 -0
- package/build/main//321/201omponents/SyncLoader/types.d.ts +9 -0
- package/build/main//321/201omponents/SyncLoader/types.js +2 -0
- package/build/main//321/201omponents/SyncLoader/types.js.map +1 -0
- package/build/main//321/201omponents/Textarea/Textarea.d.ts +4 -0
- package/build/main//321/201omponents/Textarea/Textarea.js +96 -0
- package/build/main//321/201omponents/Textarea/Textarea.js.map +1 -0
- package/build/main//321/201omponents/Textarea/index.d.ts +1 -0
- package/build/main//321/201omponents/Textarea/index.js +2 -0
- package/build/main//321/201omponents/Textarea/index.js.map +1 -0
- package/build/main//321/201omponents/Textarea/types.d.ts +12 -0
- package/build/main//321/201omponents/Textarea/types.js +2 -0
- package/build/main//321/201omponents/Textarea/types.js.map +1 -0
- package/build/main//321/201omponents/Toggle/Toggle.d.ts +4 -0
- package/build/main//321/201omponents/Toggle/Toggle.js +38 -0
- package/build/main//321/201omponents/Toggle/Toggle.js.map +1 -0
- package/build/main//321/201omponents/Toggle/index.d.ts +1 -0
- package/build/main//321/201omponents/Toggle/index.js +2 -0
- package/build/main//321/201omponents/Toggle/index.js.map +1 -0
- package/build/main//321/201omponents/Toggle/types.d.ts +12 -0
- package/build/main//321/201omponents/Toggle/types.js +2 -0
- package/build/main//321/201omponents/Toggle/types.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +32 -0
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +82 -0
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +23 -0
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +130 -0
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +3 -0
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +97 -0
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/Option/Option.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/Option/Option.js +93 -0
- package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.d.ts +4 -0
- package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js +43 -0
- package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +5 -0
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js +484 -0
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/constants.d.ts +7 -0
- package/build/main//321/201omponents/UserDropdown/constants.js +9 -0
- package/build/main//321/201omponents/UserDropdown/constants.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/helpers.d.ts +98 -0
- package/build/main//321/201omponents/UserDropdown/helpers.js +146 -0
- package/build/main//321/201omponents/UserDropdown/helpers.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/index.d.ts +1 -0
- package/build/main//321/201omponents/UserDropdown/index.js +2 -0
- package/build/main//321/201omponents/UserDropdown/index.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +15 -0
- package/build/main//321/201omponents/UserDropdown/selectStyles.js +80 -0
- package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/types.d.ts +251 -0
- package/build/main//321/201omponents/UserDropdown/types.js +9 -0
- package/build/main//321/201omponents/UserDropdown/types.js.map +1 -0
- package/build/main//321/201omponents/types.d.ts +2 -0
- package/build/main//321/201omponents/types.js +2 -0
- package/build/main//321/201omponents/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
14
|
+
import classNames from 'classnames';
|
|
15
|
+
import Avatar from '../Avatar';
|
|
16
|
+
import ContextMenu from '../ContextMenu';
|
|
17
|
+
import Loader from '../Loader';
|
|
18
|
+
import { useLongTap } from '../../hooks/useLongTap';
|
|
19
|
+
import { generateAvatarIcon, generateColor, isWebPlatform, renderUserIcon } from '../../helpers';
|
|
20
|
+
import { COLOR_CHIP, COLORS, FIT_CONTENT, PLATFORM } from '../../constants';
|
|
21
|
+
import { USER_TYPES } from '../UserDropdown/constants';
|
|
22
|
+
import { AVATAR_SIZES } from '../Avatar/types';
|
|
23
|
+
import { ReactComponent as LoaderIcon } from '../../assets/icons/avatar-loader.svg';
|
|
24
|
+
import { ReactComponent as DeleteIcon } from '../../assets/icons/delete-chip.svg';
|
|
25
|
+
import '../../styles/styles.scss';
|
|
26
|
+
var CHIP_HEIGHT = 32;
|
|
27
|
+
var CONTEXT_MENU_INDENT_TOP = 4;
|
|
28
|
+
var CONTEXT_MENU_INDENT = CHIP_HEIGHT + CONTEXT_MENU_INDENT_TOP;
|
|
29
|
+
var OPACITY_VALUES;
|
|
30
|
+
(function (OPACITY_VALUES) {
|
|
31
|
+
OPACITY_VALUES[OPACITY_VALUES["default"] = 1] = "default";
|
|
32
|
+
OPACITY_VALUES[OPACITY_VALUES["loading"] = 0.3] = "loading";
|
|
33
|
+
})(OPACITY_VALUES || (OPACITY_VALUES = {}));
|
|
34
|
+
var generateLoaderStyles = function () { return ({ background: 'none', width: '24px', height: '24px' }); };
|
|
35
|
+
var Chip = function (_a) {
|
|
36
|
+
var name = _a.name, email = _a.email, avatar = _a.avatar, _b = _a.isAvatarHidden, isAvatarHidden = _b === void 0 ? false : _b, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isError, isError = _d === void 0 ? false : _d, _e = _a.isLoading, isLoading = _e === void 0 ? false : _e, _f = _a.isWarning, isWarning = _f === void 0 ? false : _f, _g = _a.userType, userType = _g === void 0 ? USER_TYPES.user : _g, _h = _a.isEye, isEye = _h === void 0 ? false : _h, isMyContacts = _a.isMyContacts, contextMenuItems = _a.contextMenuItems, className = _a.className, styles = _a.styles, iconColor = _a.iconColor, _j = _a.platform, platform = _j === void 0 ? PLATFORM.web : _j, onDelete = _a.onDelete;
|
|
37
|
+
var _k = useState(false), isOpenContextMenu = _k[0], setIsOpenContextMenu = _k[1];
|
|
38
|
+
var isChipDisabled = isError ? false : isDisabled;
|
|
39
|
+
var chipRef = useRef(null);
|
|
40
|
+
useEffect(function () {
|
|
41
|
+
window.addEventListener('mouseup', handleMouseUp);
|
|
42
|
+
return function () {
|
|
43
|
+
window.removeEventListener('mouseup', handleMouseUp);
|
|
44
|
+
};
|
|
45
|
+
}, []);
|
|
46
|
+
var handleMouseDown = function () { var _a; return (_a = chipRef.current) === null || _a === void 0 ? void 0 : _a.classList.add('smartapp-chip__pressed'); };
|
|
47
|
+
var handleMouseUp = function () { var _a; return (_a = chipRef.current) === null || _a === void 0 ? void 0 : _a.classList.remove('smartapp-chip__pressed'); };
|
|
48
|
+
var handleDeleteClick = function (e) {
|
|
49
|
+
e.stopPropagation();
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
!isLoading && (onDelete === null || onDelete === void 0 ? void 0 : onDelete(name));
|
|
52
|
+
};
|
|
53
|
+
var handleOpenContextMenu = useCallback(function () { return setIsOpenContextMenu(true); }, []);
|
|
54
|
+
var handleCloseContextMenu = function () { return setIsOpenContextMenu(false); };
|
|
55
|
+
var setContextMenuPosition = useCallback(function () {
|
|
56
|
+
var _a;
|
|
57
|
+
var _b = ((_a = chipRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || {}, _c = _b.left, left = _c === void 0 ? 0 : _c, _d = _b.top, top = _d === void 0 ? 0 : _d;
|
|
58
|
+
return { x: left, y: top + CONTEXT_MENU_INDENT };
|
|
59
|
+
}, [chipRef]);
|
|
60
|
+
var _l = useLongTap({ onLongTap: handleOpenContextMenu }), cancelPressTimer = _l.cancelPressTimer, startPressTimer = _l.startPressTimer;
|
|
61
|
+
var handleContextMenu = function (event) {
|
|
62
|
+
if (!isWebPlatform(platform))
|
|
63
|
+
return;
|
|
64
|
+
event.preventDefault();
|
|
65
|
+
handleOpenContextMenu();
|
|
66
|
+
};
|
|
67
|
+
var contextMenuHeader = (_jsxs("div", __assign({ className: "smartapp-chip__context-menu-header" }, { children: [_jsx(Avatar, { username: name, avatar: avatar, size: AVATAR_SIZES.size_32, isEye: isEye, outlineDefaultBackground: COLOR_CHIP }), _jsxs("div", __assign({ className: "smartapp-chip__context-menu-header__content" }, { children: [_jsxs("div", __assign({ className: "smartapp-chip__context-menu-header__content--name" }, { children: [_jsx("div", { children: renderUserIcon(isMyContacts) }), _jsx("span", { children: name })] })), _jsx("div", __assign({ className: "smartapp-chip__context-menu-header__content--email" }, { children: email }))] }))] })));
|
|
68
|
+
return (_jsxs("div", __assign({ ref: chipRef, className: classNames('smartapp-chip', { 'smartapp-chip__error': isError, 'smartapp-chip__disabled': isChipDisabled, 'smartapp-chip__loading': isLoading }, className), style: styles, onContextMenu: handleContextMenu, onTouchStart: !isOpenContextMenu ? startPressTimer : undefined, onTouchEnd: cancelPressTimer, onTouchMove: cancelPressTimer }, { children: [_jsxs("div", __assign({ className: "smartapp-chip__info" }, { children: [!isAvatarHidden && !isError && (_jsx("div", __assign({ className: "smartapp-chip__info--avatar" }, { children: isLoading ? (_jsx(Loader, { icon: _jsx(LoaderIcon, {}), color: COLORS.iconAccent, isLoader: true, iconSize: AVATAR_SIZES.size_24, containerStyles: generateLoaderStyles(), isFullScreen: false })) : (_jsx(Avatar, { icon: generateAvatarIcon(userType), username: name, isWarning: isWarning, avatar: avatar, size: AVATAR_SIZES.size_24, isEye: isEye, outlineDefaultBackground: COLOR_CHIP })) }))), _jsx("p", __assign({ className: classNames('smartapp-chip__info--name', { 'smartapp-chip__info--name__loading': isLoading }) }, { children: name }))] })), !isChipDisabled && onDelete && (_jsx("div", __assign({ className: "smartapp-chip__delete-icon", onClick: handleDeleteClick, onMouseDown: handleMouseDown }, { children: _jsx(DeleteIcon, { style: {
|
|
69
|
+
color: generateColor(iconColor, isError ? COLORS.red : COLORS.darkerGray),
|
|
70
|
+
opacity: isLoading ? OPACITY_VALUES.loading : OPACITY_VALUES.default,
|
|
71
|
+
} }) }))), contextMenuItems && (_jsx(ContextMenu, { isMenuOpen: isOpenContextMenu, position: setContextMenuPosition(), closeMenu: handleCloseContextMenu, items: contextMenuItems, actionData: email || name, topSlot: contextMenuHeader, menuStyles: { width: FIT_CONTENT } }))] })));
|
|
72
|
+
};
|
|
73
|
+
export default Chip;
|
|
74
|
+
//# sourceMappingURL=Chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../../src/сomponents/Chip/Chip.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,WAAW,MAAM,gBAAgB,CAAA;AACxC,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9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KAAK,EAAE,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;wBACzE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO;qBACrE,GACD,IACE,CACP,EACA,gBAAgB,IAAI,CACnB,KAAC,WAAW,IACV,UAAU,EAAE,iBAAiB,EAC7B,QAAQ,EAAE,sBAAsB,EAAE,EAClC,SAAS,EAAE,sBAAsB,EACjC,KAAK,EAAE,gBAAgB,EACvB,UAAU,EAAE,KAAK,IAAI,IAAI,EACzB,OAAO,EAAE,iBAAiB,EAC1B,UAAU,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,GAClC,CACH,KACG,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Chip';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Chip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ICommonProps, TStyles } from '../../constants';
|
|
2
|
+
import { USER_TYPES } from '../UserDropdown/constants';
|
|
3
|
+
import { MenuItem } from '../ContextMenu/types';
|
|
4
|
+
export interface IChipProps extends ICommonProps {
|
|
5
|
+
name: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
avatar?: string;
|
|
8
|
+
isAvatarHidden?: boolean;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
isError?: boolean;
|
|
11
|
+
isWarning?: boolean;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
isEye?: boolean;
|
|
14
|
+
isMyContacts?: boolean;
|
|
15
|
+
userType?: USER_TYPES;
|
|
16
|
+
className?: string;
|
|
17
|
+
styles?: TStyles;
|
|
18
|
+
iconColor?: string;
|
|
19
|
+
contextMenuItems?: MenuItem[];
|
|
20
|
+
onDelete?: (name?: string) => void;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Chip/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IConfirmationModalProps } from './types';
|
|
2
|
+
import '../../styles/styles.scss';
|
|
3
|
+
declare const ConfirmationModal: ({ isModalOpen, isClosableOutside, isConfirmLoading, isCancelLoading, isCloseIconHidden, title, text, cancelButtonName, confirmButtonName, cancelButtonFunction, confirmButtonFunction, handleCloseModal, platform, popupClassName, className, popupStyles, styles, titleStyles, iconColor, backgroundColor, buttonsDirection, isBottomSheet, isDisabledBottomSheet, bottomSheetProps, }: IConfirmationModalProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
export default ConfirmationModal;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useEffect, useRef } from 'react';
|
|
14
|
+
import classNames from 'classnames';
|
|
15
|
+
import Button from '../Button';
|
|
16
|
+
import { TButtonVariant } from '../Button/types';
|
|
17
|
+
import { PLATFORM, MODAL_BUTTONS_DIRECTION, ROW } from '../../constants';
|
|
18
|
+
import { checkIfContentIsCentered, generateClassNames, generateColor, generateIsCloseIconHidden, generateBottomSheetClassName } from '../../helpers';
|
|
19
|
+
import { ReactComponent as CloseIcon } from '../../assets/icons/cancel-cross.svg';
|
|
20
|
+
import { useModal } from '../../hooks/useModal';
|
|
21
|
+
import '../../styles/styles.scss';
|
|
22
|
+
var COLUMN_REVERSE = 'column-reverse';
|
|
23
|
+
var ConfirmationModal = function (_a) {
|
|
24
|
+
var isModalOpen = _a.isModalOpen, _b = _a.isClosableOutside, isClosableOutside = _b === void 0 ? true : _b, _c = _a.isConfirmLoading, isConfirmLoading = _c === void 0 ? false : _c, _d = _a.isCancelLoading, isCancelLoading = _d === void 0 ? false : _d, isCloseIconHidden = _a.isCloseIconHidden, title = _a.title, text = _a.text, cancelButtonName = _a.cancelButtonName, confirmButtonName = _a.confirmButtonName, cancelButtonFunction = _a.cancelButtonFunction, confirmButtonFunction = _a.confirmButtonFunction, handleCloseModal = _a.handleCloseModal, _e = _a.platform, platform = _e === void 0 ? PLATFORM.web : _e, popupClassName = _a.popupClassName, className = _a.className, popupStyles = _a.popupStyles, styles = _a.styles, titleStyles = _a.titleStyles, iconColor = _a.iconColor, backgroundColor = _a.backgroundColor, _f = _a.buttonsDirection, buttonsDirection = _f === void 0 ? MODAL_BUTTONS_DIRECTION.row : _f, _g = _a.isBottomSheet, isBottomSheet = _g === void 0 ? false : _g, _h = _a.isDisabledBottomSheet, isDisabledBottomSheet = _h === void 0 ? false : _h, bottomSheetProps = _a.bottomSheetProps;
|
|
25
|
+
var ref = useRef(null);
|
|
26
|
+
var titleRef = useRef(null);
|
|
27
|
+
var textRef = useRef(null);
|
|
28
|
+
var btnsContainerDirection = buttonsDirection === MODAL_BUTTONS_DIRECTION.row ? ROW : COLUMN_REVERSE;
|
|
29
|
+
var isCloseIconInvisible = generateIsCloseIconHidden(platform, isCloseIconHidden);
|
|
30
|
+
var cancelFunction = handleCloseModal || cancelButtonFunction;
|
|
31
|
+
var _j = useModal({
|
|
32
|
+
isModalOpen: isModalOpen,
|
|
33
|
+
platform: platform,
|
|
34
|
+
isDisabledBottomSheet: isDisabledBottomSheet,
|
|
35
|
+
initialIsBottomSheet: isBottomSheet,
|
|
36
|
+
modalRef: ref,
|
|
37
|
+
isClosableOutside: isClosableOutside,
|
|
38
|
+
handleCloseModal: cancelFunction,
|
|
39
|
+
popupClassName: classNames('confirmation-modal', popupClassName),
|
|
40
|
+
popupStyles: popupStyles,
|
|
41
|
+
bottomSheetProps: bottomSheetProps,
|
|
42
|
+
}), shouldUseBottomSheet = _j.shouldUseBottomSheet, renderModal = _j.renderModal;
|
|
43
|
+
var additionalClassName = generateBottomSheetClassName(platform, shouldUseBottomSheet);
|
|
44
|
+
useEffect(function () {
|
|
45
|
+
document.documentElement.style.setProperty('--confirmation-modal-background', generateColor(backgroundColor));
|
|
46
|
+
}, [backgroundColor]);
|
|
47
|
+
useEffect(function () {
|
|
48
|
+
var checkIfClickedOutside = function (e) {
|
|
49
|
+
if (isModalOpen && isClosableOutside && ref.current && !ref.current.contains(e.target)) {
|
|
50
|
+
cancelFunction();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
document === null || document === void 0 ? void 0 : document.addEventListener('click', checkIfClickedOutside, true);
|
|
54
|
+
return function () {
|
|
55
|
+
document === null || document === void 0 ? void 0 : document.removeEventListener('click', checkIfClickedOutside, true);
|
|
56
|
+
};
|
|
57
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
58
|
+
}, [isModalOpen, isClosableOutside]);
|
|
59
|
+
var renderCloseIconSpace = function (_a) {
|
|
60
|
+
var elementRef = _a.elementRef, _b = _a.isContent, isContent = _b === void 0 ? false : _b;
|
|
61
|
+
return (_jsx("div", { className: classNames('close-icon-space', {
|
|
62
|
+
'close-icon-space__content': isContent,
|
|
63
|
+
'close-icon-space__centered': checkIfContentIsCentered(elementRef),
|
|
64
|
+
}) }));
|
|
65
|
+
};
|
|
66
|
+
var modalContent = (_jsx("div", __assign({ ref: ref, className: classNames('smartapp-confirmation-modal', { 'smartapp-confirmation-modal__bottom-sheet': shouldUseBottomSheet }, className), style: styles }, { children: _jsxs("div", __assign({ className: generateClassNames({ className: 'smartapp-confirmation-modal__content', delimiter: '--', additionalClassName: additionalClassName }) }, { children: [title && (_jsxs("div", { children: [!isCloseIconInvisible && renderCloseIconSpace({ elementRef: titleRef }), _jsx("p", __assign({ ref: titleRef, className: "smartapp-confirmation-modal__content--title", style: titleStyles }, { children: title }))] })), !isCloseIconInvisible && (_jsx("div", __assign({ onClick: cancelFunction, className: "smartapp-confirmation-modal__content--close-icon" }, { children: _jsx(CloseIcon, { style: { color: generateColor(iconColor) } }) }))), _jsxs("div", { children: [!title && !isCloseIconInvisible && renderCloseIconSpace({ elementRef: textRef, isContent: true }), _jsx("span", __assign({ ref: textRef, className: "smartapp-confirmation-modal__content--text" }, { children: text }))] }), _jsxs("div", __assign({ style: { flexDirection: btnsContainerDirection }, className: "smartapp-confirmation-modal__content--buttons" }, { children: [cancelButtonName && (_jsx(Button, { title: cancelButtonName, isWaitingResponse: isCancelLoading, variant: TButtonVariant.secondary, onClick: cancelButtonFunction, disabled: isConfirmLoading })), _jsx(Button, { isWaitingResponse: isConfirmLoading, title: confirmButtonName, onClick: confirmButtonFunction, disabled: isCancelLoading })] }))] })) })));
|
|
67
|
+
return renderModal(modalContent);
|
|
68
|
+
};
|
|
69
|
+
export default ConfirmationModal;
|
|
70
|
+
//# sourceMappingURL=ConfirmationModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmationModal.js","sourceRoot":"","sources":["../../../../src/сomponents/ConfirmationModal/ConfirmationModal.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAa,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC3D,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,OAAO,EAAE,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AAC,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAClG,wBAAM,GAAG,EAAE,OAAO,EAAE,SAAS,EAAC,4CAA4C,gBACvE,IAAI,IACA,IACH,EACN,wBAAK,KAAK,EAAE,EAAE,aAAa,EAAE,sBAAsB,EAAE,EAAE,SAAS,EAAC,+CAA+C,iBAC7G,gBAAgB,IAAI,CACnB,KAAC,MAAM,IACL,KAAK,EAAE,gBAAgB,EACvB,iBAAiB,EAAE,eAAe,EAClC,OAAO,EAAE,cAAc,CAAC,SAAS,EACjC,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,gBAAgB,GAC1B,CACH,EACD,KAAC,MAAM,IAAC,iBAAiB,EAAE,gBAAgB,EAAE,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,eAAe,GAAI,KAChI,KACF,IACF,CACP,CAAA;IAED,OAAO,WAAW,CAAC,YAAY,CAAC,CAAA;AAClC,CAAC,CAAA;AAED,eAAe,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ConfirmationModal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/ConfirmationModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BottomSheetProps } from 'alex.chus-react-spring-bottom-sheet';
|
|
3
|
+
import { ICommonProps, TStyles } from '../../constants';
|
|
4
|
+
export interface IConfirmationModalProps extends ICommonProps {
|
|
5
|
+
isModalOpen: boolean;
|
|
6
|
+
isClosableOutside?: boolean;
|
|
7
|
+
isCloseIconHidden?: boolean;
|
|
8
|
+
isConfirmLoading?: boolean;
|
|
9
|
+
isCancelLoading?: boolean;
|
|
10
|
+
title?: string;
|
|
11
|
+
text: ReactNode;
|
|
12
|
+
cancelButtonName?: string;
|
|
13
|
+
confirmButtonName: string;
|
|
14
|
+
cancelButtonFunction: () => void;
|
|
15
|
+
confirmButtonFunction: (option?: any) => void;
|
|
16
|
+
handleCloseModal?: () => void;
|
|
17
|
+
popupClassName?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
popupStyles?: TStyles;
|
|
20
|
+
styles?: TStyles;
|
|
21
|
+
titleStyles?: TStyles;
|
|
22
|
+
iconColor?: string;
|
|
23
|
+
backgroundColor?: string;
|
|
24
|
+
buttonsDirection?: 'row' | 'column';
|
|
25
|
+
isBottomSheet?: boolean;
|
|
26
|
+
isDisabledBottomSheet?: boolean;
|
|
27
|
+
bottomSheetProps?: Partial<BottomSheetProps>;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/ConfirmationModal/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IContextMenuProps } from './types';
|
|
2
|
+
import '../../styles/styles.scss';
|
|
3
|
+
declare const ContextMenu: <T>({ isMenuOpen, isClickForbidden, isCloseOnItemClick, position: { x, y }, menuWidth, containerClassName, menuClassName, itemClassName, containerStyles, menuStyles, itemStyles, items, closeMenu, platform, actionData, topSlot, }: IContextMenuProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
export default ContextMenu;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useLayoutEffect, useRef, useState } from 'react';
|
|
14
|
+
import classNames from 'classnames';
|
|
15
|
+
import Checkbox from '../Checkbox';
|
|
16
|
+
import { generateId, isWebPlatform } from '../../helpers';
|
|
17
|
+
import { CONTEXT_MENU_SAFE_SPACE, FIT_CONTENT, PLATFORM } from '../../constants';
|
|
18
|
+
import '../../styles/styles.scss';
|
|
19
|
+
var ContextMenu = function (_a) {
|
|
20
|
+
var _b;
|
|
21
|
+
var isMenuOpen = _a.isMenuOpen, _c = _a.isClickForbidden, isClickForbidden = _c === void 0 ? false : _c, _d = _a.isCloseOnItemClick, isCloseOnItemClick = _d === void 0 ? true : _d, _e = _a.position, x = _e.x, y = _e.y, menuWidth = _a.menuWidth, containerClassName = _a.containerClassName, menuClassName = _a.menuClassName, itemClassName = _a.itemClassName, containerStyles = _a.containerStyles, _f = _a.menuStyles, menuStyles = _f === void 0 ? {} : _f, _g = _a.itemStyles, itemStyles = _g === void 0 ? {} : _g, items = _a.items, closeMenu = _a.closeMenu, _h = _a.platform, platform = _h === void 0 ? PLATFORM.web : _h, actionData = _a.actionData, topSlot = _a.topSlot;
|
|
22
|
+
var elementRef = useRef(null);
|
|
23
|
+
var _j = useState(0), contextMenuWidth = _j[0], setContextMenuWidth = _j[1];
|
|
24
|
+
var _k = useState(((_b = elementRef === null || elementRef === void 0 ? void 0 : elementRef.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) || 0), contextMenuHeight = _k[0], setContextMenuHeight = _k[1];
|
|
25
|
+
var clientHeight = document.documentElement.clientHeight;
|
|
26
|
+
var clientWidth = document.documentElement.clientWidth;
|
|
27
|
+
var handleContextMenu = function (event) {
|
|
28
|
+
event.preventDefault();
|
|
29
|
+
!isClickForbidden && closeMenu();
|
|
30
|
+
};
|
|
31
|
+
var handleMenuItemClick = function (action) { return !isClickForbidden && action(actionData); };
|
|
32
|
+
var handleMenuClose = function (_a) {
|
|
33
|
+
var event = _a.event, _b = _a.isItemClick, isItemClick = _b === void 0 ? true : _b;
|
|
34
|
+
event.stopPropagation();
|
|
35
|
+
if (isItemClick && !isCloseOnItemClick)
|
|
36
|
+
return;
|
|
37
|
+
if (!isClickForbidden)
|
|
38
|
+
closeMenu();
|
|
39
|
+
};
|
|
40
|
+
var handleSortItems = function (_a, _b) {
|
|
41
|
+
var isFixedA = _a.isFixedUnderLine;
|
|
42
|
+
var isFixedB = _b.isFixedUnderLine;
|
|
43
|
+
return Number(!!isFixedA) - Number(!!isFixedB);
|
|
44
|
+
};
|
|
45
|
+
useLayoutEffect(function () {
|
|
46
|
+
var elementRefCurrent = elementRef.current;
|
|
47
|
+
if (elementRefCurrent) {
|
|
48
|
+
var offsetHeight = elementRefCurrent.offsetHeight;
|
|
49
|
+
var width = elementRefCurrent.getBoundingClientRect().width;
|
|
50
|
+
setContextMenuHeight(offsetHeight);
|
|
51
|
+
setContextMenuWidth(menuWidth || width);
|
|
52
|
+
}
|
|
53
|
+
}, [isMenuOpen, menuWidth]);
|
|
54
|
+
var renderMenuItemIcon = function (icon) { return icon && _jsx("div", __assign({ className: "smartapp-context-menu__item--content__icon" }, { children: icon })); };
|
|
55
|
+
var sortedContextMenuItems = items.sort(handleSortItems);
|
|
56
|
+
var firstIndexUnderLine = sortedContextMenuItems.findIndex(function (_a) {
|
|
57
|
+
var isFixedUnderLine = _a.isFixedUnderLine;
|
|
58
|
+
return isFixedUnderLine;
|
|
59
|
+
});
|
|
60
|
+
var contextMenuItems = sortedContextMenuItems.map(function (_a, index) {
|
|
61
|
+
var _b = _a.isNegativeAction, isNegativeAction = _b === void 0 ? false : _b, _c = _a.isSelected, isSelected = _c === void 0 ? false : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isWithCheckbox, isWithCheckbox = _e === void 0 ? false : _e, _f = _a.isChecked, isChecked = _f === void 0 ? false : _f, _g = _a.isFixedUnderLine, isFixedUnderLine = _g === void 0 ? false : _g, _h = _a.className, className = _h === void 0 ? '' : _h, title = _a.title, icon = _a.icon, action = _a.action;
|
|
62
|
+
return (_jsxs("button", __assign({ className: classNames('smartapp-context-menu__item', {
|
|
63
|
+
'smartapp-context-menu__item--checkbox': isWithCheckbox,
|
|
64
|
+
'smartapp-context-menu__item--negative': isNegativeAction,
|
|
65
|
+
'smartapp-context-menu__item--selected': isSelected,
|
|
66
|
+
'smartapp-context-menu__item--disabled': isDisabled,
|
|
67
|
+
'smartapp-context-menu__item--fixed-under-line': isFixedUnderLine && index === firstIndexUnderLine,
|
|
68
|
+
'smartapp-context-menu__item--hover': isWebPlatform(platform) && !isWithCheckbox,
|
|
69
|
+
}, itemClassName, className), disabled: isDisabled, style: itemStyles, onClick: function () { return handleMenuItemClick(action); } }, { children: [_jsxs("div", __assign({ className: classNames('smartapp-context-menu__item--content', {
|
|
70
|
+
'smartapp-context-menu__item--content__fixed-under-line': isFixedUnderLine,
|
|
71
|
+
'smartapp-context-menu__item--checkbox__content': isWithCheckbox,
|
|
72
|
+
'smartapp-context-menu__item--disabled__content': isDisabled,
|
|
73
|
+
}) }, { children: [!isFixedUnderLine && renderMenuItemIcon(icon), _jsx("span", { children: title }), isFixedUnderLine && renderMenuItemIcon(icon)] })), isWithCheckbox && _jsx(Checkbox, { id: generateId(), isChecked: isChecked, isDisabled: isDisabled })] }), title));
|
|
74
|
+
});
|
|
75
|
+
var contextMenuStyles = __assign({ top: y + contextMenuHeight > clientHeight ? clientHeight - contextMenuHeight - CONTEXT_MENU_SAFE_SPACE : y, left: x + contextMenuWidth > clientWidth ? clientWidth - contextMenuWidth - CONTEXT_MENU_SAFE_SPACE : x, width: contextMenuWidth || FIT_CONTENT }, menuStyles);
|
|
76
|
+
if (!isMenuOpen)
|
|
77
|
+
return null;
|
|
78
|
+
return (_jsx("div", __assign({ className: classNames('smartapp-context-menu', containerClassName), style: containerStyles, onClick: function (event) { return handleMenuClose({ event: event, isItemClick: false }); }, onContextMenu: handleContextMenu }, { children: _jsxs("div", __assign({ ref: elementRef, className: classNames('smartapp-context-menu__items', menuClassName), style: contextMenuStyles, onClick: function (event) { return handleMenuClose({ event: event }); } }, { children: [topSlot, contextMenuItems] })) })));
|
|
79
|
+
};
|
|
80
|
+
export default ContextMenu;
|
|
81
|
+
//# sourceMappingURL=ContextMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextMenu.js","sourceRoot":"","sources":["../../../../src/сomponents/ContextMenu/ContextMenu.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAgB,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC9E,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,QAAQ,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAEhF,OAAO,0BAA0B,CAAA;AAOjC,IAAM,WAAW,GAAG,UAAK,EAiBF;;QAhBrB,UAAU,gBAAA,EACV,wBAAwB,EAAxB,gBAAgB,mBAAG,KAAK,KAAA,EACxB,0BAAyB,EAAzB,kBAAkB,mBAAG,IAAI,KAAA,EACzB,gBAAkB,EAAN,CAAC,OAAA,EAAE,CAAC,OAAA,EAChB,SAAS,eAAA,EACT,kBAAkB,wBAAA,EAClB,aAAa,mBAAA,EACb,aAAa,mBAAA,EACb,eAAe,qBAAA,EACf,kBAAe,EAAf,UAAU,mBAAG,EAAE,KAAA,EACf,kBAAe,EAAf,UAAU,mBAAG,EAAE,KAAA,EACf,KAAK,WAAA,EACL,SAAS,eAAA,EACT,gBAAuB,EAAvB,QAAQ,mBAAG,QAAQ,CAAC,GAAG,KAAA,EACvB,UAAU,gBAAA,EACV,OAAO,aAAA;IAEP,IAAM,UAAU,GAAG,MAAM,CAAi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,UAAC,KAAK,IAAK,OAAA,eAAe,CAAC,EAAE,KAAK,OAAA,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,EAA9C,CAA8C,EAClE,aAAa,EAAE,iBAAiB,gBAEhC,wBACE,GAAG,EAAE,UAAU,EACf,SAAS,EAAE,UAAU,CAAC,8BAA8B,EAAE,aAAa,CAAC,EACpE,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,UAAC,KAAK,IAAK,OAAA,eAAe,CAAC,EAAE,KAAK,OAAA,EAAE,CAAC,EAA1B,CAA0B,iBAE7C,OAAO,EACP,gBAAgB,KACb,IACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ContextMenu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/ContextMenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { ICommonProps, TStyles } from '../../constants';
|
|
3
|
+
export type MenuItem<T extends unknown = any> = {
|
|
4
|
+
isNegativeAction?: boolean;
|
|
5
|
+
isSelected?: boolean;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
isWithCheckbox?: boolean;
|
|
8
|
+
isChecked?: boolean;
|
|
9
|
+
isFixedUnderLine?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
title: string;
|
|
12
|
+
action: (actionData?: T) => void;
|
|
13
|
+
icon?: ReactElement;
|
|
14
|
+
};
|
|
15
|
+
export interface IContextMenuProps<T extends unknown = any> extends ICommonProps {
|
|
16
|
+
isMenuOpen: boolean;
|
|
17
|
+
isCloseOnItemClick?: boolean;
|
|
18
|
+
isClickForbidden?: boolean;
|
|
19
|
+
position: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
};
|
|
23
|
+
menuWidth?: number;
|
|
24
|
+
containerClassName?: string;
|
|
25
|
+
menuClassName?: string;
|
|
26
|
+
itemClassName?: string;
|
|
27
|
+
containerStyles?: TStyles;
|
|
28
|
+
menuStyles?: TStyles;
|
|
29
|
+
itemStyles?: TStyles;
|
|
30
|
+
items: MenuItem[];
|
|
31
|
+
actionData?: T;
|
|
32
|
+
topSlot?: ReactNode;
|
|
33
|
+
closeMenu: () => void;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/ContextMenu/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ICustomSelectProps } from './types';
|
|
3
|
+
import '../../styles/styles.scss';
|
|
4
|
+
export declare const generateListItemTextRect: (menuListRef: React.RefObject<HTMLDivElement | null>, listItemTextRef: React.RefObject<HTMLDivElement | null>) => {
|
|
5
|
+
scrollWidth: number;
|
|
6
|
+
clientWidth: number;
|
|
7
|
+
left: number;
|
|
8
|
+
top: number;
|
|
9
|
+
maxWidth: number;
|
|
10
|
+
};
|
|
11
|
+
declare const CustomSelect: ({ isLoading, isSearchable, isCreatable, isDisabled, isOptionsWithTooltip, fillType, width, menuListMaxHeight, containerClassName, containerStyles, title, placeholder, hint, noOptionsMessage, error, menuPosition, menuLocation, defaultValue, options, onChange, onDisabledOptionClick, onMenuOpen, }: ICustomSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default CustomSelect;
|