Skip to content

Commit 5e7f4b2

Browse files
fix(blueprint): Bump blueprint (#4205)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent bd31196 commit 5e7f4b2

File tree

6 files changed

+1239
-1070
lines changed

6 files changed

+1239
-1070
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// @flow
2+
// Flow stub for @box/blueprint-web-assets package
3+
4+
declare module '@box/blueprint-web-assets/icons/Medium' {
5+
declare export var InformationCircle: React$ComponentType<any>;
6+
declare export var CheckmarkCircle: React$ComponentType<any>;
7+
declare export var AlertCircle: React$ComponentType<any>;
8+
declare export var AlertTriangle: React$ComponentType<any>;
9+
declare export var XMark: React$ComponentType<any>;
10+
declare export var BoxAiAdvancedColor: React$ComponentType<any>;
11+
declare export var BoxAiColor: React$ComponentType<any>;
12+
}
13+
14+
declare module '@box/blueprint-web-assets/icons/Content' {
15+
declare export var FolderExternal: React$ComponentType<any>;
16+
declare export var FolderPersonal: React$ComponentType<any>;
17+
declare export var FolderShared: React$ComponentType<any>;
18+
declare export var Archive: React$ComponentType<any>;
19+
declare export var FolderArchive: React$ComponentType<any>;
20+
declare export var FileBookmark: React$ComponentType<any>;
21+
}
22+
23+
declare module '@box/blueprint-web-assets/icons/Fill' {
24+
declare export var XMark: React$ComponentType<any>;
25+
declare export var ArrowCurveForward: React$ComponentType<any>;
26+
declare export var Checkmark: React$ComponentType<any>;
27+
declare export var Grid: React$ComponentType<any>;
28+
declare export var Hamburger: React$ComponentType<any>;
29+
declare export var PointerChevronRight: React$ComponentType<any>;
30+
declare export var Pencil: React$ComponentType<any>;
31+
declare export var Plus: React$ComponentType<any>;
32+
declare export var Ellipsis: React$ComponentType<any>;
33+
declare export var PointerChevronLeft: React$ComponentType<any>;
34+
declare export var ArrowsExpand: React$ComponentType<any>;
35+
}
36+
37+
declare module '@box/blueprint-web-assets/icons/Logo' {
38+
declare export var BoxLogo: React$ComponentType<any>;
39+
declare export var BoxAiLogo: React$ComponentType<any>;
40+
}
41+
42+
declare module '@box/blueprint-web-assets/illustrations/Medium' {
43+
declare export var DiscoDanceParty: React$ComponentType<any>;
44+
declare export var HatWand: React$ComponentType<any>;
45+
declare export var UploadCloud: React$ComponentType<any>;
46+
declare export var Files: React$ComponentType<any>;
47+
declare export var FolderFloat: React$ComponentType<any>;
48+
declare export var OpenBook: React$ComponentType<any>;
49+
}
50+
51+
declare module '@box/blueprint-web-assets/tokens/tokens' {
52+
declare export var Size8: any;
53+
declare export var IconCtaIconHover: any;
54+
declare export var Size5: any;
55+
declare export var SurfaceStatusSurfaceSuccess: any;
56+
declare export var Gray50: any;
57+
declare export var Size3: any;
58+
declare export var Size6: any;
59+
}

package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,18 @@
124124
"@babel/preset-typescript": "^7.24.7",
125125
"@babel/template": "^7.24.7",
126126
"@babel/types": "^7.24.7",
127-
"@box/blueprint-web": "^12.7.1",
128-
"@box/blueprint-web-assets": "^4.60.0",
127+
"@box/blueprint-web": "12.43.0",
128+
"@box/blueprint-web-assets": "4.61.5",
129129
"@box/box-ai-agent-selector": "^0.48.5",
130130
"@box/box-ai-content-answers": "^0.124.1",
131131
"@box/cldr-data": "^34.2.0",
132132
"@box/combobox-with-api": "^0.34.9",
133133
"@box/frontend": "^11.0.1",
134-
"@box/item-icon": "^0.9.83",
134+
"@box/item-icon": "^0.17.0",
135135
"@box/languages": "^1.0.0",
136136
"@box/metadata-editor": "^0.122.0",
137137
"@box/react-virtualized": "^9.22.3-rc-box.10",
138+
"@box/types": "^0.2.1",
138139
"@cfaester/enzyme-adapter-react-18": "^0.8.0",
139140
"@chromatic-com/storybook": "^4.0.1",
140141
"@commitlint/cli": "^19.8.0",
@@ -287,15 +288,16 @@
287288
"webpack-dev-server": "^5.2.1"
288289
},
289290
"peerDependencies": {
290-
"@box/blueprint-web": "^12.7.1",
291-
"@box/blueprint-web-assets": "^4.60.0",
291+
"@box/blueprint-web": "12.43.0",
292+
"@box/blueprint-web-assets": "4.61.5",
292293
"@box/box-ai-agent-selector": "^0.48.5",
293294
"@box/box-ai-content-answers": "^0.124.1",
294295
"@box/cldr-data": ">=34.2.0",
295296
"@box/combobox-with-api": "^0.34.9",
296-
"@box/item-icon": "^0.9.83",
297+
"@box/item-icon": "^0.17.0",
297298
"@box/metadata-editor": "^0.122.0",
298299
"@box/react-virtualized": "^9.22.3-rc-box.10",
300+
"@box/types": "^0.2.1",
299301
"@hapi/address": "^2.1.4",
300302
"axios": "^0.30.0",
301303
"classnames": "^2.2.5",

scripts/jest/jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ module.exports = {
2626
testMatch: ['**/__tests__/**/*.test.+(js|jsx|ts|tsx)'],
2727
testPathIgnorePatterns: ['stories.test.js$', 'stories.test.tsx$', 'stories.test.d.ts'],
2828
transformIgnorePatterns: [
29-
'node_modules/(?!(@box/react-virtualized/dist/es|@box/cldr-data|@box/blueprint-web|@box/blueprint-web-assets|@box/metadata-editor|@box/box-ai-content-answers|@box/box-ai-agent-selector|@box/item-icon|@box/combobox-with-api|@box/tree)/)',
29+
'node_modules/(?!(@box/react-virtualized/dist/es|@box/cldr-data|@box/blueprint-web|@box/blueprint-web-assets|@box/metadata-editor|@box/box-ai-content-answers|@box/box-ai-agent-selector|@box/item-icon|@box/combobox-with-api|@box/tree|@box/types)/)',
3030
],
3131
};

src/components/notification/Notification.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ import * as React from 'react';
33
import { defineMessages, injectIntl } from 'react-intl';
44
import classNames from 'classnames';
55

6-
// $FlowFixMe
7-
import { Information, Check, AlertTriangle, AlertBadge, XMark } from '@box/blueprint-web-assets/icons/Medium';
6+
import {
7+
AlertCircle,
8+
InformationCircle,
9+
CheckmarkCircle,
10+
AlertTriangle,
11+
XMark,
12+
} from '@box/blueprint-web-assets/icons/Medium';
813

914
import InfoBadge16 from '../../icon/line/InfoBadge16';
1015
import CircleCheck16 from '../../icon/line/CircleCheck16';
@@ -34,9 +39,9 @@ const DURATION_TIMES = {
3439
};
3540

3641
const ICON_RENDERER: { [string]: Function } = {
37-
[TYPE_DEFAULT]: useV2Icons => (useV2Icons ? <Information /> : <InfoBadge16 />),
38-
[TYPE_ERROR]: useV2Icons => (useV2Icons ? <AlertBadge /> : <XBadge16 />),
39-
[TYPE_INFO]: useV2Icons => (useV2Icons ? <Check /> : <CircleCheck16 />),
42+
[TYPE_DEFAULT]: useV2Icons => (useV2Icons ? <InformationCircle /> : <InfoBadge16 />),
43+
[TYPE_ERROR]: useV2Icons => (useV2Icons ? <AlertCircle /> : <XBadge16 />),
44+
[TYPE_INFO]: useV2Icons => (useV2Icons ? <CheckmarkCircle /> : <CircleCheck16 />),
4045
[TYPE_WARN]: useV2Icons => (useV2Icons ? <AlertTriangle /> : <TriangleAlert16 />),
4146
};
4247

src/components/notification/stories/Notification.stories.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,39 @@ export const error = () => (
4040
</IntlProvider>
4141
);
4242

43+
export const basicV2 = () => (
44+
<IntlProvider locale="en">
45+
<Notification useV2Icons>This is a default notification.</Notification>
46+
</IntlProvider>
47+
);
48+
49+
export const infoV2 = () => (
50+
<IntlProvider locale="en">
51+
<Notification type="info" useV2Icons>
52+
<span>This is an info notification with a button.</span>
53+
<Button>Click me</Button>
54+
</Notification>
55+
</IntlProvider>
56+
);
57+
58+
export const warnV2 = () => (
59+
<IntlProvider locale="en">
60+
<Notification type="warn" useV2Icons>
61+
<span>This is a warning notification with two buttons.</span>
62+
<Button>Click me</Button>
63+
<Button>Click me again</Button>
64+
</Notification>
65+
</IntlProvider>
66+
);
67+
68+
export const errorV2 = () => (
69+
<IntlProvider locale="en">
70+
<Notification type="error" useV2Icons>
71+
<span>This is an error notification.</span>
72+
</Notification>
73+
</IntlProvider>
74+
);
75+
4376
export default {
4477
title: 'Components/Notifications/Notification',
4578
component: Notification,

0 commit comments

Comments
 (0)