@cloudscape-design/components-themeable 3.0.559 → 3.0.561

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 (332) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/internal/styles/direction.scss +3 -3
  3. package/lib/internal/template/alert/styles.css.js +25 -25
  4. package/lib/internal/template/alert/styles.scoped.css +41 -41
  5. package/lib/internal/template/alert/styles.selectors.js +25 -25
  6. package/lib/internal/template/anchor-navigation/styles.css.js +8 -8
  7. package/lib/internal/template/anchor-navigation/styles.scoped.css +20 -20
  8. package/lib/internal/template/anchor-navigation/styles.selectors.js +8 -8
  9. package/lib/internal/template/annotation-context/annotation/styles.css.js +24 -24
  10. package/lib/internal/template/annotation-context/annotation/styles.scoped.css +31 -31
  11. package/lib/internal/template/annotation-context/annotation/styles.selectors.js +24 -24
  12. package/lib/internal/template/app-layout/content-wrapper/styles.css.js +3 -3
  13. package/lib/internal/template/app-layout/content-wrapper/styles.scoped.css +8 -8
  14. package/lib/internal/template/app-layout/content-wrapper/styles.selectors.js +3 -3
  15. package/lib/internal/template/app-layout/drawer/styles.css.js +12 -12
  16. package/lib/internal/template/app-layout/drawer/styles.scoped.css +22 -22
  17. package/lib/internal/template/app-layout/drawer/styles.selectors.js +12 -12
  18. package/lib/internal/template/app-layout/mobile-toolbar/styles.css.js +8 -8
  19. package/lib/internal/template/app-layout/mobile-toolbar/styles.scoped.css +10 -10
  20. package/lib/internal/template/app-layout/mobile-toolbar/styles.selectors.js +8 -8
  21. package/lib/internal/template/app-layout/split-panel/styles.css.js +2 -2
  22. package/lib/internal/template/app-layout/split-panel/styles.scoped.css +4 -4
  23. package/lib/internal/template/app-layout/split-panel/styles.selectors.js +2 -2
  24. package/lib/internal/template/app-layout/styles.css.js +16 -16
  25. package/lib/internal/template/app-layout/styles.scoped.css +21 -21
  26. package/lib/internal/template/app-layout/styles.selectors.js +16 -16
  27. package/lib/internal/template/app-layout/toggles/styles.css.js +2 -2
  28. package/lib/internal/template/app-layout/toggles/styles.scoped.css +8 -8
  29. package/lib/internal/template/app-layout/toggles/styles.selectors.js +2 -2
  30. package/lib/internal/template/app-layout/visual-refresh/styles.css.js +81 -81
  31. package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +173 -173
  32. package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +81 -81
  33. package/lib/internal/template/area-chart/styles.css.js +6 -6
  34. package/lib/internal/template/area-chart/styles.scoped.css +11 -11
  35. package/lib/internal/template/area-chart/styles.selectors.js +6 -6
  36. package/lib/internal/template/attribute-editor/styles.css.js +14 -14
  37. package/lib/internal/template/attribute-editor/styles.scoped.css +26 -26
  38. package/lib/internal/template/attribute-editor/styles.selectors.js +14 -14
  39. package/lib/internal/template/badge/styles.css.js +5 -5
  40. package/lib/internal/template/badge/styles.scoped.css +7 -7
  41. package/lib/internal/template/badge/styles.selectors.js +5 -5
  42. package/lib/internal/template/box/styles.css.js +190 -190
  43. package/lib/internal/template/box/styles.scoped.css +241 -241
  44. package/lib/internal/template/box/styles.selectors.js +190 -190
  45. package/lib/internal/template/breadcrumb-group/item/styles.css.js +9 -9
  46. package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +19 -19
  47. package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +9 -9
  48. package/lib/internal/template/breadcrumb-group/styles.css.js +7 -7
  49. package/lib/internal/template/breadcrumb-group/styles.scoped.css +14 -14
  50. package/lib/internal/template/breadcrumb-group/styles.selectors.js +7 -7
  51. package/lib/internal/template/button/styles.css.js +19 -19
  52. package/lib/internal/template/button/styles.scoped.css +153 -153
  53. package/lib/internal/template/button/styles.selectors.js +19 -19
  54. package/lib/internal/template/button-dropdown/category-elements/styles.css.js +13 -13
  55. package/lib/internal/template/button-dropdown/category-elements/styles.scoped.css +25 -25
  56. package/lib/internal/template/button-dropdown/category-elements/styles.selectors.js +13 -13
  57. package/lib/internal/template/button-dropdown/item-element/styles.css.js +15 -15
  58. package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +20 -20
  59. package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +15 -15
  60. package/lib/internal/template/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
  61. package/lib/internal/template/button-dropdown/mobile-expandable-group/styles.scoped.css +7 -7
  62. package/lib/internal/template/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
  63. package/lib/internal/template/button-dropdown/styles.css.js +15 -15
  64. package/lib/internal/template/button-dropdown/styles.scoped.css +24 -24
  65. package/lib/internal/template/button-dropdown/styles.selectors.js +15 -15
  66. package/lib/internal/template/calendar/styles.css.js +20 -20
  67. package/lib/internal/template/calendar/styles.scoped.css +44 -44
  68. package/lib/internal/template/calendar/styles.selectors.js +20 -20
  69. package/lib/internal/template/cards/styles.css.js +40 -40
  70. package/lib/internal/template/cards/styles.scoped.css +52 -52
  71. package/lib/internal/template/cards/styles.selectors.js +40 -40
  72. package/lib/internal/template/checkbox/styles.css.js +3 -3
  73. package/lib/internal/template/checkbox/styles.scoped.css +7 -7
  74. package/lib/internal/template/checkbox/styles.selectors.js +3 -3
  75. package/lib/internal/template/code-editor/styles.css.js +32 -32
  76. package/lib/internal/template/code-editor/styles.scoped.css +179 -179
  77. package/lib/internal/template/code-editor/styles.selectors.js +32 -32
  78. package/lib/internal/template/collection-preferences/content-display/styles.css.js +11 -11
  79. package/lib/internal/template/collection-preferences/content-display/styles.scoped.css +21 -21
  80. package/lib/internal/template/collection-preferences/content-display/styles.selectors.js +11 -11
  81. package/lib/internal/template/collection-preferences/styles.css.js +37 -37
  82. package/lib/internal/template/collection-preferences/styles.scoped.css +52 -52
  83. package/lib/internal/template/collection-preferences/styles.selectors.js +37 -37
  84. package/lib/internal/template/column-layout/styles.css.js +13 -13
  85. package/lib/internal/template/column-layout/styles.scoped.css +45 -45
  86. package/lib/internal/template/column-layout/styles.selectors.js +13 -13
  87. package/lib/internal/template/container/styles.css.js +30 -30
  88. package/lib/internal/template/container/styles.scoped.css +56 -56
  89. package/lib/internal/template/container/styles.selectors.js +30 -30
  90. package/lib/internal/template/content-layout/styles.css.js +7 -7
  91. package/lib/internal/template/content-layout/styles.scoped.css +13 -13
  92. package/lib/internal/template/content-layout/styles.selectors.js +7 -7
  93. package/lib/internal/template/date-picker/styles.css.js +7 -7
  94. package/lib/internal/template/date-picker/styles.scoped.css +11 -11
  95. package/lib/internal/template/date-picker/styles.selectors.js +7 -7
  96. package/lib/internal/template/date-range-picker/calendar/grids/styles.css.js +25 -25
  97. package/lib/internal/template/date-range-picker/calendar/grids/styles.scoped.css +44 -44
  98. package/lib/internal/template/date-range-picker/calendar/grids/styles.selectors.js +25 -25
  99. package/lib/internal/template/date-range-picker/relative-range/styles.css.js +9 -9
  100. package/lib/internal/template/date-range-picker/relative-range/styles.scoped.css +15 -15
  101. package/lib/internal/template/date-range-picker/relative-range/styles.selectors.js +9 -9
  102. package/lib/internal/template/date-range-picker/styles.css.js +39 -39
  103. package/lib/internal/template/date-range-picker/styles.scoped.css +50 -50
  104. package/lib/internal/template/date-range-picker/styles.selectors.js +39 -39
  105. package/lib/internal/template/drawer/styles.css.js +3 -3
  106. package/lib/internal/template/drawer/styles.scoped.css +10 -10
  107. package/lib/internal/template/drawer/styles.selectors.js +3 -3
  108. package/lib/internal/template/expandable-section/styles.css.js +32 -32
  109. package/lib/internal/template/expandable-section/styles.scoped.css +64 -64
  110. package/lib/internal/template/expandable-section/styles.selectors.js +32 -32
  111. package/lib/internal/template/file-upload/dropzone/styles.css.js +2 -2
  112. package/lib/internal/template/file-upload/dropzone/styles.scoped.css +4 -4
  113. package/lib/internal/template/file-upload/dropzone/styles.selectors.js +2 -2
  114. package/lib/internal/template/file-upload/file-input/styles.css.js +4 -4
  115. package/lib/internal/template/file-upload/file-input/styles.scoped.css +9 -9
  116. package/lib/internal/template/file-upload/file-input/styles.selectors.js +4 -4
  117. package/lib/internal/template/flashbar/styles.css.js +47 -47
  118. package/lib/internal/template/flashbar/styles.scoped.css +148 -148
  119. package/lib/internal/template/flashbar/styles.selectors.js +47 -47
  120. package/lib/internal/template/form/styles.css.js +9 -9
  121. package/lib/internal/template/form/styles.scoped.css +10 -10
  122. package/lib/internal/template/form/styles.selectors.js +9 -9
  123. package/lib/internal/template/form-field/styles.css.js +19 -19
  124. package/lib/internal/template/form-field/styles.scoped.css +31 -31
  125. package/lib/internal/template/form-field/styles.selectors.js +19 -19
  126. package/lib/internal/template/grid/styles.css.js +53 -53
  127. package/lib/internal/template/grid/styles.scoped.css +56 -56
  128. package/lib/internal/template/grid/styles.selectors.js +53 -53
  129. package/lib/internal/template/header/styles.css.js +34 -34
  130. package/lib/internal/template/header/styles.scoped.css +54 -54
  131. package/lib/internal/template/header/styles.selectors.js +34 -34
  132. package/lib/internal/template/help-panel/styles.css.js +4 -4
  133. package/lib/internal/template/help-panel/styles.scoped.css +65 -65
  134. package/lib/internal/template/help-panel/styles.selectors.js +4 -4
  135. package/lib/internal/template/hotspot/styles.css.js +7 -7
  136. package/lib/internal/template/hotspot/styles.scoped.css +9 -9
  137. package/lib/internal/template/hotspot/styles.selectors.js +7 -7
  138. package/lib/internal/template/icon/styles.css.js +36 -36
  139. package/lib/internal/template/icon/styles.scoped.css +65 -65
  140. package/lib/internal/template/icon/styles.selectors.js +36 -36
  141. package/lib/internal/template/input/styles.css.js +12 -12
  142. package/lib/internal/template/input/styles.scoped.css +32 -32
  143. package/lib/internal/template/input/styles.selectors.js +12 -12
  144. package/lib/internal/template/internal/components/abstract-switch/styles.css.js +13 -13
  145. package/lib/internal/template/internal/components/abstract-switch/styles.scoped.css +22 -22
  146. package/lib/internal/template/internal/components/abstract-switch/styles.selectors.js +13 -13
  147. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
  148. package/lib/internal/template/internal/components/autosuggest-input/index.js +4 -4
  149. package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
  150. package/lib/internal/template/internal/components/button-trigger/styles.css.js +10 -10
  151. package/lib/internal/template/internal/components/button-trigger/styles.scoped.css +26 -26
  152. package/lib/internal/template/internal/components/button-trigger/styles.selectors.js +10 -10
  153. package/lib/internal/template/internal/components/chart-filter/styles.css.js +3 -3
  154. package/lib/internal/template/internal/components/chart-filter/styles.scoped.css +5 -5
  155. package/lib/internal/template/internal/components/chart-filter/styles.selectors.js +3 -3
  156. package/lib/internal/template/internal/components/chart-legend/styles.css.js +6 -6
  157. package/lib/internal/template/internal/components/chart-legend/styles.scoped.css +17 -17
  158. package/lib/internal/template/internal/components/chart-legend/styles.selectors.js +6 -6
  159. package/lib/internal/template/internal/components/chart-plot/styles.css.js +5 -5
  160. package/lib/internal/template/internal/components/chart-plot/styles.scoped.css +7 -7
  161. package/lib/internal/template/internal/components/chart-plot/styles.selectors.js +5 -5
  162. package/lib/internal/template/internal/components/chart-popover/styles.css.js +3 -3
  163. package/lib/internal/template/internal/components/chart-popover/styles.scoped.css +5 -5
  164. package/lib/internal/template/internal/components/chart-popover/styles.selectors.js +3 -3
  165. package/lib/internal/template/internal/components/chart-series-details/styles.css.js +20 -20
  166. package/lib/internal/template/internal/components/chart-series-details/styles.scoped.css +35 -35
  167. package/lib/internal/template/internal/components/chart-series-details/styles.selectors.js +20 -20
  168. package/lib/internal/template/internal/components/chart-series-marker/styles.css.js +5 -5
  169. package/lib/internal/template/internal/components/chart-series-marker/styles.scoped.css +9 -9
  170. package/lib/internal/template/internal/components/chart-series-marker/styles.selectors.js +5 -5
  171. package/lib/internal/template/internal/components/chart-wrapper/styles.css.js +9 -9
  172. package/lib/internal/template/internal/components/chart-wrapper/styles.scoped.css +11 -11
  173. package/lib/internal/template/internal/components/chart-wrapper/styles.selectors.js +9 -9
  174. package/lib/internal/template/internal/components/checkbox-icon/styles.css.js +7 -7
  175. package/lib/internal/template/internal/components/checkbox-icon/styles.scoped.css +10 -10
  176. package/lib/internal/template/internal/components/checkbox-icon/styles.selectors.js +7 -7
  177. package/lib/internal/template/internal/components/dropdown/index.d.ts.map +1 -1
  178. package/lib/internal/template/internal/components/dropdown/index.js +4 -4
  179. package/lib/internal/template/internal/components/dropdown/index.js.map +1 -1
  180. package/lib/internal/template/internal/components/dropdown/styles.css.js +20 -20
  181. package/lib/internal/template/internal/components/dropdown/styles.scoped.css +39 -39
  182. package/lib/internal/template/internal/components/dropdown/styles.selectors.js +20 -20
  183. package/lib/internal/template/internal/components/dropdown-footer/styles.css.js +3 -3
  184. package/lib/internal/template/internal/components/dropdown-footer/styles.scoped.css +5 -5
  185. package/lib/internal/template/internal/components/dropdown-footer/styles.selectors.js +3 -3
  186. package/lib/internal/template/internal/components/dropdown-status/styles.css.js +2 -2
  187. package/lib/internal/template/internal/components/dropdown-status/styles.scoped.css +4 -4
  188. package/lib/internal/template/internal/components/dropdown-status/styles.selectors.js +2 -2
  189. package/lib/internal/template/internal/components/filtering-token/styles.css.js +7 -7
  190. package/lib/internal/template/internal/components/filtering-token/styles.scoped.css +15 -15
  191. package/lib/internal/template/internal/components/filtering-token/styles.selectors.js +7 -7
  192. package/lib/internal/template/internal/components/handle/styles.css.js +2 -2
  193. package/lib/internal/template/internal/components/handle/styles.scoped.css +8 -8
  194. package/lib/internal/template/internal/components/handle/styles.selectors.js +2 -2
  195. package/lib/internal/template/internal/components/menu-dropdown/styles.css.js +7 -7
  196. package/lib/internal/template/internal/components/menu-dropdown/styles.scoped.css +15 -15
  197. package/lib/internal/template/internal/components/menu-dropdown/styles.selectors.js +7 -7
  198. package/lib/internal/template/internal/components/option/styles.css.js +17 -17
  199. package/lib/internal/template/internal/components/option/styles.scoped.css +31 -31
  200. package/lib/internal/template/internal/components/option/styles.selectors.js +17 -17
  201. package/lib/internal/template/internal/components/options-list/styles.css.js +2 -2
  202. package/lib/internal/template/internal/components/options-list/styles.scoped.css +4 -4
  203. package/lib/internal/template/internal/components/options-list/styles.selectors.js +2 -2
  204. package/lib/internal/template/internal/components/screenreader-only/styles.css.js +1 -1
  205. package/lib/internal/template/internal/components/screenreader-only/styles.scoped.css +3 -3
  206. package/lib/internal/template/internal/components/screenreader-only/styles.selectors.js +1 -1
  207. package/lib/internal/template/internal/components/selectable-item/styles.css.js +16 -16
  208. package/lib/internal/template/internal/components/selectable-item/styles.scoped.css +31 -31
  209. package/lib/internal/template/internal/components/selectable-item/styles.selectors.js +16 -16
  210. package/lib/internal/template/internal/components/token-list/styles.css.js +9 -9
  211. package/lib/internal/template/internal/components/token-list/styles.scoped.css +22 -22
  212. package/lib/internal/template/internal/components/token-list/styles.selectors.js +9 -9
  213. package/lib/internal/template/internal/environment.js +1 -1
  214. package/lib/internal/template/internal/environment.json +1 -1
  215. package/lib/internal/template/internal/utils/node-belongs.d.ts.map +1 -1
  216. package/lib/internal/template/internal/utils/node-belongs.js +5 -1
  217. package/lib/internal/template/internal/utils/node-belongs.js.map +1 -1
  218. package/lib/internal/template/link/styles.css.js +20 -20
  219. package/lib/internal/template/link/styles.scoped.css +73 -73
  220. package/lib/internal/template/link/styles.selectors.js +20 -20
  221. package/lib/internal/template/mixed-line-bar-chart/styles.css.js +11 -11
  222. package/lib/internal/template/mixed-line-bar-chart/styles.scoped.css +19 -19
  223. package/lib/internal/template/mixed-line-bar-chart/styles.selectors.js +11 -11
  224. package/lib/internal/template/modal/styles.css.js +23 -23
  225. package/lib/internal/template/modal/styles.scoped.css +40 -40
  226. package/lib/internal/template/modal/styles.selectors.js +23 -23
  227. package/lib/internal/template/multiselect/styles.css.js +2 -2
  228. package/lib/internal/template/multiselect/styles.scoped.css +4 -4
  229. package/lib/internal/template/multiselect/styles.selectors.js +2 -2
  230. package/lib/internal/template/pagination/styles.css.js +9 -9
  231. package/lib/internal/template/pagination/styles.scoped.css +25 -25
  232. package/lib/internal/template/pagination/styles.selectors.js +9 -9
  233. package/lib/internal/template/pie-chart/styles.css.js +27 -27
  234. package/lib/internal/template/pie-chart/styles.scoped.css +50 -50
  235. package/lib/internal/template/pie-chart/styles.selectors.js +27 -27
  236. package/lib/internal/template/popover/styles.css.js +50 -50
  237. package/lib/internal/template/popover/styles.scoped.css +74 -74
  238. package/lib/internal/template/popover/styles.selectors.js +50 -50
  239. package/lib/internal/template/progress-bar/styles.css.js +18 -18
  240. package/lib/internal/template/progress-bar/styles.scoped.css +36 -36
  241. package/lib/internal/template/progress-bar/styles.selectors.js +18 -18
  242. package/lib/internal/template/property-filter/styles.css.js +31 -31
  243. package/lib/internal/template/property-filter/styles.scoped.css +35 -35
  244. package/lib/internal/template/property-filter/styles.selectors.js +31 -31
  245. package/lib/internal/template/radio-group/styles.css.js +9 -9
  246. package/lib/internal/template/radio-group/styles.scoped.css +17 -17
  247. package/lib/internal/template/radio-group/styles.selectors.js +9 -9
  248. package/lib/internal/template/segmented-control/styles.css.js +14 -14
  249. package/lib/internal/template/segmented-control/styles.scoped.css +35 -35
  250. package/lib/internal/template/segmented-control/styles.selectors.js +14 -14
  251. package/lib/internal/template/select/parts/styles.css.js +16 -16
  252. package/lib/internal/template/select/parts/styles.scoped.css +18 -18
  253. package/lib/internal/template/select/parts/styles.selectors.js +16 -16
  254. package/lib/internal/template/select/styles.css.js +1 -1
  255. package/lib/internal/template/select/styles.scoped.css +3 -3
  256. package/lib/internal/template/select/styles.selectors.js +1 -1
  257. package/lib/internal/template/side-navigation/styles.css.js +28 -28
  258. package/lib/internal/template/side-navigation/styles.scoped.css +40 -40
  259. package/lib/internal/template/side-navigation/styles.selectors.js +28 -28
  260. package/lib/internal/template/space-between/styles.css.js +23 -23
  261. package/lib/internal/template/space-between/styles.scoped.css +26 -26
  262. package/lib/internal/template/space-between/styles.selectors.js +23 -23
  263. package/lib/internal/template/spinner/styles.css.js +13 -13
  264. package/lib/internal/template/spinner/styles.scoped.css +21 -21
  265. package/lib/internal/template/spinner/styles.selectors.js +13 -13
  266. package/lib/internal/template/split-panel/styles.css.js +55 -55
  267. package/lib/internal/template/split-panel/styles.scoped.css +79 -79
  268. package/lib/internal/template/split-panel/styles.selectors.js +55 -55
  269. package/lib/internal/template/status-indicator/styles.css.js +23 -23
  270. package/lib/internal/template/status-indicator/styles.scoped.css +31 -31
  271. package/lib/internal/template/status-indicator/styles.selectors.js +23 -23
  272. package/lib/internal/template/table/body-cell/styles.css.js +30 -30
  273. package/lib/internal/template/table/body-cell/styles.scoped.css +83 -83
  274. package/lib/internal/template/table/body-cell/styles.selectors.js +30 -30
  275. package/lib/internal/template/table/header-cell/styles.css.js +24 -24
  276. package/lib/internal/template/table/header-cell/styles.scoped.css +46 -46
  277. package/lib/internal/template/table/header-cell/styles.selectors.js +24 -24
  278. package/lib/internal/template/table/resizer/styles.css.js +8 -8
  279. package/lib/internal/template/table/resizer/styles.scoped.css +16 -16
  280. package/lib/internal/template/table/resizer/styles.selectors.js +8 -8
  281. package/lib/internal/template/table/selection/styles.css.js +3 -3
  282. package/lib/internal/template/table/selection/styles.scoped.css +5 -5
  283. package/lib/internal/template/table/selection/styles.selectors.js +3 -3
  284. package/lib/internal/template/table/sticky-scrollbar/styles.css.js +6 -6
  285. package/lib/internal/template/table/sticky-scrollbar/styles.scoped.css +9 -9
  286. package/lib/internal/template/table/sticky-scrollbar/styles.selectors.js +6 -6
  287. package/lib/internal/template/table/styles.css.js +35 -35
  288. package/lib/internal/template/table/styles.scoped.css +42 -42
  289. package/lib/internal/template/table/styles.selectors.js +35 -35
  290. package/lib/internal/template/tabs/styles.css.js +21 -21
  291. package/lib/internal/template/tabs/styles.scoped.css +43 -43
  292. package/lib/internal/template/tabs/styles.selectors.js +21 -21
  293. package/lib/internal/template/tag-editor/styles.css.js +3 -3
  294. package/lib/internal/template/tag-editor/styles.scoped.css +12 -12
  295. package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
  296. package/lib/internal/template/text-content/styles.css.js +1 -1
  297. package/lib/internal/template/text-content/styles.scoped.css +62 -62
  298. package/lib/internal/template/text-content/styles.selectors.js +1 -1
  299. package/lib/internal/template/text-filter/styles.css.js +3 -3
  300. package/lib/internal/template/text-filter/styles.scoped.css +5 -5
  301. package/lib/internal/template/text-filter/styles.selectors.js +3 -3
  302. package/lib/internal/template/textarea/styles.css.js +4 -4
  303. package/lib/internal/template/textarea/styles.scoped.css +14 -14
  304. package/lib/internal/template/textarea/styles.selectors.js +4 -4
  305. package/lib/internal/template/tiles/styles.css.js +29 -29
  306. package/lib/internal/template/tiles/styles.scoped.css +72 -72
  307. package/lib/internal/template/tiles/styles.selectors.js +29 -29
  308. package/lib/internal/template/toggle/styles.css.js +8 -8
  309. package/lib/internal/template/toggle/styles.scoped.css +15 -15
  310. package/lib/internal/template/toggle/styles.selectors.js +8 -8
  311. package/lib/internal/template/token-group/styles.css.js +8 -8
  312. package/lib/internal/template/token-group/styles.scoped.css +18 -18
  313. package/lib/internal/template/token-group/styles.selectors.js +8 -8
  314. package/lib/internal/template/top-navigation/1.0-beta/styles.css.js +25 -25
  315. package/lib/internal/template/top-navigation/1.0-beta/styles.scoped.css +44 -44
  316. package/lib/internal/template/top-navigation/1.0-beta/styles.selectors.js +25 -25
  317. package/lib/internal/template/top-navigation/styles.css.js +47 -47
  318. package/lib/internal/template/top-navigation/styles.scoped.css +68 -68
  319. package/lib/internal/template/top-navigation/styles.selectors.js +47 -47
  320. package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
  321. package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +23 -23
  322. package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
  323. package/lib/internal/template/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
  324. package/lib/internal/template/tutorial-panel/components/tutorial-list/styles.scoped.css +29 -29
  325. package/lib/internal/template/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
  326. package/lib/internal/template/tutorial-panel/styles.css.js +1 -1
  327. package/lib/internal/template/tutorial-panel/styles.scoped.css +3 -3
  328. package/lib/internal/template/tutorial-panel/styles.selectors.js +1 -1
  329. package/lib/internal/template/wizard/styles.css.js +32 -32
  330. package/lib/internal/template/wizard/styles.scoped.css +67 -67
  331. package/lib/internal/template/wizard/styles.selectors.js +32 -32
  332. package/package.json +1 -1
@@ -2,10 +2,10 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "marker": "awsui_marker_1isd1_v9uko_99",
6
- "marker--line": "awsui_marker--line_1isd1_v9uko_142",
7
- "marker--rectangle": "awsui_marker--rectangle_1isd1_v9uko_146",
8
- "marker--hollow-rectangle": "awsui_marker--hollow-rectangle_1isd1_v9uko_153",
9
- "marker--dashed": "awsui_marker--dashed_1isd1_v9uko_169"
5
+ "marker": "awsui_marker_1isd1_1ytrc_99",
6
+ "marker--line": "awsui_marker--line_1isd1_1ytrc_142",
7
+ "marker--rectangle": "awsui_marker--rectangle_1isd1_1ytrc_146",
8
+ "marker--hollow-rectangle": "awsui_marker--hollow-rectangle_1isd1_1ytrc_153",
9
+ "marker--dashed": "awsui_marker--dashed_1isd1_1ytrc_169"
10
10
  };
11
11
 
@@ -1,14 +1,14 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "wrapper": "awsui_wrapper_z5mul_15f4w_99",
5
- "wrapper--fit-height": "awsui_wrapper--fit-height_z5mul_15f4w_135",
6
- "inner-wrapper--fit-height": "awsui_inner-wrapper--fit-height_z5mul_15f4w_140",
7
- "has-default-filter": "awsui_has-default-filter_z5mul_15f4w_146",
8
- "content": "awsui_content_z5mul_15f4w_150",
9
- "content--reserve-filter": "awsui_content--reserve-filter_z5mul_15f4w_157",
10
- "content--reserve-legend": "awsui_content--reserve-legend_z5mul_15f4w_161",
11
- "content--fit-height": "awsui_content--fit-height_z5mul_15f4w_165",
12
- "filter-container": "awsui_filter-container_z5mul_15f4w_169"
4
+ "wrapper": "awsui_wrapper_z5mul_w2ldd_99",
5
+ "wrapper--fit-height": "awsui_wrapper--fit-height_z5mul_w2ldd_135",
6
+ "inner-wrapper--fit-height": "awsui_inner-wrapper--fit-height_z5mul_w2ldd_140",
7
+ "has-default-filter": "awsui_has-default-filter_z5mul_w2ldd_146",
8
+ "content": "awsui_content_z5mul_w2ldd_150",
9
+ "content--reserve-filter": "awsui_content--reserve-filter_z5mul_w2ldd_157",
10
+ "content--reserve-legend": "awsui_content--reserve-legend_z5mul_w2ldd_161",
11
+ "content--fit-height": "awsui_content--fit-height_z5mul_w2ldd_165",
12
+ "filter-container": "awsui_filter-container_z5mul_w2ldd_169"
13
13
  };
14
14
 
@@ -6,8 +6,8 @@
6
6
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
7
  SPDX-License-Identifier: Apache-2.0
8
8
  */
9
- /* stylelint-disable @cloudscape-design/no-implicit-descendant, plugin/no-unsupported-browser-features, selector-combinator-disallowed-list */
10
- /* stylelint-enable @cloudscape-design/no-implicit-descendant, plugin/no-unsupported-browser-features, selector-combinator-disallowed-list */
9
+ /* stylelint-disable plugin/no-unsupported-browser-features */
10
+ /* stylelint-enable plugin/no-unsupported-browser-features */
11
11
  /*
12
12
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
13
13
  SPDX-License-Identifier: Apache-2.0
@@ -96,7 +96,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
96
96
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
97
97
  SPDX-License-Identifier: Apache-2.0
98
98
  */
99
- .awsui_wrapper_z5mul_15f4w_99:not(#\9) {
99
+ .awsui_wrapper_z5mul_w2ldd_99:not(#\9) {
100
100
  border-collapse: separate;
101
101
  border-spacing: 0;
102
102
  box-sizing: border-box;
@@ -133,40 +133,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
133
133
  position: relative;
134
134
  display: block;
135
135
  }
136
- .awsui_wrapper--fit-height_z5mul_15f4w_135:not(#\9) {
136
+ .awsui_wrapper--fit-height_z5mul_w2ldd_135:not(#\9) {
137
137
  block-size: 100%;
138
138
  overflow-y: auto;
139
139
  }
140
140
 
141
- .awsui_inner-wrapper--fit-height_z5mul_15f4w_140:not(#\9) {
141
+ .awsui_inner-wrapper--fit-height_z5mul_w2ldd_140:not(#\9) {
142
142
  display: flex;
143
143
  flex-direction: column;
144
144
  block-size: 100%;
145
145
  }
146
146
 
147
- .awsui_has-default-filter_z5mul_15f4w_146 > :not(#\9):first-child {
147
+ .awsui_has-default-filter_z5mul_w2ldd_146 > :not(#\9):first-child {
148
148
  flex: 280px 0 1;
149
149
  }
150
150
 
151
- .awsui_content_z5mul_15f4w_150:not(#\9) {
151
+ .awsui_content_z5mul_w2ldd_150:not(#\9) {
152
152
  display: flex;
153
153
  position: relative;
154
154
  justify-content: center;
155
155
  align-items: center;
156
156
  }
157
157
 
158
- .awsui_content--reserve-filter_z5mul_15f4w_157:not(#\9) {
158
+ .awsui_content--reserve-filter_z5mul_w2ldd_157:not(#\9) {
159
159
  margin-block-start: calc(2 * var(--line-height-body-m-2zx78l, 22px));
160
160
  }
161
161
 
162
- .awsui_content--reserve-legend_z5mul_15f4w_161:not(#\9) {
162
+ .awsui_content--reserve-legend_z5mul_w2ldd_161:not(#\9) {
163
163
  margin-block-end: calc(2 * var(--line-height-body-m-2zx78l, 22px));
164
164
  }
165
165
 
166
- .awsui_content--fit-height_z5mul_15f4w_165:not(#\9) {
166
+ .awsui_content--fit-height_z5mul_w2ldd_165:not(#\9) {
167
167
  flex: 1;
168
168
  }
169
169
 
170
- .awsui_filter-container_z5mul_15f4w_169:not(#\9) {
170
+ .awsui_filter-container_z5mul_w2ldd_169:not(#\9) {
171
171
  /* used in test-utils */
172
172
  }
@@ -2,14 +2,14 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "wrapper": "awsui_wrapper_z5mul_15f4w_99",
6
- "wrapper--fit-height": "awsui_wrapper--fit-height_z5mul_15f4w_135",
7
- "inner-wrapper--fit-height": "awsui_inner-wrapper--fit-height_z5mul_15f4w_140",
8
- "has-default-filter": "awsui_has-default-filter_z5mul_15f4w_146",
9
- "content": "awsui_content_z5mul_15f4w_150",
10
- "content--reserve-filter": "awsui_content--reserve-filter_z5mul_15f4w_157",
11
- "content--reserve-legend": "awsui_content--reserve-legend_z5mul_15f4w_161",
12
- "content--fit-height": "awsui_content--fit-height_z5mul_15f4w_165",
13
- "filter-container": "awsui_filter-container_z5mul_15f4w_169"
5
+ "wrapper": "awsui_wrapper_z5mul_w2ldd_99",
6
+ "wrapper--fit-height": "awsui_wrapper--fit-height_z5mul_w2ldd_135",
7
+ "inner-wrapper--fit-height": "awsui_inner-wrapper--fit-height_z5mul_w2ldd_140",
8
+ "has-default-filter": "awsui_has-default-filter_z5mul_w2ldd_146",
9
+ "content": "awsui_content_z5mul_w2ldd_150",
10
+ "content--reserve-filter": "awsui_content--reserve-filter_z5mul_w2ldd_157",
11
+ "content--reserve-legend": "awsui_content--reserve-legend_z5mul_w2ldd_161",
12
+ "content--fit-height": "awsui_content--fit-height_z5mul_w2ldd_165",
13
+ "filter-container": "awsui_filter-container_z5mul_w2ldd_169"
14
14
  };
15
15
 
@@ -1,12 +1,12 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_1fn7j_1bv8f_99",
5
- "styled-box": "awsui_styled-box_1fn7j_1bv8f_106",
6
- "styled-box-checked": "awsui_styled-box-checked_1fn7j_1bv8f_112",
7
- "styled-box-indeterminate": "awsui_styled-box-indeterminate_1fn7j_1bv8f_112",
8
- "styled-box-disabled": "awsui_styled-box-disabled_1fn7j_1bv8f_116",
9
- "styled-line": "awsui_styled-line_1fn7j_1bv8f_130",
10
- "styled-line-disabled": "awsui_styled-line-disabled_1fn7j_1bv8f_135"
4
+ "root": "awsui_root_1fn7j_t17gi_99",
5
+ "styled-box": "awsui_styled-box_1fn7j_t17gi_106",
6
+ "styled-box-checked": "awsui_styled-box-checked_1fn7j_t17gi_112",
7
+ "styled-box-indeterminate": "awsui_styled-box-indeterminate_1fn7j_t17gi_112",
8
+ "styled-box-disabled": "awsui_styled-box-disabled_1fn7j_t17gi_116",
9
+ "styled-line": "awsui_styled-line_1fn7j_t17gi_130",
10
+ "styled-line-disabled": "awsui_styled-line-disabled_1fn7j_t17gi_135"
11
11
  };
12
12
 
@@ -2,8 +2,8 @@
2
2
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- /* stylelint-disable @cloudscape-design/no-implicit-descendant, plugin/no-unsupported-browser-features, selector-combinator-disallowed-list */
6
- /* stylelint-enable @cloudscape-design/no-implicit-descendant, plugin/no-unsupported-browser-features, selector-combinator-disallowed-list */
5
+ /* stylelint-disable plugin/no-unsupported-browser-features */
6
+ /* stylelint-enable plugin/no-unsupported-browser-features */
7
7
  /*
8
8
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
9
9
  SPDX-License-Identifier: Apache-2.0
@@ -96,42 +96,42 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
96
96
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
97
97
  SPDX-License-Identifier: Apache-2.0
98
98
  */
99
- .awsui_root_1fn7j_1bv8f_99:not(#\9) {
99
+ .awsui_root_1fn7j_t17gi_99:not(#\9) {
100
100
  position: absolute;
101
101
  inline-size: 100%;
102
102
  block-size: 100%;
103
103
  inset-block-start: 0;
104
104
  inset-inline-start: 0;
105
105
  }
106
- .awsui_root_1fn7j_1bv8f_99 > .awsui_styled-box_1fn7j_1bv8f_106:not(#\9) {
106
+ .awsui_root_1fn7j_t17gi_99 > .awsui_styled-box_1fn7j_t17gi_106:not(#\9) {
107
107
  fill: var(--color-background-control-default-n6yadr, #ffffff);
108
108
  stroke: var(--color-border-control-default-8uhjl0, #687078);
109
109
  stroke-width: var(--border-field-width-yoy972, 1px);
110
110
  transition: fill var(--motion-duration-transition-quick-j01tkg, 90ms) var(--motion-easing-transition-quick-9ktw66, linear), stroke var(--motion-duration-transition-quick-j01tkg, 90ms) var(--motion-easing-transition-quick-9ktw66, linear);
111
111
  }
112
- .awsui_root_1fn7j_1bv8f_99 > .awsui_styled-box-checked_1fn7j_1bv8f_112:not(#\9), .awsui_root_1fn7j_1bv8f_99 > .awsui_styled-box-indeterminate_1fn7j_1bv8f_112:not(#\9) {
112
+ .awsui_root_1fn7j_t17gi_99 > .awsui_styled-box-checked_1fn7j_t17gi_112:not(#\9), .awsui_root_1fn7j_t17gi_99 > .awsui_styled-box-indeterminate_1fn7j_t17gi_112:not(#\9) {
113
113
  fill: var(--color-background-control-checked-pvanxo, #0073bb);
114
114
  stroke: var(--color-border-control-checked-bqdl6s, #0073bb);
115
115
  }
116
- .awsui_root_1fn7j_1bv8f_99 > .awsui_styled-box-disabled_1fn7j_1bv8f_116:not(#\9) {
116
+ .awsui_root_1fn7j_t17gi_99 > .awsui_styled-box-disabled_1fn7j_t17gi_116:not(#\9) {
117
117
  fill: var(--color-background-control-disabled-dsn0t2, #d5dbdb);
118
118
  stroke: var(--color-border-control-disabled-4hz3mo, #d5dbdb);
119
119
  }
120
120
  @media (prefers-reduced-motion: reduce) {
121
- .awsui_root_1fn7j_1bv8f_99 > .awsui_styled-box_1fn7j_1bv8f_106:not(#\9) {
121
+ .awsui_root_1fn7j_t17gi_99 > .awsui_styled-box_1fn7j_t17gi_106:not(#\9) {
122
122
  animation: none;
123
123
  transition: none;
124
124
  }
125
125
  }
126
- .awsui-motion-disabled .awsui_root_1fn7j_1bv8f_99 > .awsui_styled-box_1fn7j_1bv8f_106:not(#\9), .awsui-mode-entering .awsui_root_1fn7j_1bv8f_99 > .awsui_styled-box_1fn7j_1bv8f_106:not(#\9) {
126
+ .awsui-motion-disabled .awsui_root_1fn7j_t17gi_99 > .awsui_styled-box_1fn7j_t17gi_106:not(#\9), .awsui-mode-entering .awsui_root_1fn7j_t17gi_99 > .awsui_styled-box_1fn7j_t17gi_106:not(#\9) {
127
127
  animation: none;
128
128
  transition: none;
129
129
  }
130
- .awsui_root_1fn7j_1bv8f_99 > .awsui_styled-line_1fn7j_1bv8f_130:not(#\9) {
130
+ .awsui_root_1fn7j_t17gi_99 > .awsui_styled-line_1fn7j_t17gi_130:not(#\9) {
131
131
  stroke: var(--color-foreground-control-default-8qoldl, #ffffff);
132
132
  stroke-width: 2;
133
133
  fill: none;
134
134
  }
135
- .awsui_root_1fn7j_1bv8f_99 > .awsui_styled-line-disabled_1fn7j_1bv8f_135:not(#\9) {
135
+ .awsui_root_1fn7j_t17gi_99 > .awsui_styled-line-disabled_1fn7j_t17gi_135:not(#\9) {
136
136
  stroke: var(--color-foreground-control-disabled-fcoqdk, #ffffff);
137
137
  }
@@ -2,12 +2,12 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_1fn7j_1bv8f_99",
6
- "styled-box": "awsui_styled-box_1fn7j_1bv8f_106",
7
- "styled-box-checked": "awsui_styled-box-checked_1fn7j_1bv8f_112",
8
- "styled-box-indeterminate": "awsui_styled-box-indeterminate_1fn7j_1bv8f_112",
9
- "styled-box-disabled": "awsui_styled-box-disabled_1fn7j_1bv8f_116",
10
- "styled-line": "awsui_styled-line_1fn7j_1bv8f_130",
11
- "styled-line-disabled": "awsui_styled-line-disabled_1fn7j_1bv8f_135"
5
+ "root": "awsui_root_1fn7j_t17gi_99",
6
+ "styled-box": "awsui_styled-box_1fn7j_t17gi_106",
7
+ "styled-box-checked": "awsui_styled-box-checked_1fn7j_t17gi_112",
8
+ "styled-box-indeterminate": "awsui_styled-box-indeterminate_1fn7j_t17gi_112",
9
+ "styled-box-disabled": "awsui_styled-box-disabled_1fn7j_t17gi_116",
10
+ "styled-line": "awsui_styled-line_1fn7j_t17gi_130",
11
+ "styled-line-disabled": "awsui_styled-line-disabled_1fn7j_t17gi_135"
12
12
  };
13
13
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/dropdown/index.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAqI7C,QAAA,MAAM,QAAQ,iXA2BX,aAAa,gBAqTf,CAAC;AAMF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/dropdown/index.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAsI7C,QAAA,MAAM,QAAQ,iXA2BX,aAAa,gBAqTf,CAAC;AAMF,eAAe,QAAQ,CAAC"}
@@ -17,6 +17,7 @@ import { getFirstFocusable, getLastFocusable } from '../focus-lock/utils.js';
17
17
  import { useUniqueId } from '../../hooks/use-unique-id/index.js';
18
18
  import customCssProps from '../../generated/custom-css-properties';
19
19
  import { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';
20
+ import { nodeBelongs } from '../../utils/node-belongs';
20
21
  const DropdownContainer = ({ children, renderWithPortal = false, id, referrerId, open }) => {
21
22
  if (renderWithPortal) {
22
23
  if (open) {
@@ -138,8 +139,8 @@ const Dropdown = ({ children, trigger, open, onDropdownClose, onMouseDown, heade
138
139
  setPosition('bottom-right');
139
140
  }
140
141
  };
141
- const isOutsideDropdown = (element) => (!wrapperRef.current || !wrapperRef.current.contains(element)) &&
142
- (!dropdownContainerRef.current || !dropdownContainerRef.current.contains(element));
142
+ const isOutsideDropdown = (element) => (!wrapperRef.current || !nodeBelongs(wrapperRef.current, element)) &&
143
+ (!dropdownContainerRef.current || !nodeBelongs(dropdownContainerRef.current, element));
143
144
  const focusHandler = (event) => {
144
145
  if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {
145
146
  fireNonCancelableEvent(onFocus, event);
@@ -208,8 +209,7 @@ const Dropdown = ({ children, trigger, open, onDropdownClose, onMouseDown, heade
208
209
  return;
209
210
  }
210
211
  const clickListener = (e) => {
211
- var _a, _b;
212
- if (!((_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) && !((_b = triggerRef.current) === null || _b === void 0 ? void 0 : _b.contains(e.target))) {
212
+ if (!nodeBelongs(dropdownRef.current, e.target) && !nodeBelongs(triggerRef.current, e.target)) {
213
213
  fireNonCancelableEvent(onDropdownClose);
214
214
  }
215
215
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAGL,iBAAiB,EACjB,uBAAuB,EACvB,yCAAyC,GAC1C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAoB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAgC,MAAM,WAAW,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,cAAc,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAUlF,MAAM,iBAAiB,GAAG,CAAC,EAAE,QAAQ,EA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AI,CAAC,SAAS,GAC7B,CACE,CACP,CACU,CACK,CAChB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CACzB,QAAqD,EACf,EAAE,CAAE,QAAqC,CAAC,MAAM,KAAK,SAAS,CAAC;AAEvG,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { fireNonCancelableEvent } from '../../events';\nimport { DropdownProps } from './interfaces';\nimport {\n DropdownPosition,\n InteriorDropdownPosition,\n calculatePosition,\n defaultMaxDropdownWidth,\n hasEnoughSpaceToStretchBeyondTriggerWidth,\n} from './dropdown-fit-handler';\nimport { Transition, TransitionStatus } from '../transition';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { usePortalModeClasses } from '../../hooks/use-portal-mode-classes';\nimport { DropdownContextProvider, DropdownContextProviderProps } from './context';\nimport { useMobile } from '../../hooks/use-mobile';\nimport TabTrap from '../tab-trap/index.js';\nimport { getFirstFocusable, getLastFocusable } from '../focus-lock/utils.js';\nimport { useUniqueId } from '../../hooks/use-unique-id/index.js';\nimport customCssProps from '../../generated/custom-css-properties';\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\ninterface DropdownContainerProps {\n children?: React.ReactNode;\n renderWithPortal?: boolean;\n id?: string;\n referrerId?: string;\n open?: boolean;\n}\n\nconst DropdownContainer = ({ children, renderWithPortal = false, id, referrerId, open }: DropdownContainerProps) => {\n if (renderWithPortal) {\n if (open) {\n return createPortal(\n <div id={id} data-awsui-referrer-id={referrerId}>\n {children}\n </div>,\n document.body\n );\n } else {\n return null;\n }\n } else {\n return <>{children}</>;\n }\n};\n\ninterface TransitionContentProps {\n state: TransitionStatus;\n transitionRef: React.MutableRefObject<any>;\n dropdownClasses: string;\n stretchWidth: boolean;\n interior: boolean;\n isRefresh: boolean;\n dropdownRef: React.RefObject<HTMLDivElement>;\n verticalContainerRef: React.RefObject<HTMLDivElement>;\n expandToViewport?: boolean;\n stretchBeyondTriggerWidth?: boolean;\n header?: React.ReactNode;\n children?: React.ReactNode;\n footer?: React.ReactNode;\n position?: DropdownContextProviderProps['position'];\n open?: boolean;\n onMouseDown?: React.MouseEventHandler<Element>;\n id?: string;\n role?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n}\n\nconst TransitionContent = ({\n state,\n transitionRef,\n dropdownClasses,\n stretchWidth,\n interior,\n isRefresh,\n dropdownRef,\n verticalContainerRef,\n expandToViewport,\n stretchBeyondTriggerWidth,\n header,\n children,\n footer,\n position,\n open,\n onMouseDown,\n id,\n role,\n ariaLabelledby,\n ariaDescribedby,\n}: TransitionContentProps) => {\n const contentRef = useMergeRefs(dropdownRef, transitionRef);\n return (\n <div\n className={clsx(styles.dropdown, dropdownClasses, {\n [styles.open]: open,\n [styles['with-limited-width']]: !stretchWidth,\n [styles['hide-upper-border']]: stretchWidth,\n [styles.interior]: interior,\n [styles.refresh]: isRefresh,\n [styles['use-portal']]: expandToViewport && !interior,\n [styles['stretch-beyond-trigger-width']]: stretchBeyondTriggerWidth,\n })}\n ref={contentRef}\n id={id}\n role={role}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n data-open={open}\n data-animating={state !== 'exited'}\n aria-hidden={!open}\n style={\n stretchBeyondTriggerWidth ? { [customCssProps.dropdownDefaultMaxWidth]: `${defaultMaxDropdownWidth}px` } : {}\n }\n onMouseDown={onMouseDown}\n >\n <div\n className={clsx(\n styles['dropdown-content-wrapper'],\n !header && !children && styles['is-empty'],\n isRefresh && styles.refresh\n )}\n >\n <div ref={verticalContainerRef} className={styles['dropdown-content']}>\n <DropdownContextProvider position={position}>\n {header}\n {children}\n {footer}\n </DropdownContextProvider>\n </div>\n </div>\n </div>\n );\n};\n\nconst Dropdown = ({\n children,\n trigger,\n open,\n onDropdownClose,\n onMouseDown,\n header,\n footer,\n dropdownId,\n stretchTriggerHeight = false,\n stretchWidth = true,\n stretchHeight = false,\n stretchToTriggerWidth = true,\n stretchBeyondTriggerWidth = false,\n expandToViewport = false,\n preferCenter = false,\n interior = false,\n minWidth,\n scrollable = true,\n loopFocus = expandToViewport,\n onFocus,\n onBlur,\n contentKey,\n dropdownContentId,\n dropdownContentRole,\n ariaLabelledby,\n ariaDescribedby,\n}: DropdownProps) => {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const dropdownContainerRef = useRef<HTMLDivElement | null>(null);\n // This container is only needed to apply max-height to. We can't move max-height to it's parent\n // because of an IE11 issue with flexbox. https://github.com/philipwalton/flexbugs/issues/216\n const verticalContainerRef = useRef<HTMLDivElement>(null);\n // To keep track of the initial position (drop up/down) which is kept the same during fixed repositioning\n const fixedPosition = useRef<DropdownPosition | null>(null);\n\n const isRefresh = useVisualRefresh();\n\n const dropdownClasses = usePortalModeClasses(triggerRef);\n const [position, setPosition] = useState<DropdownContextProviderProps['position']>('bottom-right');\n\n const isMobile = useMobile();\n\n const setDropdownPosition = (\n position: DropdownPosition | InteriorDropdownPosition,\n triggerBox: DOMRect,\n target: HTMLDivElement,\n verticalContainer: HTMLDivElement\n ) => {\n const entireWidth = !interior && stretchWidth;\n if (!stretchWidth) {\n // 1px offset for dropdowns where the dropdown itself needs a border, rather than on the items\n verticalContainer.style.maxHeight = `${parseInt(position.height) + 1}px`;\n } else {\n verticalContainer.style.maxHeight = position.height;\n }\n\n if (entireWidth && !expandToViewport) {\n if (stretchToTriggerWidth) {\n target.classList.add(styles['occupy-entire-width']);\n }\n } else {\n target.style.width = position.width;\n }\n\n // Using styles for main dropdown to adjust its position as preferred alternative\n if (position.dropUp && !interior) {\n target.classList.add(styles['dropdown-drop-up']);\n if (!expandToViewport) {\n target.style.bottom = '100%';\n }\n } else {\n target.classList.remove(styles['dropdown-drop-up']);\n }\n target.classList.add(position.dropLeft ? styles['dropdown-drop-left'] : styles['dropdown-drop-right']);\n\n if (position.left && position.left !== 'auto') {\n target.style.left = position.left;\n }\n\n // Position normal overflow dropdowns with fixed positioning relative to viewport\n if (expandToViewport && !interior) {\n target.style.position = 'fixed';\n if (position.dropUp) {\n target.style.bottom = `calc(100% - ${triggerBox.top}px)`;\n } else {\n target.style.top = `${triggerBox.bottom}px`;\n }\n if (position.dropLeft) {\n target.style.left = `calc(${triggerBox.right}px - ${position.width})`;\n } else {\n target.style.left = `${triggerBox.left}px`;\n }\n // Keep track of the initial dropdown position and direction.\n // Dropdown direction doesn't need to change as the user scrolls, just needs to stay attached to the trigger.\n fixedPosition.current = position;\n return;\n }\n\n // For an interior dropdown (the fly out) we need exact values for positioning\n // and classes are not enough\n // usage of relative position is impossible due to overwrite of overflow-x\n if (interior && isInteriorPosition(position)) {\n if (position.dropUp) {\n target.style.bottom = position.bottom;\n } else {\n target.style.top = position.top;\n }\n target.style.left = position.left;\n }\n\n if (position.dropUp && position.dropLeft) {\n setPosition('top-left');\n } else if (position.dropUp) {\n setPosition('top-right');\n } else if (position.dropLeft) {\n setPosition('bottom-left');\n } else {\n setPosition('bottom-right');\n }\n };\n\n const isOutsideDropdown = (element: Element) =>\n (!wrapperRef.current || !wrapperRef.current.contains(element)) &&\n (!dropdownContainerRef.current || !dropdownContainerRef.current.contains(element));\n\n const focusHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onFocus, event);\n }\n };\n\n const blurHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onBlur, event);\n }\n };\n\n // Prevent the dropdown width from stretching beyond the trigger width\n // if that is going to cause the dropdown to be cropped because of overflow\n const fixStretching = () => {\n const classNameToRemove = styles['stretch-beyond-trigger-width'];\n if (\n open &&\n stretchBeyondTriggerWidth &&\n dropdownRef.current &&\n triggerRef.current &&\n dropdownRef.current.classList.contains(classNameToRemove) &&\n !hasEnoughSpaceToStretchBeyondTriggerWidth({\n triggerElement: triggerRef.current,\n dropdownElement: dropdownRef.current,\n desiredMinWidth: minWidth,\n expandToViewport,\n stretchWidth,\n stretchHeight,\n isMobile,\n })\n ) {\n dropdownRef.current.classList.remove(classNameToRemove);\n }\n };\n\n useResizeObserver(() => dropdownRef.current, fixStretching);\n\n useLayoutEffect(() => {\n const onDropdownOpen = () => {\n if (open && dropdownRef.current && triggerRef.current && verticalContainerRef.current) {\n // calculate scroll width only for dropdowns that has a scrollbar and ignore it for date picker components\n if (scrollable) {\n dropdownRef.current.classList.add(styles.nowrap);\n }\n setDropdownPosition(\n ...calculatePosition(\n dropdownRef.current,\n triggerRef.current,\n verticalContainerRef.current,\n interior,\n expandToViewport,\n preferCenter,\n stretchWidth,\n stretchHeight,\n isMobile,\n minWidth,\n stretchBeyondTriggerWidth\n ),\n dropdownRef.current,\n verticalContainerRef.current\n );\n if (scrollable) {\n dropdownRef.current.classList.remove(styles.nowrap);\n }\n }\n };\n onDropdownOpen();\n\n if (open) {\n // window may scroll when dropdown opens, for example when soft keyboard shows up\n window.addEventListener('scroll', onDropdownOpen);\n // only listen to window scroll within very short time after the dropdown opens\n // do not want to interfere dropdown position on scroll afterwards\n const timeoutId = setTimeout(() => {\n window.removeEventListener('scroll', onDropdownOpen);\n }, 500);\n\n return () => {\n clearTimeout(timeoutId);\n window.removeEventListener('scroll', onDropdownOpen);\n };\n }\n // See AWSUI-13040\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, dropdownRef, triggerRef, verticalContainerRef, interior, stretchWidth, isMobile, contentKey]);\n\n // subscribe to outside click\n useEffect(() => {\n if (!open) {\n return;\n }\n const clickListener = (e: MouseEvent) => {\n if (!dropdownRef.current?.contains(e.target as Node) && !triggerRef.current?.contains(e.target as Node)) {\n fireNonCancelableEvent(onDropdownClose);\n }\n };\n window.addEventListener('click', clickListener, true);\n\n return () => {\n window.removeEventListener('click', clickListener, true);\n };\n }, [open, onDropdownClose]);\n\n // sync dropdown position on scroll and resize\n useLayoutEffect(() => {\n if (!expandToViewport || !open) {\n return;\n }\n const updateDropdownPosition = () => {\n if (triggerRef.current && dropdownRef.current && verticalContainerRef.current) {\n const triggerRect = triggerRef.current.getBoundingClientRect();\n const target = dropdownRef.current;\n if (fixedPosition.current) {\n if (fixedPosition.current.dropUp) {\n dropdownRef.current.style.bottom = `calc(100% - ${triggerRect.top}px)`;\n } else {\n target.style.top = `${triggerRect.bottom}px`;\n }\n if (fixedPosition.current.dropLeft) {\n target.style.left = `calc(${triggerRect.right}px - ${fixedPosition.current.width})`;\n } else {\n target.style.left = `${triggerRect.left}px`;\n }\n }\n }\n };\n\n updateDropdownPosition();\n\n window.addEventListener('scroll', updateDropdownPosition, true);\n window.addEventListener('resize', updateDropdownPosition, true);\n return () => {\n window.removeEventListener('scroll', updateDropdownPosition, true);\n window.removeEventListener('resize', updateDropdownPosition, true);\n };\n }, [open, expandToViewport]);\n\n const referrerId = useUniqueId();\n\n return (\n <div\n className={clsx(\n styles.root,\n interior && styles.interior,\n stretchTriggerHeight && styles['stretch-trigger-height']\n )}\n ref={wrapperRef}\n onFocus={focusHandler}\n onBlur={blurHandler}\n >\n <div id={referrerId} className={clsx(stretchTriggerHeight && styles['stretch-trigger-height'])} ref={triggerRef}>\n {trigger}\n </div>\n\n <TabTrap\n focusNextCallback={() => dropdownRef.current && getFirstFocusable(dropdownRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <DropdownContainer\n renderWithPortal={expandToViewport && !interior}\n id={dropdownId}\n referrerId={referrerId}\n open={open}\n >\n <Transition in={open ?? false} exit={false}>\n {(state, ref) => (\n <div ref={dropdownContainerRef}>\n <TabTrap\n focusNextCallback={() => triggerRef.current && getLastFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <TransitionContent\n state={state}\n transitionRef={ref}\n dropdownClasses={dropdownClasses}\n open={open}\n stretchWidth={stretchWidth}\n interior={interior}\n header={header}\n expandToViewport={expandToViewport}\n stretchBeyondTriggerWidth={stretchBeyondTriggerWidth}\n footer={footer}\n onMouseDown={onMouseDown}\n isRefresh={isRefresh}\n dropdownRef={dropdownRef}\n verticalContainerRef={verticalContainerRef}\n position={position}\n id={dropdownContentId}\n role={dropdownContentRole}\n ariaLabelledby={ariaLabelledby}\n ariaDescribedby={ariaDescribedby}\n >\n {children}\n </TransitionContent>\n\n <TabTrap\n focusNextCallback={() => triggerRef.current && getFirstFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n </div>\n )}\n </Transition>\n </DropdownContainer>\n </div>\n );\n};\n\nconst isInteriorPosition = (\n position: DropdownPosition | InteriorDropdownPosition\n): position is InteriorDropdownPosition => (position as InteriorDropdownPosition).bottom !== undefined;\n\nexport default Dropdown;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAGL,iBAAiB,EACjB,uBAAuB,EACvB,yCAAyC,GAC1C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAoB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,C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M,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,iBAAiB,EACrB,IAAI,EAAE,mBAAmB,EACzB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,IAE/B,QAAQ,CACS;gBAEpB,oBAAC,OAAO,IACN,iBAAiB,EAAE,GAAG,EAAE,WAAC,OAAA,UAAU,CAAC,OAAO,KAAI,MAAA,iBAAiB,CAAC,UAAU,CAAC,OAAO,CAAC,0CAAE,KAAK,EAAE,CAAA,CAAA,EAAA,EAC7F,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,GAC7B,CACE,CACP,CACU,CACK,CAChB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CACzB,QAAqD,EACf,EAAE,CAAE,QAAqC,CAAC,MAAM,KAAK,SAAS,CAAC;AAEvG,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { fireNonCancelableEvent } from '../../events';\nimport { DropdownProps } from './interfaces';\nimport {\n DropdownPosition,\n InteriorDropdownPosition,\n calculatePosition,\n defaultMaxDropdownWidth,\n hasEnoughSpaceToStretchBeyondTriggerWidth,\n} from './dropdown-fit-handler';\nimport { Transition, TransitionStatus } from '../transition';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { usePortalModeClasses } from '../../hooks/use-portal-mode-classes';\nimport { DropdownContextProvider, DropdownContextProviderProps } from './context';\nimport { useMobile } from '../../hooks/use-mobile';\nimport TabTrap from '../tab-trap/index.js';\nimport { getFirstFocusable, getLastFocusable } from '../focus-lock/utils.js';\nimport { useUniqueId } from '../../hooks/use-unique-id/index.js';\nimport customCssProps from '../../generated/custom-css-properties';\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\nimport { nodeBelongs } from '../../utils/node-belongs';\n\ninterface DropdownContainerProps {\n children?: React.ReactNode;\n renderWithPortal?: boolean;\n id?: string;\n referrerId?: string;\n open?: boolean;\n}\n\nconst DropdownContainer = ({ children, renderWithPortal = false, id, referrerId, open }: DropdownContainerProps) => {\n if (renderWithPortal) {\n if (open) {\n return createPortal(\n <div id={id} data-awsui-referrer-id={referrerId}>\n {children}\n </div>,\n document.body\n );\n } else {\n return null;\n }\n } else {\n return <>{children}</>;\n }\n};\n\ninterface TransitionContentProps {\n state: TransitionStatus;\n transitionRef: React.MutableRefObject<any>;\n dropdownClasses: string;\n stretchWidth: boolean;\n interior: boolean;\n isRefresh: boolean;\n dropdownRef: React.RefObject<HTMLDivElement>;\n verticalContainerRef: React.RefObject<HTMLDivElement>;\n expandToViewport?: boolean;\n stretchBeyondTriggerWidth?: boolean;\n header?: React.ReactNode;\n children?: React.ReactNode;\n footer?: React.ReactNode;\n position?: DropdownContextProviderProps['position'];\n open?: boolean;\n onMouseDown?: React.MouseEventHandler<Element>;\n id?: string;\n role?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n}\n\nconst TransitionContent = ({\n state,\n transitionRef,\n dropdownClasses,\n stretchWidth,\n interior,\n isRefresh,\n dropdownRef,\n verticalContainerRef,\n expandToViewport,\n stretchBeyondTriggerWidth,\n header,\n children,\n footer,\n position,\n open,\n onMouseDown,\n id,\n role,\n ariaLabelledby,\n ariaDescribedby,\n}: TransitionContentProps) => {\n const contentRef = useMergeRefs(dropdownRef, transitionRef);\n return (\n <div\n className={clsx(styles.dropdown, dropdownClasses, {\n [styles.open]: open,\n [styles['with-limited-width']]: !stretchWidth,\n [styles['hide-upper-border']]: stretchWidth,\n [styles.interior]: interior,\n [styles.refresh]: isRefresh,\n [styles['use-portal']]: expandToViewport && !interior,\n [styles['stretch-beyond-trigger-width']]: stretchBeyondTriggerWidth,\n })}\n ref={contentRef}\n id={id}\n role={role}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n data-open={open}\n data-animating={state !== 'exited'}\n aria-hidden={!open}\n style={\n stretchBeyondTriggerWidth ? { [customCssProps.dropdownDefaultMaxWidth]: `${defaultMaxDropdownWidth}px` } : {}\n }\n onMouseDown={onMouseDown}\n >\n <div\n className={clsx(\n styles['dropdown-content-wrapper'],\n !header && !children && styles['is-empty'],\n isRefresh && styles.refresh\n )}\n >\n <div ref={verticalContainerRef} className={styles['dropdown-content']}>\n <DropdownContextProvider position={position}>\n {header}\n {children}\n {footer}\n </DropdownContextProvider>\n </div>\n </div>\n </div>\n );\n};\n\nconst Dropdown = ({\n children,\n trigger,\n open,\n onDropdownClose,\n onMouseDown,\n header,\n footer,\n dropdownId,\n stretchTriggerHeight = false,\n stretchWidth = true,\n stretchHeight = false,\n stretchToTriggerWidth = true,\n stretchBeyondTriggerWidth = false,\n expandToViewport = false,\n preferCenter = false,\n interior = false,\n minWidth,\n scrollable = true,\n loopFocus = expandToViewport,\n onFocus,\n onBlur,\n contentKey,\n dropdownContentId,\n dropdownContentRole,\n ariaLabelledby,\n ariaDescribedby,\n}: DropdownProps) => {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const dropdownContainerRef = useRef<HTMLDivElement | null>(null);\n // This container is only needed to apply max-height to. We can't move max-height to it's parent\n // because of an IE11 issue with flexbox. https://github.com/philipwalton/flexbugs/issues/216\n const verticalContainerRef = useRef<HTMLDivElement>(null);\n // To keep track of the initial position (drop up/down) which is kept the same during fixed repositioning\n const fixedPosition = useRef<DropdownPosition | null>(null);\n\n const isRefresh = useVisualRefresh();\n\n const dropdownClasses = usePortalModeClasses(triggerRef);\n const [position, setPosition] = useState<DropdownContextProviderProps['position']>('bottom-right');\n\n const isMobile = useMobile();\n\n const setDropdownPosition = (\n position: DropdownPosition | InteriorDropdownPosition,\n triggerBox: DOMRect,\n target: HTMLDivElement,\n verticalContainer: HTMLDivElement\n ) => {\n const entireWidth = !interior && stretchWidth;\n if (!stretchWidth) {\n // 1px offset for dropdowns where the dropdown itself needs a border, rather than on the items\n verticalContainer.style.maxHeight = `${parseInt(position.height) + 1}px`;\n } else {\n verticalContainer.style.maxHeight = position.height;\n }\n\n if (entireWidth && !expandToViewport) {\n if (stretchToTriggerWidth) {\n target.classList.add(styles['occupy-entire-width']);\n }\n } else {\n target.style.width = position.width;\n }\n\n // Using styles for main dropdown to adjust its position as preferred alternative\n if (position.dropUp && !interior) {\n target.classList.add(styles['dropdown-drop-up']);\n if (!expandToViewport) {\n target.style.bottom = '100%';\n }\n } else {\n target.classList.remove(styles['dropdown-drop-up']);\n }\n target.classList.add(position.dropLeft ? styles['dropdown-drop-left'] : styles['dropdown-drop-right']);\n\n if (position.left && position.left !== 'auto') {\n target.style.left = position.left;\n }\n\n // Position normal overflow dropdowns with fixed positioning relative to viewport\n if (expandToViewport && !interior) {\n target.style.position = 'fixed';\n if (position.dropUp) {\n target.style.bottom = `calc(100% - ${triggerBox.top}px)`;\n } else {\n target.style.top = `${triggerBox.bottom}px`;\n }\n if (position.dropLeft) {\n target.style.left = `calc(${triggerBox.right}px - ${position.width})`;\n } else {\n target.style.left = `${triggerBox.left}px`;\n }\n // Keep track of the initial dropdown position and direction.\n // Dropdown direction doesn't need to change as the user scrolls, just needs to stay attached to the trigger.\n fixedPosition.current = position;\n return;\n }\n\n // For an interior dropdown (the fly out) we need exact values for positioning\n // and classes are not enough\n // usage of relative position is impossible due to overwrite of overflow-x\n if (interior && isInteriorPosition(position)) {\n if (position.dropUp) {\n target.style.bottom = position.bottom;\n } else {\n target.style.top = position.top;\n }\n target.style.left = position.left;\n }\n\n if (position.dropUp && position.dropLeft) {\n setPosition('top-left');\n } else if (position.dropUp) {\n setPosition('top-right');\n } else if (position.dropLeft) {\n setPosition('bottom-left');\n } else {\n setPosition('bottom-right');\n }\n };\n\n const isOutsideDropdown = (element: Element) =>\n (!wrapperRef.current || !nodeBelongs(wrapperRef.current, element)) &&\n (!dropdownContainerRef.current || !nodeBelongs(dropdownContainerRef.current, element));\n\n const focusHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onFocus, event);\n }\n };\n\n const blurHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onBlur, event);\n }\n };\n\n // Prevent the dropdown width from stretching beyond the trigger width\n // if that is going to cause the dropdown to be cropped because of overflow\n const fixStretching = () => {\n const classNameToRemove = styles['stretch-beyond-trigger-width'];\n if (\n open &&\n stretchBeyondTriggerWidth &&\n dropdownRef.current &&\n triggerRef.current &&\n dropdownRef.current.classList.contains(classNameToRemove) &&\n !hasEnoughSpaceToStretchBeyondTriggerWidth({\n triggerElement: triggerRef.current,\n dropdownElement: dropdownRef.current,\n desiredMinWidth: minWidth,\n expandToViewport,\n stretchWidth,\n stretchHeight,\n isMobile,\n })\n ) {\n dropdownRef.current.classList.remove(classNameToRemove);\n }\n };\n\n useResizeObserver(() => dropdownRef.current, fixStretching);\n\n useLayoutEffect(() => {\n const onDropdownOpen = () => {\n if (open && dropdownRef.current && triggerRef.current && verticalContainerRef.current) {\n // calculate scroll width only for dropdowns that has a scrollbar and ignore it for date picker components\n if (scrollable) {\n dropdownRef.current.classList.add(styles.nowrap);\n }\n setDropdownPosition(\n ...calculatePosition(\n dropdownRef.current,\n triggerRef.current,\n verticalContainerRef.current,\n interior,\n expandToViewport,\n preferCenter,\n stretchWidth,\n stretchHeight,\n isMobile,\n minWidth,\n stretchBeyondTriggerWidth\n ),\n dropdownRef.current,\n verticalContainerRef.current\n );\n if (scrollable) {\n dropdownRef.current.classList.remove(styles.nowrap);\n }\n }\n };\n onDropdownOpen();\n\n if (open) {\n // window may scroll when dropdown opens, for example when soft keyboard shows up\n window.addEventListener('scroll', onDropdownOpen);\n // only listen to window scroll within very short time after the dropdown opens\n // do not want to interfere dropdown position on scroll afterwards\n const timeoutId = setTimeout(() => {\n window.removeEventListener('scroll', onDropdownOpen);\n }, 500);\n\n return () => {\n clearTimeout(timeoutId);\n window.removeEventListener('scroll', onDropdownOpen);\n };\n }\n // See AWSUI-13040\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, dropdownRef, triggerRef, verticalContainerRef, interior, stretchWidth, isMobile, contentKey]);\n\n // subscribe to outside click\n useEffect(() => {\n if (!open) {\n return;\n }\n const clickListener = (e: MouseEvent) => {\n if (!nodeBelongs(dropdownRef.current, e.target) && !nodeBelongs(triggerRef.current, e.target)) {\n fireNonCancelableEvent(onDropdownClose);\n }\n };\n window.addEventListener('click', clickListener, true);\n\n return () => {\n window.removeEventListener('click', clickListener, true);\n };\n }, [open, onDropdownClose]);\n\n // sync dropdown position on scroll and resize\n useLayoutEffect(() => {\n if (!expandToViewport || !open) {\n return;\n }\n const updateDropdownPosition = () => {\n if (triggerRef.current && dropdownRef.current && verticalContainerRef.current) {\n const triggerRect = triggerRef.current.getBoundingClientRect();\n const target = dropdownRef.current;\n if (fixedPosition.current) {\n if (fixedPosition.current.dropUp) {\n dropdownRef.current.style.bottom = `calc(100% - ${triggerRect.top}px)`;\n } else {\n target.style.top = `${triggerRect.bottom}px`;\n }\n if (fixedPosition.current.dropLeft) {\n target.style.left = `calc(${triggerRect.right}px - ${fixedPosition.current.width})`;\n } else {\n target.style.left = `${triggerRect.left}px`;\n }\n }\n }\n };\n\n updateDropdownPosition();\n\n window.addEventListener('scroll', updateDropdownPosition, true);\n window.addEventListener('resize', updateDropdownPosition, true);\n return () => {\n window.removeEventListener('scroll', updateDropdownPosition, true);\n window.removeEventListener('resize', updateDropdownPosition, true);\n };\n }, [open, expandToViewport]);\n\n const referrerId = useUniqueId();\n\n return (\n <div\n className={clsx(\n styles.root,\n interior && styles.interior,\n stretchTriggerHeight && styles['stretch-trigger-height']\n )}\n ref={wrapperRef}\n onFocus={focusHandler}\n onBlur={blurHandler}\n >\n <div id={referrerId} className={clsx(stretchTriggerHeight && styles['stretch-trigger-height'])} ref={triggerRef}>\n {trigger}\n </div>\n\n <TabTrap\n focusNextCallback={() => dropdownRef.current && getFirstFocusable(dropdownRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <DropdownContainer\n renderWithPortal={expandToViewport && !interior}\n id={dropdownId}\n referrerId={referrerId}\n open={open}\n >\n <Transition in={open ?? false} exit={false}>\n {(state, ref) => (\n <div ref={dropdownContainerRef}>\n <TabTrap\n focusNextCallback={() => triggerRef.current && getLastFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <TransitionContent\n state={state}\n transitionRef={ref}\n dropdownClasses={dropdownClasses}\n open={open}\n stretchWidth={stretchWidth}\n interior={interior}\n header={header}\n expandToViewport={expandToViewport}\n stretchBeyondTriggerWidth={stretchBeyondTriggerWidth}\n footer={footer}\n onMouseDown={onMouseDown}\n isRefresh={isRefresh}\n dropdownRef={dropdownRef}\n verticalContainerRef={verticalContainerRef}\n position={position}\n id={dropdownContentId}\n role={dropdownContentRole}\n ariaLabelledby={ariaLabelledby}\n ariaDescribedby={ariaDescribedby}\n >\n {children}\n </TransitionContent>\n\n <TabTrap\n focusNextCallback={() => triggerRef.current && getFirstFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n </div>\n )}\n </Transition>\n </DropdownContainer>\n </div>\n );\n};\n\nconst isInteriorPosition = (\n position: DropdownPosition | InteriorDropdownPosition\n): position is InteriorDropdownPosition => (position as InteriorDropdownPosition).bottom !== undefined;\n\nexport default Dropdown;\n"]}
@@ -1,25 +1,25 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "dropdown-content-wrapper": "awsui_dropdown-content-wrapper_qwoo0_17uqe_99",
5
- "awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-dropdown_qwoo0_17uqe_1",
6
- "refresh": "awsui_refresh_qwoo0_17uqe_120",
7
- "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_qwoo0_17uqe_1",
8
- "root": "awsui_root_qwoo0_17uqe_149",
9
- "interior": "awsui_interior_qwoo0_17uqe_185",
10
- "dropdown": "awsui_dropdown_qwoo0_17uqe_99",
11
- "use-portal": "awsui_use-portal_qwoo0_17uqe_196",
12
- "is-empty": "awsui_is-empty_qwoo0_17uqe_249",
13
- "dropdown-drop-up": "awsui_dropdown-drop-up_qwoo0_17uqe_252",
14
- "with-limited-width": "awsui_with-limited-width_qwoo0_17uqe_256",
15
- "dropdown-drop-left": "awsui_dropdown-drop-left_qwoo0_17uqe_259",
16
- "dropdown-drop-right": "awsui_dropdown-drop-right_qwoo0_17uqe_265",
17
- "occupy-entire-width": "awsui_occupy-entire-width_qwoo0_17uqe_271",
18
- "stretch-beyond-trigger-width": "awsui_stretch-beyond-trigger-width_qwoo0_17uqe_274",
19
- "hide-upper-border": "awsui_hide-upper-border_qwoo0_17uqe_278",
20
- "open": "awsui_open_qwoo0_17uqe_285",
21
- "nowrap": "awsui_nowrap_qwoo0_17uqe_294",
22
- "dropdown-content": "awsui_dropdown-content_qwoo0_17uqe_99",
23
- "stretch-trigger-height": "awsui_stretch-trigger-height_qwoo0_17uqe_305"
4
+ "dropdown-content-wrapper": "awsui_dropdown-content-wrapper_qwoo0_316ld_99",
5
+ "awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-dropdown_qwoo0_316ld_1",
6
+ "refresh": "awsui_refresh_qwoo0_316ld_120",
7
+ "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_qwoo0_316ld_1",
8
+ "root": "awsui_root_qwoo0_316ld_149",
9
+ "interior": "awsui_interior_qwoo0_316ld_185",
10
+ "dropdown": "awsui_dropdown_qwoo0_316ld_99",
11
+ "use-portal": "awsui_use-portal_qwoo0_316ld_196",
12
+ "is-empty": "awsui_is-empty_qwoo0_316ld_249",
13
+ "dropdown-drop-up": "awsui_dropdown-drop-up_qwoo0_316ld_252",
14
+ "with-limited-width": "awsui_with-limited-width_qwoo0_316ld_256",
15
+ "dropdown-drop-left": "awsui_dropdown-drop-left_qwoo0_316ld_259",
16
+ "dropdown-drop-right": "awsui_dropdown-drop-right_qwoo0_316ld_265",
17
+ "occupy-entire-width": "awsui_occupy-entire-width_qwoo0_316ld_271",
18
+ "stretch-beyond-trigger-width": "awsui_stretch-beyond-trigger-width_qwoo0_316ld_274",
19
+ "hide-upper-border": "awsui_hide-upper-border_qwoo0_316ld_278",
20
+ "open": "awsui_open_qwoo0_316ld_285",
21
+ "nowrap": "awsui_nowrap_qwoo0_316ld_294",
22
+ "dropdown-content": "awsui_dropdown-content_qwoo0_316ld_99",
23
+ "stretch-trigger-height": "awsui_stretch-trigger-height_qwoo0_316ld_305"
24
24
  };
25
25