@cloud-ru/uikit-product-claudia 1.6.2 → 1.6.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/CHANGELOG.md +23 -0
- package/dist/cjs/components/ButtonClaudia/ButtonClaudia.d.ts +6 -0
- package/dist/cjs/components/ButtonClaudia/ButtonClaudia.js +29 -0
- package/dist/cjs/components/ButtonClaudia/constants.d.ts +25 -0
- package/dist/cjs/components/ButtonClaudia/constants.js +28 -0
- package/dist/cjs/components/ButtonClaudia/helperComponents/ButtonPrivate/ButtonPrivate.d.ts +14 -0
- package/dist/cjs/components/ButtonClaudia/helperComponents/ButtonPrivate/ButtonPrivate.js +55 -0
- package/dist/cjs/components/ButtonClaudia/helperComponents/ButtonPrivate/constants.d.ts +10 -0
- package/dist/cjs/components/ButtonClaudia/helperComponents/ButtonPrivate/constants.js +15 -0
- package/dist/cjs/components/ButtonClaudia/helperComponents/ButtonPrivate/index.d.ts +1 -0
- package/dist/cjs/components/ButtonClaudia/helperComponents/ButtonPrivate/index.js +17 -0
- package/dist/cjs/components/ButtonClaudia/helperComponents/ButtonPrivate/styles.module.css +36 -0
- package/dist/cjs/components/ButtonClaudia/helperComponents/ButtonPrivate/utils.d.ts +11 -0
- package/dist/cjs/components/ButtonClaudia/helperComponents/ButtonPrivate/utils.js +54 -0
- package/dist/cjs/components/ButtonClaudia/helperComponents/index.d.ts +1 -0
- package/dist/cjs/components/ButtonClaudia/helperComponents/index.js +17 -0
- package/dist/cjs/components/ButtonClaudia/index.d.ts +1 -0
- package/dist/cjs/components/ButtonClaudia/index.js +17 -0
- package/dist/cjs/components/ButtonClaudia/styles.module.css +232 -0
- package/dist/cjs/components/ButtonClaudia/types.d.ts +48 -0
- package/dist/cjs/components/ButtonClaudia/types.js +2 -0
- package/dist/cjs/components/ButtonClaudia/utils.d.ts +12 -0
- package/dist/cjs/components/ButtonClaudia/utils.js +6 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaFunction/ButtonGigaFunction.d.ts +6 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaFunction/ButtonGigaFunction.js +29 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaFunction/index.d.ts +1 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaFunction/index.js +17 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaFunction/styles.module.css +300 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaFunction/types.d.ts +28 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaFunction/types.js +2 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaFunction/utils.d.ts +13 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaFunction/utils.js +6 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaMama/ButtonGigaMama.d.ts +6 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaMama/ButtonGigaMama.js +29 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaMama/index.d.ts +1 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaMama/index.js +17 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaMama/styles.module.css +131 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaMama/utils.d.ts +12 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaMama/utils.js +6 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaOutline/ButtonGigaOutline.d.ts +6 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaOutline/ButtonGigaOutline.js +29 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaOutline/index.d.ts +1 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaOutline/index.js +17 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaOutline/styles.module.css +417 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaOutline/types.d.ts +48 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaOutline/types.js +2 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaOutline/utils.d.ts +13 -0
- package/dist/cjs/components/ButtonGiga/ButtonGigaOutline/utils.js +6 -0
- package/dist/cjs/components/ButtonGiga/constants.d.ts +25 -0
- package/dist/cjs/components/ButtonGiga/constants.js +28 -0
- package/dist/cjs/components/ButtonGiga/helperComponents/ButtonPrivate/ButtonPrivate.d.ts +14 -0
- package/dist/cjs/components/ButtonGiga/helperComponents/ButtonPrivate/ButtonPrivate.js +55 -0
- package/dist/cjs/components/ButtonGiga/helperComponents/ButtonPrivate/constants.d.ts +9 -0
- package/dist/cjs/components/ButtonGiga/helperComponents/ButtonPrivate/constants.js +15 -0
- package/dist/cjs/components/ButtonGiga/helperComponents/ButtonPrivate/index.d.ts +1 -0
- package/dist/cjs/components/ButtonGiga/helperComponents/ButtonPrivate/index.js +17 -0
- package/dist/cjs/components/ButtonGiga/helperComponents/ButtonPrivate/styles.module.css +36 -0
- package/dist/cjs/components/ButtonGiga/helperComponents/ButtonPrivate/types.d.ts +48 -0
- package/dist/cjs/components/ButtonGiga/helperComponents/ButtonPrivate/types.js +2 -0
- package/dist/cjs/components/ButtonGiga/helperComponents/ButtonPrivate/utils.d.ts +11 -0
- package/dist/cjs/components/ButtonGiga/helperComponents/ButtonPrivate/utils.js +54 -0
- package/dist/cjs/components/ButtonGiga/helperComponents/index.d.ts +1 -0
- package/dist/cjs/components/ButtonGiga/helperComponents/index.js +17 -0
- package/dist/cjs/components/ButtonGiga/index.d.ts +3 -0
- package/dist/cjs/components/ButtonGiga/index.js +19 -0
- package/dist/cjs/components/ButtonGiga/types.d.ts +28 -0
- package/dist/cjs/components/ButtonGiga/types.js +2 -0
- package/dist/cjs/components/ChatStatusAnnouncement/ChatStatusAnnouncement.d.ts +2 -0
- package/dist/cjs/components/ChatStatusAnnouncement/ChatStatusAnnouncement.js +74 -0
- package/dist/cjs/components/ChatStatusAnnouncement/constants.d.ts +1 -0
- package/dist/cjs/components/ChatStatusAnnouncement/constants.js +4 -0
- package/dist/cjs/components/ChatStatusAnnouncement/helperComponents/AlertButton/AlertButton.d.ts +10 -0
- package/dist/cjs/components/ChatStatusAnnouncement/helperComponents/AlertButton/AlertButton.js +14 -0
- package/dist/cjs/components/ChatStatusAnnouncement/helperComponents/AlertButton/index.d.ts +1 -0
- package/dist/cjs/components/ChatStatusAnnouncement/helperComponents/AlertButton/index.js +17 -0
- package/dist/cjs/components/ChatStatusAnnouncement/helperComponents/AlertButton/styles.module.css +20 -0
- package/dist/cjs/components/ChatStatusAnnouncement/helperComponents/TextContent/TextContent.d.ts +7 -0
- package/dist/cjs/components/ChatStatusAnnouncement/helperComponents/TextContent/TextContent.js +12 -0
- package/dist/cjs/components/ChatStatusAnnouncement/helperComponents/TextContent/index.d.ts +1 -0
- package/dist/cjs/components/ChatStatusAnnouncement/helperComponents/TextContent/index.js +17 -0
- package/dist/cjs/components/ChatStatusAnnouncement/index.d.ts +1 -0
- package/dist/cjs/components/ChatStatusAnnouncement/index.js +17 -0
- package/dist/cjs/components/ChatStatusAnnouncement/styled.module.css +62 -0
- package/dist/cjs/components/ChatStatusAnnouncement/types.d.ts +14 -0
- package/dist/cjs/components/ChatStatusAnnouncement/types.js +2 -0
- package/dist/cjs/components/ChatStatusAnnouncement/utils/index.d.ts +5 -0
- package/dist/cjs/components/ChatStatusAnnouncement/utils/index.js +44 -0
- package/dist/cjs/components/IconGiga/IconGiga.d.ts +8 -0
- package/dist/cjs/components/IconGiga/IconGiga.js +29 -0
- package/dist/cjs/components/IconGiga/constants.d.ts +13 -0
- package/dist/cjs/components/IconGiga/constants.js +22 -0
- package/dist/cjs/components/IconGiga/index.d.ts +1 -0
- package/dist/cjs/components/IconGiga/index.js +17 -0
- package/dist/cjs/components/RecommendPannel/RecommendPanel.d.ts +14 -0
- package/dist/cjs/components/RecommendPannel/RecommendPanel.js +74 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/Chip/Chip.d.ts +14 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/Chip/Chip.js +23 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/Chip/index.d.ts +1 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/Chip/index.js +17 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/Chip/styles.module.css +39 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/ClaudiaChip/ClaudiaChip.d.ts +11 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/ClaudiaChip/ClaudiaChip.js +18 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/ClaudiaChip/index.d.ts +1 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/ClaudiaChip/index.js +17 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/CloseChip/CloseChip.d.ts +12 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/CloseChip/CloseChip.js +37 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/CloseChip/index.d.ts +1 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/CloseChip/index.js +17 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/CloseChip/styles.module.css +64 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/DropdownChip/DropdownChip.d.ts +11 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/DropdownChip/DropdownChip.js +38 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/DropdownChip/index.d.ts +1 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/DropdownChip/index.js +17 -0
- package/dist/cjs/components/RecommendPannel/helperComponents/DropdownChip/styles.module.css +49 -0
- package/dist/cjs/components/RecommendPannel/hooks/index.d.ts +2 -0
- package/dist/cjs/components/RecommendPannel/hooks/index.js +18 -0
- package/dist/cjs/components/RecommendPannel/index.d.ts +1 -0
- package/dist/cjs/components/RecommendPannel/index.js +17 -0
- package/dist/cjs/components/RecommendPannel/styles.module.css +4 -0
- package/dist/cjs/components/RecommendPannel/types.d.ts +16 -0
- package/dist/cjs/components/RecommendPannel/types.js +11 -0
- package/dist/cjs/components/RecommendPannel/utils/gitVisibleChipsCount.d.ts +10 -0
- package/dist/cjs/components/RecommendPannel/utils/gitVisibleChipsCount.js +39 -0
- package/dist/cjs/components/SshField/SshField.d.ts +12 -0
- package/dist/cjs/components/SshField/SshField.js +137 -0
- package/dist/cjs/components/SshField/components/MobileFieldAi/MobileFieldAi.d.ts +5 -0
- package/dist/cjs/components/SshField/components/MobileFieldAi/MobileFieldAi.js +35 -0
- package/dist/cjs/components/SshField/components/MobileFieldAi/index.d.ts +1 -0
- package/dist/cjs/components/SshField/components/MobileFieldAi/index.js +17 -0
- package/dist/cjs/components/SshField/components/MobileFieldAi/styles.module.css +86 -0
- package/dist/cjs/components/SshField/components/TextArea/TextArea.d.ts +39 -0
- package/dist/cjs/components/SshField/components/TextArea/TextArea.js +33 -0
- package/dist/cjs/components/SshField/components/TextArea/index.d.ts +1 -0
- package/dist/cjs/components/SshField/components/TextArea/index.js +17 -0
- package/dist/cjs/components/SshField/components/TextArea/styles.module.css +32 -0
- package/dist/cjs/components/SshField/helperComponents/DropZoneContent/DropZoneContent.d.ts +1 -0
- package/dist/cjs/components/SshField/helperComponents/DropZoneContent/DropZoneContent.js +14 -0
- package/dist/cjs/components/SshField/helperComponents/DropZoneContent/index.d.ts +1 -0
- package/dist/cjs/components/SshField/helperComponents/DropZoneContent/index.js +17 -0
- package/dist/cjs/components/SshField/helperComponents/DropZoneContent/styles.module.css +15 -0
- package/dist/cjs/components/SshField/helperComponents/FieldSubmitButton/FieldSubmitButton.d.ts +10 -0
- package/dist/cjs/components/SshField/helperComponents/FieldSubmitButton/FieldSubmitButton.js +15 -0
- package/dist/cjs/components/SshField/helperComponents/FieldSubmitButton/index.d.ts +1 -0
- package/dist/cjs/components/SshField/helperComponents/FieldSubmitButton/index.js +17 -0
- package/dist/cjs/components/SshField/helperComponents/TextAreaActionsFooter/TextAreaActionsFooter.d.ts +7 -0
- package/dist/cjs/components/SshField/helperComponents/TextAreaActionsFooter/TextAreaActionsFooter.js +12 -0
- package/dist/cjs/components/SshField/helperComponents/TextAreaActionsFooter/index.d.ts +1 -0
- package/dist/cjs/components/SshField/helperComponents/TextAreaActionsFooter/index.js +17 -0
- package/dist/cjs/components/SshField/helperComponents/TextAreaActionsFooter/styles.module.css +21 -0
- package/dist/cjs/components/SshField/index.d.ts +1 -0
- package/dist/cjs/components/SshField/index.js +17 -0
- package/dist/cjs/components/SshField/styles.module.css +46 -0
- package/dist/cjs/components/SshField/utils/handleFileError.d.ts +2 -0
- package/dist/cjs/components/SshField/utils/handleFileError.js +32 -0
- package/dist/cjs/components/SshField/utils/isTouchDevice.d.ts +2 -0
- package/dist/cjs/components/SshField/utils/isTouchDevice.js +6 -0
- package/dist/cjs/components/SshField/utils/readFileContent.d.ts +1 -0
- package/dist/cjs/components/SshField/utils/readFileContent.js +24 -0
- package/dist/cjs/components/SshField/utils/validateSSHKey.d.ts +3 -0
- package/dist/cjs/components/SshField/utils/validateSSHKey.js +66 -0
- package/dist/cjs/components/index.d.ts +6 -0
- package/dist/cjs/components/index.js +22 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +17 -0
- package/dist/esm/components/ButtonClaudia/ButtonClaudia.d.ts +6 -0
- package/dist/esm/components/ButtonClaudia/ButtonClaudia.js +23 -0
- package/dist/esm/components/ButtonClaudia/constants.d.ts +25 -0
- package/dist/esm/components/ButtonClaudia/constants.js +25 -0
- package/dist/esm/components/ButtonClaudia/helperComponents/ButtonPrivate/ButtonPrivate.d.ts +14 -0
- package/dist/esm/components/ButtonClaudia/helperComponents/ButtonPrivate/ButtonPrivate.js +49 -0
- package/dist/esm/components/ButtonClaudia/helperComponents/ButtonPrivate/constants.d.ts +10 -0
- package/dist/esm/components/ButtonClaudia/helperComponents/ButtonPrivate/constants.js +12 -0
- package/dist/esm/components/ButtonClaudia/helperComponents/ButtonPrivate/index.d.ts +1 -0
- package/dist/esm/components/ButtonClaudia/helperComponents/ButtonPrivate/index.js +1 -0
- package/dist/esm/components/ButtonClaudia/helperComponents/ButtonPrivate/styles.module.css +36 -0
- package/dist/esm/components/ButtonClaudia/helperComponents/ButtonPrivate/utils.d.ts +11 -0
- package/dist/esm/components/ButtonClaudia/helperComponents/ButtonPrivate/utils.js +48 -0
- package/dist/esm/components/ButtonClaudia/helperComponents/index.d.ts +1 -0
- package/dist/esm/components/ButtonClaudia/helperComponents/index.js +1 -0
- package/dist/esm/components/ButtonClaudia/index.d.ts +1 -0
- package/dist/esm/components/ButtonClaudia/index.js +1 -0
- package/dist/esm/components/ButtonClaudia/styles.module.css +232 -0
- package/dist/esm/components/ButtonClaudia/types.d.ts +48 -0
- package/dist/esm/components/ButtonClaudia/types.js +1 -0
- package/dist/esm/components/ButtonClaudia/utils.d.ts +12 -0
- package/dist/esm/components/ButtonClaudia/utils.js +3 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaFunction/ButtonGigaFunction.d.ts +6 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaFunction/ButtonGigaFunction.js +23 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaFunction/index.d.ts +1 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaFunction/index.js +1 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaFunction/styles.module.css +300 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaFunction/types.d.ts +28 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaFunction/types.js +1 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaFunction/utils.d.ts +13 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaFunction/utils.js +3 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaMama/ButtonGigaMama.d.ts +6 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaMama/ButtonGigaMama.js +23 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaMama/index.d.ts +1 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaMama/index.js +1 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaMama/styles.module.css +131 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaMama/utils.d.ts +12 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaMama/utils.js +3 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaOutline/ButtonGigaOutline.d.ts +6 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaOutline/ButtonGigaOutline.js +23 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaOutline/index.d.ts +1 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaOutline/index.js +1 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaOutline/styles.module.css +417 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaOutline/types.d.ts +48 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaOutline/types.js +1 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaOutline/utils.d.ts +13 -0
- package/dist/esm/components/ButtonGiga/ButtonGigaOutline/utils.js +3 -0
- package/dist/esm/components/ButtonGiga/constants.d.ts +25 -0
- package/dist/esm/components/ButtonGiga/constants.js +25 -0
- package/dist/esm/components/ButtonGiga/helperComponents/ButtonPrivate/ButtonPrivate.d.ts +14 -0
- package/dist/esm/components/ButtonGiga/helperComponents/ButtonPrivate/ButtonPrivate.js +49 -0
- package/dist/esm/components/ButtonGiga/helperComponents/ButtonPrivate/constants.d.ts +9 -0
- package/dist/esm/components/ButtonGiga/helperComponents/ButtonPrivate/constants.js +12 -0
- package/dist/esm/components/ButtonGiga/helperComponents/ButtonPrivate/index.d.ts +1 -0
- package/dist/esm/components/ButtonGiga/helperComponents/ButtonPrivate/index.js +1 -0
- package/dist/esm/components/ButtonGiga/helperComponents/ButtonPrivate/styles.module.css +36 -0
- package/dist/esm/components/ButtonGiga/helperComponents/ButtonPrivate/types.d.ts +48 -0
- package/dist/esm/components/ButtonGiga/helperComponents/ButtonPrivate/types.js +1 -0
- package/dist/esm/components/ButtonGiga/helperComponents/ButtonPrivate/utils.d.ts +11 -0
- package/dist/esm/components/ButtonGiga/helperComponents/ButtonPrivate/utils.js +48 -0
- package/dist/esm/components/ButtonGiga/helperComponents/index.d.ts +1 -0
- package/dist/esm/components/ButtonGiga/helperComponents/index.js +1 -0
- package/dist/esm/components/ButtonGiga/index.d.ts +3 -0
- package/dist/esm/components/ButtonGiga/index.js +3 -0
- package/dist/esm/components/ButtonGiga/types.d.ts +28 -0
- package/dist/esm/components/ButtonGiga/types.js +1 -0
- package/dist/esm/components/ChatStatusAnnouncement/ChatStatusAnnouncement.d.ts +2 -0
- package/dist/esm/components/ChatStatusAnnouncement/ChatStatusAnnouncement.js +68 -0
- package/dist/esm/components/ChatStatusAnnouncement/constants.d.ts +1 -0
- package/dist/esm/components/ChatStatusAnnouncement/constants.js +1 -0
- package/dist/esm/components/ChatStatusAnnouncement/helperComponents/AlertButton/AlertButton.d.ts +10 -0
- package/dist/esm/components/ChatStatusAnnouncement/helperComponents/AlertButton/AlertButton.js +8 -0
- package/dist/esm/components/ChatStatusAnnouncement/helperComponents/AlertButton/index.d.ts +1 -0
- package/dist/esm/components/ChatStatusAnnouncement/helperComponents/AlertButton/index.js +1 -0
- package/dist/esm/components/ChatStatusAnnouncement/helperComponents/AlertButton/styles.module.css +20 -0
- package/dist/esm/components/ChatStatusAnnouncement/helperComponents/TextContent/TextContent.d.ts +7 -0
- package/dist/esm/components/ChatStatusAnnouncement/helperComponents/TextContent/TextContent.js +9 -0
- package/dist/esm/components/ChatStatusAnnouncement/helperComponents/TextContent/index.d.ts +1 -0
- package/dist/esm/components/ChatStatusAnnouncement/helperComponents/TextContent/index.js +1 -0
- package/dist/esm/components/ChatStatusAnnouncement/index.d.ts +1 -0
- package/dist/esm/components/ChatStatusAnnouncement/index.js +1 -0
- package/dist/esm/components/ChatStatusAnnouncement/styled.module.css +62 -0
- package/dist/esm/components/ChatStatusAnnouncement/types.d.ts +14 -0
- package/dist/esm/components/ChatStatusAnnouncement/types.js +1 -0
- package/dist/esm/components/ChatStatusAnnouncement/utils/index.d.ts +5 -0
- package/dist/esm/components/ChatStatusAnnouncement/utils/index.js +38 -0
- package/dist/esm/components/IconGiga/IconGiga.d.ts +8 -0
- package/dist/esm/components/IconGiga/IconGiga.js +26 -0
- package/dist/esm/components/IconGiga/constants.d.ts +13 -0
- package/dist/esm/components/IconGiga/constants.js +19 -0
- package/dist/esm/components/IconGiga/index.d.ts +1 -0
- package/dist/esm/components/IconGiga/index.js +1 -0
- package/dist/esm/components/RecommendPannel/RecommendPanel.d.ts +14 -0
- package/dist/esm/components/RecommendPannel/RecommendPanel.js +68 -0
- package/dist/esm/components/RecommendPannel/helperComponents/Chip/Chip.d.ts +14 -0
- package/dist/esm/components/RecommendPannel/helperComponents/Chip/Chip.js +17 -0
- package/dist/esm/components/RecommendPannel/helperComponents/Chip/index.d.ts +1 -0
- package/dist/esm/components/RecommendPannel/helperComponents/Chip/index.js +1 -0
- package/dist/esm/components/RecommendPannel/helperComponents/Chip/styles.module.css +39 -0
- package/dist/esm/components/RecommendPannel/helperComponents/ClaudiaChip/ClaudiaChip.d.ts +11 -0
- package/dist/esm/components/RecommendPannel/helperComponents/ClaudiaChip/ClaudiaChip.js +15 -0
- package/dist/esm/components/RecommendPannel/helperComponents/ClaudiaChip/index.d.ts +1 -0
- package/dist/esm/components/RecommendPannel/helperComponents/ClaudiaChip/index.js +1 -0
- package/dist/esm/components/RecommendPannel/helperComponents/CloseChip/CloseChip.d.ts +12 -0
- package/dist/esm/components/RecommendPannel/helperComponents/CloseChip/CloseChip.js +31 -0
- package/dist/esm/components/RecommendPannel/helperComponents/CloseChip/index.d.ts +1 -0
- package/dist/esm/components/RecommendPannel/helperComponents/CloseChip/index.js +1 -0
- package/dist/esm/components/RecommendPannel/helperComponents/CloseChip/styles.module.css +64 -0
- package/dist/esm/components/RecommendPannel/helperComponents/DropdownChip/DropdownChip.d.ts +11 -0
- package/dist/esm/components/RecommendPannel/helperComponents/DropdownChip/DropdownChip.js +32 -0
- package/dist/esm/components/RecommendPannel/helperComponents/DropdownChip/index.d.ts +1 -0
- package/dist/esm/components/RecommendPannel/helperComponents/DropdownChip/index.js +1 -0
- package/dist/esm/components/RecommendPannel/helperComponents/DropdownChip/styles.module.css +49 -0
- package/dist/esm/components/RecommendPannel/hooks/index.d.ts +2 -0
- package/dist/esm/components/RecommendPannel/hooks/index.js +14 -0
- package/dist/esm/components/RecommendPannel/index.d.ts +1 -0
- package/dist/esm/components/RecommendPannel/index.js +1 -0
- package/dist/esm/components/RecommendPannel/styles.module.css +4 -0
- package/dist/esm/components/RecommendPannel/types.d.ts +16 -0
- package/dist/esm/components/RecommendPannel/types.js +8 -0
- package/dist/esm/components/RecommendPannel/utils/gitVisibleChipsCount.d.ts +10 -0
- package/dist/esm/components/RecommendPannel/utils/gitVisibleChipsCount.js +35 -0
- package/dist/esm/components/SshField/SshField.d.ts +12 -0
- package/dist/esm/components/SshField/SshField.js +131 -0
- package/dist/esm/components/SshField/components/MobileFieldAi/MobileFieldAi.d.ts +5 -0
- package/dist/esm/components/SshField/components/MobileFieldAi/MobileFieldAi.js +29 -0
- package/dist/esm/components/SshField/components/MobileFieldAi/index.d.ts +1 -0
- package/dist/esm/components/SshField/components/MobileFieldAi/index.js +1 -0
- package/dist/esm/components/SshField/components/MobileFieldAi/styles.module.css +86 -0
- package/dist/esm/components/SshField/components/TextArea/TextArea.d.ts +39 -0
- package/dist/esm/components/SshField/components/TextArea/TextArea.js +27 -0
- package/dist/esm/components/SshField/components/TextArea/index.d.ts +1 -0
- package/dist/esm/components/SshField/components/TextArea/index.js +1 -0
- package/dist/esm/components/SshField/components/TextArea/styles.module.css +32 -0
- package/dist/esm/components/SshField/helperComponents/DropZoneContent/DropZoneContent.d.ts +1 -0
- package/dist/esm/components/SshField/helperComponents/DropZoneContent/DropZoneContent.js +8 -0
- package/dist/esm/components/SshField/helperComponents/DropZoneContent/index.d.ts +1 -0
- package/dist/esm/components/SshField/helperComponents/DropZoneContent/index.js +1 -0
- package/dist/esm/components/SshField/helperComponents/DropZoneContent/styles.module.css +15 -0
- package/dist/esm/components/SshField/helperComponents/FieldSubmitButton/FieldSubmitButton.d.ts +10 -0
- package/dist/esm/components/SshField/helperComponents/FieldSubmitButton/FieldSubmitButton.js +12 -0
- package/dist/esm/components/SshField/helperComponents/FieldSubmitButton/index.d.ts +1 -0
- package/dist/esm/components/SshField/helperComponents/FieldSubmitButton/index.js +1 -0
- package/dist/esm/components/SshField/helperComponents/TextAreaActionsFooter/TextAreaActionsFooter.d.ts +7 -0
- package/dist/esm/components/SshField/helperComponents/TextAreaActionsFooter/TextAreaActionsFooter.js +6 -0
- package/dist/esm/components/SshField/helperComponents/TextAreaActionsFooter/index.d.ts +1 -0
- package/dist/esm/components/SshField/helperComponents/TextAreaActionsFooter/index.js +1 -0
- package/dist/esm/components/SshField/helperComponents/TextAreaActionsFooter/styles.module.css +21 -0
- package/dist/esm/components/SshField/index.d.ts +1 -0
- package/dist/esm/components/SshField/index.js +1 -0
- package/dist/esm/components/SshField/styles.module.css +46 -0
- package/dist/esm/components/SshField/utils/handleFileError.d.ts +2 -0
- package/dist/esm/components/SshField/utils/handleFileError.js +28 -0
- package/dist/esm/components/SshField/utils/isTouchDevice.d.ts +2 -0
- package/dist/esm/components/SshField/utils/isTouchDevice.js +3 -0
- package/dist/esm/components/SshField/utils/readFileContent.d.ts +1 -0
- package/dist/esm/components/SshField/utils/readFileContent.js +20 -0
- package/dist/esm/components/SshField/utils/validateSSHKey.d.ts +3 -0
- package/dist/esm/components/SshField/utils/validateSSHKey.js +60 -0
- package/dist/esm/components/index.d.ts +6 -0
- package/dist/esm/components/index.js +6 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/package.json +7 -6
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { LAYOUT_TYPE } from '@sbercloud/uikit-product-utils';
|
|
5
|
+
import { TruncateString } from '@snack-uikit/truncate-string';
|
|
6
|
+
import { Typography } from '@snack-uikit/typography';
|
|
7
|
+
import { CHIP_TYPE, SIZE } from '../../types';
|
|
8
|
+
import styles from './styles.module.css';
|
|
9
|
+
export const Chip = forwardRef(({ layoutType, type, label, onClick, size, className }, ref) => {
|
|
10
|
+
const isDefaultType = type === CHIP_TYPE.Default;
|
|
11
|
+
const isMobile = layoutType === LAYOUT_TYPE.Mobile;
|
|
12
|
+
const isMobileChipSize = isMobile || size === SIZE.M;
|
|
13
|
+
return (_jsx("button", { ref: ref, "data-mobile": isMobileChipSize || undefined, className: cn(styles.chip, {
|
|
14
|
+
[styles.chipOutline]: !isDefaultType,
|
|
15
|
+
[styles.chipDefault]: isDefaultType,
|
|
16
|
+
}, className), onClick: onClick, children: _jsx(Typography.SansBodyS, { className: styles.text, children: _jsx(TruncateString, { variant: 'end', placement: 'top', text: label, maxLines: 1 }) }) }));
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Chip';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Chip';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.text{
|
|
2
|
+
color:var(--sys-neutral-text-support, #6d707f);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.chip{
|
|
6
|
+
height:32px;
|
|
7
|
+
border-radius:4px;
|
|
8
|
+
padding:8px;
|
|
9
|
+
box-sizing:border-box;
|
|
10
|
+
cursor:pointer;
|
|
11
|
+
max-width:250px;
|
|
12
|
+
width:-moz-fit-content;
|
|
13
|
+
width:fit-content;
|
|
14
|
+
}
|
|
15
|
+
.chip[data-mobile]{
|
|
16
|
+
height:40px;
|
|
17
|
+
}
|
|
18
|
+
.chip:hover{
|
|
19
|
+
border:1px solid var(--sys-neutral-decor-hovered, #cfd2dc);
|
|
20
|
+
}
|
|
21
|
+
.chip:hover .text{
|
|
22
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
23
|
+
}
|
|
24
|
+
.chip:focus{
|
|
25
|
+
border:1px solid var(--sys-neutral-decor-hovered, #cfd2dc);
|
|
26
|
+
}
|
|
27
|
+
.chip:active{
|
|
28
|
+
border:1px solid var(--sys-neutral-decor-activated, #b6bac7);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.chipDefault{
|
|
32
|
+
border:1px solid var(--sys-neutral-background, #eeeff3);
|
|
33
|
+
background-color:var(--sys-neutral-background, #eeeff3);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.chipOutline{
|
|
37
|
+
border:1px solid var(--sys-neutral-decor-default, #dde0ea);
|
|
38
|
+
background-color:transparent;
|
|
39
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
import { LayoutType } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
import { Size } from '../../types';
|
|
4
|
+
type ClaudiaChipProps = {
|
|
5
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
|
6
|
+
size: Size;
|
|
7
|
+
tooltip?: ReactNode;
|
|
8
|
+
layoutType?: LayoutType;
|
|
9
|
+
};
|
|
10
|
+
export declare const ClaudiaChip: import("react").ForwardRefExoticComponent<ClaudiaChipProps & import("react").RefAttributes<HTMLElement | HTMLButtonElement>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { AgentClaudiaSVG } from '@sbercloud/uikit-product-icons';
|
|
4
|
+
import { LAYOUT_TYPE } from '@sbercloud/uikit-product-utils';
|
|
5
|
+
import { Tooltip } from '@snack-uikit/tooltip';
|
|
6
|
+
import { ButtonClaudia } from '../../../ButtonClaudia';
|
|
7
|
+
import { SIZE } from '../../types';
|
|
8
|
+
export const ClaudiaChip = forwardRef(({ onClick, size, tooltip, layoutType }, ref) => {
|
|
9
|
+
const isMobile = layoutType === LAYOUT_TYPE.Mobile || size === SIZE.M;
|
|
10
|
+
const totalSize = isMobile ? SIZE.M : size;
|
|
11
|
+
if (!tooltip) {
|
|
12
|
+
return (_jsx(ButtonClaudia, { size: totalSize, "data-mobile": isMobile, ref: ref, onClick: onClick, icon: _jsx(AgentClaudiaSVG, { size: 24 }) }));
|
|
13
|
+
}
|
|
14
|
+
return (_jsx(Tooltip, { triggerRef: ref, tip: tooltip, children: _jsx(ButtonClaudia, { size: totalSize, "data-mobile": isMobile, onClick: onClick, icon: _jsx(AgentClaudiaSVG, { size: 24 }) }) }));
|
|
15
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ClaudiaChip';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ClaudiaChip';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { LayoutType } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
import { Size } from '../../types';
|
|
4
|
+
type CloseChipProps = {
|
|
5
|
+
content: ReactNode;
|
|
6
|
+
size: Size;
|
|
7
|
+
layoutType?: LayoutType;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
isVisible?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function CloseChip({ size, content, onClick, isVisible, layoutType }: CloseChipProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState } from 'react';
|
|
3
|
+
import { MoreInterfaceSVG } from '@sbercloud/uikit-product-icons';
|
|
4
|
+
import { MobileDropdown } from '@sbercloud/uikit-product-mobile-dropdown';
|
|
5
|
+
import { LAYOUT_TYPE } from '@sbercloud/uikit-product-utils';
|
|
6
|
+
import { Dropdown } from '@snack-uikit/dropdown';
|
|
7
|
+
import { Typography } from '@snack-uikit/typography';
|
|
8
|
+
import { useOutsideClick } from '../../hooks';
|
|
9
|
+
import { SIZE } from '../../types';
|
|
10
|
+
import styles from './styles.module.css';
|
|
11
|
+
function DropdownContent({ content, onClick, closeDropdown, isMobileChipSize }) {
|
|
12
|
+
const onDropdownItemClick = () => {
|
|
13
|
+
closeDropdown();
|
|
14
|
+
onClick();
|
|
15
|
+
};
|
|
16
|
+
const TypographyComponent = isMobileChipSize ? Typography.SansBodyM : Typography.SansBodyS;
|
|
17
|
+
return (_jsx("div", { className: styles.dropdown, children: _jsx("button", { className: styles.dropdownItem, "data-mobile": isMobileChipSize || undefined, onClick: onDropdownItemClick, children: _jsx(TypographyComponent, { children: content }) }) }));
|
|
18
|
+
}
|
|
19
|
+
export function CloseChip({ size, content, onClick, isVisible, layoutType }) {
|
|
20
|
+
const [isDropdownOpen, setDropdownOpen] = useState(false);
|
|
21
|
+
const ref = useRef(null);
|
|
22
|
+
const isMobile = layoutType === LAYOUT_TYPE.Mobile;
|
|
23
|
+
const isMobileChipSize = isMobile || size === SIZE.M;
|
|
24
|
+
const openDropdown = () => setDropdownOpen(true);
|
|
25
|
+
const closeDropdown = () => setDropdownOpen(false);
|
|
26
|
+
useOutsideClick([ref], closeDropdown);
|
|
27
|
+
if (isMobile) {
|
|
28
|
+
return (_jsx(MobileDropdown, { open: isDropdownOpen, content: _jsx(DropdownContent, { isMobileChipSize: isMobileChipSize, closeDropdown: closeDropdown, content: content, onClick: onClick }), children: _jsx("button", { "data-hidden": !isVisible || undefined, "data-mobile": true, className: styles.closeChip, ref: ref, onClick: openDropdown, children: _jsx(MoreInterfaceSVG, { size: 24 }) }) }));
|
|
29
|
+
}
|
|
30
|
+
return (_jsx(Dropdown, { open: isDropdownOpen, triggerRef: ref, placement: 'bottom-end', content: _jsx(DropdownContent, { isMobileChipSize: isMobileChipSize, closeDropdown: closeDropdown, content: content, onClick: onClick }), children: _jsx("button", { "data-hidden": !isVisible || undefined, "data-mobile": isMobileChipSize || undefined, className: styles.closeChip, onClick: openDropdown, children: _jsx(MoreInterfaceSVG, { size: 24 }) }) }));
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CloseChip';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CloseChip';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.closeChip{
|
|
2
|
+
display:flex;
|
|
3
|
+
align-items:center;
|
|
4
|
+
justify-content:center;
|
|
5
|
+
width:32px;
|
|
6
|
+
height:32px;
|
|
7
|
+
transform:rotate(90deg);
|
|
8
|
+
cursor:pointer;
|
|
9
|
+
border:unset;
|
|
10
|
+
background-color:unset;
|
|
11
|
+
}
|
|
12
|
+
.closeChip[data-hidden]{
|
|
13
|
+
pointer-events:none;
|
|
14
|
+
opacity:0;
|
|
15
|
+
}
|
|
16
|
+
.closeChip[data-mobile]{
|
|
17
|
+
width:40px;
|
|
18
|
+
height:40px;
|
|
19
|
+
}
|
|
20
|
+
.closeChip svg{
|
|
21
|
+
fill:var(--sys-neutral-text-support, #6d707f);
|
|
22
|
+
}
|
|
23
|
+
.closeChip:hover svg{
|
|
24
|
+
fill:var(--sys-neutral-text-main, #41424e);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.dropdown{
|
|
28
|
+
display:flex;
|
|
29
|
+
flex-direction:column;
|
|
30
|
+
border-radius:4px;
|
|
31
|
+
padding:4px 0px;
|
|
32
|
+
box-sizing:border-box;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.dropdownItem{
|
|
36
|
+
width:100%;
|
|
37
|
+
height:32px;
|
|
38
|
+
display:flex;
|
|
39
|
+
justify-content:flex-start;
|
|
40
|
+
align-items:center;
|
|
41
|
+
cursor:pointer;
|
|
42
|
+
border:unset;
|
|
43
|
+
background-color:unset;
|
|
44
|
+
position:relative;
|
|
45
|
+
padding:0px 8px;
|
|
46
|
+
}
|
|
47
|
+
.dropdownItem[data-mobile]{
|
|
48
|
+
padding:0px 10px;
|
|
49
|
+
height:40px;
|
|
50
|
+
}
|
|
51
|
+
.dropdownItem:before{
|
|
52
|
+
pointer-events:none;
|
|
53
|
+
content:"";
|
|
54
|
+
position:absolute;
|
|
55
|
+
top:0;
|
|
56
|
+
left:0;
|
|
57
|
+
width:100%;
|
|
58
|
+
height:100%;
|
|
59
|
+
background-color:transparent;
|
|
60
|
+
}
|
|
61
|
+
.dropdownItem:hover::before{
|
|
62
|
+
background-color:var(--sys-neutral-accent-default, #787b8a);
|
|
63
|
+
opacity:0.08;
|
|
64
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LayoutType } from '@sbercloud/uikit-product-utils';
|
|
2
|
+
import { ChipProps, ChipType, Size } from '../../types';
|
|
3
|
+
type DropdownChip = {
|
|
4
|
+
label: string;
|
|
5
|
+
type: ChipType;
|
|
6
|
+
size: Size;
|
|
7
|
+
layoutType?: LayoutType;
|
|
8
|
+
dropdownItems: ChipProps[];
|
|
9
|
+
};
|
|
10
|
+
export declare function DropdownChip({ size, layoutType, type, label, dropdownItems }: DropdownChip): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState } from 'react';
|
|
3
|
+
import { MobileDropdown } from '@sbercloud/uikit-product-mobile-dropdown';
|
|
4
|
+
import { LAYOUT_TYPE } from '@sbercloud/uikit-product-utils';
|
|
5
|
+
import { Dropdown } from '@snack-uikit/dropdown';
|
|
6
|
+
import { TruncateString } from '@snack-uikit/truncate-string';
|
|
7
|
+
import { Typography } from '@snack-uikit/typography';
|
|
8
|
+
import { useOutsideClick } from '../../hooks';
|
|
9
|
+
import { SIZE } from '../../types';
|
|
10
|
+
import { Chip } from '../Chip';
|
|
11
|
+
import styles from './styles.module.css';
|
|
12
|
+
function DropdownContent({ size, dropdownItems, closeDropdown, isMobile }) {
|
|
13
|
+
const isMobileChipSize = isMobile || size === SIZE.M;
|
|
14
|
+
const TypographyComponent = isMobileChipSize ? Typography.SansBodyM : Typography.SansBodyS;
|
|
15
|
+
return (_jsx("div", { className: styles.dropdown, "data-mobile": isMobile || undefined, children: dropdownItems.map(item => (_jsx("button", { "data-mobile": isMobileChipSize || undefined, className: styles.dropdownItem, onClick: () => {
|
|
16
|
+
var _a;
|
|
17
|
+
closeDropdown();
|
|
18
|
+
(_a = item === null || item === void 0 ? void 0 : item.onClick) === null || _a === void 0 ? void 0 : _a.call(item);
|
|
19
|
+
}, children: _jsx(TypographyComponent, { children: _jsx(TruncateString, { variant: 'end', placement: 'top', text: item.label, maxLines: 1 }) }) }, item.id))) }));
|
|
20
|
+
}
|
|
21
|
+
export function DropdownChip({ size, layoutType, type, label, dropdownItems }) {
|
|
22
|
+
const [isDropdownOpen, setDropdownOpen] = useState(false);
|
|
23
|
+
const ref = useRef(null);
|
|
24
|
+
const isMobile = layoutType === LAYOUT_TYPE.Mobile;
|
|
25
|
+
const openDropdown = () => setDropdownOpen(true);
|
|
26
|
+
const closeDropdown = () => setDropdownOpen(false);
|
|
27
|
+
useOutsideClick([ref], closeDropdown);
|
|
28
|
+
if (isMobile) {
|
|
29
|
+
return (_jsx(MobileDropdown, { open: isDropdownOpen, content: _jsx(DropdownContent, { size: size, isMobile: isMobile, closeDropdown: closeDropdown, dropdownItems: dropdownItems }), children: _jsx(Chip, { ref: ref, isVisible: true, className: styles.dropdownChip, type: type, label: label, size: size, layoutType: layoutType, onClick: openDropdown }) }));
|
|
30
|
+
}
|
|
31
|
+
return (_jsx(Dropdown, { triggerRef: ref, open: isDropdownOpen, placement: 'bottom-end', content: _jsx(DropdownContent, { size: size, isMobile: isMobile, closeDropdown: closeDropdown, dropdownItems: dropdownItems }), children: _jsx(Chip, { isVisible: true, className: styles.dropdownChip, type: type, label: label, size: size, layoutType: layoutType, onClick: openDropdown }) }));
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DropdownChip';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DropdownChip';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.dropdown{
|
|
2
|
+
width:256px;
|
|
3
|
+
display:flex;
|
|
4
|
+
flex-direction:column;
|
|
5
|
+
border-radius:4px;
|
|
6
|
+
padding:4px 0px;
|
|
7
|
+
box-sizing:border-box;
|
|
8
|
+
}
|
|
9
|
+
.dropdown[data-mobile]{
|
|
10
|
+
width:100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dropdownChip{
|
|
14
|
+
min-width:33px;
|
|
15
|
+
}
|
|
16
|
+
.dropdownChip[data-mobile]{
|
|
17
|
+
min-width:40px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dropdownItem{
|
|
21
|
+
width:100%;
|
|
22
|
+
height:32px;
|
|
23
|
+
display:flex;
|
|
24
|
+
justify-content:flex-start;
|
|
25
|
+
align-items:center;
|
|
26
|
+
cursor:pointer;
|
|
27
|
+
border:unset;
|
|
28
|
+
background-color:unset;
|
|
29
|
+
padding:4px 8px;
|
|
30
|
+
position:relative;
|
|
31
|
+
}
|
|
32
|
+
.dropdownItem[data-mobile]{
|
|
33
|
+
padding:8px 10px;
|
|
34
|
+
height:40px;
|
|
35
|
+
}
|
|
36
|
+
.dropdownItem:before{
|
|
37
|
+
pointer-events:none;
|
|
38
|
+
content:"";
|
|
39
|
+
position:absolute;
|
|
40
|
+
top:0;
|
|
41
|
+
left:0;
|
|
42
|
+
width:100%;
|
|
43
|
+
height:100%;
|
|
44
|
+
background-color:transparent;
|
|
45
|
+
}
|
|
46
|
+
.dropdownItem:hover::before{
|
|
47
|
+
background-color:var(--sys-neutral-accent-default, #787b8a);
|
|
48
|
+
opacity:0.08;
|
|
49
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
export const useOutsideClick = (ref, handler) => {
|
|
3
|
+
useEffect(() => {
|
|
4
|
+
const handleClick = (event) => {
|
|
5
|
+
ref.forEach(ref => {
|
|
6
|
+
if (ref.current && event.target instanceof Element && !ref.current.contains(event.target)) {
|
|
7
|
+
handler();
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
document.body.addEventListener('click', handleClick);
|
|
12
|
+
return () => document.body.removeEventListener('click', handleClick);
|
|
13
|
+
}, [ref, handler]);
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RecommendPanel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RecommendPanel';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ValueOf } from '@snack-uikit/utils';
|
|
2
|
+
export declare const CHIP_TYPE: {
|
|
3
|
+
readonly Default: "default";
|
|
4
|
+
readonly Outline: "outline";
|
|
5
|
+
};
|
|
6
|
+
export type ChipType = ValueOf<typeof CHIP_TYPE>;
|
|
7
|
+
export type ChipProps = {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const SIZE: {
|
|
13
|
+
readonly S: "s";
|
|
14
|
+
readonly M: "m";
|
|
15
|
+
};
|
|
16
|
+
export type Size = ValueOf<typeof SIZE>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChipProps } from '../types';
|
|
2
|
+
type GetVisibleChipsCountArgs = {
|
|
3
|
+
containerWidth: number;
|
|
4
|
+
chipWidths: number[];
|
|
5
|
+
chips: ChipProps[];
|
|
6
|
+
isSmall: boolean;
|
|
7
|
+
isCloseChipExist: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const getVisibleChipsCount: ({ containerWidth, chipWidths, chips, isSmall, isCloseChipExist, }: GetVisibleChipsCountArgs) => number;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const GAP = 8;
|
|
2
|
+
export const getVisibleChipsCount = ({ containerWidth, chipWidths, chips, isSmall, isCloseChipExist, }) => {
|
|
3
|
+
if (containerWidth === 0 || chipWidths.length === 0) {
|
|
4
|
+
return chips.length;
|
|
5
|
+
}
|
|
6
|
+
const baseIcon = (isSmall ? 40 : 32) + GAP;
|
|
7
|
+
const closeIconWidth = isCloseChipExist ? baseIcon - GAP : 0;
|
|
8
|
+
let availableWidth = Math.round(containerWidth) - baseIcon - closeIconWidth;
|
|
9
|
+
let visibleCount = 0;
|
|
10
|
+
let isCounterChipExist = false;
|
|
11
|
+
let isCounterChipWidthSubstracted = false;
|
|
12
|
+
const chipsWidthWithGap = chipWidths.map(chip => Math.round(chip + GAP));
|
|
13
|
+
for (let i = 0; i < chipsWidthWithGap.length; i++) {
|
|
14
|
+
const chipWidth = chipsWidthWithGap[i];
|
|
15
|
+
if (availableWidth >= chipWidth) {
|
|
16
|
+
if (isCounterChipExist && !isCounterChipWidthSubstracted) {
|
|
17
|
+
availableWidth -= baseIcon;
|
|
18
|
+
isCounterChipWidthSubstracted = true;
|
|
19
|
+
}
|
|
20
|
+
availableWidth -= chipWidth;
|
|
21
|
+
visibleCount++;
|
|
22
|
+
if (visibleCount === chipsWidthWithGap.length) {
|
|
23
|
+
isCounterChipExist = false;
|
|
24
|
+
isCounterChipWidthSubstracted = false;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
isCounterChipExist = true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return Math.max(1, visibleCount);
|
|
35
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FieldTextAreaProps } from '@sbercloud/uikit-product-mobile-fields';
|
|
2
|
+
import { WithLayoutType } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
export type SshFieldProps = WithLayoutType<Omit<FieldTextAreaProps, 'placeholder' | 'labelTooltip' | 'label' | 'required' | 'size' | 'spellCheck' | 'footer'> & {
|
|
4
|
+
/** Колбек действия при отправке */
|
|
5
|
+
onSubmit(value: string): void;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const SshField: import("react").ForwardRefExoticComponent<Omit<FieldTextAreaProps, "label" | "size" | "placeholder" | "spellCheck" | "required" | "labelTooltip" | "footer"> & {
|
|
8
|
+
/** Колбек действия при отправке */
|
|
9
|
+
onSubmit(value: string): void;
|
|
10
|
+
} & {
|
|
11
|
+
layoutType: import("@sbercloud/uikit-product-utils").LayoutType;
|
|
12
|
+
} & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
+
var t = {};
|
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
+
t[p] = s[p];
|
|
14
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
+
t[p[i]] = s[p[i]];
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
21
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
import cn from 'classnames';
|
|
23
|
+
import { forwardRef, useState } from 'react';
|
|
24
|
+
import { themeVars } from '@sbercloud/figma-tokens-cloud-platform';
|
|
25
|
+
import { AttachmentSVG, EyeClosedSVG, EyeSVG, PasswordLockSVG } from '@sbercloud/uikit-product-icons';
|
|
26
|
+
import { useLocale } from '@sbercloud/uikit-product-locale';
|
|
27
|
+
import { AdaptiveFieldTextArea, getAdaptiveFieldProps, } from '@sbercloud/uikit-product-mobile-fields';
|
|
28
|
+
import { ButtonFunction } from '@snack-uikit/button';
|
|
29
|
+
import { DropZone, FileUpload } from '@snack-uikit/drop-zone';
|
|
30
|
+
import { Tooltip } from '@snack-uikit/tooltip';
|
|
31
|
+
import { ChatStatusAnnouncement } from '../ChatStatusAnnouncement';
|
|
32
|
+
import { MobileFieldAi } from './components/MobileFieldAi';
|
|
33
|
+
import { DropZoneContent } from './helperComponents/DropZoneContent';
|
|
34
|
+
import { FieldSubmitButton } from './helperComponents/FieldSubmitButton';
|
|
35
|
+
import { TextAreaActionsFooter } from './helperComponents/TextAreaActionsFooter';
|
|
36
|
+
import styles from './styles.module.css';
|
|
37
|
+
import { getFileErrorType } from './utils/handleFileError';
|
|
38
|
+
import { isTouchDevice as isTouchDeviceHelper } from './utils/isTouchDevice';
|
|
39
|
+
import { readFileContent } from './utils/readFileContent';
|
|
40
|
+
import { validateFileSize, validateFileType, validateSSHKeyContent } from './utils/validateSSHKey';
|
|
41
|
+
export const SshField = forwardRef((_a, ref) => {
|
|
42
|
+
var { onSubmit: handleSubmitProp, value, disabled, className } = _a, props = __rest(_a, ["onSubmit", "value", "disabled", "className"]);
|
|
43
|
+
const { layoutType, validationState, onChange } = props;
|
|
44
|
+
const { t } = useLocale('Claudia');
|
|
45
|
+
const isTouchDevice = isTouchDeviceHelper(layoutType);
|
|
46
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
47
|
+
const [isDragOver, setIsDragOver] = useState(false);
|
|
48
|
+
const [isValueHidden, setIsValueHidden] = useState(true);
|
|
49
|
+
const [fileErrorType, setFileErrorType] = useState(null);
|
|
50
|
+
const isValueValid = typeof value === 'string' && value.trim().length > 0;
|
|
51
|
+
const showFileError = Boolean(fileErrorType);
|
|
52
|
+
const getErrorMessage = (errorType) => {
|
|
53
|
+
switch (errorType) {
|
|
54
|
+
case 'EMPTY_FILE':
|
|
55
|
+
return t('SshField.errors.emptyFile');
|
|
56
|
+
case 'BINARY_DATA':
|
|
57
|
+
return t('SshField.errors.binaryData');
|
|
58
|
+
case 'INVALID_SSH_KEY':
|
|
59
|
+
return t('SshField.errors.invalidSSHKey');
|
|
60
|
+
case 'INVALID_EXTENSION':
|
|
61
|
+
case 'INVALID_MIME_TYPE':
|
|
62
|
+
case 'INVALID_FILE_TYPE':
|
|
63
|
+
return t('SshField.errors.invalidFileExtension');
|
|
64
|
+
case 'FILE_TOO_LARGE':
|
|
65
|
+
return t('SshField.errors.fileTooLarge');
|
|
66
|
+
case 'READ_ERROR':
|
|
67
|
+
return t('SshField.errors.readError');
|
|
68
|
+
case 'UNKNOWN_ERROR':
|
|
69
|
+
default:
|
|
70
|
+
return t('SshField.errors.unknownError');
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const handleChange = (newValue) => {
|
|
74
|
+
if (fileErrorType) {
|
|
75
|
+
setFileErrorType(null);
|
|
76
|
+
}
|
|
77
|
+
if (onChange) {
|
|
78
|
+
onChange(newValue);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const handleDragOver = (event) => {
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
setIsDragOver(true);
|
|
84
|
+
};
|
|
85
|
+
const handleDragLeave = (event) => {
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
setIsDragOver(false);
|
|
88
|
+
};
|
|
89
|
+
const handleSubmit = () => {
|
|
90
|
+
if (isValueValid) {
|
|
91
|
+
handleSubmitProp(value);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const handleKeyDown = e => {
|
|
95
|
+
if (isTouchDevice) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (e.key === 'Enter' && !e.shiftKey) {
|
|
99
|
+
e.preventDefault();
|
|
100
|
+
if (!disabled) {
|
|
101
|
+
handleSubmit();
|
|
102
|
+
}
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
const onFileUpload = (file) => __awaiter(void 0, void 0, void 0, function* () {
|
|
107
|
+
try {
|
|
108
|
+
setIsLoading(true);
|
|
109
|
+
setFileErrorType(null);
|
|
110
|
+
validateFileType(file);
|
|
111
|
+
validateFileSize(file);
|
|
112
|
+
const fileContent = yield readFileContent(file);
|
|
113
|
+
validateSSHKeyContent(fileContent);
|
|
114
|
+
if (onChange) {
|
|
115
|
+
onChange(fileContent);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
catch (err) {
|
|
119
|
+
const errorType = getFileErrorType(err);
|
|
120
|
+
setFileErrorType(errorType);
|
|
121
|
+
}
|
|
122
|
+
finally {
|
|
123
|
+
setIsLoading(false);
|
|
124
|
+
setIsDragOver(false);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
if (isTouchDevice) {
|
|
128
|
+
return (_jsx(MobileFieldAi, Object.assign({}, props, getAdaptiveFieldProps(props), { onSubmit: handleSubmit, submitEnabled: isValueValid && !disabled, ref: ref, value: value })));
|
|
129
|
+
}
|
|
130
|
+
return (_jsxs("div", { className: cn(styles.wrapper, className), onDragOver: handleDragOver, onDragLeave: handleDragLeave, children: [_jsx(ChatStatusAnnouncement, { className: styles.chatStatus, layoutType: layoutType, icon: _jsx(PasswordLockSVG, { size: 16, color: themeVars.sys.neutral.textSupport }), content: t('SshField.chatStatusAnnouncement.content'), actionLabel: t('SshField.chatStatusAnnouncement.cancel'), onActionClick: () => { } }), isDragOver ? (_jsx(DropZone, { description: _jsx(DropZoneContent, {}), className: styles.dropZone, mode: 'single', onFilesUpload: (files) => onFileUpload(files[0]) })) : (_jsx(AdaptiveFieldTextArea, Object.assign({}, props, { ref: ref, value: value, onChange: handleChange, size: 'm', disabled: isLoading, minRows: 2, maxRows: 4, placeholder: t('SshField.placeholder'), className: isValueHidden ? styles.secured : undefined, onKeyDown: handleKeyDown, validationState: showFileError ? 'error' : validationState, hint: showFileError && fileErrorType ? getErrorMessage(fileErrorType) : props.hint, footer: _jsx(TextAreaActionsFooter, { left: _jsx(ButtonFunction, { size: 'xs', icon: isValueHidden ? _jsx(EyeSVG, {}) : _jsx(EyeClosedSVG, {}), onClick: () => setIsValueHidden(prev => !prev), disabled: isLoading }), right: _jsxs(_Fragment, { children: [_jsx(Tooltip, { tip: t('SshField.attachFileTooltip'), hoverDelayOpen: 600, triggerClassName: styles.uploadTooltip, open: isTouchDevice ? false : undefined, children: _jsx(FileUpload, { mode: 'single', onFilesUpload: (files) => onFileUpload(files[0]), children: _jsx(ButtonFunction, { disabled: isLoading, size: isTouchDevice ? 's' : 'xs', icon: _jsx(AttachmentSVG, {}) }) }) }), _jsx(FieldSubmitButton, { disabled: isLoading, showTooltip: !isTouchDevice, className: isTouchDevice ? styles.mobileSubmitButton : undefined, active: isValueValid && !disabled, handleClick: handleSubmit, size: isTouchDevice ? 's' : 'xs' })] }) }) })))] }));
|
|
131
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FieldTextAreaProps } from '@sbercloud/uikit-product-mobile-fields';
|
|
2
|
+
export declare const MobileFieldAi: import("react").ForwardRefExoticComponent<Omit<FieldTextAreaProps, "label" | "size" | "placeholder" | "spellCheck" | "required" | "labelTooltip" | "footer"> & {
|
|
3
|
+
onSubmit(): void;
|
|
4
|
+
submitEnabled: boolean;
|
|
5
|
+
} & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { forwardRef } from 'react';
|
|
14
|
+
import { AttachmentSVG } from '@sbercloud/uikit-product-icons';
|
|
15
|
+
import { useLocale } from '@sbercloud/uikit-product-locale';
|
|
16
|
+
import { ButtonFunction } from '@snack-uikit/button';
|
|
17
|
+
import { FileUpload } from '@snack-uikit/drop-zone';
|
|
18
|
+
import { Scroll } from '@snack-uikit/scroll';
|
|
19
|
+
import { Tooltip } from '@snack-uikit/tooltip';
|
|
20
|
+
import { FieldSubmitButton } from '../../helperComponents/FieldSubmitButton';
|
|
21
|
+
import { TextArea } from '../TextArea';
|
|
22
|
+
import styles from './styles.module.css';
|
|
23
|
+
const MIN_ROWS = 1;
|
|
24
|
+
const MAX_ROWS = 6;
|
|
25
|
+
export const MobileFieldAi = forwardRef((_a, ref) => {
|
|
26
|
+
var { onSubmit, value, submitEnabled } = _a, props = __rest(_a, ["onSubmit", "value", "submitEnabled"]);
|
|
27
|
+
const { t } = useLocale('FieldsPredefined');
|
|
28
|
+
return (_jsxs("div", { className: styles.mobileInputWrapper, style: { '--max-rows': MAX_ROWS, '--min-rows': MIN_ROWS }, "data-size": 'm', children: [_jsx(Scroll, { className: styles.scrollContainer, size: 's', barHideStrategy: 'never', children: _jsx(TextArea, Object.assign({}, props, { className: styles.textarea, ref: ref, value: value, minRows: MIN_ROWS, placeholder: t('FieldAi.regular.placeholder'), spellCheck: true })) }), _jsxs("div", { className: styles.mobileSubmitButtonWrapper, children: [_jsx(Tooltip, { disableSpanWrapper: true, tip: t('FieldChat.attachFileTooltip'), hoverDelayOpen: 600, triggerClassName: styles.uploadTooltip, children: _jsx(FileUpload, { mode: 'multiple', onFilesUpload: () => { }, children: _jsx(ButtonFunction, { size: 's', icon: _jsx(AttachmentSVG, {}) }) }) }), _jsx(FieldSubmitButton, { showTooltip: false, className: styles.mobileSubmitButton, fullWidth: true, active: submitEnabled, handleClick: onSubmit, size: 's' })] })] }));
|
|
29
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MobileFieldAi';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MobileFieldAi';
|