@cloudscape-design/components 3.0.317 → 3.0.319
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/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +30 -30
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/drawer/interfaces.d.ts +0 -7
- package/app-layout/drawer/interfaces.d.ts.map +1 -1
- package/app-layout/drawer/interfaces.js.map +1 -1
- package/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
- package/app-layout/drawer/resizable-drawer.js +3 -3
- package/app-layout/drawer/resizable-drawer.js.map +1 -1
- package/app-layout/index.d.ts.map +1 -1
- package/app-layout/index.js +19 -2
- package/app-layout/index.js.map +1 -1
- package/app-layout/notifications/styles.css.js +3 -3
- package/app-layout/notifications/styles.scoped.css +7 -7
- package/app-layout/notifications/styles.selectors.js +3 -3
- package/app-layout/runtime-api.d.ts +8 -0
- package/app-layout/runtime-api.d.ts.map +1 -0
- package/app-layout/runtime-api.js +35 -0
- package/app-layout/runtime-api.js.map +1 -0
- package/app-layout/styles.css.js +17 -13
- package/app-layout/styles.scoped.css +44 -13
- package/app-layout/styles.selectors.js +17 -13
- package/app-layout/utils/interfaces.d.ts +10 -0
- package/app-layout/utils/interfaces.d.ts.map +1 -0
- package/app-layout/utils/interfaces.js +2 -0
- package/app-layout/utils/interfaces.js.map +1 -0
- package/app-layout/utils/use-drawer-focus-control.d.ts.map +1 -1
- package/app-layout/utils/use-drawer-focus-control.js +8 -3
- package/app-layout/utils/use-drawer-focus-control.js.map +1 -1
- package/app-layout/utils/use-keyboard-events.d.ts +4 -0
- package/app-layout/utils/use-keyboard-events.d.ts.map +1 -0
- package/{split-panel → app-layout}/utils/use-keyboard-events.js +10 -11
- package/app-layout/utils/use-keyboard-events.js.map +1 -0
- package/app-layout/utils/use-pointer-events.d.ts +3 -0
- package/app-layout/utils/use-pointer-events.d.ts.map +1 -0
- package/{split-panel → app-layout}/utils/use-pointer-events.js +15 -8
- package/app-layout/utils/use-pointer-events.js.map +1 -0
- package/app-layout/utils/use-resize.d.ts +16 -0
- package/app-layout/utils/use-resize.d.ts.map +1 -0
- package/app-layout/utils/use-resize.js +84 -0
- package/app-layout/utils/use-resize.js.map +1 -0
- package/app-layout/visual-refresh/context.d.ts +11 -6
- package/app-layout/visual-refresh/context.d.ts.map +1 -1
- package/app-layout/visual-refresh/context.js +26 -7
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/drawers.d.ts +1 -33
- package/app-layout/visual-refresh/drawers.d.ts.map +1 -1
- package/app-layout/visual-refresh/drawers.js +14 -7
- package/app-layout/visual-refresh/drawers.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +69 -68
- package/app-layout/visual-refresh/styles.scoped.css +294 -298
- package/app-layout/visual-refresh/styles.selectors.js +69 -68
- package/app-layout/visual-refresh/trigger-button.d.ts.map +1 -1
- package/app-layout/visual-refresh/trigger-button.js +1 -2
- package/app-layout/visual-refresh/trigger-button.js.map +1 -1
- package/area-chart/{model/async-store.d.ts → async-store/index.d.ts} +1 -1
- package/area-chart/async-store/index.d.ts.map +1 -0
- package/area-chart/{model/async-store.js → async-store/index.js} +1 -1
- package/area-chart/async-store/index.js.map +1 -0
- package/area-chart/elements/area-chart-legend.d.ts.map +1 -1
- package/area-chart/elements/area-chart-legend.js +1 -1
- package/area-chart/elements/area-chart-legend.js.map +1 -1
- package/area-chart/elements/data-series.js +1 -1
- package/area-chart/elements/data-series.js.map +1 -1
- package/area-chart/elements/highlighted-point.js +1 -1
- package/area-chart/elements/highlighted-point.js.map +1 -1
- package/area-chart/elements/use-highlight-details.d.ts.map +1 -1
- package/area-chart/elements/use-highlight-details.js +3 -1
- package/area-chart/elements/use-highlight-details.js.map +1 -1
- package/area-chart/elements/vertical-marker.js +1 -1
- package/area-chart/elements/vertical-marker.js.map +1 -1
- package/area-chart/model/index.d.ts +1 -1
- package/area-chart/model/index.d.ts.map +1 -1
- package/area-chart/model/index.js.map +1 -1
- package/area-chart/model/interactions-store.d.ts +1 -1
- package/area-chart/model/interactions-store.d.ts.map +1 -1
- package/area-chart/model/interactions-store.js +1 -1
- package/area-chart/model/interactions-store.js.map +1 -1
- package/area-chart/model/use-chart-model.d.ts.map +1 -1
- package/area-chart/model/use-chart-model.js +1 -1
- package/area-chart/model/use-chart-model.js.map +1 -1
- package/attribute-editor/interfaces.d.ts +1 -1
- package/attribute-editor/interfaces.d.ts.map +1 -1
- package/attribute-editor/interfaces.js.map +1 -1
- package/content-layout/styles.css.js +7 -7
- package/content-layout/styles.scoped.css +13 -13
- package/content-layout/styles.selectors.js +7 -7
- package/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.js +10 -10
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/interfaces.d.ts +1 -1
- package/expandable-section/interfaces.js.map +1 -1
- package/expandable-section/styles.css.js +31 -29
- package/expandable-section/styles.scoped.css +56 -51
- package/expandable-section/styles.selectors.js +31 -29
- package/expandable-section/utils.js +1 -1
- package/expandable-section/utils.js.map +1 -1
- package/flashbar/styles.css.js +45 -45
- package/flashbar/styles.scoped.css +169 -169
- package/flashbar/styles.selectors.js +45 -45
- package/internal/environment.js +1 -1
- package/internal/generated/custom-css-properties/index.js +39 -39
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/internal/plugins/api.d.ts +15 -0
- package/internal/plugins/api.d.ts.map +1 -0
- package/internal/plugins/api.js +50 -0
- package/internal/plugins/api.js.map +1 -0
- package/internal/plugins/drawers-controller.d.ts +22 -0
- package/internal/plugins/drawers-controller.d.ts.map +1 -0
- package/internal/plugins/drawers-controller.js +34 -0
- package/internal/plugins/drawers-controller.js.map +1 -0
- package/internal/plugins/index.d.ts +2 -0
- package/internal/plugins/index.d.ts.map +1 -0
- package/internal/plugins/index.js +4 -0
- package/internal/plugins/index.js.map +1 -0
- package/mixed-line-bar-chart/data-series.d.ts.map +1 -1
- package/mixed-line-bar-chart/data-series.js +8 -2
- package/mixed-line-bar-chart/data-series.js.map +1 -1
- package/package.json +1 -1
- package/split-panel/index.d.ts.map +1 -1
- package/split-panel/index.js +3 -3
- package/split-panel/index.js.map +1 -1
- package/split-panel/interfaces.d.ts +0 -7
- package/split-panel/interfaces.d.ts.map +1 -1
- package/split-panel/interfaces.js.map +1 -1
- package/split-panel/styles.css.js +56 -59
- package/split-panel/styles.scoped.css +77 -93
- package/split-panel/styles.selectors.js +56 -59
- package/table/body-cell/td-element.d.ts +2 -2
- package/table/body-cell/td-element.d.ts.map +1 -1
- package/table/body-cell/td-element.js +2 -2
- package/table/body-cell/td-element.js.map +1 -1
- package/table/column-widths-utils.d.ts +3 -0
- package/table/column-widths-utils.d.ts.map +1 -0
- package/table/column-widths-utils.js +16 -0
- package/table/column-widths-utils.js.map +1 -0
- package/table/header-cell/index.d.ts +3 -3
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +2 -2
- package/table/header-cell/index.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +15 -10
- package/table/internal.js.map +1 -1
- package/table/resizer/index.d.ts.map +1 -1
- package/table/resizer/index.js +2 -2
- package/table/resizer/index.js.map +1 -1
- package/table/sticky-columns/index.d.ts +2 -0
- package/table/sticky-columns/index.d.ts.map +1 -0
- package/table/sticky-columns/index.js +4 -0
- package/table/sticky-columns/index.js.map +1 -0
- package/table/{use-sticky-columns.d.ts → sticky-columns/use-sticky-columns.d.ts} +7 -9
- package/table/sticky-columns/use-sticky-columns.d.ts.map +1 -0
- package/table/{use-sticky-columns.js → sticky-columns/use-sticky-columns.js} +3 -4
- package/table/sticky-columns/use-sticky-columns.js.map +1 -0
- package/table/sticky-scrollbar/index.d.ts +2 -0
- package/table/sticky-scrollbar/index.d.ts.map +1 -0
- package/table/sticky-scrollbar/index.js +4 -0
- package/table/sticky-scrollbar/index.js.map +1 -0
- package/table/sticky-scrollbar/sticky-scrollbar.d.ts.map +1 -0
- package/table/{sticky-scrollbar.js → sticky-scrollbar/sticky-scrollbar.js} +2 -2
- package/table/sticky-scrollbar/sticky-scrollbar.js.map +1 -0
- package/table/sticky-scrollbar/styles.css.js +9 -0
- package/table/sticky-scrollbar/styles.scoped.css +22 -0
- package/table/sticky-scrollbar/styles.selectors.js +10 -0
- package/table/sticky-scrollbar/use-sticky-scrollbar.d.ts.map +1 -0
- package/table/{use-sticky-scrollbar.js → sticky-scrollbar/use-sticky-scrollbar.js} +3 -3
- package/table/sticky-scrollbar/use-sticky-scrollbar.js.map +1 -0
- package/table/styles.css.js +32 -36
- package/table/styles.scoped.css +40 -59
- package/table/styles.selectors.js +32 -36
- package/table/thead.d.ts +2 -1
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +4 -4
- package/table/thead.js.map +1 -1
- package/table/use-column-widths.d.ts +10 -8
- package/table/use-column-widths.d.ts.map +1 -1
- package/table/use-column-widths.js +30 -47
- package/table/use-column-widths.js.map +1 -1
- package/table/utils.d.ts +1 -1
- package/table/utils.d.ts.map +1 -1
- package/table/utils.js.map +1 -1
- package/test-utils/dom/app-layout/index.d.ts +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/wizard/styles.css.js +31 -31
- package/wizard/styles.scoped.css +63 -63
- package/wizard/styles.selectors.js +31 -31
- package/area-chart/model/async-store.d.ts.map +0 -1
- package/area-chart/model/async-store.js.map +0 -1
- package/split-panel/utils/use-keyboard-events.d.ts +0 -4
- package/split-panel/utils/use-keyboard-events.d.ts.map +0 -1
- package/split-panel/utils/use-keyboard-events.js.map +0 -1
- package/split-panel/utils/use-pointer-events.d.ts +0 -3
- package/split-panel/utils/use-pointer-events.d.ts.map +0 -1
- package/split-panel/utils/use-pointer-events.js.map +0 -1
- package/table/sticky-scrollbar.d.ts.map +0 -1
- package/table/sticky-scrollbar.js.map +0 -1
- package/table/use-sticky-columns.d.ts.map +0 -1
- package/table/use-sticky-columns.js.map +0 -1
- package/table/use-sticky-scrollbar.d.ts.map +0 -1
- package/table/use-sticky-scrollbar.js.map +0 -1
- /package/table/{sticky-scrollbar.d.ts → sticky-scrollbar/sticky-scrollbar.d.ts} +0 -0
- /package/table/{use-sticky-scrollbar.d.ts → sticky-scrollbar/use-sticky-scrollbar.d.ts} +0 -0
package/split-panel/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["split-panel/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE,OAAO,aAAa,MAAM,wBAAwB,CAAC;AACnD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OA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yBAAyB,CAAC;gBACrG,YAAY,EAAE,IAAI,CAAC,qCAAqC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,uBAAuB,CAAC;aAChG,EACD,SAAS,EAAE,WAAW,CAAC,EAAE;gBACvB,mBAAmB,mBAAM,WAAW,EAAG,CAAC;gBACxC,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;gBACd,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,GACD,CACH,CACA,CACJ,CACU,CACd,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState, useEffect, useLayoutEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { InternalButton } from '../button/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { useSplitPanelContext } from '../internal/context/split-panel-context';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\n\nimport { SplitPanelProps, SizeControlProps } from './interfaces';\nimport ResizeHandler from './icons/resize-handler';\nimport PreferencesModal from './preferences-modal';\nimport { usePointerEvents } from './utils/use-pointer-events';\nimport { useKeyboardEvents } from './utils/use-keyboard-events';\n\nimport styles from './styles.css.js';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { AppLayoutContext } from '../internal/context/app-layout-context';\nimport { getLimitedValue } from './utils/size-utils';\nimport { Transition } from '../internal/components/transition';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { SplitPanelContentSide } from './side';\nimport { SplitPanelContentBottom } from './bottom';\nimport { useInternalI18n } from '../internal/i18n/context';\n\nexport { SplitPanelProps };\n\nconst MIN_HEIGHT = 160;\nconst MIN_WIDTH = 280;\n\nexport default function SplitPanel({\n header,\n children,\n hidePreferencesButton = false,\n closeBehavior = 'collapse',\n i18nStrings,\n ...restProps\n}: SplitPanelProps) {\n const isRefresh = useVisualRefresh();\n const { __internalRootRef } = useBaseComponent('SplitPanel');\n const {\n size,\n getMaxWidth,\n getMaxHeight,\n position,\n topOffset,\n bottomOffset,\n rightOffset,\n contentWidthStyles,\n isOpen,\n isForcedPosition,\n onPreferencesChange,\n onResize,\n onToggle,\n reportSize,\n setSplitPanelToggle,\n refs,\n } = useSplitPanelContext();\n const baseProps = getBaseProps(restProps);\n const i18n = useInternalI18n('split-panel');\n const [isPreferencesOpen, setPreferencesOpen] = useState<boolean>(false);\n const [relativeSize, setRelativeSize] = useState(0);\n const [maxSize, setMaxSize] = useState(size);\n const minSize = position === 'bottom' ? MIN_HEIGHT : MIN_WIDTH;\n const cappedSize = getLimitedValue(minSize, size, maxSize);\n const appLayoutMaxWidth = isRefresh && position === 'bottom' ? contentWidthStyles : undefined;\n\n const openButtonAriaLabel = i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel);\n useEffect(() => {\n setSplitPanelToggle({ displayed: closeBehavior === 'collapse', ariaLabel: openButtonAriaLabel });\n }, [setSplitPanelToggle, openButtonAriaLabel, closeBehavior]);\n\n useEffect(() => {\n // effects are called inside out in the components tree\n // wait one frame to allow app-layout to complete its calculations\n const handle = requestAnimationFrame(() => {\n const maxSize = position === 'bottom' ? getMaxHeight() : getMaxWidth();\n setRelativeSize(((size - minSize) / (maxSize - minSize)) * 100);\n setMaxSize(maxSize);\n });\n return () => cancelAnimationFrame(handle);\n }, [size, minSize, position, getMaxHeight, getMaxWidth]);\n\n useEffect(() => {\n reportSize(cappedSize);\n }, [reportSize, cappedSize]);\n\n useEffect(() => {\n const handler = () => setMaxSize(position === 'bottom' ? getMaxHeight() : getMaxWidth());\n window.addEventListener('resize', handler);\n return () => window.removeEventListener('resize', handler);\n }, [position, getMaxWidth, getMaxHeight]);\n\n const setSidePanelWidth = (width: number) => {\n const maxWidth = getMaxWidth();\n const size = getLimitedValue(MIN_WIDTH, width, maxWidth);\n\n if (isOpen && maxWidth >= MIN_WIDTH) {\n onResize({ size });\n }\n };\n\n const setBottomPanelHeight = (height: number) => {\n const maxHeight = getMaxHeight();\n const size = getLimitedValue(MIN_HEIGHT, height, maxHeight);\n\n if (isOpen && maxHeight >= MIN_HEIGHT) {\n onResize({ size });\n }\n };\n\n const splitPanelRefObject = useRef<HTMLDivElement>(null);\n\n const sizeControlProps: SizeControlProps = {\n position,\n splitPanelRef: splitPanelRefObject,\n handleRef: refs.slider,\n setSidePanelWidth,\n setBottomPanelHeight,\n };\n const onSliderPointerDown = usePointerEvents(sizeControlProps);\n const onKeyDown = useKeyboardEvents(sizeControlProps);\n\n const wrappedChildren = (\n <AppLayoutContext.Provider\n value={{\n stickyOffsetTop: topOffset,\n stickyOffsetBottom: bottomOffset,\n }}\n >\n {children}\n </AppLayoutContext.Provider>\n );\n\n const panelHeaderId = useUniqueId('split-panel-header');\n\n const wrappedHeader = (\n <div className={styles.header} style={appLayoutMaxWidth}>\n <h2 className={styles['header-text']} id={panelHeaderId}>\n {header}\n </h2>\n <div className={styles['header-actions']}>\n {!hidePreferencesButton && isOpen && (\n <>\n <InternalButton\n className={styles['preferences-button']}\n iconName=\"settings\"\n variant=\"icon\"\n onClick={() => setPreferencesOpen(true)}\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.preferencesTitle', i18nStrings?.preferencesTitle)}\n ref={refs.preferences}\n />\n <span className={styles.divider} />\n </>\n )}\n\n {isOpen ? (\n <InternalButton\n className={styles['close-button']}\n iconName={\n isRefresh && closeBehavior === 'collapse' ? (position === 'side' ? 'angle-right' : 'angle-down') : 'close'\n }\n variant=\"icon\"\n onClick={onToggle}\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.closeButtonAriaLabel', i18nStrings?.closeButtonAriaLabel)}\n ariaExpanded={isOpen}\n />\n ) : position === 'side' ? null : (\n <InternalButton\n className={styles['open-button']}\n iconName=\"angle-up\"\n variant=\"icon\"\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel)}\n ref={refs.toggle}\n ariaExpanded={isOpen}\n />\n )}\n </div>\n </div>\n );\n\n const resizeHandle = (\n <div\n ref={refs.slider}\n role=\"slider\"\n tabIndex={0}\n aria-label={i18n('i18nStrings.resizeHandleAriaLabel', i18nStrings?.resizeHandleAriaLabel)}\n aria-valuemax={100}\n aria-valuemin={0}\n // Allows us to use the logical left/right keys to move the slider left/right,\n // but match aria keyboard behavior of using left/right to decrease/increase\n // the slider value.\n aria-valuenow={position === 'bottom' ? relativeSize : 100 - relativeSize}\n className={clsx(styles.slider, styles[`slider-${position}`])}\n onKeyDown={onKeyDown}\n onPointerDown={onSliderPointerDown}\n >\n <ResizeHandler className={clsx(styles['slider-icon'], styles[`slider-icon-${position}`])} />\n </div>\n );\n\n /*\n This effect forces the browser to recalculate the layout\n whenever the split panel might have moved.\n\n This is needed as a workaround for a bug in Safari, which does\n not automatically calculate the new position of the split panel\n _content_ when the split panel moves.\n */\n useLayoutEffect(() => {\n const root = __internalRootRef.current;\n\n if (root) {\n const property = 'transform';\n const temporaryValue = 'translateZ(0)';\n\n const valueBefore = root.style[property];\n root.style[property] = temporaryValue;\n\n // This line forces the browser to recalculate the layout\n void root.offsetHeight;\n\n root.style[property] = valueBefore;\n }\n }, [rightOffset, __internalRootRef]);\n\n const mergedRef = useMergeRefs(splitPanelRefObject, __internalRootRef);\n\n if (closeBehavior === 'hide' && !isOpen) {\n return <></>;\n }\n\n /**\n * The AppLayout factor moved the circular buttons out of the\n * SplitPanel and into the Tools component. This conditional\n * is still needed for the early return to prevent execution\n * of the following code.\n */\n if (isRefresh && !isOpen && position === 'side') {\n return <></>;\n }\n\n return (\n <Transition in={isOpen ?? false}>\n {(state, transitioningElementRef) => (\n <>\n {position === 'side' && (\n <SplitPanelContentSide\n resizeHandle={resizeHandle}\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n cappedSize={cappedSize}\n onToggle={onToggle}\n openButtonAriaLabel={i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel)}\n toggleRef={refs.toggle}\n header={wrappedHeader}\n panelHeaderId={panelHeaderId}\n >\n {wrappedChildren}\n </SplitPanelContentSide>\n )}\n\n {position === 'bottom' && (\n <SplitPanelContentBottom\n resizeHandle={resizeHandle}\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n cappedSize={cappedSize}\n onToggle={onToggle}\n header={wrappedHeader}\n panelHeaderId={panelHeaderId}\n state={state}\n transitioningElementRef={transitioningElementRef}\n appLayoutMaxWidth={appLayoutMaxWidth}\n >\n {wrappedChildren}\n </SplitPanelContentBottom>\n )}\n {isPreferencesOpen && (\n <PreferencesModal\n visible={true}\n preferences={{ position }}\n disabledSidePosition={position === 'bottom' && isForcedPosition}\n isRefresh={isRefresh}\n i18nStrings={{\n header: i18n('i18nStrings.preferencesTitle', i18nStrings?.preferencesTitle),\n confirm: i18n('i18nStrings.preferencesConfirm', i18nStrings?.preferencesConfirm),\n cancel: i18n('i18nStrings.preferencesCancel', i18nStrings?.preferencesCancel),\n positionLabel: i18n('i18nStrings.preferencesPositionLabel', i18nStrings?.preferencesPositionLabel),\n positionDescription: i18n(\n 'i18nStrings.preferencesPositionDescription',\n i18nStrings?.preferencesPositionDescription\n ),\n positionBottom: i18n('i18nStrings.preferencesPositionBottom', i18nStrings?.preferencesPositionBottom),\n positionSide: i18n('i18nStrings.preferencesPositionSide', i18nStrings?.preferencesPositionSide),\n }}\n onConfirm={preferences => {\n onPreferencesChange({ ...preferences });\n setPreferencesOpen(false);\n }}\n onDismiss={() => {\n setPreferencesOpen(false);\n }}\n />\n )}\n </>\n )}\n </Transition>\n );\n}\n\napplyDisplayName(SplitPanel, 'SplitPanel');\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["split-panel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AAK,CAAC,CAAC;YAC5B,CAAC,GACD,CACH,CACA,CACJ,CACU,CACd,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState, useEffect, useLayoutEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { InternalButton } from '../button/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { useSplitPanelContext } from '../internal/context/split-panel-context';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\n\nimport { SplitPanelProps } from './interfaces';\nimport ResizeHandler from './icons/resize-handler';\nimport PreferencesModal from './preferences-modal';\nimport { usePointerEvents } from '../app-layout/utils/use-pointer-events';\nimport { useKeyboardEvents } from '../app-layout/utils/use-keyboard-events';\nimport { SizeControlProps } from '../app-layout/utils/interfaces';\n\nimport styles from './styles.css.js';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { AppLayoutContext } from '../internal/context/app-layout-context';\nimport { getLimitedValue } from './utils/size-utils';\nimport { Transition } from '../internal/components/transition';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { SplitPanelContentSide } from './side';\nimport { SplitPanelContentBottom } from './bottom';\nimport { useInternalI18n } from '../internal/i18n/context';\n\nexport { SplitPanelProps };\n\nconst MIN_HEIGHT = 160;\nconst MIN_WIDTH = 280;\n\nexport default function SplitPanel({\n header,\n children,\n hidePreferencesButton = false,\n closeBehavior = 'collapse',\n i18nStrings,\n ...restProps\n}: SplitPanelProps) {\n const isRefresh = useVisualRefresh();\n const { __internalRootRef } = useBaseComponent('SplitPanel');\n const {\n size,\n getMaxWidth,\n getMaxHeight,\n position,\n topOffset,\n bottomOffset,\n rightOffset,\n contentWidthStyles,\n isOpen,\n isForcedPosition,\n onPreferencesChange,\n onResize,\n onToggle,\n reportSize,\n setSplitPanelToggle,\n refs,\n } = useSplitPanelContext();\n const baseProps = getBaseProps(restProps);\n const i18n = useInternalI18n('split-panel');\n const [isPreferencesOpen, setPreferencesOpen] = useState<boolean>(false);\n const [relativeSize, setRelativeSize] = useState(0);\n const [maxSize, setMaxSize] = useState(size);\n const minSize = position === 'bottom' ? MIN_HEIGHT : MIN_WIDTH;\n const cappedSize = getLimitedValue(minSize, size, maxSize);\n const appLayoutMaxWidth = isRefresh && position === 'bottom' ? contentWidthStyles : undefined;\n\n const openButtonAriaLabel = i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel);\n useEffect(() => {\n setSplitPanelToggle({ displayed: closeBehavior === 'collapse', ariaLabel: openButtonAriaLabel });\n }, [setSplitPanelToggle, openButtonAriaLabel, closeBehavior]);\n\n useEffect(() => {\n // effects are called inside out in the components tree\n // wait one frame to allow app-layout to complete its calculations\n const handle = requestAnimationFrame(() => {\n const maxSize = position === 'bottom' ? getMaxHeight() : getMaxWidth();\n setRelativeSize(((size - minSize) / (maxSize - minSize)) * 100);\n setMaxSize(maxSize);\n });\n return () => cancelAnimationFrame(handle);\n }, [size, minSize, position, getMaxHeight, getMaxWidth]);\n\n useEffect(() => {\n reportSize(cappedSize);\n }, [reportSize, cappedSize]);\n\n useEffect(() => {\n const handler = () => setMaxSize(position === 'bottom' ? getMaxHeight() : getMaxWidth());\n window.addEventListener('resize', handler);\n return () => window.removeEventListener('resize', handler);\n }, [position, getMaxWidth, getMaxHeight]);\n\n const setSidePanelWidth = (width: number) => {\n const maxWidth = getMaxWidth();\n const size = getLimitedValue(MIN_WIDTH, width, maxWidth);\n\n if (isOpen && maxWidth >= MIN_WIDTH) {\n onResize({ size });\n }\n };\n\n const setBottomPanelHeight = (height: number) => {\n const maxHeight = getMaxHeight();\n const size = getLimitedValue(MIN_HEIGHT, height, maxHeight);\n\n if (isOpen && maxHeight >= MIN_HEIGHT) {\n onResize({ size });\n }\n };\n\n const splitPanelRefObject = useRef<HTMLDivElement>(null);\n\n const sizeControlProps: SizeControlProps = {\n position,\n panelRef: splitPanelRefObject,\n handleRef: refs.slider,\n setSidePanelWidth,\n setBottomPanelHeight,\n };\n const onSliderPointerDown = usePointerEvents(sizeControlProps);\n const onKeyDown = useKeyboardEvents(sizeControlProps);\n\n const wrappedChildren = (\n <AppLayoutContext.Provider\n value={{\n stickyOffsetTop: topOffset,\n stickyOffsetBottom: bottomOffset,\n }}\n >\n {children}\n </AppLayoutContext.Provider>\n );\n\n const panelHeaderId = useUniqueId('split-panel-header');\n\n const wrappedHeader = (\n <div className={styles.header} style={appLayoutMaxWidth}>\n <h2 className={styles['header-text']} id={panelHeaderId}>\n {header}\n </h2>\n <div className={styles['header-actions']}>\n {!hidePreferencesButton && isOpen && (\n <>\n <InternalButton\n className={styles['preferences-button']}\n iconName=\"settings\"\n variant=\"icon\"\n onClick={() => setPreferencesOpen(true)}\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.preferencesTitle', i18nStrings?.preferencesTitle)}\n ref={refs.preferences}\n />\n <span className={styles.divider} />\n </>\n )}\n\n {isOpen ? (\n <InternalButton\n className={styles['close-button']}\n iconName={\n isRefresh && closeBehavior === 'collapse' ? (position === 'side' ? 'angle-right' : 'angle-down') : 'close'\n }\n variant=\"icon\"\n onClick={onToggle}\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.closeButtonAriaLabel', i18nStrings?.closeButtonAriaLabel)}\n ariaExpanded={isOpen}\n />\n ) : position === 'side' ? null : (\n <InternalButton\n className={styles['open-button']}\n iconName=\"angle-up\"\n variant=\"icon\"\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel)}\n ref={refs.toggle}\n ariaExpanded={isOpen}\n />\n )}\n </div>\n </div>\n );\n\n const resizeHandle = (\n <div\n ref={refs.slider}\n role=\"slider\"\n tabIndex={0}\n aria-label={i18n('i18nStrings.resizeHandleAriaLabel', i18nStrings?.resizeHandleAriaLabel)}\n aria-valuemax={100}\n aria-valuemin={0}\n // Allows us to use the logical left/right keys to move the slider left/right,\n // but match aria keyboard behavior of using left/right to decrease/increase\n // the slider value.\n aria-valuenow={position === 'bottom' ? relativeSize : 100 - relativeSize}\n className={clsx(styles.slider, styles[`slider-${position}`])}\n onKeyDown={onKeyDown}\n onPointerDown={onSliderPointerDown}\n >\n <ResizeHandler className={clsx(styles['slider-icon'], styles[`slider-icon-${position}`])} />\n </div>\n );\n\n /*\n This effect forces the browser to recalculate the layout\n whenever the split panel might have moved.\n\n This is needed as a workaround for a bug in Safari, which does\n not automatically calculate the new position of the split panel\n _content_ when the split panel moves.\n */\n useLayoutEffect(() => {\n const root = __internalRootRef.current;\n\n if (root) {\n const property = 'transform';\n const temporaryValue = 'translateZ(0)';\n\n const valueBefore = root.style[property];\n root.style[property] = temporaryValue;\n\n // This line forces the browser to recalculate the layout\n void root.offsetHeight;\n\n root.style[property] = valueBefore;\n }\n }, [rightOffset, __internalRootRef]);\n\n const mergedRef = useMergeRefs(splitPanelRefObject, __internalRootRef);\n\n if (closeBehavior === 'hide' && !isOpen) {\n return <></>;\n }\n\n /**\n * The AppLayout factor moved the circular buttons out of the\n * SplitPanel and into the Tools component. This conditional\n * is still needed for the early return to prevent execution\n * of the following code.\n */\n if (isRefresh && !isOpen && position === 'side') {\n return <></>;\n }\n\n return (\n <Transition in={isOpen ?? false}>\n {(state, transitioningElementRef) => (\n <>\n {position === 'side' && (\n <SplitPanelContentSide\n resizeHandle={resizeHandle}\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n cappedSize={cappedSize}\n onToggle={onToggle}\n openButtonAriaLabel={i18n('i18nStrings.openButtonAriaLabel', i18nStrings?.openButtonAriaLabel)}\n toggleRef={refs.toggle}\n header={wrappedHeader}\n panelHeaderId={panelHeaderId}\n >\n {wrappedChildren}\n </SplitPanelContentSide>\n )}\n\n {position === 'bottom' && (\n <SplitPanelContentBottom\n resizeHandle={resizeHandle}\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n cappedSize={cappedSize}\n onToggle={onToggle}\n header={wrappedHeader}\n panelHeaderId={panelHeaderId}\n state={state}\n transitioningElementRef={transitioningElementRef}\n appLayoutMaxWidth={appLayoutMaxWidth}\n >\n {wrappedChildren}\n </SplitPanelContentBottom>\n )}\n {isPreferencesOpen && (\n <PreferencesModal\n visible={true}\n preferences={{ position }}\n disabledSidePosition={position === 'bottom' && isForcedPosition}\n isRefresh={isRefresh}\n i18nStrings={{\n header: i18n('i18nStrings.preferencesTitle', i18nStrings?.preferencesTitle),\n confirm: i18n('i18nStrings.preferencesConfirm', i18nStrings?.preferencesConfirm),\n cancel: i18n('i18nStrings.preferencesCancel', i18nStrings?.preferencesCancel),\n positionLabel: i18n('i18nStrings.preferencesPositionLabel', i18nStrings?.preferencesPositionLabel),\n positionDescription: i18n(\n 'i18nStrings.preferencesPositionDescription',\n i18nStrings?.preferencesPositionDescription\n ),\n positionBottom: i18n('i18nStrings.preferencesPositionBottom', i18nStrings?.preferencesPositionBottom),\n positionSide: i18n('i18nStrings.preferencesPositionSide', i18nStrings?.preferencesPositionSide),\n }}\n onConfirm={preferences => {\n onPreferencesChange({ ...preferences });\n setPreferencesOpen(false);\n }}\n onDismiss={() => {\n setPreferencesOpen(false);\n }}\n />\n )}\n </>\n )}\n </Transition>\n );\n}\n\napplyDisplayName(SplitPanel, 'SplitPanel');\n"]}
|
|
@@ -44,13 +44,6 @@ export declare namespace SplitPanelProps {
|
|
|
44
44
|
resizeHandleAriaLabel?: string;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
export interface SizeControlProps {
|
|
48
|
-
position: 'side' | 'bottom';
|
|
49
|
-
splitPanelRef?: React.RefObject<HTMLDivElement>;
|
|
50
|
-
handleRef?: React.RefObject<HTMLDivElement>;
|
|
51
|
-
setSidePanelWidth: (width: number) => void;
|
|
52
|
-
setBottomPanelHeight: (height: number) => void;
|
|
53
|
-
}
|
|
54
47
|
export interface SplitPanelContentProps {
|
|
55
48
|
baseProps: BaseComponentProps;
|
|
56
49
|
isOpen?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["split-panel/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACpC;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;;;;;;;;;;OAaG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC;CAC3C;AAED,yBAAiB,eAAe,CAAC;IAC/B,UAAiB,WAAW;QAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAClC,8BAA8B,CAAC,EAAE,MAAM,CAAC;QACxC,uBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,yBAAyB,CAAC,EAAE,MAAM,CAAC;QACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;KAChC;CACF;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["split-panel/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,k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
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["split-panel/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface SplitPanelProps extends BaseComponentProps {\n /**\n * Header of the split panel.\n */\n header: string;\n children: React.ReactNode;\n /**\n * Determines whether the split panel collapses or hides completely when closed.\n */\n closeBehavior?: 'collapse' | 'hide';\n /**\n * When set to `true`, the preferences button is not displayed.\n */\n hidePreferencesButton?: boolean;\n /**\n * An object containing all the necessary localized strings required by the component.\n * - `closeButtonAriaLabel` - The text of the panel close button aria label.\n * - `openButtonAriaLabel` - The text of the panel open button aria label.\n * - `preferencesTitle` - The text of the preferences modal header.\n * - `preferencesPositionLabel` - The text of the position preference label.\n * - `preferencesPositionDescription` - The text of the position preference description.\n * - `preferencesPositionSide` - The text of the side position preference label.\n * - `preferencesPositionBottom` - The text of the bottom position preference label.\n * - `preferencesConfirm` - The text of the preference modal confirm button.\n * - `preferencesCancel` - The text of the preference modal cancel button.\n * - `resizeHandleAriaLabel` - The label of the resize handle aria label.\n * @i18n\n */\n i18nStrings?: SplitPanelProps.I18nStrings;\n}\n\nexport namespace SplitPanelProps {\n export interface I18nStrings {\n closeButtonAriaLabel?: string;\n openButtonAriaLabel?: string;\n preferencesTitle?: string;\n preferencesPositionLabel?: string;\n preferencesPositionDescription?: string;\n preferencesPositionSide?: string;\n preferencesPositionBottom?: string;\n preferencesConfirm?: string;\n preferencesCancel?: string;\n resizeHandleAriaLabel?: string;\n }\n}\n\nexport interface
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["split-panel/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface SplitPanelProps extends BaseComponentProps {\n /**\n * Header of the split panel.\n */\n header: string;\n children: React.ReactNode;\n /**\n * Determines whether the split panel collapses or hides completely when closed.\n */\n closeBehavior?: 'collapse' | 'hide';\n /**\n * When set to `true`, the preferences button is not displayed.\n */\n hidePreferencesButton?: boolean;\n /**\n * An object containing all the necessary localized strings required by the component.\n * - `closeButtonAriaLabel` - The text of the panel close button aria label.\n * - `openButtonAriaLabel` - The text of the panel open button aria label.\n * - `preferencesTitle` - The text of the preferences modal header.\n * - `preferencesPositionLabel` - The text of the position preference label.\n * - `preferencesPositionDescription` - The text of the position preference description.\n * - `preferencesPositionSide` - The text of the side position preference label.\n * - `preferencesPositionBottom` - The text of the bottom position preference label.\n * - `preferencesConfirm` - The text of the preference modal confirm button.\n * - `preferencesCancel` - The text of the preference modal cancel button.\n * - `resizeHandleAriaLabel` - The label of the resize handle aria label.\n * @i18n\n */\n i18nStrings?: SplitPanelProps.I18nStrings;\n}\n\nexport namespace SplitPanelProps {\n export interface I18nStrings {\n closeButtonAriaLabel?: string;\n openButtonAriaLabel?: string;\n preferencesTitle?: string;\n preferencesPositionLabel?: string;\n preferencesPositionDescription?: string;\n preferencesPositionSide?: string;\n preferencesPositionBottom?: string;\n preferencesConfirm?: string;\n preferencesCancel?: string;\n resizeHandleAriaLabel?: string;\n }\n}\n\nexport interface SplitPanelContentProps {\n baseProps: BaseComponentProps;\n isOpen?: boolean;\n splitPanelRef?: React.Ref<any>;\n cappedSize: number;\n panelHeaderId: string;\n resizeHandle: React.ReactNode;\n header: React.ReactNode;\n children: React.ReactNode;\n onToggle: () => void;\n}\n"]}
|
|
@@ -1,64 +1,61 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"drawer": "
|
|
5
|
-
"refresh": "
|
|
6
|
-
"animating": "
|
|
7
|
-
"preference-icon--layout-border": "awsui_preference-icon--layout-
|
|
8
|
-
"preference-icon--layout-background": "awsui_preference-icon--layout-
|
|
9
|
-
"preference-icon--layout-header": "awsui_preference-icon--layout-
|
|
10
|
-
"preference-icon--border": "awsui_preference-icon--
|
|
11
|
-
"preference-icon--primary-button": "awsui_preference-icon--primary-
|
|
12
|
-
"preference-icon--secondary": "awsui_preference-icon--
|
|
13
|
-
"preference-icon--disabled-element": "awsui_preference-icon--disabled-
|
|
14
|
-
"preference-icon--separator": "awsui_preference-icon--
|
|
15
|
-
"preference-icon--focus-text": "awsui_preference-icon--focus-
|
|
16
|
-
"preference-icon-refresh--layout-top": "awsui_preference-icon-refresh--layout-
|
|
17
|
-
"preference-icon-refresh--layout-main": "awsui_preference-icon-refresh--layout-
|
|
18
|
-
"preference-icon-refresh--primary": "awsui_preference-icon-refresh--
|
|
19
|
-
"preference-icon-refresh--disabled": "awsui_preference-icon-refresh--
|
|
20
|
-
"preference-icon-refresh--column-header": "awsui_preference-icon-refresh--column-
|
|
21
|
-
"preference-icon-refresh--window": "awsui_preference-icon-refresh--
|
|
22
|
-
"preference-icon-refresh--secondary": "awsui_preference-icon-refresh--
|
|
23
|
-
"preference-icon-refresh--default": "awsui_preference-icon-refresh--
|
|
24
|
-
"preference-icon-refresh--separator": "awsui_preference-icon-refresh--
|
|
25
|
-
"preference-icon-refresh--input-default": "awsui_preference-icon-refresh--input-
|
|
26
|
-
"preference-icon-refresh--heading": "awsui_preference-icon-refresh--
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"slider": "
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"slider-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"content-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"pane-
|
|
54
|
-
"content-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"header": "
|
|
59
|
-
"
|
|
60
|
-
"header-divider": "awsui_header-divider_1r9lg_98j8j_571",
|
|
61
|
-
"header-actions": "awsui_header-actions_1r9lg_98j8j_577",
|
|
62
|
-
"divider": "awsui_divider_1r9lg_98j8j_585"
|
|
4
|
+
"drawer": "awsui_drawer_1r9lg_1q0fb_189",
|
|
5
|
+
"refresh": "awsui_refresh_1r9lg_1q0fb_189",
|
|
6
|
+
"animating": "awsui_animating_1r9lg_1q0fb_203",
|
|
7
|
+
"preference-icon--layout-border": "awsui_preference-icon--layout-border_1r9lg_1q0fb_226",
|
|
8
|
+
"preference-icon--layout-background": "awsui_preference-icon--layout-background_1r9lg_1q0fb_230",
|
|
9
|
+
"preference-icon--layout-header": "awsui_preference-icon--layout-header_1r9lg_1q0fb_233",
|
|
10
|
+
"preference-icon--border": "awsui_preference-icon--border_1r9lg_1q0fb_236",
|
|
11
|
+
"preference-icon--primary-button": "awsui_preference-icon--primary-button_1r9lg_1q0fb_240",
|
|
12
|
+
"preference-icon--secondary": "awsui_preference-icon--secondary_1r9lg_1q0fb_243",
|
|
13
|
+
"preference-icon--disabled-element": "awsui_preference-icon--disabled-element_1r9lg_1q0fb_246",
|
|
14
|
+
"preference-icon--separator": "awsui_preference-icon--separator_1r9lg_1q0fb_249",
|
|
15
|
+
"preference-icon--focus-text": "awsui_preference-icon--focus-text_1r9lg_1q0fb_252",
|
|
16
|
+
"preference-icon-refresh--layout-top": "awsui_preference-icon-refresh--layout-top_1r9lg_1q0fb_256",
|
|
17
|
+
"preference-icon-refresh--layout-main": "awsui_preference-icon-refresh--layout-main_1r9lg_1q0fb_259",
|
|
18
|
+
"preference-icon-refresh--primary": "awsui_preference-icon-refresh--primary_1r9lg_1q0fb_262",
|
|
19
|
+
"preference-icon-refresh--disabled": "awsui_preference-icon-refresh--disabled_1r9lg_1q0fb_265",
|
|
20
|
+
"preference-icon-refresh--column-header": "awsui_preference-icon-refresh--column-header_1r9lg_1q0fb_268",
|
|
21
|
+
"preference-icon-refresh--window": "awsui_preference-icon-refresh--window_1r9lg_1q0fb_271",
|
|
22
|
+
"preference-icon-refresh--secondary": "awsui_preference-icon-refresh--secondary_1r9lg_1q0fb_275",
|
|
23
|
+
"preference-icon-refresh--default": "awsui_preference-icon-refresh--default_1r9lg_1q0fb_278",
|
|
24
|
+
"preference-icon-refresh--separator": "awsui_preference-icon-refresh--separator_1r9lg_1q0fb_281",
|
|
25
|
+
"preference-icon-refresh--input-default": "awsui_preference-icon-refresh--input-default_1r9lg_1q0fb_284",
|
|
26
|
+
"preference-icon-refresh--heading": "awsui_preference-icon-refresh--heading_1r9lg_1q0fb_287",
|
|
27
|
+
"root": "awsui_root_1r9lg_1q0fb_291",
|
|
28
|
+
"preferences-button": "awsui_preferences-button_1r9lg_1q0fb_304",
|
|
29
|
+
"close-button": "awsui_close-button_1r9lg_1q0fb_308",
|
|
30
|
+
"drawer-closed": "awsui_drawer-closed_1r9lg_1q0fb_319",
|
|
31
|
+
"drawer-content-side": "awsui_drawer-content-side_1r9lg_1q0fb_324",
|
|
32
|
+
"drawer-content-bottom": "awsui_drawer-content-bottom_1r9lg_1q0fb_344",
|
|
33
|
+
"position-bottom": "awsui_position-bottom_1r9lg_1q0fb_353",
|
|
34
|
+
"position-side": "awsui_position-side_1r9lg_1q0fb_380",
|
|
35
|
+
"slider": "awsui_slider_1r9lg_1q0fb_386",
|
|
36
|
+
"slider-side": "awsui_slider-side_1r9lg_1q0fb_415",
|
|
37
|
+
"slider-wrapper-bottom": "awsui_slider-wrapper-bottom_1r9lg_1q0fb_420",
|
|
38
|
+
"slider-wrapper-side": "awsui_slider-wrapper-side_1r9lg_1q0fb_431",
|
|
39
|
+
"open-button": "awsui_open-button_1r9lg_1q0fb_442",
|
|
40
|
+
"open-button-side": "awsui_open-button-side_1r9lg_1q0fb_446",
|
|
41
|
+
"slider-icon": "awsui_slider-icon_1r9lg_1q0fb_453",
|
|
42
|
+
"slider-icon-bottom": "awsui_slider-icon-bottom_1r9lg_1q0fb_459",
|
|
43
|
+
"slider-icon-side": "awsui_slider-icon-side_1r9lg_1q0fb_462",
|
|
44
|
+
"pane-header-wrapper-bottom": "awsui_pane-header-wrapper-bottom_1r9lg_1q0fb_466",
|
|
45
|
+
"drawer-mobile": "awsui_drawer-mobile_1r9lg_1q0fb_476",
|
|
46
|
+
"drawer-disable-content-paddings": "awsui_drawer-disable-content-paddings_1r9lg_1q0fb_479",
|
|
47
|
+
"content-bottom": "awsui_content-bottom_1r9lg_1q0fb_487",
|
|
48
|
+
"pane-bottom-center-align": "awsui_pane-bottom-center-align_1r9lg_1q0fb_500",
|
|
49
|
+
"pane-bottom-content-nav-padding": "awsui_pane-bottom-content-nav-padding_1r9lg_1q0fb_505",
|
|
50
|
+
"pane-bottom-content-tools-padding": "awsui_pane-bottom-content-tools-padding_1r9lg_1q0fb_509",
|
|
51
|
+
"content-bottom-max-width": "awsui_content-bottom-max-width_1r9lg_1q0fb_513",
|
|
52
|
+
"content-side": "awsui_content-side_1r9lg_1q0fb_518",
|
|
53
|
+
"pane-header-wrapper-side": "awsui_pane-header-wrapper-side_1r9lg_1q0fb_529",
|
|
54
|
+
"pane-content-wrapper-side": "awsui_pane-content-wrapper-side_1r9lg_1q0fb_532",
|
|
55
|
+
"header": "awsui_header_1r9lg_1q0fb_537",
|
|
56
|
+
"header-text": "awsui_header-text_1r9lg_1q0fb_546",
|
|
57
|
+
"header-divider": "awsui_header-divider_1r9lg_1q0fb_556",
|
|
58
|
+
"header-actions": "awsui_header-actions_1r9lg_1q0fb_562",
|
|
59
|
+
"divider": "awsui_divider_1r9lg_1q0fb_570"
|
|
63
60
|
};
|
|
64
61
|
|