@cloudscape-design/components-themeable 3.0.1324 → 3.0.1326
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.
- package/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/badge/styles.scss +4 -4
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/link/constants.scss +2 -2
- package/lib/internal/scss/side-navigation/styles.scss +6 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js +3 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/index.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +3 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js.map +1 -1
- package/lib/internal/template/badge/styles.css.js +10 -10
- package/lib/internal/template/badge/styles.scoped.css +14 -14
- package/lib/internal/template/badge/styles.selectors.js +10 -10
- package/lib/internal/template/code-editor/interfaces.js.map +1 -1
- package/lib/internal/template/error-boundary/interfaces.d.ts +1 -0
- package/lib/internal/template/error-boundary/interfaces.d.ts.map +1 -1
- package/lib/internal/template/error-boundary/interfaces.js.map +1 -1
- package/lib/internal/template/error-boundary/internal.d.ts +1 -1
- package/lib/internal/template/error-boundary/internal.d.ts.map +1 -1
- package/lib/internal/template/error-boundary/internal.js +7 -3
- package/lib/internal/template/error-boundary/internal.js.map +1 -1
- package/lib/internal/template/help-panel/styles.css.js +6 -6
- package/lib/internal/template/help-panel/styles.scoped.css +69 -69
- package/lib/internal/template/help-panel/styles.selectors.js +6 -6
- package/lib/internal/template/icon/generated/icons.d.ts +1 -0
- package/lib/internal/template/icon/generated/icons.d.ts.map +1 -1
- package/lib/internal/template/icon/generated/icons.js +2 -0
- package/lib/internal/template/icon/generated/icons.js.map +1 -1
- package/lib/internal/template/icon-provider/interfaces.d.ts +1 -1
- package/lib/internal/template/icon-provider/interfaces.d.ts.map +1 -1
- package/lib/internal/template/icon-provider/interfaces.js.map +1 -1
- package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
- package/lib/internal/template/internal/analytics/components/analytics-funnel.js +16 -5
- package/lib/internal/template/internal/analytics/components/analytics-funnel.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +17 -1
- package/lib/internal/template/internal/components/token-list/styles.css.js +10 -10
- package/lib/internal/template/internal/components/token-list/styles.scoped.css +24 -24
- package/lib/internal/template/internal/components/token-list/styles.selectors.js +10 -10
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/generated/styles/tokens.d.ts +8 -0
- package/lib/internal/template/internal/generated/styles/tokens.js +8 -0
- package/lib/internal/template/internal/generated/theming/index.cjs +176 -0
- package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +45 -0
- package/lib/internal/template/internal/generated/theming/index.d.ts +45 -0
- package/lib/internal/template/internal/generated/theming/index.js +176 -0
- package/lib/internal/template/internal/utils/external-props.js +7 -5
- package/lib/internal/template/internal/utils/external-props.js.map +1 -1
- package/lib/internal/template/link/styles.css.js +21 -21
- package/lib/internal/template/link/styles.scoped.css +86 -86
- package/lib/internal/template/link/styles.selectors.js +21 -21
- package/lib/internal/template/pagination/internal.d.ts.map +1 -1
- package/lib/internal/template/pagination/internal.js +2 -2
- package/lib/internal/template/pagination/internal.js.map +1 -1
- package/lib/internal/template/select/utils/connect-options.d.ts.map +1 -1
- package/lib/internal/template/select/utils/connect-options.js +11 -7
- package/lib/internal/template/select/utils/connect-options.js.map +1 -1
- package/lib/internal/template/select/utils/use-select.d.ts.map +1 -1
- package/lib/internal/template/select/utils/use-select.js +5 -4
- package/lib/internal/template/select/utils/use-select.js.map +1 -1
- package/lib/internal/template/side-navigation/parts.js +4 -3
- package/lib/internal/template/side-navigation/parts.js.map +1 -1
- package/lib/internal/template/side-navigation/styles.css.js +47 -46
- package/lib/internal/template/side-navigation/styles.scoped.css +76 -70
- package/lib/internal/template/side-navigation/styles.selectors.js +47 -46
- package/lib/internal/template/test-utils/dom/pagination/index.d.ts +9 -6
- package/lib/internal/template/test-utils/dom/pagination/index.js +15 -5
- package/lib/internal/template/test-utils/dom/pagination/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/pagination/index.d.ts +8 -6
- package/lib/internal/template/test-utils/selectors/pagination/index.js +9 -5
- package/lib/internal/template/test-utils/selectors/pagination/index.js.map +1 -1
- package/package.json +1 -1
package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-triggers.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,YAAY,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAkB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1E,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,wBAAwB,MAAM,iDAAiD,CAAC;AACvF,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAsCrC,MAAM,UAAU,cAAc,CAAC,EAC7B,UAAU,EACV,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,kBAAkB,GAAG,QAAQ,EAC7B,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,QAAQ,EACR,sBAAsB,EACtB,aAAa,EACb,yBAAyB,EACzB,2BAA2B,EAC3B,gBAAgB,EAChB,mBAAmB,EACnB,0BAA0B,EAC1B,gCAAgC,EAChC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GACZ,IAAI,CAAC,EAAE,KAAK,0BAA0B,IAAI,CAAC,CAAC,gBAAgB,IAAI,IAAI,CAAC,EAAE,KAAK,gBAAgB,CAAC,CAAC;4BAChG,gCAAgC,aAAhC,gCAAgC,uBAAhC,gCAAgC,CAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC;4BAC/F,OAAO;wBACT,CAAC;wBACD,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;4BACnD,IAAI,CAAC,CAAC,gBAAgB,IAAI,EAAE,KAAK,gBAAgB,IAAI,sBAAsB,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;gCACzF,OAAO;4BACT,CAAC;4BACD,2BAA2B,aAA3B,2BAA2B,uBAA3B,2BAA2B,CAAG,EAAE,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC;wBACrE,CAAC;6BAAM,CAAC;4BACN,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAG,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC;wBAC3E,CAAC;oBACH,CAAC,EACD,uBAAuB,EAAE,uBAAuB,GAAG,mBAAmB,GACtE,CAC4B,CACjC,CACG,CACA,CACT,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\n\nimport { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { useMobile } from '../../../internal/hooks/use-mobile';\nimport { splitItems } from '../../drawer/drawers-helpers';\nimport OverflowMenu from '../../drawer/overflow-menu';\nimport { AppLayoutProps, AppLayoutPropsWithDefaults } from '../../interfaces';\nimport { OnChangeParams, TOOLS_DRAWER_ID } from '../../utils/use-drawers';\nimport { Focusable, FocusControlMultipleStates } from '../../utils/use-focus-control';\nimport { InternalDrawer } from '../interfaces';\nimport { FeatureNotificationsProps } from '../state/use-feature-notifications';\nimport TriggerButton from './trigger-button';\n\nimport splitPanelTestUtilStyles from '../../../split-panel/test-classes/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport interface SplitPanelToggleProps {\n displayed: boolean | undefined;\n ariaLabel: string | undefined;\n controlId: string | undefined;\n active: boolean | undefined;\n position: AppLayoutProps.SplitPanelPosition;\n}\ninterface DrawerTriggersProps {\n ariaLabels: AppLayoutPropsWithDefaults['ariaLabels'];\n\n activeDrawerId: string | null;\n drawersFocusRef: React.Ref<Focusable> | undefined;\n drawers: ReadonlyArray<InternalDrawer>;\n onActiveDrawerChange: ((drawerId: string | null, params: OnChangeParams) => void) | undefined;\n\n activeGlobalDrawersIds: ReadonlyArray<string>;\n globalDrawersFocusControl?: FocusControlMultipleStates;\n bottomDrawers?: ReadonlyArray<InternalDrawer>;\n bottomDrawersFocusRef?: React.Ref<Focusable> | undefined;\n globalDrawers: ReadonlyArray<InternalDrawer>;\n onActiveGlobalDrawersChange?: (newDrawerId: string, params: OnChangeParams) => void;\n expandedDrawerId?: string | null;\n setExpandedDrawerId: (value: string | null) => void;\n activeGlobalBottomDrawerId?: string | null;\n onActiveGlobalBottomDrawerChange?: (value: string | null, params: OnChangeParams) => void;\n\n splitPanelOpen?: boolean;\n splitPanelPosition?: AppLayoutProps.SplitPanelPreferences['position'];\n splitPanelToggleProps: SplitPanelToggleProps | undefined;\n splitPanelFocusRef: React.Ref<Focusable> | undefined;\n onSplitPanelToggle: (() => void) | undefined;\n disabled: boolean;\n\n featureNotificationsProps?: FeatureNotificationsProps;\n}\n\nexport function DrawerTriggers({\n ariaLabels,\n activeDrawerId,\n drawers,\n drawersFocusRef,\n onActiveDrawerChange,\n splitPanelOpen,\n splitPanelPosition = 'bottom',\n splitPanelFocusRef,\n splitPanelToggleProps,\n onSplitPanelToggle,\n disabled,\n activeGlobalDrawersIds,\n globalDrawers,\n globalDrawersFocusControl,\n onActiveGlobalDrawersChange,\n expandedDrawerId,\n setExpandedDrawerId,\n activeGlobalBottomDrawerId,\n onActiveGlobalBottomDrawerChange,\n bottomDrawersFocusRef,\n bottomDrawers,\n featureNotificationsProps,\n}: DrawerTriggersProps) {\n const isMobile = useMobile();\n const hasMultipleTriggers = drawers.length > 1;\n const previousActiveLocalDrawerId = useRef(activeDrawerId);\n const previousActiveGlobalBottomDrawerId = useRef(activeGlobalBottomDrawerId);\n const previousActiveGlobalDrawersIds = useRef(activeGlobalDrawersIds);\n const [containerWidth, triggersContainerRef] = useContainerQuery(rect => rect.contentBoxWidth);\n const featureNotificationTriggerRef = useRef<HTMLButtonElement>(null);\n if (!drawers.length && !globalDrawers.length && !bottomDrawers?.length && !splitPanelToggleProps) {\n return null;\n }\n\n if (activeDrawerId) {\n previousActiveLocalDrawerId.current = activeDrawerId;\n }\n\n if (activeGlobalDrawersIds.length) {\n previousActiveGlobalDrawersIds.current = activeGlobalDrawersIds;\n }\n\n if (activeGlobalBottomDrawerId) {\n previousActiveGlobalBottomDrawerId.current = activeGlobalBottomDrawerId;\n }\n\n const getIndexOfOverflowItem = () => {\n if (isMobile) {\n return 2;\n }\n if (containerWidth) {\n const ITEM_WIDTH = 50; // Roughly 34px + padding = 42px but added extra for safety\n const overflowSpot = containerWidth;\n\n const index = Math.floor(overflowSpot / ITEM_WIDTH);\n\n let splitPanelItem = 0;\n if (splitPanelToggleProps) {\n splitPanelItem = 1;\n }\n return index - splitPanelItem;\n }\n return 0;\n };\n\n const indexOfOverflowItem = getIndexOfOverflowItem();\n\n const { visibleItems, overflowItems } = splitItems(\n [...drawers, ...globalDrawers, ...(bottomDrawers || [])],\n indexOfOverflowItem,\n activeDrawerId ?? null\n );\n const overflowMenuHasBadge = !!overflowItems.find(item => item.badge);\n const toolsOnlyMode = drawers.length === 1 && drawers[0].id === TOOLS_DRAWER_ID;\n const globalDrawersStartIndex = drawers.length;\n const hasOpenDrawer = !!activeDrawerId || (splitPanelPosition === 'side' && splitPanelOpen);\n const splitPanelResolvedPosition = splitPanelToggleProps?.position;\n\n const exitExpandedMode = () => {\n if (setExpandedDrawerId) {\n setExpandedDrawerId(null);\n }\n };\n\n return (\n <aside\n className={styles[`drawers-${isMobile ? 'mobile' : 'desktop'}-triggers-container`]}\n aria-label={ariaLabels?.drawers}\n ref={triggersContainerRef}\n role=\"region\"\n >\n {featureNotificationsProps?.renderLatestFeaturePrompt?.({ triggerRef: featureNotificationTriggerRef })}\n <div\n className={styles['drawers-trigger-content']}\n aria-label={ariaLabels?.drawers}\n role=\"toolbar\"\n aria-orientation=\"horizontal\"\n >\n {splitPanelToggleProps && (\n <>\n <TriggerButton\n ariaLabel={splitPanelToggleProps.ariaLabel}\n ariaControls={splitPanelToggleProps.controlId}\n ariaExpanded={!expandedDrawerId && splitPanelToggleProps.active}\n className={clsx(\n styles['drawers-trigger'],\n testutilStyles['drawers-trigger'],\n splitPanelTestUtilStyles['open-button']\n )}\n iconName={splitPanelResolvedPosition === 'side' ? 'view-vertical' : 'view-horizontal'}\n onClick={() => {\n exitExpandedMode();\n if (!!expandedDrawerId && splitPanelToggleProps.active) {\n return;\n }\n onSplitPanelToggle?.();\n }}\n selected={!expandedDrawerId && splitPanelToggleProps.active}\n ref={splitPanelResolvedPosition === 'side' ? splitPanelFocusRef : undefined}\n hasTooltip={true}\n isMobile={isMobile}\n isForSplitPanel={true}\n disabled={disabled}\n />\n {hasMultipleTriggers ? <div className={styles['group-divider']}></div> : null}\n </>\n )}\n {visibleItems.slice(0, globalDrawersStartIndex).map(item => {\n const isForPreviousActiveDrawer = previousActiveLocalDrawerId?.current === item.id;\n const selected = !expandedDrawerId && item.id === activeDrawerId;\n const isFeatureNotificationsDrawer = featureNotificationsProps?.drawer?.id === item.id;\n return (\n <AppLayoutBuiltInErrorBoundary key={item.id}>\n <TriggerButton\n ariaLabel={item.ariaLabels?.triggerButton}\n ariaExpanded={selected}\n ariaControls={activeDrawerId === item.id ? item.id : undefined}\n className={clsx(\n styles['drawers-trigger'],\n !toolsOnlyMode && testutilStyles['drawers-trigger'],\n item.id === TOOLS_DRAWER_ID && testutilStyles['tools-toggle']\n )}\n iconName={item.trigger!.iconName}\n iconSvg={item.trigger!.iconSvg}\n key={item.id}\n onClick={() => {\n exitExpandedMode();\n if (!!expandedDrawerId && activeDrawerId === item.id) {\n return;\n }\n onActiveDrawerChange?.(activeDrawerId !== item.id ? item.id : null, { initiatedByUserAction: true });\n }}\n ref={\n item.id === previousActiveLocalDrawerId.current\n ? drawersFocusRef\n : isFeatureNotificationsDrawer\n ? featureNotificationTriggerRef\n : null\n }\n selected={selected}\n badge={item.badge}\n testId={`awsui-app-layout-trigger-${item.id}`}\n hasTooltip={true}\n hasOpenDrawer={hasOpenDrawer}\n tooltipText={item.ariaLabels?.drawerName}\n isForPreviousActiveDrawer={isForPreviousActiveDrawer}\n isMobile={isMobile}\n disabled={disabled}\n />\n </AppLayoutBuiltInErrorBoundary>\n );\n })}\n {globalDrawersStartIndex > 0 && visibleItems.length > globalDrawersStartIndex && (\n <div className={styles['group-divider']}></div>\n )}\n {visibleItems.slice(globalDrawersStartIndex).map(item => {\n let isForPreviousActiveDrawer = previousActiveGlobalDrawersIds?.current.includes(item.id);\n const isBottom = item.position === 'bottom';\n let selected =\n activeGlobalDrawersIds.includes(item.id) && (!expandedDrawerId || item.id === expandedDrawerId);\n if (isBottom) {\n selected = item.id === activeGlobalBottomDrawerId && (!expandedDrawerId || item.id === expandedDrawerId);\n isForPreviousActiveDrawer = previousActiveGlobalBottomDrawerId.current === item.id;\n }\n\n return (\n <AppLayoutBuiltInErrorBoundary key={item.id}>\n <TriggerButton\n ariaLabel={item.ariaLabels?.triggerButton}\n ariaExpanded={selected}\n ariaControls={selected ? item.id : undefined}\n className={clsx(\n styles['drawers-trigger'],\n testutilStyles['drawers-trigger'],\n testutilStyles['drawers-trigger-global']\n )}\n iconName={item.trigger!.iconName}\n iconSvg={item.trigger!.iconSvg}\n key={item.id}\n onClick={() => {\n exitExpandedMode();\n if (!!expandedDrawerId && item.id !== expandedDrawerId && activeGlobalDrawersIds.includes(item.id)) {\n return;\n }\n if (isBottom) {\n onActiveGlobalBottomDrawerChange?.(selected ? null : item.id, { initiatedByUserAction: true });\n return;\n }\n onActiveGlobalDrawersChange?.(item.id, { initiatedByUserAction: true });\n }}\n ref={isBottom ? bottomDrawersFocusRef : globalDrawersFocusControl?.refs[item.id]?.toggle}\n selected={selected}\n badge={item.badge}\n testId={`awsui-app-layout-trigger-${item.id}`}\n hasTooltip={true}\n hasOpenDrawer={hasOpenDrawer}\n tooltipText={item.ariaLabels?.drawerName}\n isForPreviousActiveDrawer={isForPreviousActiveDrawer}\n isMobile={isMobile}\n disabled={disabled}\n />\n </AppLayoutBuiltInErrorBoundary>\n );\n })}\n {overflowItems.length > 0 && (\n <AppLayoutBuiltInErrorBoundary>\n <OverflowMenu\n items={overflowItems.map(item => {\n const isBottom = item?.position === 'bottom';\n let active =\n activeGlobalDrawersIds.includes(item.id) && (!expandedDrawerId || item.id === expandedDrawerId);\n if (isBottom) {\n active =\n item.id === activeGlobalBottomDrawerId && (!expandedDrawerId || item.id === expandedDrawerId);\n }\n return {\n ...item,\n active,\n };\n })}\n ariaLabel={overflowMenuHasBadge ? ariaLabels?.drawersOverflowWithBadge : ariaLabels?.drawersOverflow}\n customTriggerBuilder={({ onClick, triggerRef, ariaLabel, ariaExpanded, testUtilsClass }) => {\n return (\n <TriggerButton\n ref={triggerRef}\n ariaLabel={ariaLabel}\n ariaExpanded={ariaExpanded}\n badge={overflowMenuHasBadge}\n className={clsx(\n styles['drawers-trigger'],\n testutilStyles['drawers-trigger'],\n testutilStyles['drawers-trigger-global'],\n testUtilsClass\n )}\n iconName=\"ellipsis\"\n onClick={onClick}\n disabled={disabled}\n />\n );\n }}\n onItemClick={event => {\n const id = event.detail.id;\n exitExpandedMode();\n const item = overflowItems.find(item => item.id === id);\n const isBottom = item?.position === 'bottom';\n if (isBottom) {\n const selected =\n item.id === activeGlobalBottomDrawerId && (!expandedDrawerId || item.id === expandedDrawerId);\n onActiveGlobalBottomDrawerChange?.(selected ? null : item.id, { initiatedByUserAction: true });\n return;\n }\n if (globalDrawers.find(drawer => drawer.id === id)) {\n if (!!expandedDrawerId && id !== expandedDrawerId && activeGlobalDrawersIds.includes(id)) {\n return;\n }\n onActiveGlobalDrawersChange?.(id, { initiatedByUserAction: true });\n } else {\n onActiveDrawerChange?.(event.detail.id, { initiatedByUserAction: true });\n }\n }}\n globalDrawersStartIndex={globalDrawersStartIndex - indexOfOverflowItem}\n />\n </AppLayoutBuiltInErrorBoundary>\n )}\n </div>\n </aside>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"drawer-triggers.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,YAAY,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAkB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1E,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,wBAAwB,MAAM,iDAAiD,CAAC;AACvF,OAAO,cAAc,MAAM,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,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC;wBAC3E,CAAC;oBACH,CAAC,EACD,uBAAuB,EAAE,uBAAuB,GAAG,mBAAmB,GACtE,CAC4B,CACjC,CACG,CACA,CACT,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\n\nimport { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { useMobile } from '../../../internal/hooks/use-mobile';\nimport { splitItems } from '../../drawer/drawers-helpers';\nimport OverflowMenu from '../../drawer/overflow-menu';\nimport { AppLayoutProps, AppLayoutPropsWithDefaults } from '../../interfaces';\nimport { OnChangeParams, TOOLS_DRAWER_ID } from '../../utils/use-drawers';\nimport { Focusable, FocusControlMultipleStates } from '../../utils/use-focus-control';\nimport { InternalDrawer } from '../interfaces';\nimport { FeatureNotificationsProps } from '../state/use-feature-notifications';\nimport TriggerButton from './trigger-button';\n\nimport splitPanelTestUtilStyles from '../../../split-panel/test-classes/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport interface SplitPanelToggleProps {\n displayed: boolean | undefined;\n ariaLabel: string | undefined;\n controlId: string | undefined;\n active: boolean | undefined;\n position: AppLayoutProps.SplitPanelPosition;\n}\ninterface DrawerTriggersProps {\n ariaLabels: AppLayoutPropsWithDefaults['ariaLabels'];\n\n activeDrawerId: string | null;\n drawersFocusRef: React.Ref<Focusable> | undefined;\n drawers: ReadonlyArray<InternalDrawer>;\n onActiveDrawerChange: ((drawerId: string | null, params: OnChangeParams) => void) | undefined;\n\n activeGlobalDrawersIds: ReadonlyArray<string>;\n globalDrawersFocusControl?: FocusControlMultipleStates;\n bottomDrawers?: ReadonlyArray<InternalDrawer>;\n bottomDrawersFocusRef?: React.Ref<Focusable> | undefined;\n globalDrawers: ReadonlyArray<InternalDrawer>;\n onActiveGlobalDrawersChange?: (newDrawerId: string, params: OnChangeParams) => void;\n expandedDrawerId?: string | null;\n setExpandedDrawerId: (value: string | null) => void;\n activeGlobalBottomDrawerId?: string | null;\n onActiveGlobalBottomDrawerChange?: (value: string | null, params: OnChangeParams) => void;\n\n splitPanelOpen?: boolean;\n splitPanelPosition?: AppLayoutProps.SplitPanelPreferences['position'];\n splitPanelToggleProps: SplitPanelToggleProps | undefined;\n splitPanelFocusRef: React.Ref<Focusable> | undefined;\n onSplitPanelToggle: (() => void) | undefined;\n disabled: boolean;\n\n featureNotificationsProps?: FeatureNotificationsProps;\n}\n\nexport function DrawerTriggers({\n ariaLabels,\n activeDrawerId,\n drawers,\n drawersFocusRef,\n onActiveDrawerChange,\n splitPanelOpen,\n splitPanelPosition = 'bottom',\n splitPanelFocusRef,\n splitPanelToggleProps,\n onSplitPanelToggle,\n disabled,\n activeGlobalDrawersIds,\n globalDrawers,\n globalDrawersFocusControl,\n onActiveGlobalDrawersChange,\n expandedDrawerId,\n setExpandedDrawerId,\n activeGlobalBottomDrawerId,\n onActiveGlobalBottomDrawerChange,\n bottomDrawersFocusRef,\n bottomDrawers,\n featureNotificationsProps,\n}: DrawerTriggersProps) {\n const isMobile = useMobile();\n const hasMultipleTriggers = drawers.length > 1;\n const previousActiveLocalDrawerId = useRef(activeDrawerId);\n const previousActiveGlobalBottomDrawerId = useRef(activeGlobalBottomDrawerId);\n const previousActiveGlobalDrawersIds = useRef(activeGlobalDrawersIds);\n const [containerWidth, triggersContainerRef] = useContainerQuery(rect => rect.contentBoxWidth);\n const featureNotificationTriggerRef = useRef<HTMLButtonElement>(null);\n if (!drawers.length && !globalDrawers.length && !bottomDrawers?.length && !splitPanelToggleProps) {\n return null;\n }\n\n if (activeDrawerId) {\n previousActiveLocalDrawerId.current = activeDrawerId;\n }\n\n if (activeGlobalDrawersIds.length) {\n previousActiveGlobalDrawersIds.current = activeGlobalDrawersIds;\n }\n\n if (activeGlobalBottomDrawerId) {\n previousActiveGlobalBottomDrawerId.current = activeGlobalBottomDrawerId;\n }\n\n const getIndexOfOverflowItem = () => {\n if (isMobile) {\n return 2;\n }\n if (containerWidth) {\n const ITEM_WIDTH = 50; // Roughly 34px + padding = 42px but added extra for safety\n const overflowSpot = containerWidth;\n\n const index = Math.floor(overflowSpot / ITEM_WIDTH);\n\n let splitPanelItem = 0;\n if (splitPanelToggleProps) {\n splitPanelItem = 1;\n }\n return index - splitPanelItem;\n }\n return 0;\n };\n\n const indexOfOverflowItem = getIndexOfOverflowItem();\n\n const { visibleItems, overflowItems } = splitItems(\n [...drawers, ...globalDrawers, ...(bottomDrawers || [])],\n indexOfOverflowItem,\n activeDrawerId ?? null\n );\n const overflowMenuHasBadge = !!overflowItems.find(item => item.badge);\n const toolsOnlyMode = drawers.length === 1 && drawers[0].id === TOOLS_DRAWER_ID;\n const globalDrawersStartIndex = drawers.length;\n const hasOpenDrawer = !!activeDrawerId || (splitPanelPosition === 'side' && splitPanelOpen);\n const splitPanelResolvedPosition = splitPanelToggleProps?.position;\n\n const exitExpandedMode = () => {\n if (setExpandedDrawerId) {\n setExpandedDrawerId(null);\n }\n };\n\n return (\n <aside\n className={styles[`drawers-${isMobile ? 'mobile' : 'desktop'}-triggers-container`]}\n aria-label={ariaLabels?.drawers}\n ref={triggersContainerRef}\n role=\"region\"\n >\n {featureNotificationsProps?.renderLatestFeaturePrompt?.({ triggerRef: featureNotificationTriggerRef })}\n <div\n className={styles['drawers-trigger-content']}\n aria-label={ariaLabels?.drawers}\n role=\"toolbar\"\n aria-orientation=\"horizontal\"\n >\n {splitPanelToggleProps && (\n <>\n <TriggerButton\n ariaLabel={splitPanelToggleProps.ariaLabel}\n ariaControls={splitPanelToggleProps.controlId}\n ariaExpanded={!expandedDrawerId && splitPanelToggleProps.active}\n className={clsx(\n styles['drawers-trigger'],\n testutilStyles['drawers-trigger'],\n splitPanelTestUtilStyles['open-button']\n )}\n iconName={splitPanelResolvedPosition === 'side' ? 'view-vertical' : 'view-horizontal'}\n onClick={() => {\n exitExpandedMode();\n if (!!expandedDrawerId && splitPanelToggleProps.active) {\n return;\n }\n onSplitPanelToggle?.();\n }}\n selected={!expandedDrawerId && splitPanelToggleProps.active}\n ref={splitPanelResolvedPosition === 'side' ? splitPanelFocusRef : undefined}\n hasTooltip={true}\n isMobile={isMobile}\n isForSplitPanel={true}\n disabled={disabled}\n />\n {hasMultipleTriggers ? <div className={styles['group-divider']}></div> : null}\n </>\n )}\n {visibleItems.slice(0, globalDrawersStartIndex).map(item => {\n const isForPreviousActiveDrawer = previousActiveLocalDrawerId?.current === item.id;\n const selected = !expandedDrawerId && item.id === activeDrawerId;\n const isFeatureNotificationsDrawer = featureNotificationsProps?.drawer?.id === item.id;\n return (\n <AppLayoutBuiltInErrorBoundary key={item.id} appLayoutPart=\"toolbar-trigger-drawer\">\n <TriggerButton\n ariaLabel={item.ariaLabels?.triggerButton}\n ariaExpanded={selected}\n ariaControls={activeDrawerId === item.id ? item.id : undefined}\n className={clsx(\n styles['drawers-trigger'],\n !toolsOnlyMode && testutilStyles['drawers-trigger'],\n item.id === TOOLS_DRAWER_ID && testutilStyles['tools-toggle']\n )}\n iconName={item.trigger!.iconName}\n iconSvg={item.trigger!.iconSvg}\n key={item.id}\n onClick={() => {\n exitExpandedMode();\n if (!!expandedDrawerId && activeDrawerId === item.id) {\n return;\n }\n onActiveDrawerChange?.(activeDrawerId !== item.id ? item.id : null, { initiatedByUserAction: true });\n }}\n ref={\n item.id === previousActiveLocalDrawerId.current\n ? drawersFocusRef\n : isFeatureNotificationsDrawer\n ? featureNotificationTriggerRef\n : null\n }\n selected={selected}\n badge={item.badge}\n testId={`awsui-app-layout-trigger-${item.id}`}\n hasTooltip={true}\n hasOpenDrawer={hasOpenDrawer}\n tooltipText={item.ariaLabels?.drawerName}\n isForPreviousActiveDrawer={isForPreviousActiveDrawer}\n isMobile={isMobile}\n disabled={disabled}\n />\n </AppLayoutBuiltInErrorBoundary>\n );\n })}\n {globalDrawersStartIndex > 0 && visibleItems.length > globalDrawersStartIndex && (\n <div className={styles['group-divider']}></div>\n )}\n {visibleItems.slice(globalDrawersStartIndex).map(item => {\n let isForPreviousActiveDrawer = previousActiveGlobalDrawersIds?.current.includes(item.id);\n const isBottom = item.position === 'bottom';\n let selected =\n activeGlobalDrawersIds.includes(item.id) && (!expandedDrawerId || item.id === expandedDrawerId);\n if (isBottom) {\n selected = item.id === activeGlobalBottomDrawerId && (!expandedDrawerId || item.id === expandedDrawerId);\n isForPreviousActiveDrawer = previousActiveGlobalBottomDrawerId.current === item.id;\n }\n\n return (\n <AppLayoutBuiltInErrorBoundary key={item.id} appLayoutPart=\"toolbar-trigger-drawer\">\n <TriggerButton\n ariaLabel={item.ariaLabels?.triggerButton}\n ariaExpanded={selected}\n ariaControls={selected ? item.id : undefined}\n className={clsx(\n styles['drawers-trigger'],\n testutilStyles['drawers-trigger'],\n testutilStyles['drawers-trigger-global']\n )}\n iconName={item.trigger!.iconName}\n iconSvg={item.trigger!.iconSvg}\n key={item.id}\n onClick={() => {\n exitExpandedMode();\n if (!!expandedDrawerId && item.id !== expandedDrawerId && activeGlobalDrawersIds.includes(item.id)) {\n return;\n }\n if (isBottom) {\n onActiveGlobalBottomDrawerChange?.(selected ? null : item.id, { initiatedByUserAction: true });\n return;\n }\n onActiveGlobalDrawersChange?.(item.id, { initiatedByUserAction: true });\n }}\n ref={isBottom ? bottomDrawersFocusRef : globalDrawersFocusControl?.refs[item.id]?.toggle}\n selected={selected}\n badge={item.badge}\n testId={`awsui-app-layout-trigger-${item.id}`}\n hasTooltip={true}\n hasOpenDrawer={hasOpenDrawer}\n tooltipText={item.ariaLabels?.drawerName}\n isForPreviousActiveDrawer={isForPreviousActiveDrawer}\n isMobile={isMobile}\n disabled={disabled}\n />\n </AppLayoutBuiltInErrorBoundary>\n );\n })}\n {overflowItems.length > 0 && (\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"toolbar-trigger-overflow-menu\">\n <OverflowMenu\n items={overflowItems.map(item => {\n const isBottom = item?.position === 'bottom';\n let active =\n activeGlobalDrawersIds.includes(item.id) && (!expandedDrawerId || item.id === expandedDrawerId);\n if (isBottom) {\n active =\n item.id === activeGlobalBottomDrawerId && (!expandedDrawerId || item.id === expandedDrawerId);\n }\n return {\n ...item,\n active,\n };\n })}\n ariaLabel={overflowMenuHasBadge ? ariaLabels?.drawersOverflowWithBadge : ariaLabels?.drawersOverflow}\n customTriggerBuilder={({ onClick, triggerRef, ariaLabel, ariaExpanded, testUtilsClass }) => {\n return (\n <TriggerButton\n ref={triggerRef}\n ariaLabel={ariaLabel}\n ariaExpanded={ariaExpanded}\n badge={overflowMenuHasBadge}\n className={clsx(\n styles['drawers-trigger'],\n testutilStyles['drawers-trigger'],\n testutilStyles['drawers-trigger-global'],\n testUtilsClass\n )}\n iconName=\"ellipsis\"\n onClick={onClick}\n disabled={disabled}\n />\n );\n }}\n onItemClick={event => {\n const id = event.detail.id;\n exitExpandedMode();\n const item = overflowItems.find(item => item.id === id);\n const isBottom = item?.position === 'bottom';\n if (isBottom) {\n const selected =\n item.id === activeGlobalBottomDrawerId && (!expandedDrawerId || item.id === expandedDrawerId);\n onActiveGlobalBottomDrawerChange?.(selected ? null : item.id, { initiatedByUserAction: true });\n return;\n }\n if (globalDrawers.find(drawer => drawer.id === id)) {\n if (!!expandedDrawerId && id !== expandedDrawerId && activeGlobalDrawersIds.includes(id)) {\n return;\n }\n onActiveGlobalDrawersChange?.(id, { initiatedByUserAction: true });\n } else {\n onActiveDrawerChange?.(event.detail.id, { initiatedByUserAction: true });\n }\n }}\n globalDrawersStartIndex={globalDrawersStartIndex - indexOfOverflowItem}\n />\n </AppLayoutBuiltInErrorBoundary>\n )}\n </div>\n </aside>\n );\n}\n"]}
|
|
@@ -58,7 +58,7 @@ toolbarProps = {}, featureNotificationsProps, }) {
|
|
|
58
58
|
}), style: {
|
|
59
59
|
insetBlockStart: verticalOffsets.toolbar,
|
|
60
60
|
} },
|
|
61
|
-
React.createElement(AppLayoutBuiltInErrorBoundary,
|
|
61
|
+
React.createElement(AppLayoutBuiltInErrorBoundary, { appLayoutPart: "left-drawer-trigger" },
|
|
62
62
|
React.createElement(Transition, { in: !!((aiDrawer === null || aiDrawer === void 0 ? void 0 : aiDrawer.trigger) && !activeAiDrawerId), timeout: { enter: 0, exit: 165 }, mountOnEnter: true, unmountOnExit: true, nodeRef: aiDrawerTransitionRef }, state => {
|
|
63
63
|
var _a, _b, _c;
|
|
64
64
|
return (React.createElement("div", { className: clsx(!!((_a = aiDrawer === null || aiDrawer === void 0 ? void 0 : aiDrawer.trigger) === null || _a === void 0 ? void 0 : _a.customIcon) && styles['universal-toolbar-ai-custom'], [
|
|
@@ -76,7 +76,7 @@ toolbarProps = {}, featureNotificationsProps, }) {
|
|
|
76
76
|
})),
|
|
77
77
|
React.createElement(ToolbarContainer, { hasAiDrawer: !!activeAiDrawerId },
|
|
78
78
|
hasNavigation && (React.createElement("nav", { ...navLandmarkAttributes, className: clsx(styles['universal-toolbar-nav']) },
|
|
79
|
-
React.createElement(AppLayoutBuiltInErrorBoundary,
|
|
79
|
+
React.createElement(AppLayoutBuiltInErrorBoundary, { appLayoutPart: "toolbar-trigger-nav" },
|
|
80
80
|
React.createElement(TriggerButton, { ariaLabel: (_a = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.navigationToggle) !== null && _a !== void 0 ? _a : undefined, ariaExpanded: !drawerExpandedMode && navigationOpen, iconName: "menu", className: testutilStyles['navigation-toggle'], onClick: () => {
|
|
81
81
|
if (setExpandedDrawerId) {
|
|
82
82
|
setExpandedDrawerId(null);
|
|
@@ -86,13 +86,13 @@ toolbarProps = {}, featureNotificationsProps, }) {
|
|
|
86
86
|
}
|
|
87
87
|
onNavigationToggle === null || onNavigationToggle === void 0 ? void 0 : onNavigationToggle(!navigationOpen);
|
|
88
88
|
}, ref: navigationFocusRef, selected: !drawerExpandedMode && navigationOpen, disabled: anyPanelOpenInMobile })))),
|
|
89
|
-
(breadcrumbs || discoveredBreadcrumbs) && (React.createElement(AppLayoutBuiltInErrorBoundary,
|
|
89
|
+
(breadcrumbs || discoveredBreadcrumbs) && (React.createElement(AppLayoutBuiltInErrorBoundary, { appLayoutPart: "breadcrumbs" },
|
|
90
90
|
React.createElement(ToolbarBreadcrumbsSection, { ownBreadcrumbs: appLayoutInternals.breadcrumbs, discoveredBreadcrumbs: appLayoutInternals.discoveredBreadcrumbs, includeTestUtils: true }))),
|
|
91
91
|
((drawers === null || drawers === void 0 ? void 0 : drawers.length) ||
|
|
92
92
|
(globalDrawers === null || globalDrawers === void 0 ? void 0 : globalDrawers.length) ||
|
|
93
93
|
(bottomDrawers === null || bottomDrawers === void 0 ? void 0 : bottomDrawers.length) ||
|
|
94
94
|
(hasSplitPanel && (splitPanelToggleProps === null || splitPanelToggleProps === void 0 ? void 0 : splitPanelToggleProps.displayed))) && (React.createElement("div", { className: clsx(styles['universal-toolbar-drawers']) },
|
|
95
|
-
React.createElement(AppLayoutBuiltInErrorBoundary,
|
|
95
|
+
React.createElement(AppLayoutBuiltInErrorBoundary, { appLayoutPart: "toolbar-triggers" },
|
|
96
96
|
React.createElement(DrawerTriggers, { ariaLabels: ariaLabels, activeDrawerId: activeDrawerId !== null && activeDrawerId !== void 0 ? activeDrawerId : null, drawers: (_b = drawers === null || drawers === void 0 ? void 0 : drawers.filter(item => !!item.trigger)) !== null && _b !== void 0 ? _b : [], drawersFocusRef: drawersFocusRef, onActiveDrawerChange: onActiveDrawerChange, splitPanelToggleProps: (splitPanelToggleProps === null || splitPanelToggleProps === void 0 ? void 0 : splitPanelToggleProps.displayed) ? splitPanelToggleProps : undefined, splitPanelFocusRef: splitPanelFocusRef, onSplitPanelToggle: onSplitPanelToggle, disabled: anyPanelOpenInMobile, globalDrawersFocusControl: globalDrawersFocusControl, bottomDrawersFocusRef: bottomDrawersFocusRef, globalDrawers: (_c = globalDrawers === null || globalDrawers === void 0 ? void 0 : globalDrawers.filter(item => !!item.trigger)) !== null && _c !== void 0 ? _c : [], activeGlobalDrawersIds: activeGlobalDrawersIds !== null && activeGlobalDrawersIds !== void 0 ? activeGlobalDrawersIds : [], onActiveGlobalDrawersChange: onActiveGlobalDrawersChange, expandedDrawerId: expandedDrawerId, setExpandedDrawerId: setExpandedDrawerId, bottomDrawers: bottomDrawers, onActiveGlobalBottomDrawerChange: onActiveGlobalBottomDrawerChange, activeGlobalBottomDrawerId: activeGlobalBottomDrawerId, featureNotificationsProps: featureNotificationsProps })))))));
|
|
97
97
|
}
|
|
98
98
|
export const AppLayoutToolbar = createWidgetizedComponent(AppLayoutToolbarImplementation, ToolbarSkeleton);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAKtE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAE5F,OAAO,EAAE,cAAc,EAAyB,MAAM,mBAAmB,CAAC;AAC1E,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,O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AkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,oBAAoB,EAC9B,yBAAyB,EAAE,yBAAyB,EACpD,qBAAqB,EAAE,qBAAqB,EAC5C,aAAa,EAAE,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mCAAI,EAAE,EAClE,sBAAsB,EAAE,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,EAAE,EACpD,2BAA2B,EAAE,2BAA2B,EACxD,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAoB,EACzC,aAAa,EAAE,aAAa,EAC5B,gCAAgC,EAAE,gCAAgC,EAClE,0BAA0B,EAAE,0BAA0B,EACtD,yBAAyB,EAAE,yBAAyB,GACpD,CAC4B,CAC5B,CACP,CACgB,CACP,CACf,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,8BAA8B,EAAE,eAAe,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport { Transition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutProps } from '../../interfaces';\nimport { OnChangeParams } from '../../utils/use-drawers';\nimport { Focusable, FocusControlMultipleStates } from '../../utils/use-focus-control';\nimport { AppLayoutInternals } from '../interfaces';\nimport { ToolbarSkeleton } from '../skeleton/skeleton-parts';\nimport { ToolbarSlot } from '../skeleton/slots';\nimport { ToolbarBreadcrumbsSection, ToolbarContainer } from '../skeleton/toolbar-container';\nimport { FeatureNotificationsProps } from '../state/use-feature-notifications';\nimport { DrawerTriggers, SplitPanelToggleProps } from './drawer-triggers';\nimport TriggerButton from './trigger-button';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport { SplitPanelToggleProps };\n\nexport interface ToolbarProps {\n ariaLabels?: AppLayoutProps.Labels;\n // navigation\n hasNavigation?: boolean;\n navigationOpen?: boolean;\n onNavigationToggle?: (open: boolean) => void;\n navigationFocusRef?: React.Ref<Focusable>;\n\n // breadcrumbs\n hasBreadcrumbsPortal?: boolean;\n\n // split panel\n hasSplitPanel?: boolean;\n splitPanelToggleProps?: SplitPanelToggleProps;\n splitPanelFocusRef?: React.Ref<Focusable>;\n onSplitPanelToggle?: () => void;\n\n // drawers\n activeDrawerId?: string | null;\n drawers?: ReadonlyArray<AppLayoutProps.Drawer>;\n drawersFocusRef?: React.Ref<Focusable>;\n bottomDrawersFocusRef?: React.Ref<Focusable>;\n globalDrawersFocusControl?: FocusControlMultipleStates;\n onActiveDrawerChange?: (drawerId: string | null, params: OnChangeParams) => void;\n globalDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalDrawersIds?: ReadonlyArray<string>;\n onActiveGlobalDrawersChange?: ((drawerId: string, params: OnChangeParams) => void) | undefined;\n bottomDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalBottomDrawerId?: string | null;\n onActiveGlobalBottomDrawerChange?: (value: string | null, params: OnChangeParams) => void;\n\n expandedDrawerId?: string | null;\n setExpandedDrawerId?: (value: string | null) => void;\n\n aiDrawer?: AppLayoutProps.Drawer;\n onActiveAiDrawerChange?: (value: string | null) => void;\n activeAiDrawerId?: string | null;\n aiDrawerFocusRef?: React.Ref<Focusable>;\n}\n\nexport interface AppLayoutToolbarImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n toolbarProps: ToolbarProps;\n featureNotificationsProps?: FeatureNotificationsProps;\n}\n\nexport function AppLayoutToolbarImplementation({\n appLayoutInternals,\n // the value could be undefined if this component is loaded as a widget by a different app layout version\n // not testable in a single-version setup\n toolbarProps = {},\n featureNotificationsProps,\n}: AppLayoutToolbarImplementationProps) {\n const {\n breadcrumbs,\n discoveredBreadcrumbs,\n verticalOffsets,\n isMobile,\n setToolbarHeight,\n aiDrawer,\n activeAiDrawer,\n onActiveAiDrawerChange,\n } = appLayoutInternals;\n const {\n ariaLabels,\n activeDrawerId,\n drawers,\n drawersFocusRef,\n onActiveDrawerChange,\n globalDrawersFocusControl,\n globalDrawers,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange,\n hasNavigation,\n navigationOpen,\n navigationFocusRef,\n onNavigationToggle,\n hasSplitPanel,\n splitPanelFocusRef,\n splitPanelToggleProps,\n onSplitPanelToggle,\n expandedDrawerId,\n setExpandedDrawerId,\n aiDrawerFocusRef,\n onActiveGlobalBottomDrawerChange,\n activeGlobalBottomDrawerId,\n bottomDrawersFocusRef,\n bottomDrawers,\n } = toolbarProps;\n const drawerExpandedMode = !!expandedDrawerId;\n const ref = useRef<HTMLElement>(null);\n const aiDrawerTransitionRef = useRef<HTMLDivElement>(null);\n const activeAiDrawerId = activeAiDrawer?.id;\n useResizeObserver(ref, entry => setToolbarHeight(entry.borderBoxHeight));\n useEffect(() => {\n return () => {\n setToolbarHeight(0);\n };\n // unmount effect only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const anyPanelOpenInMobile =\n !!isMobile &&\n (!!activeDrawerId ||\n !!activeGlobalDrawersIds?.length ||\n !!activeAiDrawerId ||\n !!activeGlobalBottomDrawerId ||\n (!!navigationOpen && !!hasNavigation));\n useEffect(() => {\n if (anyPanelOpenInMobile) {\n document.body.classList.add(styles['block-body-scroll']);\n } else {\n document.body.classList.remove(styles['block-body-scroll']);\n }\n return () => {\n document.body.classList.remove(styles['block-body-scroll']);\n };\n }, [anyPanelOpenInMobile]);\n\n const navLandmarkAttributes = navigationOpen\n ? { role: 'presentation' }\n : { role: 'navigation', 'aria-label': ariaLabels?.navigation };\n\n return (\n <ToolbarSlot\n ref={ref}\n className={clsx((aiDrawer?.trigger || !!activeAiDrawerId) && styles['with-ai-drawer'], {\n [testutilStyles['mobile-bar']]: isMobile,\n })}\n style={{\n insetBlockStart: verticalOffsets.toolbar,\n }}\n >\n <AppLayoutBuiltInErrorBoundary>\n <Transition\n in={!!(aiDrawer?.trigger && !activeAiDrawerId)}\n timeout={{ enter: 0, exit: 165 }}\n mountOnEnter={true}\n unmountOnExit={true}\n nodeRef={aiDrawerTransitionRef}\n >\n {state => (\n <div\n className={clsx(!!aiDrawer?.trigger?.customIcon && styles['universal-toolbar-ai-custom'], [\n sharedStyles['with-motion-horizontal'],\n ])}\n style={{\n opacity: ['entering', 'exiting'].includes(state) ? 0 : 1,\n }}\n >\n <TriggerButton\n ariaLabel={aiDrawer?.ariaLabels?.triggerButton}\n ariaExpanded={!!activeAiDrawerId}\n iconName={aiDrawer?.trigger!.iconName}\n iconSvg={aiDrawer?.trigger!.iconSvg}\n customSvg={aiDrawer?.trigger!.customIcon}\n className={testutilStyles['ai-drawer-toggle']}\n onClick={() => {\n if (setExpandedDrawerId) {\n setExpandedDrawerId(null);\n }\n onActiveAiDrawerChange?.(aiDrawer?.id ?? null, { initiatedByUserAction: true });\n }}\n ref={aiDrawerFocusRef}\n selected={!drawerExpandedMode && !!activeAiDrawerId}\n disabled={anyPanelOpenInMobile}\n variant={aiDrawer?.trigger?.customIcon ? 'custom' : 'default'}\n testId={`awsui-app-layout-trigger-${aiDrawer?.id}`}\n isForPreviousActiveDrawer={true}\n />\n </div>\n )}\n </Transition>\n </AppLayoutBuiltInErrorBoundary>\n <ToolbarContainer hasAiDrawer={!!activeAiDrawerId}>\n {hasNavigation && (\n <nav {...navLandmarkAttributes} className={clsx(styles['universal-toolbar-nav'])}>\n <AppLayoutBuiltInErrorBoundary>\n <TriggerButton\n ariaLabel={ariaLabels?.navigationToggle ?? undefined}\n ariaExpanded={!drawerExpandedMode && navigationOpen}\n iconName=\"menu\"\n className={testutilStyles['navigation-toggle']}\n onClick={() => {\n if (setExpandedDrawerId) {\n setExpandedDrawerId(null);\n }\n if (navigationOpen && expandedDrawerId) {\n return;\n }\n onNavigationToggle?.(!navigationOpen);\n }}\n ref={navigationFocusRef}\n selected={!drawerExpandedMode && navigationOpen}\n disabled={anyPanelOpenInMobile}\n />\n </AppLayoutBuiltInErrorBoundary>\n </nav>\n )}\n {(breadcrumbs || discoveredBreadcrumbs) && (\n <AppLayoutBuiltInErrorBoundary>\n <ToolbarBreadcrumbsSection\n ownBreadcrumbs={appLayoutInternals.breadcrumbs}\n discoveredBreadcrumbs={appLayoutInternals.discoveredBreadcrumbs}\n includeTestUtils={true}\n />\n </AppLayoutBuiltInErrorBoundary>\n )}\n {(drawers?.length ||\n globalDrawers?.length ||\n bottomDrawers?.length ||\n (hasSplitPanel && splitPanelToggleProps?.displayed)) && (\n <div className={clsx(styles['universal-toolbar-drawers'])}>\n <AppLayoutBuiltInErrorBoundary>\n <DrawerTriggers\n ariaLabels={ariaLabels}\n activeDrawerId={activeDrawerId ?? null}\n drawers={drawers?.filter(item => !!item.trigger) ?? []}\n drawersFocusRef={drawersFocusRef}\n onActiveDrawerChange={onActiveDrawerChange}\n splitPanelToggleProps={splitPanelToggleProps?.displayed ? splitPanelToggleProps : undefined}\n splitPanelFocusRef={splitPanelFocusRef}\n onSplitPanelToggle={onSplitPanelToggle}\n disabled={anyPanelOpenInMobile}\n globalDrawersFocusControl={globalDrawersFocusControl}\n bottomDrawersFocusRef={bottomDrawersFocusRef}\n globalDrawers={globalDrawers?.filter(item => !!item.trigger) ?? []}\n activeGlobalDrawersIds={activeGlobalDrawersIds ?? []}\n onActiveGlobalDrawersChange={onActiveGlobalDrawersChange}\n expandedDrawerId={expandedDrawerId}\n setExpandedDrawerId={setExpandedDrawerId!}\n bottomDrawers={bottomDrawers}\n onActiveGlobalBottomDrawerChange={onActiveGlobalBottomDrawerChange}\n activeGlobalBottomDrawerId={activeGlobalBottomDrawerId}\n featureNotificationsProps={featureNotificationsProps}\n />\n </AppLayoutBuiltInErrorBoundary>\n </div>\n )}\n </ToolbarContainer>\n </ToolbarSlot>\n );\n}\n\nexport const AppLayoutToolbar = createWidgetizedComponent(AppLayoutToolbarImplementation, ToolbarSkeleton);\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAKtE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAE5F,OAAO,EAAE,cAAc,EAAyB,MAAM,mBAAmB,CAAC;AAC1E,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAkDrC,MAAM,UAAU,8BAA8B,CAAC,EAC7C,kBAAkB;AAClB,yGAAyG;AACzG,yCAAyC;AACzC,YAAY,GAAG,EAAE,EACjB,yBAAyB,GACW;;IACpC,MAAM,EACJ,WAAW,EACX,qBAAqB,EACrB,eAAe,EACf,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,cAAc,E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,aAAa,CAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mCAAI,EAAE,EAClE,sBAAsB,EAAE,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,EAAE,EACpD,2BAA2B,EAAE,2BAA2B,EACxD,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAoB,EACzC,aAAa,EAAE,aAAa,EAC5B,gCAAgC,EAAE,gCAAgC,EAClE,0BAA0B,EAAE,0BAA0B,EACtD,yBAAyB,EAAE,yBAAyB,GACpD,CAC4B,CAC5B,CACP,CACgB,CACP,CACf,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,8BAA8B,EAAE,eAAe,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport { Transition } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutProps } from '../../interfaces';\nimport { OnChangeParams } from '../../utils/use-drawers';\nimport { Focusable, FocusControlMultipleStates } from '../../utils/use-focus-control';\nimport { AppLayoutInternals } from '../interfaces';\nimport { ToolbarSkeleton } from '../skeleton/skeleton-parts';\nimport { ToolbarSlot } from '../skeleton/slots';\nimport { ToolbarBreadcrumbsSection, ToolbarContainer } from '../skeleton/toolbar-container';\nimport { FeatureNotificationsProps } from '../state/use-feature-notifications';\nimport { DrawerTriggers, SplitPanelToggleProps } from './drawer-triggers';\nimport TriggerButton from './trigger-button';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport { SplitPanelToggleProps };\n\nexport interface ToolbarProps {\n ariaLabels?: AppLayoutProps.Labels;\n // navigation\n hasNavigation?: boolean;\n navigationOpen?: boolean;\n onNavigationToggle?: (open: boolean) => void;\n navigationFocusRef?: React.Ref<Focusable>;\n\n // breadcrumbs\n hasBreadcrumbsPortal?: boolean;\n\n // split panel\n hasSplitPanel?: boolean;\n splitPanelToggleProps?: SplitPanelToggleProps;\n splitPanelFocusRef?: React.Ref<Focusable>;\n onSplitPanelToggle?: () => void;\n\n // drawers\n activeDrawerId?: string | null;\n drawers?: ReadonlyArray<AppLayoutProps.Drawer>;\n drawersFocusRef?: React.Ref<Focusable>;\n bottomDrawersFocusRef?: React.Ref<Focusable>;\n globalDrawersFocusControl?: FocusControlMultipleStates;\n onActiveDrawerChange?: (drawerId: string | null, params: OnChangeParams) => void;\n globalDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalDrawersIds?: ReadonlyArray<string>;\n onActiveGlobalDrawersChange?: ((drawerId: string, params: OnChangeParams) => void) | undefined;\n bottomDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalBottomDrawerId?: string | null;\n onActiveGlobalBottomDrawerChange?: (value: string | null, params: OnChangeParams) => void;\n\n expandedDrawerId?: string | null;\n setExpandedDrawerId?: (value: string | null) => void;\n\n aiDrawer?: AppLayoutProps.Drawer;\n onActiveAiDrawerChange?: (value: string | null) => void;\n activeAiDrawerId?: string | null;\n aiDrawerFocusRef?: React.Ref<Focusable>;\n}\n\nexport interface AppLayoutToolbarImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n toolbarProps: ToolbarProps;\n featureNotificationsProps?: FeatureNotificationsProps;\n}\n\nexport function AppLayoutToolbarImplementation({\n appLayoutInternals,\n // the value could be undefined if this component is loaded as a widget by a different app layout version\n // not testable in a single-version setup\n toolbarProps = {},\n featureNotificationsProps,\n}: AppLayoutToolbarImplementationProps) {\n const {\n breadcrumbs,\n discoveredBreadcrumbs,\n verticalOffsets,\n isMobile,\n setToolbarHeight,\n aiDrawer,\n activeAiDrawer,\n onActiveAiDrawerChange,\n } = appLayoutInternals;\n const {\n ariaLabels,\n activeDrawerId,\n drawers,\n drawersFocusRef,\n onActiveDrawerChange,\n globalDrawersFocusControl,\n globalDrawers,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange,\n hasNavigation,\n navigationOpen,\n navigationFocusRef,\n onNavigationToggle,\n hasSplitPanel,\n splitPanelFocusRef,\n splitPanelToggleProps,\n onSplitPanelToggle,\n expandedDrawerId,\n setExpandedDrawerId,\n aiDrawerFocusRef,\n onActiveGlobalBottomDrawerChange,\n activeGlobalBottomDrawerId,\n bottomDrawersFocusRef,\n bottomDrawers,\n } = toolbarProps;\n const drawerExpandedMode = !!expandedDrawerId;\n const ref = useRef<HTMLElement>(null);\n const aiDrawerTransitionRef = useRef<HTMLDivElement>(null);\n const activeAiDrawerId = activeAiDrawer?.id;\n useResizeObserver(ref, entry => setToolbarHeight(entry.borderBoxHeight));\n useEffect(() => {\n return () => {\n setToolbarHeight(0);\n };\n // unmount effect only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const anyPanelOpenInMobile =\n !!isMobile &&\n (!!activeDrawerId ||\n !!activeGlobalDrawersIds?.length ||\n !!activeAiDrawerId ||\n !!activeGlobalBottomDrawerId ||\n (!!navigationOpen && !!hasNavigation));\n useEffect(() => {\n if (anyPanelOpenInMobile) {\n document.body.classList.add(styles['block-body-scroll']);\n } else {\n document.body.classList.remove(styles['block-body-scroll']);\n }\n return () => {\n document.body.classList.remove(styles['block-body-scroll']);\n };\n }, [anyPanelOpenInMobile]);\n\n const navLandmarkAttributes = navigationOpen\n ? { role: 'presentation' }\n : { role: 'navigation', 'aria-label': ariaLabels?.navigation };\n\n return (\n <ToolbarSlot\n ref={ref}\n className={clsx((aiDrawer?.trigger || !!activeAiDrawerId) && styles['with-ai-drawer'], {\n [testutilStyles['mobile-bar']]: isMobile,\n })}\n style={{\n insetBlockStart: verticalOffsets.toolbar,\n }}\n >\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"left-drawer-trigger\">\n <Transition\n in={!!(aiDrawer?.trigger && !activeAiDrawerId)}\n timeout={{ enter: 0, exit: 165 }}\n mountOnEnter={true}\n unmountOnExit={true}\n nodeRef={aiDrawerTransitionRef}\n >\n {state => (\n <div\n className={clsx(!!aiDrawer?.trigger?.customIcon && styles['universal-toolbar-ai-custom'], [\n sharedStyles['with-motion-horizontal'],\n ])}\n style={{\n opacity: ['entering', 'exiting'].includes(state) ? 0 : 1,\n }}\n >\n <TriggerButton\n ariaLabel={aiDrawer?.ariaLabels?.triggerButton}\n ariaExpanded={!!activeAiDrawerId}\n iconName={aiDrawer?.trigger!.iconName}\n iconSvg={aiDrawer?.trigger!.iconSvg}\n customSvg={aiDrawer?.trigger!.customIcon}\n className={testutilStyles['ai-drawer-toggle']}\n onClick={() => {\n if (setExpandedDrawerId) {\n setExpandedDrawerId(null);\n }\n onActiveAiDrawerChange?.(aiDrawer?.id ?? null, { initiatedByUserAction: true });\n }}\n ref={aiDrawerFocusRef}\n selected={!drawerExpandedMode && !!activeAiDrawerId}\n disabled={anyPanelOpenInMobile}\n variant={aiDrawer?.trigger?.customIcon ? 'custom' : 'default'}\n testId={`awsui-app-layout-trigger-${aiDrawer?.id}`}\n isForPreviousActiveDrawer={true}\n />\n </div>\n )}\n </Transition>\n </AppLayoutBuiltInErrorBoundary>\n <ToolbarContainer hasAiDrawer={!!activeAiDrawerId}>\n {hasNavigation && (\n <nav {...navLandmarkAttributes} className={clsx(styles['universal-toolbar-nav'])}>\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"toolbar-trigger-nav\">\n <TriggerButton\n ariaLabel={ariaLabels?.navigationToggle ?? undefined}\n ariaExpanded={!drawerExpandedMode && navigationOpen}\n iconName=\"menu\"\n className={testutilStyles['navigation-toggle']}\n onClick={() => {\n if (setExpandedDrawerId) {\n setExpandedDrawerId(null);\n }\n if (navigationOpen && expandedDrawerId) {\n return;\n }\n onNavigationToggle?.(!navigationOpen);\n }}\n ref={navigationFocusRef}\n selected={!drawerExpandedMode && navigationOpen}\n disabled={anyPanelOpenInMobile}\n />\n </AppLayoutBuiltInErrorBoundary>\n </nav>\n )}\n {(breadcrumbs || discoveredBreadcrumbs) && (\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"breadcrumbs\">\n <ToolbarBreadcrumbsSection\n ownBreadcrumbs={appLayoutInternals.breadcrumbs}\n discoveredBreadcrumbs={appLayoutInternals.discoveredBreadcrumbs}\n includeTestUtils={true}\n />\n </AppLayoutBuiltInErrorBoundary>\n )}\n {(drawers?.length ||\n globalDrawers?.length ||\n bottomDrawers?.length ||\n (hasSplitPanel && splitPanelToggleProps?.displayed)) && (\n <div className={clsx(styles['universal-toolbar-drawers'])}>\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"toolbar-triggers\">\n <DrawerTriggers\n ariaLabels={ariaLabels}\n activeDrawerId={activeDrawerId ?? null}\n drawers={drawers?.filter(item => !!item.trigger) ?? []}\n drawersFocusRef={drawersFocusRef}\n onActiveDrawerChange={onActiveDrawerChange}\n splitPanelToggleProps={splitPanelToggleProps?.displayed ? splitPanelToggleProps : undefined}\n splitPanelFocusRef={splitPanelFocusRef}\n onSplitPanelToggle={onSplitPanelToggle}\n disabled={anyPanelOpenInMobile}\n globalDrawersFocusControl={globalDrawersFocusControl}\n bottomDrawersFocusRef={bottomDrawersFocusRef}\n globalDrawers={globalDrawers?.filter(item => !!item.trigger) ?? []}\n activeGlobalDrawersIds={activeGlobalDrawersIds ?? []}\n onActiveGlobalDrawersChange={onActiveGlobalDrawersChange}\n expandedDrawerId={expandedDrawerId}\n setExpandedDrawerId={setExpandedDrawerId!}\n bottomDrawers={bottomDrawers}\n onActiveGlobalBottomDrawerChange={onActiveGlobalBottomDrawerChange}\n activeGlobalBottomDrawerId={activeGlobalBottomDrawerId}\n featureNotificationsProps={featureNotificationsProps}\n />\n </AppLayoutBuiltInErrorBoundary>\n </div>\n )}\n </ToolbarContainer>\n </ToolbarSlot>\n );\n}\n\nexport const AppLayoutToolbar = createWidgetizedComponent(AppLayoutToolbarImplementation, ToolbarSkeleton);\n"]}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js
CHANGED
|
@@ -25,13 +25,13 @@ export const AfterMainSlotImplementationInternal = ({ appLayoutState, appLayoutP
|
|
|
25
25
|
React.createElement(AppLayoutBottomDrawerWrapper, { widgetizedState: appLayoutState.widgetizedState })))),
|
|
26
26
|
splitPanelPosition === 'side' && (React.createElement("div", { className: clsx(styles['split-panel-side'], !splitPanelOpen && styles['panel-hidden'], drawerExpandedMode && styles.hidden) },
|
|
27
27
|
React.createElement(AppLayoutSplitPanelSide, { appLayoutInternals: appLayoutState.appLayoutInternals, splitPanelInternals: appLayoutState.splitPanelInternals, bottomDrawerReportedSize: bottomDrawerReportedSize }, appLayoutProps.splitPanel))),
|
|
28
|
-
React.createElement(AppLayoutBuiltInErrorBoundary,
|
|
28
|
+
React.createElement(AppLayoutBuiltInErrorBoundary, { appLayoutPart: "tools" },
|
|
29
29
|
React.createElement("div", { className: clsx(styles.tools, !toolsOpen && styles['panel-hidden'], sharedStyles['with-motion-horizontal'], navigationOpen && !toolsOpen && styles['unfocusable-mobile'], toolsOpen && styles['tools-open'], drawerExpandedMode && styles.hidden) }, drawers && drawers.length > 0 && (React.createElement(AppLayoutDrawer, { appLayoutInternals: appLayoutState.appLayoutInternals, bottomDrawerReportedSize: activeGlobalBottomDrawerId ? bottomDrawerReportedSize : 0 })))),
|
|
30
30
|
React.createElement("div", { className: clsx(styles['global-tools'], !globalToolsOpen && styles['panel-hidden']) },
|
|
31
31
|
React.createElement(ActiveDrawersContext.Provider, { value: activeGlobalDrawersIds !== null && activeGlobalDrawersIds !== void 0 ? activeGlobalDrawersIds : [] },
|
|
32
32
|
React.createElement(AppLayoutGlobalDrawers, { appLayoutInternals: appLayoutState.appLayoutInternals })))));
|
|
33
33
|
};
|
|
34
|
-
export const AfterMainSlotImplementation = (props) => (React.createElement(AppLayoutBuiltInErrorBoundary,
|
|
34
|
+
export const AfterMainSlotImplementation = (props) => (React.createElement(AppLayoutBuiltInErrorBoundary, { appLayoutPart: "after-main-slot" },
|
|
35
35
|
React.createElement(AfterMainSlotImplementationInternal, { ...props })));
|
|
36
36
|
export const createWidgetizedAppLayoutAfterMainSlot = createWidgetizedComponent(AfterMainSlotImplementation);
|
|
37
37
|
//# sourceMappingURL=after-main-slot.js.map
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"after-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACL,6BAA6B,IAAI,eAAe,EAChD,oCAAoC,IAAI,sBAAsB,GAC/D,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,OAAO,EAAE,2CAA2C,IAAI,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACxG,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,EAAE,cAAc,EAAE,cAAc,EAAqB,EAAE,EAAE;IAC3G,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,EACJ,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,OAAO,EACP,kBAAkB,EAClB,0BAA0B,EAC1B,aAAa,EACb,wBAAwB,GACzB,GAAG,cAAc,CAAC,eAAe,CAAC;IACnC,MAAM,kBAAkB,GAAG,CAAC,CAAC,gBAAgB,CAAC;IAC9C,MAAM,SAAS,GAAG,CAAC,CAAC,YAAY,CAAC;IACjC,MAAM,eAAe,GAAG,CAAC,CAAC,CAAA,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,MAAM,CAAA,CAAC;IAEzD,OAAO,CACL;QACG,CAAC,CAAC,aAAa,CAAC,MAAM,IAAI,CACzB,6BAAK,SAAS,EAAE,MAAM,CAAC,aAAa,CAAC;YACnC,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,0BAA0B,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC,EAAE;gBAClG,oBAAC,4BAA4B,IAAC,eAAe,EAAE,cAAc,CAAC,eAAe,GAAI,CACnD,CAC5B,CACP;QACA,kBAAkB,KAAK,MAAM,IAAI,CAChC,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,kBAAkB,CAAC,EAC1B,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC,EACzC,kBAAkB,IAAI,MAAM,CAAC,MAAM,CACpC;YAED,oBAAC,uBAAuB,IACtB,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,EACrD,mBAAmB,EAAE,cAAc,CAAC,mBAAmB,EACvD,wBAAwB,EAAE,wBAAwB,IAEjD,cAAc,CAAC,UAAU,CACF,CACtB,CACP;QACD,oBAAC,6BAA6B;
|
|
1
|
+
{"version":3,"file":"after-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.ts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AE,CAAC,eAAe,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC;YACtF,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,EAAE;gBAChE,oBAAC,sBAAsB,IAAC,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,GAAI,CACnD,CAC5B,CACL,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAwB,EAAE,EAAE,CAAC,CACvE,oBAAC,6BAA6B,IAAC,aAAa,EAAC,iBAAiB;IAC5D,oBAAC,mCAAmC,OAAK,KAAK,GAAI,CACpB,CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG,yBAAyB,CAAC,2BAA2B,CAAC,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 { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { ActiveDrawersContext } from '../../utils/visibility-context';\nimport {\n AppLayoutDrawerImplementation as AppLayoutDrawer,\n AppLayoutGlobalDrawersImplementation as AppLayoutGlobalDrawers,\n} from '../drawer';\nimport { AppLayoutBottomDrawerWrapper } from '../drawer/global-bottom-drawer';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide } from '../split-panel';\nimport { isWidgetReady } from '../state/invariants';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const AfterMainSlotImplementationInternal = ({ appLayoutState, appLayoutProps }: SkeletonPartProps) => {\n if (!isWidgetReady(appLayoutState)) {\n return null;\n }\n const {\n navigationOpen,\n activeGlobalDrawersIds,\n expandedDrawerId,\n activeDrawer,\n splitPanelOpen,\n drawers,\n splitPanelPosition,\n activeGlobalBottomDrawerId,\n bottomDrawers,\n bottomDrawerReportedSize,\n } = appLayoutState.widgetizedState;\n const drawerExpandedMode = !!expandedDrawerId;\n const toolsOpen = !!activeDrawer;\n const globalToolsOpen = !!activeGlobalDrawersIds?.length;\n\n return (\n <>\n {!!bottomDrawers.length && (\n <div className={styles['bottom-tool']}>\n <ActiveDrawersContext.Provider value={activeGlobalBottomDrawerId ? [activeGlobalBottomDrawerId] : []}>\n <AppLayoutBottomDrawerWrapper widgetizedState={appLayoutState.widgetizedState} />\n </ActiveDrawersContext.Provider>\n </div>\n )}\n {splitPanelPosition === 'side' && (\n <div\n className={clsx(\n styles['split-panel-side'],\n !splitPanelOpen && styles['panel-hidden'],\n drawerExpandedMode && styles.hidden\n )}\n >\n <AppLayoutSplitPanelSide\n appLayoutInternals={appLayoutState.appLayoutInternals}\n splitPanelInternals={appLayoutState.splitPanelInternals}\n bottomDrawerReportedSize={bottomDrawerReportedSize}\n >\n {appLayoutProps.splitPanel}\n </AppLayoutSplitPanelSide>\n </div>\n )}\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"tools\">\n <div\n className={clsx(\n styles.tools,\n !toolsOpen && styles['panel-hidden'],\n sharedStyles['with-motion-horizontal'],\n navigationOpen && !toolsOpen && styles['unfocusable-mobile'],\n toolsOpen && styles['tools-open'],\n drawerExpandedMode && styles.hidden\n )}\n >\n {drawers && drawers.length > 0 && (\n <AppLayoutDrawer\n appLayoutInternals={appLayoutState.appLayoutInternals}\n bottomDrawerReportedSize={activeGlobalBottomDrawerId ? bottomDrawerReportedSize : 0}\n />\n )}\n </div>\n </AppLayoutBuiltInErrorBoundary>\n <div className={clsx(styles['global-tools'], !globalToolsOpen && styles['panel-hidden'])}>\n <ActiveDrawersContext.Provider value={activeGlobalDrawersIds ?? []}>\n <AppLayoutGlobalDrawers appLayoutInternals={appLayoutState.appLayoutInternals} />\n </ActiveDrawersContext.Provider>\n </div>\n </>\n );\n};\n\nexport const AfterMainSlotImplementation = (props: SkeletonPartProps) => (\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"after-main-slot\">\n <AfterMainSlotImplementationInternal {...props} />\n </AppLayoutBuiltInErrorBoundary>\n);\n\nexport const createWidgetizedAppLayoutAfterMainSlot = createWidgetizedComponent(AfterMainSlotImplementation);\n"]}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js
CHANGED
|
@@ -48,10 +48,10 @@ export const BeforeMainSlotImplementationInternal = ({ toolbarProps, appLayoutSt
|
|
|
48
48
|
setExpandedDrawerId,
|
|
49
49
|
} })))))),
|
|
50
50
|
navigation && (React.createElement("div", { className: clsx(styles.navigation, !navigationOpen && styles['panel-hidden'], toolsOpen && styles['unfocusable-mobile'], !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'], (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden) },
|
|
51
|
-
React.createElement(AppLayoutBuiltInErrorBoundary,
|
|
51
|
+
React.createElement(AppLayoutBuiltInErrorBoundary, { appLayoutPart: "nav" },
|
|
52
52
|
React.createElement(AppLayoutNavigation, { appLayoutInternals: appLayoutState.appLayoutInternals, bottomDrawerReportedSize: bottomDrawerReportedSize }))))));
|
|
53
53
|
};
|
|
54
|
-
export const BeforeMainSlotImplementation = (props) => (React.createElement(AppLayoutBuiltInErrorBoundary,
|
|
54
|
+
export const BeforeMainSlotImplementation = (props) => (React.createElement(AppLayoutBuiltInErrorBoundary, { appLayoutPart: "before-main-slot" },
|
|
55
55
|
React.createElement(BeforeMainSlotImplementationInternal, { ...props })));
|
|
56
56
|
export const createWidgetizedAppLayoutBeforeMainSlot = createWidgetizedComponent(BeforeMainSlotImplementation, BeforeMainSlotSkeleton);
|
|
57
57
|
//# sourceMappingURL=before-main-slot.js.map
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"before-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,iCAAiC,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,8BAA8B,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhF,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,EACnD,YAAY,EACZ,cAAc,EACd,cAAc,GACI,EAAE,EAAE;;IACtB,MAAM,kBAAkB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE,CAAC;QACnC,OAAO,CACL,oBAAC,sBAAsB,IACrB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;IACJ,CAAC;IACD,MAAM,EACJ,YAAY,EACZ,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,QAAQ,EACR,kBAAkB,EAClB,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AC,EAAE,IAC5E,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,uBAAuB,KAAI,kBAAkB,CAAC,OAAO,CAAC,CAAC,IAAI,CAC5F;gBACG,CAAC,kBAAkB,CAAC,OAAO,GAAG,IAAI,CAAC;gBACpC,oBAAC,qCAAqC,IACpC,IAAI,EAAE,CAAC,CAAC,gBAAgB,EACxB,cAAc,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,IAAI,EAChC,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,EACrD,aAAa,EAAE;wBACb,kBAAkB,EAAE,kBAAmB;wBACvC,eAAe,EAAE,eAAgB;wBACjC,eAAe,EAAE,eAAgB;wBACjC,QAAQ,EAAE,QAAS;wBACnB,UAAU;wBACV,oBAAoB;wBACpB,QAAQ;wBACR,gBAAgB;wBAChB,sBAAsB;wBACtB,oBAAoB,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC;wBAChE,gBAAgB;wBAChB,mBAAmB;qBACpB,GACD,CACD,CACJ,CAC6B,CAC5B,CACP;QACA,UAAU,IAAI,CACb,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,UAAU,EACjB,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC,EACzC,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EACzC,CAAC,2BAA2B,IAAI,YAAY,CAAC,wBAAwB,CAAC,EACtE,CAAC,kBAAkB,IAAI,+BAA+B,CAAC,IAAI,MAAM,CAAC,MAAM,CACzE;YAED,oBAAC,6BAA6B;
|
|
1
|
+
{"version":3,"file":"before-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE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,CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,yBAAyB,CAC9E,4BAA4B,EAC5B,sBAAsB,CACvB,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 clsx from 'clsx';\n\nimport { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { ActiveDrawersContext } from '../../utils/visibility-context';\nimport { AppLayoutGlobalAiDrawerImplementation } from '../drawer/global-ai-drawer';\nimport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../navigation';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { BeforeMainSlotSkeleton } from '../skeleton/skeleton-parts';\nimport { isWidgetReady } from '../state/invariants';\nimport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../toolbar';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const BeforeMainSlotImplementationInternal = ({\n toolbarProps,\n appLayoutState,\n appLayoutProps,\n}: SkeletonPartProps) => {\n const wasAiDrawerOpenRef = useRef(false);\n if (!isWidgetReady(appLayoutState)) {\n return (\n <BeforeMainSlotSkeleton\n toolbarProps={toolbarProps}\n appLayoutProps={appLayoutProps}\n appLayoutState={appLayoutState}\n />\n );\n }\n const {\n activeDrawer,\n navigationOpen,\n navigation,\n expandedDrawerId,\n setExpandedDrawerId,\n navigationAnimationDisabled,\n activeAiDrawerId,\n aiDrawerExpandedMode,\n aiDrawer,\n activeAiDrawerSize,\n minAiDrawerSize,\n maxAiDrawerSize,\n onActiveAiDrawerResize,\n aiDrawerFocusControl,\n ariaLabels,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n activeAiDrawer,\n bottomDrawerReportedSize,\n featureNotificationsProps,\n } = appLayoutState.widgetizedState;\n const drawerExpandedMode = !!expandedDrawerId;\n const toolsOpen = !!activeDrawer;\n // Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar\n const drawerExpandedModeInChildLayout = !!toolbarProps?.expandedDrawerId;\n const { __embeddedViewMode: embeddedViewMode } = appLayoutProps as any;\n return (\n <>\n {!!toolbarProps && !embeddedViewMode && !aiDrawerExpandedMode && (\n <AppLayoutToolbar\n appLayoutInternals={appLayoutState.appLayoutInternals}\n toolbarProps={toolbarProps}\n featureNotificationsProps={featureNotificationsProps}\n />\n )}\n {!toolbarProps && !!activeAiDrawerId && (\n <div\n className={styles['pseudo-toolbar']}\n style={{\n insetBlockStart: appLayoutState.appLayoutInternals?.verticalOffsets?.toolbar,\n }}\n >\n <div className={styles['pseudo-toolbar-content']} />\n </div>\n )}\n {aiDrawer && (\n <div\n className={clsx(\n styles['ai-drawer'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && !aiDrawerExpandedMode && styles.hidden\n )}\n >\n <ActiveDrawersContext.Provider value={activeAiDrawer ? [activeAiDrawer.id] : []}>\n {(!!activeAiDrawerId || (aiDrawer?.preserveInactiveContent && wasAiDrawerOpenRef.current)) && (\n <>\n {(wasAiDrawerOpenRef.current = true)}\n <AppLayoutGlobalAiDrawerImplementation\n show={!!activeAiDrawerId}\n activeAiDrawer={aiDrawer ?? null}\n appLayoutInternals={appLayoutState.appLayoutInternals}\n aiDrawerProps={{\n activeAiDrawerSize: activeAiDrawerSize!,\n minAiDrawerSize: minAiDrawerSize!,\n maxAiDrawerSize: maxAiDrawerSize!,\n aiDrawer: aiDrawer!,\n ariaLabels,\n aiDrawerFocusControl,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n onActiveDrawerResize: ({ size }) => onActiveAiDrawerResize(size),\n expandedDrawerId,\n setExpandedDrawerId,\n }}\n />\n </>\n )}\n </ActiveDrawersContext.Provider>\n </div>\n )}\n {navigation && (\n <div\n className={clsx(\n styles.navigation,\n !navigationOpen && styles['panel-hidden'],\n toolsOpen && styles['unfocusable-mobile'],\n !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden\n )}\n >\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"nav\">\n <AppLayoutNavigation\n appLayoutInternals={appLayoutState.appLayoutInternals}\n bottomDrawerReportedSize={bottomDrawerReportedSize}\n />\n </AppLayoutBuiltInErrorBoundary>\n </div>\n )}\n </>\n );\n};\n\nexport const BeforeMainSlotImplementation = (props: SkeletonPartProps) => (\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"before-main-slot\">\n <BeforeMainSlotImplementationInternal {...props} />\n </AppLayoutBuiltInErrorBoundary>\n);\n\nexport const createWidgetizedAppLayoutBeforeMainSlot = createWidgetizedComponent(\n BeforeMainSlotImplementation,\n BeforeMainSlotSkeleton\n);\n"]}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js
CHANGED
|
@@ -19,7 +19,7 @@ export const BottomContentSlotImplementationInternal = ({ appLayoutState, appLay
|
|
|
19
19
|
React.createElement(AppLayoutSplitPanelBottom, { appLayoutInternals: appLayoutState.appLayoutInternals, splitPanelInternals: appLayoutState.splitPanelInternals }, appLayoutProps.splitPanel)))));
|
|
20
20
|
};
|
|
21
21
|
export const BottomContentSlotImplementation = (props) => {
|
|
22
|
-
return (React.createElement(AppLayoutBuiltInErrorBoundary,
|
|
22
|
+
return (React.createElement(AppLayoutBuiltInErrorBoundary, { appLayoutPart: "bottom-content-slot" },
|
|
23
23
|
React.createElement(BottomContentSlotImplementationInternal, { ...props })));
|
|
24
24
|
};
|
|
25
25
|
export const createWidgetizedAppLayoutBottomContentSlot = createWidgetizedComponent(BottomContentSlotImplementation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bottom-content-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,O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BAAC,6BAA6B;
|
|
1
|
+
{"version":3,"file":"bottom-content-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,6CAA6C,IAAI,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,EAAE,cAAc,EAAE,cAAc,EAAqB,EAAE,EAAE;IAC/G,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,QAAQ,EAAE,GACrG,cAAc,CAAC,eAAe,CAAC;IACjC,OAAO,CACL,0CACG,kBAAkB,KAAK,QAAQ,IAAI,CAClC,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,YAAY,CAAC,sBAAsB,CAAC,CAAC,EACnF,KAAK,EAAE;YACL,aAAa,EACX,SAAS,CAAC,aAAa,GAAG,CAAC,0BAA0B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC;SACrG;QAED,oBAAC,yBAAyB,IACxB,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,EACrD,mBAAmB,EAAE,cAAc,CAAC,mBAAmB,IAEtD,cAAc,CAAC,UAAU,CACA,CACxB,CACP,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,KAAwB,EAAE,EAAE;IAC1E,OAAO,CACL,oBAAC,6BAA6B,IAAC,aAAa,EAAC,qBAAqB;QAChE,oBAAC,uCAAuC,OAAK,KAAK,GAAI,CACxB,CACjC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0CAA0C,GAAG,yBAAyB,CAAC,+BAA+B,CAAC,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 { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom } from '../split-panel';\nimport { isWidgetReady } from '../state/invariants';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const BottomContentSlotImplementationInternal = ({ appLayoutState, appLayoutProps }: SkeletonPartProps) => {\n if (!isWidgetReady(appLayoutState)) {\n return null;\n }\n const { splitPanelPosition, placement, activeGlobalBottomDrawerId, bottomDrawerReportedSize, isMobile } =\n appLayoutState.widgetizedState;\n return (\n <>\n {splitPanelPosition === 'bottom' && (\n <div\n className={clsx(styles['split-panel-bottom'], sharedStyles['with-motion-vertical'])}\n style={{\n insetBlockEnd:\n placement.insetBlockEnd + (activeGlobalBottomDrawerId && !isMobile ? bottomDrawerReportedSize : 0),\n }}\n >\n <AppLayoutSplitPanelBottom\n appLayoutInternals={appLayoutState.appLayoutInternals}\n splitPanelInternals={appLayoutState.splitPanelInternals}\n >\n {appLayoutProps.splitPanel}\n </AppLayoutSplitPanelBottom>\n </div>\n )}\n </>\n );\n};\n\nexport const BottomContentSlotImplementation = (props: SkeletonPartProps) => {\n return (\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"bottom-content-slot\">\n <BottomContentSlotImplementationInternal {...props} />\n </AppLayoutBuiltInErrorBoundary>\n );\n};\n\nexport const createWidgetizedAppLayoutBottomContentSlot = createWidgetizedComponent(BottomContentSlotImplementation);\n"]}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js
CHANGED
|
@@ -16,7 +16,7 @@ export const TopContentSlotImplementationInternal = ({ appLayoutProps, appLayout
|
|
|
16
16
|
appLayoutProps.notifications && (React.createElement("div", { className: clsx(styles['notifications-background'], appLayoutProps.headerVariant === 'high-contrast' && highContrastHeaderClassName) })),
|
|
17
17
|
appLayoutProps.notifications && (React.createElement(AppLayoutNotifications, { appLayoutInternals: appLayoutState.appLayoutInternals }, appLayoutProps.notifications))));
|
|
18
18
|
};
|
|
19
|
-
export const TopContentSlotImplementation = (props) => (React.createElement(AppLayoutBuiltInErrorBoundary,
|
|
19
|
+
export const TopContentSlotImplementation = (props) => (React.createElement(AppLayoutBuiltInErrorBoundary, { appLayoutPart: "top-content-slot" },
|
|
20
20
|
React.createElement(TopContentSlotImplementationInternal, { ...props })));
|
|
21
21
|
export const createWidgetizedAppLayoutTopContentSlot = createWidgetizedComponent(TopContentSlotImplementation);
|
|
22
22
|
//# sourceMappingURL=top-content-slot.js.map
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-content-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,oCAAoC,IAAI,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAElG,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,EAAE,cAAc,EAAE,cAAc,EAAqB,EAAE,EAAE;IAC5G,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CACL;QACG,cAAc,CAAC,aAAa,IAAI,CAC/B,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,0BAA0B,CAAC,EAClC,cAAc,CAAC,aAAa,KAAK,eAAe,IAAI,2BAA2B,CAChF,GACI,CACR;QACA,cAAc,CAAC,aAAa,IAAI,CAC/B,oBAAC,sBAAsB,IAAC,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,IAC1E,cAAc,CAAC,aAAa,CACN,CAC1B,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAwB,EAAE,EAAE,CAAC,CACxE,oBAAC,6BAA6B;
|
|
1
|
+
{"version":3,"file":"top-content-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,oCAAoC,IAAI,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAElG,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,EAAE,cAAc,EAAE,cAAc,EAAqB,EAAE,EAAE;IAC5G,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CACL;QACG,cAAc,CAAC,aAAa,IAAI,CAC/B,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,0BAA0B,CAAC,EAClC,cAAc,CAAC,aAAa,KAAK,eAAe,IAAI,2BAA2B,CAChF,GACI,CACR;QACA,cAAc,CAAC,aAAa,IAAI,CAC/B,oBAAC,sBAAsB,IAAC,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,IAC1E,cAAc,CAAC,aAAa,CACN,CAC1B,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAwB,EAAE,EAAE,CAAC,CACxE,oBAAC,6BAA6B,IAAC,aAAa,EAAC,kBAAkB;IAC7D,oBAAC,oCAAoC,OAAK,KAAK,GAAI,CACrB,CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,yBAAyB,CAAC,4BAA4B,CAAC,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 { AppLayoutBuiltInErrorBoundary } from '../../../error-boundary/internal';\nimport { highContrastHeaderClassName } from '../../../internal/utils/content-header-utils';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutNotificationsImplementation as AppLayoutNotifications } from '../notifications';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { isWidgetReady } from '../state/invariants';\n\nimport styles from '../skeleton/styles.css.js';\n\nexport const TopContentSlotImplementationInternal = ({ appLayoutProps, appLayoutState }: SkeletonPartProps) => {\n if (!isWidgetReady(appLayoutState)) {\n return null;\n }\n return (\n <>\n {appLayoutProps.notifications && (\n <div\n className={clsx(\n styles['notifications-background'],\n appLayoutProps.headerVariant === 'high-contrast' && highContrastHeaderClassName\n )}\n ></div>\n )}\n {appLayoutProps.notifications && (\n <AppLayoutNotifications appLayoutInternals={appLayoutState.appLayoutInternals}>\n {appLayoutProps.notifications}\n </AppLayoutNotifications>\n )}\n </>\n );\n};\n\nexport const TopContentSlotImplementation = (props: SkeletonPartProps) => (\n <AppLayoutBuiltInErrorBoundary appLayoutPart=\"top-content-slot\">\n <TopContentSlotImplementationInternal {...props} />\n </AppLayoutBuiltInErrorBoundary>\n);\n\nexport const createWidgetizedAppLayoutTopContentSlot = createWidgetizedComponent(TopContentSlotImplementation);\n"]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"badge": "
|
|
5
|
-
"badge-color-grey": "awsui_badge-color-
|
|
6
|
-
"badge-color-green": "awsui_badge-color-
|
|
7
|
-
"badge-color-blue": "awsui_badge-color-
|
|
8
|
-
"badge-color-red": "awsui_badge-color-
|
|
9
|
-
"badge-color-severity-critical": "awsui_badge-color-severity-
|
|
10
|
-
"badge-color-severity-high": "awsui_badge-color-severity-
|
|
11
|
-
"badge-color-severity-medium": "awsui_badge-color-severity-
|
|
12
|
-
"badge-color-severity-low": "awsui_badge-color-severity-
|
|
13
|
-
"badge-color-severity-neutral": "awsui_badge-color-severity-
|
|
4
|
+
"badge": "awsui_badge_1yjyg_10cmu_145",
|
|
5
|
+
"badge-color-grey": "awsui_badge-color-grey_1yjyg_10cmu_191",
|
|
6
|
+
"badge-color-green": "awsui_badge-color-green_1yjyg_10cmu_196",
|
|
7
|
+
"badge-color-blue": "awsui_badge-color-blue_1yjyg_10cmu_201",
|
|
8
|
+
"badge-color-red": "awsui_badge-color-red_1yjyg_10cmu_206",
|
|
9
|
+
"badge-color-severity-critical": "awsui_badge-color-severity-critical_1yjyg_10cmu_211",
|
|
10
|
+
"badge-color-severity-high": "awsui_badge-color-severity-high_1yjyg_10cmu_216",
|
|
11
|
+
"badge-color-severity-medium": "awsui_badge-color-severity-medium_1yjyg_10cmu_221",
|
|
12
|
+
"badge-color-severity-low": "awsui_badge-color-severity-low_1yjyg_10cmu_226",
|
|
13
|
+
"badge-color-severity-neutral": "awsui_badge-color-severity-neutral_1yjyg_10cmu_231"
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
*/
|
|
143
143
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
144
144
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
145
|
-
.
|
|
145
|
+
.awsui_badge_1yjyg_10cmu_145:not(#\9) {
|
|
146
146
|
border-collapse: separate;
|
|
147
147
|
border-spacing: 0;
|
|
148
148
|
box-sizing: border-box;
|
|
@@ -188,47 +188,47 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
188
188
|
padding-inline: var(--space-xs-kw7k3v, 8px);
|
|
189
189
|
color: var(--color-text-notification-default-fmebm4, #fafafa);
|
|
190
190
|
}
|
|
191
|
-
.
|
|
192
|
-
background-color: var(--color-background-
|
|
191
|
+
.awsui_badge_1yjyg_10cmu_145.awsui_badge-color-grey_1yjyg_10cmu_191:not(#\9) {
|
|
192
|
+
background-color: var(--color-background-badge-grey-0gre59, #545b64);
|
|
193
193
|
border-color: var(--color-border-badge-grey-7x1xit, transparent);
|
|
194
194
|
color: var(--color-text-badge-grey-5hljh0, #fafafa);
|
|
195
195
|
}
|
|
196
|
-
.
|
|
197
|
-
background-color: var(--color-background-
|
|
196
|
+
.awsui_badge_1yjyg_10cmu_145.awsui_badge-color-green_1yjyg_10cmu_196:not(#\9) {
|
|
197
|
+
background-color: var(--color-background-badge-green-aahq3n, #1d8102);
|
|
198
198
|
border-color: var(--color-border-badge-green-t7n2iz, transparent);
|
|
199
199
|
color: var(--color-text-badge-green-i688l8, #fafafa);
|
|
200
200
|
}
|
|
201
|
-
.
|
|
202
|
-
background-color: var(--color-background-
|
|
201
|
+
.awsui_badge_1yjyg_10cmu_145.awsui_badge-color-blue_1yjyg_10cmu_201:not(#\9) {
|
|
202
|
+
background-color: var(--color-background-badge-blue-89he01, #0073bb);
|
|
203
203
|
border-color: var(--color-border-badge-blue-p28tag, transparent);
|
|
204
204
|
color: var(--color-text-badge-blue-pfnjhv, #fafafa);
|
|
205
205
|
}
|
|
206
|
-
.
|
|
207
|
-
background-color: var(--color-background-
|
|
206
|
+
.awsui_badge_1yjyg_10cmu_145.awsui_badge-color-red_1yjyg_10cmu_206:not(#\9) {
|
|
207
|
+
background-color: var(--color-background-badge-red-lfiebe, #d13212);
|
|
208
208
|
border-color: var(--color-border-badge-red-w6mok2, transparent);
|
|
209
209
|
color: var(--color-text-badge-red-e7xtdk, #fafafa);
|
|
210
210
|
}
|
|
211
|
-
.
|
|
211
|
+
.awsui_badge_1yjyg_10cmu_145.awsui_badge-color-severity-critical_1yjyg_10cmu_211:not(#\9) {
|
|
212
212
|
background-color: var(--color-background-notification-severity-critical-gsxtat, #870303);
|
|
213
213
|
color: var(--color-text-badge-severity-critical-9m2t9l, #fafafa);
|
|
214
214
|
border-color: var(--color-border-badge-severity-critical-afw1t4, transparent);
|
|
215
215
|
}
|
|
216
|
-
.
|
|
216
|
+
.awsui_badge_1yjyg_10cmu_145.awsui_badge-color-severity-high_1yjyg_10cmu_216:not(#\9) {
|
|
217
217
|
background-color: var(--color-background-notification-severity-high-hz1dy0, #ce3311);
|
|
218
218
|
color: var(--color-text-badge-severity-high-yhnb3j, #fafafa);
|
|
219
219
|
border-color: var(--color-border-badge-severity-high-xpyb3z, transparent);
|
|
220
220
|
}
|
|
221
|
-
.
|
|
221
|
+
.awsui_badge_1yjyg_10cmu_145.awsui_badge-color-severity-medium_1yjyg_10cmu_221:not(#\9) {
|
|
222
222
|
background-color: var(--color-background-notification-severity-medium-f2pwwo, #f89256);
|
|
223
223
|
color: var(--color-text-badge-severity-medium-seazfm, #000000);
|
|
224
224
|
border-color: var(--color-border-badge-severity-medium-lglq87, transparent);
|
|
225
225
|
}
|
|
226
|
-
.
|
|
226
|
+
.awsui_badge_1yjyg_10cmu_145.awsui_badge-color-severity-low_1yjyg_10cmu_226:not(#\9) {
|
|
227
227
|
background-color: var(--color-background-notification-severity-low-11rcv3, #f2cd54);
|
|
228
228
|
color: var(--color-text-badge-severity-low-ixtax4, #16191f);
|
|
229
229
|
border-color: var(--color-border-badge-severity-low-w6znea, transparent);
|
|
230
230
|
}
|
|
231
|
-
.
|
|
231
|
+
.awsui_badge_1yjyg_10cmu_145.awsui_badge-color-severity-neutral_1yjyg_10cmu_231:not(#\9) {
|
|
232
232
|
background-color: var(--color-background-notification-severity-neutral-1tqomh, #687078);
|
|
233
233
|
color: var(--color-text-badge-severity-neutral-vfdy0w, #fafafa);
|
|
234
234
|
border-color: var(--color-border-badge-severity-neutral-kdj4l5, transparent);
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"badge": "
|
|
6
|
-
"badge-color-grey": "awsui_badge-color-
|
|
7
|
-
"badge-color-green": "awsui_badge-color-
|
|
8
|
-
"badge-color-blue": "awsui_badge-color-
|
|
9
|
-
"badge-color-red": "awsui_badge-color-
|
|
10
|
-
"badge-color-severity-critical": "awsui_badge-color-severity-
|
|
11
|
-
"badge-color-severity-high": "awsui_badge-color-severity-
|
|
12
|
-
"badge-color-severity-medium": "awsui_badge-color-severity-
|
|
13
|
-
"badge-color-severity-low": "awsui_badge-color-severity-
|
|
14
|
-
"badge-color-severity-neutral": "awsui_badge-color-severity-
|
|
5
|
+
"badge": "awsui_badge_1yjyg_10cmu_145",
|
|
6
|
+
"badge-color-grey": "awsui_badge-color-grey_1yjyg_10cmu_191",
|
|
7
|
+
"badge-color-green": "awsui_badge-color-green_1yjyg_10cmu_196",
|
|
8
|
+
"badge-color-blue": "awsui_badge-color-blue_1yjyg_10cmu_201",
|
|
9
|
+
"badge-color-red": "awsui_badge-color-red_1yjyg_10cmu_206",
|
|
10
|
+
"badge-color-severity-critical": "awsui_badge-color-severity-critical_1yjyg_10cmu_211",
|
|
11
|
+
"badge-color-severity-high": "awsui_badge-color-severity-high_1yjyg_10cmu_216",
|
|
12
|
+
"badge-color-severity-medium": "awsui_badge-color-severity-medium_1yjyg_10cmu_221",
|
|
13
|
+
"badge-color-severity-low": "awsui_badge-color-severity-low_1yjyg_10cmu_226",
|
|
14
|
+
"badge-color-severity-neutral": "awsui_badge-color-severity-neutral_1yjyg_10cmu_231"
|
|
15
15
|
};
|
|
16
16
|
|