@atlaskit/media-card 73.6.0 → 74.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/dist/cjs/files/cardImageView/cardImageViewWrapper.js +60 -0
- package/dist/cjs/files/cardImageView/cardOverlay/cardOverlayComponents.js +63 -0
- package/dist/cjs/files/cardImageView/cardOverlay/index.js +31 -19
- package/dist/cjs/files/cardImageView/cardOverlay/styles.js +75 -0
- package/dist/cjs/files/cardImageView/index.js +39 -28
- package/dist/cjs/files/cardImageView/styles.js +60 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/root/card/cardAnalytics.js +1 -25
- package/dist/cjs/root/card/getCardPreview/cache.js +9 -10
- package/dist/cjs/root/card/getCardPreview/index.js +36 -26
- package/dist/cjs/root/card/index.js +25 -20
- package/dist/cjs/root/cardView.js +49 -50
- package/dist/cjs/root/cardViewWrapper.js +35 -0
- package/dist/cjs/root/inlinePlayer.js +15 -15
- package/dist/cjs/root/inlinePlayerWrapper.js +32 -0
- package/dist/cjs/root/styles.js +57 -0
- package/dist/cjs/root/types.js +5 -0
- package/dist/cjs/root/ui/actionsBar/actionsBar.js +2 -2
- package/dist/cjs/root/ui/actionsBar/actionsBarWrapper.js +21 -0
- package/dist/cjs/root/ui/actionsBar/styles.js +28 -0
- package/dist/cjs/root/ui/actionsBar/types.js +5 -0
- package/dist/cjs/root/ui/blanket/blanket.js +21 -0
- package/dist/cjs/root/ui/blanket/styles.js +30 -0
- package/dist/cjs/root/ui/iconMessage/iconMessageWrapper.js +25 -0
- package/dist/cjs/root/ui/iconMessage/index.js +3 -5
- package/dist/cjs/root/ui/iconMessage/styles.js +32 -0
- package/dist/cjs/root/ui/iconMessage/types.js +5 -0
- package/dist/cjs/root/ui/iconWrapper/iconWrapper.js +25 -0
- package/dist/cjs/root/ui/iconWrapper/{styled.js → styles.js} +7 -7
- package/dist/cjs/root/ui/iconWrapper/types.js +5 -0
- package/dist/cjs/root/ui/loadingRateLimited/styles.js +36 -0
- package/dist/cjs/root/ui/newFileExperience/newFileExperienceWrapper.js +52 -0
- package/dist/cjs/root/ui/newFileExperience/styles.js +47 -0
- package/dist/cjs/root/ui/newFileExperience/types.js +5 -0
- package/dist/cjs/root/ui/playButton/playButton.js +4 -2
- package/dist/cjs/root/ui/playButton/playButtonBackground.js +20 -0
- package/dist/cjs/root/ui/playButton/playButtonWrapper.js +20 -0
- package/dist/cjs/root/ui/playButton/styles.js +29 -0
- package/dist/cjs/root/ui/progressBar/progressBar.js +10 -5
- package/dist/cjs/root/ui/progressBar/styledBar.js +29 -0
- package/dist/cjs/root/ui/progressBar/{styled.js → styles.js} +11 -7
- package/dist/cjs/root/ui/progressBar/types.js +5 -0
- package/dist/cjs/root/ui/{styled.js → styles.js} +23 -40
- package/dist/cjs/root/ui/tickBox/styles.js +36 -0
- package/dist/cjs/root/ui/tickBox/tickBox.js +3 -3
- package/dist/cjs/root/ui/tickBox/tickBoxWrapper.js +21 -0
- package/dist/cjs/root/ui/tickBox/types.js +5 -0
- package/dist/cjs/root/ui/titleBox/failedTitleBox.js +5 -7
- package/dist/cjs/root/ui/titleBox/styles.js +62 -0
- package/dist/cjs/root/ui/titleBox/titleBox.js +7 -7
- package/dist/cjs/root/ui/titleBox/titleBoxComponents.js +66 -0
- package/dist/cjs/root/ui/titleBox/types.js +5 -0
- package/dist/cjs/styles/animations.js +2 -2
- package/dist/cjs/styles/index.js +12 -7
- package/dist/cjs/types.js +0 -1
- package/dist/cjs/utils/analytics.js +15 -1
- package/dist/cjs/utils/cardActions/cardActionButton.js +24 -0
- package/dist/cjs/utils/cardActions/cardActionIconButton.js +2 -3
- package/dist/cjs/utils/cardActions/cardActionsDropdownMenu.js +3 -3
- package/dist/cjs/utils/cardActions/cardActionsView.js +11 -13
- package/dist/cjs/utils/cardActions/index.js +2 -2
- package/dist/cjs/utils/cardActions/{styled.js → styles.js} +8 -8
- package/dist/cjs/utils/errorIcon/index.js +8 -10
- package/dist/cjs/utils/errorIcon/styles.js +17 -0
- package/dist/cjs/utils/fileIcon/index.js +9 -14
- package/dist/cjs/utils/fileIcon/styles.js +19 -0
- package/dist/cjs/utils/getMediaCardCursor.js +5 -2
- package/dist/cjs/utils/lightCards/cardError.js +2 -2
- package/dist/cjs/utils/lightCards/cardLoading.js +3 -3
- package/dist/cjs/utils/lightCards/lightCardWrappers.js +41 -0
- package/dist/cjs/utils/lightCards/styles.js +47 -0
- package/dist/cjs/utils/mediaTypeIcon/iconWrapper.js +20 -0
- package/dist/cjs/utils/mediaTypeIcon/index.js +2 -2
- package/dist/cjs/utils/mediaTypeIcon/{styled.js → styles.js} +9 -5
- package/dist/cjs/utils/mediaTypeIcon/types.js +5 -0
- package/dist/cjs/utils/progressBar/index.js +7 -9
- package/dist/cjs/utils/progressBar/styles.js +19 -0
- package/dist/cjs/utils/ufoExperiences.js +18 -18
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/files/cardImageView/cardImageViewWrapper.js +43 -0
- package/dist/es2019/files/cardImageView/cardOverlay/cardOverlayComponents.js +41 -0
- package/dist/es2019/files/cardImageView/cardOverlay/index.js +29 -15
- package/dist/es2019/files/cardImageView/cardOverlay/{styled.js → styles.js} +34 -25
- package/dist/es2019/files/cardImageView/index.js +38 -26
- package/dist/es2019/files/cardImageView/{styled.js → styles.js} +15 -14
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/root/card/cardAnalytics.js +0 -11
- package/dist/es2019/root/card/getCardPreview/cache.js +9 -10
- package/dist/es2019/root/card/getCardPreview/index.js +16 -8
- package/dist/es2019/root/card/index.js +22 -15
- package/dist/es2019/root/cardView.js +40 -39
- package/dist/es2019/root/cardViewWrapper.js +26 -0
- package/dist/es2019/root/inlinePlayer.js +9 -7
- package/dist/es2019/root/inlinePlayerWrapper.js +23 -0
- package/dist/es2019/root/{styled.js → styles.js} +18 -19
- package/dist/es2019/root/types.js +1 -0
- package/dist/es2019/root/ui/actionsBar/actionsBar.js +2 -2
- package/dist/es2019/root/ui/actionsBar/actionsBarWrapper.js +10 -0
- package/dist/es2019/root/ui/actionsBar/styles.js +15 -0
- package/dist/es2019/root/ui/actionsBar/types.js +1 -0
- package/dist/es2019/root/ui/blanket/blanket.js +12 -0
- package/dist/es2019/root/ui/blanket/styles.js +17 -0
- package/dist/es2019/root/ui/iconMessage/iconMessageWrapper.js +16 -0
- package/dist/es2019/root/ui/iconMessage/index.js +2 -3
- package/dist/es2019/root/ui/iconMessage/styles.js +32 -0
- package/dist/es2019/root/ui/iconMessage/types.js +1 -0
- package/dist/es2019/root/ui/iconWrapper/iconWrapper.js +16 -0
- package/dist/es2019/root/ui/iconWrapper/styles.js +25 -0
- package/dist/es2019/root/ui/iconWrapper/types.js +1 -0
- package/dist/es2019/root/ui/loadingRateLimited/styles.js +41 -0
- package/dist/es2019/root/ui/newFileExperience/newFileExperienceWrapper.js +42 -0
- package/dist/es2019/root/ui/newFileExperience/styles.js +50 -0
- package/dist/es2019/root/ui/newFileExperience/types.js +1 -0
- package/dist/es2019/root/ui/playButton/playButton.js +3 -2
- package/dist/es2019/root/ui/playButton/playButtonBackground.js +9 -0
- package/dist/es2019/root/ui/playButton/playButtonWrapper.js +9 -0
- package/dist/es2019/root/ui/playButton/{styled.js → styles.js} +5 -11
- package/dist/es2019/root/ui/progressBar/progressBar.js +5 -3
- package/dist/es2019/root/ui/progressBar/styledBar.js +20 -0
- package/dist/es2019/root/ui/progressBar/{styled.js → styles.js} +28 -24
- package/dist/es2019/root/ui/progressBar/types.js +1 -0
- package/dist/es2019/root/ui/styles.js +78 -0
- package/dist/es2019/root/ui/tickBox/styles.js +30 -0
- package/dist/es2019/root/ui/tickBox/tickBox.js +2 -2
- package/dist/es2019/root/ui/tickBox/tickBoxWrapper.js +10 -0
- package/dist/es2019/root/ui/tickBox/types.js +1 -0
- package/dist/es2019/root/ui/titleBox/failedTitleBox.js +3 -4
- package/dist/es2019/root/ui/titleBox/styles.js +68 -0
- package/dist/es2019/root/ui/titleBox/titleBox.js +2 -2
- package/dist/es2019/root/ui/titleBox/titleBoxComponents.js +49 -0
- package/dist/es2019/root/ui/titleBox/types.js +1 -0
- package/dist/es2019/styles/animations.js +1 -1
- package/dist/es2019/styles/index.js +4 -4
- package/dist/es2019/types.js +0 -1
- package/dist/es2019/utils/analytics.js +12 -1
- package/dist/es2019/utils/cardActions/cardActionButton.js +13 -0
- package/dist/es2019/utils/cardActions/cardActionIconButton.js +1 -2
- package/dist/es2019/utils/cardActions/cardActionsDropdownMenu.js +1 -1
- package/dist/es2019/utils/cardActions/cardActionsView.js +9 -6
- package/dist/es2019/utils/cardActions/index.js +1 -1
- package/dist/es2019/utils/cardActions/{styled.js → styles.js} +14 -12
- package/dist/es2019/utils/errorIcon/index.js +7 -3
- package/dist/es2019/utils/errorIcon/styles.js +5 -0
- package/dist/es2019/utils/fileIcon/index.js +7 -5
- package/dist/es2019/utils/fileIcon/{styled.js → styles.js} +2 -2
- package/dist/es2019/utils/getMediaCardCursor.js +6 -2
- package/dist/es2019/utils/lightCards/cardError.js +1 -1
- package/dist/es2019/utils/lightCards/cardLoading.js +1 -1
- package/dist/es2019/utils/lightCards/lightCardWrappers.js +24 -0
- package/dist/es2019/utils/lightCards/{styled.js → styles.js} +16 -9
- package/dist/es2019/utils/mediaTypeIcon/iconWrapper.js +9 -0
- package/dist/es2019/utils/mediaTypeIcon/index.js +1 -1
- package/dist/es2019/utils/mediaTypeIcon/{styled.js → styles.js} +10 -5
- package/dist/es2019/utils/mediaTypeIcon/types.js +1 -0
- package/dist/es2019/utils/progressBar/index.js +6 -3
- package/dist/es2019/utils/progressBar/{styled.js → styles.js} +2 -2
- package/dist/es2019/utils/ufoExperiences.js +15 -14
- package/dist/es2019/version.json +1 -1
- package/dist/esm/files/cardImageView/cardImageViewWrapper.js +41 -0
- package/dist/esm/files/cardImageView/cardOverlay/cardOverlayComponents.js +39 -0
- package/dist/esm/files/cardImageView/cardOverlay/index.js +28 -15
- package/dist/esm/files/cardImageView/cardOverlay/styles.js +46 -0
- package/dist/esm/files/cardImageView/index.js +37 -26
- package/dist/esm/files/cardImageView/styles.js +36 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/root/card/cardAnalytics.js +0 -15
- package/dist/esm/root/card/getCardPreview/cache.js +9 -10
- package/dist/esm/root/card/getCardPreview/helpers.js +1 -1
- package/dist/esm/root/card/getCardPreview/index.js +35 -27
- package/dist/esm/root/card/index.js +23 -18
- package/dist/esm/root/cardView.js +39 -39
- package/dist/esm/root/cardViewWrapper.js +24 -0
- package/dist/esm/root/inline/loader.js +1 -1
- package/dist/esm/root/inlinePlayer.js +10 -8
- package/dist/esm/root/inlinePlayerWrapper.js +21 -0
- package/dist/esm/root/styles.js +36 -0
- package/dist/esm/root/types.js +1 -0
- package/dist/esm/root/ui/actionsBar/actionsBar.js +2 -2
- package/dist/esm/root/ui/actionsBar/actionsBarWrapper.js +10 -0
- package/dist/esm/root/ui/actionsBar/styles.js +12 -0
- package/dist/esm/root/ui/actionsBar/types.js +1 -0
- package/dist/esm/root/ui/blanket/blanket.js +10 -0
- package/dist/esm/root/ui/blanket/styles.js +13 -0
- package/dist/esm/root/ui/iconMessage/iconMessageWrapper.js +14 -0
- package/dist/esm/root/ui/iconMessage/index.js +2 -3
- package/dist/esm/root/ui/iconMessage/styles.js +19 -0
- package/dist/esm/root/ui/iconMessage/types.js +1 -0
- package/dist/esm/root/ui/iconWrapper/iconWrapper.js +14 -0
- package/dist/esm/root/ui/iconWrapper/{styled.js → styles.js} +5 -5
- package/dist/esm/root/ui/iconWrapper/types.js +1 -0
- package/dist/esm/root/ui/loadingRateLimited/styles.js +17 -0
- package/dist/esm/root/ui/newFileExperience/newFileExperienceWrapper.js +40 -0
- package/dist/esm/root/ui/newFileExperience/styles.js +27 -0
- package/dist/esm/root/ui/newFileExperience/types.js +1 -0
- package/dist/esm/root/ui/playButton/playButton.js +3 -2
- package/dist/esm/root/ui/playButton/playButtonBackground.js +9 -0
- package/dist/esm/root/ui/playButton/playButtonWrapper.js +9 -0
- package/dist/esm/root/ui/playButton/styles.js +13 -0
- package/dist/esm/root/ui/progressBar/progressBar.js +5 -3
- package/dist/esm/root/ui/progressBar/styledBar.js +18 -0
- package/dist/esm/root/ui/progressBar/{styled.js → styles.js} +10 -5
- package/dist/esm/root/ui/progressBar/types.js +1 -0
- package/dist/esm/root/ui/styles.js +72 -0
- package/dist/esm/root/ui/tickBox/styles.js +16 -0
- package/dist/esm/root/ui/tickBox/tickBox.js +2 -2
- package/dist/esm/root/ui/tickBox/tickBoxWrapper.js +10 -0
- package/dist/esm/root/ui/tickBox/types.js +1 -0
- package/dist/esm/root/ui/titleBox/failedTitleBox.js +3 -4
- package/dist/esm/root/ui/titleBox/styles.js +39 -0
- package/dist/esm/root/ui/titleBox/titleBox.js +2 -2
- package/dist/esm/root/ui/titleBox/titleBoxComponents.js +43 -0
- package/dist/esm/root/ui/titleBox/types.js +1 -0
- package/dist/esm/styles/animations.js +1 -1
- package/dist/esm/styles/index.js +8 -4
- package/dist/esm/types.js +0 -1
- package/dist/esm/utils/analytics.js +12 -1
- package/dist/esm/utils/cardActions/cardActionButton.js +13 -0
- package/dist/esm/utils/cardActions/cardActionIconButton.js +1 -2
- package/dist/esm/utils/cardActions/cardActionsDropdownMenu.js +1 -1
- package/dist/esm/utils/cardActions/cardActionsView.js +9 -6
- package/dist/esm/utils/cardActions/index.js +1 -1
- package/dist/esm/utils/cardActions/{styled.js → styles.js} +6 -6
- package/dist/esm/utils/errorIcon/index.js +6 -3
- package/dist/esm/utils/errorIcon/styles.js +6 -0
- package/dist/esm/utils/fileIcon/index.js +7 -5
- package/dist/esm/utils/fileIcon/styles.js +7 -0
- package/dist/esm/utils/getMediaCardCursor.js +6 -2
- package/dist/esm/utils/lightCards/cardError.js +1 -1
- package/dist/esm/utils/lightCards/cardLoading.js +1 -1
- package/dist/esm/utils/lightCards/lightCardWrappers.js +24 -0
- package/dist/esm/utils/lightCards/styles.js +28 -0
- package/dist/esm/utils/mediaTypeIcon/iconWrapper.js +9 -0
- package/dist/esm/utils/mediaTypeIcon/index.js +1 -1
- package/dist/esm/utils/mediaTypeIcon/{styled.js → styles.js} +8 -3
- package/dist/esm/utils/mediaTypeIcon/types.js +1 -0
- package/dist/esm/utils/progressBar/index.js +6 -3
- package/dist/esm/utils/progressBar/styles.js +7 -0
- package/dist/esm/utils/ufoExperiences.js +15 -14
- package/dist/esm/utils/videoSnapshot.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/files/cardImageView/cardImageViewWrapper.d.ts +6 -0
- package/dist/types/files/cardImageView/cardOverlay/cardOverlayComponents.d.ts +8 -0
- package/dist/types/files/cardImageView/cardOverlay/index.d.ts +6 -4
- package/dist/types/files/cardImageView/cardOverlay/styles.d.ts +26 -0
- package/dist/types/files/cardImageView/index.d.ts +3 -1
- package/dist/types/files/cardImageView/styles.d.ts +24 -0
- package/dist/types/index.d.ts +6 -1
- package/dist/types/root/card/cardAnalytics.d.ts +0 -10
- package/dist/types/root/card/getCardPreview/cache.d.ts +9 -8
- package/dist/types/root/card/getCardPreview/index.d.ts +7 -5
- package/dist/types/root/cardView.d.ts +5 -3
- package/dist/types/root/cardViewWrapper.d.ts +4 -0
- package/dist/types/root/inlinePlayer.d.ts +1 -1
- package/dist/types/root/inlinePlayerWrapper.d.ts +4 -0
- package/dist/types/root/styles.d.ts +10 -0
- package/dist/types/root/types.d.ts +24 -0
- package/dist/types/root/ui/actionsBar/actionsBar.d.ts +1 -5
- package/dist/types/root/ui/actionsBar/actionsBarWrapper.d.ts +4 -0
- package/dist/types/root/ui/actionsBar/styles.d.ts +6 -0
- package/dist/types/root/ui/actionsBar/types.d.ts +10 -0
- package/dist/types/root/ui/blanket/blanket.d.ts +6 -0
- package/dist/types/root/ui/blanket/styles.d.ts +6 -0
- package/dist/types/root/ui/iconMessage/iconMessageWrapper.d.ts +4 -0
- package/dist/types/root/ui/iconMessage/index.d.ts +1 -10
- package/dist/types/root/ui/iconMessage/styles.d.ts +5 -0
- package/dist/types/root/ui/iconMessage/types.d.ts +19 -0
- package/dist/types/root/ui/iconWrapper/iconWrapper.d.ts +4 -0
- package/dist/types/root/ui/iconWrapper/styles.d.ts +7 -0
- package/dist/types/root/ui/iconWrapper/types.d.ts +6 -0
- package/dist/types/root/ui/loadingRateLimited/styles.d.ts +13 -0
- package/dist/types/root/ui/newFileExperience/newFileExperienceWrapper.d.ts +4 -0
- package/dist/types/root/ui/newFileExperience/styles.d.ts +5 -0
- package/dist/types/root/ui/newFileExperience/types.d.ts +23 -0
- package/dist/types/root/ui/playButton/playButtonBackground.d.ts +3 -0
- package/dist/types/root/ui/playButton/playButtonWrapper.d.ts +3 -0
- package/dist/types/root/ui/playButton/styles.d.ts +5 -0
- package/dist/types/root/ui/progressBar/progressBar.d.ts +1 -0
- package/dist/types/root/ui/progressBar/styledBar.d.ts +4 -0
- package/dist/types/root/ui/progressBar/styles.d.ts +7 -0
- package/dist/types/root/ui/progressBar/types.d.ts +7 -0
- package/dist/types/root/ui/styles.d.ts +11 -0
- package/dist/types/root/ui/tickBox/styles.d.ts +7 -0
- package/dist/types/root/ui/tickBox/tickBox.d.ts +1 -3
- package/dist/types/root/ui/tickBox/tickBoxWrapper.d.ts +4 -0
- package/dist/types/root/ui/tickBox/types.d.ts +4 -0
- package/dist/types/root/ui/titleBox/failedTitleBox.d.ts +1 -7
- package/dist/types/root/ui/titleBox/styles.d.ts +15 -0
- package/dist/types/root/ui/titleBox/titleBox.d.ts +1 -13
- package/dist/types/root/ui/titleBox/titleBoxComponents.d.ts +8 -0
- package/dist/types/root/ui/titleBox/types.d.ts +32 -0
- package/dist/types/styles/animations.d.ts +1 -1
- package/dist/types/styles/index.d.ts +3 -4
- package/dist/types/styles/mixins.d.ts +2 -2
- package/dist/types/types.d.ts +2 -1
- package/dist/types/utils/analytics.d.ts +2 -0
- package/dist/types/utils/cardActions/cardActionButton.d.ts +4 -0
- package/dist/types/utils/cardActions/cardActionIconButton.d.ts +1 -1
- package/dist/types/utils/cardActions/cardActionsDropdownMenu.d.ts +1 -1
- package/dist/types/utils/cardActions/cardActionsView.d.ts +1 -1
- package/dist/types/utils/cardActions/index.d.ts +1 -1
- package/dist/types/utils/cardActions/styles.d.ts +18 -0
- package/dist/types/utils/errorIcon/index.d.ts +3 -1
- package/dist/types/utils/errorIcon/styles.d.ts +1 -0
- package/dist/types/utils/fileIcon/index.d.ts +3 -1
- package/dist/types/utils/fileIcon/styles.d.ts +1 -0
- package/dist/types/utils/getMediaCardCursor.d.ts +4 -1
- package/dist/types/utils/lightCards/lightCardWrappers.d.ts +5 -0
- package/dist/types/utils/lightCards/styles.d.ts +4 -0
- package/dist/types/utils/lightCards/types.d.ts +8 -0
- package/dist/types/utils/mediaTypeIcon/iconWrapper.d.ts +4 -0
- package/dist/types/utils/mediaTypeIcon/styles.d.ts +2 -0
- package/dist/types/utils/mediaTypeIcon/types.d.ts +6 -0
- package/dist/types/utils/progressBar/index.d.ts +3 -1
- package/dist/types/utils/progressBar/styles.d.ts +1 -0
- package/dist/types/utils/ufoExperiences.d.ts +2 -2
- package/example-helpers/cardViewWrapper.tsx +26 -0
- package/example-helpers/cards.tsx +417 -0
- package/example-helpers/index.tsx +20 -9
- package/example-helpers/styles.ts +115 -0
- package/package.json +11 -11
- package/report.api.md +269 -0
- package/dist/cjs/files/cardImageView/cardOverlay/styled.js +0 -86
- package/dist/cjs/files/cardImageView/styled.js +0 -73
- package/dist/cjs/root/styled.js +0 -58
- package/dist/cjs/root/ui/actionsBar/styled.js +0 -31
- package/dist/cjs/root/ui/blanket/styled.js +0 -33
- package/dist/cjs/root/ui/iconMessage/styled.js +0 -34
- package/dist/cjs/root/ui/loadingRateLimited/loadingRateLimited.js +0 -35
- package/dist/cjs/root/ui/loadingRateLimited/styled.js +0 -43
- package/dist/cjs/root/ui/playButton/styled.js +0 -38
- package/dist/cjs/root/ui/tickBox/styled.js +0 -37
- package/dist/cjs/root/ui/titleBox/styled.js +0 -67
- package/dist/cjs/utils/errorIcon/styled.js +0 -18
- package/dist/cjs/utils/fileIcon/styled.js +0 -20
- package/dist/cjs/utils/lightCards/styled.js +0 -43
- package/dist/cjs/utils/progressBar/styled.js +0 -20
- package/dist/es2019/root/ui/actionsBar/styled.js +0 -23
- package/dist/es2019/root/ui/blanket/styled.js +0 -25
- package/dist/es2019/root/ui/iconMessage/styled.js +0 -30
- package/dist/es2019/root/ui/iconWrapper/styled.js +0 -27
- package/dist/es2019/root/ui/loadingRateLimited/loadingRateLimited.js +0 -16
- package/dist/es2019/root/ui/loadingRateLimited/styled.js +0 -43
- package/dist/es2019/root/ui/styled.js +0 -134
- package/dist/es2019/root/ui/tickBox/styled.js +0 -41
- package/dist/es2019/root/ui/titleBox/styled.js +0 -79
- package/dist/es2019/utils/errorIcon/styled.js +0 -5
- package/dist/esm/files/cardImageView/cardOverlay/styled.js +0 -39
- package/dist/esm/files/cardImageView/styled.js +0 -34
- package/dist/esm/root/styled.js +0 -36
- package/dist/esm/root/ui/actionsBar/styled.js +0 -15
- package/dist/esm/root/ui/blanket/styled.js +0 -16
- package/dist/esm/root/ui/iconMessage/styled.js +0 -15
- package/dist/esm/root/ui/loadingRateLimited/loadingRateLimited.js +0 -17
- package/dist/esm/root/ui/loadingRateLimited/styled.js +0 -17
- package/dist/esm/root/ui/playButton/styled.js +0 -19
- package/dist/esm/root/ui/styled.js +0 -98
- package/dist/esm/root/ui/tickBox/styled.js +0 -21
- package/dist/esm/root/ui/titleBox/styled.js +0 -40
- package/dist/esm/utils/errorIcon/styled.js +0 -6
- package/dist/esm/utils/fileIcon/styled.js +0 -7
- package/dist/esm/utils/lightCards/styled.js +0 -19
- package/dist/esm/utils/progressBar/styled.js +0 -7
- package/dist/types/files/cardImageView/cardOverlay/styled.d.ts +0 -23
- package/dist/types/files/cardImageView/styled.d.ts +0 -276
- package/dist/types/root/styled.d.ts +0 -16
- package/dist/types/root/ui/actionsBar/styled.d.ts +0 -10
- package/dist/types/root/ui/blanket/styled.d.ts +0 -10
- package/dist/types/root/ui/iconMessage/styled.d.ts +0 -6
- package/dist/types/root/ui/iconWrapper/styled.d.ts +0 -8
- package/dist/types/root/ui/loadingRateLimited/loadingRateLimited.d.ts +0 -6
- package/dist/types/root/ui/loadingRateLimited/styled.d.ts +0 -11
- package/dist/types/root/ui/playButton/styled.d.ts +0 -9
- package/dist/types/root/ui/progressBar/styled.d.ts +0 -10
- package/dist/types/root/ui/styled.d.ts +0 -20
- package/dist/types/root/ui/tickBox/styled.d.ts +0 -10
- package/dist/types/root/ui/titleBox/styled.d.ts +0 -18
- package/dist/types/utils/cardActions/styled.d.ts +0 -12
- package/dist/types/utils/errorIcon/styled.d.ts +0 -2
- package/dist/types/utils/fileIcon/styled.d.ts +0 -2
- package/dist/types/utils/lightCards/styled.d.ts +0 -8
- package/dist/types/utils/mediaTypeIcon/styled.d.ts +0 -6
- package/dist/types/utils/progressBar/styled.d.ts +0 -2
- package/example-helpers/styled.ts +0 -137
|
@@ -3,9 +3,9 @@ import React from 'react';
|
|
|
3
3
|
import { Component } from 'react';
|
|
4
4
|
import MoreIcon from '@atlaskit/icon/glyph/more';
|
|
5
5
|
import DropdownMenu, { DropdownItemGroup, DropdownItem } from '@atlaskit/dropdown-menu';
|
|
6
|
-
import { CardActionButton } from './styled';
|
|
7
6
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
8
7
|
import { createAndFireMediaCardEvent } from '../analytics';
|
|
8
|
+
import { CardActionButton } from './cardActionButton';
|
|
9
9
|
|
|
10
10
|
const CardActionButtonWithProps = props => /*#__PURE__*/React.createElement(CardActionButton, props);
|
|
11
11
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
import { Component } from 'react';
|
|
3
|
-
import { Wrapper } from './styled';
|
|
4
4
|
import { CardActionIconButton } from './cardActionIconButton';
|
|
5
|
+
import { wrapperStyles } from './styles';
|
|
5
6
|
import { CardActionsDropdownMenu } from './cardActionsDropdownMenu';
|
|
6
7
|
import { PreventClickThrough } from '../preventClickThrough';
|
|
7
8
|
import { createAndFireMediaCardEvent } from '../analytics';
|
|
8
9
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
9
10
|
|
|
10
|
-
const CardActionIconButtonWithProps = props =>
|
|
11
|
+
const CardActionIconButtonWithProps = props => jsx(CardActionIconButton, props);
|
|
11
12
|
|
|
12
13
|
export class CardActionsView extends Component {
|
|
13
14
|
render() {
|
|
@@ -21,7 +22,9 @@ export class CardActionsView extends Component {
|
|
|
21
22
|
|
|
22
23
|
const primaryAction = actions.find(actionWithIcon);
|
|
23
24
|
const otherActions = actions.filter(actionNotEqualTo(primaryAction));
|
|
24
|
-
return
|
|
25
|
+
return jsx(PreventClickThrough, null, jsx("div", {
|
|
26
|
+
css: wrapperStyles
|
|
27
|
+
}, primaryAction ? this.renderActionIconButton(primaryAction, true) : null, this.renderOtherActionButtons(otherActions)));
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
renderActionIconButton(action, isPrimary) {
|
|
@@ -46,7 +49,7 @@ export class CardActionsView extends Component {
|
|
|
46
49
|
}
|
|
47
50
|
})
|
|
48
51
|
})(CardActionIconButtonWithProps);
|
|
49
|
-
return
|
|
52
|
+
return jsx(CardActionIconButtonWithAnalytics, {
|
|
50
53
|
icon: icon,
|
|
51
54
|
triggerColor: triggerColor,
|
|
52
55
|
onClick: () => handler(),
|
|
@@ -69,7 +72,7 @@ export class CardActionsView extends Component {
|
|
|
69
72
|
if (firstActionWithIcon && otherActions.length === 0) {
|
|
70
73
|
return this.renderActionIconButton(firstActionWithIcon, false);
|
|
71
74
|
} else {
|
|
72
|
-
return
|
|
75
|
+
return jsx(CardActionsDropdownMenu, {
|
|
73
76
|
actions: actions,
|
|
74
77
|
triggerColor: triggerColor,
|
|
75
78
|
onOpenChange: onToggle,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { CardActionsView as default, CardActionsView } from './cardActionsView';
|
|
2
2
|
export { CardActionIconButton } from './cardActionIconButton';
|
|
3
3
|
export { CardActionsDropdownMenu } from './cardActionsDropdownMenu';
|
|
4
|
-
export { CardActionIconButtonVariant } from './
|
|
4
|
+
export { CardActionIconButtonVariant } from './styles';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
2
|
import { N500, N0 } from '@atlaskit/theme/colors';
|
|
3
3
|
import { borderRadius, size, center } from '@atlaskit/media-ui';
|
|
4
|
-
import {
|
|
5
|
-
export const
|
|
4
|
+
import { rootStyles } from '../../styles';
|
|
5
|
+
export const wrapperStyles = css`
|
|
6
|
+
${rootStyles()}
|
|
6
7
|
display: flex;
|
|
7
8
|
position: relative;
|
|
8
9
|
line-height: 0;
|
|
@@ -34,16 +35,17 @@ const getVariantStyles = variant => {
|
|
|
34
35
|
`;
|
|
35
36
|
};
|
|
36
37
|
|
|
37
|
-
export const
|
|
38
|
-
${({
|
|
38
|
+
export const cardActionButtonStyles = ({
|
|
39
39
|
variant
|
|
40
|
-
}) => `
|
|
41
|
-
|
|
40
|
+
}) => css`
|
|
41
|
+
${center}
|
|
42
|
+
${borderRadius}
|
|
43
|
+
${size(26)}
|
|
44
|
+
color: ${N500};
|
|
42
45
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
&:hover {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
46
49
|
|
|
47
|
-
|
|
48
|
-
`}
|
|
50
|
+
${getVariantStyles(variant)}
|
|
49
51
|
`;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
/**@jsx jsx */
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
3
5
|
import { Component } from 'react';
|
|
4
6
|
import WarningIcon from '@atlaskit/icon/glyph/editor/warning';
|
|
5
|
-
import {
|
|
7
|
+
import { errorIconWrapperStyles } from './styles';
|
|
6
8
|
export class ErrorIcon extends Component {
|
|
7
9
|
render() {
|
|
8
10
|
const {
|
|
9
11
|
size
|
|
10
12
|
} = this.props;
|
|
11
|
-
return
|
|
13
|
+
return jsx("div", {
|
|
14
|
+
css: errorIconWrapperStyles
|
|
15
|
+
}, jsx(WarningIcon, {
|
|
12
16
|
label: "Error",
|
|
13
17
|
size: size
|
|
14
18
|
}));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
import { Component } from 'react';
|
|
3
4
|
import { MediaTypeIcon } from '../mediaTypeIcon';
|
|
4
|
-
import {
|
|
5
|
+
import { fileTypeIconStyles } from './styles';
|
|
5
6
|
const fileTypeIconClass = 'file-type-icon';
|
|
6
7
|
export class FileIcon extends Component {
|
|
7
8
|
render() {
|
|
@@ -11,17 +12,18 @@ export class FileIcon extends Component {
|
|
|
11
12
|
style
|
|
12
13
|
} = this.props;
|
|
13
14
|
const type = mediaType || 'unknown';
|
|
14
|
-
const defaultIcon =
|
|
15
|
+
const defaultIcon = jsx(MediaTypeIcon, {
|
|
15
16
|
type: mediaType,
|
|
16
17
|
size: "small",
|
|
17
18
|
className: fileTypeIconClass
|
|
18
19
|
});
|
|
19
|
-
const icon = iconUrl ?
|
|
20
|
+
const icon = iconUrl ? jsx("img", {
|
|
20
21
|
src: iconUrl,
|
|
21
22
|
className: "custom-icon",
|
|
22
23
|
alt: type
|
|
23
24
|
}) : defaultIcon;
|
|
24
|
-
return
|
|
25
|
+
return jsx("div", {
|
|
26
|
+
css: fileTypeIconStyles,
|
|
25
27
|
style: style,
|
|
26
28
|
className: fileTypeIconClass
|
|
27
29
|
}, icon);
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { MediaCardCursor } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* When the returned value is undefined, we'd expect the media card to take the parent's cursor style.
|
|
5
|
+
*/
|
|
2
6
|
export const getMediaCardCursor = (useInlinePlayer, useMediaViewer, isErrorStatus, hasCardPreview, mediaType) => {
|
|
3
7
|
// If error status or no action is requested = NoAction
|
|
4
8
|
if (isErrorStatus || !useInlinePlayer && !useMediaViewer) {
|
|
5
|
-
return
|
|
9
|
+
return;
|
|
6
10
|
}
|
|
7
11
|
|
|
8
12
|
if (!mediaType && (useInlinePlayer || useInlinePlayer && useMediaViewer)) {
|
|
@@ -15,5 +19,5 @@ export const getMediaCardCursor = (useInlinePlayer, useMediaViewer, isErrorStatu
|
|
|
15
19
|
return MediaCardCursor.Action;
|
|
16
20
|
}
|
|
17
21
|
|
|
18
|
-
return
|
|
22
|
+
return;
|
|
19
23
|
};
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Component } from 'react';
|
|
4
4
|
import { ErrorIcon } from '../errorIcon';
|
|
5
|
-
import { Wrapper } from './
|
|
5
|
+
import { Wrapper } from './lightCardWrappers';
|
|
6
6
|
import { getDimensionsWithDefault } from './getDimensionsWithDefault';
|
|
7
7
|
export class CardError extends Component {
|
|
8
8
|
render() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { getDimensionsWithDefault } from './getDimensionsWithDefault';
|
|
4
|
-
import { Wrapper, AnimatedWrapper } from './
|
|
4
|
+
import { Wrapper, AnimatedWrapper } from './lightCardWrappers';
|
|
5
5
|
import SpinnerIcon from '@atlaskit/spinner';
|
|
6
6
|
import FileIcon from '@atlaskit/icon/glyph/file';
|
|
7
7
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
|
|
3
|
+
/**@jsx jsx */
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
|
+
import { wrapperStyles, animatedWrapperStyles } from './styles';
|
|
6
|
+
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
7
|
+
export const Wrapper = props => {
|
|
8
|
+
const theme = useGlobalTheme();
|
|
9
|
+
return jsx("div", _extends({
|
|
10
|
+
css: wrapperStyles({
|
|
11
|
+
dimensions: props.dimensions,
|
|
12
|
+
theme: theme
|
|
13
|
+
})
|
|
14
|
+
}, props), props.children);
|
|
15
|
+
};
|
|
16
|
+
export const AnimatedWrapper = props => {
|
|
17
|
+
const theme = useGlobalTheme();
|
|
18
|
+
return jsx("div", _extends({
|
|
19
|
+
css: animatedWrapperStyles({
|
|
20
|
+
dimensions: props.dimensions,
|
|
21
|
+
theme: theme
|
|
22
|
+
})
|
|
23
|
+
}, props), props.children);
|
|
24
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
import { keyframes } from '@emotion/react';
|
|
2
3
|
import { center, borderRadius } from '@atlaskit/media-ui';
|
|
3
4
|
import { themed } from '@atlaskit/theme/components';
|
|
4
5
|
import { N20, DN50, N50, DN100 } from '@atlaskit/theme/colors';
|
|
@@ -15,25 +16,31 @@ export const blinkLoadingAnimation = keyframes`
|
|
|
15
16
|
opacity: 1;
|
|
16
17
|
}
|
|
17
18
|
`;
|
|
18
|
-
export const
|
|
19
|
-
|
|
19
|
+
export const wrapperStyles = ({
|
|
20
|
+
dimensions,
|
|
21
|
+
theme
|
|
22
|
+
}) => css`
|
|
23
|
+
${center}
|
|
24
|
+
background: ${themed({
|
|
20
25
|
light: N20,
|
|
21
26
|
dark: DN50
|
|
27
|
+
})({
|
|
28
|
+
theme
|
|
22
29
|
})};
|
|
23
30
|
color: ${themed({
|
|
24
31
|
light: N50,
|
|
25
32
|
dark: DN100
|
|
33
|
+
})({
|
|
34
|
+
theme
|
|
26
35
|
})};
|
|
27
36
|
${borderRadius}
|
|
28
37
|
max-height: 100%;
|
|
29
38
|
max-width: 100%;
|
|
30
|
-
|
|
31
|
-
${
|
|
32
|
-
width: ${props.dimensions.width};
|
|
33
|
-
height: ${props.dimensions.height};
|
|
34
|
-
`}
|
|
39
|
+
width: ${dimensions.width};
|
|
40
|
+
height: ${dimensions.height};
|
|
35
41
|
`;
|
|
36
|
-
export const
|
|
42
|
+
export const animatedWrapperStyles = props => css`
|
|
43
|
+
${wrapperStyles(props)}
|
|
37
44
|
> span {
|
|
38
45
|
animation: ${blinkLoadingAnimation} 0.8s infinite;
|
|
39
46
|
}
|
|
@@ -5,7 +5,7 @@ import ArchiveIcon from '@atlaskit/icon/glyph/media-services/zip';
|
|
|
5
5
|
import VideoIcon from '@atlaskit/icon/glyph/media-services/video';
|
|
6
6
|
import DocIcon from '@atlaskit/icon/glyph/document';
|
|
7
7
|
import UnknownIcon from '@atlaskit/icon/glyph/page';
|
|
8
|
-
import { IconWrapper } from './
|
|
8
|
+
import { IconWrapper } from './iconWrapper';
|
|
9
9
|
const icons = {
|
|
10
10
|
image: ImageIcon,
|
|
11
11
|
audio: AudioIcon,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
2
|
import { Y200, P200, B300 } from '@atlaskit/theme/colors';
|
|
3
3
|
const typeToColorMap = {
|
|
4
4
|
image: Y200,
|
|
@@ -9,9 +9,14 @@ const typeToColorMap = {
|
|
|
9
9
|
archive: '' // TODO [BMPT-389]: Remove this and use existing MediaTypeIcon in media-ui
|
|
10
10
|
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
color: ${({
|
|
12
|
+
|
|
13
|
+
const getWrapperColor = ({
|
|
15
14
|
type
|
|
16
|
-
}) =>
|
|
15
|
+
}) => {
|
|
16
|
+
return typeToColorMap[type] || typeToColorMap.unknown;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const iconWrapperStyles = props => css`
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
color: ${getWrapperColor(props)};
|
|
17
22
|
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
import { Component } from 'react';
|
|
3
|
-
import {
|
|
4
|
+
import { progressWrapperStyles } from './styles';
|
|
4
5
|
export class ProgressBar extends Component {
|
|
5
6
|
render() {
|
|
6
7
|
if (typeof this.props.progress !== 'number') {
|
|
@@ -11,7 +12,9 @@ export class ProgressBar extends Component {
|
|
|
11
12
|
const progressBarStyle = {
|
|
12
13
|
width: `${progress * 100}%`
|
|
13
14
|
};
|
|
14
|
-
return
|
|
15
|
+
return jsx("div", {
|
|
16
|
+
css: progressWrapperStyles
|
|
17
|
+
}, jsx("div", {
|
|
15
18
|
className: 'progressBar',
|
|
16
19
|
style: progressBarStyle
|
|
17
20
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
2
|
import { borderRadius } from '@atlaskit/media-ui';
|
|
3
|
-
export const
|
|
3
|
+
export const progressWrapperStyles = css`
|
|
4
4
|
${borderRadius} z-index: 30;
|
|
5
5
|
overflow: hidden;
|
|
6
6
|
background-color: rgba(255, 255, 255, 0.3);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ConcurrentExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo';
|
|
2
|
-
import {
|
|
3
|
-
import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
2
|
+
import { extractErrorInfo, getRenderErrorRequestMetadata, LOGGED_FEATURE_FLAG_KEYS } from './analytics';
|
|
4
3
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
4
|
+
const packageName = "@atlaskit/media-card";
|
|
5
|
+
const packageVersion = "74.0.0";
|
|
5
6
|
let concurrentExperience;
|
|
6
7
|
|
|
7
|
-
const getExperience =
|
|
8
|
+
const getExperience = id => {
|
|
8
9
|
if (!concurrentExperience) {
|
|
9
10
|
const inlineExperience = {
|
|
10
11
|
platform: {
|
|
@@ -12,7 +13,7 @@ const getExperience = (id, featureFlagsKeys) => {
|
|
|
12
13
|
},
|
|
13
14
|
type: ExperienceTypes.Experience,
|
|
14
15
|
performanceType: ExperiencePerformanceTypes.InlineResult,
|
|
15
|
-
|
|
16
|
+
featureFlags: LOGGED_FEATURE_FLAG_KEYS
|
|
16
17
|
};
|
|
17
18
|
concurrentExperience = new ConcurrentExperience('media-card-render', inlineExperience);
|
|
18
19
|
}
|
|
@@ -20,13 +21,13 @@ const getExperience = (id, featureFlagsKeys) => {
|
|
|
20
21
|
return concurrentExperience.getInstance(id);
|
|
21
22
|
};
|
|
22
23
|
|
|
23
|
-
export const startUfoExperience =
|
|
24
|
-
getExperience(id
|
|
24
|
+
export const startUfoExperience = id => {
|
|
25
|
+
getExperience(id).start();
|
|
25
26
|
};
|
|
26
|
-
export const completeUfoExperience = (id, status, fileAttributes, fileStateFlags, ssrReliability,
|
|
27
|
+
export const completeUfoExperience = (id, status, fileAttributes, fileStateFlags, ssrReliability, error) => {
|
|
27
28
|
switch (status) {
|
|
28
29
|
case 'complete':
|
|
29
|
-
succeedUfoExperience(id,
|
|
30
|
+
succeedUfoExperience(id, {
|
|
30
31
|
fileAttributes,
|
|
31
32
|
ssrReliability,
|
|
32
33
|
fileStateFlags
|
|
@@ -34,7 +35,7 @@ export const completeUfoExperience = (id, status, fileAttributes, fileStateFlags
|
|
|
34
35
|
break;
|
|
35
36
|
|
|
36
37
|
case 'failed-processing':
|
|
37
|
-
failUfoExperience(id,
|
|
38
|
+
failUfoExperience(id, {
|
|
38
39
|
fileAttributes,
|
|
39
40
|
failReason: 'failed-processing',
|
|
40
41
|
ssrReliability,
|
|
@@ -43,7 +44,7 @@ export const completeUfoExperience = (id, status, fileAttributes, fileStateFlags
|
|
|
43
44
|
break;
|
|
44
45
|
|
|
45
46
|
case 'error':
|
|
46
|
-
error && failUfoExperience(id,
|
|
47
|
+
error && failUfoExperience(id, {
|
|
47
48
|
fileAttributes,
|
|
48
49
|
...extractErrorInfo(error),
|
|
49
50
|
request: getRenderErrorRequestMetadata(error),
|
|
@@ -54,8 +55,8 @@ export const completeUfoExperience = (id, status, fileAttributes, fileStateFlags
|
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
57
|
|
|
57
|
-
const succeedUfoExperience = (id,
|
|
58
|
-
getExperience(id
|
|
58
|
+
const succeedUfoExperience = (id, properties) => {
|
|
59
|
+
getExperience(id).success({
|
|
59
60
|
metadata: { ...properties,
|
|
60
61
|
packageName,
|
|
61
62
|
packageVersion,
|
|
@@ -65,8 +66,8 @@ const succeedUfoExperience = (id, featureFlagsKeys, properties) => {
|
|
|
65
66
|
});
|
|
66
67
|
};
|
|
67
68
|
|
|
68
|
-
const failUfoExperience = (id,
|
|
69
|
-
getExperience(id
|
|
69
|
+
const failUfoExperience = (id, properties) => {
|
|
70
|
+
getExperience(id).failure({
|
|
70
71
|
metadata: { ...properties,
|
|
71
72
|
packageName,
|
|
72
73
|
packageVersion,
|
package/dist/es2019/version.json
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
4
|
+
import { fileCardImageViewSelectedSelector, fileCardImageViewSelector } from './classnames';
|
|
5
|
+
import { playIconWrapperStyles, progressBarWrapperStyles, wrapperStyles } from './styles';
|
|
6
|
+
export var CardImageViewWrapper = function CardImageViewWrapper(props) {
|
|
7
|
+
var disableOverlay = props.disableOverlay,
|
|
8
|
+
selectable = props.selectable,
|
|
9
|
+
selected = props.selected,
|
|
10
|
+
mediaType = props.mediaType,
|
|
11
|
+
mediaName = props.mediaName,
|
|
12
|
+
status = props.status,
|
|
13
|
+
progress = props.progress;
|
|
14
|
+
var theme = useGlobalTheme();
|
|
15
|
+
return jsx("div", {
|
|
16
|
+
id: "cardImageViewWrapper",
|
|
17
|
+
"data-testid": "media-file-card-view",
|
|
18
|
+
"data-test-media-name": mediaName,
|
|
19
|
+
"data-test-status": status,
|
|
20
|
+
"data-test-progress": progress,
|
|
21
|
+
"data-test-selected": selected ? true : undefined,
|
|
22
|
+
css: wrapperStyles({
|
|
23
|
+
theme: theme,
|
|
24
|
+
disableOverlay: disableOverlay,
|
|
25
|
+
selectable: selectable,
|
|
26
|
+
selected: selected,
|
|
27
|
+
mediaType: mediaType
|
|
28
|
+
}),
|
|
29
|
+
className: "".concat(fileCardImageViewSelector, " ").concat(selected ? fileCardImageViewSelectedSelector : '')
|
|
30
|
+
}, props.children);
|
|
31
|
+
};
|
|
32
|
+
export var PlayIconWrapper = function PlayIconWrapper(props) {
|
|
33
|
+
return jsx("div", {
|
|
34
|
+
css: playIconWrapperStyles
|
|
35
|
+
}, props.children);
|
|
36
|
+
};
|
|
37
|
+
export var ProgressBarWrapper = function ProgressBarWrapper(props) {
|
|
38
|
+
return jsx("div", {
|
|
39
|
+
css: progressBarWrapperStyles
|
|
40
|
+
}, props.children);
|
|
41
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
4
|
+
import { altWrapperStyles, errorMessageStyles, metadataStyles, overlayStyles, titleWrapperStyles } from './styles';
|
|
5
|
+
export var Overlay = function Overlay(props) {
|
|
6
|
+
var hasError = props.hasError,
|
|
7
|
+
noHover = props.noHover,
|
|
8
|
+
className = props.className;
|
|
9
|
+
return jsx("div", {
|
|
10
|
+
css: overlayStyles({
|
|
11
|
+
hasError: hasError,
|
|
12
|
+
noHover: noHover
|
|
13
|
+
}),
|
|
14
|
+
className: className
|
|
15
|
+
}, props.children);
|
|
16
|
+
};
|
|
17
|
+
export var ErrorMessage = function ErrorMessage(props) {
|
|
18
|
+
return jsx("div", {
|
|
19
|
+
css: errorMessageStyles
|
|
20
|
+
}, props.children);
|
|
21
|
+
};
|
|
22
|
+
export var AltWrapper = function AltWrapper(props) {
|
|
23
|
+
return jsx("div", {
|
|
24
|
+
css: altWrapperStyles
|
|
25
|
+
}, props.children);
|
|
26
|
+
};
|
|
27
|
+
export var TitleWrapper = function TitleWrapper(props) {
|
|
28
|
+
var theme = useGlobalTheme();
|
|
29
|
+
return jsx("div", {
|
|
30
|
+
css: titleWrapperStyles(theme),
|
|
31
|
+
className: 'title'
|
|
32
|
+
}, props.children);
|
|
33
|
+
};
|
|
34
|
+
export var Metadata = function Metadata(props) {
|
|
35
|
+
return jsx("div", {
|
|
36
|
+
css: metadataStyles,
|
|
37
|
+
className: props.className
|
|
38
|
+
}, props.children);
|
|
39
|
+
};
|
|
@@ -10,6 +10,8 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
10
10
|
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
12
|
|
|
13
|
+
/**@jsx jsx */
|
|
14
|
+
import { jsx } from '@emotion/react';
|
|
13
15
|
import React from 'react';
|
|
14
16
|
import { Component } from 'react';
|
|
15
17
|
import cx from 'classnames';
|
|
@@ -19,7 +21,8 @@ import { Ellipsify } from '@atlaskit/media-ui'; // We dont require things direct
|
|
|
19
21
|
import { FileIcon } from '../../../utils/fileIcon';
|
|
20
22
|
import { ErrorIcon } from '../../../utils/errorIcon';
|
|
21
23
|
import CardActions from '../../../utils/cardActions';
|
|
22
|
-
import {
|
|
24
|
+
import { tickBoxStyles, errorLineStyles, leftColumnStyles, topRowStyles, bottomRowStyles, rightColumnStyles, subtitleStyles } from './styles';
|
|
25
|
+
import { Metadata, AltWrapper, ErrorMessage, TitleWrapper, Overlay } from './cardOverlayComponents';
|
|
23
26
|
|
|
24
27
|
var resolveTitleText = function resolveTitleText(cardStatus, mediaName, error, selected) {
|
|
25
28
|
// don't show title if error
|
|
@@ -91,21 +94,25 @@ export var CardOverlay = /*#__PURE__*/function (_Component) {
|
|
|
91
94
|
actions = _this$props2.actions;
|
|
92
95
|
var titleText = resolveTitleText(cardStatus, mediaName, error, selected);
|
|
93
96
|
var menuTriggerColor = !persistent ? 'white' : undefined;
|
|
94
|
-
return
|
|
97
|
+
return jsx(Overlay, {
|
|
95
98
|
hasError: !!error,
|
|
96
99
|
noHover: noHover,
|
|
97
100
|
className: this.wrapperClassNames
|
|
98
|
-
},
|
|
101
|
+
}, jsx("div", {
|
|
102
|
+
css: topRowStyles,
|
|
99
103
|
className: 'top-row'
|
|
100
|
-
}, this.errorLine(),
|
|
101
|
-
className: 'title'
|
|
102
|
-
}, titleText ? /*#__PURE__*/React.createElement(Ellipsify, {
|
|
104
|
+
}, this.errorLine(), jsx(TitleWrapper, null, titleText ? jsx(Ellipsify, {
|
|
103
105
|
testId: "media-card-file-name",
|
|
104
106
|
text: titleText,
|
|
105
107
|
lines: 2
|
|
106
|
-
}) : null), this.tickBox()),
|
|
108
|
+
}) : null), this.tickBox()), jsx("div", {
|
|
109
|
+
css: bottomRowStyles,
|
|
107
110
|
className: 'bottom-row'
|
|
108
|
-
},
|
|
111
|
+
}, jsx("div", {
|
|
112
|
+
css: leftColumnStyles
|
|
113
|
+
}, this.bottomLeftColumn()), jsx("div", {
|
|
114
|
+
css: rightColumnStyles
|
|
115
|
+
}, actions ? jsx(CardActions, {
|
|
109
116
|
actions: actions,
|
|
110
117
|
onToggle: this.onMenuToggle,
|
|
111
118
|
triggerColor: menuTriggerColor
|
|
@@ -117,7 +124,11 @@ export var CardOverlay = /*#__PURE__*/function (_Component) {
|
|
|
117
124
|
var _this$props3 = this.props,
|
|
118
125
|
error = _this$props3.error,
|
|
119
126
|
alt = _this$props3.alt;
|
|
120
|
-
return error &&
|
|
127
|
+
return error && jsx(React.Fragment, null, jsx("div", {
|
|
128
|
+
css: errorLineStyles
|
|
129
|
+
}, jsx(ErrorIcon, null), jsx(ErrorMessage, null, error)), alt && jsx("div", {
|
|
130
|
+
css: errorLineStyles
|
|
131
|
+
}, jsx(AltWrapper, null, alt)));
|
|
121
132
|
}
|
|
122
133
|
}, {
|
|
123
134
|
key: "tickBox",
|
|
@@ -125,15 +136,16 @@ export var CardOverlay = /*#__PURE__*/function (_Component) {
|
|
|
125
136
|
var _this$props4 = this.props,
|
|
126
137
|
selected = _this$props4.selected,
|
|
127
138
|
selectable = _this$props4.selectable;
|
|
128
|
-
var tick =
|
|
139
|
+
var tick = jsx(TickIcon, {
|
|
129
140
|
label: "tick"
|
|
130
141
|
});
|
|
131
142
|
var className = cx('tickbox', {
|
|
132
143
|
selected: selected
|
|
133
144
|
});
|
|
134
|
-
return selectable &&
|
|
145
|
+
return selectable && jsx("div", {
|
|
146
|
+
css: tickBoxStyles,
|
|
135
147
|
className: className
|
|
136
|
-
},
|
|
148
|
+
}, tick);
|
|
137
149
|
}
|
|
138
150
|
}, {
|
|
139
151
|
key: "bottomLeftColumn",
|
|
@@ -146,14 +158,15 @@ export var CardOverlay = /*#__PURE__*/function (_Component) {
|
|
|
146
158
|
subtitle = _this$props5.subtitle,
|
|
147
159
|
icon = _this$props5.icon;
|
|
148
160
|
var classNames = cx('metadata');
|
|
149
|
-
var fileIcon = mediaType || icon ?
|
|
161
|
+
var fileIcon = mediaType || icon ? jsx(FileIcon, {
|
|
150
162
|
mediaType: mediaType,
|
|
151
163
|
iconUrl: icon
|
|
152
164
|
}) : null;
|
|
153
|
-
var subtitleEl = subtitle ?
|
|
165
|
+
var subtitleEl = subtitle ? jsx("div", {
|
|
166
|
+
css: subtitleStyles,
|
|
154
167
|
className: "file-size"
|
|
155
168
|
}, subtitle) : null;
|
|
156
|
-
return
|
|
169
|
+
return jsx("div", null, jsx(Metadata, {
|
|
157
170
|
className: classNames
|
|
158
171
|
}, fileIcon, subtitleEl));
|
|
159
172
|
}
|