@cloudscape-design/components 3.0.633 → 3.0.635
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/app-layout/split-panel/styles.css.js +2 -2
- package/app-layout/split-panel/styles.scoped.css +3 -2
- package/app-layout/split-panel/styles.selectors.js +2 -2
- package/cards/index.d.ts.map +1 -1
- package/cards/index.js +6 -6
- package/cards/index.js.map +1 -1
- package/cards/interfaces.d.ts +1 -1
- package/cards/interfaces.js.map +1 -1
- package/form-field/internal.js +1 -1
- package/form-field/internal.js.map +1 -1
- package/form-field/styles.css.js +24 -23
- package/form-field/styles.scoped.css +40 -37
- package/form-field/styles.selectors.js +24 -23
- package/internal/direction.d.ts +1 -1
- package/internal/direction.d.ts.map +1 -1
- package/internal/direction.js +3 -0
- package/internal/direction.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/mixed-line-bar-chart/bar-series.d.ts +2 -1
- package/mixed-line-bar-chart/bar-series.d.ts.map +1 -1
- package/mixed-line-bar-chart/bar-series.js +6 -3
- package/mixed-line-bar-chart/bar-series.js.map +1 -1
- package/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
- package/mixed-line-bar-chart/chart-container.js +3 -3
- package/mixed-line-bar-chart/chart-container.js.map +1 -1
- package/mixed-line-bar-chart/data-series.d.ts +2 -1
- package/mixed-line-bar-chart/data-series.d.ts.map +1 -1
- package/mixed-line-bar-chart/data-series.js +2 -2
- package/mixed-line-bar-chart/data-series.js.map +1 -1
- package/package.json +1 -1
- package/progress-bar/index.d.ts.map +1 -1
- package/progress-bar/index.js +1 -1
- package/progress-bar/index.js.map +1 -1
- package/progress-bar/internal.d.ts +2 -1
- package/progress-bar/internal.d.ts.map +1 -1
- package/progress-bar/internal.js +2 -2
- package/progress-bar/internal.js.map +1 -1
- package/progress-bar/styles.css.js +19 -18
- package/progress-bar/styles.scoped.css +36 -32
- package/progress-bar/styles.selectors.js +19 -18
- package/property-filter/index.d.ts.map +1 -1
- package/property-filter/index.js +8 -2
- package/property-filter/index.js.map +1 -1
- package/property-filter/interfaces.d.ts +5 -0
- package/property-filter/interfaces.d.ts.map +1 -1
- package/property-filter/interfaces.js.map +1 -1
- package/property-filter/styles.css.js +32 -31
- package/property-filter/styles.scoped.css +41 -33
- package/property-filter/styles.selectors.js +32 -31
- package/table/interfaces.d.ts +13 -11
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +9 -4
- package/table/internal.js.map +1 -1
- package/table/selection/interfaces.d.ts +1 -0
- package/table/selection/interfaces.d.ts.map +1 -1
- package/table/selection/interfaces.js.map +1 -1
- package/table/selection/use-selection.d.ts +5 -4
- package/table/selection/use-selection.d.ts.map +1 -1
- package/table/selection/use-selection.js +55 -36
- package/table/selection/use-selection.js.map +1 -1
- package/table/thead.d.ts +1 -1
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +1 -1
- package/table/thead.js.map +1 -1
- package/test-utils/dom/progress-bar/index.d.ts +1 -0
- package/test-utils/dom/progress-bar/index.js +3 -0
- package/test-utils/dom/progress-bar/index.js.map +1 -1
- package/test-utils/dom/property-filter/index.d.ts +4 -0
- package/test-utils/dom/property-filter/index.js +6 -0
- package/test-utils/dom/property-filter/index.js.map +1 -1
- package/test-utils/selectors/progress-bar/index.d.ts +1 -0
- package/test-utils/selectors/progress-bar/index.js +3 -0
- package/test-utils/selectors/progress-bar/index.js.map +1 -1
- package/test-utils/selectors/property-filter/index.d.ts +4 -0
- package/test-utils/selectors/property-filter/index.js +6 -0
- package/test-utils/selectors/property-filter/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/progress-bar/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,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AAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,EAAE;oBACZ,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;gBAC9C,CAAC,GACD,CACH,CACG,CACF;QACL,cAAc,IAAI,CACjB,oBAAC,SAAS,IAAC,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,IACtF,cAAc,CACL,CACb,CACG,CACP,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\nimport { getBaseProps } from '../internal/base-component';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { ProgressBarProps } from './interfaces';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { Progress, ResultState, SmallText } from './internal';\nimport { joinStrings } from '../internal/utils/strings';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { throttle } from '../internal/utils/throttle';\nimport LiveRegion from '../internal/components/live-region';\n\nconst ASSERTION_FREQUENCY = 5000; // interval in ms between progress announcements\n\nexport { ProgressBarProps };\n\nexport default function ProgressBar({\n value = 0,\n status = 'in-progress',\n variant = 'standalone',\n resultButtonText,\n label,\n ariaLabel,\n ariaLabelledby,\n description,\n additionalInfo,\n resultText,\n onResultButtonClick,\n ...rest\n}: ProgressBarProps) {\n const { __internalRootRef } = useBaseComponent('ProgressBar', {\n props: { variant },\n });\n const baseProps = getBaseProps(rest);\n const generatedName = useUniqueId('awsui-progress-bar-');\n\n const labelId = `${generatedName}-label`;\n const isInFlash = variant === 'flash';\n const isInProgressState = status === 'in-progress';\n\n const [announcedValue, setAnnouncedValue] = useState('');\n const throttledAssertion = useMemo(() => {\n return throttle((value: ProgressBarProps['value']) => {\n setAnnouncedValue(`${value}%`);\n }, ASSERTION_FREQUENCY);\n }, []);\n\n useEffect(() => {\n throttledAssertion(value);\n }, [throttledAssertion, value]);\n\n if (isInFlash && resultButtonText) {\n warnOnce(\n 'ProgressBar',\n 'The `resultButtonText` is ignored if you set `variant=\"flash\"`, and the result button is not displayed. Use the `buttonText` property and the `onButtonClick` event listener of the flashbar item in which the progress bar component is embedded.'\n );\n }\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.root, variant && styles[variant])}\n ref={__internalRootRef}\n >\n <div className={isInFlash ? styles['flash-container'] : undefined}>\n <div className={clsx(styles['word-wrap'], styles[`label-${variant}`])} id={labelId}>\n {label}\n </div>\n {description && <SmallText color={isInFlash ? 'inherit' : undefined}>{description}</SmallText>}\n <div>\n {isInProgressState ? (\n <>\n <Progress\n value={value}\n ariaLabel={ariaLabel}\n ariaLabelledby={joinStrings(labelId, ariaLabelledby)}\n isInFlash={isInFlash}\n />\n <LiveRegion delay={0}>\n {label}\n {label ? ': ' : null}\n {announcedValue}\n </LiveRegion>\n </>\n ) : (\n <ResultState\n resultText={resultText}\n isInFlash={isInFlash}\n resultButtonText={resultButtonText}\n status={status}\n onClick={() => {\n fireNonCancelableEvent(onResultButtonClick);\n }}\n />\n )}\n </div>\n </div>\n {additionalInfo && (\n <SmallText className={styles['additional-info']} color={isInFlash ? 'inherit' : undefined}>\n {additionalInfo}\n </SmallText>\n )}\n </div>\n );\n}\n\napplyDisplayName(ProgressBar, 'ProgressBar');\n"]}
|
|
@@ -11,8 +11,9 @@ export declare const Progress: ({ value, isInFlash, ariaLabel, ariaLabelledby }:
|
|
|
11
11
|
interface SmallTextProps {
|
|
12
12
|
color?: BoxProps.Color;
|
|
13
13
|
children: React.ReactNode;
|
|
14
|
+
className?: string;
|
|
14
15
|
}
|
|
15
|
-
export declare const SmallText: ({ color, children }: SmallTextProps) => JSX.Element;
|
|
16
|
+
export declare const SmallText: ({ color, children, className }: SmallTextProps) => JSX.Element;
|
|
16
17
|
interface ResultStateProps {
|
|
17
18
|
isInFlash: boolean;
|
|
18
19
|
resultText: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/progress-bar/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAM7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAShD,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AACD,eAAO,MAAM,QAAQ,oDAAqD,aAAa,gBAyBtF,CAAC;AAEF,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/progress-bar/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAM7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAShD,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AACD,eAAO,MAAM,QAAQ,oDAAqD,aAAa,gBAyBtF,CAAC;AAEF,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,mCAAoC,cAAc,gBAMvE,CAAC;AAYF,UAAU,gBAAgB;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAChC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,iEAAkE,gBAAgB,gBAqBzG,CAAC"}
|
package/progress-bar/internal.js
CHANGED
|
@@ -18,8 +18,8 @@ export const Progress = ({ value, isInFlash, ariaLabel, ariaLabelledby }) => {
|
|
|
18
18
|
React.createElement("span", { "aria-hidden": "true", className: styles['percentage-container'] },
|
|
19
19
|
React.createElement(InternalBox, { className: styles.percentage, variant: "small", color: isInFlash ? 'inherit' : undefined }, `${progressValue}%`))));
|
|
20
20
|
};
|
|
21
|
-
export const SmallText = ({ color, children }) => {
|
|
22
|
-
return (React.createElement(InternalBox, { className: styles['word-wrap'], variant: "small", display: "block", color: color }, children));
|
|
21
|
+
export const SmallText = ({ color, children, className }) => {
|
|
22
|
+
return (React.createElement(InternalBox, { className: clsx(styles['word-wrap'], className), variant: "small", display: "block", color: color }, children));
|
|
23
23
|
};
|
|
24
24
|
const ResultButton = ({ onClick, children }) => {
|
|
25
25
|
return (React.createElement("div", { className: styles['result-button'] },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/progress-bar/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,cAA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O,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,oBAAoB,MAAM,EAAE,CAAC,eAAY,QAAQ,iBAAa,MAAM;QACzF,8BAAM,SAAS,EAAE,IAAI,CAAC,eAAe,IAAI,MAAM,CAAC,oBAAoB,CAAC,CAAC;YACpE,oBAAC,uBAAuB,IAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;gBACvE,8BAAM,SAAS,EAAE,MAAM,CAAC,aAAa,CAAC,IAAG,UAAU,CAAQ,CACnC,CACrB;QACN,eAAe,IAAI,oBAAC,YAAY,IAAC,OAAO,EAAE,OAAO,IAAG,gBAAgB,CAAgB,CACjF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport { BoxProps } from '../box/interfaces';\nimport InternalBox from '../box/internal';\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton } from '../button/internal';\nimport InternalStatusIndicator from '../status-indicator/internal';\n\nimport { ProgressBarProps } from './interfaces';\nimport styles from './styles.css.js';\n\nconst MAX_VALUE = 100;\n\nconst clamp = (value: number, lowerLimit: number, upperLimit: number) => {\n return Math.max(Math.min(value, upperLimit), lowerLimit);\n};\n\ninterface ProgressProps {\n value: number;\n isInFlash: boolean;\n ariaLabel?: string;\n ariaLabelledby?: string;\n}\nexport const Progress = ({ value, isInFlash, ariaLabel, ariaLabelledby }: ProgressProps) => {\n const roundedValue = Math.round(value);\n const progressValue = clamp(roundedValue, 0, MAX_VALUE);\n\n return (\n <div className={styles['progress-container']}>\n <progress\n className={clsx(\n styles.progress,\n progressValue >= MAX_VALUE && styles.complete,\n isInFlash && styles['progress-in-flash']\n )}\n max={MAX_VALUE}\n value={progressValue}\n aria-label={ariaLabel}\n // Ensures aria-label takes precedence over aria-labelledby\n aria-labelledby={!ariaLabel ? ariaLabelledby : undefined}\n />\n <span aria-hidden=\"true\" className={styles['percentage-container']}>\n <InternalBox className={styles.percentage} variant=\"small\" color={isInFlash ? 'inherit' : undefined}>\n {`${progressValue}%`}\n </InternalBox>\n </span>\n </div>\n );\n};\n\ninterface SmallTextProps {\n color?: BoxProps.Color;\n children: React.ReactNode;\n className?: string;\n}\n\nexport const SmallText = ({ color, children, className }: SmallTextProps) => {\n return (\n <InternalBox className={clsx(styles['word-wrap'], className)} variant=\"small\" display=\"block\" color={color}>\n {children}\n </InternalBox>\n );\n};\n\nconst ResultButton = ({ onClick, children }: ButtonProps) => {\n return (\n <div className={styles['result-button']}>\n <InternalButton formAction=\"none\" onClick={onClick}>\n {children}\n </InternalButton>\n </div>\n );\n};\n\ninterface ResultStateProps {\n isInFlash: boolean;\n resultText: React.ReactNode;\n resultButtonText?: string;\n status: ProgressBarProps.Status;\n onClick: () => void;\n}\n\nexport const ResultState = ({ isInFlash, resultText, resultButtonText, status, onClick }: ResultStateProps) => {\n const hasResultButton = !!resultButtonText;\n\n if (isInFlash) {\n return (\n <div className={styles[`result-container-${status}`]} aria-live=\"polite\" aria-atomic=\"true\">\n <span className={styles['result-text']}>{resultText}</span>\n </div>\n );\n }\n\n return (\n <div className={styles[`result-container-${status}`]} aria-live=\"polite\" aria-atomic=\"true\">\n <span className={clsx(hasResultButton && styles['with-result-button'])}>\n <InternalStatusIndicator type={status === 'success' ? 'success' : 'error'}>\n <span className={styles['result-text']}>{resultText}</span>\n </InternalStatusIndicator>\n </span>\n {hasResultButton && <ResultButton onClick={onClick}>{resultButtonText}</ResultButton>}\n </div>\n );\n};\n"]}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"progress": "
|
|
5
|
-
"result-state": "awsui_result-
|
|
6
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
7
|
-
"root": "
|
|
8
|
-
"with-result-button": "awsui_with-result-
|
|
9
|
-
"result-text": "awsui_result-
|
|
10
|
-
"result-container-error": "awsui_result-container-
|
|
11
|
-
"result-container-success": "awsui_result-container-
|
|
12
|
-
"result-button": "awsui_result-
|
|
13
|
-
"word-wrap": "awsui_word-
|
|
14
|
-
"label-flash": "awsui_label-
|
|
15
|
-
"label-key-value": "awsui_label-key-
|
|
16
|
-
"flash": "
|
|
17
|
-
"progress-container": "awsui_progress-
|
|
18
|
-
"percentage-container": "awsui_percentage-
|
|
19
|
-
"percentage": "
|
|
20
|
-
"complete": "
|
|
21
|
-
"progress-in-flash": "awsui_progress-in-
|
|
4
|
+
"progress": "awsui_progress_11huc_paiso_197",
|
|
5
|
+
"result-state": "awsui_result-state_11huc_paiso_211",
|
|
6
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_paiso_1",
|
|
7
|
+
"root": "awsui_root_11huc_paiso_233",
|
|
8
|
+
"with-result-button": "awsui_with-result-button_11huc_paiso_268",
|
|
9
|
+
"result-text": "awsui_result-text_11huc_paiso_272",
|
|
10
|
+
"result-container-error": "awsui_result-container-error_11huc_paiso_276",
|
|
11
|
+
"result-container-success": "awsui_result-container-success_11huc_paiso_276",
|
|
12
|
+
"result-button": "awsui_result-button_11huc_paiso_280",
|
|
13
|
+
"word-wrap": "awsui_word-wrap_11huc_paiso_286",
|
|
14
|
+
"label-flash": "awsui_label-flash_11huc_paiso_291",
|
|
15
|
+
"label-key-value": "awsui_label-key-value_11huc_paiso_295",
|
|
16
|
+
"flash": "awsui_flash_11huc_paiso_303",
|
|
17
|
+
"progress-container": "awsui_progress-container_11huc_paiso_307",
|
|
18
|
+
"percentage-container": "awsui_percentage-container_11huc_paiso_314",
|
|
19
|
+
"percentage": "awsui_percentage_11huc_paiso_314",
|
|
20
|
+
"complete": "awsui_complete_11huc_paiso_360",
|
|
21
|
+
"progress-in-flash": "awsui_progress-in-flash_11huc_paiso_388",
|
|
22
|
+
"additional-info": "awsui_additional-info_11huc_paiso_404"
|
|
22
23
|
};
|
|
23
24
|
|
|
@@ -194,27 +194,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
194
194
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
195
195
|
SPDX-License-Identifier: Apache-2.0
|
|
196
196
|
*/
|
|
197
|
-
.
|
|
197
|
+
.awsui_progress_11huc_paiso_197:not(#\9)::-webkit-progress-value {
|
|
198
198
|
-webkit-transition: width var(--motion-duration-moderate-5k1phv, 135ms) linear;
|
|
199
199
|
transition: width var(--motion-duration-moderate-5k1phv, 135ms) linear;
|
|
200
200
|
}
|
|
201
201
|
@media (prefers-reduced-motion: reduce) {
|
|
202
|
-
.
|
|
202
|
+
.awsui_progress_11huc_paiso_197:not(#\9)::-webkit-progress-value {
|
|
203
203
|
animation: none;
|
|
204
204
|
-webkit-transition: none;
|
|
205
205
|
transition: none;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
.awsui-motion-disabled .
|
|
208
|
+
.awsui-motion-disabled .awsui_progress_11huc_paiso_197:not(#\9)::-webkit-progress-value, .awsui-mode-entering .awsui_progress_11huc_paiso_197:not(#\9)::-webkit-progress-value {
|
|
209
209
|
animation: none;
|
|
210
210
|
-webkit-transition: none;
|
|
211
211
|
transition: none;
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
.awsui_result-
|
|
215
|
-
animation: awsui_awsui-motion-fade-
|
|
214
|
+
.awsui_result-state_11huc_paiso_211:not(#\9) {
|
|
215
|
+
animation: awsui_awsui-motion-fade-in_11huc_paiso_1 var(--motion-duration-transition-show-paced-9s9l5z, 180ms) var(--motion-easing-transition-show-paced-eobwvi, ease-out);
|
|
216
216
|
}
|
|
217
|
-
@keyframes awsui_awsui-motion-fade-
|
|
217
|
+
@keyframes awsui_awsui-motion-fade-in_11huc_paiso_1 {
|
|
218
218
|
from {
|
|
219
219
|
opacity: 0.2;
|
|
220
220
|
}
|
|
@@ -223,17 +223,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
@media (prefers-reduced-motion: reduce) {
|
|
226
|
-
.awsui_result-
|
|
226
|
+
.awsui_result-state_11huc_paiso_211:not(#\9) {
|
|
227
227
|
animation: none;
|
|
228
228
|
transition: none;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
.awsui-motion-disabled .awsui_result-
|
|
231
|
+
.awsui-motion-disabled .awsui_result-state_11huc_paiso_211:not(#\9), .awsui-mode-entering .awsui_result-state_11huc_paiso_211:not(#\9) {
|
|
232
232
|
animation: none;
|
|
233
233
|
transition: none;
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
.
|
|
236
|
+
.awsui_root_11huc_paiso_233:not(#\9) {
|
|
237
237
|
border-collapse: separate;
|
|
238
238
|
border-spacing: 0;
|
|
239
239
|
box-sizing: border-box;
|
|
@@ -269,34 +269,34 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
269
269
|
-moz-osx-font-smoothing: auto;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
.awsui_with-result-
|
|
272
|
+
.awsui_with-result-button_11huc_paiso_268:not(#\9) {
|
|
273
273
|
padding-inline-end: var(--space-m-udix3p, 16px);
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
.awsui_result-
|
|
276
|
+
.awsui_result-text_11huc_paiso_272:not(#\9) {
|
|
277
277
|
/* used in test-utils */
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
.awsui_result-container-
|
|
280
|
+
.awsui_result-container-error_11huc_paiso_276:not(#\9), .awsui_result-container-success_11huc_paiso_276:not(#\9) {
|
|
281
281
|
/* used in test-utils */
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
.awsui_result-
|
|
284
|
+
.awsui_result-button_11huc_paiso_280:not(#\9) {
|
|
285
285
|
display: inline-block;
|
|
286
286
|
margin-block: var(--space-scaled-xxs-7597g1, 4px);
|
|
287
287
|
margin-inline: 0;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
.awsui_word-
|
|
290
|
+
.awsui_word-wrap_11huc_paiso_286:not(#\9) {
|
|
291
291
|
min-inline-size: 0;
|
|
292
292
|
word-break: break-word;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
.awsui_label-
|
|
295
|
+
.awsui_label-flash_11huc_paiso_291:not(#\9) {
|
|
296
296
|
color: "inherit";
|
|
297
297
|
font-weight: 700;
|
|
298
298
|
}
|
|
299
|
-
.awsui_label-key-
|
|
299
|
+
.awsui_label-key-value_11huc_paiso_295:not(#\9) {
|
|
300
300
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
301
301
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
302
302
|
font-weight: var(--font-display-label-weight-815ja9, 700);
|
|
@@ -304,18 +304,18 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
304
304
|
margin-block-end: var(--space-scaled-xxxs-27y4hv, 2px);
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
.
|
|
307
|
+
.awsui_flash_11huc_paiso_303:not(#\9) {
|
|
308
308
|
color: inherit;
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
.awsui_progress-
|
|
311
|
+
.awsui_progress-container_11huc_paiso_307:not(#\9) {
|
|
312
312
|
display: flex;
|
|
313
313
|
align-items: center;
|
|
314
314
|
max-inline-size: 800px;
|
|
315
315
|
block-size: var(--line-height-body-m-30ar75, 20px);
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
.awsui_percentage-
|
|
318
|
+
.awsui_percentage-container_11huc_paiso_314:not(#\9) {
|
|
319
319
|
inline-size: 33px;
|
|
320
320
|
flex-shrink: 0;
|
|
321
321
|
white-space: nowrap;
|
|
@@ -325,11 +325,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
325
325
|
letter-spacing: var(--letter-spacing-body-s-z9jkwp, 0.005em);
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
.
|
|
328
|
+
.awsui_percentage_11huc_paiso_314:not(#\9) {
|
|
329
329
|
/* used in test-utils */
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
-
.
|
|
332
|
+
.awsui_progress_11huc_paiso_197:not(#\9) {
|
|
333
333
|
inline-size: 100%;
|
|
334
334
|
margin-inline-end: var(--space-s-34lx8l, 12px);
|
|
335
335
|
min-inline-size: 0;
|
|
@@ -343,7 +343,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
343
343
|
border-end-end-radius: 10px;
|
|
344
344
|
background-color: var(--color-background-progress-bar-layout-default-ktc0zl, #e9ebed);
|
|
345
345
|
}
|
|
346
|
-
.
|
|
346
|
+
.awsui_progress_11huc_paiso_197:not(#\9)::-webkit-progress-bar {
|
|
347
347
|
block-size: 4px;
|
|
348
348
|
border-block: 0;
|
|
349
349
|
border-inline: none;
|
|
@@ -354,27 +354,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
354
354
|
border-end-end-radius: 10px;
|
|
355
355
|
background-color: var(--color-background-progress-bar-layout-default-ktc0zl, #e9ebed);
|
|
356
356
|
}
|
|
357
|
-
.
|
|
357
|
+
.awsui_progress_11huc_paiso_197:not(#\9)::-webkit-progress-value {
|
|
358
358
|
border-start-start-radius: 10px;
|
|
359
359
|
border-start-end-radius: 0;
|
|
360
360
|
border-end-start-radius: 10px;
|
|
361
361
|
border-end-end-radius: 0;
|
|
362
362
|
background-color: var(--color-background-progress-bar-content-default-yvwdkl, #0972d3);
|
|
363
363
|
}
|
|
364
|
-
.
|
|
364
|
+
.awsui_progress_11huc_paiso_197.awsui_complete_11huc_paiso_360:not(#\9)::-webkit-progress-value {
|
|
365
365
|
border-start-start-radius: 10px;
|
|
366
366
|
border-start-end-radius: 10px;
|
|
367
367
|
border-end-start-radius: 10px;
|
|
368
368
|
border-end-end-radius: 10px;
|
|
369
369
|
}
|
|
370
|
-
.
|
|
370
|
+
.awsui_progress_11huc_paiso_197:not(#\9)::-moz-progress-bar {
|
|
371
371
|
border-start-start-radius: 10px;
|
|
372
372
|
border-start-end-radius: 0;
|
|
373
373
|
border-end-start-radius: 10px;
|
|
374
374
|
border-end-end-radius: 0;
|
|
375
375
|
background-color: var(--color-background-progress-bar-content-default-yvwdkl, #0972d3);
|
|
376
376
|
}
|
|
377
|
-
.
|
|
377
|
+
.awsui_progress_11huc_paiso_197:not(#\9)::-ms-fill {
|
|
378
378
|
border-start-start-radius: 10px;
|
|
379
379
|
border-start-end-radius: 0;
|
|
380
380
|
border-end-start-radius: 10px;
|
|
@@ -383,24 +383,28 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
383
383
|
border-block: none;
|
|
384
384
|
border-inline: none;
|
|
385
385
|
}
|
|
386
|
-
.
|
|
386
|
+
.awsui_progress_11huc_paiso_197.awsui_complete_11huc_paiso_360:not(#\9)::-ms-fill {
|
|
387
387
|
border-start-start-radius: 10px;
|
|
388
388
|
border-start-end-radius: 10px;
|
|
389
389
|
border-end-start-radius: 10px;
|
|
390
390
|
border-end-end-radius: 10px;
|
|
391
391
|
}
|
|
392
|
-
.
|
|
392
|
+
.awsui_progress_11huc_paiso_197.awsui_progress-in-flash_11huc_paiso_388:not(#\9) {
|
|
393
393
|
background-color: var(--color-background-progress-bar-layout-in-flash-rlu77n, rgba(255, 255, 255, 0.25));
|
|
394
394
|
}
|
|
395
|
-
.
|
|
395
|
+
.awsui_progress_11huc_paiso_197.awsui_progress-in-flash_11huc_paiso_388:not(#\9)::-webkit-progress-bar {
|
|
396
396
|
background-color: var(--color-background-progress-bar-layout-in-flash-rlu77n, rgba(255, 255, 255, 0.25));
|
|
397
397
|
}
|
|
398
|
-
.
|
|
398
|
+
.awsui_progress_11huc_paiso_197.awsui_progress-in-flash_11huc_paiso_388:not(#\9)::-webkit-progress-value {
|
|
399
399
|
background-color: var(--color-background-progress-bar-content-in-flash-ccuxyt, #ffffff);
|
|
400
400
|
}
|
|
401
|
-
.
|
|
401
|
+
.awsui_progress_11huc_paiso_197.awsui_progress-in-flash_11huc_paiso_388:not(#\9)::-moz-progress-bar {
|
|
402
402
|
background-color: var(--color-background-progress-bar-content-in-flash-ccuxyt, #ffffff);
|
|
403
403
|
}
|
|
404
|
-
.
|
|
404
|
+
.awsui_progress_11huc_paiso_197.awsui_progress-in-flash_11huc_paiso_388:not(#\9)::-ms-fill {
|
|
405
405
|
background-color: rgba(255, 255, 255, 0.7);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.awsui_additional-info_11huc_paiso_404:not(#\9) {
|
|
409
|
+
/* used in test-utils */
|
|
406
410
|
}
|
|
@@ -2,23 +2,24 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"progress": "
|
|
6
|
-
"result-state": "awsui_result-
|
|
7
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
8
|
-
"root": "
|
|
9
|
-
"with-result-button": "awsui_with-result-
|
|
10
|
-
"result-text": "awsui_result-
|
|
11
|
-
"result-container-error": "awsui_result-container-
|
|
12
|
-
"result-container-success": "awsui_result-container-
|
|
13
|
-
"result-button": "awsui_result-
|
|
14
|
-
"word-wrap": "awsui_word-
|
|
15
|
-
"label-flash": "awsui_label-
|
|
16
|
-
"label-key-value": "awsui_label-key-
|
|
17
|
-
"flash": "
|
|
18
|
-
"progress-container": "awsui_progress-
|
|
19
|
-
"percentage-container": "awsui_percentage-
|
|
20
|
-
"percentage": "
|
|
21
|
-
"complete": "
|
|
22
|
-
"progress-in-flash": "awsui_progress-in-
|
|
5
|
+
"progress": "awsui_progress_11huc_paiso_197",
|
|
6
|
+
"result-state": "awsui_result-state_11huc_paiso_211",
|
|
7
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_paiso_1",
|
|
8
|
+
"root": "awsui_root_11huc_paiso_233",
|
|
9
|
+
"with-result-button": "awsui_with-result-button_11huc_paiso_268",
|
|
10
|
+
"result-text": "awsui_result-text_11huc_paiso_272",
|
|
11
|
+
"result-container-error": "awsui_result-container-error_11huc_paiso_276",
|
|
12
|
+
"result-container-success": "awsui_result-container-success_11huc_paiso_276",
|
|
13
|
+
"result-button": "awsui_result-button_11huc_paiso_280",
|
|
14
|
+
"word-wrap": "awsui_word-wrap_11huc_paiso_286",
|
|
15
|
+
"label-flash": "awsui_label-flash_11huc_paiso_291",
|
|
16
|
+
"label-key-value": "awsui_label-key-value_11huc_paiso_295",
|
|
17
|
+
"flash": "awsui_flash_11huc_paiso_303",
|
|
18
|
+
"progress-container": "awsui_progress-container_11huc_paiso_307",
|
|
19
|
+
"percentage-container": "awsui_percentage-container_11huc_paiso_314",
|
|
20
|
+
"percentage": "awsui_percentage_11huc_paiso_314",
|
|
21
|
+
"complete": "awsui_complete_11huc_paiso_360",
|
|
22
|
+
"progress-in-flash": "awsui_progress-in-flash_11huc_paiso_388",
|
|
23
|
+
"additional-info": "awsui_additional-info_11huc_paiso_404"
|
|
23
24
|
};
|
|
24
25
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/property-filter/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAUrE,OAAO,EACL,mBAAmB,EAWpB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/property-filter/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAUrE,OAAO,EACL,mBAAmB,EAWpB,MAAM,cAAc,CAAC;AAgBtB,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAgC/B,QAAA,MAAM,cAAc,qGAmZnB,CAAC;AAGF,eAAe,cAAc,CAAC"}
|
package/property-filter/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import { matchTokenValue } from './utils';
|
|
|
21
21
|
import { useInternalI18n } from '../i18n/context';
|
|
22
22
|
import TokenList from '../internal/components/token-list';
|
|
23
23
|
import { SearchResults } from '../text-filter/search-results';
|
|
24
|
+
import { joinStrings } from '../internal/utils/strings';
|
|
24
25
|
function getOperatorI18nString(operator) {
|
|
25
26
|
switch (operator) {
|
|
26
27
|
case '=':
|
|
@@ -52,7 +53,7 @@ function getOperatorI18nString(operator) {
|
|
|
52
53
|
}
|
|
53
54
|
const PropertyFilter = React.forwardRef((_a, ref) => {
|
|
54
55
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
|
|
55
|
-
var { disabled, countText, query, hideOperations, onChange, filteringProperties, filteringOptions = [], customGroupsText = [], disableFreeTextFiltering = false, freeTextFiltering, onLoadItems, virtualScroll, customControl, customFilterActions, filteringPlaceholder, filteringAriaLabel, filteringEmpty, filteringLoadingText, filteringFinishedText, filteringErrorText, filteringRecoveryText, filteringStatusType, asyncProperties, tokenLimit, expandToViewport, tokenLimitShowFewerAriaLabel, tokenLimitShowMoreAriaLabel } = _a, rest = __rest(_a, ["disabled", "countText", "query", "hideOperations", "onChange", "filteringProperties", "filteringOptions", "customGroupsText", "disableFreeTextFiltering", "freeTextFiltering", "onLoadItems", "virtualScroll", "customControl", "customFilterActions", "filteringPlaceholder", "filteringAriaLabel", "filteringEmpty", "filteringLoadingText", "filteringFinishedText", "filteringErrorText", "filteringRecoveryText", "filteringStatusType", "asyncProperties", "tokenLimit", "expandToViewport", "tokenLimitShowFewerAriaLabel", "tokenLimitShowMoreAriaLabel"]);
|
|
56
|
+
var { disabled, countText, query, hideOperations, onChange, filteringProperties, filteringOptions = [], customGroupsText = [], disableFreeTextFiltering = false, freeTextFiltering, onLoadItems, virtualScroll, customControl, customFilterActions, filteringPlaceholder, filteringAriaLabel, filteringEmpty, filteringLoadingText, filteringFinishedText, filteringErrorText, filteringRecoveryText, filteringConstraintText, filteringStatusType, asyncProperties, tokenLimit, expandToViewport, tokenLimitShowFewerAriaLabel, tokenLimitShowMoreAriaLabel } = _a, rest = __rest(_a, ["disabled", "countText", "query", "hideOperations", "onChange", "filteringProperties", "filteringOptions", "customGroupsText", "disableFreeTextFiltering", "freeTextFiltering", "onLoadItems", "virtualScroll", "customControl", "customFilterActions", "filteringPlaceholder", "filteringAriaLabel", "filteringEmpty", "filteringLoadingText", "filteringFinishedText", "filteringErrorText", "filteringRecoveryText", "filteringConstraintText", "filteringStatusType", "asyncProperties", "tokenLimit", "expandToViewport", "tokenLimitShowFewerAriaLabel", "tokenLimitShowMoreAriaLabel"]);
|
|
56
57
|
const { __internalRootRef } = useBaseComponent('PropertyFilter', {
|
|
57
58
|
props: { asyncProperties, disableFreeTextFiltering, expandToViewport, hideOperations, tokenLimit, virtualScroll },
|
|
58
59
|
});
|
|
@@ -212,10 +213,14 @@ const PropertyFilter = React.forwardRef((_a, ref) => {
|
|
|
212
213
|
};
|
|
213
214
|
const operatorForm = parsedText.step === 'property' && parsedText.property.getValueFormRenderer(parsedText.operator);
|
|
214
215
|
const searchResultsId = useUniqueId('property-filter-search-results');
|
|
216
|
+
const constraintTextId = useUniqueId('property-filter-constraint');
|
|
217
|
+
const textboxAriaDescribedBy = filteringConstraintText
|
|
218
|
+
? joinStrings(rest.ariaDescribedby, constraintTextId)
|
|
219
|
+
: rest.ariaDescribedby;
|
|
215
220
|
return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(baseProps.className, styles.root), ref: __internalRootRef }),
|
|
216
221
|
React.createElement("div", { className: styles['search-field'] },
|
|
217
222
|
customControl && React.createElement("div", { className: styles['custom-control'] }, customControl),
|
|
218
|
-
React.createElement(PropertyFilterAutosuggest, Object.assign({ ref: inputRef, virtualScroll: virtualScroll, enteredTextLabel: i18nStrings.enteredTextLabel, ariaLabel: filteringAriaLabel !== null && filteringAriaLabel !== void 0 ? filteringAriaLabel : i18nStrings.filteringAriaLabel, placeholder: filteringPlaceholder !== null && filteringPlaceholder !== void 0 ? filteringPlaceholder : i18nStrings.filteringPlaceholder, ariaLabelledby: rest.ariaLabelledby, ariaDescribedby:
|
|
223
|
+
React.createElement(PropertyFilterAutosuggest, Object.assign({ ref: inputRef, virtualScroll: virtualScroll, enteredTextLabel: i18nStrings.enteredTextLabel, ariaLabel: filteringAriaLabel !== null && filteringAriaLabel !== void 0 ? filteringAriaLabel : i18nStrings.filteringAriaLabel, placeholder: filteringPlaceholder !== null && filteringPlaceholder !== void 0 ? filteringPlaceholder : i18nStrings.filteringPlaceholder, ariaLabelledby: rest.ariaLabelledby, ariaDescribedby: textboxAriaDescribedBy, controlId: rest.controlId, value: filteringText, disabled: disabled, onKeyDown: handleKeyDown }, autosuggestOptions, { onChange: event => setFilteringText(event.detail.value), empty: filteringEmpty }, asyncAutosuggestProps, { expandToViewport: expandToViewport, onOptionClick: handleSelected, customForm: operatorForm && (React.createElement(PropertyEditor, { property: parsedText.property, operator: parsedText.operator, filter: parsedText.value, operatorForm: operatorForm, i18nStrings: i18nStrings, onCancel: () => {
|
|
219
224
|
var _a, _b;
|
|
220
225
|
setFilteringText('');
|
|
221
226
|
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
@@ -229,6 +234,7 @@ const PropertyFilter = React.forwardRef((_a, ref) => {
|
|
|
229
234
|
} })), hideEnteredTextOption: internalFreeText.disabled && parsedText.step !== 'property', clearAriaLabel: i18nStrings.clearAriaLabel, searchResultsId: showResults ? searchResultsId : undefined })),
|
|
230
235
|
showResults ? (React.createElement("div", { className: styles.results },
|
|
231
236
|
React.createElement(SearchResults, { id: searchResultsId }, countText))) : null),
|
|
237
|
+
filteringConstraintText && (React.createElement("div", { id: constraintTextId, className: styles.constraint }, filteringConstraintText)),
|
|
232
238
|
internalQuery.tokens && internalQuery.tokens.length > 0 && (React.createElement("div", { className: styles.tokens },
|
|
233
239
|
React.createElement(InternalSpaceBetween, { size: "xs", direction: "horizontal" },
|
|
234
240
|
React.createElement(TokenList, { alignment: "inline", limit: tokenLimit, items: internalQuery.tokens, limitShowFewerAriaLabel: tokenLimitShowFewerAriaLabel, limitShowMoreAriaLabel: tokenLimitShowMoreAriaLabel, renderItem: (token, tokenIndex) => (React.createElement(TokenButton, { token: token, first: tokenIndex === 0, operation: internalQuery.operation, removeToken: () => {
|