@cloudscape-design/components 3.0.1117 → 3.0.1119

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 (297) hide show
  1. package/alert/styles.css.js +27 -27
  2. package/alert/styles.scoped.css +50 -50
  3. package/alert/styles.selectors.js +27 -27
  4. package/annotation-context/annotation/styles.css.js +24 -24
  5. package/annotation-context/annotation/styles.scoped.css +32 -32
  6. package/annotation-context/annotation/styles.selectors.js +24 -24
  7. package/app-layout/notifications/styles.css.js +3 -3
  8. package/app-layout/notifications/styles.scoped.css +7 -7
  9. package/app-layout/notifications/styles.selectors.js +3 -3
  10. package/app-layout/resize/styles.css.js +5 -5
  11. package/app-layout/resize/styles.scoped.css +13 -13
  12. package/app-layout/resize/styles.selectors.js +5 -5
  13. package/app-layout/runtime-drawer/index.d.ts +1 -0
  14. package/app-layout/runtime-drawer/index.d.ts.map +1 -1
  15. package/app-layout/runtime-drawer/index.js.map +1 -1
  16. package/app-layout/utils/use-drawers.d.ts +1 -1
  17. package/app-layout/utils/use-drawers.d.ts.map +1 -1
  18. package/app-layout/utils/use-drawers.js +4 -2
  19. package/app-layout/utils/use-drawers.js.map +1 -1
  20. package/app-layout/visual-refresh/styles.css.js +86 -86
  21. package/app-layout/visual-refresh/styles.scoped.css +258 -258
  22. package/app-layout/visual-refresh/styles.selectors.js +86 -86
  23. package/app-layout/visual-refresh-toolbar/compute-layout.d.ts +1 -1
  24. package/app-layout/visual-refresh-toolbar/compute-layout.d.ts.map +1 -1
  25. package/app-layout/visual-refresh-toolbar/compute-layout.js +2 -2
  26. package/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
  27. package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.d.ts +18 -0
  28. package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.d.ts.map +1 -0
  29. package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js +186 -0
  30. package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js.map +1 -0
  31. package/app-layout/visual-refresh-toolbar/drawer/global-drawers.js +1 -1
  32. package/app-layout/visual-refresh-toolbar/drawer/global-drawers.js.map +1 -1
  33. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts +3 -1
  34. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
  35. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +2 -2
  36. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
  37. package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +27 -26
  38. package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +110 -76
  39. package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +27 -26
  40. package/app-layout/visual-refresh-toolbar/drawer/use-resize.d.ts +1 -1
  41. package/app-layout/visual-refresh-toolbar/drawer/use-resize.d.ts.map +1 -1
  42. package/app-layout/visual-refresh-toolbar/drawer/use-resize.js.map +1 -1
  43. package/app-layout/visual-refresh-toolbar/interfaces.d.ts +19 -3
  44. package/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
  45. package/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
  46. package/app-layout/visual-refresh-toolbar/navigation/index.d.ts +3 -1
  47. package/app-layout/visual-refresh-toolbar/navigation/index.d.ts.map +1 -1
  48. package/app-layout/visual-refresh-toolbar/navigation/index.js +2 -2
  49. package/app-layout/visual-refresh-toolbar/navigation/index.js.map +1 -1
  50. package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
  51. package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
  52. package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
  53. package/app-layout/visual-refresh-toolbar/skeleton/index.d.ts.map +1 -1
  54. package/app-layout/visual-refresh-toolbar/skeleton/index.js +3 -1
  55. package/app-layout/visual-refresh-toolbar/skeleton/index.js.map +1 -1
  56. package/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.d.ts.map +1 -1
  57. package/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js +4 -5
  58. package/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js.map +1 -1
  59. package/app-layout/visual-refresh-toolbar/skeleton/slots.d.ts.map +1 -1
  60. package/app-layout/visual-refresh-toolbar/skeleton/slots.js +8 -3
  61. package/app-layout/visual-refresh-toolbar/skeleton/slots.js.map +1 -1
  62. package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +27 -25
  63. package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +68 -52
  64. package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +27 -25
  65. package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts +26 -0
  66. package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts.map +1 -0
  67. package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js +19 -0
  68. package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js.map +1 -0
  69. package/app-layout/visual-refresh-toolbar/split-panel/index.d.ts +3 -1
  70. package/app-layout/visual-refresh-toolbar/split-panel/index.d.ts.map +1 -1
  71. package/app-layout/visual-refresh-toolbar/split-panel/index.js +2 -2
  72. package/app-layout/visual-refresh-toolbar/split-panel/index.js.map +1 -1
  73. package/app-layout/visual-refresh-toolbar/state/interfaces.d.ts +4 -0
  74. package/app-layout/visual-refresh-toolbar/state/interfaces.d.ts.map +1 -1
  75. package/app-layout/visual-refresh-toolbar/state/interfaces.js.map +1 -1
  76. package/app-layout/visual-refresh-toolbar/state/props-merger.d.ts.map +1 -1
  77. package/app-layout/visual-refresh-toolbar/state/props-merger.js +12 -0
  78. package/app-layout/visual-refresh-toolbar/state/props-merger.js.map +1 -1
  79. package/app-layout/visual-refresh-toolbar/state/use-ai-drawer.d.ts.map +1 -1
  80. package/app-layout/visual-refresh-toolbar/state/use-ai-drawer.js +0 -17
  81. package/app-layout/visual-refresh-toolbar/state/use-ai-drawer.js.map +1 -1
  82. package/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts.map +1 -1
  83. package/app-layout/visual-refresh-toolbar/state/use-app-layout.js +108 -12
  84. package/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -1
  85. package/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.d.ts +42 -0
  86. package/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.d.ts.map +1 -0
  87. package/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.js +85 -0
  88. package/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.js.map +1 -0
  89. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.d.ts.map +1 -1
  90. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js +3 -2
  91. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js.map +1 -1
  92. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts +12 -3
  93. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -1
  94. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +34 -7
  95. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
  96. package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts +6 -1
  97. package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
  98. package/app-layout/visual-refresh-toolbar/toolbar/index.js +14 -7
  99. package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  100. package/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.d.ts.map +1 -1
  101. package/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js +7 -3
  102. package/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js.map +1 -1
  103. package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.d.ts.map +1 -1
  104. package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js +2 -2
  105. package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map +1 -1
  106. package/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.d.ts.map +1 -1
  107. package/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js +6 -2
  108. package/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js.map +1 -1
  109. package/attribute-editor/interfaces.d.ts +2 -0
  110. package/attribute-editor/interfaces.d.ts.map +1 -1
  111. package/attribute-editor/interfaces.js.map +1 -1
  112. package/attribute-editor/row.d.ts.map +1 -1
  113. package/attribute-editor/row.js +2 -2
  114. package/attribute-editor/row.js.map +1 -1
  115. package/attribute-editor/styles.css.js +15 -15
  116. package/attribute-editor/styles.scoped.css +28 -28
  117. package/attribute-editor/styles.selectors.js +15 -15
  118. package/autosuggest/index.d.ts.map +1 -1
  119. package/autosuggest/interfaces.d.ts +4 -0
  120. package/autosuggest/interfaces.d.ts.map +1 -1
  121. package/autosuggest/interfaces.js.map +1 -1
  122. package/autosuggest/internal-do-not-use-core.js +3 -2
  123. package/autosuggest/internal-do-not-use-core.js.map +1 -1
  124. package/autosuggest/internal.d.ts.map +1 -1
  125. package/autosuggest/internal.js +3 -3
  126. package/autosuggest/internal.js.map +1 -1
  127. package/breadcrumb-group/item/styles.css.js +7 -7
  128. package/breadcrumb-group/item/styles.scoped.css +28 -28
  129. package/breadcrumb-group/item/styles.selectors.js +7 -7
  130. package/button/styles.css.js +22 -22
  131. package/button/styles.scoped.css +256 -256
  132. package/button/styles.selectors.js +22 -22
  133. package/button-dropdown/interfaces.d.ts +3 -1
  134. package/button-dropdown/interfaces.d.ts.map +1 -1
  135. package/button-dropdown/interfaces.js.map +1 -1
  136. package/button-dropdown/item-element/index.d.ts.map +1 -1
  137. package/button-dropdown/item-element/index.js +1 -1
  138. package/button-dropdown/item-element/index.js.map +1 -1
  139. package/button-dropdown/item-element/styles.css.js +16 -16
  140. package/button-dropdown/item-element/styles.scoped.css +27 -27
  141. package/button-dropdown/item-element/styles.selectors.js +16 -16
  142. package/button-group/icon-toggle-button-item.d.ts +2 -2
  143. package/button-group/icon-toggle-button-item.d.ts.map +1 -1
  144. package/button-group/icon-toggle-button-item.js +1 -1
  145. package/button-group/icon-toggle-button-item.js.map +1 -1
  146. package/button-group/interfaces.d.ts +4 -1
  147. package/button-group/interfaces.d.ts.map +1 -1
  148. package/button-group/interfaces.js.map +1 -1
  149. package/checkbox/styles.css.js +3 -3
  150. package/checkbox/styles.scoped.css +11 -11
  151. package/checkbox/styles.selectors.js +3 -3
  152. package/content-layout/styles.css.js +14 -14
  153. package/content-layout/styles.scoped.css +27 -27
  154. package/content-layout/styles.selectors.js +14 -14
  155. package/copy-to-clipboard/internal.d.ts.map +1 -1
  156. package/copy-to-clipboard/internal.js +18 -5
  157. package/copy-to-clipboard/internal.js.map +1 -1
  158. package/date-range-picker/dropdown.d.ts +2 -0
  159. package/date-range-picker/dropdown.d.ts.map +1 -1
  160. package/date-range-picker/dropdown.js +2 -2
  161. package/date-range-picker/dropdown.js.map +1 -1
  162. package/date-range-picker/index.d.ts.map +1 -1
  163. package/date-range-picker/index.js +2 -2
  164. package/date-range-picker/index.js.map +1 -1
  165. package/date-range-picker/interfaces.d.ts +6 -0
  166. package/date-range-picker/interfaces.d.ts.map +1 -1
  167. package/date-range-picker/interfaces.js.map +1 -1
  168. package/date-range-picker/relative-range/index.d.ts +3 -1
  169. package/date-range-picker/relative-range/index.d.ts.map +1 -1
  170. package/date-range-picker/relative-range/index.js +4 -1
  171. package/date-range-picker/relative-range/index.js.map +1 -1
  172. package/flashbar/styles.css.js +50 -50
  173. package/flashbar/styles.scoped.css +187 -187
  174. package/flashbar/styles.selectors.js +50 -50
  175. package/help-panel/styles.css.js +6 -6
  176. package/help-panel/styles.scoped.css +73 -73
  177. package/help-panel/styles.selectors.js +6 -6
  178. package/input/index.d.ts.map +1 -1
  179. package/input/index.js +1 -1
  180. package/input/interfaces.d.ts +47 -0
  181. package/input/interfaces.d.ts.map +1 -1
  182. package/input/interfaces.js.map +1 -1
  183. package/input/internal-do-not-use-core.js +3 -2
  184. package/input/internal-do-not-use-core.js.map +1 -1
  185. package/input/internal.d.ts.map +1 -1
  186. package/input/internal.js +3 -2
  187. package/input/internal.js.map +1 -1
  188. package/input/styles.css.js +13 -13
  189. package/input/styles.d.ts +2 -0
  190. package/input/styles.d.ts.map +1 -0
  191. package/input/styles.js +42 -0
  192. package/input/styles.js.map +1 -0
  193. package/input/styles.scoped.css +66 -49
  194. package/input/styles.selectors.js +13 -13
  195. package/internal/analytics/components/analytics-funnel.d.ts +1 -0
  196. package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  197. package/internal/analytics/components/analytics-funnel.js +5 -2
  198. package/internal/analytics/components/analytics-funnel.js.map +1 -1
  199. package/internal/analytics/interfaces.d.ts +1 -0
  200. package/internal/analytics/interfaces.d.ts.map +1 -1
  201. package/internal/analytics/interfaces.js.map +1 -1
  202. package/internal/base-component/styles.scoped.css +1 -1
  203. package/internal/components/autosuggest-input/index.d.ts.map +1 -1
  204. package/internal/components/autosuggest-input/index.js +30 -7
  205. package/internal/components/autosuggest-input/index.js.map +1 -1
  206. package/internal/components/drag-handle-wrapper/styles.css.js +20 -20
  207. package/internal/components/drag-handle-wrapper/styles.scoped.css +48 -48
  208. package/internal/components/drag-handle-wrapper/styles.selectors.js +20 -20
  209. package/internal/components/dropdown/styles.css.js +20 -20
  210. package/internal/components/dropdown/styles.scoped.css +38 -38
  211. package/internal/components/dropdown/styles.selectors.js +20 -20
  212. package/internal/components/token-list/styles.css.js +10 -10
  213. package/internal/components/token-list/styles.scoped.css +25 -25
  214. package/internal/components/token-list/styles.selectors.js +10 -10
  215. package/internal/environment.js +2 -2
  216. package/internal/environment.json +2 -2
  217. package/internal/generated/custom-css-properties/index.d.ts +13 -0
  218. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  219. package/internal/generated/custom-css-properties/index.js +98 -85
  220. package/internal/generated/custom-css-properties/index.js.map +1 -1
  221. package/internal/generated/styles/tokens.d.ts +0 -4
  222. package/internal/generated/styles/tokens.js +0 -4
  223. package/internal/generated/theming/index.cjs +0 -84
  224. package/internal/generated/theming/index.js +0 -84
  225. package/internal/manifest.json +1 -1
  226. package/internal/plugins/controllers/drawers.d.ts +1 -1
  227. package/internal/plugins/controllers/drawers.d.ts.map +1 -1
  228. package/internal/plugins/controllers/drawers.js.map +1 -1
  229. package/internal/plugins/widget/index.d.ts +6 -1
  230. package/internal/plugins/widget/index.d.ts.map +1 -1
  231. package/internal/plugins/widget/index.js +11 -1
  232. package/internal/plugins/widget/index.js.map +1 -1
  233. package/internal/plugins/widget/interfaces.d.ts +2 -1
  234. package/internal/plugins/widget/interfaces.d.ts.map +1 -1
  235. package/internal/plugins/widget/interfaces.js.map +1 -1
  236. package/internal/plugins/widget.d.ts +1 -1
  237. package/internal/plugins/widget.d.ts.map +1 -1
  238. package/internal/plugins/widget.js +1 -1
  239. package/internal/plugins/widget.js.map +1 -1
  240. package/link/styles.css.js +20 -20
  241. package/link/styles.scoped.css +103 -103
  242. package/link/styles.selectors.js +20 -20
  243. package/package.json +1 -1
  244. package/popover/container.d.ts.map +1 -1
  245. package/popover/container.js +2 -5
  246. package/popover/container.js.map +1 -1
  247. package/popover/use-position-observer.d.ts +1 -2
  248. package/popover/use-position-observer.d.ts.map +1 -1
  249. package/popover/use-position-observer.js +10 -8
  250. package/popover/use-position-observer.js.map +1 -1
  251. package/radio-group/styles.css.js +10 -10
  252. package/radio-group/styles.scoped.css +22 -22
  253. package/radio-group/styles.selectors.js +10 -10
  254. package/select/parts/filter.d.ts +1 -1
  255. package/select/parts/filter.d.ts.map +1 -1
  256. package/side-navigation/interfaces.d.ts +4 -0
  257. package/side-navigation/interfaces.d.ts.map +1 -1
  258. package/side-navigation/interfaces.js.map +1 -1
  259. package/side-navigation/parts.d.ts.map +1 -1
  260. package/side-navigation/parts.js +4 -1
  261. package/side-navigation/parts.js.map +1 -1
  262. package/slider/styles.css.js +26 -26
  263. package/slider/styles.scoped.css +86 -86
  264. package/slider/styles.selectors.js +26 -26
  265. package/spinner/styles.css.js +13 -13
  266. package/spinner/styles.scoped.css +39 -39
  267. package/spinner/styles.selectors.js +13 -13
  268. package/tag-editor/styles.css.js +3 -3
  269. package/tag-editor/styles.scoped.css +13 -13
  270. package/tag-editor/styles.selectors.js +3 -3
  271. package/test-utils/dom/multiselect/index.d.ts +8 -0
  272. package/test-utils/dom/multiselect/index.js +18 -4
  273. package/test-utils/dom/multiselect/index.js.map +1 -1
  274. package/test-utils/selectors/multiselect/index.d.ts +8 -0
  275. package/test-utils/selectors/multiselect/index.js +18 -4
  276. package/test-utils/selectors/multiselect/index.js.map +1 -1
  277. package/text-content/styles.css.js +1 -1
  278. package/text-content/styles.scoped.css +66 -66
  279. package/text-content/styles.selectors.js +1 -1
  280. package/toggle/styles.css.js +10 -10
  281. package/toggle/styles.scoped.css +23 -23
  282. package/toggle/styles.selectors.js +10 -10
  283. package/toggle-button/internal.d.ts +1 -0
  284. package/toggle-button/internal.d.ts.map +1 -1
  285. package/toggle-button/internal.js +2 -2
  286. package/toggle-button/internal.js.map +1 -1
  287. package/top-navigation/interfaces.d.ts +1 -1
  288. package/top-navigation/interfaces.js.map +1 -1
  289. package/top-navigation/internal.d.ts.map +1 -1
  290. package/top-navigation/internal.js +0 -9
  291. package/top-navigation/internal.js.map +1 -1
  292. package/top-navigation/parts/utility.d.ts.map +1 -1
  293. package/top-navigation/parts/utility.js +1 -15
  294. package/top-navigation/parts/utility.js.map +1 -1
  295. package/wizard/index.d.ts.map +1 -1
  296. package/wizard/index.js +2 -1
  297. package/wizard/index.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"after-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,O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,CACtB,CACP;QACD,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,KAAK,EACZ,CAAC,SAAS,IAAI,MAAM,CAAC,cAAc,CAAC,EACpC,YAAY,CAAC,wBAAwB,CAAC,EACtC,cAAc,IAAI,CAAC,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EAC5D,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,EACjC,kBAAkB,IAAI,MAAM,CAAC,MAAM,CACpC,IAEA,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,oBAAC,eAAe,IAAC,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,GAAI,CACxG;QACN,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,eAAe,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC;YACtF,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,EAAE;gBAChE,oBAAC,sBAAsB,IAAC,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,GAAI,CACnD,CAC5B,CACL,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG,yBAAyB,CAAC,2BAA2B,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 clsx from 'clsx';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { ActiveDrawersContext } from '../../utils/visibility-context';\nimport {\n AppLayoutDrawerImplementation as AppLayoutDrawer,\n AppLayoutGlobalDrawersImplementation as AppLayoutGlobalDrawers,\n} from '../drawer';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide } from '../split-panel';\nimport { isWidgetReady } from '../state/invariants';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const AfterMainSlotImplementation = ({ appLayoutState, appLayoutProps }: SkeletonPartProps) => {\n if (!isWidgetReady(appLayoutState)) {\n return null;\n }\n const {\n navigationOpen,\n activeGlobalDrawersIds,\n expandedDrawerId,\n activeDrawer,\n splitPanelOpen,\n drawers,\n splitPanelPosition,\n } = appLayoutState.widgetizedState;\n const drawerExpandedMode = !!expandedDrawerId;\n const toolsOpen = !!activeDrawer;\n const globalToolsOpen = !!activeGlobalDrawersIds?.length;\n return (\n <>\n {splitPanelPosition === 'side' && (\n <div\n className={clsx(\n styles['split-panel-side'],\n !splitPanelOpen && styles['panel-hidden'],\n drawerExpandedMode && styles.hidden\n )}\n >\n <AppLayoutSplitPanelSide\n appLayoutInternals={appLayoutState.appLayoutInternals}\n splitPanelInternals={appLayoutState.splitPanelInternals}\n >\n {appLayoutProps.splitPanel}\n </AppLayoutSplitPanelSide>\n </div>\n )}\n <div\n className={clsx(\n styles.tools,\n !toolsOpen && styles['panel-hidden'],\n sharedStyles['with-motion-horizontal'],\n navigationOpen && !toolsOpen && styles['unfocusable-mobile'],\n toolsOpen && styles['tools-open'],\n drawerExpandedMode && styles.hidden\n )}\n >\n {drawers && drawers.length > 0 && <AppLayoutDrawer appLayoutInternals={appLayoutState.appLayoutInternals} />}\n </div>\n <div className={clsx(styles['global-tools'], !globalToolsOpen && styles['panel-hidden'])}>\n <ActiveDrawersContext.Provider value={activeGlobalDrawersIds ?? []}>\n <AppLayoutGlobalDrawers appLayoutInternals={appLayoutState.appLayoutInternals} />\n </ActiveDrawersContext.Provider>\n </div>\n </>\n );\n};\n\nexport const createWidgetizedAppLayoutAfterMainSlot = createWidgetizedComponent(AfterMainSlotImplementation);\n"]}
1
+ {"version":3,"file":"after-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACt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C,sBAAsB,IAAC,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,GAAI,CACnD,CAC5B,CACL,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG,yBAAyB,CAAC,2BAA2B,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 clsx from 'clsx';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { ActiveDrawersContext } from '../../utils/visibility-context';\nimport {\n AppLayoutDrawerImplementation as AppLayoutDrawer,\n AppLayoutGlobalDrawersImplementation as AppLayoutGlobalDrawers,\n} from '../drawer';\nimport { AppLayoutBottomDrawerWrapper } from '../drawer/global-bottom-drawer';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide } from '../split-panel';\nimport { isWidgetReady } from '../state/invariants';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const AfterMainSlotImplementation = ({ appLayoutState, appLayoutProps }: SkeletonPartProps) => {\n if (!isWidgetReady(appLayoutState)) {\n return null;\n }\n const {\n navigationOpen,\n activeGlobalDrawersIds,\n expandedDrawerId,\n activeDrawer,\n splitPanelOpen,\n drawers,\n splitPanelPosition,\n activeGlobalBottomDrawerId,\n bottomDrawers,\n bottomDrawerReportedSize,\n } = appLayoutState.widgetizedState;\n const drawerExpandedMode = !!expandedDrawerId;\n const toolsOpen = !!activeDrawer;\n const globalToolsOpen = !!activeGlobalDrawersIds?.length;\n\n return (\n <>\n {!!bottomDrawers.length && (\n <div className={styles['bottom-tool']}>\n <ActiveDrawersContext.Provider value={activeGlobalBottomDrawerId ? [activeGlobalBottomDrawerId] : []}>\n <AppLayoutBottomDrawerWrapper widgetizedState={appLayoutState.widgetizedState} />\n </ActiveDrawersContext.Provider>\n </div>\n )}\n {splitPanelPosition === 'side' && (\n <div\n className={clsx(\n styles['split-panel-side'],\n !splitPanelOpen && styles['panel-hidden'],\n drawerExpandedMode && styles.hidden\n )}\n >\n <AppLayoutSplitPanelSide\n appLayoutInternals={appLayoutState.appLayoutInternals}\n splitPanelInternals={appLayoutState.splitPanelInternals}\n bottomDrawerReportedSize={bottomDrawerReportedSize}\n >\n {appLayoutProps.splitPanel}\n </AppLayoutSplitPanelSide>\n </div>\n )}\n <div\n className={clsx(\n styles.tools,\n !toolsOpen && styles['panel-hidden'],\n sharedStyles['with-motion-horizontal'],\n navigationOpen && !toolsOpen && styles['unfocusable-mobile'],\n toolsOpen && styles['tools-open'],\n drawerExpandedMode && styles.hidden\n )}\n >\n {drawers && drawers.length > 0 && (\n <AppLayoutDrawer\n appLayoutInternals={appLayoutState.appLayoutInternals}\n bottomDrawerReportedSize={activeGlobalBottomDrawerId ? bottomDrawerReportedSize : 0}\n />\n )}\n </div>\n <div className={clsx(styles['global-tools'], !globalToolsOpen && styles['panel-hidden'])}>\n <ActiveDrawersContext.Provider value={activeGlobalDrawersIds ?? []}>\n <AppLayoutGlobalDrawers appLayoutInternals={appLayoutState.appLayoutInternals} />\n </ActiveDrawersContext.Provider>\n </div>\n </>\n );\n};\n\nexport const createWidgetizedAppLayoutAfterMainSlot = createWidgetizedComponent(AfterMainSlotImplementation);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"before-main-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAQ3D,eAAO,MAAM,4BAA4B,qDAAsD,iBAAiB,gBA4F/G,CAAC;AAEF,eAAO,MAAM,uCAAuC,gEA9F2C,iBAAiB,qFAAjB,iBAAiB,gBAiG/G,CAAC"}
1
+ {"version":3,"file":"before-main-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAQ3D,eAAO,MAAM,4BAA4B,qDAAsD,iBAAiB,gBAgG/G,CAAC;AAEF,eAAO,MAAM,uCAAuC,gEAlG2C,iBAAiB,qFAAjB,iBAAiB,gBAqG/G,CAAC"}
@@ -16,7 +16,7 @@ export const BeforeMainSlotImplementation = ({ toolbarProps, appLayoutState, app
16
16
  if (!isWidgetReady(appLayoutState)) {
17
17
  return (React.createElement(BeforeMainSlotSkeleton, { toolbarProps: toolbarProps, appLayoutProps: appLayoutProps, appLayoutState: appLayoutState }));
18
18
  }
19
- const { activeDrawer, navigationOpen, navigation, expandedDrawerId, setExpandedDrawerId, navigationAnimationDisabled, activeAiDrawerId, aiDrawerExpandedMode, aiDrawer, activeAiDrawerSize, minAiDrawerSize, maxAiDrawerSize, onActiveAiDrawerResize, aiDrawerFocusControl, ariaLabels, isMobile, drawersOpenQueue, onActiveAiDrawerChange, activeAiDrawer, } = appLayoutState.widgetizedState;
19
+ const { activeDrawer, navigationOpen, navigation, expandedDrawerId, setExpandedDrawerId, navigationAnimationDisabled, activeAiDrawerId, aiDrawerExpandedMode, aiDrawer, activeAiDrawerSize, minAiDrawerSize, maxAiDrawerSize, onActiveAiDrawerResize, aiDrawerFocusControl, ariaLabels, isMobile, drawersOpenQueue, onActiveAiDrawerChange, activeAiDrawer, bottomDrawerReportedSize, } = appLayoutState.widgetizedState;
20
20
  const drawerExpandedMode = !!expandedDrawerId;
21
21
  const toolsOpen = !!activeDrawer;
22
22
  // Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar
@@ -42,7 +42,7 @@ export const BeforeMainSlotImplementation = ({ toolbarProps, appLayoutState, app
42
42
  setExpandedDrawerId,
43
43
  } })))))),
44
44
  navigation && (React.createElement("div", { className: clsx(styles.navigation, !navigationOpen && styles['panel-hidden'], toolsOpen && styles['unfocusable-mobile'], !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'], (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden) },
45
- React.createElement(AppLayoutNavigation, { appLayoutInternals: appLayoutState.appLayoutInternals })))));
45
+ React.createElement(AppLayoutNavigation, { appLayoutInternals: appLayoutState.appLayoutInternals, bottomDrawerReportedSize: bottomDrawerReportedSize })))));
46
46
  };
47
47
  export const createWidgetizedAppLayoutBeforeMainSlot = createWidgetizedComponent(BeforeMainSlotImplementation, BeforeMainSlotSkeleton);
48
48
  //# sourceMappingURL=before-main-slot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"before-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,iCAAiC,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,8BAA8B,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhF,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAqB,EAAE,EAAE;IAClH,MAAM,kBAAkB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,IAAI,CAA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Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { ActiveDrawersContext } from '../../utils/visibility-context';\nimport { AppLayoutGlobalAiDrawerImplementation } from '../drawer/global-ai-drawer';\nimport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../navigation';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { BeforeMainSlotSkeleton } from '../skeleton/skeleton-parts';\nimport { isWidgetReady } from '../state/invariants';\nimport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../toolbar';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const BeforeMainSlotImplementation = ({ toolbarProps, appLayoutState, appLayoutProps }: SkeletonPartProps) => {\n const wasAiDrawerOpenRef = useRef(false);\n if (!isWidgetReady(appLayoutState)) {\n return (\n <BeforeMainSlotSkeleton\n toolbarProps={toolbarProps}\n appLayoutProps={appLayoutProps}\n appLayoutState={appLayoutState}\n />\n );\n }\n const {\n activeDrawer,\n navigationOpen,\n navigation,\n expandedDrawerId,\n setExpandedDrawerId,\n navigationAnimationDisabled,\n activeAiDrawerId,\n aiDrawerExpandedMode,\n aiDrawer,\n activeAiDrawerSize,\n minAiDrawerSize,\n maxAiDrawerSize,\n onActiveAiDrawerResize,\n aiDrawerFocusControl,\n ariaLabels,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n activeAiDrawer,\n } = appLayoutState.widgetizedState;\n const drawerExpandedMode = !!expandedDrawerId;\n const toolsOpen = !!activeDrawer;\n // Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar\n const drawerExpandedModeInChildLayout = !!toolbarProps?.expandedDrawerId;\n const { __embeddedViewMode: embeddedViewMode } = appLayoutProps as any;\n return (\n <>\n {!!toolbarProps && !embeddedViewMode && !aiDrawerExpandedMode && (\n <AppLayoutToolbar appLayoutInternals={appLayoutState.appLayoutInternals} toolbarProps={toolbarProps} />\n )}\n {aiDrawer && (\n <div\n className={clsx(\n styles['ai-drawer'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && !aiDrawerExpandedMode && styles.hidden\n )}\n >\n <ActiveDrawersContext.Provider value={activeAiDrawer ? [activeAiDrawer.id] : []}>\n {(!!activeAiDrawerId || (aiDrawer?.preserveInactiveContent && wasAiDrawerOpenRef.current)) && (\n <>\n {(wasAiDrawerOpenRef.current = true)}\n <AppLayoutGlobalAiDrawerImplementation\n show={!!activeAiDrawerId}\n activeAiDrawer={aiDrawer ?? null}\n appLayoutInternals={appLayoutState.appLayoutInternals}\n aiDrawerProps={{\n activeAiDrawerSize: activeAiDrawerSize!,\n minAiDrawerSize: minAiDrawerSize!,\n maxAiDrawerSize: maxAiDrawerSize!,\n aiDrawer: aiDrawer!,\n ariaLabels,\n aiDrawerFocusControl,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n onActiveDrawerResize: ({ size }) => onActiveAiDrawerResize(size),\n expandedDrawerId,\n setExpandedDrawerId,\n }}\n />\n </>\n )}\n </ActiveDrawersContext.Provider>\n </div>\n )}\n {navigation && (\n <div\n className={clsx(\n styles.navigation,\n !navigationOpen && styles['panel-hidden'],\n toolsOpen && styles['unfocusable-mobile'],\n !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden\n )}\n >\n <AppLayoutNavigation appLayoutInternals={appLayoutState.appLayoutInternals} />\n </div>\n )}\n </>\n );\n};\n\nexport const createWidgetizedAppLayoutBeforeMainSlot = createWidgetizedComponent(\n BeforeMainSlotImplementation,\n BeforeMainSlotSkeleton\n);\n"]}
1
+ {"version":3,"file":"before-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,K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;wBACnB,UAAU;wBACV,oBAAoB;wBACpB,QAAQ;wBACR,gBAAgB;wBAChB,sBAAsB;wBACtB,oBAAoB,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC;wBAChE,gBAAgB;wBAChB,mBAAmB;qBACpB,GACD,CACD,CACJ,CAC6B,CAC5B,CACP;QACA,UAAU,IAAI,CACb,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,UAAU,EACjB,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC,EACzC,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EACzC,CAAC,2BAA2B,IAAI,YAAY,CAAC,wBAAwB,CAAC,EACtE,CAAC,kBAAkB,IAAI,+BAA+B,CAAC,IAAI,MAAM,CAAC,MAAM,CACzE;YAED,oBAAC,mBAAmB,IAClB,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,EACrD,wBAAwB,EAAE,wBAAwB,GAClD,CACE,CACP,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,yBAAyB,CAC9E,4BAA4B,EAC5B,sBAAsB,CACvB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { ActiveDrawersContext } from '../../utils/visibility-context';\nimport { AppLayoutGlobalAiDrawerImplementation } from '../drawer/global-ai-drawer';\nimport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../navigation';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { BeforeMainSlotSkeleton } from '../skeleton/skeleton-parts';\nimport { isWidgetReady } from '../state/invariants';\nimport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../toolbar';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const BeforeMainSlotImplementation = ({ toolbarProps, appLayoutState, appLayoutProps }: SkeletonPartProps) => {\n const wasAiDrawerOpenRef = useRef(false);\n if (!isWidgetReady(appLayoutState)) {\n return (\n <BeforeMainSlotSkeleton\n toolbarProps={toolbarProps}\n appLayoutProps={appLayoutProps}\n appLayoutState={appLayoutState}\n />\n );\n }\n const {\n activeDrawer,\n navigationOpen,\n navigation,\n expandedDrawerId,\n setExpandedDrawerId,\n navigationAnimationDisabled,\n activeAiDrawerId,\n aiDrawerExpandedMode,\n aiDrawer,\n activeAiDrawerSize,\n minAiDrawerSize,\n maxAiDrawerSize,\n onActiveAiDrawerResize,\n aiDrawerFocusControl,\n ariaLabels,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n activeAiDrawer,\n bottomDrawerReportedSize,\n } = appLayoutState.widgetizedState;\n const drawerExpandedMode = !!expandedDrawerId;\n const toolsOpen = !!activeDrawer;\n // Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar\n const drawerExpandedModeInChildLayout = !!toolbarProps?.expandedDrawerId;\n const { __embeddedViewMode: embeddedViewMode } = appLayoutProps as any;\n return (\n <>\n {!!toolbarProps && !embeddedViewMode && !aiDrawerExpandedMode && (\n <AppLayoutToolbar appLayoutInternals={appLayoutState.appLayoutInternals} toolbarProps={toolbarProps} />\n )}\n {aiDrawer && (\n <div\n className={clsx(\n styles['ai-drawer'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && !aiDrawerExpandedMode && styles.hidden\n )}\n >\n <ActiveDrawersContext.Provider value={activeAiDrawer ? [activeAiDrawer.id] : []}>\n {(!!activeAiDrawerId || (aiDrawer?.preserveInactiveContent && wasAiDrawerOpenRef.current)) && (\n <>\n {(wasAiDrawerOpenRef.current = true)}\n <AppLayoutGlobalAiDrawerImplementation\n show={!!activeAiDrawerId}\n activeAiDrawer={aiDrawer ?? null}\n appLayoutInternals={appLayoutState.appLayoutInternals}\n aiDrawerProps={{\n activeAiDrawerSize: activeAiDrawerSize!,\n minAiDrawerSize: minAiDrawerSize!,\n maxAiDrawerSize: maxAiDrawerSize!,\n aiDrawer: aiDrawer!,\n ariaLabels,\n aiDrawerFocusControl,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n onActiveDrawerResize: ({ size }) => onActiveAiDrawerResize(size),\n expandedDrawerId,\n setExpandedDrawerId,\n }}\n />\n </>\n )}\n </ActiveDrawersContext.Provider>\n </div>\n )}\n {navigation && (\n <div\n className={clsx(\n styles.navigation,\n !navigationOpen && styles['panel-hidden'],\n toolsOpen && styles['unfocusable-mobile'],\n !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden\n )}\n >\n <AppLayoutNavigation\n appLayoutInternals={appLayoutState.appLayoutInternals}\n bottomDrawerReportedSize={bottomDrawerReportedSize}\n />\n </div>\n )}\n </>\n );\n};\n\nexport const createWidgetizedAppLayoutBeforeMainSlot = createWidgetizedComponent(\n BeforeMainSlotImplementation,\n BeforeMainSlotSkeleton\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"bottom-content-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAM3D,eAAO,MAAM,+BAA+B,uCAAwC,iBAAiB,uBAmBpG,CAAC;AAEF,eAAO,MAAM,0CAA0C,kDArB6B,iBAAiB,8EAAjB,iBAAiB,uBAqBe,CAAC"}
1
+ {"version":3,"file":"bottom-content-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAO3D,eAAO,MAAM,+BAA+B,uCAAwC,iBAAiB,uBA0BpG,CAAC;AAEF,eAAO,MAAM,0CAA0C,kDA5B6B,iBAAiB,8EAAjB,iBAAiB,uBA4Be,CAAC"}
@@ -1,16 +1,20 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import React from 'react';
4
+ import clsx from 'clsx';
4
5
  import { createWidgetizedComponent } from '../../../internal/widgets';
5
6
  import { AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom } from '../split-panel';
6
7
  import { isWidgetReady } from '../state/invariants';
8
+ import sharedStyles from '../../resize/styles.css.js';
7
9
  import styles from '../skeleton/styles.css.js';
8
10
  export const BottomContentSlotImplementation = ({ appLayoutState, appLayoutProps }) => {
9
11
  if (!isWidgetReady(appLayoutState)) {
10
12
  return null;
11
13
  }
12
- const { splitPanelPosition, placement } = appLayoutState.widgetizedState;
13
- return (React.createElement(React.Fragment, null, splitPanelPosition === 'bottom' && (React.createElement("div", { className: styles['split-panel-bottom'], style: { insetBlockEnd: placement.insetBlockEnd } },
14
+ const { splitPanelPosition, placement, activeGlobalBottomDrawerId, bottomDrawerReportedSize, isMobile } = appLayoutState.widgetizedState;
15
+ return (React.createElement(React.Fragment, null, splitPanelPosition === 'bottom' && (React.createElement("div", { className: clsx(styles['split-panel-bottom'], sharedStyles['with-motion-vertical']), style: {
16
+ insetBlockEnd: placement.insetBlockEnd + (activeGlobalBottomDrawerId && !isMobile ? bottomDrawerReportedSize : 0),
17
+ } },
14
18
  React.createElement(AppLayoutSplitPanelBottom, { appLayoutInternals: appLayoutState.appLayoutInternals, splitPanelInternals: appLayoutState.splitPanelInternals }, appLayoutProps.splitPanel)))));
15
19
  };
16
20
  export const createWidgetizedAppLayoutBottomContentSlot = createWidgetizedComponent(BottomContentSlotImplementation);
@@ -1 +1 @@
1
- {"version":3,"file":"bottom-content-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,6CAA6C,IAAI,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAAE,cAAc,EAAE,cAAc,EAAqB,EAAE,EAAE;IACvG,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE;QAClC,OAAO,IAAI,CAAC;KACb;IACD,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,GAAG,cAAc,CAAC,eAAe,CAAC;IACzE,OAAO,CACL,0CACG,kBAAkB,KAAK,QAAQ,IAAI,CAClC,6BAAK,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,SAAS,CAAC,aAAa,EAAE;QAC7F,oBAAC,yBAAyB,IACxB,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,EACrD,mBAAmB,EAAE,cAAc,CAAC,mBAAmB,IAEtD,cAAc,CAAC,UAAU,CACA,CACxB,CACP,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0CAA0C,GAAG,yBAAyB,CAAC,+BAA+B,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom } from '../split-panel';\nimport { isWidgetReady } from '../state/invariants';\n\nimport styles from '../skeleton/styles.css.js';\n\nexport const BottomContentSlotImplementation = ({ appLayoutState, appLayoutProps }: SkeletonPartProps) => {\n if (!isWidgetReady(appLayoutState)) {\n return null;\n }\n const { splitPanelPosition, placement } = appLayoutState.widgetizedState;\n return (\n <>\n {splitPanelPosition === 'bottom' && (\n <div className={styles['split-panel-bottom']} style={{ insetBlockEnd: placement.insetBlockEnd }}>\n <AppLayoutSplitPanelBottom\n appLayoutInternals={appLayoutState.appLayoutInternals}\n splitPanelInternals={appLayoutState.splitPanelInternals}\n >\n {appLayoutProps.splitPanel}\n </AppLayoutSplitPanelBottom>\n </div>\n )}\n </>\n );\n};\n\nexport const createWidgetizedAppLayoutBottomContentSlot = createWidgetizedComponent(BottomContentSlotImplementation);\n"]}
1
+ {"version":3,"file":"bottom-content-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,6CAA6C,IAAI,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAAE,cAAc,EAAE,cAAc,EAAqB,EAAE,EAAE;IACvG,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE;QAClC,OAAO,IAAI,CAAC;KACb;IACD,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,QAAQ,EAAE,GACrG,cAAc,CAAC,eAAe,CAAC;IACjC,OAAO,CACL,0CACG,kBAAkB,KAAK,QAAQ,IAAI,CAClC,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,YAAY,CAAC,sBAAsB,CAAC,CAAC,EACnF,KAAK,EAAE;YACL,aAAa,EACX,SAAS,CAAC,aAAa,GAAG,CAAC,0BAA0B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC;SACrG;QAED,oBAAC,yBAAyB,IACxB,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,EACrD,mBAAmB,EAAE,cAAc,CAAC,mBAAmB,IAEtD,cAAc,CAAC,UAAU,CACA,CACxB,CACP,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0CAA0C,GAAG,yBAAyB,CAAC,+BAA+B,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 clsx from 'clsx';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom } from '../split-panel';\nimport { isWidgetReady } from '../state/invariants';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const BottomContentSlotImplementation = ({ appLayoutState, appLayoutProps }: SkeletonPartProps) => {\n if (!isWidgetReady(appLayoutState)) {\n return null;\n }\n const { splitPanelPosition, placement, activeGlobalBottomDrawerId, bottomDrawerReportedSize, isMobile } =\n appLayoutState.widgetizedState;\n return (\n <>\n {splitPanelPosition === 'bottom' && (\n <div\n className={clsx(styles['split-panel-bottom'], sharedStyles['with-motion-vertical'])}\n style={{\n insetBlockEnd:\n placement.insetBlockEnd + (activeGlobalBottomDrawerId && !isMobile ? bottomDrawerReportedSize : 0),\n }}\n >\n <AppLayoutSplitPanelBottom\n appLayoutInternals={appLayoutState.appLayoutInternals}\n splitPanelInternals={appLayoutState.splitPanelInternals}\n >\n {appLayoutProps.splitPanel}\n </AppLayoutSplitPanelBottom>\n </div>\n )}\n </>\n );\n};\n\nexport const createWidgetizedAppLayoutBottomContentSlot = createWidgetizedComponent(BottomContentSlotImplementation);\n"]}
@@ -15,6 +15,7 @@ export declare namespace AttributeEditorProps {
15
15
  type FieldRenderable<T> = (item: T, itemIndex: number) => React.ReactNode;
16
16
  interface FieldDefinition<T> {
17
17
  label?: React.ReactNode;
18
+ description?: React.ReactNode;
18
19
  info?: React.ReactNode;
19
20
  control?: FieldRenderable<T> | React.ReactNode;
20
21
  errorText?: FieldRenderable<T> | React.ReactNode;
@@ -109,6 +110,7 @@ export interface AttributeEditorProps<T> extends BaseComponentProps {
109
110
  * If more than 6 attributes are specified, a `gridLayout` must be provided.
110
111
  *
111
112
  * * `label` (ReactNode) - Text label for the form field.
113
+ * * `description` (ReactNode) - Additional description for the form field.
112
114
  * * `info` (ReactNode) - Info link for the form field.
113
115
  * * `errorText` ((item, itemIndex) => ReactNode) - Error message text to display as a control validation message.
114
116
  * It renders the form field as invalid if the returned value is not `null` or `undefined`.
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/attribute-editor/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAY/D,MAAM,WAAW,6BAA6B;IAC5C,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAA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AE,CAAC,KAAK,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAEvF;;OAEG;IACH,gBAAgB,CAAC,EAAE,yBAAyB,CAAC;IAE7C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,CAAC;IAE9F;;OAEG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CACnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/attribute-editor/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 { ButtonDropdownProps } from '../button-dropdown/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { Breakpoint as InternalBreakpoint } from '../internal/breakpoints';\nimport { NonCancelableEventHandler } from '../internal/events';\n\n/*\n * HACK: Cast the component to a named parametrized interface.\n *\n * This lets us use React.forwardRef and still let the component have type\n * parameters, and the naming convention lets the documenter know that this is\n * a forwardRef-wrapped component.\n *\n * We don't need to expose this type to customers because it's just a simple\n * function type.\n */\nexport interface AttributeEditorForwardRefType {\n <T>(props: AttributeEditorProps<T> & { ref?: React.Ref<AttributeEditorProps.Ref> }): JSX.Element;\n}\n\nexport namespace AttributeEditorProps {\n export interface IsItemRemovableFunction<T> {\n (item: T): boolean;\n }\n\n export type FieldRenderable<T> = (item: T, itemIndex: number) => React.ReactNode;\n export interface FieldDefinition<T> {\n label?: React.ReactNode;\n info?: React.ReactNode;\n control?: FieldRenderable<T> | React.ReactNode;\n errorText?: FieldRenderable<T> | React.ReactNode;\n warningText?: FieldRenderable<T> | React.ReactNode;\n constraintText?: FieldRenderable<T> | React.ReactNode;\n }\n\n export type AddButtonVariant = 'normal' | 'inline-link';\n\n export interface RemoveButtonClickDetail {\n itemIndex: number;\n }\n\n export interface Ref {\n /**\n * Focuses the 'remove' button for the given row index.\n */\n focusRemoveButton(itemIndex: number): void;\n /**\n * Focuses the 'add' button. Use this, for example, after a user removes the last row.\n */\n focusAddButton(): void;\n }\n\n export interface RowActionsProps<T> {\n item: T;\n itemIndex: number;\n ref: React.Ref<ButtonDropdownProps.Ref>;\n breakpoint: Breakpoint | null;\n ownRow: boolean;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n export interface I18nStrings<T = any> {\n errorIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n itemRemovedAriaLive?: string;\n\n /**\n * @deprecated Use `removeButtonAriaLabel` on the component instead.\n */\n removeButtonAriaLabel?: (item: T) => string;\n }\n\n export type Breakpoint = InternalBreakpoint;\n\n export interface GridLayout {\n breakpoint?: Breakpoint;\n rows: ReadonlyArray<ReadonlyArray<number>>;\n removeButton?: {\n ownRow?: boolean;\n width?: number | 'auto';\n };\n }\n}\n\nexport interface AttributeEditorProps<T> extends BaseComponentProps {\n /**\n * Displayed when there are no items to display.\n */\n empty?: React.ReactNode;\n\n /**\n * Displayed below the add button. Use it for additional information related to the attribute editor.\n */\n additionalInfo?: React.ReactNode;\n\n /**\n * Specifies the text that's displayed in the add button.\n */\n addButtonText: string;\n\n /**\n * Specifies the text that's displayed in the remove button.\n * @i18n\n */\n removeButtonText?: string;\n\n /**\n * Adds an `aria-label` to the remove button.\n */\n removeButtonAriaLabel?: (item: T) => string;\n\n /**\n * Specifies the items that serve as the data source for all rows.\n * The display of a row is handled by the `definition` property.\n */\n items?: ReadonlyArray<T>;\n\n /**\n * Function that determines whether an item is removable. When this function returns `false`, the remove\n * button is not rendered and the user can't remove the item.\n * By default, all items are removable.\n */\n isItemRemovable?: AttributeEditorProps.IsItemRemovableFunction<T>;\n\n /**\n * Determines whether the add button is disabled.\n */\n disableAddButton?: boolean;\n\n /**\n * Specifies the variant to use for the add button. By default a normal button is used.\n * Use `inline-link` when using an attribute editor nested inside complex attribute editing\n * with expandable sections.\n */\n addButtonVariant?: AttributeEditorProps.AddButtonVariant;\n\n /**\n * Defines the editor configuration. Each object in the array represents one form field in the row.\n * If more than 6 attributes are specified, a `gridLayout` must be provided.\n *\n * * `label` (ReactNode) - Text label for the form field.\n * * `info` (ReactNode) - Info link for the form field.\n * * `errorText` ((item, itemIndex) => ReactNode) - Error message text to display as a control validation message.\n * It renders the form field as invalid if the returned value is not `null` or `undefined`.\n * * `warningText` ((item, itemIndex) => ReactNode) - Warning message text to display as a control validation message.\n * It renders the form field in a warning state if the returned value is not `null` or `undefined`.\n * * `constraintText` ((item, itemIndex) => ReactNode) - Text to display as a constraint message below the field.\n * * `control` ((item, itemIndex) => ReactNode) - A control to use as the input for the field.\n */\n definition: ReadonlyArray<AttributeEditorProps.FieldDefinition<T>>;\n\n /**\n * Optionally specifies the layout of the attributes. By default, all attributes will be\n * equally spaced and wrapped into multiple rows on smaller viewports.\n *\n * A `gridLayout` is an array of breakpoint definitions. Each definition consists of:\n * - `rows` (`number[][]`): the rows in which to display the attributes. Each row consists of a list of numbers indicating\n * the relative width of each attribute. For example, `[[1, 1, 1, 1]]` is a single row of four evenly-spaced attributes,\n * or `[[1, 2], [1, 1, 1]]` splits five attributes onto two rows.\n * - `breakpoint` (`string`): optionally specifies that the given entry should only be used when at least that much width is available.\n * - `removeButton`: optionally configures the remove (or row action) button placement. If this is not provided, the button will be\n * placed at the end of a single row, or below if multiple rows are present. The `removeButton` property supports contains two properties:\n * - `ownRow` (`boolean`): forces the remove button onto its own row.\n * - `width` (`number | 'auto'`): a number indicating the relative width (equivalent to a `rows` entry), or 'auto' to fit to the button width.\n */\n gridLayout?: ReadonlyArray<AttributeEditorProps.GridLayout>;\n\n /**\n * Specifies a custom action trigger for each row, in place of the remove button.\n * Only button and button dropdown components are supported.\n * If you provide this, `removeButtonText`, `removeButtonAriaLabel`,\n * and `onRemoveButtonClick` will be ignored.\n * The trigger must be given the provided `ref` in order for `focusRemoveButton`\n * to work.\n * The function receives the following properties:\n * - `item`: The item being rendered in the current row.\n * - `itemIndex` (`number`): The index of the item.\n * - `ref` (`ReactRef`): A React ref that should be passed to the rendered button.\n * - `breakpoint` (`Breakpoint`): The current breakpoint, for responsive behavior.\n * - `ownRow` (`boolean`): Whether the button is rendered on its own row.\n */\n customRowActions?: (props: AttributeEditorProps.RowActionsProps<T>) => React.ReactNode;\n\n /**\n * Called when add button is clicked.\n */\n onAddButtonClick?: NonCancelableEventHandler;\n\n /**\n * Called when remove button is clicked.\n * The event `detail` contains the index of the corresponding item.\n */\n onRemoveButtonClick?: NonCancelableEventHandler<AttributeEditorProps.RemoveButtonClickDetail>;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n */\n i18nStrings?: AttributeEditorProps.I18nStrings<T>;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/attribute-editor/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 { ButtonDropdownProps } from '../button-dropdown/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { Breakpoint as InternalBreakpoint } from '../internal/breakpoints';\nimport { NonCancelableEventHandler } from '../internal/events';\n\n/*\n * HACK: Cast the component to a named parametrized interface.\n *\n * This lets us use React.forwardRef and still let the component have type\n * parameters, and the naming convention lets the documenter know that this is\n * a forwardRef-wrapped component.\n *\n * We don't need to expose this type to customers because it's just a simple\n * function type.\n */\nexport interface AttributeEditorForwardRefType {\n <T>(props: AttributeEditorProps<T> & { ref?: React.Ref<AttributeEditorProps.Ref> }): JSX.Element;\n}\n\nexport namespace AttributeEditorProps {\n export interface IsItemRemovableFunction<T> {\n (item: T): boolean;\n }\n\n export type FieldRenderable<T> = (item: T, itemIndex: number) => React.ReactNode;\n export interface FieldDefinition<T> {\n label?: React.ReactNode;\n description?: React.ReactNode;\n info?: React.ReactNode;\n control?: FieldRenderable<T> | React.ReactNode;\n errorText?: FieldRenderable<T> | React.ReactNode;\n warningText?: FieldRenderable<T> | React.ReactNode;\n constraintText?: FieldRenderable<T> | React.ReactNode;\n }\n\n export type AddButtonVariant = 'normal' | 'inline-link';\n\n export interface RemoveButtonClickDetail {\n itemIndex: number;\n }\n\n export interface Ref {\n /**\n * Focuses the 'remove' button for the given row index.\n */\n focusRemoveButton(itemIndex: number): void;\n /**\n * Focuses the 'add' button. Use this, for example, after a user removes the last row.\n */\n focusAddButton(): void;\n }\n\n export interface RowActionsProps<T> {\n item: T;\n itemIndex: number;\n ref: React.Ref<ButtonDropdownProps.Ref>;\n breakpoint: Breakpoint | null;\n ownRow: boolean;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n export interface I18nStrings<T = any> {\n errorIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n itemRemovedAriaLive?: string;\n\n /**\n * @deprecated Use `removeButtonAriaLabel` on the component instead.\n */\n removeButtonAriaLabel?: (item: T) => string;\n }\n\n export type Breakpoint = InternalBreakpoint;\n\n export interface GridLayout {\n breakpoint?: Breakpoint;\n rows: ReadonlyArray<ReadonlyArray<number>>;\n removeButton?: {\n ownRow?: boolean;\n width?: number | 'auto';\n };\n }\n}\n\nexport interface AttributeEditorProps<T> extends BaseComponentProps {\n /**\n * Displayed when there are no items to display.\n */\n empty?: React.ReactNode;\n\n /**\n * Displayed below the add button. Use it for additional information related to the attribute editor.\n */\n additionalInfo?: React.ReactNode;\n\n /**\n * Specifies the text that's displayed in the add button.\n */\n addButtonText: string;\n\n /**\n * Specifies the text that's displayed in the remove button.\n * @i18n\n */\n removeButtonText?: string;\n\n /**\n * Adds an `aria-label` to the remove button.\n */\n removeButtonAriaLabel?: (item: T) => string;\n\n /**\n * Specifies the items that serve as the data source for all rows.\n * The display of a row is handled by the `definition` property.\n */\n items?: ReadonlyArray<T>;\n\n /**\n * Function that determines whether an item is removable. When this function returns `false`, the remove\n * button is not rendered and the user can't remove the item.\n * By default, all items are removable.\n */\n isItemRemovable?: AttributeEditorProps.IsItemRemovableFunction<T>;\n\n /**\n * Determines whether the add button is disabled.\n */\n disableAddButton?: boolean;\n\n /**\n * Specifies the variant to use for the add button. By default a normal button is used.\n * Use `inline-link` when using an attribute editor nested inside complex attribute editing\n * with expandable sections.\n */\n addButtonVariant?: AttributeEditorProps.AddButtonVariant;\n\n /**\n * Defines the editor configuration. Each object in the array represents one form field in the row.\n * If more than 6 attributes are specified, a `gridLayout` must be provided.\n *\n * * `label` (ReactNode) - Text label for the form field.\n * * `description` (ReactNode) - Additional description for the form field.\n * * `info` (ReactNode) - Info link for the form field.\n * * `errorText` ((item, itemIndex) => ReactNode) - Error message text to display as a control validation message.\n * It renders the form field as invalid if the returned value is not `null` or `undefined`.\n * * `warningText` ((item, itemIndex) => ReactNode) - Warning message text to display as a control validation message.\n * It renders the form field in a warning state if the returned value is not `null` or `undefined`.\n * * `constraintText` ((item, itemIndex) => ReactNode) - Text to display as a constraint message below the field.\n * * `control` ((item, itemIndex) => ReactNode) - A control to use as the input for the field.\n */\n definition: ReadonlyArray<AttributeEditorProps.FieldDefinition<T>>;\n\n /**\n * Optionally specifies the layout of the attributes. By default, all attributes will be\n * equally spaced and wrapped into multiple rows on smaller viewports.\n *\n * A `gridLayout` is an array of breakpoint definitions. Each definition consists of:\n * - `rows` (`number[][]`): the rows in which to display the attributes. Each row consists of a list of numbers indicating\n * the relative width of each attribute. For example, `[[1, 1, 1, 1]]` is a single row of four evenly-spaced attributes,\n * or `[[1, 2], [1, 1, 1]]` splits five attributes onto two rows.\n * - `breakpoint` (`string`): optionally specifies that the given entry should only be used when at least that much width is available.\n * - `removeButton`: optionally configures the remove (or row action) button placement. If this is not provided, the button will be\n * placed at the end of a single row, or below if multiple rows are present. The `removeButton` property supports contains two properties:\n * - `ownRow` (`boolean`): forces the remove button onto its own row.\n * - `width` (`number | 'auto'`): a number indicating the relative width (equivalent to a `rows` entry), or 'auto' to fit to the button width.\n */\n gridLayout?: ReadonlyArray<AttributeEditorProps.GridLayout>;\n\n /**\n * Specifies a custom action trigger for each row, in place of the remove button.\n * Only button and button dropdown components are supported.\n * If you provide this, `removeButtonText`, `removeButtonAriaLabel`,\n * and `onRemoveButtonClick` will be ignored.\n * The trigger must be given the provided `ref` in order for `focusRemoveButton`\n * to work.\n * The function receives the following properties:\n * - `item`: The item being rendered in the current row.\n * - `itemIndex` (`number`): The index of the item.\n * - `ref` (`ReactRef`): A React ref that should be passed to the rendered button.\n * - `breakpoint` (`Breakpoint`): The current breakpoint, for responsive behavior.\n * - `ownRow` (`boolean`): Whether the button is rendered on its own row.\n */\n customRowActions?: (props: AttributeEditorProps.RowActionsProps<T>) => React.ReactNode;\n\n /**\n * Called when add button is clicked.\n */\n onAddButtonClick?: NonCancelableEventHandler;\n\n /**\n * Called when remove button is clicked.\n * The event `detail` contains the index of the corresponding item.\n */\n onRemoveButtonClick?: NonCancelableEventHandler<AttributeEditorProps.RemoveButtonClickDetail>;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n */\n i18nStrings?: AttributeEditorProps.I18nStrings<T>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../src/attribute-editor/row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAK3C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAInD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAA0B,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAKpD,UAAU,QAAQ,CAAC,CAAC;IAClB,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,oBAAoB,CAAC,UAAU,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC;IACR,UAAU,EAAE,aAAa,CAAC,oBAAoB,CAAC,eAAe,CAAC,C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AAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC;IACrD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IACvF,mBAAmB,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,CAAC;IAC9F,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;CAC7C;AAiBD,eAAO,MAAM,GAAG,6BAgGgB,WAAW,CAAC"}
@@ -39,9 +39,9 @@ export const Row = React.memo(({ breakpoint, item, definition, layout, i18nStrin
39
39
  ownRow: !removeButtonOnSameLine,
40
40
  });
41
41
  return (React.createElement("div", { className: clsx(styles.row, layout.rows.length === 1 && styles['single-row']), role: "group", "aria-labelledby": `${firstControlId}-label ${firstControlId}` },
42
- definition.map(({ info, label, constraintText, errorText, warningText, control }, defIndex) => {
42
+ definition.map(({ info, label, description, constraintText, errorText, warningText, control }, defIndex) => {
43
43
  ({ gridColumnStart, gridColumnEnd } = getItemGridColumns(layout, defIndex));
44
- return (React.createElement(InternalFormField, { key: defIndex, className: styles.field, __style: { gridColumnStart, gridColumnEnd }, label: label, info: info, constraintText: render(item, index, constraintText), errorText: render(item, index, errorText), warningText: render(item, index, warningText), stretch: true, i18nStrings: {
44
+ return (React.createElement(InternalFormField, { key: defIndex, className: styles.field, __style: { gridColumnStart, gridColumnEnd }, label: label, description: description, info: info, constraintText: render(item, index, constraintText), errorText: render(item, index, errorText), warningText: render(item, index, warningText), stretch: true, i18nStrings: {
45
45
  errorIconAriaLabel: i18nStrings.errorIconAriaLabel,
46
46
  warningIconAriaLabel: i18nStrings.warningIconAriaLabel,
47
47
  }, __hideLabel: index !== 0 && removeButtonOnSameLine, controlId: defIndex === 0 ? firstControlId : undefined }, render(item, index, control)));
@@ -1 +1 @@
1
- {"version":3,"file":"row.js","sourceRoot":"","sources":["../../../src/attribute-editor/row.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAG5E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,sBAAsB,EAA6B,MAAM,oBAAoB,CAAC;AAEvF,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnG,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAiBrC,SAAS,MAAM,CACb,IAAO,EACP,SAAiB,EACjB,IAA2E;IAE3E,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE;QACxB,OAAO,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;KAC9B;IACD,OAAO,IAAI,CAAC;IAEZ,SAAS,cAAc,CAAC,IAAa;QACnC,OAAO,OAAO,IAAI,KAAK,UAAU,CAAC;IACpC,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAC3B,CAAK,EACH,UAAU,EACV,IAAI,EACJ,UAAU,EACV,MAAM,EACN,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,GACT,EAAE,EAAE;;IAChB,MAAM,IAAI,GAAG,eAAe,CAAC,kBAAkB,CAAC,CAAC;IAEjD,MAAM,iBAAiB,GAAG,WAAW,CAAC,GAAG,EAAE;QACzC,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,IAAI,CAAC,EAC/E,OAAO,EAAE,iBAAiB,IAEzB,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAC5B,CAClB,CAAC,CACA;QACL,CAAC,sBAAsB,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,GAAI,CAC1D,CACP,CAAC;AACJ,CAAC,CACwC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback } from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton } from '../button/internal';\nimport InternalFormField from '../form-field/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { Breakpoint } from '../internal/breakpoints';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { AttributeEditorProps } from './interfaces';\nimport { getItemGridColumns, getRemoveButtonGridColumns, isRemoveButtonOnSameLine } from './utils';\n\nimport styles from './styles.css.js';\n\ninterface RowProps<T> {\n breakpoint: Breakpoint | null;\n layout: AttributeEditorProps.GridLayout;\n item: T;\n definition: ReadonlyArray<AttributeEditorProps.FieldDefinition<T>>;\n i18nStrings: AttributeEditorProps.I18nStrings | undefined;\n index: number;\n removable: boolean;\n removeButtonText?: string;\n removeButtonRefs: Array<ButtonProps.Ref | undefined>;\n customRowActions?: (props: AttributeEditorProps.RowActionsProps<T>) => React.ReactNode;\n onRemoveButtonClick?: NonCancelableEventHandler<AttributeEditorProps.RemoveButtonClickDetail>;\n removeButtonAriaLabel?: (item: T) => string;\n}\n\nfunction render<T>(\n item: T,\n itemIndex: number,\n slot: AttributeEditorProps.FieldRenderable<T> | React.ReactNode | undefined\n) {\n if (isSlotFunction(slot)) {\n return slot(item, itemIndex);\n }\n return slot;\n\n function isSlotFunction(slot: unknown): slot is AttributeEditorProps.FieldRenderable<T> {\n return typeof slot === 'function';\n }\n}\n\nexport const Row = React.memo(\n <T,>({\n breakpoint,\n item,\n definition,\n layout,\n i18nStrings = {},\n index,\n removable,\n removeButtonText,\n removeButtonRefs,\n customRowActions,\n onRemoveButtonClick,\n removeButtonAriaLabel,\n }: RowProps<T>) => {\n const i18n = useInternalI18n('attribute-editor');\n\n const handleRemoveClick = useCallback(() => {\n fireNonCancelableEvent(onRemoveButtonClick, { itemIndex: index });\n }, [onRemoveButtonClick, index]);\n\n const firstControlId = useUniqueId('first-control-id-');\n\n const buttonRef = (ref: ButtonProps.Ref | null) => {\n removeButtonRefs[index] = ref ?? undefined;\n };\n\n let gridColumnStart = 1;\n let gridColumnEnd = 1;\n const removeButtonOnSameLine = isRemoveButtonOnSameLine(layout);\n\n const customActions = customRowActions?.({\n item,\n itemIndex: index,\n ref: buttonRef,\n breakpoint,\n ownRow: !removeButtonOnSameLine,\n });\n\n return (\n <div\n className={clsx(styles.row, layout.rows.length === 1 && styles['single-row'])}\n role=\"group\"\n aria-labelledby={`${firstControlId}-label ${firstControlId}`}\n >\n {definition.map(({ info, label, constraintText, errorText, warningText, control }, defIndex) => {\n ({ gridColumnStart, gridColumnEnd } = getItemGridColumns(layout, defIndex));\n return (\n <InternalFormField\n key={defIndex}\n className={styles.field}\n __style={{ gridColumnStart, gridColumnEnd }}\n label={label}\n info={info}\n constraintText={render(item, index, constraintText)}\n errorText={render(item, index, errorText)}\n warningText={render(item, index, warningText)}\n stretch={true}\n i18nStrings={{\n errorIconAriaLabel: i18nStrings.errorIconAriaLabel,\n warningIconAriaLabel: i18nStrings.warningIconAriaLabel,\n }}\n __hideLabel={index !== 0 && removeButtonOnSameLine}\n controlId={defIndex === 0 ? firstControlId : undefined}\n >\n {render(item, index, control)}\n </InternalFormField>\n );\n })}\n <div\n className={clsx(styles['remove-button-container'], {\n [styles['remove-button-field-padding']]: removeButtonOnSameLine && index === 0,\n [styles['remove-button-own-row']]: !removeButtonOnSameLine,\n })}\n style={{ ...getRemoveButtonGridColumns(layout, gridColumnEnd) }}\n >\n {removable &&\n (customActions !== undefined ? (\n customActions\n ) : (\n <InternalButton\n className={styles['remove-button']}\n formAction=\"none\"\n ref={buttonRef}\n ariaLabel={(removeButtonAriaLabel ?? i18nStrings.removeButtonAriaLabel)?.(item)}\n onClick={handleRemoveClick}\n >\n {i18n('removeButtonText', removeButtonText)}\n </InternalButton>\n ))}\n </div>\n {!removeButtonOnSameLine && <div className={styles.divider} />}\n </div>\n );\n }\n) as <T>(props: RowProps<T>) => JSX.Element;\n"]}
1
+ {"version":3,"file":"row.js","sourceRoot":"","sources":["../../../src/attribute-editor/row.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAG5E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,sBAAsB,EAA6B,MAAM,oBAAoB,CAAC;AAEvF,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnG,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAiBrC,SAAS,MAAM,CACb,IAAO,EACP,SAAiB,EACjB,IAA2E;IAE3E,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE;QACxB,OAAO,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;KAC9B;IACD,OAAO,IAAI,CAAC;IAEZ,SAAS,cAAc,CAAC,IAAa;QACnC,OAAO,OAAO,IAAI,KAAK,UAAU,CAAC;IACpC,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAC3B,CAAK,EACH,U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AE,aAAa,CAAC,KAE5D,SAAS;YACR,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,CAC7B,aAAa,CACd,CAAC,CAAC,CAAC,CACF,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,EAClC,UAAU,EAAC,MAAM,EACjB,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,MAAA,CAAC,qBAAqB,aAArB,qBAAqB,cAArB,qBAAqB,GAAI,WAAW,CAAC,qBAAqB,CAAC,0CAAG,IAAI,CAAC,EAC/E,OAAO,EAAE,iBAAiB,IAEzB,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAC5B,CAClB,CAAC,CACA;QACL,CAAC,sBAAsB,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,GAAI,CAC1D,CACP,CAAC;AACJ,CAAC,CACwC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback } from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton } from '../button/internal';\nimport InternalFormField from '../form-field/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { Breakpoint } from '../internal/breakpoints';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { AttributeEditorProps } from './interfaces';\nimport { getItemGridColumns, getRemoveButtonGridColumns, isRemoveButtonOnSameLine } from './utils';\n\nimport styles from './styles.css.js';\n\ninterface RowProps<T> {\n breakpoint: Breakpoint | null;\n layout: AttributeEditorProps.GridLayout;\n item: T;\n definition: ReadonlyArray<AttributeEditorProps.FieldDefinition<T>>;\n i18nStrings: AttributeEditorProps.I18nStrings | undefined;\n index: number;\n removable: boolean;\n removeButtonText?: string;\n removeButtonRefs: Array<ButtonProps.Ref | undefined>;\n customRowActions?: (props: AttributeEditorProps.RowActionsProps<T>) => React.ReactNode;\n onRemoveButtonClick?: NonCancelableEventHandler<AttributeEditorProps.RemoveButtonClickDetail>;\n removeButtonAriaLabel?: (item: T) => string;\n}\n\nfunction render<T>(\n item: T,\n itemIndex: number,\n slot: AttributeEditorProps.FieldRenderable<T> | React.ReactNode | undefined\n) {\n if (isSlotFunction(slot)) {\n return slot(item, itemIndex);\n }\n return slot;\n\n function isSlotFunction(slot: unknown): slot is AttributeEditorProps.FieldRenderable<T> {\n return typeof slot === 'function';\n }\n}\n\nexport const Row = React.memo(\n <T,>({\n breakpoint,\n item,\n definition,\n layout,\n i18nStrings = {},\n index,\n removable,\n removeButtonText,\n removeButtonRefs,\n customRowActions,\n onRemoveButtonClick,\n removeButtonAriaLabel,\n }: RowProps<T>) => {\n const i18n = useInternalI18n('attribute-editor');\n\n const handleRemoveClick = useCallback(() => {\n fireNonCancelableEvent(onRemoveButtonClick, { itemIndex: index });\n }, [onRemoveButtonClick, index]);\n\n const firstControlId = useUniqueId('first-control-id-');\n\n const buttonRef = (ref: ButtonProps.Ref | null) => {\n removeButtonRefs[index] = ref ?? undefined;\n };\n\n let gridColumnStart = 1;\n let gridColumnEnd = 1;\n const removeButtonOnSameLine = isRemoveButtonOnSameLine(layout);\n\n const customActions = customRowActions?.({\n item,\n itemIndex: index,\n ref: buttonRef,\n breakpoint,\n ownRow: !removeButtonOnSameLine,\n });\n\n return (\n <div\n className={clsx(styles.row, layout.rows.length === 1 && styles['single-row'])}\n role=\"group\"\n aria-labelledby={`${firstControlId}-label ${firstControlId}`}\n >\n {definition.map(({ info, label, description, constraintText, errorText, warningText, control }, defIndex) => {\n ({ gridColumnStart, gridColumnEnd } = getItemGridColumns(layout, defIndex));\n return (\n <InternalFormField\n key={defIndex}\n className={styles.field}\n __style={{ gridColumnStart, gridColumnEnd }}\n label={label}\n description={description}\n info={info}\n constraintText={render(item, index, constraintText)}\n errorText={render(item, index, errorText)}\n warningText={render(item, index, warningText)}\n stretch={true}\n i18nStrings={{\n errorIconAriaLabel: i18nStrings.errorIconAriaLabel,\n warningIconAriaLabel: i18nStrings.warningIconAriaLabel,\n }}\n __hideLabel={index !== 0 && removeButtonOnSameLine}\n controlId={defIndex === 0 ? firstControlId : undefined}\n >\n {render(item, index, control)}\n </InternalFormField>\n );\n })}\n <div\n className={clsx(styles['remove-button-container'], {\n [styles['remove-button-field-padding']]: removeButtonOnSameLine && index === 0,\n [styles['remove-button-own-row']]: !removeButtonOnSameLine,\n })}\n style={{ ...getRemoveButtonGridColumns(layout, gridColumnEnd) }}\n >\n {removable &&\n (customActions !== undefined ? (\n customActions\n ) : (\n <InternalButton\n className={styles['remove-button']}\n formAction=\"none\"\n ref={buttonRef}\n ariaLabel={(removeButtonAriaLabel ?? i18nStrings.removeButtonAriaLabel)?.(item)}\n onClick={handleRemoveClick}\n >\n {i18n('removeButtonText', removeButtonText)}\n </InternalButton>\n ))}\n </div>\n {!removeButtonOnSameLine && <div className={styles.divider} />}\n </div>\n );\n }\n) as <T>(props: RowProps<T>) => JSX.Element;\n"]}
@@ -1,20 +1,20 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "empty-appear": "awsui_empty-appear_n4qlp_1d9g0_153",
5
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_n4qlp_1d9g0_1",
6
- "root": "awsui_root_n4qlp_1d9g0_175",
7
- "empty": "awsui_empty_n4qlp_1d9g0_153",
8
- "row": "awsui_row_n4qlp_1d9g0_218",
9
- "divider": "awsui_divider_n4qlp_1d9g0_222",
10
- "row-control": "awsui_row-control_n4qlp_1d9g0_227",
11
- "field": "awsui_field_n4qlp_1d9g0_231",
12
- "additional-info": "awsui_additional-info_n4qlp_1d9g0_235",
13
- "add-row": "awsui_add-row_n4qlp_1d9g0_281",
14
- "add-button": "awsui_add-button_n4qlp_1d9g0_285",
15
- "remove-button-container": "awsui_remove-button-container_n4qlp_1d9g0_289",
16
- "remove-button-field-padding": "awsui_remove-button-field-padding_n4qlp_1d9g0_293",
17
- "remove-button-own-row": "awsui_remove-button-own-row_n4qlp_1d9g0_297",
18
- "remove-button": "awsui_remove-button_n4qlp_1d9g0_289"
4
+ "empty-appear": "awsui_empty-appear_n4qlp_y1lq6_153",
5
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_n4qlp_y1lq6_1",
6
+ "root": "awsui_root_n4qlp_y1lq6_175",
7
+ "empty": "awsui_empty_n4qlp_y1lq6_153",
8
+ "row": "awsui_row_n4qlp_y1lq6_218",
9
+ "divider": "awsui_divider_n4qlp_y1lq6_222",
10
+ "row-control": "awsui_row-control_n4qlp_y1lq6_227",
11
+ "field": "awsui_field_n4qlp_y1lq6_231",
12
+ "additional-info": "awsui_additional-info_n4qlp_y1lq6_235",
13
+ "add-row": "awsui_add-row_n4qlp_y1lq6_281",
14
+ "add-button": "awsui_add-button_n4qlp_y1lq6_285",
15
+ "remove-button-container": "awsui_remove-button-container_n4qlp_y1lq6_289",
16
+ "remove-button-field-padding": "awsui_remove-button-field-padding_n4qlp_y1lq6_293",
17
+ "remove-button-own-row": "awsui_remove-button-own-row_n4qlp_y1lq6_297",
18
+ "remove-button": "awsui_remove-button_n4qlp_y1lq6_289"
19
19
  };
20
20
 
@@ -150,10 +150,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
150
150
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
151
151
  SPDX-License-Identifier: Apache-2.0
152
152
  */
153
- .awsui_empty-appear_n4qlp_1d9g0_153:not(#\9) {
154
- animation: awsui_awsui-motion-fade-in_n4qlp_1d9g0_1 var(--motion-duration-transition-show-paced-t8d1os, 180ms) var(--motion-easing-transition-show-paced-x2k7uh, ease-out);
153
+ .awsui_empty-appear_n4qlp_y1lq6_153:not(#\9) {
154
+ animation: awsui_awsui-motion-fade-in_n4qlp_y1lq6_1 var(--motion-duration-transition-show-paced-t8d1os, 180ms) var(--motion-easing-transition-show-paced-x2k7uh, ease-out);
155
155
  }
156
- @keyframes awsui_awsui-motion-fade-in_n4qlp_1d9g0_1 {
156
+ @keyframes awsui_awsui-motion-fade-in_n4qlp_y1lq6_1 {
157
157
  from {
158
158
  opacity: 0.2;
159
159
  }
@@ -162,17 +162,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
162
162
  }
163
163
  }
164
164
  @media (prefers-reduced-motion: reduce) {
165
- .awsui_empty-appear_n4qlp_1d9g0_153:not(#\9) {
165
+ .awsui_empty-appear_n4qlp_y1lq6_153:not(#\9) {
166
166
  animation: none;
167
167
  transition: none;
168
168
  }
169
169
  }
170
- .awsui-motion-disabled .awsui_empty-appear_n4qlp_1d9g0_153:not(#\9), .awsui-mode-entering .awsui_empty-appear_n4qlp_1d9g0_153:not(#\9) {
170
+ .awsui-motion-disabled .awsui_empty-appear_n4qlp_y1lq6_153:not(#\9), .awsui-mode-entering .awsui_empty-appear_n4qlp_y1lq6_153:not(#\9) {
171
171
  animation: none;
172
172
  transition: none;
173
173
  }
174
174
 
175
- .awsui_root_n4qlp_1d9g0_175:not(#\9) {
175
+ .awsui_root_n4qlp_y1lq6_175:not(#\9) {
176
176
  border-collapse: separate;
177
177
  border-spacing: 0;
178
178
  box-sizing: border-box;
@@ -208,31 +208,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
208
208
  align-items: start;
209
209
  }
210
210
 
211
- .awsui_empty_n4qlp_1d9g0_153:not(#\9) {
211
+ .awsui_empty_n4qlp_y1lq6_153:not(#\9) {
212
212
  font-size: var(--font-size-body-m-a7nh2n, 14px);
213
213
  line-height: var(--line-height-body-m-2mh3ke, 20px);
214
214
  color: var(--color-text-empty-tlohug, #656871);
215
215
  grid-column: 1/-1;
216
216
  }
217
217
 
218
- .awsui_row_n4qlp_1d9g0_218:not(#\9) {
218
+ .awsui_row_n4qlp_y1lq6_218:not(#\9) {
219
219
  display: contents;
220
220
  }
221
221
 
222
- .awsui_divider_n4qlp_1d9g0_222:not(#\9) {
222
+ .awsui_divider_n4qlp_y1lq6_222:not(#\9) {
223
223
  grid-column: 1/-1;
224
224
  border-block-start: var(--border-divider-section-width-uwo8my, 1px) solid var(--color-border-divider-default-nr68jt, #c6c6cd);
225
225
  }
226
226
 
227
- .awsui_row-control_n4qlp_1d9g0_227:not(#\9) {
227
+ .awsui_row-control_n4qlp_y1lq6_227:not(#\9) {
228
228
  /* used in test-utils */
229
229
  }
230
230
 
231
- .awsui_field_n4qlp_1d9g0_231:not(#\9) {
231
+ .awsui_field_n4qlp_y1lq6_231:not(#\9) {
232
232
  /* used in test-utils */
233
233
  }
234
234
 
235
- .awsui_additional-info_n4qlp_1d9g0_235:not(#\9) {
235
+ .awsui_additional-info_n4qlp_y1lq6_235:not(#\9) {
236
236
  color: var(--color-text-form-secondary-1nm780, #656871);
237
237
  font-size: var(--font-size-body-s-smc8cv, 12px);
238
238
  line-height: var(--line-height-body-s-nu5hx1, 16px);
@@ -242,10 +242,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
242
242
  margin-block-start: var(--space-xxs-hwfkai, 4px);
243
243
  /* stylelint-disable-next-line selector-max-type */
244
244
  }
245
- .awsui_additional-info_n4qlp_1d9g0_235 > a:not(#\9) {
245
+ .awsui_additional-info_n4qlp_y1lq6_235 > a:not(#\9) {
246
246
  text-underline-offset: 0.3em;
247
247
  text-decoration-thickness: 1px;
248
- color: var(--awsui-style-color-default-vl73au, var(--color-text-link-default-1dmm7z, #006ce0));
248
+ color: var(--awsui-style-color-default-b75yp7, var(--color-text-link-default-1dmm7z, #006ce0));
249
249
  font-weight: inherit;
250
250
  letter-spacing: normal;
251
251
  text-decoration-line: underline;
@@ -256,50 +256,50 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
256
256
  transition-duration: var(--motion-duration-refresh-only-medium-5rbn3k, 165ms);
257
257
  }
258
258
  @media (prefers-reduced-motion: reduce) {
259
- .awsui_additional-info_n4qlp_1d9g0_235 > a:not(#\9) {
259
+ .awsui_additional-info_n4qlp_y1lq6_235 > a:not(#\9) {
260
260
  animation: none;
261
261
  transition: none;
262
262
  }
263
263
  }
264
- .awsui-motion-disabled .awsui_additional-info_n4qlp_1d9g0_235 > a:not(#\9), .awsui-mode-entering .awsui_additional-info_n4qlp_1d9g0_235 > a:not(#\9) {
264
+ .awsui-motion-disabled .awsui_additional-info_n4qlp_y1lq6_235 > a:not(#\9), .awsui-mode-entering .awsui_additional-info_n4qlp_y1lq6_235 > a:not(#\9) {
265
265
  animation: none;
266
266
  transition: none;
267
267
  }
268
- .awsui_additional-info_n4qlp_1d9g0_235 > a:not(#\9):hover {
268
+ .awsui_additional-info_n4qlp_y1lq6_235 > a:not(#\9):hover {
269
269
  cursor: pointer;
270
- color: var(--awsui-style-color-hover-vl73au, var(--color-text-link-hover-sq1gxg, #002b66));
270
+ color: var(--awsui-style-color-hover-b75yp7, var(--color-text-link-hover-sq1gxg, #002b66));
271
271
  }
272
- .awsui_additional-info_n4qlp_1d9g0_235 > a:not(#\9):focus {
272
+ .awsui_additional-info_n4qlp_y1lq6_235 > a:not(#\9):focus {
273
273
  outline: none;
274
274
  }
275
- .awsui_additional-info_n4qlp_1d9g0_235 > a:not(#\9):active {
276
- color: var(--awsui-style-color-active-vl73au, var(--color-text-link-hover-sq1gxg, #002b66));
275
+ .awsui_additional-info_n4qlp_y1lq6_235 > a:not(#\9):active {
276
+ color: var(--awsui-style-color-active-b75yp7, var(--color-text-link-hover-sq1gxg, #002b66));
277
277
  }
278
- .awsui_additional-info_n4qlp_1d9g0_235 > a:not(#\9):active, .awsui_additional-info_n4qlp_1d9g0_235 > a:not(#\9):focus, .awsui_additional-info_n4qlp_1d9g0_235 > a:not(#\9):hover {
278
+ .awsui_additional-info_n4qlp_y1lq6_235 > a:not(#\9):active, .awsui_additional-info_n4qlp_y1lq6_235 > a:not(#\9):focus, .awsui_additional-info_n4qlp_y1lq6_235 > a:not(#\9):hover {
279
279
  text-decoration-line: underline;
280
280
  text-decoration-color: currentColor;
281
281
  }
282
282
 
283
- .awsui_add-row_n4qlp_1d9g0_281:not(#\9) {
283
+ .awsui_add-row_n4qlp_y1lq6_281:not(#\9) {
284
284
  grid-column: 1/-1;
285
285
  }
286
286
 
287
- .awsui_add-button_n4qlp_1d9g0_285:not(#\9) {
287
+ .awsui_add-button_n4qlp_y1lq6_285:not(#\9) {
288
288
  /* used in test-utils */
289
289
  }
290
290
 
291
- .awsui_remove-button-container_n4qlp_1d9g0_289:not(#\9) {
291
+ .awsui_remove-button-container_n4qlp_y1lq6_289:not(#\9) {
292
292
  display: inline-block;
293
293
  }
294
294
 
295
- .awsui_remove-button-field-padding_n4qlp_1d9g0_293:not(#\9) {
295
+ .awsui_remove-button-field-padding_n4qlp_y1lq6_293:not(#\9) {
296
296
  padding-block-start: calc(var(--space-xxs-hwfkai, 4px) + var(--line-height-body-m-2mh3ke, 20px));
297
297
  }
298
298
 
299
- .awsui_remove-button-own-row_n4qlp_1d9g0_297:not(#\9) {
299
+ .awsui_remove-button-own-row_n4qlp_y1lq6_297:not(#\9) {
300
300
  justify-self: end;
301
301
  }
302
302
 
303
- .awsui_remove-button_n4qlp_1d9g0_289:not(#\9) {
303
+ .awsui_remove-button_n4qlp_y1lq6_289:not(#\9) {
304
304
  /* used in test-utils */
305
305
  }
@@ -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
- "empty-appear": "awsui_empty-appear_n4qlp_1d9g0_153",
6
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_n4qlp_1d9g0_1",
7
- "root": "awsui_root_n4qlp_1d9g0_175",
8
- "empty": "awsui_empty_n4qlp_1d9g0_153",
9
- "row": "awsui_row_n4qlp_1d9g0_218",
10
- "divider": "awsui_divider_n4qlp_1d9g0_222",
11
- "row-control": "awsui_row-control_n4qlp_1d9g0_227",
12
- "field": "awsui_field_n4qlp_1d9g0_231",
13
- "additional-info": "awsui_additional-info_n4qlp_1d9g0_235",
14
- "add-row": "awsui_add-row_n4qlp_1d9g0_281",
15
- "add-button": "awsui_add-button_n4qlp_1d9g0_285",
16
- "remove-button-container": "awsui_remove-button-container_n4qlp_1d9g0_289",
17
- "remove-button-field-padding": "awsui_remove-button-field-padding_n4qlp_1d9g0_293",
18
- "remove-button-own-row": "awsui_remove-button-own-row_n4qlp_1d9g0_297",
19
- "remove-button": "awsui_remove-button_n4qlp_1d9g0_289"
5
+ "empty-appear": "awsui_empty-appear_n4qlp_y1lq6_153",
6
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_n4qlp_y1lq6_1",
7
+ "root": "awsui_root_n4qlp_y1lq6_175",
8
+ "empty": "awsui_empty_n4qlp_y1lq6_153",
9
+ "row": "awsui_row_n4qlp_y1lq6_218",
10
+ "divider": "awsui_divider_n4qlp_y1lq6_222",
11
+ "row-control": "awsui_row-control_n4qlp_y1lq6_227",
12
+ "field": "awsui_field_n4qlp_y1lq6_231",
13
+ "additional-info": "awsui_additional-info_n4qlp_y1lq6_235",
14
+ "add-row": "awsui_add-row_n4qlp_y1lq6_281",
15
+ "add-button": "awsui_add-button_n4qlp_y1lq6_285",
16
+ "remove-button-container": "awsui_remove-button-container_n4qlp_y1lq6_289",
17
+ "remove-button-field-padding": "awsui_remove-button-field-padding_n4qlp_y1lq6_293",
18
+ "remove-button-own-row": "awsui_remove-button-own-row_n4qlp_y1lq6_297",
19
+ "remove-button": "awsui_remove-button_n4qlp_y1lq6_289"
20
20
  };
21
21
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,QAAA,MAAM,WAAW,+FAsChB,CAAC;AAGF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,QAAA,MAAM,WAAW,+FA8ChB,CAAC;AAGF,eAAe,WAAW,CAAC"}
@@ -63,6 +63,10 @@ export interface AutosuggestProps extends BaseComponentProps, BaseInputProps, In
63
63
  * @i18n
64
64
  */
65
65
  enteredTextLabel?: AutosuggestProps.EnteredTextLabel;
66
+ /**
67
+ * Defines whether entered text option is shown as the first option in the dropdown when value is non-empty.
68
+ */
69
+ hideEnteredTextOption?: boolean;
66
70
  /**
67
71
  * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.
68
72
  *
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACpH,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,gBACf,SAAQ,kBAAkB,EACxB,cAAc,EACd,gBAAgB,EAChB,qBAAqB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,UAAU,CAAC;IACxD,UAAiB,YAAY;QAC3B,KAAK,EAAE,MAAM,CAAC;QACd,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB;IAED,UAAiB,8BAA8B;QAC7C,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;KAC/C;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;QAEd;;WAEG;QACH,MAAM,IAAI,IAAI,CAAC;KAChB;CACF;AAGD,MAAM,MAAM,eAAe,GAAG,CAAC,gBAAgB,CAAC,MAAM,GAAG,gBAAgB,CAAC,WAAW,CAAC,GAAG;IACvF,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,aAAa,CAAC;IAC1C,MAAM,EAAE,gBAAgB,GAAG,WAAW,CAAC;CACxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/autosuggest/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 { BaseInputProps, InputAutoCorrect, InputClearLabel, InputKeyEvents, InputProps } from '../input/interfaces';\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';\nimport { OptionDefinition, OptionGroup } from '../internal/components/option/interfaces';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface AutosuggestProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n BaseDropdownHostProps,\n InputKeyEvents,\n InputClearLabel,\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 * - `label` (string) - (Optional) Option text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option is disabled.\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.\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.\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 * #### OptionGroup\n * - `label` (string) - Option group text displayed to the user.\n * - `disabled` (boolean) - (Optional) Determines whether the option group is disabled.\n * - `options` (Option[]) - (Optional) The options under this group.\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?: AutosuggestProps.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 * Specifies a function that generates the custom value indicator (for example, `Use \"${value}\"`).\n * @i18n\n */\n enteredTextLabel?: AutosuggestProps.EnteredTextLabel;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n *\n * Note that the `matchesCount` includes the `enteredTextLabel` (\"Use ${value}\") item, so in most cases you\n * should subtract 1 from `matchesCount`. If using manual filtering, you should provide your own value for `totalCount`.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n\n /**\n * Specifies the text that's displayed when there aren't any suggestions to display.\n * This is displayed when `statusType` is set to `finished` or it's not set at all.\n */\n empty?: React.ReactNode;\n\n /**\n * Called whenever a user selects an option in the dropdown. Don't use this event as the only way to handle user input.\n * Instead, use `onSelect` in combination with the `onChange` handler only as an optional convenience for the user.\n */\n onSelect?: NonCancelableEventHandler<AutosuggestProps.SelectDetail>;\n\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/autosuggest/?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/autosuggest/?tabId=usage#accessibility-guidelines).\n */\n renderHighlightedAriaLive?: AutosuggestProps.ContainingOptionAndGroupString;\n}\n\nexport namespace AutosuggestProps {\n export type ChangeDetail = InputProps.ChangeDetail;\n export type KeyDetail = InputProps.KeyDetail;\n export type FilteringType = OptionsFilteringType;\n export type Option = OptionDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n export type EnteredTextLabel = (value: string) => string;\n export interface OptionGroup extends Option {\n label?: string;\n options: ReadonlyArray<Option>;\n }\n export type LoadItemsDetail = OptionsLoadItemsDetail;\n export type StatusType = DropdownStatusProps.StatusType;\n export interface SelectDetail {\n value: string;\n selectedOption?: Option;\n }\n\n export interface ContainingOptionAndGroupString {\n (option: Option, group?: OptionGroup): string;\n }\n\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n\n /**\n * Selects all text in the input control.\n */\n select(): void;\n }\n}\n\n// TODO: use DropdownOption type same as in select and multiselect\nexport type AutosuggestItem = (AutosuggestProps.Option | AutosuggestProps.OptionGroup) & {\n type?: 'parent' | 'child' | 'use-entered';\n option: OptionDefinition | OptionGroup;\n};\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/autosuggest/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 { BaseInputProps, InputAutoCorrect, InputClearLabel, InputKeyEvents, InputProps } from '../input/interfaces';\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';\nimport { OptionDefinition, OptionGroup } from '../internal/components/option/interfaces';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface AutosuggestProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n BaseDropdownHostProps,\n InputKeyEvents,\n InputClearLabel,\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 * - `label` (string) - (Optional) Option text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option is disabled.\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.\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.\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 * #### OptionGroup\n * - `label` (string) - Option group text displayed to the user.\n * - `disabled` (boolean) - (Optional) Determines whether the option group is disabled.\n * - `options` (Option[]) - (Optional) The options under this group.\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?: AutosuggestProps.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 * Specifies a function that generates the custom value indicator (for example, `Use \"${value}\"`).\n * @i18n\n */\n enteredTextLabel?: AutosuggestProps.EnteredTextLabel;\n\n /**\n * Defines whether entered text option is shown as the first option in the dropdown when value is non-empty.\n */\n hideEnteredTextOption?: boolean;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n *\n * Note that the `matchesCount` includes the `enteredTextLabel` (\"Use ${value}\") item, so in most cases you\n * should subtract 1 from `matchesCount`. If using manual filtering, you should provide your own value for `totalCount`.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n\n /**\n * Specifies the text that's displayed when there aren't any suggestions to display.\n * This is displayed when `statusType` is set to `finished` or it's not set at all.\n */\n empty?: React.ReactNode;\n\n /**\n * Called whenever a user selects an option in the dropdown. Don't use this event as the only way to handle user input.\n * Instead, use `onSelect` in combination with the `onChange` handler only as an optional convenience for the user.\n */\n onSelect?: NonCancelableEventHandler<AutosuggestProps.SelectDetail>;\n\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/autosuggest/?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/autosuggest/?tabId=usage#accessibility-guidelines).\n */\n renderHighlightedAriaLive?: AutosuggestProps.ContainingOptionAndGroupString;\n}\n\nexport namespace AutosuggestProps {\n export type ChangeDetail = InputProps.ChangeDetail;\n export type KeyDetail = InputProps.KeyDetail;\n export type FilteringType = OptionsFilteringType;\n export type Option = OptionDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n export type EnteredTextLabel = (value: string) => string;\n export interface OptionGroup extends Option {\n label?: string;\n options: ReadonlyArray<Option>;\n }\n export type LoadItemsDetail = OptionsLoadItemsDetail;\n export type StatusType = DropdownStatusProps.StatusType;\n export interface SelectDetail {\n value: string;\n selectedOption?: Option;\n }\n\n export interface ContainingOptionAndGroupString {\n (option: Option, group?: OptionGroup): string;\n }\n\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n\n /**\n * Selects all text in the input control.\n */\n select(): void;\n }\n}\n\n// TODO: use DropdownOption type same as in select and multiselect\nexport type AutosuggestItem = (AutosuggestProps.Option | AutosuggestProps.OptionGroup) & {\n type?: 'parent' | 'child' | 'use-entered';\n option: OptionDefinition | OptionGroup;\n};\n"]}