@cloudscape-design/components-themeable 3.0.984 → 3.0.985

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 (72) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/app-layout/test-classes/styles.scss +2 -1
  3. package/lib/internal/scss/app-layout/visual-refresh-toolbar/drawer/styles.scss +147 -1
  4. package/lib/internal/scss/app-layout/visual-refresh-toolbar/skeleton/styles.scss +21 -0
  5. package/lib/internal/scss/drawer/styles.scss +22 -6
  6. package/lib/internal/scss/internal/components/chart-popover/test-classes/styles.scss +1 -1
  7. package/lib/internal/scss/internal/components/panel-resize-handle/styles.scss +2 -1
  8. package/lib/internal/template/app-layout/test-classes/styles.css.js +24 -23
  9. package/lib/internal/template/app-layout/test-classes/styles.scoped.css +24 -23
  10. package/lib/internal/template/app-layout/test-classes/styles.selectors.js +24 -23
  11. package/lib/internal/template/app-layout/utils/use-drawers.d.ts +2 -0
  12. package/lib/internal/template/app-layout/utils/use-drawers.d.ts.map +1 -1
  13. package/lib/internal/template/app-layout/utils/use-drawers.js +6 -0
  14. package/lib/internal/template/app-layout/utils/use-drawers.js.map +1 -1
  15. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts.map +1 -1
  16. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +27 -15
  17. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
  18. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawers.js +2 -2
  19. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawers.js.map +1 -1
  20. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +17 -10
  21. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +145 -11
  22. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +17 -10
  23. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
  24. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js +10 -2
  25. package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js.map +1 -1
  26. package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts +6 -0
  27. package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
  28. package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
  29. package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.d.ts +2 -0
  30. package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.d.ts.map +1 -1
  31. package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.js +4 -0
  32. package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.js.map +1 -1
  33. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.d.ts +2 -0
  34. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.d.ts.map +1 -1
  35. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.js +6 -5
  36. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.js.map +1 -1
  37. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +21 -19
  38. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +45 -35
  39. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +21 -19
  40. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts +3 -1
  41. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -1
  42. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +33 -6
  43. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
  44. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts +2 -0
  45. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
  46. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js +12 -3
  47. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  48. package/lib/internal/template/drawer/implementation.d.ts.map +1 -1
  49. package/lib/internal/template/drawer/implementation.js +4 -1
  50. package/lib/internal/template/drawer/implementation.js.map +1 -1
  51. package/lib/internal/template/drawer/styles.css.js +8 -6
  52. package/lib/internal/template/drawer/styles.scoped.css +32 -17
  53. package/lib/internal/template/drawer/styles.selectors.js +8 -6
  54. package/lib/internal/template/icon/generated/icons.js +1 -1
  55. package/lib/internal/template/icon/generated/icons.js.map +1 -1
  56. package/lib/internal/template/internal/base-component/styles.scoped.css +11 -0
  57. package/lib/internal/template/internal/components/drag-handle/resize-icon.d.ts.map +1 -1
  58. package/lib/internal/template/internal/components/drag-handle/resize-icon.js +1 -2
  59. package/lib/internal/template/internal/components/drag-handle/resize-icon.js.map +1 -1
  60. package/lib/internal/template/internal/components/panel-resize-handle/styles.css.js +2 -2
  61. package/lib/internal/template/internal/components/panel-resize-handle/styles.scoped.css +8 -7
  62. package/lib/internal/template/internal/components/panel-resize-handle/styles.selectors.js +2 -2
  63. package/lib/internal/template/internal/environment.js +1 -1
  64. package/lib/internal/template/internal/environment.json +1 -1
  65. package/lib/internal/template/internal/generated/styles/tokens.d.ts +1 -0
  66. package/lib/internal/template/internal/generated/styles/tokens.js +1 -0
  67. package/lib/internal/template/internal/generated/theming/index.cjs +31 -0
  68. package/lib/internal/template/internal/generated/theming/index.js +31 -0
  69. package/lib/internal/template/internal/plugins/controllers/drawers.d.ts +2 -0
  70. package/lib/internal/template/internal/plugins/controllers/drawers.d.ts.map +1 -1
  71. package/lib/internal/template/internal/plugins/controllers/drawers.js.map +1 -1
  72. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"use-drawers.js","sourceRoot":"","sources":["../../../../src/app-layout/utils/use-drawers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, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\n\nimport { fireNonCancelableEvent } from '../../internal/events';\nimport { useControllable } from '../../internal/hooks/use-controllable';\nimport { awsuiPluginsInternal } from '../../internal/plugins/api';\nimport { DrawersToggledListener } from '../../internal/plugins/controllers/drawers';\nimport { sortByPriority } from '../../internal/plugins/helpers/utils';\nimport { AppLayoutProps } from '../interfaces';\nimport { convertRuntimeDrawers, DrawersLayout } from '../runtime-drawer';\nimport { togglesConfig } from '../toggles';\n\nexport const TOOLS_DRAWER_ID = 'awsui-internal-tools';\n\ninterface ToolsProps {\n toolsHide: boolean | undefined;\n toolsOpen: boolean | undefined;\n toolsWidth: number;\n tools: React.ReactNode | undefined;\n onToolsToggle: (newOpen: boolean) => void;\n ariaLabels: AppLayoutProps.Labels | undefined;\n disableDrawersMerge?: boolean;\n}\n\nexport interface OnChangeParams {\n initiatedByUserAction: boolean;\n}\n\nfunction getToolsDrawerItem(props: ToolsProps): AppLayoutProps.Drawer | null {\n if (props.toolsHide) {\n return null;\n }\n const { iconName, getLabels } = togglesConfig.tools;\n const { mainLabel, closeLabel, openLabel } = getLabels(props.ariaLabels);\n return {\n id: TOOLS_DRAWER_ID,\n content: props.tools,\n resizable: false,\n ariaLabels: {\n triggerButton: openLabel,\n closeButton: closeLabel,\n drawerName: mainLabel ?? '',\n },\n trigger: {\n iconName: iconName,\n },\n };\n}\n\nconst DRAWERS_LIMIT = 2;\n\nconst DEFAULT_ON_CHANGE_PARAMS = { initiatedByUserAction: true };\n\nfunction useRuntimeDrawers(\n disableRuntimeDrawers: boolean | undefined,\n activeDrawerId: string | null,\n onActiveDrawerChange: (newDrawerId: string | null, { initiatedByUserAction }: OnChangeParams) => void,\n activeGlobalDrawersIds: Array<string>,\n onActiveGlobalDrawersChange: (newDrawerId: string, { initiatedByUserAction }: OnChangeParams) => void\n) {\n const [runtimeDrawers, setRuntimeDrawers] = useState<DrawersLayout>({\n localBefore: [],\n localAfter: [],\n global: [],\n });\n const onLocalDrawerChangeStable = useStableCallback(onActiveDrawerChange);\n const onGlobalDrawersChangeStable = useStableCallback(onActiveGlobalDrawersChange);\n\n const localDrawerWasOpenRef = useRef(false);\n localDrawerWasOpenRef.current = localDrawerWasOpenRef.current || !!activeDrawerId;\n const activeGlobalDrawersIdsRef = useRef<Array<string>>([]);\n activeGlobalDrawersIdsRef.current = activeGlobalDrawersIds;\n\n useEffect(() => {\n if (disableRuntimeDrawers) {\n return;\n }\n const unsubscribe = awsuiPluginsInternal.appLayout.onDrawersRegistered(drawers => {\n const localDrawers = drawers.filter(drawer => drawer.type !== 'global');\n const globalDrawers = drawers.filter(drawer => drawer.type === 'global');\n setRuntimeDrawers(convertRuntimeDrawers(localDrawers, globalDrawers));\n if (!localDrawerWasOpenRef.current) {\n const defaultActiveLocalDrawer = sortByPriority(localDrawers).find(drawer => drawer.defaultActive);\n if (defaultActiveLocalDrawer) {\n onLocalDrawerChangeStable(defaultActiveLocalDrawer.id, { initiatedByUserAction: false });\n }\n }\n\n const drawersNotActiveByDefault = globalDrawers.filter(drawer => !drawer.defaultActive);\n const hasDrawersOpenByUserAction = drawersNotActiveByDefault.find(drawer =>\n activeGlobalDrawersIdsRef.current.includes(drawer.id)\n );\n if (hasDrawersOpenByUserAction || activeGlobalDrawersIdsRef.current.length === DRAWERS_LIMIT) {\n return;\n }\n\n const defaultActiveGlobalDrawers = sortByPriority(globalDrawers).filter(\n drawer => !activeGlobalDrawersIdsRef.current.includes(drawer.id) && drawer.defaultActive\n );\n defaultActiveGlobalDrawers.forEach(drawer => {\n onGlobalDrawersChangeStable(drawer.id, { initiatedByUserAction: false });\n });\n });\n return () => {\n unsubscribe();\n setRuntimeDrawers({ localBefore: [], localAfter: [], global: [] });\n };\n }, [disableRuntimeDrawers, onGlobalDrawersChangeStable, onLocalDrawerChangeStable]);\n\n return runtimeDrawers;\n}\n\nfunction useDrawerRuntimeOpenClose(\n disableRuntimeDrawers: boolean | undefined,\n localDrawers: AppLayoutProps.Drawer[] | null,\n globalDrawers: AppLayoutProps.Drawer[],\n activeDrawerId: string | null,\n onActiveDrawerChange: (newDrawerId: string | null, { initiatedByUserAction }: OnChangeParams) => void,\n activeGlobalDrawersIds: Array<string>,\n onActiveGlobalDrawersChange: (newDrawerId: string, { initiatedByUserAction }: OnChangeParams) => void\n) {\n const onDrawerOpened: DrawersToggledListener = useStableCallback((drawerId, params = DEFAULT_ON_CHANGE_PARAMS) => {\n const localDrawer = localDrawers?.find(drawer => drawer.id === drawerId);\n const globalDrawer = globalDrawers.find(drawer => drawer.id === drawerId);\n if (localDrawer && activeDrawerId !== drawerId) {\n onActiveDrawerChange(drawerId, params);\n }\n if (globalDrawer && !activeGlobalDrawersIds.includes(drawerId)) {\n onActiveGlobalDrawersChange(drawerId, params);\n }\n });\n\n const onDrawerClosed: DrawersToggledListener = useStableCallback((drawerId, params = DEFAULT_ON_CHANGE_PARAMS) => {\n const localDrawer = localDrawers?.find(drawer => drawer.id === drawerId);\n const globalDrawer = globalDrawers.find(drawer => drawer.id === drawerId);\n if (localDrawer && activeDrawerId === drawerId) {\n onActiveDrawerChange(null, params);\n }\n if (globalDrawer && activeGlobalDrawersIds.includes(drawerId)) {\n onActiveGlobalDrawersChange(drawerId, params);\n }\n });\n\n useEffect(() => {\n if (disableRuntimeDrawers) {\n return;\n }\n return awsuiPluginsInternal.appLayout.onDrawerOpened(onDrawerOpened);\n }, [disableRuntimeDrawers, onDrawerOpened]);\n\n useEffect(() => {\n if (disableRuntimeDrawers) {\n return;\n }\n return awsuiPluginsInternal.appLayout.onDrawerClosed(onDrawerClosed);\n }, [disableRuntimeDrawers, onDrawerClosed]);\n}\n\nfunction applyToolsDrawer(toolsProps: ToolsProps, runtimeDrawers: DrawersLayout) {\n const drawers = [...runtimeDrawers.localBefore, ...runtimeDrawers.localAfter];\n if (drawers.length === 0 && toolsProps.disableDrawersMerge) {\n return null;\n }\n const toolsItem = getToolsDrawerItem(toolsProps);\n if (toolsItem) {\n drawers.unshift(toolsItem);\n }\n\n return drawers;\n}\n\nexport const MIN_DRAWER_SIZE = 290;\n\ntype UseDrawersProps = Pick<AppLayoutProps, 'drawers' | 'activeDrawerId' | 'onDrawerChange'> & {\n __disableRuntimeDrawers?: boolean;\n onGlobalDrawerFocus?: (drawerId: string, open: boolean) => void;\n onAddNewActiveDrawer?: (drawerId: string) => void;\n};\n\nexport function useDrawers(\n {\n drawers,\n activeDrawerId: controlledActiveDrawerId,\n onDrawerChange,\n onGlobalDrawerFocus,\n onAddNewActiveDrawer,\n __disableRuntimeDrawers: disableRuntimeDrawers,\n }: UseDrawersProps,\n ariaLabels: AppLayoutProps['ariaLabels'],\n toolsProps: ToolsProps\n) {\n const [activeDrawerId = null, setActiveDrawerId] = useControllable(controlledActiveDrawerId, onDrawerChange, null, {\n componentName: 'AppLayout',\n controlledProp: 'activeDrawerId',\n changeHandler: 'onChange',\n });\n const [activeGlobalDrawersIds, setActiveGlobalDrawersIds] = useState<Array<string>>([]);\n const [drawerSizes, setDrawerSizes] = useState<Record<string, number>>({});\n // FIFO queue that keeps track of open drawers, where the first element is the most recently opened drawer\n const drawersOpenQueue = useRef<Array<string>>([]);\n\n function onActiveDrawerResize({ id, size }: { id: string; size: number }) {\n setDrawerSizes(oldSizes => ({ ...oldSizes, [id]: size }));\n fireNonCancelableEvent(activeDrawer?.onResize, { id, size });\n const activeGlobalDrawer = runtimeGlobalDrawers.find(drawer => drawer.id === id);\n fireNonCancelableEvent(activeGlobalDrawer?.onResize, { id, size });\n }\n\n function onActiveDrawerChange(\n newDrawerId: string | null,\n { initiatedByUserAction }: OnChangeParams = DEFAULT_ON_CHANGE_PARAMS\n ) {\n setActiveDrawerId(newDrawerId);\n if (newDrawerId) {\n onAddNewActiveDrawer?.(newDrawerId);\n }\n if (hasOwnDrawers) {\n fireNonCancelableEvent(onDrawerChange, { activeDrawerId: newDrawerId });\n } else if (!toolsProps.toolsHide) {\n toolsProps.onToolsToggle(newDrawerId === TOOLS_DRAWER_ID);\n }\n\n if (newDrawerId) {\n drawersOpenQueue.current = [newDrawerId, ...drawersOpenQueue.current];\n const newDrawer = [...runtimeDrawers.localBefore, ...runtimeDrawers.localAfter]?.find(\n drawer => drawer.id === newDrawerId\n );\n fireNonCancelableEvent(newDrawer?.onToggle, { isOpen: true, initiatedByUserAction });\n }\n\n if (activeDrawerId) {\n drawersOpenQueue.current = drawersOpenQueue.current.filter(id => id !== activeDrawerId);\n const activeDrawer = [...runtimeDrawers.localBefore, ...runtimeDrawers.localAfter]?.find(\n drawer => drawer.id === activeDrawerId\n );\n fireNonCancelableEvent(activeDrawer?.onToggle, { isOpen: false, initiatedByUserAction });\n }\n }\n\n function onActiveGlobalDrawersChange(\n drawerId: string,\n { initiatedByUserAction }: Partial<OnChangeParams> = DEFAULT_ON_CHANGE_PARAMS\n ) {\n const drawer = runtimeGlobalDrawers.find(drawer => drawer.id === drawerId);\n if (activeGlobalDrawersIds.includes(drawerId)) {\n setActiveGlobalDrawersIds(currentState => currentState.filter(id => id !== drawerId));\n onGlobalDrawerFocus?.(drawerId, false);\n drawersOpenQueue.current = drawersOpenQueue.current.filter(id => id !== drawerId);\n fireNonCancelableEvent(drawer?.onToggle, { isOpen: false, initiatedByUserAction });\n } else if (drawerId) {\n onAddNewActiveDrawer?.(drawerId);\n setActiveGlobalDrawersIds(currentState => [drawerId, ...currentState].slice(0, DRAWERS_LIMIT!));\n onGlobalDrawerFocus?.(drawerId, true);\n drawersOpenQueue.current = [drawerId, ...drawersOpenQueue.current];\n fireNonCancelableEvent(drawer?.onToggle, { isOpen: true, initiatedByUserAction });\n }\n }\n\n const hasOwnDrawers = !!drawers;\n // support toolsOpen in runtime-drawers-only mode\n let activeDrawerIdResolved =\n toolsProps?.toolsOpen && !hasOwnDrawers\n ? TOOLS_DRAWER_ID\n : activeDrawerId !== TOOLS_DRAWER_ID\n ? activeDrawerId\n : null;\n const runtimeDrawers = useRuntimeDrawers(\n disableRuntimeDrawers,\n activeDrawerIdResolved,\n onActiveDrawerChange,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange\n );\n const { localBefore, localAfter, global: runtimeGlobalDrawers } = runtimeDrawers;\n const combinedLocalDrawers = drawers\n ? [...localBefore, ...drawers, ...localAfter]\n : applyToolsDrawer(toolsProps, runtimeDrawers);\n const activeDrawer = combinedLocalDrawers?.find(drawer => drawer.id === activeDrawerIdResolved);\n // ensure that id is only defined when the drawer exists\n activeDrawerIdResolved = activeDrawer?.id ?? null;\n const activeGlobalDrawers = runtimeGlobalDrawers.filter(drawer => activeGlobalDrawersIds.includes(drawer.id));\n\n useDrawerRuntimeOpenClose(\n disableRuntimeDrawers,\n combinedLocalDrawers,\n runtimeGlobalDrawers,\n activeDrawerId,\n onActiveDrawerChange,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange\n );\n\n const activeDrawerSize = activeDrawerIdResolved\n ? drawerSizes[activeDrawerIdResolved] ?? activeDrawer?.defaultSize ?? toolsProps.toolsWidth\n : toolsProps.toolsWidth;\n const activeGlobalDrawersSizes: Record<string, number> = activeGlobalDrawersIds.reduce(\n (acc, currentGlobalDrawerId) => {\n const currentGlobalDrawer = runtimeGlobalDrawers.find(drawer => drawer.id === currentGlobalDrawerId);\n return {\n ...acc,\n [currentGlobalDrawerId]:\n drawerSizes[currentGlobalDrawerId] ?? currentGlobalDrawer?.defaultSize ?? MIN_DRAWER_SIZE,\n };\n },\n {}\n );\n const minGlobalDrawersSizes: Record<string, number> = runtimeGlobalDrawers.reduce((acc, globalDrawer) => {\n return {\n ...acc,\n [globalDrawer.id]: Math.min(globalDrawer.defaultSize ?? MIN_DRAWER_SIZE, MIN_DRAWER_SIZE),\n };\n }, {});\n const minDrawerSize = Math.min(\n toolsProps?.toolsOpen ? toolsProps.toolsWidth : activeDrawer?.defaultSize ?? MIN_DRAWER_SIZE,\n MIN_DRAWER_SIZE\n );\n\n return {\n ariaLabelsWithDrawers: ariaLabels,\n drawers: combinedLocalDrawers || undefined,\n activeDrawer,\n activeDrawerId: activeDrawerIdResolved,\n globalDrawers: runtimeGlobalDrawers,\n activeGlobalDrawers: activeGlobalDrawers,\n activeGlobalDrawersIds,\n activeGlobalDrawersSizes,\n activeDrawerSize,\n minDrawerSize,\n minGlobalDrawersSizes,\n drawerSizes,\n drawersOpenQueue: drawersOpenQueue.current,\n onActiveDrawerChange,\n onActiveDrawerResize,\n onActiveGlobalDrawersChange,\n };\n}\n"]}
1
+ {"version":3,"file":"use-drawers.js","sourceRoot":"","sources":["../../../../src/app-layout/utils/use-drawers.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,OAAO,EAAE,qBAAqB,EAAiB,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,CAAC,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAgBtD,SAAS,kBAAkB,CAAC,KAAiB;IAC3C,IAAI,KAAK,CAAC,SAAS,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;IACD,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC;IACpD,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACzE,OAAO;QACL,EA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AU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,EAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,mCAAI,eAAe,EAC5F,eAAe,CAChB,CAAC;IAEF,OAAO;QACL,qBAAqB,EAAE,UAAU;QACjC,OAAO,EAAE,oBAAoB,IAAI,SAAS;QAC1C,YAAY;QACZ,cAAc,EAAE,sBAAsB;QACtC,aAAa,EAAE,oBAAoB;QACnC,mBAAmB,EAAE,mBAAmB;QACxC,sBAAsB;QACtB,wBAAwB;QACxB,gBAAgB;QAChB,aAAa;QACb,qBAAqB;QACrB,WAAW;QACX,gBAAgB,EAAE,gBAAgB,CAAC,OAAO;QAC1C,oBAAoB;QACpB,oBAAoB;QACpB,2BAA2B;QAC3B,gBAAgB;QAChB,mBAAmB;KACpB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\n\nimport { fireNonCancelableEvent } from '../../internal/events';\nimport { useControllable } from '../../internal/hooks/use-controllable';\nimport { awsuiPluginsInternal } from '../../internal/plugins/api';\nimport { DrawersToggledListener } from '../../internal/plugins/controllers/drawers';\nimport { sortByPriority } from '../../internal/plugins/helpers/utils';\nimport { AppLayoutProps } from '../interfaces';\nimport { convertRuntimeDrawers, DrawersLayout } from '../runtime-drawer';\nimport { togglesConfig } from '../toggles';\n\nexport const TOOLS_DRAWER_ID = 'awsui-internal-tools';\n\ninterface ToolsProps {\n toolsHide: boolean | undefined;\n toolsOpen: boolean | undefined;\n toolsWidth: number;\n tools: React.ReactNode | undefined;\n onToolsToggle: (newOpen: boolean) => void;\n ariaLabels: AppLayoutProps.Labels | undefined;\n disableDrawersMerge?: boolean;\n}\n\nexport interface OnChangeParams {\n initiatedByUserAction: boolean;\n}\n\nfunction getToolsDrawerItem(props: ToolsProps): AppLayoutProps.Drawer | null {\n if (props.toolsHide) {\n return null;\n }\n const { iconName, getLabels } = togglesConfig.tools;\n const { mainLabel, closeLabel, openLabel } = getLabels(props.ariaLabels);\n return {\n id: TOOLS_DRAWER_ID,\n content: props.tools,\n resizable: false,\n ariaLabels: {\n triggerButton: openLabel,\n closeButton: closeLabel,\n drawerName: mainLabel ?? '',\n },\n trigger: {\n iconName: iconName,\n },\n };\n}\n\nconst DRAWERS_LIMIT = 2;\n\nconst DEFAULT_ON_CHANGE_PARAMS = { initiatedByUserAction: true };\n\nfunction useRuntimeDrawers(\n disableRuntimeDrawers: boolean | undefined,\n activeDrawerId: string | null,\n onActiveDrawerChange: (newDrawerId: string | null, { initiatedByUserAction }: OnChangeParams) => void,\n activeGlobalDrawersIds: Array<string>,\n onActiveGlobalDrawersChange: (newDrawerId: string, { initiatedByUserAction }: OnChangeParams) => void\n) {\n const [runtimeDrawers, setRuntimeDrawers] = useState<DrawersLayout>({\n localBefore: [],\n localAfter: [],\n global: [],\n });\n const onLocalDrawerChangeStable = useStableCallback(onActiveDrawerChange);\n const onGlobalDrawersChangeStable = useStableCallback(onActiveGlobalDrawersChange);\n\n const localDrawerWasOpenRef = useRef(false);\n localDrawerWasOpenRef.current = localDrawerWasOpenRef.current || !!activeDrawerId;\n const activeGlobalDrawersIdsRef = useRef<Array<string>>([]);\n activeGlobalDrawersIdsRef.current = activeGlobalDrawersIds;\n\n useEffect(() => {\n if (disableRuntimeDrawers) {\n return;\n }\n const unsubscribe = awsuiPluginsInternal.appLayout.onDrawersRegistered(drawers => {\n const localDrawers = drawers.filter(drawer => drawer.type !== 'global');\n const globalDrawers = drawers.filter(drawer => drawer.type === 'global');\n setRuntimeDrawers(convertRuntimeDrawers(localDrawers, globalDrawers));\n if (!localDrawerWasOpenRef.current) {\n const defaultActiveLocalDrawer = sortByPriority(localDrawers).find(drawer => drawer.defaultActive);\n if (defaultActiveLocalDrawer) {\n onLocalDrawerChangeStable(defaultActiveLocalDrawer.id, { initiatedByUserAction: false });\n }\n }\n\n const drawersNotActiveByDefault = globalDrawers.filter(drawer => !drawer.defaultActive);\n const hasDrawersOpenByUserAction = drawersNotActiveByDefault.find(drawer =>\n activeGlobalDrawersIdsRef.current.includes(drawer.id)\n );\n if (hasDrawersOpenByUserAction || activeGlobalDrawersIdsRef.current.length === DRAWERS_LIMIT) {\n return;\n }\n\n const defaultActiveGlobalDrawers = sortByPriority(globalDrawers).filter(\n drawer => !activeGlobalDrawersIdsRef.current.includes(drawer.id) && drawer.defaultActive\n );\n defaultActiveGlobalDrawers.forEach(drawer => {\n onGlobalDrawersChangeStable(drawer.id, { initiatedByUserAction: false });\n });\n });\n return () => {\n unsubscribe();\n setRuntimeDrawers({ localBefore: [], localAfter: [], global: [] });\n };\n }, [disableRuntimeDrawers, onGlobalDrawersChangeStable, onLocalDrawerChangeStable]);\n\n return runtimeDrawers;\n}\n\nfunction useDrawerRuntimeOpenClose(\n disableRuntimeDrawers: boolean | undefined,\n localDrawers: AppLayoutProps.Drawer[] | null,\n globalDrawers: AppLayoutProps.Drawer[],\n activeDrawerId: string | null,\n onActiveDrawerChange: (newDrawerId: string | null, { initiatedByUserAction }: OnChangeParams) => void,\n activeGlobalDrawersIds: Array<string>,\n onActiveGlobalDrawersChange: (newDrawerId: string, { initiatedByUserAction }: OnChangeParams) => void\n) {\n const onDrawerOpened: DrawersToggledListener = useStableCallback((drawerId, params = DEFAULT_ON_CHANGE_PARAMS) => {\n const localDrawer = localDrawers?.find(drawer => drawer.id === drawerId);\n const globalDrawer = globalDrawers.find(drawer => drawer.id === drawerId);\n if (localDrawer && activeDrawerId !== drawerId) {\n onActiveDrawerChange(drawerId, params);\n }\n if (globalDrawer && !activeGlobalDrawersIds.includes(drawerId)) {\n onActiveGlobalDrawersChange(drawerId, params);\n }\n });\n\n const onDrawerClosed: DrawersToggledListener = useStableCallback((drawerId, params = DEFAULT_ON_CHANGE_PARAMS) => {\n const localDrawer = localDrawers?.find(drawer => drawer.id === drawerId);\n const globalDrawer = globalDrawers.find(drawer => drawer.id === drawerId);\n if (localDrawer && activeDrawerId === drawerId) {\n onActiveDrawerChange(null, params);\n }\n if (globalDrawer && activeGlobalDrawersIds.includes(drawerId)) {\n onActiveGlobalDrawersChange(drawerId, params);\n }\n });\n\n useEffect(() => {\n if (disableRuntimeDrawers) {\n return;\n }\n return awsuiPluginsInternal.appLayout.onDrawerOpened(onDrawerOpened);\n }, [disableRuntimeDrawers, onDrawerOpened]);\n\n useEffect(() => {\n if (disableRuntimeDrawers) {\n return;\n }\n return awsuiPluginsInternal.appLayout.onDrawerClosed(onDrawerClosed);\n }, [disableRuntimeDrawers, onDrawerClosed]);\n}\n\nfunction applyToolsDrawer(toolsProps: ToolsProps, runtimeDrawers: DrawersLayout) {\n const drawers = [...runtimeDrawers.localBefore, ...runtimeDrawers.localAfter];\n if (drawers.length === 0 && toolsProps.disableDrawersMerge) {\n return null;\n }\n const toolsItem = getToolsDrawerItem(toolsProps);\n if (toolsItem) {\n drawers.unshift(toolsItem);\n }\n\n return drawers;\n}\n\nexport const MIN_DRAWER_SIZE = 290;\n\ntype UseDrawersProps = Pick<AppLayoutProps, 'drawers' | 'activeDrawerId' | 'onDrawerChange'> & {\n __disableRuntimeDrawers?: boolean;\n onGlobalDrawerFocus?: (drawerId: string, open: boolean) => void;\n onAddNewActiveDrawer?: (drawerId: string) => void;\n};\n\nexport function useDrawers(\n {\n drawers,\n activeDrawerId: controlledActiveDrawerId,\n onDrawerChange,\n onGlobalDrawerFocus,\n onAddNewActiveDrawer,\n __disableRuntimeDrawers: disableRuntimeDrawers,\n }: UseDrawersProps,\n ariaLabels: AppLayoutProps['ariaLabels'],\n toolsProps: ToolsProps\n) {\n const [activeDrawerId = null, setActiveDrawerId] = useControllable(controlledActiveDrawerId, onDrawerChange, null, {\n componentName: 'AppLayout',\n controlledProp: 'activeDrawerId',\n changeHandler: 'onChange',\n });\n const [activeGlobalDrawersIds, setActiveGlobalDrawersIds] = useState<Array<string>>([]);\n const [drawerSizes, setDrawerSizes] = useState<Record<string, number>>({});\n const [expandedDrawerId, setExpandedDrawerId] = useState<string | null>(null);\n // FIFO queue that keeps track of open drawers, where the first element is the most recently opened drawer\n const drawersOpenQueue = useRef<Array<string>>([]);\n\n function onActiveDrawerResize({ id, size }: { id: string; size: number }) {\n setDrawerSizes(oldSizes => ({ ...oldSizes, [id]: size }));\n fireNonCancelableEvent(activeDrawer?.onResize, { id, size });\n const activeGlobalDrawer = runtimeGlobalDrawers.find(drawer => drawer.id === id);\n fireNonCancelableEvent(activeGlobalDrawer?.onResize, { id, size });\n }\n\n function onActiveDrawerChange(\n newDrawerId: string | null,\n { initiatedByUserAction }: OnChangeParams = DEFAULT_ON_CHANGE_PARAMS\n ) {\n setActiveDrawerId(newDrawerId);\n if (newDrawerId) {\n onAddNewActiveDrawer?.(newDrawerId);\n }\n if (hasOwnDrawers) {\n fireNonCancelableEvent(onDrawerChange, { activeDrawerId: newDrawerId });\n } else if (!toolsProps.toolsHide) {\n toolsProps.onToolsToggle(newDrawerId === TOOLS_DRAWER_ID);\n }\n\n if (newDrawerId) {\n drawersOpenQueue.current = [newDrawerId, ...drawersOpenQueue.current];\n const newDrawer = [...runtimeDrawers.localBefore, ...runtimeDrawers.localAfter]?.find(\n drawer => drawer.id === newDrawerId\n );\n fireNonCancelableEvent(newDrawer?.onToggle, { isOpen: true, initiatedByUserAction });\n }\n\n if (activeDrawerId) {\n drawersOpenQueue.current = drawersOpenQueue.current.filter(id => id !== activeDrawerId);\n const activeDrawer = [...runtimeDrawers.localBefore, ...runtimeDrawers.localAfter]?.find(\n drawer => drawer.id === activeDrawerId\n );\n fireNonCancelableEvent(activeDrawer?.onToggle, { isOpen: false, initiatedByUserAction });\n }\n }\n\n function onActiveGlobalDrawersChange(\n drawerId: string,\n { initiatedByUserAction }: Partial<OnChangeParams> = DEFAULT_ON_CHANGE_PARAMS\n ) {\n const drawer = runtimeGlobalDrawers.find(drawer => drawer.id === drawerId);\n if (activeGlobalDrawersIds.includes(drawerId)) {\n setActiveGlobalDrawersIds(currentState => currentState.filter(id => id !== drawerId));\n onGlobalDrawerFocus?.(drawerId, false);\n drawersOpenQueue.current = drawersOpenQueue.current.filter(id => id !== drawerId);\n fireNonCancelableEvent(drawer?.onToggle, { isOpen: false, initiatedByUserAction });\n if (drawerId === expandedDrawerId) {\n setExpandedDrawerId(null);\n }\n } else if (drawerId) {\n onAddNewActiveDrawer?.(drawerId);\n setActiveGlobalDrawersIds(currentState => [drawerId, ...currentState].slice(0, DRAWERS_LIMIT!));\n onGlobalDrawerFocus?.(drawerId, true);\n drawersOpenQueue.current = [drawerId, ...drawersOpenQueue.current];\n fireNonCancelableEvent(drawer?.onToggle, { isOpen: true, initiatedByUserAction });\n }\n }\n\n const hasOwnDrawers = !!drawers;\n // support toolsOpen in runtime-drawers-only mode\n let activeDrawerIdResolved =\n toolsProps?.toolsOpen && !hasOwnDrawers\n ? TOOLS_DRAWER_ID\n : activeDrawerId !== TOOLS_DRAWER_ID\n ? activeDrawerId\n : null;\n const runtimeDrawers = useRuntimeDrawers(\n disableRuntimeDrawers,\n activeDrawerIdResolved,\n onActiveDrawerChange,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange\n );\n const { localBefore, localAfter, global: runtimeGlobalDrawers } = runtimeDrawers;\n const combinedLocalDrawers = drawers\n ? [...localBefore, ...drawers, ...localAfter]\n : applyToolsDrawer(toolsProps, runtimeDrawers);\n const activeDrawer = combinedLocalDrawers?.find(drawer => drawer.id === activeDrawerIdResolved);\n // ensure that id is only defined when the drawer exists\n activeDrawerIdResolved = activeDrawer?.id ?? null;\n const activeGlobalDrawers = runtimeGlobalDrawers.filter(drawer => activeGlobalDrawersIds.includes(drawer.id));\n\n useDrawerRuntimeOpenClose(\n disableRuntimeDrawers,\n combinedLocalDrawers,\n runtimeGlobalDrawers,\n activeDrawerId,\n onActiveDrawerChange,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange\n );\n\n const activeDrawerSize = activeDrawerIdResolved\n ? drawerSizes[activeDrawerIdResolved] ?? activeDrawer?.defaultSize ?? toolsProps.toolsWidth\n : toolsProps.toolsWidth;\n const activeGlobalDrawersSizes: Record<string, number> = activeGlobalDrawersIds.reduce(\n (acc, currentGlobalDrawerId) => {\n const currentGlobalDrawer = runtimeGlobalDrawers.find(drawer => drawer.id === currentGlobalDrawerId);\n return {\n ...acc,\n [currentGlobalDrawerId]:\n drawerSizes[currentGlobalDrawerId] ?? currentGlobalDrawer?.defaultSize ?? MIN_DRAWER_SIZE,\n };\n },\n {}\n );\n const minGlobalDrawersSizes: Record<string, number> = runtimeGlobalDrawers.reduce((acc, globalDrawer) => {\n return {\n ...acc,\n [globalDrawer.id]: Math.min(globalDrawer.defaultSize ?? MIN_DRAWER_SIZE, MIN_DRAWER_SIZE),\n };\n }, {});\n const minDrawerSize = Math.min(\n toolsProps?.toolsOpen ? toolsProps.toolsWidth : activeDrawer?.defaultSize ?? MIN_DRAWER_SIZE,\n MIN_DRAWER_SIZE\n );\n\n return {\n ariaLabelsWithDrawers: ariaLabels,\n drawers: combinedLocalDrawers || undefined,\n activeDrawer,\n activeDrawerId: activeDrawerIdResolved,\n globalDrawers: runtimeGlobalDrawers,\n activeGlobalDrawers: activeGlobalDrawers,\n activeGlobalDrawersIds,\n activeGlobalDrawersSizes,\n activeDrawerSize,\n minDrawerSize,\n minGlobalDrawersSizes,\n drawerSizes,\n drawersOpenQueue: drawersOpenQueue.current,\n onActiveDrawerChange,\n onActiveDrawerResize,\n onActiveGlobalDrawersChange,\n expandedDrawerId,\n setExpandedDrawerId,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"global-drawer.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/global-drawer.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAOnE,UAAU,wCAAwC;IAChD,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,cAAc,GAAG,SAAS,CAAC;CAChD;AAED,iBAAS,mCAAmC,CAAC,EAC3C,kBAAkB,EAClB,IAAI,EACJ,kBAAkB,GACnB,EAAE,wCAAwC,eA6H1C;AAED,eAAe,mCAAmC,CAAC"}
1
+ {"version":3,"file":"global-drawer.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/global-drawer.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAOnE,UAAU,wCAAwC;IAChD,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,cAAc,GAAG,SAAS,CAAC;CAChD;AAED,iBAAS,mCAAmC,CAAC,EAC3C,kBAAkB,EAClB,IAAI,EACJ,kBAAkB,GACnB,EAAE,wCAAwC,eA6J1C;AAED,eAAe,mCAAmC,CAAC"}
@@ -6,6 +6,7 @@ import clsx from 'clsx';
6
6
  import { InternalButton } from '../../../button/internal';
7
7
  import PanelResizeHandle from '../../../internal/components/panel-resize-handle';
8
8
  import customCssProps from '../../../internal/generated/custom-css-properties';
9
+ import { usePrevious } from '../../../internal/hooks/use-previous';
9
10
  import { getLimitedValue } from '../../../split-panel/utils/size-utils';
10
11
  import { getDrawerStyles } from '../compute-layout';
11
12
  import { useResize } from './use-resize';
@@ -14,7 +15,7 @@ import testutilStyles from '../../test-classes/styles.css.js';
14
15
  import styles from './styles.css.js';
15
16
  function AppLayoutGlobalDrawerImplementation({ appLayoutInternals, show, activeGlobalDrawer, }) {
16
17
  var _a, _b, _c, _d, _e, _f;
17
- const { ariaLabels, globalDrawersFocusControl, isMobile, placement, onActiveGlobalDrawersChange, onActiveDrawerResize, minGlobalDrawersSizes, maxGlobalDrawersSizes, activeGlobalDrawersSizes, verticalOffsets, drawersOpenQueue, } = appLayoutInternals;
18
+ const { ariaLabels, globalDrawersFocusControl, isMobile, placement, onActiveGlobalDrawersChange, onActiveDrawerResize, minGlobalDrawersSizes, maxGlobalDrawersSizes, activeGlobalDrawersSizes, activeGlobalDrawers, verticalOffsets, drawersOpenQueue, expandedDrawerId, setExpandedDrawerId, } = appLayoutInternals;
18
19
  const drawerRef = useRef(null);
19
20
  const activeDrawerId = (_a = activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.id) !== null && _a !== void 0 ? _a : '';
20
21
  const computedAriaLabels = {
@@ -37,13 +38,19 @@ function AppLayoutGlobalDrawerImplementation({ appLayoutInternals, show, activeG
37
38
  const size = getLimitedValue(minDrawerSize, activeDrawerSize, maxDrawerSize);
38
39
  const lastOpenedDrawerId = drawersOpenQueue.length ? drawersOpenQueue[0] : null;
39
40
  const hasTriggerButton = !!(activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.trigger);
40
- const animationDisabled = (activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.defaultActive) && !drawersOpenQueue.includes(activeGlobalDrawer.id);
41
- return (React.createElement(Transition, { nodeRef: drawerRef, in: show, appear: show, timeout: 0 }, state => {
42
- var _a, _b;
43
- return (React.createElement("aside", { id: activeDrawerId, "aria-hidden": !show, "aria-label": computedAriaLabels.content, className: clsx(styles.drawer, styles['drawer-global'], styles[state], !animationDisabled && sharedStyles['with-motion-horizontal'], {
41
+ const isExpanded = (activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.isExpandable) && expandedDrawerId === activeDrawerId;
42
+ const wasExpanded = usePrevious(isExpanded);
43
+ const animationDisabled = ((activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.defaultActive) && !drawersOpenQueue.includes(activeGlobalDrawer.id)) ||
44
+ (wasExpanded && !isExpanded);
45
+ return (React.createElement(Transition, { nodeRef: drawerRef, in: show || isExpanded, appear: show || isExpanded, timeout: 0 }, state => {
46
+ var _a, _b, _c;
47
+ return (React.createElement("aside", { id: activeDrawerId, "aria-hidden": !show, "aria-label": computedAriaLabels.content, className: clsx(styles.drawer, styles['drawer-global'], styles[state], !animationDisabled && sharedStyles['with-motion-horizontal'], !animationDisabled && isExpanded && styles['with-expanded-motion'], {
44
48
  [styles['drawer-hidden']]: !show,
45
- [styles['last-opened']]: lastOpenedDrawerId === activeDrawerId,
49
+ [styles['last-opened']]: lastOpenedDrawerId === activeDrawerId || isExpanded,
46
50
  [testutilStyles['active-drawer']]: show,
51
+ [styles['drawer-expanded']]: isExpanded,
52
+ [styles['has-next-siblings']]: activeGlobalDrawers.findIndex(drawer => drawer.id === activeDrawerId) + 1 <
53
+ activeGlobalDrawers.length,
47
54
  }), ref: drawerRef, onBlur: e => {
48
55
  // Drawers with trigger buttons follow this restore focus logic:
49
56
  // If a previously focused element exists, restore focus on it; otherwise, focus on the associated trigger button.
@@ -57,16 +64,21 @@ function AppLayoutGlobalDrawerImplementation({ appLayoutInternals, show, activeG
57
64
  globalDrawersFocusControl.loseFocus();
58
65
  }
59
66
  }, style: Object.assign({ blockSize: drawerHeight, insetBlockStart: drawerTopOffset }, (!isMobile && {
60
- [customCssProps.drawerSize]: `${['entering', 'entered'].includes(state) ? size : 0}px`,
67
+ [customCssProps.drawerSize]: `${['entering', 'entered'].includes(state) ? (isExpanded ? '100%' : size + 'px') : 0}`,
61
68
  })), "data-testid": `awsui-app-layout-drawer-${activeDrawerId}` },
62
- !isMobile && (activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.resizable) && (React.createElement("div", { className: styles['drawer-slider'] },
63
- React.createElement(PanelResizeHandle, { ref: refs === null || refs === void 0 ? void 0 : refs.slider, position: "side", className: testutilStyles['drawers-slider'], ariaLabel: (_a = activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.ariaLabels) === null || _a === void 0 ? void 0 : _a.resizeHandle, tooltipText: (_b = activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.ariaLabels) === null || _b === void 0 ? void 0 : _b.resizeHandleTooltipText, ariaValuenow: resizeProps.relativeSize, onKeyDown: resizeProps.onKeyDown, onDirectionClick: resizeProps.onDirectionClick, onPointerDown: resizeProps.onPointerDown }))),
64
- React.createElement("div", { className: clsx(styles['drawer-content-container'], sharedStyles['with-motion-horizontal']), "data-testid": `awsui-app-layout-drawer-content-${activeDrawerId}` },
65
- React.createElement("div", { className: clsx(styles['drawer-close-button']) },
66
- React.createElement(InternalButton, { ariaLabel: computedAriaLabels.closeButton, className: clsx({
67
- [testutilStyles['active-drawer-close-button']]: activeDrawerId,
68
- }), formAction: "none", iconName: isMobile ? 'close' : 'angle-right', onClick: () => onActiveGlobalDrawersChange(activeDrawerId, { initiatedByUserAction: true }), ref: refs === null || refs === void 0 ? void 0 : refs.close, variant: "icon", analyticsAction: "close" })),
69
- React.createElement("div", { className: styles['drawer-content'], style: { blockSize: drawerHeight } }, activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.content))));
69
+ React.createElement("div", { className: clsx(styles['global-drawer-wrapper']) },
70
+ !isMobile && React.createElement("div", { className: styles['drawer-gap'] }),
71
+ !isMobile && (activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.resizable) && !isExpanded && (React.createElement("div", { className: styles['drawer-slider'] },
72
+ React.createElement(PanelResizeHandle, { ref: refs === null || refs === void 0 ? void 0 : refs.slider, position: "side", className: testutilStyles['drawers-slider'], ariaLabel: (_a = activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.ariaLabels) === null || _a === void 0 ? void 0 : _a.resizeHandle, tooltipText: (_b = activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.ariaLabels) === null || _b === void 0 ? void 0 : _b.resizeHandleTooltipText, ariaValuenow: resizeProps.relativeSize, onKeyDown: resizeProps.onKeyDown, onDirectionClick: resizeProps.onDirectionClick, onPointerDown: resizeProps.onPointerDown }))),
73
+ React.createElement("div", { className: clsx(styles['drawer-content-container'], sharedStyles['with-motion-horizontal']), "data-testid": `awsui-app-layout-drawer-content-${activeDrawerId}` },
74
+ React.createElement("div", { className: styles['drawer-actions'] },
75
+ !isMobile && (activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.isExpandable) && (React.createElement("div", { className: styles['drawer-expanded-mode-button'] },
76
+ React.createElement(InternalButton, { ariaLabel: (_c = activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.ariaLabels) === null || _c === void 0 ? void 0 : _c.expandedModeButton, className: testutilStyles['active-drawer-expanded-mode-button'], formAction: "none", ariaExpanded: isExpanded, iconName: isExpanded ? 'shrink' : 'expand', onClick: () => setExpandedDrawerId(isExpanded ? null : activeDrawerId), variant: "icon", analyticsAction: isExpanded ? 'expand' : 'collapse' }))),
77
+ React.createElement("div", { className: clsx(styles['drawer-close-button']) },
78
+ React.createElement(InternalButton, { ariaLabel: computedAriaLabels.closeButton, className: clsx({
79
+ [testutilStyles['active-drawer-close-button']]: activeDrawerId,
80
+ }), formAction: "none", iconName: isMobile ? 'close' : 'angle-right', onClick: () => onActiveGlobalDrawersChange(activeDrawerId, { initiatedByUserAction: true }), ref: refs === null || refs === void 0 ? void 0 : refs.close, variant: "icon", analyticsAction: "close" }))),
81
+ React.createElement("div", { className: styles['drawer-content'], style: { blockSize: drawerHeight } }, activeGlobalDrawer === null || activeGlobalDrawer === void 0 ? void 0 : activeGlobalDrawer.content)))));
70
82
  }));
71
83
  }
72
84
  export default AppLayoutGlobalDrawerImplementation;
@@ -1 +1 @@
1
- {"version":3,"file":"global-drawer.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/global-drawer.tsx"],"names":[],"m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AC,4BAA4B,CAAC,CAAC,EAAE,cAAc;yBAC/D,CAAC,EACF,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,EAC5C,OAAO,EAAE,GAAG,EAAE,CAAC,2BAA2B,CAAC,cAAc,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,EAC3F,GAAG,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,EAChB,OAAO,EAAC,MAAM,EACd,eAAe,EAAC,OAAO,GACvB,CACE;gBACN,6BAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,IACzE,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,CACxB,CACF,CACA,CACT,CAAC;IACJ,CAAC,CACU,CACd,CAAC;AACJ,CAAC;AAED,eAAe,mCAAmC,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 { Transition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { InternalButton } from '../../../button/internal';\nimport PanelResizeHandle from '../../../internal/components/panel-resize-handle';\nimport customCssProps from '../../../internal/generated/custom-css-properties';\nimport { getLimitedValue } from '../../../split-panel/utils/size-utils';\nimport { getDrawerStyles } from '../compute-layout';\nimport { AppLayoutInternals, InternalDrawer } from '../interfaces';\nimport { useResize } from './use-resize';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\ninterface AppLayoutGlobalDrawerImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n show: boolean;\n activeGlobalDrawer: InternalDrawer | undefined;\n}\n\nfunction AppLayoutGlobalDrawerImplementation({\n appLayoutInternals,\n show,\n activeGlobalDrawer,\n}: AppLayoutGlobalDrawerImplementationProps) {\n const {\n ariaLabels,\n globalDrawersFocusControl,\n isMobile,\n placement,\n onActiveGlobalDrawersChange,\n onActiveDrawerResize,\n minGlobalDrawersSizes,\n maxGlobalDrawersSizes,\n activeGlobalDrawersSizes,\n verticalOffsets,\n drawersOpenQueue,\n } = appLayoutInternals;\n const drawerRef = useRef<HTMLDivElement>(null);\n const activeDrawerId = activeGlobalDrawer?.id ?? '';\n\n const computedAriaLabels = {\n closeButton: activeGlobalDrawer ? activeGlobalDrawer.ariaLabels?.closeButton : ariaLabels?.toolsClose,\n content: activeGlobalDrawer ? activeGlobalDrawer.ariaLabels?.drawerName : ariaLabels?.tools,\n };\n\n const { drawerTopOffset, drawerHeight } = getDrawerStyles(verticalOffsets, isMobile, placement);\n const activeDrawerSize = (activeDrawerId ? activeGlobalDrawersSizes[activeDrawerId] : 0) ?? 0;\n const minDrawerSize = (activeDrawerId ? minGlobalDrawersSizes[activeDrawerId] : 0) ?? 0;\n const maxDrawerSize = (activeDrawerId ? maxGlobalDrawersSizes[activeDrawerId] : 0) ?? 0;\n const refs = globalDrawersFocusControl.refs[activeDrawerId];\n const resizeProps = useResize({\n currentWidth: activeDrawerSize,\n minWidth: minDrawerSize,\n maxWidth: maxDrawerSize,\n panelRef: drawerRef,\n handleRef: refs?.slider,\n onResize: size => onActiveDrawerResize({ id: activeDrawerId!, size }),\n });\n const size = getLimitedValue(minDrawerSize, activeDrawerSize, maxDrawerSize);\n const lastOpenedDrawerId = drawersOpenQueue.length ? drawersOpenQueue[0] : null;\n const hasTriggerButton = !!activeGlobalDrawer?.trigger;\n const animationDisabled = activeGlobalDrawer?.defaultActive && !drawersOpenQueue.includes(activeGlobalDrawer.id);\n\n return (\n <Transition nodeRef={drawerRef} in={show} appear={show} timeout={0}>\n {state => {\n return (\n <aside\n id={activeDrawerId}\n aria-hidden={!show}\n aria-label={computedAriaLabels.content}\n className={clsx(\n styles.drawer,\n styles['drawer-global'],\n styles[state],\n !animationDisabled && sharedStyles['with-motion-horizontal'],\n {\n [styles['drawer-hidden']]: !show,\n [styles['last-opened']]: lastOpenedDrawerId === activeDrawerId,\n [testutilStyles['active-drawer']]: show,\n }\n )}\n ref={drawerRef}\n onBlur={e => {\n // Drawers with trigger buttons follow this restore focus logic:\n // If a previously focused element exists, restore focus on it; otherwise, focus on the associated trigger button.\n // This function resets the previously focused element.\n // If the drawer has no trigger button and loses focus on the previously focused element, it defaults to document.body,\n // which ideally should never happen.\n if (!hasTriggerButton) {\n return;\n }\n\n if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {\n globalDrawersFocusControl.loseFocus();\n }\n }}\n style={{\n blockSize: drawerHeight,\n insetBlockStart: drawerTopOffset,\n ...(!isMobile && {\n [customCssProps.drawerSize]: `${['entering', 'entered'].includes(state) ? size : 0}px`,\n }),\n }}\n data-testid={`awsui-app-layout-drawer-${activeDrawerId}`}\n >\n {!isMobile && activeGlobalDrawer?.resizable && (\n <div className={styles['drawer-slider']}>\n <PanelResizeHandle\n ref={refs?.slider}\n position=\"side\"\n className={testutilStyles['drawers-slider']}\n ariaLabel={activeGlobalDrawer?.ariaLabels?.resizeHandle}\n tooltipText={activeGlobalDrawer?.ariaLabels?.resizeHandleTooltipText}\n ariaValuenow={resizeProps.relativeSize}\n onKeyDown={resizeProps.onKeyDown}\n onDirectionClick={resizeProps.onDirectionClick}\n onPointerDown={resizeProps.onPointerDown}\n />\n </div>\n )}\n <div\n className={clsx(styles['drawer-content-container'], sharedStyles['with-motion-horizontal'])}\n data-testid={`awsui-app-layout-drawer-content-${activeDrawerId}`}\n >\n <div className={clsx(styles['drawer-close-button'])}>\n <InternalButton\n ariaLabel={computedAriaLabels.closeButton}\n className={clsx({\n [testutilStyles['active-drawer-close-button']]: activeDrawerId,\n })}\n formAction=\"none\"\n iconName={isMobile ? 'close' : 'angle-right'}\n onClick={() => onActiveGlobalDrawersChange(activeDrawerId, { initiatedByUserAction: true })}\n ref={refs?.close}\n variant=\"icon\"\n analyticsAction=\"close\"\n />\n </div>\n <div className={styles['drawer-content']} style={{ blockSize: drawerHeight }}>\n {activeGlobalDrawer?.content}\n </div>\n </div>\n </aside>\n );\n }}\n </Transition>\n );\n}\n\nexport default AppLayoutGlobalDrawerImplementation;\n"]}
1
+ {"version":3,"file":"global-drawer.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/global-drawer.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,iBAAiB,MAAM,kDAAkD,CAAC;AACjF,OAAO,cAAc,MAAM,mDAAmD,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAQrC,SAAS,mCAAmC,CAAC,EAC3C,kBAAkB,EAClB,IAAI,EACJ,kBAAkB,GACuB;;IACzC,MAAM,EACJ,UAAU,EACV,yBAAyB,EACzB,QAAQ,EACR,SAAS,EACT,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,GACpB,GAAG,kBAAkB,CAAC;IACvB,MAAM,SAAS,GAAG,MAAM,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,CAAC;AAED,eAAe,mCAAmC,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 { Transition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { InternalButton } from '../../../button/internal';\nimport PanelResizeHandle from '../../../internal/components/panel-resize-handle';\nimport customCssProps from '../../../internal/generated/custom-css-properties';\nimport { usePrevious } from '../../../internal/hooks/use-previous';\nimport { getLimitedValue } from '../../../split-panel/utils/size-utils';\nimport { getDrawerStyles } from '../compute-layout';\nimport { AppLayoutInternals, InternalDrawer } from '../interfaces';\nimport { useResize } from './use-resize';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\ninterface AppLayoutGlobalDrawerImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n show: boolean;\n activeGlobalDrawer: InternalDrawer | undefined;\n}\n\nfunction AppLayoutGlobalDrawerImplementation({\n appLayoutInternals,\n show,\n activeGlobalDrawer,\n}: AppLayoutGlobalDrawerImplementationProps) {\n const {\n ariaLabels,\n globalDrawersFocusControl,\n isMobile,\n placement,\n onActiveGlobalDrawersChange,\n onActiveDrawerResize,\n minGlobalDrawersSizes,\n maxGlobalDrawersSizes,\n activeGlobalDrawersSizes,\n activeGlobalDrawers,\n verticalOffsets,\n drawersOpenQueue,\n expandedDrawerId,\n setExpandedDrawerId,\n } = appLayoutInternals;\n const drawerRef = useRef<HTMLDivElement>(null);\n const activeDrawerId = activeGlobalDrawer?.id ?? '';\n\n const computedAriaLabels = {\n closeButton: activeGlobalDrawer ? activeGlobalDrawer.ariaLabels?.closeButton : ariaLabels?.toolsClose,\n content: activeGlobalDrawer ? activeGlobalDrawer.ariaLabels?.drawerName : ariaLabels?.tools,\n };\n\n const { drawerTopOffset, drawerHeight } = getDrawerStyles(verticalOffsets, isMobile, placement);\n const activeDrawerSize = (activeDrawerId ? activeGlobalDrawersSizes[activeDrawerId] : 0) ?? 0;\n const minDrawerSize = (activeDrawerId ? minGlobalDrawersSizes[activeDrawerId] : 0) ?? 0;\n const maxDrawerSize = (activeDrawerId ? maxGlobalDrawersSizes[activeDrawerId] : 0) ?? 0;\n const refs = globalDrawersFocusControl.refs[activeDrawerId];\n const resizeProps = useResize({\n currentWidth: activeDrawerSize,\n minWidth: minDrawerSize,\n maxWidth: maxDrawerSize,\n panelRef: drawerRef,\n handleRef: refs?.slider,\n onResize: size => onActiveDrawerResize({ id: activeDrawerId!, size }),\n });\n const size = getLimitedValue(minDrawerSize, activeDrawerSize, maxDrawerSize);\n const lastOpenedDrawerId = drawersOpenQueue.length ? drawersOpenQueue[0] : null;\n const hasTriggerButton = !!activeGlobalDrawer?.trigger;\n const isExpanded = activeGlobalDrawer?.isExpandable && expandedDrawerId === activeDrawerId;\n const wasExpanded = usePrevious(isExpanded);\n const animationDisabled =\n (activeGlobalDrawer?.defaultActive && !drawersOpenQueue.includes(activeGlobalDrawer.id)) ||\n (wasExpanded && !isExpanded);\n\n return (\n <Transition nodeRef={drawerRef} in={show || isExpanded} appear={show || isExpanded} timeout={0}>\n {state => {\n return (\n <aside\n id={activeDrawerId}\n aria-hidden={!show}\n aria-label={computedAriaLabels.content}\n className={clsx(\n styles.drawer,\n styles['drawer-global'],\n styles[state],\n !animationDisabled && sharedStyles['with-motion-horizontal'],\n !animationDisabled && isExpanded && styles['with-expanded-motion'],\n {\n [styles['drawer-hidden']]: !show,\n [styles['last-opened']]: lastOpenedDrawerId === activeDrawerId || isExpanded,\n [testutilStyles['active-drawer']]: show,\n [styles['drawer-expanded']]: isExpanded,\n [styles['has-next-siblings']]:\n activeGlobalDrawers.findIndex(drawer => drawer.id === activeDrawerId) + 1 <\n activeGlobalDrawers.length,\n }\n )}\n ref={drawerRef}\n onBlur={e => {\n // Drawers with trigger buttons follow this restore focus logic:\n // If a previously focused element exists, restore focus on it; otherwise, focus on the associated trigger button.\n // This function resets the previously focused element.\n // If the drawer has no trigger button and loses focus on the previously focused element, it defaults to document.body,\n // which ideally should never happen.\n if (!hasTriggerButton) {\n return;\n }\n\n if (!e.relatedTarget || !e.currentTarget.contains(e.relatedTarget)) {\n globalDrawersFocusControl.loseFocus();\n }\n }}\n style={{\n blockSize: drawerHeight,\n insetBlockStart: drawerTopOffset,\n ...(!isMobile && {\n [customCssProps.drawerSize]: `${['entering', 'entered'].includes(state) ? (isExpanded ? '100%' : size + 'px') : 0}`,\n }),\n }}\n data-testid={`awsui-app-layout-drawer-${activeDrawerId}`}\n >\n <div className={clsx(styles['global-drawer-wrapper'])}>\n {!isMobile && <div className={styles['drawer-gap']}></div>}\n {!isMobile && activeGlobalDrawer?.resizable && !isExpanded && (\n <div className={styles['drawer-slider']}>\n <PanelResizeHandle\n ref={refs?.slider}\n position=\"side\"\n className={testutilStyles['drawers-slider']}\n ariaLabel={activeGlobalDrawer?.ariaLabels?.resizeHandle}\n tooltipText={activeGlobalDrawer?.ariaLabels?.resizeHandleTooltipText}\n ariaValuenow={resizeProps.relativeSize}\n onKeyDown={resizeProps.onKeyDown}\n onDirectionClick={resizeProps.onDirectionClick}\n onPointerDown={resizeProps.onPointerDown}\n />\n </div>\n )}\n\n <div\n className={clsx(styles['drawer-content-container'], sharedStyles['with-motion-horizontal'])}\n data-testid={`awsui-app-layout-drawer-content-${activeDrawerId}`}\n >\n <div className={styles['drawer-actions']}>\n {!isMobile && activeGlobalDrawer?.isExpandable && (\n <div className={styles['drawer-expanded-mode-button']}>\n <InternalButton\n ariaLabel={activeGlobalDrawer?.ariaLabels?.expandedModeButton}\n className={testutilStyles['active-drawer-expanded-mode-button']}\n formAction=\"none\"\n ariaExpanded={isExpanded}\n iconName={isExpanded ? 'shrink' : 'expand'}\n onClick={() => setExpandedDrawerId(isExpanded ? null : activeDrawerId)}\n variant=\"icon\"\n analyticsAction={isExpanded ? 'expand' : 'collapse'}\n />\n </div>\n )}\n <div className={clsx(styles['drawer-close-button'])}>\n <InternalButton\n ariaLabel={computedAriaLabels.closeButton}\n className={clsx({\n [testutilStyles['active-drawer-close-button']]: activeDrawerId,\n })}\n formAction=\"none\"\n iconName={isMobile ? 'close' : 'angle-right'}\n onClick={() => onActiveGlobalDrawersChange(activeDrawerId, { initiatedByUserAction: true })}\n ref={refs?.close}\n variant=\"icon\"\n analyticsAction=\"close\"\n />\n </div>\n </div>\n <div className={styles['drawer-content']} style={{ blockSize: drawerHeight }}>\n {activeGlobalDrawer?.content}\n </div>\n </div>\n </div>\n </aside>\n );\n }}\n </Transition>\n );\n}\n\nexport default AppLayoutGlobalDrawerImplementation;\n"]}
@@ -4,7 +4,7 @@ import React, { useRef } from 'react';
4
4
  import { createWidgetizedComponent } from '../../../internal/widgets';
5
5
  import AppLayoutGlobalDrawer from './global-drawer';
6
6
  export function AppLayoutGlobalDrawersImplementation({ appLayoutInternals, }) {
7
- const { globalDrawers, activeGlobalDrawersIds } = appLayoutInternals;
7
+ const { globalDrawers, activeGlobalDrawersIds, expandedDrawerId } = appLayoutInternals;
8
8
  const openDrawersHistory = useRef(new Set());
9
9
  if (!globalDrawers.length) {
10
10
  return React.createElement(React.Fragment, null);
@@ -14,7 +14,7 @@ export function AppLayoutGlobalDrawersImplementation({ appLayoutInternals, }) {
14
14
  (drawer.preserveInactiveContent && openDrawersHistory.current.has(drawer.id)))
15
15
  .map(drawer => {
16
16
  openDrawersHistory.current.add(drawer.id);
17
- return (React.createElement(AppLayoutGlobalDrawer, { key: drawer.id, show: activeGlobalDrawersIds.includes(drawer.id), activeGlobalDrawer: drawer, appLayoutInternals: appLayoutInternals }));
17
+ return (React.createElement(AppLayoutGlobalDrawer, { key: drawer.id, show: activeGlobalDrawersIds.includes(drawer.id) && (!expandedDrawerId || drawer.id === expandedDrawerId), activeGlobalDrawer: drawer, appLayoutInternals: appLayoutInternals }));
18
18
  })));
19
19
  }
20
20
  export const createWidgetizedAppLayoutGlobalDrawers = createWidgetizedComponent(AppLayoutGlobalDrawersImplementation);
@@ -1 +1 @@
1
- {"version":3,"file":"global-drawers.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/global-drawers.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,qBAAqB,MAAM,iBAAiB,CAAC;AAMpD,MAAM,UAAU,oCAAoC,CAAC,EACnD,kBAAkB,GACwB;IAC1C,MAAM,EAAE,aAAa,EAAE,sBAAsB,EAAE,GAAG,kBAAkB,CAAC;IACrE,MAAM,kBAAkB,GAAG,MAAM,CAAc,IAAI,GAAG,EAAE,CAAC,CAAC;IAE1D,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE;QACzB,OAAO,yCAAK,CAAC;KACd;IAED,OAAO,CACL,0CACG,aAAa;SACX,MAAM,CACL,MAAM,CAAC,EAAE,CACP,sBAAsB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1C,CAAC,MAAM,CAAC,uBAAuB,IAAI,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAChF;SACA,GAAG,CAAC,MAAM,CAAC,EAAE;QACZ,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC1C,OAAO,CACL,oBAAC,qBAAqB,IACpB,GAAG,EAAE,MAAM,CAAC,EAAE,EACd,IAAI,EAAE,sBAAsB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,EAChD,kBAAkB,EAAE,MAAM,EAC1B,kBAAkB,EAAE,kBAAkB,GACtC,CACH,CAAC;IACJ,CAAC,CAAC,CACH,CACJ,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,sCAAsC,GAAG,yBAAyB,CAAC,oCAAoC,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutInternals } from '../interfaces';\nimport AppLayoutGlobalDrawer from './global-drawer';\n\ninterface AppLayoutGlobalDrawersImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n}\n\nexport function AppLayoutGlobalDrawersImplementation({\n appLayoutInternals,\n}: AppLayoutGlobalDrawersImplementationProps) {\n const { globalDrawers, activeGlobalDrawersIds } = appLayoutInternals;\n const openDrawersHistory = useRef<Set<string>>(new Set());\n\n if (!globalDrawers.length) {\n return <></>;\n }\n\n return (\n <>\n {globalDrawers\n .filter(\n drawer =>\n activeGlobalDrawersIds.includes(drawer.id) ||\n (drawer.preserveInactiveContent && openDrawersHistory.current.has(drawer.id))\n )\n .map(drawer => {\n openDrawersHistory.current.add(drawer.id);\n return (\n <AppLayoutGlobalDrawer\n key={drawer.id}\n show={activeGlobalDrawersIds.includes(drawer.id)}\n activeGlobalDrawer={drawer}\n appLayoutInternals={appLayoutInternals}\n />\n );\n })}\n </>\n );\n}\n\nexport const createWidgetizedAppLayoutGlobalDrawers = createWidgetizedComponent(AppLayoutGlobalDrawersImplementation);\n"]}
1
+ {"version":3,"file":"global-drawers.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/drawer/global-drawers.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,qBAAqB,MAAM,iBAAiB,CAAC;AAMpD,MAAM,UAAU,oCAAoC,CAAC,EACnD,kBAAkB,GACwB;IAC1C,MAAM,EAAE,aAAa,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,GAAG,kBAAkB,CAAC;IACvF,MAAM,kBAAkB,GAAG,MAAM,CAAc,IAAI,GAAG,EAAE,CAAC,CAAC;IAE1D,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE;QACzB,OAAO,yCAAK,CAAC;KACd;IAED,OAAO,CACL,0CACG,aAAa;SACX,MAAM,CACL,MAAM,CAAC,EAAE,CACP,sBAAsB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1C,CAAC,MAAM,CAAC,uBAAuB,IAAI,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAChF;SACA,GAAG,CAAC,MAAM,CAAC,EAAE;QACZ,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC1C,OAAO,CACL,oBAAC,qBAAqB,IACpB,GAAG,EAAE,MAAM,CAAC,EAAE,EACd,IAAI,EAAE,sBAAsB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,gBAAgB,IAAI,MAAM,CAAC,EAAE,KAAK,gBAAgB,CAAC,EACzG,kBAAkB,EAAE,MAAM,EAC1B,kBAAkB,EAAE,kBAAkB,GACtC,CACH,CAAC;IACJ,CAAC,CAAC,CACH,CACJ,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,sCAAsC,GAAG,yBAAyB,CAAC,oCAAoC,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutInternals } from '../interfaces';\nimport AppLayoutGlobalDrawer from './global-drawer';\n\ninterface AppLayoutGlobalDrawersImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n}\n\nexport function AppLayoutGlobalDrawersImplementation({\n appLayoutInternals,\n}: AppLayoutGlobalDrawersImplementationProps) {\n const { globalDrawers, activeGlobalDrawersIds, expandedDrawerId } = appLayoutInternals;\n const openDrawersHistory = useRef<Set<string>>(new Set());\n\n if (!globalDrawers.length) {\n return <></>;\n }\n\n return (\n <>\n {globalDrawers\n .filter(\n drawer =>\n activeGlobalDrawersIds.includes(drawer.id) ||\n (drawer.preserveInactiveContent && openDrawersHistory.current.has(drawer.id))\n )\n .map(drawer => {\n openDrawersHistory.current.add(drawer.id);\n return (\n <AppLayoutGlobalDrawer\n key={drawer.id}\n show={activeGlobalDrawersIds.includes(drawer.id) && (!expandedDrawerId || drawer.id === expandedDrawerId)}\n activeGlobalDrawer={drawer}\n appLayoutInternals={appLayoutInternals}\n />\n );\n })}\n </>\n );\n}\n\nexport const createWidgetizedAppLayoutGlobalDrawers = createWidgetizedComponent(AppLayoutGlobalDrawersImplementation);\n"]}
@@ -1,15 +1,22 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "drawer": "awsui_drawer_12i0j_ep6h5_189",
5
- "legacy": "awsui_legacy_12i0j_ep6h5_204",
6
- "last-opened": "awsui_last-opened_12i0j_ep6h5_212",
7
- "drawer-global": "awsui_drawer-global_12i0j_ep6h5_217",
8
- "drawer-hidden": "awsui_drawer-hidden_12i0j_ep6h5_221",
9
- "drawer-content-container": "awsui_drawer-content-container_12i0j_ep6h5_224",
10
- "drawer-close-button": "awsui_drawer-close-button_12i0j_ep6h5_232",
11
- "drawer-content": "awsui_drawer-content_12i0j_ep6h5_224",
12
- "drawer-content-hidden": "awsui_drawer-content-hidden_12i0j_ep6h5_242",
13
- "drawer-slider": "awsui_drawer-slider_12i0j_ep6h5_245"
4
+ "drawer": "awsui_drawer_12i0j_1ybif_189",
5
+ "with-expanded-motion": "awsui_with-expanded-motion_12i0j_1ybif_203",
6
+ "legacy": "awsui_legacy_12i0j_1ybif_217",
7
+ "last-opened": "awsui_last-opened_12i0j_1ybif_225",
8
+ "drawer-global": "awsui_drawer-global_12i0j_1ybif_229",
9
+ "drawer-expanded": "awsui_drawer-expanded_12i0j_1ybif_238",
10
+ "drawer-hidden": "awsui_drawer-hidden_12i0j_1ybif_242",
11
+ "has-next-siblings": "awsui_has-next-siblings_12i0j_1ybif_252",
12
+ "global-drawer-wrapper": "awsui_global-drawer-wrapper_12i0j_1ybif_252",
13
+ "drawer-content-container": "awsui_drawer-content-container_12i0j_1ybif_266",
14
+ "drawer-gap": "awsui_drawer-gap_12i0j_1ybif_269",
15
+ "drawer-close-button": "awsui_drawer-close-button_12i0j_1ybif_287",
16
+ "drawer-expanded-mode-button": "awsui_drawer-expanded-mode-button_12i0j_1ybif_293",
17
+ "drawer-content": "awsui_drawer-content_12i0j_1ybif_266",
18
+ "drawer-content-hidden": "awsui_drawer-content-hidden_12i0j_1ybif_305",
19
+ "drawer-slider": "awsui_drawer-slider_12i0j_1ybif_308",
20
+ "drawer-actions": "awsui_drawer-actions_12i0j_1ybif_357"
14
21
  };
15
22
 
@@ -186,7 +186,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
186
186
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
187
187
  SPDX-License-Identifier: Apache-2.0
188
188
  */
189
- .awsui_drawer_12i0j_ep6h5_189:not(#\9) {
189
+ .awsui_drawer_12i0j_1ybif_189:not(#\9) {
190
190
  position: sticky;
191
191
  z-index: 830;
192
192
  background-color: var(--color-background-container-content-mvmryi, #ffffff);
@@ -200,52 +200,186 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
200
200
  pointer-events: auto;
201
201
  word-wrap: break-word;
202
202
  }
203
+ .awsui_drawer_12i0j_1ybif_189.awsui_with-expanded-motion_12i0j_1ybif_203:not(#\9) {
204
+ transition: inline-size var(--motion-duration-refresh-only-slow-zil3nj, 0ms) var(--motion-easing-refresh-only-a-8gio5w, cubic-bezier(0, 0, 0, 1)), min-inline-size var(--motion-duration-refresh-only-slow-zil3nj, 0ms) var(--motion-easing-refresh-only-a-8gio5w, cubic-bezier(0, 0, 0, 1));
205
+ }
206
+ @media (prefers-reduced-motion: reduce) {
207
+ .awsui_drawer_12i0j_1ybif_189.awsui_with-expanded-motion_12i0j_1ybif_203:not(#\9) {
208
+ animation: none;
209
+ transition: none;
210
+ }
211
+ }
212
+ .awsui-motion-disabled .awsui_drawer_12i0j_1ybif_189.awsui_with-expanded-motion_12i0j_1ybif_203:not(#\9), .awsui-mode-entering .awsui_drawer_12i0j_1ybif_189.awsui_with-expanded-motion_12i0j_1ybif_203:not(#\9) {
213
+ animation: none;
214
+ transition: none;
215
+ }
203
216
  @media (min-width: 689px) {
204
- .awsui_drawer_12i0j_ep6h5_189:not(#\9):not(.awsui_legacy_12i0j_ep6h5_204) {
217
+ .awsui_drawer_12i0j_1ybif_189:not(#\9):not(.awsui_legacy_12i0j_1ybif_217) {
205
218
  border-inline-start: var(--border-divider-section-width-sznrdy, 1px) solid var(--color-border-layout-gb61sp, #d5dbdb);
206
219
  }
207
220
  }
208
221
  @media (max-width: 688px) {
209
- .awsui_drawer_12i0j_ep6h5_189:not(#\9) {
222
+ .awsui_drawer_12i0j_1ybif_189:not(#\9) {
210
223
  inline-size: 100%;
211
224
  }
212
- .awsui_drawer_12i0j_ep6h5_189.awsui_last-opened_12i0j_ep6h5_212:not(#\9) {
225
+ .awsui_drawer_12i0j_1ybif_189.awsui_last-opened_12i0j_1ybif_225:not(#\9) {
213
226
  z-index: 1001;
214
227
  }
215
228
  }
229
+ .awsui_drawer_12i0j_1ybif_189.awsui_drawer-global_12i0j_1ybif_229:not(#\9) {
230
+ display: block;
231
+ }
232
+ @media (min-width: 689px) {
233
+ .awsui_drawer_12i0j_1ybif_189.awsui_drawer-global_12i0j_1ybif_229:not(#\9) {
234
+ inline-size: var(--awsui-drawer-size-xgujsu);
235
+ }
236
+ }
216
237
  @media (max-width: 688px) {
217
- .awsui_drawer_12i0j_ep6h5_189.awsui_drawer-global_12i0j_ep6h5_217:not(#\9):not(.awsui_last-opened_12i0j_ep6h5_212) {
238
+ .awsui_drawer_12i0j_1ybif_189.awsui_drawer-global_12i0j_1ybif_229:not(#\9):not(.awsui_last-opened_12i0j_1ybif_225):not(.awsui_drawer-expanded_12i0j_1ybif_238) {
218
239
  display: none;
219
240
  }
220
241
  }
221
- .awsui_drawer_12i0j_ep6h5_189.awsui_drawer-hidden_12i0j_ep6h5_221:not(#\9) {
242
+ .awsui_drawer_12i0j_1ybif_189.awsui_drawer-hidden_12i0j_1ybif_242:not(#\9) {
222
243
  display: none;
223
244
  }
224
- .awsui_drawer_12i0j_ep6h5_189 > .awsui_drawer-content-container_12i0j_ep6h5_224:not(#\9) {
245
+ .awsui_drawer_12i0j_1ybif_189.awsui_drawer-expanded_12i0j_1ybif_238:not(#\9) {
246
+ inline-size: 100%;
247
+ }
248
+ @media (min-width: 689px) {
249
+ .awsui_drawer_12i0j_1ybif_189.awsui_drawer-expanded_12i0j_1ybif_238:not(#\9) {
250
+ border-inline-start: none;
251
+ }
252
+ .awsui_drawer_12i0j_1ybif_189.awsui_drawer-expanded_12i0j_1ybif_238.awsui_has-next-siblings_12i0j_1ybif_252 > .awsui_global-drawer-wrapper_12i0j_1ybif_252:not(#\9):after {
253
+ content: "";
254
+ position: absolute;
255
+ block-size: 100%;
256
+ inline-size: 8px;
257
+ inset-inline-end: 0;
258
+ background: var(--color-gap-global-drawer-lmfj7c, #eaeded);
259
+ border-inline-start: var(--border-divider-section-width-sznrdy, 1px) solid var(--color-border-layout-gb61sp, #d5dbdb);
260
+ box-sizing: border-box;
261
+ }
262
+ .awsui_drawer_12i0j_1ybif_189.awsui_drawer-expanded_12i0j_1ybif_238 > .awsui_global-drawer-wrapper_12i0j_1ybif_252:not(#\9) {
263
+ inline-size: 100%;
264
+ grid-template-columns: 8px 1fr;
265
+ }
266
+ .awsui_drawer_12i0j_1ybif_189.awsui_drawer-expanded_12i0j_1ybif_238 > .awsui_global-drawer-wrapper_12i0j_1ybif_252 > .awsui_drawer-content-container_12i0j_1ybif_266:not(#\9) {
267
+ grid-column: 2;
268
+ }
269
+ .awsui_drawer_12i0j_1ybif_189.awsui_drawer-expanded_12i0j_1ybif_238 > .awsui_global-drawer-wrapper_12i0j_1ybif_252 > .awsui_drawer-gap_12i0j_1ybif_269:not(#\9) {
270
+ grid-column: 1;
271
+ grid-row: 1;
272
+ block-size: 100%;
273
+ inline-size: 8px;
274
+ background: var(--color-gap-global-drawer-lmfj7c, #eaeded);
275
+ border-inline-end: var(--border-divider-section-width-sznrdy, 1px) solid var(--color-border-layout-gb61sp, #d5dbdb);
276
+ }
277
+ }
278
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_drawer-content-container_12i0j_1ybif_266:not(#\9) {
225
279
  grid-column: 1/span 2;
226
280
  grid-row: 1;
227
281
  display: grid;
228
282
  grid-template-columns: var(--space-m-n2lypl, 16px) 1fr auto var(--space-m-n2lypl, 16px);
229
283
  grid-template-rows: 14px auto 1fr;
230
284
  overflow-y: auto;
285
+ min-inline-size: var(--awsui-drawer-size-xgujsu);
231
286
  }
232
- .awsui_drawer_12i0j_ep6h5_189 > .awsui_drawer-content-container_12i0j_ep6h5_224 > .awsui_drawer-close-button_12i0j_ep6h5_232:not(#\9) {
287
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_drawer-content-container_12i0j_1ybif_266 > .awsui_drawer-close-button_12i0j_1ybif_287:not(#\9) {
233
288
  grid-column: 3;
234
289
  grid-row: 2;
235
290
  z-index: 1;
236
291
  align-self: start;
237
292
  }
238
- .awsui_drawer_12i0j_ep6h5_189 > .awsui_drawer-content-container_12i0j_ep6h5_224 > .awsui_drawer-content_12i0j_ep6h5_224:not(#\9) {
293
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_drawer-content-container_12i0j_1ybif_266 > .awsui_drawer-expanded-mode-button_12i0j_1ybif_293:not(#\9) {
294
+ grid-column: 2;
295
+ grid-row: 2;
296
+ z-index: 1;
297
+ align-self: start;
298
+ display: flex;
299
+ justify-content: end;
300
+ }
301
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_drawer-content-container_12i0j_1ybif_266 > .awsui_drawer-content_12i0j_1ybif_266:not(#\9) {
239
302
  grid-column: 1/span 4;
240
303
  grid-row: 1/span 2;
241
304
  }
242
- .awsui_drawer_12i0j_ep6h5_189 > .awsui_drawer-content-container_12i0j_ep6h5_224 > .awsui_drawer-content_12i0j_ep6h5_224.awsui_drawer-content-hidden_12i0j_ep6h5_242:not(#\9) {
305
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_drawer-content-container_12i0j_1ybif_266 > .awsui_drawer-content_12i0j_1ybif_266.awsui_drawer-content-hidden_12i0j_1ybif_305:not(#\9) {
243
306
  display: none;
244
307
  }
245
- .awsui_drawer_12i0j_ep6h5_189 > .awsui_drawer-slider_12i0j_ep6h5_245:not(#\9) {
308
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_drawer-slider_12i0j_1ybif_308:not(#\9) {
309
+ grid-column: 1;
310
+ grid-row: 1;
311
+ block-size: 100%;
312
+ display: flex;
313
+ align-items: center;
314
+ }
315
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_global-drawer-wrapper_12i0j_1ybif_252:not(#\9) {
316
+ display: grid;
317
+ min-inline-size: var(--awsui-drawer-size-xgujsu);
318
+ grid-template-columns: 8px var(--space-m-n2lypl, 16px) 1fr;
319
+ overflow: hidden;
320
+ }
321
+ @media (max-width: 688px) {
322
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_global-drawer-wrapper_12i0j_1ybif_252:not(#\9) {
323
+ grid-template-columns: 1fr;
324
+ }
325
+ }
326
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_global-drawer-wrapper_12i0j_1ybif_252 > .awsui_drawer-gap_12i0j_1ybif_269:not(#\9) {
246
327
  grid-column: 1;
247
328
  grid-row: 1;
248
329
  block-size: 100%;
330
+ inline-size: 8px;
331
+ background: var(--color-gap-global-drawer-lmfj7c, #eaeded);
332
+ border-inline-end: var(--border-divider-section-width-sznrdy, 1px) solid var(--color-border-layout-gb61sp, #d5dbdb);
333
+ }
334
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_global-drawer-wrapper_12i0j_1ybif_252 > .awsui_drawer-slider_12i0j_1ybif_308:not(#\9) {
335
+ grid-column: 2;
336
+ grid-row: 1;
249
337
  display: flex;
250
338
  align-items: center;
339
+ }
340
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_global-drawer-wrapper_12i0j_1ybif_252 > .awsui_drawer-content-container_12i0j_1ybif_266:not(#\9) {
341
+ grid-row: 1;
342
+ display: grid;
343
+ grid-template-columns: var(--space-m-n2lypl, 16px) 1fr auto var(--space-m-n2lypl, 16px);
344
+ grid-template-rows: 14px auto 1fr;
345
+ overflow-y: auto;
346
+ }
347
+ @media (min-width: 689px) {
348
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_global-drawer-wrapper_12i0j_1ybif_252 > .awsui_drawer-content-container_12i0j_1ybif_266:not(#\9) {
349
+ grid-column: 2/span 2;
350
+ }
351
+ }
352
+ @media (max-width: 688px) {
353
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_global-drawer-wrapper_12i0j_1ybif_252 > .awsui_drawer-content-container_12i0j_1ybif_266:not(#\9) {
354
+ grid-column: 1/span 2;
355
+ }
356
+ }
357
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_global-drawer-wrapper_12i0j_1ybif_252 > .awsui_drawer-content-container_12i0j_1ybif_266 > .awsui_drawer-actions_12i0j_1ybif_357:not(#\9) {
358
+ position: absolute;
359
+ display: flex;
360
+ align-self: flex-start;
361
+ justify-self: flex-end;
362
+ padding-inline-end: var(--space-m-n2lypl, 16px);
363
+ padding-block-start: 14px;
364
+ }
365
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_global-drawer-wrapper_12i0j_1ybif_252 > .awsui_drawer-content-container_12i0j_1ybif_266 > .awsui_drawer-close-button_12i0j_1ybif_287:not(#\9) {
366
+ grid-column: 3;
367
+ grid-row: 2;
368
+ z-index: 1;
369
+ align-self: start;
370
+ }
371
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_global-drawer-wrapper_12i0j_1ybif_252 > .awsui_drawer-content-container_12i0j_1ybif_266 > .awsui_drawer-expanded-mode-button_12i0j_1ybif_293:not(#\9) {
372
+ grid-column: 2;
373
+ grid-row: 2;
374
+ z-index: 1;
375
+ align-self: start;
376
+ display: flex;
377
+ justify-content: end;
378
+ }
379
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_global-drawer-wrapper_12i0j_1ybif_252 > .awsui_drawer-content-container_12i0j_1ybif_266 > .awsui_drawer-content_12i0j_1ybif_266:not(#\9) {
380
+ grid-column: 1/span 4;
381
+ grid-row: 1/span 2;
382
+ }
383
+ .awsui_drawer_12i0j_1ybif_189 > .awsui_global-drawer-wrapper_12i0j_1ybif_252 > .awsui_drawer-content-container_12i0j_1ybif_266 > .awsui_drawer-content_12i0j_1ybif_266.awsui_drawer-content-hidden_12i0j_1ybif_305:not(#\9) {
384
+ display: none;
251
385
  }
@@ -2,15 +2,22 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "drawer": "awsui_drawer_12i0j_ep6h5_189",
6
- "legacy": "awsui_legacy_12i0j_ep6h5_204",
7
- "last-opened": "awsui_last-opened_12i0j_ep6h5_212",
8
- "drawer-global": "awsui_drawer-global_12i0j_ep6h5_217",
9
- "drawer-hidden": "awsui_drawer-hidden_12i0j_ep6h5_221",
10
- "drawer-content-container": "awsui_drawer-content-container_12i0j_ep6h5_224",
11
- "drawer-close-button": "awsui_drawer-close-button_12i0j_ep6h5_232",
12
- "drawer-content": "awsui_drawer-content_12i0j_ep6h5_224",
13
- "drawer-content-hidden": "awsui_drawer-content-hidden_12i0j_ep6h5_242",
14
- "drawer-slider": "awsui_drawer-slider_12i0j_ep6h5_245"
5
+ "drawer": "awsui_drawer_12i0j_1ybif_189",
6
+ "with-expanded-motion": "awsui_with-expanded-motion_12i0j_1ybif_203",
7
+ "legacy": "awsui_legacy_12i0j_1ybif_217",
8
+ "last-opened": "awsui_last-opened_12i0j_1ybif_225",
9
+ "drawer-global": "awsui_drawer-global_12i0j_1ybif_229",
10
+ "drawer-expanded": "awsui_drawer-expanded_12i0j_1ybif_238",
11
+ "drawer-hidden": "awsui_drawer-hidden_12i0j_1ybif_242",
12
+ "has-next-siblings": "awsui_has-next-siblings_12i0j_1ybif_252",
13
+ "global-drawer-wrapper": "awsui_global-drawer-wrapper_12i0j_1ybif_252",
14
+ "drawer-content-container": "awsui_drawer-content-container_12i0j_1ybif_266",
15
+ "drawer-gap": "awsui_drawer-gap_12i0j_1ybif_269",
16
+ "drawer-close-button": "awsui_drawer-close-button_12i0j_1ybif_287",
17
+ "drawer-expanded-mode-button": "awsui_drawer-expanded-mode-button_12i0j_1ybif_293",
18
+ "drawer-content": "awsui_drawer-content_12i0j_1ybif_266",
19
+ "drawer-content-hidden": "awsui_drawer-content-hidden_12i0j_1ybif_305",
20
+ "drawer-slider": "awsui_drawer-slider_12i0j_1ybif_308",
21
+ "drawer-actions": "awsui_drawer-actions_12i0j_1ybif_357"
15
22
  };
16
23
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4E,MAAM,OAAO,CAAC;AAejG,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAa/C,OAAO,EAAE,sBAAsB,EAAsB,MAAM,cAAc,CAAC;AAa1E,QAAA,MAAM,6BAA6B,mGA2flC,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4E,MAAM,OAAO,CAAC;AAejG,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAa/C,OAAO,EAAE,sBAAsB,EAAsB,MAAM,cAAc,CAAC;AAa1E,QAAA,MAAM,6BAA6B,mGAsgBlC,CAAC;AAEF,eAAe,6BAA6B,CAAC"}