@cloudscape-design/components-themeable 3.0.833 → 3.0.835

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 (56) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/app-layout/drawer/styles.scss +5 -0
  3. package/lib/internal/scss/app-layout/visual-refresh/drawers.scss +1 -0
  4. package/lib/internal/scss/app-layout/visual-refresh/navigation.scss +6 -0
  5. package/lib/internal/scss/app-layout/visual-refresh-toolbar/drawer/styles.scss +3 -4
  6. package/lib/internal/scss/app-layout/visual-refresh-toolbar/navigation/styles.scss +6 -0
  7. package/lib/internal/scss/table/body-cell/styles.scss +19 -40
  8. package/lib/internal/template/app-layout/drawer/index.d.ts.map +1 -1
  9. package/lib/internal/template/app-layout/drawer/index.js +3 -1
  10. package/lib/internal/template/app-layout/drawer/index.js.map +1 -1
  11. package/lib/internal/template/app-layout/drawer/styles.css.js +14 -13
  12. package/lib/internal/template/app-layout/drawer/styles.scoped.css +26 -21
  13. package/lib/internal/template/app-layout/drawer/styles.selectors.js +14 -13
  14. package/lib/internal/template/app-layout/utils/use-drawers.d.ts.map +1 -1
  15. package/lib/internal/template/app-layout/utils/use-drawers.js +5 -1
  16. package/lib/internal/template/app-layout/utils/use-drawers.js.map +1 -1
  17. package/lib/internal/template/app-layout/visual-refresh/navigation.js +1 -1
  18. package/lib/internal/template/app-layout/visual-refresh/navigation.js.map +1 -1
  19. package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -85
  20. package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +168 -162
  21. package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -85
  22. package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.d.ts +4 -1
  23. package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.d.ts.map +1 -1
  24. package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.js +4 -2
  25. package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
  26. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts.map +1 -1
  27. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +5 -5
  28. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
  29. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
  30. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +5 -5
  31. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
  32. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +10 -10
  33. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +12 -14
  34. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +10 -10
  35. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js +5 -5
  36. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js.map +1 -1
  37. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +5 -4
  38. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +10 -5
  39. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +5 -4
  40. package/lib/internal/template/app-layout/visual-refresh-toolbar/split-panel/index.d.ts.map +1 -1
  41. package/lib/internal/template/app-layout/visual-refresh-toolbar/split-panel/index.js +4 -4
  42. package/lib/internal/template/app-layout/visual-refresh-toolbar/split-panel/index.js.map +1 -1
  43. package/lib/internal/template/internal/environment.js +1 -1
  44. package/lib/internal/template/internal/environment.json +1 -1
  45. package/lib/internal/template/table/body-cell/disabled-inline-editor.d.ts +1 -1
  46. package/lib/internal/template/table/body-cell/disabled-inline-editor.d.ts.map +1 -1
  47. package/lib/internal/template/table/body-cell/disabled-inline-editor.js +4 -4
  48. package/lib/internal/template/table/body-cell/disabled-inline-editor.js.map +1 -1
  49. package/lib/internal/template/table/body-cell/index.d.ts +0 -1
  50. package/lib/internal/template/table/body-cell/index.d.ts.map +1 -1
  51. package/lib/internal/template/table/body-cell/index.js +4 -4
  52. package/lib/internal/template/table/body-cell/index.js.map +1 -1
  53. package/lib/internal/template/table/body-cell/styles.css.js +46 -47
  54. package/lib/internal/template/table/body-cell/styles.scoped.css +301 -331
  55. package/lib/internal/template/table/body-cell/styles.selectors.js +46 -47
  56. package/package.json +1 -1
@@ -1 +1 @@
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;AAClE,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;AAYtD,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,EAAE,EAA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ACnC,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;KAC5B,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 { 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\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\nfunction useRuntimeDrawers(\n disableRuntimeDrawers: boolean | undefined,\n activeDrawerId: string | null,\n onActiveDrawerChange: (newDrawerId: string | null) => void,\n activeGlobalDrawersIds: Array<string>,\n onActiveGlobalDrawersChange: (newDrawerId: string) => void,\n drawers: AppLayoutProps.Drawer[]\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);\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);\n });\n });\n return () => {\n unsubscribe();\n setRuntimeDrawers({ localBefore: [], localAfter: [], global: [] });\n };\n }, [disableRuntimeDrawers, onGlobalDrawersChangeStable, onLocalDrawerChangeStable]);\n\n useEffect(() => {\n const unsubscribe = awsuiPluginsInternal.appLayout.onDrawerOpened(drawerId => {\n const localDrawer = [...runtimeDrawers.localBefore, ...drawers, ...runtimeDrawers.localAfter]?.find(\n drawer => drawer.id === drawerId\n );\n const globalDrawer = runtimeDrawers.global?.find(drawer => drawer.id === drawerId);\n if (localDrawer && activeDrawerId !== drawerId) {\n onActiveDrawerChange(drawerId);\n }\n if (globalDrawer && !activeGlobalDrawersIds.includes(drawerId)) {\n onActiveGlobalDrawersChange(drawerId);\n }\n });\n\n return () => {\n unsubscribe();\n };\n }, [\n activeDrawerId,\n activeGlobalDrawersIds,\n drawers,\n onActiveDrawerChange,\n runtimeDrawers,\n onActiveGlobalDrawersChange,\n ]);\n\n useEffect(() => {\n const unsubscribe = awsuiPluginsInternal.appLayout.onDrawerClosed(drawerId => {\n const localDrawer = [...runtimeDrawers.localBefore, ...drawers, ...runtimeDrawers.localAfter]?.find(\n drawer => drawer.id === drawerId\n );\n const globalDrawer = runtimeDrawers.global?.find(drawer => drawer.id === drawerId);\n if (localDrawer && activeDrawerId === drawerId) {\n onActiveDrawerChange(null);\n }\n if (globalDrawer && activeGlobalDrawersIds.includes(drawerId)) {\n onActiveGlobalDrawersChange(drawerId);\n }\n });\n\n return () => {\n unsubscribe();\n };\n }, [\n activeDrawerId,\n activeGlobalDrawersIds,\n drawers,\n onActiveDrawerChange,\n runtimeDrawers,\n onActiveGlobalDrawersChange,\n ]);\n\n return runtimeDrawers;\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(newDrawerId: string | null) {\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 }\n\n if (activeDrawerId) {\n drawersOpenQueue.current = drawersOpenQueue.current.filter(id => id !== activeDrawerId);\n }\n }\n\n function onActiveGlobalDrawersChange(drawerId: string) {\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 } 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 }\n }\n\n const hasOwnDrawers = !!drawers;\n const runtimeDrawers = useRuntimeDrawers(\n disableRuntimeDrawers,\n activeDrawerId,\n onActiveDrawerChange,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange,\n drawers ?? []\n );\n const { localBefore, localAfter, global: runtimeGlobalDrawers } = runtimeDrawers;\n const combinedLocalDrawers = drawers\n ? [...localBefore, ...drawers, ...localAfter]\n : applyToolsDrawer(toolsProps, runtimeDrawers);\n // support toolsOpen in runtime-drawers-only mode\n let activeDrawerIdResolved = toolsProps?.toolsOpen && !hasOwnDrawers ? TOOLS_DRAWER_ID : activeDrawerId;\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 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;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,OAAO,EAAE,qBAAqB,EAAiB,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,M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C,IACzF;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAC5B,CAAA,UAAU,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;KAC5B,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 { 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\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\nfunction useRuntimeDrawers(\n disableRuntimeDrawers: boolean | undefined,\n activeDrawerId: string | null,\n onActiveDrawerChange: (newDrawerId: string | null) => void,\n activeGlobalDrawersIds: Array<string>,\n onActiveGlobalDrawersChange: (newDrawerId: string) => void,\n drawers: AppLayoutProps.Drawer[]\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);\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);\n });\n });\n return () => {\n unsubscribe();\n setRuntimeDrawers({ localBefore: [], localAfter: [], global: [] });\n };\n }, [disableRuntimeDrawers, onGlobalDrawersChangeStable, onLocalDrawerChangeStable]);\n\n useEffect(() => {\n const unsubscribe = awsuiPluginsInternal.appLayout.onDrawerOpened(drawerId => {\n const localDrawer = [...runtimeDrawers.localBefore, ...drawers, ...runtimeDrawers.localAfter]?.find(\n drawer => drawer.id === drawerId\n );\n const globalDrawer = runtimeDrawers.global?.find(drawer => drawer.id === drawerId);\n if (localDrawer && activeDrawerId !== drawerId) {\n onActiveDrawerChange(drawerId);\n }\n if (globalDrawer && !activeGlobalDrawersIds.includes(drawerId)) {\n onActiveGlobalDrawersChange(drawerId);\n }\n });\n\n return () => {\n unsubscribe();\n };\n }, [\n activeDrawerId,\n activeGlobalDrawersIds,\n drawers,\n onActiveDrawerChange,\n runtimeDrawers,\n onActiveGlobalDrawersChange,\n ]);\n\n useEffect(() => {\n const unsubscribe = awsuiPluginsInternal.appLayout.onDrawerClosed(drawerId => {\n const localDrawer = [...runtimeDrawers.localBefore, ...drawers, ...runtimeDrawers.localAfter]?.find(\n drawer => drawer.id === drawerId\n );\n const globalDrawer = runtimeDrawers.global?.find(drawer => drawer.id === drawerId);\n if (localDrawer && activeDrawerId === drawerId) {\n onActiveDrawerChange(null);\n }\n if (globalDrawer && activeGlobalDrawersIds.includes(drawerId)) {\n onActiveGlobalDrawersChange(drawerId);\n }\n });\n\n return () => {\n unsubscribe();\n };\n }, [\n activeDrawerId,\n activeGlobalDrawersIds,\n drawers,\n onActiveDrawerChange,\n runtimeDrawers,\n onActiveGlobalDrawersChange,\n ]);\n\n return runtimeDrawers;\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(newDrawerId: string | null) {\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 }\n\n if (activeDrawerId) {\n drawersOpenQueue.current = drawersOpenQueue.current.filter(id => id !== activeDrawerId);\n }\n }\n\n function onActiveGlobalDrawersChange(drawerId: string) {\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 } 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 }\n }\n\n const hasOwnDrawers = !!drawers;\n const runtimeDrawers = useRuntimeDrawers(\n disableRuntimeDrawers,\n activeDrawerId,\n onActiveDrawerChange,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange,\n drawers ?? []\n );\n const { localBefore, localAfter, global: runtimeGlobalDrawers } = runtimeDrawers;\n const combinedLocalDrawers = drawers\n ? [...localBefore, ...drawers, ...localAfter]\n : applyToolsDrawer(toolsProps, runtimeDrawers);\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 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 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"]}
@@ -48,7 +48,7 @@ export default function Navigation() {
48
48
  }), ref: state !== 'exiting' ? transitionEventsRef : undefined, "aria-hidden": !navigationOpen, onClick: event => {
49
49
  onNavigationClick && onNavigationClick(event);
50
50
  } },
51
- React.createElement("div", { className: styles['animated-content'] },
51
+ React.createElement("div", { className: clsx(styles['content-container'], styles['animated-content']) },
52
52
  React.createElement("div", { className: styles['hide-navigation'] },
53
53
  React.createElement(InternalButton, { ariaLabel: (_c = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.navigationClose) !== null && _c !== void 0 ? _c : undefined, iconName: isMobile ? 'close' : 'angle-left', onClick: () => handleNavigationClick(false), variant: "icon", formAction: "none", className: testutilStyles['navigation-close'], ref: navigationRefs.close })),
54
54
  navigation))));
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/navigation.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU;IAChC,MAAM,EACJ,UAAU,EACV,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,WAAW,EACX,UAAU,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,SAAS,EACT,aAAa,GACd,GAAG,qBAAqB,EAAE,CAAC;IAE5B,IA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CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,EAC3C,OAAO,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAC3C,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,cAAc,CAAC,kBAAkB,CAAC,EAC7C,GAAG,EAAE,cAAc,CAAC,KAAK,GACzB,CACE;oBACL,UAAU,CACP,CACF,CACF,CACP,CAAA;KAAA,CACU,CACd,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';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport { InternalButton } from '../../button/internal';\nimport { Transition } from '../../internal/components/transition';\nimport customCssProps from '../../internal/generated/custom-css-properties';\nimport { useAppLayoutInternals } from './context';\nimport TriggerButton from './trigger-button';\n\nimport testutilStyles from '../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\n/**\n * The Navigation component consists of the following elements:\n * the container, or root element, that sits as a direct child to the Layout grid definition;\n * the show navigation form that contains the trigger for the drawer in large viewports;\n * the navigation, or drawer, that contains the hide navigation form and the children\n * passed through the API;\n */\nexport default function Navigation() {\n const {\n ariaLabels,\n disableBodyScroll,\n handleNavigationClick,\n hasDrawerViewportOverlay,\n isMobile,\n navigationOpen,\n isToolsOpen,\n navigation,\n navigationHide,\n navigationRefs,\n navigationWidth,\n toolsHide,\n headerVariant,\n } = useAppLayoutInternals();\n\n if (navigationHide) {\n return null;\n }\n\n // Close the Navigation drawer on mobile when a user clicks a link inside.\n const onNavigationClick = (event: React.MouseEvent) => {\n const hasLink = findUpUntil(\n event.target as HTMLElement,\n node => node.tagName === 'A' && !!(node as HTMLAnchorElement).href\n );\n if (hasLink && isMobile) {\n handleNavigationClick(false);\n }\n };\n\n const isUnfocusable = hasDrawerViewportOverlay && (!navigationOpen || (isToolsOpen && !toolsHide));\n\n return (\n <Transition in={navigationOpen}>\n {(state, transitionEventsRef) => (\n <div\n className={clsx(styles['navigation-container'], {\n [styles['disable-body-scroll']]: disableBodyScroll,\n [styles.unfocusable]: isUnfocusable,\n })}\n style={{ [customCssProps.navigationWidth]: `${navigationWidth}px` }}\n >\n {!isMobile && (\n <nav\n aria-hidden={isMobile || navigationOpen}\n aria-label={ariaLabels?.navigation ?? undefined}\n className={clsx(styles['show-navigation'], {\n [styles.animating]: state === 'exiting',\n [styles['is-navigation-open']]: navigationOpen,\n })}\n ref={state === 'exiting' ? transitionEventsRef : undefined}\n >\n <TriggerButton\n ariaLabel={ariaLabels?.navigationToggle}\n ariaExpanded={navigationOpen ? undefined : false}\n iconName=\"menu\"\n className={testutilStyles['navigation-toggle']}\n onClick={() => handleNavigationClick(true)}\n ref={navigationRefs.toggle}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n </nav>\n )}\n\n <nav\n aria-label={ariaLabels?.navigation ?? undefined}\n className={clsx(styles.navigation, testutilStyles.navigation, {\n [testutilStyles['drawer-closed']]: !navigationOpen,\n [styles.animating]: state === 'entering',\n [styles['is-navigation-open']]: navigationOpen,\n })}\n ref={state !== 'exiting' ? transitionEventsRef : undefined}\n aria-hidden={!navigationOpen}\n onClick={event => {\n onNavigationClick && onNavigationClick(event);\n }}\n >\n <div className={styles['animated-content']}>\n <div className={styles['hide-navigation']}>\n <InternalButton\n ariaLabel={ariaLabels?.navigationClose ?? undefined}\n iconName={isMobile ? 'close' : 'angle-left'}\n onClick={() => handleNavigationClick(false)}\n variant=\"icon\"\n formAction=\"none\"\n className={testutilStyles['navigation-close']}\n ref={navigationRefs.close}\n />\n </div>\n {navigation}\n </div>\n </nav>\n </div>\n )}\n </Transition>\n );\n}\n"]}
1
+ {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh/navigation.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,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AE,cAAc,CAAC,UAAU,EAAE;oBAC5D,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,cAAc;oBAClD,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,KAAK,KAAK,UAAU;oBACxC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,cAAc;iBAC/C,CAAC,EACF,GAAG,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,iBAC7C,CAAC,cAAc,EAC5B,OAAO,EAAE,KAAK,CAAC,EAAE;oBACf,iBAAiB,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAC;gBAChD,CAAC;gBAED,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC,kBAAkB,CAAC,CAAC;oBAC3E,6BAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC;wBACvC,oBAAC,cAAc,IACb,SAAS,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,eAAe,mCAAI,SAAS,EACnD,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,EAC3C,OAAO,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAC3C,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,cAAc,CAAC,kBAAkB,CAAC,EAC7C,GAAG,EAAE,cAAc,CAAC,KAAK,GACzB,CACE;oBACL,UAAU,CACP,CACF,CACF,CACP,CAAA;KAAA,CACU,CACd,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';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport { InternalButton } from '../../button/internal';\nimport { Transition } from '../../internal/components/transition';\nimport customCssProps from '../../internal/generated/custom-css-properties';\nimport { useAppLayoutInternals } from './context';\nimport TriggerButton from './trigger-button';\n\nimport testutilStyles from '../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\n/**\n * The Navigation component consists of the following elements:\n * the container, or root element, that sits as a direct child to the Layout grid definition;\n * the show navigation form that contains the trigger for the drawer in large viewports;\n * the navigation, or drawer, that contains the hide navigation form and the children\n * passed through the API;\n */\nexport default function Navigation() {\n const {\n ariaLabels,\n disableBodyScroll,\n handleNavigationClick,\n hasDrawerViewportOverlay,\n isMobile,\n navigationOpen,\n isToolsOpen,\n navigation,\n navigationHide,\n navigationRefs,\n navigationWidth,\n toolsHide,\n headerVariant,\n } = useAppLayoutInternals();\n\n if (navigationHide) {\n return null;\n }\n\n // Close the Navigation drawer on mobile when a user clicks a link inside.\n const onNavigationClick = (event: React.MouseEvent) => {\n const hasLink = findUpUntil(\n event.target as HTMLElement,\n node => node.tagName === 'A' && !!(node as HTMLAnchorElement).href\n );\n if (hasLink && isMobile) {\n handleNavigationClick(false);\n }\n };\n\n const isUnfocusable = hasDrawerViewportOverlay && (!navigationOpen || (isToolsOpen && !toolsHide));\n\n return (\n <Transition in={navigationOpen}>\n {(state, transitionEventsRef) => (\n <div\n className={clsx(styles['navigation-container'], {\n [styles['disable-body-scroll']]: disableBodyScroll,\n [styles.unfocusable]: isUnfocusable,\n })}\n style={{ [customCssProps.navigationWidth]: `${navigationWidth}px` }}\n >\n {!isMobile && (\n <nav\n aria-hidden={isMobile || navigationOpen}\n aria-label={ariaLabels?.navigation ?? undefined}\n className={clsx(styles['show-navigation'], {\n [styles.animating]: state === 'exiting',\n [styles['is-navigation-open']]: navigationOpen,\n })}\n ref={state === 'exiting' ? transitionEventsRef : undefined}\n >\n <TriggerButton\n ariaLabel={ariaLabels?.navigationToggle}\n ariaExpanded={navigationOpen ? undefined : false}\n iconName=\"menu\"\n className={testutilStyles['navigation-toggle']}\n onClick={() => handleNavigationClick(true)}\n ref={navigationRefs.toggle}\n highContrastHeader={headerVariant === 'high-contrast'}\n />\n </nav>\n )}\n\n <nav\n aria-label={ariaLabels?.navigation ?? undefined}\n className={clsx(styles.navigation, testutilStyles.navigation, {\n [testutilStyles['drawer-closed']]: !navigationOpen,\n [styles.animating]: state === 'entering',\n [styles['is-navigation-open']]: navigationOpen,\n })}\n ref={state !== 'exiting' ? transitionEventsRef : undefined}\n aria-hidden={!navigationOpen}\n onClick={event => {\n onNavigationClick && onNavigationClick(event);\n }}\n >\n <div className={clsx(styles['content-container'], styles['animated-content'])}>\n <div className={styles['hide-navigation']}>\n <InternalButton\n ariaLabel={ariaLabels?.navigationClose ?? undefined}\n iconName={isMobile ? 'close' : 'angle-left'}\n onClick={() => handleNavigationClick(false)}\n variant=\"icon\"\n formAction=\"none\"\n className={testutilStyles['navigation-close']}\n ref={navigationRefs.close}\n />\n </div>\n {navigation}\n </div>\n </nav>\n </div>\n )}\n </Transition>\n );\n}\n"]}
@@ -1,90 +1,91 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "background": "awsui_background_hyvsj_1el08_145",
5
- "scrolling-background": "awsui_scrolling-background_hyvsj_1el08_148",
6
- "breadcrumbs": "awsui_breadcrumbs_hyvsj_1el08_159",
7
- "drawers-container": "awsui_drawers-container_hyvsj_1el08_172",
8
- "has-open-drawer": "awsui_has-open-drawer_hyvsj_1el08_183",
9
- "disable-body-scroll": "awsui_disable-body-scroll_hyvsj_1el08_204",
10
- "drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_hyvsj_1el08_209",
11
- "has-multiple-triggers": "awsui_has-multiple-triggers_hyvsj_1el08_250",
12
- "drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_hyvsj_1el08_260",
13
- "drawers-trigger-content": "awsui_drawers-trigger-content_hyvsj_1el08_265",
14
- "drawers-trigger-overflow": "awsui_drawers-trigger-overflow_hyvsj_1el08_279",
15
- "drawers-trigger": "awsui_drawers-trigger_hyvsj_1el08_265",
16
- "drawer": "awsui_drawer_hyvsj_1el08_172",
17
- "drawer-content-container": "awsui_drawer-content-container_hyvsj_1el08_310",
18
- "drawer-close-button": "awsui_drawer-close-button_hyvsj_1el08_319",
19
- "drawer-content": "awsui_drawer-content_hyvsj_1el08_310",
20
- "drawer-content-hidden": "awsui_drawer-content-hidden_hyvsj_1el08_327",
21
- "drawer-slider": "awsui_drawer-slider_hyvsj_1el08_330",
22
- "is-drawer-open": "awsui_is-drawer-open_hyvsj_1el08_337",
23
- "content": "awsui_content_hyvsj_1el08_363",
24
- "layout": "awsui_layout_hyvsj_1el08_388",
25
- "has-max-content-width": "awsui_has-max-content-width_hyvsj_1el08_460",
26
- "content-type-dashboard": "awsui_content-type-dashboard_hyvsj_1el08_475",
27
- "content-type-table": "awsui_content-type-table_hyvsj_1el08_489",
28
- "content-type-cards": "awsui_content-type-cards_hyvsj_1el08_489",
29
- "is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_1el08_495",
30
- "is-hide-mobile-toolbar": "awsui_is-hide-mobile-toolbar_hyvsj_1el08_498",
31
- "has-content-gap-left": "awsui_has-content-gap-left_hyvsj_1el08_512",
32
- "has-content-gap-right": "awsui_has-content-gap-right_hyvsj_1el08_515",
33
- "has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_1el08_525",
34
- "content-first-child-header": "awsui_content-first-child-header_hyvsj_1el08_528",
35
- "content-first-child-notifications": "awsui_content-first-child-notifications_hyvsj_1el08_528",
36
- "has-header": "awsui_has-header_hyvsj_1el08_528",
37
- "content-first-child-main": "awsui_content-first-child-main_hyvsj_1el08_543",
38
- "disable-content-paddings": "awsui_disable-content-paddings_hyvsj_1el08_543",
39
- "has-left-toggles-gutter": "awsui_has-left-toggles-gutter_hyvsj_1el08_563",
40
- "has-right-toggles-gutter": "awsui_has-right-toggles-gutter_hyvsj_1el08_566",
41
- "has-split-panel": "awsui_has-split-panel_hyvsj_1el08_586",
42
- "split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_1el08_586",
43
- "block-body-scroll": "awsui_block-body-scroll_hyvsj_1el08_594",
44
- "unfocusable": "awsui_unfocusable_hyvsj_1el08_599",
45
- "container": "awsui_container_hyvsj_1el08_609",
46
- "is-navigation-open": "awsui_is-navigation-open_hyvsj_1el08_635",
47
- "is-tools-open": "awsui_is-tools-open_hyvsj_1el08_638",
48
- "is-split-panel-open": "awsui_is-split-panel-open_hyvsj_1el08_638",
49
- "split-panel-position-side": "awsui_split-panel-position-side_hyvsj_1el08_638",
50
- "has-active-drawer": "awsui_has-active-drawer_hyvsj_1el08_638",
51
- "mobile-toolbar": "awsui_mobile-toolbar_hyvsj_1el08_651",
52
- "remove-high-contrast-header": "awsui_remove-high-contrast-header_hyvsj_1el08_668",
53
- "mobile-toolbar-nav": "awsui_mobile-toolbar-nav_hyvsj_1el08_672",
54
- "mobile-toolbar-breadcrumbs": "awsui_mobile-toolbar-breadcrumbs_hyvsj_1el08_676",
55
- "mobile-toolbar-tools": "awsui_mobile-toolbar-tools_hyvsj_1el08_680",
56
- "navigation-container": "awsui_navigation-container_hyvsj_1el08_689",
57
- "show-navigation": "awsui_show-navigation_hyvsj_1el08_727",
58
- "animating": "awsui_animating_hyvsj_1el08_750",
59
- "showButtons": "awsui_showButtons_hyvsj_1el08_1",
60
- "navigation": "awsui_navigation_hyvsj_1el08_689",
61
- "openNavigation": "awsui_openNavigation_hyvsj_1el08_1",
62
- "animated-content": "awsui_animated-content_hyvsj_1el08_812",
63
- "hide-navigation": "awsui_hide-navigation_hyvsj_1el08_821",
64
- "notifications": "awsui_notifications_hyvsj_1el08_831",
65
- "has-notification-content": "awsui_has-notification-content_hyvsj_1el08_836",
66
- "sticky-notifications": "awsui_sticky-notifications_hyvsj_1el08_840",
67
- "high-contrast": "awsui_high-contrast_hyvsj_1el08_845",
68
- "split-panel-bottom": "awsui_split-panel-bottom_hyvsj_1el08_863",
69
- "position-bottom": "awsui_position-bottom_hyvsj_1el08_910",
70
- "openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_1el08_1",
71
- "split-panel-side": "awsui_split-panel-side_hyvsj_1el08_939",
72
- "position-side": "awsui_position-side_hyvsj_1el08_952",
73
- "tools-container": "awsui_tools-container_hyvsj_1el08_974",
74
- "tools": "awsui_tools_hyvsj_1el08_974",
75
- "openTools": "awsui_openTools_hyvsj_1el08_1",
76
- "has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_1el08_1063",
77
- "hide-tools": "awsui_hide-tools_hyvsj_1el08_1073",
78
- "show-tools": "awsui_show-tools_hyvsj_1el08_1085",
79
- "has-tools-form": "awsui_has-tools-form_hyvsj_1el08_1063",
80
- "trigger-button-styles": "awsui_trigger-button-styles_hyvsj_1el08_1168",
81
- "trigger-badge-wrapper": "awsui_trigger-badge-wrapper_hyvsj_1el08_1184",
82
- "trigger": "awsui_trigger_hyvsj_1el08_1168",
83
- "selected": "awsui_selected_hyvsj_1el08_1236",
84
- "badge": "awsui_badge_hyvsj_1el08_1256",
85
- "trigger-wrapper": "awsui_trigger-wrapper_hyvsj_1el08_1260",
86
- "trigger-wrapper-tooltip-visible": "awsui_trigger-wrapper-tooltip-visible_hyvsj_1el08_1271",
87
- "dot": "awsui_dot_hyvsj_1el08_1275",
88
- "trigger-tooltip": "awsui_trigger-tooltip_hyvsj_1el08_1288"
4
+ "background": "awsui_background_hyvsj_yb9xt_145",
5
+ "scrolling-background": "awsui_scrolling-background_hyvsj_yb9xt_148",
6
+ "breadcrumbs": "awsui_breadcrumbs_hyvsj_yb9xt_159",
7
+ "drawers-container": "awsui_drawers-container_hyvsj_yb9xt_172",
8
+ "has-open-drawer": "awsui_has-open-drawer_hyvsj_yb9xt_183",
9
+ "disable-body-scroll": "awsui_disable-body-scroll_hyvsj_yb9xt_204",
10
+ "drawers-desktop-triggers-container": "awsui_drawers-desktop-triggers-container_hyvsj_yb9xt_209",
11
+ "has-multiple-triggers": "awsui_has-multiple-triggers_hyvsj_yb9xt_250",
12
+ "drawers-mobile-triggers-container": "awsui_drawers-mobile-triggers-container_hyvsj_yb9xt_260",
13
+ "drawers-trigger-content": "awsui_drawers-trigger-content_hyvsj_yb9xt_265",
14
+ "drawers-trigger-overflow": "awsui_drawers-trigger-overflow_hyvsj_yb9xt_279",
15
+ "drawers-trigger": "awsui_drawers-trigger_hyvsj_yb9xt_265",
16
+ "drawer": "awsui_drawer_hyvsj_yb9xt_172",
17
+ "drawer-content-container": "awsui_drawer-content-container_hyvsj_yb9xt_310",
18
+ "drawer-close-button": "awsui_drawer-close-button_hyvsj_yb9xt_319",
19
+ "drawer-content": "awsui_drawer-content_hyvsj_yb9xt_310",
20
+ "drawer-content-hidden": "awsui_drawer-content-hidden_hyvsj_yb9xt_328",
21
+ "drawer-slider": "awsui_drawer-slider_hyvsj_yb9xt_331",
22
+ "is-drawer-open": "awsui_is-drawer-open_hyvsj_yb9xt_338",
23
+ "content": "awsui_content_hyvsj_yb9xt_364",
24
+ "layout": "awsui_layout_hyvsj_yb9xt_389",
25
+ "has-max-content-width": "awsui_has-max-content-width_hyvsj_yb9xt_461",
26
+ "content-type-dashboard": "awsui_content-type-dashboard_hyvsj_yb9xt_476",
27
+ "content-type-table": "awsui_content-type-table_hyvsj_yb9xt_490",
28
+ "content-type-cards": "awsui_content-type-cards_hyvsj_yb9xt_490",
29
+ "is-overlap-disabled": "awsui_is-overlap-disabled_hyvsj_yb9xt_496",
30
+ "is-hide-mobile-toolbar": "awsui_is-hide-mobile-toolbar_hyvsj_yb9xt_499",
31
+ "has-content-gap-left": "awsui_has-content-gap-left_hyvsj_yb9xt_513",
32
+ "has-content-gap-right": "awsui_has-content-gap-right_hyvsj_yb9xt_516",
33
+ "has-breadcrumbs": "awsui_has-breadcrumbs_hyvsj_yb9xt_526",
34
+ "content-first-child-header": "awsui_content-first-child-header_hyvsj_yb9xt_529",
35
+ "content-first-child-notifications": "awsui_content-first-child-notifications_hyvsj_yb9xt_529",
36
+ "has-header": "awsui_has-header_hyvsj_yb9xt_529",
37
+ "content-first-child-main": "awsui_content-first-child-main_hyvsj_yb9xt_544",
38
+ "disable-content-paddings": "awsui_disable-content-paddings_hyvsj_yb9xt_544",
39
+ "has-left-toggles-gutter": "awsui_has-left-toggles-gutter_hyvsj_yb9xt_564",
40
+ "has-right-toggles-gutter": "awsui_has-right-toggles-gutter_hyvsj_yb9xt_567",
41
+ "has-split-panel": "awsui_has-split-panel_hyvsj_yb9xt_587",
42
+ "split-panel-position-bottom": "awsui_split-panel-position-bottom_hyvsj_yb9xt_587",
43
+ "block-body-scroll": "awsui_block-body-scroll_hyvsj_yb9xt_595",
44
+ "unfocusable": "awsui_unfocusable_hyvsj_yb9xt_600",
45
+ "container": "awsui_container_hyvsj_yb9xt_610",
46
+ "is-navigation-open": "awsui_is-navigation-open_hyvsj_yb9xt_636",
47
+ "is-tools-open": "awsui_is-tools-open_hyvsj_yb9xt_639",
48
+ "is-split-panel-open": "awsui_is-split-panel-open_hyvsj_yb9xt_639",
49
+ "split-panel-position-side": "awsui_split-panel-position-side_hyvsj_yb9xt_639",
50
+ "has-active-drawer": "awsui_has-active-drawer_hyvsj_yb9xt_639",
51
+ "mobile-toolbar": "awsui_mobile-toolbar_hyvsj_yb9xt_652",
52
+ "remove-high-contrast-header": "awsui_remove-high-contrast-header_hyvsj_yb9xt_669",
53
+ "mobile-toolbar-nav": "awsui_mobile-toolbar-nav_hyvsj_yb9xt_673",
54
+ "mobile-toolbar-breadcrumbs": "awsui_mobile-toolbar-breadcrumbs_hyvsj_yb9xt_677",
55
+ "mobile-toolbar-tools": "awsui_mobile-toolbar-tools_hyvsj_yb9xt_681",
56
+ "navigation-container": "awsui_navigation-container_hyvsj_yb9xt_690",
57
+ "show-navigation": "awsui_show-navigation_hyvsj_yb9xt_728",
58
+ "animating": "awsui_animating_hyvsj_yb9xt_751",
59
+ "showButtons": "awsui_showButtons_hyvsj_yb9xt_1",
60
+ "navigation": "awsui_navigation_hyvsj_yb9xt_690",
61
+ "openNavigation": "awsui_openNavigation_hyvsj_yb9xt_1",
62
+ "animated-content": "awsui_animated-content_hyvsj_yb9xt_815",
63
+ "content-container": "awsui_content-container_hyvsj_yb9xt_818",
64
+ "hide-navigation": "awsui_hide-navigation_hyvsj_yb9xt_827",
65
+ "notifications": "awsui_notifications_hyvsj_yb9xt_837",
66
+ "has-notification-content": "awsui_has-notification-content_hyvsj_yb9xt_842",
67
+ "sticky-notifications": "awsui_sticky-notifications_hyvsj_yb9xt_846",
68
+ "high-contrast": "awsui_high-contrast_hyvsj_yb9xt_851",
69
+ "split-panel-bottom": "awsui_split-panel-bottom_hyvsj_yb9xt_869",
70
+ "position-bottom": "awsui_position-bottom_hyvsj_yb9xt_916",
71
+ "openSplitPanelBottom": "awsui_openSplitPanelBottom_hyvsj_yb9xt_1",
72
+ "split-panel-side": "awsui_split-panel-side_hyvsj_yb9xt_945",
73
+ "position-side": "awsui_position-side_hyvsj_yb9xt_958",
74
+ "tools-container": "awsui_tools-container_hyvsj_yb9xt_980",
75
+ "tools": "awsui_tools_hyvsj_yb9xt_980",
76
+ "openTools": "awsui_openTools_hyvsj_yb9xt_1",
77
+ "has-tools-form-persistence": "awsui_has-tools-form-persistence_hyvsj_yb9xt_1069",
78
+ "hide-tools": "awsui_hide-tools_hyvsj_yb9xt_1079",
79
+ "show-tools": "awsui_show-tools_hyvsj_yb9xt_1091",
80
+ "has-tools-form": "awsui_has-tools-form_hyvsj_yb9xt_1069",
81
+ "trigger-button-styles": "awsui_trigger-button-styles_hyvsj_yb9xt_1174",
82
+ "trigger-badge-wrapper": "awsui_trigger-badge-wrapper_hyvsj_yb9xt_1190",
83
+ "trigger": "awsui_trigger_hyvsj_yb9xt_1174",
84
+ "selected": "awsui_selected_hyvsj_yb9xt_1242",
85
+ "badge": "awsui_badge_hyvsj_yb9xt_1262",
86
+ "trigger-wrapper": "awsui_trigger-wrapper_hyvsj_yb9xt_1266",
87
+ "trigger-wrapper-tooltip-visible": "awsui_trigger-wrapper-tooltip-visible_hyvsj_yb9xt_1277",
88
+ "dot": "awsui_dot_hyvsj_yb9xt_1281",
89
+ "trigger-tooltip": "awsui_trigger-tooltip_hyvsj_yb9xt_1294"
89
90
  };
90
91