@cloudscape-design/components 3.0.1001 → 3.0.1003

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.
Files changed (102) hide show
  1. package/alert/styles.scoped.css +2 -4
  2. package/anchor-navigation/styles.scoped.css +1 -2
  3. package/annotation-context/annotation/styles.scoped.css +1 -2
  4. package/app-layout/visual-refresh/styles.scoped.css +2 -4
  5. package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +1 -2
  6. package/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +1 -2
  7. package/attribute-editor/styles.scoped.css +1 -2
  8. package/badge/styles.scoped.css +1 -2
  9. package/breadcrumb-group/styles.scoped.css +2 -4
  10. package/button/styles.scoped.css +1 -2
  11. package/button-dropdown/mobile-expandable-group/styles.scoped.css +1 -2
  12. package/button-group/styles.scoped.css +1 -2
  13. package/calendar/styles.scoped.css +1 -2
  14. package/cards/styles.scoped.css +1 -2
  15. package/checkbox/styles.scoped.css +1 -2
  16. package/code-editor/styles.scoped.css +1 -2
  17. package/collection-preferences/content-display/styles.scoped.css +1 -2
  18. package/collection-preferences/styles.scoped.css +1 -2
  19. package/column-layout/styles.scoped.css +1 -2
  20. package/container/index.js +13 -30
  21. package/container/interfaces.d.ts +5 -0
  22. package/container/interfaces.d.ts.map +1 -1
  23. package/container/interfaces.js.map +1 -1
  24. package/container/internal-do-not-use-core.js +35 -0
  25. package/container/internal.d.ts +2 -2
  26. package/container/internal.d.ts.map +1 -1
  27. package/container/internal.js +2 -2
  28. package/container/internal.js.map +1 -1
  29. package/container/styles.scoped.css +1 -2
  30. package/date-picker/styles.scoped.css +1 -2
  31. package/date-range-picker/styles.scoped.css +1 -2
  32. package/drawer/styles.scoped.css +1 -2
  33. package/expandable-section/styles.scoped.css +1 -2
  34. package/file-token-group/styles.scoped.css +1 -2
  35. package/flashbar/styles.scoped.css +1 -2
  36. package/form/styles.scoped.css +1 -2
  37. package/form-field/styles.scoped.css +1 -2
  38. package/grid/styles.scoped.css +1 -2
  39. package/header/styles.scoped.css +1 -2
  40. package/help-panel/styles.scoped.css +1 -2
  41. package/input/styles.scoped.css +1 -2
  42. package/internal/base-component/styles.scoped.css +1 -1
  43. package/internal/components/button-trigger/styles.scoped.css +1 -2
  44. package/internal/components/chart-filter/styles.scoped.css +1 -2
  45. package/internal/components/chart-legend/styles.scoped.css +1 -2
  46. package/internal/components/chart-popover/styles.scoped.css +1 -2
  47. package/internal/components/chart-series-details/styles.scoped.css +3 -6
  48. package/internal/components/chart-series-marker/styles.scoped.css +1 -2
  49. package/internal/components/chart-wrapper/styles.scoped.css +1 -2
  50. package/internal/components/dropdown/styles.scoped.css +1 -2
  51. package/internal/components/dropdown-footer/styles.scoped.css +1 -2
  52. package/internal/components/dropdown-status/styles.scoped.css +1 -2
  53. package/internal/components/menu-dropdown/styles.scoped.css +1 -2
  54. package/internal/components/option/styles.scoped.css +1 -2
  55. package/internal/components/options-list/styles.scoped.css +1 -2
  56. package/internal/components/options-list/utils/use-highlight-option.d.ts +1 -0
  57. package/internal/components/options-list/utils/use-highlight-option.d.ts.map +1 -1
  58. package/internal/components/options-list/utils/use-highlight-option.js +1 -0
  59. package/internal/components/options-list/utils/use-highlight-option.js.map +1 -1
  60. package/internal/components/token-list/styles.scoped.css +1 -2
  61. package/internal/environment.js +2 -2
  62. package/internal/environment.json +2 -2
  63. package/internal/manifest.json +1 -1
  64. package/key-value-pairs/styles.scoped.css +2 -4
  65. package/link/styles.scoped.css +1 -2
  66. package/modal/styles.scoped.css +2 -4
  67. package/multiselect/styles.scoped.css +2 -4
  68. package/package.json +1 -1
  69. package/pagination/styles.scoped.css +1 -2
  70. package/popover/styles.scoped.css +3 -6
  71. package/progress-bar/styles.scoped.css +1 -2
  72. package/prompt-input/styles.scoped.css +4 -8
  73. package/property-filter/filtering-token/styles.scoped.css +1 -2
  74. package/property-filter/styles.scoped.css +2 -4
  75. package/radio-group/styles.scoped.css +1 -2
  76. package/segmented-control/styles.scoped.css +1 -2
  77. package/select/styles.scoped.css +1 -2
  78. package/select/utils/use-select.d.ts.map +1 -1
  79. package/select/utils/use-select.js +17 -4
  80. package/select/utils/use-select.js.map +1 -1
  81. package/side-navigation/styles.scoped.css +1 -2
  82. package/slider/styles.scoped.css +1 -2
  83. package/split-panel/styles.scoped.css +1 -2
  84. package/steps/styles.scoped.css +1 -2
  85. package/table/expandable-rows/styles.scoped.css +1 -2
  86. package/table/internal.js +1 -1
  87. package/table/internal.js.map +1 -1
  88. package/table/resizer/styles.scoped.css +1 -2
  89. package/tabs/styles.scoped.css +1 -2
  90. package/text-content/styles.scoped.css +1 -2
  91. package/text-filter/styles.scoped.css +1 -2
  92. package/textarea/styles.scoped.css +1 -2
  93. package/tiles/styles.scoped.css +2 -4
  94. package/toggle/styles.scoped.css +1 -2
  95. package/token-group/styles.scoped.css +1 -2
  96. package/top-navigation/1.0-beta/styles.scoped.css +1 -2
  97. package/top-navigation/styles.scoped.css +3 -6
  98. package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +1 -2
  99. package/tutorial-panel/components/tutorial-list/styles.scoped.css +3 -6
  100. package/tutorial-panel/styles.scoped.css +1 -2
  101. package/wizard/styles.scoped.css +1 -2
  102. /package/container/{index.js.map → internal-do-not-use-core.js.map} +0 -0
@@ -224,8 +224,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
224
224
  font-style: normal;
225
225
  font-variant: normal;
226
226
  font-stretch: normal;
227
- -webkit-hyphens: none;
228
- hyphens: none;
227
+ hyphens: none;
229
228
  letter-spacing: normal;
230
229
  list-style: disc outside none;
231
230
  tab-size: 8;
@@ -264,8 +263,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
264
263
  font-style: normal;
265
264
  font-variant: normal;
266
265
  font-stretch: normal;
267
- -webkit-hyphens: none;
268
- hyphens: none;
266
+ hyphens: none;
269
267
  letter-spacing: normal;
270
268
  list-style: disc outside none;
271
269
  tab-size: 8;
@@ -198,8 +198,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
198
198
  font-style: normal;
199
199
  font-variant: normal;
200
200
  font-stretch: normal;
201
- -webkit-hyphens: none;
202
- hyphens: none;
201
+ hyphens: none;
203
202
  letter-spacing: normal;
204
203
  list-style: disc outside none;
205
204
  tab-size: 8;
@@ -291,8 +291,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
291
291
  font-style: normal;
292
292
  font-variant: normal;
293
293
  font-stretch: normal;
294
- -webkit-hyphens: none;
295
- hyphens: none;
294
+ hyphens: none;
296
295
  letter-spacing: normal;
297
296
  list-style: disc outside none;
298
297
  tab-size: 8;
@@ -222,8 +222,7 @@ div.awsui_background_hyvsj_xt8mb_149 > .awsui_scrolling-background_hyvsj_xt8mb_1
222
222
  font-style: normal;
223
223
  font-variant: normal;
224
224
  font-stretch: normal;
225
- -webkit-hyphens: none;
226
- hyphens: none;
225
+ hyphens: none;
227
226
  letter-spacing: normal;
228
227
  list-style: disc outside none;
229
228
  tab-size: 8;
@@ -1102,8 +1101,7 @@ handleSplitPanelMaxWidth function in the context.
1102
1101
  font-style: normal;
1103
1102
  font-variant: normal;
1104
1103
  font-stretch: normal;
1105
- -webkit-hyphens: none;
1106
- hyphens: none;
1104
+ hyphens: none;
1107
1105
  letter-spacing: normal;
1108
1106
  list-style: disc outside none;
1109
1107
  tab-size: 8;
@@ -162,8 +162,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
162
162
  font-style: normal;
163
163
  font-variant: normal;
164
164
  font-stretch: normal;
165
- -webkit-hyphens: none;
166
- hyphens: none;
165
+ hyphens: none;
167
166
  letter-spacing: normal;
168
167
  list-style: disc outside none;
169
168
  tab-size: 8;
@@ -216,8 +216,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
216
216
  font-style: normal;
217
217
  font-variant: normal;
218
218
  font-stretch: normal;
219
- -webkit-hyphens: none;
220
- hyphens: none;
219
+ hyphens: none;
221
220
  letter-spacing: normal;
222
221
  list-style: disc outside none;
223
222
  tab-size: 8;
@@ -184,8 +184,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
184
184
  font-style: normal;
185
185
  font-variant: normal;
186
186
  font-stretch: normal;
187
- -webkit-hyphens: none;
188
- hyphens: none;
187
+ hyphens: none;
189
188
  letter-spacing: normal;
190
189
  list-style: disc outside none;
191
190
  tab-size: 8;
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
154
154
  font-style: normal;
155
155
  font-variant: normal;
156
156
  font-stretch: normal;
157
- -webkit-hyphens: none;
158
- hyphens: none;
157
+ hyphens: none;
159
158
  letter-spacing: normal;
160
159
  list-style: disc outside none;
161
160
  tab-size: 8;
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
154
154
  font-style: normal;
155
155
  font-variant: normal;
156
156
  font-stretch: normal;
157
- -webkit-hyphens: none;
158
- hyphens: none;
157
+ hyphens: none;
159
158
  letter-spacing: normal;
160
159
  list-style: disc outside none;
161
160
  tab-size: 8;
@@ -239,8 +238,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
239
238
  font-style: normal;
240
239
  font-variant: normal;
241
240
  font-stretch: normal;
242
- -webkit-hyphens: none;
243
- hyphens: none;
241
+ hyphens: none;
244
242
  letter-spacing: normal;
245
243
  list-style: disc outside none;
246
244
  tab-size: 8;
@@ -166,8 +166,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
166
166
  font-style: normal;
167
167
  font-variant: normal;
168
168
  font-stretch: normal;
169
- -webkit-hyphens: none;
170
- hyphens: none;
169
+ hyphens: none;
171
170
  letter-spacing: normal;
172
171
  list-style: disc outside none;
173
172
  tab-size: 8;
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
154
154
  font-style: normal;
155
155
  font-variant: normal;
156
156
  font-stretch: normal;
157
- -webkit-hyphens: none;
158
- hyphens: none;
157
+ hyphens: none;
159
158
  letter-spacing: normal;
160
159
  list-style: disc outside none;
161
160
  tab-size: 8;
@@ -190,8 +190,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
190
190
  font-style: normal;
191
191
  font-variant: normal;
192
192
  font-stretch: normal;
193
- -webkit-hyphens: none;
194
- hyphens: none;
193
+ hyphens: none;
195
194
  letter-spacing: normal;
196
195
  list-style: disc outside none;
197
196
  tab-size: 8;
@@ -193,8 +193,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
193
193
  font-style: normal;
194
194
  font-variant: normal;
195
195
  font-stretch: normal;
196
- -webkit-hyphens: none;
197
- hyphens: none;
196
+ hyphens: none;
198
197
  letter-spacing: normal;
199
198
  list-style: disc outside none;
200
199
  tab-size: 8;
@@ -202,8 +202,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
202
202
  font-style: normal;
203
203
  font-variant: normal;
204
204
  font-stretch: normal;
205
- -webkit-hyphens: none;
206
- hyphens: none;
205
+ hyphens: none;
207
206
  letter-spacing: normal;
208
207
  list-style: disc outside none;
209
208
  tab-size: 8;
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
154
154
  font-style: normal;
155
155
  font-variant: normal;
156
156
  font-stretch: normal;
157
- -webkit-hyphens: none;
158
- hyphens: none;
157
+ hyphens: none;
159
158
  letter-spacing: normal;
160
159
  list-style: disc outside none;
161
160
  tab-size: 8;
@@ -584,8 +584,7 @@ body[data-awsui-focus-visible=true] .awsui_code-editor_1gl9c_wxtw7_158 .ace_edit
584
584
  font-style: normal;
585
585
  font-variant: normal;
586
586
  font-stretch: normal;
587
- -webkit-hyphens: none;
588
- hyphens: none;
587
+ hyphens: none;
589
588
  letter-spacing: normal;
590
589
  list-style: disc outside none;
591
590
  tab-size: 8;
@@ -302,8 +302,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
302
302
  font-style: normal;
303
303
  font-variant: normal;
304
304
  font-stretch: normal;
305
- -webkit-hyphens: none;
306
- hyphens: none;
305
+ hyphens: none;
307
306
  letter-spacing: normal;
308
307
  list-style: disc outside none;
309
308
  tab-size: 8;
@@ -633,8 +633,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
633
633
  font-style: normal;
634
634
  font-variant: normal;
635
635
  font-stretch: normal;
636
- -webkit-hyphens: none;
637
- hyphens: none;
636
+ hyphens: none;
638
637
  letter-spacing: normal;
639
638
  list-style: disc outside none;
640
639
  tab-size: 8;
@@ -190,8 +190,7 @@ div.awsui_column-layout_vvxn7_u5w81_181:not(#\9) {
190
190
  font-style: normal;
191
191
  font-variant: normal;
192
192
  font-stretch: normal;
193
- -webkit-hyphens: none;
194
- hyphens: none;
193
+ hyphens: none;
195
194
  letter-spacing: normal;
196
195
  list-style: disc outside none;
197
196
  tab-size: 8;
@@ -1,35 +1,18 @@
1
- import { __rest } from "tslib";
2
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
2
  // SPDX-License-Identifier: Apache-2.0
4
3
  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';
4
+
5
+ import CoreComponent from './internal-do-not-use-core';
9
6
  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(_a) {
13
- var { variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false, fitHeight = false } = _a, props = __rest(_a, ["variant", "disableHeaderPaddings", "disableContentPaddings", "fitHeight"]);
14
- const analyticsMetadata = getAnalyticsMetadataProps(props);
15
- const baseComponentProps = useBaseComponent('Container', {
16
- props: {
17
- disableContentPaddings,
18
- disableHeaderPaddings,
19
- fitHeight,
20
- variant,
21
- },
22
- metadata: {
23
- hasInstanceIdentifier: Boolean(analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier),
24
- },
25
- }, analyticsMetadata);
26
- const externalProps = getExternalProps(props);
27
- const analyticsComponentMetadata = {
28
- name: 'awsui.Container',
29
- label: { root: 'self' },
30
- };
31
- return (React.createElement(AnalyticsFunnelSubStep, { subStepIdentifier: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier, subStepErrorContext: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.errorContext },
32
- React.createElement(InternalContainerAsSubstep, Object.assign({ variant: variant, disableContentPaddings: disableContentPaddings, disableHeaderPaddings: disableHeaderPaddings, fitHeight: fitHeight }, props, externalProps, baseComponentProps, getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata })))));
33
- }
7
+ import { validateProps } from '../internal/base-component';
8
+
9
+
10
+
11
+ const Container = (props) => {
12
+ validateProps('Container', props, ["disableFooterPaddings"], {});
13
+ return React.createElement(CoreComponent, props);
14
+ };
15
+
16
+
34
17
  applyDisplayName(Container, 'Container');
35
- //# sourceMappingURL=index.js.map
18
+ export default Container;
@@ -55,6 +55,11 @@ export interface ContainerProps extends BaseComponentProps {
55
55
  * Footer of the container.
56
56
  */
57
57
  footer?: React.ReactNode;
58
+ /**
59
+ * Determines whether the container footer has padding. If `true`, removes the default padding from the footer.
60
+ * @awsuiSystem core
61
+ */
62
+
58
63
  /**
59
64
  * Specify a container variant with one of the following:
60
65
  * * `default` - Use this variant in standalone context.
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC;IAErD;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED,yBAAiB,cAAc,CAAC;IAC9B,UAAiB,iBAAiB;QAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B;IACD,UAAiB,KAAK;QACpB;;WAEG;QACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;QAEzB;;WAEG;QACH,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;QAE1B;;;;;;WAMG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAExB;;;;;;WAMG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAC1B;CACF"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC;IAErD;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED,yBAAiB,cAAc,CAAC;IAC9B,UAAiB,iBAAiB;QAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B;IACD,UAAiB,KAAK;QACpB;;WAEG;QACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;QAEzB;;WAEG;QACH,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;QAE1B;;;;;;WAMG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAExB;;;;;;WAMG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAC1B;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface ContainerProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ContainerProps.AnalyticsMetadata;\n\n /**\n * Heading element of the container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Determines whether the container header has padding. If `true`, removes the default padding from the header.\n */\n disableHeaderPaddings?: boolean;\n\n /**\n *\n * Use this slot to render a media element. Supported element types are 'img', 'video', and 'picture'.\n * You can define different positions and sizes for the media element within the container.\n *\n * * `content` - Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n *\n * * `position` - Defines the media slot's position within the container. Defaults to `top`.\n *\n * * `width` - Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it.\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n *\n * * `height` - Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it. * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n *\n */\n media?: ContainerProps.Media;\n\n /**\n * Main content of the container.\n */\n children?: React.ReactNode;\n\n /**\n * Determines whether the container content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Enabling this property will make the container to fit into available height. If content is too short, the container\n * will stretch, if too long, the container will shrink and show vertical scrollbar.\n *\n * Use this property to align heights of multiple containers displayed in a single row. It is recommended to stretch\n * all containers to the height of the longest one, to avoid extra vertical scroll areas.\n */\n fitHeight?: boolean;\n\n /**\n * Footer of the container.\n */\n footer?: React.ReactNode;\n\n /**\n * Specify a container variant with one of the following:\n * * `default` - Use this variant in standalone context.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * @visualrefresh `stacked` variant\n */\n variant?: 'default' | 'stacked';\n}\n\nexport namespace ContainerProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n }\n export interface Media {\n /**\n * Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n */\n content: React.ReactNode;\n\n /**\n * Defines the media slot's position within the container. Defaults to `top`.\n */\n position?: 'top' | 'side';\n\n /**\n * Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n */\n width?: string | number;\n\n /**\n * Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n */\n height?: string | number;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/container/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface ContainerProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ContainerProps.AnalyticsMetadata;\n\n /**\n * Heading element of the container. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Determines whether the container header has padding. If `true`, removes the default padding from the header.\n */\n disableHeaderPaddings?: boolean;\n\n /**\n *\n * Use this slot to render a media element. Supported element types are 'img', 'video', and 'picture'.\n * You can define different positions and sizes for the media element within the container.\n *\n * * `content` - Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n *\n * * `position` - Defines the media slot's position within the container. Defaults to `top`.\n *\n * * `width` - Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it.\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n *\n * * `height` - Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, media elements larger than the defined width may be cropped, with 'object-fit: cover' centering it. * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n *\n */\n media?: ContainerProps.Media;\n\n /**\n * Main content of the container.\n */\n children?: React.ReactNode;\n\n /**\n * Determines whether the container content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Enabling this property will make the container to fit into available height. If content is too short, the container\n * will stretch, if too long, the container will shrink and show vertical scrollbar.\n *\n * Use this property to align heights of multiple containers displayed in a single row. It is recommended to stretch\n * all containers to the height of the longest one, to avoid extra vertical scroll areas.\n */\n fitHeight?: boolean;\n\n /**\n * Footer of the container.\n */\n footer?: React.ReactNode;\n\n /**\n * Determines whether the container footer has padding. If `true`, removes the default padding from the footer.\n * @awsuiSystem core\n */\n disableFooterPaddings?: boolean;\n\n /**\n * Specify a container variant with one of the following:\n * * `default` - Use this variant in standalone context.\n * * `stacked` - Use this variant adjacent to other stacked containers (such as a container,\n * table).\n * @visualrefresh `stacked` variant\n */\n variant?: 'default' | 'stacked';\n}\n\nexport namespace ContainerProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n }\n export interface Media {\n /**\n * Use this slot to render your media element. We support `img`, `video`, `picture`, and `iframe` elements.\n */\n content: React.ReactNode;\n\n /**\n * Defines the media slot's position within the container. Defaults to `top`.\n */\n position?: 'top' | 'side';\n\n /**\n * Defines the width of the media slot when positioned on the side. Corresponds to the `width` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is considered only when `position` is set to `side`.\n * If no width is provided, the media slot will take a maximum of 66% of the container's width.\n */\n width?: string | number;\n\n /**\n * Defines the height of the media slot when position on the top. Corresponds to the `height` CSS-property.\n * When this value is set, the media element may be cropped, with `object-fit: cover` centering it.\n *\n * Note: This value is only considered if `position` is set to `top`.\n * If no height is provided, the media slot will be displayed at its full height.\n */\n height?: string | number;\n }\n}\n"]}
@@ -0,0 +1,35 @@
1
+ import { __rest } from "tslib";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
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(_a) {
13
+ var { variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false, fitHeight = false } = _a, props = __rest(_a, ["variant", "disableHeaderPaddings", "disableContentPaddings", "fitHeight"]);
14
+ const analyticsMetadata = getAnalyticsMetadataProps(props);
15
+ const baseComponentProps = useBaseComponent('Container', {
16
+ props: {
17
+ disableContentPaddings,
18
+ disableHeaderPaddings,
19
+ fitHeight,
20
+ variant,
21
+ },
22
+ metadata: {
23
+ hasInstanceIdentifier: Boolean(analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier),
24
+ },
25
+ }, analyticsMetadata);
26
+ const externalProps = getExternalProps(props);
27
+ const analyticsComponentMetadata = {
28
+ name: 'awsui.Container',
29
+ label: { root: 'self' },
30
+ };
31
+ return (React.createElement(AnalyticsFunnelSubStep, { subStepIdentifier: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.instanceIdentifier, subStepErrorContext: analyticsMetadata === null || analyticsMetadata === void 0 ? void 0 : analyticsMetadata.errorContext },
32
+ React.createElement(InternalContainerAsSubstep, Object.assign({ variant: variant, disableContentPaddings: disableContentPaddings, disableHeaderPaddings: disableHeaderPaddings, fitHeight: fitHeight }, props, externalProps, baseComponentProps, getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata })))));
33
+ }
34
+ applyDisplayName(Container, 'Container');
35
+ //# sourceMappingURL=index.js.map
@@ -3,11 +3,11 @@ import { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';
3
3
  import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
4
4
  import { ContainerProps } from './interfaces';
5
5
  export interface InternalContainerProps extends Omit<ContainerProps, 'variant'>, InternalBaseComponentProps {
6
+ disableFooterPaddings?: boolean;
6
7
  __stickyHeader?: boolean;
7
8
  __stickyOffset?: number;
8
9
  __mobileStickyOffset?: number;
9
10
  __disableFooterDivider?: boolean;
10
- __disableFooterPaddings?: boolean;
11
11
  __hiddenContent?: boolean;
12
12
  __headerRef?: React.RefObject<HTMLDivElement>;
13
13
  __fullPage?: boolean;
@@ -30,6 +30,7 @@ export default function InternalContainer({
30
30
  variant,
31
31
  disableHeaderPaddings,
32
32
  disableContentPaddings,
33
+ disableFooterPaddings,
33
34
  fitHeight,
34
35
  media,
35
36
  __stickyOffset,
@@ -37,7 +38,6 @@ export default function InternalContainer({
37
38
  __stickyHeader,
38
39
  __internalRootRef,
39
40
  __disableFooterDivider,
40
- __disableFooterPaddings,
41
41
  __hiddenContent,
42
42
  __headerRef,
43
43
  __fullPage,
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/container/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAMtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAI1E,OAAO,EAAE,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oB,EACpB,cAAsB,EACtB,iBAAwB,EACxB,sBAA8B,EAC9B,eAAuB,EACvB,WAAW,EACX,UAAkB,EAClB,qBAA4B,EAC5B,oBAAoB,EACpB,YAAY,EACZ,GAAG,SAAS,EACb,EAAE,sBAAsB,eAgHxB"}
@@ -22,7 +22,7 @@ export function InternalContainerAsSubstep(props) {
22
22
  }
23
23
  export default function InternalContainer(_a) {
24
24
  var _b;
25
- var { header, footer, children, variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false, fitHeight, media, __stickyOffset, __mobileStickyOffset, __stickyHeader = false, __internalRootRef = null, __disableFooterDivider = false, __disableFooterPaddings = false, __hiddenContent = false, __headerRef, __fullPage = false, __disableStickyMobile = true, __funnelSubStepProps, __subStepRef } = _a, restProps = __rest(_a, ["header", "footer", "children", "variant", "disableHeaderPaddings", "disableContentPaddings", "fitHeight", "media", "__stickyOffset", "__mobileStickyOffset", "__stickyHeader", "__internalRootRef", "__disableFooterDivider", "__disableFooterPaddings", "__hiddenContent", "__headerRef", "__fullPage", "__disableStickyMobile", "__funnelSubStepProps", "__subStepRef"]);
25
+ var { header, footer, children, variant = 'default', disableHeaderPaddings = false, disableContentPaddings = false, disableFooterPaddings = false, fitHeight, media, __stickyOffset, __mobileStickyOffset, __stickyHeader = false, __internalRootRef = null, __disableFooterDivider = false, __hiddenContent = false, __headerRef, __fullPage = false, __disableStickyMobile = true, __funnelSubStepProps, __subStepRef } = _a, restProps = __rest(_a, ["header", "footer", "children", "variant", "disableHeaderPaddings", "disableContentPaddings", "disableFooterPaddings", "fitHeight", "media", "__stickyOffset", "__mobileStickyOffset", "__stickyHeader", "__internalRootRef", "__disableFooterDivider", "__hiddenContent", "__headerRef", "__fullPage", "__disableStickyMobile", "__funnelSubStepProps", "__subStepRef"]);
26
26
  const isMobile = useMobile();
27
27
  const isRefresh = useVisualRefresh();
28
28
  const baseProps = getBaseProps(restProps);
@@ -62,7 +62,7 @@ export default function InternalContainer(_a) {
62
62
  }) }, children)),
63
63
  footer && (React.createElement("div", { className: clsx(styles.footer, {
64
64
  [styles['with-divider']]: !__disableFooterDivider,
65
- [styles['with-paddings']]: !__disableFooterPaddings,
65
+ [styles['with-paddings']]: !disableFooterPaddings,
66
66
  }) }, footer)))));
67
67
  }
68
68
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/container/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAE9G,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,UAAU,MAAM,8BAA8B,CAAC;AAwBtD,MAAM,UAAU,0BAA0B,CAAC,KAA6B;IACtE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAC9D,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,OAAO,CACL,oBAAC,iBAAiB,oBACZ,KAAK,IACT,YAAY,EA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QAAQ,IAAI,eAAe;4BAC7D,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,EAAE,QAAQ;4BACvC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,EAAE,UAAU,IAAI,SAAS;yBACtD,CACF,IACG,YAAY,IAChB,GAAG,EAAE,eAAe;wBAEnB,OAAO,IAAI,CAAC,QAAQ,IAAI,SAAS,IAAI,UAAU,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,GAAQ;wBACjG,MAAM,CACH,CACuB,CACA,CAClC;YACD,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,CAAC;gBAC7E,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,EAAE;wBACpE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,sBAAsB;wBAClD,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM;qBAClC,CAAC,IAED,QAAQ,CACL,CACF;YACL,MAAM,IAAI,CACT,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;oBAC7B,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,sBAAsB;oBACjD,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,uBAAuB;iBACpD,CAAC,IAED,MAAM,CACH,CACP,CACG,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsLabelAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getBaseProps } from '../internal/base-component';\nimport { ContainerHeaderContextProvider } from '../internal/context/container-header';\nimport { useModalContext } from '../internal/context/modal-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { ContainerProps } from './interfaces';\nimport { StickyHeaderContext, useStickyHeader } from './use-sticky-header';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\nimport testStyles from './test-classes/styles.css.js';\n\nexport interface InternalContainerProps extends Omit<ContainerProps, 'variant'>, InternalBaseComponentProps {\n __stickyHeader?: boolean;\n __stickyOffset?: number;\n __mobileStickyOffset?: number;\n __disableFooterDivider?: boolean;\n __disableFooterPaddings?: boolean;\n __hiddenContent?: boolean;\n __headerRef?: React.RefObject<HTMLDivElement>;\n __fullPage?: boolean;\n __disableStickyMobile?: boolean;\n /**\n * Additional internal variant:\n * * `embedded` - Use this variant within a parent container (such as a modal,\n * expandable section, container or split panel).\n * * `full-page` – Only for internal use in table, cards and other components\n */\n variant?: ContainerProps['variant'] | 'embedded' | 'full-page' | 'cards';\n\n __funnelSubStepProps?: ReturnType<typeof useFunnelSubStep>['funnelSubStepProps'];\n __subStepRef?: ReturnType<typeof useFunnelSubStep>['subStepRef'];\n}\n\nexport function InternalContainerAsSubstep(props: InternalContainerProps) {\n const { subStepRef, funnelSubStepProps } = useFunnelSubStep();\n const modalContext = useModalContext();\n\n return (\n <InternalContainer\n {...props}\n __subStepRef={modalContext?.isInModal ? { current: null } : subStepRef}\n __funnelSubStepProps={modalContext?.isInModal ? {} : funnelSubStepProps}\n />\n );\n}\n\nexport default function InternalContainer({\n header,\n footer,\n children,\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n fitHeight,\n media,\n __stickyOffset,\n __mobileStickyOffset,\n __stickyHeader = false,\n __internalRootRef = null,\n __disableFooterDivider = false,\n __disableFooterPaddings = false,\n __hiddenContent = false,\n __headerRef,\n __fullPage = false,\n __disableStickyMobile = true,\n __funnelSubStepProps,\n __subStepRef,\n ...restProps\n}: InternalContainerProps) {\n const isMobile = useMobile();\n const isRefresh = useVisualRefresh();\n const baseProps = getBaseProps(restProps);\n const rootRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const { isSticky, isStuck, isStuckAtBottom, stickyStyles } = useStickyHeader(\n rootRef,\n headerRef,\n __stickyHeader,\n __stickyOffset,\n __mobileStickyOffset,\n __disableStickyMobile,\n __fullPage && isRefresh && !isMobile\n );\n const contentId = useUniqueId();\n\n const hasDynamicHeight = isRefresh && variant === 'full-page';\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n const headerMergedRef = useMergeRefs(headerRef, __headerRef);\n\n // The container is only sticky on mobile if it is the header for the table.\n // In this case we don't want the container to have sticky styles, as only the table header row will show as stuck on scroll.\n const shouldHaveStickyStyles = isSticky && !isMobile;\n\n const hasMedia = !!media?.content;\n const mediaPosition = media?.position ?? 'top';\n return (\n <div\n {...baseProps}\n {...__funnelSubStepProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[`variant-${variant}`],\n fitHeight && styles['fit-height'],\n hasMedia && (mediaPosition === 'side' ? styles['with-side-media'] : styles['with-top-media']),\n shouldHaveStickyStyles && [styles['sticky-enabled']],\n shouldHaveStickyStyles && isStuck && isStuckAtBottom && [styles['with-stuck-sticky-header-at-bottom']],\n isRefresh && styles.refresh\n )}\n ref={mergedRef}\n {...getAnalyticsLabelAttribute(\n `.${analyticsSelectors.header} h1, .${analyticsSelectors.header} h2, .${analyticsSelectors.header} h3`\n )}\n >\n {hasMedia && (\n <div\n className={clsx(styles[`media-${mediaPosition === 'side' ? 'side' : 'top'}`], styles.media)}\n style={mediaPosition === 'top' ? { height: media?.height || '' } : { width: media?.width || '' }}\n >\n {media.content}\n </div>\n )}\n <div\n id={contentId}\n ref={__subStepRef}\n className={clsx(styles['content-wrapper'], fitHeight && styles['content-wrapper-fit-height'])}\n >\n {header && (\n <ContainerHeaderContextProvider>\n <StickyHeaderContext.Provider value={{ isStuck, isStuckAtBottom }}>\n <div\n className={clsx(\n isRefresh && styles.refresh,\n styles.header,\n analyticsSelectors.header,\n styles[`header-variant-${variant}`],\n {\n [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,\n [styles['header-sticky-enabled']]: isSticky,\n [styles['header-dynamic-height']]: hasDynamicHeight,\n [styles['header-stuck']]: isStuck,\n [styles['with-paddings']]: !disableHeaderPaddings,\n [styles['with-hidden-content']]: !children || __hiddenContent,\n [styles['header-with-media']]: hasMedia,\n [styles['header-full-page']]: __fullPage && isRefresh,\n }\n )}\n {...stickyStyles}\n ref={headerMergedRef}\n >\n {isStuck && !isMobile && isRefresh && __fullPage && <div className={styles['header-cover']}></div>}\n {header}\n </div>\n </StickyHeaderContext.Provider>\n </ContainerHeaderContextProvider>\n )}\n <div className={clsx(styles.content, fitHeight && styles['content-fit-height'])}>\n <div\n className={clsx(styles['content-inner'], testStyles['content-inner'], {\n [styles['with-paddings']]: !disableContentPaddings,\n [styles['with-header']]: !!header,\n })}\n >\n {children}\n </div>\n </div>\n {footer && (\n <div\n className={clsx(styles.footer, {\n [styles['with-divider']]: !__disableFooterDivider,\n [styles['with-paddings']]: !__disableFooterPaddings,\n })}\n >\n {footer}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/container/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAE9G,OAAO,EAAE,gBAAgB,EA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E;wBACpE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,sBAAsB;wBAClD,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM;qBAClC,CAAC,IAED,QAAQ,CACL,CACF;YACL,MAAM,IAAI,CACT,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;oBAC7B,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,sBAAsB;oBACjD,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,qBAAqB;iBAClD,CAAC,IAED,MAAM,CACH,CACP,CACG,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsLabelAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getBaseProps } from '../internal/base-component';\nimport { ContainerHeaderContextProvider } from '../internal/context/container-header';\nimport { useModalContext } from '../internal/context/modal-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { ContainerProps } from './interfaces';\nimport { StickyHeaderContext, useStickyHeader } from './use-sticky-header';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\nimport testStyles from './test-classes/styles.css.js';\n\nexport interface InternalContainerProps extends Omit<ContainerProps, 'variant'>, InternalBaseComponentProps {\n disableFooterPaddings?: boolean;\n __stickyHeader?: boolean;\n __stickyOffset?: number;\n __mobileStickyOffset?: number;\n __disableFooterDivider?: boolean;\n __hiddenContent?: boolean;\n __headerRef?: React.RefObject<HTMLDivElement>;\n __fullPage?: boolean;\n __disableStickyMobile?: boolean;\n /**\n * Additional internal variant:\n * * `embedded` - Use this variant within a parent container (such as a modal,\n * expandable section, container or split panel).\n * * `full-page` – Only for internal use in table, cards and other components\n */\n variant?: ContainerProps['variant'] | 'embedded' | 'full-page' | 'cards';\n\n __funnelSubStepProps?: ReturnType<typeof useFunnelSubStep>['funnelSubStepProps'];\n __subStepRef?: ReturnType<typeof useFunnelSubStep>['subStepRef'];\n}\n\nexport function InternalContainerAsSubstep(props: InternalContainerProps) {\n const { subStepRef, funnelSubStepProps } = useFunnelSubStep();\n const modalContext = useModalContext();\n\n return (\n <InternalContainer\n {...props}\n __subStepRef={modalContext?.isInModal ? { current: null } : subStepRef}\n __funnelSubStepProps={modalContext?.isInModal ? {} : funnelSubStepProps}\n />\n );\n}\n\nexport default function InternalContainer({\n header,\n footer,\n children,\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n disableFooterPaddings = false,\n fitHeight,\n media,\n __stickyOffset,\n __mobileStickyOffset,\n __stickyHeader = false,\n __internalRootRef = null,\n __disableFooterDivider = false,\n __hiddenContent = false,\n __headerRef,\n __fullPage = false,\n __disableStickyMobile = true,\n __funnelSubStepProps,\n __subStepRef,\n ...restProps\n}: InternalContainerProps) {\n const isMobile = useMobile();\n const isRefresh = useVisualRefresh();\n const baseProps = getBaseProps(restProps);\n const rootRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const { isSticky, isStuck, isStuckAtBottom, stickyStyles } = useStickyHeader(\n rootRef,\n headerRef,\n __stickyHeader,\n __stickyOffset,\n __mobileStickyOffset,\n __disableStickyMobile,\n __fullPage && isRefresh && !isMobile\n );\n const contentId = useUniqueId();\n\n const hasDynamicHeight = isRefresh && variant === 'full-page';\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n const headerMergedRef = useMergeRefs(headerRef, __headerRef);\n\n // The container is only sticky on mobile if it is the header for the table.\n // In this case we don't want the container to have sticky styles, as only the table header row will show as stuck on scroll.\n const shouldHaveStickyStyles = isSticky && !isMobile;\n\n const hasMedia = !!media?.content;\n const mediaPosition = media?.position ?? 'top';\n return (\n <div\n {...baseProps}\n {...__funnelSubStepProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[`variant-${variant}`],\n fitHeight && styles['fit-height'],\n hasMedia && (mediaPosition === 'side' ? styles['with-side-media'] : styles['with-top-media']),\n shouldHaveStickyStyles && [styles['sticky-enabled']],\n shouldHaveStickyStyles && isStuck && isStuckAtBottom && [styles['with-stuck-sticky-header-at-bottom']],\n isRefresh && styles.refresh\n )}\n ref={mergedRef}\n {...getAnalyticsLabelAttribute(\n `.${analyticsSelectors.header} h1, .${analyticsSelectors.header} h2, .${analyticsSelectors.header} h3`\n )}\n >\n {hasMedia && (\n <div\n className={clsx(styles[`media-${mediaPosition === 'side' ? 'side' : 'top'}`], styles.media)}\n style={mediaPosition === 'top' ? { height: media?.height || '' } : { width: media?.width || '' }}\n >\n {media.content}\n </div>\n )}\n <div\n id={contentId}\n ref={__subStepRef}\n className={clsx(styles['content-wrapper'], fitHeight && styles['content-wrapper-fit-height'])}\n >\n {header && (\n <ContainerHeaderContextProvider>\n <StickyHeaderContext.Provider value={{ isStuck, isStuckAtBottom }}>\n <div\n className={clsx(\n isRefresh && styles.refresh,\n styles.header,\n analyticsSelectors.header,\n styles[`header-variant-${variant}`],\n {\n [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,\n [styles['header-sticky-enabled']]: isSticky,\n [styles['header-dynamic-height']]: hasDynamicHeight,\n [styles['header-stuck']]: isStuck,\n [styles['with-paddings']]: !disableHeaderPaddings,\n [styles['with-hidden-content']]: !children || __hiddenContent,\n [styles['header-with-media']]: hasMedia,\n [styles['header-full-page']]: __fullPage && isRefresh,\n }\n )}\n {...stickyStyles}\n ref={headerMergedRef}\n >\n {isStuck && !isMobile && isRefresh && __fullPage && <div className={styles['header-cover']}></div>}\n {header}\n </div>\n </StickyHeaderContext.Provider>\n </ContainerHeaderContextProvider>\n )}\n <div className={clsx(styles.content, fitHeight && styles['content-fit-height'])}>\n <div\n className={clsx(styles['content-inner'], testStyles['content-inner'], {\n [styles['with-paddings']]: !disableContentPaddings,\n [styles['with-header']]: !!header,\n })}\n >\n {children}\n </div>\n </div>\n {footer && (\n <div\n className={clsx(styles.footer, {\n [styles['with-divider']]: !__disableFooterDivider,\n [styles['with-paddings']]: !disableFooterPaddings,\n })}\n >\n {footer}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}
@@ -198,8 +198,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
198
198
  font-style: normal;
199
199
  font-variant: normal;
200
200
  font-stretch: normal;
201
- -webkit-hyphens: none;
202
- hyphens: none;
201
+ hyphens: none;
203
202
  letter-spacing: normal;
204
203
  list-style: disc outside none;
205
204
  tab-size: 8;
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
154
154
  font-style: normal;
155
155
  font-variant: normal;
156
156
  font-stretch: normal;
157
- -webkit-hyphens: none;
158
- hyphens: none;
157
+ hyphens: none;
159
158
  letter-spacing: normal;
160
159
  list-style: disc outside none;
161
160
  tab-size: 8;
@@ -185,8 +185,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
185
185
  font-style: normal;
186
186
  font-variant: normal;
187
187
  font-stretch: normal;
188
- -webkit-hyphens: none;
189
- hyphens: none;
188
+ hyphens: none;
190
189
  letter-spacing: normal;
191
190
  list-style: disc outside none;
192
191
  tab-size: 8;
@@ -198,8 +198,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
198
198
  font-style: normal;
199
199
  font-variant: normal;
200
200
  font-stretch: normal;
201
- -webkit-hyphens: none;
202
- hyphens: none;
201
+ hyphens: none;
203
202
  letter-spacing: normal;
204
203
  list-style: disc outside none;
205
204
  tab-size: 8;
@@ -220,8 +220,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
220
220
  font-style: normal;
221
221
  font-variant: normal;
222
222
  font-stretch: normal;
223
- -webkit-hyphens: none;
224
- hyphens: none;
223
+ hyphens: none;
225
224
  letter-spacing: normal;
226
225
  list-style: disc outside none;
227
226
  tab-size: 8;
@@ -218,8 +218,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
218
218
  font-style: normal;
219
219
  font-variant: normal;
220
220
  font-stretch: normal;
221
- -webkit-hyphens: none;
222
- hyphens: none;
221
+ hyphens: none;
223
222
  letter-spacing: normal;
224
223
  list-style: disc outside none;
225
224
  tab-size: 8;
@@ -710,8 +710,7 @@ body[data-awsui-focus-visible=true] .awsui_stack_1q84n_12e9t_370 > .awsui_notifi
710
710
  font-style: normal;
711
711
  font-variant: normal;
712
712
  font-stretch: normal;
713
- -webkit-hyphens: none;
714
- hyphens: none;
713
+ hyphens: none;
715
714
  letter-spacing: normal;
716
715
  list-style: disc outside none;
717
716
  tab-size: 8;
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
154
154
  font-style: normal;
155
155
  font-variant: normal;
156
156
  font-stretch: normal;
157
- -webkit-hyphens: none;
158
- hyphens: none;
157
+ hyphens: none;
159
158
  letter-spacing: normal;
160
159
  list-style: disc outside none;
161
160
  tab-size: 8;
@@ -239,8 +239,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
239
239
  font-style: normal;
240
240
  font-variant: normal;
241
241
  font-stretch: normal;
242
- -webkit-hyphens: none;
243
- hyphens: none;
242
+ hyphens: none;
244
243
  letter-spacing: normal;
245
244
  list-style: disc outside none;
246
245
  tab-size: 8;
@@ -154,8 +154,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
154
154
  font-style: normal;
155
155
  font-variant: normal;
156
156
  font-stretch: normal;
157
- -webkit-hyphens: none;
158
- hyphens: none;
157
+ hyphens: none;
159
158
  letter-spacing: normal;
160
159
  list-style: disc outside none;
161
160
  tab-size: 8;
@@ -190,8 +190,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
190
190
  font-style: normal;
191
191
  font-variant: normal;
192
192
  font-stretch: normal;
193
- -webkit-hyphens: none;
194
- hyphens: none;
193
+ hyphens: none;
195
194
  letter-spacing: normal;
196
195
  list-style: disc outside none;
197
196
  tab-size: 8;