@box/blueprint-web 12.49.1 → 12.50.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.
|
@@ -6,7 +6,7 @@ export interface TooltipConfig {
|
|
|
6
6
|
}
|
|
7
7
|
export interface IconBadgeProps extends BadgeProps {
|
|
8
8
|
/** The variant of the icon badge. */
|
|
9
|
-
variant: 'file-audio' | 'file-bookmark' | 'file-box-app' | 'file-code' | 'file-default' | 'file-drawing' | 'file-excel' | 'file-hub' | 'file-illustrator' | 'file-indesign' | 'file-numbers' | 'file-photoshop' | 'file-powerpoint' | 'file-presentation' | 'file-slides' | 'file-spreadsheet' | 'file-text' | 'file-three-d' | 'file-vector' | 'file-word' | 'file-zip' | 'file-pdf' | 'file-docs' | 'file-sheets' | 'file-image' | 'file-canvas' | 'file-pages' | 'file-keynote' | 'file-boxnote' | 'file-video' | 'folder-external' | 'folder-shared' | 'action-relay' | 'action-mention' | 'action-task' | 'action-taskapproval' | 'action-annotation' | 'action-performed-completed' | 'action-performed-rejected' | 'collaborator-external' | 'collaborator-admin' | 'collaborator-coadmin' | 'content-pin' | 'content-collection' | 'content-offline' | 'content-progress' | 'alert-error' | 'status-pending';
|
|
9
|
+
variant: 'file-audio' | 'file-bookmark' | 'file-box-app' | 'file-code' | 'file-default' | 'file-drawing' | 'file-excel' | 'file-hub' | 'file-illustrator' | 'file-indesign' | 'file-numbers' | 'file-photoshop' | 'file-powerpoint' | 'file-presentation' | 'file-slides' | 'file-spreadsheet' | 'file-text' | 'file-three-d' | 'file-vector' | 'file-word' | 'file-zip' | 'file-pdf' | 'file-docs' | 'file-sheets' | 'file-image' | 'file-canvas' | 'file-pages' | 'file-keynote' | 'file-boxnote' | 'file-video' | 'folder-external' | 'folder-shared' | 'action-relay' | 'action-mention' | 'action-task' | 'action-taskapproval' | 'action-annotation' | 'action-performed-completed' | 'action-performed-rejected' | 'collaborator-external' | 'collaborator-admin' | 'collaborator-coadmin' | 'content-pin' | 'content-collection' | 'content-offline' | 'content-progress' | 'alert-error' | 'status-pending' | 'status-in-progress' | 'status-forwarded' | 'status-alert';
|
|
10
10
|
/** Whether to show the tooltip when hovering over the badge. */
|
|
11
11
|
showTooltipOnBadge?: boolean;
|
|
12
12
|
/** The configuration for the tooltip, required if showTooltipOnBadge is true. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { FileAudio, FileBookmark, BoxApps, FileBoxNote, FileCanvas, Code, FileDefault, FileDocs, FileDrawing, FileExcel, Hubs, FileIllustrator, FileImage, FileIndesign, FileKeynote, FileNumbers, FilePages, FilePdf, FilePhotoshop, FilePowerpoint, FilePresentation, FileSheets, FileSlides, FileSpreadsheet, FileText, FileThreeD, FileVector, FileVideo, FileWord, FileZip, FolderExternal, FolderShared, Relay, EllipsisBubble, Task, ApprovalTask, Annotation, Checkmark, XMark, GlobeBadge, Star, Pin, Arrow, CheckmarkUnderline, Loader, Alert, ClockBadge } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
|
-
import { SurfaceBadgeAudioSurface, GrayWhite, SurfaceBadgeBookmarkSurface, SurfaceBadgeBoxappsSurface, SurfaceBadgeBoxnoteSurface, Gray100, SurfaceBadgeCanvasSurface, SurfaceBadgeCodeSurface, SurfaceBadgeDefaultSurface, SurfaceBadgeDocsSurface, SurfaceBadgeDrawingSurface, SurfaceBadgeExcelSurface, SurfaceBadgeHubsSurface, SurfaceBadgeIllustratorSurface, IconIconIllustrator, SurfaceBadgeImageSurface, SurfaceBadgeIndesignSurface, IconIconIndesign, SurfaceBadgeKeynoteSurface, SurfaceBadgeNumbersSurface, SurfaceBadgePagesSurface, SurfaceBadgePdfSurface, SurfaceBadgePhotoshopSurface, IconIconPhotoshop, SurfaceBadgePowerpointSurface, SurfaceBadgePresentationSurface, SurfaceBadgeSheetsSurface, SurfaceBadgeSlidesSurface, GrayBlack, SurfaceBadgeSpreadsheetSurface, SurfaceBadgeTextSurface, SurfaceBadgeThreeDSurface, SurfaceBadgeVectorSurface, SurfaceBadgeVideoSurface, SurfaceBadgeWordSurface, SurfaceBadgeZipSurface, SurfaceBadgeFolderexternalSurface, SurfaceBadgeFoldersharedSurface, SurfaceBadgeRelaySurface, SurfaceBadgeMentionSurface, SurfaceBadgeTaskSurface, SurfaceBadgeTaskapprovalSurface, SurfaceBadgeAnnotationSurface, SurfaceBadgeCompletedSurface, SurfaceBadgeRejectedSurface, SurfaceBadgeExternalSurface, SurfaceBadgeAdminSurface, SurfaceBadgeCoadminSurface, SurfaceBadgePinSurface, Gray80, SurfaceBadgeCollectionSurface, SurfaceBadgeOfflineSurface, SurfaceBadgeProgressSurface, SurfaceBadgeErrorSurface, Orange100 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
2
|
+
import { FileAudio, FileBookmark, BoxApps, FileBoxNote, FileCanvas, Code, FileDefault, FileDocs, FileDrawing, FileExcel, Hubs, FileIllustrator, FileImage, FileIndesign, FileKeynote, FileNumbers, FilePages, FilePdf, FilePhotoshop, FilePowerpoint, FilePresentation, FileSheets, FileSlides, FileSpreadsheet, FileText, FileThreeD, FileVector, FileVideo, FileWord, FileZip, FolderExternal, FolderShared, Relay, EllipsisBubble, Task, ApprovalTask, Annotation, Checkmark, XMark, GlobeBadge, Star, Pin, Arrow, CheckmarkUnderline, Loader, Alert, ClockBadge, Ellipsis, ArrowRight } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
|
+
import { SurfaceBadgeAudioSurface, GrayWhite, SurfaceBadgeBookmarkSurface, SurfaceBadgeBoxappsSurface, SurfaceBadgeBoxnoteSurface, Gray100, SurfaceBadgeCanvasSurface, SurfaceBadgeCodeSurface, SurfaceBadgeDefaultSurface, SurfaceBadgeDocsSurface, SurfaceBadgeDrawingSurface, SurfaceBadgeExcelSurface, SurfaceBadgeHubsSurface, SurfaceBadgeIllustratorSurface, IconIconIllustrator, SurfaceBadgeImageSurface, SurfaceBadgeIndesignSurface, IconIconIndesign, SurfaceBadgeKeynoteSurface, SurfaceBadgeNumbersSurface, SurfaceBadgePagesSurface, SurfaceBadgePdfSurface, SurfaceBadgePhotoshopSurface, IconIconPhotoshop, SurfaceBadgePowerpointSurface, SurfaceBadgePresentationSurface, SurfaceBadgeSheetsSurface, SurfaceBadgeSlidesSurface, GrayBlack, SurfaceBadgeSpreadsheetSurface, SurfaceBadgeTextSurface, SurfaceBadgeThreeDSurface, SurfaceBadgeVectorSurface, SurfaceBadgeVideoSurface, SurfaceBadgeWordSurface, SurfaceBadgeZipSurface, SurfaceBadgeFolderexternalSurface, SurfaceBadgeFoldersharedSurface, SurfaceBadgeRelaySurface, SurfaceBadgeMentionSurface, SurfaceBadgeTaskSurface, SurfaceBadgeTaskapprovalSurface, SurfaceBadgeAnnotationSurface, SurfaceBadgeCompletedSurface, SurfaceBadgeRejectedSurface, SurfaceBadgeExternalSurface, SurfaceBadgeAdminSurface, SurfaceBadgeCoadminSurface, SurfaceBadgePinSurface, Gray80, SurfaceBadgeCollectionSurface, SurfaceBadgeOfflineSurface, SurfaceBadgeProgressSurface, SurfaceBadgeErrorSurface, Orange100, SurfaceBadgeInprogressSurface, SurfaceBadgeForwardSurface, SurfaceBadgeAlertSurface } from '@box/blueprint-web-assets/tokens/tokens';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import mapValues from 'lodash/mapValues';
|
|
6
6
|
import { createElement } from 'react';
|
|
@@ -252,6 +252,21 @@ const badgeVariantToIconProps = {
|
|
|
252
252
|
backgroundColor: Orange100,
|
|
253
253
|
icon: ClockBadge,
|
|
254
254
|
iconColor: GrayWhite
|
|
255
|
+
},
|
|
256
|
+
'status-in-progress': {
|
|
257
|
+
backgroundColor: SurfaceBadgeInprogressSurface,
|
|
258
|
+
icon: Ellipsis,
|
|
259
|
+
iconColor: GrayWhite
|
|
260
|
+
},
|
|
261
|
+
'status-forwarded': {
|
|
262
|
+
backgroundColor: SurfaceBadgeForwardSurface,
|
|
263
|
+
icon: ArrowRight,
|
|
264
|
+
iconColor: GrayWhite
|
|
265
|
+
},
|
|
266
|
+
'status-alert': {
|
|
267
|
+
backgroundColor: SurfaceBadgeAlertSurface,
|
|
268
|
+
icon: Alert,
|
|
269
|
+
iconColor: GrayWhite
|
|
255
270
|
}
|
|
256
271
|
};
|
|
257
272
|
const badgeSizeToIconSize = {
|