@cloudscape-design/components-themeable 3.0.836 → 3.0.837
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/internal/components/file-token-group/constants.scss +14 -0
- package/lib/internal/scss/internal/components/file-token-group/styles.scss +143 -0
- package/lib/internal/scss/internal/components/file-token-group/test-classes/styles.scss +12 -0
- package/lib/internal/scss/internal/components/token-list/styles.scss +13 -1
- package/lib/internal/scss/token-group/constants.scss +0 -1
- package/lib/internal/scss/token-group/mixins.scss +27 -0
- package/lib/internal/scss/token-group/styles.scss +2 -33
- package/lib/internal/template/file-upload/interfaces.d.ts +5 -0
- package/lib/internal/template/file-upload/interfaces.d.ts.map +1 -1
- package/lib/internal/template/file-upload/interfaces.js.map +1 -1
- package/lib/internal/template/file-upload/internal.d.ts.map +1 -1
- package/lib/internal/template/file-upload/internal.js +7 -13
- package/lib/internal/template/file-upload/internal.js.map +1 -1
- package/lib/internal/template/internal/components/file-token-group/default-formatters.d.ts.map +1 -0
- package/lib/internal/template/{file-upload → internal/components/file-token-group}/default-formatters.js +1 -1
- package/lib/internal/template/internal/components/file-token-group/default-formatters.js.map +1 -0
- package/lib/internal/template/internal/components/file-token-group/file-token.d.ts +32 -0
- package/lib/internal/template/internal/components/file-token-group/file-token.d.ts.map +1 -0
- package/lib/internal/template/internal/components/file-token-group/file-token.js +71 -0
- package/lib/internal/template/internal/components/file-token-group/file-token.js.map +1 -0
- package/lib/internal/template/internal/components/file-token-group/index.d.ts +8 -0
- package/lib/internal/template/internal/components/file-token-group/index.d.ts.map +1 -0
- package/lib/internal/template/internal/components/file-token-group/index.js +41 -0
- package/lib/internal/template/internal/components/file-token-group/index.js.map +1 -0
- package/lib/internal/template/internal/components/file-token-group/interfaces.d.ts +85 -0
- package/lib/internal/template/internal/components/file-token-group/interfaces.d.ts.map +1 -0
- package/lib/internal/template/internal/components/file-token-group/interfaces.js +2 -0
- package/lib/internal/template/internal/components/file-token-group/interfaces.js.map +1 -0
- package/lib/internal/template/internal/components/file-token-group/styles.css.js +27 -0
- package/lib/internal/template/internal/components/file-token-group/styles.scoped.css +375 -0
- package/lib/internal/template/internal/components/file-token-group/styles.selectors.js +28 -0
- package/lib/internal/template/internal/components/file-token-group/test-classes/styles.css.js +11 -0
- package/lib/internal/template/internal/components/file-token-group/test-classes/styles.scoped.css +12 -0
- package/lib/internal/template/internal/components/file-token-group/test-classes/styles.selectors.js +12 -0
- package/lib/internal/template/internal/components/file-token-group/thumbnail.d.ts.map +1 -0
- package/lib/internal/template/internal/components/file-token-group/thumbnail.js.map +1 -0
- package/lib/internal/template/internal/components/token-list/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/token-list/index.js +5 -1
- package/lib/internal/template/internal/components/token-list/index.js.map +1 -1
- package/lib/internal/template/internal/components/token-list/interfaces.d.ts +1 -1
- package/lib/internal/template/internal/components/token-list/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/token-list/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/token-list/styles.css.js +10 -9
- package/lib/internal/template/internal/components/token-list/styles.scoped.css +41 -21
- package/lib/internal/template/internal/components/token-list/styles.selectors.js +10 -9
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/test-utils/dom/file-upload/index.d.ts +1 -10
- package/lib/internal/template/test-utils/dom/file-upload/index.js +13 -36
- package/lib/internal/template/test-utils/dom/file-upload/index.js.map +1 -1
- package/lib/internal/template/test-utils/dom/internal/file-token-group.d.ts +21 -0
- package/lib/internal/template/test-utils/dom/internal/file-token-group.js +51 -0
- package/lib/internal/template/test-utils/dom/internal/file-token-group.js.map +1 -0
- package/lib/internal/template/test-utils/selectors/file-upload/index.d.ts +1 -10
- package/lib/internal/template/test-utils/selectors/file-upload/index.js +13 -36
- package/lib/internal/template/test-utils/selectors/file-upload/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/internal/file-token-group.d.ts +21 -0
- package/lib/internal/template/test-utils/selectors/internal/file-token-group.js +51 -0
- package/lib/internal/template/test-utils/selectors/internal/file-token-group.js.map +1 -0
- package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
- package/lib/internal/template/token-group/styles.css.js +8 -10
- package/lib/internal/template/token-group/styles.scoped.css +25 -38
- package/lib/internal/template/token-group/styles.selectors.js +8 -10
- package/lib/internal/template/token-group/token.d.ts +1 -5
- package/lib/internal/template/token-group/token.d.ts.map +1 -1
- package/lib/internal/template/token-group/token.js +4 -11
- package/lib/internal/template/token-group/token.js.map +1 -1
- package/package.json +1 -1
- package/lib/internal/scss/file-upload/file-option/styles.scss +0 -34
- package/lib/internal/template/file-upload/default-formatters.d.ts.map +0 -1
- package/lib/internal/template/file-upload/default-formatters.js.map +0 -1
- package/lib/internal/template/file-upload/file-option/index.d.ts +0 -10
- package/lib/internal/template/file-upload/file-option/index.d.ts.map +0 -1
- package/lib/internal/template/file-upload/file-option/index.js +0 -22
- package/lib/internal/template/file-upload/file-option/index.js.map +0 -1
- package/lib/internal/template/file-upload/file-option/styles.css.js +0 -12
- package/lib/internal/template/file-upload/file-option/styles.scoped.css +0 -35
- package/lib/internal/template/file-upload/file-option/styles.selectors.js +0 -13
- package/lib/internal/template/file-upload/file-option/thumbnail.d.ts.map +0 -1
- package/lib/internal/template/file-upload/file-option/thumbnail.js.map +0 -1
- /package/lib/internal/template/{file-upload → internal/components/file-token-group}/default-formatters.d.ts +0 -0
- /package/lib/internal/template/{file-upload/file-option → internal/components/file-token-group}/thumbnail.d.ts +0 -0
- /package/lib/internal/template/{file-upload/file-option → internal/components/file-token-group}/thumbnail.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-token.js","sourceRoot":"","sources":["../../../../../src/internal/components/file-token-group/file-token.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,MAAM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G,CACP,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport InternalBox from '../../../box/internal.js';\nimport { FormFieldError, FormFieldWarning } from '../../../form-field/internal';\nimport InternalSpaceBetween from '../../../space-between/internal.js';\nimport InternalSpinner from '../../../spinner/internal.js';\nimport DismissButton from '../../../token-group/dismiss-button';\nimport { TokenGroupProps } from '../../../token-group/interfaces.js';\nimport { BaseComponentProps } from '../../base-component/index.js';\nimport { useUniqueId } from '../../hooks/use-unique-id';\nimport Tooltip from '../tooltip/index';\nimport * as defaultFormatters from './default-formatters.js';\nimport { FileOptionThumbnail } from './thumbnail.js';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport namespace FileTokenProps {\n export interface I18nStrings {\n removeFileAriaLabel: (fileIndex: number) => string;\n errorIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n formatFileSize?: (sizeInBytes: number) => string;\n formatFileLastModified?: (date: Date) => string;\n }\n}\n\nexport interface FileTokenProps extends BaseComponentProps {\n file: File;\n onDismiss: () => void;\n showFileSize?: boolean;\n showFileLastModified?: boolean;\n showFileThumbnail?: boolean;\n errorText?: React.ReactNode;\n warningText?: React.ReactNode;\n loading?: boolean;\n readOnly?: boolean;\n i18nStrings: FileTokenProps.I18nStrings;\n dismissLabel?: string;\n alignment?: TokenGroupProps.Alignment;\n groupContainsImage?: boolean;\n isImage: boolean;\n index: number;\n}\n\nfunction InternalFileToken({\n file,\n showFileLastModified,\n showFileSize,\n showFileThumbnail,\n i18nStrings,\n onDismiss,\n errorText,\n warningText,\n readOnly,\n loading,\n alignment,\n groupContainsImage,\n isImage,\n index,\n}: FileTokenProps) {\n const formatFileSize = i18nStrings.formatFileSize ?? defaultFormatters.formatFileSize;\n const formatFileLastModified = i18nStrings.formatFileLastModified ?? defaultFormatters.formatFileLastModified;\n\n const errorId = useUniqueId('error');\n const warningId = useUniqueId('warning');\n\n const showWarning = warningText && !errorText;\n const containerRef = useRef<HTMLDivElement>(null);\n const fileNameRef = useRef<HTMLSpanElement>(null);\n const fileNameContainerRef = useRef<HTMLDivElement>(null);\n const [showTooltip, setShowTooltip] = useState(false);\n\n function isEllipsisActive() {\n const span = fileNameRef.current;\n const container = fileNameContainerRef.current;\n\n if (span && container) {\n return span.offsetWidth >= container.offsetWidth;\n }\n return false;\n }\n\n const fileIsSingleRow =\n !showFileLastModified && !showFileSize && (!groupContainsImage || (groupContainsImage && !showFileThumbnail));\n\n return (\n <div\n ref={containerRef}\n className={clsx(styles.token, {\n [styles['token-grid']]: alignment === 'horizontal',\n [styles['token-contains-image']]: groupContainsImage,\n })}\n role=\"group\"\n aria-label={file.name}\n aria-describedby={errorText ? errorId : warningText ? warningId : undefined}\n aria-disabled={loading}\n data-index={index}\n >\n <div\n className={clsx(styles['token-box'], {\n [styles.loading]: loading,\n [styles.error]: errorText,\n [styles.warning]: showWarning,\n [styles.horizontal]: alignment === 'horizontal',\n [styles['read-only']]: readOnly,\n })}\n >\n {loading && (\n <div\n className={clsx(styles['file-loading-overlay'], {\n [styles['file-loading-overlay-single-row']]: loading && fileIsSingleRow,\n })}\n >\n <InternalSpinner variant=\"disabled\" size=\"normal\" />\n </div>\n )}\n <InternalBox className={styles['file-option']}>\n {showFileThumbnail && isImage && <FileOptionThumbnail file={file} />}\n\n <div\n className={clsx(styles['file-option-metadata'], {\n [styles['with-image']]: showFileThumbnail && isImage,\n [styles['single-row-loading']]: loading && fileIsSingleRow,\n })}\n >\n <InternalSpaceBetween direction=\"vertical\" size=\"xxxs\">\n <div\n onMouseOver={() => setShowTooltip(true)}\n onMouseOut={() => setShowTooltip(false)}\n ref={fileNameContainerRef}\n >\n <InternalBox\n fontWeight=\"normal\"\n className={clsx(styles['file-option-name'], testUtilStyles['file-option-name'], {\n [testUtilStyles['ellipsis-active']]: isEllipsisActive(),\n })}\n >\n <span ref={fileNameRef}>{file.name}</span>\n </InternalBox>\n </div>\n\n {showFileSize && file.size ? (\n <InternalBox\n fontSize=\"body-s\"\n color={'text-body-secondary'}\n className={clsx(styles['file-option-size'], testUtilStyles['file-option-size'])}\n >\n {formatFileSize(file.size)}\n </InternalBox>\n ) : null}\n\n {showFileLastModified && file.lastModified ? (\n <InternalBox\n fontSize=\"body-s\"\n color={'text-body-secondary'}\n className={clsx(styles['file-option-last-modified'], testUtilStyles['file-option-last-modified'])}\n >\n {formatFileLastModified(new Date(file.lastModified))}\n </InternalBox>\n ) : null}\n </InternalSpaceBetween>\n </div>\n </InternalBox>\n {onDismiss && !readOnly && (\n <DismissButton dismissLabel={i18nStrings.removeFileAriaLabel(index)} onDismiss={onDismiss} />\n )}\n </div>\n {errorText && (\n <FormFieldError id={errorId} errorIconAriaLabel={i18nStrings.errorIconAriaLabel}>\n {errorText}\n </FormFieldError>\n )}\n {showWarning && (\n <FormFieldWarning id={warningId} warningIconAriaLabel={i18nStrings.warningIconAriaLabel}>\n {warningText}\n </FormFieldWarning>\n )}\n {showTooltip && isEllipsisActive() && (\n <Tooltip\n trackRef={containerRef}\n trackKey={file.name}\n value={<InternalBox fontWeight=\"normal\">{file.name}</InternalBox>}\n />\n )}\n </div>\n );\n}\n\nexport default InternalFileToken;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InternalBaseComponentProps } from '../../hooks/use-base-component/index.js';
|
|
3
|
+
import { FileTokenGroupProps } from './interfaces.js';
|
|
4
|
+
export { FileTokenGroupProps };
|
|
5
|
+
type InternalFileTokenGroupProps = FileTokenGroupProps & InternalBaseComponentProps;
|
|
6
|
+
declare function InternalFileTokenGroup({ items, showFileLastModified, showFileSize, showFileThumbnail, i18nStrings, onDismiss, limit, readOnly, alignment, __internalRootRef, ...restProps }: InternalFileTokenGroupProps): JSX.Element;
|
|
7
|
+
export default InternalFileTokenGroup;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/file-token-group/index.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAKrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAMtD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,KAAK,2BAA2B,GAAG,mBAAmB,GAAG,0BAA0B,CAAC;AAEpF,iBAAS,sBAAsB,CAAC,EAC9B,KAAK,EACL,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,KAAK,EACL,QAAQ,EACR,SAAsB,EACtB,iBAAiB,EACjB,GAAG,SAAS,EACb,EAAE,2BAA2B,eAqD7B;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { __rest } from "tslib";
|
|
4
|
+
import React, { useState } from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { getBaseProps } from '../../base-component/index.js';
|
|
7
|
+
import { fireNonCancelableEvent } from '../../events/index.js';
|
|
8
|
+
import { useListFocusController } from '../../hooks/use-list-focus-controller.js';
|
|
9
|
+
import { useMergeRefs } from '../../hooks/use-merge-refs/index.js';
|
|
10
|
+
import TokenList from '../token-list/index.js';
|
|
11
|
+
import InternalFileToken from './file-token.js';
|
|
12
|
+
import tokenListStyles from '../token-list/styles.css.js';
|
|
13
|
+
import styles from './styles.css.js';
|
|
14
|
+
import testStyles from './test-classes/styles.css.js';
|
|
15
|
+
function InternalFileTokenGroup(_a) {
|
|
16
|
+
var { items, showFileLastModified, showFileSize, showFileThumbnail, i18nStrings, onDismiss, limit, readOnly, alignment = 'vertical', __internalRootRef } = _a, restProps = __rest(_a, ["items", "showFileLastModified", "showFileSize", "showFileThumbnail", "i18nStrings", "onDismiss", "limit", "readOnly", "alignment", "__internalRootRef"]);
|
|
17
|
+
const baseProps = getBaseProps(restProps);
|
|
18
|
+
const [nextFocusIndex, setNextFocusIndex] = useState(null);
|
|
19
|
+
const tokenListRef = useListFocusController({
|
|
20
|
+
nextFocusIndex,
|
|
21
|
+
onFocusMoved: target => {
|
|
22
|
+
target.focus();
|
|
23
|
+
setNextFocusIndex(null);
|
|
24
|
+
},
|
|
25
|
+
listItemSelector: `.${tokenListStyles['list-item']}`,
|
|
26
|
+
showMoreSelector: `.${tokenListStyles.toggle}`,
|
|
27
|
+
});
|
|
28
|
+
const mergedRef = useMergeRefs(__internalRootRef, tokenListRef);
|
|
29
|
+
const isImage = (file) => file.type.startsWith('image/');
|
|
30
|
+
const groupContainsImage = items.filter(item => isImage(item.file)).length > 0;
|
|
31
|
+
return (React.createElement("div", Object.assign({}, baseProps, { ref: mergedRef, className: clsx(baseProps.className, styles.root, testStyles.root) }),
|
|
32
|
+
React.createElement(TokenList, { alignment: alignment === 'horizontal' ? 'horizontal-grid' : alignment, items: items, renderItem: (file, fileIndex) => (React.createElement(InternalFileToken, { file: file.file, showFileLastModified: showFileLastModified, showFileSize: showFileSize, showFileThumbnail: showFileThumbnail, onDismiss: () => {
|
|
33
|
+
fireNonCancelableEvent(onDismiss, { fileIndex });
|
|
34
|
+
setNextFocusIndex(fileIndex);
|
|
35
|
+
}, errorText: file.errorText, warningText: file.warningText, i18nStrings: i18nStrings, loading: file.loading, readOnly: readOnly, alignment: alignment, groupContainsImage: groupContainsImage, isImage: isImage(file.file), index: fileIndex })), limit: limit, i18nStrings: {
|
|
36
|
+
limitShowFewer: i18nStrings.limitShowFewer,
|
|
37
|
+
limitShowMore: i18nStrings.limitShowMore,
|
|
38
|
+
} })));
|
|
39
|
+
}
|
|
40
|
+
export default InternalFileTokenGroup;
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/file-token-group/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,iBAAiB,MAAM,iBAAiB,CAAC;AAGhD,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,UAAU,MAAM,8BAA8B,CAAC;AAMtD,SAAS,sBAAsB,CAAC,EAYF;QAZE,EAC9B,KAAK,EACL,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,KAAK,EACL,QAAQ,EACR,SAAS,GAAG,UAAU,EACtB,iBAAiB,OAEW,EADzB,SAAS,cAXkB,yJAY/B,CADa;IAEZ,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IAE1C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAC1E,MAAM,YAAY,GAAG,sBAAsB,CAAC;QAC1C,cAAc;QACd,YAAY,EAAE,MAAM,CAAC,EAAE;YACrB,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QACD,gBAAgB,EAAE,IAAI,e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EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAC3B,KAAK,EAAE,SAAS,GAChB,CACH,EACD,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE;gBACX,cAAc,EAAE,WAAW,CAAC,cAAc;gBAC1C,aAAa,EAAE,WAAW,CAAC,aAAa;aACzC,GACD,CACE,CACP,CAAC;AACJ,CAAC;AAED,eAAe,sBAAsB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useState } from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../../base-component/index.js';\nimport { fireNonCancelableEvent } from '../../events/index.js';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component/index.js';\nimport { useListFocusController } from '../../hooks/use-list-focus-controller.js';\nimport { useMergeRefs } from '../../hooks/use-merge-refs/index.js';\nimport TokenList from '../token-list/index.js';\nimport InternalFileToken from './file-token.js';\nimport { FileTokenGroupProps } from './interfaces.js';\n\nimport tokenListStyles from '../token-list/styles.css.js';\nimport styles from './styles.css.js';\nimport testStyles from './test-classes/styles.css.js';\n\nexport { FileTokenGroupProps };\n\ntype InternalFileTokenGroupProps = FileTokenGroupProps & InternalBaseComponentProps;\n\nfunction InternalFileTokenGroup({\n items,\n showFileLastModified,\n showFileSize,\n showFileThumbnail,\n i18nStrings,\n onDismiss,\n limit,\n readOnly,\n alignment = 'vertical',\n __internalRootRef,\n ...restProps\n}: InternalFileTokenGroupProps) {\n const baseProps = getBaseProps(restProps);\n\n const [nextFocusIndex, setNextFocusIndex] = useState<null | number>(null);\n const tokenListRef = useListFocusController({\n nextFocusIndex,\n onFocusMoved: target => {\n target.focus();\n setNextFocusIndex(null);\n },\n listItemSelector: `.${tokenListStyles['list-item']}`,\n showMoreSelector: `.${tokenListStyles.toggle}`,\n });\n\n const mergedRef = useMergeRefs(__internalRootRef, tokenListRef);\n\n const isImage = (file: File) => file.type.startsWith('image/');\n const groupContainsImage = items.filter(item => isImage(item.file)).length > 0;\n\n return (\n <div {...baseProps} ref={mergedRef} className={clsx(baseProps.className, styles.root, testStyles.root)}>\n <TokenList\n alignment={alignment === 'horizontal' ? 'horizontal-grid' : alignment}\n items={items}\n renderItem={(file, fileIndex) => (\n <InternalFileToken\n file={file.file}\n showFileLastModified={showFileLastModified}\n showFileSize={showFileSize}\n showFileThumbnail={showFileThumbnail}\n onDismiss={() => {\n fireNonCancelableEvent(onDismiss, { fileIndex });\n setNextFocusIndex(fileIndex);\n }}\n errorText={file.errorText}\n warningText={file.warningText}\n i18nStrings={i18nStrings}\n loading={file.loading}\n readOnly={readOnly}\n alignment={alignment}\n groupContainsImage={groupContainsImage}\n isImage={isImage(file.file)}\n index={fileIndex}\n />\n )}\n limit={limit}\n i18nStrings={{\n limitShowFewer: i18nStrings.limitShowFewer,\n limitShowMore: i18nStrings.limitShowMore,\n }}\n />\n </div>\n );\n}\n\nexport default InternalFileTokenGroup;\n"]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { BaseComponentProps } from '../../base-component';
|
|
2
|
+
import { NonCancelableEventHandler } from '../../events';
|
|
3
|
+
export interface FileTokenGroupProps extends BaseComponentProps {
|
|
4
|
+
/**
|
|
5
|
+
* Show file size in the token. Use `i18nStrings.formatFileSize` to customize it.
|
|
6
|
+
*/
|
|
7
|
+
showFileSize?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Show file last modified timestamp in the token. Use `i18nStrings.formatFileLastModified` to customize it.
|
|
10
|
+
*/
|
|
11
|
+
showFileLastModified?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Show file thumbnail in the token. Only supported for images.
|
|
14
|
+
*/
|
|
15
|
+
showFileThumbnail?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Called when the user clicks on the dismiss button. The token won't be automatically removed.
|
|
18
|
+
* Make sure that you add a listener to this event to update your application state.
|
|
19
|
+
*/
|
|
20
|
+
onDismiss: NonCancelableEventHandler<FileTokenGroupProps.DismissDetail>;
|
|
21
|
+
/**
|
|
22
|
+
* Specifies the maximum number of displayed tokens. If the property isn't set, all of the tokens are displayed.
|
|
23
|
+
*/
|
|
24
|
+
limit?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Specifies the direction in which tokens are aligned (`horizontal | vertical`).
|
|
27
|
+
*/
|
|
28
|
+
alignment?: FileTokenGroupProps.Alignment;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* An array of objects representing token items. Each token has the following properties:
|
|
32
|
+
*
|
|
33
|
+
* - `file` (string) - File value.
|
|
34
|
+
* - `loading` (boolean) - (Optional) Determine whether the token is loading.
|
|
35
|
+
* - `errorText` (string) - (Optional) Text that displays as a validation error message.
|
|
36
|
+
* - `warningText` (string) - (Optional) - Text that displays as a validation warning message.
|
|
37
|
+
*/
|
|
38
|
+
items: ReadonlyArray<FileTokenGroupProps.Item>;
|
|
39
|
+
/**
|
|
40
|
+
* Adds an `aria-label` to the "Show fewer" button.
|
|
41
|
+
* Use to assign unique labels when there are multiple file token groups with the same `limitShowFewer` label on one page.
|
|
42
|
+
*/
|
|
43
|
+
limitShowFewerAriaLabel?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Adds an `aria-label` to the "Show more" button.
|
|
46
|
+
* Use to assign unique labels when there are multiple file token groups with the same `limitShowMore` label on one page.
|
|
47
|
+
*/
|
|
48
|
+
limitShowMoreAriaLabel?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Specifies if the control is read-only, which prevents the
|
|
51
|
+
* user from modifying the value. A read-only control is still focusable.
|
|
52
|
+
*/
|
|
53
|
+
readOnly?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* An object containing all the localized strings required by the component:
|
|
56
|
+
* * `removeFileAriaLabel` (function): A function to render the ARIA label for file token remove button.
|
|
57
|
+
* * `errorIconAriaLabel` (string): The ARIA label to be shown on the error file icon.
|
|
58
|
+
* * `warningIconAriaLabel` (string): The ARIA label to be shown on the warning file icon.
|
|
59
|
+
* * `formatFileSize` (function): (Optional) A function that takes file size in bytes, and produces a formatted string.
|
|
60
|
+
* * `formatFileLastModified` (function): (Optional) A function that takes the files last modified date, and produces a formatted string.
|
|
61
|
+
*/
|
|
62
|
+
i18nStrings: FileTokenGroupProps.I18nStrings;
|
|
63
|
+
}
|
|
64
|
+
export declare namespace FileTokenGroupProps {
|
|
65
|
+
interface DismissDetail {
|
|
66
|
+
fileIndex: number;
|
|
67
|
+
}
|
|
68
|
+
interface I18nStrings {
|
|
69
|
+
limitShowFewer?: string;
|
|
70
|
+
limitShowMore?: string;
|
|
71
|
+
removeFileAriaLabel: (fileIndex: number) => string;
|
|
72
|
+
errorIconAriaLabel?: string;
|
|
73
|
+
warningIconAriaLabel?: string;
|
|
74
|
+
formatFileSize?: (sizeInBytes: number) => string;
|
|
75
|
+
formatFileLastModified?: (date: Date) => string;
|
|
76
|
+
}
|
|
77
|
+
type Alignment = 'horizontal' | 'vertical';
|
|
78
|
+
interface Item {
|
|
79
|
+
file: File;
|
|
80
|
+
loading?: boolean;
|
|
81
|
+
errorText?: null | string;
|
|
82
|
+
warningText?: null | string;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/file-token-group/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;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
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/file-token-group/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../../base-component';\nimport { NonCancelableEventHandler } from '../../events';\n\nexport interface FileTokenGroupProps extends BaseComponentProps {\n /**\n * Show file size in the token. Use `i18nStrings.formatFileSize` to customize it.\n */\n showFileSize?: boolean;\n\n /**\n * Show file last modified timestamp in the token. Use `i18nStrings.formatFileLastModified` to customize it.\n */\n showFileLastModified?: boolean;\n\n /**\n * Show file thumbnail in the token. Only supported for images.\n */\n showFileThumbnail?: boolean;\n /**\n * Called when the user clicks on the dismiss button. The token won't be automatically removed.\n * Make sure that you add a listener to this event to update your application state.\n */\n onDismiss: NonCancelableEventHandler<FileTokenGroupProps.DismissDetail>;\n\n /**\n * Specifies the maximum number of displayed tokens. If the property isn't set, all of the tokens are displayed.\n */\n limit?: number;\n /**\n * Specifies the direction in which tokens are aligned (`horizontal | vertical`).\n */\n alignment?: FileTokenGroupProps.Alignment;\n\n /**\n *\n * An array of objects representing token items. Each token has the following properties:\n *\n * - `file` (string) - File value.\n * - `loading` (boolean) - (Optional) Determine whether the token is loading.\n * - `errorText` (string) - (Optional) Text that displays as a validation error message.\n * - `warningText` (string) - (Optional) - Text that displays as a validation warning message.\n */\n items: ReadonlyArray<FileTokenGroupProps.Item>;\n /**\n * Adds an `aria-label` to the \"Show fewer\" button.\n * Use to assign unique labels when there are multiple file token groups with the same `limitShowFewer` label on one page.\n */\n limitShowFewerAriaLabel?: string;\n /**\n * Adds an `aria-label` to the \"Show more\" button.\n * Use to assign unique labels when there are multiple file token groups with the same `limitShowMore` label on one page.\n */\n limitShowMoreAriaLabel?: string;\n /**\n * Specifies if the control is read-only, which prevents the\n * user from modifying the value. A read-only control is still focusable.\n */\n readOnly?: boolean;\n /**\n * An object containing all the localized strings required by the component:\n * * `removeFileAriaLabel` (function): A function to render the ARIA label for file token remove button.\n * * `errorIconAriaLabel` (string): The ARIA label to be shown on the error file icon.\n * * `warningIconAriaLabel` (string): The ARIA label to be shown on the warning file icon.\n * * `formatFileSize` (function): (Optional) A function that takes file size in bytes, and produces a formatted string.\n * * `formatFileLastModified` (function): (Optional) A function that takes the files last modified date, and produces a formatted string.\n */\n i18nStrings: FileTokenGroupProps.I18nStrings;\n}\n\nexport namespace FileTokenGroupProps {\n export interface DismissDetail {\n fileIndex: number;\n }\n\n export interface I18nStrings {\n limitShowFewer?: string;\n limitShowMore?: string;\n\n removeFileAriaLabel: (fileIndex: number) => string;\n errorIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n formatFileSize?: (sizeInBytes: number) => string;\n formatFileLastModified?: (date: Date) => string;\n }\n\n export type Alignment = 'horizontal' | 'vertical';\n\n export interface Item {\n file: File;\n loading?: boolean;\n errorText?: null | string;\n warningText?: null | string;\n }\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
import './styles.scoped.css';
|
|
3
|
+
export default {
|
|
4
|
+
"root": "awsui_root_ofwwb_y71y3_205",
|
|
5
|
+
"file-loading-overlay": "awsui_file-loading-overlay_ofwwb_y71y3_240",
|
|
6
|
+
"file-loading-overlay-single-row": "awsui_file-loading-overlay-single-row_ofwwb_y71y3_245",
|
|
7
|
+
"file-option-name": "awsui_file-option-name_ofwwb_y71y3_249",
|
|
8
|
+
"file-option-size": "awsui_file-option-size_ofwwb_y71y3_250",
|
|
9
|
+
"file-option-last-modified": "awsui_file-option-last-modified_ofwwb_y71y3_251",
|
|
10
|
+
"file-option": "awsui_file-option_ofwwb_y71y3_249",
|
|
11
|
+
"file-option-thumbnail": "awsui_file-option-thumbnail_ofwwb_y71y3_264",
|
|
12
|
+
"file-option-thumbnail-image": "awsui_file-option-thumbnail-image_ofwwb_y71y3_268",
|
|
13
|
+
"file-option-metadata": "awsui_file-option-metadata_ofwwb_y71y3_281",
|
|
14
|
+
"with-image": "awsui_with-image_ofwwb_y71y3_284",
|
|
15
|
+
"single-row-loading": "awsui_single-row-loading_ofwwb_y71y3_287",
|
|
16
|
+
"token": "awsui_token_ofwwb_y71y3_291",
|
|
17
|
+
"token-grid": "awsui_token-grid_ofwwb_y71y3_298",
|
|
18
|
+
"token-contains-image": "awsui_token-contains-image_ofwwb_y71y3_307",
|
|
19
|
+
"token-box": "awsui_token-box_ofwwb_y71y3_311",
|
|
20
|
+
"horizontal": "awsui_horizontal_ofwwb_y71y3_330",
|
|
21
|
+
"error": "awsui_error_ofwwb_y71y3_338",
|
|
22
|
+
"dismiss-button": "awsui_dismiss-button_ofwwb_y71y3_342",
|
|
23
|
+
"warning": "awsui_warning_ofwwb_y71y3_348",
|
|
24
|
+
"read-only": "awsui_read-only_ofwwb_y71y3_358",
|
|
25
|
+
"loading": "awsui_loading_ofwwb_y71y3_371"
|
|
26
|
+
};
|
|
27
|
+
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
|
+
SPDX-License-Identifier: Apache-2.0
|
|
8
|
+
*/
|
|
9
|
+
/*
|
|
10
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
11
|
+
SPDX-License-Identifier: Apache-2.0
|
|
12
|
+
*/
|
|
13
|
+
/*
|
|
14
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
15
|
+
SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
*/
|
|
17
|
+
/*
|
|
18
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
19
|
+
SPDX-License-Identifier: Apache-2.0
|
|
20
|
+
*/
|
|
21
|
+
/*
|
|
22
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
23
|
+
SPDX-License-Identifier: Apache-2.0
|
|
24
|
+
*/
|
|
25
|
+
/*
|
|
26
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
27
|
+
SPDX-License-Identifier: Apache-2.0
|
|
28
|
+
*/
|
|
29
|
+
/*
|
|
30
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
31
|
+
SPDX-License-Identifier: Apache-2.0
|
|
32
|
+
*/
|
|
33
|
+
/*
|
|
34
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
35
|
+
SPDX-License-Identifier: Apache-2.0
|
|
36
|
+
*/
|
|
37
|
+
/*
|
|
38
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
39
|
+
SPDX-License-Identifier: Apache-2.0
|
|
40
|
+
*/
|
|
41
|
+
/*
|
|
42
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
43
|
+
SPDX-License-Identifier: Apache-2.0
|
|
44
|
+
*/
|
|
45
|
+
/*
|
|
46
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
47
|
+
SPDX-License-Identifier: Apache-2.0
|
|
48
|
+
*/
|
|
49
|
+
/*
|
|
50
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
51
|
+
SPDX-License-Identifier: Apache-2.0
|
|
52
|
+
*/
|
|
53
|
+
/*
|
|
54
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
55
|
+
SPDX-License-Identifier: Apache-2.0
|
|
56
|
+
*/
|
|
57
|
+
/*
|
|
58
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
59
|
+
SPDX-License-Identifier: Apache-2.0
|
|
60
|
+
*/
|
|
61
|
+
/*
|
|
62
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
63
|
+
SPDX-License-Identifier: Apache-2.0
|
|
64
|
+
*/
|
|
65
|
+
/*
|
|
66
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
67
|
+
SPDX-License-Identifier: Apache-2.0
|
|
68
|
+
*/
|
|
69
|
+
/*
|
|
70
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
71
|
+
SPDX-License-Identifier: Apache-2.0
|
|
72
|
+
*/
|
|
73
|
+
/*
|
|
74
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
75
|
+
SPDX-License-Identifier: Apache-2.0
|
|
76
|
+
*/
|
|
77
|
+
/*
|
|
78
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
79
|
+
SPDX-License-Identifier: Apache-2.0
|
|
80
|
+
*/
|
|
81
|
+
/*
|
|
82
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
83
|
+
SPDX-License-Identifier: Apache-2.0
|
|
84
|
+
*/
|
|
85
|
+
/*
|
|
86
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
87
|
+
SPDX-License-Identifier: Apache-2.0
|
|
88
|
+
*/
|
|
89
|
+
/*
|
|
90
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
|
+
SPDX-License-Identifier: Apache-2.0
|
|
92
|
+
*/
|
|
93
|
+
/*
|
|
94
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
|
+
SPDX-License-Identifier: Apache-2.0
|
|
96
|
+
*/
|
|
97
|
+
/*
|
|
98
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
99
|
+
SPDX-License-Identifier: Apache-2.0
|
|
100
|
+
*/
|
|
101
|
+
/*
|
|
102
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
103
|
+
SPDX-License-Identifier: Apache-2.0
|
|
104
|
+
*/
|
|
105
|
+
/*
|
|
106
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
107
|
+
SPDX-License-Identifier: Apache-2.0
|
|
108
|
+
*/
|
|
109
|
+
/*
|
|
110
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
111
|
+
SPDX-License-Identifier: Apache-2.0
|
|
112
|
+
*/
|
|
113
|
+
/*
|
|
114
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
115
|
+
SPDX-License-Identifier: Apache-2.0
|
|
116
|
+
*/
|
|
117
|
+
/*
|
|
118
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
119
|
+
SPDX-License-Identifier: Apache-2.0
|
|
120
|
+
*/
|
|
121
|
+
/*
|
|
122
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
123
|
+
SPDX-License-Identifier: Apache-2.0
|
|
124
|
+
*/
|
|
125
|
+
/*
|
|
126
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
127
|
+
SPDX-License-Identifier: Apache-2.0
|
|
128
|
+
*/
|
|
129
|
+
/*
|
|
130
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
131
|
+
SPDX-License-Identifier: Apache-2.0
|
|
132
|
+
*/
|
|
133
|
+
/*
|
|
134
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
135
|
+
SPDX-License-Identifier: Apache-2.0
|
|
136
|
+
*/
|
|
137
|
+
/*
|
|
138
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
139
|
+
SPDX-License-Identifier: Apache-2.0
|
|
140
|
+
*/
|
|
141
|
+
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
142
|
+
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
143
|
+
/*
|
|
144
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
145
|
+
SPDX-License-Identifier: Apache-2.0
|
|
146
|
+
*/
|
|
147
|
+
/*
|
|
148
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
149
|
+
SPDX-License-Identifier: Apache-2.0
|
|
150
|
+
*/
|
|
151
|
+
/*
|
|
152
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
153
|
+
SPDX-License-Identifier: Apache-2.0
|
|
154
|
+
*/
|
|
155
|
+
/*
|
|
156
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
157
|
+
SPDX-License-Identifier: Apache-2.0
|
|
158
|
+
*/
|
|
159
|
+
/*
|
|
160
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
161
|
+
SPDX-License-Identifier: Apache-2.0
|
|
162
|
+
*/
|
|
163
|
+
/*
|
|
164
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
165
|
+
SPDX-License-Identifier: Apache-2.0
|
|
166
|
+
*/
|
|
167
|
+
/*
|
|
168
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
169
|
+
SPDX-License-Identifier: Apache-2.0
|
|
170
|
+
*/
|
|
171
|
+
/*
|
|
172
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
173
|
+
SPDX-License-Identifier: Apache-2.0
|
|
174
|
+
*/
|
|
175
|
+
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
176
|
+
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
177
|
+
/*
|
|
178
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
179
|
+
SPDX-License-Identifier: Apache-2.0
|
|
180
|
+
*/
|
|
181
|
+
/*
|
|
182
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
183
|
+
SPDX-License-Identifier: Apache-2.0
|
|
184
|
+
*/
|
|
185
|
+
/*
|
|
186
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
187
|
+
SPDX-License-Identifier: Apache-2.0
|
|
188
|
+
*/
|
|
189
|
+
/*
|
|
190
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
191
|
+
SPDX-License-Identifier: Apache-2.0
|
|
192
|
+
*/
|
|
193
|
+
/*
|
|
194
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
195
|
+
SPDX-License-Identifier: Apache-2.0
|
|
196
|
+
*/
|
|
197
|
+
/*
|
|
198
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
199
|
+
SPDX-License-Identifier: Apache-2.0
|
|
200
|
+
*/
|
|
201
|
+
/*
|
|
202
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
203
|
+
SPDX-License-Identifier: Apache-2.0
|
|
204
|
+
*/
|
|
205
|
+
.awsui_root_ofwwb_y71y3_205:not(#\9) {
|
|
206
|
+
border-collapse: separate;
|
|
207
|
+
border-spacing: 0;
|
|
208
|
+
box-sizing: border-box;
|
|
209
|
+
caption-side: top;
|
|
210
|
+
cursor: auto;
|
|
211
|
+
direction: inherit;
|
|
212
|
+
empty-cells: show;
|
|
213
|
+
font-family: serif;
|
|
214
|
+
font-size: medium;
|
|
215
|
+
font-style: normal;
|
|
216
|
+
font-variant: normal;
|
|
217
|
+
font-weight: 400;
|
|
218
|
+
font-stretch: normal;
|
|
219
|
+
line-height: normal;
|
|
220
|
+
-webkit-hyphens: none;
|
|
221
|
+
hyphens: none;
|
|
222
|
+
letter-spacing: normal;
|
|
223
|
+
list-style: disc outside none;
|
|
224
|
+
tab-size: 8;
|
|
225
|
+
text-align: start;
|
|
226
|
+
text-indent: 0;
|
|
227
|
+
text-shadow: none;
|
|
228
|
+
text-transform: none;
|
|
229
|
+
visibility: visible;
|
|
230
|
+
white-space: normal;
|
|
231
|
+
word-spacing: normal;
|
|
232
|
+
font-size: var(--font-size-body-m-6wxxs5, 14px);
|
|
233
|
+
line-height: var(--line-height-body-m-gw0130, 22px);
|
|
234
|
+
color: var(--color-text-body-default-agk00h, #16191f);
|
|
235
|
+
font-weight: 400;
|
|
236
|
+
font-family: var(--font-family-base-pxn2ad, "Noto Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
237
|
+
-webkit-font-smoothing: auto;
|
|
238
|
+
-moz-osx-font-smoothing: auto;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.awsui_file-loading-overlay_ofwwb_y71y3_240:not(#\9) {
|
|
242
|
+
position: absolute;
|
|
243
|
+
inset-inline-end: var(--space-static-xs-fwcjew, 8px);
|
|
244
|
+
inset-block-end: var(--space-static-xxs-9qxzo2, 4px);
|
|
245
|
+
}
|
|
246
|
+
.awsui_file-loading-overlay-single-row_ofwwb_y71y3_245:not(#\9) {
|
|
247
|
+
inset-inline-end: var(--space-static-xxl-ybu58c, 32px);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.awsui_file-option-name_ofwwb_y71y3_249:not(#\9),
|
|
251
|
+
.awsui_file-option-size_ofwwb_y71y3_250:not(#\9),
|
|
252
|
+
.awsui_file-option-last-modified_ofwwb_y71y3_251:not(#\9) {
|
|
253
|
+
text-overflow: ellipsis;
|
|
254
|
+
overflow: hidden;
|
|
255
|
+
white-space: nowrap;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.awsui_file-option_ofwwb_y71y3_249:not(#\9) {
|
|
259
|
+
inline-size: 100%;
|
|
260
|
+
min-inline-size: 0;
|
|
261
|
+
display: flex;
|
|
262
|
+
gap: var(--space-scaled-xs-t3am3w, 8px);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.awsui_file-option-thumbnail_ofwwb_y71y3_264:not(#\9) {
|
|
266
|
+
margin-block-start: var(--space-static-xxs-9qxzo2, 4px);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.awsui_file-option-thumbnail-image_ofwwb_y71y3_268:not(#\9) {
|
|
270
|
+
font-size: var(--font-size-body-s-4dzx5q, 12px);
|
|
271
|
+
line-height: var(--line-height-body-s-egzl4q, 16px);
|
|
272
|
+
letter-spacing: var(--letter-spacing-body-s-cbaxyl, normal);
|
|
273
|
+
inline-size: 48px;
|
|
274
|
+
block-size: 48px;
|
|
275
|
+
object-fit: cover;
|
|
276
|
+
display: -webkit-box;
|
|
277
|
+
-webkit-line-clamp: 3;
|
|
278
|
+
-webkit-box-orient: vertical;
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.awsui_file-option-metadata_ofwwb_y71y3_281:not(#\9) {
|
|
283
|
+
inline-size: 100%;
|
|
284
|
+
}
|
|
285
|
+
.awsui_file-option-metadata_ofwwb_y71y3_281.awsui_with-image_ofwwb_y71y3_284:not(#\9) {
|
|
286
|
+
inline-size: calc(100% - 48px);
|
|
287
|
+
}
|
|
288
|
+
.awsui_file-option-metadata_ofwwb_y71y3_281.awsui_single-row-loading_ofwwb_y71y3_287:not(#\9) {
|
|
289
|
+
inline-size: calc(100% - var(--size-icon-normal-19036g, 16px));
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.awsui_token_ofwwb_y71y3_291:not(#\9) {
|
|
293
|
+
position: relative;
|
|
294
|
+
block-size: 100%;
|
|
295
|
+
display: flex;
|
|
296
|
+
flex-direction: column;
|
|
297
|
+
gap: var(--space-xxs-y2432o, 4px);
|
|
298
|
+
}
|
|
299
|
+
.awsui_token-grid_ofwwb_y71y3_298:not(#\9) {
|
|
300
|
+
display: grid;
|
|
301
|
+
grid-template-rows: max-content auto;
|
|
302
|
+
}
|
|
303
|
+
@media (max-width: 688px) {
|
|
304
|
+
.awsui_token-grid_ofwwb_y71y3_298:not(#\9) {
|
|
305
|
+
display: flex;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
.awsui_token-contains-image_ofwwb_y71y3_307:not(#\9) {
|
|
309
|
+
grid-template-rows: 68px auto;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.awsui_token-box_ofwwb_y71y3_311:not(#\9) {
|
|
313
|
+
position: relative;
|
|
314
|
+
block-size: 100%;
|
|
315
|
+
border-block: var(--border-field-width-fjuzc5, 1px) solid var(--color-border-item-selected-aam4fo, #0073bb);
|
|
316
|
+
border-inline: var(--border-field-width-fjuzc5, 1px) solid var(--color-border-item-selected-aam4fo, #0073bb);
|
|
317
|
+
padding-block-start: var(--space-scaled-xxs-krq5fq, 4px);
|
|
318
|
+
padding-block-end: var(--space-scaled-xxs-krq5fq, 4px);
|
|
319
|
+
padding-inline-start: var(--space-field-horizontal-cxdor9, 8px);
|
|
320
|
+
padding-inline-end: var(--space-xxs-y2432o, 4px);
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: flex-start;
|
|
323
|
+
background: var(--color-background-item-selected-ln25al, #f1faff);
|
|
324
|
+
border-start-start-radius: var(--border-radius-token-m43vgu, 2px);
|
|
325
|
+
border-start-end-radius: var(--border-radius-token-m43vgu, 2px);
|
|
326
|
+
border-end-start-radius: var(--border-radius-token-m43vgu, 2px);
|
|
327
|
+
border-end-end-radius: var(--border-radius-token-m43vgu, 2px);
|
|
328
|
+
color: var(--color-text-body-default-agk00h, #16191f);
|
|
329
|
+
box-sizing: border-box;
|
|
330
|
+
}
|
|
331
|
+
.awsui_token-box_ofwwb_y71y3_311.awsui_horizontal_ofwwb_y71y3_330:not(#\9) {
|
|
332
|
+
max-inline-size: 230px;
|
|
333
|
+
}
|
|
334
|
+
@media (max-width: 688px) {
|
|
335
|
+
.awsui_token-box_ofwwb_y71y3_311.awsui_horizontal_ofwwb_y71y3_330:not(#\9) {
|
|
336
|
+
max-inline-size: 100%;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
.awsui_token-box_ofwwb_y71y3_311.awsui_error_ofwwb_y71y3_338:not(#\9) {
|
|
340
|
+
border-color: var(--color-border-status-error-5n723o, #d13212);
|
|
341
|
+
border-inline-start-width: var(--border-invalid-width-bkxihb, 4px);
|
|
342
|
+
}
|
|
343
|
+
.awsui_token-box_ofwwb_y71y3_311.awsui_error_ofwwb_y71y3_338 > .awsui_dismiss-button_ofwwb_y71y3_342:not(#\9) {
|
|
344
|
+
color: var(--color-text-interactive-default-t1snbz, #545b64);
|
|
345
|
+
}
|
|
346
|
+
.awsui_token-box_ofwwb_y71y3_311.awsui_error_ofwwb_y71y3_338 > .awsui_dismiss-button_ofwwb_y71y3_342:not(#\9):hover {
|
|
347
|
+
color: var(--color-text-interactive-hover-kxltdh, #16191f);
|
|
348
|
+
}
|
|
349
|
+
.awsui_token-box_ofwwb_y71y3_311.awsui_warning_ofwwb_y71y3_348:not(#\9) {
|
|
350
|
+
border-color: var(--color-border-status-warning-wkps52, #906806);
|
|
351
|
+
border-inline-start-width: var(--border-invalid-width-bkxihb, 4px);
|
|
352
|
+
}
|
|
353
|
+
.awsui_token-box_ofwwb_y71y3_311.awsui_warning_ofwwb_y71y3_348 > .awsui_dismiss-button_ofwwb_y71y3_342:not(#\9) {
|
|
354
|
+
color: var(--color-text-interactive-default-t1snbz, #545b64);
|
|
355
|
+
}
|
|
356
|
+
.awsui_token-box_ofwwb_y71y3_311.awsui_warning_ofwwb_y71y3_348 > .awsui_dismiss-button_ofwwb_y71y3_342:not(#\9):hover {
|
|
357
|
+
color: var(--color-text-interactive-hover-kxltdh, #16191f);
|
|
358
|
+
}
|
|
359
|
+
.awsui_token-box_ofwwb_y71y3_311.awsui_read-only_ofwwb_y71y3_358:not(#\9) {
|
|
360
|
+
border-color: var(--color-border-input-disabled-vjmitr, #eaeded);
|
|
361
|
+
background-color: var(--color-background-container-content-myy7cn, #ffffff);
|
|
362
|
+
pointer-events: none;
|
|
363
|
+
}
|
|
364
|
+
.awsui_token-box_ofwwb_y71y3_311.awsui_read-only_ofwwb_y71y3_358 > .awsui_dismiss-button_ofwwb_y71y3_342:not(#\9) {
|
|
365
|
+
color: var(--color-text-button-inline-icon-disabled-pdpnjk, #aab7b8);
|
|
366
|
+
}
|
|
367
|
+
.awsui_token-box_ofwwb_y71y3_311.awsui_read-only_ofwwb_y71y3_358 > .awsui_dismiss-button_ofwwb_y71y3_342:not(#\9):hover {
|
|
368
|
+
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
369
|
+
cursor: initial;
|
|
370
|
+
color: var(--color-text-button-inline-icon-disabled-pdpnjk, #aab7b8);
|
|
371
|
+
}
|
|
372
|
+
.awsui_token-box_ofwwb_y71y3_311.awsui_loading_ofwwb_y71y3_371:not(#\9) {
|
|
373
|
+
border-color: var(--color-border-control-disabled-7jgofv, #d5dbdb);
|
|
374
|
+
background-color: var(--color-background-container-content-myy7cn, #ffffff);
|
|
375
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
// es-module interop with Babel and Typescript
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
module.exports.default = {
|
|
5
|
+
"root": "awsui_root_ofwwb_y71y3_205",
|
|
6
|
+
"file-loading-overlay": "awsui_file-loading-overlay_ofwwb_y71y3_240",
|
|
7
|
+
"file-loading-overlay-single-row": "awsui_file-loading-overlay-single-row_ofwwb_y71y3_245",
|
|
8
|
+
"file-option-name": "awsui_file-option-name_ofwwb_y71y3_249",
|
|
9
|
+
"file-option-size": "awsui_file-option-size_ofwwb_y71y3_250",
|
|
10
|
+
"file-option-last-modified": "awsui_file-option-last-modified_ofwwb_y71y3_251",
|
|
11
|
+
"file-option": "awsui_file-option_ofwwb_y71y3_249",
|
|
12
|
+
"file-option-thumbnail": "awsui_file-option-thumbnail_ofwwb_y71y3_264",
|
|
13
|
+
"file-option-thumbnail-image": "awsui_file-option-thumbnail-image_ofwwb_y71y3_268",
|
|
14
|
+
"file-option-metadata": "awsui_file-option-metadata_ofwwb_y71y3_281",
|
|
15
|
+
"with-image": "awsui_with-image_ofwwb_y71y3_284",
|
|
16
|
+
"single-row-loading": "awsui_single-row-loading_ofwwb_y71y3_287",
|
|
17
|
+
"token": "awsui_token_ofwwb_y71y3_291",
|
|
18
|
+
"token-grid": "awsui_token-grid_ofwwb_y71y3_298",
|
|
19
|
+
"token-contains-image": "awsui_token-contains-image_ofwwb_y71y3_307",
|
|
20
|
+
"token-box": "awsui_token-box_ofwwb_y71y3_311",
|
|
21
|
+
"horizontal": "awsui_horizontal_ofwwb_y71y3_330",
|
|
22
|
+
"error": "awsui_error_ofwwb_y71y3_338",
|
|
23
|
+
"dismiss-button": "awsui_dismiss-button_ofwwb_y71y3_342",
|
|
24
|
+
"warning": "awsui_warning_ofwwb_y71y3_348",
|
|
25
|
+
"read-only": "awsui_read-only_ofwwb_y71y3_358",
|
|
26
|
+
"loading": "awsui_loading_ofwwb_y71y3_371"
|
|
27
|
+
};
|
|
28
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import './styles.scoped.css';
|
|
3
|
+
export default {
|
|
4
|
+
"root": "awsui_root_9f1dn_6ggi7_5",
|
|
5
|
+
"file-option-thumbnail": "awsui_file-option-thumbnail_9f1dn_6ggi7_6",
|
|
6
|
+
"file-option-name": "awsui_file-option-name_9f1dn_6ggi7_7",
|
|
7
|
+
"file-option-size": "awsui_file-option-size_9f1dn_6ggi7_8",
|
|
8
|
+
"file-option-last-modified": "awsui_file-option-last-modified_9f1dn_6ggi7_9",
|
|
9
|
+
"ellipsis-active": "awsui_ellipsis-active_9f1dn_6ggi7_10"
|
|
10
|
+
};
|
|
11
|
+
|
package/lib/internal/template/internal/components/file-token-group/test-classes/styles.scoped.css
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
.awsui_root_9f1dn_6ggi7_5:not(#\9),
|
|
6
|
+
.awsui_file-option-thumbnail_9f1dn_6ggi7_6:not(#\9),
|
|
7
|
+
.awsui_file-option-name_9f1dn_6ggi7_7:not(#\9),
|
|
8
|
+
.awsui_file-option-size_9f1dn_6ggi7_8:not(#\9),
|
|
9
|
+
.awsui_file-option-last-modified_9f1dn_6ggi7_9:not(#\9),
|
|
10
|
+
.awsui_ellipsis-active_9f1dn_6ggi7_10:not(#\9) {
|
|
11
|
+
/* used in test-utils */
|
|
12
|
+
}
|