@atlaskit/media-card 75.0.1 → 76.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 +16 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/cardState.js +1 -1
- package/dist/cjs/card/cardView.js +102 -196
- package/dist/cjs/card/getCardStatus.js +2 -41
- package/dist/cjs/card/inlinePlayerWrapper.js +3 -3
- package/dist/cjs/card/inlinePlayerWrapperStyles.js +30 -0
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/ui/actionsBar/actionsBar.js +1 -1
- package/dist/cjs/{utils → card/ui/actionsBar}/cardActions/cardActionsDropdownMenu.js +1 -1
- package/dist/cjs/{utils → card/ui/actionsBar}/cardActions/cardActionsView.js +2 -2
- package/dist/cjs/{utils → card/ui/actionsBar}/cardActions/styles.js +9 -6
- package/dist/cjs/card/ui/actionsBar/styles.js +1 -1
- package/dist/cjs/card/ui/blanket/styles.js +1 -1
- package/dist/cjs/card/ui/imageRenderer/imageRenderer.js +1 -1
- package/dist/cjs/card/ui/progressBar/styles.js +2 -2
- package/dist/cjs/card/ui/styles.js +16 -2
- package/dist/cjs/card/ui/tickBox/styles.js +1 -1
- package/dist/cjs/card/ui/titleBox/styles.js +3 -3
- package/dist/cjs/card/ui/wrapper/index.js +12 -0
- package/dist/cjs/card/ui/{newFileExperience → wrapper}/styles.js +7 -8
- package/dist/cjs/card/ui/{newFileExperience/newFileExperienceWrapper.js → wrapper/wrapper.js} +4 -4
- package/dist/cjs/classnames.js +1 -7
- package/dist/cjs/index.js +3 -9
- package/dist/cjs/inline/loader.js +15 -6
- package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +1 -9
- package/dist/cjs/inline/mediaInlineCard.js +61 -12
- package/dist/cjs/inline/mediaInlineCardAnalytics.js +60 -0
- package/dist/cjs/utils/cardDimensions.js +1 -86
- package/dist/cjs/utils/index.js +1 -128
- package/dist/cjs/utils/lightCards/cardError.js +1 -1
- package/dist/cjs/utils/lightCards/cardLoading.js +3 -16
- package/dist/cjs/utils/lightCards/lightCardWrappers.js +2 -12
- package/dist/cjs/utils/lightCards/styles.js +4 -10
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/cardState.js +1 -1
- package/dist/es2019/card/cardView.js +54 -154
- package/dist/es2019/card/getCardStatus.js +1 -41
- package/dist/es2019/card/inlinePlayerWrapper.js +1 -1
- package/dist/es2019/card/inlinePlayerWrapperStyles.js +47 -0
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/ui/actionsBar/actionsBar.js +1 -1
- package/dist/es2019/{utils → card/ui/actionsBar}/cardActions/cardActionsDropdownMenu.js +1 -1
- package/dist/es2019/{utils → card/ui/actionsBar}/cardActions/cardActionsView.js +2 -2
- package/dist/es2019/{utils → card/ui/actionsBar}/cardActions/styles.js +10 -2
- package/dist/es2019/card/ui/actionsBar/styles.js +1 -1
- package/dist/es2019/card/ui/blanket/styles.js +1 -1
- package/dist/es2019/card/ui/imageRenderer/imageRenderer.js +1 -1
- package/dist/es2019/card/ui/progressBar/styles.js +1 -1
- package/dist/es2019/card/ui/styles.js +10 -1
- package/dist/es2019/card/ui/tickBox/styles.js +1 -1
- package/dist/es2019/card/ui/titleBox/styles.js +1 -1
- package/dist/es2019/card/ui/wrapper/index.js +1 -0
- package/dist/es2019/card/ui/{newFileExperience → wrapper}/styles.js +3 -3
- package/dist/es2019/card/ui/{newFileExperience/newFileExperienceWrapper.js → wrapper/wrapper.js} +3 -3
- package/dist/es2019/classnames.js +1 -1
- package/dist/es2019/index.js +2 -2
- package/dist/es2019/inline/loader.js +15 -6
- package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +1 -9
- package/dist/es2019/inline/mediaInlineCard.js +50 -8
- package/dist/es2019/inline/mediaInlineCardAnalytics.js +48 -0
- package/dist/es2019/utils/cardDimensions.js +0 -76
- package/dist/es2019/utils/index.js +1 -5
- package/dist/es2019/utils/lightCards/cardError.js +1 -1
- package/dist/es2019/utils/lightCards/cardLoading.js +4 -17
- package/dist/es2019/utils/lightCards/lightCardWrappers.js +1 -10
- package/dist/es2019/utils/lightCards/styles.js +1 -20
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/cardState.js +1 -1
- package/dist/esm/card/cardView.js +104 -198
- package/dist/esm/card/getCardStatus.js +2 -41
- package/dist/esm/card/inlinePlayerWrapper.js +1 -1
- package/dist/esm/card/inlinePlayerWrapperStyles.js +22 -0
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/ui/actionsBar/actionsBar.js +1 -1
- package/dist/esm/{utils → card/ui/actionsBar}/cardActions/cardActionsDropdownMenu.js +1 -1
- package/dist/esm/{utils → card/ui/actionsBar}/cardActions/cardActionsView.js +2 -2
- package/dist/esm/{utils → card/ui/actionsBar}/cardActions/styles.js +8 -5
- package/dist/esm/card/ui/actionsBar/styles.js +1 -1
- package/dist/esm/card/ui/blanket/styles.js +1 -1
- package/dist/esm/card/ui/imageRenderer/imageRenderer.js +1 -1
- package/dist/esm/card/ui/progressBar/styles.js +1 -1
- package/dist/esm/card/ui/styles.js +13 -1
- package/dist/esm/card/ui/tickBox/styles.js +1 -1
- package/dist/esm/card/ui/titleBox/styles.js +1 -1
- package/dist/esm/card/ui/wrapper/index.js +1 -0
- package/dist/esm/card/ui/{newFileExperience → wrapper}/styles.js +3 -3
- package/dist/esm/card/ui/{newFileExperience/newFileExperienceWrapper.js → wrapper/wrapper.js} +3 -3
- package/dist/esm/classnames.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/inline/loader.js +15 -6
- package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +1 -9
- package/dist/esm/inline/mediaInlineCard.js +61 -12
- package/dist/esm/inline/mediaInlineCardAnalytics.js +50 -0
- package/dist/esm/utils/cardDimensions.js +0 -76
- package/dist/esm/utils/index.js +1 -5
- package/dist/esm/utils/lightCards/cardError.js +1 -1
- package/dist/esm/utils/lightCards/cardLoading.js +4 -17
- package/dist/esm/utils/lightCards/lightCardWrappers.js +1 -10
- package/dist/esm/utils/lightCards/styles.js +3 -7
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/card/cardView.d.ts +3 -6
- package/dist/types/card/getCardStatus.d.ts +1 -2
- package/dist/{types-ts4.5/card/styles/styles.d.ts → types/card/inlinePlayerWrapperStyles.d.ts} +1 -5
- package/dist/types/card/types.d.ts +1 -12
- package/dist/{types-ts4.5/utils → types/card/ui/actionsBar}/cardActions/cardActionsDropdownMenu.d.ts +1 -1
- package/dist/{types-ts4.5/utils → types/card/ui/actionsBar}/cardActions/cardActionsView.d.ts +1 -1
- package/dist/types/card/ui/styles.d.ts +2 -0
- package/dist/types/card/ui/wrapper/index.d.ts +1 -0
- package/dist/types/card/ui/wrapper/styles.d.ts +5 -0
- package/dist/{types-ts4.5/card/ui/newFileExperience → types/card/ui/wrapper}/types.d.ts +1 -1
- package/dist/{types-ts4.5/card/cardImageView/cardViewWrapper.d.ts → types/card/ui/wrapper/wrapper.d.ts} +1 -1
- package/dist/types/classnames.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/inline/loader.d.ts +1 -1
- package/dist/types/inline/mediaInlineCardAnalytics.d.ts +6 -0
- package/dist/types/utils/analytics.d.ts +7 -1
- package/dist/types/utils/cardDimensions.d.ts +0 -35
- package/dist/types/utils/index.d.ts +1 -9
- package/dist/types/utils/lightCards/lightCardWrappers.d.ts +0 -1
- package/dist/types/utils/lightCards/styles.d.ts +0 -2
- package/dist/types-ts4.5/card/cardView.d.ts +3 -6
- package/dist/types-ts4.5/card/getCardStatus.d.ts +1 -2
- package/dist/{types/card/styles/styles.d.ts → types-ts4.5/card/inlinePlayerWrapperStyles.d.ts} +1 -5
- package/dist/types-ts4.5/card/types.d.ts +1 -12
- package/dist/{types/utils → types-ts4.5/card/ui/actionsBar}/cardActions/cardActionsDropdownMenu.d.ts +1 -1
- package/dist/{types/utils → types-ts4.5/card/ui/actionsBar}/cardActions/cardActionsView.d.ts +1 -1
- package/dist/types-ts4.5/card/ui/styles.d.ts +2 -0
- package/dist/types-ts4.5/card/ui/wrapper/index.d.ts +1 -0
- package/dist/types-ts4.5/card/ui/wrapper/styles.d.ts +5 -0
- package/dist/{types/card/ui/newFileExperience → types-ts4.5/card/ui/wrapper}/types.d.ts +1 -1
- package/dist/{types/card/cardImageView/cardViewWrapper.d.ts → types-ts4.5/card/ui/wrapper/wrapper.d.ts} +1 -1
- package/dist/types-ts4.5/classnames.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/inline/loader.d.ts +1 -1
- package/dist/types-ts4.5/inline/mediaInlineCardAnalytics.d.ts +6 -0
- package/dist/types-ts4.5/utils/analytics.d.ts +7 -1
- package/dist/types-ts4.5/utils/cardDimensions.d.ts +0 -35
- package/dist/types-ts4.5/utils/index.d.ts +1 -9
- package/dist/types-ts4.5/utils/lightCards/lightCardWrappers.d.ts +0 -1
- package/dist/types-ts4.5/utils/lightCards/styles.d.ts +0 -2
- package/package.json +4 -4
- package/report.api.md +2 -6
- package/dist/cjs/card/cardImageView/cardImageViewWrapper.js +0 -51
- package/dist/cjs/card/cardImageView/cardOverlay/cardOverlayComponents.js +0 -51
- package/dist/cjs/card/cardImageView/cardOverlay/index.js +0 -183
- package/dist/cjs/card/cardImageView/cardOverlay/styles.js +0 -63
- package/dist/cjs/card/cardImageView/cardViewWrapper.js +0 -32
- package/dist/cjs/card/cardImageView/fileCardImageView.js +0 -310
- package/dist/cjs/card/cardImageView/index.js +0 -12
- package/dist/cjs/card/cardImageView/styles.js +0 -48
- package/dist/cjs/card/styles/animations.js +0 -12
- package/dist/cjs/card/styles/config.js +0 -8
- package/dist/cjs/card/styles/easing.js +0 -10
- package/dist/cjs/card/styles/getSelectedBorderStyle.js +0 -17
- package/dist/cjs/card/styles/index.js +0 -121
- package/dist/cjs/card/styles/mixins.js +0 -45
- package/dist/cjs/card/styles/styles.js +0 -41
- package/dist/cjs/card/ui/loadingRateLimited/styles.js +0 -27
- package/dist/cjs/utils/breakpoint.js +0 -42
- package/dist/cjs/utils/fileIcon/index.js +0 -54
- package/dist/cjs/utils/fileIcon/styles.js +0 -13
- package/dist/cjs/utils/getErrorMessage.js +0 -14
- package/dist/cjs/utils/progressBar/index.js +0 -45
- package/dist/cjs/utils/progressBar/styles.js +0 -14
- package/dist/cjs/utils/shouldDisplayImageThumbnail.js +0 -17
- package/dist/es2019/card/cardImageView/cardImageViewWrapper.js +0 -43
- package/dist/es2019/card/cardImageView/cardOverlay/cardOverlayComponents.js +0 -41
- package/dist/es2019/card/cardImageView/cardOverlay/index.js +0 -158
- package/dist/es2019/card/cardImageView/cardOverlay/styles.js +0 -240
- package/dist/es2019/card/cardImageView/cardViewWrapper.js +0 -26
- package/dist/es2019/card/cardImageView/fileCardImageView.js +0 -291
- package/dist/es2019/card/cardImageView/index.js +0 -1
- package/dist/es2019/card/cardImageView/styles.js +0 -131
- package/dist/es2019/card/styles/animations.js +0 -4
- package/dist/es2019/card/styles/config.js +0 -1
- package/dist/es2019/card/styles/easing.js +0 -2
- package/dist/es2019/card/styles/getSelectedBorderStyle.js +0 -24
- package/dist/es2019/card/styles/index.js +0 -18
- package/dist/es2019/card/styles/mixins.js +0 -51
- package/dist/es2019/card/styles/styles.js +0 -42
- package/dist/es2019/card/ui/loadingRateLimited/styles.js +0 -41
- package/dist/es2019/utils/breakpoint.js +0 -83
- package/dist/es2019/utils/fileIcon/index.js +0 -31
- package/dist/es2019/utils/fileIcon/styles.js +0 -11
- package/dist/es2019/utils/getErrorMessage.js +0 -4
- package/dist/es2019/utils/progressBar/index.js +0 -21
- package/dist/es2019/utils/progressBar/styles.js +0 -15
- package/dist/es2019/utils/shouldDisplayImageThumbnail.js +0 -10
- package/dist/esm/card/cardImageView/cardImageViewWrapper.js +0 -41
- package/dist/esm/card/cardImageView/cardOverlay/cardOverlayComponents.js +0 -39
- package/dist/esm/card/cardImageView/cardOverlay/index.js +0 -176
- package/dist/esm/card/cardImageView/cardOverlay/styles.js +0 -42
- package/dist/esm/card/cardImageView/cardViewWrapper.js +0 -24
- package/dist/esm/card/cardImageView/fileCardImageView.js +0 -300
- package/dist/esm/card/cardImageView/index.js +0 -1
- package/dist/esm/card/cardImageView/styles.js +0 -33
- package/dist/esm/card/styles/animations.js +0 -4
- package/dist/esm/card/styles/config.js +0 -1
- package/dist/esm/card/styles/easing.js +0 -2
- package/dist/esm/card/styles/getSelectedBorderStyle.js +0 -11
- package/dist/esm/card/styles/index.js +0 -13
- package/dist/esm/card/styles/mixins.js +0 -27
- package/dist/esm/card/styles/styles.js +0 -31
- package/dist/esm/card/ui/loadingRateLimited/styles.js +0 -15
- package/dist/esm/utils/breakpoint.js +0 -33
- package/dist/esm/utils/fileIcon/index.js +0 -47
- package/dist/esm/utils/fileIcon/styles.js +0 -5
- package/dist/esm/utils/getErrorMessage.js +0 -6
- package/dist/esm/utils/progressBar/index.js +0 -38
- package/dist/esm/utils/progressBar/styles.js +0 -6
- package/dist/esm/utils/shouldDisplayImageThumbnail.js +0 -10
- package/dist/types/card/cardImageView/cardImageViewWrapper.d.ts +0 -6
- package/dist/types/card/cardImageView/cardOverlay/cardOverlayComponents.d.ts +0 -8
- package/dist/types/card/cardImageView/cardOverlay/index.d.ts +0 -39
- package/dist/types/card/cardImageView/cardOverlay/styles.d.ts +0 -26
- package/dist/types/card/cardImageView/fileCardImageView.d.ts +0 -49
- package/dist/types/card/cardImageView/index.d.ts +0 -2
- package/dist/types/card/cardImageView/styles.d.ts +0 -24
- package/dist/types/card/styles/animations.d.ts +0 -1
- package/dist/types/card/styles/config.d.ts +0 -1
- package/dist/types/card/styles/easing.d.ts +0 -2
- package/dist/types/card/styles/getSelectedBorderStyle.d.ts +0 -3
- package/dist/types/card/styles/index.d.ts +0 -8
- package/dist/types/card/styles/mixins.d.ts +0 -21
- package/dist/types/card/ui/loadingRateLimited/styles.d.ts +0 -13
- package/dist/types/card/ui/newFileExperience/newFileExperienceWrapper.d.ts +0 -4
- package/dist/types/card/ui/newFileExperience/styles.d.ts +0 -5
- package/dist/types/utils/breakpoint.d.ts +0 -11
- package/dist/types/utils/fileIcon/index.d.ts +0 -12
- package/dist/types/utils/fileIcon/styles.d.ts +0 -1
- package/dist/types/utils/getErrorMessage.d.ts +0 -2
- package/dist/types/utils/progressBar/index.d.ts +0 -9
- package/dist/types/utils/progressBar/styles.d.ts +0 -1
- package/dist/types/utils/shouldDisplayImageThumbnail.d.ts +0 -3
- package/dist/types-ts4.5/card/cardImageView/cardImageViewWrapper.d.ts +0 -6
- package/dist/types-ts4.5/card/cardImageView/cardOverlay/cardOverlayComponents.d.ts +0 -8
- package/dist/types-ts4.5/card/cardImageView/cardOverlay/index.d.ts +0 -39
- package/dist/types-ts4.5/card/cardImageView/cardOverlay/styles.d.ts +0 -26
- package/dist/types-ts4.5/card/cardImageView/fileCardImageView.d.ts +0 -49
- package/dist/types-ts4.5/card/cardImageView/index.d.ts +0 -2
- package/dist/types-ts4.5/card/cardImageView/styles.d.ts +0 -24
- package/dist/types-ts4.5/card/styles/animations.d.ts +0 -1
- package/dist/types-ts4.5/card/styles/config.d.ts +0 -1
- package/dist/types-ts4.5/card/styles/easing.d.ts +0 -2
- package/dist/types-ts4.5/card/styles/getSelectedBorderStyle.d.ts +0 -3
- package/dist/types-ts4.5/card/styles/index.d.ts +0 -8
- package/dist/types-ts4.5/card/styles/mixins.d.ts +0 -21
- package/dist/types-ts4.5/card/ui/loadingRateLimited/styles.d.ts +0 -13
- package/dist/types-ts4.5/card/ui/newFileExperience/newFileExperienceWrapper.d.ts +0 -4
- package/dist/types-ts4.5/card/ui/newFileExperience/styles.d.ts +0 -5
- package/dist/types-ts4.5/utils/breakpoint.d.ts +0 -11
- package/dist/types-ts4.5/utils/fileIcon/index.d.ts +0 -12
- package/dist/types-ts4.5/utils/fileIcon/styles.d.ts +0 -1
- package/dist/types-ts4.5/utils/getErrorMessage.d.ts +0 -2
- package/dist/types-ts4.5/utils/progressBar/index.d.ts +0 -9
- package/dist/types-ts4.5/utils/progressBar/styles.d.ts +0 -1
- package/dist/types-ts4.5/utils/shouldDisplayImageThumbnail.d.ts +0 -3
- /package/dist/cjs/card/{cardImageView/classnames.js → classnames.js} +0 -0
- /package/dist/cjs/{utils → card/ui/actionsBar}/cardActions/cardActionButton.js +0 -0
- /package/dist/cjs/{utils → card/ui/actionsBar}/cardActions/cardActionIconButton.js +0 -0
- /package/dist/cjs/{utils → card/ui/actionsBar}/cardActions/index.js +0 -0
- /package/dist/cjs/{utils → card/ui/imageRenderer}/resizeModeToMediaImageProps.js +0 -0
- /package/dist/cjs/card/ui/{newFileExperience → wrapper}/types.js +0 -0
- /package/dist/cjs/utils/{errorIcon → lightCards/errorIcon}/index.js +0 -0
- /package/dist/cjs/utils/{errorIcon → lightCards/errorIcon}/styles.js +0 -0
- /package/dist/es2019/card/{cardImageView/classnames.js → classnames.js} +0 -0
- /package/dist/es2019/{utils → card/ui/actionsBar}/cardActions/cardActionButton.js +0 -0
- /package/dist/es2019/{utils → card/ui/actionsBar}/cardActions/cardActionIconButton.js +0 -0
- /package/dist/es2019/{utils → card/ui/actionsBar}/cardActions/index.js +0 -0
- /package/dist/es2019/{utils → card/ui/imageRenderer}/resizeModeToMediaImageProps.js +0 -0
- /package/dist/es2019/card/ui/{newFileExperience → wrapper}/types.js +0 -0
- /package/dist/es2019/utils/{errorIcon → lightCards/errorIcon}/index.js +0 -0
- /package/dist/es2019/utils/{errorIcon → lightCards/errorIcon}/styles.js +0 -0
- /package/dist/esm/card/{cardImageView/classnames.js → classnames.js} +0 -0
- /package/dist/esm/{utils → card/ui/actionsBar}/cardActions/cardActionButton.js +0 -0
- /package/dist/esm/{utils → card/ui/actionsBar}/cardActions/cardActionIconButton.js +0 -0
- /package/dist/esm/{utils → card/ui/actionsBar}/cardActions/index.js +0 -0
- /package/dist/esm/{utils → card/ui/imageRenderer}/resizeModeToMediaImageProps.js +0 -0
- /package/dist/esm/card/ui/{newFileExperience → wrapper}/types.js +0 -0
- /package/dist/esm/utils/{errorIcon → lightCards/errorIcon}/index.js +0 -0
- /package/dist/esm/utils/{errorIcon → lightCards/errorIcon}/styles.js +0 -0
- /package/dist/types/card/{cardImageView/classnames.d.ts → classnames.d.ts} +0 -0
- /package/dist/types/{utils → card/ui/actionsBar}/cardActions/cardActionButton.d.ts +0 -0
- /package/dist/types/{utils → card/ui/actionsBar}/cardActions/cardActionIconButton.d.ts +0 -0
- /package/dist/types/{utils → card/ui/actionsBar}/cardActions/index.d.ts +0 -0
- /package/dist/types/{utils → card/ui/actionsBar}/cardActions/styles.d.ts +0 -0
- /package/dist/types/{utils → card/ui/imageRenderer}/resizeModeToMediaImageProps.d.ts +0 -0
- /package/dist/types/utils/{errorIcon → lightCards/errorIcon}/index.d.ts +0 -0
- /package/dist/types/utils/{errorIcon → lightCards/errorIcon}/styles.d.ts +0 -0
- /package/dist/types-ts4.5/card/{cardImageView/classnames.d.ts → classnames.d.ts} +0 -0
- /package/dist/types-ts4.5/{utils → card/ui/actionsBar}/cardActions/cardActionButton.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → card/ui/actionsBar}/cardActions/cardActionIconButton.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → card/ui/actionsBar}/cardActions/index.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → card/ui/actionsBar}/cardActions/styles.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → card/ui/imageRenderer}/resizeModeToMediaImageProps.d.ts +0 -0
- /package/dist/types-ts4.5/utils/{errorIcon → lightCards/errorIcon}/index.d.ts +0 -0
- /package/dist/types-ts4.5/utils/{errorIcon → lightCards/errorIcon}/styles.d.ts +0 -0
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/react';
|
|
2
|
-
import { absolute, borderRadius, size } from '@atlaskit/media-ui';
|
|
3
|
-
import { themed } from '@atlaskit/theme/components';
|
|
4
|
-
import { N20, DN50, N0 } from '@atlaskit/theme/colors';
|
|
5
|
-
import { rootStyles, cardShadow } from '../styles';
|
|
6
|
-
import { getSelectedBorderStyle } from '../styles/getSelectedBorderStyle';
|
|
7
|
-
const getShadowAttribute = props => {
|
|
8
|
-
const {
|
|
9
|
-
disableOverlay
|
|
10
|
-
} = props;
|
|
11
|
-
return disableOverlay ? '' : cardShadow;
|
|
12
|
-
};
|
|
13
|
-
const getBackgroundColor = props => {
|
|
14
|
-
const {
|
|
15
|
-
mediaType
|
|
16
|
-
} = props;
|
|
17
|
-
return `background: ${mediaType === 'image' ? 'transparent' : themed({
|
|
18
|
-
light: `var(--ds-background-neutral, ${N20})`,
|
|
19
|
-
dark: `var(--ds-background-neutral, ${DN50})`
|
|
20
|
-
})(props)};`;
|
|
21
|
-
};
|
|
22
|
-
export const wrapperStyles = props => css`
|
|
23
|
-
${rootStyles()}
|
|
24
|
-
${getShadowAttribute(props)}
|
|
25
|
-
${borderRadius}
|
|
26
|
-
${getBackgroundColor(props)}
|
|
27
|
-
|
|
28
|
-
line-height: normal;
|
|
29
|
-
position: relative;
|
|
30
|
-
|
|
31
|
-
${getSelectedBorderStyle(props)}
|
|
32
|
-
|
|
33
|
-
${size()} .wrapper {
|
|
34
|
-
${borderRadius};
|
|
35
|
-
display: block;
|
|
36
|
-
height: inherit;
|
|
37
|
-
position: relative;
|
|
38
|
-
|
|
39
|
-
.img-wrapper {
|
|
40
|
-
position: relative;
|
|
41
|
-
width: inherit;
|
|
42
|
-
height: inherit;
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
display: block;
|
|
45
|
-
${borderRadius}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
`;
|
|
49
|
-
export const playIconWrapperStyles = css`
|
|
50
|
-
position: absolute;
|
|
51
|
-
top: 0;
|
|
52
|
-
left: 0;
|
|
53
|
-
width: 100%;
|
|
54
|
-
height: 100%;
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
color: ${"var(--ds-icon-inverse, white)"};
|
|
59
|
-
|
|
60
|
-
/* we want to override default icon size and hover state */
|
|
61
|
-
&:hover > * {
|
|
62
|
-
width: 64px;
|
|
63
|
-
height: 64px;
|
|
64
|
-
}
|
|
65
|
-
`;
|
|
66
|
-
export const playIconBackgroundStyles = css`
|
|
67
|
-
background: ${"var(--ds-background-neutral-bold, rgba(23, 43, 77, 0.7))"};
|
|
68
|
-
border-radius: 100%;
|
|
69
|
-
padding: 10px;
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
justify-content: center;
|
|
73
|
-
transition-property: width, height;
|
|
74
|
-
transition-duration: 0.1s;
|
|
75
|
-
width: 56px;
|
|
76
|
-
height: 56px;
|
|
77
|
-
`;
|
|
78
|
-
const bodyHeight = 26;
|
|
79
|
-
export const progressBarWrapperStyles = css`
|
|
80
|
-
position: absolute;
|
|
81
|
-
height: 100%;
|
|
82
|
-
width: 100%;
|
|
83
|
-
`;
|
|
84
|
-
export const overlayStyles = css`
|
|
85
|
-
${absolute()}
|
|
86
|
-
${size()}
|
|
87
|
-
border-radius: inherit;
|
|
88
|
-
background-color: ${"var(--ds-blanket, rgba(9, 30, 66, 0.5))"};
|
|
89
|
-
`;
|
|
90
|
-
export const titleStyles = css`
|
|
91
|
-
${absolute()} width: 100%;
|
|
92
|
-
padding: 8px;
|
|
93
|
-
color: ${`var(--ds-text-inverse, ${N0})`};
|
|
94
|
-
font-size: 12px;
|
|
95
|
-
line-height: 18px;
|
|
96
|
-
word-wrap: break-word;
|
|
97
|
-
`;
|
|
98
|
-
export const bodyStyles = css`
|
|
99
|
-
display: flex;
|
|
100
|
-
position: absolute;
|
|
101
|
-
bottom: 0;
|
|
102
|
-
width: 100%;
|
|
103
|
-
padding: 8px;
|
|
104
|
-
color: ${`var(--ds-text-inverse, ${N0})`};
|
|
105
|
-
`;
|
|
106
|
-
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
107
|
-
|
|
108
|
-
export const progressWrapperStyles = css`
|
|
109
|
-
flex-grow: 1;
|
|
110
|
-
|
|
111
|
-
/*
|
|
112
|
-
force the height to always be 20px (the height of the cancel icon),
|
|
113
|
-
so that the height of the progress bar doesn't jump when cards with
|
|
114
|
-
and without a cancel icon are rendered side-by-side.
|
|
115
|
-
*/
|
|
116
|
-
height: ${bodyHeight}px;
|
|
117
|
-
|
|
118
|
-
/*
|
|
119
|
-
vertically center the progress bar within the 20px, keeping the progress bar full width
|
|
120
|
-
*/
|
|
121
|
-
display: flex;
|
|
122
|
-
flex-direction: column;
|
|
123
|
-
justify-content: center;
|
|
124
|
-
`;
|
|
125
|
-
export const cardActionsWrapperStyles = css`
|
|
126
|
-
margin-left: 4px;
|
|
127
|
-
/*
|
|
128
|
-
button must appear above overlay
|
|
129
|
-
*/
|
|
130
|
-
z-index: 2;
|
|
131
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const defaultTransitionDuration = '.3s';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { borderRadius } from '@atlaskit/media-ui';
|
|
2
|
-
import { getSelectionStyles, SelectionStyle, hideNativeBrowserTextSelectionStyles } from '@atlaskit/editor-shared-styles/selection';
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
* Used to display the blue border around a selected card without
|
|
6
|
-
* shrinking the image OR growing the card size
|
|
7
|
-
*/
|
|
8
|
-
export const getSelectedBorderStyle = ({
|
|
9
|
-
selected
|
|
10
|
-
}) => `
|
|
11
|
-
${hideNativeBrowserTextSelectionStyles}
|
|
12
|
-
|
|
13
|
-
&::after {
|
|
14
|
-
content: '';
|
|
15
|
-
width: 100%;
|
|
16
|
-
height: 100%;
|
|
17
|
-
position: absolute;
|
|
18
|
-
top: 0;
|
|
19
|
-
box-sizing: border-box;
|
|
20
|
-
pointer-events: none;
|
|
21
|
-
${borderRadius}
|
|
22
|
-
${selected ? getSelectionStyles([SelectionStyle.Border]) : ''}
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/react';
|
|
2
|
-
import { fontFamily } from '@atlaskit/theme/constants';
|
|
3
|
-
export { defaultTransitionDuration } from './config';
|
|
4
|
-
export { antialiased, borderRadiusLeft, capitalize, centerSelf, centerSelfX, centerSelfY, centerX, hexToRgb, rgba, spaceAround, transition, withAppearance } from './mixins';
|
|
5
|
-
export { easeOutCubic, easeOutExpo } from './easing';
|
|
6
|
-
export { spin } from './animations';
|
|
7
|
-
export const rootStyles = () => css`
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
font-family: ${fontFamily()};
|
|
10
|
-
|
|
11
|
-
* {
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
export const cardShadow = `
|
|
16
|
-
box-shadow: ${"var(--ds-shadow-raised, 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24))"};
|
|
17
|
-
`;
|
|
18
|
-
export default rootStyles;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
2
|
-
import { defaultTransitionDuration } from './config';
|
|
3
|
-
export const centerX = `
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
`;
|
|
7
|
-
export const antialiased = `
|
|
8
|
-
-webkit-font-smoothing: antialiased;
|
|
9
|
-
-moz-osx-font-smoothing: grayscale;
|
|
10
|
-
`;
|
|
11
|
-
export const centerSelfY = `
|
|
12
|
-
position: absolute;
|
|
13
|
-
top: 50%;
|
|
14
|
-
transform: translateY(-50%);
|
|
15
|
-
`;
|
|
16
|
-
export const centerSelfX = `
|
|
17
|
-
position: absolute;
|
|
18
|
-
left: 50%;
|
|
19
|
-
transform: translateX(-50%);
|
|
20
|
-
`;
|
|
21
|
-
export const centerSelf = `
|
|
22
|
-
position: absolute;
|
|
23
|
-
left: 50%;
|
|
24
|
-
top: 50%;
|
|
25
|
-
transform: translate(-50%, -50%);
|
|
26
|
-
`;
|
|
27
|
-
export const borderRadiusLeft = `
|
|
28
|
-
border-top-left-radius: ${borderRadius()};
|
|
29
|
-
border-bottom-left-radius: ${borderRadius()};
|
|
30
|
-
`;
|
|
31
|
-
export const spaceAround = `
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
justify-content: space-around;
|
|
35
|
-
`;
|
|
36
|
-
export const transition = (propertyName = 'all') => `
|
|
37
|
-
transition: ${propertyName} ${defaultTransitionDuration};
|
|
38
|
-
`;
|
|
39
|
-
export const hexToRgb = hex => {
|
|
40
|
-
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
41
|
-
return result ? `${parseInt(result[1], 16)},${parseInt(result[2], 16)},${parseInt(result[3], 16)}` : null;
|
|
42
|
-
};
|
|
43
|
-
export const rgba = (hex, opacity) => `rgba(${hexToRgb(hex)}, ${opacity})`;
|
|
44
|
-
export const capitalize = `
|
|
45
|
-
&::first-letter {
|
|
46
|
-
text-transform: uppercase;
|
|
47
|
-
}
|
|
48
|
-
`;
|
|
49
|
-
export const withAppearance = styleMap => ({
|
|
50
|
-
appearance
|
|
51
|
-
}) => appearance && styleMap[appearance] || '';
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/react';
|
|
2
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
3
|
-
import { getCSSUnitValue } from '../../utils/getCSSUnitValue';
|
|
4
|
-
import { breakpointStyles } from '../../utils/breakpoint';
|
|
5
|
-
import { getSelectedBorderStyle } from './getSelectedBorderStyle';
|
|
6
|
-
import { getDimensionsWithDefault } from '../../utils/lightCards/getDimensionsWithDefault';
|
|
7
|
-
export const inlinePlayerClassName = 'media-card-inline-player';
|
|
8
|
-
const getWrapperHeight = dimensions => dimensions && dimensions.height ? `height: ${getCSSUnitValue(dimensions.height)}; max-height: 100%;` : '';
|
|
9
|
-
const getWrapperWidth = dimensions => dimensions && dimensions.width ? `width: ${getCSSUnitValue(dimensions.width)}; max-width: 100%;` : '';
|
|
10
|
-
export const wrapperStyles = ({
|
|
11
|
-
dimensions,
|
|
12
|
-
breakpointSize = 'medium',
|
|
13
|
-
shouldUsePointerCursor
|
|
14
|
-
}) => css`
|
|
15
|
-
${breakpointStyles({
|
|
16
|
-
breakpointSize
|
|
17
|
-
})}
|
|
18
|
-
${getWrapperHeight(dimensions)}
|
|
19
|
-
${getWrapperWidth(dimensions)}
|
|
20
|
-
cursor: ${shouldUsePointerCursor ? 'pointer' : 'default'};
|
|
21
|
-
`;
|
|
22
|
-
wrapperStyles.displayName = 'CardViewWrapper';
|
|
23
|
-
export const inlinePlayerWrapperStyles = ({
|
|
24
|
-
dimensions,
|
|
25
|
-
selected
|
|
26
|
-
}) => css`
|
|
27
|
-
width: ${getDimensionsWithDefault(dimensions).width || '100%'};
|
|
28
|
-
height: ${getDimensionsWithDefault(dimensions).height || 'auto'};
|
|
29
|
-
overflow: hidden;
|
|
30
|
-
border-radius: ${borderRadius()}px;
|
|
31
|
-
position: relative;
|
|
32
|
-
max-width: 100%;
|
|
33
|
-
max-height: 100%;
|
|
34
|
-
|
|
35
|
-
${getSelectedBorderStyle(selected)}
|
|
36
|
-
|
|
37
|
-
video {
|
|
38
|
-
width: 100%;
|
|
39
|
-
height: 100%;
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
42
|
-
inlinePlayerWrapperStyles.displayName = 'InlinePlayerWrapper';
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/react';
|
|
2
|
-
import { generateResponsiveStyles } from '../progressBar/styles';
|
|
3
|
-
import { N300 } from '@atlaskit/theme/colors';
|
|
4
|
-
export const loadingRateLimitedContainerStyles = css`
|
|
5
|
-
width: 100%;
|
|
6
|
-
height: 100%;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
`;
|
|
12
|
-
export const warningIconWrapperStyles = css`
|
|
13
|
-
width: 100%;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
display: flex;
|
|
16
|
-
/* Required to allow end users to select text in the error message */
|
|
17
|
-
cursor: auto;
|
|
18
|
-
user-select: text;
|
|
19
|
-
> svg {
|
|
20
|
-
width: 45px;
|
|
21
|
-
}
|
|
22
|
-
`;
|
|
23
|
-
export const loadingRateLimitedTextWrapperStyles = ({
|
|
24
|
-
breakpoint,
|
|
25
|
-
positionBottom
|
|
26
|
-
}) => css`
|
|
27
|
-
margin-top: 10px;
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
color: ${`var(--ds-text-subtlest, ${N300})`};
|
|
30
|
-
display: block;
|
|
31
|
-
width: 100%;
|
|
32
|
-
text-align: center;
|
|
33
|
-
${generateResponsiveStyles(breakpoint, positionBottom, false, 1)}
|
|
34
|
-
`;
|
|
35
|
-
loadingRateLimitedTextWrapperStyles.displayName = 'LoadingRateLimitedTextWrapper';
|
|
36
|
-
export const couldntLoadWrapperStyles = css`
|
|
37
|
-
font-weight: 550;
|
|
38
|
-
`;
|
|
39
|
-
export const errorWrapperStyles = css`
|
|
40
|
-
font-weight: 350;
|
|
41
|
-
`;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { size } from '@atlaskit/media-ui';
|
|
2
|
-
export const breakpointSize = (width, sizes = cardBreakpointSizes) => {
|
|
3
|
-
const value = parseInt(`${width}`, 10); // Normalize value
|
|
4
|
-
const keys = Object.keys(sizes);
|
|
5
|
-
const defaultValue = keys[0];
|
|
6
|
-
let breakpoint;
|
|
7
|
-
keys.forEach(label => {
|
|
8
|
-
if (value < sizes[label] && !breakpoint) {
|
|
9
|
-
breakpoint = label;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
return breakpoint || defaultValue;
|
|
13
|
-
};
|
|
14
|
-
export const cardBreakpointSizes = {
|
|
15
|
-
small: 173,
|
|
16
|
-
medium: 225,
|
|
17
|
-
large: 300,
|
|
18
|
-
xlarge: Infinity
|
|
19
|
-
};
|
|
20
|
-
export const breakpointStyles = ({
|
|
21
|
-
breakpointSize
|
|
22
|
-
}) => {
|
|
23
|
-
switch (breakpointSize) {
|
|
24
|
-
case 'small':
|
|
25
|
-
return `
|
|
26
|
-
.title {
|
|
27
|
-
font-size: 12px;
|
|
28
|
-
}
|
|
29
|
-
.file-type-icon span {
|
|
30
|
-
// We need to use important here since we can't use the dimensions provided by the Icon component
|
|
31
|
-
${size('14px !important')}
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
34
|
-
case 'medium':
|
|
35
|
-
return `
|
|
36
|
-
.title {
|
|
37
|
-
font-size: 14px;
|
|
38
|
-
}
|
|
39
|
-
.file-type-icon span {
|
|
40
|
-
${size('16px !important')}
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
43
|
-
case 'large':
|
|
44
|
-
return `
|
|
45
|
-
.overlay {
|
|
46
|
-
padding: 24px;
|
|
47
|
-
}
|
|
48
|
-
.title {
|
|
49
|
-
font-size: 14px;
|
|
50
|
-
}
|
|
51
|
-
.file-size {
|
|
52
|
-
font-size: 14px;
|
|
53
|
-
}
|
|
54
|
-
.file-type-icon span {
|
|
55
|
-
${size('18px !important')}
|
|
56
|
-
}
|
|
57
|
-
`;
|
|
58
|
-
case 'xlarge':
|
|
59
|
-
return `
|
|
60
|
-
border-radius: 2px;
|
|
61
|
-
|
|
62
|
-
.title {
|
|
63
|
-
font-size: 16px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.file-size {
|
|
67
|
-
font-size: 14px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.wrapper, .img-wrapper {
|
|
71
|
-
border-radius: 2px;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.overlay {
|
|
75
|
-
padding: 24px;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.file-type-icon span {
|
|
79
|
-
${size('18px !important')}
|
|
80
|
-
}
|
|
81
|
-
`;
|
|
82
|
-
}
|
|
83
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**@jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
|
-
import { Component } from 'react';
|
|
4
|
-
import { MediaTypeIcon } from '@atlaskit/media-ui/media-type-icon';
|
|
5
|
-
import { fileTypeIconStyles } from './styles';
|
|
6
|
-
const fileTypeIconClass = 'file-type-icon';
|
|
7
|
-
export class FileIcon extends Component {
|
|
8
|
-
render() {
|
|
9
|
-
const {
|
|
10
|
-
mediaType,
|
|
11
|
-
iconUrl,
|
|
12
|
-
style
|
|
13
|
-
} = this.props;
|
|
14
|
-
const type = mediaType || 'unknown';
|
|
15
|
-
const defaultIcon = jsx(MediaTypeIcon, {
|
|
16
|
-
type: mediaType,
|
|
17
|
-
size: "small",
|
|
18
|
-
className: fileTypeIconClass
|
|
19
|
-
});
|
|
20
|
-
const icon = iconUrl ? jsx("img", {
|
|
21
|
-
src: iconUrl,
|
|
22
|
-
className: "custom-icon",
|
|
23
|
-
alt: type
|
|
24
|
-
}) : defaultIcon;
|
|
25
|
-
return jsx("div", {
|
|
26
|
-
css: fileTypeIconStyles,
|
|
27
|
-
style: style,
|
|
28
|
-
className: fileTypeIconClass
|
|
29
|
-
}, icon);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**@jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
|
-
import { Component } from 'react';
|
|
4
|
-
import { progressWrapperStyles } from './styles';
|
|
5
|
-
export class ProgressBar extends Component {
|
|
6
|
-
render() {
|
|
7
|
-
if (typeof this.props.progress !== 'number') {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
const progress = Math.min(1, Math.max(0, this.props.progress));
|
|
11
|
-
const progressBarStyle = {
|
|
12
|
-
width: `${progress * 100}%`
|
|
13
|
-
};
|
|
14
|
-
return jsx("div", {
|
|
15
|
-
css: progressWrapperStyles
|
|
16
|
-
}, jsx("div", {
|
|
17
|
-
className: 'progressBar',
|
|
18
|
-
style: progressBarStyle
|
|
19
|
-
}));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
import { borderRadius } from '@atlaskit/media-ui';
|
|
4
|
-
export const progressWrapperStyles = css`
|
|
5
|
-
${borderRadius} z-index: 30;
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
background-color: rgba(255, 255, 255, 0.3);
|
|
8
|
-
|
|
9
|
-
.progressBar {
|
|
10
|
-
width: 0%;
|
|
11
|
-
height: 3px;
|
|
12
|
-
transition: width 0.25s ease-in;
|
|
13
|
-
background-color: white;
|
|
14
|
-
}
|
|
15
|
-
`;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { isMimeTypeSupportedByBrowser } from '@atlaskit/media-client';
|
|
2
|
-
export const shouldDisplayImageThumbnail = (cardStatus, mediaItemType, dataURI, mediaType, mimeType) => {
|
|
3
|
-
if (mediaType === 'doc' || !mimeType && mediaItemType === 'file') {
|
|
4
|
-
return false;
|
|
5
|
-
}
|
|
6
|
-
if (dataURI) {
|
|
7
|
-
return mediaItemType === 'external-image' || mimeType && isMimeTypeSupportedByBrowser(mimeType) || cardStatus === 'complete' || cardStatus === 'loading-preview';
|
|
8
|
-
}
|
|
9
|
-
return false;
|
|
10
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
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
|
-
};
|