@cloudscape-design/components 3.0.533 → 3.0.535

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 (409) hide show
  1. package/alert/styles.css.js +25 -25
  2. package/alert/styles.scoped.css +45 -39
  3. package/alert/styles.selectors.js +25 -25
  4. package/anchor-navigation/styles.css.js +8 -8
  5. package/anchor-navigation/styles.scoped.css +24 -18
  6. package/anchor-navigation/styles.selectors.js +8 -8
  7. package/annotation-context/annotation/styles.css.js +24 -24
  8. package/annotation-context/annotation/styles.scoped.css +36 -30
  9. package/annotation-context/annotation/styles.selectors.js +24 -24
  10. package/app-layout/content-wrapper/styles.css.js +3 -3
  11. package/app-layout/content-wrapper/styles.scoped.css +12 -6
  12. package/app-layout/content-wrapper/styles.selectors.js +3 -3
  13. package/app-layout/drawer/styles.css.js +12 -12
  14. package/app-layout/drawer/styles.scoped.css +26 -20
  15. package/app-layout/drawer/styles.selectors.js +12 -12
  16. package/app-layout/mobile-toolbar/styles.css.js +8 -8
  17. package/app-layout/mobile-toolbar/styles.scoped.css +14 -8
  18. package/app-layout/mobile-toolbar/styles.selectors.js +8 -8
  19. package/app-layout/notifications/styles.css.js +3 -3
  20. package/app-layout/notifications/styles.scoped.css +7 -7
  21. package/app-layout/notifications/styles.selectors.js +3 -3
  22. package/app-layout/split-panel/styles.css.js +2 -2
  23. package/app-layout/split-panel/styles.scoped.css +8 -2
  24. package/app-layout/split-panel/styles.selectors.js +2 -2
  25. package/app-layout/styles.css.js +16 -16
  26. package/app-layout/styles.scoped.css +25 -19
  27. package/app-layout/styles.selectors.js +16 -16
  28. package/app-layout/toggles/styles.css.js +2 -2
  29. package/app-layout/toggles/styles.scoped.css +12 -6
  30. package/app-layout/toggles/styles.selectors.js +2 -2
  31. package/app-layout/visual-refresh/styles.css.js +81 -81
  32. package/app-layout/visual-refresh/styles.scoped.css +294 -288
  33. package/app-layout/visual-refresh/styles.selectors.js +81 -81
  34. package/area-chart/styles.css.js +6 -6
  35. package/area-chart/styles.scoped.css +15 -9
  36. package/area-chart/styles.selectors.js +6 -6
  37. package/attribute-editor/styles.css.js +14 -14
  38. package/attribute-editor/styles.scoped.css +30 -24
  39. package/attribute-editor/styles.selectors.js +14 -14
  40. package/autosuggest/autosuggest-option.d.ts +0 -1
  41. package/autosuggest/autosuggest-option.d.ts.map +1 -1
  42. package/autosuggest/autosuggest-option.js +2 -4
  43. package/autosuggest/autosuggest-option.js.map +1 -1
  44. package/autosuggest/internal.d.ts.map +1 -1
  45. package/autosuggest/internal.js +2 -5
  46. package/autosuggest/internal.js.map +1 -1
  47. package/autosuggest/options-controller.d.ts +2 -1
  48. package/autosuggest/options-controller.d.ts.map +1 -1
  49. package/autosuggest/options-controller.js +15 -3
  50. package/autosuggest/options-controller.js.map +1 -1
  51. package/autosuggest/options-list.d.ts +2 -2
  52. package/autosuggest/options-list.d.ts.map +1 -1
  53. package/autosuggest/options-list.js +2 -2
  54. package/autosuggest/options-list.js.map +1 -1
  55. package/autosuggest/plain-list.d.ts +2 -3
  56. package/autosuggest/plain-list.d.ts.map +1 -1
  57. package/autosuggest/plain-list.js +2 -2
  58. package/autosuggest/plain-list.js.map +1 -1
  59. package/autosuggest/virtual-list.d.ts +1 -1
  60. package/autosuggest/virtual-list.d.ts.map +1 -1
  61. package/autosuggest/virtual-list.js +2 -2
  62. package/autosuggest/virtual-list.js.map +1 -1
  63. package/badge/styles.css.js +5 -5
  64. package/badge/styles.scoped.css +11 -5
  65. package/badge/styles.selectors.js +5 -5
  66. package/box/styles.css.js +190 -190
  67. package/box/styles.scoped.css +253 -235
  68. package/box/styles.selectors.js +190 -190
  69. package/breadcrumb-group/item/styles.css.js +9 -9
  70. package/breadcrumb-group/item/styles.scoped.css +23 -17
  71. package/breadcrumb-group/item/styles.selectors.js +9 -9
  72. package/breadcrumb-group/styles.css.js +7 -7
  73. package/breadcrumb-group/styles.scoped.css +18 -12
  74. package/breadcrumb-group/styles.selectors.js +7 -7
  75. package/button/styles.css.js +20 -20
  76. package/button/styles.scoped.css +157 -151
  77. package/button/styles.selectors.js +20 -20
  78. package/button-dropdown/category-elements/styles.css.js +13 -13
  79. package/button-dropdown/category-elements/styles.scoped.css +29 -23
  80. package/button-dropdown/category-elements/styles.selectors.js +13 -13
  81. package/button-dropdown/item-element/styles.css.js +15 -15
  82. package/button-dropdown/item-element/styles.scoped.css +24 -18
  83. package/button-dropdown/item-element/styles.selectors.js +15 -15
  84. package/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
  85. package/button-dropdown/mobile-expandable-group/styles.scoped.css +11 -5
  86. package/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
  87. package/button-dropdown/styles.css.js +15 -15
  88. package/button-dropdown/styles.scoped.css +28 -22
  89. package/button-dropdown/styles.selectors.js +15 -15
  90. package/calendar/styles.css.js +18 -18
  91. package/calendar/styles.scoped.css +44 -38
  92. package/calendar/styles.selectors.js +18 -18
  93. package/cards/styles.css.js +40 -40
  94. package/cards/styles.scoped.css +56 -50
  95. package/cards/styles.selectors.js +40 -40
  96. package/checkbox/styles.css.js +3 -3
  97. package/checkbox/styles.scoped.css +11 -5
  98. package/checkbox/styles.selectors.js +3 -3
  99. package/code-editor/styles.css.js +32 -32
  100. package/code-editor/styles.scoped.css +135 -129
  101. package/code-editor/styles.selectors.js +32 -32
  102. package/collection-preferences/content-display/styles.css.js +11 -11
  103. package/collection-preferences/content-display/styles.scoped.css +29 -17
  104. package/collection-preferences/content-display/styles.selectors.js +11 -11
  105. package/collection-preferences/styles.css.js +37 -37
  106. package/collection-preferences/styles.scoped.css +68 -44
  107. package/collection-preferences/styles.selectors.js +37 -37
  108. package/column-layout/styles.css.js +13 -13
  109. package/column-layout/styles.scoped.css +49 -43
  110. package/column-layout/styles.selectors.js +13 -13
  111. package/container/styles.css.js +30 -30
  112. package/container/styles.scoped.css +60 -54
  113. package/container/styles.selectors.js +30 -30
  114. package/content-layout/styles.css.js +7 -7
  115. package/content-layout/styles.scoped.css +19 -13
  116. package/content-layout/styles.selectors.js +7 -7
  117. package/date-picker/styles.css.js +7 -7
  118. package/date-picker/styles.scoped.css +15 -9
  119. package/date-picker/styles.selectors.js +7 -7
  120. package/date-range-picker/calendar/grids/styles.css.js +25 -25
  121. package/date-range-picker/calendar/grids/styles.scoped.css +48 -42
  122. package/date-range-picker/calendar/grids/styles.selectors.js +25 -25
  123. package/date-range-picker/relative-range/styles.css.js +9 -9
  124. package/date-range-picker/relative-range/styles.scoped.css +19 -13
  125. package/date-range-picker/relative-range/styles.selectors.js +9 -9
  126. package/date-range-picker/styles.css.js +39 -39
  127. package/date-range-picker/styles.scoped.css +54 -48
  128. package/date-range-picker/styles.selectors.js +39 -39
  129. package/drawer/styles.css.js +3 -3
  130. package/drawer/styles.scoped.css +14 -8
  131. package/drawer/styles.selectors.js +3 -3
  132. package/expandable-section/styles.css.js +32 -32
  133. package/expandable-section/styles.scoped.css +68 -62
  134. package/expandable-section/styles.selectors.js +32 -32
  135. package/file-upload/dropzone/styles.css.js +2 -2
  136. package/file-upload/dropzone/styles.scoped.css +8 -2
  137. package/file-upload/dropzone/styles.selectors.js +2 -2
  138. package/file-upload/file-input/styles.css.js +4 -4
  139. package/file-upload/file-input/styles.scoped.css +13 -7
  140. package/file-upload/file-input/styles.selectors.js +4 -4
  141. package/flashbar/styles.css.js +47 -47
  142. package/flashbar/styles.scoped.css +177 -171
  143. package/flashbar/styles.selectors.js +47 -47
  144. package/form/styles.css.js +9 -9
  145. package/form/styles.scoped.css +14 -8
  146. package/form/styles.selectors.js +9 -9
  147. package/form-field/styles.css.js +19 -19
  148. package/form-field/styles.scoped.css +35 -29
  149. package/form-field/styles.selectors.js +19 -19
  150. package/grid/styles.css.js +53 -53
  151. package/grid/styles.scoped.css +60 -54
  152. package/grid/styles.selectors.js +53 -53
  153. package/header/styles.css.js +34 -34
  154. package/header/styles.scoped.css +80 -50
  155. package/header/styles.selectors.js +34 -34
  156. package/help-panel/styles.css.js +4 -4
  157. package/help-panel/styles.scoped.css +69 -63
  158. package/help-panel/styles.selectors.js +4 -4
  159. package/hotspot/styles.css.js +7 -7
  160. package/hotspot/styles.scoped.css +13 -7
  161. package/hotspot/styles.selectors.js +7 -7
  162. package/icon/internal.d.ts.map +1 -1
  163. package/icon/internal.js +1 -1
  164. package/icon/internal.js.map +1 -1
  165. package/icon/styles.css.js +36 -21
  166. package/icon/styles.scoped.css +92 -48
  167. package/icon/styles.selectors.js +36 -21
  168. package/input/styles.css.js +12 -12
  169. package/input/styles.scoped.css +36 -30
  170. package/input/styles.selectors.js +12 -12
  171. package/internal/components/abstract-switch/styles.css.js +13 -13
  172. package/internal/components/abstract-switch/styles.scoped.css +26 -20
  173. package/internal/components/abstract-switch/styles.selectors.js +13 -13
  174. package/internal/components/button-trigger/styles.css.js +10 -10
  175. package/internal/components/button-trigger/styles.scoped.css +30 -24
  176. package/internal/components/button-trigger/styles.selectors.js +10 -10
  177. package/internal/components/chart-filter/styles.css.js +3 -3
  178. package/internal/components/chart-filter/styles.scoped.css +9 -3
  179. package/internal/components/chart-filter/styles.selectors.js +3 -3
  180. package/internal/components/chart-legend/styles.css.js +6 -6
  181. package/internal/components/chart-legend/styles.scoped.css +21 -15
  182. package/internal/components/chart-legend/styles.selectors.js +6 -6
  183. package/internal/components/chart-plot/styles.css.js +5 -5
  184. package/internal/components/chart-plot/styles.scoped.css +11 -5
  185. package/internal/components/chart-plot/styles.selectors.js +5 -5
  186. package/internal/components/chart-popover/styles.css.js +3 -3
  187. package/internal/components/chart-popover/styles.scoped.css +9 -3
  188. package/internal/components/chart-popover/styles.selectors.js +3 -3
  189. package/internal/components/chart-series-details/styles.css.js +20 -20
  190. package/internal/components/chart-series-details/styles.scoped.css +39 -33
  191. package/internal/components/chart-series-details/styles.selectors.js +20 -20
  192. package/internal/components/chart-series-marker/styles.css.js +5 -5
  193. package/internal/components/chart-series-marker/styles.scoped.css +13 -7
  194. package/internal/components/chart-series-marker/styles.selectors.js +5 -5
  195. package/internal/components/chart-wrapper/styles.css.js +9 -9
  196. package/internal/components/chart-wrapper/styles.scoped.css +15 -9
  197. package/internal/components/chart-wrapper/styles.selectors.js +9 -9
  198. package/internal/components/checkbox-icon/styles.css.js +7 -7
  199. package/internal/components/checkbox-icon/styles.scoped.css +14 -8
  200. package/internal/components/checkbox-icon/styles.selectors.js +7 -7
  201. package/internal/components/dropdown/styles.css.js +20 -20
  202. package/internal/components/dropdown/styles.scoped.css +62 -36
  203. package/internal/components/dropdown/styles.selectors.js +20 -20
  204. package/internal/components/dropdown-footer/styles.css.js +3 -3
  205. package/internal/components/dropdown-footer/styles.scoped.css +9 -3
  206. package/internal/components/dropdown-footer/styles.selectors.js +3 -3
  207. package/internal/components/dropdown-status/styles.css.js +2 -2
  208. package/internal/components/dropdown-status/styles.scoped.css +8 -2
  209. package/internal/components/dropdown-status/styles.selectors.js +2 -2
  210. package/internal/components/filtering-token/styles.css.js +7 -7
  211. package/internal/components/filtering-token/styles.scoped.css +19 -13
  212. package/internal/components/filtering-token/styles.selectors.js +7 -7
  213. package/internal/components/handle/styles.css.js +2 -2
  214. package/internal/components/handle/styles.scoped.css +12 -6
  215. package/internal/components/handle/styles.selectors.js +2 -2
  216. package/internal/components/menu-dropdown/styles.css.js +7 -7
  217. package/internal/components/menu-dropdown/styles.scoped.css +19 -13
  218. package/internal/components/menu-dropdown/styles.selectors.js +7 -7
  219. package/internal/components/option/styles.css.js +17 -17
  220. package/internal/components/option/styles.scoped.css +35 -29
  221. package/internal/components/option/styles.selectors.js +17 -17
  222. package/internal/components/options-list/styles.css.js +2 -2
  223. package/internal/components/options-list/styles.scoped.css +8 -2
  224. package/internal/components/options-list/styles.selectors.js +2 -2
  225. package/internal/components/screenreader-only/styles.css.js +1 -1
  226. package/internal/components/screenreader-only/styles.scoped.css +7 -1
  227. package/internal/components/screenreader-only/styles.selectors.js +1 -1
  228. package/internal/components/selectable-item/styles.css.js +16 -16
  229. package/internal/components/selectable-item/styles.scoped.css +35 -29
  230. package/internal/components/selectable-item/styles.selectors.js +16 -16
  231. package/internal/components/token-list/styles.css.js +9 -9
  232. package/internal/components/token-list/styles.scoped.css +26 -20
  233. package/internal/components/token-list/styles.selectors.js +9 -9
  234. package/internal/context/single-tab-stop-navigation-context.js +1 -1
  235. package/internal/context/single-tab-stop-navigation-context.js.map +1 -1
  236. package/internal/environment.js +1 -1
  237. package/internal/environment.json +1 -1
  238. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  239. package/internal/generated/custom-css-properties/index.js +46 -40
  240. package/internal/generated/custom-css-properties/index.js.map +1 -1
  241. package/internal/manifest.json +1 -1
  242. package/internal/utils/scrollable-containers.d.ts +1 -1
  243. package/internal/utils/scrollable-containers.js +1 -1
  244. package/internal/utils/scrollable-containers.js.map +1 -1
  245. package/link/styles.css.js +20 -20
  246. package/link/styles.scoped.css +77 -71
  247. package/link/styles.selectors.js +20 -20
  248. package/mixed-line-bar-chart/styles.css.js +11 -11
  249. package/mixed-line-bar-chart/styles.scoped.css +23 -17
  250. package/mixed-line-bar-chart/styles.selectors.js +11 -11
  251. package/modal/styles.css.js +23 -23
  252. package/modal/styles.scoped.css +44 -38
  253. package/modal/styles.selectors.js +23 -23
  254. package/multiselect/styles.css.js +2 -2
  255. package/multiselect/styles.scoped.css +8 -2
  256. package/multiselect/styles.selectors.js +2 -2
  257. package/package.json +1 -1
  258. package/pagination/styles.css.js +9 -9
  259. package/pagination/styles.scoped.css +29 -23
  260. package/pagination/styles.selectors.js +9 -9
  261. package/pie-chart/styles.css.js +27 -27
  262. package/pie-chart/styles.scoped.css +54 -48
  263. package/pie-chart/styles.selectors.js +27 -27
  264. package/popover/styles.css.js +50 -50
  265. package/popover/styles.scoped.css +94 -64
  266. package/popover/styles.selectors.js +50 -50
  267. package/progress-bar/styles.css.js +18 -18
  268. package/progress-bar/styles.scoped.css +44 -32
  269. package/progress-bar/styles.selectors.js +18 -18
  270. package/property-filter/property-filter-autosuggest.js +2 -1
  271. package/property-filter/property-filter-autosuggest.js.map +1 -1
  272. package/property-filter/styles.css.js +31 -31
  273. package/property-filter/styles.scoped.css +39 -33
  274. package/property-filter/styles.selectors.js +31 -31
  275. package/radio-group/styles.css.js +9 -9
  276. package/radio-group/styles.scoped.css +21 -15
  277. package/radio-group/styles.selectors.js +9 -9
  278. package/segmented-control/styles.css.js +14 -14
  279. package/segmented-control/styles.scoped.css +39 -33
  280. package/segmented-control/styles.selectors.js +14 -14
  281. package/select/parts/styles.css.js +16 -16
  282. package/select/parts/styles.scoped.css +22 -16
  283. package/select/parts/styles.selectors.js +16 -16
  284. package/select/styles.css.js +1 -1
  285. package/select/styles.scoped.css +7 -1
  286. package/select/styles.selectors.js +1 -1
  287. package/side-navigation/styles.css.js +28 -28
  288. package/side-navigation/styles.scoped.css +44 -38
  289. package/side-navigation/styles.selectors.js +28 -28
  290. package/space-between/styles.css.js +23 -23
  291. package/space-between/styles.scoped.css +30 -24
  292. package/space-between/styles.selectors.js +23 -23
  293. package/spinner/styles.css.js +13 -13
  294. package/spinner/styles.scoped.css +58 -26
  295. package/spinner/styles.selectors.js +13 -13
  296. package/split-panel/styles.css.js +55 -55
  297. package/split-panel/styles.scoped.css +87 -75
  298. package/split-panel/styles.selectors.js +55 -55
  299. package/status-indicator/styles.css.js +23 -23
  300. package/status-indicator/styles.scoped.css +35 -29
  301. package/status-indicator/styles.selectors.js +23 -23
  302. package/table/body-cell/disabled-inline-editor.d.ts.map +1 -1
  303. package/table/body-cell/disabled-inline-editor.js +3 -1
  304. package/table/body-cell/disabled-inline-editor.js.map +1 -1
  305. package/table/body-cell/index.d.ts.map +1 -1
  306. package/table/body-cell/index.js +3 -1
  307. package/table/body-cell/index.js.map +1 -1
  308. package/table/body-cell/styles.css.js +30 -30
  309. package/table/body-cell/styles.scoped.css +107 -77
  310. package/table/body-cell/styles.selectors.js +30 -30
  311. package/table/body-cell/td-element.d.ts.map +1 -1
  312. package/table/body-cell/td-element.js +6 -3
  313. package/table/body-cell/td-element.js.map +1 -1
  314. package/table/header-cell/index.d.ts.map +1 -1
  315. package/table/header-cell/index.js +7 -4
  316. package/table/header-cell/index.js.map +1 -1
  317. package/table/header-cell/styles.css.js +24 -24
  318. package/table/header-cell/styles.scoped.css +86 -38
  319. package/table/header-cell/styles.selectors.js +24 -24
  320. package/table/header-cell/th-element.d.ts +2 -1
  321. package/table/header-cell/th-element.d.ts.map +1 -1
  322. package/table/header-cell/th-element.js +9 -5
  323. package/table/header-cell/th-element.js.map +1 -1
  324. package/table/interfaces.d.ts +5 -0
  325. package/table/interfaces.d.ts.map +1 -1
  326. package/table/interfaces.js.map +1 -1
  327. package/table/internal.d.ts.map +1 -1
  328. package/table/internal.js +53 -45
  329. package/table/internal.js.map +1 -1
  330. package/table/no-data-cell.js +1 -1
  331. package/table/no-data-cell.js.map +1 -1
  332. package/table/resizer/index.d.ts.map +1 -1
  333. package/table/resizer/index.js +4 -2
  334. package/table/resizer/index.js.map +1 -1
  335. package/table/resizer/styles.css.js +8 -8
  336. package/table/resizer/styles.scoped.css +20 -14
  337. package/table/resizer/styles.selectors.js +8 -8
  338. package/table/selection/selection-control.d.ts +3 -1
  339. package/table/selection/selection-control.d.ts.map +1 -1
  340. package/table/selection/selection-control.js +2 -2
  341. package/table/selection/selection-control.js.map +1 -1
  342. package/table/selection/styles.css.js +3 -3
  343. package/table/selection/styles.scoped.css +9 -3
  344. package/table/selection/styles.selectors.js +3 -3
  345. package/table/sticky-scrollbar/styles.css.js +6 -6
  346. package/table/sticky-scrollbar/styles.scoped.css +13 -7
  347. package/table/sticky-scrollbar/styles.selectors.js +6 -6
  348. package/table/styles.css.js +35 -35
  349. package/table/styles.scoped.css +46 -40
  350. package/table/styles.selectors.js +35 -35
  351. package/table/table-role/grid-navigation.d.ts.map +1 -1
  352. package/table/table-role/grid-navigation.js +38 -24
  353. package/table/table-role/grid-navigation.js.map +1 -1
  354. package/table/table-role/table-role-helper.d.ts.map +1 -1
  355. package/table/table-role/table-role-helper.js +1 -3
  356. package/table/table-role/table-role-helper.js.map +1 -1
  357. package/table/table-role/utils.d.ts +1 -0
  358. package/table/table-role/utils.d.ts.map +1 -1
  359. package/table/table-role/utils.js +7 -2
  360. package/table/table-role/utils.js.map +1 -1
  361. package/table/thead.d.ts.map +1 -1
  362. package/table/thead.js +2 -2
  363. package/table/thead.js.map +1 -1
  364. package/table/use-table-focus-navigation.d.ts +9 -1
  365. package/table/use-table-focus-navigation.d.ts.map +1 -1
  366. package/table/use-table-focus-navigation.js +3 -3
  367. package/table/use-table-focus-navigation.js.map +1 -1
  368. package/tabs/styles.css.js +21 -21
  369. package/tabs/styles.scoped.css +51 -39
  370. package/tabs/styles.selectors.js +21 -21
  371. package/tag-editor/styles.css.js +3 -3
  372. package/tag-editor/styles.scoped.css +16 -10
  373. package/tag-editor/styles.selectors.js +3 -3
  374. package/text-content/styles.css.js +1 -1
  375. package/text-content/styles.scoped.css +66 -60
  376. package/text-content/styles.selectors.js +1 -1
  377. package/text-filter/styles.css.js +3 -3
  378. package/text-filter/styles.scoped.css +9 -3
  379. package/text-filter/styles.selectors.js +3 -3
  380. package/textarea/styles.css.js +4 -4
  381. package/textarea/styles.scoped.css +18 -12
  382. package/textarea/styles.selectors.js +4 -4
  383. package/tiles/styles.css.js +29 -29
  384. package/tiles/styles.scoped.css +76 -70
  385. package/tiles/styles.selectors.js +29 -29
  386. package/toggle/styles.css.js +8 -8
  387. package/toggle/styles.scoped.css +19 -13
  388. package/toggle/styles.selectors.js +8 -8
  389. package/token-group/styles.css.js +8 -8
  390. package/token-group/styles.scoped.css +22 -16
  391. package/token-group/styles.selectors.js +8 -8
  392. package/top-navigation/1.0-beta/styles.css.js +25 -25
  393. package/top-navigation/1.0-beta/styles.scoped.css +48 -42
  394. package/top-navigation/1.0-beta/styles.selectors.js +25 -25
  395. package/top-navigation/styles.css.js +47 -47
  396. package/top-navigation/styles.scoped.css +72 -66
  397. package/top-navigation/styles.selectors.js +47 -47
  398. package/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
  399. package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +27 -21
  400. package/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
  401. package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
  402. package/tutorial-panel/components/tutorial-list/styles.scoped.css +33 -27
  403. package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
  404. package/tutorial-panel/styles.css.js +1 -1
  405. package/tutorial-panel/styles.scoped.css +7 -1
  406. package/tutorial-panel/styles.selectors.js +1 -1
  407. package/wizard/styles.css.js +32 -32
  408. package/wizard/styles.scoped.css +74 -68
  409. package/wizard/styles.selectors.js +32 -32
@@ -2,6 +2,12 @@
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 */
7
+ /*
8
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
9
+ SPDX-License-Identifier: Apache-2.0
10
+ */
5
11
  /*
6
12
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
13
  SPDX-License-Identifier: Apache-2.0
@@ -94,11 +100,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
94
100
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
101
  SPDX-License-Identifier: Apache-2.0
96
102
  */
97
- .awsui_icon-shake_1cbgc_1xaa1_97:not(#\9) {
103
+ .awsui_icon-shake_1cbgc_1xj48_103:not(#\9) {
98
104
  display: inline-block;
99
- animation: awsui_awsui-motion-shake-horizontally_1cbgc_1xaa1_1 var(--motion-duration-refresh-only-medium-nf6485, 165ms);
105
+ animation: awsui_awsui-motion-shake-horizontally_1cbgc_1xj48_1 var(--motion-duration-refresh-only-medium-nf6485, 165ms);
100
106
  }
101
- @keyframes awsui_awsui-motion-shake-horizontally_1cbgc_1xaa1_1 {
107
+ @keyframes awsui_awsui-motion-shake-horizontally_1cbgc_1xj48_1 {
102
108
  0% {
103
109
  transform: translateX(-5px);
104
110
  animation-timing-function: linear;
@@ -112,20 +118,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
112
118
  }
113
119
  }
114
120
  @media (prefers-reduced-motion: reduce) {
115
- .awsui_icon-shake_1cbgc_1xaa1_97:not(#\9) {
121
+ .awsui_icon-shake_1cbgc_1xj48_103:not(#\9) {
116
122
  animation: none;
117
123
  transition: none;
118
124
  }
119
125
  }
120
- .awsui-motion-disabled .awsui_icon-shake_1cbgc_1xaa1_97:not(#\9), .awsui-mode-entering .awsui_icon-shake_1cbgc_1xaa1_97:not(#\9) {
126
+ .awsui-motion-disabled .awsui_icon-shake_1cbgc_1xj48_103:not(#\9), .awsui-mode-entering .awsui_icon-shake_1cbgc_1xj48_103:not(#\9) {
121
127
  animation: none;
122
128
  transition: none;
123
129
  }
124
130
 
125
- .awsui_container-fade-in_1cbgc_1xaa1_125:not(#\9) {
126
- animation: awsui_awsui-motion-fade-in-0_1cbgc_1xaa1_1 var(--motion-duration-refresh-only-medium-nf6485, 165ms) var(--motion-easing-refresh-only-a-8flf9q, cubic-bezier(0, 0, 0, 1));
131
+ .awsui_container-fade-in_1cbgc_1xj48_131:not(#\9) {
132
+ animation: awsui_awsui-motion-fade-in-0_1cbgc_1xj48_1 var(--motion-duration-refresh-only-medium-nf6485, 165ms) var(--motion-easing-refresh-only-a-8flf9q, cubic-bezier(0, 0, 0, 1));
127
133
  }
128
- @keyframes awsui_awsui-motion-fade-in-0_1cbgc_1xaa1_1 {
134
+ @keyframes awsui_awsui-motion-fade-in-0_1cbgc_1xj48_1 {
129
135
  from {
130
136
  opacity: 0;
131
137
  }
@@ -134,17 +140,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
134
140
  }
135
141
  }
136
142
  @media (prefers-reduced-motion: reduce) {
137
- .awsui_container-fade-in_1cbgc_1xaa1_125:not(#\9) {
143
+ .awsui_container-fade-in_1cbgc_1xj48_131:not(#\9) {
138
144
  animation: none;
139
145
  transition: none;
140
146
  }
141
147
  }
142
- .awsui-motion-disabled .awsui_container-fade-in_1cbgc_1xaa1_125:not(#\9), .awsui-mode-entering .awsui_container-fade-in_1cbgc_1xaa1_125:not(#\9) {
148
+ .awsui-motion-disabled .awsui_container-fade-in_1cbgc_1xj48_131:not(#\9), .awsui-mode-entering .awsui_container-fade-in_1cbgc_1xj48_131:not(#\9) {
143
149
  animation: none;
144
150
  transition: none;
145
151
  }
146
152
 
147
- .awsui_root_1cbgc_1xaa1_147:not(#\9) {
153
+ .awsui_root_1cbgc_1xj48_153:not(#\9) {
148
154
  font-size: var(--font-size-body-m-x4okxb, 14px);
149
155
  line-height: var(--line-height-body-m-30ar75, 20px);
150
156
  color: var(--color-text-body-default-at06ol, #000716);
@@ -153,64 +159,64 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
153
159
  -webkit-font-smoothing: auto;
154
160
  -moz-osx-font-smoothing: auto;
155
161
  }
156
- .awsui_root_1cbgc_1xaa1_147.awsui_status-error_1cbgc_1xaa1_156:not(#\9) {
162
+ .awsui_root_1cbgc_1xj48_153.awsui_status-error_1cbgc_1xj48_162:not(#\9) {
157
163
  color: var(--color-text-status-error-wdvepn, #d91515);
158
164
  }
159
- .awsui_root_1cbgc_1xaa1_147.awsui_status-warning_1cbgc_1xaa1_159:not(#\9) {
165
+ .awsui_root_1cbgc_1xj48_153.awsui_status-warning_1cbgc_1xj48_165:not(#\9) {
160
166
  color: var(--color-text-status-warning-yik8vi, #8d6605);
161
167
  }
162
- .awsui_root_1cbgc_1xaa1_147.awsui_status-success_1cbgc_1xaa1_162:not(#\9) {
168
+ .awsui_root_1cbgc_1xj48_153.awsui_status-success_1cbgc_1xj48_168:not(#\9) {
163
169
  color: var(--color-text-status-success-bpiyjm, #037f0c);
164
170
  }
165
- .awsui_root_1cbgc_1xaa1_147.awsui_status-info_1cbgc_1xaa1_165:not(#\9) {
171
+ .awsui_root_1cbgc_1xj48_153.awsui_status-info_1cbgc_1xj48_171:not(#\9) {
166
172
  color: var(--color-text-status-info-ahz8zp, #0972d3);
167
173
  }
168
- .awsui_root_1cbgc_1xaa1_147.awsui_status-stopped_1cbgc_1xaa1_168:not(#\9) {
174
+ .awsui_root_1cbgc_1xj48_153.awsui_status-stopped_1cbgc_1xj48_174:not(#\9) {
169
175
  color: var(--color-text-status-inactive-m7co45, #5f6b7a);
170
176
  }
171
- .awsui_root_1cbgc_1xaa1_147.awsui_status-pending_1cbgc_1xaa1_171:not(#\9) {
177
+ .awsui_root_1cbgc_1xj48_153.awsui_status-pending_1cbgc_1xj48_177:not(#\9) {
172
178
  color: var(--color-text-status-inactive-m7co45, #5f6b7a);
173
179
  }
174
- .awsui_root_1cbgc_1xaa1_147.awsui_status-in-progress_1cbgc_1xaa1_174:not(#\9) {
180
+ .awsui_root_1cbgc_1xj48_153.awsui_status-in-progress_1cbgc_1xj48_180:not(#\9) {
175
181
  color: var(--color-text-status-inactive-m7co45, #5f6b7a);
176
182
  }
177
- .awsui_root_1cbgc_1xaa1_147.awsui_status-loading_1cbgc_1xaa1_177:not(#\9) {
183
+ .awsui_root_1cbgc_1xj48_153.awsui_status-loading_1cbgc_1xj48_183:not(#\9) {
178
184
  color: var(--color-text-status-inactive-m7co45, #5f6b7a);
179
185
  }
180
- .awsui_root_1cbgc_1xaa1_147.awsui_color-override-red_1cbgc_1xaa1_180:not(#\9) {
186
+ .awsui_root_1cbgc_1xj48_153.awsui_color-override-red_1cbgc_1xj48_186:not(#\9) {
181
187
  color: var(--color-text-status-error-wdvepn, #d91515);
182
188
  }
183
- .awsui_root_1cbgc_1xaa1_147.awsui_color-override-grey_1cbgc_1xaa1_183:not(#\9) {
189
+ .awsui_root_1cbgc_1xj48_153.awsui_color-override-grey_1cbgc_1xj48_189:not(#\9) {
184
190
  color: var(--color-text-status-inactive-m7co45, #5f6b7a);
185
191
  }
186
- .awsui_root_1cbgc_1xaa1_147.awsui_color-override-blue_1cbgc_1xaa1_186:not(#\9) {
192
+ .awsui_root_1cbgc_1xj48_153.awsui_color-override-blue_1cbgc_1xj48_192:not(#\9) {
187
193
  color: var(--color-text-status-info-ahz8zp, #0972d3);
188
194
  }
189
- .awsui_root_1cbgc_1xaa1_147.awsui_color-override-green_1cbgc_1xaa1_189:not(#\9) {
195
+ .awsui_root_1cbgc_1xj48_153.awsui_color-override-green_1cbgc_1xj48_195:not(#\9) {
190
196
  color: var(--color-text-status-success-bpiyjm, #037f0c);
191
197
  }
192
- .awsui_root_1cbgc_1xaa1_147.awsui_color-override-yellow_1cbgc_1xaa1_192:not(#\9) {
198
+ .awsui_root_1cbgc_1xj48_153.awsui_color-override-yellow_1cbgc_1xj48_198:not(#\9) {
193
199
  color: var(--color-text-status-warning-yik8vi, #8d6605);
194
200
  }
195
201
 
196
- .awsui_container_1cbgc_1xaa1_125.awsui_display-inline_1cbgc_1xaa1_196:not(#\9) {
202
+ .awsui_container_1cbgc_1xj48_131.awsui_display-inline_1cbgc_1xj48_202:not(#\9) {
197
203
  min-inline-size: 0;
198
204
  word-break: break-word;
199
205
  display: inline;
200
206
  }
201
- .awsui_container_1cbgc_1xaa1_125.awsui_display-inline_1cbgc_1xaa1_196 > .awsui_icon_1cbgc_1xaa1_97:not(#\9) {
207
+ .awsui_container_1cbgc_1xj48_131.awsui_display-inline_1cbgc_1xj48_202 > .awsui_icon_1cbgc_1xj48_103:not(#\9) {
202
208
  white-space: nowrap;
203
209
  }
204
- .awsui_container_1cbgc_1xaa1_125.awsui_display-inline-block_1cbgc_1xaa1_204:not(#\9) {
210
+ .awsui_container_1cbgc_1xj48_131.awsui_display-inline-block_1cbgc_1xj48_210:not(#\9) {
205
211
  display: inline-block;
206
212
  word-wrap: break-word;
207
213
  word-break: break-all;
208
214
  }
209
- .awsui_container_1cbgc_1xaa1_125.awsui_display-inline-block_1cbgc_1xaa1_204 > .awsui_icon_1cbgc_1xaa1_97:not(#\9) {
215
+ .awsui_container_1cbgc_1xj48_131.awsui_display-inline-block_1cbgc_1xj48_210 > .awsui_icon_1cbgc_1xj48_103:not(#\9) {
210
216
  padding-inline-end: var(--space-xxs-p8yyaw, 4px);
211
217
  }
212
218
 
213
- .awsui_overflow-ellipsis_1cbgc_1xaa1_213:not(#\9) {
219
+ .awsui_overflow-ellipsis_1cbgc_1xj48_219:not(#\9) {
214
220
  max-inline-size: 100%;
215
221
  overflow: hidden;
216
222
  text-overflow: ellipsis;
@@ -2,28 +2,28 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "icon-shake": "awsui_icon-shake_1cbgc_1xaa1_97",
6
- "awsui-motion-shake-horizontally": "awsui_awsui-motion-shake-horizontally_1cbgc_1xaa1_1",
7
- "container-fade-in": "awsui_container-fade-in_1cbgc_1xaa1_125",
8
- "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_1cbgc_1xaa1_1",
9
- "root": "awsui_root_1cbgc_1xaa1_147",
10
- "status-error": "awsui_status-error_1cbgc_1xaa1_156",
11
- "status-warning": "awsui_status-warning_1cbgc_1xaa1_159",
12
- "status-success": "awsui_status-success_1cbgc_1xaa1_162",
13
- "status-info": "awsui_status-info_1cbgc_1xaa1_165",
14
- "status-stopped": "awsui_status-stopped_1cbgc_1xaa1_168",
15
- "status-pending": "awsui_status-pending_1cbgc_1xaa1_171",
16
- "status-in-progress": "awsui_status-in-progress_1cbgc_1xaa1_174",
17
- "status-loading": "awsui_status-loading_1cbgc_1xaa1_177",
18
- "color-override-red": "awsui_color-override-red_1cbgc_1xaa1_180",
19
- "color-override-grey": "awsui_color-override-grey_1cbgc_1xaa1_183",
20
- "color-override-blue": "awsui_color-override-blue_1cbgc_1xaa1_186",
21
- "color-override-green": "awsui_color-override-green_1cbgc_1xaa1_189",
22
- "color-override-yellow": "awsui_color-override-yellow_1cbgc_1xaa1_192",
23
- "container": "awsui_container_1cbgc_1xaa1_125",
24
- "display-inline": "awsui_display-inline_1cbgc_1xaa1_196",
25
- "icon": "awsui_icon_1cbgc_1xaa1_97",
26
- "display-inline-block": "awsui_display-inline-block_1cbgc_1xaa1_204",
27
- "overflow-ellipsis": "awsui_overflow-ellipsis_1cbgc_1xaa1_213"
5
+ "icon-shake": "awsui_icon-shake_1cbgc_1xj48_103",
6
+ "awsui-motion-shake-horizontally": "awsui_awsui-motion-shake-horizontally_1cbgc_1xj48_1",
7
+ "container-fade-in": "awsui_container-fade-in_1cbgc_1xj48_131",
8
+ "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_1cbgc_1xj48_1",
9
+ "root": "awsui_root_1cbgc_1xj48_153",
10
+ "status-error": "awsui_status-error_1cbgc_1xj48_162",
11
+ "status-warning": "awsui_status-warning_1cbgc_1xj48_165",
12
+ "status-success": "awsui_status-success_1cbgc_1xj48_168",
13
+ "status-info": "awsui_status-info_1cbgc_1xj48_171",
14
+ "status-stopped": "awsui_status-stopped_1cbgc_1xj48_174",
15
+ "status-pending": "awsui_status-pending_1cbgc_1xj48_177",
16
+ "status-in-progress": "awsui_status-in-progress_1cbgc_1xj48_180",
17
+ "status-loading": "awsui_status-loading_1cbgc_1xj48_183",
18
+ "color-override-red": "awsui_color-override-red_1cbgc_1xj48_186",
19
+ "color-override-grey": "awsui_color-override-grey_1cbgc_1xj48_189",
20
+ "color-override-blue": "awsui_color-override-blue_1cbgc_1xj48_192",
21
+ "color-override-green": "awsui_color-override-green_1cbgc_1xj48_195",
22
+ "color-override-yellow": "awsui_color-override-yellow_1cbgc_1xj48_198",
23
+ "container": "awsui_container_1cbgc_1xj48_131",
24
+ "display-inline": "awsui_display-inline_1cbgc_1xj48_202",
25
+ "icon": "awsui_icon_1cbgc_1xj48_103",
26
+ "display-inline-block": "awsui_display-inline-block_1cbgc_1xj48_210",
27
+ "overflow-ellipsis": "awsui_overflow-ellipsis_1cbgc_1xj48_219"
28
28
  };
29
29
 
@@ -1 +1 @@
1
- {"version":3,"file":"disabled-inline-editor.d.ts","sourceRoot":"lib/default/","sources":["table/body-cell/disabled-inline-editor.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C,UAAU,yBAAyB,CAAC,QAAQ,CAAE,SAAQ,kBAAkB,CAAC,QAAQ,CAAC;IAChF,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,EAC7C,SAAS,EACT,IAAI,EACJ,MAAM,EACN,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,GAAG,IAAI,EACR,EAAE,yBAAyB,CAAC,QAAQ,CAAC,eA6FrC"}
1
+ {"version":3,"file":"disabled-inline-editor.d.ts","sourceRoot":"lib/default/","sources":["table/body-cell/disabled-inline-editor.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAI7C,UAAU,yBAAyB,CAAC,QAAQ,CAAE,SAAQ,kBAAkB,CAAC,QAAQ,CAAC;IAChF,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,EAC7C,SAAS,EACT,IAAI,EACJ,MAAM,EACN,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,GAAG,IAAI,EACR,EAAE,yBAAyB,CAAC,QAAQ,CAAC,eA+FrC"}
@@ -13,6 +13,7 @@ import Arrow from '../../popover/arrow';
13
13
  import { useClickAway } from './click-away';
14
14
  import { TableTdElement } from './td-element';
15
15
  import styles from './styles.css.js';
16
+ import { useSingleTabStopNavigation } from '../../internal/context/single-tab-stop-navigation-context';
16
17
  export function DisabledInlineEditor(_a) {
17
18
  var _b;
18
19
  var { className, item, column, ariaLabels, isEditing, onEditStart, onEditEnd, editDisabledReason, isVisualRefresh } = _a, rest = __rest(_a, ["className", "item", "column", "ariaLabels", "isEditing", "onEditStart", "onEditEnd", "editDisabledReason", "isVisualRefresh"]);
@@ -39,9 +40,10 @@ export function DisabledInlineEditor(_a) {
39
40
  };
40
41
  const { targetProps, descriptionEl } = useHiddenDescription(editDisabledReason);
41
42
  const portalClasses = usePortalModeClasses(portalRef);
43
+ const { tabIndex } = useSingleTabStopNavigation(buttonRef);
42
44
  return (React.createElement(TableTdElement, Object.assign({}, rest, { nativeAttributes: { 'data-inline-editing-active': isEditing.toString() }, className: clsx(className, styles['body-cell-editable'], styles['body-cell-disabled-edit'], isEditing && styles['body-cell-edit-disabled-popover'], isVisualRefresh && styles['is-visual-refresh']), onClick: !isEditing ? onClick : undefined, onMouseEnter: () => setHasHover(true), onMouseLeave: () => setHasHover(false), ref: clickAwayRef }),
43
45
  column.cell(item),
44
- React.createElement("button", Object.assign({ ref: buttonRef, tabIndex: 0, className: styles['body-cell-editor'], "aria-label": (_b = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.activateEditLabel) === null || _b === void 0 ? void 0 : _b.call(ariaLabels, column, item), "aria-haspopup": "dialog", "aria-disabled": "true", onFocus: () => setHasFocus(true), onBlur: () => setHasFocus(false), onKeyDown: handleEscape }, targetProps),
46
+ React.createElement("button", Object.assign({ ref: buttonRef, tabIndex: tabIndex, className: styles['body-cell-editor'], "aria-label": (_b = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.activateEditLabel) === null || _b === void 0 ? void 0 : _b.call(ariaLabels, column, item), "aria-haspopup": "dialog", "aria-disabled": "true", onFocus: () => setHasFocus(true), onBlur: () => setHasFocus(false), onKeyDown: handleEscape }, targetProps),
45
47
  showIcon && React.createElement(Icon, { name: "lock-private", variant: "normal", __internalRootRef: iconRef }),
46
48
  descriptionEl),
47
49
  isEditing && (React.createElement("span", { ref: portalRef },
@@ -1 +1 @@
1
- {"version":3,"file":"disabled-inline-editor.js","sourceRoot":"lib/default/","sources":["table/body-cell/disabled-inline-editor.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,oBAAoB,MAAM,oDAAoD,CAAC;AACtF,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,MAAM,MAAM,kCAAkC,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAuB,MAAM,cAAc,CAAC;AAEnE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAMrC,MAAM,UAAU,oBAAoB,CAAW,EAWT;;QAXS,EAC7C,SAAS,EACT,IAAI,EACJ,MAAM,EACN,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,eAAe,OAEqB,EADjC,IAAI,cAVsC,+HAW9C,CADQ;IAEP,MAAM,YAAY,GAAG,YAAY,CAAC,GAAG,EAAE;QACrC,IAAI,SAAS,EAAE;YACb,SAAS,CAAC,IAAI,CAAC,CAAC;SACjB;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,QAAQ,GAAG,QAAQ,IAAI,QAAQ,IAAI,SAAS,CA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M,CAAC,kBAAkB,CAAC,gBACzB,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,iBAAiB,2DAAG,MAAM,EAAE,IAAI,CAAC,mBAC3C,QAAQ,mBACR,MAAM,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,EAChC,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,EAChC,SAAS,EAAE,YAAY,IACnB,WAAW;YAEd,QAAQ,IAAI,oBAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,OAAO,EAAC,QAAQ,EAAC,iBAAiB,EAAE,OAAO,GAAI;YACrF,aAAa,CACP;QACR,SAAS,IAAI,CACZ,8BAAM,GAAG,EAAE,SAAS;YAClB,oBAAC,MAAM;gBACL,8BAAM,SAAS,EAAE,aAAa;oBAC5B,oBAAC,gBAAgB,IACf,IAAI,EAAC,QAAQ,EACb,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAC,KAAK,EACd,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,oBAAC,KAAK,IAAC,QAAQ,EAAE,QAAQ,GAAI,EAChD,gBAAgB,EAAE,IAAI,EACtB,MAAM,EAAE,IAAI;wBAEZ,oBAAC,WAAW,IACV,aAAa,EAAE,KAAK,EACpB,gBAAgB,EAAE,SAAS,EAC3B,MAAM,EAAE,IAAI,EACZ,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC,EACnB,eAAe,EAAC,MAAM;4BAEtB,2CAAgB,QAAQ,IAAE,kBAAkB,CAAQ,CACxC,CACG,CACd,CACA,CACJ,CACR,CACc,CAClB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport useHiddenDescription from '../../button-dropdown/utils/use-hidden-description';\nimport Icon from '../../icon/internal';\nimport PopoverContainer from '../../popover/container';\nimport PopoverBody from '../../popover/body';\nimport Portal from '../../internal/components/portal';\nimport { usePortalModeClasses } from '../../internal/hooks/use-portal-mode-classes';\nimport Arrow from '../../popover/arrow';\nimport { useClickAway } from './click-away';\nimport { TableTdElement, TableTdElementProps } from './td-element';\nimport { TableBodyCellProps } from './index';\nimport styles from './styles.css.js';\n\ninterface DisabledInlineEditorProps<ItemType> extends TableBodyCellProps<ItemType> {\n editDisabledReason: string;\n}\n\nexport function DisabledInlineEditor<ItemType>({\n className,\n item,\n column,\n ariaLabels,\n isEditing,\n onEditStart,\n onEditEnd,\n editDisabledReason,\n isVisualRefresh,\n ...rest\n}: DisabledInlineEditorProps<ItemType>) {\n const clickAwayRef = useClickAway(() => {\n if (isEditing) {\n onEditEnd(true);\n }\n });\n\n const [hasHover, setHasHover] = useState(false);\n const [hasFocus, setHasFocus] = useState(false);\n const showIcon = hasHover || hasFocus || isEditing;\n\n const iconRef = useRef(null);\n const buttonRef = useRef<HTMLButtonElement>(null);\n const portalRef = useRef<HTMLSpanElement>(null);\n\n function handleEscape(event: React.KeyboardEvent): void {\n if (event.key === 'Escape') {\n onEditEnd(true);\n }\n }\n\n const onClick = () => {\n onEditStart();\n buttonRef.current?.focus();\n };\n\n const { targetProps, descriptionEl } = useHiddenDescription(editDisabledReason);\n const portalClasses = usePortalModeClasses(portalRef);\n\n return (\n <TableTdElement\n {...rest}\n nativeAttributes={\n { 'data-inline-editing-active': isEditing.toString() } as TableTdElementProps['nativeAttributes']\n }\n className={clsx(\n className,\n styles['body-cell-editable'],\n styles['body-cell-disabled-edit'],\n isEditing && styles['body-cell-edit-disabled-popover'],\n isVisualRefresh && styles['is-visual-refresh']\n )}\n onClick={!isEditing ? onClick : undefined}\n onMouseEnter={() => setHasHover(true)}\n onMouseLeave={() => setHasHover(false)}\n ref={clickAwayRef}\n >\n {column.cell(item)}\n\n <button\n ref={buttonRef}\n tabIndex={0}\n className={styles['body-cell-editor']}\n aria-label={ariaLabels?.activateEditLabel?.(column, item)}\n aria-haspopup=\"dialog\"\n aria-disabled=\"true\"\n onFocus={() => setHasFocus(true)}\n onBlur={() => setHasFocus(false)}\n onKeyDown={handleEscape}\n {...targetProps}\n >\n {showIcon && <Icon name=\"lock-private\" variant=\"normal\" __internalRootRef={iconRef} />}\n {descriptionEl}\n </button>\n {isEditing && (\n <span ref={portalRef}>\n <Portal>\n <span className={portalClasses}>\n <PopoverContainer\n size=\"medium\"\n fixedWidth={false}\n position=\"top\"\n trackRef={iconRef}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={true}\n zIndex={2000}\n >\n <PopoverBody\n dismissButton={false}\n dismissAriaLabel={undefined}\n header={null}\n onDismiss={() => {}}\n overflowVisible=\"both\"\n >\n <span aria-live=\"polite\">{editDisabledReason}</span>\n </PopoverBody>\n </PopoverContainer>\n </span>\n </Portal>\n </span>\n )}\n </TableTdElement>\n );\n}\n"]}
1
+ {"version":3,"file":"disabled-inline-editor.js","sourceRoot":"lib/default/","sources":["table/body-cell/disabled-inline-editor.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,oBAAoB,MAAM,oDAAoD,CAAC;AACtF,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,MAAM,MAAM,kCAAkC,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAuB,MAAM,cAAc,CAAC;AAEnE,OAAO,MAAM,MAAM,iBAAiB,CAA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f,IAAI,EAAC,QAAQ,EACb,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAC,KAAK,EACd,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,oBAAC,KAAK,IAAC,QAAQ,EAAE,QAAQ,GAAI,EAChD,gBAAgB,EAAE,IAAI,EACtB,MAAM,EAAE,IAAI;wBAEZ,oBAAC,WAAW,IACV,aAAa,EAAE,KAAK,EACpB,gBAAgB,EAAE,SAAS,EAC3B,MAAM,EAAE,IAAI,EACZ,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC,EACnB,eAAe,EAAC,MAAM;4BAEtB,2CAAgB,QAAQ,IAAE,kBAAkB,CAAQ,CACxC,CACG,CACd,CACA,CACJ,CACR,CACc,CAClB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport useHiddenDescription from '../../button-dropdown/utils/use-hidden-description';\nimport Icon from '../../icon/internal';\nimport PopoverContainer from '../../popover/container';\nimport PopoverBody from '../../popover/body';\nimport Portal from '../../internal/components/portal';\nimport { usePortalModeClasses } from '../../internal/hooks/use-portal-mode-classes';\nimport Arrow from '../../popover/arrow';\nimport { useClickAway } from './click-away';\nimport { TableTdElement, TableTdElementProps } from './td-element';\nimport { TableBodyCellProps } from './index';\nimport styles from './styles.css.js';\nimport { useSingleTabStopNavigation } from '../../internal/context/single-tab-stop-navigation-context';\n\ninterface DisabledInlineEditorProps<ItemType> extends TableBodyCellProps<ItemType> {\n editDisabledReason: string;\n}\n\nexport function DisabledInlineEditor<ItemType>({\n className,\n item,\n column,\n ariaLabels,\n isEditing,\n onEditStart,\n onEditEnd,\n editDisabledReason,\n isVisualRefresh,\n ...rest\n}: DisabledInlineEditorProps<ItemType>) {\n const clickAwayRef = useClickAway(() => {\n if (isEditing) {\n onEditEnd(true);\n }\n });\n\n const [hasHover, setHasHover] = useState(false);\n const [hasFocus, setHasFocus] = useState(false);\n const showIcon = hasHover || hasFocus || isEditing;\n\n const iconRef = useRef(null);\n const buttonRef = useRef<HTMLButtonElement>(null);\n const portalRef = useRef<HTMLSpanElement>(null);\n\n function handleEscape(event: React.KeyboardEvent): void {\n if (event.key === 'Escape') {\n onEditEnd(true);\n }\n }\n\n const onClick = () => {\n onEditStart();\n buttonRef.current?.focus();\n };\n\n const { targetProps, descriptionEl } = useHiddenDescription(editDisabledReason);\n const portalClasses = usePortalModeClasses(portalRef);\n\n const { tabIndex } = useSingleTabStopNavigation(buttonRef);\n\n return (\n <TableTdElement\n {...rest}\n nativeAttributes={\n { 'data-inline-editing-active': isEditing.toString() } as TableTdElementProps['nativeAttributes']\n }\n className={clsx(\n className,\n styles['body-cell-editable'],\n styles['body-cell-disabled-edit'],\n isEditing && styles['body-cell-edit-disabled-popover'],\n isVisualRefresh && styles['is-visual-refresh']\n )}\n onClick={!isEditing ? onClick : undefined}\n onMouseEnter={() => setHasHover(true)}\n onMouseLeave={() => setHasHover(false)}\n ref={clickAwayRef}\n >\n {column.cell(item)}\n\n <button\n ref={buttonRef}\n tabIndex={tabIndex}\n className={styles['body-cell-editor']}\n aria-label={ariaLabels?.activateEditLabel?.(column, item)}\n aria-haspopup=\"dialog\"\n aria-disabled=\"true\"\n onFocus={() => setHasFocus(true)}\n onBlur={() => setHasFocus(false)}\n onKeyDown={handleEscape}\n {...targetProps}\n >\n {showIcon && <Icon name=\"lock-private\" variant=\"normal\" __internalRootRef={iconRef} />}\n {descriptionEl}\n </button>\n {isEditing && (\n <span ref={portalRef}>\n <Portal>\n <span className={portalClasses}>\n <PopoverContainer\n size=\"medium\"\n fixedWidth={false}\n position=\"top\"\n trackRef={iconRef}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={true}\n zIndex={2000}\n >\n <PopoverBody\n dismissButton={false}\n dismissAriaLabel={undefined}\n header={null}\n onDismiss={() => {}}\n overflowVisible=\"both\"\n >\n <span aria-live=\"polite\">{editDisabledReason}</span>\n </PopoverBody>\n </PopoverContainer>\n </span>\n </Portal>\n </span>\n )}\n </TableTdElement>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["table/body-cell/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAkB,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAWnE,MAAM,WAAW,kBAAkB,CAAC,QAAQ,CAAE,SAAQ,mBAAmB;IACvE,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,UAAU,CAAC,EAAE,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACrD,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;CACtC;AAgHD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,EACtC,UAAU,EACV,GAAG,IAAI,EACR,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG;IAAE,UAAU,EAAE,OAAO,CAAA;CAAE,eAYxD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["table/body-cell/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAkB,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAYnE,MAAM,WAAW,kBAAkB,CAAC,QAAQ,CAAE,SAAQ,mBAAmB;IACvE,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,UAAU,CAAC,EAAE,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACrD,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;CACtC;AAmHD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,EACtC,UAAU,EACV,GAAG,IAAI,EACR,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG;IAAE,UAAU,EAAE,OAAO,CAAA;CAAE,eAYxD"}
@@ -10,6 +10,7 @@ import { InlineEditor } from './inline-editor';
10
10
  import LiveRegion from '../../internal/components/live-region/index.js';
11
11
  import { useInternalI18n } from '../../i18n/context';
12
12
  import { usePrevious } from '../../internal/hooks/use-previous';
13
+ import { useSingleTabStopNavigation } from '../../internal/context/single-tab-stop-navigation-context.js';
13
14
  import { DisabledInlineEditor } from './disabled-inline-editor';
14
15
  const submitHandlerFallback = () => {
15
16
  throw new Error('The function `handleSubmit` is required for editable columns');
@@ -46,6 +47,7 @@ function TableCellEditable(_a) {
46
47
  setShowSuccessIcon(true);
47
48
  }
48
49
  }, [hasFocus, successfulEdit, prevHasFocus, prevSuccessfulEdit]);
50
+ const { tabIndex: editActivateTabIndex } = useSingleTabStopNavigation(editActivateRef);
49
51
  return (React.createElement(TableTdElement, Object.assign({}, rest, { nativeAttributes: tdNativeAttributes, className: clsx(className, styles['body-cell-editable'], isEditing && styles['body-cell-edit-active'], showSuccessIcon && showIcon && styles['body-cell-has-success'], isVisualRefresh && styles['is-visual-refresh']), onClick: !isEditing ? onEditStart : undefined, onMouseEnter: () => setHasHover(true), onMouseLeave: () => setHasHover(false) }), isEditing ? (React.createElement(InlineEditor, { ariaLabels: ariaLabels, column: column, item: item, onEditEnd: options => {
50
52
  setShowSuccessIcon(false);
51
53
  isFocusMoveNeededRef.current = options.refocusCell;
@@ -60,7 +62,7 @@ function TableCellEditable(_a) {
60
62
  } },
61
63
  React.createElement(Icon, { name: "status-positive", variant: "success" })),
62
64
  React.createElement(LiveRegion, null, i18n('ariaLabels.successfulEditLabel', (_c = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.successfulEditLabel) === null || _c === void 0 ? void 0 : _c.call(ariaLabels, column))))),
63
- React.createElement("button", { className: styles['body-cell-editor'], "aria-label": (_d = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.activateEditLabel) === null || _d === void 0 ? void 0 : _d.call(ariaLabels, column, item), ref: editActivateRef, onFocus: () => setHasFocus(true), onBlur: () => setHasFocus(false) }, showIcon && React.createElement(Icon, { name: "edit" }))))));
65
+ React.createElement("button", { className: styles['body-cell-editor'], "aria-label": (_d = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.activateEditLabel) === null || _d === void 0 ? void 0 : _d.call(ariaLabels, column, item), ref: editActivateRef, onFocus: () => setHasFocus(true), onBlur: () => setHasFocus(false), tabIndex: editActivateTabIndex }, showIcon && React.createElement(Icon, { name: "edit" }))))));
64
66
  }
65
67
  export function TableBodyCell(_a) {
66
68
  var _b, _c;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["table/body-cell/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,qBAAqB,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAuB,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,UAAU,MAAM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,EADpD,IAAI,cAF+B,cAGvC,CADQ;IAEP,MAAM,kBAAkB,GAAG,MAAA,MAAA,IAAI,CAAC,MAAM,CAAC,UAAU,0CAAE,cAAc,mDAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IAE/E,IAAI,kBAAkB,EAAE;QACtB,OAAO,oBAAC,oBAAoB,kBAAC,kBAAkB,EAAE,kBAAkB,IAAM,IAAI,EAAI,CAAC;KACnF;IAED,IAAI,UAAU,IAAI,IAAI,CAAC,SAAS,EAAE;QAChC,OAAO,oBAAC,iBAAiB,oBAAK,IAAI,EAAI,CAAC;KACxC;IACD,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAC9B,OAAO,oBAAC,cAAc,oBAAK,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAkB,CAAC;AACxE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport React, { useEffect, useRef, useState } from 'react';\nimport Icon from '../../icon/internal';\nimport { TableProps } from '../interfaces';\nimport { TableTdElement, TableTdElementProps } from './td-element';\nimport { InlineEditor } from './inline-editor';\nimport LiveRegion from '../../internal/components/live-region/index.js';\nimport { useInternalI18n } from '../../i18n/context';\nimport { usePrevious } from '../../internal/hooks/use-previous';\nimport { DisabledInlineEditor } from './disabled-inline-editor';\n\nconst submitHandlerFallback = () => {\n throw new Error('The function `handleSubmit` is required for editable columns');\n};\n\nexport interface TableBodyCellProps<ItemType> extends TableTdElementProps {\n column: TableProps.ColumnDefinition<ItemType>;\n item: ItemType;\n isEditing: boolean;\n successfulEdit?: boolean;\n onEditStart: () => void;\n onEditEnd: (cancelled: boolean) => void;\n submitEdit?: TableProps.SubmitEditFunction<ItemType>;\n ariaLabels: TableProps['ariaLabels'];\n}\n\nfunction TableCellEditable<ItemType>({\n className,\n item,\n column,\n isEditing,\n onEditStart,\n onEditEnd,\n submitEdit,\n ariaLabels,\n isVisualRefresh,\n successfulEdit = false,\n ...rest\n}: TableBodyCellProps<ItemType>) {\n const i18n = useInternalI18n('table');\n const editActivateRef = useRef<HTMLButtonElement>(null);\n const tdNativeAttributes = {\n 'data-inline-editing-active': isEditing.toString(),\n };\n const isFocusMoveNeededRef = useRef(false);\n\n useEffect(() => {\n if (!isEditing && editActivateRef.current && isFocusMoveNeededRef.current) {\n isFocusMoveNeededRef.current = false;\n editActivateRef.current.focus();\n }\n }, [isEditing]);\n // To improve the initial page render performance we only show the edit icon when necessary.\n const [hasHover, setHasHover] = useState(false);\n const [hasFocus, setHasFocus] = useState(false);\n const showIcon = hasHover || hasFocus;\n\n const prevSuccessfulEdit = usePrevious(successfulEdit);\n const prevHasFocus = usePrevious(hasFocus);\n const [showSuccessIcon, setShowSuccessIcon] = useState(false);\n\n useEffect(() => {\n // Hide the success icon after a successful edit, when cell loses focus.\n if (successfulEdit && prevSuccessfulEdit && !hasFocus && prevHasFocus) {\n setShowSuccessIcon(false);\n }\n // Show success icon right after a successful edit, when `successfulEdit` switches to true.\n if (successfulEdit && !prevSuccessfulEdit) {\n setShowSuccessIcon(true);\n }\n }, [hasFocus, successfulEdit, prevHasFocus, prevSuccessfulEdit]);\n\n return (\n <TableTdElement\n {...rest}\n nativeAttributes={tdNativeAttributes as TableTdElementProps['nativeAttributes']}\n className={clsx(\n className,\n styles['body-cell-editable'],\n isEditing && styles['body-cell-edit-active'],\n showSuccessIcon && showIcon && styles['body-cell-has-success'],\n isVisualRefresh && styles['is-visual-refresh']\n )}\n onClick={!isEditing ? onEditStart : undefined}\n onMouseEnter={() => setHasHover(true)}\n onMouseLeave={() => setHasHover(false)}\n >\n {isEditing ? (\n <InlineEditor\n ariaLabels={ariaLabels}\n column={column}\n item={item}\n onEditEnd={options => {\n setShowSuccessIcon(false);\n isFocusMoveNeededRef.current = options.refocusCell;\n onEditEnd(options.cancelled);\n }}\n submitEdit={submitEdit ?? submitHandlerFallback}\n />\n ) : (\n <>\n {column.cell(item)}\n {showSuccessIcon && showIcon && (\n <>\n <span\n className={styles['body-cell-success']}\n aria-label={ariaLabels?.successfulEditLabel?.(column)}\n role=\"img\"\n onMouseDown={e => {\n // Prevent the editor's Button blur event to be fired when clicking the success icon.\n // This prevents unfocusing the button and triggers the `TableTdElement` onClick event which initiates the edit mode.\n e.preventDefault();\n }}\n >\n <Icon name=\"status-positive\" variant=\"success\" />\n </span>\n <LiveRegion>\n {i18n('ariaLabels.successfulEditLabel', ariaLabels?.successfulEditLabel?.(column))}\n </LiveRegion>\n </>\n )}\n <button\n className={styles['body-cell-editor']}\n aria-label={ariaLabels?.activateEditLabel?.(column, item)}\n ref={editActivateRef}\n onFocus={() => setHasFocus(true)}\n onBlur={() => setHasFocus(false)}\n >\n {showIcon && <Icon name=\"edit\" />}\n </button>\n </>\n )}\n </TableTdElement>\n );\n}\n\nexport function TableBodyCell<ItemType>({\n isEditable,\n ...rest\n}: TableBodyCellProps<ItemType> & { isEditable: boolean }) {\n const editDisabledReason = rest.column.editConfig?.disabledReason?.(rest.item);\n\n if (editDisabledReason) {\n return <DisabledInlineEditor editDisabledReason={editDisabledReason} {...rest} />;\n }\n\n if (isEditable || rest.isEditing) {\n return <TableCellEditable {...rest} />;\n }\n const { column, item } = rest;\n return <TableTdElement {...rest}>{column.cell(item)}</TableTdElement>;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["table/body-cell/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,qBAAqB,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAuB,MAAM,cAAc,CAAC;AACnE,OAAO,E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AC,WAAW,CAAC,KAAK,CAAC,EAChC,QAAQ,EAAE,oBAAoB,IAE7B,QAAQ,IAAI,oBAAC,IAAI,IAAC,IAAI,EAAC,MAAM,GAAG,CAC1B,CACR,CACJ,CACc,CAClB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAAW,EAGiB;;QAHjB,EACtC,UAAU,OAE6C,EADpD,IAAI,cAF+B,cAGvC,CADQ;IAEP,MAAM,kBAAkB,GAAG,MAAA,MAAA,IAAI,CAAC,MAAM,CAAC,UAAU,0CAAE,cAAc,mDAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IAE/E,IAAI,kBAAkB,EAAE;QACtB,OAAO,oBAAC,oBAAoB,kBAAC,kBAAkB,EAAE,kBAAkB,IAAM,IAAI,EAAI,CAAC;KACnF;IAED,IAAI,UAAU,IAAI,IAAI,CAAC,SAAS,EAAE;QAChC,OAAO,oBAAC,iBAAiB,oBAAK,IAAI,EAAI,CAAC;KACxC;IACD,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAC9B,OAAO,oBAAC,cAAc,oBAAK,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAkB,CAAC;AACxE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport React, { useEffect, useRef, useState } from 'react';\nimport Icon from '../../icon/internal';\nimport { TableProps } from '../interfaces';\nimport { TableTdElement, TableTdElementProps } from './td-element';\nimport { InlineEditor } from './inline-editor';\nimport LiveRegion from '../../internal/components/live-region/index.js';\nimport { useInternalI18n } from '../../i18n/context';\nimport { usePrevious } from '../../internal/hooks/use-previous';\nimport { useSingleTabStopNavigation } from '../../internal/context/single-tab-stop-navigation-context.js';\nimport { DisabledInlineEditor } from './disabled-inline-editor';\n\nconst submitHandlerFallback = () => {\n throw new Error('The function `handleSubmit` is required for editable columns');\n};\n\nexport interface TableBodyCellProps<ItemType> extends TableTdElementProps {\n column: TableProps.ColumnDefinition<ItemType>;\n item: ItemType;\n isEditing: boolean;\n successfulEdit?: boolean;\n onEditStart: () => void;\n onEditEnd: (cancelled: boolean) => void;\n submitEdit?: TableProps.SubmitEditFunction<ItemType>;\n ariaLabels: TableProps['ariaLabels'];\n}\n\nfunction TableCellEditable<ItemType>({\n className,\n item,\n column,\n isEditing,\n onEditStart,\n onEditEnd,\n submitEdit,\n ariaLabels,\n isVisualRefresh,\n successfulEdit = false,\n ...rest\n}: TableBodyCellProps<ItemType>) {\n const i18n = useInternalI18n('table');\n const editActivateRef = useRef<HTMLButtonElement>(null);\n const tdNativeAttributes = {\n 'data-inline-editing-active': isEditing.toString(),\n };\n const isFocusMoveNeededRef = useRef(false);\n\n useEffect(() => {\n if (!isEditing && editActivateRef.current && isFocusMoveNeededRef.current) {\n isFocusMoveNeededRef.current = false;\n editActivateRef.current.focus();\n }\n }, [isEditing]);\n // To improve the initial page render performance we only show the edit icon when necessary.\n const [hasHover, setHasHover] = useState(false);\n const [hasFocus, setHasFocus] = useState(false);\n const showIcon = hasHover || hasFocus;\n\n const prevSuccessfulEdit = usePrevious(successfulEdit);\n const prevHasFocus = usePrevious(hasFocus);\n const [showSuccessIcon, setShowSuccessIcon] = useState(false);\n\n useEffect(() => {\n // Hide the success icon after a successful edit, when cell loses focus.\n if (successfulEdit && prevSuccessfulEdit && !hasFocus && prevHasFocus) {\n setShowSuccessIcon(false);\n }\n // Show success icon right after a successful edit, when `successfulEdit` switches to true.\n if (successfulEdit && !prevSuccessfulEdit) {\n setShowSuccessIcon(true);\n }\n }, [hasFocus, successfulEdit, prevHasFocus, prevSuccessfulEdit]);\n\n const { tabIndex: editActivateTabIndex } = useSingleTabStopNavigation(editActivateRef);\n\n return (\n <TableTdElement\n {...rest}\n nativeAttributes={tdNativeAttributes as TableTdElementProps['nativeAttributes']}\n className={clsx(\n className,\n styles['body-cell-editable'],\n isEditing && styles['body-cell-edit-active'],\n showSuccessIcon && showIcon && styles['body-cell-has-success'],\n isVisualRefresh && styles['is-visual-refresh']\n )}\n onClick={!isEditing ? onEditStart : undefined}\n onMouseEnter={() => setHasHover(true)}\n onMouseLeave={() => setHasHover(false)}\n >\n {isEditing ? (\n <InlineEditor\n ariaLabels={ariaLabels}\n column={column}\n item={item}\n onEditEnd={options => {\n setShowSuccessIcon(false);\n isFocusMoveNeededRef.current = options.refocusCell;\n onEditEnd(options.cancelled);\n }}\n submitEdit={submitEdit ?? submitHandlerFallback}\n />\n ) : (\n <>\n {column.cell(item)}\n {showSuccessIcon && showIcon && (\n <>\n <span\n className={styles['body-cell-success']}\n aria-label={ariaLabels?.successfulEditLabel?.(column)}\n role=\"img\"\n onMouseDown={e => {\n // Prevent the editor's Button blur event to be fired when clicking the success icon.\n // This prevents unfocusing the button and triggers the `TableTdElement` onClick event which initiates the edit mode.\n e.preventDefault();\n }}\n >\n <Icon name=\"status-positive\" variant=\"success\" />\n </span>\n <LiveRegion>\n {i18n('ariaLabels.successfulEditLabel', ariaLabels?.successfulEditLabel?.(column))}\n </LiveRegion>\n </>\n )}\n <button\n className={styles['body-cell-editor']}\n aria-label={ariaLabels?.activateEditLabel?.(column, item)}\n ref={editActivateRef}\n onFocus={() => setHasFocus(true)}\n onBlur={() => setHasFocus(false)}\n tabIndex={editActivateTabIndex}\n >\n {showIcon && <Icon name=\"edit\" />}\n </button>\n </>\n )}\n </TableTdElement>\n );\n}\n\nexport function TableBodyCell<ItemType>({\n isEditable,\n ...rest\n}: TableBodyCellProps<ItemType> & { isEditable: boolean }) {\n const editDisabledReason = rest.column.editConfig?.disabledReason?.(rest.item);\n\n if (editDisabledReason) {\n return <DisabledInlineEditor editDisabledReason={editDisabledReason} {...rest} />;\n }\n\n if (isEditable || rest.isEditing) {\n return <TableCellEditable {...rest} />;\n }\n const { column, item } = rest;\n return <TableTdElement {...rest}>{column.cell(item)}</TableTdElement>;\n}\n"]}
@@ -1,35 +1,35 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "body-cell": "awsui_body-cell_c6tup_mft2u_93",
5
- "body-cell-wrap": "awsui_body-cell-wrap_c6tup_mft2u_106",
6
- "is-visual-refresh": "awsui_is-visual-refresh_c6tup_mft2u_118",
7
- "has-striped-rows": "awsui_has-striped-rows_c6tup_mft2u_130",
8
- "body-cell-edit-active": "awsui_body-cell-edit-active_c6tup_mft2u_133",
9
- "body-cell-editable": "awsui_body-cell-editable_c6tup_mft2u_133",
10
- "has-striped-rows-sticky-cell-pad-left": "awsui_has-striped-rows-sticky-cell-pad-left_c6tup_mft2u_139",
11
- "has-selection": "awsui_has-selection_c6tup_mft2u_142",
12
- "body-cell-first-row": "awsui_body-cell-first-row_c6tup_mft2u_148",
13
- "body-cell-last-row": "awsui_body-cell-last-row_c6tup_mft2u_151",
14
- "body-cell-selected": "awsui_body-cell-selected_c6tup_mft2u_151",
15
- "has-footer": "awsui_has-footer_c6tup_mft2u_151",
16
- "body-cell-shaded": "awsui_body-cell-shaded_c6tup_mft2u_161",
17
- "sticky-cell": "awsui_sticky-cell_c6tup_mft2u_187",
18
- "sticky-cell-pad-left": "awsui_sticky-cell-pad-left_c6tup_mft2u_195",
19
- "sticky-cell-last-right": "awsui_sticky-cell-last-right_c6tup_mft2u_212",
20
- "sticky-cell-last-left": "awsui_sticky-cell-last-left_c6tup_mft2u_216",
21
- "body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_mft2u_239",
22
- "body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_mft2u_243",
23
- "body-cell-editor": "awsui_body-cell-editor_c6tup_mft2u_267",
24
- "body-cell-success": "awsui_body-cell-success_c6tup_mft2u_274",
25
- "body-cell-success-form": "awsui_body-cell-success-form_c6tup_mft2u_301",
26
- "body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_mft2u_301",
27
- "body-cell-success-row": "awsui_body-cell-success-row_c6tup_mft2u_311",
28
- "body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_mft2u_311",
29
- "body-cell-success-controls": "awsui_body-cell-success-controls_c6tup_mft2u_321",
30
- "body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_mft2u_321",
31
- "body-cell-disabled-edit": "awsui_body-cell-disabled-edit_c6tup_mft2u_324",
32
- "body-cell-edit-disabled-popover": "awsui_body-cell-edit-disabled-popover_c6tup_mft2u_364",
33
- "body-cell-has-success": "awsui_body-cell-has-success_c6tup_mft2u_368"
4
+ "body-cell": "awsui_body-cell_c6tup_110c7_99",
5
+ "sticky-cell": "awsui_sticky-cell_c6tup_110c7_133",
6
+ "body-cell-wrap": "awsui_body-cell-wrap_c6tup_110c7_136",
7
+ "is-visual-refresh": "awsui_is-visual-refresh_c6tup_110c7_148",
8
+ "has-striped-rows": "awsui_has-striped-rows_c6tup_110c7_160",
9
+ "body-cell-edit-active": "awsui_body-cell-edit-active_c6tup_110c7_163",
10
+ "body-cell-editable": "awsui_body-cell-editable_c6tup_110c7_163",
11
+ "has-striped-rows-sticky-cell-pad-left": "awsui_has-striped-rows-sticky-cell-pad-left_c6tup_110c7_169",
12
+ "has-selection": "awsui_has-selection_c6tup_110c7_172",
13
+ "body-cell-first-row": "awsui_body-cell-first-row_c6tup_110c7_178",
14
+ "body-cell-last-row": "awsui_body-cell-last-row_c6tup_110c7_181",
15
+ "body-cell-selected": "awsui_body-cell-selected_c6tup_110c7_181",
16
+ "has-footer": "awsui_has-footer_c6tup_110c7_181",
17
+ "body-cell-shaded": "awsui_body-cell-shaded_c6tup_110c7_191",
18
+ "sticky-cell-pad-left": "awsui_sticky-cell-pad-left_c6tup_110c7_225",
19
+ "sticky-cell-last-right": "awsui_sticky-cell-last-right_c6tup_110c7_242",
20
+ "sticky-cell-last-left": "awsui_sticky-cell-last-left_c6tup_110c7_246",
21
+ "body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_110c7_269",
22
+ "body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_110c7_273",
23
+ "body-cell-editor": "awsui_body-cell-editor_c6tup_110c7_297",
24
+ "body-cell-success": "awsui_body-cell-success_c6tup_110c7_304",
25
+ "body-cell-success-form": "awsui_body-cell-success-form_c6tup_110c7_331",
26
+ "body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_110c7_331",
27
+ "body-cell-success-row": "awsui_body-cell-success-row_c6tup_110c7_341",
28
+ "body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_110c7_341",
29
+ "body-cell-success-controls": "awsui_body-cell-success-controls_c6tup_110c7_351",
30
+ "body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_110c7_351",
31
+ "body-cell-disabled-edit": "awsui_body-cell-disabled-edit_c6tup_110c7_354",
32
+ "body-cell-edit-disabled-popover": "awsui_body-cell-edit-disabled-popover_c6tup_110c7_394",
33
+ "body-cell-has-success": "awsui_body-cell-has-success_c6tup_110c7_398"
34
34
  };
35
35