@cloudscape-design/components 3.0.1156 → 3.0.1157
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/alert/index.js +1 -1
- package/alert/interfaces.d.ts +1 -2
- package/app-layout/runtime-drawer/index.d.ts.map +1 -1
- package/app-layout/runtime-drawer/index.js +20 -18
- package/app-layout/runtime-drawer/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +30 -30
- package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +83 -83
- package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +30 -30
- package/autosuggest/index.js +28 -11
- package/autosuggest/interfaces.d.ts +2 -1
- package/autosuggest/interfaces.js.map +1 -1
- package/badge/index.d.ts +2 -0
- package/badge/index.js +14 -13
- package/badge/interfaces.d.ts +3 -2
- package/box/index.js +18 -13
- package/box/interfaces.d.ts +2 -1
- package/button/index.js +12 -11
- package/button/interfaces.d.ts +4 -2
- package/button-dropdown/index.js +27 -11
- package/button-dropdown/interfaces.d.ts +6 -2
- package/button-group/index.js +42 -11
- package/button-group/interfaces.d.ts +10 -0
- package/button-group/interfaces.d.ts.map +1 -1
- package/button-group/interfaces.js.map +1 -1
- package/checkbox/index.js +9 -11
- package/checkbox/interfaces.d.ts +3 -2
- package/container/index.js +29 -13
- package/container/interfaces.d.ts +2 -1
- package/date-input/index.js +8 -10
- package/flashbar/index.js +10 -13
- package/flashbar/interfaces.d.ts +1 -0
- package/icon/index.js +8 -13
- package/icon/interfaces.d.ts +2 -1
- package/icon-provider/index.js +12 -2
- package/index.d.ts +4 -1
- package/index.js +4 -0
- package/input/index.js +53 -12
- package/input/interfaces.d.ts +3 -1
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/components/radio-button/interfaces.d.ts +3 -3
- package/internal/environment.js +3 -3
- package/internal/environment.json +3 -3
- package/internal/manifest.json +1 -1
- package/internal/plugins/controllers/drawers.d.ts +2 -2
- package/internal/plugins/controllers/drawers.d.ts.map +1 -1
- package/internal/plugins/controllers/drawers.js.map +1 -1
- package/internal/plugins/widget/interfaces.d.ts +2 -2
- package/internal/plugins/widget/interfaces.d.ts.map +1 -1
- package/internal/plugins/widget/interfaces.js.map +1 -1
- package/link/index.js +25 -11
- package/link/interfaces.d.ts +3 -2
- package/navigable-group/index.js +19 -4
- package/package.json +4 -1
- package/progress-bar/index.d.ts +1 -0
- package/progress-bar/index.js +52 -14
- package/progress-bar/interfaces.d.ts +1 -0
- package/prompt-input/index.js +19 -11
- package/prompt-input/interfaces.d.ts +4 -3
- package/radio-button/index.js +19 -4
- package/radio-group/index.js +20 -11
- package/radio-group/interfaces.d.ts +1 -1
- package/segmented-control/index.js +14 -13
- package/segmented-control/interfaces.d.ts +1 -0
- package/select/interfaces.d.ts +1 -1
- package/select/interfaces.js.map +1 -1
- package/space-between/index.js +10 -13
- package/space-between/interfaces.d.ts +2 -1
- package/spinner/index.js +10 -13
- package/spinner/interfaces.d.ts +2 -1
- package/status-indicator/index.js +10 -13
- package/status-indicator/interfaces.d.ts +2 -1
- package/steps/index.js +11 -11
- package/steps/interfaces.d.ts +6 -2
- package/table/header-cell/index.d.ts +1 -1
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +1 -1
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/th-element.d.ts +1 -1
- package/table/header-cell/th-element.d.ts.map +1 -1
- package/table/header-cell/th-element.js.map +1 -1
- package/table/resizer/index.d.ts +3 -1
- package/table/resizer/index.d.ts.map +1 -1
- package/table/resizer/index.js +8 -5
- package/table/resizer/index.js.map +1 -1
- package/table/resizer/styles.css.js +13 -12
- package/table/resizer/styles.scoped.css +22 -22
- package/table/resizer/styles.selectors.js +13 -12
- package/table/thead.d.ts +1 -1
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js.map +1 -1
- package/text-filter/index.js +17 -10
- package/text-filter/interfaces.d.ts +1 -0
- package/textarea/index.js +65 -12
- package/textarea/interfaces.d.ts +3 -2
- package/time-input/index.js +15 -11
- package/toggle/index.js +6 -10
- package/toggle/interfaces.d.ts +3 -2
- package/toggle-button/index.js +14 -11
- package/wizard/index.js +35 -13
- package/wizard/interfaces.d.ts +1 -1
- package/autosuggest/internal-do-not-use-core.js +0 -35
- package/badge/internal-do-not-use-core.js +0 -19
- package/box/internal-do-not-use-core.js +0 -23
- package/button/internal-do-not-use-core.js +0 -19
- package/button-dropdown/internal-do-not-use-core.js +0 -34
- package/button-group/internal-do-not-use-core.js +0 -49
- package/checkbox/internal-do-not-use-core.js +0 -16
- package/container/internal-do-not-use-core.js +0 -34
- package/date-input/internal-do-not-use-core.js +0 -16
- package/flashbar/internal-do-not-use-core.js +0 -15
- package/icon/internal-do-not-use-core.js +0 -13
- package/input/internal-do-not-use-core.js +0 -59
- package/link/internal-do-not-use-core.js +0 -32
- package/progress-bar/internal-do-not-use-core.js +0 -56
- package/prompt-input/internal-do-not-use-core.js +0 -26
- package/radio-group/internal-do-not-use-core.js +0 -27
- package/segmented-control/internal-do-not-use-core.js +0 -19
- package/space-between/internal-do-not-use-core.js +0 -15
- package/spinner/internal-do-not-use-core.js +0 -15
- package/status-indicator/internal-do-not-use-core.js +0 -15
- package/steps/internal-do-not-use-core.js +0 -18
- package/text-filter/internal-do-not-use-core.js +0 -25
- package/textarea/internal-do-not-use-core.js +0 -71
- package/time-input/internal-do-not-use-core.js +0 -22
- package/toggle/internal-do-not-use-core.js +0 -14
- package/toggle-button/internal-do-not-use-core.js +0 -21
- package/wizard/internal-do-not-use-core.js +0 -40
- /package/autosuggest/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/badge/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/box/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/button/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/button-dropdown/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/button-group/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/checkbox/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/container/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/date-input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/flashbar/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/icon/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/link/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/progress-bar/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/prompt-input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/radio-group/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/segmented-control/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/space-between/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/spinner/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/status-indicator/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/steps/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/text-filter/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/textarea/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/time-input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/toggle/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/toggle-button/{internal-do-not-use-core.js.map → index.js.map} +0 -0
- /package/wizard/{internal-do-not-use-core.js.map → index.js.map} +0 -0
package/link/interfaces.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { BaseNavigationDetail, CancelableEventHandler, ClickDetail as _ClickDeta
|
|
|
4
4
|
/**
|
|
5
5
|
* @awsuiSystem core
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
import { NativeAttributes } from '../internal/utils/with-native-attributes';
|
|
8
8
|
export interface LinkProps extends BaseComponentProps {
|
|
9
9
|
/**
|
|
10
10
|
* Determines the visual style of the link as follows:
|
|
@@ -93,7 +93,7 @@ export interface LinkProps extends BaseComponentProps {
|
|
|
93
93
|
/**
|
|
94
94
|
* @awsuiSystem core
|
|
95
95
|
*/
|
|
96
|
-
|
|
96
|
+
style?: LinkProps.Style;
|
|
97
97
|
/**
|
|
98
98
|
* Attributes to add to the native element.
|
|
99
99
|
* Some attributes will be automatically combined with internal attribute values:
|
|
@@ -104,6 +104,7 @@ export interface LinkProps extends BaseComponentProps {
|
|
|
104
104
|
*
|
|
105
105
|
* @awsuiSystem core
|
|
106
106
|
*/
|
|
107
|
+
nativeAttributes?: NativeAttributes<React.AnchorHTMLAttributes<HTMLAnchorElement>>;
|
|
107
108
|
}
|
|
108
109
|
export declare namespace LinkProps {
|
|
109
110
|
type Variant = 'primary' | 'secondary' | 'info' | 'awsui-value-large';
|
package/navigable-group/index.js
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
'use client';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { getBaseProps } from '../internal/base-component';
|
|
6
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
7
|
+
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
8
|
+
import { getExternalProps } from '../internal/utils/external-props';
|
|
9
|
+
import InternalNavigableGroup from './internal';
|
|
10
|
+
const NavigableGroup = React.forwardRef(({ ...rest }, ref) => {
|
|
11
|
+
const baseProps = getBaseProps(rest);
|
|
12
|
+
const baseComponentProps = useBaseComponent('NavigableGroup');
|
|
13
|
+
const externalProps = getExternalProps(rest);
|
|
14
|
+
return React.createElement(InternalNavigableGroup, { ...baseProps, ...baseComponentProps, ...externalProps, ref: ref });
|
|
15
|
+
});
|
|
16
|
+
applyDisplayName(NavigableGroup, 'NavigableGroup');
|
|
17
|
+
/**
|
|
18
|
+
* @awsuiSystem core
|
|
19
|
+
*/
|
|
20
|
+
export default NavigableGroup;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"./help-panel": "./help-panel/index.js",
|
|
73
73
|
"./hotspot": "./hotspot/index.js",
|
|
74
74
|
"./icon": "./icon/index.js",
|
|
75
|
+
"./icon-provider": "./icon-provider/index.js",
|
|
75
76
|
"./input": "./input/index.js",
|
|
76
77
|
"./key-value-pairs": "./key-value-pairs/index.js",
|
|
77
78
|
"./line-chart": "./line-chart/index.js",
|
|
@@ -81,12 +82,14 @@
|
|
|
81
82
|
"./mixed-line-bar-chart": "./mixed-line-bar-chart/index.js",
|
|
82
83
|
"./modal": "./modal/index.js",
|
|
83
84
|
"./multiselect": "./multiselect/index.js",
|
|
85
|
+
"./navigable-group": "./navigable-group/index.js",
|
|
84
86
|
"./pagination": "./pagination/index.js",
|
|
85
87
|
"./pie-chart": "./pie-chart/index.js",
|
|
86
88
|
"./popover": "./popover/index.js",
|
|
87
89
|
"./progress-bar": "./progress-bar/index.js",
|
|
88
90
|
"./prompt-input": "./prompt-input/index.js",
|
|
89
91
|
"./property-filter": "./property-filter/index.js",
|
|
92
|
+
"./radio-button": "./radio-button/index.js",
|
|
90
93
|
"./radio-group": "./radio-group/index.js",
|
|
91
94
|
"./s3-resource-selector": "./s3-resource-selector/index.js",
|
|
92
95
|
"./segmented-control": "./segmented-control/index.js",
|
|
@@ -153,7 +156,7 @@
|
|
|
153
156
|
"./internal/base-component/index.js",
|
|
154
157
|
"./internal/base-component/styles.css.js"
|
|
155
158
|
],
|
|
156
|
-
"version": "3.0.
|
|
159
|
+
"version": "3.0.1157",
|
|
157
160
|
"repository": {
|
|
158
161
|
"type": "git",
|
|
159
162
|
"url": "https://github.com/cloudscape-design/components.git"
|
package/progress-bar/index.d.ts
CHANGED
package/progress-bar/index.js
CHANGED
|
@@ -1,18 +1,56 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
3
|
+
'use client';
|
|
4
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
7
|
+
import { getBaseProps } from '../internal/base-component';
|
|
8
|
+
import { fireNonCancelableEvent } from '../internal/events';
|
|
9
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
10
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
import { joinStrings } from '../internal/utils/strings';
|
|
12
|
+
import { throttle } from '../internal/utils/throttle';
|
|
13
|
+
import InternalLiveRegion from '../live-region/internal';
|
|
14
|
+
import { Progress, ResultState, SmallText } from './internal';
|
|
15
|
+
import styles from './styles.css.js';
|
|
16
|
+
const ASSERTION_FREQUENCY = 5000; // interval in ms between progress announcements
|
|
17
|
+
export default function ProgressBar({ value = 0, status = 'in-progress', variant = 'standalone', resultButtonText, label, ariaLabel, ariaLabelledby, ariaDescribedby, description, additionalInfo, resultText, onResultButtonClick, style, ...rest }) {
|
|
18
|
+
const { __internalRootRef } = useBaseComponent('ProgressBar', {
|
|
19
|
+
props: { variant },
|
|
20
|
+
});
|
|
21
|
+
const baseProps = getBaseProps(rest);
|
|
22
|
+
const generatedName = useUniqueId('awsui-progress-bar-');
|
|
23
|
+
const labelId = `${generatedName}-label`;
|
|
24
|
+
const isInFlash = variant === 'flash';
|
|
25
|
+
const isInProgressState = status === 'in-progress';
|
|
26
|
+
const descriptionId = useUniqueId('progressbar-description-');
|
|
27
|
+
const additionalInfoId = useUniqueId('progressbar-additional-info-');
|
|
28
|
+
const [announcedValue, setAnnouncedValue] = useState('');
|
|
29
|
+
const throttledAssertion = useMemo(() => {
|
|
30
|
+
return throttle((value) => {
|
|
31
|
+
setAnnouncedValue(`${value}%`);
|
|
32
|
+
}, ASSERTION_FREQUENCY);
|
|
33
|
+
}, []);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
throttledAssertion(value);
|
|
36
|
+
}, [throttledAssertion, value]);
|
|
37
|
+
if (isInFlash && resultButtonText) {
|
|
38
|
+
warnOnce('ProgressBar', '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.');
|
|
39
|
+
}
|
|
40
|
+
return (React.createElement("div", { ...baseProps, className: clsx(baseProps.className, styles.root, variant && styles[variant]), ref: __internalRootRef },
|
|
41
|
+
React.createElement("div", { className: isInFlash ? styles['flash-container'] : undefined },
|
|
42
|
+
React.createElement("div", { className: clsx(styles['word-wrap'], styles[`label-${variant}`]), id: labelId }, label),
|
|
43
|
+
description && (React.createElement(SmallText, { color: isInFlash ? 'inherit' : undefined, id: descriptionId }, description)),
|
|
44
|
+
React.createElement("div", null, isInProgressState ? (React.createElement(React.Fragment, null,
|
|
45
|
+
React.createElement(Progress, { value: value, ariaLabel: ariaLabel, ariaLabelledby: joinStrings(labelId, ariaLabelledby), ariaDescribedby: joinStrings(description ? descriptionId : undefined, additionalInfo ? additionalInfoId : undefined, ariaDescribedby), isInFlash: isInFlash, style: style }),
|
|
46
|
+
React.createElement(InternalLiveRegion, { hidden: true, tagName: "span", delay: 0 },
|
|
47
|
+
label,
|
|
48
|
+
label ? ': ' : null,
|
|
49
|
+
announcedValue))) : (React.createElement(InternalLiveRegion, { hidden: false, tagName: "span", delay: 0 },
|
|
50
|
+
React.createElement(ResultState, { resultText: resultText, isInFlash: isInFlash, resultButtonText: resultButtonText, status: status, onClick: () => {
|
|
51
|
+
fireNonCancelableEvent(onResultButtonClick);
|
|
52
|
+
} }))))),
|
|
53
|
+
additionalInfo && (React.createElement(SmallText, { className: styles['additional-info'], color: isInFlash ? 'inherit' : undefined, id: additionalInfoId }, additionalInfo))));
|
|
54
|
+
}
|
|
17
55
|
applyDisplayName(ProgressBar, 'ProgressBar');
|
|
18
|
-
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
package/prompt-input/index.js
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
'use client';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import CoreComponent from './internal-do-not-use-core';
|
|
5
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
6
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
import InternalPromptInput from './internal';
|
|
8
|
+
const PromptInput = React.forwardRef(({ autoComplete, autoFocus, disableBrowserAutocorrect, disableActionButton, spellcheck, readOnly, actionButtonIconName, minRows = 1, maxRows = 3, ...props }, ref) => {
|
|
9
|
+
const baseComponentProps = useBaseComponent('PromptInput', {
|
|
10
|
+
props: {
|
|
11
|
+
readOnly,
|
|
12
|
+
autoComplete,
|
|
13
|
+
autoFocus,
|
|
14
|
+
disableBrowserAutocorrect,
|
|
15
|
+
disableActionButton,
|
|
16
|
+
spellcheck,
|
|
17
|
+
actionButtonIconName,
|
|
18
|
+
minRows,
|
|
19
|
+
maxRows,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
return (React.createElement(InternalPromptInput, { readOnly: readOnly, autoComplete: autoComplete, autoFocus: autoFocus, disableBrowserAutocorrect: disableBrowserAutocorrect, disableActionButton: disableActionButton, spellcheck: spellcheck, actionButtonIconName: actionButtonIconName, minRows: minRows, maxRows: maxRows, ...props, ...baseComponentProps, ref: ref }));
|
|
14
23
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
24
|
applyDisplayName(PromptInput, 'PromptInput');
|
|
18
25
|
export default PromptInput;
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -6,7 +6,7 @@ import { BaseKeyDetail, NonCancelableEventHandler } from '../internal/events';
|
|
|
6
6
|
/**
|
|
7
7
|
* @awsuiSystem core
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
import { NativeAttributes } from '../internal/utils/with-native-attributes';
|
|
10
10
|
export interface PromptInputProps extends Omit<BaseInputProps, 'nativeInputAttributes'>, InputKeyEvents, InputAutoCorrect, InputAutoComplete, InputSpellcheck, BaseComponentProps, FormFieldValidationControlProps {
|
|
11
11
|
/**
|
|
12
12
|
* Called whenever a user clicks the action button or presses the "Enter" key.
|
|
@@ -75,7 +75,7 @@ export interface PromptInputProps extends Omit<BaseInputProps, 'nativeInputAttri
|
|
|
75
75
|
*
|
|
76
76
|
* @awsuiSystem core
|
|
77
77
|
*/
|
|
78
|
-
|
|
78
|
+
customPrimaryAction?: React.ReactNode;
|
|
79
79
|
/**
|
|
80
80
|
* Use this slot to add secondary actions to the prompt input.
|
|
81
81
|
*/
|
|
@@ -102,10 +102,11 @@ export interface PromptInputProps extends Omit<BaseInputProps, 'nativeInputAttri
|
|
|
102
102
|
*
|
|
103
103
|
* @awsuiSystem core
|
|
104
104
|
*/
|
|
105
|
-
|
|
105
|
+
nativeTextareaAttributes?: NativeAttributes<React.TextareaHTMLAttributes<HTMLTextAreaElement>>;
|
|
106
106
|
/**
|
|
107
107
|
* @awsuiSystem core
|
|
108
108
|
*/
|
|
109
|
+
style?: PromptInputProps.Style;
|
|
109
110
|
}
|
|
110
111
|
export declare namespace PromptInputProps {
|
|
111
112
|
type KeyDetail = BaseKeyDetail;
|
package/radio-button/index.js
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
'use client';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import InternalRadioButton from '../internal/components/radio-button';
|
|
7
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
8
|
+
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
9
|
+
import styles from './styles.css.js';
|
|
10
|
+
const RadioButton = React.forwardRef((props, ref) => {
|
|
11
|
+
const baseComponentProps = useBaseComponent('RadioButton', {
|
|
12
|
+
props: { readOnly: Boolean(props.readOnly), disabled: Boolean(props.disabled) },
|
|
13
|
+
});
|
|
14
|
+
return (React.createElement(InternalRadioButton, { ...props, ...baseComponentProps, className: clsx(props.className, styles['radio-button']), ref: ref }));
|
|
15
|
+
});
|
|
16
|
+
applyDisplayName(RadioButton, 'RadioButton');
|
|
17
|
+
/**
|
|
18
|
+
* @awsuiSystem core
|
|
19
|
+
*/
|
|
20
|
+
export default RadioButton;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
package/radio-group/index.js
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
'use client';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import
|
|
5
|
+
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
6
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
7
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return React.createElement(
|
|
8
|
+
import InternalRadioGroup from './internal';
|
|
9
|
+
import analyticsSelectors from './analytics-metadata/styles.css.js';
|
|
10
|
+
const RadioGroup = React.forwardRef(({ direction = 'vertical', ...rest }, ref) => {
|
|
11
|
+
const baseComponentProps = useBaseComponent('RadioGroup', {
|
|
12
|
+
props: { readOnly: rest.readOnly, direction: direction !== null && direction !== void 0 ? direction : 'vertical' },
|
|
13
|
+
});
|
|
14
|
+
return (React.createElement(InternalRadioGroup, { ref: ref, direction: direction, ...rest, ...baseComponentProps, ...getAnalyticsMetadataAttribute({
|
|
15
|
+
component: {
|
|
16
|
+
name: 'awsui.RadioGroup',
|
|
17
|
+
label: { root: 'self' },
|
|
18
|
+
properties: {
|
|
19
|
+
value: `${rest.value}`,
|
|
20
|
+
valueLabel: `.${analyticsSelectors.selected}`,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
}) }));
|
|
14
24
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
25
|
applyDisplayName(RadioGroup, 'RadioGroup');
|
|
18
26
|
export default RadioGroup;
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
'use client';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import CoreComponent from './internal-do-not-use-core';
|
|
5
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
6
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
import InternalSegmentedControl from './internal';
|
|
8
|
+
export default function SegmentedControl(props) {
|
|
9
|
+
var _a;
|
|
10
|
+
const baseComponentProps = useBaseComponent('SegmentedControl', {
|
|
11
|
+
props: {},
|
|
12
|
+
metadata: {
|
|
13
|
+
hasDisabledReasons: ((_a = props.options) !== null && _a !== void 0 ? _a : []).some(option => Boolean(option.disabledReason)),
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
return React.createElement(InternalSegmentedControl, { ...props, ...baseComponentProps });
|
|
17
|
+
}
|
|
17
18
|
applyDisplayName(SegmentedControl, 'SegmentedControl');
|
|
18
|
-
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
package/select/interfaces.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export interface BaseSelectProps extends BaseDropdownHostProps, BaseComponentPro
|
|
|
112
112
|
* Overrides the element that is announced to screen readers
|
|
113
113
|
* when the highlighted option changes. By default, this announces
|
|
114
114
|
* the option's name and properties, and its selected state if
|
|
115
|
-
* the `
|
|
115
|
+
* the `selectedAriaLabel` property is defined.
|
|
116
116
|
* The highlighted option is provided, and its group (if groups
|
|
117
117
|
* are used and it differs from the group of the previously highlighted option).
|
|
118
118
|
*
|
package/select/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/select/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport {\n BaseDropdownHostProps,\n OptionsFilteringType,\n OptionsLoadItemsDetail,\n} from '../internal/components/dropdown/interfaces';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status/interfaces';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../internal/components/option/interfaces';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface BaseSelectProps\n extends BaseDropdownHostProps,\n BaseComponentProps,\n FormFieldValidationControlProps,\n DropdownStatusProps {\n /**\n * Specifies an array of options that are displayed to the user as a dropdown list.\n * The options can be grouped using `OptionGroup` objects.\n *\n * #### Option\n * - `value` (string) - The returned value of the option when selected.\n *\n * #### OptionGroup\n * - `value` (string) - Used to locate option group in test utils.\n * - `options` (Option[]) - (Optional) The options under this group.\n *\n * #### Shared Option and OptionGroup properties\n * - `label` (string) - (Optional) Option or group text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option or group, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option or group that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option or group is disabled.\n * - `disabledReason` (string) - (Optional) Displays tooltip near the item when disabled. Use to provide additional context.\n * - `labelTag` (string) - (Optional) A label tag that provides additional guidance, shown next to the label.\n * - `tags` [string[]] - (Optional) A list of tags giving further guidance about the option or group.\n * - `filteringTags` [string[]] - (Optional) A list of additional tags used for automatic filtering.\n * - `iconName` (string) - (Optional) Specifies the name of an [icon](/components/icon/) to display in the option or group.\n * - `iconAriaLabel` (string) - (Optional) Specifies alternate text for the icon. We recommend that you provide this for accessibility.\n * - `iconAlt` (string) - (Optional) **Deprecated**, replaced by \\`iconAriaLabel\\`. Specifies alternate text for a custom icon, for use with `iconUrl`.\n * - `iconUrl` (string) - (Optional) URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * Note: Only one level of option nesting is supported.\n *\n * If you want to use the built-in filtering capabilities of this component, provide\n * a list of all valid options here and they will be automatically filtered based on the user's filtering input.\n *\n * Alternatively, you can listen to the `onChange` or `onLoadItems` event and set new options\n * on your own.\n **/\n options?: SelectProps.Options;\n /**\n * Determines how filtering is applied to the list of `options`:\n *\n * * `auto` - The component will automatically filter options based on user input.\n * * `manual` - You will set up `onChange` or `onLoadItems` event listeners and filter options on your side or request\n * them from server.\n *\n * By default the component will filter the provided `options` based on the value of the filtering input field.\n * Only options that have a `value`, `label`, `description` or `labelTag` that contains the input value as a substring\n * are displayed in the list of options.\n *\n * If you set this property to `manual`, this default filtering mechanism is disabled and all provided `options` are\n * displayed in the dropdown list. In that case make sure that you use the `onChange` or `onLoadItems` events in order\n * to set the `options` property to the options that are relevant for the user, given the filtering input value.\n *\n * Note: Manual filtering doesn't disable match highlighting.\n **/\n filteringType?: OptionsFilteringType;\n\n /**\n * Determines whether the whole select component is disabled.\n */\n disabled?: boolean;\n /**\n * Specifies the placeholder to display in the filtering input if filtering is enabled.\n */\n filteringPlaceholder?: string;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n /**\n * Adds an `aria-label` on the built-in filtering input if filtering is enabled.\n */\n filteringAriaLabel?: string;\n /**\n * Adds an `aria-label` to the clear button inside the search input.\n * @i18n\n */\n filteringClearAriaLabel?: string;\n /**\n * @deprecated Has no effect.\n */\n name?: string;\n /**\n * Specifies the hint text that's displayed in the field when no option has been selected.\n */\n placeholder?: string;\n /**\n * Specifies the ID for the trigger component. It uses an automatically generated ID by default.\n */\n controlId?: string;\n /**\n * Adds `aria-required` to the native input element.\n */\n ariaRequired?: boolean;\n /**\n * Adds `aria-label` to the select element.\n * Use this if you don't have a visible label for this control.\n */\n ariaLabel?: string;\n /**\n * Specifies the localized string that describes an option as being selected.\n * This is required to provide a good screen reader experience. For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n * @i18n\n */\n selectedAriaLabel?: string;\n /**\n * Overrides the element that is announced to screen readers\n * when the highlighted option changes. By default, this announces\n * the option's name and properties, and its selected state if\n * the `
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/select/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport {\n BaseDropdownHostProps,\n OptionsFilteringType,\n OptionsLoadItemsDetail,\n} from '../internal/components/dropdown/interfaces';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status/interfaces';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../internal/components/option/interfaces';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface BaseSelectProps\n extends BaseDropdownHostProps,\n BaseComponentProps,\n FormFieldValidationControlProps,\n DropdownStatusProps {\n /**\n * Specifies an array of options that are displayed to the user as a dropdown list.\n * The options can be grouped using `OptionGroup` objects.\n *\n * #### Option\n * - `value` (string) - The returned value of the option when selected.\n *\n * #### OptionGroup\n * - `value` (string) - Used to locate option group in test utils.\n * - `options` (Option[]) - (Optional) The options under this group.\n *\n * #### Shared Option and OptionGroup properties\n * - `label` (string) - (Optional) Option or group text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option or group, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option or group that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option or group is disabled.\n * - `disabledReason` (string) - (Optional) Displays tooltip near the item when disabled. Use to provide additional context.\n * - `labelTag` (string) - (Optional) A label tag that provides additional guidance, shown next to the label.\n * - `tags` [string[]] - (Optional) A list of tags giving further guidance about the option or group.\n * - `filteringTags` [string[]] - (Optional) A list of additional tags used for automatic filtering.\n * - `iconName` (string) - (Optional) Specifies the name of an [icon](/components/icon/) to display in the option or group.\n * - `iconAriaLabel` (string) - (Optional) Specifies alternate text for the icon. We recommend that you provide this for accessibility.\n * - `iconAlt` (string) - (Optional) **Deprecated**, replaced by \\`iconAriaLabel\\`. Specifies alternate text for a custom icon, for use with `iconUrl`.\n * - `iconUrl` (string) - (Optional) URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * Note: Only one level of option nesting is supported.\n *\n * If you want to use the built-in filtering capabilities of this component, provide\n * a list of all valid options here and they will be automatically filtered based on the user's filtering input.\n *\n * Alternatively, you can listen to the `onChange` or `onLoadItems` event and set new options\n * on your own.\n **/\n options?: SelectProps.Options;\n /**\n * Determines how filtering is applied to the list of `options`:\n *\n * * `auto` - The component will automatically filter options based on user input.\n * * `manual` - You will set up `onChange` or `onLoadItems` event listeners and filter options on your side or request\n * them from server.\n *\n * By default the component will filter the provided `options` based on the value of the filtering input field.\n * Only options that have a `value`, `label`, `description` or `labelTag` that contains the input value as a substring\n * are displayed in the list of options.\n *\n * If you set this property to `manual`, this default filtering mechanism is disabled and all provided `options` are\n * displayed in the dropdown list. In that case make sure that you use the `onChange` or `onLoadItems` events in order\n * to set the `options` property to the options that are relevant for the user, given the filtering input value.\n *\n * Note: Manual filtering doesn't disable match highlighting.\n **/\n filteringType?: OptionsFilteringType;\n\n /**\n * Determines whether the whole select component is disabled.\n */\n disabled?: boolean;\n /**\n * Specifies the placeholder to display in the filtering input if filtering is enabled.\n */\n filteringPlaceholder?: string;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n /**\n * Adds an `aria-label` on the built-in filtering input if filtering is enabled.\n */\n filteringAriaLabel?: string;\n /**\n * Adds an `aria-label` to the clear button inside the search input.\n * @i18n\n */\n filteringClearAriaLabel?: string;\n /**\n * @deprecated Has no effect.\n */\n name?: string;\n /**\n * Specifies the hint text that's displayed in the field when no option has been selected.\n */\n placeholder?: string;\n /**\n * Specifies the ID for the trigger component. It uses an automatically generated ID by default.\n */\n controlId?: string;\n /**\n * Adds `aria-required` to the native input element.\n */\n ariaRequired?: boolean;\n /**\n * Adds `aria-label` to the select element.\n * Use this if you don't have a visible label for this control.\n */\n ariaLabel?: string;\n /**\n * Specifies the localized string that describes an option as being selected.\n * This is required to provide a good screen reader experience. For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n * @i18n\n */\n selectedAriaLabel?: string;\n /**\n * Overrides the element that is announced to screen readers\n * when the highlighted option changes. By default, this announces\n * the option's name and properties, and its selected state if\n * the `selectedAriaLabel` property is defined.\n * The highlighted option is provided, and its group (if groups\n * are used and it differs from the group of the previously highlighted option).\n *\n * For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n */\n renderHighlightedAriaLive?: SelectProps.ContainingOptionAndGroupString;\n /**\n * Displayed for `filteringType=\"auto\"` when there are no matches for the filtering.\n */\n noMatch?: React.ReactNode;\n /**\n * Called when input focus is removed from the UI control.\n */\n onBlur?: NonCancelableEventHandler;\n /**\n * Called when input focus is set onto the UI control.\n */\n onFocus?: NonCancelableEventHandler;\n\n /**\n * Specifies if the control is read-only, which prevents the\n * user from both modifying the value and opening the dropdown. A read-only control is still focusable.\n */\n readOnly?: boolean;\n}\n\nexport interface SelectProps extends BaseSelectProps {\n /**\n * Adds a small label inline with the input for saving vertical space in the UI.\n * For use with collection select filters only.\n */\n inlineLabelText?: string;\n /**\n * Adds `aria-labelledby` to the component. If you're using this component within a form field,\n * don't set this property because the form field component automatically sets it.\n *\n * Use this property if the component isn't using `inlineLabelText` and isn't surrounded by a form field, or you want to override the value\n * automatically set by the form field (for example, if you have two components within a single form field).\n *\n * To use it correctly, define an ID for the element you want to use as label and set the property to that ID.\n */\n ariaLabelledby?: string;\n /**\n * Defines the variant of the trigger. You can use a simple label or the entire option (`label | option`)\n */\n triggerVariant?: SelectProps.TriggerVariant;\n /**\n * Specifies the currently selected option.\n * If you want to clear the selection, use `null`.\n */\n selectedOption: SelectProps.Option | null;\n /**\n * Called when the user selects an option.\n * The event `detail` contains the current `selectedOption`.\n */\n onChange?: NonCancelableEventHandler<SelectProps.ChangeDetail>;\n\n /**\n * Automatically focuses the trigger when component is mounted.\n */\n autoFocus?: boolean;\n}\n\nexport namespace SelectProps {\n export type FilteringType = OptionsFilteringType;\n export type TriggerVariant = 'label' | 'option';\n\n export type Option = OptionDefinition;\n export type OptionGroup = OptionGroupDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n\n export type LoadItemsDetail = OptionsLoadItemsDetail;\n\n export interface ChangeDetail {\n selectedOption: Option;\n }\n\n export interface ContainingOptionAndGroupString {\n (option: Option, group?: OptionGroup): string;\n }\n\n export interface Ref {\n /**\n * Sets focus on the element without opening the dropdown or showing a visual focus indicator.\n */\n focus(): void;\n }\n}\n"]}
|
package/space-between/index.js
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
'use client';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import CoreComponent from './internal-do-not-use-core';
|
|
5
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
6
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
import InternalSpaceBetween from './internal';
|
|
8
|
+
export default function SpaceBetween({ direction = 'vertical', ...props }) {
|
|
9
|
+
const baseComponentProps = useBaseComponent('SpaceBetween', {
|
|
10
|
+
props: { alignItems: props.alignItems, direction, size: props.size },
|
|
11
|
+
});
|
|
12
|
+
return React.createElement(InternalSpaceBetween, { direction: direction, ...props, ...baseComponentProps });
|
|
13
|
+
}
|
|
17
14
|
applyDisplayName(SpaceBetween, 'SpaceBetween');
|
|
18
|
-
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -2,7 +2,7 @@ import { BaseComponentProps } from '../internal/base-component';
|
|
|
2
2
|
/**
|
|
3
3
|
* @awsuiSystem core
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
import { NativeAttributes } from '../internal/utils/with-native-attributes';
|
|
6
6
|
export interface SpaceBetweenProps extends BaseComponentProps {
|
|
7
7
|
/**
|
|
8
8
|
* Defines the direction in which the content is laid out.
|
|
@@ -30,6 +30,7 @@ export interface SpaceBetweenProps extends BaseComponentProps {
|
|
|
30
30
|
*
|
|
31
31
|
* @awsuiSystem core
|
|
32
32
|
*/
|
|
33
|
+
nativeAttributes?: NativeAttributes<React.HTMLAttributes<HTMLDivElement>>;
|
|
33
34
|
}
|
|
34
35
|
export declare namespace SpaceBetweenProps {
|
|
35
36
|
type Direction = 'vertical' | 'horizontal';
|
package/spinner/index.js
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
'use client';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import CoreComponent from './internal-do-not-use-core';
|
|
5
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
6
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
import InternalSpinner from './internal';
|
|
8
|
+
export default function Spinner({ size = 'normal', variant = 'normal', ...props }) {
|
|
9
|
+
const baseComponentProps = useBaseComponent('Spinner', {
|
|
10
|
+
props: { size, variant },
|
|
11
|
+
});
|
|
12
|
+
return React.createElement(InternalSpinner, { size: size, variant: variant, ...props, ...baseComponentProps });
|
|
13
|
+
}
|
|
17
14
|
applyDisplayName(Spinner, 'Spinner');
|
|
18
|
-
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
package/spinner/interfaces.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { BaseComponentProps } from '../internal/base-component';
|
|
|
2
2
|
/**
|
|
3
3
|
* @awsuiSystem core
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
import { NativeAttributes } from '../internal/utils/with-native-attributes';
|
|
6
6
|
export interface SpinnerProps extends BaseComponentProps {
|
|
7
7
|
/**
|
|
8
8
|
* Specifies the size of the spinner.
|
|
@@ -22,6 +22,7 @@ export interface SpinnerProps extends BaseComponentProps {
|
|
|
22
22
|
*
|
|
23
23
|
* @awsuiSystem core
|
|
24
24
|
*/
|
|
25
|
+
nativeAttributes?: NativeAttributes<React.HTMLAttributes<HTMLElement>>;
|
|
25
26
|
}
|
|
26
27
|
export declare namespace SpinnerProps {
|
|
27
28
|
type Size = 'normal' | 'big' | 'large';
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
'use client';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import CoreComponent from './internal-do-not-use-core';
|
|
5
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
6
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
import InternalStatusIndicator from './internal';
|
|
8
|
+
export default function StatusIndicator({ type = 'success', wrapText = true, ...props }) {
|
|
9
|
+
const baseComponentProps = useBaseComponent('StatusIndicator', {
|
|
10
|
+
props: { colorOverride: props.colorOverride, type, wrapText },
|
|
11
|
+
});
|
|
12
|
+
return React.createElement(InternalStatusIndicator, { type: type, wrapText: wrapText, ...props, ...baseComponentProps });
|
|
13
|
+
}
|
|
17
14
|
applyDisplayName(StatusIndicator, 'StatusIndicator');
|
|
18
|
-
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -2,7 +2,7 @@ import { BaseComponentProps } from '../internal/base-component';
|
|
|
2
2
|
/**
|
|
3
3
|
* @awsuiSystem core
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
import { NativeAttributes } from '../internal/utils/with-native-attributes';
|
|
6
6
|
export interface StatusIndicatorProps extends BaseComponentProps {
|
|
7
7
|
/**
|
|
8
8
|
* Specifies the status type.
|
|
@@ -36,6 +36,7 @@ export interface StatusIndicatorProps extends BaseComponentProps {
|
|
|
36
36
|
*
|
|
37
37
|
* @awsuiSystem core
|
|
38
38
|
*/
|
|
39
|
+
nativeAttributes?: NativeAttributes<React.HTMLAttributes<HTMLElement>>;
|
|
39
40
|
}
|
|
40
41
|
export declare namespace StatusIndicatorProps {
|
|
41
42
|
type Type = 'error' | 'warning' | 'success' | 'info' | 'stopped' | 'pending' | 'in-progress' | 'loading' | 'not-started';
|
package/steps/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
'use client';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import
|
|
5
|
+
import { getBaseProps } from '../internal/base-component';
|
|
6
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
7
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
return React.createElement(
|
|
8
|
+
import { getExternalProps } from '../internal/utils/external-props';
|
|
9
|
+
import InternalSteps from './internal';
|
|
10
|
+
const Steps = ({ steps, ...props }) => {
|
|
11
|
+
const baseProps = getBaseProps(props);
|
|
12
|
+
const baseComponentProps = useBaseComponent('Steps');
|
|
13
|
+
const externalProps = getExternalProps(props);
|
|
14
|
+
return React.createElement(InternalSteps, { ...baseProps, ...baseComponentProps, ...externalProps, steps: steps });
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
16
|
applyDisplayName(Steps, 'Steps');
|
|
18
17
|
export default Steps;
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
package/steps/interfaces.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface StepsProps extends BaseComponentProps {
|
|
|
17
17
|
*
|
|
18
18
|
* @awsuiSystem core
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
orientation?: StepsProps.Orientation;
|
|
21
21
|
/**
|
|
22
22
|
* Render a step. This overrides the default icon, header, and details provided by the component.
|
|
23
23
|
* The function is called for each step and should return an object with the following keys:
|
|
@@ -27,7 +27,11 @@ export interface StepsProps extends BaseComponentProps {
|
|
|
27
27
|
*
|
|
28
28
|
* @awsuiSystem core
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
renderStep?: (step: StepsProps.Step) => {
|
|
31
|
+
header: React.ReactNode;
|
|
32
|
+
details?: React.ReactNode;
|
|
33
|
+
icon?: React.ReactNode;
|
|
34
|
+
};
|
|
31
35
|
/**
|
|
32
36
|
* Provides an `aria-label` to the progress steps container.
|
|
33
37
|
* Don't use `ariaLabel` and `ariaLabelledby` at the same time.
|
|
@@ -31,7 +31,7 @@ export interface TableHeaderCellProps<ItemType> {
|
|
|
31
31
|
isExpandable?: boolean;
|
|
32
32
|
hasDynamicContent?: boolean;
|
|
33
33
|
variant: TableProps.Variant;
|
|
34
|
-
tableVariant?:
|
|
34
|
+
tableVariant?: TableProps.Variant;
|
|
35
35
|
}
|
|
36
36
|
export declare function TableHeaderCell<ItemType>({
|
|
37
37
|
tabIndex,
|