@cloudscape-design/components 3.0.66 → 3.0.67
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/input/internal.d.ts.map +1 -1
- package/input/internal.js +7 -0
- package/input/internal.js.map +1 -1
- package/internal/components/dropdown-status/index.d.ts.map +1 -1
- package/internal/components/dropdown-status/index.js +1 -1
- package/internal/components/dropdown-status/index.js.map +1 -1
- package/internal/environment.js +1 -1
- package/package.json +1 -1
- package/split-panel/index.js +8 -8
- package/split-panel/index.js.map +1 -1
- package/split-panel/styles.css.js +58 -58
- package/split-panel/styles.scoped.css +81 -80
- package/split-panel/styles.selectors.js +58 -58
- package/split-panel/utils/use-pointer-events.d.ts +3 -0
- package/split-panel/utils/use-pointer-events.d.ts.map +1 -0
- package/split-panel/utils/{use-mouse-events.js → use-pointer-events.js} +12 -12
- package/split-panel/utils/use-pointer-events.js.map +1 -0
- package/split-panel/utils/use-mouse-events.d.ts +0 -3
- package/split-panel/utils/use-mouse-events.d.ts.map +0 -1
- package/split-panel/utils/use-mouse-events.js.map +0 -1
package/input/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/input/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAG9D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAGL,yBAAyB,EAE1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAgB,MAAM,4BAA4B,CAAC;AAG9E,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,MAAM,WAAW,kBACf,SAAQ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,+BAA+B,EAC/B,0BAA0B;IAC5B,UAAU,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,iBAAiB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE/B,WAAW,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,kBAAkB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAEhC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,gBAAgB,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;IAC/D,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;QAAE,aAAa,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CAChF;;AAkJD,wBAA+C"}
|
package/input/internal.js
CHANGED
|
@@ -39,6 +39,13 @@ function InternalInput(_a, ref) {
|
|
|
39
39
|
__onBlurWithDetail &&
|
|
40
40
|
fireNonCancelableEvent(__onBlurWithDetail, { relatedTarget: getBlurEventRelatedTarget(e.nativeEvent) });
|
|
41
41
|
}, onFocus: onFocus && (function () { return fireNonCancelableEvent(onFocus); }) }, __nativeAttributes);
|
|
42
|
+
if (type === 'number') {
|
|
43
|
+
// Chrome and Safari have a weird built-in behavior of letting focused
|
|
44
|
+
// number inputs be controlled by scrolling on them. However, they don't
|
|
45
|
+
// lock the browser's scroll, so it's very easy to accidentally increment
|
|
46
|
+
// the input while scrolling down the page.
|
|
47
|
+
attributes.onWheel = function (event) { return event.currentTarget.blur(); };
|
|
48
|
+
}
|
|
42
49
|
if (disableBrowserAutocorrect) {
|
|
43
50
|
attributes.autoCorrect = 'off';
|
|
44
51
|
attributes.autoCapitalize = 'off';
|
package/input/internal.js.map
CHANG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E,CAAC,CAAC,kBAAkB,CAAC;YAEvD,oBAAC,YAAY,IAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,kBAAkB,GAAI,CACnF,CACR,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { MouseEventHandler, Ref, useRef } from 'react';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport styles from './styles.css.js';\nimport {\n fireNonCancelableEvent,\n fireKeyboardEvent,\n NonCancelableEventHandler,\n getBlurEventRelatedTarget,\n} from '../internal/events';\nimport { InputProps, BaseInputProps, InputAutoCorrect, BaseChangeDetail } from './interfaces';\nimport { BaseComponentProps, getBaseProps } from '../internal/base-component';\nimport { useSearchProps, convertAutoComplete } from './utils';\nimport { useDebounceCallback } from '../internal/hooks/use-debounce-callback';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport interface InternalInputProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n InputProps,\n FormFieldValidationControlProps,\n InternalBaseComponentProps {\n __leftIcon?: IconProps['name'];\n __leftIconVariant?: IconProps['variant'];\n __onLeftIconClick?: () => void;\n\n __rightIcon?: IconProps['name'];\n __rightIconVariant?: IconProps['variant'];\n __onRightIconClick?: () => void;\n\n __nativeAttributes?: Record<string, any>;\n __noBorderRadius?: boolean;\n\n __onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n __onBlurWithDetail?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n}\n\nconst iconClassName = (position: string, hasHandler: boolean) =>\n clsx(styles['input-icon'], styles[`input-icon-${position}`], { [styles['input-icon-hoverable']]: hasHandler });\nconst preventMouseDown: MouseEventHandler = e => e.preventDefault();\n\nfunction InternalInput(\n {\n type = 'text',\n step,\n inputMode,\n autoComplete = true,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n name,\n value,\n controlId,\n placeholder,\n autoFocus,\n disabled,\n readOnly,\n disableBrowserAutocorrect,\n __noBorderRadius,\n\n __leftIcon,\n __leftIconVariant = 'subtle',\n __onLeftIconClick,\n\n invalid,\n ariaRequired,\n\n __rightIcon,\n __rightIconVariant = 'normal',\n __onRightIconClick,\n\n onKeyDown,\n onKeyUp,\n onChange,\n __onDelayedInput,\n __onBlurWithDetail,\n onBlur,\n onFocus,\n __nativeAttributes,\n __internalRootRef,\n ...rest\n }: InternalInputProps,\n ref: Ref<HTMLInputElement>\n) {\n const baseProps = getBaseProps(rest);\n const fireDelayedInput = useDebounceCallback((value: string) => fireNonCancelableEvent(__onDelayedInput, { value }));\n\n const handleChange = (value: string) => {\n fireDelayedInput(value);\n fireNonCancelableEvent(onChange, { value });\n };\n\n const inputRef = useRef<HTMLInputElement>(null);\n const searchProps = useSearchProps(type, disabled, readOnly, value, inputRef, handleChange);\n __leftIcon = __leftIcon ?? searchProps.__leftIcon;\n __rightIcon = __rightIcon ?? searchProps.__rightIcon;\n __onRightIconClick = __onRightIconClick ?? searchProps.__onRightIconClick;\n\n const attributes: React.InputHTMLAttributes<HTMLInputElement> = {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n name,\n placeholder,\n autoFocus,\n id: controlId,\n className: clsx(\n styles.input,\n type && styles[`input-type-${type}`],\n __rightIcon && styles['input-has-icon-right'],\n __leftIcon && styles['input-has-icon-left'],\n __noBorderRadius && styles['input-has-no-border-radius'],\n {\n [styles['input-readonly']]: readOnly,\n [styles['input-invalid']]: invalid,\n }\n ),\n autoComplete: convertAutoComplete(autoComplete),\n disabled,\n readOnly,\n type,\n step,\n inputMode,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n // We set a default value on the component in order to force it into the controlled mode.\n value: value ?? '',\n onChange: onChange && (event => handleChange(event.target.value)),\n onBlur: e => {\n onBlur && fireNonCancelableEvent(onBlur);\n __onBlurWithDetail &&\n fireNonCancelableEvent(__onBlurWithDetail, { relatedTarget: getBlurEventRelatedTarget(e.nativeEvent) });\n },\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n ...__nativeAttributes,\n };\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n // ensure aria properties are string literal \"true\"\n if (ariaRequired) {\n attributes['aria-required'] = 'true';\n }\n if (invalid) {\n attributes['aria-invalid'] = 'true';\n }\n\n const mergedRef = useMergeRefs(ref, inputRef);\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles['input-container'])} ref={__internalRootRef}>\n {__leftIcon && (\n <span onClick={__onLeftIconClick} className={iconClassName('left', !!__onLeftIconClick)}>\n <InternalIcon name={__leftIcon} variant={disabled ? 'disabled' : __leftIconVariant} />\n </span>\n )}\n <input ref={mergedRef} {...attributes} spellCheck={false} />\n {__rightIcon && (\n <span\n onClick={__onRightIconClick}\n onMouseDown={preventMouseDown}\n className={iconClassName('right', !!__onRightIconClick)}\n >\n <InternalIcon name={__rightIcon} variant={disabled ? 'disabled' : __rightIconVariant} />\n </span>\n )}\n </div>\n );\n}\n\nexport default React.forwardRef(InternalInput);\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/input/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAA0B,MAAM,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,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YAAY,IAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,kBAAkB,GAAI,CACnF,CACR,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { MouseEventHandler, Ref, useRef } from 'react';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport styles from './styles.css.js';\nimport {\n fireNonCancelableEvent,\n fireKeyboardEvent,\n NonCancelableEventHandler,\n getBlurEventRelatedTarget,\n} from '../internal/events';\nimport { InputProps, BaseInputProps, InputAutoCorrect, BaseChangeDetail } from './interfaces';\nimport { BaseComponentProps, getBaseProps } from '../internal/base-component';\nimport { useSearchProps, convertAutoComplete } from './utils';\nimport { useDebounceCallback } from '../internal/hooks/use-debounce-callback';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport interface InternalInputProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n InputProps,\n FormFieldValidationControlProps,\n InternalBaseComponentProps {\n __leftIcon?: IconProps['name'];\n __leftIconVariant?: IconProps['variant'];\n __onLeftIconClick?: () => void;\n\n __rightIcon?: IconProps['name'];\n __rightIconVariant?: IconProps['variant'];\n __onRightIconClick?: () => void;\n\n __nativeAttributes?: Record<string, any>;\n __noBorderRadius?: boolean;\n\n __onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n __onBlurWithDetail?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n}\n\nconst iconClassName = (position: string, hasHandler: boolean) =>\n clsx(styles['input-icon'], styles[`input-icon-${position}`], { [styles['input-icon-hoverable']]: hasHandler });\nconst preventMouseDown: MouseEventHandler = e => e.preventDefault();\n\nfunction InternalInput(\n {\n type = 'text',\n step,\n inputMode,\n autoComplete = true,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n name,\n value,\n controlId,\n placeholder,\n autoFocus,\n disabled,\n readOnly,\n disableBrowserAutocorrect,\n __noBorderRadius,\n\n __leftIcon,\n __leftIconVariant = 'subtle',\n __onLeftIconClick,\n\n invalid,\n ariaRequired,\n\n __rightIcon,\n __rightIconVariant = 'normal',\n __onRightIconClick,\n\n onKeyDown,\n onKeyUp,\n onChange,\n __onDelayedInput,\n __onBlurWithDetail,\n onBlur,\n onFocus,\n __nativeAttributes,\n __internalRootRef,\n ...rest\n }: InternalInputProps,\n ref: Ref<HTMLInputElement>\n) {\n const baseProps = getBaseProps(rest);\n const fireDelayedInput = useDebounceCallback((value: string) => fireNonCancelableEvent(__onDelayedInput, { value }));\n\n const handleChange = (value: string) => {\n fireDelayedInput(value);\n fireNonCancelableEvent(onChange, { value });\n };\n\n const inputRef = useRef<HTMLInputElement>(null);\n const searchProps = useSearchProps(type, disabled, readOnly, value, inputRef, handleChange);\n __leftIcon = __leftIcon ?? searchProps.__leftIcon;\n __rightIcon = __rightIcon ?? searchProps.__rightIcon;\n __onRightIconClick = __onRightIconClick ?? searchProps.__onRightIconClick;\n\n const attributes: React.InputHTMLAttributes<HTMLInputElement> = {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n name,\n placeholder,\n autoFocus,\n id: controlId,\n className: clsx(\n styles.input,\n type && styles[`input-type-${type}`],\n __rightIcon && styles['input-has-icon-right'],\n __leftIcon && styles['input-has-icon-left'],\n __noBorderRadius && styles['input-has-no-border-radius'],\n {\n [styles['input-readonly']]: readOnly,\n [styles['input-invalid']]: invalid,\n }\n ),\n autoComplete: convertAutoComplete(autoComplete),\n disabled,\n readOnly,\n type,\n step,\n inputMode,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n // We set a default value on the component in order to force it into the controlled mode.\n value: value ?? '',\n onChange: onChange && (event => handleChange(event.target.value)),\n onBlur: e => {\n onBlur && fireNonCancelableEvent(onBlur);\n __onBlurWithDetail &&\n fireNonCancelableEvent(__onBlurWithDetail, { relatedTarget: getBlurEventRelatedTarget(e.nativeEvent) });\n },\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n ...__nativeAttributes,\n };\n\n if (type === 'number') {\n // Chrome and Safari have a weird built-in behavior of letting focused\n // number inputs be controlled by scrolling on them. However, they don't\n // lock the browser's scroll, so it's very easy to accidentally increment\n // the input while scrolling down the page.\n attributes.onWheel = event => event.currentTarget.blur();\n }\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n // ensure aria properties are string literal \"true\"\n if (ariaRequired) {\n attributes['aria-required'] = 'true';\n }\n if (invalid) {\n attributes['aria-invalid'] = 'true';\n }\n\n const mergedRef = useMergeRefs(ref, inputRef);\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles['input-container'])} ref={__internalRootRef}>\n {__leftIcon && (\n <span onClick={__onLeftIconClick} className={iconClassName('left', !!__onLeftIconClick)}>\n <InternalIcon name={__leftIcon} variant={disabled ? 'disabled' : __leftIconVariant} />\n </span>\n )}\n <input ref={mergedRef} {...attributes} spellCheck={false} />\n {__rightIcon && (\n <span\n onClick={__onRightIconClick}\n onMouseDown={preventMouseDown}\n className={iconClassName('right', !!__onRightIconClick)}\n >\n <InternalIcon name={__rightIcon} variant={disabled ? 'disabled' : __rightIconVariant} />\n </span>\n )}\n </div>\n );\n}\n\nexport default React.forwardRef(InternalInput);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-status/index.tsx"],"names":[],"mappings":"AAEA,O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,OAAO,EACP,eAAe,GAChB,EAAE,2BAA2B,KAAK,oBAAoB,CAAC;AAExD,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IAChC,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAgD/B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { usePrevious } from '../../hooks/use-previous';
|
|
|
8
8
|
import styles from './styles.css.js';
|
|
9
9
|
function DropdownStatus(_a) {
|
|
10
10
|
var children = _a.children;
|
|
11
|
-
return React.createElement("div", { className: styles.root }, children);
|
|
11
|
+
return (React.createElement("div", { className: styles.root, "aria-live": "polite" }, children));
|
|
12
12
|
}
|
|
13
13
|
export var useDropdownStatus = function (_a) {
|
|
14
14
|
var statusType = _a.statusType, empty = _a.empty, loadingText = _a.loadingText, finishedText = _a.finishedText, errorText = _a.errorText, recoveryText = _a.recoveryText, isEmpty = _a.isEmpty, isNoMatch = _a.isNoMatch, noMatch = _a.noMatch, onRecoveryClick = _a.onRecoveryClick;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-status/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAA6B,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAiBrC,SAAS,cAAc,CAAC,EAA2C;QAAzC,QAAQ,cAAA;IAChC,OAAO,6BAAK,S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,IAAC,IAAI,EAAE,SAAS,IAAG,WAAW,CAA2B,CAAC;KAC1G;SAAM,IAAI,UAAU,KAAK,OAAO,EAAE;QACjC,YAAY,CAAC,OAAO,GAAG,CACrB;YACE,oBAAC,uBAAuB,IAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,kBAAkB,KAAK,OAAO,IAC5E,SAAS,CACc;YAAC,GAAG;YAC7B,YAAY,IAAI,CACf,oBAAC,YAAY,IACX,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,cAAM,OAAA,sBAAsB,CAAC,eAAe,CAAC,EAAvC,CAAuC,EACvD,OAAO,EAAC,UAAU,EAClB,SAAS,EAAE,MAAM,CAAC,QAAQ,IAEzB,YAAY,CACA,CAChB,CACA,CACJ,CAAC;KACH;SAAM,IAAI,OAAO,IAAI,KAAK,EAAE;QAC3B,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;KAC9B;SAAM,IAAI,SAAS,IAAI,OAAO,EAAE;QAC/B,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;KAChC;SAAM,IAAI,UAAU,KAAK,UAAU,IAAI,YAAY,EAAE;QACpD,YAAY,CAAC,OAAO,GAAG,YAAY,CAAC;QACpC,YAAY,CAAC,QAAQ,GAAG,KAAK,CAAC;KAC/B;IAED,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport { LinkProps } from '../../../link/interfaces';\nimport InternalLink from '../../../link/internal';\n\nimport InternalStatusIndicator from '../../../status-indicator/internal';\nimport { NonCancelableEventHandler, fireNonCancelableEvent } from '../../events';\nimport { usePrevious } from '../../hooks/use-previous';\n\nimport { DropdownStatusProps } from './interfaces';\nimport styles from './styles.css.js';\n\nexport { DropdownStatusProps };\n\nexport interface DropdownStatusPropsExtended extends DropdownStatusProps {\n isEmpty?: boolean;\n isNoMatch?: boolean;\n noMatch?: React.ReactNode;\n /**\n * Called when the user clicks the recovery button placed at the\n * bottom of the dropdown list in the error state. Use this to\n * retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n}\n\nfunction DropdownStatus({ children }: { children: React.ReactNode }) {\n return (\n <div className={styles.root} aria-live=\"polite\">\n {children}\n </div>\n );\n}\n\ntype UseDropdownStatus = ({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n onRecoveryClick,\n}: DropdownStatusPropsExtended) => DropdownStatusResult;\n\ninterface DropdownStatusResult {\n isSticky: boolean;\n content: React.ReactNode | null;\n focusRecoveryLink: () => void;\n}\n\nexport const useDropdownStatus: UseDropdownStatus = ({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n onRecoveryClick,\n}) => {\n const linkRef = useRef<LinkProps.Ref | null>(null);\n const focusRecoveryLink = () => linkRef.current?.focus();\n const previousStatusType = usePrevious(statusType);\n\n const statusResult: DropdownStatusResult = { isSticky: true, content: null, focusRecoveryLink };\n\n if (statusType === 'loading') {\n statusResult.content = <InternalStatusIndicator type={'loading'}>{loadingText}</InternalStatusIndicator>;\n } else if (statusType === 'error') {\n statusResult.content = (\n <>\n <InternalStatusIndicator type=\"error\" __animate={previousStatusType !== 'error'}>\n {errorText}\n </InternalStatusIndicator>{' '}\n {recoveryText && (\n <InternalLink\n ref={linkRef}\n onFollow={() => fireNonCancelableEvent(onRecoveryClick)}\n variant=\"recovery\"\n className={styles.recovery}\n >\n {recoveryText}\n </InternalLink>\n )}\n </>\n );\n } else if (isEmpty && empty) {\n statusResult.content = empty;\n } else if (isNoMatch && noMatch) {\n statusResult.content = noMatch;\n } else if (statusType === 'finished' && finishedText) {\n statusResult.content = finishedText;\n statusResult.isSticky = false;\n }\n\n return statusResult;\n};\n\nexport default DropdownStatus;\n"]}
|
package/internal/environment.js
CHANGED
package/package.json
CHANGED
package/split-panel/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import useFocusVisible from '../internal/hooks/focus-visible';
|
|
|
10
10
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
11
11
|
import ResizeHandler from './icons/resize-handler';
|
|
12
12
|
import PreferencesModal from './preferences-modal';
|
|
13
|
-
import {
|
|
13
|
+
import { usePointerEvents } from './utils/use-pointer-events';
|
|
14
14
|
import { useKeyboardEvents } from './utils/use-keyboard-events';
|
|
15
15
|
import styles from './styles.css.js';
|
|
16
16
|
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
@@ -23,7 +23,7 @@ var MIN_HEIGHT = 160;
|
|
|
23
23
|
var MIN_WIDTH = 280;
|
|
24
24
|
var TransitionContentSide = function (_a) {
|
|
25
25
|
var _b, _c;
|
|
26
|
-
var baseProps = _a.baseProps, isOpen = _a.isOpen, splitPanelRef = _a.splitPanelRef, topOffset = _a.topOffset, bottomOffset = _a.bottomOffset, cappedSize = _a.cappedSize, isRefresh = _a.isRefresh, onToggle = _a.onToggle, i18nStrings = _a.i18nStrings, relativeSize = _a.relativeSize, onKeyDown = _a.onKeyDown,
|
|
26
|
+
var baseProps = _a.baseProps, isOpen = _a.isOpen, splitPanelRef = _a.splitPanelRef, topOffset = _a.topOffset, bottomOffset = _a.bottomOffset, cappedSize = _a.cappedSize, isRefresh = _a.isRefresh, onToggle = _a.onToggle, i18nStrings = _a.i18nStrings, relativeSize = _a.relativeSize, onKeyDown = _a.onKeyDown, onSliderPointerDown = _a.onSliderPointerDown, focusVisible = _a.focusVisible, toggleRef = _a.toggleRef, paneHeader = _a.paneHeader, wrappedChildren = _a.wrappedChildren;
|
|
27
27
|
return (React.createElement("div", __assign({}, baseProps, { className: clsx(baseProps.className, styles.drawer, styles.root, styles['position-side'], (_b = {},
|
|
28
28
|
_b[styles['drawer-closed']] = !isOpen,
|
|
29
29
|
_b)), style: {
|
|
@@ -37,7 +37,7 @@ var TransitionContentSide = function (_a) {
|
|
|
37
37
|
bottom: bottomOffset
|
|
38
38
|
}, onClick: function () { return !isOpen && onToggle(); } },
|
|
39
39
|
isOpen ? (React.createElement("div", { className: styles['slider-wrapper-side'] },
|
|
40
|
-
React.createElement("div", __assign({ role: "slider", tabIndex: 0, "aria-label": i18nStrings.resizeHandleAriaLabel, "aria-valuemax": 100, "aria-valuemin": 0, "aria-valuenow": relativeSize, className: clsx(styles.slider, styles['slider-side']), onKeyDown: onKeyDown,
|
|
40
|
+
React.createElement("div", __assign({ role: "slider", tabIndex: 0, "aria-label": i18nStrings.resizeHandleAriaLabel, "aria-valuemax": 100, "aria-valuemin": 0, "aria-valuenow": relativeSize, className: clsx(styles.slider, styles['slider-side']), onKeyDown: onKeyDown, onPointerDown: onSliderPointerDown }, focusVisible),
|
|
41
41
|
React.createElement(ResizeHandler, { className: clsx(styles['slider-icon'], styles['slider-icon-side']) })))) : (React.createElement(InternalButton, { className: clsx(styles['open-button'], styles['open-button-side']), iconName: "angle-left", variant: "icon", formAction: "none", ariaLabel: i18nStrings.openButtonAriaLabel, ariaExpanded: isOpen, ref: isRefresh ? null : toggleRef })),
|
|
42
42
|
React.createElement("div", { className: styles['content-side'], "aria-hidden": !isOpen },
|
|
43
43
|
React.createElement("div", { className: clsx(styles['pane-header-wrapper-side']) }, paneHeader),
|
|
@@ -46,7 +46,7 @@ var TransitionContentSide = function (_a) {
|
|
|
46
46
|
};
|
|
47
47
|
var TransitionContentBottom = function (_a) {
|
|
48
48
|
var _b, _c;
|
|
49
|
-
var baseProps = _a.baseProps, isOpen = _a.isOpen, splitPanelRef = _a.splitPanelRef, bottomOffset = _a.bottomOffset, cappedSize = _a.cappedSize, isRefresh = _a.isRefresh, onToggle = _a.onToggle, i18nStrings = _a.i18nStrings, relativeSize = _a.relativeSize, onKeyDown = _a.onKeyDown,
|
|
49
|
+
var baseProps = _a.baseProps, isOpen = _a.isOpen, splitPanelRef = _a.splitPanelRef, bottomOffset = _a.bottomOffset, cappedSize = _a.cappedSize, isRefresh = _a.isRefresh, onToggle = _a.onToggle, i18nStrings = _a.i18nStrings, relativeSize = _a.relativeSize, onKeyDown = _a.onKeyDown, onSliderPointerDown = _a.onSliderPointerDown, focusVisible = _a.focusVisible, paneHeader = _a.paneHeader, wrappedChildren = _a.wrappedChildren, isMobile = _a.isMobile, disableContentPaddings = _a.disableContentPaddings, state = _a.state, leftOffset = _a.leftOffset, rightOffset = _a.rightOffset, transitioningElementRef = _a.transitioningElementRef, centeredMaxWidthClasses = _a.centeredMaxWidthClasses, splitPanelHeaderRef = _a.splitPanelHeaderRef, appLayoutMaxWidth = _a.appLayoutMaxWidth;
|
|
50
50
|
var transitionContentBottomRef = useMergeRefs(splitPanelRef || null, transitioningElementRef);
|
|
51
51
|
return (React.createElement("div", __assign({}, baseProps, { className: clsx(baseProps.className, styles.root, styles.drawer, styles['position-bottom'], (_b = {},
|
|
52
52
|
_b[styles['drawer-closed']] = !isOpen,
|
|
@@ -61,7 +61,7 @@ var TransitionContentBottom = function (_a) {
|
|
|
61
61
|
height: isOpen ? cappedSize : undefined
|
|
62
62
|
}, ref: transitionContentBottomRef }),
|
|
63
63
|
isOpen && (React.createElement("div", { className: styles['slider-wrapper-bottom'] },
|
|
64
|
-
React.createElement("div", __assign({ role: "slider", tabIndex: 0, "aria-label": i18nStrings.resizeHandleAriaLabel, "aria-valuemax": 100, "aria-valuemin": 0, "aria-valuenow": relativeSize, className: clsx(styles.slider, styles['slider-bottom']), onKeyDown: onKeyDown,
|
|
64
|
+
React.createElement("div", __assign({ role: "slider", tabIndex: 0, "aria-label": i18nStrings.resizeHandleAriaLabel, "aria-valuemax": 100, "aria-valuemin": 0, "aria-valuenow": relativeSize, className: clsx(styles.slider, styles['slider-bottom']), onKeyDown: onKeyDown, onPointerDown: onSliderPointerDown }, focusVisible),
|
|
65
65
|
React.createElement(ResizeHandler, { className: clsx(styles['slider-icon'], styles['slider-icon-bottom']) })))),
|
|
66
66
|
React.createElement("div", { className: styles['drawer-content-bottom'] },
|
|
67
67
|
React.createElement("div", { className: clsx(styles['pane-header-wrapper-bottom'], centeredMaxWidthClasses), ref: splitPanelHeaderRef }, paneHeader),
|
|
@@ -123,7 +123,7 @@ export default function SplitPanel(_a) {
|
|
|
123
123
|
setSidePanelWidth: setSidePanelWidth,
|
|
124
124
|
setBottomPanelHeight: setBottomPanelHeight
|
|
125
125
|
};
|
|
126
|
-
var
|
|
126
|
+
var onSliderPointerDown = usePointerEvents(sizeControlProps);
|
|
127
127
|
var onKeyDown = useKeyboardEvents(sizeControlProps);
|
|
128
128
|
var toggleRef = useRef(null);
|
|
129
129
|
var closeRef = useRef(null);
|
|
@@ -188,8 +188,8 @@ export default function SplitPanel(_a) {
|
|
|
188
188
|
_b[styles['pane-bottom-content-tools-padding']] = contentWrapperPaddings === null || contentWrapperPaddings === void 0 ? void 0 : contentWrapperPaddings.closedTools,
|
|
189
189
|
_b));
|
|
190
190
|
return (React.createElement(Transition, { "in": isOpen !== null && isOpen !== void 0 ? isOpen : false }, function (state, transitioningElementRef) { return (React.createElement(React.Fragment, null,
|
|
191
|
-
position === 'side' && (React.createElement(TransitionContentSide, { baseProps: baseProps, isOpen: isOpen, splitPanelRef: mergedRef, topOffset: topOffset, bottomOffset: bottomOffset, cappedSize: cappedSize, isRefresh: isRefresh, onToggle: onToggle, i18nStrings: i18nStrings, relativeSize: relativeSize, onKeyDown: onKeyDown,
|
|
192
|
-
position === 'bottom' && (React.createElement(TransitionContentBottom, { baseProps: baseProps, isOpen: isOpen, splitPanelRef: mergedRef, bottomOffset: bottomOffset, cappedSize: cappedSize, isRefresh: isRefresh, onToggle: onToggle, i18nStrings: i18nStrings, relativeSize: relativeSize, onKeyDown: onKeyDown,
|
|
191
|
+
position === 'side' && (React.createElement(TransitionContentSide, { baseProps: baseProps, isOpen: isOpen, splitPanelRef: mergedRef, topOffset: topOffset, bottomOffset: bottomOffset, cappedSize: cappedSize, isRefresh: isRefresh, onToggle: onToggle, i18nStrings: i18nStrings, relativeSize: relativeSize, onKeyDown: onKeyDown, onSliderPointerDown: onSliderPointerDown, focusVisible: focusVisible, toggleRef: toggleRef, paneHeader: paneHeader, wrappedChildren: wrappedChildren })),
|
|
192
|
+
position === 'bottom' && (React.createElement(TransitionContentBottom, { baseProps: baseProps, isOpen: isOpen, splitPanelRef: mergedRef, bottomOffset: bottomOffset, cappedSize: cappedSize, isRefresh: isRefresh, onToggle: onToggle, i18nStrings: i18nStrings, relativeSize: relativeSize, onKeyDown: onKeyDown, onSliderPointerDown: onSliderPointerDown, focusVisible: focusVisible, paneHeader: paneHeader, wrappedChildren: wrappedChildren, isMobile: isMobile, disableContentPaddings: disableContentPaddings, state: state, leftOffset: leftOffset, rightOffset: rightOffset, transitioningElementRef: transitioningElementRef, centeredMaxWidthClasses: centeredMaxWidthClasses, splitPanelHeaderRef: splitPanelHeaderRef, appLayoutMaxWidth: appLayoutMaxWidth })),
|
|
193
193
|
isPreferencesOpen && (React.createElement(PreferencesModal, { visible: true, preferences: { position: position }, disabledSidePosition: position === 'bottom' && isForcedPosition, isRefresh: isRefresh, i18nStrings: {
|
|
194
194
|
header: i18nStrings.preferencesTitle,
|
|
195
195
|
confirm: i18nStrings.preferencesConfirm,
|
package/split-panel/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/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,EAAsB,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,eAA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AE;gBACT,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,GACD,CACH,CACA,CACJ,EA3EoC,CA2EpC,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, BaseComponentProps } from '../internal/base-component';\nimport { useSplitPanelContext } from '../internal/context/split-panel-context';\nimport useFocusVisible from '../internal/hooks/focus-visible';\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 { useMouseEvents } from './utils/use-mouse-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, TransitionStatus } from '../internal/components/transition';\nimport { ButtonProps } from '../button/interfaces';\nimport { useEffectOnUpdate } from '../internal/hooks/use-effect-on-update';\n\nexport { SplitPanelProps };\n\nconst MIN_HEIGHT = 160;\nconst MIN_WIDTH = 280;\ninterface TransitionContentProps {\n baseProps: BaseComponentProps;\n isOpen?: boolean;\n splitPanelRef?: React.Ref<any>;\n bottomOffset: number;\n cappedSize: number;\n isRefresh: boolean;\n onToggle: () => void;\n i18nStrings: SplitPanelProps.I18nStrings;\n relativeSize: number;\n onKeyDown: (event: React.KeyboardEvent<Element>) => void;\n onSliderMouseDown: () => void;\n focusVisible: { 'data-awsui-focus-visible': true } | { 'data-awsui-focus-visible'?: undefined };\n paneHeader: JSX.Element;\n wrappedChildren: JSX.Element;\n}\n\ninterface TransitionContentSideProps extends TransitionContentProps {\n topOffset: number;\n toggleRef: React.RefObject<ButtonProps.Ref>;\n}\n\nconst TransitionContentSide = ({\n baseProps,\n isOpen,\n splitPanelRef,\n topOffset,\n bottomOffset,\n cappedSize,\n isRefresh,\n onToggle,\n i18nStrings,\n relativeSize,\n onKeyDown,\n onSliderMouseDown,\n focusVisible,\n toggleRef,\n paneHeader,\n wrappedChildren,\n}: TransitionContentSideProps) => {\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.drawer, styles.root, styles['position-side'], {\n [styles['drawer-closed']]: !isOpen,\n })}\n style={{\n width: isOpen ? cappedSize : undefined,\n maxWidth: isRefresh ? '100%' : undefined,\n }}\n ref={splitPanelRef}\n >\n <aside\n className={clsx(styles['drawer-content-side'], {\n [styles.refresh]: isRefresh,\n })}\n style={{\n top: topOffset,\n bottom: bottomOffset,\n }}\n onClick={() => !isOpen && onToggle()}\n >\n {isOpen ? (\n <div className={styles['slider-wrapper-side']}>\n <div\n role=\"slider\"\n tabIndex={0}\n aria-label={i18nStrings.resizeHandleAriaLabel}\n aria-valuemax={100}\n aria-valuemin={0}\n aria-valuenow={relativeSize}\n className={clsx(styles.slider, styles['slider-side'])}\n onKeyDown={onKeyDown}\n onMouseDown={onSliderMouseDown}\n {...focusVisible}\n >\n <ResizeHandler className={clsx(styles['slider-icon'], styles['slider-icon-side'])} />\n </div>\n </div>\n ) : (\n <InternalButton\n className={clsx(styles['open-button'], styles['open-button-side'])}\n iconName=\"angle-left\"\n variant=\"icon\"\n formAction=\"none\"\n ariaLabel={i18nStrings.openButtonAriaLabel}\n ariaExpanded={isOpen}\n ref={isRefresh ? null : toggleRef}\n />\n )}\n <div className={styles['content-side']} aria-hidden={!isOpen}>\n <div className={clsx(styles['pane-header-wrapper-side'])}>{paneHeader}</div>\n <hr className={styles['header-divider']} />\n <div className={clsx(styles['pane-content-wrapper-side'])}>{wrappedChildren}</div>\n </div>\n </aside>\n </div>\n );\n};\n\ninterface TransitionContentBottomProps extends TransitionContentProps {\n isMobile: boolean;\n disableContentPaddings?: boolean;\n state: TransitionStatus;\n leftOffset: number;\n rightOffset: number;\n transitioningElementRef: React.Ref<any>;\n centeredMaxWidthClasses: string;\n splitPanelHeaderRef?: React.Ref<any>;\n appLayoutMaxWidth: React.CSSProperties | undefined;\n}\n\nconst TransitionContentBottom = ({\n baseProps,\n isOpen,\n splitPanelRef,\n bottomOffset,\n cappedSize,\n isRefresh,\n onToggle,\n i18nStrings,\n relativeSize,\n onKeyDown,\n onSliderMouseDown,\n focusVisible,\n paneHeader,\n wrappedChildren,\n isMobile,\n disableContentPaddings,\n state,\n leftOffset,\n rightOffset,\n transitioningElementRef,\n centeredMaxWidthClasses,\n splitPanelHeaderRef,\n appLayoutMaxWidth,\n}: TransitionContentBottomProps) => {\n const transitionContentBottomRef = useMergeRefs(splitPanelRef || null, transitioningElementRef);\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.root, styles.drawer, styles['position-bottom'], {\n [styles['drawer-closed']]: !isOpen,\n [styles['drawer-mobile']]: isMobile,\n [styles['drawer-disable-content-paddings']]: disableContentPaddings,\n [styles.animating]: isRefresh && (state === 'entering' || state === 'exiting'),\n [styles.refresh]: isRefresh,\n })}\n onClick={() => !isOpen && onToggle()}\n style={{\n bottom: bottomOffset,\n left: leftOffset,\n right: rightOffset,\n height: isOpen ? cappedSize : undefined,\n }}\n ref={transitionContentBottomRef}\n >\n {isOpen && (\n <div className={styles['slider-wrapper-bottom']}>\n <div\n role=\"slider\"\n tabIndex={0}\n aria-label={i18nStrings.resizeHandleAriaLabel}\n aria-valuemax={100}\n aria-valuemin={0}\n aria-valuenow={relativeSize}\n className={clsx(styles.slider, styles['slider-bottom'])}\n onKeyDown={onKeyDown}\n onMouseDown={onSliderMouseDown}\n {...focusVisible}\n >\n <ResizeHandler className={clsx(styles['slider-icon'], styles['slider-icon-bottom'])} />\n </div>\n </div>\n )}\n <div className={styles['drawer-content-bottom']}>\n <div className={clsx(styles['pane-header-wrapper-bottom'], centeredMaxWidthClasses)} ref={splitPanelHeaderRef}>\n {paneHeader}\n </div>\n <div className={clsx(styles['content-bottom'], centeredMaxWidthClasses)} aria-hidden={!isOpen}>\n <div className={clsx({ [styles['content-bottom-max-width']]: isRefresh })} style={appLayoutMaxWidth}>\n {wrappedChildren}\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default function SplitPanel({\n header,\n children,\n hidePreferencesButton = false,\n i18nStrings,\n ...restProps\n}: SplitPanelProps) {\n const { __internalRootRef } = useBaseComponent('SplitPanel');\n const {\n size,\n getMaxWidth,\n getMaxHeight,\n position,\n topOffset,\n bottomOffset,\n leftOffset,\n rightOffset,\n disableContentPaddings,\n contentWidthStyles,\n contentWrapperPaddings,\n isCopy,\n isOpen,\n isMobile,\n isRefresh,\n isForcedPosition,\n splitPanelRef,\n splitPanelHeaderRef,\n lastInteraction,\n onPreferencesChange,\n onResize,\n onToggle,\n reportSize,\n setOpenButtonAriaLabel,\n } = useSplitPanelContext();\n const baseProps = getBaseProps(restProps);\n const focusVisible = useFocusVisible();\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 useEffect(() => {\n setOpenButtonAriaLabel?.(i18nStrings.openButtonAriaLabel);\n }, [setOpenButtonAriaLabel, i18nStrings.openButtonAriaLabel]);\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 / maxSize) * 100);\n setMaxSize(maxSize);\n });\n return () => cancelAnimationFrame(handle);\n }, [size, 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(null);\n const sizeControlProps: SizeControlProps = {\n position,\n splitPanelRef: splitPanelRefObject,\n setSidePanelWidth,\n setBottomPanelHeight,\n };\n const onSliderMouseDown = useMouseEvents(sizeControlProps);\n const onKeyDown = useKeyboardEvents(sizeControlProps);\n\n const toggleRef = useRef<ButtonProps.Ref>(null);\n const closeRef = useRef<ButtonProps.Ref>(null);\n const preferencesRef = useRef<ButtonProps.Ref>(null);\n\n useEffectOnUpdate(() => {\n switch (lastInteraction?.type) {\n case 'open':\n return closeRef.current?.focus();\n case 'close':\n return toggleRef.current?.focus();\n case 'position':\n return preferencesRef.current?.focus();\n default:\n return;\n }\n }, [lastInteraction]);\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 paneHeader = (\n <div className={styles.header} style={appLayoutMaxWidth}>\n <h2 className={styles['header-text']}>{header}</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={i18nStrings.preferencesTitle}\n ref={preferencesRef}\n />\n <span className={styles.divider} />\n </>\n )}\n\n {isOpen ? (\n <InternalButton\n className={styles['close-button']}\n iconName={isRefresh && position === 'side' ? 'angle-right' : isRefresh ? 'angle-down' : 'close'}\n variant=\"icon\"\n onClick={onToggle}\n formAction=\"none\"\n ariaLabel={i18nStrings.closeButtonAriaLabel}\n ref={closeRef}\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={i18nStrings.openButtonAriaLabel}\n ref={toggleRef}\n ariaExpanded={isOpen}\n />\n )}\n </div>\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(splitPanelRef, splitPanelRefObject, __internalRootRef);\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 || isCopy) && position === 'side') {\n return <></>;\n }\n\n const centeredMaxWidthClasses = clsx({\n [styles['pane-bottom-center-align']]: isRefresh,\n [styles['pane-bottom-content-nav-padding']]: contentWrapperPaddings?.closedNav,\n [styles['pane-bottom-content-tools-padding']]: contentWrapperPaddings?.closedTools,\n });\n\n return (\n <Transition in={isOpen ?? false}>\n {(state, transitioningElementRef) => (\n <>\n {position === 'side' && (\n <TransitionContentSide\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n topOffset={topOffset}\n bottomOffset={bottomOffset}\n cappedSize={cappedSize}\n isRefresh={isRefresh}\n onToggle={onToggle}\n i18nStrings={i18nStrings}\n relativeSize={relativeSize}\n onKeyDown={onKeyDown}\n onSliderMouseDown={onSliderMouseDown}\n focusVisible={focusVisible}\n toggleRef={toggleRef}\n paneHeader={paneHeader}\n wrappedChildren={wrappedChildren}\n ></TransitionContentSide>\n )}\n\n {position === 'bottom' && (\n <TransitionContentBottom\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n bottomOffset={bottomOffset}\n cappedSize={cappedSize}\n isRefresh={isRefresh}\n onToggle={onToggle}\n i18nStrings={i18nStrings}\n relativeSize={relativeSize}\n onKeyDown={onKeyDown}\n onSliderMouseDown={onSliderMouseDown}\n focusVisible={focusVisible}\n paneHeader={paneHeader}\n wrappedChildren={wrappedChildren}\n isMobile={isMobile}\n disableContentPaddings={disableContentPaddings}\n state={state}\n leftOffset={leftOffset}\n rightOffset={rightOffset}\n transitioningElementRef={transitioningElementRef}\n centeredMaxWidthClasses={centeredMaxWidthClasses}\n splitPanelHeaderRef={splitPanelHeaderRef}\n appLayoutMaxWidth={appLayoutMaxWidth}\n ></TransitionContentBottom>\n )}\n {isPreferencesOpen && (\n <PreferencesModal\n visible={true}\n preferences={{ position }}\n disabledSidePosition={position === 'bottom' && isForcedPosition}\n isRefresh={isRefresh}\n i18nStrings={{\n header: i18nStrings.preferencesTitle,\n confirm: i18nStrings.preferencesConfirm,\n cancel: i18nStrings.preferencesCancel,\n positionLabel: i18nStrings.preferencesPositionLabel,\n positionDescription: i18nStrings.preferencesPositionDescription,\n positionBottom: i18nStrings.preferencesPositionBottom,\n positionSide: 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":"","sources":["../../../src/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,EAAsB,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,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,EAAoB,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAI3E,IAAM,UAAU,GAAG,GAAG,CAAC;AACvB,IAAM,SAAS,GAAG,GAAG,CAAC;AAuBtB,IAAM,qBAAqB,GAAG,UAAC,EAiBF;;QAhB3B,SAAS,eAAA,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,KAAK,QAAQ,IAAI,gBAAgB,EAC/D,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE;gBACX,MAAM,EAAE,WAAW,CAAC,gBAAgB;gBACpC,OAAO,EAAE,WAAW,CAAC,kBAAkB;gBACvC,MAAM,EAAE,WAAW,CAAC,iBAAiB;gBACrC,aAAa,EAAE,WAAW,CAAC,wBAAwB;gBACnD,mBAAmB,EAAE,WAAW,CAAC,8BAA8B;gBAC/D,cAAc,EAAE,WAAW,CAAC,yBAAyB;gBACrD,YAAY,EAAE,WAAW,CAAC,uBAAuB;aAClD,EACD,SAAS,EAAE,UAAA,WAAW;gBACpB,mBAAmB,cAAM,WAAW,EAAG,CAAC;gBACxC,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,EACD,SAAS,EAAE;gBACT,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,GACD,CACH,CACA,CACJ,EA3EoC,CA2EpC,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, BaseComponentProps } from '../internal/base-component';\nimport { useSplitPanelContext } from '../internal/context/split-panel-context';\nimport useFocusVisible from '../internal/hooks/focus-visible';\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, TransitionStatus } from '../internal/components/transition';\nimport { ButtonProps } from '../button/interfaces';\nimport { useEffectOnUpdate } from '../internal/hooks/use-effect-on-update';\n\nexport { SplitPanelProps };\n\nconst MIN_HEIGHT = 160;\nconst MIN_WIDTH = 280;\ninterface TransitionContentProps {\n baseProps: BaseComponentProps;\n isOpen?: boolean;\n splitPanelRef?: React.Ref<any>;\n bottomOffset: number;\n cappedSize: number;\n isRefresh: boolean;\n onToggle: () => void;\n i18nStrings: SplitPanelProps.I18nStrings;\n relativeSize: number;\n onKeyDown: (event: React.KeyboardEvent<Element>) => void;\n onSliderPointerDown: () => void;\n focusVisible: { 'data-awsui-focus-visible': true } | { 'data-awsui-focus-visible'?: undefined };\n paneHeader: JSX.Element;\n wrappedChildren: JSX.Element;\n}\n\ninterface TransitionContentSideProps extends TransitionContentProps {\n topOffset: number;\n toggleRef: React.RefObject<ButtonProps.Ref>;\n}\n\nconst TransitionContentSide = ({\n baseProps,\n isOpen,\n splitPanelRef,\n topOffset,\n bottomOffset,\n cappedSize,\n isRefresh,\n onToggle,\n i18nStrings,\n relativeSize,\n onKeyDown,\n onSliderPointerDown,\n focusVisible,\n toggleRef,\n paneHeader,\n wrappedChildren,\n}: TransitionContentSideProps) => {\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.drawer, styles.root, styles['position-side'], {\n [styles['drawer-closed']]: !isOpen,\n })}\n style={{\n width: isOpen ? cappedSize : undefined,\n maxWidth: isRefresh ? '100%' : undefined,\n }}\n ref={splitPanelRef}\n >\n <aside\n className={clsx(styles['drawer-content-side'], {\n [styles.refresh]: isRefresh,\n })}\n style={{\n top: topOffset,\n bottom: bottomOffset,\n }}\n onClick={() => !isOpen && onToggle()}\n >\n {isOpen ? (\n <div className={styles['slider-wrapper-side']}>\n <div\n role=\"slider\"\n tabIndex={0}\n aria-label={i18nStrings.resizeHandleAriaLabel}\n aria-valuemax={100}\n aria-valuemin={0}\n aria-valuenow={relativeSize}\n className={clsx(styles.slider, styles['slider-side'])}\n onKeyDown={onKeyDown}\n onPointerDown={onSliderPointerDown}\n {...focusVisible}\n >\n <ResizeHandler className={clsx(styles['slider-icon'], styles['slider-icon-side'])} />\n </div>\n </div>\n ) : (\n <InternalButton\n className={clsx(styles['open-button'], styles['open-button-side'])}\n iconName=\"angle-left\"\n variant=\"icon\"\n formAction=\"none\"\n ariaLabel={i18nStrings.openButtonAriaLabel}\n ariaExpanded={isOpen}\n ref={isRefresh ? null : toggleRef}\n />\n )}\n <div className={styles['content-side']} aria-hidden={!isOpen}>\n <div className={clsx(styles['pane-header-wrapper-side'])}>{paneHeader}</div>\n <hr className={styles['header-divider']} />\n <div className={clsx(styles['pane-content-wrapper-side'])}>{wrappedChildren}</div>\n </div>\n </aside>\n </div>\n );\n};\n\ninterface TransitionContentBottomProps extends TransitionContentProps {\n isMobile: boolean;\n disableContentPaddings?: boolean;\n state: TransitionStatus;\n leftOffset: number;\n rightOffset: number;\n transitioningElementRef: React.Ref<any>;\n centeredMaxWidthClasses: string;\n splitPanelHeaderRef?: React.Ref<any>;\n appLayoutMaxWidth: React.CSSProperties | undefined;\n}\n\nconst TransitionContentBottom = ({\n baseProps,\n isOpen,\n splitPanelRef,\n bottomOffset,\n cappedSize,\n isRefresh,\n onToggle,\n i18nStrings,\n relativeSize,\n onKeyDown,\n onSliderPointerDown,\n focusVisible,\n paneHeader,\n wrappedChildren,\n isMobile,\n disableContentPaddings,\n state,\n leftOffset,\n rightOffset,\n transitioningElementRef,\n centeredMaxWidthClasses,\n splitPanelHeaderRef,\n appLayoutMaxWidth,\n}: TransitionContentBottomProps) => {\n const transitionContentBottomRef = useMergeRefs(splitPanelRef || null, transitioningElementRef);\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.root, styles.drawer, styles['position-bottom'], {\n [styles['drawer-closed']]: !isOpen,\n [styles['drawer-mobile']]: isMobile,\n [styles['drawer-disable-content-paddings']]: disableContentPaddings,\n [styles.animating]: isRefresh && (state === 'entering' || state === 'exiting'),\n [styles.refresh]: isRefresh,\n })}\n onClick={() => !isOpen && onToggle()}\n style={{\n bottom: bottomOffset,\n left: leftOffset,\n right: rightOffset,\n height: isOpen ? cappedSize : undefined,\n }}\n ref={transitionContentBottomRef}\n >\n {isOpen && (\n <div className={styles['slider-wrapper-bottom']}>\n <div\n role=\"slider\"\n tabIndex={0}\n aria-label={i18nStrings.resizeHandleAriaLabel}\n aria-valuemax={100}\n aria-valuemin={0}\n aria-valuenow={relativeSize}\n className={clsx(styles.slider, styles['slider-bottom'])}\n onKeyDown={onKeyDown}\n onPointerDown={onSliderPointerDown}\n {...focusVisible}\n >\n <ResizeHandler className={clsx(styles['slider-icon'], styles['slider-icon-bottom'])} />\n </div>\n </div>\n )}\n <div className={styles['drawer-content-bottom']}>\n <div className={clsx(styles['pane-header-wrapper-bottom'], centeredMaxWidthClasses)} ref={splitPanelHeaderRef}>\n {paneHeader}\n </div>\n <div className={clsx(styles['content-bottom'], centeredMaxWidthClasses)} aria-hidden={!isOpen}>\n <div className={clsx({ [styles['content-bottom-max-width']]: isRefresh })} style={appLayoutMaxWidth}>\n {wrappedChildren}\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default function SplitPanel({\n header,\n children,\n hidePreferencesButton = false,\n i18nStrings,\n ...restProps\n}: SplitPanelProps) {\n const { __internalRootRef } = useBaseComponent('SplitPanel');\n const {\n size,\n getMaxWidth,\n getMaxHeight,\n position,\n topOffset,\n bottomOffset,\n leftOffset,\n rightOffset,\n disableContentPaddings,\n contentWidthStyles,\n contentWrapperPaddings,\n isCopy,\n isOpen,\n isMobile,\n isRefresh,\n isForcedPosition,\n splitPanelRef,\n splitPanelHeaderRef,\n lastInteraction,\n onPreferencesChange,\n onResize,\n onToggle,\n reportSize,\n setOpenButtonAriaLabel,\n } = useSplitPanelContext();\n const baseProps = getBaseProps(restProps);\n const focusVisible = useFocusVisible();\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 useEffect(() => {\n setOpenButtonAriaLabel?.(i18nStrings.openButtonAriaLabel);\n }, [setOpenButtonAriaLabel, i18nStrings.openButtonAriaLabel]);\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 / maxSize) * 100);\n setMaxSize(maxSize);\n });\n return () => cancelAnimationFrame(handle);\n }, [size, 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(null);\n const sizeControlProps: SizeControlProps = {\n position,\n splitPanelRef: splitPanelRefObject,\n setSidePanelWidth,\n setBottomPanelHeight,\n };\n const onSliderPointerDown = usePointerEvents(sizeControlProps);\n const onKeyDown = useKeyboardEvents(sizeControlProps);\n\n const toggleRef = useRef<ButtonProps.Ref>(null);\n const closeRef = useRef<ButtonProps.Ref>(null);\n const preferencesRef = useRef<ButtonProps.Ref>(null);\n\n useEffectOnUpdate(() => {\n switch (lastInteraction?.type) {\n case 'open':\n return closeRef.current?.focus();\n case 'close':\n return toggleRef.current?.focus();\n case 'position':\n return preferencesRef.current?.focus();\n default:\n return;\n }\n }, [lastInteraction]);\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 paneHeader = (\n <div className={styles.header} style={appLayoutMaxWidth}>\n <h2 className={styles['header-text']}>{header}</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={i18nStrings.preferencesTitle}\n ref={preferencesRef}\n />\n <span className={styles.divider} />\n </>\n )}\n\n {isOpen ? (\n <InternalButton\n className={styles['close-button']}\n iconName={isRefresh && position === 'side' ? 'angle-right' : isRefresh ? 'angle-down' : 'close'}\n variant=\"icon\"\n onClick={onToggle}\n formAction=\"none\"\n ariaLabel={i18nStrings.closeButtonAriaLabel}\n ref={closeRef}\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={i18nStrings.openButtonAriaLabel}\n ref={toggleRef}\n ariaExpanded={isOpen}\n />\n )}\n </div>\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(splitPanelRef, splitPanelRefObject, __internalRootRef);\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 || isCopy) && position === 'side') {\n return <></>;\n }\n\n const centeredMaxWidthClasses = clsx({\n [styles['pane-bottom-center-align']]: isRefresh,\n [styles['pane-bottom-content-nav-padding']]: contentWrapperPaddings?.closedNav,\n [styles['pane-bottom-content-tools-padding']]: contentWrapperPaddings?.closedTools,\n });\n\n return (\n <Transition in={isOpen ?? false}>\n {(state, transitioningElementRef) => (\n <>\n {position === 'side' && (\n <TransitionContentSide\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n topOffset={topOffset}\n bottomOffset={bottomOffset}\n cappedSize={cappedSize}\n isRefresh={isRefresh}\n onToggle={onToggle}\n i18nStrings={i18nStrings}\n relativeSize={relativeSize}\n onKeyDown={onKeyDown}\n onSliderPointerDown={onSliderPointerDown}\n focusVisible={focusVisible}\n toggleRef={toggleRef}\n paneHeader={paneHeader}\n wrappedChildren={wrappedChildren}\n ></TransitionContentSide>\n )}\n\n {position === 'bottom' && (\n <TransitionContentBottom\n baseProps={baseProps}\n isOpen={isOpen}\n splitPanelRef={mergedRef}\n bottomOffset={bottomOffset}\n cappedSize={cappedSize}\n isRefresh={isRefresh}\n onToggle={onToggle}\n i18nStrings={i18nStrings}\n relativeSize={relativeSize}\n onKeyDown={onKeyDown}\n onSliderPointerDown={onSliderPointerDown}\n focusVisible={focusVisible}\n paneHeader={paneHeader}\n wrappedChildren={wrappedChildren}\n isMobile={isMobile}\n disableContentPaddings={disableContentPaddings}\n state={state}\n leftOffset={leftOffset}\n rightOffset={rightOffset}\n transitioningElementRef={transitioningElementRef}\n centeredMaxWidthClasses={centeredMaxWidthClasses}\n splitPanelHeaderRef={splitPanelHeaderRef}\n appLayoutMaxWidth={appLayoutMaxWidth}\n ></TransitionContentBottom>\n )}\n {isPreferencesOpen && (\n <PreferencesModal\n visible={true}\n preferences={{ position }}\n disabledSidePosition={position === 'bottom' && isForcedPosition}\n isRefresh={isRefresh}\n i18nStrings={{\n header: i18nStrings.preferencesTitle,\n confirm: i18nStrings.preferencesConfirm,\n cancel: i18nStrings.preferencesCancel,\n positionLabel: i18nStrings.preferencesPositionLabel,\n positionDescription: i18nStrings.preferencesPositionDescription,\n positionBottom: i18nStrings.preferencesPositionBottom,\n positionSide: 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,63 +1,63 @@
|
|
|
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--window": "awsui_preference-icon-refresh--
|
|
21
|
-
"preference-icon-refresh--secondary": "awsui_preference-icon-refresh--
|
|
22
|
-
"preference-icon-refresh--default": "awsui_preference-icon-refresh--
|
|
23
|
-
"preference-icon-refresh--separator": "awsui_preference-icon-refresh--
|
|
24
|
-
"preference-icon-refresh--input-default": "awsui_preference-icon-refresh--input-
|
|
25
|
-
"preference-icon-refresh--heading": "awsui_preference-icon-refresh--
|
|
26
|
-
"resize-active": "awsui_resize-
|
|
27
|
-
"resize-side": "awsui_resize-
|
|
28
|
-
"resize-bottom": "awsui_resize-
|
|
29
|
-
"root": "
|
|
30
|
-
"preferences-button": "awsui_preferences-
|
|
31
|
-
"close-button": "awsui_close-
|
|
32
|
-
"drawer-closed": "awsui_drawer-
|
|
33
|
-
"drawer-content-side": "awsui_drawer-content-
|
|
34
|
-
"drawer-content-bottom": "awsui_drawer-content-
|
|
35
|
-
"position-bottom": "awsui_position-
|
|
36
|
-
"position-side": "awsui_position-
|
|
37
|
-
"slider": "
|
|
38
|
-
"slider-side": "awsui_slider-
|
|
39
|
-
"slider-wrapper-bottom": "awsui_slider-wrapper-
|
|
40
|
-
"slider-wrapper-side": "awsui_slider-wrapper-
|
|
41
|
-
"open-button": "awsui_open-
|
|
42
|
-
"open-button-side": "awsui_open-button-
|
|
43
|
-
"slider-icon": "awsui_slider-
|
|
44
|
-
"slider-icon-bottom": "awsui_slider-icon-
|
|
45
|
-
"slider-icon-side": "awsui_slider-icon-
|
|
46
|
-
"pane-header-wrapper-bottom": "awsui_pane-header-wrapper-
|
|
47
|
-
"drawer-mobile": "awsui_drawer-
|
|
48
|
-
"drawer-disable-content-paddings": "awsui_drawer-disable-content-
|
|
49
|
-
"content-bottom": "awsui_content-
|
|
50
|
-
"pane-bottom-center-align": "awsui_pane-bottom-center-
|
|
51
|
-
"pane-bottom-content-nav-padding": "awsui_pane-bottom-content-nav-
|
|
52
|
-
"pane-bottom-content-tools-padding": "awsui_pane-bottom-content-tools-
|
|
53
|
-
"content-bottom-max-width": "awsui_content-bottom-max-
|
|
54
|
-
"content-side": "awsui_content-
|
|
55
|
-
"pane-header-wrapper-side": "awsui_pane-header-wrapper-
|
|
56
|
-
"pane-content-wrapper-side": "awsui_pane-content-wrapper-
|
|
57
|
-
"header": "
|
|
58
|
-
"header-text": "awsui_header-
|
|
59
|
-
"header-divider": "awsui_header-
|
|
60
|
-
"header-actions": "awsui_header-
|
|
61
|
-
"divider": "
|
|
4
|
+
"drawer": "awsui_drawer_1r9lg_1tyop_189",
|
|
5
|
+
"refresh": "awsui_refresh_1r9lg_1tyop_189",
|
|
6
|
+
"animating": "awsui_animating_1r9lg_1tyop_203",
|
|
7
|
+
"preference-icon--layout-border": "awsui_preference-icon--layout-border_1r9lg_1tyop_226",
|
|
8
|
+
"preference-icon--layout-background": "awsui_preference-icon--layout-background_1r9lg_1tyop_230",
|
|
9
|
+
"preference-icon--layout-header": "awsui_preference-icon--layout-header_1r9lg_1tyop_233",
|
|
10
|
+
"preference-icon--border": "awsui_preference-icon--border_1r9lg_1tyop_236",
|
|
11
|
+
"preference-icon--primary-button": "awsui_preference-icon--primary-button_1r9lg_1tyop_240",
|
|
12
|
+
"preference-icon--secondary": "awsui_preference-icon--secondary_1r9lg_1tyop_243",
|
|
13
|
+
"preference-icon--disabled-element": "awsui_preference-icon--disabled-element_1r9lg_1tyop_246",
|
|
14
|
+
"preference-icon--separator": "awsui_preference-icon--separator_1r9lg_1tyop_249",
|
|
15
|
+
"preference-icon--focus-text": "awsui_preference-icon--focus-text_1r9lg_1tyop_252",
|
|
16
|
+
"preference-icon-refresh--layout-top": "awsui_preference-icon-refresh--layout-top_1r9lg_1tyop_256",
|
|
17
|
+
"preference-icon-refresh--layout-main": "awsui_preference-icon-refresh--layout-main_1r9lg_1tyop_259",
|
|
18
|
+
"preference-icon-refresh--primary": "awsui_preference-icon-refresh--primary_1r9lg_1tyop_262",
|
|
19
|
+
"preference-icon-refresh--disabled": "awsui_preference-icon-refresh--disabled_1r9lg_1tyop_265",
|
|
20
|
+
"preference-icon-refresh--window": "awsui_preference-icon-refresh--window_1r9lg_1tyop_268",
|
|
21
|
+
"preference-icon-refresh--secondary": "awsui_preference-icon-refresh--secondary_1r9lg_1tyop_272",
|
|
22
|
+
"preference-icon-refresh--default": "awsui_preference-icon-refresh--default_1r9lg_1tyop_275",
|
|
23
|
+
"preference-icon-refresh--separator": "awsui_preference-icon-refresh--separator_1r9lg_1tyop_278",
|
|
24
|
+
"preference-icon-refresh--input-default": "awsui_preference-icon-refresh--input-default_1r9lg_1tyop_281",
|
|
25
|
+
"preference-icon-refresh--heading": "awsui_preference-icon-refresh--heading_1r9lg_1tyop_284",
|
|
26
|
+
"resize-active": "awsui_resize-active_1r9lg_1tyop_289",
|
|
27
|
+
"resize-side": "awsui_resize-side_1r9lg_1tyop_295",
|
|
28
|
+
"resize-bottom": "awsui_resize-bottom_1r9lg_1tyop_298",
|
|
29
|
+
"root": "awsui_root_1r9lg_1tyop_303",
|
|
30
|
+
"preferences-button": "awsui_preferences-button_1r9lg_1tyop_314",
|
|
31
|
+
"close-button": "awsui_close-button_1r9lg_1tyop_318",
|
|
32
|
+
"drawer-closed": "awsui_drawer-closed_1r9lg_1tyop_329",
|
|
33
|
+
"drawer-content-side": "awsui_drawer-content-side_1r9lg_1tyop_334",
|
|
34
|
+
"drawer-content-bottom": "awsui_drawer-content-bottom_1r9lg_1tyop_354",
|
|
35
|
+
"position-bottom": "awsui_position-bottom_1r9lg_1tyop_363",
|
|
36
|
+
"position-side": "awsui_position-side_1r9lg_1tyop_390",
|
|
37
|
+
"slider": "awsui_slider_1r9lg_1tyop_396",
|
|
38
|
+
"slider-side": "awsui_slider-side_1r9lg_1tyop_425",
|
|
39
|
+
"slider-wrapper-bottom": "awsui_slider-wrapper-bottom_1r9lg_1tyop_430",
|
|
40
|
+
"slider-wrapper-side": "awsui_slider-wrapper-side_1r9lg_1tyop_441",
|
|
41
|
+
"open-button": "awsui_open-button_1r9lg_1tyop_452",
|
|
42
|
+
"open-button-side": "awsui_open-button-side_1r9lg_1tyop_456",
|
|
43
|
+
"slider-icon": "awsui_slider-icon_1r9lg_1tyop_463",
|
|
44
|
+
"slider-icon-bottom": "awsui_slider-icon-bottom_1r9lg_1tyop_469",
|
|
45
|
+
"slider-icon-side": "awsui_slider-icon-side_1r9lg_1tyop_472",
|
|
46
|
+
"pane-header-wrapper-bottom": "awsui_pane-header-wrapper-bottom_1r9lg_1tyop_476",
|
|
47
|
+
"drawer-mobile": "awsui_drawer-mobile_1r9lg_1tyop_486",
|
|
48
|
+
"drawer-disable-content-paddings": "awsui_drawer-disable-content-paddings_1r9lg_1tyop_489",
|
|
49
|
+
"content-bottom": "awsui_content-bottom_1r9lg_1tyop_497",
|
|
50
|
+
"pane-bottom-center-align": "awsui_pane-bottom-center-align_1r9lg_1tyop_508",
|
|
51
|
+
"pane-bottom-content-nav-padding": "awsui_pane-bottom-content-nav-padding_1r9lg_1tyop_513",
|
|
52
|
+
"pane-bottom-content-tools-padding": "awsui_pane-bottom-content-tools-padding_1r9lg_1tyop_517",
|
|
53
|
+
"content-bottom-max-width": "awsui_content-bottom-max-width_1r9lg_1tyop_521",
|
|
54
|
+
"content-side": "awsui_content-side_1r9lg_1tyop_526",
|
|
55
|
+
"pane-header-wrapper-side": "awsui_pane-header-wrapper-side_1r9lg_1tyop_537",
|
|
56
|
+
"pane-content-wrapper-side": "awsui_pane-content-wrapper-side_1r9lg_1tyop_540",
|
|
57
|
+
"header": "awsui_header_1r9lg_1tyop_545",
|
|
58
|
+
"header-text": "awsui_header-text_1r9lg_1tyop_554",
|
|
59
|
+
"header-divider": "awsui_header-divider_1r9lg_1tyop_562",
|
|
60
|
+
"header-actions": "awsui_header-actions_1r9lg_1tyop_568",
|
|
61
|
+
"divider": "awsui_divider_1r9lg_1tyop_576"
|
|
62
62
|
};
|
|
63
63
|
|
|
@@ -186,31 +186,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
186
186
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
187
187
|
SPDX-License-Identifier: Apache-2.0
|
|
188
188
|
*/
|
|
189
|
-
.
|
|
189
|
+
.awsui_drawer_1r9lg_1tyop_189.awsui_refresh_1r9lg_1tyop_189:not(#\9) {
|
|
190
190
|
transition-duration: var(--motion-duration-refresh-only-fast-addxjd, 115ms);
|
|
191
191
|
transition-property: none;
|
|
192
192
|
}
|
|
193
193
|
@media (prefers-reduced-motion: reduce) {
|
|
194
|
-
.
|
|
194
|
+
.awsui_drawer_1r9lg_1tyop_189.awsui_refresh_1r9lg_1tyop_189:not(#\9) {
|
|
195
195
|
animation: none;
|
|
196
196
|
transition: none;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
.awsui-motion-disabled .
|
|
199
|
+
.awsui-motion-disabled .awsui_drawer_1r9lg_1tyop_189.awsui_refresh_1r9lg_1tyop_189:not(#\9), .awsui-mode-entering .awsui_drawer_1r9lg_1tyop_189.awsui_refresh_1r9lg_1tyop_189:not(#\9) {
|
|
200
200
|
animation: none;
|
|
201
201
|
transition: none;
|
|
202
202
|
}
|
|
203
|
-
.
|
|
203
|
+
.awsui_drawer_1r9lg_1tyop_189.awsui_refresh_1r9lg_1tyop_189.awsui_animating_1r9lg_1tyop_203:not(#\9) {
|
|
204
204
|
transition-property: transform;
|
|
205
205
|
transition-timing-function: var(--motion-easing-refresh-only-a-sy0g8m, cubic-bezier(0, 0, 0, 1));
|
|
206
206
|
}
|
|
207
207
|
@media (prefers-reduced-motion: reduce) {
|
|
208
|
-
.
|
|
208
|
+
.awsui_drawer_1r9lg_1tyop_189.awsui_refresh_1r9lg_1tyop_189.awsui_animating_1r9lg_1tyop_203:not(#\9) {
|
|
209
209
|
animation: none;
|
|
210
210
|
transition: none;
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
.awsui-motion-disabled .
|
|
213
|
+
.awsui-motion-disabled .awsui_drawer_1r9lg_1tyop_189.awsui_refresh_1r9lg_1tyop_189.awsui_animating_1r9lg_1tyop_203:not(#\9), .awsui-mode-entering .awsui_drawer_1r9lg_1tyop_189.awsui_refresh_1r9lg_1tyop_189.awsui_animating_1r9lg_1tyop_203:not(#\9) {
|
|
214
214
|
animation: none;
|
|
215
215
|
transition: none;
|
|
216
216
|
}
|
|
@@ -223,85 +223,85 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
223
223
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
224
224
|
SPDX-License-Identifier: Apache-2.0
|
|
225
225
|
*/
|
|
226
|
-
.awsui_preference-icon--layout-
|
|
226
|
+
.awsui_preference-icon--layout-border_1r9lg_1tyop_226:not(#\9) {
|
|
227
227
|
stroke: var(--color-background-home-header-mpq08f, #000716);
|
|
228
228
|
fill: var(--color-background-container-content-i8i4a0, #ffffff);
|
|
229
229
|
}
|
|
230
|
-
.awsui_preference-icon--layout-
|
|
230
|
+
.awsui_preference-icon--layout-background_1r9lg_1tyop_230:not(#\9) {
|
|
231
231
|
fill: var(--color-background-layout-main-sfhm4y, #ffffff);
|
|
232
232
|
}
|
|
233
|
-
.awsui_preference-icon--layout-
|
|
233
|
+
.awsui_preference-icon--layout-header_1r9lg_1tyop_233:not(#\9) {
|
|
234
234
|
fill: var(--color-background-home-header-mpq08f, #000716);
|
|
235
235
|
}
|
|
236
|
-
.awsui_preference-icon--
|
|
236
|
+
.awsui_preference-icon--border_1r9lg_1tyop_236:not(#\9) {
|
|
237
237
|
stroke: var(--color-text-group-label-w9to2i, #414d5c);
|
|
238
238
|
fill: var(--color-background-container-content-i8i4a0, #ffffff);
|
|
239
239
|
}
|
|
240
|
-
.awsui_preference-icon--primary-
|
|
240
|
+
.awsui_preference-icon--primary-button_1r9lg_1tyop_240:not(#\9) {
|
|
241
241
|
fill: var(--color-background-button-primary-default-pwn1g1, #0972d3);
|
|
242
242
|
}
|
|
243
|
-
.awsui_preference-icon--
|
|
243
|
+
.awsui_preference-icon--secondary_1r9lg_1tyop_243:not(#\9) {
|
|
244
244
|
fill: var(--color-text-group-label-w9to2i, #414d5c);
|
|
245
245
|
}
|
|
246
|
-
.awsui_preference-icon--disabled-
|
|
246
|
+
.awsui_preference-icon--disabled-element_1r9lg_1tyop_246:not(#\9) {
|
|
247
247
|
fill: var(--color-background-control-disabled-zplipy, #d1d5db);
|
|
248
248
|
}
|
|
249
|
-
.awsui_preference-icon--
|
|
249
|
+
.awsui_preference-icon--separator_1r9lg_1tyop_249:not(#\9) {
|
|
250
250
|
stroke: var(--color-background-control-disabled-zplipy, #d1d5db);
|
|
251
251
|
}
|
|
252
|
-
.awsui_preference-icon--focus-
|
|
252
|
+
.awsui_preference-icon--focus-text_1r9lg_1tyop_252:not(#\9) {
|
|
253
253
|
fill: var(--color-text-interactive-default-eg5fsa, #414d5c);
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
.awsui_preference-icon-refresh--layout-
|
|
256
|
+
.awsui_preference-icon-refresh--layout-top_1r9lg_1tyop_256:not(#\9) {
|
|
257
257
|
fill: var(--color-background-button-primary-disabled-eon7km, #e9ebed);
|
|
258
258
|
}
|
|
259
|
-
.awsui_preference-icon-refresh--layout-
|
|
259
|
+
.awsui_preference-icon-refresh--layout-main_1r9lg_1tyop_259:not(#\9) {
|
|
260
260
|
fill: var(--color-background-layout-main-sfhm4y, #ffffff);
|
|
261
261
|
}
|
|
262
|
-
.awsui_preference-icon-refresh--
|
|
262
|
+
.awsui_preference-icon-refresh--primary_1r9lg_1tyop_262:not(#\9) {
|
|
263
263
|
fill: var(--color-background-button-primary-default-pwn1g1, #0972d3);
|
|
264
264
|
}
|
|
265
|
-
.awsui_preference-icon-refresh--
|
|
265
|
+
.awsui_preference-icon-refresh--disabled_1r9lg_1tyop_265:not(#\9) {
|
|
266
266
|
fill: var(--color-background-control-disabled-zplipy, #d1d5db);
|
|
267
267
|
}
|
|
268
|
-
.awsui_preference-icon-refresh--
|
|
268
|
+
.awsui_preference-icon-refresh--window_1r9lg_1tyop_268:not(#\9) {
|
|
269
269
|
stroke: var(--color-background-home-header-mpq08f, #000716);
|
|
270
270
|
fill: var(--color-background-container-content-i8i4a0, #ffffff);
|
|
271
271
|
}
|
|
272
|
-
.awsui_preference-icon-refresh--
|
|
272
|
+
.awsui_preference-icon-refresh--secondary_1r9lg_1tyop_272:not(#\9) {
|
|
273
273
|
fill: var(--color-text-body-secondary-fdstdf, #414d5c);
|
|
274
274
|
}
|
|
275
|
-
.awsui_preference-icon-refresh--
|
|
275
|
+
.awsui_preference-icon-refresh--default_1r9lg_1tyop_275:not(#\9) {
|
|
276
276
|
fill: var(--color-text-body-default-ajf1h5, #000716);
|
|
277
277
|
}
|
|
278
|
-
.awsui_preference-icon-refresh--
|
|
278
|
+
.awsui_preference-icon-refresh--separator_1r9lg_1tyop_278:not(#\9) {
|
|
279
279
|
stroke: var(--color-border-button-primary-disabled-6gwabt, #e9ebed);
|
|
280
280
|
}
|
|
281
|
-
.awsui_preference-icon-refresh--input-
|
|
281
|
+
.awsui_preference-icon-refresh--input-default_1r9lg_1tyop_281:not(#\9) {
|
|
282
282
|
fill: var(--color-border-input-default-dtyu8d, #9ba7b6);
|
|
283
283
|
}
|
|
284
|
-
.awsui_preference-icon-refresh--
|
|
284
|
+
.awsui_preference-icon-refresh--heading_1r9lg_1tyop_284:not(#\9) {
|
|
285
285
|
fill: var(--color-text-heading-default-jopz0f, #000716);
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
/* stylelint-disable selector-combinator-disallowed-list, selector-max-type, selector-max-universal */
|
|
289
|
-
.awsui_resize-
|
|
289
|
+
.awsui_resize-active_1r9lg_1tyop_289 *:not(#\9) {
|
|
290
290
|
-webkit-user-select: none;
|
|
291
291
|
user-select: none;
|
|
292
292
|
}
|
|
293
|
-
.awsui_resize-
|
|
293
|
+
.awsui_resize-active_1r9lg_1tyop_289 iframe:not(#\9) {
|
|
294
294
|
pointer-events: none;
|
|
295
295
|
}
|
|
296
|
-
.awsui_resize-
|
|
296
|
+
.awsui_resize-side_1r9lg_1tyop_295 *:not(#\9) {
|
|
297
297
|
cursor: ew-resize;
|
|
298
298
|
}
|
|
299
|
-
.awsui_resize-
|
|
299
|
+
.awsui_resize-bottom_1r9lg_1tyop_298 *:not(#\9) {
|
|
300
300
|
cursor: ns-resize;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
/* stylelint-enable */
|
|
304
|
-
.
|
|
304
|
+
.awsui_root_1r9lg_1tyop_303:not(#\9) {
|
|
305
305
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
306
306
|
border-collapse: separate;
|
|
307
307
|
border-spacing: 0;
|
|
@@ -338,47 +338,47 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
338
338
|
font-family: var(--font-family-base-qnistn, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
.awsui_preferences-
|
|
341
|
+
.awsui_preferences-button_1r9lg_1tyop_314:not(#\9) {
|
|
342
342
|
/* used in test-utils */
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
.awsui_close-
|
|
345
|
+
.awsui_close-button_1r9lg_1tyop_318:not(#\9) {
|
|
346
346
|
/* used in test-utils */
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
.
|
|
349
|
+
.awsui_drawer_1r9lg_1tyop_189:not(#\9) {
|
|
350
350
|
flex-shrink: 0;
|
|
351
351
|
position: relative;
|
|
352
352
|
word-wrap: break-word;
|
|
353
353
|
background-color: var(--color-background-layout-panel-content-808qum, #ffffff);
|
|
354
354
|
z-index: 851;
|
|
355
355
|
}
|
|
356
|
-
.awsui_drawer-
|
|
356
|
+
.awsui_drawer-closed_1r9lg_1tyop_329:not(#\9) {
|
|
357
357
|
cursor: pointer;
|
|
358
358
|
min-width: 40px;
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
.awsui_drawer-content-
|
|
361
|
+
.awsui_drawer-content-side_1r9lg_1tyop_334:not(#\9) {
|
|
362
362
|
display: flex;
|
|
363
363
|
align-items: center;
|
|
364
364
|
height: 100%;
|
|
365
365
|
overflow: auto;
|
|
366
366
|
}
|
|
367
|
-
.awsui_drawer-
|
|
367
|
+
.awsui_drawer-closed_1r9lg_1tyop_329 > .awsui_drawer-content-side_1r9lg_1tyop_334:not(#\9) {
|
|
368
368
|
width: 40px;
|
|
369
369
|
}
|
|
370
|
-
.awsui_drawer-
|
|
370
|
+
.awsui_drawer-closed_1r9lg_1tyop_329 > .awsui_drawer-content-side_1r9lg_1tyop_334:not(#\9):hover {
|
|
371
371
|
background: var(--color-background-layout-panel-hover-0bg3gq, #e9ebed);
|
|
372
372
|
}
|
|
373
|
-
.awsui_drawer-content-
|
|
373
|
+
.awsui_drawer-content-side_1r9lg_1tyop_334.awsui_refresh_1r9lg_1tyop_189:not(#\9) {
|
|
374
374
|
border-right: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-panel-side-yjkfcr, #e9ebed);
|
|
375
375
|
box-sizing: border-box;
|
|
376
376
|
}
|
|
377
|
-
.awsui_drawer-content-
|
|
377
|
+
.awsui_drawer-content-side_1r9lg_1tyop_334 > [aria-hidden=true]:not(#\9) {
|
|
378
378
|
display: none;
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
-
:not(#\9):not(.awsui_drawer-
|
|
381
|
+
:not(#\9):not(.awsui_drawer-closed_1r9lg_1tyop_329) > .awsui_drawer-content-bottom_1r9lg_1tyop_354 {
|
|
382
382
|
overflow-y: auto;
|
|
383
383
|
position: absolute;
|
|
384
384
|
top: 0;
|
|
@@ -387,7 +387,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
387
387
|
bottom: 0;
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
-
.awsui_position-
|
|
390
|
+
.awsui_position-bottom_1r9lg_1tyop_363:not(#\9) {
|
|
391
391
|
position: fixed;
|
|
392
392
|
overflow-y: auto;
|
|
393
393
|
border-left: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-panel-bottom-zrjpck, #e9ebed);
|
|
@@ -398,45 +398,46 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
398
398
|
SplitPanel is no longer in fixed position in the DOM.
|
|
399
399
|
*/
|
|
400
400
|
}
|
|
401
|
-
.awsui_position-
|
|
401
|
+
.awsui_position-bottom_1r9lg_1tyop_363:not(#\9):not(.awsui_refresh_1r9lg_1tyop_189) {
|
|
402
402
|
box-shadow: var(--shadow-split-bottom-otfetg, 0px -36px 36px -36px rgba(0, 7, 22, 0.1));
|
|
403
403
|
}
|
|
404
|
-
.awsui_position-
|
|
404
|
+
.awsui_position-bottom_1r9lg_1tyop_363.awsui_drawer-closed_1r9lg_1tyop_329:not(#\9) {
|
|
405
405
|
overflow: hidden;
|
|
406
406
|
}
|
|
407
|
-
.awsui_position-
|
|
407
|
+
.awsui_position-bottom_1r9lg_1tyop_363.awsui_drawer-closed_1r9lg_1tyop_329:not(#\9):hover {
|
|
408
408
|
background: var(--color-background-layout-panel-hover-0bg3gq, #e9ebed);
|
|
409
409
|
}
|
|
410
|
-
.awsui_position-
|
|
410
|
+
.awsui_position-bottom_1r9lg_1tyop_363 > .awsui_drawer-content-bottom_1r9lg_1tyop_354 > [aria-hidden=true]:not(#\9) {
|
|
411
411
|
display: none;
|
|
412
412
|
}
|
|
413
|
-
.awsui_position-
|
|
413
|
+
.awsui_position-bottom_1r9lg_1tyop_363.awsui_refresh_1r9lg_1tyop_189:not(#\9) {
|
|
414
414
|
position: relative;
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
-
.awsui_position-
|
|
417
|
+
.awsui_position-side_1r9lg_1tyop_390:not(#\9) {
|
|
418
418
|
border-top: none;
|
|
419
419
|
box-shadow: var(--shadow-split-side-qv353u, -1px 0px 1px 0px #e9ebed, -36px 6px 36px -36px rgba(0, 7, 22, 0.1));
|
|
420
420
|
height: 100%;
|
|
421
421
|
}
|
|
422
422
|
|
|
423
|
-
.
|
|
423
|
+
.awsui_slider_1r9lg_1tyop_396:not(#\9) {
|
|
424
424
|
padding: 0;
|
|
425
425
|
cursor: ns-resize;
|
|
426
426
|
margin: 2px 0 0 0;
|
|
427
427
|
height: 16px;
|
|
428
|
+
touch-action: none;
|
|
428
429
|
}
|
|
429
|
-
.
|
|
430
|
+
.awsui_slider_1r9lg_1tyop_396:not(#\9):focus {
|
|
430
431
|
outline: none;
|
|
431
432
|
}
|
|
432
|
-
.
|
|
433
|
+
.awsui_slider_1r9lg_1tyop_396[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
433
434
|
position: relative;
|
|
434
435
|
}
|
|
435
|
-
.
|
|
436
|
+
.awsui_slider_1r9lg_1tyop_396[data-awsui-focus-visible=true]:not(#\9):focus {
|
|
436
437
|
outline: 2px dotted transparent;
|
|
437
438
|
outline-offset: calc(0px - 1px);
|
|
438
439
|
}
|
|
439
|
-
.
|
|
440
|
+
.awsui_slider_1r9lg_1tyop_396[data-awsui-focus-visible=true]:not(#\9):focus::before {
|
|
440
441
|
content: " ";
|
|
441
442
|
display: block;
|
|
442
443
|
position: absolute;
|
|
@@ -448,12 +449,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
448
449
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
|
|
449
450
|
}
|
|
450
451
|
|
|
451
|
-
.awsui_slider-
|
|
452
|
+
.awsui_slider-side_1r9lg_1tyop_425:not(#\9) {
|
|
452
453
|
cursor: ew-resize;
|
|
453
454
|
margin: 0 0 0 2px;
|
|
454
455
|
}
|
|
455
456
|
|
|
456
|
-
.awsui_slider-wrapper-
|
|
457
|
+
.awsui_slider-wrapper-bottom_1r9lg_1tyop_430:not(#\9) {
|
|
457
458
|
position: absolute;
|
|
458
459
|
top: 0;
|
|
459
460
|
left: 0;
|
|
@@ -464,7 +465,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
464
465
|
z-index: 2;
|
|
465
466
|
}
|
|
466
467
|
|
|
467
|
-
.awsui_slider-wrapper-
|
|
468
|
+
.awsui_slider-wrapper-side_1r9lg_1tyop_441:not(#\9) {
|
|
468
469
|
position: absolute;
|
|
469
470
|
left: 0;
|
|
470
471
|
top: 0;
|
|
@@ -475,31 +476,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
475
476
|
z-index: 1;
|
|
476
477
|
}
|
|
477
478
|
|
|
478
|
-
.awsui_open-
|
|
479
|
+
.awsui_open-button_1r9lg_1tyop_452:not(#\9) {
|
|
479
480
|
/* used in test-utils */
|
|
480
481
|
}
|
|
481
482
|
|
|
482
|
-
.awsui_open-button-
|
|
483
|
+
.awsui_open-button-side_1r9lg_1tyop_456:not(#\9) {
|
|
483
484
|
flex: 0 0 auto;
|
|
484
485
|
align-self: flex-start;
|
|
485
486
|
box-sizing: border-box;
|
|
486
487
|
margin: var(--space-xxs-ynfts5, 4px) auto 0;
|
|
487
488
|
}
|
|
488
489
|
|
|
489
|
-
.awsui_slider-
|
|
490
|
+
.awsui_slider-icon_1r9lg_1tyop_463:not(#\9) {
|
|
490
491
|
stroke: var(--color-text-interactive-default-eg5fsa, #414d5c);
|
|
491
492
|
}
|
|
492
|
-
.awsui_slider-
|
|
493
|
+
.awsui_slider-icon_1r9lg_1tyop_463:not(#\9):hover {
|
|
493
494
|
stroke: var(--color-text-interactive-hover-v3lasm, #000716);
|
|
494
495
|
}
|
|
495
|
-
.awsui_slider-icon-
|
|
496
|
+
.awsui_slider-icon-bottom_1r9lg_1tyop_469:not(#\9) {
|
|
496
497
|
margin: auto;
|
|
497
498
|
}
|
|
498
|
-
.awsui_slider-icon-
|
|
499
|
+
.awsui_slider-icon-side_1r9lg_1tyop_472:not(#\9) {
|
|
499
500
|
transform: rotate(90deg);
|
|
500
501
|
}
|
|
501
502
|
|
|
502
|
-
.awsui_pane-header-wrapper-
|
|
503
|
+
.awsui_pane-header-wrapper-bottom_1r9lg_1tyop_476:not(#\9) {
|
|
503
504
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
504
505
|
position: sticky;
|
|
505
506
|
top: 0;
|
|
@@ -509,47 +510,47 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
509
510
|
z-index: 1;
|
|
510
511
|
padding: 0 var(--space-scaled-2x-xxxl-lbp35j, 40px);
|
|
511
512
|
}
|
|
512
|
-
.awsui_drawer-
|
|
513
|
+
.awsui_drawer-mobile_1r9lg_1tyop_486 > .awsui_drawer-content-bottom_1r9lg_1tyop_354 > .awsui_pane-header-wrapper-bottom_1r9lg_1tyop_476:not(#\9) {
|
|
513
514
|
padding: 0 var(--space-l-4vl6xu, 20px);
|
|
514
515
|
}
|
|
515
|
-
.awsui_drawer-disable-content-
|
|
516
|
+
.awsui_drawer-disable-content-paddings_1r9lg_1tyop_489 > .awsui_drawer-content-bottom_1r9lg_1tyop_354 > .awsui_pane-header-wrapper-bottom_1r9lg_1tyop_476:not(#\9) {
|
|
516
517
|
padding: 0 var(--space-l-4vl6xu, 20px);
|
|
517
518
|
}
|
|
518
|
-
:not(#\9):not(.awsui_drawer-
|
|
519
|
+
:not(#\9):not(.awsui_drawer-closed_1r9lg_1tyop_329) > .awsui_drawer-content-bottom_1r9lg_1tyop_354 > .awsui_pane-header-wrapper-bottom_1r9lg_1tyop_476 {
|
|
519
520
|
background-color: var(--color-background-layout-panel-content-808qum, #ffffff);
|
|
520
521
|
border-bottom: var(--border-panel-header-width-6fmoo4, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
521
522
|
}
|
|
522
523
|
|
|
523
|
-
.awsui_content-
|
|
524
|
+
.awsui_content-bottom_1r9lg_1tyop_497:not(#\9) {
|
|
524
525
|
padding: 0 var(--space-scaled-2x-xxxl-lbp35j, 40px);
|
|
525
526
|
margin-top: var(--space-panel-split-top-0y4u4f, 20px);
|
|
526
527
|
}
|
|
527
|
-
.awsui_drawer-
|
|
528
|
+
.awsui_drawer-mobile_1r9lg_1tyop_486 > .awsui_drawer-content-bottom_1r9lg_1tyop_354 > .awsui_content-bottom_1r9lg_1tyop_497:not(#\9) {
|
|
528
529
|
padding: 0 var(--space-l-4vl6xu, 20px);
|
|
529
530
|
}
|
|
530
|
-
.awsui_drawer-disable-content-
|
|
531
|
+
.awsui_drawer-disable-content-paddings_1r9lg_1tyop_489 > .awsui_drawer-content-bottom_1r9lg_1tyop_354 > .awsui_content-bottom_1r9lg_1tyop_497:not(#\9) {
|
|
531
532
|
padding: 0;
|
|
532
533
|
}
|
|
533
534
|
|
|
534
|
-
.awsui_pane-bottom-center-
|
|
535
|
+
.awsui_pane-bottom-center-align_1r9lg_1tyop_508:not(#\9) {
|
|
535
536
|
display: flex;
|
|
536
537
|
justify-content: center;
|
|
537
538
|
}
|
|
538
539
|
|
|
539
|
-
.awsui_pane-bottom-content-nav-
|
|
540
|
+
.awsui_pane-bottom-content-nav-padding_1r9lg_1tyop_513:not(#\9) {
|
|
540
541
|
padding-left: calc(var(--space-layout-toggle-diameter-hzvqtj, 40px) + 2 * var(--space-layout-toggle-padding-axl9jr, 20px));
|
|
541
542
|
}
|
|
542
543
|
|
|
543
|
-
.awsui_pane-bottom-content-tools-
|
|
544
|
+
.awsui_pane-bottom-content-tools-padding_1r9lg_1tyop_517:not(#\9) {
|
|
544
545
|
padding-right: calc(var(--space-layout-toggle-diameter-hzvqtj, 40px) + 2 * var(--space-layout-toggle-padding-axl9jr, 20px));
|
|
545
546
|
}
|
|
546
547
|
|
|
547
|
-
.awsui_content-bottom-max-
|
|
548
|
+
.awsui_content-bottom-max-width_1r9lg_1tyop_521:not(#\9) {
|
|
548
549
|
flex-grow: 1;
|
|
549
550
|
max-width: 100%;
|
|
550
551
|
}
|
|
551
552
|
|
|
552
|
-
.awsui_content-
|
|
553
|
+
.awsui_content-side_1r9lg_1tyop_526:not(#\9) {
|
|
553
554
|
flex: auto;
|
|
554
555
|
align-self: flex-start;
|
|
555
556
|
box-sizing: border-box;
|
|
@@ -560,15 +561,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
560
561
|
right: 0;
|
|
561
562
|
height: 100%;
|
|
562
563
|
}
|
|
563
|
-
.awsui_content-
|
|
564
|
+
.awsui_content-side_1r9lg_1tyop_526 > .awsui_pane-header-wrapper-side_1r9lg_1tyop_537:not(#\9) {
|
|
564
565
|
padding: 0 var(--space-m-17eucw, 16px) 0 var(--space-panel-side-left-8ozqve, 28px);
|
|
565
566
|
}
|
|
566
|
-
.awsui_content-
|
|
567
|
+
.awsui_content-side_1r9lg_1tyop_526 > .awsui_pane-content-wrapper-side_1r9lg_1tyop_540:not(#\9) {
|
|
567
568
|
padding: 0 var(--space-panel-side-right-kev4k9, 24px) 0 var(--space-panel-side-left-8ozqve, 28px);
|
|
568
569
|
margin-top: var(--space-panel-split-top-0y4u4f, 20px);
|
|
569
570
|
}
|
|
570
571
|
|
|
571
|
-
.
|
|
572
|
+
.awsui_header_1r9lg_1tyop_545:not(#\9) {
|
|
572
573
|
display: flex;
|
|
573
574
|
flex: auto;
|
|
574
575
|
flex-direction: row;
|
|
@@ -577,7 +578,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
577
578
|
width: 100%;
|
|
578
579
|
margin: var(--space-scaled-m-pv0fmt, 16px) 0 var(--space-m-17eucw, 16px) 0;
|
|
579
580
|
}
|
|
580
|
-
.awsui_header-
|
|
581
|
+
.awsui_header-text_1r9lg_1tyop_554:not(#\9) {
|
|
581
582
|
font-size: var(--font-panel-header-size-0vdgjc, 20px);
|
|
582
583
|
line-height: var(--font-panel-header-line-height-x2226j, 24px);
|
|
583
584
|
font-weight: var(--font-heading-l-weight-xm7ks9, 800);
|
|
@@ -585,13 +586,13 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
585
586
|
margin: 0;
|
|
586
587
|
}
|
|
587
588
|
|
|
588
|
-
.awsui_header-
|
|
589
|
+
.awsui_header-divider_1r9lg_1tyop_562:not(#\9) {
|
|
589
590
|
border: none;
|
|
590
591
|
border-top: var(--border-panel-header-width-6fmoo4, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
591
592
|
margin-top: calc(-1 * var(--border-panel-header-width-6fmoo4, 2px));
|
|
592
593
|
}
|
|
593
594
|
|
|
594
|
-
.awsui_header-
|
|
595
|
+
.awsui_header-actions_1r9lg_1tyop_568:not(#\9) {
|
|
595
596
|
display: flex;
|
|
596
597
|
flex-direction: row;
|
|
597
598
|
justify-content: space-between;
|
|
@@ -599,7 +600,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
599
600
|
margin-left: var(--space-xs-rsr2qu, 8px);
|
|
600
601
|
}
|
|
601
602
|
|
|
602
|
-
.
|
|
603
|
+
.awsui_divider_1r9lg_1tyop_576:not(#\9) {
|
|
603
604
|
border-right: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
604
605
|
margin: var(--space-scaled-xxs-95dhkm, 4px) var(--space-scaled-xs-6859qs, 8px);
|
|
605
606
|
}
|
|
@@ -2,63 +2,63 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"drawer": "
|
|
6
|
-
"refresh": "
|
|
7
|
-
"animating": "
|
|
8
|
-
"preference-icon--layout-border": "awsui_preference-icon--layout-
|
|
9
|
-
"preference-icon--layout-background": "awsui_preference-icon--layout-
|
|
10
|
-
"preference-icon--layout-header": "awsui_preference-icon--layout-
|
|
11
|
-
"preference-icon--border": "awsui_preference-icon--
|
|
12
|
-
"preference-icon--primary-button": "awsui_preference-icon--primary-
|
|
13
|
-
"preference-icon--secondary": "awsui_preference-icon--
|
|
14
|
-
"preference-icon--disabled-element": "awsui_preference-icon--disabled-
|
|
15
|
-
"preference-icon--separator": "awsui_preference-icon--
|
|
16
|
-
"preference-icon--focus-text": "awsui_preference-icon--focus-
|
|
17
|
-
"preference-icon-refresh--layout-top": "awsui_preference-icon-refresh--layout-
|
|
18
|
-
"preference-icon-refresh--layout-main": "awsui_preference-icon-refresh--layout-
|
|
19
|
-
"preference-icon-refresh--primary": "awsui_preference-icon-refresh--
|
|
20
|
-
"preference-icon-refresh--disabled": "awsui_preference-icon-refresh--
|
|
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
|
-
"resize-active": "awsui_resize-
|
|
28
|
-
"resize-side": "awsui_resize-
|
|
29
|
-
"resize-bottom": "awsui_resize-
|
|
30
|
-
"root": "
|
|
31
|
-
"preferences-button": "awsui_preferences-
|
|
32
|
-
"close-button": "awsui_close-
|
|
33
|
-
"drawer-closed": "awsui_drawer-
|
|
34
|
-
"drawer-content-side": "awsui_drawer-content-
|
|
35
|
-
"drawer-content-bottom": "awsui_drawer-content-
|
|
36
|
-
"position-bottom": "awsui_position-
|
|
37
|
-
"position-side": "awsui_position-
|
|
38
|
-
"slider": "
|
|
39
|
-
"slider-side": "awsui_slider-
|
|
40
|
-
"slider-wrapper-bottom": "awsui_slider-wrapper-
|
|
41
|
-
"slider-wrapper-side": "awsui_slider-wrapper-
|
|
42
|
-
"open-button": "awsui_open-
|
|
43
|
-
"open-button-side": "awsui_open-button-
|
|
44
|
-
"slider-icon": "awsui_slider-
|
|
45
|
-
"slider-icon-bottom": "awsui_slider-icon-
|
|
46
|
-
"slider-icon-side": "awsui_slider-icon-
|
|
47
|
-
"pane-header-wrapper-bottom": "awsui_pane-header-wrapper-
|
|
48
|
-
"drawer-mobile": "awsui_drawer-
|
|
49
|
-
"drawer-disable-content-paddings": "awsui_drawer-disable-content-
|
|
50
|
-
"content-bottom": "awsui_content-
|
|
51
|
-
"pane-bottom-center-align": "awsui_pane-bottom-center-
|
|
52
|
-
"pane-bottom-content-nav-padding": "awsui_pane-bottom-content-nav-
|
|
53
|
-
"pane-bottom-content-tools-padding": "awsui_pane-bottom-content-tools-
|
|
54
|
-
"content-bottom-max-width": "awsui_content-bottom-max-
|
|
55
|
-
"content-side": "awsui_content-
|
|
56
|
-
"pane-header-wrapper-side": "awsui_pane-header-wrapper-
|
|
57
|
-
"pane-content-wrapper-side": "awsui_pane-content-wrapper-
|
|
58
|
-
"header": "
|
|
59
|
-
"header-text": "awsui_header-
|
|
60
|
-
"header-divider": "awsui_header-
|
|
61
|
-
"header-actions": "awsui_header-
|
|
62
|
-
"divider": "
|
|
5
|
+
"drawer": "awsui_drawer_1r9lg_1tyop_189",
|
|
6
|
+
"refresh": "awsui_refresh_1r9lg_1tyop_189",
|
|
7
|
+
"animating": "awsui_animating_1r9lg_1tyop_203",
|
|
8
|
+
"preference-icon--layout-border": "awsui_preference-icon--layout-border_1r9lg_1tyop_226",
|
|
9
|
+
"preference-icon--layout-background": "awsui_preference-icon--layout-background_1r9lg_1tyop_230",
|
|
10
|
+
"preference-icon--layout-header": "awsui_preference-icon--layout-header_1r9lg_1tyop_233",
|
|
11
|
+
"preference-icon--border": "awsui_preference-icon--border_1r9lg_1tyop_236",
|
|
12
|
+
"preference-icon--primary-button": "awsui_preference-icon--primary-button_1r9lg_1tyop_240",
|
|
13
|
+
"preference-icon--secondary": "awsui_preference-icon--secondary_1r9lg_1tyop_243",
|
|
14
|
+
"preference-icon--disabled-element": "awsui_preference-icon--disabled-element_1r9lg_1tyop_246",
|
|
15
|
+
"preference-icon--separator": "awsui_preference-icon--separator_1r9lg_1tyop_249",
|
|
16
|
+
"preference-icon--focus-text": "awsui_preference-icon--focus-text_1r9lg_1tyop_252",
|
|
17
|
+
"preference-icon-refresh--layout-top": "awsui_preference-icon-refresh--layout-top_1r9lg_1tyop_256",
|
|
18
|
+
"preference-icon-refresh--layout-main": "awsui_preference-icon-refresh--layout-main_1r9lg_1tyop_259",
|
|
19
|
+
"preference-icon-refresh--primary": "awsui_preference-icon-refresh--primary_1r9lg_1tyop_262",
|
|
20
|
+
"preference-icon-refresh--disabled": "awsui_preference-icon-refresh--disabled_1r9lg_1tyop_265",
|
|
21
|
+
"preference-icon-refresh--window": "awsui_preference-icon-refresh--window_1r9lg_1tyop_268",
|
|
22
|
+
"preference-icon-refresh--secondary": "awsui_preference-icon-refresh--secondary_1r9lg_1tyop_272",
|
|
23
|
+
"preference-icon-refresh--default": "awsui_preference-icon-refresh--default_1r9lg_1tyop_275",
|
|
24
|
+
"preference-icon-refresh--separator": "awsui_preference-icon-refresh--separator_1r9lg_1tyop_278",
|
|
25
|
+
"preference-icon-refresh--input-default": "awsui_preference-icon-refresh--input-default_1r9lg_1tyop_281",
|
|
26
|
+
"preference-icon-refresh--heading": "awsui_preference-icon-refresh--heading_1r9lg_1tyop_284",
|
|
27
|
+
"resize-active": "awsui_resize-active_1r9lg_1tyop_289",
|
|
28
|
+
"resize-side": "awsui_resize-side_1r9lg_1tyop_295",
|
|
29
|
+
"resize-bottom": "awsui_resize-bottom_1r9lg_1tyop_298",
|
|
30
|
+
"root": "awsui_root_1r9lg_1tyop_303",
|
|
31
|
+
"preferences-button": "awsui_preferences-button_1r9lg_1tyop_314",
|
|
32
|
+
"close-button": "awsui_close-button_1r9lg_1tyop_318",
|
|
33
|
+
"drawer-closed": "awsui_drawer-closed_1r9lg_1tyop_329",
|
|
34
|
+
"drawer-content-side": "awsui_drawer-content-side_1r9lg_1tyop_334",
|
|
35
|
+
"drawer-content-bottom": "awsui_drawer-content-bottom_1r9lg_1tyop_354",
|
|
36
|
+
"position-bottom": "awsui_position-bottom_1r9lg_1tyop_363",
|
|
37
|
+
"position-side": "awsui_position-side_1r9lg_1tyop_390",
|
|
38
|
+
"slider": "awsui_slider_1r9lg_1tyop_396",
|
|
39
|
+
"slider-side": "awsui_slider-side_1r9lg_1tyop_425",
|
|
40
|
+
"slider-wrapper-bottom": "awsui_slider-wrapper-bottom_1r9lg_1tyop_430",
|
|
41
|
+
"slider-wrapper-side": "awsui_slider-wrapper-side_1r9lg_1tyop_441",
|
|
42
|
+
"open-button": "awsui_open-button_1r9lg_1tyop_452",
|
|
43
|
+
"open-button-side": "awsui_open-button-side_1r9lg_1tyop_456",
|
|
44
|
+
"slider-icon": "awsui_slider-icon_1r9lg_1tyop_463",
|
|
45
|
+
"slider-icon-bottom": "awsui_slider-icon-bottom_1r9lg_1tyop_469",
|
|
46
|
+
"slider-icon-side": "awsui_slider-icon-side_1r9lg_1tyop_472",
|
|
47
|
+
"pane-header-wrapper-bottom": "awsui_pane-header-wrapper-bottom_1r9lg_1tyop_476",
|
|
48
|
+
"drawer-mobile": "awsui_drawer-mobile_1r9lg_1tyop_486",
|
|
49
|
+
"drawer-disable-content-paddings": "awsui_drawer-disable-content-paddings_1r9lg_1tyop_489",
|
|
50
|
+
"content-bottom": "awsui_content-bottom_1r9lg_1tyop_497",
|
|
51
|
+
"pane-bottom-center-align": "awsui_pane-bottom-center-align_1r9lg_1tyop_508",
|
|
52
|
+
"pane-bottom-content-nav-padding": "awsui_pane-bottom-content-nav-padding_1r9lg_1tyop_513",
|
|
53
|
+
"pane-bottom-content-tools-padding": "awsui_pane-bottom-content-tools-padding_1r9lg_1tyop_517",
|
|
54
|
+
"content-bottom-max-width": "awsui_content-bottom-max-width_1r9lg_1tyop_521",
|
|
55
|
+
"content-side": "awsui_content-side_1r9lg_1tyop_526",
|
|
56
|
+
"pane-header-wrapper-side": "awsui_pane-header-wrapper-side_1r9lg_1tyop_537",
|
|
57
|
+
"pane-content-wrapper-side": "awsui_pane-content-wrapper-side_1r9lg_1tyop_540",
|
|
58
|
+
"header": "awsui_header_1r9lg_1tyop_545",
|
|
59
|
+
"header-text": "awsui_header-text_1r9lg_1tyop_554",
|
|
60
|
+
"header-divider": "awsui_header-divider_1r9lg_1tyop_562",
|
|
61
|
+
"header-actions": "awsui_header-actions_1r9lg_1tyop_568",
|
|
62
|
+
"divider": "awsui_divider_1r9lg_1tyop_576"
|
|
63
63
|
};
|
|
64
64
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-pointer-events.d.ts","sourceRoot":"","sources":["../../../../src/split-panel/utils/use-pointer-events.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjD,eAAO,MAAM,gBAAgB,0EAK1B,gBAAgB,eAmClB,CAAC"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
4
|
import styles from '../styles.css.js';
|
|
5
|
-
export var
|
|
5
|
+
export var usePointerEvents = function (_a) {
|
|
6
6
|
var position = _a.position, splitPanelRef = _a.splitPanelRef, setSidePanelWidth = _a.setSidePanelWidth, setBottomPanelHeight = _a.setBottomPanelHeight;
|
|
7
|
-
var
|
|
7
|
+
var onDocumentPointerMove = useCallback(function (event) {
|
|
8
8
|
if (!splitPanelRef || !splitPanelRef.current) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
@@ -19,18 +19,18 @@ export var useMouseEvents = function (_a) {
|
|
|
19
19
|
setBottomPanelHeight(height);
|
|
20
20
|
}
|
|
21
21
|
}, [position, splitPanelRef, setSidePanelWidth, setBottomPanelHeight]);
|
|
22
|
-
var
|
|
22
|
+
var onDocumentPointerUp = useCallback(function () {
|
|
23
23
|
document.body.classList.remove(styles['resize-active']);
|
|
24
24
|
document.body.classList.remove(styles["resize-".concat(position)]);
|
|
25
|
-
document.removeEventListener('
|
|
26
|
-
document.removeEventListener('
|
|
27
|
-
}, [
|
|
28
|
-
var
|
|
25
|
+
document.removeEventListener('pointerup', onDocumentPointerUp);
|
|
26
|
+
document.removeEventListener('pointermove', onDocumentPointerMove);
|
|
27
|
+
}, [onDocumentPointerMove, position]);
|
|
28
|
+
var onSliderPointerDown = useCallback(function () {
|
|
29
29
|
document.body.classList.add(styles['resize-active']);
|
|
30
30
|
document.body.classList.add(styles["resize-".concat(position)]);
|
|
31
|
-
document.addEventListener('
|
|
32
|
-
document.addEventListener('
|
|
33
|
-
}, [
|
|
34
|
-
return
|
|
31
|
+
document.addEventListener('pointerup', onDocumentPointerUp);
|
|
32
|
+
document.addEventListener('pointermove', onDocumentPointerMove);
|
|
33
|
+
}, [onDocumentPointerMove, onDocumentPointerUp, position]);
|
|
34
|
+
return onSliderPointerDown;
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=use-
|
|
36
|
+
//# sourceMappingURL=use-pointer-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-pointer-events.js","sourceRoot":"","sources":["../../../../src/split-panel/utils/use-pointer-events.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,EAKd;QAJjB,QAAQ,cAAA,EACR,aAAa,mBAAA,EACb,iBAAiB,uBAAA,EACjB,oBAAoB,0BAAA;IAEpB,IAAM,qBAAqB,GAAG,WAAW,CACvC,UAAC,KAAmB;QAClB,IAAI,CAAC,aAAa,IAAI,CAAC,aAAa,CAAC,O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AAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;QAC5D,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,qBAAqB,CAAC,CAAC;IAClE,CAAC,EAAE,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE3D,OAAO,mBAAmB,CAAC;AAC7B,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useCallback } from 'react';\nimport { SizeControlProps } from '../interfaces';\nimport styles from '../styles.css.js';\n\nexport const usePointerEvents = ({\n position,\n splitPanelRef,\n setSidePanelWidth,\n setBottomPanelHeight,\n}: SizeControlProps) => {\n const onDocumentPointerMove = useCallback(\n (event: PointerEvent) => {\n if (!splitPanelRef || !splitPanelRef.current) {\n return;\n }\n\n if (position === 'side') {\n const mouseClientX = event.clientX;\n const width = splitPanelRef.current.getBoundingClientRect().right - mouseClientX;\n setSidePanelWidth(width);\n } else {\n const mouseClientY = event.clientY;\n const height = splitPanelRef.current.getBoundingClientRect().bottom - mouseClientY;\n setBottomPanelHeight(height);\n }\n },\n [position, splitPanelRef, setSidePanelWidth, setBottomPanelHeight]\n );\n\n const onDocumentPointerUp = useCallback(() => {\n document.body.classList.remove(styles['resize-active']);\n document.body.classList.remove(styles[`resize-${position}`]);\n document.removeEventListener('pointerup', onDocumentPointerUp);\n document.removeEventListener('pointermove', onDocumentPointerMove);\n }, [onDocumentPointerMove, position]);\n\n const onSliderPointerDown = useCallback(() => {\n document.body.classList.add(styles['resize-active']);\n document.body.classList.add(styles[`resize-${position}`]);\n document.addEventListener('pointerup', onDocumentPointerUp);\n document.addEventListener('pointermove', onDocumentPointerMove);\n }, [onDocumentPointerMove, onDocumentPointerUp, position]);\n\n return onSliderPointerDown;\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-mouse-events.d.ts","sourceRoot":"","sources":["../../../../src/split-panel/utils/use-mouse-events.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjD,eAAO,MAAM,cAAc,0EAKxB,gBAAgB,eAqClB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-mouse-events.js","sourceRoot":"","sources":["../../../../src/split-panel/utils/use-mouse-events.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,CAAC,IAAM,cAAc,GAAG,UAAC,EAKZ;QAJjB,QAAQ,cAAA,EACR,aAAa,mBAAA,EACb,iBAAiB,uBAAA,EACjB,oBAAoB,0BAAA;IAEpB,IAAM,mBAAmB,GAAG,WAAW,CACrC,UAAC,KAAiB;QAChB,IAAI,CAAC,aAAa,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;YAC5C,OAAO;SACR;QAED,IAAI,QAAQ,KAAK,MAAM,EAAE;YACvB,IAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC;YACnC,IAAM,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,KAAK,GAAG,YAAY,CAAC;YAEjF,iBAAiB,CAAC,KAAK,CAAC,CAAC;SAC1B;aAAM;YACL,IAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC;YACnC,IAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,MAAM,GAAG,YAAY,CAAC;YAEnF,oBAAoB,CAAC,MAAM,CAAC,CAAC;SAC9B;IACH,CAAC,EACD,CAAC,QAAQ,EAAE,aAAa,EAAE,iBAAiB,EAAE,oBAAoB,CAAC,CACnE,CAAC;IAEF,IAAM,iBAAiB,GAAG,WAAW,CAAC;QACpC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;QACxD,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,iBAAU,QAAQ,CAAE,CAAC,CAAC,CAAC;QAC7D,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAC3D,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;IACjE,CAAC,EAAE,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEpC,IAAM,iBAAiB,GAAG,WAAW,CAAC;QACpC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;QACrD,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,iBAAU,QAAQ,CAAE,CAAC,CAAC,CAAC;QAC1D,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QACxD,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;IAC9D,CAAC,EAAE,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEvD,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useCallback } from 'react';\nimport { SizeControlProps } from '../interfaces';\nimport styles from '../styles.css.js';\n\nexport const useMouseEvents = ({\n position,\n splitPanelRef,\n setSidePanelWidth,\n setBottomPanelHeight,\n}: SizeControlProps) => {\n const onDocumentMouseMove = useCallback(\n (event: MouseEvent) => {\n if (!splitPanelRef || !splitPanelRef.current) {\n return;\n }\n\n if (position === 'side') {\n const mouseClientX = event.clientX;\n const width = splitPanelRef.current.getBoundingClientRect().right - mouseClientX;\n\n setSidePanelWidth(width);\n } else {\n const mouseClientY = event.clientY;\n const height = splitPanelRef.current.getBoundingClientRect().bottom - mouseClientY;\n\n setBottomPanelHeight(height);\n }\n },\n [position, splitPanelRef, setSidePanelWidth, setBottomPanelHeight]\n );\n\n const onDocumentMouseUp = useCallback(() => {\n document.body.classList.remove(styles['resize-active']);\n document.body.classList.remove(styles[`resize-${position}`]);\n document.removeEventListener('mouseup', onDocumentMouseUp);\n document.removeEventListener('mousemove', onDocumentMouseMove);\n }, [onDocumentMouseMove, position]);\n\n const onSliderMouseDown = useCallback(() => {\n document.body.classList.add(styles['resize-active']);\n document.body.classList.add(styles[`resize-${position}`]);\n document.addEventListener('mouseup', onDocumentMouseUp);\n document.addEventListener('mousemove', onDocumentMouseMove);\n }, [onDocumentMouseMove, onDocumentMouseUp, position]);\n\n return onSliderMouseDown;\n};\n"]}
|