@cloudscape-design/components 3.0.127 → 3.0.128

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 (198) hide show
  1. package/annotation-context/annotation/annotation-popover.d.ts.map +1 -1
  2. package/annotation-context/annotation/annotation-popover.js +2 -8
  3. package/annotation-context/annotation/annotation-popover.js.map +1 -1
  4. package/annotation-context/annotation/annotation-trigger.d.ts +0 -2
  5. package/annotation-context/annotation/annotation-trigger.d.ts.map +1 -1
  6. package/annotation-context/annotation/annotation-trigger.js +2 -2
  7. package/annotation-context/annotation/annotation-trigger.js.map +1 -1
  8. package/annotation-context/annotation/closed-annotation.d.ts +1 -3
  9. package/annotation-context/annotation/closed-annotation.d.ts.map +1 -1
  10. package/annotation-context/annotation/closed-annotation.js +2 -2
  11. package/annotation-context/annotation/closed-annotation.js.map +1 -1
  12. package/annotation-context/annotation/open-annotation.d.ts.map +1 -1
  13. package/annotation-context/annotation/open-annotation.js +1 -1
  14. package/annotation-context/annotation/open-annotation.js.map +1 -1
  15. package/annotation-context/annotation/styles.css.js +24 -24
  16. package/annotation-context/annotation/styles.scoped.css +30 -30
  17. package/annotation-context/annotation/styles.selectors.js +24 -24
  18. package/annotation-context/index.d.ts.map +1 -1
  19. package/annotation-context/index.js +1 -3
  20. package/annotation-context/index.js.map +1 -1
  21. package/annotation-context/interfaces.d.ts +1 -1
  22. package/annotation-context/interfaces.d.ts.map +1 -1
  23. package/annotation-context/interfaces.js.map +1 -1
  24. package/app-layout/visual-refresh/main.d.ts.map +1 -1
  25. package/app-layout/visual-refresh/main.js +3 -8
  26. package/app-layout/visual-refresh/main.js.map +1 -1
  27. package/app-layout/visual-refresh/styles.css.js +60 -60
  28. package/app-layout/visual-refresh/styles.scoped.css +237 -255
  29. package/app-layout/visual-refresh/styles.selectors.js +60 -60
  30. package/area-chart/internal.d.ts.map +1 -1
  31. package/area-chart/internal.js +0 -5
  32. package/area-chart/internal.js.map +1 -1
  33. package/area-chart/model/index.d.ts +0 -1
  34. package/area-chart/model/index.d.ts.map +1 -1
  35. package/area-chart/model/index.js.map +1 -1
  36. package/area-chart/model/use-chart-model.d.ts.map +1 -1
  37. package/area-chart/model/use-chart-model.js +1 -8
  38. package/area-chart/model/use-chart-model.js.map +1 -1
  39. package/attribute-editor/row.d.ts.map +1 -1
  40. package/attribute-editor/row.js +3 -4
  41. package/attribute-editor/row.js.map +1 -1
  42. package/attribute-editor/styles.css.js +12 -13
  43. package/attribute-editor/styles.scoped.css +23 -27
  44. package/attribute-editor/styles.selectors.js +12 -13
  45. package/breadcrumb-group/interfaces.d.ts +0 -1
  46. package/breadcrumb-group/interfaces.d.ts.map +1 -1
  47. package/breadcrumb-group/interfaces.js.map +1 -1
  48. package/breadcrumb-group/internal.d.ts.map +1 -1
  49. package/breadcrumb-group/internal.js +1 -1
  50. package/breadcrumb-group/internal.js.map +1 -1
  51. package/breadcrumb-group/item/item.d.ts +1 -1
  52. package/breadcrumb-group/item/item.d.ts.map +1 -1
  53. package/breadcrumb-group/item/item.js +8 -68
  54. package/breadcrumb-group/item/item.js.map +1 -1
  55. package/breadcrumb-group/item/styles.css.js +7 -9
  56. package/breadcrumb-group/item/styles.scoped.css +16 -26
  57. package/breadcrumb-group/item/styles.selectors.js +7 -9
  58. package/code-editor/index.d.ts.map +1 -1
  59. package/code-editor/index.js +16 -11
  60. package/code-editor/index.js.map +1 -1
  61. package/code-editor/interfaces.d.ts +1 -12
  62. package/code-editor/interfaces.d.ts.map +1 -1
  63. package/code-editor/interfaces.js.map +1 -1
  64. package/code-editor/status-bar.d.ts.map +1 -1
  65. package/code-editor/status-bar.js +1 -7
  66. package/code-editor/status-bar.js.map +1 -1
  67. package/code-editor/util.js +1 -1
  68. package/code-editor/util.js.map +1 -1
  69. package/container/internal.d.ts.map +1 -1
  70. package/container/internal.js +4 -7
  71. package/container/internal.js.map +1 -1
  72. package/date-range-picker/calendar/grids/index.d.ts +1 -0
  73. package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
  74. package/date-range-picker/calendar/grids/index.js +14 -2
  75. package/date-range-picker/calendar/grids/index.js.map +1 -1
  76. package/date-range-picker/calendar/index.d.ts +4 -6
  77. package/date-range-picker/calendar/index.d.ts.map +1 -1
  78. package/date-range-picker/calendar/index.js +123 -111
  79. package/date-range-picker/calendar/index.js.map +1 -1
  80. package/date-range-picker/calendar/use-date-time.d.ts +9 -0
  81. package/date-range-picker/calendar/use-date-time.d.ts.map +1 -0
  82. package/date-range-picker/calendar/use-date-time.js +16 -0
  83. package/date-range-picker/calendar/use-date-time.js.map +1 -0
  84. package/date-range-picker/dropdown.d.ts +1 -2
  85. package/date-range-picker/dropdown.d.ts.map +1 -1
  86. package/date-range-picker/dropdown.js +6 -8
  87. package/date-range-picker/dropdown.js.map +1 -1
  88. package/date-range-picker/index.d.ts.map +1 -1
  89. package/date-range-picker/index.js +2 -2
  90. package/date-range-picker/index.js.map +1 -1
  91. package/date-range-picker/interfaces.d.ts +4 -14
  92. package/date-range-picker/interfaces.d.ts.map +1 -1
  93. package/date-range-picker/interfaces.js.map +1 -1
  94. package/date-range-picker/styles.css.js +38 -38
  95. package/date-range-picker/styles.scoped.css +50 -45
  96. package/date-range-picker/styles.selectors.js +38 -38
  97. package/date-range-picker/utils.d.ts +8 -2
  98. package/date-range-picker/utils.d.ts.map +1 -1
  99. package/date-range-picker/utils.js +12 -17
  100. package/date-range-picker/utils.js.map +1 -1
  101. package/flashbar/styles.css.js +33 -33
  102. package/flashbar/styles.scoped.css +121 -121
  103. package/flashbar/styles.selectors.js +33 -33
  104. package/internal/components/dropdown/index.d.ts.map +1 -1
  105. package/internal/components/dropdown/index.js +9 -2
  106. package/internal/components/dropdown/index.js.map +1 -1
  107. package/internal/components/dropdown-status/index.d.ts +4 -1
  108. package/internal/components/dropdown-status/index.d.ts.map +1 -1
  109. package/internal/components/dropdown-status/index.js +5 -3
  110. package/internal/components/dropdown-status/index.js.map +1 -1
  111. package/internal/components/filtering-token/index.d.ts +1 -2
  112. package/internal/components/filtering-token/index.d.ts.map +1 -1
  113. package/internal/components/filtering-token/index.js +2 -2
  114. package/internal/components/filtering-token/index.js.map +1 -1
  115. package/internal/components/option/index.js +4 -4
  116. package/internal/components/option/index.js.map +1 -1
  117. package/internal/environment.js +1 -1
  118. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  119. package/internal/generated/custom-css-properties/index.js +26 -27
  120. package/internal/generated/custom-css-properties/index.js.map +1 -1
  121. package/internal/manifest.json +1 -1
  122. package/internal/utils/date-time/index.d.ts +1 -2
  123. package/internal/utils/date-time/index.d.ts.map +1 -1
  124. package/internal/utils/date-time/index.js +1 -2
  125. package/internal/utils/date-time/index.js.map +1 -1
  126. package/internal/utils/date-time/join-date-time.d.ts +0 -4
  127. package/internal/utils/date-time/join-date-time.d.ts.map +1 -1
  128. package/internal/utils/date-time/join-date-time.js +0 -4
  129. package/internal/utils/date-time/join-date-time.js.map +1 -1
  130. package/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
  131. package/mixed-line-bar-chart/chart-container.js +5 -14
  132. package/mixed-line-bar-chart/chart-container.js.map +1 -1
  133. package/package.json +1 -1
  134. package/pie-chart/pie-chart.d.ts.map +1 -1
  135. package/pie-chart/pie-chart.js +1 -10
  136. package/pie-chart/pie-chart.js.map +1 -1
  137. package/popover/body.d.ts +1 -2
  138. package/popover/body.d.ts.map +1 -1
  139. package/popover/body.js +2 -2
  140. package/popover/body.js.map +1 -1
  141. package/property-filter/interfaces.d.ts +0 -1
  142. package/property-filter/interfaces.d.ts.map +1 -1
  143. package/property-filter/interfaces.js.map +1 -1
  144. package/property-filter/token.d.ts.map +1 -1
  145. package/property-filter/token.js +1 -1
  146. package/property-filter/token.js.map +1 -1
  147. package/select/parts/filter.d.ts +1 -1
  148. package/select/utils/use-select.d.ts +7 -1
  149. package/select/utils/use-select.d.ts.map +1 -1
  150. package/select/utils/use-select.js +1 -1
  151. package/select/utils/use-select.js.map +1 -1
  152. package/table/styles.css.js +34 -34
  153. package/table/styles.scoped.css +40 -42
  154. package/table/styles.selectors.js +34 -34
  155. package/tabs/index.d.ts.map +1 -1
  156. package/tabs/index.js +11 -9
  157. package/tabs/index.js.map +1 -1
  158. package/tabs/styles.css.js +21 -21
  159. package/tabs/styles.scoped.css +41 -48
  160. package/tabs/styles.selectors.js +21 -21
  161. package/tabs/tab-header-bar.d.ts +0 -4
  162. package/tabs/tab-header-bar.d.ts.map +1 -1
  163. package/tabs/tab-header-bar.js +1 -5
  164. package/tabs/tab-header-bar.js.map +1 -1
  165. package/tag-editor/internal.d.ts.map +1 -1
  166. package/tag-editor/internal.js +7 -6
  167. package/tag-editor/internal.js.map +1 -1
  168. package/test-utils/tsconfig.tsbuildinfo +1 -1
  169. package/tutorial-panel/components/tutorial-detail-view/index.d.ts.map +1 -1
  170. package/tutorial-panel/components/tutorial-detail-view/index.js +1 -3
  171. package/tutorial-panel/components/tutorial-detail-view/index.js.map +1 -1
  172. package/tutorial-panel/components/tutorial-detail-view/task.d.ts.map +1 -1
  173. package/tutorial-panel/components/tutorial-detail-view/task.js +1 -2
  174. package/tutorial-panel/components/tutorial-detail-view/task.js.map +1 -1
  175. package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
  176. package/tutorial-panel/components/tutorial-list/index.js +2 -2
  177. package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
  178. package/tutorial-panel/interfaces.d.ts +0 -2
  179. package/tutorial-panel/interfaces.d.ts.map +1 -1
  180. package/tutorial-panel/interfaces.js.map +1 -1
  181. package/wizard/index.d.ts.map +1 -1
  182. package/wizard/index.js +5 -9
  183. package/wizard/index.js.map +1 -1
  184. package/wizard/wizard-form.d.ts.map +1 -1
  185. package/wizard/wizard-form.js +2 -7
  186. package/wizard/wizard-form.js.map +1 -1
  187. package/date-range-picker/calendar/utils.d.ts +0 -4
  188. package/date-range-picker/calendar/utils.d.ts.map +0 -1
  189. package/date-range-picker/calendar/utils.js +0 -31
  190. package/date-range-picker/calendar/utils.js.map +0 -1
  191. package/internal/hooks/use-analytics/index.d.ts +0 -2
  192. package/internal/hooks/use-analytics/index.d.ts.map +0 -1
  193. package/internal/hooks/use-analytics/index.js +0 -16
  194. package/internal/hooks/use-analytics/index.js.map +0 -1
  195. package/internal/utils/date-time/format-date-time.d.ts +0 -2
  196. package/internal/utils/date-time/format-date-time.d.ts.map +0 -1
  197. package/internal/utils/date-time/format-date-time.js +0 -8
  198. package/internal/utils/date-time/format-date-time.js.map +0 -1
@@ -2,38 +2,38 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "flash-refresh": "awsui_flash-refresh_1q84n_gey29_93",
6
- "enter": "awsui_enter_1q84n_gey29_93",
7
- "flash-body": "awsui_flash-body_1q84n_gey29_108",
8
- "flash-message": "awsui_flash-message_1q84n_gey29_108",
9
- "flash-header": "awsui_flash-header_1q84n_gey29_108",
10
- "flash-content": "awsui_flash-content_1q84n_gey29_109",
11
- "action-button-wrapper": "awsui_action-button-wrapper_1q84n_gey29_110",
12
- "dismiss-button-wrapper": "awsui_dismiss-button-wrapper_1q84n_gey29_111",
13
- "flash-icon": "awsui_flash-icon_1q84n_gey29_134",
14
- "entering": "awsui_entering_1q84n_gey29_147",
15
- "entered": "awsui_entered_1q84n_gey29_168",
16
- "exiting": "awsui_exiting_1q84n_gey29_273",
17
- "flashbar": "awsui_flashbar_1q84n_gey29_295",
18
- "flash": "awsui_flash_1q84n_gey29_93",
19
- "flash-list": "awsui_flash-list_1q84n_gey29_350",
20
- "flash-focus-container": "awsui_flash-focus-container_1q84n_gey29_386",
21
- "flash-text": "awsui_flash-text_1q84n_gey29_392",
22
- "dismiss-button": "awsui_dismiss-button_1q84n_gey29_111",
23
- "breakpoint-default": "awsui_breakpoint-default_1q84n_gey29_433",
24
- "flash-list-item": "awsui_flash-list-item_1q84n_gey29_433",
25
- "action-button": "awsui_action-button_1q84n_gey29_110",
26
- "flash-type-success": "awsui_flash-type-success_1q84n_gey29_446",
27
- "flash-type-error": "awsui_flash-type-error_1q84n_gey29_450",
28
- "flash-type-warning": "awsui_flash-type-warning_1q84n_gey29_454",
29
- "flash-type-info": "awsui_flash-type-info_1q84n_gey29_458",
30
- "stack": "awsui_stack_1q84n_gey29_462",
31
- "expanded": "awsui_expanded_1q84n_gey29_467",
32
- "collapsed": "awsui_collapsed_1q84n_gey29_481",
33
- "item": "awsui_item_1q84n_gey29_487",
34
- "visual-refresh": "awsui_visual-refresh_1q84n_gey29_497",
35
- "flash-items": "awsui_flash-items_1q84n_gey29_503",
36
- "toggle": "awsui_toggle_1q84n_gey29_510",
37
- "icon": "awsui_icon_1q84n_gey29_573"
5
+ "flash-refresh": "awsui_flash-refresh_1q84n_1la8c_93",
6
+ "enter": "awsui_enter_1q84n_1la8c_93",
7
+ "flash-body": "awsui_flash-body_1q84n_1la8c_108",
8
+ "flash-message": "awsui_flash-message_1q84n_1la8c_108",
9
+ "flash-header": "awsui_flash-header_1q84n_1la8c_108",
10
+ "flash-content": "awsui_flash-content_1q84n_1la8c_109",
11
+ "action-button-wrapper": "awsui_action-button-wrapper_1q84n_1la8c_110",
12
+ "dismiss-button-wrapper": "awsui_dismiss-button-wrapper_1q84n_1la8c_111",
13
+ "flash-icon": "awsui_flash-icon_1q84n_1la8c_134",
14
+ "entering": "awsui_entering_1q84n_1la8c_147",
15
+ "entered": "awsui_entered_1q84n_1la8c_168",
16
+ "exiting": "awsui_exiting_1q84n_1la8c_273",
17
+ "flashbar": "awsui_flashbar_1q84n_1la8c_295",
18
+ "flash": "awsui_flash_1q84n_1la8c_93",
19
+ "flash-list": "awsui_flash-list_1q84n_1la8c_350",
20
+ "flash-focus-container": "awsui_flash-focus-container_1q84n_1la8c_386",
21
+ "flash-text": "awsui_flash-text_1q84n_1la8c_392",
22
+ "dismiss-button": "awsui_dismiss-button_1q84n_1la8c_111",
23
+ "breakpoint-default": "awsui_breakpoint-default_1q84n_1la8c_433",
24
+ "flash-list-item": "awsui_flash-list-item_1q84n_1la8c_433",
25
+ "action-button": "awsui_action-button_1q84n_1la8c_110",
26
+ "flash-type-success": "awsui_flash-type-success_1q84n_1la8c_446",
27
+ "flash-type-error": "awsui_flash-type-error_1q84n_1la8c_450",
28
+ "flash-type-warning": "awsui_flash-type-warning_1q84n_1la8c_454",
29
+ "flash-type-info": "awsui_flash-type-info_1q84n_1la8c_458",
30
+ "stack": "awsui_stack_1q84n_1la8c_462",
31
+ "expanded": "awsui_expanded_1q84n_1la8c_467",
32
+ "collapsed": "awsui_collapsed_1q84n_1la8c_481",
33
+ "item": "awsui_item_1q84n_1la8c_487",
34
+ "visual-refresh": "awsui_visual-refresh_1q84n_1la8c_497",
35
+ "flash-items": "awsui_flash-items_1q84n_1la8c_503",
36
+ "toggle": "awsui_toggle_1q84n_1la8c_510",
37
+ "icon": "awsui_icon_1q84n_1la8c_573"
38
38
  };
39
39
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAiG7C,QAAA,MAAM,QAAQ,6QAsBX,aAAa,gBA6Qf,CAAC;AAMF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAiG7C,QAAA,MAAM,QAAQ,6QAsBX,aAAa,gBAqRf,CAAC;AAMF,eAAe,QAAQ,CAAC"}
@@ -197,9 +197,16 @@ var Dropdown = function (_a) {
197
197
  fireNonCancelableEvent(onDropdownClose);
198
198
  }
199
199
  };
200
- window.addEventListener('click', clickListener, true);
200
+ /*
201
+ * This small delay allows the event that opened the dropdown to
202
+ * finish bubbling, so that it is not immediately captured here.
203
+ */
204
+ var timeout = setTimeout(function () {
205
+ window.addEventListener('click', clickListener);
206
+ }, 0);
201
207
  return function () {
202
- window.removeEventListener('click', clickListener, true);
208
+ clearTimeout(timeout);
209
+ window.removeEventListener('click', clickListener);
203
210
  };
204
211
  }, [open, onDropdownClose]);
205
212
  // sync dropdown position on scroll and resize
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAA8C,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACvG,OAAO,EAAE,UAAU,EAAoB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAgC,MAAM,WAAW,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAS7E,IAAM,iBAAiB,GAAG,UAAC,EAAwE;QAAtE,QAAQ,cAAA,EAAE,wBAAwB,EAAxB,gBAAgB,mBAAG,KAAK,KAAA,EAAE,EAAE,QAAA,EAAE,IAAI,UAAA;IACvE,IAAI,gBAAgB,EAAE;QACpB,IAAI,IAAI,EAAE;YAC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M,kBAAkB,GAAG,UACzB,QAAqD,IACZ,OAAC,QAAqC,CAAC,MAAM,KAAK,SAAS,EAA3D,CAA2D,CAAC;AAEvG,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { fireNonCancelableEvent } from '../../events';\nimport { DropdownProps } from './interfaces';\nimport { DropdownPosition, InteriorDropdownPosition, calculatePosition } from './dropdown-fit-handler';\nimport { Transition, TransitionStatus } from '../transition';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { usePortalModeClasses } from '../../hooks/use-portal-mode-classes';\nimport { DropdownContextProvider, DropdownContextProviderProps } from './context';\nimport { useMobile } from '../../hooks/use-mobile';\nimport TabTrap from '../tab-trap/index.js';\nimport { getFirstFocusable, getLastFocusable } from '../focus-lock/utils.js';\n\ninterface DropdownContainerProps {\n children?: React.ReactNode;\n renderWithPortal?: boolean;\n id?: string;\n open?: boolean;\n}\n\nconst DropdownContainer = ({ children, renderWithPortal = false, id, open }: DropdownContainerProps) => {\n if (renderWithPortal) {\n if (open) {\n return createPortal(<div id={id}>{children}</div>, document.body);\n } else {\n return null;\n }\n } else {\n return <>{children}</>;\n }\n};\n\ninterface TransitionContentProps {\n state: TransitionStatus;\n transitionRef: React.MutableRefObject<any>;\n dropdownClasses: string;\n stretchWidth: boolean;\n interior: boolean;\n isRefresh: boolean;\n dropdownRef: React.RefObject<HTMLDivElement>;\n verticalContainerRef: React.RefObject<HTMLDivElement>;\n expandToViewport?: boolean;\n header?: React.ReactNode;\n children?: React.ReactNode;\n footer?: React.ReactNode;\n position?: DropdownContextProviderProps['position'];\n open?: boolean;\n onMouseDown?: React.MouseEventHandler<Element>;\n}\n\nconst TransitionContent = ({\n state,\n transitionRef,\n dropdownClasses,\n stretchWidth,\n interior,\n isRefresh,\n dropdownRef,\n verticalContainerRef,\n expandToViewport,\n header,\n children,\n footer,\n position,\n open,\n onMouseDown,\n}: TransitionContentProps) => {\n const contentRef = useMergeRefs(dropdownRef, transitionRef);\n return (\n <div\n className={clsx(styles.dropdown, dropdownClasses, {\n [styles.open]: open,\n [styles['with-limited-width']]: !stretchWidth,\n [styles['hide-upper-border']]: stretchWidth,\n [styles.interior]: interior,\n [styles['is-empty']]: !header && !children,\n [styles.refresh]: isRefresh,\n [styles['use-portal']]: expandToViewport && !interior,\n })}\n ref={contentRef}\n data-open={open}\n data-animating={state !== 'exited'}\n aria-hidden={!open}\n onMouseDown={onMouseDown}\n >\n <div className={clsx(styles['dropdown-content-wrapper'], isRefresh && styles.refresh)}>\n <div className={styles['ie11-wrapper']}>\n <div ref={verticalContainerRef} className={styles['dropdown-content']}>\n <DropdownContextProvider position={position}>\n {header}\n {children}\n {footer}\n </DropdownContextProvider>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nconst Dropdown = ({\n children,\n trigger,\n open,\n onDropdownClose,\n onMouseDown,\n header,\n footer,\n dropdownId,\n stretchTriggerHeight = false,\n stretchWidth = true,\n stretchHeight = false,\n stretchToTriggerWidth = true,\n expandToViewport = false,\n preferCenter = false,\n interior = false,\n minWidth,\n scrollable = true,\n loopFocus = expandToViewport,\n onFocus,\n onBlur,\n contentKey,\n}: DropdownProps) => {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const dropdownContainerRef = useRef<HTMLDivElement | null>(null);\n // This container is only needed to apply max-height to. We can't move max-height to it's parent\n // because of an IE11 issue with flexbox. https://github.com/philipwalton/flexbugs/issues/216\n const verticalContainerRef = useRef<HTMLDivElement>(null);\n // To keep track of the initial position (drop up/down) which is kept the same during fixed repositioning\n const fixedPosition = useRef<DropdownPosition | null>(null);\n\n const isRefresh = useVisualRefresh();\n\n const dropdownClasses = usePortalModeClasses(triggerRef);\n const [position, setPosition] = useState<DropdownContextProviderProps['position']>('bottom-right');\n\n const isMobile = useMobile();\n\n const setDropdownPosition = (\n position: DropdownPosition | InteriorDropdownPosition,\n triggerBox: DOMRect,\n target: HTMLDivElement,\n verticalContainer: HTMLDivElement\n ) => {\n const entireWidth = !interior && stretchWidth;\n if (!stretchWidth) {\n // 1px offset for dropdowns where the dropdown itself needs a border, rather than on the items\n verticalContainer.style.maxHeight = `${parseInt(position.height) + 1}px`;\n } else {\n verticalContainer.style.maxHeight = position.height;\n }\n\n if (entireWidth && !expandToViewport) {\n if (stretchToTriggerWidth) {\n target.classList.add(styles['occupy-entire-width']);\n }\n } else {\n target.style.width = position.width;\n }\n // Using styles for main dropdown to adjust its position as preferred alternative\n if (position.dropUp && !interior) {\n target.classList.add(styles['dropdown-drop-up']);\n if (!expandToViewport) {\n target.style.bottom = '100%';\n }\n } else {\n target.classList.remove(styles['dropdown-drop-up']);\n }\n target.classList.add(position.dropLeft ? styles['dropdown-drop-left'] : styles['dropdown-drop-right']);\n\n if (position.left && position.left !== 'auto') {\n target.style.left = position.left;\n }\n\n // Position normal overflow dropdowns with fixed positioning relative to viewport\n if (expandToViewport && !interior) {\n target.style.position = 'fixed';\n if (position.dropUp) {\n target.style.bottom = `calc(100% - ${triggerBox.top}px)`;\n } else {\n target.style.top = `${triggerBox.bottom}px`;\n }\n if (position.dropLeft) {\n target.style.left = `calc(${triggerBox.right}px - ${position.width})`;\n } else {\n target.style.left = `${triggerBox.left}px`;\n }\n // Keep track of the initial dropdown position and direction.\n // Dropdown direction doesn't need to change as the user scrolls, just needs to stay attached to the trigger.\n fixedPosition.current = position;\n return;\n }\n\n // For an interior dropdown (the fly out) we need exact values for positioning\n // and classes are not enough\n // usage of relative position is impossible due to overwrite of overflow-x\n if (interior && isInteriorPosition(position)) {\n if (position.dropUp) {\n target.style.bottom = position.bottom;\n } else {\n target.style.top = position.top;\n }\n target.style.left = position.left;\n }\n\n if (position.dropUp && position.dropLeft) {\n setPosition('top-left');\n } else if (position.dropUp) {\n setPosition('top-right');\n } else if (position.dropLeft) {\n setPosition('bottom-left');\n } else {\n setPosition('bottom-right');\n }\n };\n\n const isOutsideDropdown = (element: Element) =>\n (!wrapperRef.current || !wrapperRef.current.contains(element)) &&\n (!dropdownContainerRef.current || !dropdownContainerRef.current.contains(element));\n\n const focusHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onFocus, event);\n }\n };\n\n const blurHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onBlur, event);\n }\n };\n\n useLayoutEffect(() => {\n const onDropdownOpen = () => {\n if (open && dropdownRef.current && triggerRef.current && verticalContainerRef.current) {\n // calculate scroll width only for dropdowns that has a scrollbar and ignore it for date picker components\n if (scrollable) {\n dropdownRef.current.classList.add(styles.nowrap);\n }\n setDropdownPosition(\n ...calculatePosition(\n dropdownRef.current,\n triggerRef.current,\n verticalContainerRef.current,\n interior,\n expandToViewport,\n preferCenter,\n stretchWidth,\n stretchHeight,\n isMobile,\n minWidth\n ),\n dropdownRef.current,\n verticalContainerRef.current\n );\n if (scrollable) {\n dropdownRef.current.classList.remove(styles.nowrap);\n }\n }\n };\n onDropdownOpen();\n\n if (open) {\n // window may scroll when dropdown opens, for example when soft keyboard shows up\n window.addEventListener('scroll', onDropdownOpen);\n // only listen to window scroll within very short time after the dropdown opens\n // do not want to interfere dropdown position on scroll afterwards\n const timeoutId = setTimeout(() => {\n window.removeEventListener('scroll', onDropdownOpen);\n }, 500);\n\n return () => {\n clearTimeout(timeoutId);\n window.removeEventListener('scroll', onDropdownOpen);\n };\n }\n // See AWSUI-13040\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, dropdownRef, triggerRef, verticalContainerRef, interior, stretchWidth, isMobile, contentKey]);\n\n // subscribe to outside click\n useEffect(() => {\n if (!open) {\n return;\n }\n const clickListener = (e: MouseEvent) => {\n if (!dropdownRef.current?.contains(e.target as Node)) {\n fireNonCancelableEvent(onDropdownClose);\n }\n };\n window.addEventListener('click', clickListener, true);\n\n return () => {\n window.removeEventListener('click', clickListener, true);\n };\n }, [open, onDropdownClose]);\n\n // sync dropdown position on scroll and resize\n useLayoutEffect(() => {\n if (!expandToViewport || !open) {\n return;\n }\n const updateDropdownPosition = () => {\n if (triggerRef.current && dropdownRef.current && verticalContainerRef.current) {\n const triggerRect = triggerRef.current.getBoundingClientRect();\n const target = dropdownRef.current;\n if (fixedPosition.current) {\n if (fixedPosition.current.dropUp) {\n dropdownRef.current.style.bottom = `calc(100% - ${triggerRect.top}px)`;\n } else {\n target.style.top = `${triggerRect.bottom}px`;\n }\n if (fixedPosition.current.dropLeft) {\n target.style.left = `calc(${triggerRect.right}px - ${fixedPosition.current.width})`;\n } else {\n target.style.left = `${triggerRect.left}px`;\n }\n }\n }\n };\n\n updateDropdownPosition();\n\n window.addEventListener('scroll', updateDropdownPosition, true);\n window.addEventListener('resize', updateDropdownPosition, true);\n return () => {\n window.removeEventListener('scroll', updateDropdownPosition, true);\n window.removeEventListener('resize', updateDropdownPosition, true);\n };\n }, [open, expandToViewport]);\n\n return (\n <div\n className={clsx(\n styles.root,\n interior && styles.interior,\n stretchTriggerHeight && styles['stretch-trigger-height']\n )}\n ref={wrapperRef}\n onFocus={focusHandler}\n onBlur={blurHandler}\n >\n <div className={clsx(stretchTriggerHeight && styles['stretch-trigger-height'])} ref={triggerRef}>\n {trigger}\n </div>\n\n <TabTrap\n focusNextCallback={() => dropdownRef.current && getFirstFocusable(dropdownRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <DropdownContainer renderWithPortal={expandToViewport && !interior} id={dropdownId} open={open}>\n <Transition in={open ?? false} exit={false}>\n {(state, ref) => (\n <div ref={dropdownContainerRef}>\n <TabTrap\n focusNextCallback={() => triggerRef.current && getLastFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <TransitionContent\n state={state}\n transitionRef={ref}\n dropdownClasses={dropdownClasses}\n open={open}\n stretchWidth={stretchWidth}\n interior={interior}\n header={header}\n expandToViewport={expandToViewport}\n footer={footer}\n onMouseDown={onMouseDown}\n isRefresh={isRefresh}\n dropdownRef={dropdownRef}\n verticalContainerRef={verticalContainerRef}\n position={position}\n >\n {children}\n </TransitionContent>\n\n <TabTrap\n focusNextCallback={() => triggerRef.current && getFirstFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n </div>\n )}\n </Transition>\n </DropdownContainer>\n </div>\n );\n};\n\nconst isInteriorPosition = (\n position: DropdownPosition | InteriorDropdownPosition\n): position is InteriorDropdownPosition => (position as InteriorDropdownPosition).bottom !== undefined;\n\nexport default Dropdown;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAA8C,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACvG,OAAO,EAAE,UAAU,EAAoB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAgC,MAAM,WAAW,CAA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AAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,oBAAoB,EAAE,oBAAoB,EAC1C,QAAQ,EAAE,QAAQ,IAEjB,QAAQ,CACS;gBAEpB,oBAAC,OAAO,IACN,iBAAiB,EAAE,sBAAM,OAAA,UAAU,CAAC,OAAO,KAAI,MAAA,iBAAiB,CAAC,UAAU,CAAC,OAAO,CAAC,0CAAE,KAAK,EAAE,CAAA,CAAA,EAAA,EAC7F,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,GAC7B,CACE,CACP,EA/BgB,CA+BhB,CACU,CACK,CAChB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,IAAM,kBAAkB,GAAG,UACzB,QAAqD,IACZ,OAAC,QAAqC,CAAC,MAAM,KAAK,SAAS,EAA3D,CAA2D,CAAC;AAEvG,eAAe,QAAQ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport styles from './styles.css.js';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { fireNonCancelableEvent } from '../../events';\nimport { DropdownProps } from './interfaces';\nimport { DropdownPosition, InteriorDropdownPosition, calculatePosition } from './dropdown-fit-handler';\nimport { Transition, TransitionStatus } from '../transition';\nimport { useVisualRefresh } from '../../hooks/use-visual-mode';\nimport { usePortalModeClasses } from '../../hooks/use-portal-mode-classes';\nimport { DropdownContextProvider, DropdownContextProviderProps } from './context';\nimport { useMobile } from '../../hooks/use-mobile';\nimport TabTrap from '../tab-trap/index.js';\nimport { getFirstFocusable, getLastFocusable } from '../focus-lock/utils.js';\n\ninterface DropdownContainerProps {\n children?: React.ReactNode;\n renderWithPortal?: boolean;\n id?: string;\n open?: boolean;\n}\n\nconst DropdownContainer = ({ children, renderWithPortal = false, id, open }: DropdownContainerProps) => {\n if (renderWithPortal) {\n if (open) {\n return createPortal(<div id={id}>{children}</div>, document.body);\n } else {\n return null;\n }\n } else {\n return <>{children}</>;\n }\n};\n\ninterface TransitionContentProps {\n state: TransitionStatus;\n transitionRef: React.MutableRefObject<any>;\n dropdownClasses: string;\n stretchWidth: boolean;\n interior: boolean;\n isRefresh: boolean;\n dropdownRef: React.RefObject<HTMLDivElement>;\n verticalContainerRef: React.RefObject<HTMLDivElement>;\n expandToViewport?: boolean;\n header?: React.ReactNode;\n children?: React.ReactNode;\n footer?: React.ReactNode;\n position?: DropdownContextProviderProps['position'];\n open?: boolean;\n onMouseDown?: React.MouseEventHandler<Element>;\n}\n\nconst TransitionContent = ({\n state,\n transitionRef,\n dropdownClasses,\n stretchWidth,\n interior,\n isRefresh,\n dropdownRef,\n verticalContainerRef,\n expandToViewport,\n header,\n children,\n footer,\n position,\n open,\n onMouseDown,\n}: TransitionContentProps) => {\n const contentRef = useMergeRefs(dropdownRef, transitionRef);\n return (\n <div\n className={clsx(styles.dropdown, dropdownClasses, {\n [styles.open]: open,\n [styles['with-limited-width']]: !stretchWidth,\n [styles['hide-upper-border']]: stretchWidth,\n [styles.interior]: interior,\n [styles['is-empty']]: !header && !children,\n [styles.refresh]: isRefresh,\n [styles['use-portal']]: expandToViewport && !interior,\n })}\n ref={contentRef}\n data-open={open}\n data-animating={state !== 'exited'}\n aria-hidden={!open}\n onMouseDown={onMouseDown}\n >\n <div className={clsx(styles['dropdown-content-wrapper'], isRefresh && styles.refresh)}>\n <div className={styles['ie11-wrapper']}>\n <div ref={verticalContainerRef} className={styles['dropdown-content']}>\n <DropdownContextProvider position={position}>\n {header}\n {children}\n {footer}\n </DropdownContextProvider>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nconst Dropdown = ({\n children,\n trigger,\n open,\n onDropdownClose,\n onMouseDown,\n header,\n footer,\n dropdownId,\n stretchTriggerHeight = false,\n stretchWidth = true,\n stretchHeight = false,\n stretchToTriggerWidth = true,\n expandToViewport = false,\n preferCenter = false,\n interior = false,\n minWidth,\n scrollable = true,\n loopFocus = expandToViewport,\n onFocus,\n onBlur,\n contentKey,\n}: DropdownProps) => {\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n const triggerRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const dropdownContainerRef = useRef<HTMLDivElement | null>(null);\n // This container is only needed to apply max-height to. We can't move max-height to it's parent\n // because of an IE11 issue with flexbox. https://github.com/philipwalton/flexbugs/issues/216\n const verticalContainerRef = useRef<HTMLDivElement>(null);\n // To keep track of the initial position (drop up/down) which is kept the same during fixed repositioning\n const fixedPosition = useRef<DropdownPosition | null>(null);\n\n const isRefresh = useVisualRefresh();\n\n const dropdownClasses = usePortalModeClasses(triggerRef);\n const [position, setPosition] = useState<DropdownContextProviderProps['position']>('bottom-right');\n\n const isMobile = useMobile();\n\n const setDropdownPosition = (\n position: DropdownPosition | InteriorDropdownPosition,\n triggerBox: DOMRect,\n target: HTMLDivElement,\n verticalContainer: HTMLDivElement\n ) => {\n const entireWidth = !interior && stretchWidth;\n if (!stretchWidth) {\n // 1px offset for dropdowns where the dropdown itself needs a border, rather than on the items\n verticalContainer.style.maxHeight = `${parseInt(position.height) + 1}px`;\n } else {\n verticalContainer.style.maxHeight = position.height;\n }\n\n if (entireWidth && !expandToViewport) {\n if (stretchToTriggerWidth) {\n target.classList.add(styles['occupy-entire-width']);\n }\n } else {\n target.style.width = position.width;\n }\n // Using styles for main dropdown to adjust its position as preferred alternative\n if (position.dropUp && !interior) {\n target.classList.add(styles['dropdown-drop-up']);\n if (!expandToViewport) {\n target.style.bottom = '100%';\n }\n } else {\n target.classList.remove(styles['dropdown-drop-up']);\n }\n target.classList.add(position.dropLeft ? styles['dropdown-drop-left'] : styles['dropdown-drop-right']);\n\n if (position.left && position.left !== 'auto') {\n target.style.left = position.left;\n }\n\n // Position normal overflow dropdowns with fixed positioning relative to viewport\n if (expandToViewport && !interior) {\n target.style.position = 'fixed';\n if (position.dropUp) {\n target.style.bottom = `calc(100% - ${triggerBox.top}px)`;\n } else {\n target.style.top = `${triggerBox.bottom}px`;\n }\n if (position.dropLeft) {\n target.style.left = `calc(${triggerBox.right}px - ${position.width})`;\n } else {\n target.style.left = `${triggerBox.left}px`;\n }\n // Keep track of the initial dropdown position and direction.\n // Dropdown direction doesn't need to change as the user scrolls, just needs to stay attached to the trigger.\n fixedPosition.current = position;\n return;\n }\n\n // For an interior dropdown (the fly out) we need exact values for positioning\n // and classes are not enough\n // usage of relative position is impossible due to overwrite of overflow-x\n if (interior && isInteriorPosition(position)) {\n if (position.dropUp) {\n target.style.bottom = position.bottom;\n } else {\n target.style.top = position.top;\n }\n target.style.left = position.left;\n }\n\n if (position.dropUp && position.dropLeft) {\n setPosition('top-left');\n } else if (position.dropUp) {\n setPosition('top-right');\n } else if (position.dropLeft) {\n setPosition('bottom-left');\n } else {\n setPosition('bottom-right');\n }\n };\n\n const isOutsideDropdown = (element: Element) =>\n (!wrapperRef.current || !wrapperRef.current.contains(element)) &&\n (!dropdownContainerRef.current || !dropdownContainerRef.current.contains(element));\n\n const focusHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onFocus, event);\n }\n };\n\n const blurHandler = (event: React.FocusEvent) => {\n if (!event.relatedTarget || isOutsideDropdown(event.relatedTarget)) {\n fireNonCancelableEvent(onBlur, event);\n }\n };\n\n useLayoutEffect(() => {\n const onDropdownOpen = () => {\n if (open && dropdownRef.current && triggerRef.current && verticalContainerRef.current) {\n // calculate scroll width only for dropdowns that has a scrollbar and ignore it for date picker components\n if (scrollable) {\n dropdownRef.current.classList.add(styles.nowrap);\n }\n setDropdownPosition(\n ...calculatePosition(\n dropdownRef.current,\n triggerRef.current,\n verticalContainerRef.current,\n interior,\n expandToViewport,\n preferCenter,\n stretchWidth,\n stretchHeight,\n isMobile,\n minWidth\n ),\n dropdownRef.current,\n verticalContainerRef.current\n );\n if (scrollable) {\n dropdownRef.current.classList.remove(styles.nowrap);\n }\n }\n };\n onDropdownOpen();\n\n if (open) {\n // window may scroll when dropdown opens, for example when soft keyboard shows up\n window.addEventListener('scroll', onDropdownOpen);\n // only listen to window scroll within very short time after the dropdown opens\n // do not want to interfere dropdown position on scroll afterwards\n const timeoutId = setTimeout(() => {\n window.removeEventListener('scroll', onDropdownOpen);\n }, 500);\n\n return () => {\n clearTimeout(timeoutId);\n window.removeEventListener('scroll', onDropdownOpen);\n };\n }\n // See AWSUI-13040\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, dropdownRef, triggerRef, verticalContainerRef, interior, stretchWidth, isMobile, contentKey]);\n\n // subscribe to outside click\n useEffect(() => {\n if (!open) {\n return;\n }\n const clickListener = (e: MouseEvent) => {\n if (!dropdownRef.current?.contains(e.target as Node)) {\n fireNonCancelableEvent(onDropdownClose);\n }\n };\n\n /*\n * This small delay allows the event that opened the dropdown to\n * finish bubbling, so that it is not immediately captured here.\n */\n const timeout = setTimeout(() => {\n window.addEventListener('click', clickListener);\n }, 0);\n\n return () => {\n clearTimeout(timeout);\n window.removeEventListener('click', clickListener);\n };\n }, [open, onDropdownClose]);\n\n // sync dropdown position on scroll and resize\n useLayoutEffect(() => {\n if (!expandToViewport || !open) {\n return;\n }\n const updateDropdownPosition = () => {\n if (triggerRef.current && dropdownRef.current && verticalContainerRef.current) {\n const triggerRect = triggerRef.current.getBoundingClientRect();\n const target = dropdownRef.current;\n if (fixedPosition.current) {\n if (fixedPosition.current.dropUp) {\n dropdownRef.current.style.bottom = `calc(100% - ${triggerRect.top}px)`;\n } else {\n target.style.top = `${triggerRect.bottom}px`;\n }\n if (fixedPosition.current.dropLeft) {\n target.style.left = `calc(${triggerRect.right}px - ${fixedPosition.current.width})`;\n } else {\n target.style.left = `${triggerRect.left}px`;\n }\n }\n }\n };\n\n updateDropdownPosition();\n\n window.addEventListener('scroll', updateDropdownPosition, true);\n window.addEventListener('resize', updateDropdownPosition, true);\n return () => {\n window.removeEventListener('scroll', updateDropdownPosition, true);\n window.removeEventListener('resize', updateDropdownPosition, true);\n };\n }, [open, expandToViewport]);\n\n return (\n <div\n className={clsx(\n styles.root,\n interior && styles.interior,\n stretchTriggerHeight && styles['stretch-trigger-height']\n )}\n ref={wrapperRef}\n onFocus={focusHandler}\n onBlur={blurHandler}\n >\n <div className={clsx(stretchTriggerHeight && styles['stretch-trigger-height'])} ref={triggerRef}>\n {trigger}\n </div>\n\n <TabTrap\n focusNextCallback={() => dropdownRef.current && getFirstFocusable(dropdownRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <DropdownContainer renderWithPortal={expandToViewport && !interior} id={dropdownId} open={open}>\n <Transition in={open ?? false} exit={false}>\n {(state, ref) => (\n <div ref={dropdownContainerRef}>\n <TabTrap\n focusNextCallback={() => triggerRef.current && getLastFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n\n <TransitionContent\n state={state}\n transitionRef={ref}\n dropdownClasses={dropdownClasses}\n open={open}\n stretchWidth={stretchWidth}\n interior={interior}\n header={header}\n expandToViewport={expandToViewport}\n footer={footer}\n onMouseDown={onMouseDown}\n isRefresh={isRefresh}\n dropdownRef={dropdownRef}\n verticalContainerRef={verticalContainerRef}\n position={position}\n >\n {children}\n </TransitionContent>\n\n <TabTrap\n focusNextCallback={() => triggerRef.current && getFirstFocusable(triggerRef.current)?.focus()}\n disabled={!open || !loopFocus}\n />\n </div>\n )}\n </Transition>\n </DropdownContainer>\n </div>\n );\n};\n\nconst isInteriorPosition = (\n position: DropdownPosition | InteriorDropdownPosition\n): position is InteriorDropdownPosition => (position as InteriorDropdownPosition).bottom !== undefined;\n\nexport default Dropdown;\n"]}
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { RecoveryLinkProps } from '../../../select/utils/use-select';
2
3
  import { NonCancelableEventHandler } from '../../events';
3
4
  import { DropdownStatusProps } from './interfaces';
4
5
  export { DropdownStatusProps };
@@ -13,14 +14,16 @@ export interface DropdownStatusPropsExtended extends DropdownStatusProps {
13
14
  * to recover from the error.
14
15
  */
15
16
  onRecoveryClick?: NonCancelableEventHandler;
17
+ recoveryProps?: RecoveryLinkProps;
16
18
  }
17
19
  declare function DropdownStatus({ children }: {
18
20
  children: React.ReactNode;
19
21
  }): JSX.Element;
20
- declare type UseDropdownStatus = ({ statusType, empty, loadingText, finishedText, errorText, recoveryText, isEmpty, isNoMatch, noMatch, onRecoveryClick, }: DropdownStatusPropsExtended) => DropdownStatusResult;
22
+ declare type UseDropdownStatus = ({ statusType, empty, loadingText, finishedText, errorText, recoveryText, isEmpty, isNoMatch, noMatch, onRecoveryClick, recoveryProps, }: DropdownStatusPropsExtended) => DropdownStatusResult;
21
23
  interface DropdownStatusResult {
22
24
  isSticky: boolean;
23
25
  content: React.ReactNode | null;
26
+ focusRecoveryLink: () => void;
24
27
  }
25
28
  export declare const useDropdownStatus: UseDropdownStatus;
26
29
  export default DropdownStatus;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-status/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,yBAAyB,EAA0B,MAAM,cAAc,CAAC;AAGjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,yBAAyB,CAAC;CAC7C;AAED,iBAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eAMlE;AAED,aAAK,iBAAiB,GAAG,CAAC,EACxB,UAAU,EACV,KAAK,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,OAAO,EACP,SAAS,EACT,OAAO,EACP,eAAe,GAChB,EAAE,2BAA2B,KAAK,oBAAoB,CAAC;AAExD,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;CACjC;AAED,eAAO,MAAM,iBAAiB,EAAE,iBA4C/B,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-status/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,OAAO,EAAE,yBAAyB,EAA0B,MAAM,cAAc,CAAC;AAGjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,yBAAyB,CAAC;IAC5C,aAAa,CAAC,EAAE,iBAAiB,CAAC;CACnC;AAED,iBAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eAMlE;AAED,aAAK,iBAAiB,GAAG,CAAC,EACxB,UAAU,EACV,KAAK,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,OAAO,EACP,SAAS,EACT,OAAO,EACP,eAAe,EACf,aAAa,GACd,EAAE,2BAA2B,KAAK,oBAAoB,CAAC;AAExD,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IAChC,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,eAAO,MAAM,iBAAiB,EAAE,iBA+C/B,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import React from 'react';
3
+ import React, { useRef } from 'react';
4
4
  import InternalLink from '../../../link/internal';
5
5
  import InternalStatusIndicator from '../../../status-indicator/internal';
6
6
  import { fireNonCancelableEvent } from '../../events';
@@ -12,8 +12,10 @@ function DropdownStatus(_a) {
12
12
  }
13
13
  export var useDropdownStatus = function (_a) {
14
14
  var statusType = _a.statusType, empty = _a.empty, loadingText = _a.loadingText, finishedText = _a.finishedText, errorText = _a.errorText, recoveryText = _a.recoveryText, isEmpty = _a.isEmpty, isNoMatch = _a.isNoMatch, noMatch = _a.noMatch, onRecoveryClick = _a.onRecoveryClick;
15
+ var linkRef = useRef(null);
16
+ var focusRecoveryLink = function () { var _a; return (_a = linkRef.current) === null || _a === void 0 ? void 0 : _a.focus(); };
15
17
  var previousStatusType = usePrevious(statusType);
16
- var statusResult = { isSticky: true, content: null };
18
+ var statusResult = { isSticky: true, content: null, focusRecoveryLink: focusRecoveryLink };
17
19
  if (statusType === 'loading') {
18
20
  statusResult.content = React.createElement(InternalStatusIndicator, { type: 'loading' }, loadingText);
19
21
  }
@@ -21,7 +23,7 @@ export var useDropdownStatus = function (_a) {
21
23
  statusResult.content = (React.createElement("span", null,
22
24
  React.createElement(InternalStatusIndicator, { type: "error", __animate: previousStatusType !== 'error' }, errorText),
23
25
  ' ',
24
- recoveryText && (React.createElement(InternalLink, { onFollow: function () { return fireNonCancelableEvent(onRecoveryClick); }, variant: "recovery", className: styles.recovery }, recoveryText))));
26
+ recoveryText && (React.createElement(InternalLink, { ref: linkRef, onFollow: function () { return fireNonCancelableEvent(onRecoveryClick); }, variant: "recovery", className: styles.recovery }, recoveryText))));
25
27
  }
26
28
  else if (isEmpty && empty) {
27
29
  statusResult.content = empty;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-status/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAA6B,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAiBrC,SAAS,cAAc,CAAC,EAA2C;QAAzC,QAAQ,cAAA;IAChC,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI,eAAY,QAAQ,IAC5C,QAAQ,CACL,CACP,CAAC;AACJ,CAAC;AAoBD,MAAM,CAAC,IAAM,iBAAiB,GAAsB,UAAC,EAWpD;QAVC,UAAU,gBAAA,EACV,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,YAAY,kBAAA,EACZ,SAAS,eAAA,EACT,YAAY,kBAAA,EACZ,OAAO,aAAA,EACP,SAAS,eAAA,EACT,OAAO,aAAA,EACP,eAAe,qBAAA;IAEf,IAAM,kBAAkB,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;IACnD,IAAM,YAAY,GAAyB,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAE7E,IAAI,UAAU,KAAK,SAAS,EAAE;QAC5B,YAAY,CAAC,OAAO,GAAG,oBAAC,uBAAuB,IAAC,IAAI,EAAE,SAAS,IAAG,WAAW,CAA2B,CAAC;KAC1G;SAAM,IAAI,UAAU,KAAK,OAAO,EAAE;QACjC,YAAY,CAAC,OAAO,GAAG,CACrB;YACE,oBAAC,uBAAuB,IAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,kBAAkB,KAAK,OAAO,IAC5E,SAAS,CACc;YAAC,GAAG;YAC7B,YAAY,IAAI,CACf,oBAAC,YAAY,IACX,QAAQ,EAAE,cAAM,OAAA,sBAAsB,CAAC,eAAe,CAAC,EAAvC,CAAuC,EACvD,OAAO,EAAC,UAAU,EAClB,SAAS,EAAE,MAAM,CAAC,QAAQ,IAEzB,YAAY,CACA,CAChB,CACI,CACR,CAAC;KACH;SAAM,IAAI,OAAO,IAAI,KAAK,EAAE;QAC3B,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;KAC9B;SAAM,IAAI,SAAS,IAAI,OAAO,EAAE;QAC/B,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;KAChC;SAAM,IAAI,UAAU,KAAK,UAAU,IAAI,YAAY,EAAE;QACpD,YAAY,CAAC,OAAO,GAAG,YAAY,CAAC;QACpC,YAAY,CAAC,QAAQ,GAAG,KAAK,CAAC;KAC/B;IAED,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport InternalLink from '../../../link/internal';\n\nimport InternalStatusIndicator from '../../../status-indicator/internal';\nimport { NonCancelableEventHandler, fireNonCancelableEvent } from '../../events';\nimport { usePrevious } from '../../hooks/use-previous';\n\nimport { DropdownStatusProps } from './interfaces';\nimport styles from './styles.css.js';\n\nexport { DropdownStatusProps };\n\nexport interface DropdownStatusPropsExtended extends DropdownStatusProps {\n isEmpty?: boolean;\n isNoMatch?: boolean;\n noMatch?: React.ReactNode;\n /**\n * Called when the user clicks the recovery button placed at the\n * bottom of the dropdown list in the error state. Use this to\n * retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n}\n\nfunction DropdownStatus({ children }: { children: React.ReactNode }) {\n return (\n <div className={styles.root} aria-live=\"polite\">\n {children}\n </div>\n );\n}\n\ntype UseDropdownStatus = ({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n onRecoveryClick,\n}: DropdownStatusPropsExtended) => DropdownStatusResult;\n\ninterface DropdownStatusResult {\n isSticky: boolean;\n content: React.ReactNode | null;\n}\n\nexport const useDropdownStatus: UseDropdownStatus = ({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n onRecoveryClick,\n}) => {\n const previousStatusType = usePrevious(statusType);\n const statusResult: DropdownStatusResult = { isSticky: true, content: null };\n\n if (statusType === 'loading') {\n statusResult.content = <InternalStatusIndicator type={'loading'}>{loadingText}</InternalStatusIndicator>;\n } else if (statusType === 'error') {\n statusResult.content = (\n <span>\n <InternalStatusIndicator type=\"error\" __animate={previousStatusType !== 'error'}>\n {errorText}\n </InternalStatusIndicator>{' '}\n {recoveryText && (\n <InternalLink\n onFollow={() => fireNonCancelableEvent(onRecoveryClick)}\n variant=\"recovery\"\n className={styles.recovery}\n >\n {recoveryText}\n </InternalLink>\n )}\n </span>\n );\n } else if (isEmpty && empty) {\n statusResult.content = empty;\n } else if (isNoMatch && noMatch) {\n statusResult.content = noMatch;\n } else if (statusType === 'finished' && finishedText) {\n statusResult.content = finishedText;\n statusResult.isSticky = false;\n }\n\n return statusResult;\n};\n\nexport default DropdownStatus;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-status/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,YAAY,MAAM,wBAAw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AG;YAC7B,YAAY,IAAI,CACf,oBAAC,YAAY,IACX,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,cAAM,OAAA,sBAAsB,CAAC,eAAe,CAAC,EAAvC,CAAuC,EACvD,OAAO,EAAC,UAAU,EAClB,SAAS,EAAE,MAAM,CAAC,QAAQ,IAEzB,YAAY,CACA,CAChB,CACI,CACR,CAAC;KACH;SAAM,IAAI,OAAO,IAAI,KAAK,EAAE;QAC3B,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;KAC9B;SAAM,IAAI,SAAS,IAAI,OAAO,EAAE;QAC/B,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;KAChC;SAAM,IAAI,UAAU,KAAK,UAAU,IAAI,YAAY,EAAE;QACpD,YAAY,CAAC,OAAO,GAAG,YAAY,CAAC;QACpC,YAAY,CAAC,QAAQ,GAAG,KAAK,CAAC;KAC/B;IAED,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport { LinkProps } from '../../../link/interfaces';\nimport InternalLink from '../../../link/internal';\nimport { RecoveryLinkProps } from '../../../select/utils/use-select';\n\nimport InternalStatusIndicator from '../../../status-indicator/internal';\nimport { NonCancelableEventHandler, fireNonCancelableEvent } from '../../events';\nimport { usePrevious } from '../../hooks/use-previous';\n\nimport { DropdownStatusProps } from './interfaces';\nimport styles from './styles.css.js';\n\nexport { DropdownStatusProps };\n\nexport interface DropdownStatusPropsExtended extends DropdownStatusProps {\n isEmpty?: boolean;\n isNoMatch?: boolean;\n noMatch?: React.ReactNode;\n /**\n * Called when the user clicks the recovery button placed at the\n * bottom of the dropdown list in the error state. Use this to\n * retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n recoveryProps?: RecoveryLinkProps;\n}\n\nfunction DropdownStatus({ children }: { children: React.ReactNode }) {\n return (\n <div className={styles.root} aria-live=\"polite\">\n {children}\n </div>\n );\n}\n\ntype UseDropdownStatus = ({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n onRecoveryClick,\n recoveryProps,\n}: DropdownStatusPropsExtended) => DropdownStatusResult;\n\ninterface DropdownStatusResult {\n isSticky: boolean;\n content: React.ReactNode | null;\n focusRecoveryLink: () => void;\n}\n\nexport const useDropdownStatus: UseDropdownStatus = ({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n onRecoveryClick,\n}) => {\n const linkRef = useRef<LinkProps.Ref | null>(null);\n const focusRecoveryLink = () => linkRef.current?.focus();\n const previousStatusType = usePrevious(statusType);\n const statusResult: DropdownStatusResult = { isSticky: true, content: null, focusRecoveryLink };\n\n if (statusType === 'loading') {\n statusResult.content = <InternalStatusIndicator type={'loading'}>{loadingText}</InternalStatusIndicator>;\n } else if (statusType === 'error') {\n statusResult.content = (\n <span>\n <InternalStatusIndicator type=\"error\" __animate={previousStatusType !== 'error'}>\n {errorText}\n </InternalStatusIndicator>{' '}\n {recoveryText && (\n <InternalLink\n ref={linkRef}\n onFollow={() => fireNonCancelableEvent(onRecoveryClick)}\n variant=\"recovery\"\n className={styles.recovery}\n >\n {recoveryText}\n </InternalLink>\n )}\n </span>\n );\n } else if (isEmpty && empty) {\n statusResult.content = empty;\n } else if (isNoMatch && noMatch) {\n statusResult.content = noMatch;\n } else if (statusType === 'finished' && finishedText) {\n statusResult.content = finishedText;\n statusResult.isSticky = false;\n }\n\n return statusResult;\n};\n\nexport default DropdownStatus;\n"]}
@@ -8,11 +8,10 @@ export interface FilteringTokenProps {
8
8
  andText: string;
9
9
  orText: string;
10
10
  dismissAriaLabel?: string;
11
- operatorAriaLabel?: string;
12
11
  disabled?: boolean;
13
12
  children: React.ReactNode;
14
13
  onChange: (op: FilteringTokenProps.Operation) => void;
15
14
  onDismiss: () => void;
16
15
  }
17
- export default function FilteringToken({ showOperation, operation, andText, orText, dismissAriaLabel, operatorAriaLabel, disabled, children, onChange, onDismiss, }: FilteringTokenProps): JSX.Element;
16
+ export default function FilteringToken({ showOperation, operation, andText, orText, dismissAriaLabel, disabled, children, onChange, onDismiss, }: FilteringTokenProps): JSX.Element;
18
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/filtering-token/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,yBAAiB,mBAAmB,CAAC;IACnC,KAAY,SAAS,GAAG,KAAK,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,mBAAmB,CAAC,SAAS,CAAC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,QAAQ,EAAE,CAAC,EAAE,EAAE,mBAAmB,CAAC,SAAS,KAAK,IAAI,CAAC;IACtD,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,aAAa,EACb,SAAS,EACT,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,EAAE,mBAAmB,eAoCrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/filtering-token/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,yBAAiB,mBAAmB,CAAC;IACnC,KAAY,SAAS,GAAG,KAAK,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,mBAAmB,CAAC,SAAS,CAAC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,QAAQ,EAAE,CAAC,EAAE,EAAE,mBAAmB,CAAC,SAAS,KAAK,IAAI,CAAC;IACtD,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,aAAa,EACb,SAAS,EACT,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,EAAE,mBAAmB,eAmCrB"}
@@ -8,13 +8,13 @@ import InternalIcon from '../../../icon/internal';
8
8
  import useFocusVisible from '../../hooks/focus-visible';
9
9
  import styles from './styles.css.js';
10
10
  export default function FilteringToken(_a) {
11
- var showOperation = _a.showOperation, operation = _a.operation, andText = _a.andText, orText = _a.orText, dismissAriaLabel = _a.dismissAriaLabel, operatorAriaLabel = _a.operatorAriaLabel, disabled = _a.disabled, children = _a.children, onChange = _a.onChange, onDismiss = _a.onDismiss;
11
+ var showOperation = _a.showOperation, operation = _a.operation, andText = _a.andText, orText = _a.orText, dismissAriaLabel = _a.dismissAriaLabel, disabled = _a.disabled, children = _a.children, onChange = _a.onChange, onDismiss = _a.onDismiss;
12
12
  var focusVisible = useFocusVisible();
13
13
  return (React.createElement("div", { className: styles.root },
14
14
  showOperation && (React.createElement(InternalSelect, { __inFilteringToken: true, className: styles.select, options: [
15
15
  { value: 'and', label: andText },
16
16
  { value: 'or', label: orText },
17
- ], selectedOption: { value: operation, label: operation === 'and' ? andText : orText }, onChange: function (e) { return onChange(e.detail.selectedOption.value); }, disabled: disabled, ariaLabel: operatorAriaLabel })),
17
+ ], selectedOption: { value: operation, label: operation === 'and' ? andText : orText }, onChange: function (e) { return onChange(e.detail.selectedOption.value); }, disabled: disabled })),
18
18
  React.createElement("div", { className: clsx(styles.token, showOperation && styles['show-operation'], disabled && styles['token-disabled']), "aria-disabled": disabled },
19
19
  React.createElement("div", { className: styles['token-content'] }, children),
20
20
  React.createElement("button", __assign({}, focusVisible, { type: "button", className: styles['dismiss-button'], "aria-label": dismissAriaLabel, onClick: onDismiss, disabled: disabled }),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/filtering-token/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAExD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqBrC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAWjB;QAVpB,aAAa,mBAAA,EACb,SAAS,eAAA,EACT,OAAO,aAAA,EACP,MAAM,YAAA,EACN,gBAAgB,sBAAA,EAChB,iBAAiB,uBAAA,EACjB,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,SAAS,eAAA;IAET,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI;QACxB,aAAa,IAAI,CAChB,oBAAC,cAAc,IACb,kBAAkB,EAAE,IAAI,EACxB,SAAS,EAAE,MAAM,CAAC,MAAM,EACxB,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE;gBAChC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE;aAC/B,EACD,cAAc,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,EACnF,QAAQ,EAAE,UAAA,CAAC,IAAI,OAAA,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,KAAsC,CAAC,EAAxE,CAAwE,EACvF,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,iBAAiB,GAC5B,CACH;QACD,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,aAAa,IAAI,MAAM,CAAC,gBAAgB,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC,mBAC/F,QAAQ;YAEvB,6BAAK,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,IAAG,QAAQ,CAAO;YACzD,2CACM,YAAY,IAChB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,gBACvB,gBAAgB,EAC5B,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,QAAQ;gBAElB,oBAAC,YAAY,IAAC,IAAI,EAAC,OAAO,GAAG,CACtB,CACL,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport InternalSelect from '../../../select/internal';\nimport InternalIcon from '../../../icon/internal';\nimport useFocusVisible from '../../hooks/focus-visible';\n\nimport styles from './styles.css.js';\n\nexport namespace FilteringTokenProps {\n export type Operation = 'and' | 'or';\n}\n\nexport interface FilteringTokenProps {\n showOperation: boolean;\n operation: FilteringTokenProps.Operation;\n andText: string;\n orText: string;\n dismissAriaLabel?: string;\n operatorAriaLabel?: string;\n disabled?: boolean;\n\n children: React.ReactNode;\n\n onChange: (op: FilteringTokenProps.Operation) => void;\n onDismiss: () => void;\n}\n\nexport default function FilteringToken({\n showOperation,\n operation,\n andText,\n orText,\n dismissAriaLabel,\n operatorAriaLabel,\n disabled,\n children,\n onChange,\n onDismiss,\n}: FilteringTokenProps) {\n const focusVisible = useFocusVisible();\n return (\n <div className={styles.root}>\n {showOperation && (\n <InternalSelect\n __inFilteringToken={true}\n className={styles.select}\n options={[\n { value: 'and', label: andText },\n { value: 'or', label: orText },\n ]}\n selectedOption={{ value: operation, label: operation === 'and' ? andText : orText }}\n onChange={e => onChange(e.detail.selectedOption.value as FilteringTokenProps.Operation)}\n disabled={disabled}\n ariaLabel={operatorAriaLabel}\n />\n )}\n <div\n className={clsx(styles.token, showOperation && styles['show-operation'], disabled && styles['token-disabled'])}\n aria-disabled={disabled}\n >\n <div className={styles['token-content']}>{children}</div>\n <button\n {...focusVisible}\n type=\"button\"\n className={styles['dismiss-button']}\n aria-label={dismissAriaLabel}\n onClick={onDismiss}\n disabled={disabled}\n >\n <InternalIcon name=\"close\" />\n </button>\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/filtering-token/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAExD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAoBrC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAUjB;QATpB,aAAa,mBAAA,EACb,SAAS,eAAA,EACT,OAAO,aAAA,EACP,MAAM,YAAA,EACN,gBAAgB,sBAAA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SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport InternalSelect from '../../../select/internal';\nimport InternalIcon from '../../../icon/internal';\nimport useFocusVisible from '../../hooks/focus-visible';\n\nimport styles from './styles.css.js';\n\nexport namespace FilteringTokenProps {\n export type Operation = 'and' | 'or';\n}\n\nexport interface FilteringTokenProps {\n showOperation: boolean;\n operation: FilteringTokenProps.Operation;\n andText: string;\n orText: string;\n dismissAriaLabel?: string;\n disabled?: boolean;\n\n children: React.ReactNode;\n\n onChange: (op: FilteringTokenProps.Operation) => void;\n onDismiss: () => void;\n}\n\nexport default function FilteringToken({\n showOperation,\n operation,\n andText,\n orText,\n dismissAriaLabel,\n disabled,\n children,\n onChange,\n onDismiss,\n}: FilteringTokenProps) {\n const focusVisible = useFocusVisible();\n return (\n <div className={styles.root}>\n {showOperation && (\n <InternalSelect\n __inFilteringToken={true}\n className={styles.select}\n options={[\n { value: 'and', label: andText },\n { value: 'or', label: orText },\n ]}\n selectedOption={{ value: operation, label: operation === 'and' ? andText : orText }}\n onChange={e => onChange(e.detail.selectedOption.value as FilteringTokenProps.Operation)}\n disabled={disabled}\n />\n )}\n <div\n className={clsx(styles.token, showOperation && styles['show-operation'], disabled && styles['token-disabled'])}\n aria-disabled={disabled}\n >\n <div className={styles['token-content']}>{children}</div>\n <button\n {...focusVisible}\n type=\"button\"\n className={styles['dismiss-button']}\n aria-label={dismissAriaLabel}\n onClick={onDismiss}\n disabled={disabled}\n >\n <InternalIcon name=\"close\" />\n </button>\n </div>\n </div>\n );\n}\n"]}
@@ -14,8 +14,8 @@ function validateStringValue(value, propertyName) {
14
14
  }
15
15
  }
16
16
  var Option = function (_a) {
17
- var _b, _c, _d, _e;
18
- var option = _a.option, highlightText = _a.highlightText, _f = _a.triggerVariant, triggerVariant = _f === void 0 ? false : _f, _g = _a.isGroupOption, isGroupOption = _g === void 0 ? false : _g, restProps = __rest(_a, ["option", "highlightText", "triggerVariant", "isGroupOption"]);
17
+ var _b, _c;
18
+ var option = _a.option, highlightText = _a.highlightText, _d = _a.triggerVariant, triggerVariant = _d === void 0 ? false : _d, _e = _a.isGroupOption, isGroupOption = _e === void 0 ? false : _e, restProps = __rest(_a, ["option", "highlightText", "triggerVariant", "isGroupOption"]);
19
19
  if (!option) {
20
20
  return null;
21
21
  }
@@ -34,11 +34,11 @@ var Option = function (_a) {
34
34
  }
35
35
  var className = clsx(styles.option, disabled && styles.disabled, isGroupOption && styles.parent);
36
36
  var icon = option.__customIcon || (React.createElement(OptionIcon, { name: option.iconName, url: option.iconUrl, svg: option.iconSvg, alt: option.iconAlt, size: option.description || option.tags ? 'big' : 'normal' }));
37
- return (React.createElement("span", __assign({ title: (_d = option.label) !== null && _d !== void 0 ? _d : option.value, "data-value": option.value, className: className, "aria-disabled": disabled }, baseProps),
37
+ return (React.createElement("span", __assign({ title: option.label || option.value, "data-value": option.value, className: className, "aria-disabled": disabled }, baseProps),
38
38
  icon,
39
39
  React.createElement("span", { className: clsx(styles.content) },
40
40
  React.createElement("span", { className: clsx(styles['label-content']) },
41
- React.createElement(Label, { label: (_e = option.label) !== null && _e !== void 0 ? _e : option.value, prefix: option.__labelPrefix, highlightText: highlightText, triggerVariant: triggerVariant }),
41
+ React.createElement(Label, { label: option.label || option.value, prefix: option.__labelPrefix, highlightText: highlightText, triggerVariant: triggerVariant }),
42
42
  React.createElement(LabelTag, { labelTag: option.labelTag, highlightText: highlightText, triggerVariant: triggerVariant })),
43
43
  React.createElement(Description, { description: option.description, highlightText: highlightText, triggerVariant: triggerVariant }),
44
44
  React.createElement(Tags, { tags: option.tags, highlightText: highlightText, triggerVariant: triggerVariant }),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/option/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM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cAAc,EAAE,cAAc,GAAI,CAChG;YACP,oBAAC,WAAW,IAAC,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,GAAI;YAC9G,oBAAC,IAAI,IAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,GAAI;YACzF,oBAAC,aAAa,IACZ,aAAa,EAAE,MAAM,CAAC,aAAa,EACnC,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC9B,CACG,CACF,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport { OptionProps } from './interfaces';\nimport { Label, LabelTag, Description, Tags, FilteringTags, OptionIcon } from './option-parts';\nimport { getBaseProps } from '../../base-component';\nimport { warnOnce } from '../../logging';\nimport { isDevelopment } from '../../is-development';\n\nexport { OptionProps };\n\nfunction validateStringValue(value: string | undefined, propertyName: string) {\n if (typeof value !== 'undefined' && typeof value !== 'string') {\n warnOnce(\n 'DropdownOption',\n `This component only supports string values, but \"option.${propertyName}\" has ${typeof value} type. The component may work incorrectly.`\n );\n }\n}\n\nconst Option = ({\n option,\n highlightText,\n triggerVariant = false,\n isGroupOption = false,\n ...restProps\n}: OptionProps) => {\n if (!option) {\n return null;\n }\n const { disabled } = option;\n const baseProps = getBaseProps(restProps);\n\n if (isDevelopment) {\n validateStringValue(option.label, 'label');\n validateStringValue(option.description, 'description');\n validateStringValue(option.labelTag, 'labelTag');\n option.tags?.forEach((tag, index) => {\n validateStringValue(tag, `tags[${index}]`);\n });\n option.filteringTags?.forEach((tag, index) => {\n validateStringValue(tag, `filteringTags[${index}]`);\n });\n }\n\n const className = clsx(styles.option, disabled && styles.disabled, isGroupOption && styles.parent);\n\n const icon = option.__customIcon || (\n <OptionIcon\n name={option.iconName}\n url={option.iconUrl}\n svg={option.iconSvg}\n alt={option.iconAlt}\n size={option.description || option.tags ? 'big' : 'normal'}\n />\n );\n\n return (\n <span\n title={option.label ?? option.value}\n data-value={option.value}\n className={className}\n aria-disabled={disabled}\n {...baseProps}\n >\n {icon}\n <span className={clsx(styles.content)}>\n <span className={clsx(styles['label-content'])}>\n <Label\n label={option.label ?? option.value}\n prefix={option.__labelPrefix}\n highlightText={highlightText}\n triggerVariant={triggerVariant}\n />\n <LabelTag labelTag={option.labelTag} highlightText={highlightText} triggerVariant={triggerVariant} />\n </span>\n <Description description={option.description} highlightText={highlightText} triggerVariant={triggerVariant} />\n <Tags tags={option.tags} highlightText={highlightText} triggerVariant={triggerVariant} />\n <FilteringTags\n filteringTags={option.filteringTags}\n highlightText={highlightText}\n triggerVariant={triggerVariant}\n />\n </span>\n </span>\n );\n};\n\nexport default Option;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/option/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD,SAAS,mBAAmB,CAAC,KAAyB,EAAE,YAAoB;IAC1E,IAAI,OAAO,KAAK,KAAK,WAAW,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7D,QAAQ,CACN,gBAAgB,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c. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport { OptionProps } from './interfaces';\nimport { Label, LabelTag, Description, Tags, FilteringTags, OptionIcon } from './option-parts';\nimport { getBaseProps } from '../../base-component';\nimport { warnOnce } from '../../logging';\nimport { isDevelopment } from '../../is-development';\n\nexport { OptionProps };\n\nfunction validateStringValue(value: string | undefined, propertyName: string) {\n if (typeof value !== 'undefined' && typeof value !== 'string') {\n warnOnce(\n 'DropdownOption',\n `This component only supports string values, but \"option.${propertyName}\" has ${typeof value} type. The component may work incorrectly.`\n );\n }\n}\n\nconst Option = ({\n option,\n highlightText,\n triggerVariant = false,\n isGroupOption = false,\n ...restProps\n}: OptionProps) => {\n if (!option) {\n return null;\n }\n const { disabled } = option;\n const baseProps = getBaseProps(restProps);\n\n if (isDevelopment) {\n validateStringValue(option.label, 'label');\n validateStringValue(option.description, 'description');\n validateStringValue(option.labelTag, 'labelTag');\n option.tags?.forEach((tag, index) => {\n validateStringValue(tag, `tags[${index}]`);\n });\n option.filteringTags?.forEach((tag, index) => {\n validateStringValue(tag, `filteringTags[${index}]`);\n });\n }\n\n const className = clsx(styles.option, disabled && styles.disabled, isGroupOption && styles.parent);\n\n const icon = option.__customIcon || (\n <OptionIcon\n name={option.iconName}\n url={option.iconUrl}\n svg={option.iconSvg}\n alt={option.iconAlt}\n size={option.description || option.tags ? 'big' : 'normal'}\n />\n );\n\n return (\n <span\n title={option.label || option.value}\n data-value={option.value}\n className={className}\n aria-disabled={disabled}\n {...baseProps}\n >\n {icon}\n <span className={clsx(styles.content)}>\n <span className={clsx(styles['label-content'])}>\n <Label\n label={option.label || option.value}\n prefix={option.__labelPrefix}\n highlightText={highlightText}\n triggerVariant={triggerVariant}\n />\n <LabelTag labelTag={option.labelTag} highlightText={highlightText} triggerVariant={triggerVariant} />\n </span>\n <Description description={option.description} highlightText={highlightText} triggerVariant={triggerVariant} />\n <Tags tags={option.tags} highlightText={highlightText} triggerVariant={triggerVariant} />\n <FilteringTags\n filteringTags={option.filteringTags}\n highlightText={highlightText}\n triggerVariant={triggerVariant}\n />\n </span>\n </span>\n );\n};\n\nexport default Option;\n"]}
@@ -1,5 +1,5 @@
1
1
 
2
- export var PACKAGE_VERSION = '3.0.0 (707ed43)';
2
+ export var PACKAGE_VERSION = '3.0.0 (162110d)';
3
3
  export var THEME = 'open-source-visual-refresh';
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4BlD,CAAC;AACF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA2BlD,CAAC;AACF,eAAe,sBAAsB,CAAC"}
@@ -1,31 +1,30 @@
1
1
  var customCSSPropertiesMap = {
2
- offsetTop: '--awsui-offset-top-5mks97',
3
- offsetTopWithNotifications: '--awsui-offset-top-with-notifications-5mks97',
4
- contentGapLeft: '--awsui-content-gap-left-5mks97',
5
- contentGapRight: '--awsui-content-gap-right-5mks97',
6
- contentHeight: '--awsui-content-height-5mks97',
7
- defaultMaxContentWidth: '--awsui-default-max-content-width-5mks97',
8
- defaultMinContentWidth: '--awsui-default-min-content-width-5mks97',
9
- footerHeight: '--awsui-footer-height-5mks97',
10
- headerHeight: '--awsui-header-height-5mks97',
11
- layoutWidth: '--awsui-layout-width-5mks97',
12
- mainOffsetLeft: '--awsui-main-offset-left-5mks97',
13
- maxContentWidth: '--awsui-max-content-width-5mks97',
14
- minContentWidth: '--awsui-min-content-width-5mks97',
15
- notificationsHeight: '--awsui-notifications-height-5mks97',
16
- overlapHeight: '--awsui-overlap-height-5mks97',
17
- navigationWidth: '--awsui-navigation-width-5mks97',
18
- splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-5mks97',
19
- splitPanelReportedSize: '--awsui-split-panel-reported-size-5mks97',
20
- splitPanelHeight: '--awsui-split-panel-height-5mks97',
21
- splitPanelMinWidth: '--awsui-split-panel-min-width-5mks97',
22
- splitPanelMaxWidth: '--awsui-split-panel-max-width-5mks97',
23
- toolsMaxWidth: '--awsui-tools-max-width-5mks97',
24
- toolsWidth: '--awsui-tools-width-5mks97',
25
- toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-5mks97',
26
- contentScrollMargin: '--awsui-content-scroll-margin-5mks97',
27
- flashbarStackDepth: '--awsui-flashbar-stack-depth-5mks97',
28
- flashbarStackIndex: '--awsui-flashbar-stack-index-5mks97'
2
+ offsetTop: '--awsui-offset-top-f9jj7p',
3
+ offsetTopWithNotifications: '--awsui-offset-top-with-notifications-f9jj7p',
4
+ contentGapLeft: '--awsui-content-gap-left-f9jj7p',
5
+ contentGapRight: '--awsui-content-gap-right-f9jj7p',
6
+ contentHeight: '--awsui-content-height-f9jj7p',
7
+ defaultMaxContentWidth: '--awsui-default-max-content-width-f9jj7p',
8
+ defaultMinContentWidth: '--awsui-default-min-content-width-f9jj7p',
9
+ footerHeight: '--awsui-footer-height-f9jj7p',
10
+ headerHeight: '--awsui-header-height-f9jj7p',
11
+ layoutWidth: '--awsui-layout-width-f9jj7p',
12
+ mainOffsetLeft: '--awsui-main-offset-left-f9jj7p',
13
+ maxContentWidth: '--awsui-max-content-width-f9jj7p',
14
+ minContentWidth: '--awsui-min-content-width-f9jj7p',
15
+ notificationsHeight: '--awsui-notifications-height-f9jj7p',
16
+ overlapHeight: '--awsui-overlap-height-f9jj7p',
17
+ navigationWidth: '--awsui-navigation-width-f9jj7p',
18
+ splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-f9jj7p',
19
+ splitPanelReportedSize: '--awsui-split-panel-reported-size-f9jj7p',
20
+ splitPanelMinWidth: '--awsui-split-panel-min-width-f9jj7p',
21
+ splitPanelMaxWidth: '--awsui-split-panel-max-width-f9jj7p',
22
+ toolsMaxWidth: '--awsui-tools-max-width-f9jj7p',
23
+ toolsWidth: '--awsui-tools-width-f9jj7p',
24
+ toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-f9jj7p',
25
+ contentScrollMargin: '--awsui-content-scroll-margin-f9jj7p',
26
+ flashbarStackDepth: '--awsui-flashbar-stack-depth-f9jj7p',
27
+ flashbarStackIndex: '--awsui-flashbar-stack-index-f9jj7p'
29
28
  };
30
29
  export default customCSSPropertiesMap;
31
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,IAAM,sBAAsB,GAA2B;IACrD,SAAS,EAAE,2BAA2B;IACtC,0BAA0B,EAAE,8CAA8C;IAC1E,cAAc,EAAE,iCAAiC;IACjD,eAAe,EAAE,kCAAkC;IACnD,aAAa,EAAE,+BAA+B;IAC9C,sBAAsB,EAAE,0CAA0C;IAClE,sBAAsB,EAAE,0CAA0C;IAClE,YAAY,EAAE,8BAA8B;IAC5C,YAAY,EAAE,8BAA8B;IAC5C,WAAW,EAAE,6BAA6B;IAC1C,cAAc,EAAE,iCAAiC;IACjD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,mBAAmB,EAAE,qCAAqC;IAC1D,aAAa,EAAE,+BAA+B;IAC9C,eAAe,EAAE,iCAAiC;IAClD,4BAA4B,EAAE,iDAAiD;IAC/E,sBAAsB,EAAE,0CAA0C;IAClE,gBAAgB,EAAE,mCAAmC;IACrD,kBAAkB,EAAE,sCAAsC;IAC1D,kBAAkB,EAAE,sCAAsC;IAC1D,aAAa,EAAE,gCAAgC;IAC/C,UAAU,EAAE,4BAA4B;IACxC,6BAA6B,EAAE,iDAAiD;IAChF,mBAAmB,EAAE,sCAAsC;IAC3D,kBAAkB,EAAE,qCAAqC;IACzD,kBAAkB,EAAE,qCAAqC;CAC1D,CAAC;AACF,eAAe,sBAAsB,CAAC","sourcesContent":["const customCSSPropertiesMap: Record<string, string> = {\n offsetTop: '--awsui-offset-top-5mks97',\n offsetTopWithNotifications: '--awsui-offset-top-with-notifications-5mks97',\n contentGapLeft: '--awsui-content-gap-left-5mks97',\n contentGapRight: '--awsui-content-gap-right-5mks97',\n contentHeight: '--awsui-content-height-5mks97',\n defaultMaxContentWidth: '--awsui-default-max-content-width-5mks97',\n defaultMinContentWidth: '--awsui-default-min-content-width-5mks97',\n footerHeight: '--awsui-footer-height-5mks97',\n headerHeight: '--awsui-header-height-5mks97',\n layoutWidth: '--awsui-layout-width-5mks97',\n mainOffsetLeft: '--awsui-main-offset-left-5mks97',\n maxContentWidth: '--awsui-max-content-width-5mks97',\n minContentWidth: '--awsui-min-content-width-5mks97',\n notificationsHeight: '--awsui-notifications-height-5mks97',\n overlapHeight: '--awsui-overlap-height-5mks97',\n navigationWidth: '--awsui-navigation-width-5mks97',\n splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-5mks97',\n splitPanelReportedSize: '--awsui-split-panel-reported-size-5mks97',\n splitPanelHeight: '--awsui-split-panel-height-5mks97',\n splitPanelMinWidth: '--awsui-split-panel-min-width-5mks97',\n splitPanelMaxWidth: '--awsui-split-panel-max-width-5mks97',\n toolsMaxWidth: '--awsui-tools-max-width-5mks97',\n toolsWidth: '--awsui-tools-width-5mks97',\n toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-5mks97',\n contentScrollMargin: '--awsui-content-scroll-margin-5mks97',\n flashbarStackDepth: '--awsui-flashbar-stack-depth-5mks97',\n flashbarStackIndex: '--awsui-flashbar-stack-index-5mks97',\n};\nexport default customCSSPropertiesMap;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,IAAM,sBAAsB,GAA2B;IACrD,SAAS,EAAE,2BAA2B;IACtC,0BAA0B,EAAE,8CAA8C;IAC1E,cAAc,EAAE,iCAAiC;IACjD,eAAe,EAAE,kCAAkC;IACnD,aAAa,EAAE,+BAA+B;IAC9C,sBAAsB,EAAE,0CAA0C;IAClE,sBAAsB,EAAE,0CAA0C;IAClE,YAAY,EAAE,8BAA8B;IAC5C,YAAY,EAAE,8BAA8B;IAC5C,WAAW,EAAE,6BAA6B;IAC1C,cAAc,EAAE,iCAAiC;IACjD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,mBAAmB,EAAE,qCAAqC;IAC1D,aAAa,EAAE,+BAA+B;IAC9C,eAAe,EAAE,iCAAiC;IAClD,4BAA4B,EAAE,iDAAiD;IAC/E,sBAAsB,EAAE,0CAA0C;IAClE,kBAAkB,EAAE,sCAAsC;IAC1D,kBAAkB,EAAE,sCAAsC;IAC1D,aAAa,EAAE,gCAAgC;IAC/C,UAAU,EAAE,4BAA4B;IACxC,6BAA6B,EAAE,iDAAiD;IAChF,mBAAmB,EAAE,sCAAsC;IAC3D,kBAAkB,EAAE,qCAAqC;IACzD,kBAAkB,EAAE,qCAAqC;CAC1D,CAAC;AACF,eAAe,sBAAsB,CAAC","sourcesContent":["const customCSSPropertiesMap: Record<string, string> = {\n offsetTop: '--awsui-offset-top-f9jj7p',\n offsetTopWithNotifications: '--awsui-offset-top-with-notifications-f9jj7p',\n contentGapLeft: '--awsui-content-gap-left-f9jj7p',\n contentGapRight: '--awsui-content-gap-right-f9jj7p',\n contentHeight: '--awsui-content-height-f9jj7p',\n defaultMaxContentWidth: '--awsui-default-max-content-width-f9jj7p',\n defaultMinContentWidth: '--awsui-default-min-content-width-f9jj7p',\n footerHeight: '--awsui-footer-height-f9jj7p',\n headerHeight: '--awsui-header-height-f9jj7p',\n layoutWidth: '--awsui-layout-width-f9jj7p',\n mainOffsetLeft: '--awsui-main-offset-left-f9jj7p',\n maxContentWidth: '--awsui-max-content-width-f9jj7p',\n minContentWidth: '--awsui-min-content-width-f9jj7p',\n notificationsHeight: '--awsui-notifications-height-f9jj7p',\n overlapHeight: '--awsui-overlap-height-f9jj7p',\n navigationWidth: '--awsui-navigation-width-f9jj7p',\n splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-f9jj7p',\n splitPanelReportedSize: '--awsui-split-panel-reported-size-f9jj7p',\n splitPanelMinWidth: '--awsui-split-panel-min-width-f9jj7p',\n splitPanelMaxWidth: '--awsui-split-panel-max-width-f9jj7p',\n toolsMaxWidth: '--awsui-tools-max-width-f9jj7p',\n toolsWidth: '--awsui-tools-width-f9jj7p',\n toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-f9jj7p',\n contentScrollMargin: '--awsui-content-scroll-margin-f9jj7p',\n flashbarStackDepth: '--awsui-flashbar-stack-depth-f9jj7p',\n flashbarStackIndex: '--awsui-flashbar-stack-index-f9jj7p',\n};\nexport default customCSSPropertiesMap;\n"]}
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "707ed43e0765d33d02f644d07a5c2fa3515c3368"
2
+ "commit": "162110de6d75aa1c2c28af7c05098b5ae963362b"
3
3
  }
@@ -2,10 +2,9 @@ export { isoToDisplay, displayToIso } from './display-format';
2
2
  export { formatDateRange } from './format-date-range';
3
3
  export { formatDate } from './format-date';
4
4
  export { formatTime } from './format-time';
5
- export { formatDateTime } from './format-date-time';
6
5
  export { formatTimezoneOffset } from './format-timezone-offset';
7
6
  export { isIsoDateOnly } from './is-iso-date-only';
8
- export { joinDateTime, splitDateTime } from './join-date-time';
7
+ export { joinDateTime } from './join-date-time';
9
8
  export { parseDate } from './parse-date';
10
9
  export { parseTimezoneOffset } from './parse-timezone-offset';
11
10
  export { shiftTimezoneOffset } from './shift-timezone-offset';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -4,10 +4,9 @@ export { isoToDisplay, displayToIso } from './display-format';
4
4
  export { formatDateRange } from './format-date-range';
5
5
  export { formatDate } from './format-date';
6
6
  export { formatTime } from './format-time';
7
- export { formatDateTime } from './format-date-time';
8
7
  export { formatTimezoneOffset } from './format-timezone-offset';
9
8
  export { isIsoDateOnly } from './is-iso-date-only';
10
- export { joinDateTime, splitDateTime } from './join-date-time';
9
+ export { joinDateTime } from './join-date-time';
11
10
  export { parseDate } from './parse-date';
12
11
  export { parseTimezoneOffset } from './parse-timezone-offset';
13
12
  export { shiftTimezoneOffset } from './shift-timezone-offset';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport { isoToDisplay, displayToIso } from './display-format';\nexport { formatDateRange } from './format-date-range';\nexport { formatDate } from './format-date';\nexport { formatTime } from './format-time';\nexport { formatDateTime } from './format-date-time';\nexport { formatTimezoneOffset } from './format-timezone-offset';\nexport { isIsoDateOnly } from './is-iso-date-only';\nexport { joinDateTime, splitDateTime } from './join-date-time';\nexport { parseDate } from './parse-date';\nexport { parseTimezoneOffset } from './parse-timezone-offset';\nexport { shiftTimezoneOffset } from './shift-timezone-offset';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport { isoToDisplay, displayToIso } from './display-format';\nexport { formatDateRange } from './format-date-range';\nexport { formatDate } from './format-date';\nexport { formatTime } from './format-time';\nexport { formatTimezoneOffset } from './format-timezone-offset';\nexport { isIsoDateOnly } from './is-iso-date-only';\nexport { joinDateTime } from './join-date-time';\nexport { parseDate } from './parse-date';\nexport { parseTimezoneOffset } from './parse-timezone-offset';\nexport { shiftTimezoneOffset } from './shift-timezone-offset';\n"]}
@@ -1,6 +1,2 @@
1
1
  export declare function joinDateTime(dateString: string, timeString: string): string;
2
- export declare function splitDateTime(dateStr: string): {
3
- date: string;
4
- time: string;
5
- };
6
2
  //# sourceMappingURL=join-date-time.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"join-date-time.d.ts","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/join-date-time.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAElE;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM;;;EAG5C"}
1
+ {"version":3,"file":"join-date-time.d.ts","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/join-date-time.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAElE"}