@cloudscape-design/components 3.0.1155 → 3.0.1157

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/alert/index.js +1 -1
  2. package/alert/interfaces.d.ts +1 -2
  3. package/anchor-navigation/styles.css.js +8 -8
  4. package/anchor-navigation/styles.scoped.css +21 -21
  5. package/anchor-navigation/styles.selectors.js +8 -8
  6. package/app-layout/runtime-drawer/index.d.ts.map +1 -1
  7. package/app-layout/runtime-drawer/index.js +20 -18
  8. package/app-layout/runtime-drawer/index.js.map +1 -1
  9. package/app-layout/visual-refresh/styles.css.js +86 -86
  10. package/app-layout/visual-refresh/styles.scoped.css +164 -163
  11. package/app-layout/visual-refresh/styles.selectors.js +86 -86
  12. package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +30 -30
  13. package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +86 -83
  14. package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +30 -30
  15. package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts.map +1 -1
  16. package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js +1 -1
  17. package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js.map +1 -1
  18. package/attribute-editor/styles.css.js +15 -15
  19. package/attribute-editor/styles.scoped.css +28 -28
  20. package/attribute-editor/styles.selectors.js +15 -15
  21. package/autosuggest/index.js +28 -11
  22. package/autosuggest/interfaces.d.ts +2 -1
  23. package/autosuggest/interfaces.js.map +1 -1
  24. package/badge/index.d.ts +2 -0
  25. package/badge/index.js +14 -13
  26. package/badge/interfaces.d.ts +3 -2
  27. package/box/index.js +18 -13
  28. package/box/interfaces.d.ts +2 -1
  29. package/box/styles.css.js +192 -192
  30. package/box/styles.scoped.css +241 -241
  31. package/box/styles.selectors.js +192 -192
  32. package/breadcrumb-group/item/styles.css.js +7 -7
  33. package/breadcrumb-group/item/styles.scoped.css +28 -28
  34. package/breadcrumb-group/item/styles.selectors.js +7 -7
  35. package/button/index.js +12 -11
  36. package/button/interfaces.d.ts +4 -2
  37. package/button/styles.css.js +22 -22
  38. package/button/styles.scoped.css +78 -78
  39. package/button/styles.selectors.js +22 -22
  40. package/button-dropdown/index.js +27 -11
  41. package/button-dropdown/interfaces.d.ts +6 -2
  42. package/button-dropdown/item-element/styles.css.js +20 -20
  43. package/button-dropdown/item-element/styles.scoped.css +35 -35
  44. package/button-dropdown/item-element/styles.selectors.js +20 -20
  45. package/button-group/index.js +42 -11
  46. package/button-group/interfaces.d.ts +10 -0
  47. package/button-group/interfaces.d.ts.map +1 -1
  48. package/button-group/interfaces.js.map +1 -1
  49. package/cards/styles.css.js +39 -39
  50. package/cards/styles.scoped.css +51 -51
  51. package/cards/styles.selectors.js +39 -39
  52. package/checkbox/index.js +9 -11
  53. package/checkbox/interfaces.d.ts +3 -2
  54. package/code-editor/styles.css.js +33 -33
  55. package/code-editor/styles.scoped.css +139 -139
  56. package/code-editor/styles.selectors.js +33 -33
  57. package/container/index.js +29 -13
  58. package/container/interfaces.d.ts +2 -1
  59. package/date-input/index.js +8 -10
  60. package/drawer/implementation.d.ts +1 -0
  61. package/drawer/implementation.d.ts.map +1 -1
  62. package/drawer/implementation.js +13 -4
  63. package/drawer/implementation.js.map +1 -1
  64. package/drawer/interfaces.d.ts +7 -0
  65. package/drawer/interfaces.d.ts.map +1 -1
  66. package/drawer/interfaces.js.map +1 -1
  67. package/drawer/styles.css.js +12 -8
  68. package/drawer/styles.scoped.css +35 -13
  69. package/drawer/styles.selectors.js +12 -8
  70. package/drawer/use-sticky-footer.d.ts +11 -0
  71. package/drawer/use-sticky-footer.d.ts.map +1 -0
  72. package/drawer/use-sticky-footer.js +35 -0
  73. package/drawer/use-sticky-footer.js.map +1 -0
  74. package/flashbar/index.js +10 -13
  75. package/flashbar/interfaces.d.ts +1 -0
  76. package/help-panel/styles.css.js +6 -6
  77. package/help-panel/styles.scoped.css +75 -75
  78. package/help-panel/styles.selectors.js +6 -6
  79. package/icon/index.js +8 -13
  80. package/icon/interfaces.d.ts +2 -1
  81. package/icon/styles.css.js +39 -39
  82. package/icon/styles.scoped.css +87 -87
  83. package/icon/styles.selectors.js +39 -39
  84. package/icon-provider/index.js +12 -2
  85. package/index.d.ts +4 -1
  86. package/index.js +4 -0
  87. package/input/index.js +53 -12
  88. package/input/interfaces.d.ts +3 -1
  89. package/internal/base-component/styles.scoped.css +62 -50
  90. package/internal/components/button-trigger/styles.css.js +13 -13
  91. package/internal/components/button-trigger/styles.scoped.css +29 -29
  92. package/internal/components/button-trigger/styles.selectors.js +13 -13
  93. package/internal/components/cartesian-chart/styles.css.js +28 -28
  94. package/internal/components/cartesian-chart/styles.scoped.css +33 -33
  95. package/internal/components/cartesian-chart/styles.selectors.js +28 -28
  96. package/internal/components/radio-button/interfaces.d.ts +3 -3
  97. package/internal/components/token-list/styles.css.js +10 -10
  98. package/internal/components/token-list/styles.scoped.css +25 -25
  99. package/internal/components/token-list/styles.selectors.js +10 -10
  100. package/internal/environment.js +3 -3
  101. package/internal/environment.json +3 -3
  102. package/internal/generated/styles/tokens.js +8 -8
  103. package/internal/generated/theming/index.cjs +24 -24
  104. package/internal/generated/theming/index.js +24 -24
  105. package/internal/hooks/use-portal-mode-classes/index.d.ts +3 -1
  106. package/internal/hooks/use-portal-mode-classes/index.d.ts.map +1 -1
  107. package/internal/hooks/use-portal-mode-classes/index.js +2 -2
  108. package/internal/hooks/use-portal-mode-classes/index.js.map +1 -1
  109. package/internal/manifest.json +1 -1
  110. package/internal/plugins/controllers/drawers.d.ts +2 -2
  111. package/internal/plugins/controllers/drawers.d.ts.map +1 -1
  112. package/internal/plugins/controllers/drawers.js.map +1 -1
  113. package/internal/plugins/widget/interfaces.d.ts +2 -2
  114. package/internal/plugins/widget/interfaces.d.ts.map +1 -1
  115. package/internal/plugins/widget/interfaces.js.map +1 -1
  116. package/key-value-pairs/styles.css.js +8 -8
  117. package/key-value-pairs/styles.scoped.css +10 -10
  118. package/key-value-pairs/styles.selectors.js +8 -8
  119. package/link/index.js +25 -11
  120. package/link/interfaces.d.ts +3 -2
  121. package/link/styles.css.js +20 -20
  122. package/link/styles.scoped.css +91 -91
  123. package/link/styles.selectors.js +20 -20
  124. package/navigable-group/index.js +19 -4
  125. package/package.json +4 -1
  126. package/popover/internal.js +1 -1
  127. package/popover/internal.js.map +1 -1
  128. package/popover/styles.css.js +57 -57
  129. package/popover/styles.scoped.css +87 -87
  130. package/popover/styles.selectors.js +57 -57
  131. package/progress-bar/index.d.ts +1 -0
  132. package/progress-bar/index.js +52 -14
  133. package/progress-bar/interfaces.d.ts +1 -0
  134. package/progress-bar/styles.css.js +19 -19
  135. package/progress-bar/styles.scoped.css +31 -31
  136. package/progress-bar/styles.selectors.js +19 -19
  137. package/prompt-input/index.js +19 -11
  138. package/prompt-input/interfaces.d.ts +4 -3
  139. package/radio-button/index.js +19 -4
  140. package/radio-group/index.js +20 -11
  141. package/radio-group/interfaces.d.ts +1 -1
  142. package/segmented-control/index.js +14 -13
  143. package/segmented-control/interfaces.d.ts +1 -0
  144. package/select/interfaces.d.ts +1 -1
  145. package/select/interfaces.js.map +1 -1
  146. package/side-navigation/styles.css.js +30 -30
  147. package/side-navigation/styles.scoped.css +47 -47
  148. package/side-navigation/styles.selectors.js +30 -30
  149. package/space-between/index.js +10 -13
  150. package/space-between/interfaces.d.ts +2 -1
  151. package/spinner/index.js +10 -13
  152. package/spinner/interfaces.d.ts +2 -1
  153. package/split-panel/icons/styles.css.js +22 -22
  154. package/split-panel/icons/styles.scoped.css +25 -25
  155. package/split-panel/icons/styles.selectors.js +22 -22
  156. package/status-indicator/index.js +10 -13
  157. package/status-indicator/interfaces.d.ts +2 -1
  158. package/steps/index.js +11 -11
  159. package/steps/interfaces.d.ts +6 -2
  160. package/table/header-cell/index.d.ts +1 -1
  161. package/table/header-cell/index.d.ts.map +1 -1
  162. package/table/header-cell/index.js +1 -1
  163. package/table/header-cell/index.js.map +1 -1
  164. package/table/header-cell/th-element.d.ts +1 -1
  165. package/table/header-cell/th-element.d.ts.map +1 -1
  166. package/table/header-cell/th-element.js.map +1 -1
  167. package/table/resizer/index.d.ts +3 -1
  168. package/table/resizer/index.d.ts.map +1 -1
  169. package/table/resizer/index.js +8 -5
  170. package/table/resizer/index.js.map +1 -1
  171. package/table/resizer/styles.css.js +13 -12
  172. package/table/resizer/styles.scoped.css +22 -22
  173. package/table/resizer/styles.selectors.js +13 -12
  174. package/table/thead.d.ts +1 -1
  175. package/table/thead.d.ts.map +1 -1
  176. package/table/thead.js.map +1 -1
  177. package/tag-editor/styles.css.js +3 -3
  178. package/tag-editor/styles.scoped.css +13 -13
  179. package/tag-editor/styles.selectors.js +3 -3
  180. package/test-utils/dom/drawer/index.d.ts +1 -0
  181. package/test-utils/dom/drawer/index.js +3 -0
  182. package/test-utils/dom/drawer/index.js.map +1 -1
  183. package/test-utils/selectors/drawer/index.d.ts +1 -0
  184. package/test-utils/selectors/drawer/index.js +3 -0
  185. package/test-utils/selectors/drawer/index.js.map +1 -1
  186. package/text-content/styles.css.js +1 -1
  187. package/text-content/styles.scoped.css +66 -66
  188. package/text-content/styles.selectors.js +1 -1
  189. package/text-filter/index.js +17 -10
  190. package/text-filter/interfaces.d.ts +1 -0
  191. package/textarea/index.js +65 -12
  192. package/textarea/interfaces.d.ts +3 -2
  193. package/time-input/index.js +15 -11
  194. package/toggle/index.js +6 -10
  195. package/toggle/interfaces.d.ts +3 -2
  196. package/toggle-button/index.js +14 -11
  197. package/token/styles.css.js +14 -14
  198. package/token/styles.scoped.css +29 -29
  199. package/token/styles.selectors.js +14 -14
  200. package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
  201. package/tutorial-panel/components/tutorial-list/styles.scoped.css +28 -28
  202. package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
  203. package/wizard/index.js +35 -13
  204. package/wizard/interfaces.d.ts +1 -1
  205. package/autosuggest/internal-do-not-use-core.js +0 -35
  206. package/badge/internal-do-not-use-core.js +0 -19
  207. package/box/internal-do-not-use-core.js +0 -23
  208. package/button/internal-do-not-use-core.js +0 -19
  209. package/button-dropdown/internal-do-not-use-core.js +0 -34
  210. package/button-group/internal-do-not-use-core.js +0 -49
  211. package/checkbox/internal-do-not-use-core.js +0 -16
  212. package/container/internal-do-not-use-core.js +0 -34
  213. package/date-input/internal-do-not-use-core.js +0 -16
  214. package/flashbar/internal-do-not-use-core.js +0 -15
  215. package/icon/internal-do-not-use-core.js +0 -13
  216. package/input/internal-do-not-use-core.js +0 -59
  217. package/link/internal-do-not-use-core.js +0 -32
  218. package/progress-bar/internal-do-not-use-core.js +0 -56
  219. package/prompt-input/internal-do-not-use-core.js +0 -26
  220. package/radio-group/internal-do-not-use-core.js +0 -27
  221. package/segmented-control/internal-do-not-use-core.js +0 -19
  222. package/space-between/internal-do-not-use-core.js +0 -15
  223. package/spinner/internal-do-not-use-core.js +0 -15
  224. package/status-indicator/internal-do-not-use-core.js +0 -15
  225. package/steps/internal-do-not-use-core.js +0 -18
  226. package/text-filter/internal-do-not-use-core.js +0 -25
  227. package/textarea/internal-do-not-use-core.js +0 -71
  228. package/time-input/internal-do-not-use-core.js +0 -22
  229. package/toggle/internal-do-not-use-core.js +0 -14
  230. package/toggle-button/internal-do-not-use-core.js +0 -21
  231. package/wizard/internal-do-not-use-core.js +0 -40
  232. /package/autosuggest/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  233. /package/badge/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  234. /package/box/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  235. /package/button/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  236. /package/button-dropdown/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  237. /package/button-group/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  238. /package/checkbox/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  239. /package/container/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  240. /package/date-input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  241. /package/flashbar/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  242. /package/icon/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  243. /package/input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  244. /package/link/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  245. /package/progress-bar/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  246. /package/prompt-input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  247. /package/radio-group/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  248. /package/segmented-control/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  249. /package/space-between/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  250. /package/spinner/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  251. /package/status-indicator/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  252. /package/steps/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  253. /package/text-filter/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  254. /package/textarea/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  255. /package/time-input/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  256. /package/toggle/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  257. /package/toggle-button/{internal-do-not-use-core.js.map → index.js.map} +0 -0
  258. /package/wizard/{internal-do-not-use-core.js.map → index.js.map} +0 -0
@@ -1,18 +1,56 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import React from 'react';
4
-
5
- import CoreComponent from './internal-do-not-use-core';
3
+ 'use client';
4
+ import React, { useEffect, useMemo, useState } from 'react';
5
+ import clsx from 'clsx';
6
+ import { useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';
7
+ import { getBaseProps } from '../internal/base-component';
8
+ import { fireNonCancelableEvent } from '../internal/events';
9
+ import useBaseComponent from '../internal/hooks/use-base-component';
6
10
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import { validateProps } from '@cloudscape-design/component-toolkit/internal';
8
-
9
-
10
-
11
- const ProgressBar = (props) => {
12
- validateProps('ProgressBar', props, ["style"], {}, 'console');
13
- return React.createElement(CoreComponent, props);
14
- };
15
-
16
-
11
+ import { joinStrings } from '../internal/utils/strings';
12
+ import { throttle } from '../internal/utils/throttle';
13
+ import InternalLiveRegion from '../live-region/internal';
14
+ import { Progress, ResultState, SmallText } from './internal';
15
+ import styles from './styles.css.js';
16
+ const ASSERTION_FREQUENCY = 5000; // interval in ms between progress announcements
17
+ export default function ProgressBar({ value = 0, status = 'in-progress', variant = 'standalone', resultButtonText, label, ariaLabel, ariaLabelledby, ariaDescribedby, description, additionalInfo, resultText, onResultButtonClick, style, ...rest }) {
18
+ const { __internalRootRef } = useBaseComponent('ProgressBar', {
19
+ props: { variant },
20
+ });
21
+ const baseProps = getBaseProps(rest);
22
+ const generatedName = useUniqueId('awsui-progress-bar-');
23
+ const labelId = `${generatedName}-label`;
24
+ const isInFlash = variant === 'flash';
25
+ const isInProgressState = status === 'in-progress';
26
+ const descriptionId = useUniqueId('progressbar-description-');
27
+ const additionalInfoId = useUniqueId('progressbar-additional-info-');
28
+ const [announcedValue, setAnnouncedValue] = useState('');
29
+ const throttledAssertion = useMemo(() => {
30
+ return throttle((value) => {
31
+ setAnnouncedValue(`${value}%`);
32
+ }, ASSERTION_FREQUENCY);
33
+ }, []);
34
+ useEffect(() => {
35
+ throttledAssertion(value);
36
+ }, [throttledAssertion, value]);
37
+ if (isInFlash && resultButtonText) {
38
+ warnOnce('ProgressBar', 'The `resultButtonText` is ignored if you set `variant="flash"`, and the result button is not displayed. Use the `buttonText` property and the `onButtonClick` event listener of the flashbar item in which the progress bar component is embedded.');
39
+ }
40
+ return (React.createElement("div", { ...baseProps, className: clsx(baseProps.className, styles.root, variant && styles[variant]), ref: __internalRootRef },
41
+ React.createElement("div", { className: isInFlash ? styles['flash-container'] : undefined },
42
+ React.createElement("div", { className: clsx(styles['word-wrap'], styles[`label-${variant}`]), id: labelId }, label),
43
+ description && (React.createElement(SmallText, { color: isInFlash ? 'inherit' : undefined, id: descriptionId }, description)),
44
+ React.createElement("div", null, isInProgressState ? (React.createElement(React.Fragment, null,
45
+ React.createElement(Progress, { value: value, ariaLabel: ariaLabel, ariaLabelledby: joinStrings(labelId, ariaLabelledby), ariaDescribedby: joinStrings(description ? descriptionId : undefined, additionalInfo ? additionalInfoId : undefined, ariaDescribedby), isInFlash: isInFlash, style: style }),
46
+ React.createElement(InternalLiveRegion, { hidden: true, tagName: "span", delay: 0 },
47
+ label,
48
+ label ? ': ' : null,
49
+ announcedValue))) : (React.createElement(InternalLiveRegion, { hidden: false, tagName: "span", delay: 0 },
50
+ React.createElement(ResultState, { resultText: resultText, isInFlash: isInFlash, resultButtonText: resultButtonText, status: status, onClick: () => {
51
+ fireNonCancelableEvent(onResultButtonClick);
52
+ } }))))),
53
+ additionalInfo && (React.createElement(SmallText, { className: styles['additional-info'], color: isInFlash ? 'inherit' : undefined, id: additionalInfoId }, additionalInfo))));
54
+ }
17
55
  applyDisplayName(ProgressBar, 'ProgressBar');
18
- export default ProgressBar;
56
+ //# sourceMappingURL=index.js.map
@@ -71,6 +71,7 @@ export interface ProgressBarProps extends BaseComponentProps {
71
71
  /**
72
72
  * @awsuiSystem core
73
73
  */
74
+ style?: ProgressBarProps.Style;
74
75
  }
75
76
  export declare namespace ProgressBarProps {
76
77
  type Status = 'in-progress' | 'success' | 'error';
@@ -1,24 +1,24 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "progress": "awsui_progress_11huc_n4v1m_189",
5
- "result-state": "awsui_result-state_11huc_n4v1m_203",
6
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_n4v1m_1",
7
- "root": "awsui_root_11huc_n4v1m_225",
8
- "with-result-button": "awsui_with-result-button_11huc_n4v1m_257",
9
- "result-text": "awsui_result-text_11huc_n4v1m_261",
10
- "result-container-error": "awsui_result-container-error_11huc_n4v1m_265",
11
- "result-container-success": "awsui_result-container-success_11huc_n4v1m_265",
12
- "result-button": "awsui_result-button_11huc_n4v1m_269",
13
- "word-wrap": "awsui_word-wrap_11huc_n4v1m_275",
14
- "label-flash": "awsui_label-flash_11huc_n4v1m_280",
15
- "label-key-value": "awsui_label-key-value_11huc_n4v1m_284",
16
- "flash": "awsui_flash_11huc_n4v1m_292",
17
- "progress-container": "awsui_progress-container_11huc_n4v1m_296",
18
- "percentage-container": "awsui_percentage-container_11huc_n4v1m_303",
19
- "percentage": "awsui_percentage_11huc_n4v1m_303",
20
- "complete": "awsui_complete_11huc_n4v1m_349",
21
- "progress-in-flash": "awsui_progress-in-flash_11huc_n4v1m_362",
22
- "additional-info": "awsui_additional-info_11huc_n4v1m_375"
4
+ "progress": "awsui_progress_11huc_134zk_189",
5
+ "result-state": "awsui_result-state_11huc_134zk_203",
6
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_134zk_1",
7
+ "root": "awsui_root_11huc_134zk_225",
8
+ "with-result-button": "awsui_with-result-button_11huc_134zk_257",
9
+ "result-text": "awsui_result-text_11huc_134zk_261",
10
+ "result-container-error": "awsui_result-container-error_11huc_134zk_265",
11
+ "result-container-success": "awsui_result-container-success_11huc_134zk_265",
12
+ "result-button": "awsui_result-button_11huc_134zk_269",
13
+ "word-wrap": "awsui_word-wrap_11huc_134zk_275",
14
+ "label-flash": "awsui_label-flash_11huc_134zk_280",
15
+ "label-key-value": "awsui_label-key-value_11huc_134zk_284",
16
+ "flash": "awsui_flash_11huc_134zk_292",
17
+ "progress-container": "awsui_progress-container_11huc_134zk_296",
18
+ "percentage-container": "awsui_percentage-container_11huc_134zk_303",
19
+ "percentage": "awsui_percentage_11huc_134zk_303",
20
+ "complete": "awsui_complete_11huc_134zk_349",
21
+ "progress-in-flash": "awsui_progress-in-flash_11huc_134zk_362",
22
+ "additional-info": "awsui_additional-info_11huc_134zk_375"
23
23
  };
24
24
 
@@ -186,27 +186,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
186
186
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
187
187
  SPDX-License-Identifier: Apache-2.0
188
188
  */
189
- .awsui_progress_11huc_n4v1m_189:not(#\9)::-webkit-progress-value {
189
+ .awsui_progress_11huc_134zk_189:not(#\9)::-webkit-progress-value {
190
190
  -webkit-transition: width var(--motion-duration-moderate-c9utmg, 135ms) linear;
191
191
  transition: width var(--motion-duration-moderate-c9utmg, 135ms) linear;
192
192
  }
193
193
  @media (prefers-reduced-motion: reduce) {
194
- .awsui_progress_11huc_n4v1m_189:not(#\9)::-webkit-progress-value {
194
+ .awsui_progress_11huc_134zk_189:not(#\9)::-webkit-progress-value {
195
195
  animation: none;
196
196
  -webkit-transition: none;
197
197
  transition: none;
198
198
  }
199
199
  }
200
- .awsui-motion-disabled .awsui_progress_11huc_n4v1m_189:not(#\9)::-webkit-progress-value, .awsui-mode-entering .awsui_progress_11huc_n4v1m_189:not(#\9)::-webkit-progress-value {
200
+ .awsui-motion-disabled .awsui_progress_11huc_134zk_189:not(#\9)::-webkit-progress-value, .awsui-mode-entering .awsui_progress_11huc_134zk_189:not(#\9)::-webkit-progress-value {
201
201
  animation: none;
202
202
  -webkit-transition: none;
203
203
  transition: none;
204
204
  }
205
205
 
206
- .awsui_result-state_11huc_n4v1m_203:not(#\9) {
207
- animation: awsui_awsui-motion-fade-in_11huc_n4v1m_1 var(--motion-duration-transition-show-paced-t8d1os, 180ms) var(--motion-easing-transition-show-paced-x2k7uh, ease-out);
206
+ .awsui_result-state_11huc_134zk_203:not(#\9) {
207
+ animation: awsui_awsui-motion-fade-in_11huc_134zk_1 var(--motion-duration-transition-show-paced-t8d1os, 180ms) var(--motion-easing-transition-show-paced-x2k7uh, ease-out);
208
208
  }
209
- @keyframes awsui_awsui-motion-fade-in_11huc_n4v1m_1 {
209
+ @keyframes awsui_awsui-motion-fade-in_11huc_134zk_1 {
210
210
  from {
211
211
  opacity: 0.2;
212
212
  }
@@ -215,17 +215,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
215
215
  }
216
216
  }
217
217
  @media (prefers-reduced-motion: reduce) {
218
- .awsui_result-state_11huc_n4v1m_203:not(#\9) {
218
+ .awsui_result-state_11huc_134zk_203:not(#\9) {
219
219
  animation: none;
220
220
  transition: none;
221
221
  }
222
222
  }
223
- .awsui-motion-disabled .awsui_result-state_11huc_n4v1m_203:not(#\9), .awsui-mode-entering .awsui_result-state_11huc_n4v1m_203:not(#\9) {
223
+ .awsui-motion-disabled .awsui_result-state_11huc_134zk_203:not(#\9), .awsui-mode-entering .awsui_result-state_11huc_134zk_203:not(#\9) {
224
224
  animation: none;
225
225
  transition: none;
226
226
  }
227
227
 
228
- .awsui_root_11huc_n4v1m_225:not(#\9) {
228
+ .awsui_root_11huc_134zk_225:not(#\9) {
229
229
  border-collapse: separate;
230
230
  border-spacing: 0;
231
231
  box-sizing: border-box;
@@ -257,53 +257,53 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
257
257
  -moz-osx-font-smoothing: auto;
258
258
  }
259
259
 
260
- .awsui_with-result-button_11huc_n4v1m_257:not(#\9) {
260
+ .awsui_with-result-button_11huc_134zk_257:not(#\9) {
261
261
  padding-inline-end: var(--space-m-dsumyt, 16px);
262
262
  }
263
263
 
264
- .awsui_result-text_11huc_n4v1m_261:not(#\9) {
264
+ .awsui_result-text_11huc_134zk_261:not(#\9) {
265
265
  /* used in test-utils */
266
266
  }
267
267
 
268
- .awsui_result-container-error_11huc_n4v1m_265:not(#\9), .awsui_result-container-success_11huc_n4v1m_265:not(#\9) {
268
+ .awsui_result-container-error_11huc_134zk_265:not(#\9), .awsui_result-container-success_11huc_134zk_265:not(#\9) {
269
269
  /* used in test-utils */
270
270
  }
271
271
 
272
- .awsui_result-button_11huc_n4v1m_269:not(#\9) {
272
+ .awsui_result-button_11huc_134zk_269:not(#\9) {
273
273
  display: inline-block;
274
274
  margin-block: var(--space-scaled-xxs-pfm1nx, 4px);
275
275
  margin-inline: 0;
276
276
  }
277
277
 
278
- .awsui_word-wrap_11huc_n4v1m_275:not(#\9) {
278
+ .awsui_word-wrap_11huc_134zk_275:not(#\9) {
279
279
  min-inline-size: 0;
280
280
  word-break: break-word;
281
281
  }
282
282
 
283
- .awsui_label-flash_11huc_n4v1m_280:not(#\9) {
283
+ .awsui_label-flash_11huc_134zk_280:not(#\9) {
284
284
  color: inherit;
285
285
  font-weight: 700;
286
286
  }
287
- .awsui_label-key-value_11huc_n4v1m_284:not(#\9) {
287
+ .awsui_label-key-value_11huc_134zk_284:not(#\9) {
288
288
  font-size: var(--font-size-body-m-a7nh2n, 14px);
289
289
  line-height: var(--line-height-body-m-2mh3ke, 20px);
290
290
  font-weight: var(--font-display-label-weight-zavpeo, 700);
291
- color: var(--color-text-label-8248dg, #0f141a);
291
+ color: var(--color-text-label-28gfmc, #0f141a);
292
292
  margin-block-end: var(--space-scaled-xxxs-oo06c7, 2px);
293
293
  }
294
294
 
295
- .awsui_flash_11huc_n4v1m_292:not(#\9) {
295
+ .awsui_flash_11huc_134zk_292:not(#\9) {
296
296
  color: inherit;
297
297
  }
298
298
 
299
- .awsui_progress-container_11huc_n4v1m_296:not(#\9) {
299
+ .awsui_progress-container_11huc_134zk_296:not(#\9) {
300
300
  display: flex;
301
301
  align-items: center;
302
302
  max-inline-size: 800px;
303
303
  block-size: var(--line-height-body-m-2mh3ke, 20px);
304
304
  }
305
305
 
306
- .awsui_percentage-container_11huc_n4v1m_303:not(#\9) {
306
+ .awsui_percentage-container_11huc_134zk_303:not(#\9) {
307
307
  inline-size: 33px;
308
308
  flex-shrink: 0;
309
309
  white-space: nowrap;
@@ -313,11 +313,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
313
313
  letter-spacing: var(--letter-spacing-body-s-gq78ok, 0.005em);
314
314
  }
315
315
 
316
- .awsui_percentage_11huc_n4v1m_303:not(#\9) {
316
+ .awsui_percentage_11huc_134zk_303:not(#\9) {
317
317
  /* used in test-utils */
318
318
  }
319
319
 
320
- .awsui_progress_11huc_n4v1m_189:not(#\9) {
320
+ .awsui_progress_11huc_134zk_189:not(#\9) {
321
321
  inline-size: 100%;
322
322
  margin-inline-end: var(--space-s-tvghoh, 12px);
323
323
  min-inline-size: 0;
@@ -331,7 +331,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
331
331
  border-end-end-radius: var(--awsui-progress-bar-border-radius-d43v8n, 10px);
332
332
  background-color: var(--awsui-progress-bar-background-color-d43v8n, var(--color-background-progress-bar-layout-default-z3ipl1, #ebebf0));
333
333
  }
334
- .awsui_progress_11huc_n4v1m_189:not(#\9)::-webkit-progress-bar {
334
+ .awsui_progress_11huc_134zk_189:not(#\9)::-webkit-progress-bar {
335
335
  block-size: var(--awsui-progress-bar-height-d43v8n, 4px);
336
336
  border-block: 0;
337
337
  border-inline: none;
@@ -342,39 +342,39 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
342
342
  border-end-end-radius: var(--awsui-progress-bar-border-radius-d43v8n, 10px);
343
343
  background-color: var(--awsui-progress-bar-background-color-d43v8n, var(--color-background-progress-bar-layout-default-z3ipl1, #ebebf0));
344
344
  }
345
- .awsui_progress_11huc_n4v1m_189:not(#\9)::-webkit-progress-value {
345
+ .awsui_progress_11huc_134zk_189:not(#\9)::-webkit-progress-value {
346
346
  border-start-start-radius: var(--awsui-progress-bar-border-radius-d43v8n, 10px);
347
347
  border-start-end-radius: 0;
348
348
  border-end-start-radius: var(--awsui-progress-bar-border-radius-d43v8n, 10px);
349
349
  border-end-end-radius: 0;
350
350
  background-color: var(--awsui-progress-value-background-color-d43v8n, var(--color-background-progress-bar-content-default-il6sg6, #006ce0));
351
351
  }
352
- .awsui_progress_11huc_n4v1m_189.awsui_complete_11huc_n4v1m_349:not(#\9)::-webkit-progress-value {
352
+ .awsui_progress_11huc_134zk_189.awsui_complete_11huc_134zk_349:not(#\9)::-webkit-progress-value {
353
353
  border-start-start-radius: var(--awsui-progress-bar-border-radius-d43v8n, 10px);
354
354
  border-start-end-radius: var(--awsui-progress-bar-border-radius-d43v8n, 10px);
355
355
  border-end-start-radius: var(--awsui-progress-bar-border-radius-d43v8n, 10px);
356
356
  border-end-end-radius: var(--awsui-progress-bar-border-radius-d43v8n, 10px);
357
357
  }
358
- .awsui_progress_11huc_n4v1m_189:not(#\9)::-moz-progress-bar {
358
+ .awsui_progress_11huc_134zk_189:not(#\9)::-moz-progress-bar {
359
359
  border-start-start-radius: var(--awsui-progress-bar-border-radius-d43v8n, 10px);
360
360
  border-start-end-radius: 0;
361
361
  border-end-start-radius: var(--awsui-progress-bar-border-radius-d43v8n, 10px);
362
362
  border-end-end-radius: 0;
363
363
  background-color: var(--awsui-progress-value-background-color-d43v8n, var(--color-background-progress-bar-content-default-il6sg6, #006ce0));
364
364
  }
365
- .awsui_progress_11huc_n4v1m_189.awsui_progress-in-flash_11huc_n4v1m_362:not(#\9) {
365
+ .awsui_progress_11huc_134zk_189.awsui_progress-in-flash_11huc_134zk_362:not(#\9) {
366
366
  background-color: var(--awsui-progress-bar-background-color-d43v8n, var(--color-background-progress-bar-layout-in-flash-wssh6k, rgba(255, 255, 255, 0.25)));
367
367
  }
368
- .awsui_progress_11huc_n4v1m_189.awsui_progress-in-flash_11huc_n4v1m_362:not(#\9)::-moz-progress-bar {
368
+ .awsui_progress_11huc_134zk_189.awsui_progress-in-flash_11huc_134zk_362:not(#\9)::-moz-progress-bar {
369
369
  background-color: var(--awsui-progress-value-background-color-d43v8n, var(--color-background-progress-bar-content-in-flash-98s7uz, #ffffff));
370
370
  }
371
- .awsui_progress_11huc_n4v1m_189.awsui_progress-in-flash_11huc_n4v1m_362:not(#\9)::-webkit-progress-bar {
371
+ .awsui_progress_11huc_134zk_189.awsui_progress-in-flash_11huc_134zk_362:not(#\9)::-webkit-progress-bar {
372
372
  background-color: var(--awsui-progress-bar-background-color-d43v8n, var(--color-background-progress-bar-layout-in-flash-wssh6k, rgba(255, 255, 255, 0.25)));
373
373
  }
374
- .awsui_progress_11huc_n4v1m_189.awsui_progress-in-flash_11huc_n4v1m_362:not(#\9)::-webkit-progress-value {
374
+ .awsui_progress_11huc_134zk_189.awsui_progress-in-flash_11huc_134zk_362:not(#\9)::-webkit-progress-value {
375
375
  background-color: var(--awsui-progress-value-background-color-d43v8n, var(--color-background-progress-bar-content-in-flash-98s7uz, #ffffff));
376
376
  }
377
377
 
378
- .awsui_additional-info_11huc_n4v1m_375:not(#\9) {
378
+ .awsui_additional-info_11huc_134zk_375:not(#\9) {
379
379
  /* used in test-utils */
380
380
  }
@@ -2,24 +2,24 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "progress": "awsui_progress_11huc_n4v1m_189",
6
- "result-state": "awsui_result-state_11huc_n4v1m_203",
7
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_n4v1m_1",
8
- "root": "awsui_root_11huc_n4v1m_225",
9
- "with-result-button": "awsui_with-result-button_11huc_n4v1m_257",
10
- "result-text": "awsui_result-text_11huc_n4v1m_261",
11
- "result-container-error": "awsui_result-container-error_11huc_n4v1m_265",
12
- "result-container-success": "awsui_result-container-success_11huc_n4v1m_265",
13
- "result-button": "awsui_result-button_11huc_n4v1m_269",
14
- "word-wrap": "awsui_word-wrap_11huc_n4v1m_275",
15
- "label-flash": "awsui_label-flash_11huc_n4v1m_280",
16
- "label-key-value": "awsui_label-key-value_11huc_n4v1m_284",
17
- "flash": "awsui_flash_11huc_n4v1m_292",
18
- "progress-container": "awsui_progress-container_11huc_n4v1m_296",
19
- "percentage-container": "awsui_percentage-container_11huc_n4v1m_303",
20
- "percentage": "awsui_percentage_11huc_n4v1m_303",
21
- "complete": "awsui_complete_11huc_n4v1m_349",
22
- "progress-in-flash": "awsui_progress-in-flash_11huc_n4v1m_362",
23
- "additional-info": "awsui_additional-info_11huc_n4v1m_375"
5
+ "progress": "awsui_progress_11huc_134zk_189",
6
+ "result-state": "awsui_result-state_11huc_134zk_203",
7
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_134zk_1",
8
+ "root": "awsui_root_11huc_134zk_225",
9
+ "with-result-button": "awsui_with-result-button_11huc_134zk_257",
10
+ "result-text": "awsui_result-text_11huc_134zk_261",
11
+ "result-container-error": "awsui_result-container-error_11huc_134zk_265",
12
+ "result-container-success": "awsui_result-container-success_11huc_134zk_265",
13
+ "result-button": "awsui_result-button_11huc_134zk_269",
14
+ "word-wrap": "awsui_word-wrap_11huc_134zk_275",
15
+ "label-flash": "awsui_label-flash_11huc_134zk_280",
16
+ "label-key-value": "awsui_label-key-value_11huc_134zk_284",
17
+ "flash": "awsui_flash_11huc_134zk_292",
18
+ "progress-container": "awsui_progress-container_11huc_134zk_296",
19
+ "percentage-container": "awsui_percentage-container_11huc_134zk_303",
20
+ "percentage": "awsui_percentage_11huc_134zk_303",
21
+ "complete": "awsui_complete_11huc_134zk_349",
22
+ "progress-in-flash": "awsui_progress-in-flash_11huc_134zk_362",
23
+ "additional-info": "awsui_additional-info_11huc_134zk_375"
24
24
  };
25
25
 
@@ -1,18 +1,26 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
+ 'use client';
3
4
  import React from 'react';
4
-
5
- import CoreComponent from './internal-do-not-use-core';
5
+ import useBaseComponent from '../internal/hooks/use-base-component';
6
6
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import { validateProps } from '@cloudscape-design/component-toolkit/internal';
8
-
9
-
10
-
11
- const PromptInput = React.forwardRef((props, ref) => {
12
- validateProps('PromptInput', props, ["nativeTextareaAttributes","style","customPrimaryAction"], {}, 'console');
13
- return React.createElement(CoreComponent, {ref,...props});
7
+ import InternalPromptInput from './internal';
8
+ const PromptInput = React.forwardRef(({ autoComplete, autoFocus, disableBrowserAutocorrect, disableActionButton, spellcheck, readOnly, actionButtonIconName, minRows = 1, maxRows = 3, ...props }, ref) => {
9
+ const baseComponentProps = useBaseComponent('PromptInput', {
10
+ props: {
11
+ readOnly,
12
+ autoComplete,
13
+ autoFocus,
14
+ disableBrowserAutocorrect,
15
+ disableActionButton,
16
+ spellcheck,
17
+ actionButtonIconName,
18
+ minRows,
19
+ maxRows,
20
+ },
21
+ });
22
+ return (React.createElement(InternalPromptInput, { readOnly: readOnly, autoComplete: autoComplete, autoFocus: autoFocus, disableBrowserAutocorrect: disableBrowserAutocorrect, disableActionButton: disableActionButton, spellcheck: spellcheck, actionButtonIconName: actionButtonIconName, minRows: minRows, maxRows: maxRows, ...props, ...baseComponentProps, ref: ref }));
14
23
  });
15
-
16
-
17
24
  applyDisplayName(PromptInput, 'PromptInput');
18
25
  export default PromptInput;
26
+ //# sourceMappingURL=index.js.map
@@ -6,7 +6,7 @@ import { BaseKeyDetail, NonCancelableEventHandler } from '../internal/events';
6
6
  /**
7
7
  * @awsuiSystem core
8
8
  */
9
-
9
+ import { NativeAttributes } from '../internal/utils/with-native-attributes';
10
10
  export interface PromptInputProps extends Omit<BaseInputProps, 'nativeInputAttributes'>, InputKeyEvents, InputAutoCorrect, InputAutoComplete, InputSpellcheck, BaseComponentProps, FormFieldValidationControlProps {
11
11
  /**
12
12
  * Called whenever a user clicks the action button or presses the "Enter" key.
@@ -75,7 +75,7 @@ export interface PromptInputProps extends Omit<BaseInputProps, 'nativeInputAttri
75
75
  *
76
76
  * @awsuiSystem core
77
77
  */
78
-
78
+ customPrimaryAction?: React.ReactNode;
79
79
  /**
80
80
  * Use this slot to add secondary actions to the prompt input.
81
81
  */
@@ -102,10 +102,11 @@ export interface PromptInputProps extends Omit<BaseInputProps, 'nativeInputAttri
102
102
  *
103
103
  * @awsuiSystem core
104
104
  */
105
-
105
+ nativeTextareaAttributes?: NativeAttributes<React.TextareaHTMLAttributes<HTMLTextAreaElement>>;
106
106
  /**
107
107
  * @awsuiSystem core
108
108
  */
109
+ style?: PromptInputProps.Style;
109
110
  }
110
111
  export declare namespace PromptInputProps {
111
112
  type KeyDetail = BaseKeyDetail;
@@ -1,6 +1,21 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
-
4
- export default function RadioButton(props) {
5
- throw new Error('The component RadioButton is not supported in this package');
6
- }
3
+ 'use client';
4
+ import React from 'react';
5
+ import clsx from 'clsx';
6
+ import InternalRadioButton from '../internal/components/radio-button';
7
+ import useBaseComponent from '../internal/hooks/use-base-component';
8
+ import { applyDisplayName } from '../internal/utils/apply-display-name';
9
+ import styles from './styles.css.js';
10
+ const RadioButton = React.forwardRef((props, ref) => {
11
+ const baseComponentProps = useBaseComponent('RadioButton', {
12
+ props: { readOnly: Boolean(props.readOnly), disabled: Boolean(props.disabled) },
13
+ });
14
+ return (React.createElement(InternalRadioButton, { ...props, ...baseComponentProps, className: clsx(props.className, styles['radio-button']), ref: ref }));
15
+ });
16
+ applyDisplayName(RadioButton, 'RadioButton');
17
+ /**
18
+ * @awsuiSystem core
19
+ */
20
+ export default RadioButton;
21
+ //# sourceMappingURL=index.js.map
@@ -1,18 +1,27 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
+ 'use client';
3
4
  import React from 'react';
4
-
5
- import CoreComponent from './internal-do-not-use-core';
5
+ import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
6
+ import useBaseComponent from '../internal/hooks/use-base-component';
6
7
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import { validateProps } from '@cloudscape-design/component-toolkit/internal';
8
-
9
-
10
-
11
- const RadioGroup = React.forwardRef((props, ref) => {
12
- validateProps('RadioGroup', props, ["style"], {}, 'console');
13
- return React.createElement(CoreComponent, {ref,...props});
8
+ import InternalRadioGroup from './internal';
9
+ import analyticsSelectors from './analytics-metadata/styles.css.js';
10
+ const RadioGroup = React.forwardRef(({ direction = 'vertical', ...rest }, ref) => {
11
+ const baseComponentProps = useBaseComponent('RadioGroup', {
12
+ props: { readOnly: rest.readOnly, direction: direction !== null && direction !== void 0 ? direction : 'vertical' },
13
+ });
14
+ return (React.createElement(InternalRadioGroup, { ref: ref, direction: direction, ...rest, ...baseComponentProps, ...getAnalyticsMetadataAttribute({
15
+ component: {
16
+ name: 'awsui.RadioGroup',
17
+ label: { root: 'self' },
18
+ properties: {
19
+ value: `${rest.value}`,
20
+ valueLabel: `.${analyticsSelectors.selected}`,
21
+ },
22
+ },
23
+ }) }));
14
24
  });
15
-
16
-
17
25
  applyDisplayName(RadioGroup, 'RadioGroup');
18
26
  export default RadioGroup;
27
+ //# sourceMappingURL=index.js.map
@@ -54,7 +54,7 @@ export interface RadioGroupProps extends BaseComponentProps, FormFieldControlPro
54
54
  /**
55
55
  * @awsuiSystem core
56
56
  */
57
-
57
+ style?: RadioGroupProps.Style;
58
58
  /**
59
59
  * Defines the direction in which the radio buttons are laid out.
60
60
  */
@@ -1,18 +1,19 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
+ 'use client';
3
4
  import React from 'react';
4
-
5
- import CoreComponent from './internal-do-not-use-core';
5
+ import useBaseComponent from '../internal/hooks/use-base-component';
6
6
  import { applyDisplayName } from '../internal/utils/apply-display-name';
7
- import { validateProps } from '@cloudscape-design/component-toolkit/internal';
8
-
9
-
10
-
11
- const SegmentedControl = (props) => {
12
- validateProps('SegmentedControl', props, ["style"], {}, 'console');
13
- return React.createElement(CoreComponent, props);
14
- };
15
-
16
-
7
+ import InternalSegmentedControl from './internal';
8
+ export default function SegmentedControl(props) {
9
+ var _a;
10
+ const baseComponentProps = useBaseComponent('SegmentedControl', {
11
+ props: {},
12
+ metadata: {
13
+ hasDisabledReasons: ((_a = props.options) !== null && _a !== void 0 ? _a : []).some(option => Boolean(option.disabledReason)),
14
+ },
15
+ });
16
+ return React.createElement(InternalSegmentedControl, { ...props, ...baseComponentProps });
17
+ }
17
18
  applyDisplayName(SegmentedControl, 'SegmentedControl');
18
- export default SegmentedControl;
19
+ //# sourceMappingURL=index.js.map
@@ -39,6 +39,7 @@ export interface SegmentedControlProps extends BaseComponentProps {
39
39
  /**
40
40
  * @awsuiSystem core
41
41
  */
42
+ style?: SegmentedControlProps.Style;
42
43
  }
43
44
  export declare namespace SegmentedControlProps {
44
45
  interface Option {
@@ -112,7 +112,7 @@ export interface BaseSelectProps extends BaseDropdownHostProps, BaseComponentPro
112
112
  * Overrides the element that is announced to screen readers
113
113
  * when the highlighted option changes. By default, this announces
114
114
  * the option's name and properties, and its selected state if
115
- * the `selectedLabel` property is defined.
115
+ * the `selectedAriaLabel` property is defined.
116
116
  * The highlighted option is provided, and its group (if groups
117
117
  * are used and it differs from the group of the previously highlighted option).
118
118
  *
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/select/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport {\n BaseDropdownHostProps,\n OptionsFilteringType,\n OptionsLoadItemsDetail,\n} from '../internal/components/dropdown/interfaces';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status/interfaces';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../internal/components/option/interfaces';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface BaseSelectProps\n extends BaseDropdownHostProps,\n BaseComponentProps,\n FormFieldValidationControlProps,\n DropdownStatusProps {\n /**\n * Specifies an array of options that are displayed to the user as a dropdown list.\n * The options can be grouped using `OptionGroup` objects.\n *\n * #### Option\n * - `value` (string) - The returned value of the option when selected.\n *\n * #### OptionGroup\n * - `value` (string) - Used to locate option group in test utils.\n * - `options` (Option[]) - (Optional) The options under this group.\n *\n * #### Shared Option and OptionGroup properties\n * - `label` (string) - (Optional) Option or group text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option or group, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option or group that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option or group is disabled.\n * - `disabledReason` (string) - (Optional) Displays tooltip near the item when disabled. Use to provide additional context.\n * - `labelTag` (string) - (Optional) A label tag that provides additional guidance, shown next to the label.\n * - `tags` [string[]] - (Optional) A list of tags giving further guidance about the option or group.\n * - `filteringTags` [string[]] - (Optional) A list of additional tags used for automatic filtering.\n * - `iconName` (string) - (Optional) Specifies the name of an [icon](/components/icon/) to display in the option or group.\n * - `iconAriaLabel` (string) - (Optional) Specifies alternate text for the icon. We recommend that you provide this for accessibility.\n * - `iconAlt` (string) - (Optional) **Deprecated**, replaced by \\`iconAriaLabel\\`. Specifies alternate text for a custom icon, for use with `iconUrl`.\n * - `iconUrl` (string) - (Optional) URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * Note: Only one level of option nesting is supported.\n *\n * If you want to use the built-in filtering capabilities of this component, provide\n * a list of all valid options here and they will be automatically filtered based on the user's filtering input.\n *\n * Alternatively, you can listen to the `onChange` or `onLoadItems` event and set new options\n * on your own.\n **/\n options?: SelectProps.Options;\n /**\n * Determines how filtering is applied to the list of `options`:\n *\n * * `auto` - The component will automatically filter options based on user input.\n * * `manual` - You will set up `onChange` or `onLoadItems` event listeners and filter options on your side or request\n * them from server.\n *\n * By default the component will filter the provided `options` based on the value of the filtering input field.\n * Only options that have a `value`, `label`, `description` or `labelTag` that contains the input value as a substring\n * are displayed in the list of options.\n *\n * If you set this property to `manual`, this default filtering mechanism is disabled and all provided `options` are\n * displayed in the dropdown list. In that case make sure that you use the `onChange` or `onLoadItems` events in order\n * to set the `options` property to the options that are relevant for the user, given the filtering input value.\n *\n * Note: Manual filtering doesn't disable match highlighting.\n **/\n filteringType?: OptionsFilteringType;\n\n /**\n * Determines whether the whole select component is disabled.\n */\n disabled?: boolean;\n /**\n * Specifies the placeholder to display in the filtering input if filtering is enabled.\n */\n filteringPlaceholder?: string;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n /**\n * Adds an `aria-label` on the built-in filtering input if filtering is enabled.\n */\n filteringAriaLabel?: string;\n /**\n * Adds an `aria-label` to the clear button inside the search input.\n * @i18n\n */\n filteringClearAriaLabel?: string;\n /**\n * @deprecated Has no effect.\n */\n name?: string;\n /**\n * Specifies the hint text that's displayed in the field when no option has been selected.\n */\n placeholder?: string;\n /**\n * Specifies the ID for the trigger component. It uses an automatically generated ID by default.\n */\n controlId?: string;\n /**\n * Adds `aria-required` to the native input element.\n */\n ariaRequired?: boolean;\n /**\n * Adds `aria-label` to the select element.\n * Use this if you don't have a visible label for this control.\n */\n ariaLabel?: string;\n /**\n * Specifies the localized string that describes an option as being selected.\n * This is required to provide a good screen reader experience. For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n * @i18n\n */\n selectedAriaLabel?: string;\n /**\n * Overrides the element that is announced to screen readers\n * when the highlighted option changes. By default, this announces\n * the option's name and properties, and its selected state if\n * the `selectedLabel` property is defined.\n * The highlighted option is provided, and its group (if groups\n * are used and it differs from the group of the previously highlighted option).\n *\n * For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n */\n renderHighlightedAriaLive?: SelectProps.ContainingOptionAndGroupString;\n /**\n * Displayed for `filteringType=\"auto\"` when there are no matches for the filtering.\n */\n noMatch?: React.ReactNode;\n /**\n * Called when input focus is removed from the UI control.\n */\n onBlur?: NonCancelableEventHandler;\n /**\n * Called when input focus is set onto the UI control.\n */\n onFocus?: NonCancelableEventHandler;\n\n /**\n * Specifies if the control is read-only, which prevents the\n * user from both modifying the value and opening the dropdown. A read-only control is still focusable.\n */\n readOnly?: boolean;\n}\n\nexport interface SelectProps extends BaseSelectProps {\n /**\n * Adds a small label inline with the input for saving vertical space in the UI.\n * For use with collection select filters only.\n */\n inlineLabelText?: string;\n /**\n * Adds `aria-labelledby` to the component. If you're using this component within a form field,\n * don't set this property because the form field component automatically sets it.\n *\n * Use this property if the component isn't using `inlineLabelText` and isn't surrounded by a form field, or you want to override the value\n * automatically set by the form field (for example, if you have two components within a single form field).\n *\n * To use it correctly, define an ID for the element you want to use as label and set the property to that ID.\n */\n ariaLabelledby?: string;\n /**\n * Defines the variant of the trigger. You can use a simple label or the entire option (`label | option`)\n */\n triggerVariant?: SelectProps.TriggerVariant;\n /**\n * Specifies the currently selected option.\n * If you want to clear the selection, use `null`.\n */\n selectedOption: SelectProps.Option | null;\n /**\n * Called when the user selects an option.\n * The event `detail` contains the current `selectedOption`.\n */\n onChange?: NonCancelableEventHandler<SelectProps.ChangeDetail>;\n\n /**\n * Automatically focuses the trigger when component is mounted.\n */\n autoFocus?: boolean;\n}\n\nexport namespace SelectProps {\n export type FilteringType = OptionsFilteringType;\n export type TriggerVariant = 'label' | 'option';\n\n export type Option = OptionDefinition;\n export type OptionGroup = OptionGroupDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n\n export type LoadItemsDetail = OptionsLoadItemsDetail;\n\n export interface ChangeDetail {\n selectedOption: Option;\n }\n\n export interface ContainingOptionAndGroupString {\n (option: Option, group?: OptionGroup): string;\n }\n\n export interface Ref {\n /**\n * Sets focus on the element without opening the dropdown or showing a visual focus indicator.\n */\n focus(): void;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/select/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport {\n BaseDropdownHostProps,\n OptionsFilteringType,\n OptionsLoadItemsDetail,\n} from '../internal/components/dropdown/interfaces';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status/interfaces';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../internal/components/option/interfaces';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface BaseSelectProps\n extends BaseDropdownHostProps,\n BaseComponentProps,\n FormFieldValidationControlProps,\n DropdownStatusProps {\n /**\n * Specifies an array of options that are displayed to the user as a dropdown list.\n * The options can be grouped using `OptionGroup` objects.\n *\n * #### Option\n * - `value` (string) - The returned value of the option when selected.\n *\n * #### OptionGroup\n * - `value` (string) - Used to locate option group in test utils.\n * - `options` (Option[]) - (Optional) The options under this group.\n *\n * #### Shared Option and OptionGroup properties\n * - `label` (string) - (Optional) Option or group text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option or group, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option or group that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option or group is disabled.\n * - `disabledReason` (string) - (Optional) Displays tooltip near the item when disabled. Use to provide additional context.\n * - `labelTag` (string) - (Optional) A label tag that provides additional guidance, shown next to the label.\n * - `tags` [string[]] - (Optional) A list of tags giving further guidance about the option or group.\n * - `filteringTags` [string[]] - (Optional) A list of additional tags used for automatic filtering.\n * - `iconName` (string) - (Optional) Specifies the name of an [icon](/components/icon/) to display in the option or group.\n * - `iconAriaLabel` (string) - (Optional) Specifies alternate text for the icon. We recommend that you provide this for accessibility.\n * - `iconAlt` (string) - (Optional) **Deprecated**, replaced by \\`iconAriaLabel\\`. Specifies alternate text for a custom icon, for use with `iconUrl`.\n * - `iconUrl` (string) - (Optional) URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * Note: Only one level of option nesting is supported.\n *\n * If you want to use the built-in filtering capabilities of this component, provide\n * a list of all valid options here and they will be automatically filtered based on the user's filtering input.\n *\n * Alternatively, you can listen to the `onChange` or `onLoadItems` event and set new options\n * on your own.\n **/\n options?: SelectProps.Options;\n /**\n * Determines how filtering is applied to the list of `options`:\n *\n * * `auto` - The component will automatically filter options based on user input.\n * * `manual` - You will set up `onChange` or `onLoadItems` event listeners and filter options on your side or request\n * them from server.\n *\n * By default the component will filter the provided `options` based on the value of the filtering input field.\n * Only options that have a `value`, `label`, `description` or `labelTag` that contains the input value as a substring\n * are displayed in the list of options.\n *\n * If you set this property to `manual`, this default filtering mechanism is disabled and all provided `options` are\n * displayed in the dropdown list. In that case make sure that you use the `onChange` or `onLoadItems` events in order\n * to set the `options` property to the options that are relevant for the user, given the filtering input value.\n *\n * Note: Manual filtering doesn't disable match highlighting.\n **/\n filteringType?: OptionsFilteringType;\n\n /**\n * Determines whether the whole select component is disabled.\n */\n disabled?: boolean;\n /**\n * Specifies the placeholder to display in the filtering input if filtering is enabled.\n */\n filteringPlaceholder?: string;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n /**\n * Adds an `aria-label` on the built-in filtering input if filtering is enabled.\n */\n filteringAriaLabel?: string;\n /**\n * Adds an `aria-label` to the clear button inside the search input.\n * @i18n\n */\n filteringClearAriaLabel?: string;\n /**\n * @deprecated Has no effect.\n */\n name?: string;\n /**\n * Specifies the hint text that's displayed in the field when no option has been selected.\n */\n placeholder?: string;\n /**\n * Specifies the ID for the trigger component. It uses an automatically generated ID by default.\n */\n controlId?: string;\n /**\n * Adds `aria-required` to the native input element.\n */\n ariaRequired?: boolean;\n /**\n * Adds `aria-label` to the select element.\n * Use this if you don't have a visible label for this control.\n */\n ariaLabel?: string;\n /**\n * Specifies the localized string that describes an option as being selected.\n * This is required to provide a good screen reader experience. For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n * @i18n\n */\n selectedAriaLabel?: string;\n /**\n * Overrides the element that is announced to screen readers\n * when the highlighted option changes. By default, this announces\n * the option's name and properties, and its selected state if\n * the `selectedAriaLabel` property is defined.\n * The highlighted option is provided, and its group (if groups\n * are used and it differs from the group of the previously highlighted option).\n *\n * For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n */\n renderHighlightedAriaLive?: SelectProps.ContainingOptionAndGroupString;\n /**\n * Displayed for `filteringType=\"auto\"` when there are no matches for the filtering.\n */\n noMatch?: React.ReactNode;\n /**\n * Called when input focus is removed from the UI control.\n */\n onBlur?: NonCancelableEventHandler;\n /**\n * Called when input focus is set onto the UI control.\n */\n onFocus?: NonCancelableEventHandler;\n\n /**\n * Specifies if the control is read-only, which prevents the\n * user from both modifying the value and opening the dropdown. A read-only control is still focusable.\n */\n readOnly?: boolean;\n}\n\nexport interface SelectProps extends BaseSelectProps {\n /**\n * Adds a small label inline with the input for saving vertical space in the UI.\n * For use with collection select filters only.\n */\n inlineLabelText?: string;\n /**\n * Adds `aria-labelledby` to the component. If you're using this component within a form field,\n * don't set this property because the form field component automatically sets it.\n *\n * Use this property if the component isn't using `inlineLabelText` and isn't surrounded by a form field, or you want to override the value\n * automatically set by the form field (for example, if you have two components within a single form field).\n *\n * To use it correctly, define an ID for the element you want to use as label and set the property to that ID.\n */\n ariaLabelledby?: string;\n /**\n * Defines the variant of the trigger. You can use a simple label or the entire option (`label | option`)\n */\n triggerVariant?: SelectProps.TriggerVariant;\n /**\n * Specifies the currently selected option.\n * If you want to clear the selection, use `null`.\n */\n selectedOption: SelectProps.Option | null;\n /**\n * Called when the user selects an option.\n * The event `detail` contains the current `selectedOption`.\n */\n onChange?: NonCancelableEventHandler<SelectProps.ChangeDetail>;\n\n /**\n * Automatically focuses the trigger when component is mounted.\n */\n autoFocus?: boolean;\n}\n\nexport namespace SelectProps {\n export type FilteringType = OptionsFilteringType;\n export type TriggerVariant = 'label' | 'option';\n\n export type Option = OptionDefinition;\n export type OptionGroup = OptionGroupDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n\n export type LoadItemsDetail = OptionsLoadItemsDetail;\n\n export interface ChangeDetail {\n selectedOption: Option;\n }\n\n export interface ContainingOptionAndGroupString {\n (option: Option, group?: OptionGroup): string;\n }\n\n export interface Ref {\n /**\n * Sets focus on the element without opening the dropdown or showing a visual focus indicator.\n */\n focus(): void;\n }\n}\n"]}