@cloudscape-design/components 3.0.664 → 3.0.665

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.
Files changed (131) hide show
  1. package/app-layout/classic.d.ts.map +1 -1
  2. package/app-layout/classic.js +1 -0
  3. package/app-layout/classic.js.map +1 -1
  4. package/app-layout/drawer/drawers-helpers.d.ts +4 -1
  5. package/app-layout/drawer/drawers-helpers.d.ts.map +1 -1
  6. package/app-layout/drawer/drawers-helpers.js.map +1 -1
  7. package/app-layout/interfaces.d.ts +1 -1
  8. package/app-layout/interfaces.js.map +1 -1
  9. package/app-layout/internal.d.ts +6 -5
  10. package/app-layout/internal.d.ts.map +1 -1
  11. package/app-layout/internal.js +18 -2
  12. package/app-layout/internal.js.map +1 -1
  13. package/app-layout/utils/use-drawers.d.ts +1 -0
  14. package/app-layout/utils/use-drawers.d.ts.map +1 -1
  15. package/app-layout/utils/use-drawers.js +1 -1
  16. package/app-layout/utils/use-drawers.js.map +1 -1
  17. package/app-layout/utils/use-focus-control.d.ts +1 -2
  18. package/app-layout/utils/use-focus-control.d.ts.map +1 -1
  19. package/app-layout/utils/use-focus-control.js.map +1 -1
  20. package/app-layout/utils/use-split-panel-focus-control.d.ts +1 -2
  21. package/app-layout/utils/use-split-panel-focus-control.d.ts.map +1 -1
  22. package/app-layout/utils/use-split-panel-focus-control.js.map +1 -1
  23. package/app-layout/visual-refresh/context.d.ts.map +1 -1
  24. package/app-layout/visual-refresh/context.js +1 -0
  25. package/app-layout/visual-refresh/context.js.map +1 -1
  26. package/app-layout/visual-refresh-toolbar/compute-layout.d.ts +33 -0
  27. package/app-layout/visual-refresh-toolbar/compute-layout.d.ts.map +1 -0
  28. package/app-layout/visual-refresh-toolbar/compute-layout.js +33 -0
  29. package/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -0
  30. package/app-layout/visual-refresh-toolbar/drawer/index.d.ts +9 -0
  31. package/app-layout/visual-refresh-toolbar/drawer/index.d.ts.map +1 -0
  32. package/app-layout/visual-refresh-toolbar/drawer/index.js +55 -0
  33. package/app-layout/visual-refresh-toolbar/drawer/index.js.map +1 -0
  34. package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +11 -0
  35. package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +140 -0
  36. package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +12 -0
  37. package/app-layout/visual-refresh-toolbar/drawer/use-resize.d.ts +16 -0
  38. package/app-layout/visual-refresh-toolbar/drawer/use-resize.d.ts.map +1 -0
  39. package/app-layout/visual-refresh-toolbar/drawer/use-resize.js +23 -0
  40. package/app-layout/visual-refresh-toolbar/drawer/use-resize.js.map +1 -0
  41. package/app-layout/visual-refresh-toolbar/exports.d.ts +6 -0
  42. package/app-layout/visual-refresh-toolbar/exports.d.ts.map +1 -0
  43. package/app-layout/visual-refresh-toolbar/exports.js +8 -0
  44. package/app-layout/visual-refresh-toolbar/exports.js.map +1 -0
  45. package/app-layout/visual-refresh-toolbar/index.d.ts +20 -0
  46. package/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -0
  47. package/app-layout/visual-refresh-toolbar/index.js +172 -0
  48. package/app-layout/visual-refresh-toolbar/index.js.map +1 -0
  49. package/app-layout/visual-refresh-toolbar/interfaces.d.ts +41 -0
  50. package/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -0
  51. package/app-layout/visual-refresh-toolbar/interfaces.js +4 -0
  52. package/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -0
  53. package/app-layout/visual-refresh-toolbar/internal.d.ts +7 -0
  54. package/app-layout/visual-refresh-toolbar/internal.d.ts.map +1 -0
  55. package/app-layout/visual-refresh-toolbar/internal.js +14 -0
  56. package/app-layout/visual-refresh-toolbar/internal.js.map +1 -0
  57. package/app-layout/visual-refresh-toolbar/navigation/index.d.ts +9 -0
  58. package/app-layout/visual-refresh-toolbar/navigation/index.d.ts.map +1 -0
  59. package/app-layout/visual-refresh-toolbar/navigation/index.js +32 -0
  60. package/app-layout/visual-refresh-toolbar/navigation/index.js.map +1 -0
  61. package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +11 -0
  62. package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +155 -0
  63. package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +12 -0
  64. package/app-layout/visual-refresh-toolbar/notifications/index.d.ts +10 -0
  65. package/app-layout/visual-refresh-toolbar/notifications/index.d.ts.map +1 -0
  66. package/app-layout/visual-refresh-toolbar/notifications/index.js +17 -0
  67. package/app-layout/visual-refresh-toolbar/notifications/index.js.map +1 -0
  68. package/app-layout/visual-refresh-toolbar/notifications/styles.css.js +6 -0
  69. package/app-layout/visual-refresh-toolbar/notifications/styles.scoped.css +8 -0
  70. package/app-layout/visual-refresh-toolbar/notifications/styles.selectors.js +7 -0
  71. package/app-layout/visual-refresh-toolbar/skeleton/index.d.ts +12 -0
  72. package/app-layout/visual-refresh-toolbar/skeleton/index.d.ts.map +1 -0
  73. package/app-layout/visual-refresh-toolbar/skeleton/index.js +32 -0
  74. package/app-layout/visual-refresh-toolbar/skeleton/index.js.map +1 -0
  75. package/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.d.ts +15 -0
  76. package/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.d.ts.map +1 -0
  77. package/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.js +8 -0
  78. package/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.js.map +1 -0
  79. package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +20 -0
  80. package/app-layout/{skeleton → visual-refresh-toolbar/skeleton}/styles.scoped.css +58 -24
  81. package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +21 -0
  82. package/app-layout/visual-refresh-toolbar/split-panel/index.d.ts +19 -0
  83. package/app-layout/visual-refresh-toolbar/split-panel/index.d.ts.map +1 -0
  84. package/app-layout/visual-refresh-toolbar/split-panel/index.js +20 -0
  85. package/app-layout/visual-refresh-toolbar/split-panel/index.js.map +1 -0
  86. package/app-layout/visual-refresh-toolbar/split-panel/styles.css.js +6 -0
  87. package/app-layout/visual-refresh-toolbar/split-panel/styles.scoped.css +100 -0
  88. package/app-layout/visual-refresh-toolbar/split-panel/styles.selectors.js +7 -0
  89. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts +8 -0
  90. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -0
  91. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +60 -0
  92. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -0
  93. package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts +9 -0
  94. package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -0
  95. package/app-layout/visual-refresh-toolbar/toolbar/index.js +52 -0
  96. package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -0
  97. package/app-layout/visual-refresh-toolbar/toolbar/styles.css.js +17 -0
  98. package/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +214 -0
  99. package/app-layout/visual-refresh-toolbar/toolbar/styles.selectors.js +18 -0
  100. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.d.ts +20 -0
  101. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.d.ts.map +1 -0
  102. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js +18 -0
  103. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js.map +1 -0
  104. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.css.js +11 -0
  105. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.scoped.css +243 -0
  106. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.selectors.js +12 -0
  107. package/internal/base-component/styles.scoped.css +5 -0
  108. package/internal/components/tooltip/index.d.ts +2 -1
  109. package/internal/components/tooltip/index.d.ts.map +1 -1
  110. package/internal/components/tooltip/index.js +2 -2
  111. package/internal/components/tooltip/index.js.map +1 -1
  112. package/internal/environment.js +1 -1
  113. package/internal/environment.json +1 -1
  114. package/internal/generated/theming/index.cjs +3 -0
  115. package/internal/generated/theming/index.js +3 -0
  116. package/internal/manifest.json +1 -1
  117. package/package.json +1 -1
  118. package/app-layout/implementation.d.ts +0 -50
  119. package/app-layout/implementation.d.ts.map +0 -1
  120. package/app-layout/implementation.js +0 -13
  121. package/app-layout/implementation.js.map +0 -1
  122. package/app-layout/skeleton/index.d.ts +0 -4
  123. package/app-layout/skeleton/index.d.ts.map +0 -1
  124. package/app-layout/skeleton/index.js +0 -10
  125. package/app-layout/skeleton/index.js.map +0 -1
  126. package/app-layout/skeleton/layout.d.ts +0 -8
  127. package/app-layout/skeleton/layout.d.ts.map +0 -1
  128. package/app-layout/skeleton/layout.js +0 -28
  129. package/app-layout/skeleton/layout.js.map +0 -1
  130. package/app-layout/skeleton/styles.css.js +0 -16
  131. package/app-layout/skeleton/styles.selectors.js +0 -17
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { AppLayoutPropsWithDefaults } from '../../interfaces';
3
+ interface SkeletonLayoutProps extends Pick<AppLayoutPropsWithDefaults, 'notifications' | 'contentHeader' | 'content' | 'contentType' | 'maxContentWidth' | 'disableContentPaddings' | 'navigation' | 'navigationOpen' | 'navigationWidth' | 'tools' | 'toolsOpen' | 'toolsWidth' | 'placement'> {
4
+ style?: React.CSSProperties;
5
+ toolbar?: React.ReactNode;
6
+ splitPanelOpen?: boolean;
7
+ sideSplitPanel?: React.ReactNode;
8
+ bottomSplitPanel?: React.ReactNode;
9
+ }
10
+ export declare function SkeletonLayout({ style, notifications, contentHeader, content, navigation, navigationOpen, navigationWidth, tools, toolsOpen, toolsWidth, toolbar, sideSplitPanel, bottomSplitPanel, splitPanelOpen, placement, contentType, maxContentWidth, disableContentPaddings, }: SkeletonLayoutProps): JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAO9D,UAAU,mBACR,SAAQ,IAAI,CACV,0BAA0B,EACxB,eAAe,GACf,eAAe,GACf,SAAS,GACT,aAAa,GACb,iBAAiB,GACjB,wBAAwB,GACxB,YAAY,GACZ,gBAAgB,GAChB,iBAAiB,GACjB,OAAO,GACP,WAAW,GACX,YAAY,GACZ,WAAW,CACd;IACD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,aAAa,EACb,aAAa,EACb,OAAO,EACP,UAAU,EACV,cAAc,EACd,eAAe,EACf,KAAK,EACL,SAAS,EACT,UAAU,EACV,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,WAAW,EACX,eAAe,EACf,sBAAsB,GACvB,EAAE,mBAAmB,eAmDrB"}
@@ -0,0 +1,32 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import React from 'react';
4
+ import clsx from 'clsx';
5
+ import customCssProps from '../../../internal/generated/custom-css-properties';
6
+ import testutilStyles from '../../test-classes/styles.css.js';
7
+ import styles from './styles.css.js';
8
+ const contentTypeCustomWidths = ['dashboard', 'cards', 'table'];
9
+ export function SkeletonLayout({ style, notifications, contentHeader, content, navigation, navigationOpen, navigationWidth, tools, toolsOpen, toolsWidth, toolbar, sideSplitPanel, bottomSplitPanel, splitPanelOpen, placement, contentType, maxContentWidth, disableContentPaddings, }) {
10
+ const isMaxWidth = maxContentWidth === Number.MAX_VALUE || maxContentWidth === Number.MAX_SAFE_INTEGER;
11
+ const anyPanelOpen = navigationOpen || toolsOpen;
12
+ return (React.createElement("div", { className: clsx(styles.root, testutilStyles.root, {
13
+ [styles['has-adaptive-widths-default']]: !contentTypeCustomWidths.includes(contentType),
14
+ [styles['has-adaptive-widths-dashboard']]: contentType === 'dashboard',
15
+ }), style: {
16
+ minBlockSize: `calc(100vh - ${placement.insetBlockStart}px - ${placement.insetBlockEnd}px)`,
17
+ [customCssProps.maxContentWidth]: isMaxWidth ? '100%' : maxContentWidth ? `${maxContentWidth}px` : '',
18
+ [customCssProps.navigationWidth]: `${navigationWidth}px`,
19
+ [customCssProps.toolsWidth]: `${toolsWidth}px`,
20
+ } },
21
+ navigation && (React.createElement("div", { className: clsx(styles.navigation, !navigationOpen && styles['panel-hidden'], toolsOpen && styles['unfocusable-mobile']) }, navigation)),
22
+ toolbar,
23
+ React.createElement("main", { className: clsx(styles['main-landmark'], anyPanelOpen && styles['unfocusable-mobile']) },
24
+ notifications,
25
+ React.createElement("div", { className: clsx(styles.main, { [styles['main-disable-paddings']]: disableContentPaddings }), style: style },
26
+ contentHeader && React.createElement("div", { className: styles['content-header'] }, contentHeader),
27
+ React.createElement("div", { className: testutilStyles.content }, content)),
28
+ bottomSplitPanel && (React.createElement("div", { className: clsx(styles['split-panel-bottom'], !splitPanelOpen && styles['split-panel-hidden']), style: { insetBlockEnd: placement.insetBlockEnd } }, bottomSplitPanel))),
29
+ sideSplitPanel && (React.createElement("div", { className: clsx(styles['split-panel-side'], !splitPanelOpen && styles['panel-hidden']) }, sideSplitPanel)),
30
+ tools && React.createElement("div", { className: clsx(styles.tools, !toolsOpen && styles['panel-hidden']) }, tools)));
31
+ }
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources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CAAC,KAAK,EAAE,CAAC,SAAS,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC,IAAG,KAAK,CAAO,CAC7F,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport { AppLayoutPropsWithDefaults } from '../../interfaces';\nimport customCssProps from '../../../internal/generated/custom-css-properties';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nconst contentTypeCustomWidths: Array<string | undefined> = ['dashboard', 'cards', 'table'];\n\ninterface SkeletonLayoutProps\n extends Pick<\n AppLayoutPropsWithDefaults,\n | 'notifications'\n | 'contentHeader'\n | 'content'\n | 'contentType'\n | 'maxContentWidth'\n | 'disableContentPaddings'\n | 'navigation'\n | 'navigationOpen'\n | 'navigationWidth'\n | 'tools'\n | 'toolsOpen'\n | 'toolsWidth'\n | 'placement'\n > {\n style?: React.CSSProperties;\n toolbar?: React.ReactNode;\n splitPanelOpen?: boolean;\n sideSplitPanel?: React.ReactNode;\n bottomSplitPanel?: React.ReactNode;\n}\n\nexport function SkeletonLayout({\n style,\n notifications,\n contentHeader,\n content,\n navigation,\n navigationOpen,\n navigationWidth,\n tools,\n toolsOpen,\n toolsWidth,\n toolbar,\n sideSplitPanel,\n bottomSplitPanel,\n splitPanelOpen,\n placement,\n contentType,\n maxContentWidth,\n disableContentPaddings,\n}: SkeletonLayoutProps) {\n const isMaxWidth = maxContentWidth === Number.MAX_VALUE || maxContentWidth === Number.MAX_SAFE_INTEGER;\n const anyPanelOpen = navigationOpen || toolsOpen;\n return (\n <div\n className={clsx(styles.root, testutilStyles.root, {\n [styles['has-adaptive-widths-default']]: !contentTypeCustomWidths.includes(contentType),\n [styles['has-adaptive-widths-dashboard']]: contentType === 'dashboard',\n })}\n style={{\n minBlockSize: `calc(100vh - ${placement.insetBlockStart}px - ${placement.insetBlockEnd}px)`,\n [customCssProps.maxContentWidth]: isMaxWidth ? '100%' : maxContentWidth ? `${maxContentWidth}px` : '',\n [customCssProps.navigationWidth]: `${navigationWidth}px`,\n [customCssProps.toolsWidth]: `${toolsWidth}px`,\n }}\n >\n {navigation && (\n <div\n className={clsx(\n styles.navigation,\n !navigationOpen && styles['panel-hidden'],\n toolsOpen && styles['unfocusable-mobile']\n )}\n >\n {navigation}\n </div>\n )}\n {toolbar}\n <main className={clsx(styles['main-landmark'], anyPanelOpen && styles['unfocusable-mobile'])}>\n {notifications}\n <div className={clsx(styles.main, { [styles['main-disable-paddings']]: disableContentPaddings })} style={style}>\n {contentHeader && <div className={styles['content-header']}>{contentHeader}</div>}\n <div className={testutilStyles.content}>{content}</div>\n </div>\n {bottomSplitPanel && (\n <div\n className={clsx(styles['split-panel-bottom'], !splitPanelOpen && styles['split-panel-hidden'])}\n style={{ insetBlockEnd: placement.insetBlockEnd }}\n >\n {bottomSplitPanel}\n </div>\n )}\n </main>\n {sideSplitPanel && (\n <div className={clsx(styles['split-panel-side'], !splitPanelOpen && styles['panel-hidden'])}>\n {sideSplitPanel}\n </div>\n )}\n {tools && <div className={clsx(styles.tools, !toolsOpen && styles['panel-hidden'])}>{tools}</div>}\n </div>\n );\n}\n"]}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ interface ToolbarSlotProps {
3
+ className?: string;
4
+ style?: React.CSSProperties;
5
+ children?: React.ReactNode;
6
+ }
7
+ export declare const ToolbarSlot: React.ForwardRefExoticComponent<ToolbarSlotProps & React.RefAttributes<HTMLElement>>;
8
+ interface NotificationsSlotProps {
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ children?: React.ReactNode;
12
+ }
13
+ export declare const NotificationsSlot: React.ForwardRefExoticComponent<NotificationsSlotProps & React.RefAttributes<HTMLElement>>;
14
+ export {};
15
+ //# sourceMappingURL=slot-wrappers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slot-wrappers.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,WAAW,sFAItB,CAAC;AAEH,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,4FAM7B,CAAC"}
@@ -0,0 +1,8 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import React from 'react';
4
+ import clsx from 'clsx';
5
+ import styles from './styles.css.js';
6
+ export const ToolbarSlot = React.forwardRef(({ className, style, children }, ref) => (React.createElement("section", { ref: ref, className: clsx(styles['toolbar-container'], className), style: style }, children)));
7
+ export const NotificationsSlot = React.forwardRef(({ className, style, children }, ref) => (React.createElement("div", { ref: ref, className: clsx(styles['notifications-container'], className), style: style }, children)));
8
+ //# sourceMappingURL=slot-wrappers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slot-wrappers.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAQrC,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAgC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClH,iCAAS,GAAG,EAAE,GAAqB,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,IACvG,QAAQ,CACD,CACX,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAC/C,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACvC,6BAAK,GAAG,EAAE,GAAqB,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,yBAAyB,CAAC,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,IACzG,QAAQ,CACL,CACP,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\n\ninterface ToolbarSlotProps {\n className?: string;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n}\n\nexport const ToolbarSlot = React.forwardRef<HTMLElement, ToolbarSlotProps>(({ className, style, children }, ref) => (\n <section ref={ref as React.Ref<any>} className={clsx(styles['toolbar-container'], className)} style={style}>\n {children}\n </section>\n));\n\ninterface NotificationsSlotProps {\n className?: string;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n}\n\nexport const NotificationsSlot = React.forwardRef<HTMLElement, NotificationsSlotProps>(\n ({ className, style, children }, ref) => (\n <div ref={ref as React.Ref<any>} className={clsx(styles['notifications-container'], className)} style={style}>\n {children}\n </div>\n )\n);\n"]}
@@ -0,0 +1,20 @@
1
+
2
+ import './styles.scoped.css';
3
+ export default {
4
+ "root": "awsui_root_7nfqu_12zwm_101",
5
+ "has-adaptive-widths-default": "awsui_has-adaptive-widths-default_7nfqu_12zwm_150",
6
+ "has-adaptive-widths-dashboard": "awsui_has-adaptive-widths-dashboard_7nfqu_12zwm_165",
7
+ "navigation": "awsui_navigation_7nfqu_12zwm_180",
8
+ "tools": "awsui_tools_7nfqu_12zwm_181",
9
+ "split-panel-side": "awsui_split-panel-side_7nfqu_12zwm_205",
10
+ "split-panel-bottom": "awsui_split-panel-bottom_7nfqu_12zwm_211",
11
+ "panel-hidden": "awsui_panel-hidden_7nfqu_12zwm_224",
12
+ "toolbar-container": "awsui_toolbar-container_7nfqu_12zwm_228",
13
+ "notifications-container": "awsui_notifications-container_7nfqu_12zwm_234",
14
+ "main-landmark": "awsui_main-landmark_7nfqu_12zwm_241",
15
+ "main": "awsui_main_7nfqu_12zwm_241",
16
+ "main-disable-paddings": "awsui_main-disable-paddings_7nfqu_12zwm_250",
17
+ "content-header": "awsui_content-header_7nfqu_12zwm_260",
18
+ "unfocusable-mobile": "awsui_unfocusable-mobile_7nfqu_12zwm_265"
19
+ };
20
+
@@ -98,7 +98,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
98
98
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
99
99
  SPDX-License-Identifier: Apache-2.0
100
100
  */
101
- .awsui_root_1uxbz_1ayfw_101:not(#\9) {
101
+ .awsui_root_7nfqu_12zwm_101:not(#\9) {
102
102
  border-collapse: separate;
103
103
  border-spacing: 0;
104
104
  box-sizing: border-box;
@@ -141,53 +141,53 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
141
141
  grid-template-rows: min-content min-content 1fr;
142
142
  }
143
143
  @media (min-width: 689px) {
144
- .awsui_root_1uxbz_1ayfw_101:not(#\9) {
145
- grid-template-areas: "navigation topBar topBar topBar tools" "navigation . notifications . tools" "navigation . main . tools";
146
- grid-template-columns: min-content minmax(var(--space-layout-content-horizontal-7l52k3, 24px), 1fr) minmax(0, var(--awsui-max-content-width-9rhwr5)) minmax(var(--space-layout-content-horizontal-7l52k3, 24px), 1fr) min-content;
144
+ .awsui_root_7nfqu_12zwm_101:not(#\9) {
145
+ grid-template-areas: "navigation toolbar toolbar toolbar toolbar tools" "navigation . notifications . sideSplitPanel tools" "navigation . main . sideSplitPanel tools";
146
+ grid-template-columns: min-content minmax(var(--space-layout-content-horizontal-7l52k3, 24px), 1fr) minmax(0, var(--awsui-max-content-width-9rhwr5)) minmax(var(--space-layout-content-horizontal-7l52k3, 24px), 1fr) min-content min-content;
147
147
  grid-template-rows: min-content min-content 1fr min-content;
148
148
  }
149
149
  }
150
150
  @media (min-width: 689px) and (min-width: 1401px) {
151
- .awsui_root_1uxbz_1ayfw_101.awsui_has-adaptive-widths-default_1uxbz_1ayfw_150:not(#\9) {
151
+ .awsui_root_7nfqu_12zwm_101.awsui_has-adaptive-widths-default_7nfqu_12zwm_150:not(#\9) {
152
152
  --awsui-max-content-width-9rhwr5: 1280px;
153
153
  }
154
154
  }
155
155
  @media (min-width: 689px) and (min-width: 1921px) {
156
- .awsui_root_1uxbz_1ayfw_101.awsui_has-adaptive-widths-default_1uxbz_1ayfw_150:not(#\9) {
156
+ .awsui_root_7nfqu_12zwm_101.awsui_has-adaptive-widths-default_7nfqu_12zwm_150:not(#\9) {
157
157
  --awsui-max-content-width-9rhwr5: 1440px;
158
158
  }
159
159
  }
160
160
  @media (min-width: 689px) and (min-width: 2541px) {
161
- .awsui_root_1uxbz_1ayfw_101.awsui_has-adaptive-widths-default_1uxbz_1ayfw_150:not(#\9) {
161
+ .awsui_root_7nfqu_12zwm_101.awsui_has-adaptive-widths-default_7nfqu_12zwm_150:not(#\9) {
162
162
  --awsui-max-content-width-9rhwr5: 1620px;
163
163
  }
164
164
  }
165
165
  @media (min-width: 689px) and (min-width: 1401px) {
166
- .awsui_root_1uxbz_1ayfw_101.awsui_has-adaptive-widths-dashboard_1uxbz_1ayfw_165:not(#\9) {
166
+ .awsui_root_7nfqu_12zwm_101.awsui_has-adaptive-widths-dashboard_7nfqu_12zwm_165:not(#\9) {
167
167
  --awsui-max-content-width-9rhwr5: 1280px;
168
168
  }
169
169
  }
170
170
  @media (min-width: 689px) and (min-width: 1921px) {
171
- .awsui_root_1uxbz_1ayfw_101.awsui_has-adaptive-widths-dashboard_1uxbz_1ayfw_165:not(#\9) {
171
+ .awsui_root_7nfqu_12zwm_101.awsui_has-adaptive-widths-dashboard_7nfqu_12zwm_165:not(#\9) {
172
172
  --awsui-max-content-width-9rhwr5: 1620px;
173
173
  }
174
174
  }
175
175
  @media (min-width: 689px) and (min-width: 2541px) {
176
- .awsui_root_1uxbz_1ayfw_101.awsui_has-adaptive-widths-dashboard_1uxbz_1ayfw_165:not(#\9) {
176
+ .awsui_root_7nfqu_12zwm_101.awsui_has-adaptive-widths-dashboard_7nfqu_12zwm_165:not(#\9) {
177
177
  --awsui-max-content-width-9rhwr5: 2160px;
178
178
  }
179
179
  }
180
180
 
181
- .awsui_navigation_1uxbz_1ayfw_180:not(#\9),
182
- .awsui_tools_1uxbz_1ayfw_181:not(#\9) {
181
+ .awsui_navigation_7nfqu_12zwm_180:not(#\9),
182
+ .awsui_tools_7nfqu_12zwm_181:not(#\9) {
183
183
  grid-row: 1/-1;
184
184
  grid-column: 1/-1;
185
185
  background: var(--color-background-container-content-4un1ap, #ffffff);
186
- z-index: 1;
186
+ z-index: 850;
187
187
  }
188
188
 
189
189
  @media (min-width: 689px) {
190
- .awsui_navigation_1uxbz_1ayfw_180:not(#\9) {
190
+ .awsui_navigation_7nfqu_12zwm_180:not(#\9) {
191
191
  grid-area: navigation;
192
192
  inline-size: var(--awsui-navigation-width-9rhwr5);
193
193
  border-inline-end: 1px solid var(--color-border-divider-panel-side-93n0qu, #b6bec9);
@@ -195,45 +195,79 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
195
195
  }
196
196
 
197
197
  @media (min-width: 689px) {
198
- .awsui_tools_1uxbz_1ayfw_181:not(#\9) {
198
+ .awsui_tools_7nfqu_12zwm_181:not(#\9) {
199
199
  grid-area: tools;
200
200
  inline-size: var(--awsui-tools-width-9rhwr5);
201
201
  border-inline-start: 1px solid var(--color-border-divider-panel-side-93n0qu, #b6bec9);
202
202
  }
203
203
  }
204
204
 
205
- .awsui_top-bar_1uxbz_1ayfw_204:not(#\9) {
206
- grid-area: topBar;
205
+ @media (min-width: 689px) {
206
+ .awsui_split-panel-side_7nfqu_12zwm_205:not(#\9) {
207
+ grid-area: sideSplitPanel;
208
+ border-inline-start: 1px solid var(--color-border-divider-panel-side-93n0qu, #b6bec9);
209
+ }
210
+ }
211
+
212
+ .awsui_split-panel-bottom_7nfqu_12zwm_211:not(#\9) {
213
+ position: sticky;
214
+ z-index: 840;
215
+ align-self: end;
216
+ grid-area: main;
217
+ grid-column: 1/-1;
218
+ }
219
+ @media (min-width: 689px) {
220
+ .awsui_split-panel-bottom_7nfqu_12zwm_211:not(#\9) {
221
+ grid-column: 2/span 3;
222
+ }
223
+ }
224
+
225
+ .awsui_panel-hidden_7nfqu_12zwm_224:not(#\9) {
226
+ display: none;
227
+ }
228
+
229
+ .awsui_toolbar-container_7nfqu_12zwm_228:not(#\9) {
230
+ grid-area: toolbar;
207
231
  block-size: 48px;
208
232
  border-block-end: 1px solid var(--color-border-divider-panel-bottom-dwyqvg, #b6bec9);
209
233
  }
210
234
 
211
- .awsui_notifications_1uxbz_1ayfw_210:not(#\9) {
235
+ .awsui_notifications-container_7nfqu_12zwm_234:not(#\9) {
212
236
  grid-area: notifications;
213
237
  }
214
- .awsui_notifications_1uxbz_1ayfw_210:not(#\9):not(:empty) {
238
+ .awsui_notifications-container_7nfqu_12zwm_234:not(#\9):not(:empty) {
215
239
  padding-block-start: var(--space-scaled-xs-26e2du, 8px);
216
240
  }
217
241
 
218
- .awsui_main-landmark_1uxbz_1ayfw_217:not(#\9) {
242
+ .awsui_main-landmark_7nfqu_12zwm_241:not(#\9) {
219
243
  display: contents;
220
244
  }
221
245
 
222
- .awsui_main_1uxbz_1ayfw_217:not(#\9) {
246
+ .awsui_main_7nfqu_12zwm_241:not(#\9) {
223
247
  grid-area: main;
224
248
  margin-block-start: var(--space-scaled-s-aqzyko, 12px);
225
249
  margin-block-end: var(--space-layout-content-bottom-noqzmw, 40px);
226
250
  }
227
- .awsui_main-disable-paddings_1uxbz_1ayfw_226:not(#\9) {
251
+ .awsui_main-disable-paddings_7nfqu_12zwm_250:not(#\9) {
228
252
  grid-column: 1/-1;
229
253
  margin-block: 0;
230
254
  }
231
255
  @media (min-width: 689px) {
232
- .awsui_main-disable-paddings_1uxbz_1ayfw_226:not(#\9) {
256
+ .awsui_main-disable-paddings_7nfqu_12zwm_250:not(#\9) {
233
257
  grid-column: 2/span 3;
234
258
  }
235
259
  }
236
260
 
237
- .awsui_content-header_1uxbz_1ayfw_236:not(#\9) {
261
+ .awsui_content-header_7nfqu_12zwm_260:not(#\9) {
238
262
  margin-block-end: var(--space-content-header-padding-bottom-y2enua, 16px);
263
+ }
264
+
265
+ /* stylelint-disable-next-line selector-combinator-disallowed-list, selector-max-universal */
266
+ .awsui_unfocusable-mobile_7nfqu_12zwm_265 *:not(#\9) {
267
+ visibility: hidden;
268
+ }
269
+ @media (min-width: 689px) {
270
+ .awsui_unfocusable-mobile_7nfqu_12zwm_265 *:not(#\9) {
271
+ visibility: visible;
272
+ }
239
273
  }
@@ -0,0 +1,21 @@
1
+
2
+ // es-module interop with Babel and Typescript
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ module.exports.default = {
5
+ "root": "awsui_root_7nfqu_12zwm_101",
6
+ "has-adaptive-widths-default": "awsui_has-adaptive-widths-default_7nfqu_12zwm_150",
7
+ "has-adaptive-widths-dashboard": "awsui_has-adaptive-widths-dashboard_7nfqu_12zwm_165",
8
+ "navigation": "awsui_navigation_7nfqu_12zwm_180",
9
+ "tools": "awsui_tools_7nfqu_12zwm_181",
10
+ "split-panel-side": "awsui_split-panel-side_7nfqu_12zwm_205",
11
+ "split-panel-bottom": "awsui_split-panel-bottom_7nfqu_12zwm_211",
12
+ "panel-hidden": "awsui_panel-hidden_7nfqu_12zwm_224",
13
+ "toolbar-container": "awsui_toolbar-container_7nfqu_12zwm_228",
14
+ "notifications-container": "awsui_notifications-container_7nfqu_12zwm_234",
15
+ "main-landmark": "awsui_main-landmark_7nfqu_12zwm_241",
16
+ "main": "awsui_main_7nfqu_12zwm_241",
17
+ "main-disable-paddings": "awsui_main-disable-paddings_7nfqu_12zwm_250",
18
+ "content-header": "awsui_content-header_7nfqu_12zwm_260",
19
+ "unfocusable-mobile": "awsui_unfocusable-mobile_7nfqu_12zwm_265"
20
+ };
21
+
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { SplitPanelProviderProps } from '../../split-panel';
3
+ import { AppLayoutInternals } from '../interfaces';
4
+ interface AppLayoutSplitPanelDrawerSideImplementationProps {
5
+ appLayoutInternals: AppLayoutInternals;
6
+ splitPanelInternals: SplitPanelProviderProps;
7
+ children: React.ReactNode;
8
+ }
9
+ export declare function AppLayoutSplitPanelDrawerSideImplementation({ children, appLayoutInternals, splitPanelInternals, }: AppLayoutSplitPanelDrawerSideImplementationProps): JSX.Element;
10
+ export interface AppLayoutSplitPanelDrawerBottomImplementationProps {
11
+ appLayoutInternals: AppLayoutInternals;
12
+ splitPanelInternals: SplitPanelProviderProps;
13
+ children: React.ReactNode;
14
+ }
15
+ export declare function AppLayoutSplitPanelDrawerBottomImplementation({ children, splitPanelInternals, }: AppLayoutSplitPanelDrawerBottomImplementationProps): JSX.Element;
16
+ export declare const createWidgetizedAppLayoutSplitPanelDrawerSide: (Loader?: typeof AppLayoutSplitPanelDrawerSideImplementation | undefined) => typeof AppLayoutSplitPanelDrawerSideImplementation;
17
+ export declare const createWidgetizedAppLayoutSplitPanelDrawerBottom: (Loader?: typeof AppLayoutSplitPanelDrawerBottomImplementation | undefined) => typeof AppLayoutSplitPanelDrawerBottomImplementation;
18
+ export {};
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/split-panel/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAsB,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGnD,UAAU,gDAAgD;IACxD,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,mBAAmB,EAAE,uBAAuB,CAAC;IAC7C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,2CAA2C,CAAC,EAC1D,QAAQ,EACR,kBAAkB,EAClB,mBAAmB,GACpB,EAAE,gDAAgD,eAgBlD;AAED,MAAM,WAAW,kDAAkD;IACjE,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,mBAAmB,EAAE,uBAAuB,CAAC;IAC7C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,6CAA6C,CAAC,EAC5D,QAAQ,EACR,mBAAmB,GACpB,EAAE,kDAAkD,eAEpD;AAED,eAAO,MAAM,6CAA6C,iIAEzD,CAAC;AAEF,eAAO,MAAM,+CAA+C,qIAE3D,CAAC"}
@@ -0,0 +1,20 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import React from 'react';
4
+ import { createWidgetizedComponent } from '../../../internal/widgets';
5
+ import { SplitPanelProvider } from '../../split-panel';
6
+ import styles from './styles.css.js';
7
+ export function AppLayoutSplitPanelDrawerSideImplementation({ children, appLayoutInternals, splitPanelInternals, }) {
8
+ const { splitPanelControlId, placement } = appLayoutInternals;
9
+ return (React.createElement(SplitPanelProvider, Object.assign({}, splitPanelInternals),
10
+ React.createElement("section", { id: splitPanelControlId, className: styles['split-panel-side'], style: {
11
+ blockSize: `calc(100vh - ${placement.insetBlockStart}px - ${placement.insetBlockEnd}px)`,
12
+ insetBlockStart: placement.insetBlockStart,
13
+ } }, children)));
14
+ }
15
+ export function AppLayoutSplitPanelDrawerBottomImplementation({ children, splitPanelInternals, }) {
16
+ return React.createElement(SplitPanelProvider, Object.assign({}, splitPanelInternals), children);
17
+ }
18
+ export const createWidgetizedAppLayoutSplitPanelDrawerSide = createWidgetizedComponent(AppLayoutSplitPanelDrawerSideImplementation);
19
+ export const createWidgetizedAppLayoutSplitPanelDrawerBottom = createWidgetizedComponent(AppLayoutSplitPanelDrawerBottomImplementation);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/split-panel/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAA2B,MAAM,mBAAmB,CAAC;AAEhF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAQrC,MAAM,UAAU,2CAA2C,CAAC,EAC1D,QAAQ,EACR,kBAAkB,EAClB,mBAAmB,GAC8B;IACjD,MAAM,EAAE,mBAAmB,EAAE,SAAS,EAAE,GAAG,kBAAkB,CAAC;IAC9D,OAAO,CACL,oBAAC,kBAAkB,oBAAK,mBAAmB;QACzC,iCACE,EAAE,EAAE,mBAAmB,EACvB,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,EACrC,KAAK,EAAE;gBACL,SAAS,EAAE,gBAAgB,SAAS,CAAC,eAAe,QAAQ,SAAS,CAAC,aAAa,KAAK;gBACxF,eAAe,EAAE,SAAS,CAAC,eAAe;aAC3C,IAEA,QAAQ,CACD,CACS,CACtB,CAAC;AACJ,CAAC;AAQD,MAAM,UAAU,6CAA6C,CAAC,EAC5D,QAAQ,EACR,mBAAmB,GACgC;IACnD,OAAO,oBAAC,kBAAkB,oBAAK,mBAAmB,GAAG,QAAQ,CAAsB,CAAC;AACtF,CAAC;AAED,MAAM,CAAC,MAAM,6CAA6C,GAAG,yBAAyB,CACpF,2CAA2C,CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,+CAA+C,GAAG,yBAAyB,CACtF,6CAA6C,CAC9C,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { SplitPanelProvider, SplitPanelProviderProps } from '../../split-panel';\nimport { AppLayoutInternals } from '../interfaces';\nimport styles from './styles.css.js';\n\ninterface AppLayoutSplitPanelDrawerSideImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n splitPanelInternals: SplitPanelProviderProps;\n children: React.ReactNode;\n}\n\nexport function AppLayoutSplitPanelDrawerSideImplementation({\n children,\n appLayoutInternals,\n splitPanelInternals,\n}: AppLayoutSplitPanelDrawerSideImplementationProps) {\n const { splitPanelControlId, placement } = appLayoutInternals;\n return (\n <SplitPanelProvider {...splitPanelInternals}>\n <section\n id={splitPanelControlId}\n className={styles['split-panel-side']}\n style={{\n blockSize: `calc(100vh - ${placement.insetBlockStart}px - ${placement.insetBlockEnd}px)`,\n insetBlockStart: placement.insetBlockStart,\n }}\n >\n {children}\n </section>\n </SplitPanelProvider>\n );\n}\n\nexport interface AppLayoutSplitPanelDrawerBottomImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n splitPanelInternals: SplitPanelProviderProps;\n children: React.ReactNode;\n}\n\nexport function AppLayoutSplitPanelDrawerBottomImplementation({\n children,\n splitPanelInternals,\n}: AppLayoutSplitPanelDrawerBottomImplementationProps) {\n return <SplitPanelProvider {...splitPanelInternals}>{children}</SplitPanelProvider>;\n}\n\nexport const createWidgetizedAppLayoutSplitPanelDrawerSide = createWidgetizedComponent(\n AppLayoutSplitPanelDrawerSideImplementation\n);\n\nexport const createWidgetizedAppLayoutSplitPanelDrawerBottom = createWidgetizedComponent(\n AppLayoutSplitPanelDrawerBottomImplementation\n);\n"]}
@@ -0,0 +1,6 @@
1
+
2
+ import './styles.scoped.css';
3
+ export default {
4
+ "split-panel-side": "awsui_split-panel-side_j4v3w_woacl_97"
5
+ };
6
+
@@ -0,0 +1,100 @@
1
+ /*
2
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ /*
6
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
+ SPDX-License-Identifier: Apache-2.0
8
+ */
9
+ /*
10
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
11
+ SPDX-License-Identifier: Apache-2.0
12
+ */
13
+ /*
14
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
15
+ SPDX-License-Identifier: Apache-2.0
16
+ */
17
+ /*
18
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
19
+ SPDX-License-Identifier: Apache-2.0
20
+ */
21
+ /*
22
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
23
+ SPDX-License-Identifier: Apache-2.0
24
+ */
25
+ /*
26
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
27
+ SPDX-License-Identifier: Apache-2.0
28
+ */
29
+ /*
30
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
31
+ SPDX-License-Identifier: Apache-2.0
32
+ */
33
+ /*
34
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
35
+ SPDX-License-Identifier: Apache-2.0
36
+ */
37
+ /*
38
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
39
+ SPDX-License-Identifier: Apache-2.0
40
+ */
41
+ /*
42
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
43
+ SPDX-License-Identifier: Apache-2.0
44
+ */
45
+ /*
46
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
47
+ SPDX-License-Identifier: Apache-2.0
48
+ */
49
+ /*
50
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
51
+ SPDX-License-Identifier: Apache-2.0
52
+ */
53
+ /*
54
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
55
+ SPDX-License-Identifier: Apache-2.0
56
+ */
57
+ /*
58
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
59
+ SPDX-License-Identifier: Apache-2.0
60
+ */
61
+ /*
62
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
63
+ SPDX-License-Identifier: Apache-2.0
64
+ */
65
+ /*
66
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
67
+ SPDX-License-Identifier: Apache-2.0
68
+ */
69
+ /* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
70
+ /* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
71
+ /*
72
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
73
+ SPDX-License-Identifier: Apache-2.0
74
+ */
75
+ /*
76
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
77
+ SPDX-License-Identifier: Apache-2.0
78
+ */
79
+ /*
80
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
81
+ SPDX-License-Identifier: Apache-2.0
82
+ */
83
+ /*
84
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
85
+ SPDX-License-Identifier: Apache-2.0
86
+ */
87
+ /* Style used for links in slots/components that are text heavy, to help links stand out among
88
+ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
89
+ /*
90
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
+ SPDX-License-Identifier: Apache-2.0
92
+ */
93
+ /*
94
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
+ SPDX-License-Identifier: Apache-2.0
96
+ */
97
+ .awsui_split-panel-side_j4v3w_woacl_97:not(#\9) {
98
+ position: sticky;
99
+ z-index: 830;
100
+ }
@@ -0,0 +1,7 @@
1
+
2
+ // es-module interop with Babel and Typescript
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ module.exports.default = {
5
+ "split-panel-side": "awsui_split-panel-side_j4v3w_woacl_97"
6
+ };
7
+
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { AppLayoutInternals } from '../interfaces';
3
+ interface DrawerTriggersProps {
4
+ appLayoutInternals: AppLayoutInternals;
5
+ }
6
+ export declare function DrawerTriggers({ appLayoutInternals }: DrawerTriggersProps): JSX.Element | null;
7
+ export {};
8
+ //# sourceMappingURL=drawer-triggers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer-triggers.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,UAAU,mBAAmB;IAC3B,kBAAkB,EAAE,kBAAkB,CAAC;CACxC;AAED,wBAAgB,cAAc,CAAC,EAAE,kBAAkB,EAAE,EAAE,mBAAmB,sBAiIzE"}
@@ -0,0 +1,60 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import React, { useRef } from 'react';
4
+ import { useContainerQuery } from '@cloudscape-design/component-toolkit';
5
+ import { splitItems } from '../../drawer/drawers-helpers';
6
+ import clsx from 'clsx';
7
+ import styles from './styles.css.js';
8
+ import { TOOLS_DRAWER_ID } from '../../utils/use-drawers';
9
+ import OverflowMenu from '../../drawer/overflow-menu';
10
+ import TriggerButton from './trigger-button';
11
+ import testutilStyles from '../../test-classes/styles.css.js';
12
+ import splitPanelTestUtilStyles from '../../../split-panel/test-classes/styles.css.js';
13
+ export function DrawerTriggers({ appLayoutInternals }) {
14
+ const { ariaLabels, activeDrawer, drawers, drawersFocusControl, isMobile, splitPanelOpen, splitPanelControlId, splitPanelPosition, splitPanelFocusControl, splitPanelToggleConfig, headerVariant, onSplitPanelToggle, onActiveDrawerChange, } = appLayoutInternals;
15
+ const hasMultipleTriggers = drawers.length > 1;
16
+ const activeDrawerId = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.id;
17
+ const splitPanelIcon = splitPanelPosition === 'side' ? 'view-vertical' : 'view-horizontal';
18
+ const previousActiveDrawerId = useRef(activeDrawerId);
19
+ const [containerWidth, triggersContainerRef] = useContainerQuery(rect => rect.contentBoxWidth);
20
+ if (!drawers && !splitPanelToggleConfig.displayed) {
21
+ return null;
22
+ }
23
+ if (activeDrawerId) {
24
+ previousActiveDrawerId.current = activeDrawerId;
25
+ }
26
+ const getIndexOfOverflowItem = () => {
27
+ if (isMobile) {
28
+ return 2;
29
+ }
30
+ if (containerWidth) {
31
+ const ITEM_WIDTH = 50; // Roughly 34px + padding = 42px but added extra for safety
32
+ const overflowSpot = containerWidth;
33
+ const index = Math.floor(overflowSpot / ITEM_WIDTH);
34
+ let splitPanelItem = 0;
35
+ if (splitPanelToggleConfig.displayed) {
36
+ splitPanelItem = 1;
37
+ }
38
+ return index - splitPanelItem;
39
+ }
40
+ return 0;
41
+ };
42
+ const { visibleItems, overflowItems } = splitItems(drawers, getIndexOfOverflowItem(), activeDrawerId !== null && activeDrawerId !== void 0 ? activeDrawerId : null);
43
+ const overflowMenuHasBadge = !!overflowItems.find(item => item.badge);
44
+ const toolsOnlyMode = drawers.length === 1 && drawers[0].id === TOOLS_DRAWER_ID;
45
+ return (React.createElement("aside", { className: clsx(styles['drawers-desktop-triggers-container'], {
46
+ [styles['has-multiple-triggers']]: hasMultipleTriggers,
47
+ [styles['has-open-drawer']]: activeDrawer,
48
+ }), "aria-label": ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.drawers, ref: triggersContainerRef, role: "region" },
49
+ React.createElement("div", { className: clsx(styles['drawers-trigger-content'], {
50
+ [styles['has-multiple-triggers']]: hasMultipleTriggers,
51
+ [styles['has-open-drawer']]: activeDrawer,
52
+ }), role: "toolbar", "aria-orientation": "horizontal" },
53
+ splitPanelToggleConfig.displayed && (React.createElement(TriggerButton, { ariaLabel: splitPanelToggleConfig.ariaLabel, ariaControls: splitPanelControlId, ariaExpanded: splitPanelOpen, className: clsx(styles['drawers-trigger'], splitPanelTestUtilStyles['open-button']), iconName: splitPanelIcon, onClick: () => onSplitPanelToggle(), selected: splitPanelOpen, ref: splitPanelFocusControl.refs.toggle })),
54
+ visibleItems.map(item => {
55
+ var _a;
56
+ return (React.createElement(TriggerButton, { ariaLabel: (_a = item.ariaLabels) === null || _a === void 0 ? void 0 : _a.triggerButton, ariaExpanded: item.id === activeDrawerId, ariaControls: activeDrawerId === item.id ? item.id : undefined, className: clsx(styles['drawers-trigger'], !toolsOnlyMode && testutilStyles['drawers-trigger'], item.id === TOOLS_DRAWER_ID && testutilStyles['tools-toggle']), iconName: item.trigger.iconName, iconSvg: item.trigger.iconSvg, key: item.id, onClick: () => onActiveDrawerChange(activeDrawerId !== item.id ? item.id : null), ref: item.id === previousActiveDrawerId.current ? drawersFocusControl.refs.toggle : undefined, selected: item.id === activeDrawerId, badge: item.badge, testId: `awsui-app-layout-trigger-${item.id}`, highContrastHeader: headerVariant === 'high-contrast' }));
57
+ }),
58
+ overflowItems.length > 0 && (React.createElement(OverflowMenu, { items: overflowItems, ariaLabel: overflowMenuHasBadge ? ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.drawersOverflowWithBadge : ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.drawersOverflow, customTriggerBuilder: ({ onClick, triggerRef, ariaLabel, ariaExpanded, testUtilsClass }) => (React.createElement(TriggerButton, { ref: triggerRef, ariaLabel: ariaLabel, ariaExpanded: ariaExpanded, badge: overflowMenuHasBadge, className: clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger'], testUtilsClass), iconName: "ellipsis", onClick: onClick, highContrastHeader: headerVariant === 'high-contrast' })), onItemClick: event => onActiveDrawerChange(event.detail.id) })))));
59
+ }
60
+ //# sourceMappingURL=drawer-triggers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer-triggers.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,wBAAwB,MAAM,iDAAiD,CAAC;AAOvF,MAAM,UAAU,cAAc,CAAC,EAAE,kBAAkB,EAAuB;IACxE,MAAM,EACJ,UAAU,EACV,YAAY,EACZ,OAAO,EACP,mBAAmB,EACnB,QAAQ,EACR,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,aAAa,EACb,kBAAkB,EAClB,oBAAoB,GACrB,GAAG,kBAAkB,CAAC;IAEvB,MAAM,mBAAmB,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAC/C,MAAM,cAAc,GAAG,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,EAAE,CAAC;IACxC,MAAM,cAAc,GAAG,kBAAkB,KAAK,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAE3F,MAAM,s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AoB,EAC3B,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC,EAAE,cAAc,CAAC,EAC7F,QAAQ,EAAC,UAAU,EACnB,OAAO,EAAE,OAAO,EAChB,kBAAkB,EAAE,aAAa,KAAK,eAAe,GACrD,CACH,EACD,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,GAC3D,CACH,CACG,CACA,CACT,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { splitItems } from '../../drawer/drawers-helpers';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport { TOOLS_DRAWER_ID } from '../../utils/use-drawers';\nimport OverflowMenu from '../../drawer/overflow-menu';\nimport TriggerButton from './trigger-button';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport splitPanelTestUtilStyles from '../../../split-panel/test-classes/styles.css.js';\nimport { AppLayoutInternals } from '../interfaces';\n\ninterface DrawerTriggersProps {\n appLayoutInternals: AppLayoutInternals;\n}\n\nexport function DrawerTriggers({ appLayoutInternals }: DrawerTriggersProps) {\n const {\n ariaLabels,\n activeDrawer,\n drawers,\n drawersFocusControl,\n isMobile,\n splitPanelOpen,\n splitPanelControlId,\n splitPanelPosition,\n splitPanelFocusControl,\n splitPanelToggleConfig,\n headerVariant,\n onSplitPanelToggle,\n onActiveDrawerChange,\n } = appLayoutInternals;\n\n const hasMultipleTriggers = drawers.length > 1;\n const activeDrawerId = activeDrawer?.id;\n const splitPanelIcon = splitPanelPosition === 'side' ? 'view-vertical' : 'view-horizontal';\n\n const previousActiveDrawerId = useRef(activeDrawerId);\n const [containerWidth, triggersContainerRef] = useContainerQuery(rect => rect.contentBoxWidth);\n if (!drawers && !splitPanelToggleConfig.displayed) {\n return null;\n }\n\n if (activeDrawerId) {\n previousActiveDrawerId.current = activeDrawerId;\n }\n\n const getIndexOfOverflowItem = () => {\n if (isMobile) {\n return 2;\n }\n if (containerWidth) {\n const ITEM_WIDTH = 50; // Roughly 34px + padding = 42px but added extra for safety\n const overflowSpot = containerWidth;\n\n const index = Math.floor(overflowSpot / ITEM_WIDTH);\n\n let splitPanelItem = 0;\n if (splitPanelToggleConfig.displayed) {\n splitPanelItem = 1;\n }\n return index - splitPanelItem;\n }\n return 0;\n };\n\n const { visibleItems, overflowItems } = splitItems(drawers, getIndexOfOverflowItem(), activeDrawerId ?? null);\n const overflowMenuHasBadge = !!overflowItems.find(item => item.badge);\n const toolsOnlyMode = drawers.length === 1 && drawers[0].id === TOOLS_DRAWER_ID;\n\n return (\n <aside\n className={clsx(styles['drawers-desktop-triggers-container'], {\n [styles['has-multiple-triggers']]: hasMultipleTriggers,\n [styles['has-open-drawer']]: activeDrawer,\n })}\n aria-label={ariaLabels?.drawers}\n ref={triggersContainerRef}\n role=\"region\"\n >\n <div\n className={clsx(styles['drawers-trigger-content'], {\n [styles['has-multiple-triggers']]: hasMultipleTriggers,\n [styles['has-open-drawer']]: activeDrawer,\n })}\n role=\"toolbar\"\n aria-orientation=\"horizontal\"\n >\n {splitPanelToggleConfig.displayed && (\n <TriggerButton\n ariaLabel={splitPanelToggleConfig.ariaLabel}\n ariaControls={splitPanelControlId}\n ariaExpanded={splitPanelOpen}\n className={clsx(styles['drawers-trigger'], splitPanelTestUtilStyles['open-button'])}\n iconName={splitPanelIcon}\n onClick={() => onSplitPanelToggle()}\n selected={splitPanelOpen}\n ref={splitPanelFocusControl.refs.toggle}\n />\n )}\n {visibleItems.map(item => {\n return (\n <TriggerButton\n ariaLabel={item.ariaLabels?.triggerButton}\n ariaExpanded={item.id === activeDrawerId}\n ariaControls={activeDrawerId === item.id ? item.id : undefined}\n className={clsx(\n styles['drawers-trigger'],\n !toolsOnlyMode && testutilStyles['drawers-trigger'],\n item.id === TOOLS_DRAWER_ID && testutilStyles['tools-toggle']\n )}\n iconName={item.trigger.iconName}\n iconSvg={item.trigger.iconSvg}\n key={item.id}\n onClick={() => onActiveDrawerChange(activeDrawerId !== item.id ? item.id : null)}\n ref={item.id === previousActiveDrawerId.current ? drawersFocusControl.refs.toggle : undefined}\n selected={item.id === activeDrawerId}\n badge={item.badge}\n testId={`awsui-app-layout-trigger-${item.id}`}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n );\n })}\n {overflowItems.length > 0 && (\n <OverflowMenu\n items={overflowItems}\n ariaLabel={overflowMenuHasBadge ? ariaLabels?.drawersOverflowWithBadge : ariaLabels?.drawersOverflow}\n customTriggerBuilder={({ onClick, triggerRef, ariaLabel, ariaExpanded, testUtilsClass }) => (\n <TriggerButton\n ref={triggerRef}\n ariaLabel={ariaLabel}\n ariaExpanded={ariaExpanded}\n badge={overflowMenuHasBadge}\n className={clsx(styles['drawers-trigger'], testutilStyles['drawers-trigger'], testUtilsClass)}\n iconName=\"ellipsis\"\n onClick={onClick}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n )}\n onItemClick={event => onActiveDrawerChange(event.detail.id)}\n />\n )}\n </div>\n </aside>\n );\n}\n"]}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { AppLayoutInternals } from '../interfaces';
3
+ interface AppLayoutToolbarImplementationProps {
4
+ appLayoutInternals: AppLayoutInternals;
5
+ }
6
+ export declare function AppLayoutToolbarImplementation({ appLayoutInternals }: AppLayoutToolbarImplementationProps): JSX.Element;
7
+ export declare const createWidgetizedAppLayoutToolbar: (Loader?: typeof AppLayoutToolbarImplementation | undefined) => typeof AppLayoutToolbarImplementation;
8
+ export {};
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/index.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,UAAU,mCAAmC;IAC3C,kBAAkB,EAAE,kBAAkB,CAAC;CACxC;AAED,wBAAgB,8BAA8B,CAAC,EAAE,kBAAkB,EAAE,EAAE,mCAAmC,eAqFzG;AAED,eAAO,MAAM,gCAAgC,uGAA4D,CAAC"}