@cloudscape-design/components-themeable 3.0.1382 → 3.0.1384

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 (221) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/container/styles.scss +5 -4
  3. package/lib/internal/scss/input/styles.scss +4 -0
  4. package/lib/internal/scss/internal/components/button-trigger/styles.scss +4 -0
  5. package/lib/internal/scss/internal/components/control-group/styles.scss +53 -0
  6. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +176 -175
  7. package/lib/internal/scss/internal/styles/forms/mixins.scss +58 -17
  8. package/lib/internal/scss/modal/styles.scss +6 -0
  9. package/lib/internal/scss/prompt-input/styles.scss +4 -0
  10. package/lib/internal/scss/segmented-control/segment.scss +5 -0
  11. package/lib/internal/scss/segmented-control/styles.scss +29 -4
  12. package/lib/internal/scss/side-navigation/styles.scss +13 -6
  13. package/lib/internal/scss/steps/styles.scss +1 -1
  14. package/lib/internal/template/alert/styles.css.js +27 -27
  15. package/lib/internal/template/alert/styles.scoped.css +50 -50
  16. package/lib/internal/template/alert/styles.selectors.js +27 -27
  17. package/lib/internal/template/annotation-context/annotation/styles.css.js +13 -13
  18. package/lib/internal/template/annotation-context/annotation/styles.scoped.css +21 -21
  19. package/lib/internal/template/annotation-context/annotation/styles.selectors.js +13 -13
  20. package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
  21. package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
  22. package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
  23. package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -86
  24. package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +258 -258
  25. package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -86
  26. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +32 -32
  27. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +89 -89
  28. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +32 -32
  29. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +6 -6
  30. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +13 -13
  31. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +6 -6
  32. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +30 -30
  33. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +68 -68
  34. package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +30 -30
  35. package/lib/internal/template/attribute-editor/styles.css.js +15 -15
  36. package/lib/internal/template/attribute-editor/styles.scoped.css +28 -28
  37. package/lib/internal/template/attribute-editor/styles.selectors.js +15 -15
  38. package/lib/internal/template/breadcrumb-group/item/styles.css.js +7 -7
  39. package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +28 -28
  40. package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +7 -7
  41. package/lib/internal/template/button/styles.css.js +23 -23
  42. package/lib/internal/template/button/styles.scoped.css +261 -261
  43. package/lib/internal/template/button/styles.selectors.js +23 -23
  44. package/lib/internal/template/button-dropdown/item-element/styles.css.js +21 -21
  45. package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +37 -37
  46. package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +21 -21
  47. package/lib/internal/template/cards/styles.css.js +39 -39
  48. package/lib/internal/template/cards/styles.scoped.css +41 -41
  49. package/lib/internal/template/cards/styles.selectors.js +39 -39
  50. package/lib/internal/template/checkbox/styles.css.js +3 -3
  51. package/lib/internal/template/checkbox/styles.scoped.css +10 -10
  52. package/lib/internal/template/checkbox/styles.selectors.js +3 -3
  53. package/lib/internal/template/container/style.d.ts +1 -15
  54. package/lib/internal/template/container/style.d.ts.map +1 -1
  55. package/lib/internal/template/container/style.js +6 -2
  56. package/lib/internal/template/container/style.js.map +1 -1
  57. package/lib/internal/template/container/styles.css.js +34 -34
  58. package/lib/internal/template/container/styles.scoped.css +87 -87
  59. package/lib/internal/template/container/styles.selectors.js +34 -34
  60. package/lib/internal/template/content-layout/styles.css.js +14 -14
  61. package/lib/internal/template/content-layout/styles.scoped.css +27 -27
  62. package/lib/internal/template/content-layout/styles.selectors.js +14 -14
  63. package/lib/internal/template/dropdown/styles.css.js +20 -20
  64. package/lib/internal/template/dropdown/styles.scoped.css +49 -49
  65. package/lib/internal/template/dropdown/styles.selectors.js +20 -20
  66. package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
  67. package/lib/internal/template/expandable-section/expandable-section-header.js +1 -1
  68. package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
  69. package/lib/internal/template/expandable-section/interfaces.d.ts +4 -4
  70. package/lib/internal/template/expandable-section/interfaces.js.map +1 -1
  71. package/lib/internal/template/file-token-group/styles.css.js +23 -23
  72. package/lib/internal/template/file-token-group/styles.scoped.css +36 -36
  73. package/lib/internal/template/file-token-group/styles.selectors.js +23 -23
  74. package/lib/internal/template/flashbar/styles.css.js +50 -50
  75. package/lib/internal/template/flashbar/styles.scoped.css +184 -184
  76. package/lib/internal/template/flashbar/styles.selectors.js +50 -50
  77. package/lib/internal/template/help-panel/styles.css.js +6 -6
  78. package/lib/internal/template/help-panel/styles.scoped.css +72 -72
  79. package/lib/internal/template/help-panel/styles.selectors.js +6 -6
  80. package/lib/internal/template/input/internal.d.ts.map +1 -1
  81. package/lib/internal/template/input/internal.js +10 -4
  82. package/lib/internal/template/input/internal.js.map +1 -1
  83. package/lib/internal/template/input/styles.css.js +36 -29
  84. package/lib/internal/template/input/styles.scoped.css +168 -137
  85. package/lib/internal/template/input/styles.selectors.js +36 -29
  86. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  87. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
  88. package/lib/internal/template/internal/components/autosuggest-input/index.js +4 -1
  89. package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
  90. package/lib/internal/template/internal/components/button-trigger/index.d.ts +2 -0
  91. package/lib/internal/template/internal/components/button-trigger/index.d.ts.map +1 -1
  92. package/lib/internal/template/internal/components/button-trigger/index.js +3 -2
  93. package/lib/internal/template/internal/components/button-trigger/index.js.map +1 -1
  94. package/lib/internal/template/internal/components/button-trigger/styles.css.js +21 -14
  95. package/lib/internal/template/internal/components/button-trigger/styles.scoped.css +63 -33
  96. package/lib/internal/template/internal/components/button-trigger/styles.selectors.js +21 -14
  97. package/lib/internal/template/internal/components/control-group/grouped-control-styles.d.ts +10 -0
  98. package/lib/internal/template/internal/components/control-group/grouped-control-styles.d.ts.map +1 -0
  99. package/lib/internal/template/internal/components/control-group/grouped-control-styles.js +14 -0
  100. package/lib/internal/template/internal/components/control-group/grouped-control-styles.js.map +1 -0
  101. package/lib/internal/template/internal/components/control-group/index.d.ts +9 -0
  102. package/lib/internal/template/internal/components/control-group/index.d.ts.map +1 -0
  103. package/lib/internal/template/internal/components/control-group/index.js +20 -0
  104. package/lib/internal/template/internal/components/control-group/index.js.map +1 -0
  105. package/lib/internal/template/internal/components/control-group/styles.css.js +13 -0
  106. package/lib/internal/template/internal/components/control-group/styles.scoped.css +63 -0
  107. package/lib/internal/template/internal/components/control-group/styles.selectors.js +14 -0
  108. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +30 -30
  109. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +58 -58
  110. package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
  111. package/lib/internal/template/internal/components/focus-lock/index.d.ts +6 -0
  112. package/lib/internal/template/internal/components/focus-lock/index.d.ts.map +1 -1
  113. package/lib/internal/template/internal/components/focus-lock/index.js +8 -3
  114. package/lib/internal/template/internal/components/focus-lock/index.js.map +1 -1
  115. package/lib/internal/template/internal/components/option/styles.css.js +17 -17
  116. package/lib/internal/template/internal/components/option/styles.scoped.css +31 -31
  117. package/lib/internal/template/internal/components/option/styles.selectors.js +17 -17
  118. package/lib/internal/template/internal/components/radio-button/styles.css.js +7 -7
  119. package/lib/internal/template/internal/components/radio-button/styles.scoped.css +17 -17
  120. package/lib/internal/template/internal/components/radio-button/styles.selectors.js +7 -7
  121. package/lib/internal/template/internal/components/selectable-item/styles.css.js +22 -22
  122. package/lib/internal/template/internal/components/selectable-item/styles.scoped.css +57 -57
  123. package/lib/internal/template/internal/components/selectable-item/styles.selectors.js +22 -22
  124. package/lib/internal/template/internal/components/token-list/styles.css.js +10 -10
  125. package/lib/internal/template/internal/components/token-list/styles.scoped.css +25 -25
  126. package/lib/internal/template/internal/components/token-list/styles.selectors.js +10 -10
  127. package/lib/internal/template/internal/context/control-group-context.d.ts +30 -0
  128. package/lib/internal/template/internal/context/control-group-context.d.ts.map +1 -0
  129. package/lib/internal/template/internal/context/control-group-context.js +24 -0
  130. package/lib/internal/template/internal/context/control-group-context.js.map +1 -0
  131. package/lib/internal/template/internal/environment.js +2 -2
  132. package/lib/internal/template/internal/environment.json +2 -2
  133. package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts +1 -0
  134. package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  135. package/lib/internal/template/internal/generated/custom-css-properties/index.js +175 -174
  136. package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
  137. package/lib/internal/template/item-card/styles.css.js +14 -14
  138. package/lib/internal/template/item-card/styles.scoped.css +63 -63
  139. package/lib/internal/template/item-card/styles.selectors.js +14 -14
  140. package/lib/internal/template/link/styles.css.js +21 -21
  141. package/lib/internal/template/link/styles.scoped.css +104 -104
  142. package/lib/internal/template/link/styles.selectors.js +21 -21
  143. package/lib/internal/template/modal/index.d.ts +1 -1
  144. package/lib/internal/template/modal/index.d.ts.map +1 -1
  145. package/lib/internal/template/modal/index.js +6 -5
  146. package/lib/internal/template/modal/index.js.map +1 -1
  147. package/lib/internal/template/modal/interfaces.d.ts +7 -0
  148. package/lib/internal/template/modal/interfaces.d.ts.map +1 -1
  149. package/lib/internal/template/modal/interfaces.js.map +1 -1
  150. package/lib/internal/template/modal/internal.js +23 -6
  151. package/lib/internal/template/modal/internal.js.map +1 -1
  152. package/lib/internal/template/modal/styles.css.js +32 -31
  153. package/lib/internal/template/modal/styles.scoped.css +51 -48
  154. package/lib/internal/template/modal/styles.selectors.js +32 -31
  155. package/lib/internal/template/multiselect/internal.d.ts.map +1 -1
  156. package/lib/internal/template/multiselect/internal.js +17 -10
  157. package/lib/internal/template/multiselect/internal.js.map +1 -1
  158. package/lib/internal/template/progress-bar/styles.css.js +19 -19
  159. package/lib/internal/template/progress-bar/styles.scoped.css +58 -58
  160. package/lib/internal/template/progress-bar/styles.selectors.js +19 -19
  161. package/lib/internal/template/prompt-input/styles.css.js +26 -26
  162. package/lib/internal/template/prompt-input/styles.scoped.css +109 -109
  163. package/lib/internal/template/prompt-input/styles.selectors.js +26 -26
  164. package/lib/internal/template/segmented-control/internal-segmented-control.d.ts +6 -1
  165. package/lib/internal/template/segmented-control/internal-segmented-control.d.ts.map +1 -1
  166. package/lib/internal/template/segmented-control/internal-segmented-control.js +8 -3
  167. package/lib/internal/template/segmented-control/internal-segmented-control.js.map +1 -1
  168. package/lib/internal/template/segmented-control/internal.d.ts.map +1 -1
  169. package/lib/internal/template/segmented-control/internal.js +5 -2
  170. package/lib/internal/template/segmented-control/internal.js.map +1 -1
  171. package/lib/internal/template/segmented-control/segment.d.ts +1 -0
  172. package/lib/internal/template/segmented-control/segment.d.ts.map +1 -1
  173. package/lib/internal/template/segmented-control/segment.js +2 -2
  174. package/lib/internal/template/segmented-control/segment.js.map +1 -1
  175. package/lib/internal/template/segmented-control/styles.css.js +26 -16
  176. package/lib/internal/template/segmented-control/styles.scoped.css +106 -46
  177. package/lib/internal/template/segmented-control/styles.selectors.js +26 -16
  178. package/lib/internal/template/select/internal.d.ts.map +1 -1
  179. package/lib/internal/template/select/internal.js +11 -8
  180. package/lib/internal/template/select/internal.js.map +1 -1
  181. package/lib/internal/template/select/parts/styles.css.js +21 -21
  182. package/lib/internal/template/select/parts/styles.scoped.css +24 -24
  183. package/lib/internal/template/select/parts/styles.selectors.js +21 -21
  184. package/lib/internal/template/select/parts/trigger.d.ts +2 -0
  185. package/lib/internal/template/select/parts/trigger.d.ts.map +1 -1
  186. package/lib/internal/template/select/parts/trigger.js +2 -2
  187. package/lib/internal/template/select/parts/trigger.js.map +1 -1
  188. package/lib/internal/template/side-navigation/styles.css.js +64 -64
  189. package/lib/internal/template/side-navigation/styles.scoped.css +119 -114
  190. package/lib/internal/template/side-navigation/styles.selectors.js +64 -64
  191. package/lib/internal/template/slider/styles.css.js +26 -26
  192. package/lib/internal/template/slider/styles.scoped.css +165 -165
  193. package/lib/internal/template/slider/styles.selectors.js +26 -26
  194. package/lib/internal/template/spinner/styles.css.js +14 -14
  195. package/lib/internal/template/spinner/styles.scoped.css +40 -40
  196. package/lib/internal/template/spinner/styles.selectors.js +14 -14
  197. package/lib/internal/template/steps/styles.css.js +17 -17
  198. package/lib/internal/template/steps/styles.scoped.css +35 -35
  199. package/lib/internal/template/steps/styles.selectors.js +17 -17
  200. package/lib/internal/template/table/styles.css.js +37 -37
  201. package/lib/internal/template/table/styles.scoped.css +46 -46
  202. package/lib/internal/template/table/styles.selectors.js +37 -37
  203. package/lib/internal/template/tabs/styles.css.js +30 -30
  204. package/lib/internal/template/tabs/styles.scoped.css +76 -76
  205. package/lib/internal/template/tabs/styles.selectors.js +30 -30
  206. package/lib/internal/template/tag-editor/styles.css.js +3 -3
  207. package/lib/internal/template/tag-editor/styles.scoped.css +13 -13
  208. package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
  209. package/lib/internal/template/text-content/styles.css.js +1 -1
  210. package/lib/internal/template/text-content/styles.scoped.css +66 -66
  211. package/lib/internal/template/text-content/styles.selectors.js +1 -1
  212. package/lib/internal/template/textarea/styles.css.js +9 -9
  213. package/lib/internal/template/textarea/styles.scoped.css +51 -55
  214. package/lib/internal/template/textarea/styles.selectors.js +9 -9
  215. package/lib/internal/template/toggle/styles.css.js +10 -10
  216. package/lib/internal/template/toggle/styles.scoped.css +22 -22
  217. package/lib/internal/template/toggle/styles.selectors.js +10 -10
  218. package/lib/internal/template/token/styles.css.js +14 -14
  219. package/lib/internal/template/token/styles.scoped.css +46 -46
  220. package/lib/internal/template/token/styles.selectors.js +14 -14
  221. package/package.json +1 -1
@@ -0,0 +1,13 @@
1
+
2
+ import './styles.scoped.css';
3
+ export default {
4
+ "root": "awsui_root_o08jm_35ajp_9",
5
+ "root-horizontal": "awsui_root-horizontal_o08jm_35ajp_41",
6
+ "root-vertical": "awsui_root-vertical_o08jm_35ajp_46",
7
+ "control": "awsui_control_o08jm_35ajp_51",
8
+ "control-middle-horizontal": "awsui_control-middle-horizontal_o08jm_35ajp_58",
9
+ "control-last-horizontal": "awsui_control-last-horizontal_o08jm_35ajp_58",
10
+ "control-middle-vertical": "awsui_control-middle-vertical_o08jm_35ajp_61",
11
+ "control-last-vertical": "awsui_control-last-vertical_o08jm_35ajp_61"
12
+ };
13
+
@@ -0,0 +1,63 @@
1
+ /*
2
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ /* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
6
+ /* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
7
+ /* Style used for links in slots/components that are text heavy, to help links stand out among
8
+ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
9
+ .awsui_root_o08jm_35ajp_9:not(#\9) {
10
+ border-collapse: separate;
11
+ border-spacing: 0;
12
+ box-sizing: border-box;
13
+ caption-side: top;
14
+ cursor: auto;
15
+ direction: inherit;
16
+ empty-cells: show;
17
+ font-family: serif;
18
+ font-style: normal;
19
+ font-variant: normal;
20
+ font-stretch: normal;
21
+ hyphens: none;
22
+ letter-spacing: normal;
23
+ list-style: disc outside none;
24
+ tab-size: 8;
25
+ text-align: start;
26
+ text-indent: 0;
27
+ text-shadow: none;
28
+ text-transform: none;
29
+ visibility: visible;
30
+ white-space: normal;
31
+ word-spacing: normal;
32
+ font-size: var(--font-size-body-m-tq5a14, 14px);
33
+ line-height: var(--line-height-body-m-5xw6xo, 22px);
34
+ color: var(--color-text-body-default-b2us04, #16191f);
35
+ font-weight: var(--font-weight-normal-fr92v6, 400);
36
+ font-family: var(--font-family-base-c9u5cr, "Noto Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
37
+ -webkit-font-smoothing: auto;
38
+ -moz-osx-font-smoothing: auto;
39
+ display: flex;
40
+ }
41
+ .awsui_root-horizontal_o08jm_35ajp_41:not(#\9) {
42
+ flex-direction: row;
43
+ flex-wrap: nowrap;
44
+ align-items: flex-end;
45
+ }
46
+ .awsui_root-vertical_o08jm_35ajp_46:not(#\9) {
47
+ flex-direction: column;
48
+ align-items: stretch;
49
+ }
50
+
51
+ .awsui_control_o08jm_35ajp_51:not(#\9) {
52
+ min-inline-size: 0;
53
+ isolation: isolate;
54
+ }
55
+ .awsui_control_o08jm_35ajp_51:not(#\9):focus-within {
56
+ z-index: 1;
57
+ }
58
+ .awsui_control-middle-horizontal_o08jm_35ajp_58:not(#\9), .awsui_control-last-horizontal_o08jm_35ajp_58:not(#\9) {
59
+ margin-inline-start: calc(-1 * var(--border-width-field-2365x3, 1px));
60
+ }
61
+ .awsui_control-middle-vertical_o08jm_35ajp_61:not(#\9), .awsui_control-last-vertical_o08jm_35ajp_61:not(#\9) {
62
+ margin-block-start: calc(-1 * var(--border-width-field-2365x3, 1px));
63
+ }
@@ -0,0 +1,14 @@
1
+
2
+ // es-module interop with Babel and Typescript
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ module.exports.default = {
5
+ "root": "awsui_root_o08jm_35ajp_9",
6
+ "root-horizontal": "awsui_root-horizontal_o08jm_35ajp_41",
7
+ "root-vertical": "awsui_root-vertical_o08jm_35ajp_46",
8
+ "control": "awsui_control_o08jm_35ajp_51",
9
+ "control-middle-horizontal": "awsui_control-middle-horizontal_o08jm_35ajp_58",
10
+ "control-last-horizontal": "awsui_control-last-horizontal_o08jm_35ajp_58",
11
+ "control-middle-vertical": "awsui_control-middle-vertical_o08jm_35ajp_61",
12
+ "control-last-vertical": "awsui_control-last-vertical_o08jm_35ajp_61"
13
+ };
14
+
@@ -1,35 +1,35 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "direction-button-wrapper": "awsui_direction-button-wrapper_155yk_wnan2_29",
5
- "direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-enter_155yk_wnan2_49",
6
- "direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-entering_155yk_wnan2_49",
7
- "direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-exit_155yk_wnan2_49",
8
- "direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-exiting_155yk_wnan2_49",
9
- "drag-handle-entry": "awsui_drag-handle-entry_155yk_wnan2_1",
10
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_155yk_wnan2_1",
11
- "drag-handle-exit": "awsui_drag-handle-exit_155yk_wnan2_1",
12
- "awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_155yk_wnan2_1",
13
- "direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-start_155yk_wnan2_89",
14
- "direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-end_155yk_wnan2_93",
15
- "direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-start_155yk_wnan2_97",
16
- "direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-end_155yk_wnan2_108",
17
- "contents": "awsui_contents_155yk_wnan2_119",
18
- "portal-overlay": "awsui_portal-overlay_155yk_wnan2_123",
19
- "portal-overlay-disabled": "awsui_portal-overlay-disabled_155yk_wnan2_131",
20
- "portal-overlay-contents": "awsui_portal-overlay-contents_155yk_wnan2_135",
21
- "drag-handle": "awsui_drag-handle_155yk_wnan2_139",
22
- "direction-button-wrapper-hidden": "awsui_direction-button-wrapper-hidden_155yk_wnan2_152",
23
- "direction-button-wrapper-forced": "awsui_direction-button-wrapper-forced_155yk_wnan2_176",
24
- "direction-button-wrapper-forced-top-0": "awsui_direction-button-wrapper-forced-top-0_155yk_wnan2_180",
25
- "direction-button-wrapper-forced-top-1": "awsui_direction-button-wrapper-forced-top-1_155yk_wnan2_184",
26
- "direction-button-wrapper-forced-top-2": "awsui_direction-button-wrapper-forced-top-2_155yk_wnan2_188",
27
- "direction-button-wrapper-forced-top-3": "awsui_direction-button-wrapper-forced-top-3_155yk_wnan2_192",
28
- "direction-button-wrapper-forced-bottom-0": "awsui_direction-button-wrapper-forced-bottom-0_155yk_wnan2_196",
29
- "direction-button-wrapper-forced-bottom-1": "awsui_direction-button-wrapper-forced-bottom-1_155yk_wnan2_200",
30
- "direction-button-wrapper-forced-bottom-2": "awsui_direction-button-wrapper-forced-bottom-2_155yk_wnan2_204",
31
- "direction-button-wrapper-forced-bottom-3": "awsui_direction-button-wrapper-forced-bottom-3_155yk_wnan2_208",
32
- "direction-button": "awsui_direction-button_155yk_wnan2_29",
33
- "direction-button-disabled": "awsui_direction-button-disabled_155yk_wnan2_231"
4
+ "direction-button-wrapper": "awsui_direction-button-wrapper_155yk_w8xqx_29",
5
+ "direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-enter_155yk_w8xqx_49",
6
+ "direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-entering_155yk_w8xqx_49",
7
+ "direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-exit_155yk_w8xqx_49",
8
+ "direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-exiting_155yk_w8xqx_49",
9
+ "drag-handle-entry": "awsui_drag-handle-entry_155yk_w8xqx_1",
10
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_155yk_w8xqx_1",
11
+ "drag-handle-exit": "awsui_drag-handle-exit_155yk_w8xqx_1",
12
+ "awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_155yk_w8xqx_1",
13
+ "direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-start_155yk_w8xqx_89",
14
+ "direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-end_155yk_w8xqx_93",
15
+ "direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-start_155yk_w8xqx_97",
16
+ "direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-end_155yk_w8xqx_108",
17
+ "contents": "awsui_contents_155yk_w8xqx_119",
18
+ "portal-overlay": "awsui_portal-overlay_155yk_w8xqx_123",
19
+ "portal-overlay-disabled": "awsui_portal-overlay-disabled_155yk_w8xqx_131",
20
+ "portal-overlay-contents": "awsui_portal-overlay-contents_155yk_w8xqx_135",
21
+ "drag-handle": "awsui_drag-handle_155yk_w8xqx_139",
22
+ "direction-button-wrapper-hidden": "awsui_direction-button-wrapper-hidden_155yk_w8xqx_152",
23
+ "direction-button-wrapper-forced": "awsui_direction-button-wrapper-forced_155yk_w8xqx_176",
24
+ "direction-button-wrapper-forced-top-0": "awsui_direction-button-wrapper-forced-top-0_155yk_w8xqx_180",
25
+ "direction-button-wrapper-forced-top-1": "awsui_direction-button-wrapper-forced-top-1_155yk_w8xqx_184",
26
+ "direction-button-wrapper-forced-top-2": "awsui_direction-button-wrapper-forced-top-2_155yk_w8xqx_188",
27
+ "direction-button-wrapper-forced-top-3": "awsui_direction-button-wrapper-forced-top-3_155yk_w8xqx_192",
28
+ "direction-button-wrapper-forced-bottom-0": "awsui_direction-button-wrapper-forced-bottom-0_155yk_w8xqx_196",
29
+ "direction-button-wrapper-forced-bottom-1": "awsui_direction-button-wrapper-forced-bottom-1_155yk_w8xqx_200",
30
+ "direction-button-wrapper-forced-bottom-2": "awsui_direction-button-wrapper-forced-bottom-2_155yk_w8xqx_204",
31
+ "direction-button-wrapper-forced-bottom-3": "awsui_direction-button-wrapper-forced-bottom-3_155yk_w8xqx_208",
32
+ "direction-button": "awsui_direction-button_155yk_w8xqx_29",
33
+ "direction-button-disabled": "awsui_direction-button-disabled_155yk_w8xqx_231"
34
34
  };
35
35
 
@@ -10,27 +10,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
10
10
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
11
11
  SPDX-License-Identifier: Apache-2.0
12
12
  */
13
- @keyframes awsui_drag-handle-entry_155yk_wnan2_1 {
13
+ @keyframes awsui_drag-handle-entry_155yk_w8xqx_1 {
14
14
  from {
15
- transform: translate(var(--awsui-drag-handle-animation-inline-offset-66120l), var(--awsui-drag-handle-animation-block-offset-66120l));
15
+ transform: translate(var(--awsui-drag-handle-animation-inline-offset-ka4djm), var(--awsui-drag-handle-animation-block-offset-ka4djm));
16
16
  }
17
17
  to {
18
18
  transform: translate(0, 0);
19
19
  }
20
20
  }
21
- @keyframes awsui_drag-handle-exit_155yk_wnan2_1 {
21
+ @keyframes awsui_drag-handle-exit_155yk_w8xqx_1 {
22
22
  from {
23
23
  transform: translate(0, 0);
24
24
  }
25
25
  to {
26
- transform: translate(var(--awsui-drag-handle-animation-inline-offset-66120l), var(--awsui-drag-handle-animation-block-offset-66120l));
26
+ transform: translate(var(--awsui-drag-handle-animation-inline-offset-ka4djm), var(--awsui-drag-handle-animation-block-offset-ka4djm));
27
27
  }
28
28
  }
29
- .awsui_direction-button-wrapper_155yk_wnan2_29:not(#\9) {
30
- --awsui-drag-handle-animation-inline-offset-66120l: 0;
31
- --awsui-drag-handle-animation-block-offset-66120l: 0;
29
+ .awsui_direction-button-wrapper_155yk_w8xqx_29:not(#\9) {
30
+ --awsui-drag-handle-animation-inline-offset-ka4djm: 0;
31
+ --awsui-drag-handle-animation-block-offset-ka4djm: 0;
32
32
  }
33
- @keyframes awsui_awsui-motion-fade-in_155yk_wnan2_1 {
33
+ @keyframes awsui_awsui-motion-fade-in_155yk_w8xqx_1 {
34
34
  from {
35
35
  opacity: 0.2;
36
36
  }
@@ -38,7 +38,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
38
38
  opacity: 1;
39
39
  }
40
40
  }
41
- @keyframes awsui_awsui-motion-fade-out-0_155yk_wnan2_1 {
41
+ @keyframes awsui_awsui-motion-fade-out-0_155yk_w8xqx_1 {
42
42
  from {
43
43
  opacity: 1;
44
44
  }
@@ -46,81 +46,81 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
46
46
  opacity: 0;
47
47
  }
48
48
  }
49
- .awsui_direction-button-wrapper-motion-enter_155yk_wnan2_49:not(#\9), .awsui_direction-button-wrapper-motion-entering_155yk_wnan2_49:not(#\9), .awsui_direction-button-wrapper-motion-exit_155yk_wnan2_49:not(#\9), .awsui_direction-button-wrapper-motion-exiting_155yk_wnan2_49:not(#\9) {
49
+ .awsui_direction-button-wrapper-motion-enter_155yk_w8xqx_49:not(#\9), .awsui_direction-button-wrapper-motion-entering_155yk_w8xqx_49:not(#\9), .awsui_direction-button-wrapper-motion-exit_155yk_w8xqx_49:not(#\9), .awsui_direction-button-wrapper-motion-exiting_155yk_w8xqx_49:not(#\9) {
50
50
  pointer-events: none;
51
51
  }
52
- .awsui_direction-button-wrapper-motion-entering_155yk_wnan2_49:not(#\9) {
53
- animation: awsui_drag-handle-entry_155yk_wnan2_1 var(--motion-duration-complex-n5wfwh, 270ms) var(--motion-easing-responsive-k7246o, ease-out), awsui_awsui-motion-fade-in_155yk_wnan2_1 var(--motion-duration-complex-n5wfwh, 270ms) var(--motion-easing-responsive-k7246o, ease-out);
52
+ .awsui_direction-button-wrapper-motion-entering_155yk_w8xqx_49:not(#\9) {
53
+ animation: awsui_drag-handle-entry_155yk_w8xqx_1 var(--motion-duration-complex-n5wfwh, 270ms) var(--motion-easing-responsive-k7246o, ease-out), awsui_awsui-motion-fade-in_155yk_w8xqx_1 var(--motion-duration-complex-n5wfwh, 270ms) var(--motion-easing-responsive-k7246o, ease-out);
54
54
  }
55
55
  @media (prefers-reduced-motion: reduce) {
56
- .awsui_direction-button-wrapper-motion-entering_155yk_wnan2_49:not(#\9) {
56
+ .awsui_direction-button-wrapper-motion-entering_155yk_w8xqx_49:not(#\9) {
57
57
  animation: none;
58
58
  transition: none;
59
59
  }
60
60
  }
61
- .awsui-motion-disabled .awsui_direction-button-wrapper-motion-entering_155yk_wnan2_49:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-entering_155yk_wnan2_49:not(#\9) {
61
+ .awsui-motion-disabled .awsui_direction-button-wrapper-motion-entering_155yk_w8xqx_49:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-entering_155yk_w8xqx_49:not(#\9) {
62
62
  animation: none;
63
63
  transition: none;
64
64
  }
65
- .awsui_direction-button-wrapper-motion-exiting_155yk_wnan2_49:not(#\9) {
66
- animation: awsui_drag-handle-exit_155yk_wnan2_1 var(--motion-duration-complex-n5wfwh, 270ms) var(--motion-easing-responsive-k7246o, ease-out) forwards, awsui_awsui-motion-fade-out-0_155yk_wnan2_1 var(--motion-duration-complex-n5wfwh, 270ms) var(--motion-easing-responsive-k7246o, ease-out) forwards;
65
+ .awsui_direction-button-wrapper-motion-exiting_155yk_w8xqx_49:not(#\9) {
66
+ animation: awsui_drag-handle-exit_155yk_w8xqx_1 var(--motion-duration-complex-n5wfwh, 270ms) var(--motion-easing-responsive-k7246o, ease-out) forwards, awsui_awsui-motion-fade-out-0_155yk_w8xqx_1 var(--motion-duration-complex-n5wfwh, 270ms) var(--motion-easing-responsive-k7246o, ease-out) forwards;
67
67
  }
68
68
  @media (prefers-reduced-motion: reduce) {
69
- .awsui_direction-button-wrapper-motion-exiting_155yk_wnan2_49:not(#\9) {
69
+ .awsui_direction-button-wrapper-motion-exiting_155yk_w8xqx_49:not(#\9) {
70
70
  animation: none;
71
71
  transition: none;
72
72
  }
73
73
  }
74
- .awsui-motion-disabled .awsui_direction-button-wrapper-motion-exiting_155yk_wnan2_49:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-exiting_155yk_wnan2_49:not(#\9) {
74
+ .awsui-motion-disabled .awsui_direction-button-wrapper-motion-exiting_155yk_w8xqx_49:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-exiting_155yk_w8xqx_49:not(#\9) {
75
75
  animation: none;
76
76
  transition: none;
77
77
  }
78
78
  @media (prefers-reduced-motion: reduce) {
79
- .awsui_direction-button-wrapper_155yk_wnan2_29:not(#\9) {
79
+ .awsui_direction-button-wrapper_155yk_w8xqx_29:not(#\9) {
80
80
  animation: none;
81
81
  transition: none;
82
82
  }
83
83
  }
84
- .awsui-motion-disabled .awsui_direction-button-wrapper_155yk_wnan2_29:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper_155yk_wnan2_29:not(#\9) {
84
+ .awsui-motion-disabled .awsui_direction-button-wrapper_155yk_w8xqx_29:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper_155yk_w8xqx_29:not(#\9) {
85
85
  animation: none;
86
86
  transition: none;
87
87
  }
88
88
 
89
- .awsui_direction-button-wrapper-block-start_155yk_wnan2_89:not(#\9) {
90
- --awsui-drag-handle-animation-block-offset-66120l: 20px;
89
+ .awsui_direction-button-wrapper-block-start_155yk_w8xqx_89:not(#\9) {
90
+ --awsui-drag-handle-animation-block-offset-ka4djm: 20px;
91
91
  }
92
92
 
93
- .awsui_direction-button-wrapper-block-end_155yk_wnan2_93:not(#\9) {
94
- --awsui-drag-handle-animation-block-offset-66120l: -20px;
93
+ .awsui_direction-button-wrapper-block-end_155yk_w8xqx_93:not(#\9) {
94
+ --awsui-drag-handle-animation-block-offset-ka4djm: -20px;
95
95
  }
96
96
 
97
- .awsui_direction-button-wrapper-inline-start_155yk_wnan2_97:not(#\9) {
97
+ .awsui_direction-button-wrapper-inline-start_155yk_w8xqx_97:not(#\9) {
98
98
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
99
99
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
100
100
  }
101
- .awsui_direction-button-wrapper-inline-start_155yk_wnan2_97:not(#\9):dir(ltr) {
102
- --awsui-drag-handle-animation-inline-offset-66120l: 20px;
101
+ .awsui_direction-button-wrapper-inline-start_155yk_w8xqx_97:not(#\9):dir(ltr) {
102
+ --awsui-drag-handle-animation-inline-offset-ka4djm: 20px;
103
103
  }
104
- .awsui_direction-button-wrapper-inline-start_155yk_wnan2_97:not(#\9):dir(rtl) {
105
- --awsui-drag-handle-animation-inline-offset-66120l: -20px;
104
+ .awsui_direction-button-wrapper-inline-start_155yk_w8xqx_97:not(#\9):dir(rtl) {
105
+ --awsui-drag-handle-animation-inline-offset-ka4djm: -20px;
106
106
  }
107
107
 
108
- .awsui_direction-button-wrapper-inline-end_155yk_wnan2_108:not(#\9) {
108
+ .awsui_direction-button-wrapper-inline-end_155yk_w8xqx_108:not(#\9) {
109
109
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
110
110
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
111
111
  }
112
- .awsui_direction-button-wrapper-inline-end_155yk_wnan2_108:not(#\9):dir(ltr) {
113
- --awsui-drag-handle-animation-inline-offset-66120l: -20px;
112
+ .awsui_direction-button-wrapper-inline-end_155yk_w8xqx_108:not(#\9):dir(ltr) {
113
+ --awsui-drag-handle-animation-inline-offset-ka4djm: -20px;
114
114
  }
115
- .awsui_direction-button-wrapper-inline-end_155yk_wnan2_108:not(#\9):dir(rtl) {
116
- --awsui-drag-handle-animation-inline-offset-66120l: 20px;
115
+ .awsui_direction-button-wrapper-inline-end_155yk_w8xqx_108:not(#\9):dir(rtl) {
116
+ --awsui-drag-handle-animation-inline-offset-ka4djm: 20px;
117
117
  }
118
118
 
119
- .awsui_contents_155yk_wnan2_119:not(#\9) {
119
+ .awsui_contents_155yk_w8xqx_119:not(#\9) {
120
120
  display: contents;
121
121
  }
122
122
 
123
- .awsui_portal-overlay_155yk_wnan2_123:not(#\9) {
123
+ .awsui_portal-overlay_155yk_w8xqx_123:not(#\9) {
124
124
  position: absolute;
125
125
  inset-block-start: 0;
126
126
  inset-inline-start: 0;
@@ -128,20 +128,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
128
128
  z-index: 7000;
129
129
  }
130
130
 
131
- .awsui_portal-overlay-disabled_155yk_wnan2_131:not(#\9) {
131
+ .awsui_portal-overlay-disabled_155yk_w8xqx_131:not(#\9) {
132
132
  display: none;
133
133
  }
134
134
 
135
- .awsui_portal-overlay-contents_155yk_wnan2_135:not(#\9) {
135
+ .awsui_portal-overlay-contents_155yk_w8xqx_135:not(#\9) {
136
136
  pointer-events: auto;
137
137
  }
138
138
 
139
- .awsui_drag-handle_155yk_wnan2_139:not(#\9) {
139
+ .awsui_drag-handle_155yk_w8xqx_139:not(#\9) {
140
140
  position: relative;
141
141
  display: inline-flex;
142
142
  }
143
143
 
144
- .awsui_direction-button-wrapper_155yk_wnan2_29:not(#\9) {
144
+ .awsui_direction-button-wrapper_155yk_w8xqx_29:not(#\9) {
145
145
  position: absolute;
146
146
  block-size: var(--space-static-xl-frcfkv, 24px);
147
147
  inline-size: var(--space-static-xl-frcfkv, 24px);
@@ -149,67 +149,67 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
149
149
  padding-inline: var(--space-static-xxs-vzto3j, 4px);
150
150
  }
151
151
 
152
- .awsui_direction-button-wrapper-hidden_155yk_wnan2_152:not(#\9) {
152
+ .awsui_direction-button-wrapper-hidden_155yk_w8xqx_152:not(#\9) {
153
153
  display: none;
154
154
  }
155
155
 
156
- .awsui_direction-button-wrapper-block-start_155yk_wnan2_89:not(#\9) {
156
+ .awsui_direction-button-wrapper-block-start_155yk_w8xqx_89:not(#\9) {
157
157
  inset-block-start: calc(-1 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
158
158
  inset-inline-start: calc(50% - (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)) / 2);
159
159
  }
160
160
 
161
- .awsui_direction-button-wrapper-block-end_155yk_wnan2_93:not(#\9) {
161
+ .awsui_direction-button-wrapper-block-end_155yk_w8xqx_93:not(#\9) {
162
162
  inset-block-end: calc(-1 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
163
163
  inset-inline-start: calc(50% - (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)) / 2);
164
164
  }
165
165
 
166
- .awsui_direction-button-wrapper-inline-start_155yk_wnan2_97:not(#\9) {
166
+ .awsui_direction-button-wrapper-inline-start_155yk_w8xqx_97:not(#\9) {
167
167
  inset-inline-start: calc(-1 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
168
168
  inset-block-start: calc(50% - (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)) / 2);
169
169
  }
170
170
 
171
- .awsui_direction-button-wrapper-inline-end_155yk_wnan2_108:not(#\9) {
171
+ .awsui_direction-button-wrapper-inline-end_155yk_w8xqx_108:not(#\9) {
172
172
  inset-inline-end: calc(-1 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
173
173
  inset-block-start: calc(50% - (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)) / 2);
174
174
  }
175
175
 
176
- .awsui_direction-button-wrapper-forced_155yk_wnan2_176:not(#\9) {
176
+ .awsui_direction-button-wrapper-forced_155yk_w8xqx_176:not(#\9) {
177
177
  inset-inline-start: calc(50% - (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)) / 2);
178
178
  }
179
179
 
180
- .awsui_direction-button-wrapper-forced-top-0_155yk_wnan2_180:not(#\9) {
180
+ .awsui_direction-button-wrapper-forced-top-0_155yk_w8xqx_180:not(#\9) {
181
181
  inset-block-start: calc(-1 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
182
182
  }
183
183
 
184
- .awsui_direction-button-wrapper-forced-top-1_155yk_wnan2_184:not(#\9) {
184
+ .awsui_direction-button-wrapper-forced-top-1_155yk_w8xqx_184:not(#\9) {
185
185
  inset-block-start: calc(-2 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
186
186
  }
187
187
 
188
- .awsui_direction-button-wrapper-forced-top-2_155yk_wnan2_188:not(#\9) {
188
+ .awsui_direction-button-wrapper-forced-top-2_155yk_w8xqx_188:not(#\9) {
189
189
  inset-block-start: calc(-3 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
190
190
  }
191
191
 
192
- .awsui_direction-button-wrapper-forced-top-3_155yk_wnan2_192:not(#\9) {
192
+ .awsui_direction-button-wrapper-forced-top-3_155yk_w8xqx_192:not(#\9) {
193
193
  inset-block-start: calc(-4 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
194
194
  }
195
195
 
196
- .awsui_direction-button-wrapper-forced-bottom-0_155yk_wnan2_196:not(#\9) {
196
+ .awsui_direction-button-wrapper-forced-bottom-0_155yk_w8xqx_196:not(#\9) {
197
197
  inset-block-start: calc(1 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
198
198
  }
199
199
 
200
- .awsui_direction-button-wrapper-forced-bottom-1_155yk_wnan2_200:not(#\9) {
200
+ .awsui_direction-button-wrapper-forced-bottom-1_155yk_w8xqx_200:not(#\9) {
201
201
  inset-block-start: calc(2 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
202
202
  }
203
203
 
204
- .awsui_direction-button-wrapper-forced-bottom-2_155yk_wnan2_204:not(#\9) {
204
+ .awsui_direction-button-wrapper-forced-bottom-2_155yk_w8xqx_204:not(#\9) {
205
205
  inset-block-start: calc(3 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
206
206
  }
207
207
 
208
- .awsui_direction-button-wrapper-forced-bottom-3_155yk_wnan2_208:not(#\9) {
208
+ .awsui_direction-button-wrapper-forced-bottom-3_155yk_w8xqx_208:not(#\9) {
209
209
  inset-block-start: calc(4 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
210
210
  }
211
211
 
212
- .awsui_direction-button_155yk_wnan2_29:not(#\9) {
212
+ .awsui_direction-button_155yk_w8xqx_29:not(#\9) {
213
213
  position: absolute;
214
214
  border-width: 0;
215
215
  cursor: pointer;
@@ -228,14 +228,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
228
228
  color: var(--color-text-direction-button-default-rvsx02, #ffffff);
229
229
  box-shadow: var(--shadow-dropdown-ogwesf, 0 1px 1px 0 rgba(0, 28, 36, 0.3), 1px 1px 1px 0 rgba(0, 28, 36, 0.15), -1px 1px 1px 0 rgba(0, 28, 36, 0.15));
230
230
  }
231
- .awsui_direction-button_155yk_wnan2_29:not(#\9):not(.awsui_direction-button-disabled_155yk_wnan2_231):hover {
231
+ .awsui_direction-button_155yk_w8xqx_29:not(#\9):not(.awsui_direction-button-disabled_155yk_w8xqx_231):hover {
232
232
  background-color: var(--color-background-direction-button-hover-ixmpit, #414750);
233
233
  }
234
- .awsui_direction-button_155yk_wnan2_29:not(#\9):not(.awsui_direction-button-disabled_155yk_wnan2_231):active {
234
+ .awsui_direction-button_155yk_w8xqx_29:not(#\9):not(.awsui_direction-button-disabled_155yk_w8xqx_231):active {
235
235
  background-color: var(--color-background-direction-button-active-ilpypx, #2a2e33);
236
236
  }
237
237
 
238
- .awsui_direction-button-disabled_155yk_wnan2_231:not(#\9) {
238
+ .awsui_direction-button-disabled_155yk_w8xqx_231:not(#\9) {
239
239
  cursor: default;
240
240
  background-color: var(--color-background-direction-button-disabled-p1avil, #eaeded);
241
241
  color: var(--color-text-direction-button-disabled-qzn64l, #aab7b8);
@@ -2,35 +2,35 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "direction-button-wrapper": "awsui_direction-button-wrapper_155yk_wnan2_29",
6
- "direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-enter_155yk_wnan2_49",
7
- "direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-entering_155yk_wnan2_49",
8
- "direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-exit_155yk_wnan2_49",
9
- "direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-exiting_155yk_wnan2_49",
10
- "drag-handle-entry": "awsui_drag-handle-entry_155yk_wnan2_1",
11
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_155yk_wnan2_1",
12
- "drag-handle-exit": "awsui_drag-handle-exit_155yk_wnan2_1",
13
- "awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_155yk_wnan2_1",
14
- "direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-start_155yk_wnan2_89",
15
- "direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-end_155yk_wnan2_93",
16
- "direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-start_155yk_wnan2_97",
17
- "direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-end_155yk_wnan2_108",
18
- "contents": "awsui_contents_155yk_wnan2_119",
19
- "portal-overlay": "awsui_portal-overlay_155yk_wnan2_123",
20
- "portal-overlay-disabled": "awsui_portal-overlay-disabled_155yk_wnan2_131",
21
- "portal-overlay-contents": "awsui_portal-overlay-contents_155yk_wnan2_135",
22
- "drag-handle": "awsui_drag-handle_155yk_wnan2_139",
23
- "direction-button-wrapper-hidden": "awsui_direction-button-wrapper-hidden_155yk_wnan2_152",
24
- "direction-button-wrapper-forced": "awsui_direction-button-wrapper-forced_155yk_wnan2_176",
25
- "direction-button-wrapper-forced-top-0": "awsui_direction-button-wrapper-forced-top-0_155yk_wnan2_180",
26
- "direction-button-wrapper-forced-top-1": "awsui_direction-button-wrapper-forced-top-1_155yk_wnan2_184",
27
- "direction-button-wrapper-forced-top-2": "awsui_direction-button-wrapper-forced-top-2_155yk_wnan2_188",
28
- "direction-button-wrapper-forced-top-3": "awsui_direction-button-wrapper-forced-top-3_155yk_wnan2_192",
29
- "direction-button-wrapper-forced-bottom-0": "awsui_direction-button-wrapper-forced-bottom-0_155yk_wnan2_196",
30
- "direction-button-wrapper-forced-bottom-1": "awsui_direction-button-wrapper-forced-bottom-1_155yk_wnan2_200",
31
- "direction-button-wrapper-forced-bottom-2": "awsui_direction-button-wrapper-forced-bottom-2_155yk_wnan2_204",
32
- "direction-button-wrapper-forced-bottom-3": "awsui_direction-button-wrapper-forced-bottom-3_155yk_wnan2_208",
33
- "direction-button": "awsui_direction-button_155yk_wnan2_29",
34
- "direction-button-disabled": "awsui_direction-button-disabled_155yk_wnan2_231"
5
+ "direction-button-wrapper": "awsui_direction-button-wrapper_155yk_w8xqx_29",
6
+ "direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-enter_155yk_w8xqx_49",
7
+ "direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-entering_155yk_w8xqx_49",
8
+ "direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-exit_155yk_w8xqx_49",
9
+ "direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-exiting_155yk_w8xqx_49",
10
+ "drag-handle-entry": "awsui_drag-handle-entry_155yk_w8xqx_1",
11
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_155yk_w8xqx_1",
12
+ "drag-handle-exit": "awsui_drag-handle-exit_155yk_w8xqx_1",
13
+ "awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_155yk_w8xqx_1",
14
+ "direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-start_155yk_w8xqx_89",
15
+ "direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-end_155yk_w8xqx_93",
16
+ "direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-start_155yk_w8xqx_97",
17
+ "direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-end_155yk_w8xqx_108",
18
+ "contents": "awsui_contents_155yk_w8xqx_119",
19
+ "portal-overlay": "awsui_portal-overlay_155yk_w8xqx_123",
20
+ "portal-overlay-disabled": "awsui_portal-overlay-disabled_155yk_w8xqx_131",
21
+ "portal-overlay-contents": "awsui_portal-overlay-contents_155yk_w8xqx_135",
22
+ "drag-handle": "awsui_drag-handle_155yk_w8xqx_139",
23
+ "direction-button-wrapper-hidden": "awsui_direction-button-wrapper-hidden_155yk_w8xqx_152",
24
+ "direction-button-wrapper-forced": "awsui_direction-button-wrapper-forced_155yk_w8xqx_176",
25
+ "direction-button-wrapper-forced-top-0": "awsui_direction-button-wrapper-forced-top-0_155yk_w8xqx_180",
26
+ "direction-button-wrapper-forced-top-1": "awsui_direction-button-wrapper-forced-top-1_155yk_w8xqx_184",
27
+ "direction-button-wrapper-forced-top-2": "awsui_direction-button-wrapper-forced-top-2_155yk_w8xqx_188",
28
+ "direction-button-wrapper-forced-top-3": "awsui_direction-button-wrapper-forced-top-3_155yk_w8xqx_192",
29
+ "direction-button-wrapper-forced-bottom-0": "awsui_direction-button-wrapper-forced-bottom-0_155yk_w8xqx_196",
30
+ "direction-button-wrapper-forced-bottom-1": "awsui_direction-button-wrapper-forced-bottom-1_155yk_w8xqx_200",
31
+ "direction-button-wrapper-forced-bottom-2": "awsui_direction-button-wrapper-forced-bottom-2_155yk_w8xqx_204",
32
+ "direction-button-wrapper-forced-bottom-3": "awsui_direction-button-wrapper-forced-bottom-3_155yk_w8xqx_208",
33
+ "direction-button": "awsui_direction-button_155yk_w8xqx_29",
34
+ "direction-button-disabled": "awsui_direction-button-disabled_155yk_w8xqx_231"
35
35
  };
36
36
 
@@ -4,6 +4,12 @@ export interface FocusLockProps {
4
4
  disabled?: boolean;
5
5
  autoFocus?: boolean;
6
6
  restoreFocus?: boolean;
7
+ /**
8
+ * Element to focus when `autoFocus` captures focus. Defaults to the first
9
+ * focusable element in the container. Use this to focus an element that isn't
10
+ * keyboard-reachable, such as a heading with `tabIndex={-1}`.
11
+ */
12
+ autoFocusTarget?: React.RefObject<HTMLElement>;
7
13
  children: React.ReactNode;
8
14
  }
9
15
  export interface FocusLockRef {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAQ7F,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;CACpB;;AA0ED,wBAA2C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAQ7F,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC/C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;CACpB;;AA8ED,wBAA2C"}
@@ -5,7 +5,7 @@ import { nodeBelongs } from '@cloudscape-design/component-toolkit/dom';
5
5
  import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
6
6
  import TabTrap from '../tab-trap/index';
7
7
  import { getFirstFocusable, getLastFocusable } from './utils';
8
- function FocusLock({ className, disabled, autoFocus, restoreFocus, children }, ref) {
8
+ function FocusLock({ className, disabled, autoFocus, restoreFocus, autoFocusTarget, children }, ref) {
9
9
  const restoreFocusTargetRef = useRef(null);
10
10
  const containerRef = useRef(null);
11
11
  const focusFirst = () => {
@@ -31,9 +31,14 @@ function FocusLock({ className, disabled, autoFocus, restoreFocus, children }, r
31
31
  };
32
32
  if (autoFocus && !disabled) {
33
33
  assignRestoreFocusTarget();
34
- focusFirst();
34
+ if (autoFocusTarget === null || autoFocusTarget === void 0 ? void 0 : autoFocusTarget.current) {
35
+ autoFocusTarget.current.focus();
36
+ }
37
+ else {
38
+ focusFirst();
39
+ }
35
40
  }
36
- }, [autoFocus, disabled]);
41
+ }, [autoFocus, disabled, autoFocusTarget]);
37
42
  // Restore focus if `restoreFocus` is set, and `disabled` changes from false to true.
38
43
  const [previouslyDisabled, setPreviouslyDisabled] = useState(!!disabled);
39
44
  useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7F,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE7E,OAAO,OAAO,MAAM,mBAAmB,CAA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ChH,6BAAK,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,IACtC,QAAQ,CACL;QACN,oBAAC,OAAO,IAAC,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,GAAI,CAC/G,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';\n\nimport { nodeBelongs } from '@cloudscape-design/component-toolkit/dom';\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport TabTrap from '../tab-trap/index';\nimport { getFirstFocusable, getLastFocusable } from './utils';\n\nexport interface FocusLockProps {\n className?: string;\n disabled?: boolean;\n autoFocus?: boolean;\n restoreFocus?: boolean;\n children: React.ReactNode;\n}\n\nexport interface FocusLockRef {\n /**\n * Focuses the first element in the component.\n */\n focusFirst(): void;\n}\n\nfunction FocusLock(\n { className, disabled, autoFocus, restoreFocus, children }: FocusLockProps,\n ref: React.Ref<FocusLockRef>\n) {\n const restoreFocusTargetRef = useRef<HTMLOrSVGElement | null>(null);\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n const focusFirst = () => {\n if (containerRef.current) {\n getFirstFocusable(containerRef.current)?.focus();\n }\n };\n\n const focusLast = () => {\n if (containerRef.current) {\n getLastFocusable(containerRef.current)?.focus();\n }\n };\n\n // Captures focus when `autoFocus` is set, and the component is mounted or\n // `disabled` changes from true to false.\n useEffect(() => {\n const assignRestoreFocusTarget = () => {\n if (document.activeElement && !containerRef.current?.contains(document.activeElement as Node)) {\n restoreFocusTargetRef.current = document.activeElement as unknown as HTMLOrSVGElement;\n }\n };\n if (autoFocus && !disabled) {\n assignRestoreFocusTarget();\n focusFirst();\n }\n }, [autoFocus, disabled]);\n\n // Restore focus if `restoreFocus` is set, and `disabled` changes from false to true.\n const [previouslyDisabled, setPreviouslyDisabled] = useState(!!disabled);\n useEffect(() => {\n if (previouslyDisabled !== !!disabled) {\n setPreviouslyDisabled(!!disabled);\n if (restoreFocus && disabled) {\n restoreFocusTargetRef.current?.focus();\n restoreFocusTargetRef.current = null;\n }\n }\n }, [previouslyDisabled, disabled, restoreFocus]);\n\n // Restore focus if `restoreFocus` is set and the component is unmounted.\n // Using a callback ref for this is safer than using useEffect cleanups.\n const restoreFocusHandler = useCallback(\n (elem: HTMLDivElement | null) => {\n if (elem === null && restoreFocus) {\n restoreFocusTargetRef.current?.focus();\n restoreFocusTargetRef.current = null;\n }\n },\n [restoreFocus]\n );\n\n useImperativeHandle(ref, () => ({ focusFirst }));\n const mergedRef = useMergeRefs(containerRef, restoreFocusHandler);\n\n const isFocusInside = (event: React.FocusEvent) => nodeBelongs(containerRef.current, event.relatedTarget);\n return (\n <>\n <TabTrap disabled={disabled} focusNextCallback={event => (isFocusInside(event) ? focusLast() : focusFirst())} />\n <div className={className} ref={mergedRef}>\n {children}\n </div>\n <TabTrap disabled={disabled} focusNextCallback={event => (isFocusInside(event) ? focusFirst() : focusLast())} />\n </>\n );\n}\n\nexport default React.forwardRef(FocusLock);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7F,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE7E,OAAO,OAAO,MAAM,mBAAmB,CAAC;AAC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AC,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,GAAI;QAChH,6BAAK,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,IACtC,QAAQ,CACL;QACN,oBAAC,OAAO,IAAC,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,GAAI,CAC/G,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';\n\nimport { nodeBelongs } from '@cloudscape-design/component-toolkit/dom';\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport TabTrap from '../tab-trap/index';\nimport { getFirstFocusable, getLastFocusable } from './utils';\n\nexport interface FocusLockProps {\n className?: string;\n disabled?: boolean;\n autoFocus?: boolean;\n restoreFocus?: boolean;\n /**\n * Element to focus when `autoFocus` captures focus. Defaults to the first\n * focusable element in the container. Use this to focus an element that isn't\n * keyboard-reachable, such as a heading with `tabIndex={-1}`.\n */\n autoFocusTarget?: React.RefObject<HTMLElement>;\n children: React.ReactNode;\n}\n\nexport interface FocusLockRef {\n /**\n * Focuses the first element in the component.\n */\n focusFirst(): void;\n}\n\nfunction FocusLock(\n { className, disabled, autoFocus, restoreFocus, autoFocusTarget, children }: FocusLockProps,\n ref: React.Ref<FocusLockRef>\n) {\n const restoreFocusTargetRef = useRef<HTMLOrSVGElement | null>(null);\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n const focusFirst = () => {\n if (containerRef.current) {\n getFirstFocusable(containerRef.current)?.focus();\n }\n };\n\n const focusLast = () => {\n if (containerRef.current) {\n getLastFocusable(containerRef.current)?.focus();\n }\n };\n\n // Captures focus when `autoFocus` is set, and the component is mounted or\n // `disabled` changes from true to false.\n useEffect(() => {\n const assignRestoreFocusTarget = () => {\n if (document.activeElement && !containerRef.current?.contains(document.activeElement as Node)) {\n restoreFocusTargetRef.current = document.activeElement as unknown as HTMLOrSVGElement;\n }\n };\n if (autoFocus && !disabled) {\n assignRestoreFocusTarget();\n if (autoFocusTarget?.current) {\n autoFocusTarget.current.focus();\n } else {\n focusFirst();\n }\n }\n }, [autoFocus, disabled, autoFocusTarget]);\n\n // Restore focus if `restoreFocus` is set, and `disabled` changes from false to true.\n const [previouslyDisabled, setPreviouslyDisabled] = useState(!!disabled);\n useEffect(() => {\n if (previouslyDisabled !== !!disabled) {\n setPreviouslyDisabled(!!disabled);\n if (restoreFocus && disabled) {\n restoreFocusTargetRef.current?.focus();\n restoreFocusTargetRef.current = null;\n }\n }\n }, [previouslyDisabled, disabled, restoreFocus]);\n\n // Restore focus if `restoreFocus` is set and the component is unmounted.\n // Using a callback ref for this is safer than using useEffect cleanups.\n const restoreFocusHandler = useCallback(\n (elem: HTMLDivElement | null) => {\n if (elem === null && restoreFocus) {\n restoreFocusTargetRef.current?.focus();\n restoreFocusTargetRef.current = null;\n }\n },\n [restoreFocus]\n );\n\n useImperativeHandle(ref, () => ({ focusFirst }));\n const mergedRef = useMergeRefs(containerRef, restoreFocusHandler);\n\n const isFocusInside = (event: React.FocusEvent) => nodeBelongs(containerRef.current, event.relatedTarget);\n return (\n <>\n <TabTrap disabled={disabled} focusNextCallback={event => (isFocusInside(event) ? focusLast() : focusFirst())} />\n <div className={className} ref={mergedRef}>\n {children}\n </div>\n <TabTrap disabled={disabled} focusNextCallback={event => (isFocusInside(event) ? focusFirst() : focusLast())} />\n </>\n );\n}\n\nexport default React.forwardRef(FocusLock);\n"]}