@cloudscape-design/components 3.0.854 → 3.0.855
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/collection-preferences/content-display/content-display-option.d.ts +1 -2
- package/collection-preferences/content-display/content-display-option.d.ts.map +1 -1
- package/collection-preferences/content-display/content-display-option.js +2 -2
- package/collection-preferences/content-display/content-display-option.js.map +1 -1
- package/collection-preferences/content-display/index.d.ts.map +1 -1
- package/collection-preferences/content-display/index.js +4 -6
- package/collection-preferences/content-display/index.js.map +1 -1
- package/collection-preferences/content-display/styles.css.js +10 -12
- package/collection-preferences/content-display/styles.scoped.css +10 -36
- package/collection-preferences/content-display/styles.selectors.js +10 -12
- package/collection-preferences/styles.css.js +36 -38
- package/collection-preferences/styles.scoped.css +37 -63
- package/collection-preferences/styles.selectors.js +36 -38
- package/internal/components/dnd-area/index.d.ts +4 -0
- package/internal/components/dnd-area/index.d.ts.map +1 -0
- package/internal/components/{dnd-container → dnd-area}/index.js +13 -15
- package/internal/components/dnd-area/index.js.map +1 -0
- package/internal/components/{dnd-container → dnd-area}/interfaces.d.ts +13 -14
- package/internal/components/dnd-area/interfaces.d.ts.map +1 -0
- package/internal/components/dnd-area/interfaces.js.map +1 -0
- package/internal/components/dnd-area/keyboard-sensor/defaults.d.ts.map +1 -0
- package/internal/components/dnd-area/keyboard-sensor/defaults.js.map +1 -0
- package/internal/components/dnd-area/keyboard-sensor/index.d.ts.map +1 -0
- package/internal/components/dnd-area/keyboard-sensor/index.js.map +1 -0
- package/internal/components/dnd-area/keyboard-sensor/utilities/events.d.ts.map +1 -0
- package/internal/components/dnd-area/keyboard-sensor/utilities/events.js.map +1 -0
- package/internal/components/dnd-area/keyboard-sensor/utilities/listeners.d.ts.map +1 -0
- package/internal/components/dnd-area/keyboard-sensor/utilities/listeners.js.map +1 -0
- package/internal/components/dnd-area/keyboard-sensor/utilities/scroll.d.ts.map +1 -0
- package/internal/components/dnd-area/keyboard-sensor/utilities/scroll.js.map +1 -0
- package/internal/components/dnd-area/styles.css.js +13 -0
- package/internal/components/{dnd-container → dnd-area}/styles.scoped.css +79 -4
- package/internal/components/dnd-area/styles.selectors.js +14 -0
- package/internal/components/{dnd-container → dnd-area}/use-drag-and-drop-reorder.d.ts +2 -2
- package/internal/components/dnd-area/use-drag-and-drop-reorder.d.ts.map +1 -0
- package/internal/components/dnd-area/use-drag-and-drop-reorder.js.map +1 -0
- package/internal/components/{dnd-container → dnd-area}/use-live-announcements.d.ts +3 -3
- package/internal/components/dnd-area/use-live-announcements.d.ts.map +1 -0
- package/internal/components/dnd-area/use-live-announcements.js.map +1 -0
- package/internal/components/drag-handle/index.d.ts +7 -5
- package/internal/components/drag-handle/index.d.ts.map +1 -1
- package/internal/components/drag-handle/index.js +2 -3
- package/internal/components/drag-handle/index.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/internal/components/dnd-container/index.d.ts +0 -4
- package/internal/components/dnd-container/index.d.ts.map +0 -1
- package/internal/components/dnd-container/index.js.map +0 -1
- package/internal/components/dnd-container/interfaces.d.ts.map +0 -1
- package/internal/components/dnd-container/interfaces.js.map +0 -1
- package/internal/components/dnd-container/keyboard-sensor/defaults.d.ts.map +0 -1
- package/internal/components/dnd-container/keyboard-sensor/defaults.js.map +0 -1
- package/internal/components/dnd-container/keyboard-sensor/index.d.ts.map +0 -1
- package/internal/components/dnd-container/keyboard-sensor/index.js.map +0 -1
- package/internal/components/dnd-container/keyboard-sensor/utilities/events.d.ts.map +0 -1
- package/internal/components/dnd-container/keyboard-sensor/utilities/events.js.map +0 -1
- package/internal/components/dnd-container/keyboard-sensor/utilities/listeners.d.ts.map +0 -1
- package/internal/components/dnd-container/keyboard-sensor/utilities/listeners.js.map +0 -1
- package/internal/components/dnd-container/keyboard-sensor/utilities/scroll.d.ts.map +0 -1
- package/internal/components/dnd-container/keyboard-sensor/utilities/scroll.js.map +0 -1
- package/internal/components/dnd-container/styles.css.js +0 -6
- package/internal/components/dnd-container/styles.selectors.js +0 -7
- package/internal/components/dnd-container/use-drag-and-drop-reorder.d.ts.map +0 -1
- package/internal/components/dnd-container/use-drag-and-drop-reorder.js.map +0 -1
- package/internal/components/dnd-container/use-live-announcements.d.ts.map +0 -1
- package/internal/components/dnd-container/use-live-announcements.js.map +0 -1
- /package/internal/components/{dnd-container → dnd-area}/interfaces.js +0 -0
- /package/internal/components/{dnd-container → dnd-area}/keyboard-sensor/defaults.d.ts +0 -0
- /package/internal/components/{dnd-container → dnd-area}/keyboard-sensor/defaults.js +0 -0
- /package/internal/components/{dnd-container → dnd-area}/keyboard-sensor/index.d.ts +0 -0
- /package/internal/components/{dnd-container → dnd-area}/keyboard-sensor/index.js +0 -0
- /package/internal/components/{dnd-container → dnd-area}/keyboard-sensor/utilities/events.d.ts +0 -0
- /package/internal/components/{dnd-container → dnd-area}/keyboard-sensor/utilities/events.js +0 -0
- /package/internal/components/{dnd-container → dnd-area}/keyboard-sensor/utilities/listeners.d.ts +0 -0
- /package/internal/components/{dnd-container → dnd-area}/keyboard-sensor/utilities/listeners.js +0 -0
- /package/internal/components/{dnd-container → dnd-area}/keyboard-sensor/utilities/scroll.d.ts +0 -0
- /package/internal/components/{dnd-container → dnd-area}/keyboard-sensor/utilities/scroll.js +0 -0
- /package/internal/components/{dnd-container → dnd-area}/use-drag-and-drop-reorder.js +0 -0
- /package/internal/components/{dnd-container → dnd-area}/use-live-announcements.js +0 -0
|
@@ -3,8 +3,7 @@ import { DragHandleProps } from '../../internal/components/drag-handle';
|
|
|
3
3
|
import { OptionWithVisibility } from './utils';
|
|
4
4
|
export declare const getClassName: (suffix?: string) => string;
|
|
5
5
|
interface ContentDisplayOptionProps {
|
|
6
|
-
|
|
7
|
-
dragHandleListeners?: DragHandleProps['listeners'];
|
|
6
|
+
dragHandleProps: DragHandleProps;
|
|
8
7
|
onToggle?: (option: OptionWithVisibility) => void;
|
|
9
8
|
option: OptionWithVisibility;
|
|
10
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-display-option.d.ts","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/content-display-option.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmC,MAAM,OAAO,CAAC;AAExD,OAAmB,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAGpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAK/C,eAAO,MAAM,YAAY,YAAa,MAAM,WAAgE,CAAC;AAE7G,UAAU,yBAAyB;IACjC,
|
|
1
|
+
{"version":3,"file":"content-display-option.d.ts","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/content-display-option.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmC,MAAM,OAAO,CAAC;AAExD,OAAmB,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAGpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAK/C,eAAO,MAAM,YAAY,YAAa,MAAM,WAAgE,CAAC;AAE7G,UAAU,yBAAyB;IACjC,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAClD,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED,QAAA,MAAM,oBAAoB,kGAsBzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -7,11 +7,11 @@ import InternalToggle from '../../toggle/internal';
|
|
|
7
7
|
import styles from '../styles.css.js';
|
|
8
8
|
const componentPrefix = 'content-display-option';
|
|
9
9
|
export const getClassName = (suffix) => styles[[componentPrefix, suffix].filter(Boolean).join('-')];
|
|
10
|
-
const ContentDisplayOption = forwardRef(({
|
|
10
|
+
const ContentDisplayOption = forwardRef(({ dragHandleProps, onToggle, option }, ref) => {
|
|
11
11
|
const idPrefix = useUniqueId(componentPrefix);
|
|
12
12
|
const controlId = `${idPrefix}-control-${option.id}`;
|
|
13
13
|
return (React.createElement("div", { ref: ref, className: getClassName('content') },
|
|
14
|
-
React.createElement(DragHandle, {
|
|
14
|
+
React.createElement(DragHandle, Object.assign({}, dragHandleProps)),
|
|
15
15
|
React.createElement("label", { className: getClassName('label'), htmlFor: controlId }, option.label),
|
|
16
16
|
React.createElement("div", { className: getClassName('toggle') },
|
|
17
17
|
React.createElement(InternalToggle, { checked: !!option.visible, onChange: () => onToggle && onToggle(option), disabled: option.alwaysVisible === true, controlId: controlId }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-display-option.js","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/content-display-option.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAgB,UAAU,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,UAA+B,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAGnD,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,eAAe,GAAG,wBAAwB,CAAC;AACjD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAe,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"content-display-option.js","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/content-display-option.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAgB,UAAU,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,UAA+B,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAGnD,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,eAAe,GAAG,wBAAwB,CAAC;AACjD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAe,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAQ7G,MAAM,oBAAoB,GAAG,UAAU,CACrC,CAAC,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,EAA6B,EAAE,GAAiC,EAAE,EAAE;IACtG,MAAM,QAAQ,GAAG,WAAW,CAAC,eAAe,CAAC,CAAC;IAC9C,MAAM,SAAS,GAAG,GAAG,QAAQ,YAAY,MAAM,CAAC,EAAE,EAAE,CAAC;IACrD,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,CAAC,SAAS,CAAC;QAC/C,oBAAC,UAAU,oBAAK,eAAe,EAAI;QAEnC,+BAAO,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,SAAS,IACxD,MAAM,CAAC,KAAK,CACP;QACR,6BAAK,SAAS,EAAE,YAAY,CAAC,QAAQ,CAAC;YACpC,oBAAC,cAAc,IACb,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,EACzB,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,EAC5C,QAAQ,EAAE,MAAM,CAAC,aAAa,KAAK,IAAI,EACvC,SAAS,EAAE,SAAS,GACpB,CACE,CACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ForwardedRef, forwardRef } from 'react';\n\nimport DragHandle, { DragHandleProps } from '../../internal/components/drag-handle';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport InternalToggle from '../../toggle/internal';\nimport { OptionWithVisibility } from './utils';\n\nimport styles from '../styles.css.js';\n\nconst componentPrefix = 'content-display-option';\nexport const getClassName = (suffix?: string) => styles[[componentPrefix, suffix].filter(Boolean).join('-')];\n\ninterface ContentDisplayOptionProps {\n dragHandleProps: DragHandleProps;\n onToggle?: (option: OptionWithVisibility) => void;\n option: OptionWithVisibility;\n}\n\nconst ContentDisplayOption = forwardRef(\n ({ dragHandleProps, onToggle, option }: ContentDisplayOptionProps, ref: ForwardedRef<HTMLDivElement>) => {\n const idPrefix = useUniqueId(componentPrefix);\n const controlId = `${idPrefix}-control-${option.id}`;\n return (\n <div ref={ref} className={getClassName('content')}>\n <DragHandle {...dragHandleProps} />\n\n <label className={getClassName('label')} htmlFor={controlId}>\n {option.label}\n </label>\n <div className={getClassName('toggle')}>\n <InternalToggle\n checked={!!option.visible}\n onChange={() => onToggle && onToggle(option)}\n disabled={option.alwaysVisible === true}\n controlId={controlId}\n />\n </div>\n </div>\n );\n }\n);\n\nexport default ContentDisplayOption;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAU3D,UAAU,6BAA8B,SAAQ,0BAA0B,CAAC,wBAAwB;IACjG,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,0BAA0B,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IACxF,KAAK,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,kBAAkB,CAAC,CAAC;CACtE;AAED,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAC/C,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAGG,EACH,QAAQ,EACR,0BAA0B,EAC1B,gCAAgC,EAChC,gCAAgC,EAChC,4BAA4B,EAC5B,yBAAyB,EACzB,mBAAmB,EACnB,qBAA6B,EAC7B,WAAW,GACZ,EAAE,6BAA6B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAU3D,UAAU,6BAA8B,SAAQ,0BAA0B,CAAC,wBAAwB;IACjG,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,0BAA0B,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IACxF,KAAK,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,kBAAkB,CAAC,CAAC;CACtE;AAED,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAC/C,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAGG,EACH,QAAQ,EACR,0BAA0B,EAC1B,gCAAgC,EAChC,gCAAgC,EAChC,4BAA4B,EAC5B,yBAAyB,EACzB,mBAAmB,EACnB,qBAA6B,EAC7B,WAAW,GACZ,EAAE,6BAA6B,eAiJ/B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
3
|
import React, { useMemo, useState } from 'react';
|
|
@@ -6,7 +5,7 @@ import clsx from 'clsx';
|
|
|
6
5
|
import InternalBox from '../../box/internal';
|
|
7
6
|
import InternalButton from '../../button/internal';
|
|
8
7
|
import { useInternalI18n } from '../../i18n/context';
|
|
9
|
-
import {
|
|
8
|
+
import { DndArea } from '../../internal/components/dnd-area';
|
|
10
9
|
import { useUniqueId } from '../../internal/hooks/use-unique-id';
|
|
11
10
|
import InternalSpaceBetween from '../../space-between/internal';
|
|
12
11
|
import InternalTextFilter from '../../text-filter/internal';
|
|
@@ -47,10 +46,9 @@ export default function ContentDisplayPreference({ title, description, options,
|
|
|
47
46
|
React.createElement(InternalBox, { margin: { top: 'm' } }, i18n('contentDisplayPreference.i18nStrings.columnFilteringNoMatchText', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.columnFilteringNoMatchText)),
|
|
48
47
|
React.createElement(InternalButton, { onClick: () => setColumnFilteringText('') }, i18n('contentDisplayPreference.i18nStrings.columnFilteringClearFilterText', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.columnFilteringClearFilterText))))),
|
|
49
48
|
React.createElement("ul", { className: getClassName('option-list'), "aria-describedby": descriptionId, "aria-labelledby": titleId, role: "list" },
|
|
50
|
-
React.createElement(
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
const content = React.createElement(ContentDisplayOption, Object.assign({ ref: ref, option: item.data, onToggle: onToggle }, dragHandle));
|
|
49
|
+
React.createElement(DndArea, { items: sortedAndFilteredOptions.map(data => ({ id: data.id, label: data.label, data })), onItemsChange: items => onChange(items.map(({ id, data }) => ({ id, visible: data.visible }))), disableReorder: columnFilteringText.trim().length > 0, renderItem: ({ ref, item, isSorting, isActive, style, className, dragHandleProps }) => {
|
|
50
|
+
className = clsx(className, getOptionClassName(), isSorting && styles.sorting);
|
|
51
|
+
const content = (React.createElement(ContentDisplayOption, { ref: ref, option: item.data, onToggle: onToggle, dragHandleProps: dragHandleProps }));
|
|
54
52
|
return isActive ? (content) : (React.createElement("li", { className: className, style: style }, content));
|
|
55
53
|
}, i18nStrings: {
|
|
56
54
|
liveAnnouncementDndStarted: i18n('contentDisplayPreference.liveAnnouncementDndStarted', liveAnnouncementDndStarted, format => (position, total) => format({ position, total })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO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,4BAAI,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,IACnC,OAAO,CACL,CACN,CAAC;gBACJ,CAAC,EACD,WAAW,EAAE;oBACX,0BAA0B,EAAE,IAAI,CAC9B,qDAAqD,EACrD,0BAA0B,EAC1B,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAC3D;oBACD,gCAAgC,EAAE,IAAI,CACpC,2DAA2D,EAC3D,gCAAgC,EAChC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,CACpD,MAAM,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG,eAAe,KAAK,eAAe,EAAE,EAAE,CAAC,CAClG;oBACD,gCAAgC,EAAE,IAAI,CACpC,2DAA2D,EAC3D,gCAAgC,EAChC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,EAAE,CAClD,MAAM,CAAC;wBACL,eAAe;wBACf,aAAa;wBACb,KAAK;wBACL,iBAAiB,EAAE,GAAG,eAAe,KAAK,aAAa,EAAE;qBAC1D,CAAC,CACL;oBACD,4BAA4B,EAAE,IAAI,CAChC,uDAAuD,EACvD,4BAA4B,CAC7B;oBACD,mBAAmB,EAAE,IAAI,CAAC,8CAA8C,EAAE,mBAAmB,CAAC;oBAC9F,yBAAyB,EAAE,IAAI,CAC7B,oDAAoD,EACpD,yBAAyB,CAC1B;iBACF,GACD,CACC,CACD,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport InternalBox from '../../box/internal';\nimport InternalButton from '../../button/internal';\nimport { useInternalI18n } from '../../i18n/context';\nimport { DndContainer } from '../../internal/components/dnd-container';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport InternalTextFilter from '../../text-filter/internal';\nimport { getAnalyticsInnerContextAttribute } from '../analytics-metadata/utils';\nimport { CollectionPreferencesProps } from '../interfaces';\nimport ContentDisplayOption, { getClassName as getOptionClassName } from './content-display-option';\nimport { getFilteredOptions, getSortedOptions, OptionWithVisibility } from './utils';\n\nimport styles from '../styles.css.js';\n\nconst componentPrefix = 'content-display';\n\nconst getClassName = (suffix: string) => styles[`${componentPrefix}-${suffix}`];\n\ninterface ContentDisplayPreferenceProps extends CollectionPreferencesProps.ContentDisplayPreference {\n onChange: (value: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>) => void;\n value?: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>;\n}\n\nexport default function ContentDisplayPreference({\n title,\n description,\n options,\n value = options.map(({ id }) => ({\n id,\n visible: true,\n })),\n onChange,\n liveAnnouncementDndStarted,\n liveAnnouncementDndItemReordered,\n liveAnnouncementDndItemCommitted,\n liveAnnouncementDndDiscarded,\n dragHandleAriaDescription,\n dragHandleAriaLabel,\n enableColumnFiltering = false,\n i18nStrings,\n}: ContentDisplayPreferenceProps) {\n const idPrefix = useUniqueId(componentPrefix);\n const i18n = useInternalI18n('collection-preferences');\n const [columnFilteringText, setColumnFilteringText] = useState('');\n\n const titleId = `${idPrefix}-title`;\n const descriptionId = `${idPrefix}-description`;\n\n const [sortedOptions, sortedAndFilteredOptions] = useMemo(() => {\n const sorted = getSortedOptions({ options, contentDisplay: value });\n const filtered = getFilteredOptions(sorted, columnFilteringText);\n return [sorted, filtered];\n }, [columnFilteringText, options, value]);\n\n const onToggle = (option: OptionWithVisibility) => {\n // We use sortedOptions as base and not value because there might be options that\n // are not in the value yet, so they're added as non-visible after the known ones.\n onChange(sortedOptions.map(({ id, visible }) => ({ id, visible: id === option.id ? !option.visible : visible })));\n };\n\n return (\n <div className={styles[componentPrefix]} {...getAnalyticsInnerContextAttribute('contentDisplay')}>\n <h3 className={getClassName('title')} id={titleId}>\n {i18n('contentDisplayPreference.title', title)}\n </h3>\n <p className={getClassName('description')} id={descriptionId}>\n {i18n('contentDisplayPreference.description', description)}\n </p>\n\n {/* Filter input */}\n {enableColumnFiltering && (\n <div className={getClassName('text-filter')}>\n <InternalTextFilter\n filteringText={columnFilteringText}\n filteringPlaceholder={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringPlaceholder',\n i18nStrings?.columnFilteringPlaceholder\n )}\n filteringAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringAriaLabel',\n i18nStrings?.columnFilteringAriaLabel\n )}\n filteringClearAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n onChange={({ detail }) => setColumnFilteringText(detail.filteringText)}\n countText={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringCountText',\n i18nStrings?.columnFilteringCountText\n ? i18nStrings?.columnFilteringCountText(sortedAndFilteredOptions.length)\n : undefined,\n format => format({ count: sortedAndFilteredOptions.length })\n )}\n />\n </div>\n )}\n\n {/* No match */}\n {sortedAndFilteredOptions.length === 0 && (\n <div className={getClassName('no-match')}>\n <InternalSpaceBetween size=\"s\" alignItems=\"center\">\n <InternalBox margin={{ top: 'm' }}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringNoMatchText',\n i18nStrings?.columnFilteringNoMatchText\n )}\n </InternalBox>\n <InternalButton onClick={() => setColumnFilteringText('')}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n </InternalButton>\n </InternalSpaceBetween>\n </div>\n )}\n\n {/* Use explicit list role to work around Safari not announcing lists as such when list-style is set to none.\n See https://bugs.webkit.org/show_bug.cgi?id=170179 */}\n <ul\n className={getClassName('option-list')}\n aria-describedby={descriptionId}\n aria-labelledby={titleId}\n role=\"list\"\n >\n <DndContainer\n items={sortedAndFilteredOptions.map(data => ({ id: data.id, label: data.label, data }))}\n onItemsChange={items => onChange(items.map(({ id, data }) => ({ id, visible: data.visible })))}\n disableReorder={columnFilteringText.trim().length > 0}\n renderItem={({ ref, item, isDragging, isSorting, isActive, style, ...dragHandle }) => {\n const className = clsx(getOptionClassName(), isDragging && styles.placeholder, isSorting && styles.sorting);\n const content = <ContentDisplayOption ref={ref} option={item.data} onToggle={onToggle} {...dragHandle} />;\n return isActive ? (\n content\n ) : (\n <li className={className} style={style}>\n {content}\n </li>\n );\n }}\n i18nStrings={{\n liveAnnouncementDndStarted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndStarted',\n liveAnnouncementDndStarted,\n format => (position, total) => format({ position, total })\n ),\n liveAnnouncementDndItemReordered: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemReordered',\n liveAnnouncementDndItemReordered,\n format => (initialPosition, currentPosition, total) =>\n format({ currentPosition, total, isInitialPosition: `${initialPosition === currentPosition}` })\n ),\n liveAnnouncementDndItemCommitted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemCommitted',\n liveAnnouncementDndItemCommitted,\n format => (initialPosition, finalPosition, total) =>\n format({\n initialPosition,\n finalPosition,\n total,\n isInitialPosition: `${initialPosition === finalPosition}`,\n })\n ),\n liveAnnouncementDndDiscarded: i18n(\n 'contentDisplayPreference.liveAnnouncementDndDiscarded',\n liveAnnouncementDndDiscarded\n ),\n dragHandleAriaLabel: i18n('contentDisplayPreference.dragHandleAriaLabel', dragHandleAriaLabel),\n dragHandleAriaDescription: i18n(\n 'contentDisplayPreference.dragHandleAriaDescription',\n dragHandleAriaDescription\n ),\n }}\n />\n </ul>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collection-preferences/content-display/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EA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,CACF,4BAAI,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,IACnC,OAAO,CACL,CACN,CAAC;gBACJ,CAAC,EACD,WAAW,EAAE;oBACX,0BAA0B,EAAE,IAAI,CAC9B,qDAAqD,EACrD,0BAA0B,EAC1B,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAC3D;oBACD,gCAAgC,EAAE,IAAI,CACpC,2DAA2D,EAC3D,gCAAgC,EAChC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,CACpD,MAAM,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG,eAAe,KAAK,eAAe,EAAE,EAAE,CAAC,CAClG;oBACD,gCAAgC,EAAE,IAAI,CACpC,2DAA2D,EAC3D,gCAAgC,EAChC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,EAAE,CAClD,MAAM,CAAC;wBACL,eAAe;wBACf,aAAa;wBACb,KAAK;wBACL,iBAAiB,EAAE,GAAG,eAAe,KAAK,aAAa,EAAE;qBAC1D,CAAC,CACL;oBACD,4BAA4B,EAAE,IAAI,CAChC,uDAAuD,EACvD,4BAA4B,CAC7B;oBACD,mBAAmB,EAAE,IAAI,CAAC,8CAA8C,EAAE,mBAAmB,CAAC;oBAC9F,yBAAyB,EAAE,IAAI,CAC7B,oDAAoD,EACpD,yBAAyB,CAC1B;iBACF,GACD,CACC,CACD,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport InternalBox from '../../box/internal';\nimport InternalButton from '../../button/internal';\nimport { useInternalI18n } from '../../i18n/context';\nimport { DndArea } from '../../internal/components/dnd-area';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport InternalTextFilter from '../../text-filter/internal';\nimport { getAnalyticsInnerContextAttribute } from '../analytics-metadata/utils';\nimport { CollectionPreferencesProps } from '../interfaces';\nimport ContentDisplayOption, { getClassName as getOptionClassName } from './content-display-option';\nimport { getFilteredOptions, getSortedOptions, OptionWithVisibility } from './utils';\n\nimport styles from '../styles.css.js';\n\nconst componentPrefix = 'content-display';\n\nconst getClassName = (suffix: string) => styles[`${componentPrefix}-${suffix}`];\n\ninterface ContentDisplayPreferenceProps extends CollectionPreferencesProps.ContentDisplayPreference {\n onChange: (value: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>) => void;\n value?: ReadonlyArray<CollectionPreferencesProps.ContentDisplayItem>;\n}\n\nexport default function ContentDisplayPreference({\n title,\n description,\n options,\n value = options.map(({ id }) => ({\n id,\n visible: true,\n })),\n onChange,\n liveAnnouncementDndStarted,\n liveAnnouncementDndItemReordered,\n liveAnnouncementDndItemCommitted,\n liveAnnouncementDndDiscarded,\n dragHandleAriaDescription,\n dragHandleAriaLabel,\n enableColumnFiltering = false,\n i18nStrings,\n}: ContentDisplayPreferenceProps) {\n const idPrefix = useUniqueId(componentPrefix);\n const i18n = useInternalI18n('collection-preferences');\n const [columnFilteringText, setColumnFilteringText] = useState('');\n\n const titleId = `${idPrefix}-title`;\n const descriptionId = `${idPrefix}-description`;\n\n const [sortedOptions, sortedAndFilteredOptions] = useMemo(() => {\n const sorted = getSortedOptions({ options, contentDisplay: value });\n const filtered = getFilteredOptions(sorted, columnFilteringText);\n return [sorted, filtered];\n }, [columnFilteringText, options, value]);\n\n const onToggle = (option: OptionWithVisibility) => {\n // We use sortedOptions as base and not value because there might be options that\n // are not in the value yet, so they're added as non-visible after the known ones.\n onChange(sortedOptions.map(({ id, visible }) => ({ id, visible: id === option.id ? !option.visible : visible })));\n };\n\n return (\n <div className={styles[componentPrefix]} {...getAnalyticsInnerContextAttribute('contentDisplay')}>\n <h3 className={getClassName('title')} id={titleId}>\n {i18n('contentDisplayPreference.title', title)}\n </h3>\n <p className={getClassName('description')} id={descriptionId}>\n {i18n('contentDisplayPreference.description', description)}\n </p>\n\n {/* Filter input */}\n {enableColumnFiltering && (\n <div className={getClassName('text-filter')}>\n <InternalTextFilter\n filteringText={columnFilteringText}\n filteringPlaceholder={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringPlaceholder',\n i18nStrings?.columnFilteringPlaceholder\n )}\n filteringAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringAriaLabel',\n i18nStrings?.columnFilteringAriaLabel\n )}\n filteringClearAriaLabel={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n onChange={({ detail }) => setColumnFilteringText(detail.filteringText)}\n countText={i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringCountText',\n i18nStrings?.columnFilteringCountText\n ? i18nStrings?.columnFilteringCountText(sortedAndFilteredOptions.length)\n : undefined,\n format => format({ count: sortedAndFilteredOptions.length })\n )}\n />\n </div>\n )}\n\n {/* No match */}\n {sortedAndFilteredOptions.length === 0 && (\n <div className={getClassName('no-match')}>\n <InternalSpaceBetween size=\"s\" alignItems=\"center\">\n <InternalBox margin={{ top: 'm' }}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringNoMatchText',\n i18nStrings?.columnFilteringNoMatchText\n )}\n </InternalBox>\n <InternalButton onClick={() => setColumnFilteringText('')}>\n {i18n(\n 'contentDisplayPreference.i18nStrings.columnFilteringClearFilterText',\n i18nStrings?.columnFilteringClearFilterText\n )}\n </InternalButton>\n </InternalSpaceBetween>\n </div>\n )}\n\n {/* Use explicit list role to work around Safari not announcing lists as such when list-style is set to none.\n See https://bugs.webkit.org/show_bug.cgi?id=170179 */}\n <ul\n className={getClassName('option-list')}\n aria-describedby={descriptionId}\n aria-labelledby={titleId}\n role=\"list\"\n >\n <DndArea\n items={sortedAndFilteredOptions.map(data => ({ id: data.id, label: data.label, data }))}\n onItemsChange={items => onChange(items.map(({ id, data }) => ({ id, visible: data.visible })))}\n disableReorder={columnFilteringText.trim().length > 0}\n renderItem={({ ref, item, isSorting, isActive, style, className, dragHandleProps }) => {\n className = clsx(className, getOptionClassName(), isSorting && styles.sorting);\n const content = (\n <ContentDisplayOption\n ref={ref}\n option={item.data}\n onToggle={onToggle}\n dragHandleProps={dragHandleProps}\n />\n );\n return isActive ? (\n content\n ) : (\n <li className={className} style={style}>\n {content}\n </li>\n );\n }}\n i18nStrings={{\n liveAnnouncementDndStarted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndStarted',\n liveAnnouncementDndStarted,\n format => (position, total) => format({ position, total })\n ),\n liveAnnouncementDndItemReordered: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemReordered',\n liveAnnouncementDndItemReordered,\n format => (initialPosition, currentPosition, total) =>\n format({ currentPosition, total, isInitialPosition: `${initialPosition === currentPosition}` })\n ),\n liveAnnouncementDndItemCommitted: i18n(\n 'contentDisplayPreference.liveAnnouncementDndItemCommitted',\n liveAnnouncementDndItemCommitted,\n format => (initialPosition, finalPosition, total) =>\n format({\n initialPosition,\n finalPosition,\n total,\n isInitialPosition: `${initialPosition === finalPosition}`,\n })\n ),\n liveAnnouncementDndDiscarded: i18n(\n 'contentDisplayPreference.liveAnnouncementDndDiscarded',\n liveAnnouncementDndDiscarded\n ),\n dragHandleAriaLabel: i18n('contentDisplayPreference.dragHandleAriaLabel', dragHandleAriaLabel),\n dragHandleAriaDescription: i18n(\n 'contentDisplayPreference.dragHandleAriaDescription',\n dragHandleAriaDescription\n ),\n }}\n />\n </ul>\n </div>\n );\n}\n"]}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"content-display-option-toggle": "awsui_content-display-option-
|
|
5
|
-
"content-display-option-content": "awsui_content-display-option-
|
|
6
|
-
"content-display-option": "awsui_content-display-
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"content-display-
|
|
10
|
-
"content-display": "awsui_content-
|
|
11
|
-
"content-display-
|
|
12
|
-
"content-display-
|
|
13
|
-
"content-display-
|
|
14
|
-
"content-display-description": "awsui_content-display-description_1f3h0_1k9f2_389",
|
|
15
|
-
"content-display-option-list": "awsui_content-display-option-list_1f3h0_1k9f2_397"
|
|
4
|
+
"content-display-option-toggle": "awsui_content-display-option-toggle_1f3h0_1r7a5_289",
|
|
5
|
+
"content-display-option-content": "awsui_content-display-option-content_1f3h0_1r7a5_293",
|
|
6
|
+
"content-display-option": "awsui_content-display-option_1f3h0_1r7a5_289",
|
|
7
|
+
"content-display-option-label": "awsui_content-display-option-label_1f3h0_1r7a5_341",
|
|
8
|
+
"content-display": "awsui_content-display_1f3h0_1r7a5_289",
|
|
9
|
+
"content-display-text-filter": "awsui_content-display-text-filter_1f3h0_1r7a5_349",
|
|
10
|
+
"content-display-no-match": "awsui_content-display-no-match_1f3h0_1r7a5_350",
|
|
11
|
+
"content-display-title": "awsui_content-display-title_1f3h0_1r7a5_354",
|
|
12
|
+
"content-display-description": "awsui_content-display-description_1f3h0_1r7a5_363",
|
|
13
|
+
"content-display-option-list": "awsui_content-display-option-list_1f3h0_1r7a5_371"
|
|
16
14
|
};
|
|
17
15
|
|
|
@@ -286,11 +286,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
286
286
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
287
287
|
SPDX-License-Identifier: Apache-2.0
|
|
288
288
|
*/
|
|
289
|
-
.awsui_content-display-option-
|
|
289
|
+
.awsui_content-display-option-toggle_1f3h0_1r7a5_289:not(#\9) {
|
|
290
290
|
/* used in test-utils */
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
.awsui_content-display-option-
|
|
293
|
+
.awsui_content-display-option-content_1f3h0_1r7a5_293:not(#\9) {
|
|
294
294
|
border-collapse: separate;
|
|
295
295
|
border-spacing: 0;
|
|
296
296
|
box-sizing: border-box;
|
|
@@ -333,52 +333,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
333
333
|
border-end-end-radius: var(--border-radius-item-05df9h, 8px);
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
.awsui_content-display-
|
|
336
|
+
.awsui_content-display-option_1f3h0_1r7a5_289:not(#\9) {
|
|
337
337
|
list-style: none;
|
|
338
338
|
position: relative;
|
|
339
339
|
border-block-start: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-divider-secondary-alwp8z, #ebebf0);
|
|
340
340
|
}
|
|
341
|
-
.awsui_content-display-option_1f3h0_1k9f2_289:not(#\9):not(.awsui_placeholder_1f3h0_1k9f2_340).awsui_sorting_1f3h0_1k9f2_340 {
|
|
342
|
-
transition: transform var(--motion-duration-transition-quick-6npj01, 90ms) var(--motion-easing-transition-quick-l9jfsx, linear);
|
|
343
|
-
}
|
|
344
|
-
@media (prefers-reduced-motion: reduce) {
|
|
345
|
-
.awsui_content-display-option_1f3h0_1k9f2_289:not(#\9):not(.awsui_placeholder_1f3h0_1k9f2_340).awsui_sorting_1f3h0_1k9f2_340 {
|
|
346
|
-
animation: none;
|
|
347
|
-
transition: none;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
.awsui-motion-disabled .awsui_content-display-option_1f3h0_1k9f2_289:not(#\9):not(.awsui_placeholder_1f3h0_1k9f2_340).awsui_sorting_1f3h0_1k9f2_340, .awsui-mode-entering .awsui_content-display-option_1f3h0_1k9f2_289:not(#\9):not(.awsui_placeholder_1f3h0_1k9f2_340).awsui_sorting_1f3h0_1k9f2_340 {
|
|
351
|
-
animation: none;
|
|
352
|
-
transition: none;
|
|
353
|
-
}
|
|
354
|
-
.awsui_content-display-option_1f3h0_1k9f2_289.awsui_placeholder_1f3h0_1k9f2_340 > .awsui_content-display-option-content_1f3h0_1k9f2_293:not(#\9) {
|
|
355
|
-
position: relative;
|
|
356
|
-
}
|
|
357
|
-
.awsui_content-display-option_1f3h0_1k9f2_289.awsui_placeholder_1f3h0_1k9f2_340 > .awsui_content-display-option-content_1f3h0_1k9f2_293:not(#\9):after {
|
|
358
|
-
content: " ";
|
|
359
|
-
position: absolute;
|
|
360
|
-
inset: 0;
|
|
361
|
-
background: var(--color-drag-placeholder-hover-oikifl, #d1f1ff);
|
|
362
|
-
border-start-start-radius: var(--border-radius-item-05df9h, 8px);
|
|
363
|
-
border-start-end-radius: var(--border-radius-item-05df9h, 8px);
|
|
364
|
-
border-end-start-radius: var(--border-radius-item-05df9h, 8px);
|
|
365
|
-
border-end-end-radius: var(--border-radius-item-05df9h, 8px);
|
|
366
|
-
}
|
|
367
341
|
|
|
368
|
-
.awsui_content-display-option-
|
|
342
|
+
.awsui_content-display-option-label_1f3h0_1r7a5_341:not(#\9) {
|
|
369
343
|
flex-grow: 1;
|
|
370
344
|
min-inline-size: 0;
|
|
371
345
|
word-break: break-word;
|
|
372
346
|
padding-inline-end: var(--space-l-t419sm, 20px);
|
|
373
347
|
}
|
|
374
348
|
|
|
375
|
-
.awsui_content-
|
|
376
|
-
.awsui_content-display-text-
|
|
377
|
-
.awsui_content-display-no-
|
|
349
|
+
.awsui_content-display_1f3h0_1r7a5_289:not(#\9),
|
|
350
|
+
.awsui_content-display-text-filter_1f3h0_1r7a5_349:not(#\9),
|
|
351
|
+
.awsui_content-display-no-match_1f3h0_1r7a5_350:not(#\9) {
|
|
378
352
|
/* used in test-utils */
|
|
379
353
|
}
|
|
380
354
|
|
|
381
|
-
.awsui_content-display-
|
|
355
|
+
.awsui_content-display-title_1f3h0_1r7a5_354:not(#\9) {
|
|
382
356
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
383
357
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
384
358
|
font-weight: var(--font-display-label-weight-815ja9, 700);
|
|
@@ -387,7 +361,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
387
361
|
margin-inline: 0;
|
|
388
362
|
}
|
|
389
363
|
|
|
390
|
-
.awsui_content-display-
|
|
364
|
+
.awsui_content-display-description_1f3h0_1r7a5_363:not(#\9) {
|
|
391
365
|
color: var(--color-text-form-secondary-54emib, #656871);
|
|
392
366
|
font-size: var(--font-size-body-s-asqx2i, 12px);
|
|
393
367
|
line-height: var(--line-height-body-s-7zv1j5, 16px);
|
|
@@ -395,7 +369,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
395
369
|
margin-block-start: var(--space-scaled-xxxs-27y4hv, 2px);
|
|
396
370
|
}
|
|
397
371
|
|
|
398
|
-
.awsui_content-display-option-
|
|
372
|
+
.awsui_content-display-option-list_1f3h0_1r7a5_371:not(#\9) {
|
|
399
373
|
position: relative;
|
|
400
374
|
list-style: none;
|
|
401
375
|
padding-block: 0;
|
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"content-display-option-toggle": "awsui_content-display-option-
|
|
6
|
-
"content-display-option-content": "awsui_content-display-option-
|
|
7
|
-
"content-display-option": "awsui_content-display-
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"content-display-
|
|
11
|
-
"content-display": "awsui_content-
|
|
12
|
-
"content-display-
|
|
13
|
-
"content-display-
|
|
14
|
-
"content-display-
|
|
15
|
-
"content-display-description": "awsui_content-display-description_1f3h0_1k9f2_389",
|
|
16
|
-
"content-display-option-list": "awsui_content-display-option-list_1f3h0_1k9f2_397"
|
|
5
|
+
"content-display-option-toggle": "awsui_content-display-option-toggle_1f3h0_1r7a5_289",
|
|
6
|
+
"content-display-option-content": "awsui_content-display-option-content_1f3h0_1r7a5_293",
|
|
7
|
+
"content-display-option": "awsui_content-display-option_1f3h0_1r7a5_289",
|
|
8
|
+
"content-display-option-label": "awsui_content-display-option-label_1f3h0_1r7a5_341",
|
|
9
|
+
"content-display": "awsui_content-display_1f3h0_1r7a5_289",
|
|
10
|
+
"content-display-text-filter": "awsui_content-display-text-filter_1f3h0_1r7a5_349",
|
|
11
|
+
"content-display-no-match": "awsui_content-display-no-match_1f3h0_1r7a5_350",
|
|
12
|
+
"content-display-title": "awsui_content-display-title_1f3h0_1r7a5_354",
|
|
13
|
+
"content-display-description": "awsui_content-display-description_1f3h0_1r7a5_363",
|
|
14
|
+
"content-display-option-list": "awsui_content-display-option-list_1f3h0_1r7a5_371"
|
|
17
15
|
};
|
|
18
16
|
|
|
@@ -1,43 +1,41 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"visible-content": "awsui_visible-
|
|
5
|
-
"visible-content-toggle": "awsui_visible-content-
|
|
6
|
-
"visible-content-groups": "awsui_visible-content-
|
|
7
|
-
"visible-content-group": "awsui_visible-content-
|
|
8
|
-
"visible-content-title": "awsui_visible-content-
|
|
9
|
-
"visible-content-group-label": "awsui_visible-content-group-
|
|
10
|
-
"visible-content-option": "awsui_visible-content-
|
|
11
|
-
"visible-content-option-label": "awsui_visible-content-option-
|
|
12
|
-
"content-display-option-toggle": "awsui_content-display-option-
|
|
13
|
-
"content-display-option-content": "awsui_content-display-option-
|
|
14
|
-
"content-display-option": "awsui_content-display-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"content-display-
|
|
18
|
-
"content-display": "awsui_content-
|
|
19
|
-
"content-display-
|
|
20
|
-
"content-display-
|
|
21
|
-
"content-display-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"page-size": "awsui_page-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"sticky-columns": "awsui_sticky-
|
|
38
|
-
"sticky-columns-
|
|
39
|
-
"sticky-columns-
|
|
40
|
-
"sticky-columns-first": "awsui_sticky-columns-first_tc96w_1xqaf_757",
|
|
41
|
-
"sticky-columns-last": "awsui_sticky-columns-last_tc96w_1xqaf_758"
|
|
4
|
+
"visible-content": "awsui_visible-content_tc96w_356y9_289",
|
|
5
|
+
"visible-content-toggle": "awsui_visible-content-toggle_tc96w_356y9_290",
|
|
6
|
+
"visible-content-groups": "awsui_visible-content-groups_tc96w_356y9_291",
|
|
7
|
+
"visible-content-group": "awsui_visible-content-group_tc96w_356y9_291",
|
|
8
|
+
"visible-content-title": "awsui_visible-content-title_tc96w_356y9_296",
|
|
9
|
+
"visible-content-group-label": "awsui_visible-content-group-label_tc96w_356y9_306",
|
|
10
|
+
"visible-content-option": "awsui_visible-content-option_tc96w_356y9_312",
|
|
11
|
+
"visible-content-option-label": "awsui_visible-content-option-label_tc96w_356y9_325",
|
|
12
|
+
"content-display-option-toggle": "awsui_content-display-option-toggle_tc96w_356y9_620",
|
|
13
|
+
"content-display-option-content": "awsui_content-display-option-content_tc96w_356y9_624",
|
|
14
|
+
"content-display-option": "awsui_content-display-option_tc96w_356y9_620",
|
|
15
|
+
"content-display-option-label": "awsui_content-display-option-label_tc96w_356y9_672",
|
|
16
|
+
"content-display": "awsui_content-display_tc96w_356y9_620",
|
|
17
|
+
"content-display-text-filter": "awsui_content-display-text-filter_tc96w_356y9_680",
|
|
18
|
+
"content-display-no-match": "awsui_content-display-no-match_tc96w_356y9_681",
|
|
19
|
+
"content-display-title": "awsui_content-display-title_tc96w_356y9_685",
|
|
20
|
+
"content-display-description": "awsui_content-display-description_tc96w_356y9_694",
|
|
21
|
+
"content-display-option-list": "awsui_content-display-option-list_tc96w_356y9_702",
|
|
22
|
+
"root": "awsui_root_tc96w_356y9_709",
|
|
23
|
+
"modal-root": "awsui_modal-root_tc96w_356y9_710",
|
|
24
|
+
"trigger-button": "awsui_trigger-button_tc96w_356y9_711",
|
|
25
|
+
"cancel-button": "awsui_cancel-button_tc96w_356y9_712",
|
|
26
|
+
"confirm-button": "awsui_confirm-button_tc96w_356y9_713",
|
|
27
|
+
"custom": "awsui_custom_tc96w_356y9_714",
|
|
28
|
+
"second-column-small": "awsui_second-column-small_tc96w_356y9_718",
|
|
29
|
+
"wrap-lines": "awsui_wrap-lines_tc96w_356y9_722",
|
|
30
|
+
"striped-rows": "awsui_striped-rows_tc96w_356y9_723",
|
|
31
|
+
"content-density": "awsui_content-density_tc96w_356y9_724",
|
|
32
|
+
"page-size": "awsui_page-size_tc96w_356y9_725",
|
|
33
|
+
"page-size-form-field": "awsui_page-size-form-field_tc96w_356y9_726",
|
|
34
|
+
"page-size-radio-group": "awsui_page-size-radio-group_tc96w_356y9_727",
|
|
35
|
+
"sticky-columns": "awsui_sticky-columns_tc96w_356y9_728",
|
|
36
|
+
"sticky-columns-form-field": "awsui_sticky-columns-form-field_tc96w_356y9_729",
|
|
37
|
+
"sticky-columns-radio-group": "awsui_sticky-columns-radio-group_tc96w_356y9_730",
|
|
38
|
+
"sticky-columns-first": "awsui_sticky-columns-first_tc96w_356y9_731",
|
|
39
|
+
"sticky-columns-last": "awsui_sticky-columns-last_tc96w_356y9_732"
|
|
42
40
|
};
|
|
43
41
|
|
|
@@ -286,14 +286,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
286
286
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
287
287
|
SPDX-License-Identifier: Apache-2.0
|
|
288
288
|
*/
|
|
289
|
-
.awsui_visible-
|
|
290
|
-
.awsui_visible-content-
|
|
291
|
-
.awsui_visible-content-
|
|
292
|
-
.awsui_visible-content-
|
|
289
|
+
.awsui_visible-content_tc96w_356y9_289:not(#\9),
|
|
290
|
+
.awsui_visible-content-toggle_tc96w_356y9_290:not(#\9),
|
|
291
|
+
.awsui_visible-content-groups_tc96w_356y9_291:not(#\9),
|
|
292
|
+
.awsui_visible-content-group_tc96w_356y9_291:not(#\9) {
|
|
293
293
|
/* used in test-utils */
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
.awsui_visible-content-
|
|
296
|
+
.awsui_visible-content-title_tc96w_356y9_296:not(#\9) {
|
|
297
297
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
298
298
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
299
299
|
font-weight: var(--font-display-label-weight-815ja9, 700);
|
|
@@ -303,13 +303,13 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
303
303
|
margin-inline: 0;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
.awsui_visible-content-group-
|
|
306
|
+
.awsui_visible-content-group-label_tc96w_356y9_306:not(#\9) {
|
|
307
307
|
color: var(--color-text-group-label-8pk3es, #424650);
|
|
308
308
|
padding-block-end: var(--space-xs-zb16t3, 8px);
|
|
309
309
|
border-block-end: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-divider-secondary-alwp8z, #ebebf0);
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
.awsui_visible-content-
|
|
312
|
+
.awsui_visible-content-option_tc96w_356y9_312:not(#\9) {
|
|
313
313
|
display: flex;
|
|
314
314
|
flex-wrap: nowrap;
|
|
315
315
|
justify-content: space-between;
|
|
@@ -318,11 +318,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
318
318
|
padding-inline-end: 0px;
|
|
319
319
|
border-block-end: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-divider-secondary-alwp8z, #ebebf0);
|
|
320
320
|
}
|
|
321
|
-
.awsui_visible-content-
|
|
321
|
+
.awsui_visible-content-option_tc96w_356y9_312:not(#\9):last-child {
|
|
322
322
|
border-block-end: none;
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
.awsui_visible-content-option-
|
|
325
|
+
.awsui_visible-content-option-label_tc96w_356y9_325:not(#\9) {
|
|
326
326
|
overflow: hidden;
|
|
327
327
|
text-overflow: ellipsis;
|
|
328
328
|
padding-inline-end: var(--space-l-t419sm, 20px);
|
|
@@ -617,11 +617,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
617
617
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
618
618
|
SPDX-License-Identifier: Apache-2.0
|
|
619
619
|
*/
|
|
620
|
-
.awsui_content-display-option-
|
|
620
|
+
.awsui_content-display-option-toggle_tc96w_356y9_620:not(#\9) {
|
|
621
621
|
/* used in test-utils */
|
|
622
622
|
}
|
|
623
623
|
|
|
624
|
-
.awsui_content-display-option-
|
|
624
|
+
.awsui_content-display-option-content_tc96w_356y9_624:not(#\9) {
|
|
625
625
|
border-collapse: separate;
|
|
626
626
|
border-spacing: 0;
|
|
627
627
|
box-sizing: border-box;
|
|
@@ -664,52 +664,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
664
664
|
border-end-end-radius: var(--border-radius-item-05df9h, 8px);
|
|
665
665
|
}
|
|
666
666
|
|
|
667
|
-
.awsui_content-display-
|
|
667
|
+
.awsui_content-display-option_tc96w_356y9_620:not(#\9) {
|
|
668
668
|
list-style: none;
|
|
669
669
|
position: relative;
|
|
670
670
|
border-block-start: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-divider-secondary-alwp8z, #ebebf0);
|
|
671
671
|
}
|
|
672
|
-
.awsui_content-display-option_tc96w_1xqaf_620:not(#\9):not(.awsui_placeholder_tc96w_1xqaf_671).awsui_sorting_tc96w_1xqaf_671 {
|
|
673
|
-
transition: transform var(--motion-duration-transition-quick-6npj01, 90ms) var(--motion-easing-transition-quick-l9jfsx, linear);
|
|
674
|
-
}
|
|
675
|
-
@media (prefers-reduced-motion: reduce) {
|
|
676
|
-
.awsui_content-display-option_tc96w_1xqaf_620:not(#\9):not(.awsui_placeholder_tc96w_1xqaf_671).awsui_sorting_tc96w_1xqaf_671 {
|
|
677
|
-
animation: none;
|
|
678
|
-
transition: none;
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
.awsui-motion-disabled .awsui_content-display-option_tc96w_1xqaf_620:not(#\9):not(.awsui_placeholder_tc96w_1xqaf_671).awsui_sorting_tc96w_1xqaf_671, .awsui-mode-entering .awsui_content-display-option_tc96w_1xqaf_620:not(#\9):not(.awsui_placeholder_tc96w_1xqaf_671).awsui_sorting_tc96w_1xqaf_671 {
|
|
682
|
-
animation: none;
|
|
683
|
-
transition: none;
|
|
684
|
-
}
|
|
685
|
-
.awsui_content-display-option_tc96w_1xqaf_620.awsui_placeholder_tc96w_1xqaf_671 > .awsui_content-display-option-content_tc96w_1xqaf_624:not(#\9) {
|
|
686
|
-
position: relative;
|
|
687
|
-
}
|
|
688
|
-
.awsui_content-display-option_tc96w_1xqaf_620.awsui_placeholder_tc96w_1xqaf_671 > .awsui_content-display-option-content_tc96w_1xqaf_624:not(#\9):after {
|
|
689
|
-
content: " ";
|
|
690
|
-
position: absolute;
|
|
691
|
-
inset: 0;
|
|
692
|
-
background: var(--color-drag-placeholder-hover-oikifl, #d1f1ff);
|
|
693
|
-
border-start-start-radius: var(--border-radius-item-05df9h, 8px);
|
|
694
|
-
border-start-end-radius: var(--border-radius-item-05df9h, 8px);
|
|
695
|
-
border-end-start-radius: var(--border-radius-item-05df9h, 8px);
|
|
696
|
-
border-end-end-radius: var(--border-radius-item-05df9h, 8px);
|
|
697
|
-
}
|
|
698
672
|
|
|
699
|
-
.awsui_content-display-option-
|
|
673
|
+
.awsui_content-display-option-label_tc96w_356y9_672:not(#\9) {
|
|
700
674
|
flex-grow: 1;
|
|
701
675
|
min-inline-size: 0;
|
|
702
676
|
word-break: break-word;
|
|
703
677
|
padding-inline-end: var(--space-l-t419sm, 20px);
|
|
704
678
|
}
|
|
705
679
|
|
|
706
|
-
.awsui_content-
|
|
707
|
-
.awsui_content-display-text-
|
|
708
|
-
.awsui_content-display-no-
|
|
680
|
+
.awsui_content-display_tc96w_356y9_620:not(#\9),
|
|
681
|
+
.awsui_content-display-text-filter_tc96w_356y9_680:not(#\9),
|
|
682
|
+
.awsui_content-display-no-match_tc96w_356y9_681:not(#\9) {
|
|
709
683
|
/* used in test-utils */
|
|
710
684
|
}
|
|
711
685
|
|
|
712
|
-
.awsui_content-display-
|
|
686
|
+
.awsui_content-display-title_tc96w_356y9_685:not(#\9) {
|
|
713
687
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
714
688
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
715
689
|
font-weight: var(--font-display-label-weight-815ja9, 700);
|
|
@@ -718,7 +692,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
718
692
|
margin-inline: 0;
|
|
719
693
|
}
|
|
720
694
|
|
|
721
|
-
.awsui_content-display-
|
|
695
|
+
.awsui_content-display-description_tc96w_356y9_694:not(#\9) {
|
|
722
696
|
color: var(--color-text-form-secondary-54emib, #656871);
|
|
723
697
|
font-size: var(--font-size-body-s-asqx2i, 12px);
|
|
724
698
|
line-height: var(--line-height-body-s-7zv1j5, 16px);
|
|
@@ -726,36 +700,36 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
726
700
|
margin-block-start: var(--space-scaled-xxxs-27y4hv, 2px);
|
|
727
701
|
}
|
|
728
702
|
|
|
729
|
-
.awsui_content-display-option-
|
|
703
|
+
.awsui_content-display-option-list_tc96w_356y9_702:not(#\9) {
|
|
730
704
|
position: relative;
|
|
731
705
|
list-style: none;
|
|
732
706
|
padding-block: 0;
|
|
733
707
|
padding-inline: 0;
|
|
734
708
|
}
|
|
735
709
|
|
|
736
|
-
.
|
|
737
|
-
.awsui_modal-
|
|
738
|
-
.awsui_trigger-
|
|
739
|
-
.awsui_cancel-
|
|
740
|
-
.awsui_confirm-
|
|
741
|
-
.
|
|
710
|
+
.awsui_root_tc96w_356y9_709:not(#\9),
|
|
711
|
+
.awsui_modal-root_tc96w_356y9_710:not(#\9),
|
|
712
|
+
.awsui_trigger-button_tc96w_356y9_711:not(#\9),
|
|
713
|
+
.awsui_cancel-button_tc96w_356y9_712:not(#\9),
|
|
714
|
+
.awsui_confirm-button_tc96w_356y9_713:not(#\9),
|
|
715
|
+
.awsui_custom_tc96w_356y9_714:not(#\9) {
|
|
742
716
|
/* used in test-utils */
|
|
743
717
|
}
|
|
744
718
|
|
|
745
|
-
.awsui_second-column-
|
|
719
|
+
.awsui_second-column-small_tc96w_356y9_718:not(#\9) {
|
|
746
720
|
padding-block-start: calc(2 * var(--space-scaled-l-0hpmd7, 20px));
|
|
747
721
|
}
|
|
748
722
|
|
|
749
|
-
.awsui_wrap-
|
|
750
|
-
.awsui_striped-
|
|
751
|
-
.awsui_content-
|
|
752
|
-
.awsui_page-
|
|
753
|
-
.awsui_page-size-form-
|
|
754
|
-
.awsui_page-size-radio-
|
|
755
|
-
.awsui_sticky-
|
|
756
|
-
.awsui_sticky-columns-form-
|
|
757
|
-
.awsui_sticky-columns-radio-
|
|
758
|
-
.awsui_sticky-columns-
|
|
759
|
-
.awsui_sticky-columns-
|
|
723
|
+
.awsui_wrap-lines_tc96w_356y9_722:not(#\9),
|
|
724
|
+
.awsui_striped-rows_tc96w_356y9_723:not(#\9),
|
|
725
|
+
.awsui_content-density_tc96w_356y9_724:not(#\9),
|
|
726
|
+
.awsui_page-size_tc96w_356y9_725:not(#\9),
|
|
727
|
+
.awsui_page-size-form-field_tc96w_356y9_726:not(#\9),
|
|
728
|
+
.awsui_page-size-radio-group_tc96w_356y9_727:not(#\9),
|
|
729
|
+
.awsui_sticky-columns_tc96w_356y9_728:not(#\9),
|
|
730
|
+
.awsui_sticky-columns-form-field_tc96w_356y9_729:not(#\9),
|
|
731
|
+
.awsui_sticky-columns-radio-group_tc96w_356y9_730:not(#\9),
|
|
732
|
+
.awsui_sticky-columns-first_tc96w_356y9_731:not(#\9),
|
|
733
|
+
.awsui_sticky-columns-last_tc96w_356y9_732:not(#\9) {
|
|
760
734
|
/* used in test-utils */
|
|
761
735
|
}
|