@box/blueprint-web 12.130.4 → 12.131.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.
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* File category type for categorizing files by their type/format.
|
|
3
3
|
*
|
|
4
|
-
* These categories match those returned by `
|
|
4
|
+
* These categories match those returned by `getFileCategoryByExtension` from `@box/item-icon`.
|
|
5
5
|
* Due to circular dependency constraints, `@box/blueprint-web` cannot directly import
|
|
6
|
-
* `@box/item-icon`, so consumers should use `
|
|
6
|
+
* `@box/item-icon`, so consumers should use `getFileCategoryByExtension` in their own code to
|
|
7
7
|
* map file extensions to categories.
|
|
8
8
|
*
|
|
9
9
|
* @see {@link https://git.dev.box.net/Box/frontend-mono/tree/master/packages/group-shared-features/item-icon | @box/item-icon}
|
|
@@ -56,14 +56,14 @@ export type BaseGridListHeaderProps = ComponentPropsWithRef<'span'> & {
|
|
|
56
56
|
* with a color based on the file category. To use this feature:
|
|
57
57
|
*
|
|
58
58
|
* 1. Pass `fileExtension` - the file's extension (e.g., "pdf", "docx", "mp4")
|
|
59
|
-
* 2. Pass `fileCategory` - determines the pill's text color (use `
|
|
59
|
+
* 2. Pass `fileCategory` - determines the pill's text color (use `getFileCategoryByExtension` from `@box/item-icon`)
|
|
60
60
|
*
|
|
61
61
|
* @example
|
|
62
62
|
* ```tsx
|
|
63
|
-
* import {
|
|
63
|
+
* import { getFileCategoryByExtension } from '@box/item-icon';
|
|
64
64
|
*
|
|
65
65
|
* // Get the category for color mapping
|
|
66
|
-
* const category =
|
|
66
|
+
* const category = getFileCategoryByExtension('docx'); // returns 'word-document'
|
|
67
67
|
*
|
|
68
68
|
* <GridListV2.Thumbnail fileExtension="docx" fileCategory={category}>
|
|
69
69
|
* <img src={thumbnailUrl} alt={fileName} />
|
|
@@ -80,14 +80,14 @@ export type BaseGridListThumbnailProps = ComponentPropsWithRef<'div'> & {
|
|
|
80
80
|
fileExtension?: string;
|
|
81
81
|
/**
|
|
82
82
|
* File category that determines the pill's text color.
|
|
83
|
-
* Use `
|
|
83
|
+
* Use `getFileCategoryByExtension(extension)` from `@box/item-icon` to get this value.
|
|
84
84
|
* If not provided, the pill will use the default black text color.
|
|
85
85
|
*
|
|
86
86
|
* @example
|
|
87
87
|
* ```tsx
|
|
88
|
-
* import {
|
|
88
|
+
* import { getFileCategoryByExtension } from '@box/item-icon';
|
|
89
89
|
*
|
|
90
|
-
* const fileCategory =
|
|
90
|
+
* const fileCategory = getFileCategoryByExtension('docx'); // returns 'word-document'
|
|
91
91
|
* // The pill will display "DOCX" with blue text (word-document color)
|
|
92
92
|
* ```
|
|
93
93
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/blueprint-web",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.131.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@ariakit/react": "0.4.15",
|
|
49
49
|
"@ariakit/react-core": "0.4.15",
|
|
50
|
-
"@box/blueprint-web-assets": "^4.99.
|
|
50
|
+
"@box/blueprint-web-assets": "^4.99.4",
|
|
51
51
|
"@internationalized/date": "^3.7.0",
|
|
52
52
|
"@radix-ui/react-accordion": "1.1.2",
|
|
53
53
|
"@radix-ui/react-checkbox": "1.0.4",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"type-fest": "^3.2.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@box/storybook-utils": "^0.16.
|
|
80
|
+
"@box/storybook-utils": "^0.16.30",
|
|
81
81
|
"@figma/code-connect": "1.3.12",
|
|
82
82
|
"@types/react": "^18.0.0",
|
|
83
83
|
"@types/react-dom": "^18.0.0",
|