@expressms/smartapp-ui 3.0.0-alpha.22 → 3.0.0-alpha.23
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/accepted-invite-status.svg +4 -0
- 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-arrow-down.svg +3 -0
- package/build/main/assets/icons/avatar-arrow-up.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/calendar-arrow-next.svg +3 -0
- package/build/main/assets/icons/calendar-arrow-prev.svg +3 -0
- package/build/main/assets/icons/check-mark-square.svg +4 -0
- package/build/main/assets/icons/check-mark.svg +4 -0
- package/build/main/assets/icons/chip-info.svg +5 -0
- package/build/main/assets/icons/clear.svg +3 -0
- package/build/main/assets/icons/close-modal.svg +3 -0
- package/build/main/assets/icons/close-stories.svg +4 -0
- package/build/main/assets/icons/close.svg +3 -0
- package/build/main/assets/icons/contact-info.svg +5 -0
- package/build/main/assets/icons/corporate-user.svg +3 -0
- package/build/main/assets/icons/crown.svg +5 -0
- package/build/main/assets/icons/declined-invite-status.svg +4 -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/doc-small.svg +11 -0
- package/build/main/assets/icons/doc.svg +11 -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 +5 -0
- package/build/main/assets/icons/eye-on.svg +4 -0
- package/build/main/assets/icons/file-small.svg +11 -0
- package/build/main/assets/icons/file.svg +11 -0
- package/build/main/assets/icons/global-address-book-user.svg +4 -0
- package/build/main/assets/icons/group.svg +3 -0
- package/build/main/assets/icons/indeterminate-check-mark-square.svg +4 -0
- package/build/main/assets/icons/info.svg +5 -0
- package/build/main/assets/icons/input-arrow-down.svg +3 -0
- package/build/main/assets/icons/input-arrow-up.svg +3 -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/more.svg +3 -0
- package/build/main/assets/icons/my-contacts-user.svg +3 -0
- package/build/main/assets/icons/needs-action-invite-status.svg +4 -0
- package/build/main/assets/icons/notification-close.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/order.svg +6 -0
- package/build/main/assets/icons/pdf-small.svg +11 -0
- package/build/main/assets/icons/pdf.svg +11 -0
- package/build/main/assets/icons/play-small.svg +3 -0
- package/build/main/assets/icons/play.svg +3 -0
- package/build/main/assets/icons/plus.svg +4 -0
- package/build/main/assets/icons/ppt-small.svg +11 -0
- package/build/main/assets/icons/ppt.svg +11 -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/txt-small.svg +11 -0
- package/build/main/assets/icons/txt.svg +11 -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/icons/xls-small.svg +11 -0
- package/build/main/assets/icons/xls.svg +11 -0
- package/build/main/assets/storybook/index.d.ts +24 -0
- package/build/main/assets/storybook/index.js +25 -0
- package/build/main/assets/storybook/index.js.map +1 -0
- package/build/main/constants/constants.d.ts +198 -0
- package/build/main/constants/constants.js +218 -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 +58 -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 +31 -0
- package/build/main/helpers/index.js +183 -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 +22 -0
- package/build/main/hooks/useModal.js +61 -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 +6 -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 +53 -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 +23 -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 +146 -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 +22 -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 +243 -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 +61 -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 +62 -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 +24 -0
- package/build/main//321/201omponents/Button/types.js +12 -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 +145 -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 +15 -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 +47 -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 +42 -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 +64 -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 +42 -0
- package/build/main//321/201omponents/Charts/constants.js +42 -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 +89 -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 +8 -0
- package/build/main//321/201omponents/Checkbox/Checkbox.js +48 -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 +14 -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 +118 -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 +28 -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 +63 -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 +248 -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 +70 -0
- package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -0
- package/build/main//321/201omponents/CustomSelect/types.d.ts +69 -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 +222 -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 +90 -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 +35 -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 +19 -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 +47 -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 +182 -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 +27 -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 +203 -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 +41 -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 +259 -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 +41 -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 +199 -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 +44 -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 +33 -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 +140 -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 +24 -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 +338 -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 +71 -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 +8 -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 +59 -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 +13 -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 +35 -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 +31 -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 +88 -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 +129 -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 +137 -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 +80 -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 +44 -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 +549 -0
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/constants.d.ts +8 -0
- package/build/main//321/201omponents/UserDropdown/constants.js +10 -0
- package/build/main//321/201omponents/UserDropdown/constants.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/helpers.d.ts +105 -0
- package/build/main//321/201omponents/UserDropdown/helpers.js +143 -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 +69 -0
- package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/types.d.ts +269 -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,61 @@
|
|
|
1
|
+
import { ReactElement, ReactNode, RefObject } from 'react';
|
|
2
|
+
import { IFontFamilyProps, ILanguageProps, IThemeProps, TStyles } from '../../constants';
|
|
3
|
+
export interface IAvatarProps extends IThemeProps, IFontFamilyProps, ILanguageProps {
|
|
4
|
+
avatarRef?: RefObject<HTMLDivElement | null>;
|
|
5
|
+
className?: string;
|
|
6
|
+
styles?: TStyles;
|
|
7
|
+
isSelected?: boolean;
|
|
8
|
+
isHighlighted?: boolean;
|
|
9
|
+
isInactive?: boolean;
|
|
10
|
+
isSpam?: boolean;
|
|
11
|
+
isCrown?: boolean;
|
|
12
|
+
isWarning?: boolean;
|
|
13
|
+
isEye?: boolean;
|
|
14
|
+
isTooltipAvailableOnEye?: boolean;
|
|
15
|
+
size?: 16 | 20 | 24 | 32 | 36 | 40 | 44 | 48 | 56 | 64 | 80 | 100 | 160 | 200;
|
|
16
|
+
username?: string;
|
|
17
|
+
initials?: string;
|
|
18
|
+
avatar?: ReactElement | string | null;
|
|
19
|
+
counter?: number;
|
|
20
|
+
inviteStatus?: 'accepted' | 'declined' | 'needsAction';
|
|
21
|
+
icon?: ReactNode;
|
|
22
|
+
outlineDefaultBackground?: string;
|
|
23
|
+
outlineDarkBackground?: string;
|
|
24
|
+
onClick?: () => void;
|
|
25
|
+
onMouseDown?: () => void;
|
|
26
|
+
}
|
|
27
|
+
export declare enum AVATAR_SIZES {
|
|
28
|
+
size_16 = 16,
|
|
29
|
+
size_20 = 20,
|
|
30
|
+
size_24 = 24,
|
|
31
|
+
size_32 = 32,
|
|
32
|
+
size_36 = 36,
|
|
33
|
+
size_40 = 40,
|
|
34
|
+
size_44 = 44,
|
|
35
|
+
size_48 = 48,
|
|
36
|
+
size_56 = 56,
|
|
37
|
+
size_64 = 64,
|
|
38
|
+
size_80 = 80,
|
|
39
|
+
size_100 = 100,
|
|
40
|
+
size_160 = 160,
|
|
41
|
+
size_200 = 200
|
|
42
|
+
}
|
|
43
|
+
export declare enum AvatarFontSizes {
|
|
44
|
+
xSmall = "5px",
|
|
45
|
+
small = "10px",
|
|
46
|
+
normal = "14px",
|
|
47
|
+
medium = "18px",
|
|
48
|
+
large = "24px",
|
|
49
|
+
xLarge = "32px",
|
|
50
|
+
xxLarge = "42px",
|
|
51
|
+
xxxLarge = "48px"
|
|
52
|
+
}
|
|
53
|
+
export interface IUsernameAvatarColor {
|
|
54
|
+
degrees: number;
|
|
55
|
+
top: string;
|
|
56
|
+
topPercent: number;
|
|
57
|
+
middle?: string | null;
|
|
58
|
+
middlePercent?: number | null;
|
|
59
|
+
bottom: string;
|
|
60
|
+
bottomPercent: number;
|
|
61
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export var AVATAR_SIZES;
|
|
2
|
+
(function (AVATAR_SIZES) {
|
|
3
|
+
AVATAR_SIZES[AVATAR_SIZES["size_16"] = 16] = "size_16";
|
|
4
|
+
AVATAR_SIZES[AVATAR_SIZES["size_20"] = 20] = "size_20";
|
|
5
|
+
AVATAR_SIZES[AVATAR_SIZES["size_24"] = 24] = "size_24";
|
|
6
|
+
AVATAR_SIZES[AVATAR_SIZES["size_32"] = 32] = "size_32";
|
|
7
|
+
AVATAR_SIZES[AVATAR_SIZES["size_36"] = 36] = "size_36";
|
|
8
|
+
AVATAR_SIZES[AVATAR_SIZES["size_40"] = 40] = "size_40";
|
|
9
|
+
AVATAR_SIZES[AVATAR_SIZES["size_44"] = 44] = "size_44";
|
|
10
|
+
AVATAR_SIZES[AVATAR_SIZES["size_48"] = 48] = "size_48";
|
|
11
|
+
AVATAR_SIZES[AVATAR_SIZES["size_56"] = 56] = "size_56";
|
|
12
|
+
AVATAR_SIZES[AVATAR_SIZES["size_64"] = 64] = "size_64";
|
|
13
|
+
AVATAR_SIZES[AVATAR_SIZES["size_80"] = 80] = "size_80";
|
|
14
|
+
AVATAR_SIZES[AVATAR_SIZES["size_100"] = 100] = "size_100";
|
|
15
|
+
AVATAR_SIZES[AVATAR_SIZES["size_160"] = 160] = "size_160";
|
|
16
|
+
AVATAR_SIZES[AVATAR_SIZES["size_200"] = 200] = "size_200";
|
|
17
|
+
})(AVATAR_SIZES || (AVATAR_SIZES = {}));
|
|
18
|
+
export var AvatarFontSizes;
|
|
19
|
+
(function (AvatarFontSizes) {
|
|
20
|
+
AvatarFontSizes["xSmall"] = "5px";
|
|
21
|
+
AvatarFontSizes["small"] = "10px";
|
|
22
|
+
AvatarFontSizes["normal"] = "14px";
|
|
23
|
+
AvatarFontSizes["medium"] = "18px";
|
|
24
|
+
AvatarFontSizes["large"] = "24px";
|
|
25
|
+
AvatarFontSizes["xLarge"] = "32px";
|
|
26
|
+
AvatarFontSizes["xxLarge"] = "42px";
|
|
27
|
+
AvatarFontSizes["xxxLarge"] = "48px";
|
|
28
|
+
})(AvatarFontSizes || (AvatarFontSizes = {}));
|
|
29
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Avatar/types.ts"],"names":[],"mappings":"AA4BA,MAAM,CAAN,IAAY,YAeX;AAfD,WAAY,YAAY;IACtB,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,yDAAc,CAAA;IACd,yDAAc,CAAA;IACd,yDAAc,CAAA;AAChB,CAAC,EAfW,YAAY,KAAZ,YAAY,QAevB;AAED,MAAM,CAAN,IAAY,eASX;AATD,WAAY,eAAe;IACzB,iCAAc,CAAA;IACd,iCAAc,CAAA;IACd,kCAAe,CAAA;IACf,kCAAe,CAAA;IACf,iCAAc,CAAA;IACd,kCAAe,CAAA;IACf,mCAAgB,CAAA;IAChB,oCAAiB,CAAA;AACnB,CAAC,EATW,eAAe,KAAf,eAAe,QAS1B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IButtonProps } from './types';
|
|
2
|
+
import '../../styles/styles.scss';
|
|
3
|
+
declare const Button: ({ fontFamily, title, disabled, isDisabledClickable, isWaitingResponse, variant, appearance, icon, loaderIcon, width, className, styles, onClick, ...props }: IButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default Button;
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { useEffect, useRef } from 'react';
|
|
25
|
+
import classNames from 'classnames';
|
|
26
|
+
import { isEmpty, isNil } from 'lodash';
|
|
27
|
+
import { generateFontFamilyStyle } from '../../helpers';
|
|
28
|
+
import { FIT_CONTENT } from '../../constants';
|
|
29
|
+
import { TButtonAppearance, TButtonVariant } from './types';
|
|
30
|
+
import { ReactComponent as DefaultLoaderIcon } from '../../assets/icons/button-loader.svg';
|
|
31
|
+
import '../../styles/styles.scss';
|
|
32
|
+
var CONTENT_HIDDEN_CLASS_NAME = 'smartapp-button__content--hidden';
|
|
33
|
+
var Button = function (_a) {
|
|
34
|
+
var fontFamily = _a.fontFamily, title = _a.title, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.isDisabledClickable, isDisabledClickable = _c === void 0 ? false : _c, _d = _a.isWaitingResponse, isWaitingResponse = _d === void 0 ? false : _d, _e = _a.variant, variant = _e === void 0 ? TButtonVariant.primary : _e, _f = _a.appearance, appearance = _f === void 0 ? TButtonAppearance.accent : _f, icon = _a.icon, loaderIcon = _a.loaderIcon, _g = _a.width, width = _g === void 0 ? 100 : _g, className = _a.className, styles = _a.styles, onClick = _a.onClick, props = __rest(_a, ["fontFamily", "title", "disabled", "isDisabledClickable", "isWaitingResponse", "variant", "appearance", "icon", "loaderIcon", "width", "className", "styles", "onClick"]);
|
|
35
|
+
var contentRef = useRef(null);
|
|
36
|
+
var contentRefCurrent = contentRef.current;
|
|
37
|
+
var isTitleEmpty = isEmpty(title);
|
|
38
|
+
var isIconPassed = !isNil(icon);
|
|
39
|
+
var isButtonWithIconOnly = isTitleEmpty && isIconPassed;
|
|
40
|
+
var changeTransitionDelay = function (transitionDelay) { return contentRefCurrent && (contentRefCurrent.style.transitionDelay = "".concat(transitionDelay, "ms")); };
|
|
41
|
+
var handleButtonClick = function (event) { return (!disabled || (disabled && isDisabledClickable)) && (onClick === null || onClick === void 0 ? void 0 : onClick(event)); };
|
|
42
|
+
useEffect(function () {
|
|
43
|
+
if (isWaitingResponse) {
|
|
44
|
+
contentRefCurrent === null || contentRefCurrent === void 0 ? void 0 : contentRefCurrent.classList.add(CONTENT_HIDDEN_CLASS_NAME);
|
|
45
|
+
setTimeout(function () { return changeTransitionDelay(300); }, 150);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
contentRefCurrent === null || contentRefCurrent === void 0 ? void 0 : contentRefCurrent.classList.remove(CONTENT_HIDDEN_CLASS_NAME);
|
|
49
|
+
setTimeout(function () { return changeTransitionDelay(0); }, 150);
|
|
50
|
+
}
|
|
51
|
+
// eslint-disable-next-line
|
|
52
|
+
}, [isWaitingResponse]);
|
|
53
|
+
return (_jsxs("div", __assign({ className: classNames('smartapp-button', "smartapp-button__".concat(appearance), className), style: __assign({ width: isButtonWithIconOnly ? FIT_CONTENT : "".concat(width, "%") }, generateFontFamilyStyle(fontFamily)) }, { children: [_jsx("button", __assign({ className: classNames("smartapp-button__".concat(variant), "smartapp-button__".concat(variant, "--").concat(appearance), {
|
|
54
|
+
'smartapp-button__disabled': disabled,
|
|
55
|
+
'smartapp-button__with-icon': !isTitleEmpty && isIconPassed,
|
|
56
|
+
'smartapp-button__with-icon-only': isButtonWithIconOnly,
|
|
57
|
+
}), style: styles, disabled: disabled && !isDisabledClickable, onClick: handleButtonClick }, props, { children: _jsxs("div", __assign({ ref: contentRef, className: "smartapp-button__content" }, { children: [icon && _jsx("div", { children: icon }), title && _jsx("span", { children: title })] })) })), _jsx("div", __assign({ className: classNames('smartapp-button__loader', "smartapp-button__loader--".concat(variant), {
|
|
58
|
+
'smartapp-button__loader--hidden': !isWaitingResponse,
|
|
59
|
+
}) }, { children: loaderIcon || _jsx(DefaultLoaderIcon, {}) }))] })));
|
|
60
|
+
};
|
|
61
|
+
export default Button;
|
|
62
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/сomponents/Button/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAgB,iBAAiB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACzE,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AAC1F,OAAO,0BAA0B,CAAA;AAEjC,IAAM,yBAAyB,GAAG,kCAAkC,CAAA;AAEpE,IAAM,MAAM,GAAG,UAAC,EAeD;IAdb,IAAA,UAAU,gBAAA,EACV,KAAK,WAAA,EACL,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,2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
|
|
|
1
|
+
export { default } from './Button';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactElement } from 'react';
|
|
2
|
+
import { IFontFamilyProps, TStyles } from '../../constants';
|
|
3
|
+
import { IntRange } from '../types';
|
|
4
|
+
export declare enum TButtonVariant {
|
|
5
|
+
primary = "primary",
|
|
6
|
+
secondary = "secondary",
|
|
7
|
+
tertiary = "tertiary"
|
|
8
|
+
}
|
|
9
|
+
export declare enum TButtonAppearance {
|
|
10
|
+
accent = "accent",
|
|
11
|
+
negative = "negative"
|
|
12
|
+
}
|
|
13
|
+
export interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, IFontFamilyProps {
|
|
14
|
+
title?: string;
|
|
15
|
+
isDisabledClickable?: boolean;
|
|
16
|
+
isWaitingResponse?: boolean;
|
|
17
|
+
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
18
|
+
appearance?: 'accent' | 'negative';
|
|
19
|
+
icon?: ReactElement;
|
|
20
|
+
loaderIcon?: ReactElement;
|
|
21
|
+
width?: IntRange<1, 101>;
|
|
22
|
+
className?: string;
|
|
23
|
+
styles?: TStyles;
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export var TButtonVariant;
|
|
2
|
+
(function (TButtonVariant) {
|
|
3
|
+
TButtonVariant["primary"] = "primary";
|
|
4
|
+
TButtonVariant["secondary"] = "secondary";
|
|
5
|
+
TButtonVariant["tertiary"] = "tertiary";
|
|
6
|
+
})(TButtonVariant || (TButtonVariant = {}));
|
|
7
|
+
export var TButtonAppearance;
|
|
8
|
+
(function (TButtonAppearance) {
|
|
9
|
+
TButtonAppearance["accent"] = "accent";
|
|
10
|
+
TButtonAppearance["negative"] = "negative";
|
|
11
|
+
})(TButtonAppearance || (TButtonAppearance = {}));
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Button/types.ts"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;IACvB,uCAAqB,CAAA;AACvB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;AACvB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B"}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
13
|
+
import { useEffect, useLayoutEffect, useState } from 'react';
|
|
14
|
+
import classNames from 'classnames';
|
|
15
|
+
import { isBlobUrl, tryToLoadImageFromCache, tryToSaveImageToCache } from './helpers';
|
|
16
|
+
import '../../styles/styles.scss';
|
|
17
|
+
var IMAGE_LOADING_STATE;
|
|
18
|
+
(function (IMAGE_LOADING_STATE) {
|
|
19
|
+
IMAGE_LOADING_STATE[IMAGE_LOADING_STATE["pending"] = 0] = "pending";
|
|
20
|
+
IMAGE_LOADING_STATE[IMAGE_LOADING_STATE["success"] = 1] = "success";
|
|
21
|
+
IMAGE_LOADING_STATE[IMAGE_LOADING_STATE["error"] = -1] = "error";
|
|
22
|
+
})(IMAGE_LOADING_STATE || (IMAGE_LOADING_STATE = {}));
|
|
23
|
+
var CachedImage = function (_a) {
|
|
24
|
+
var src = _a.src, alt = _a.alt, className = _a.className, styles = _a.styles, width = _a.width, height = _a.height, borderRadius = _a.borderRadius;
|
|
25
|
+
var _b = useState(''), url = _b[0], setUrl = _b[1];
|
|
26
|
+
var _c = useState(IMAGE_LOADING_STATE.pending), loadingState = _c[0], setLoadingState = _c[1];
|
|
27
|
+
useLayoutEffect(function () {
|
|
28
|
+
setUrl(src);
|
|
29
|
+
}, [src]);
|
|
30
|
+
// Очистка URL объекта после ошибки загрузки изображения
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
if (loadingState === IMAGE_LOADING_STATE.error && isBlobUrl(url))
|
|
33
|
+
URL.revokeObjectURL(url);
|
|
34
|
+
return function () { return void 0; };
|
|
35
|
+
}, [loadingState, url]);
|
|
36
|
+
var isImageLoadingStatePending = function () { return loadingState === IMAGE_LOADING_STATE.pending; };
|
|
37
|
+
// Обработчик успешной загрузки изображения
|
|
38
|
+
var handleOnLoad = function () {
|
|
39
|
+
if (!isImageLoadingStatePending())
|
|
40
|
+
return;
|
|
41
|
+
setLoadingState(IMAGE_LOADING_STATE.success);
|
|
42
|
+
tryToSaveImageToCache(src);
|
|
43
|
+
};
|
|
44
|
+
// Обработчик ошибки загрузки изображения
|
|
45
|
+
var handleOnError = function () {
|
|
46
|
+
if (!isImageLoadingStatePending())
|
|
47
|
+
return;
|
|
48
|
+
setLoadingState(IMAGE_LOADING_STATE.error);
|
|
49
|
+
tryToLoadImageFromCache(src).then(function (blobUrl) { return blobUrl && setUrl(blobUrl); });
|
|
50
|
+
};
|
|
51
|
+
var generateImageStyles = function () {
|
|
52
|
+
var widthValue = width ? "".concat(width, "px") : '100%';
|
|
53
|
+
var heightValue = height ? "".concat(height, "px") : '100%';
|
|
54
|
+
return __assign({ minWidth: widthValue, minHeight: heightValue, width: widthValue, height: heightValue, borderRadius: "".concat(borderRadius, "px") }, styles);
|
|
55
|
+
};
|
|
56
|
+
return (_jsx("img", { className: classNames('smartapp-cached-image', className), style: generateImageStyles(), src: url, alt: alt, onLoad: handleOnLoad, onError: handleOnError }));
|
|
57
|
+
};
|
|
58
|
+
export default CachedImage;
|
|
59
|
+
//# sourceMappingURL=CachedImage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CachedImage.js","sourceRoot":"","sources":["../../../../src/сomponents/CachedImage/CachedImage.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAErF,OAAO,0BAA0B,CAAA;AAEjC,IAAK,mBAIJ;AAJD,WAAK,mBAAmB;IACtB,mEAAa,CAAA;IACb,mEAAa,CAAA;IACb,gEAAY,CAAA;AACd,CAAC,EAJI,mBAAmB,KAAnB,mBAAmB,QAIvB;AAED,IAAM,WAAW,GAAG,UAAC,EAA+E;QAA7E,GAAG,SAAA,EAAE,GAAG,SAAA,EAAE,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAA,EAAE,MAAM,YAAA,EAAE,YAAY,kBAAA;IACvE,IAAA,KAAgB,QAAQ,CAAC,EAAE,CAAC,EAA3B,GAAG,QAAA,EAAE,MAAM,QAAgB,CAAA;IAC5B,IAAA,KAAkC,QAAQ,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAtE,YAAY,QAAA,EAAE,eAAe,QAAyC,CAAA;IAE7E,eAAe,CAAC;QACd,MAAM,CAAC,GAAG,CAAC,CAAA;IACb,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;IAET,wDAAwD;IACxD,SAAS,CAAC;QACR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,EAAE,UAAU,CAAC,uBAAuB,EAAE,SAAS,CAAC,EACzD,KAAK,EAAE,mBAAmB,EAAE,EAC5B,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,aAAa,GACtB,CACH,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var SMARTAPP_CACHE_STORAGE = 'smartapp-cache-storage';
|
|
2
|
+
var NETWORK_RESPONSE_ERROR = 'Network response was not ok';
|
|
3
|
+
var FAILED_TO_SAVE_IMAGE_TO_CACHE = 'Failed to save image to cache';
|
|
4
|
+
// Загрузка изображения из кэша
|
|
5
|
+
export var tryToLoadImageFromCache = function (url) {
|
|
6
|
+
return caches
|
|
7
|
+
.open(SMARTAPP_CACHE_STORAGE)
|
|
8
|
+
.then(function (cache) { return cache.match(url); })
|
|
9
|
+
.then(function (response) { return (response === null || response === void 0 ? void 0 : response.blob()) || null; })
|
|
10
|
+
.then(function (blob) { return (blob ? URL.createObjectURL(blob) : null); })
|
|
11
|
+
.catch(function () { return null; });
|
|
12
|
+
};
|
|
13
|
+
// Сохранение изображения в кэш
|
|
14
|
+
var saveImageToCache = function (url) {
|
|
15
|
+
return fetch(url, {
|
|
16
|
+
credentials: 'include',
|
|
17
|
+
})
|
|
18
|
+
.then(function (response) {
|
|
19
|
+
if (!response.ok)
|
|
20
|
+
throw new Error(NETWORK_RESPONSE_ERROR);
|
|
21
|
+
return caches.open(SMARTAPP_CACHE_STORAGE).then(function (cache) { return cache.put(url, response); });
|
|
22
|
+
})
|
|
23
|
+
.catch(function (error) { return console.error("".concat(FAILED_TO_SAVE_IMAGE_TO_CACHE, ":"), error); });
|
|
24
|
+
};
|
|
25
|
+
// Проверка наличия изображения в кэше и сохранение его при отсутствии
|
|
26
|
+
export var tryToSaveImageToCache = function (url) {
|
|
27
|
+
if (!url)
|
|
28
|
+
return Promise.resolve();
|
|
29
|
+
return caches
|
|
30
|
+
.open(SMARTAPP_CACHE_STORAGE)
|
|
31
|
+
.then(function (cache) { return cache.match(url); })
|
|
32
|
+
.then(function (response) {
|
|
33
|
+
if (!response)
|
|
34
|
+
return saveImageToCache(url);
|
|
35
|
+
return Promise.resolve();
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
// Функция для проверки, является ли URL объектом Blob
|
|
39
|
+
export var isBlobUrl = function (url) { return url.indexOf('blob:') === 0; };
|
|
40
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/сomponents/CachedImage/helpers.ts"],"names":[],"mappings":"AAAA,IAAM,sBAAsB,GAAG,wBAAwB,CAAA;AACvD,IAAM,sBAAsB,GAAG,6BAA6B,CAAA;AAC5D,IAAM,6BAA6B,GAAG,+BAA+B,CAAA;AAErE,+BAA+B;AAC/B,MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAC,GAAW;IACjD,OAAA,MAAM;SACH,IAAI,CAAC,sBAAsB,CAAC;SAC5B,IAAI,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAhB,CAAgB,CAAC;SACjC,IAAI,CAAC,UAAC,QAAQ,IAAK,OAAA,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,EAAE,KAAI,IAAI,EAAxB,CAAwB,CAAC;SAC5C,IAAI,CAAC,UAAC,IAAI,IAAK,OAAA,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAzC,CAAyC,CAAC;SACzD,KAAK,CAAC,cAAM,OAAA,IAAI,EAAJ,CAAI,CAAC;AALpB,CAKoB,CAAA;AAEtB,+BAA+B;AAC/B,IAAM,gBAAgB,GAAG,UAAC,GAAW;IACnC,OAAA,KAAK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":["../../../../src/сomponents/CachedImage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/CachedImage/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ICalendarProps } from './types';
|
|
2
|
+
import '../../styles/styles.scss';
|
|
3
|
+
declare const CalendarDatepicker: ({ fontFamily, locale, isRange, inline, disabled, id, width, parentContainerRef, selectedDate, selectedDateRange, onChange, onChangeSelectedDateRange, ...props }: ICalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default CalendarDatepicker;
|
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
+
import { useEffect, useState } from 'react';
|
|
25
|
+
import DatePicker, { registerLocale } from 'react-datepicker';
|
|
26
|
+
import { createPortal } from 'react-dom';
|
|
27
|
+
import classNames from 'classnames';
|
|
28
|
+
import { isString } from 'lodash';
|
|
29
|
+
import ar from 'date-fns/locale/ar';
|
|
30
|
+
import de from 'date-fns/locale/de';
|
|
31
|
+
import en from 'date-fns/locale/en-US';
|
|
32
|
+
import es from 'date-fns/locale/es';
|
|
33
|
+
import fr from 'date-fns/locale/fr';
|
|
34
|
+
import id from 'date-fns/locale/id';
|
|
35
|
+
import ms from 'date-fns/locale/ms';
|
|
36
|
+
import ru from 'date-fns/locale/ru';
|
|
37
|
+
import tr from 'date-fns/locale/tr';
|
|
38
|
+
import uz from 'date-fns/locale/uz';
|
|
39
|
+
import { generateFontFamilyStyle } from '../../helpers';
|
|
40
|
+
import { BUTTON, COLORS, LANGUAGES, SPACE } from '../../constants';
|
|
41
|
+
import { ReactComponent as ArrowDownIcon } from '../../assets/icons/arrow-down.svg';
|
|
42
|
+
import { ReactComponent as ArrowUpIcon } from '../../assets/icons/arrow-up.svg';
|
|
43
|
+
import { ReactComponent as ArrowNextIcon } from '../../assets/icons/calendar-arrow-next.svg';
|
|
44
|
+
import { ReactComponent as ArrowPrevIcon } from '../../assets/icons/calendar-arrow-prev.svg';
|
|
45
|
+
import '../../styles/styles.scss';
|
|
46
|
+
registerLocale(LANGUAGES.ru, ru);
|
|
47
|
+
registerLocale(LANGUAGES.ar, ar);
|
|
48
|
+
registerLocale(LANGUAGES.en, en);
|
|
49
|
+
registerLocale(LANGUAGES.fr, fr);
|
|
50
|
+
registerLocale(LANGUAGES.es, es);
|
|
51
|
+
registerLocale(LANGUAGES.de, de);
|
|
52
|
+
registerLocale(LANGUAGES.ms, ms);
|
|
53
|
+
registerLocale(LANGUAGES.tr, tr);
|
|
54
|
+
registerLocale(LANGUAGES.id, id);
|
|
55
|
+
registerLocale(LANGUAGES.uz, uz);
|
|
56
|
+
var DATE_FORMAT;
|
|
57
|
+
(function (DATE_FORMAT) {
|
|
58
|
+
DATE_FORMAT["DATE_PICKER_FORMAT"] = "dd MMMM";
|
|
59
|
+
DATE_FORMAT["DAY_MONTH_YEAR"] = "dd.MM.yyyy";
|
|
60
|
+
})(DATE_FORMAT || (DATE_FORMAT = {}));
|
|
61
|
+
var DATE_DISPLAY;
|
|
62
|
+
(function (DATE_DISPLAY) {
|
|
63
|
+
DATE_DISPLAY["NUMERIC"] = "numeric";
|
|
64
|
+
DATE_DISPLAY["LONG"] = "long";
|
|
65
|
+
})(DATE_DISPLAY || (DATE_DISPLAY = {}));
|
|
66
|
+
var BUTTON_CONTROLS;
|
|
67
|
+
(function (BUTTON_CONTROLS) {
|
|
68
|
+
BUTTON_CONTROLS["PREVIOUS"] = "previous";
|
|
69
|
+
BUTTON_CONTROLS["NEXT"] = "next";
|
|
70
|
+
})(BUTTON_CONTROLS || (BUTTON_CONTROLS = {}));
|
|
71
|
+
var READONLY_ATTRIBUTE = 'readonly';
|
|
72
|
+
var READONLY_ATTRIBUTE_VALUE = 'true';
|
|
73
|
+
var RU_LOCALE = 'ru-RU';
|
|
74
|
+
var RU_YEAR = 'г.';
|
|
75
|
+
var DATE_PICKER_FORMAT = DATE_FORMAT.DATE_PICKER_FORMAT, DAY_MONTH_YEAR = DATE_FORMAT.DAY_MONTH_YEAR;
|
|
76
|
+
var NUMERIC = DATE_DISPLAY.NUMERIC, LONG = DATE_DISPLAY.LONG;
|
|
77
|
+
var PREVIOUS = BUTTON_CONTROLS.PREVIOUS, NEXT = BUTTON_CONTROLS.NEXT;
|
|
78
|
+
var checkIsDifferentYears = function (defaultSelectedDate, selectedDate) { return defaultSelectedDate.getFullYear() !== selectedDate.getFullYear(); };
|
|
79
|
+
var generateHeaderLocale = function (date, locale) {
|
|
80
|
+
var selectedLocale = locale ? (isString(locale) ? locale : RU_LOCALE) : RU_LOCALE;
|
|
81
|
+
var formattedDate = new Intl.DateTimeFormat(selectedLocale, { year: NUMERIC, month: LONG }).format(date);
|
|
82
|
+
var _a = formattedDate.split(SPACE), month = _a[0], year = _a[1];
|
|
83
|
+
var capitalizedMonth = month.charAt(0).toUpperCase() + month.slice(1);
|
|
84
|
+
// Убираем "г." из года, если локаль русская
|
|
85
|
+
var formattedYear = selectedLocale === RU_LOCALE ? year.replace(RU_YEAR, '') : year;
|
|
86
|
+
return "".concat(capitalizedMonth, " ").concat(formattedYear);
|
|
87
|
+
};
|
|
88
|
+
var CalendarDatepicker = function (_a) {
|
|
89
|
+
var fontFamily = _a.fontFamily, _b = _a.locale, locale = _b === void 0 ? LANGUAGES.ru : _b, _c = _a.isRange, isRange = _c === void 0 ? false : _c, inline = _a.inline, disabled = _a.disabled, id = _a.id, width = _a.width, parentContainerRef = _a.parentContainerRef, selectedDate = _a.selectedDate, selectedDateRange = _a.selectedDateRange, onChange = _a.onChange, onChangeSelectedDateRange = _a.onChangeSelectedDateRange, props = __rest(_a, ["fontFamily", "locale", "isRange", "inline", "disabled", "id", "width", "parentContainerRef", "selectedDate", "selectedDateRange", "onChange", "onChangeSelectedDateRange"]);
|
|
90
|
+
var currentDate = new Date();
|
|
91
|
+
var defaultSelectedDate = selectedDate || currentDate;
|
|
92
|
+
var correctDateFormat = function (date) { return (checkIsDifferentYears(currentDate, date) ? DAY_MONTH_YEAR : DATE_PICKER_FORMAT); };
|
|
93
|
+
var _d = useState(selectedDateRange || [currentDate, currentDate]), dateRange = _d[0], setDateRange = _d[1];
|
|
94
|
+
var _e = useState(false), isActiveDatepicker = _e[0], setIsActiveDatepicker = _e[1];
|
|
95
|
+
var _f = useState(correctDateFormat(defaultSelectedDate)), dateFormat = _f[0], setDateFormat = _f[1];
|
|
96
|
+
var startDate = dateRange[0], endDate = dateRange[1];
|
|
97
|
+
useEffect(function () {
|
|
98
|
+
var element = document.getElementById(id);
|
|
99
|
+
element === null || element === void 0 ? void 0 : element.setAttribute(READONLY_ATTRIBUTE, READONLY_ATTRIBUTE_VALUE);
|
|
100
|
+
}, [id]);
|
|
101
|
+
var handleChangeDate = function (date) {
|
|
102
|
+
if (date) {
|
|
103
|
+
setDateFormat(correctDateFormat(date));
|
|
104
|
+
onChange(date);
|
|
105
|
+
var element_1 = document.getElementById(id);
|
|
106
|
+
setTimeout(function () { return element_1 === null || element_1 === void 0 ? void 0 : element_1.blur(); }, 10);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
var handleChangeDateRange = function (period) {
|
|
110
|
+
setDateRange(period);
|
|
111
|
+
onChangeSelectedDateRange === null || onChangeSelectedDateRange === void 0 ? void 0 : onChangeSelectedDateRange(period);
|
|
112
|
+
};
|
|
113
|
+
var handleDatePickerClick = function () { return setIsActiveDatepicker(!isActiveDatepicker); };
|
|
114
|
+
var handleClickArrowButton = function () {
|
|
115
|
+
var element = document.getElementById(id);
|
|
116
|
+
element === null || element === void 0 ? void 0 : element.focus();
|
|
117
|
+
};
|
|
118
|
+
var popperContainer = function (_a) {
|
|
119
|
+
var children = _a.children;
|
|
120
|
+
var parentContainerRefCurrent = parentContainerRef === null || parentContainerRef === void 0 ? void 0 : parentContainerRef.current;
|
|
121
|
+
return parentContainerRefCurrent ? createPortal(children, parentContainerRefCurrent) : children;
|
|
122
|
+
};
|
|
123
|
+
var renderHeaderArrow = function (_a) {
|
|
124
|
+
var onClick = _a.onClick, disabled = _a.disabled, ariaLabel = _a.ariaLabel, Icon = _a.Icon;
|
|
125
|
+
return (_jsx("button", __assign({ className: "smartapp-calendar-header__arrows--button", type: BUTTON, onClick: onClick, disabled: disabled, "aria-label": ariaLabel }, { children: _jsx(Icon, {}) })));
|
|
126
|
+
};
|
|
127
|
+
var renderCalendarHeader = function (_a) {
|
|
128
|
+
var date = _a.date, decreaseMonth = _a.decreaseMonth, increaseMonth = _a.increaseMonth, prevMonthButtonDisabled = _a.prevMonthButtonDisabled, nextMonthButtonDisabled = _a.nextMonthButtonDisabled;
|
|
129
|
+
return (_jsxs("div", __assign({ className: "smartapp-calendar-header" }, { children: [_jsx("span", __assign({ className: "smartapp-calendar-header__value" }, { children: generateHeaderLocale(date, locale) })), _jsxs("div", __assign({ className: "smartapp-calendar-header__arrows" }, { children: [renderHeaderArrow({
|
|
130
|
+
onClick: decreaseMonth,
|
|
131
|
+
disabled: prevMonthButtonDisabled,
|
|
132
|
+
ariaLabel: PREVIOUS,
|
|
133
|
+
Icon: ArrowPrevIcon,
|
|
134
|
+
}), renderHeaderArrow({
|
|
135
|
+
onClick: increaseMonth,
|
|
136
|
+
disabled: nextMonthButtonDisabled,
|
|
137
|
+
ariaLabel: NEXT,
|
|
138
|
+
Icon: ArrowNextIcon,
|
|
139
|
+
})] }))] })));
|
|
140
|
+
};
|
|
141
|
+
var renderArrows = function () { return (_jsx("button", __assign({ onClick: handleClickArrowButton, className: "smartapp-calendar-input__arrow", disabled: disabled }, { children: isActiveDatepicker ? _jsx(ArrowUpIcon, { color: COLORS.iconAccent }) : _jsx(ArrowDownIcon, {}) }))); };
|
|
142
|
+
return (_jsx("div", __assign({ className: "smartapp-calendar-component", style: __assign({ width: "".concat(width, "%") }, generateFontFamilyStyle(fontFamily)) }, { children: isRange ? (_jsx(DatePicker, __assign({ id: id, locale: locale, inline: inline, disabled: disabled, selectsRange: true, startDate: startDate, endDate: endDate, dateFormat: dateFormat, className: "smartapp-calendar-input", popperClassName: "smartapp-calendar-popper", onChange: handleChangeDateRange, popperContainer: popperContainer, renderCustomHeader: renderCalendarHeader }, props))) : (_jsxs(_Fragment, { children: [_jsx(DatePicker, __assign({ id: id, locale: locale, inline: inline, disabled: disabled, selected: selectedDate, dateFormat: dateFormat, className: "smartapp-calendar-input", popperClassName: "smartapp-calendar-popper", calendarClassName: classNames({ 'smartapp-calendar-inline-background': inline }), onChange: handleChangeDate, onFocus: handleDatePickerClick, onBlur: handleDatePickerClick, popperContainer: popperContainer, renderCustomHeader: renderCalendarHeader }, props)), !inline && renderArrows()] })) })));
|
|
143
|
+
};
|
|
144
|
+
export default CalendarDatepicker;
|
|
145
|
+
//# sourceMappingURL=Calendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../../../../src/сomponents/Calendar/Calendar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAoC,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACpF,OAAO,UAAU,EAAE,EAAoC,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAC/F,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACjC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACtC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,MAAM,oBAAoB,CAAA;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAElE,OAAO,EAAE,cAAc,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,EAAE,cAAc,IAAI,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,cAAc,IAAI,aAAa,EAAE,MAAM,4CAA4C,CAAA;AAC5F,OAAO,EAAE,cAAc,IAAI,aAAa,EAAE,MAAM,4CAA4C,CAAA;A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Y,QACZ,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAC,yBAAyB,EACnC,eAAe,EAAC,0BAA0B,EAC1C,QAAQ,EAAE,qBAAqB,EAC/B,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,oBAAoB,IACpC,KAAK,EACT,CACH,CAAC,CAAC,CAAC,CACF,8BACE,KAAC,UAAU,aACT,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAC,yBAAyB,EACnC,eAAe,EAAC,0BAA0B,EAC1C,iBAAiB,EAAE,UAAU,CAAC,EAAE,qCAAqC,EAAE,MAAM,EAAE,CAAC,EAChF,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,qBAAqB,EAC7B,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,oBAAoB,IACpC,KAAK,EACT,EACD,CAAC,MAAM,IAAI,YAAY,EAAE,IACzB,CACJ,IACG,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Calendar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { ReactDatePickerProps } from 'react-datepicker';
|
|
3
|
+
import { IFontFamilyProps } from '../../constants';
|
|
4
|
+
import { IntRange } from '../types';
|
|
5
|
+
export type TDateRange = [Date | null, Date | null];
|
|
6
|
+
export interface ICalendarProps extends ReactDatePickerProps, IFontFamilyProps {
|
|
7
|
+
id: string;
|
|
8
|
+
isRange?: boolean;
|
|
9
|
+
width?: IntRange<1, 101>;
|
|
10
|
+
parentContainerRef?: RefObject<HTMLDivElement | null>;
|
|
11
|
+
selectedDate?: Date;
|
|
12
|
+
selectedDateRange?: TDateRange;
|
|
13
|
+
onChange: (date: Date) => void;
|
|
14
|
+
onChangeSelectedDateRange?: (period: TDateRange) => void;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Calendar/types.ts"],"names":[],"mappings":""}
|