@cloudscape-design/components 3.0.1156 → 3.0.1158
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/alert/styles.css.js +27 -27
- package/alert/styles.scoped.css +50 -50
- package/alert/styles.selectors.js +27 -27
- package/annotation-context/annotation/styles.css.js +13 -13
- package/annotation-context/annotation/styles.scoped.css +21 -21
- package/annotation-context/annotation/styles.selectors.js +13 -13
- package/app-layout/notifications/styles.css.js +3 -3
- package/app-layout/notifications/styles.scoped.css +7 -7
- package/app-layout/notifications/styles.selectors.js +3 -3
- 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/styles.css.js +86 -86
- package/app-layout/visual-refresh/styles.scoped.css +258 -258
- package/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +30 -30
- package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +89 -89
- package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +30 -30
- package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
- package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
- package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
- package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +27 -27
- package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +54 -54
- package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +27 -27
- package/attribute-editor/styles.css.js +15 -15
- package/attribute-editor/styles.scoped.css +28 -28
- package/attribute-editor/styles.selectors.js +15 -15
- 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/breadcrumb-group/item/styles.css.js +7 -7
- package/breadcrumb-group/item/styles.scoped.css +28 -28
- package/breadcrumb-group/item/styles.selectors.js +7 -7
- package/button/index.js +12 -11
- package/button/interfaces.d.ts +4 -2
- package/button/styles.css.js +22 -22
- package/button/styles.scoped.css +256 -256
- package/button/styles.selectors.js +22 -22
- package/button-dropdown/index.js +27 -11
- package/button-dropdown/interfaces.d.ts +6 -2
- package/button-dropdown/item-element/styles.css.js +20 -20
- package/button-dropdown/item-element/styles.scoped.css +34 -34
- package/button-dropdown/item-element/styles.selectors.js +20 -20
- 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/checkbox/styles.css.js +3 -3
- package/checkbox/styles.scoped.css +11 -11
- package/checkbox/styles.selectors.js +3 -3
- package/container/index.js +29 -13
- package/container/interfaces.d.ts +2 -1
- package/content-layout/styles.css.js +14 -14
- package/content-layout/styles.scoped.css +27 -27
- package/content-layout/styles.selectors.js +14 -14
- package/date-input/index.js +8 -10
- package/flashbar/index.js +10 -13
- package/flashbar/interfaces.d.ts +1 -0
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +187 -187
- package/flashbar/styles.selectors.js +50 -50
- package/help-panel/styles.css.js +6 -6
- package/help-panel/styles.scoped.css +73 -73
- package/help-panel/styles.selectors.js +6 -6
- 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/input/styles.css.js +13 -13
- package/input/styles.scoped.css +74 -74
- package/input/styles.selectors.js +13 -13
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/components/drag-handle-wrapper/styles.css.js +21 -21
- package/internal/components/drag-handle-wrapper/styles.scoped.css +49 -49
- package/internal/components/drag-handle-wrapper/styles.selectors.js +21 -21
- package/internal/components/dropdown/styles.css.js +20 -20
- package/internal/components/dropdown/styles.scoped.css +38 -38
- package/internal/components/dropdown/styles.selectors.js +20 -20
- package/internal/components/radio-button/interfaces.d.ts +3 -3
- package/internal/components/radio-button/styles.css.js +7 -7
- package/internal/components/radio-button/styles.scoped.css +18 -18
- package/internal/components/radio-button/styles.selectors.js +7 -7
- package/internal/components/token-list/styles.css.js +10 -10
- package/internal/components/token-list/styles.scoped.css +25 -25
- package/internal/components/token-list/styles.selectors.js +10 -10
- package/internal/environment.js +3 -3
- package/internal/environment.json +3 -3
- package/internal/generated/custom-css-properties/index.d.ts +5 -0
- package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/internal/generated/custom-css-properties/index.js +131 -126
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- 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/internal/types.d.ts +19 -1
- package/internal/types.d.ts.map +1 -1
- package/internal/types.js.map +1 -1
- package/link/index.js +25 -11
- package/link/interfaces.d.ts +3 -2
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +103 -103
- package/link/styles.selectors.js +20 -20
- 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/progress-bar/styles.css.js +19 -19
- package/progress-bar/styles.scoped.css +56 -56
- package/progress-bar/styles.selectors.js +19 -19
- package/prompt-input/index.js +19 -11
- package/prompt-input/interfaces.d.ts +4 -3
- package/prompt-input/styles.css.js +17 -17
- package/prompt-input/styles.scoped.css +79 -79
- package/prompt-input/styles.selectors.js +17 -17
- 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/segmented-control/styles.css.js +16 -16
- package/segmented-control/styles.scoped.css +46 -46
- package/segmented-control/styles.selectors.js +16 -16
- package/select/interfaces.d.ts +1 -1
- package/select/interfaces.js.map +1 -1
- package/slider/styles.css.js +26 -26
- package/slider/styles.scoped.css +86 -86
- package/slider/styles.selectors.js +26 -26
- 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/spinner/styles.css.js +13 -13
- package/spinner/styles.scoped.css +39 -39
- package/spinner/styles.selectors.js +13 -13
- 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/tabs/index.d.ts +1 -0
- package/tabs/index.d.ts.map +1 -1
- package/tabs/index.js +3 -3
- package/tabs/index.js.map +1 -1
- package/tabs/interfaces.d.ts +45 -0
- package/tabs/interfaces.d.ts.map +1 -1
- package/tabs/interfaces.js.map +1 -1
- package/tabs/styles.css.js +30 -30
- package/tabs/styles.d.ts +32 -0
- package/tabs/styles.d.ts.map +1 -0
- package/tabs/styles.js +47 -0
- package/tabs/styles.js.map +1 -0
- package/tabs/styles.scoped.css +77 -73
- package/tabs/styles.selectors.js +30 -30
- package/tabs/tab-header-bar.d.ts +3 -1
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js +6 -4
- package/tabs/tab-header-bar.js.map +1 -1
- package/tag-editor/styles.css.js +3 -3
- package/tag-editor/styles.scoped.css +13 -13
- package/tag-editor/styles.selectors.js +3 -3
- package/text-content/styles.css.js +1 -1
- package/text-content/styles.scoped.css +66 -66
- package/text-content/styles.selectors.js +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/textarea/styles.css.js +5 -5
- package/textarea/styles.scoped.css +45 -45
- package/textarea/styles.selectors.js +5 -5
- package/time-input/index.js +15 -11
- package/toggle/index.js +6 -10
- package/toggle/interfaces.d.ts +3 -2
- package/toggle/styles.css.js +10 -10
- package/toggle/styles.scoped.css +23 -23
- package/toggle/styles.selectors.js +10 -10
- 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/time-input/index.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
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 InternalTimeInput from './internal';
|
|
8
|
+
const TimeInput = React.forwardRef(({ format = 'hh:mm:ss', use24Hour = true, autoComplete = true, ...props }, ref) => {
|
|
9
|
+
const baseComponentProps = useBaseComponent('TimeInput', {
|
|
10
|
+
props: {
|
|
11
|
+
autoFocus: props.autoFocus,
|
|
12
|
+
disableBrowserAutocorrect: props.disableBrowserAutocorrect,
|
|
13
|
+
format,
|
|
14
|
+
readOnly: props.readOnly,
|
|
15
|
+
use24Hour,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
return (React.createElement(InternalTimeInput, { format: format, use24Hour: use24Hour, autoComplete: autoComplete, ...props, ...baseComponentProps, ref: ref }));
|
|
14
19
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
20
|
applyDisplayName(TimeInput, 'TimeInput');
|
|
18
21
|
export default TimeInput;
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
package/toggle/index.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
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
|
-
|
|
7
|
+
import InternalToggle from './internal';
|
|
11
8
|
const Toggle = React.forwardRef((props, ref) => {
|
|
12
|
-
|
|
13
|
-
return React.createElement(
|
|
9
|
+
const baseComponentProps = useBaseComponent('Toggle', { props: { readOnly: props.readOnly } });
|
|
10
|
+
return React.createElement(InternalToggle, { ...props, ...baseComponentProps, ref: ref, __injectAnalyticsComponentMetadata: true });
|
|
14
11
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
12
|
applyDisplayName(Toggle, 'Toggle');
|
|
18
13
|
export default Toggle;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
package/toggle/interfaces.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { NonCancelableEventHandler } from '../internal/events';
|
|
|
4
4
|
/**
|
|
5
5
|
* @awsuiSystem core
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
import { NativeAttributes } from '../internal/utils/with-native-attributes';
|
|
8
8
|
export interface ToggleProps extends BaseCheckboxProps {
|
|
9
9
|
/**
|
|
10
10
|
* The control's label that's displayed next to the toggle. Clicking this will invoke a state change.
|
|
@@ -15,7 +15,7 @@ export interface ToggleProps extends BaseCheckboxProps {
|
|
|
15
15
|
/**
|
|
16
16
|
* @awsuiSystem core
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
style?: ToggleProps.Style;
|
|
19
19
|
/**
|
|
20
20
|
* Attributes to add to the native `input` element.
|
|
21
21
|
* Some attributes will be automatically combined with internal attribute values:
|
|
@@ -26,6 +26,7 @@ export interface ToggleProps extends BaseCheckboxProps {
|
|
|
26
26
|
*
|
|
27
27
|
* @awsuiSystem core
|
|
28
28
|
*/
|
|
29
|
+
nativeInputAttributes?: NativeAttributes<React.InputHTMLAttributes<HTMLInputElement>>;
|
|
29
30
|
}
|
|
30
31
|
export declare namespace ToggleProps {
|
|
31
32
|
interface Ref {
|
package/toggle/styles.css.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"outline": "
|
|
6
|
-
"toggle-control": "awsui_toggle-
|
|
7
|
-
"toggle-control-checked": "awsui_toggle-control-
|
|
8
|
-
"toggle-control-disabled": "awsui_toggle-control-
|
|
9
|
-
"toggle-control-readonly": "awsui_toggle-control-
|
|
10
|
-
"toggle-handle": "awsui_toggle-
|
|
11
|
-
"toggle-handle-checked": "awsui_toggle-handle-
|
|
12
|
-
"toggle-handle-disabled": "awsui_toggle-handle-
|
|
13
|
-
"toggle-handle-readonly": "awsui_toggle-handle-
|
|
4
|
+
"root": "awsui_root_4yi2u_ki8y0_145",
|
|
5
|
+
"outline": "awsui_outline_4yi2u_ki8y0_178",
|
|
6
|
+
"toggle-control": "awsui_toggle-control_4yi2u_ki8y0_201",
|
|
7
|
+
"toggle-control-checked": "awsui_toggle-control-checked_4yi2u_ki8y0_214",
|
|
8
|
+
"toggle-control-disabled": "awsui_toggle-control-disabled_4yi2u_ki8y0_217",
|
|
9
|
+
"toggle-control-readonly": "awsui_toggle-control-readonly_4yi2u_ki8y0_223",
|
|
10
|
+
"toggle-handle": "awsui_toggle-handle_4yi2u_ki8y0_227",
|
|
11
|
+
"toggle-handle-checked": "awsui_toggle-handle-checked_4yi2u_ki8y0_252",
|
|
12
|
+
"toggle-handle-disabled": "awsui_toggle-handle-disabled_4yi2u_ki8y0_259",
|
|
13
|
+
"toggle-handle-readonly": "awsui_toggle-handle-readonly_4yi2u_ki8y0_263"
|
|
14
14
|
};
|
|
15
15
|
|
package/toggle/styles.scoped.css
CHANGED
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
*/
|
|
143
143
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
144
144
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
145
|
-
.
|
|
145
|
+
.awsui_root_4yi2u_ki8y0_145:not(#\9) {
|
|
146
146
|
border-collapse: separate;
|
|
147
147
|
border-spacing: 0;
|
|
148
148
|
box-sizing: border-box;
|
|
@@ -175,15 +175,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
175
175
|
display: flex;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
.
|
|
179
|
-
--awsui-style-focus-ring-box-shadow-
|
|
178
|
+
.awsui_outline_4yi2u_ki8y0_178:not(#\9) {
|
|
179
|
+
--awsui-style-focus-ring-box-shadow-rhu47t: 0 0 0 var(--awsui-style-focus-ring-border-width-rhu47t, 2px) var(--awsui-style-focus-ring-border-color-rhu47t, var(--color-border-item-focused-uk47pl, #006ce0));
|
|
180
180
|
position: relative;
|
|
181
181
|
}
|
|
182
|
-
.
|
|
182
|
+
.awsui_outline_4yi2u_ki8y0_178:not(#\9) {
|
|
183
183
|
outline: 2px dotted transparent;
|
|
184
184
|
outline-offset: calc(2px - 1px);
|
|
185
185
|
}
|
|
186
|
-
.
|
|
186
|
+
.awsui_outline_4yi2u_ki8y0_178:not(#\9)::before {
|
|
187
187
|
content: " ";
|
|
188
188
|
display: block;
|
|
189
189
|
position: absolute;
|
|
@@ -191,14 +191,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
191
191
|
inset-block-start: calc(-1 * 2px);
|
|
192
192
|
inline-size: calc(100% + 2px + 2px);
|
|
193
193
|
block-size: calc(100% + 2px + 2px);
|
|
194
|
-
border-start-start-radius: var(--awsui-style-focus-ring-border-radius-
|
|
195
|
-
border-start-end-radius: var(--awsui-style-focus-ring-border-radius-
|
|
196
|
-
border-end-start-radius: var(--awsui-style-focus-ring-border-radius-
|
|
197
|
-
border-end-end-radius: var(--awsui-style-focus-ring-border-radius-
|
|
198
|
-
box-shadow: var(--awsui-style-focus-ring-box-shadow-
|
|
194
|
+
border-start-start-radius: var(--awsui-style-focus-ring-border-radius-rhu47t, var(--border-radius-control-default-focus-ring-1uabki, 4px));
|
|
195
|
+
border-start-end-radius: var(--awsui-style-focus-ring-border-radius-rhu47t, var(--border-radius-control-default-focus-ring-1uabki, 4px));
|
|
196
|
+
border-end-start-radius: var(--awsui-style-focus-ring-border-radius-rhu47t, var(--border-radius-control-default-focus-ring-1uabki, 4px));
|
|
197
|
+
border-end-end-radius: var(--awsui-style-focus-ring-border-radius-rhu47t, var(--border-radius-control-default-focus-ring-1uabki, 4px));
|
|
198
|
+
box-shadow: var(--awsui-style-focus-ring-box-shadow-rhu47t);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
.awsui_toggle-
|
|
201
|
+
.awsui_toggle-control_4yi2u_ki8y0_201:not(#\9) {
|
|
202
202
|
forced-color-adjust: none;
|
|
203
203
|
margin-block-start: calc((var(--line-height-body-m-2mh3ke, 20px) - 16px) / 2);
|
|
204
204
|
min-block-size: 16px;
|
|
@@ -211,20 +211,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
211
211
|
border-end-start-radius: 8px;
|
|
212
212
|
border-end-end-radius: 8px;
|
|
213
213
|
}
|
|
214
|
-
.awsui_toggle-control-
|
|
214
|
+
.awsui_toggle-control-checked_4yi2u_ki8y0_214:not(#\9) {
|
|
215
215
|
background: var(--color-background-control-checked-ka7kc2, #006ce0);
|
|
216
216
|
}
|
|
217
|
-
.awsui_toggle-control-
|
|
217
|
+
.awsui_toggle-control-disabled_4yi2u_ki8y0_217:not(#\9) {
|
|
218
218
|
background: var(--color-background-control-disabled-1f3718, #dedee3);
|
|
219
219
|
}
|
|
220
|
-
.awsui_toggle-control-
|
|
220
|
+
.awsui_toggle-control-disabled_4yi2u_ki8y0_217.awsui_toggle-control-checked_4yi2u_ki8y0_214:not(#\9) {
|
|
221
221
|
background: var(--color-background-toggle-checked-disabled-amxc0a, #b8e7ff);
|
|
222
222
|
}
|
|
223
|
-
.awsui_toggle-control-
|
|
223
|
+
.awsui_toggle-control-readonly_4yi2u_ki8y0_223:not(#\9) {
|
|
224
224
|
background: var(--color-background-control-disabled-1f3718, #dedee3);
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
.awsui_toggle-
|
|
227
|
+
.awsui_toggle-handle_4yi2u_ki8y0_227:not(#\9) {
|
|
228
228
|
display: block;
|
|
229
229
|
position: absolute;
|
|
230
230
|
border-start-start-radius: 6px;
|
|
@@ -240,29 +240,29 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
240
240
|
transition: transform var(--motion-duration-fast-unntf6, 90ms) var(--motion-easing-ease-out-quart-p9axhm, cubic-bezier(0.165, 0.84, 0.44, 1)), background-color var(--motion-duration-fast-unntf6, 90ms) var(--motion-easing-ease-out-quart-p9axhm, cubic-bezier(0.165, 0.84, 0.44, 1));
|
|
241
241
|
}
|
|
242
242
|
@media (prefers-reduced-motion: reduce) {
|
|
243
|
-
.awsui_toggle-
|
|
243
|
+
.awsui_toggle-handle_4yi2u_ki8y0_227:not(#\9) {
|
|
244
244
|
animation: none;
|
|
245
245
|
transition: none;
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
|
-
.awsui-motion-disabled .awsui_toggle-
|
|
248
|
+
.awsui-motion-disabled .awsui_toggle-handle_4yi2u_ki8y0_227:not(#\9), .awsui-mode-entering .awsui_toggle-handle_4yi2u_ki8y0_227:not(#\9) {
|
|
249
249
|
animation: none;
|
|
250
250
|
transition: none;
|
|
251
251
|
}
|
|
252
|
-
.awsui_toggle-handle-
|
|
252
|
+
.awsui_toggle-handle-checked_4yi2u_ki8y0_252:not(#\9) {
|
|
253
253
|
transform: translateX(8px);
|
|
254
254
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
255
255
|
}
|
|
256
|
-
.awsui_toggle-handle-
|
|
256
|
+
.awsui_toggle-handle-checked_4yi2u_ki8y0_252:not(#\9):dir(rtl) {
|
|
257
257
|
transform: translateX(-8px);
|
|
258
258
|
}
|
|
259
|
-
.awsui_toggle-handle-
|
|
259
|
+
.awsui_toggle-handle-disabled_4yi2u_ki8y0_259:not(#\9) {
|
|
260
260
|
background: var(--color-foreground-control-disabled-txi6cf, #ffffff);
|
|
261
261
|
box-shadow: none;
|
|
262
262
|
}
|
|
263
|
-
.awsui_toggle-handle-
|
|
263
|
+
.awsui_toggle-handle-readonly_4yi2u_ki8y0_263:not(#\9):not(.awsui_toggle-handle-disabled_4yi2u_ki8y0_259) {
|
|
264
264
|
box-shadow: none;
|
|
265
265
|
}
|
|
266
|
-
.awsui_toggle-handle-
|
|
266
|
+
.awsui_toggle-handle-readonly_4yi2u_ki8y0_263:not(#\9):not(.awsui_toggle-handle-disabled_4yi2u_ki8y0_259).awsui_toggle-handle-checked_4yi2u_ki8y0_252 {
|
|
267
267
|
background: var(--color-foreground-control-read-only-7ydvuj, #656871);
|
|
268
268
|
}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"outline": "
|
|
7
|
-
"toggle-control": "awsui_toggle-
|
|
8
|
-
"toggle-control-checked": "awsui_toggle-control-
|
|
9
|
-
"toggle-control-disabled": "awsui_toggle-control-
|
|
10
|
-
"toggle-control-readonly": "awsui_toggle-control-
|
|
11
|
-
"toggle-handle": "awsui_toggle-
|
|
12
|
-
"toggle-handle-checked": "awsui_toggle-handle-
|
|
13
|
-
"toggle-handle-disabled": "awsui_toggle-handle-
|
|
14
|
-
"toggle-handle-readonly": "awsui_toggle-handle-
|
|
5
|
+
"root": "awsui_root_4yi2u_ki8y0_145",
|
|
6
|
+
"outline": "awsui_outline_4yi2u_ki8y0_178",
|
|
7
|
+
"toggle-control": "awsui_toggle-control_4yi2u_ki8y0_201",
|
|
8
|
+
"toggle-control-checked": "awsui_toggle-control-checked_4yi2u_ki8y0_214",
|
|
9
|
+
"toggle-control-disabled": "awsui_toggle-control-disabled_4yi2u_ki8y0_217",
|
|
10
|
+
"toggle-control-readonly": "awsui_toggle-control-readonly_4yi2u_ki8y0_223",
|
|
11
|
+
"toggle-handle": "awsui_toggle-handle_4yi2u_ki8y0_227",
|
|
12
|
+
"toggle-handle-checked": "awsui_toggle-handle-checked_4yi2u_ki8y0_252",
|
|
13
|
+
"toggle-handle-disabled": "awsui_toggle-handle-disabled_4yi2u_ki8y0_259",
|
|
14
|
+
"toggle-handle-readonly": "awsui_toggle-handle-readonly_4yi2u_ki8y0_263"
|
|
15
15
|
};
|
|
16
16
|
|
package/toggle-button/index.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import { InternalToggleButton } from './internal';
|
|
9
|
+
const ToggleButton = React.forwardRef(({ children, iconName, pressedIconName, iconUrl, pressedIconUrl, iconSvg, pressedIconSvg, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, ariaLabel, ariaDescribedby, ariaControls, pressed = false, nativeButtonAttributes, onChange, ...props }, ref) => {
|
|
10
|
+
const baseComponentProps = useBaseComponent('ToggleButton', {
|
|
11
|
+
props: { iconName, pressedIconName, pressed, variant, wrapText },
|
|
12
|
+
metadata: {
|
|
13
|
+
hasDisabledReason: Boolean(disabledReason),
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
const baseProps = getBaseProps(props);
|
|
17
|
+
return (React.createElement(InternalToggleButton, { ...baseProps, ...baseComponentProps, ref: ref, iconName: iconName, iconUrl: iconUrl, iconSvg: iconSvg, variant: variant, loading: loading, loadingText: loadingText, disabled: disabled, disabledReason: disabledReason, wrapText: wrapText, ariaLabel: ariaLabel, ariaDescribedby: ariaDescribedby, ariaControls: ariaControls, pressedIconName: pressedIconName, pressedIconUrl: pressedIconUrl, pressedIconSvg: pressedIconSvg, pressed: pressed, nativeButtonAttributes: nativeButtonAttributes, onChange: onChange }, children));
|
|
14
18
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
19
|
applyDisplayName(ToggleButton, 'ToggleButton');
|
|
18
20
|
export default ToggleButton;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
package/wizard/index.js
CHANGED
|
@@ -1,18 +1,40 @@
|
|
|
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 } from 'react';
|
|
5
|
+
import { AnalyticsFunnel } from '../internal/analytics/components/analytics-funnel';
|
|
6
|
+
import { useFunnel } from '../internal/analytics/hooks/use-funnel';
|
|
7
|
+
import { getAnalyticsMetadataProps } from '../internal/base-component';
|
|
8
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
9
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
import { getExternalProps } from '../internal/utils/external-props';
|
|
11
|
+
import { getStepConfiguration } from './analytics';
|
|
12
|
+
import InternalWizard from './internal';
|
|
13
|
+
import analyticsSelectors from './analytics-metadata/styles.css.js';
|
|
14
|
+
function Wizard({ isLoadingNextStep = false, allowSkipTo = false, ...props }) {
|
|
15
|
+
const analyticsMetadata = getAnalyticsMetadataProps(props);
|
|
16
|
+
const baseComponentProps = useBaseComponent('Wizard', {
|
|
17
|
+
props: {
|
|
18
|
+
allowSkipTo,
|
|
19
|
+
flowType: analyticsMetadata.flowType,
|
|
20
|
+
},
|
|
21
|
+
metadata: {
|
|
22
|
+
hasInstanceIdentifier: Boolean(analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier),
|
|
23
|
+
hasResourceType: Boolean(analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.resourceType),
|
|
24
|
+
},
|
|
25
|
+
}, analyticsMetadata);
|
|
26
|
+
const { wizardCount } = useFunnel();
|
|
27
|
+
const externalProps = getExternalProps(props);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
wizardCount.current++;
|
|
30
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
|
+
return () => void wizardCount.current--;
|
|
32
|
+
}, [wizardCount]);
|
|
33
|
+
return (React.createElement(AnalyticsFunnel, { funnelIdentifier: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier, funnelFlowType: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.flowType, funnelErrorContext: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.errorContext, funnelResourceType: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.resourceType, funnelType: "multi-page", optionalStepNumbers: props.steps
|
|
34
|
+
.map((step, index) => (step.isOptional ? index + 1 : -1))
|
|
35
|
+
.filter(step => step !== -1), totalFunnelSteps: props.steps.length, stepConfiguration: getStepConfiguration(props.steps), componentSelectors: () => [`.${analyticsSelectors.root}`] },
|
|
36
|
+
React.createElement(InternalWizard, { isLoadingNextStep: isLoadingNextStep, allowSkipTo: allowSkipTo, ...externalProps, ...baseComponentProps, __injectAnalyticsComponentMetadata: true })));
|
|
37
|
+
}
|
|
17
38
|
applyDisplayName(Wizard, 'Wizard');
|
|
18
39
|
export default Wizard;
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
package/wizard/interfaces.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ export interface WizardProps extends BaseComponentProps {
|
|
|
96
96
|
*
|
|
97
97
|
* @awsuiSystem core
|
|
98
98
|
*/
|
|
99
|
-
|
|
99
|
+
customPrimaryActions?: React.ReactNode;
|
|
100
100
|
/**
|
|
101
101
|
* Specifies left-aligned secondary actions for the wizard. Use a button dropdown if multiple actions are required.
|
|
102
102
|
*/
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
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 InternalAutosuggest from './internal';
|
|
10
|
-
const Autosuggest = React.forwardRef(({ filteringType = 'auto', statusType = 'finished', disableBrowserAutocorrect = false, hideEnteredTextOption = false, ...props }, ref) => {
|
|
11
|
-
const baseComponentProps = useBaseComponent('Autosuggest', {
|
|
12
|
-
props: {
|
|
13
|
-
autoFocus: props.autoFocus,
|
|
14
|
-
disableBrowserAutocorrect,
|
|
15
|
-
expandToViewport: props.expandToViewport,
|
|
16
|
-
filteringType,
|
|
17
|
-
readOnly: props.readOnly,
|
|
18
|
-
virtualScroll: props.virtualScroll,
|
|
19
|
-
hideEnteredTextOption,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
const componentAnalyticsMetadata = {
|
|
23
|
-
name: 'awsui.Autosuggest',
|
|
24
|
-
label: 'input',
|
|
25
|
-
properties: {
|
|
26
|
-
disabled: `${!!props.disabled}`,
|
|
27
|
-
value: props.value || '',
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
const externalProps = getExternalProps(props);
|
|
31
|
-
return (React.createElement(InternalAutosuggest, { filteringType: filteringType, statusType: statusType, disableBrowserAutocorrect: disableBrowserAutocorrect, hideEnteredTextOption: hideEnteredTextOption, ...externalProps, ...baseComponentProps, ref: ref, ...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }) }));
|
|
32
|
-
});
|
|
33
|
-
applyDisplayName(Autosuggest, 'Autosuggest');
|
|
34
|
-
export default Autosuggest;
|
|
35
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
|
-
import { getBaseProps } from '../internal/base-component';
|
|
7
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
8
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
9
|
-
import WithNativeAttributes from '../internal/utils/with-native-attributes';
|
|
10
|
-
import { getBadgeStyles } from './style';
|
|
11
|
-
import styles from './styles.css.js';
|
|
12
|
-
export default function Badge({ color = 'grey', children, style, nativeAttributes, ...rest }) {
|
|
13
|
-
const { __internalRootRef } = useBaseComponent('Badge', { props: { color } });
|
|
14
|
-
const baseProps = getBaseProps(rest);
|
|
15
|
-
const className = clsx(baseProps.className, styles.badge, styles[`badge-color-${color}`]);
|
|
16
|
-
return (React.createElement(WithNativeAttributes, { ...baseProps, tag: "span", componentName: "Badge", nativeAttributes: nativeAttributes, className: className, ref: __internalRootRef, style: getBadgeStyles(style) }, children));
|
|
17
|
-
}
|
|
18
|
-
applyDisplayName(Badge, 'Badge');
|
|
19
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import InternalBox from './internal';
|
|
8
|
-
export default function Box({ variant = 'div', margin = {}, padding = {}, ...props }) {
|
|
9
|
-
const baseComponentProps = useBaseComponent('Box', {
|
|
10
|
-
props: {
|
|
11
|
-
color: props.color,
|
|
12
|
-
display: props.display,
|
|
13
|
-
float: props.float,
|
|
14
|
-
fontSize: props.fontSize,
|
|
15
|
-
fontWeight: props.fontWeight,
|
|
16
|
-
textAlign: props.textAlign,
|
|
17
|
-
variant,
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
return React.createElement(InternalBox, { variant: variant, margin: margin, padding: padding, ...props, ...baseComponentProps });
|
|
21
|
-
}
|
|
22
|
-
applyDisplayName(Box, 'Box');
|
|
23
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
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 { InternalButton } from './internal';
|
|
9
|
-
const Button = React.forwardRef(({ children, iconName, iconAlign = 'left', iconUrl, iconSvg, iconAlt, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, wrapText = true, href, target, rel, external = false, download, formAction = 'submit', ariaLabel, ariaDescribedby, onClick, onFollow, ariaExpanded, ariaControls, fullWidth, form, i18nStrings, style, nativeButtonAttributes, nativeAnchorAttributes, ...props }, ref) => {
|
|
10
|
-
const baseComponentProps = useBaseComponent('Button', {
|
|
11
|
-
props: { formAction, fullWidth, iconAlign, iconName, rel, target, external, variant, wrapText },
|
|
12
|
-
metadata: { hasDisabledReason: Boolean(disabledReason) },
|
|
13
|
-
});
|
|
14
|
-
const baseProps = getBaseProps(props);
|
|
15
|
-
return (React.createElement(InternalButton, { ...baseProps, ...baseComponentProps, ref: ref, iconName: iconName, iconAlign: iconAlign, iconUrl: iconUrl, iconSvg: iconSvg, iconAlt: iconAlt, variant: variant, loading: loading, loadingText: loadingText, disabled: disabled, disabledReason: disabledReason, wrapText: wrapText, href: href, target: target, rel: rel, external: external, download: download, formAction: formAction, ariaLabel: ariaLabel, ariaDescribedby: ariaDescribedby, onClick: onClick, onFollow: onFollow, ariaExpanded: ariaExpanded, ariaControls: ariaControls, fullWidth: fullWidth, form: form, i18nStrings: i18nStrings, style: style, nativeButtonAttributes: nativeButtonAttributes, nativeAnchorAttributes: nativeAnchorAttributes, __injectAnalyticsComponentMetadata: true }, children));
|
|
16
|
-
});
|
|
17
|
-
applyDisplayName(Button, 'Button');
|
|
18
|
-
export default Button;
|
|
19
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
6
|
-
import { getBaseProps } from '../internal/base-component';
|
|
7
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
8
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
9
|
-
import InternalButtonDropdown from './internal';
|
|
10
|
-
import { hasCheckboxItems, hasDisabledReasonItems } from './utils/utils';
|
|
11
|
-
import analyticsSelectors from './analytics-metadata/styles.css.js';
|
|
12
|
-
const ButtonDropdown = React.forwardRef(({ items, variant = 'normal', loading = false, loadingText, disabled = false, disabledReason, expandableGroups = false, expandToViewport = false, ariaLabel, children, onItemClick, onItemFollow, mainAction, fullWidth, nativeMainActionAttributes, nativeTriggerAttributes, ...props }, ref) => {
|
|
13
|
-
const baseComponentProps = useBaseComponent('ButtonDropdown', {
|
|
14
|
-
props: { expandToViewport, expandableGroups, variant },
|
|
15
|
-
metadata: {
|
|
16
|
-
mainAction: !!mainAction,
|
|
17
|
-
checkboxItems: hasCheckboxItems(items),
|
|
18
|
-
hasDisabledReason: Boolean(disabledReason),
|
|
19
|
-
hasDisabledReasons: hasDisabledReasonItems(items),
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
const baseProps = getBaseProps(props);
|
|
23
|
-
const analyticsComponentMetadata = {
|
|
24
|
-
name: 'awsui.ButtonDropdown',
|
|
25
|
-
label: `.${analyticsSelectors['trigger-label']}`,
|
|
26
|
-
properties: { variant, disabled: `${disabled}` },
|
|
27
|
-
};
|
|
28
|
-
return (React.createElement(InternalButtonDropdown, { ...baseProps, ...baseComponentProps, ref: ref, items: items, variant: variant, loading: loading, loadingText: loadingText, disabled: disabled, disabledReason: disabledReason, expandableGroups: expandableGroups, expandToViewport: expandToViewport, ariaLabel: ariaLabel, onItemClick: onItemClick, onItemFollow: onItemFollow, mainAction: mainAction, fullWidth: fullWidth, nativeMainActionAttributes: nativeMainActionAttributes, nativeTriggerAttributes: nativeTriggerAttributes, ...getAnalyticsMetadataAttribute({
|
|
29
|
-
component: analyticsComponentMetadata,
|
|
30
|
-
}) }, children));
|
|
31
|
-
});
|
|
32
|
-
applyDisplayName(ButtonDropdown, 'ButtonDropdown');
|
|
33
|
-
export default ButtonDropdown;
|
|
34
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
6
|
-
import { getBaseProps } from '../internal/base-component';
|
|
7
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
8
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
9
|
-
import { getExternalProps } from '../internal/utils/external-props';
|
|
10
|
-
import InternalButtonGroup from './internal';
|
|
11
|
-
const ButtonGroup = React.forwardRef(({ variant, dropdownExpandToViewport = false, style, ...rest }, ref) => {
|
|
12
|
-
const baseProps = getBaseProps(rest);
|
|
13
|
-
const itemCounts = getItemCounts(rest.items);
|
|
14
|
-
const baseComponentProps = useBaseComponent('ButtonGroup', {
|
|
15
|
-
props: {
|
|
16
|
-
variant,
|
|
17
|
-
dropdownExpandToViewport,
|
|
18
|
-
},
|
|
19
|
-
metadata: {
|
|
20
|
-
iconButtonsCount: itemCounts['icon-button'],
|
|
21
|
-
iconToggleButtonsCount: itemCounts['icon-toggle-button'],
|
|
22
|
-
iconFileInputsCount: itemCounts['icon-file-input'],
|
|
23
|
-
menuDropdownsCount: itemCounts['menu-dropdown'],
|
|
24
|
-
groupsCount: itemCounts.group,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
const externalProps = getExternalProps(rest);
|
|
28
|
-
const componentMetadata = {
|
|
29
|
-
name: 'awsui.ButtonGroup',
|
|
30
|
-
label: { root: 'self' },
|
|
31
|
-
};
|
|
32
|
-
return (React.createElement(InternalButtonGroup, { ...baseProps, ...baseComponentProps, ...externalProps, ref: ref, variant: variant, dropdownExpandToViewport: dropdownExpandToViewport, style: style, ...getAnalyticsMetadataAttribute({ component: componentMetadata }) }));
|
|
33
|
-
});
|
|
34
|
-
function getItemCounts(allItems = []) {
|
|
35
|
-
const counters = { 'icon-button': 0, 'icon-toggle-button': 0, 'icon-file-input': 0, 'menu-dropdown': 0, group: 0 };
|
|
36
|
-
function count(items) {
|
|
37
|
-
for (const item of items) {
|
|
38
|
-
counters[item.type] += 1;
|
|
39
|
-
if (item.type === 'group') {
|
|
40
|
-
count(item.items);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
count(allItems);
|
|
45
|
-
return counters;
|
|
46
|
-
}
|
|
47
|
-
applyDisplayName(ButtonGroup, 'ButtonGroup');
|
|
48
|
-
export default ButtonGroup;
|
|
49
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import InternalCheckbox from './internal';
|
|
8
|
-
const Checkbox = React.forwardRef(({ ...props }, ref) => {
|
|
9
|
-
const baseComponentProps = useBaseComponent('Checkbox', {
|
|
10
|
-
props: { readOnly: props.readOnly },
|
|
11
|
-
});
|
|
12
|
-
return React.createElement(InternalCheckbox, { ...props, ...baseComponentProps, ref: ref, __injectAnalyticsComponentMetadata: true });
|
|
13
|
-
});
|
|
14
|
-
applyDisplayName(Checkbox, 'Checkbox');
|
|
15
|
-
export default Checkbox;
|
|
16
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
6
|
-
import { AnalyticsFunnelSubStep } from '../internal/analytics/components/analytics-funnel';
|
|
7
|
-
import { getAnalyticsMetadataProps } from '../internal/base-component';
|
|
8
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
9
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
10
|
-
import { getExternalProps } from '../internal/utils/external-props';
|
|
11
|
-
import { InternalContainerAsSubstep } from './internal';
|
|
12
|
-
export default function Container({ variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false, fitHeight = false, ...props }) {
|
|
13
|
-
const analyticsMetadata = getAnalyticsMetadataProps(props);
|
|
14
|
-
const baseComponentProps = useBaseComponent('Container', {
|
|
15
|
-
props: {
|
|
16
|
-
disableContentPaddings,
|
|
17
|
-
disableHeaderPaddings,
|
|
18
|
-
fitHeight,
|
|
19
|
-
variant,
|
|
20
|
-
},
|
|
21
|
-
metadata: {
|
|
22
|
-
hasInstanceIdentifier: Boolean(analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier),
|
|
23
|
-
},
|
|
24
|
-
}, analyticsMetadata);
|
|
25
|
-
const externalProps = getExternalProps(props);
|
|
26
|
-
const analyticsComponentMetadata = {
|
|
27
|
-
name: 'awsui.Container',
|
|
28
|
-
label: { root: 'self' },
|
|
29
|
-
};
|
|
30
|
-
return (React.createElement(AnalyticsFunnelSubStep, { subStepIdentifier: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier, subStepErrorContext: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.errorContext },
|
|
31
|
-
React.createElement(InternalContainerAsSubstep, { variant: variant, disableContentPaddings: disableContentPaddings, disableHeaderPaddings: disableHeaderPaddings, fitHeight: fitHeight, ...props, ...externalProps, ...baseComponentProps, ...getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata }) })));
|
|
32
|
-
}
|
|
33
|
-
applyDisplayName(Container, 'Container');
|
|
34
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import InternalDateInput from './internal';
|
|
8
|
-
const DateInput = React.forwardRef((props, ref) => {
|
|
9
|
-
const baseComponentProps = useBaseComponent('DateInput', {
|
|
10
|
-
props: { autoFocus: props.autoFocus, readOnly: props.readOnly },
|
|
11
|
-
});
|
|
12
|
-
return React.createElement(InternalDateInput, { ...props, ...baseComponentProps, __injectAnalyticsComponentMetadata: true, ref: ref });
|
|
13
|
-
});
|
|
14
|
-
applyDisplayName(DateInput, 'DateInput');
|
|
15
|
-
export default DateInput;
|
|
16
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
6
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
7
|
-
import { InternalFlashbar } from './internal';
|
|
8
|
-
export default function Flashbar(props) {
|
|
9
|
-
const { __internalRootRef } = useBaseComponent('Flashbar', {
|
|
10
|
-
props: { stackItems: props.stackItems },
|
|
11
|
-
});
|
|
12
|
-
return React.createElement(InternalFlashbar, { __internalRootRef: __internalRootRef, ...props });
|
|
13
|
-
}
|
|
14
|
-
applyDisplayName(Flashbar, 'Flashbar');
|
|
15
|
-
//# sourceMappingURL=internal-do-not-use-core.js.map
|