@cloudscape-design/components-themeable 3.0.539 → 3.0.541

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 (68) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/button-dropdown/styles.scss +1 -1
  3. package/lib/internal/template/app-layout/defaults.d.ts +2 -2
  4. package/lib/internal/template/app-layout/defaults.d.ts.map +1 -1
  5. package/lib/internal/template/app-layout/defaults.js.map +1 -1
  6. package/lib/internal/template/app-layout/drawer/interfaces.d.ts +2 -3
  7. package/lib/internal/template/app-layout/drawer/interfaces.d.ts.map +1 -1
  8. package/lib/internal/template/app-layout/drawer/interfaces.js.map +1 -1
  9. package/lib/internal/template/app-layout/drawer/resizable-drawer.d.ts +1 -1
  10. package/lib/internal/template/app-layout/drawer/resizable-drawer.d.ts.map +1 -1
  11. package/lib/internal/template/app-layout/drawer/resizable-drawer.js +9 -18
  12. package/lib/internal/template/app-layout/drawer/resizable-drawer.js.map +1 -1
  13. package/lib/internal/template/app-layout/index.d.ts.map +1 -1
  14. package/lib/internal/template/app-layout/index.js +41 -79
  15. package/lib/internal/template/app-layout/index.js.map +1 -1
  16. package/lib/internal/template/app-layout/split-panel/constants.d.ts +3 -0
  17. package/lib/internal/template/app-layout/split-panel/constants.d.ts.map +1 -0
  18. package/lib/internal/template/app-layout/split-panel/constants.js +5 -0
  19. package/lib/internal/template/app-layout/split-panel/constants.js.map +1 -0
  20. package/lib/internal/template/app-layout/split-panel/index.d.ts +1 -0
  21. package/lib/internal/template/app-layout/split-panel/index.d.ts.map +1 -1
  22. package/lib/internal/template/app-layout/split-panel/index.js +1 -0
  23. package/lib/internal/template/app-layout/split-panel/index.js.map +1 -1
  24. package/lib/internal/template/app-layout/split-panel/provider.d.ts +2 -2
  25. package/lib/internal/template/app-layout/split-panel/provider.d.ts.map +1 -1
  26. package/lib/internal/template/app-layout/split-panel/provider.js +18 -16
  27. package/lib/internal/template/app-layout/split-panel/provider.js.map +1 -1
  28. package/lib/internal/template/app-layout/utils/use-app-layout-rect.d.ts +8 -0
  29. package/lib/internal/template/app-layout/utils/use-app-layout-rect.d.ts.map +1 -0
  30. package/lib/internal/template/app-layout/utils/{use-content-width.js → use-app-layout-rect.js} +6 -5
  31. package/lib/internal/template/app-layout/utils/use-app-layout-rect.js.map +1 -0
  32. package/lib/internal/template/app-layout/visual-refresh/split-panel.js +1 -1
  33. package/lib/internal/template/app-layout/visual-refresh/split-panel.js.map +1 -1
  34. package/lib/internal/template/button-dropdown/styles.css.js +15 -15
  35. package/lib/internal/template/button-dropdown/styles.scoped.css +23 -23
  36. package/lib/internal/template/button-dropdown/styles.selectors.js +15 -15
  37. package/lib/internal/template/container/index.d.ts +1 -1
  38. package/lib/internal/template/container/index.d.ts.map +1 -1
  39. package/lib/internal/template/container/index.js +5 -3
  40. package/lib/internal/template/container/index.js.map +1 -1
  41. package/lib/internal/template/flashbar/common.d.ts +0 -1
  42. package/lib/internal/template/flashbar/common.d.ts.map +1 -1
  43. package/lib/internal/template/flashbar/common.js +3 -2
  44. package/lib/internal/template/flashbar/common.js.map +1 -1
  45. package/lib/internal/template/internal/base-component/styles.scoped.css +0 -11
  46. package/lib/internal/template/internal/environment.js +1 -1
  47. package/lib/internal/template/internal/environment.json +1 -1
  48. package/lib/internal/template/internal/generated/theming/index.cjs +0 -31
  49. package/lib/internal/template/internal/generated/theming/index.js +0 -31
  50. package/lib/internal/template/internal/hooks/use-base-component/index.d.ts +2 -1
  51. package/lib/internal/template/internal/hooks/use-base-component/index.d.ts.map +1 -1
  52. package/lib/internal/template/internal/hooks/use-base-component/index.js +2 -2
  53. package/lib/internal/template/internal/hooks/use-base-component/index.js.map +1 -1
  54. package/lib/internal/template/internal/hooks/use-telemetry/index.d.ts +2 -1
  55. package/lib/internal/template/internal/hooks/use-telemetry/index.d.ts.map +1 -1
  56. package/lib/internal/template/internal/hooks/use-telemetry/index.js +2 -2
  57. package/lib/internal/template/internal/hooks/use-telemetry/index.js.map +1 -1
  58. package/lib/internal/template/table/index.d.ts.map +1 -1
  59. package/lib/internal/template/table/index.js +11 -1
  60. package/lib/internal/template/table/index.js.map +1 -1
  61. package/package.json +1 -1
  62. package/lib/internal/template/app-layout/utils/use-content-width.d.ts +0 -5
  63. package/lib/internal/template/app-layout/utils/use-content-width.d.ts.map +0 -1
  64. package/lib/internal/template/app-layout/utils/use-content-width.js.map +0 -1
  65. package/lib/internal/template/app-layout/utils/use-window-width.d.ts +0 -2
  66. package/lib/internal/template/app-layout/utils/use-window-width.d.ts.map +0 -1
  67. package/lib/internal/template/app-layout/utils/use-window-width.js +0 -13
  68. package/lib/internal/template/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-dropdown_sne0l_59w95_93:not(#\9) {
93
+ .awsui_button-dropdown_sne0l_15pdl_93:not(#\9) {
94
94
  display: inline-block;
95
95
  }
96
96
 
97
- .awsui_items-list-container_sne0l_59w95_97:not(#\9) {
97
+ .awsui_items-list-container_sne0l_15pdl_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-0_sne0l_59w95_1 500ms var(--motion-easing-show-quick-lvi5i8, ease-out);
102
+ animation: awsui_awsui-motion-fade-in-0_sne0l_15pdl_1 500ms var(--motion-easing-show-quick-lvi5i8, ease-out);
103
103
  animation-fill-mode: none;
104
104
  }
105
105
  @media (prefers-reduced-motion: reduce) {
106
- .awsui_items-list-container_sne0l_59w95_97:not(#\9) {
106
+ .awsui_items-list-container_sne0l_15pdl_97:not(#\9) {
107
107
  animation: none;
108
108
  transition: none;
109
109
  }
110
110
  }
111
- .awsui-motion-disabled .awsui_items-list-container_sne0l_59w95_97:not(#\9), .awsui-mode-entering .awsui_items-list-container_sne0l_59w95_97:not(#\9) {
111
+ .awsui-motion-disabled .awsui_items-list-container_sne0l_15pdl_97:not(#\9), .awsui-mode-entering .awsui_items-list-container_sne0l_15pdl_97:not(#\9) {
112
112
  animation: none;
113
113
  transition: none;
114
114
  }
115
115
 
116
- .awsui_rotate-up_sne0l_59w95_116:not(#\9) {
116
+ .awsui_rotate-up_sne0l_15pdl_116:not(#\9) {
117
117
  transform: rotate(-180deg);
118
118
  transition: transform var(--motion-duration-rotate-180-6z1h8e, 135ms) var(--motion-easing-rotate-180-l3wboa, cubic-bezier(0.165, 0.84, 0.44, 1));
119
119
  }
120
120
  @media (prefers-reduced-motion: reduce) {
121
- .awsui_rotate-up_sne0l_59w95_116:not(#\9) {
121
+ .awsui_rotate-up_sne0l_15pdl_116:not(#\9) {
122
122
  animation: none;
123
123
  transition: none;
124
124
  }
125
125
  }
126
- .awsui-motion-disabled .awsui_rotate-up_sne0l_59w95_116:not(#\9), .awsui-mode-entering .awsui_rotate-up_sne0l_59w95_116:not(#\9) {
126
+ .awsui-motion-disabled .awsui_rotate-up_sne0l_15pdl_116:not(#\9), .awsui-mode-entering .awsui_rotate-up_sne0l_15pdl_116:not(#\9) {
127
127
  animation: none;
128
128
  transition: none;
129
129
  }
130
130
 
131
- .awsui_rotate-down_sne0l_59w95_131:not(#\9) {
131
+ .awsui_rotate-down_sne0l_15pdl_131:not(#\9) {
132
132
  transform: rotate(0deg);
133
133
  transition: transform var(--motion-duration-rotate-180-6z1h8e, 135ms) var(--motion-easing-rotate-180-l3wboa, cubic-bezier(0.165, 0.84, 0.44, 1));
134
134
  }
135
135
  @media (prefers-reduced-motion: reduce) {
136
- .awsui_rotate-down_sne0l_59w95_131:not(#\9) {
136
+ .awsui_rotate-down_sne0l_15pdl_131:not(#\9) {
137
137
  animation: none;
138
138
  transition: none;
139
139
  }
140
140
  }
141
- .awsui-motion-disabled .awsui_rotate-down_sne0l_59w95_131:not(#\9), .awsui-mode-entering .awsui_rotate-down_sne0l_59w95_131:not(#\9) {
141
+ .awsui-motion-disabled .awsui_rotate-down_sne0l_15pdl_131:not(#\9), .awsui-mode-entering .awsui_rotate-down_sne0l_15pdl_131:not(#\9) {
142
142
  animation: none;
143
143
  transition: none;
144
144
  }
145
145
 
146
- .awsui_header_sne0l_59w95_146:not(#\9) {
146
+ .awsui_header_sne0l_15pdl_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-yoy972, 1px) solid transparent;
155
155
  }
156
156
 
157
- .awsui_title_sne0l_59w95_157:not(#\9),
158
- .awsui_description_sne0l_59w95_158:not(#\9) {
159
- color: var(--color-text-dropdown-header-z1le22, #16191f);
157
+ .awsui_title_sne0l_15pdl_157:not(#\9),
158
+ .awsui_description_sne0l_15pdl_158:not(#\9) {
159
+ color: var(--color-text-top-navigation-title-ow31ne, #16191f);
160
160
  }
161
161
 
162
- .awsui_split-trigger-wrapper_sne0l_59w95_162:not(#\9) {
162
+ .awsui_split-trigger-wrapper_sne0l_15pdl_162:not(#\9) {
163
163
  display: flex;
164
164
  }
165
- .awsui_split-trigger-wrapper_sne0l_59w95_162 > .awsui_trigger-item_sne0l_59w95_165 > button:not(#\9):focus {
165
+ .awsui_split-trigger-wrapper_sne0l_15pdl_162 > .awsui_trigger-item_sne0l_15pdl_165 > button:not(#\9):focus {
166
166
  z-index: 1;
167
167
  }
168
- .awsui_split-trigger-wrapper_sne0l_59w95_162 > .awsui_trigger-item_sne0l_59w95_165:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_59w95_168 {
168
+ .awsui_split-trigger-wrapper_sne0l_15pdl_162 > .awsui_trigger-item_sne0l_15pdl_165:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_15pdl_168 {
169
169
  border-start-end-radius: 0;
170
170
  border-end-end-radius: 0;
171
171
  padding-inline-end: var(--space-m-kpg8id, 16px);
172
172
  margin-inline-end: var(--space-xxxs-z28114, 2px);
173
173
  }
174
- .awsui_split-trigger-wrapper_sne0l_59w95_162 > .awsui_trigger-item_sne0l_59w95_165:not(#\9):not(:first-child) > .awsui_trigger-button_sne0l_59w95_168 {
174
+ .awsui_split-trigger-wrapper_sne0l_15pdl_162 > .awsui_trigger-item_sne0l_15pdl_165:not(#\9):not(:first-child) > .awsui_trigger-button_sne0l_15pdl_168 {
175
175
  border-start-start-radius: 0;
176
176
  border-end-start-radius: 0;
177
177
  padding-inline: calc(var(--space-xs-xf5ch3, 8px) - 2px);
178
178
  }
179
- .awsui_split-trigger-wrapper_sne0l_59w95_162 > .awsui_trigger-item_sne0l_59w95_165:not(#\9):not(:first-child).awsui_visual-refresh_sne0l_59w95_179 > .awsui_trigger-button_sne0l_59w95_168 {
179
+ .awsui_split-trigger-wrapper_sne0l_15pdl_162 > .awsui_trigger-item_sne0l_15pdl_165:not(#\9):not(:first-child).awsui_visual-refresh_sne0l_15pdl_179 > .awsui_trigger-button_sne0l_15pdl_168 {
180
180
  padding-inline-end: calc(var(--space-s-2025hl, 12px) - 2px);
181
181
  }
182
182
 
183
- .awsui_split-trigger_sne0l_59w95_162:not(#\9) {
183
+ .awsui_split-trigger_sne0l_15pdl_162:not(#\9) {
184
184
  display: contents;
185
185
  }
186
186
 
187
- .awsui_dropdown-trigger_sne0l_59w95_187:not(#\9) {
187
+ .awsui_dropdown-trigger_sne0l_15pdl_187:not(#\9) {
188
188
  display: contents;
189
189
  }
190
190
 
191
- .awsui_test-utils-button-trigger_sne0l_59w95_191:not(#\9) {
191
+ .awsui_test-utils-button-trigger_sne0l_15pdl_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-dropdown_sne0l_59w95_93",
6
- "items-list-container": "awsui_items-list-container_sne0l_59w95_97",
7
- "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_sne0l_59w95_1",
8
- "rotate-up": "awsui_rotate-up_sne0l_59w95_116",
9
- "rotate-down": "awsui_rotate-down_sne0l_59w95_131",
10
- "header": "awsui_header_sne0l_59w95_146",
11
- "title": "awsui_title_sne0l_59w95_157",
12
- "description": "awsui_description_sne0l_59w95_158",
13
- "split-trigger-wrapper": "awsui_split-trigger-wrapper_sne0l_59w95_162",
14
- "trigger-item": "awsui_trigger-item_sne0l_59w95_165",
15
- "trigger-button": "awsui_trigger-button_sne0l_59w95_168",
16
- "visual-refresh": "awsui_visual-refresh_sne0l_59w95_179",
17
- "split-trigger": "awsui_split-trigger_sne0l_59w95_162",
18
- "dropdown-trigger": "awsui_dropdown-trigger_sne0l_59w95_187",
19
- "test-utils-button-trigger": "awsui_test-utils-button-trigger_sne0l_59w95_191"
5
+ "button-dropdown": "awsui_button-dropdown_sne0l_15pdl_93",
6
+ "items-list-container": "awsui_items-list-container_sne0l_15pdl_97",
7
+ "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_sne0l_15pdl_1",
8
+ "rotate-up": "awsui_rotate-up_sne0l_15pdl_116",
9
+ "rotate-down": "awsui_rotate-down_sne0l_15pdl_131",
10
+ "header": "awsui_header_sne0l_15pdl_146",
11
+ "title": "awsui_title_sne0l_15pdl_157",
12
+ "description": "awsui_description_sne0l_15pdl_158",
13
+ "split-trigger-wrapper": "awsui_split-trigger-wrapper_sne0l_15pdl_162",
14
+ "trigger-item": "awsui_trigger-item_sne0l_15pdl_165",
15
+ "trigger-button": "awsui_trigger-button_sne0l_15pdl_168",
16
+ "visual-refresh": "awsui_visual-refresh_sne0l_15pdl_179",
17
+ "split-trigger": "awsui_split-trigger_sne0l_15pdl_162",
18
+ "dropdown-trigger": "awsui_dropdown-trigger_sne0l_15pdl_187",
19
+ "test-utils-button-trigger": "awsui_test-utils-button-trigger_sne0l_15pdl_191"
20
20
  };
21
21
 
@@ -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
@@ -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,eAgBhB"}
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"}
@@ -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
@@ -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,MAAM,YAAY,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAI3F,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAKjB;QALiB,EAChC,OAAO,GAAG,SAAS,EACnB,qBAAqB,GAAG,KAAK,EAC7B,sBAAsB,GAAG,KAAK,OAEf,EADZ,KAAK,cAJwB,8DAKjC,CADS;IAER,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACzD,MAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAE9C,OAAO,CACL,oBAAC,sBAAsB;QACrB,oBAAC,0BAA0B,kBACzB,OAAO,EAAE,OAAO,EAChB,sBAAsB,EAAE,sBAAsB,EAC9C,qBAAqB,EAAE,qBAAqB,IACxC,KAAK,EACL,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 ...props\n}: ContainerProps) {\n const baseComponentProps = useBaseComponent('Container');\n const externalProps = getExternalProps(props);\n\n return (\n <AnalyticsFunnelSubStep>\n <InternalContainerAsSubstep\n variant={variant}\n disableContentPaddings={disableContentPaddings}\n disableHeaderPaddings={disableHeaderPaddings}\n {...props}\n {...externalProps}\n {...baseComponentProps}\n />\n </AnalyticsFunnelSubStep>\n );\n}\n\napplyDisplayName(Container, 'Container');\n"]}
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,MAAM,YAAY,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAI3F,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAMjB;QANiB,EAChC,OAAO,GAAG,SAAS,EACnB,qBAAqB,GAAG,KAAK,EAC7B,sBAAsB,GAAG,KAAK,EAC9B,SAAS,GAAG,KAAK,OAEF,EADZ,KAAK,cALwB,2EAMjC,CADS;IAER,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,WAAW,EAAE;QACvD,KAAK,EAAE,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,SAAS,EAAE,OAAO,EAAE;KAC7E,CAAC,CAAC;IACH,MAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAE9C,OAAO,CACL,oBAAC,sBAAsB;QACrB,oBAAC,0BAA0B,kBACzB,OAAO,EAAE,OAAO,EAChB,sBAAsB,EAAE,sBAAsB,EAC9C,qBAAqB,EAAE,qBAAqB,EAC5C,SAAS,EAAE,SAAS,IAChB,KAAK,EACL,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"]}
@@ -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;
@@ -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;AAK7C,eAAO,MAAM,aAAa,aAAa,CAAC;AAGxC,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;;;;;;;;EAsDA"}
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"}
@@ -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(componentName);
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);
@@ -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,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AAC;YAC9E,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC5B,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAG,CAAC,CAAC;aACtC;SACF;KACF;IAED,SAAS,CAAC,GAAG,EAAE;QACb,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\nexport const componentName = 'Flashbar';\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(componentName);\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"]}
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,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Q,EAAE,EAAE,EAAE,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;YAC9E,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC5B,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAG,CAAC,CAAC;aACtC;SACF;KACF;IAED,SAAS,CAAC,GAAG,EAAE;QACb,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-64vc6h:#545b64;
312
312
  --color-text-dropdown-footer-rnmaph:#687078;
313
313
  --color-text-dropdown-group-label-sizd89:#545b64;
314
- --color-text-dropdown-header-z1le22:#16191f;
315
314
  --color-text-dropdown-item-default-d4af6n:#16191f;
316
315
  --color-text-dropdown-item-dimmed-oru6hf:#aab7b8;
317
316
  --color-text-dropdown-item-disabled-nf1b1j:#aab7b8;
@@ -891,7 +890,6 @@
891
890
  --color-text-disabled-inline-edit-64vc6h:#95a5a6;
892
891
  --color-text-dropdown-footer-rnmaph:#95a5a6;
893
892
  --color-text-dropdown-group-label-sizd89:#95a5a6;
894
- --color-text-dropdown-header-z1le22:#fafafa;
895
893
  --color-text-dropdown-item-default-d4af6n:#d5dbdb;
896
894
  --color-text-dropdown-item-dimmed-oru6hf:#687078;
897
895
  --color-text-dropdown-item-disabled-nf1b1j:#687078;
@@ -1176,7 +1174,6 @@
1176
1174
  --color-text-disabled-inline-edit-64vc6h:#95a5a6;
1177
1175
  --color-text-dropdown-footer-rnmaph:#95a5a6;
1178
1176
  --color-text-dropdown-group-label-sizd89:#95a5a6;
1179
- --color-text-dropdown-header-z1le22:#fafafa;
1180
1177
  --color-text-dropdown-item-default-d4af6n:#d5dbdb;
1181
1178
  --color-text-dropdown-item-dimmed-oru6hf:#687078;
1182
1179
  --color-text-dropdown-item-disabled-nf1b1j:#687078;
@@ -1474,7 +1471,6 @@
1474
1471
  --color-text-disabled-inline-edit-64vc6h:#414d5c;
1475
1472
  --color-text-dropdown-footer-rnmaph:#5f6b7a;
1476
1473
  --color-text-dropdown-group-label-sizd89:#414d5c;
1477
- --color-text-dropdown-header-z1le22:#000716;
1478
1474
  --color-text-dropdown-item-default-d4af6n:#000716;
1479
1475
  --color-text-dropdown-item-dimmed-oru6hf:#9ba7b6;
1480
1476
  --color-text-dropdown-item-disabled-nf1b1j:#9ba7b6;
@@ -1812,7 +1808,6 @@
1812
1808
  --color-text-disabled-inline-edit-64vc6h:#9ba7b6;
1813
1809
  --color-text-dropdown-footer-rnmaph:#8d99a8;
1814
1810
  --color-text-dropdown-group-label-sizd89:#b6bec9;
1815
- --color-text-dropdown-header-z1le22:#fbfbfb;
1816
1811
  --color-text-dropdown-item-default-d4af6n:#d1d5db;
1817
1812
  --color-text-dropdown-item-dimmed-oru6hf:#5f6b7a;
1818
1813
  --color-text-dropdown-item-disabled-nf1b1j:#5f6b7a;
@@ -2074,7 +2069,6 @@
2074
2069
  --color-text-disabled-inline-edit-64vc6h:#9ba7b6;
2075
2070
  --color-text-dropdown-footer-rnmaph:#8d99a8;
2076
2071
  --color-text-dropdown-group-label-sizd89:#b6bec9;
2077
- --color-text-dropdown-header-z1le22:#fbfbfb;
2078
2072
  --color-text-dropdown-item-default-d4af6n:#d1d5db;
2079
2073
  --color-text-dropdown-item-dimmed-oru6hf:#5f6b7a;
2080
2074
  --color-text-dropdown-item-disabled-nf1b1j:#5f6b7a;
@@ -2261,7 +2255,6 @@
2261
2255
  --color-text-disabled-inline-edit-64vc6h:#9ba7b6;
2262
2256
  --color-text-dropdown-footer-rnmaph:#8d99a8;
2263
2257
  --color-text-dropdown-group-label-sizd89:#b6bec9;
2264
- --color-text-dropdown-header-z1le22:#fbfbfb;
2265
2258
  --color-text-dropdown-item-default-d4af6n:#d1d5db;
2266
2259
  --color-text-dropdown-item-dimmed-oru6hf:#5f6b7a;
2267
2260
  --color-text-dropdown-item-disabled-nf1b1j:#5f6b7a;
@@ -2449,7 +2442,6 @@
2449
2442
  --color-text-disabled-inline-edit-64vc6h:#9ba7b6;
2450
2443
  --color-text-dropdown-footer-rnmaph:#8d99a8;
2451
2444
  --color-text-dropdown-group-label-sizd89:#b6bec9;
2452
- --color-text-dropdown-header-z1le22:#fbfbfb;
2453
2445
  --color-text-dropdown-item-default-d4af6n:#d1d5db;
2454
2446
  --color-text-dropdown-item-dimmed-oru6hf:#5f6b7a;
2455
2447
  --color-text-dropdown-item-disabled-nf1b1j:#5f6b7a;
@@ -2649,7 +2641,6 @@
2649
2641
  --color-text-disabled-inline-edit-64vc6h:#9ba7b6;
2650
2642
  --color-text-dropdown-footer-rnmaph:#8d99a8;
2651
2643
  --color-text-dropdown-group-label-sizd89:#b6bec9;
2652
- --color-text-dropdown-header-z1le22:#fbfbfb;
2653
2644
  --color-text-dropdown-item-default-d4af6n:#d1d5db;
2654
2645
  --color-text-dropdown-item-dimmed-oru6hf:#5f6b7a;
2655
2646
  --color-text-dropdown-item-disabled-nf1b1j:#5f6b7a;
@@ -3035,7 +3026,6 @@
3035
3026
  --color-text-disabled-inline-edit-64vc6h:#9ba7b6;
3036
3027
  --color-text-dropdown-footer-rnmaph:#8d99a8;
3037
3028
  --color-text-dropdown-group-label-sizd89:#b6bec9;
3038
- --color-text-dropdown-header-z1le22:#fbfbfb;
3039
3029
  --color-text-dropdown-item-default-d4af6n:#d1d5db;
3040
3030
  --color-text-dropdown-item-dimmed-oru6hf:#5f6b7a;
3041
3031
  --color-text-dropdown-item-disabled-nf1b1j:#5f6b7a;
@@ -3223,7 +3213,6 @@
3223
3213
  --color-text-disabled-inline-edit-64vc6h:#9ba7b6;
3224
3214
  --color-text-dropdown-footer-rnmaph:#8d99a8;
3225
3215
  --color-text-dropdown-group-label-sizd89:#b6bec9;
3226
- --color-text-dropdown-header-z1le22:#fbfbfb;
3227
3216
  --color-text-dropdown-item-default-d4af6n:#d1d5db;
3228
3217
  --color-text-dropdown-item-dimmed-oru6hf:#5f6b7a;
3229
3218
  --color-text-dropdown-item-disabled-nf1b1j:#5f6b7a;
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (3f38b121)";
2
+ export var PACKAGE_VERSION = "3.0.0 (03232b72)";
3
3
  export var THEME = "open-source-visual-refresh";
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (3f38b121)",
3
+ "PACKAGE_VERSION": "3.0.0 (03232b72)",
4
4
  "THEME": "default",
5
5
  "ALWAYS_VISUAL_REFRESH": false
6
6
  }
@@ -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;AAMzC,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;;EAKtE"}
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,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrF,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;IACrE,YAAY,CAAC,aAAa,CAAC,CAAC;IAC5B,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 { 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) {\n useTelemetry(componentName);\n useFocusVisible();\n const elementRef = useComponentMetadata<T>(componentName, PACKAGE_VERSION);\n return { __internalRootRef: elementRef };\n}\n"]}
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
- export declare function useTelemetry(componentName: string): void;
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":"AAMA,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,QAGjD"}
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"}