@cloudscape-design/components 3.0.524 → 3.0.526
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app-layout/defaults.d.ts +2 -2
- package/app-layout/defaults.d.ts.map +1 -1
- package/app-layout/defaults.js.map +1 -1
- package/app-layout/drawer/interfaces.d.ts +2 -3
- package/app-layout/drawer/interfaces.d.ts.map +1 -1
- package/app-layout/drawer/interfaces.js.map +1 -1
- package/app-layout/drawer/resizable-drawer.d.ts +1 -1
- package/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
- package/app-layout/drawer/resizable-drawer.js +9 -18
- package/app-layout/drawer/resizable-drawer.js.map +1 -1
- package/app-layout/index.d.ts.map +1 -1
- package/app-layout/index.js +41 -79
- package/app-layout/index.js.map +1 -1
- package/app-layout/split-panel/constants.d.ts +3 -0
- package/app-layout/split-panel/constants.d.ts.map +1 -0
- package/app-layout/split-panel/constants.js +5 -0
- package/app-layout/split-panel/constants.js.map +1 -0
- package/app-layout/split-panel/index.d.ts +1 -0
- package/app-layout/split-panel/index.d.ts.map +1 -1
- package/app-layout/split-panel/index.js +1 -0
- package/app-layout/split-panel/index.js.map +1 -1
- package/app-layout/split-panel/provider.d.ts +2 -2
- package/app-layout/split-panel/provider.d.ts.map +1 -1
- package/app-layout/split-panel/provider.js +18 -16
- package/app-layout/split-panel/provider.js.map +1 -1
- package/app-layout/utils/use-app-layout-rect.d.ts +8 -0
- package/app-layout/utils/use-app-layout-rect.d.ts.map +1 -0
- package/app-layout/utils/{use-content-width.js → use-app-layout-rect.js} +6 -5
- package/app-layout/utils/use-app-layout-rect.js.map +1 -0
- package/app-layout/visual-refresh/split-panel.js +1 -1
- package/app-layout/visual-refresh/split-panel.js.map +1 -1
- package/button-dropdown/styles.css.js +15 -15
- package/button-dropdown/styles.scoped.css +23 -23
- package/button-dropdown/styles.selectors.js +15 -15
- package/container/index.d.ts +1 -1
- package/container/index.d.ts.map +1 -1
- package/container/index.js +5 -3
- package/container/index.js.map +1 -1
- package/flashbar/common.d.ts +0 -1
- package/flashbar/common.d.ts.map +1 -1
- package/flashbar/common.js +3 -2
- package/flashbar/common.js.map +1 -1
- package/internal/base-component/styles.scoped.css +0 -5
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/theming/index.cjs +0 -31
- package/internal/generated/theming/index.js +0 -31
- package/internal/hooks/use-base-component/index.d.ts +2 -1
- package/internal/hooks/use-base-component/index.d.ts.map +1 -1
- package/internal/hooks/use-base-component/index.js +2 -2
- package/internal/hooks/use-base-component/index.js.map +1 -1
- package/internal/hooks/use-telemetry/index.d.ts +2 -1
- package/internal/hooks/use-telemetry/index.d.ts.map +1 -1
- package/internal/hooks/use-telemetry/index.js +2 -2
- package/internal/hooks/use-telemetry/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/table/index.d.ts.map +1 -1
- package/table/index.js +11 -1
- package/table/index.js.map +1 -1
- package/app-layout/utils/use-content-width.d.ts +0 -5
- package/app-layout/utils/use-content-width.d.ts.map +0 -1
- package/app-layout/utils/use-content-width.js.map +0 -1
- package/app-layout/utils/use-window-width.d.ts +0 -2
- package/app-layout/utils/use-window-width.d.ts.map +0 -1
- package/app-layout/utils/use-window-width.js +0 -13
- package/app-layout/utils/use-window-width.js.map +0 -1
|
@@ -90,60 +90,60 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.awsui_button-
|
|
93
|
+
.awsui_button-dropdown_sne0l_nfcqc_93:not(#\9) {
|
|
94
94
|
display: inline-block;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.awsui_items-list-
|
|
97
|
+
.awsui_items-list-container_sne0l_nfcqc_97:not(#\9) {
|
|
98
98
|
padding-block: 0;
|
|
99
99
|
padding-inline: 0;
|
|
100
100
|
margin-block: 0;
|
|
101
101
|
margin-inline: 0;
|
|
102
|
-
animation: awsui_awsui-motion-fade-in-
|
|
102
|
+
animation: awsui_awsui-motion-fade-in-0_sne0l_nfcqc_1 500ms var(--motion-easing-show-quick-vc5zgd, ease-out);
|
|
103
103
|
animation-fill-mode: none;
|
|
104
104
|
}
|
|
105
105
|
@media (prefers-reduced-motion: reduce) {
|
|
106
|
-
.awsui_items-list-
|
|
106
|
+
.awsui_items-list-container_sne0l_nfcqc_97:not(#\9) {
|
|
107
107
|
animation: none;
|
|
108
108
|
transition: none;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
.awsui-motion-disabled .awsui_items-list-
|
|
111
|
+
.awsui-motion-disabled .awsui_items-list-container_sne0l_nfcqc_97:not(#\9), .awsui-mode-entering .awsui_items-list-container_sne0l_nfcqc_97:not(#\9) {
|
|
112
112
|
animation: none;
|
|
113
113
|
transition: none;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
.awsui_rotate-
|
|
116
|
+
.awsui_rotate-up_sne0l_nfcqc_116:not(#\9) {
|
|
117
117
|
transform: rotate(-180deg);
|
|
118
118
|
transition: transform var(--motion-duration-rotate-180-dpvl4m, 135ms) var(--motion-easing-rotate-180-e270ko, cubic-bezier(0.165, 0.84, 0.44, 1));
|
|
119
119
|
}
|
|
120
120
|
@media (prefers-reduced-motion: reduce) {
|
|
121
|
-
.awsui_rotate-
|
|
121
|
+
.awsui_rotate-up_sne0l_nfcqc_116:not(#\9) {
|
|
122
122
|
animation: none;
|
|
123
123
|
transition: none;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
.awsui-motion-disabled .awsui_rotate-
|
|
126
|
+
.awsui-motion-disabled .awsui_rotate-up_sne0l_nfcqc_116:not(#\9), .awsui-mode-entering .awsui_rotate-up_sne0l_nfcqc_116:not(#\9) {
|
|
127
127
|
animation: none;
|
|
128
128
|
transition: none;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
.awsui_rotate-
|
|
131
|
+
.awsui_rotate-down_sne0l_nfcqc_131:not(#\9) {
|
|
132
132
|
transform: rotate(0deg);
|
|
133
133
|
transition: transform var(--motion-duration-rotate-180-dpvl4m, 135ms) var(--motion-easing-rotate-180-e270ko, cubic-bezier(0.165, 0.84, 0.44, 1));
|
|
134
134
|
}
|
|
135
135
|
@media (prefers-reduced-motion: reduce) {
|
|
136
|
-
.awsui_rotate-
|
|
136
|
+
.awsui_rotate-down_sne0l_nfcqc_131:not(#\9) {
|
|
137
137
|
animation: none;
|
|
138
138
|
transition: none;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
.awsui-motion-disabled .awsui_rotate-
|
|
141
|
+
.awsui-motion-disabled .awsui_rotate-down_sne0l_nfcqc_131:not(#\9), .awsui-mode-entering .awsui_rotate-down_sne0l_nfcqc_131:not(#\9) {
|
|
142
142
|
animation: none;
|
|
143
143
|
transition: none;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
.
|
|
146
|
+
.awsui_header_sne0l_nfcqc_146:not(#\9) {
|
|
147
147
|
display: flex;
|
|
148
148
|
flex-direction: column;
|
|
149
149
|
list-style: none;
|
|
@@ -154,40 +154,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
border-inline: var(--border-field-width-09w7vk, 2px) solid transparent;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
.
|
|
158
|
-
.
|
|
159
|
-
color: var(--color-text-
|
|
157
|
+
.awsui_title_sne0l_nfcqc_157:not(#\9),
|
|
158
|
+
.awsui_description_sne0l_nfcqc_158:not(#\9) {
|
|
159
|
+
color: var(--color-text-top-navigation-title-v7rgbf, #000716);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
.awsui_split-trigger-
|
|
162
|
+
.awsui_split-trigger-wrapper_sne0l_nfcqc_162:not(#\9) {
|
|
163
163
|
display: flex;
|
|
164
164
|
}
|
|
165
|
-
.awsui_split-trigger-
|
|
165
|
+
.awsui_split-trigger-wrapper_sne0l_nfcqc_162 > .awsui_trigger-item_sne0l_nfcqc_165 > button:not(#\9):focus {
|
|
166
166
|
z-index: 1;
|
|
167
167
|
}
|
|
168
|
-
.awsui_split-trigger-
|
|
168
|
+
.awsui_split-trigger-wrapper_sne0l_nfcqc_162 > .awsui_trigger-item_sne0l_nfcqc_165:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_nfcqc_168 {
|
|
169
169
|
border-start-end-radius: 0;
|
|
170
170
|
border-end-end-radius: 0;
|
|
171
171
|
padding-inline-end: var(--space-m-udix3p, 16px);
|
|
172
172
|
margin-inline-end: var(--space-xxxs-zbmxqb, 2px);
|
|
173
173
|
}
|
|
174
|
-
.awsui_split-trigger-
|
|
174
|
+
.awsui_split-trigger-wrapper_sne0l_nfcqc_162 > .awsui_trigger-item_sne0l_nfcqc_165:not(#\9):not(:first-child) > .awsui_trigger-button_sne0l_nfcqc_168 {
|
|
175
175
|
border-start-start-radius: 0;
|
|
176
176
|
border-end-start-radius: 0;
|
|
177
177
|
padding-inline: calc(var(--space-xs-zb16t3, 8px) - 2px);
|
|
178
178
|
}
|
|
179
|
-
.awsui_split-trigger-
|
|
179
|
+
.awsui_split-trigger-wrapper_sne0l_nfcqc_162 > .awsui_trigger-item_sne0l_nfcqc_165:not(#\9):not(:first-child).awsui_visual-refresh_sne0l_nfcqc_179 > .awsui_trigger-button_sne0l_nfcqc_168 {
|
|
180
180
|
padding-inline-end: calc(var(--space-s-34lx8l, 12px) - 2px);
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
.awsui_split-
|
|
183
|
+
.awsui_split-trigger_sne0l_nfcqc_162:not(#\9) {
|
|
184
184
|
display: contents;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
.awsui_dropdown-
|
|
187
|
+
.awsui_dropdown-trigger_sne0l_nfcqc_187:not(#\9) {
|
|
188
188
|
display: contents;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
.awsui_test-utils-button-
|
|
191
|
+
.awsui_test-utils-button-trigger_sne0l_nfcqc_191:not(#\9) {
|
|
192
192
|
/* used in test-utils */
|
|
193
193
|
}
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"button-dropdown": "awsui_button-
|
|
6
|
-
"items-list-container": "awsui_items-list-
|
|
7
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
8
|
-
"rotate-up": "awsui_rotate-
|
|
9
|
-
"rotate-down": "awsui_rotate-
|
|
10
|
-
"header": "
|
|
11
|
-
"title": "
|
|
12
|
-
"description": "
|
|
13
|
-
"split-trigger-wrapper": "awsui_split-trigger-
|
|
14
|
-
"trigger-item": "awsui_trigger-
|
|
15
|
-
"trigger-button": "awsui_trigger-
|
|
16
|
-
"visual-refresh": "awsui_visual-
|
|
17
|
-
"split-trigger": "awsui_split-
|
|
18
|
-
"dropdown-trigger": "awsui_dropdown-
|
|
19
|
-
"test-utils-button-trigger": "awsui_test-utils-button-
|
|
5
|
+
"button-dropdown": "awsui_button-dropdown_sne0l_nfcqc_93",
|
|
6
|
+
"items-list-container": "awsui_items-list-container_sne0l_nfcqc_97",
|
|
7
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_sne0l_nfcqc_1",
|
|
8
|
+
"rotate-up": "awsui_rotate-up_sne0l_nfcqc_116",
|
|
9
|
+
"rotate-down": "awsui_rotate-down_sne0l_nfcqc_131",
|
|
10
|
+
"header": "awsui_header_sne0l_nfcqc_146",
|
|
11
|
+
"title": "awsui_title_sne0l_nfcqc_157",
|
|
12
|
+
"description": "awsui_description_sne0l_nfcqc_158",
|
|
13
|
+
"split-trigger-wrapper": "awsui_split-trigger-wrapper_sne0l_nfcqc_162",
|
|
14
|
+
"trigger-item": "awsui_trigger-item_sne0l_nfcqc_165",
|
|
15
|
+
"trigger-button": "awsui_trigger-button_sne0l_nfcqc_168",
|
|
16
|
+
"visual-refresh": "awsui_visual-refresh_sne0l_nfcqc_179",
|
|
17
|
+
"split-trigger": "awsui_split-trigger_sne0l_nfcqc_162",
|
|
18
|
+
"dropdown-trigger": "awsui_dropdown-trigger_sne0l_nfcqc_187",
|
|
19
|
+
"test-utils-button-trigger": "awsui_test-utils-button-trigger_sne0l_nfcqc_191"
|
|
20
20
|
};
|
|
21
21
|
|
package/container/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ContainerProps } from './interfaces';
|
|
3
3
|
export { ContainerProps };
|
|
4
|
-
export default function Container({ variant, disableHeaderPaddings, disableContentPaddings, ...props }: ContainerProps): JSX.Element;
|
|
4
|
+
export default function Container({ variant, disableHeaderPaddings, disableContentPaddings, fitHeight, ...props }: ContainerProps): JSX.Element;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/container/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["container/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAM9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,OAAmB,EACnB,qBAA6B,EAC7B,sBAA8B,EAC9B,GAAG,KAAK,EACT,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["container/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAM9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,OAAmB,EACnB,qBAA6B,EAC7B,sBAA8B,EAC9B,SAAiB,EACjB,GAAG,KAAK,EACT,EAAE,cAAc,eAmBhB"}
|
package/container/index.js
CHANGED
|
@@ -8,11 +8,13 @@ import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
|
8
8
|
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
9
9
|
import { AnalyticsFunnelSubStep } from '../internal/analytics/components/analytics-funnel';
|
|
10
10
|
export default function Container(_a) {
|
|
11
|
-
var { variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false } = _a, props = __rest(_a, ["variant", "disableHeaderPaddings", "disableContentPaddings"]);
|
|
12
|
-
const baseComponentProps = useBaseComponent('Container'
|
|
11
|
+
var { variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false, fitHeight = false } = _a, props = __rest(_a, ["variant", "disableHeaderPaddings", "disableContentPaddings", "fitHeight"]);
|
|
12
|
+
const baseComponentProps = useBaseComponent('Container', {
|
|
13
|
+
props: { disableContentPaddings, disableHeaderPaddings, fitHeight, variant },
|
|
14
|
+
});
|
|
13
15
|
const externalProps = getExternalProps(props);
|
|
14
16
|
return (React.createElement(AnalyticsFunnelSubStep, null,
|
|
15
|
-
React.createElement(InternalContainerAsSubstep, Object.assign({ variant: variant, disableContentPaddings: disableContentPaddings, disableHeaderPaddings: disableHeaderPaddings }, props, externalProps, baseComponentProps))));
|
|
17
|
+
React.createElement(InternalContainerAsSubstep, Object.assign({ variant: variant, disableContentPaddings: disableContentPaddings, disableHeaderPaddings: disableHeaderPaddings, fitHeight: fitHeight }, props, externalProps, baseComponentProps))));
|
|
16
18
|
}
|
|
17
19
|
applyDisplayName(Container, 'Container');
|
|
18
20
|
//# sourceMappingURL=index.js.map
|
package/container/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["container/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,0BAA0B,EAAE,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ACL,aAAa,EACb,kBAAkB,EACtB,CACqB,CAC1B,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { InternalContainerAsSubstep } from './internal';\nimport { ContainerProps } from './interfaces';\nimport { getExternalProps } from '../internal/utils/external-props';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { AnalyticsFunnelSubStep } from '../internal/analytics/components/analytics-funnel';\n\nexport { ContainerProps };\n\nexport default function Container({\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n fitHeight = false,\n ...props\n}: ContainerProps) {\n const baseComponentProps = useBaseComponent('Container', {\n props: { disableContentPaddings, disableHeaderPaddings, fitHeight, variant },\n });\n const externalProps = getExternalProps(props);\n\n return (\n <AnalyticsFunnelSubStep>\n <InternalContainerAsSubstep\n variant={variant}\n disableContentPaddings={disableContentPaddings}\n disableHeaderPaddings={disableHeaderPaddings}\n fitHeight={fitHeight}\n {...props}\n {...externalProps}\n {...baseComponentProps}\n />\n </AnalyticsFunnelSubStep>\n );\n}\n\napplyDisplayName(Container, 'Container');\n"]}
|
package/flashbar/common.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FlashbarProps } from './interfaces';
|
|
3
|
-
export declare const componentName = "Flashbar";
|
|
4
3
|
export declare function useFlashbar({ items, onItemsAdded, onItemsChanged, onItemsRemoved, ...restProps }: FlashbarProps & {
|
|
5
4
|
onItemsAdded?: (items: FlashbarProps.MessageDefinition[]) => void;
|
|
6
5
|
onItemsRemoved?: (items: FlashbarProps.MessageDefinition[]) => void;
|
package/flashbar/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"lib/default/","sources":["flashbar/common.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"lib/default/","sources":["flashbar/common.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAM7C,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,GAAG,SAAS,EACb,EAAE,aAAa,GAAG;IACjB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,iBAAiB,EAAE,KAAK,IAAI,CAAC;IAClE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,iBAAiB,EAAE,KAAK,IAAI,CAAC;IACpE,cAAc,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,OAAO,CAAC;QAAC,eAAe,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;CAC9F;;;;;;;;EAwDA"}
|
package/flashbar/common.js
CHANGED
|
@@ -10,11 +10,12 @@ import { getBaseProps } from '../internal/base-component';
|
|
|
10
10
|
import { focusFlashById } from './flash';
|
|
11
11
|
import { isDevelopment } from '../internal/is-development';
|
|
12
12
|
import { useReducedMotion, warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
13
|
-
export const componentName = 'Flashbar';
|
|
14
13
|
// Common logic for collapsible and non-collapsible Flashbar
|
|
15
14
|
export function useFlashbar(_a) {
|
|
16
15
|
var { items, onItemsAdded, onItemsChanged, onItemsRemoved } = _a, restProps = __rest(_a, ["items", "onItemsAdded", "onItemsChanged", "onItemsRemoved"]);
|
|
17
|
-
const { __internalRootRef } = useBaseComponent(
|
|
16
|
+
const { __internalRootRef } = useBaseComponent('Flashbar', {
|
|
17
|
+
props: { stackItems: restProps.stackItems },
|
|
18
|
+
});
|
|
18
19
|
const allItemsHaveId = useMemo(() => items.every(item => 'id' in item), [items]);
|
|
19
20
|
const baseProps = getBaseProps(restProps);
|
|
20
21
|
const ref = useRef(null);
|
package/flashbar/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"lib/default/","sources":["flashbar/common.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAE3F,
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"lib/default/","sources":["flashbar/common.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,SA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ACb,IAAI,WAAW,EAAE;YACf,cAAc,CAAC,GAAG,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;SAC1C;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;IAEvB,OAAO;QACL,cAAc;QACd,SAAS;QACT,UAAU;QACV,eAAe;QACf,eAAe;QACf,SAAS;QACT,GAAG;KACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { getBaseProps } from '../internal/base-component';\nimport { FlashbarProps } from './interfaces';\nimport { focusFlashById } from './flash';\nimport { isDevelopment } from '../internal/is-development';\nimport { useReducedMotion, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\n// Common logic for collapsible and non-collapsible Flashbar\nexport function useFlashbar({\n items,\n onItemsAdded,\n onItemsChanged,\n onItemsRemoved,\n ...restProps\n}: FlashbarProps & {\n onItemsAdded?: (items: FlashbarProps.MessageDefinition[]) => void;\n onItemsRemoved?: (items: FlashbarProps.MessageDefinition[]) => void;\n onItemsChanged?: (options?: { allItemsHaveId?: boolean; isReducedMotion?: boolean }) => void;\n}) {\n const { __internalRootRef } = useBaseComponent('Flashbar', {\n props: { stackItems: restProps.stackItems },\n });\n const allItemsHaveId = useMemo(() => items.every(item => 'id' in item), [items]);\n const baseProps = getBaseProps(restProps);\n const ref = useRef<HTMLDivElement | null>(null);\n const [breakpoint, breakpointRef] = useContainerBreakpoints(['xs']);\n const mergedRef = useMergeRefs(ref, breakpointRef, __internalRootRef);\n const isReducedMotion = useReducedMotion(ref);\n const isVisualRefresh = useVisualRefresh();\n const [previousItems, setPreviousItems] = useState<ReadonlyArray<FlashbarProps.MessageDefinition>>(items);\n const [nextFocusId, setNextFocusId] = useState<string | null>(null);\n\n if (isDevelopment) {\n if (items?.some(item => item.ariaRole === 'alert' && !item.id)) {\n warnOnce(\n 'Flashbar',\n `You provided \\`ariaRole=\"alert\"\\` for a flashbar item without providing an \\`id\\`. Focus will not be moved to the newly added flash message.`\n );\n }\n }\n\n // Track new or removed item IDs in state to only trigger focus changes for newly added items.\n // https://reactjs.org/docs/hooks-faq.html#how-do-i-implement-getderivedstatefromprops\n if (items) {\n const newItems = items.filter(({ id }) => id && !previousItems.some(item => item.id === id));\n const removedItems = previousItems.filter(({ id }) => id && !items.some(item => item.id === id));\n if (newItems.length > 0 || removedItems.length > 0) {\n setPreviousItems(items);\n onItemsAdded?.(newItems);\n onItemsRemoved?.(removedItems);\n onItemsChanged?.({ allItemsHaveId, isReducedMotion });\n\n const newFocusItems = newItems.filter(({ ariaRole }) => ariaRole === 'alert');\n if (newFocusItems.length > 0) {\n setNextFocusId(newFocusItems[0].id!);\n }\n }\n }\n\n useEffect(() => {\n if (nextFocusId) {\n focusFlashById(ref.current, nextFocusId);\n }\n }, [nextFocusId, ref]);\n\n return {\n allItemsHaveId,\n baseProps,\n breakpoint,\n isReducedMotion,\n isVisualRefresh,\n mergedRef,\n ref,\n };\n}\n"]}
|
|
@@ -311,7 +311,6 @@
|
|
|
311
311
|
--color-text-disabled-inline-edit-zrb7bp:#414d5c;
|
|
312
312
|
--color-text-dropdown-footer-7d1eld:#5f6b7a;
|
|
313
313
|
--color-text-dropdown-group-label-4x4uyw:#414d5c;
|
|
314
|
-
--color-text-dropdown-header-ga95zo:#000716;
|
|
315
314
|
--color-text-dropdown-item-default-4o4hes:#000716;
|
|
316
315
|
--color-text-dropdown-item-dimmed-f2joj8:#9ba7b6;
|
|
317
316
|
--color-text-dropdown-item-disabled-6oq3n6:#9ba7b6;
|
|
@@ -895,7 +894,6 @@
|
|
|
895
894
|
--color-text-disabled-inline-edit-zrb7bp:#9ba7b6;
|
|
896
895
|
--color-text-dropdown-footer-7d1eld:#8d99a8;
|
|
897
896
|
--color-text-dropdown-group-label-4x4uyw:#b6bec9;
|
|
898
|
-
--color-text-dropdown-header-ga95zo:#fbfbfb;
|
|
899
897
|
--color-text-dropdown-item-default-4o4hes:#d1d5db;
|
|
900
898
|
--color-text-dropdown-item-dimmed-f2joj8:#5f6b7a;
|
|
901
899
|
--color-text-dropdown-item-disabled-6oq3n6:#5f6b7a;
|
|
@@ -1175,7 +1173,6 @@
|
|
|
1175
1173
|
--color-text-disabled-inline-edit-zrb7bp:#9ba7b6;
|
|
1176
1174
|
--color-text-dropdown-footer-7d1eld:#8d99a8;
|
|
1177
1175
|
--color-text-dropdown-group-label-4x4uyw:#b6bec9;
|
|
1178
|
-
--color-text-dropdown-header-ga95zo:#fbfbfb;
|
|
1179
1176
|
--color-text-dropdown-item-default-4o4hes:#d1d5db;
|
|
1180
1177
|
--color-text-dropdown-item-dimmed-f2joj8:#5f6b7a;
|
|
1181
1178
|
--color-text-dropdown-item-disabled-6oq3n6:#5f6b7a;
|
|
@@ -1363,7 +1360,6 @@
|
|
|
1363
1360
|
--color-text-disabled-inline-edit-zrb7bp:#9ba7b6;
|
|
1364
1361
|
--color-text-dropdown-footer-7d1eld:#8d99a8;
|
|
1365
1362
|
--color-text-dropdown-group-label-4x4uyw:#b6bec9;
|
|
1366
|
-
--color-text-dropdown-header-ga95zo:#fbfbfb;
|
|
1367
1363
|
--color-text-dropdown-item-default-4o4hes:#d1d5db;
|
|
1368
1364
|
--color-text-dropdown-item-dimmed-f2joj8:#5f6b7a;
|
|
1369
1365
|
--color-text-dropdown-item-disabled-6oq3n6:#5f6b7a;
|
|
@@ -1646,7 +1642,6 @@
|
|
|
1646
1642
|
--color-text-disabled-inline-edit-zrb7bp:#9ba7b6;
|
|
1647
1643
|
--color-text-dropdown-footer-7d1eld:#8d99a8;
|
|
1648
1644
|
--color-text-dropdown-group-label-4x4uyw:#b6bec9;
|
|
1649
|
-
--color-text-dropdown-header-ga95zo:#fbfbfb;
|
|
1650
1645
|
--color-text-dropdown-item-default-4o4hes:#d1d5db;
|
|
1651
1646
|
--color-text-dropdown-item-dimmed-f2joj8:#5f6b7a;
|
|
1652
1647
|
--color-text-dropdown-item-disabled-6oq3n6:#5f6b7a;
|
package/internal/environment.js
CHANGED
|
@@ -1395,10 +1395,6 @@ module.exports.preset = {
|
|
|
1395
1395
|
"light": "{colorTextGroupLabel}",
|
|
1396
1396
|
"dark": "{colorTextGroupLabel}"
|
|
1397
1397
|
},
|
|
1398
|
-
"colorTextDropdownHeader": {
|
|
1399
|
-
"light": "{colorGrey900}",
|
|
1400
|
-
"dark": "{colorGrey100}"
|
|
1401
|
-
},
|
|
1402
1398
|
"colorTextDropdownItemDefault": {
|
|
1403
1399
|
"light": "{colorTextFormDefault}",
|
|
1404
1400
|
"dark": "{colorTextFormDefault}"
|
|
@@ -3437,10 +3433,6 @@ module.exports.preset = {
|
|
|
3437
3433
|
"light": "{colorTextGroupLabel}",
|
|
3438
3434
|
"dark": "{colorTextGroupLabel}"
|
|
3439
3435
|
},
|
|
3440
|
-
"colorTextDropdownHeader": {
|
|
3441
|
-
"light": "{colorGrey100}",
|
|
3442
|
-
"dark": "{colorGrey100}"
|
|
3443
|
-
},
|
|
3444
3436
|
"colorTextDropdownItemDefault": {
|
|
3445
3437
|
"light": "{colorTextFormDefault}",
|
|
3446
3438
|
"dark": "{colorTextFormDefault}"
|
|
@@ -4459,10 +4451,6 @@ module.exports.preset = {
|
|
|
4459
4451
|
"light": "{colorTextGroupLabel}",
|
|
4460
4452
|
"dark": "{colorTextGroupLabel}"
|
|
4461
4453
|
},
|
|
4462
|
-
"colorTextDropdownHeader": {
|
|
4463
|
-
"light": "{colorGrey100}",
|
|
4464
|
-
"dark": "{colorGrey100}"
|
|
4465
|
-
},
|
|
4466
4454
|
"colorTextDropdownItemDefault": {
|
|
4467
4455
|
"light": "{colorTextFormDefault}",
|
|
4468
4456
|
"dark": "{colorTextFormDefault}"
|
|
@@ -5413,10 +5401,6 @@ module.exports.preset = {
|
|
|
5413
5401
|
"light": "{colorTextGroupLabel}",
|
|
5414
5402
|
"dark": "{colorTextGroupLabel}"
|
|
5415
5403
|
},
|
|
5416
|
-
"colorTextDropdownHeader": {
|
|
5417
|
-
"light": "{colorGrey900}",
|
|
5418
|
-
"dark": "{colorGrey100}"
|
|
5419
|
-
},
|
|
5420
5404
|
"colorTextDropdownItemDefault": {
|
|
5421
5405
|
"light": "{colorTextFormDefault}",
|
|
5422
5406
|
"dark": "{colorTextFormDefault}"
|
|
@@ -6367,10 +6351,6 @@ module.exports.preset = {
|
|
|
6367
6351
|
"light": "{colorTextGroupLabel}",
|
|
6368
6352
|
"dark": "{colorTextGroupLabel}"
|
|
6369
6353
|
},
|
|
6370
|
-
"colorTextDropdownHeader": {
|
|
6371
|
-
"light": "{colorGrey900}",
|
|
6372
|
-
"dark": "{colorGrey100}"
|
|
6373
|
-
},
|
|
6374
6354
|
"colorTextDropdownItemDefault": {
|
|
6375
6355
|
"light": "{colorTextFormDefault}",
|
|
6376
6356
|
"dark": "{colorTextFormDefault}"
|
|
@@ -7321,10 +7301,6 @@ module.exports.preset = {
|
|
|
7321
7301
|
"light": "{colorTextGroupLabel}",
|
|
7322
7302
|
"dark": "{colorTextGroupLabel}"
|
|
7323
7303
|
},
|
|
7324
|
-
"colorTextDropdownHeader": {
|
|
7325
|
-
"light": "{colorGrey900}",
|
|
7326
|
-
"dark": "{colorGrey100}"
|
|
7327
|
-
},
|
|
7328
7304
|
"colorTextDropdownItemDefault": {
|
|
7329
7305
|
"light": "{colorTextFormDefault}",
|
|
7330
7306
|
"dark": "{colorTextFormDefault}"
|
|
@@ -8277,10 +8253,6 @@ module.exports.preset = {
|
|
|
8277
8253
|
"light": "{colorTextGroupLabel}",
|
|
8278
8254
|
"dark": "{colorTextGroupLabel}"
|
|
8279
8255
|
},
|
|
8280
|
-
"colorTextDropdownHeader": {
|
|
8281
|
-
"light": "{colorGrey100}",
|
|
8282
|
-
"dark": "{colorGrey100}"
|
|
8283
|
-
},
|
|
8284
8256
|
"colorTextDropdownItemDefault": {
|
|
8285
8257
|
"light": "{colorTextFormDefault}",
|
|
8286
8258
|
"dark": "{colorTextFormDefault}"
|
|
@@ -8867,7 +8839,6 @@ module.exports.preset = {
|
|
|
8867
8839
|
"colorTextDisabledInlineEdit": "color",
|
|
8868
8840
|
"colorTextDropdownFooter": "color",
|
|
8869
8841
|
"colorTextDropdownGroupLabel": "color",
|
|
8870
|
-
"colorTextDropdownHeader": "color",
|
|
8871
8842
|
"colorTextDropdownItemDefault": "color",
|
|
8872
8843
|
"colorTextDropdownItemDimmed": "color",
|
|
8873
8844
|
"colorTextDropdownItemDisabled": "color",
|
|
@@ -10033,7 +10004,6 @@ module.exports.preset = {
|
|
|
10033
10004
|
"colorTextDisabledInlineEdit": "color-text-disabled-inline-edit",
|
|
10034
10005
|
"colorTextDropdownFooter": "color-text-dropdown-footer",
|
|
10035
10006
|
"colorTextDropdownGroupLabel": "color-text-dropdown-group-label",
|
|
10036
|
-
"colorTextDropdownHeader": "color-text-dropdown-header",
|
|
10037
10007
|
"colorTextDropdownItemDefault": "color-text-dropdown-item-default",
|
|
10038
10008
|
"colorTextDropdownItemDimmed": "color-text-dropdown-item-dimmed",
|
|
10039
10009
|
"colorTextDropdownItemDisabled": "color-text-dropdown-item-disabled",
|
|
@@ -10720,7 +10690,6 @@ module.exports.preset = {
|
|
|
10720
10690
|
"colorTextDisabledInlineEdit": "--color-text-disabled-inline-edit-zrb7bp",
|
|
10721
10691
|
"colorTextDropdownFooter": "--color-text-dropdown-footer-7d1eld",
|
|
10722
10692
|
"colorTextDropdownGroupLabel": "--color-text-dropdown-group-label-4x4uyw",
|
|
10723
|
-
"colorTextDropdownHeader": "--color-text-dropdown-header-ga95zo",
|
|
10724
10693
|
"colorTextDropdownItemDefault": "--color-text-dropdown-item-default-4o4hes",
|
|
10725
10694
|
"colorTextDropdownItemDimmed": "--color-text-dropdown-item-dimmed-f2joj8",
|
|
10726
10695
|
"colorTextDropdownItemDisabled": "--color-text-dropdown-item-disabled-6oq3n6",
|
|
@@ -1395,10 +1395,6 @@ export var preset = {
|
|
|
1395
1395
|
"light": "{colorTextGroupLabel}",
|
|
1396
1396
|
"dark": "{colorTextGroupLabel}"
|
|
1397
1397
|
},
|
|
1398
|
-
"colorTextDropdownHeader": {
|
|
1399
|
-
"light": "{colorGrey900}",
|
|
1400
|
-
"dark": "{colorGrey100}"
|
|
1401
|
-
},
|
|
1402
1398
|
"colorTextDropdownItemDefault": {
|
|
1403
1399
|
"light": "{colorTextFormDefault}",
|
|
1404
1400
|
"dark": "{colorTextFormDefault}"
|
|
@@ -3437,10 +3433,6 @@ export var preset = {
|
|
|
3437
3433
|
"light": "{colorTextGroupLabel}",
|
|
3438
3434
|
"dark": "{colorTextGroupLabel}"
|
|
3439
3435
|
},
|
|
3440
|
-
"colorTextDropdownHeader": {
|
|
3441
|
-
"light": "{colorGrey100}",
|
|
3442
|
-
"dark": "{colorGrey100}"
|
|
3443
|
-
},
|
|
3444
3436
|
"colorTextDropdownItemDefault": {
|
|
3445
3437
|
"light": "{colorTextFormDefault}",
|
|
3446
3438
|
"dark": "{colorTextFormDefault}"
|
|
@@ -4459,10 +4451,6 @@ export var preset = {
|
|
|
4459
4451
|
"light": "{colorTextGroupLabel}",
|
|
4460
4452
|
"dark": "{colorTextGroupLabel}"
|
|
4461
4453
|
},
|
|
4462
|
-
"colorTextDropdownHeader": {
|
|
4463
|
-
"light": "{colorGrey100}",
|
|
4464
|
-
"dark": "{colorGrey100}"
|
|
4465
|
-
},
|
|
4466
4454
|
"colorTextDropdownItemDefault": {
|
|
4467
4455
|
"light": "{colorTextFormDefault}",
|
|
4468
4456
|
"dark": "{colorTextFormDefault}"
|
|
@@ -5413,10 +5401,6 @@ export var preset = {
|
|
|
5413
5401
|
"light": "{colorTextGroupLabel}",
|
|
5414
5402
|
"dark": "{colorTextGroupLabel}"
|
|
5415
5403
|
},
|
|
5416
|
-
"colorTextDropdownHeader": {
|
|
5417
|
-
"light": "{colorGrey900}",
|
|
5418
|
-
"dark": "{colorGrey100}"
|
|
5419
|
-
},
|
|
5420
5404
|
"colorTextDropdownItemDefault": {
|
|
5421
5405
|
"light": "{colorTextFormDefault}",
|
|
5422
5406
|
"dark": "{colorTextFormDefault}"
|
|
@@ -6367,10 +6351,6 @@ export var preset = {
|
|
|
6367
6351
|
"light": "{colorTextGroupLabel}",
|
|
6368
6352
|
"dark": "{colorTextGroupLabel}"
|
|
6369
6353
|
},
|
|
6370
|
-
"colorTextDropdownHeader": {
|
|
6371
|
-
"light": "{colorGrey900}",
|
|
6372
|
-
"dark": "{colorGrey100}"
|
|
6373
|
-
},
|
|
6374
6354
|
"colorTextDropdownItemDefault": {
|
|
6375
6355
|
"light": "{colorTextFormDefault}",
|
|
6376
6356
|
"dark": "{colorTextFormDefault}"
|
|
@@ -7321,10 +7301,6 @@ export var preset = {
|
|
|
7321
7301
|
"light": "{colorTextGroupLabel}",
|
|
7322
7302
|
"dark": "{colorTextGroupLabel}"
|
|
7323
7303
|
},
|
|
7324
|
-
"colorTextDropdownHeader": {
|
|
7325
|
-
"light": "{colorGrey900}",
|
|
7326
|
-
"dark": "{colorGrey100}"
|
|
7327
|
-
},
|
|
7328
7304
|
"colorTextDropdownItemDefault": {
|
|
7329
7305
|
"light": "{colorTextFormDefault}",
|
|
7330
7306
|
"dark": "{colorTextFormDefault}"
|
|
@@ -8277,10 +8253,6 @@ export var preset = {
|
|
|
8277
8253
|
"light": "{colorTextGroupLabel}",
|
|
8278
8254
|
"dark": "{colorTextGroupLabel}"
|
|
8279
8255
|
},
|
|
8280
|
-
"colorTextDropdownHeader": {
|
|
8281
|
-
"light": "{colorGrey100}",
|
|
8282
|
-
"dark": "{colorGrey100}"
|
|
8283
|
-
},
|
|
8284
8256
|
"colorTextDropdownItemDefault": {
|
|
8285
8257
|
"light": "{colorTextFormDefault}",
|
|
8286
8258
|
"dark": "{colorTextFormDefault}"
|
|
@@ -8867,7 +8839,6 @@ export var preset = {
|
|
|
8867
8839
|
"colorTextDisabledInlineEdit": "color",
|
|
8868
8840
|
"colorTextDropdownFooter": "color",
|
|
8869
8841
|
"colorTextDropdownGroupLabel": "color",
|
|
8870
|
-
"colorTextDropdownHeader": "color",
|
|
8871
8842
|
"colorTextDropdownItemDefault": "color",
|
|
8872
8843
|
"colorTextDropdownItemDimmed": "color",
|
|
8873
8844
|
"colorTextDropdownItemDisabled": "color",
|
|
@@ -10033,7 +10004,6 @@ export var preset = {
|
|
|
10033
10004
|
"colorTextDisabledInlineEdit": "color-text-disabled-inline-edit",
|
|
10034
10005
|
"colorTextDropdownFooter": "color-text-dropdown-footer",
|
|
10035
10006
|
"colorTextDropdownGroupLabel": "color-text-dropdown-group-label",
|
|
10036
|
-
"colorTextDropdownHeader": "color-text-dropdown-header",
|
|
10037
10007
|
"colorTextDropdownItemDefault": "color-text-dropdown-item-default",
|
|
10038
10008
|
"colorTextDropdownItemDimmed": "color-text-dropdown-item-dimmed",
|
|
10039
10009
|
"colorTextDropdownItemDisabled": "color-text-dropdown-item-disabled",
|
|
@@ -10720,7 +10690,6 @@ export var preset = {
|
|
|
10720
10690
|
"colorTextDisabledInlineEdit": "--color-text-disabled-inline-edit-zrb7bp",
|
|
10721
10691
|
"colorTextDropdownFooter": "--color-text-dropdown-footer-7d1eld",
|
|
10722
10692
|
"colorTextDropdownGroupLabel": "--color-text-dropdown-group-label-4x4uyw",
|
|
10723
|
-
"colorTextDropdownHeader": "--color-text-dropdown-header-ga95zo",
|
|
10724
10693
|
"colorTextDropdownItemDefault": "--color-text-dropdown-item-default-4o4hes",
|
|
10725
10694
|
"colorTextDropdownItemDimmed": "--color-text-dropdown-item-dimmed-f2joj8",
|
|
10726
10695
|
"colorTextDropdownItemDisabled": "--color-text-dropdown-item-disabled-6oq3n6",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
|
+
import { ComponentConfiguration } from '@cloudscape-design/component-toolkit/internal';
|
|
2
3
|
export interface InternalBaseComponentProps<T = any> {
|
|
3
4
|
__internalRootRef?: MutableRefObject<T | null> | null;
|
|
4
5
|
}
|
|
@@ -7,7 +8,7 @@ export interface InternalBaseComponentProps<T = any> {
|
|
|
7
8
|
* attached to the (internal) component's root DOM node. The hook takes care of attaching the metadata to this
|
|
8
9
|
* root DOM node and emits the telemetry for this component.
|
|
9
10
|
*/
|
|
10
|
-
export default function useBaseComponent<T = any>(componentName: string): {
|
|
11
|
+
export default function useBaseComponent<T = any>(componentName: string, config?: ComponentConfiguration): {
|
|
11
12
|
__internalRootRef: import("react").RefObject<T>;
|
|
12
13
|
};
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/hooks/use-base-component/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/hooks/use-base-component/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAwB,MAAM,+CAA+C,CAAC;AAK7G,MAAM,WAAW,0BAA0B,CAAC,CAAC,GAAG,GAAG;IACjD,iBAAiB,CAAC,EAAE,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;CACvD;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,sBAAsB;;EAKvG"}
|
|
@@ -7,8 +7,8 @@ import useFocusVisible from '../focus-visible';
|
|
|
7
7
|
* attached to the (internal) component's root DOM node. The hook takes care of attaching the metadata to this
|
|
8
8
|
* root DOM node and emits the telemetry for this component.
|
|
9
9
|
*/
|
|
10
|
-
export default function useBaseComponent(componentName) {
|
|
11
|
-
useTelemetry(componentName);
|
|
10
|
+
export default function useBaseComponent(componentName, config) {
|
|
11
|
+
useTelemetry(componentName, config);
|
|
12
12
|
useFocusVisible();
|
|
13
13
|
const elementRef = useComponentMetadata(componentName, PACKAGE_VERSION);
|
|
14
14
|
return { __internalRootRef: elementRef };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/hooks/use-base-component/index.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/hooks/use-base-component/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAA0B,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAC7G,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,eAAe,MAAM,kBAAkB,CAAC;AAM/C;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAU,aAAqB,EAAE,MAA+B;IACtG,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACpC,eAAe,EAAE,CAAC;IAClB,MAAM,UAAU,GAAG,oBAAoB,CAAI,aAAa,EAAE,eAAe,CAAC,CAAC;IAC3E,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC;AAC3C,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { MutableRefObject } from 'react';\nimport { ComponentConfiguration, useComponentMetadata } from '@cloudscape-design/component-toolkit/internal';\nimport { useTelemetry } from '../use-telemetry';\nimport { PACKAGE_VERSION } from '../../environment';\nimport useFocusVisible from '../focus-visible';\n\nexport interface InternalBaseComponentProps<T = any> {\n __internalRootRef?: MutableRefObject<T | null> | null;\n}\n\n/**\n * This hook is used for components which are exported to customers. The returned __internalRootRef needs to be\n * attached to the (internal) component's root DOM node. The hook takes care of attaching the metadata to this\n * root DOM node and emits the telemetry for this component.\n */\nexport default function useBaseComponent<T = any>(componentName: string, config?: ComponentConfiguration) {\n useTelemetry(componentName, config);\n useFocusVisible();\n const elementRef = useComponentMetadata<T>(componentName, PACKAGE_VERSION);\n return { __internalRootRef: elementRef };\n}\n"]}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { ComponentConfiguration } from '@cloudscape-design/component-toolkit/internal';
|
|
2
|
+
export declare function useTelemetry(componentName: string, config?: ComponentConfiguration): void;
|
|
2
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/hooks/use-telemetry/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/hooks/use-telemetry/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAuB,MAAM,+CAA+C,CAAC;AAI5G,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,sBAAsB,QAGlF"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { useComponentMetrics } from '@cloudscape-design/component-toolkit/internal';
|
|
4
4
|
import { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from '../../environment';
|
|
5
5
|
import { useVisualRefresh } from '../use-visual-mode';
|
|
6
|
-
export function useTelemetry(componentName) {
|
|
6
|
+
export function useTelemetry(componentName, config) {
|
|
7
7
|
const theme = useVisualRefresh() ? 'vr' : THEME;
|
|
8
|
-
useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme });
|
|
8
|
+
useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme }, config);
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/hooks/use-telemetry/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/hooks/use-telemetry/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAA0B,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAC5G,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,UAAU,YAAY,CAAC,aAAqB,EAAE,MAA+B;IACjF,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IAChD,mBAAmB,CAAC,aAAa,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;AACxH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ComponentConfiguration, useComponentMetrics } from '@cloudscape-design/component-toolkit/internal';\nimport { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from '../../environment';\nimport { useVisualRefresh } from '../use-visual-mode';\n\nexport function useTelemetry(componentName: string, config?: ComponentConfiguration) {\n const theme = useVisualRefresh() ? 'vr' : THEME;\n useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme }, config);\n}\n"]}
|
package/internal/manifest.json
CHANGED
package/package.json
CHANGED