@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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject;
|
|
4
|
+
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
|
+
import { fontFamily } from '@atlaskit/theme/constants';
|
|
7
|
+
import { borderRadius } from '@atlaskit/media-ui';
|
|
8
|
+
import { N20 } from '@atlaskit/theme/colors';
|
|
9
|
+
import { hideNativeBrowserTextSelectionStyles } from '@atlaskit/editor-shared-styles/selection';
|
|
10
|
+
import { transition } from '../../../styles';
|
|
11
|
+
import { fixedBlanketStyles, blanketClassName } from '.././blanket/styles';
|
|
12
|
+
import { fixedActionBarStyles, actionsBarClassName } from '.././actionsBar/styles';
|
|
13
|
+
import { generateResponsiveStyles, getClickablePlayButtonStyles, getCursorStyle, getSelectableTickBoxStyles, getWrapperDimensions, getWrapperShadow } from '../styles';
|
|
14
|
+
export var newFileExperienceWrapperStyles = function newFileExperienceWrapperStyles(_ref) {
|
|
15
|
+
var breakpoint = _ref.breakpoint,
|
|
16
|
+
dimensions = _ref.dimensions,
|
|
17
|
+
appearance = _ref.appearance,
|
|
18
|
+
disableOverlay = _ref.disableOverlay,
|
|
19
|
+
displayBackground = _ref.displayBackground,
|
|
20
|
+
selected = _ref.selected,
|
|
21
|
+
isPlayButtonClickable = _ref.isPlayButtonClickable,
|
|
22
|
+
isTickBoxSelectable = _ref.isTickBoxSelectable,
|
|
23
|
+
shouldDisplayTooltip = _ref.shouldDisplayTooltip,
|
|
24
|
+
mediaCardCursor = _ref.mediaCardCursor;
|
|
25
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n box-sizing: border-box;\n * {\n box-sizing: border-box;\n }\n position: relative;\n font-family: ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n\n /* We use classnames from here exceptionally to be able to handle styles when the Card is on hover */\n ", "\n ", "\n &:hover .", " {\n ", "\n }\n &:hover .", " {\n ", "\n }\n\n /* Tooltip does not support percentage dimensions. We enforce them here */\n ", "\n"])), transition(), fontFamily(), getWrapperDimensions(dimensions, appearance), displayBackground ? "background-color: ".concat(N20, ";") : '', borderRadius, getCursorStyle(mediaCardCursor), getWrapperShadow(disableOverlay, selected), generateResponsiveStyles(breakpoint), hideNativeBrowserTextSelectionStyles, getClickablePlayButtonStyles(isPlayButtonClickable), getSelectableTickBoxStyles(isTickBoxSelectable), blanketClassName, fixedBlanketStyles, actionsBarClassName, fixedActionBarStyles, shouldDisplayTooltip ? "> div { width: 100%; height: 100% }" : '');
|
|
26
|
+
};
|
|
27
|
+
newFileExperienceWrapperStyles.displayName = 'NewFileExperienceWrapper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import VidPlayIcon from '@atlaskit/icon/glyph/vid-play';
|
|
3
|
-
import {
|
|
3
|
+
import { PlayButtonWrapper } from './playButtonWrapper';
|
|
4
|
+
import { PlayButtonBackground } from './playButtonBackground';
|
|
4
5
|
export var PlayButton = function PlayButton() {
|
|
5
|
-
return /*#__PURE__*/React.createElement(
|
|
6
|
+
return /*#__PURE__*/React.createElement(PlayButtonWrapper, null, /*#__PURE__*/React.createElement(PlayButtonBackground, null), /*#__PURE__*/React.createElement(VidPlayIcon, {
|
|
6
7
|
label: "play",
|
|
7
8
|
size: "large"
|
|
8
9
|
}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { backgroundStyles, bkgClassName } from './styles';
|
|
4
|
+
export var PlayButtonBackground = function PlayButtonBackground() {
|
|
5
|
+
return jsx("div", {
|
|
6
|
+
css: backgroundStyles,
|
|
7
|
+
className: bkgClassName
|
|
8
|
+
});
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { playButtonClassName, playButtonWrapperStyles } from './styles';
|
|
4
|
+
export var PlayButtonWrapper = function PlayButtonWrapper(props) {
|
|
5
|
+
return jsx("div", {
|
|
6
|
+
css: playButtonWrapperStyles,
|
|
7
|
+
className: playButtonClassName
|
|
8
|
+
}, props.children);
|
|
9
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject, _templateObject2;
|
|
4
|
+
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
|
+
import { N0, N90A } from '@atlaskit/theme/colors';
|
|
7
|
+
export var playButtonClassName = 'media-card-play-button';
|
|
8
|
+
export var bkgClassName = 'play-icon-background';
|
|
9
|
+
var discSize = 48;
|
|
10
|
+
var discSizeHover = 56;
|
|
11
|
+
export var fixedPlayButtonStyles = "\n .".concat(bkgClassName, " {\n width: ").concat(discSizeHover, "px;\n height: ").concat(discSizeHover, "px;\n }\n");
|
|
12
|
+
export var playButtonWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n span {\n position: absolute;\n }\n"])), N0);
|
|
13
|
+
export var backgroundStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transition-property: width, height;\n transition-duration: 0.1s;\n position: absolute;\n width: ", "px;\n height: ", "px;\n background: ", ";\n border-radius: 100%;\n"])), discSize, discSize, N90A);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { StyledBar } from './
|
|
2
|
+
import { StyledBar } from './styledBar';
|
|
3
3
|
import { Breakpoint } from '../common';
|
|
4
|
+
export var getNormalizedProgress = function getNormalizedProgress(progress) {
|
|
5
|
+
return Math.min(1, Math.max(0, progress || 0)) * 100;
|
|
6
|
+
};
|
|
4
7
|
export var ProgressBar = function ProgressBar(_ref) {
|
|
5
8
|
var progress = _ref.progress,
|
|
6
9
|
_ref$breakpoint = _ref.breakpoint,
|
|
@@ -9,9 +12,8 @@ export var ProgressBar = function ProgressBar(_ref) {
|
|
|
9
12
|
positionBottom = _ref$positionBottom === void 0 ? false : _ref$positionBottom,
|
|
10
13
|
_ref$showOnTop = _ref.showOnTop,
|
|
11
14
|
showOnTop = _ref$showOnTop === void 0 ? false : _ref$showOnTop;
|
|
12
|
-
var normalizedProgress = Math.min(1, Math.max(0, progress || 0)) * 100;
|
|
13
15
|
return /*#__PURE__*/React.createElement(StyledBar, {
|
|
14
|
-
progress:
|
|
16
|
+
progress: getNormalizedProgress(progress),
|
|
15
17
|
breakpoint: breakpoint,
|
|
16
18
|
positionBottom: positionBottom,
|
|
17
19
|
showOnTop: showOnTop
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { styledBarStyles } from './styles';
|
|
4
|
+
export var StyledBar = function StyledBar(props) {
|
|
5
|
+
var progress = props.progress,
|
|
6
|
+
breakpoint = props.breakpoint,
|
|
7
|
+
positionBottom = props.positionBottom,
|
|
8
|
+
showOnTop = props.showOnTop;
|
|
9
|
+
return jsx("div", {
|
|
10
|
+
id: "styledBar",
|
|
11
|
+
css: styledBarStyles({
|
|
12
|
+
progress: progress,
|
|
13
|
+
breakpoint: breakpoint,
|
|
14
|
+
positionBottom: positionBottom,
|
|
15
|
+
showOnTop: showOnTop
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
};
|
|
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
6
|
import { borderRadius } from '@atlaskit/media-ui';
|
|
7
7
|
import { rgba } from '../../../styles/mixins';
|
|
8
8
|
import { N0, N400 } from '@atlaskit/theme/colors';
|
|
@@ -26,11 +26,16 @@ export function generateResponsiveStyles(breakpoint, positionBottom, showOnTop)
|
|
|
26
26
|
var marginBottom = setting.marginBottom * multiplier + (positionBottom ? marginPositionBottom : getTitleBoxHeight(breakpoint));
|
|
27
27
|
return "\n ".concat(showOnTop ? 'top' : 'bottom', ": ").concat(marginBottom, "px\n ");
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
var getStyledBarStylesBasedOnProps = function getStyledBarStylesBasedOnProps(_ref) {
|
|
30
31
|
var progress = _ref.progress,
|
|
31
32
|
breakpoint = _ref.breakpoint,
|
|
32
33
|
positionBottom = _ref.positionBottom,
|
|
33
34
|
showOnTop = _ref.showOnTop;
|
|
34
|
-
return "\n
|
|
35
|
-
}
|
|
36
|
-
|
|
35
|
+
return "\n".concat(borderRadius, "\noverflow: hidden;\nposition: absolute;\nwidth: ").concat(width, "%;\nleft: ").concat(left, "%;\nbackground-color: ").concat(rgba(N0, 0.8), ";\nheight: ").concat(height + padding * 2, "px;\npadding: ").concat(padding, "px;\nbox-sizing: border-box;\n\n::before {\n content: '';\n width: ").concat(progress, "%;\n height: 100%;\n background-color: ").concat(N400, ";\n ").concat(borderRadius, "\n display: block;\n}\n").concat(generateResponsiveStyles(breakpoint, positionBottom, showOnTop), "\n");
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export var styledBarStyles = function styledBarStyles(props) {
|
|
39
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n "])), getStyledBarStylesBasedOnProps(props));
|
|
40
|
+
};
|
|
41
|
+
styledBarStyles.displayName = 'StyledProgressBar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
|
|
4
|
+
var _templateObject;
|
|
5
|
+
|
|
6
|
+
import { css } from '@emotion/react';
|
|
7
|
+
import { borderRadius } from '@atlaskit/media-ui';
|
|
8
|
+
import { N60A } from '@atlaskit/theme/colors';
|
|
9
|
+
import { akEditorSelectedBoxShadow } from '@atlaskit/editor-shared-styles/consts';
|
|
10
|
+
import { getCSSUnitValue } from '../../utils/getCSSUnitValue';
|
|
11
|
+
import { getDefaultCardDimensions } from '../../utils/cardDimensions';
|
|
12
|
+
import { tickBoxClassName, tickboxFixedStyles } from './tickBox/styles';
|
|
13
|
+
import { fixedPlayButtonStyles, playButtonClassName } from './playButton/styles';
|
|
14
|
+
import { Breakpoint, responsiveSettings } from './common';
|
|
15
|
+
var breakpointSizes = [[Breakpoint.SMALL, 599], [Breakpoint.LARGE, Infinity]];
|
|
16
|
+
export var calcBreakpointSize = function calcBreakpointSize() {
|
|
17
|
+
var wrapperWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
18
|
+
|
|
19
|
+
var _ref = breakpointSizes.find(function (_ref3) {
|
|
20
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
21
|
+
_breakpoint = _ref4[0],
|
|
22
|
+
limit = _ref4[1];
|
|
23
|
+
|
|
24
|
+
return wrapperWidth <= limit;
|
|
25
|
+
}) || [Breakpoint.SMALL],
|
|
26
|
+
_ref2 = _slicedToArray(_ref, 1),
|
|
27
|
+
breakpoint = _ref2[0];
|
|
28
|
+
|
|
29
|
+
return breakpoint;
|
|
30
|
+
};
|
|
31
|
+
export var generateResponsiveStyles = function generateResponsiveStyles() {
|
|
32
|
+
var breakpoint = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Breakpoint.SMALL;
|
|
33
|
+
var setting = responsiveSettings[breakpoint];
|
|
34
|
+
return "\n font-size: ".concat(setting.fontSize, "px;\n line-height: ").concat(setting.lineHeight, "px;\n ");
|
|
35
|
+
};
|
|
36
|
+
export var getWrapperDimensions = function getWrapperDimensions(dimensions, appearance) {
|
|
37
|
+
var _ref5 = dimensions || {},
|
|
38
|
+
width = _ref5.width,
|
|
39
|
+
height = _ref5.height;
|
|
40
|
+
|
|
41
|
+
var _getDefaultCardDimens = getDefaultCardDimensions(appearance),
|
|
42
|
+
defaultWidth = _getDefaultCardDimens.width,
|
|
43
|
+
defaultHeight = _getDefaultCardDimens.height;
|
|
44
|
+
|
|
45
|
+
return "\n width: ".concat(getCSSUnitValue(width || defaultWidth), ";\n max-width: 100%;\n height: ").concat(getCSSUnitValue(height || defaultHeight), ";\n max-height: 100%;\n ");
|
|
46
|
+
}; // This is a trick to simulate the blue border without affecting the dimensions.
|
|
47
|
+
// CSS outline has no 'radius', therefore we can't achieve the same effect with it
|
|
48
|
+
|
|
49
|
+
export var getWrapperShadow = function getWrapperShadow(disableOverlay, selected) {
|
|
50
|
+
var withOverlayShadow = !disableOverlay ? "0 1px 1px ".concat(N60A, ", 0 0 1px 0 ").concat(N60A) : '';
|
|
51
|
+
var selectedShadow = selected ? akEditorSelectedBoxShadow : '';
|
|
52
|
+
var shadow = [selectedShadow, withOverlayShadow].filter(Boolean).join(', ');
|
|
53
|
+
return shadow ? "box-shadow: ".concat(shadow, ";") : '';
|
|
54
|
+
};
|
|
55
|
+
export var getCursorStyle = function getCursorStyle(cursor) {
|
|
56
|
+
return !!cursor ? "cursor: ".concat(cursor, ";") : '';
|
|
57
|
+
};
|
|
58
|
+
export var getClickablePlayButtonStyles = function getClickablePlayButtonStyles(isPlayButtonClickable) {
|
|
59
|
+
if (!isPlayButtonClickable) {
|
|
60
|
+
return '';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return "\n &:hover .".concat(playButtonClassName, " {\n ").concat(fixedPlayButtonStyles, "\n }\n ");
|
|
64
|
+
};
|
|
65
|
+
export var getSelectableTickBoxStyles = function getSelectableTickBoxStyles(isTickBoxSelectable) {
|
|
66
|
+
if (!isTickBoxSelectable) {
|
|
67
|
+
return '';
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return "\n &:hover .".concat(tickBoxClassName, " {\n ").concat(tickboxFixedStyles, "\n }\n ");
|
|
71
|
+
};
|
|
72
|
+
export var cardImageContainerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n max-width: 100%;\n width: 100%;\n height: 100%;\n max-height: 100%;\n overflow: hidden;\n ", "\n"])), borderRadius);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject;
|
|
4
|
+
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
|
+
import { transition } from '../../../styles';
|
|
7
|
+
import { B200, N0, N100 } from '@atlaskit/theme/colors';
|
|
8
|
+
export var tickBoxClassName = 'media-card-tickbox';
|
|
9
|
+
export var tickboxFixedStyles = "\n background-color: ".concat(N0, ";\n color: ").concat(N100, ";\n");
|
|
10
|
+
export var getSelectedStyles = function getSelectedStyles(selected) {
|
|
11
|
+
return selected ? "background-color: ".concat(B200, ";\n color: white;") : "";
|
|
12
|
+
};
|
|
13
|
+
export var wrapperStyles = function wrapperStyles(selected) {
|
|
14
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n font-size: 14px;\n width: 14px;\n height: 14px;\n position: absolute;\n top: 7px;\n left: 7px;\n border-radius: 20px;\n color: transparent;\n /* Enforce dimensions and position of \"tick\" icon */\n span {\n display: block;\n svg {\n height: 14px;\n }\n }\n ", "\n"])), transition(), getSelectedStyles(selected));
|
|
15
|
+
};
|
|
16
|
+
wrapperStyles.displayName = 'TickBoxWrapper';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Wrapper } from './styled';
|
|
3
2
|
import TickIcon from '@atlaskit/icon/glyph/check';
|
|
3
|
+
import { TickBoxWrapper } from './tickBoxWrapper';
|
|
4
4
|
export var TickBox = function TickBox(_ref) {
|
|
5
5
|
var selected = _ref.selected;
|
|
6
|
-
return /*#__PURE__*/React.createElement(
|
|
6
|
+
return /*#__PURE__*/React.createElement(TickBoxWrapper, {
|
|
7
7
|
selected: selected
|
|
8
8
|
}, /*#__PURE__*/React.createElement(TickIcon, {
|
|
9
9
|
label: "tick"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { wrapperStyles, tickBoxClassName } from './styles';
|
|
4
|
+
export var TickBoxWrapper = function TickBoxWrapper(props) {
|
|
5
|
+
return jsx("div", {
|
|
6
|
+
id: "tickBoxWrapper",
|
|
7
|
+
css: wrapperStyles(props.selected),
|
|
8
|
+
className: tickBoxClassName
|
|
9
|
+
}, props.children);
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
3
3
|
import EditorWarningIcon from '@atlaskit/icon/glyph/editor/warning';
|
|
4
4
|
import { messages } from '@atlaskit/media-ui';
|
|
5
5
|
import { R300 } from '@atlaskit/theme/colors';
|
|
6
|
-
import {
|
|
7
|
-
import { FormattedMessageWrapper } from '../../styled';
|
|
6
|
+
import { ErrorMessageWrapper, TitleBoxWrapper } from './titleBoxComponents';
|
|
8
7
|
export var FailedTitleBox = function FailedTitleBox(_ref) {
|
|
9
8
|
var breakpoint = _ref.breakpoint,
|
|
10
9
|
_ref$customMessage = _ref.customMessage,
|
|
@@ -15,5 +14,5 @@ export var FailedTitleBox = function FailedTitleBox(_ref) {
|
|
|
15
14
|
label: 'Warning',
|
|
16
15
|
size: 'small',
|
|
17
16
|
primaryColor: R300
|
|
18
|
-
}), /*#__PURE__*/React.createElement(
|
|
17
|
+
}), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, customMessage))));
|
|
19
18
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
4
|
+
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
|
+
import { responsiveSettings, getTitleBoxHeight, Breakpoint } from '../common';
|
|
7
|
+
import { N0 } from '@atlaskit/theme/colors';
|
|
8
|
+
import { rgba } from '../../../styles/mixins';
|
|
9
|
+
|
|
10
|
+
var generateResponsiveStyles = function generateResponsiveStyles() {
|
|
11
|
+
var breakpoint = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Breakpoint.SMALL;
|
|
12
|
+
var setting = responsiveSettings[breakpoint];
|
|
13
|
+
var verticalPadding = setting.titleBox.verticalPadding;
|
|
14
|
+
var horizontalPadding = setting.titleBox.horizontalPadding;
|
|
15
|
+
var height = getTitleBoxHeight(breakpoint);
|
|
16
|
+
return "height: ".concat(height, "px;\n padding: ").concat(verticalPadding, "px ").concat(horizontalPadding, "px;");
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
var HEX_REGEX = /^#[0-9A-F]{6}$/i;
|
|
20
|
+
export var titleBoxWrapperStyles = function titleBoxWrapperStyles(_ref) {
|
|
21
|
+
var breakpoint = _ref.breakpoint,
|
|
22
|
+
titleBoxBgColor = _ref.titleBoxBgColor;
|
|
23
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n bottom: 0;\n width: 100%;\n background-color: ", ";\n color: inherit;\n cursor: inherit;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n justify-content: center;\n ", "\n"])), rgba(titleBoxBgColor && HEX_REGEX.test(titleBoxBgColor) ? titleBoxBgColor : N0, 0.8), generateResponsiveStyles(breakpoint));
|
|
24
|
+
};
|
|
25
|
+
titleBoxWrapperStyles.displayName = 'TitleBoxWrapper';
|
|
26
|
+
var infoStyles = "white-space: nowrap;\n overflow: hidden;";
|
|
27
|
+
var iconOverlapStyles = "padding-right: 10px;";
|
|
28
|
+
export var titleBoxHeaderStyles = function titleBoxHeaderStyles(_ref2) {
|
|
29
|
+
var hasIconOverlap = _ref2.hasIconOverlap;
|
|
30
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-weight: 600;\n ", "\n ", "\n"])), infoStyles, hasIconOverlap && iconOverlapStyles);
|
|
31
|
+
};
|
|
32
|
+
titleBoxHeaderStyles.displayName = 'FailedTitleBoxHeader';
|
|
33
|
+
export var titleBoxFooterStyles = function titleBoxFooterStyles(_ref3) {
|
|
34
|
+
var hasIconOverlap = _ref3.hasIconOverlap;
|
|
35
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n text-overflow: ellipsis;\n ", "\n ", "\n"])), infoStyles, hasIconOverlap && iconOverlapStyles);
|
|
36
|
+
};
|
|
37
|
+
titleBoxFooterStyles.displayName = 'TitleBoxFooter';
|
|
38
|
+
export var titleBoxIconStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n right: 4px;\n bottom: 0px;\n"])));
|
|
39
|
+
export var errorMessageWrapperStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n span {\n vertical-align: middle;\n :nth-child(2) {\n margin-left: 4px;\n margin-right: 4px;\n }\n }\n"])));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LockFilledIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
3
2
|
import { injectIntl } from 'react-intl-next';
|
|
4
|
-
import
|
|
3
|
+
import LockFilledIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
5
4
|
import { Truncate } from '@atlaskit/media-ui/truncateText';
|
|
6
5
|
import { formatDate } from '@atlaskit/media-ui/formatDate';
|
|
6
|
+
import { TitleBoxWrapper, TitleBoxFooter, TitleBoxHeader, TitleBoxIcon } from './titleBoxComponents';
|
|
7
7
|
export var FormattedDate = injectIntl(function (_ref) {
|
|
8
8
|
var timestamp = _ref.timestamp,
|
|
9
9
|
intl = _ref.intl;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { errorMessageWrapperStyles, titleBoxFooterStyles, titleBoxHeaderStyles, titleBoxIconStyles, titleBoxWrapperStyles } from './styles';
|
|
4
|
+
export var TitleBoxWrapper = function TitleBoxWrapper(props) {
|
|
5
|
+
var breakpoint = props.breakpoint,
|
|
6
|
+
titleBoxBgColor = props.titleBoxBgColor;
|
|
7
|
+
return jsx("div", {
|
|
8
|
+
id: "titleBoxWrapper",
|
|
9
|
+
css: titleBoxWrapperStyles({
|
|
10
|
+
breakpoint: breakpoint,
|
|
11
|
+
titleBoxBgColor: titleBoxBgColor
|
|
12
|
+
})
|
|
13
|
+
}, props.children);
|
|
14
|
+
};
|
|
15
|
+
export var TitleBoxHeader = function TitleBoxHeader(props) {
|
|
16
|
+
var hasIconOverlap = props.hasIconOverlap;
|
|
17
|
+
return jsx("div", {
|
|
18
|
+
id: "titleBoxHeader",
|
|
19
|
+
css: titleBoxHeaderStyles({
|
|
20
|
+
hasIconOverlap: hasIconOverlap
|
|
21
|
+
})
|
|
22
|
+
}, props.children);
|
|
23
|
+
};
|
|
24
|
+
export var TitleBoxFooter = function TitleBoxFooter(props) {
|
|
25
|
+
var hasIconOverlap = props.hasIconOverlap;
|
|
26
|
+
return jsx("div", {
|
|
27
|
+
id: "titleBoxFooter",
|
|
28
|
+
css: titleBoxFooterStyles({
|
|
29
|
+
hasIconOverlap: hasIconOverlap
|
|
30
|
+
})
|
|
31
|
+
}, props.children);
|
|
32
|
+
};
|
|
33
|
+
export var TitleBoxIcon = function TitleBoxIcon(props) {
|
|
34
|
+
return jsx("div", {
|
|
35
|
+
id: "titleBoxIcon",
|
|
36
|
+
css: titleBoxIconStyles
|
|
37
|
+
}, props.children);
|
|
38
|
+
};
|
|
39
|
+
export var ErrorMessageWrapper = function ErrorMessageWrapper(props) {
|
|
40
|
+
return jsx("div", {
|
|
41
|
+
css: errorMessageWrapperStyles
|
|
42
|
+
}, props.children);
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,5 +2,5 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
-
import { keyframes } from '
|
|
5
|
+
import { keyframes } from '@emotion/react';
|
|
6
6
|
export var spin = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n to { transform: rotate(360deg); }\n"])));
|
package/dist/esm/styles/index.js
CHANGED
|
@@ -2,14 +2,18 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject, _templateObject2;
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
6
|
import { fontFamily } from '@atlaskit/theme/constants';
|
|
7
7
|
import { fadeIn } from '@atlaskit/media-ui';
|
|
8
8
|
export { defaultTransitionDuration } from './config';
|
|
9
9
|
export { antialiased, borderRadiusLeft, capitalize, centerSelf, centerSelfX, centerSelfY, centerX, hexToRgb, rgba, spaceAround, transition, withAppearance } from './mixins';
|
|
10
10
|
export { easeOutCubic, easeOutExpo } from './easing';
|
|
11
11
|
export { spin } from './animations';
|
|
12
|
-
export var
|
|
12
|
+
export var rootStyles = function rootStyles() {
|
|
13
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n font-family: ", ";\n\n * {\n box-sizing: border-box;\n }\n"])), fontFamily());
|
|
14
|
+
};
|
|
13
15
|
export var cardShadow = "\n box-shadow: 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24);\n";
|
|
14
|
-
export var
|
|
15
|
-
|
|
16
|
+
export var fadeinImageStyles = function fadeinImageStyles() {
|
|
17
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n"])), fadeIn);
|
|
18
|
+
};
|
|
19
|
+
export default rootStyles;
|
package/dist/esm/types.js
CHANGED
|
@@ -5,9 +5,20 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
7
|
import { getMediaClientErrorReason, isRequestError } from '@atlaskit/media-client';
|
|
8
|
-
import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
|
|
8
|
+
import { ANALYTICS_MEDIA_CHANNEL, filterFeatureFlagNames, filterFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
9
9
|
import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
10
10
|
import { isMediaCardError } from '../errors';
|
|
11
|
+
var relevantFlags = {
|
|
12
|
+
newCardExperience: true,
|
|
13
|
+
captions: true,
|
|
14
|
+
timestampOnVideo: true,
|
|
15
|
+
observedWidth: true,
|
|
16
|
+
mediaInline: false,
|
|
17
|
+
folderUploads: false,
|
|
18
|
+
mediaUploadApiV2: true
|
|
19
|
+
};
|
|
20
|
+
export var LOGGED_FEATURE_FLAGS = filterFeatureFlagNames(relevantFlags);
|
|
21
|
+
export var LOGGED_FEATURE_FLAG_KEYS = filterFeatureFlagKeysAllProducts(relevantFlags);
|
|
11
22
|
export var getFileAttributes = function getFileAttributes(metadata, fileStatus) {
|
|
12
23
|
return {
|
|
13
24
|
fileMediatype: metadata.mediaType,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { cardActionButtonStyles } from './styles';
|
|
4
|
+
export var CardActionButton = function CardActionButton(props) {
|
|
5
|
+
return jsx("div", {
|
|
6
|
+
id: "cardActionButton",
|
|
7
|
+
"data-testid": "media-card-primary-action",
|
|
8
|
+
css: cardActionButtonStyles(props),
|
|
9
|
+
style: props.style,
|
|
10
|
+
onClick: props.onClick,
|
|
11
|
+
onMouseDown: props.onMouseDown
|
|
12
|
+
}, props.children);
|
|
13
|
+
};
|
|
@@ -12,7 +12,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
12
12
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { Component } from 'react';
|
|
15
|
-
import { CardActionButton } from './
|
|
15
|
+
import { CardActionButton } from './cardActionButton';
|
|
16
16
|
export var CardActionIconButton = /*#__PURE__*/function (_Component) {
|
|
17
17
|
_inherits(CardActionIconButton, _Component);
|
|
18
18
|
|
|
@@ -45,7 +45,6 @@ export var CardActionIconButton = /*#__PURE__*/function (_Component) {
|
|
|
45
45
|
onClick = _this$props.onClick,
|
|
46
46
|
variant = _this$props.variant;
|
|
47
47
|
return /*#__PURE__*/React.createElement(CardActionButton, {
|
|
48
|
-
"data-testid": "media-card-primary-action",
|
|
49
48
|
onClick: onClick,
|
|
50
49
|
onMouseDown: this.onMouseDown,
|
|
51
50
|
style: {
|
|
@@ -15,9 +15,9 @@ import React from 'react';
|
|
|
15
15
|
import { Component } from 'react';
|
|
16
16
|
import MoreIcon from '@atlaskit/icon/glyph/more';
|
|
17
17
|
import DropdownMenu, { DropdownItemGroup, DropdownItem } from '@atlaskit/dropdown-menu';
|
|
18
|
-
import { CardActionButton } from './styled';
|
|
19
18
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
20
19
|
import { createAndFireMediaCardEvent } from '../analytics';
|
|
20
|
+
import { CardActionButton } from './cardActionButton';
|
|
21
21
|
|
|
22
22
|
var CardActionButtonWithProps = function CardActionButtonWithProps(props) {
|
|
23
23
|
return /*#__PURE__*/React.createElement(CardActionButton, props);
|
|
@@ -8,17 +8,18 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
8
8
|
|
|
9
9
|
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; } }
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
/**@jsx jsx */
|
|
12
|
+
import { jsx } from '@emotion/react';
|
|
12
13
|
import { Component } from 'react';
|
|
13
|
-
import { Wrapper } from './styled';
|
|
14
14
|
import { CardActionIconButton } from './cardActionIconButton';
|
|
15
|
+
import { wrapperStyles } from './styles';
|
|
15
16
|
import { CardActionsDropdownMenu } from './cardActionsDropdownMenu';
|
|
16
17
|
import { PreventClickThrough } from '../preventClickThrough';
|
|
17
18
|
import { createAndFireMediaCardEvent } from '../analytics';
|
|
18
19
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
19
20
|
|
|
20
21
|
var CardActionIconButtonWithProps = function CardActionIconButtonWithProps(props) {
|
|
21
|
-
return
|
|
22
|
+
return jsx(CardActionIconButton, props);
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export var CardActionsView = /*#__PURE__*/function (_Component) {
|
|
@@ -43,7 +44,9 @@ export var CardActionsView = /*#__PURE__*/function (_Component) {
|
|
|
43
44
|
|
|
44
45
|
var primaryAction = actions.find(actionWithIcon);
|
|
45
46
|
var otherActions = actions.filter(actionNotEqualTo(primaryAction));
|
|
46
|
-
return
|
|
47
|
+
return jsx(PreventClickThrough, null, jsx("div", {
|
|
48
|
+
css: wrapperStyles
|
|
49
|
+
}, primaryAction ? this.renderActionIconButton(primaryAction, true) : null, this.renderOtherActionButtons(otherActions)));
|
|
47
50
|
}
|
|
48
51
|
}, {
|
|
49
52
|
key: "renderActionIconButton",
|
|
@@ -66,7 +69,7 @@ export var CardActionsView = /*#__PURE__*/function (_Component) {
|
|
|
66
69
|
}
|
|
67
70
|
})
|
|
68
71
|
})(CardActionIconButtonWithProps);
|
|
69
|
-
return
|
|
72
|
+
return jsx(CardActionIconButtonWithAnalytics, {
|
|
70
73
|
icon: icon,
|
|
71
74
|
triggerColor: triggerColor,
|
|
72
75
|
onClick: function onClick() {
|
|
@@ -91,7 +94,7 @@ export var CardActionsView = /*#__PURE__*/function (_Component) {
|
|
|
91
94
|
if (firstActionWithIcon && otherActions.length === 0) {
|
|
92
95
|
return this.renderActionIconButton(firstActionWithIcon, false);
|
|
93
96
|
} else {
|
|
94
|
-
return
|
|
97
|
+
return jsx(CardActionsDropdownMenu, {
|
|
95
98
|
actions: actions,
|
|
96
99
|
triggerColor: triggerColor,
|
|
97
100
|
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';
|
|
@@ -2,11 +2,11 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject, _templateObject2;
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
6
|
import { N500, N0 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { borderRadius, size, center } from '@atlaskit/media-ui';
|
|
8
|
-
import {
|
|
9
|
-
export var
|
|
8
|
+
import { rootStyles } from '../../styles';
|
|
9
|
+
export var wrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n display: flex;\n position: relative;\n line-height: 0;\n"])), rootStyles());
|
|
10
10
|
export var CardActionIconButtonVariant;
|
|
11
11
|
|
|
12
12
|
(function (CardActionIconButtonVariant) {
|
|
@@ -18,7 +18,7 @@ var getVariantStyles = function getVariantStyles(variant) {
|
|
|
18
18
|
return variant === 'filled' ? "\n background: ".concat(N0, ";\n margin-right: 8px;\n opacity: 0.8;\n\n &:last-child {\n margin-right: 0;\n }\n\n &:hover {\n opacity: 0.6;\n }\n ") : "\n &:hover {\n background-color: rgba(9, 30, 66, 0.06);\n }\n ";
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
export var
|
|
21
|
+
export var cardActionButtonStyles = function cardActionButtonStyles(_ref) {
|
|
22
22
|
var variant = _ref.variant;
|
|
23
|
-
return "\n
|
|
24
|
-
}
|
|
23
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n color: ", ";\n\n &:hover {\n cursor: pointer;\n }\n\n ", "\n"])), center, borderRadius, size(26), N500, getVariantStyles(variant));
|
|
24
|
+
};
|
|
@@ -9,10 +9,11 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
9
9
|
|
|
10
10
|
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; } }
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
/**@jsx jsx */
|
|
13
|
+
import { jsx } from '@emotion/react';
|
|
13
14
|
import { Component } from 'react';
|
|
14
15
|
import WarningIcon from '@atlaskit/icon/glyph/editor/warning';
|
|
15
|
-
import {
|
|
16
|
+
import { errorIconWrapperStyles } from './styles';
|
|
16
17
|
export var ErrorIcon = /*#__PURE__*/function (_Component) {
|
|
17
18
|
_inherits(ErrorIcon, _Component);
|
|
18
19
|
|
|
@@ -28,7 +29,9 @@ export var ErrorIcon = /*#__PURE__*/function (_Component) {
|
|
|
28
29
|
key: "render",
|
|
29
30
|
value: function render() {
|
|
30
31
|
var size = this.props.size;
|
|
31
|
-
return
|
|
32
|
+
return jsx("div", {
|
|
33
|
+
css: errorIconWrapperStyles
|
|
34
|
+
}, jsx(WarningIcon, {
|
|
32
35
|
label: "Error",
|
|
33
36
|
size: size
|
|
34
37
|
}));
|