Skip to content

Commit c3feddd

Browse files
authored
Merge branch 'main' into dev-v3-philosr-refactor-4
2 parents 828c2d2 + e3c99fb commit c3feddd

File tree

71 files changed

+4819
-2843
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+4819
-2843
lines changed

build-tools/utils/custom-css-properties.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ const customCssPropertiesList = [
5151
// Dropdown Custom Properties
5252
'dropdownDefaultMaxWidth',
5353
'dropdownDefaultMinWidth',
54+
// Modal Custom Properties
55+
'modalCustomWidth',
56+
'modalCustomHeight',
5457
// Spinner Custom Properties
5558
'spinnerRotatorFrom',
5659
'spinnerRotatorTo',

package-lock.json

Lines changed: 1889 additions & 1735 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@
8686
"babel-jest": "^29.7.0",
8787
"change-case": "^4.1.2",
8888
"commenting": "^1.1.0",
89-
"copy-webpack-plugin": "^9.0.1",
89+
"copy-webpack-plugin": "^14.0.0",
9090
"cross-env": "^7.0.3",
9191
"css-loader": "^6.5.1",
92-
"css-minimizer-webpack-plugin": "^3.1.1",
92+
"css-minimizer-webpack-plugin": "^8.0.0",
9393
"d3-scale": "^4.0.2",
9494
"eslint": "^9.20.1",
9595
"eslint-config-prettier": "^10.1.5",
@@ -127,7 +127,7 @@
127127
"react-virtual": "^2.8.2",
128128
"react18": "npm:react@^18.3.1",
129129
"rimraf": "^6.1.0",
130-
"rollup": "^3.29.5",
130+
"rollup": "^3.30.0",
131131
"rollup-plugin-license": "^3.0.1",
132132
"sass": "^1.89.2",
133133
"sass-loader": "^12.3.0",
@@ -139,7 +139,7 @@
139139
"stylelint-prettier": "^5.0.0",
140140
"stylelint-scss": "^6.3.1",
141141
"stylelint-use-logical": "^2.1.2",
142-
"svgo": "^2.8.0",
142+
"svgo": "^2.8.2",
143143
"ts-jest": "^29.2.5",
144144
"ts-loader": "^9.2.6",
145145
"types-react-dom18": "npm:@types/react-dom@^18.3.7",

pages/app-layout/runtime-drawers.page.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ import {
1515
} from '~components';
1616
import { AppLayoutProps } from '~components/app-layout';
1717
import awsuiPlugins from '~components/internal/plugins';
18+
import { registerLeftDrawer, updateDrawer } from '~components/internal/plugins/widget';
1819

1920
import './utils/external-widget';
2021
import AppContext, { AppContextType } from '../app/app-context';
2122
import { Breadcrumbs, Containers, CustomDrawerContent } from './utils/content-blocks';
2223
import { drawerLabels } from './utils/drawers';
24+
import { leftDrawerPayload } from './utils/external-global-left-panel-widget';
2325
import { registerRuntimeBottomDrawer } from './utils/external-widget';
2426
import appLayoutLabels from './utils/labels';
2527
import { splitPaneli18nStrings } from './utils/strings';
@@ -32,6 +34,8 @@ type DemoContext = React.Context<
3234
}>
3335
>;
3436

37+
registerLeftDrawer(leftDrawerPayload);
38+
3539
export default function WithDrawers() {
3640
const [activeDrawerId, setActiveDrawerId] = useState<string | null>(null);
3741
const [helpPathSlug, setHelpPathSlug] = useState<string>('default');
@@ -130,6 +134,13 @@ export default function WithDrawers() {
130134
<Button onClick={() => registerRuntimeBottomDrawer()} data-testid="button-register-bottom-drawer">
131135
Register a bottom drawer
132136
</Button>
137+
<Button
138+
onClick={() => {
139+
updateDrawer({ type: 'openDrawer', payload: { id: 'ai-panel' } });
140+
}}
141+
>
142+
Open left drawer
143+
</Button>
133144
</SpaceBetween>
134145
</SpaceBetween>
135146
}

pages/app-layout/utils/external-global-left-panel-widget.tsx

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import React, { useState } from 'react';
44

55
import { Box, Button, PanelLayout } from '~components';
66
import { registerLeftDrawer, updateDrawer } from '~components/internal/plugins/widget';
7+
import { DrawerPayload } from '~components/internal/plugins/widget/interfaces';
78
import { mount, unmount } from '~mount';
89

910
import styles from '../styles.scss';
@@ -98,7 +99,7 @@ const AIDrawer = () => {
9899
);
99100
};
100101

101-
registerLeftDrawer({
102+
export const leftDrawerPayload: DrawerPayload = {
102103
id: 'ai-panel',
103104
resizable: true,
104105
isExpandable: true,
@@ -114,23 +115,6 @@ registerLeftDrawer({
114115
exitExpandedModeButton: 'Console',
115116
},
116117

117-
trigger: {
118-
customIcon: `
119-
<svg width="94" height="24" viewBox="0 0 94 24" fill="none" focusable="false" aria-hidden="true">
120-
<rect width="94" height="24" rx="4" fill="url(#paint0_linear_145_32649)"/>
121-
<defs>
122-
<linearGradient id="paint0_linear_145_32649" x1="135.919" y1="21" x2="108.351" y2="74.1863" gradientUnits="userSpaceOnUse">
123-
<stop stop-color="#B8E7FF"/>
124-
<stop offset="0.255" stop-color="#0099FF"/>
125-
<stop offset="0.514134" stop-color="#5C7FFF"/>
126-
<stop offset="0.732534" stop-color="#8575FF"/>
127-
<stop offset="1" stop-color="#962EFF"/>
128-
</linearGradient>
129-
</defs>
130-
</svg>
131-
`,
132-
},
133-
134118
exitExpandedModeTrigger: {
135119
customIcon: `
136120
<svg width="94" height="24" viewBox="0 0 94 24" fill="none" focusable="false" aria-hidden="true">
@@ -198,4 +182,25 @@ registerLeftDrawer({
198182
onToggleFocusMode: ({ detail }) => {
199183
console.log('onToggleFocusMode: ', detail);
200184
},
201-
});
185+
};
186+
187+
const leftDrawerTrigger = {
188+
trigger: {
189+
customIcon: `
190+
<svg width="94" height="24" viewBox="0 0 94 24" fill="none" focusable="false" aria-hidden="true">
191+
<rect width="94" height="24" rx="4" fill="url(#paint0_linear_145_32649)"/>
192+
<defs>
193+
<linearGradient id="paint0_linear_145_32649" x1="135.919" y1="21" x2="108.351" y2="74.1863" gradientUnits="userSpaceOnUse">
194+
<stop stop-color="#B8E7FF"/>
195+
<stop offset="0.255" stop-color="#0099FF"/>
196+
<stop offset="0.514134" stop-color="#5C7FFF"/>
197+
<stop offset="0.732534" stop-color="#8575FF"/>
198+
<stop offset="1" stop-color="#962EFF"/>
199+
</linearGradient>
200+
</defs>
201+
</svg>
202+
`,
203+
},
204+
};
205+
206+
registerLeftDrawer({ ...leftDrawerPayload, ...leftDrawerTrigger });

0 commit comments

Comments
 (0)