@ntbjs/react-components 2.0.0-rc.13 → 2.0.0-rc.26

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 (556) hide show
  1. package/build/ActionButton-03dc5f67.js +92 -0
  2. package/build/Alert-8a511bdc.js +138 -0
  3. package/build/AssetAction-d081e4b7.js +2377 -0
  4. package/build/AssetPreviewTopBar-623cfa18.js +152 -0
  5. package/build/Badge-aa4cd9c1.js +221 -0
  6. package/build/Button-2e26f5da.js +449 -0
  7. package/build/Checkbox-0b8faf49.js +220 -0
  8. package/build/CompactAutocompleteSelect-797778cb.js +555 -0
  9. package/build/CompactStarRating-da21b53f.js +436 -0
  10. package/build/CompactTextInput-d56aec71.js +541 -0
  11. package/build/ContextMenu-82f9d728.js +33 -0
  12. package/build/ContextMenuItem-3967010d.js +152 -0
  13. package/build/InfoCard-d0fdf377.js +132 -0
  14. package/build/InputGroup-8d4a4644.js +30 -0
  15. package/build/Instructions-af191987.js +274 -0
  16. package/build/MultiLevelCheckboxSelect-d229cf98.js +632 -0
  17. package/build/MultiSelect-d7920eb1.js +470 -0
  18. package/build/Popover-c4be47ea.js +241 -0
  19. package/build/ProgressBar-2d26c1fb.js +217 -0
  20. package/build/Radio-150fb2c9.js +141 -0
  21. package/build/SectionSeparator-e06c7660.js +38 -0
  22. package/build/Switch-d2d6e9ec.js +167 -0
  23. package/build/Tab-ccbca1f2.js +39 -0
  24. package/build/Tabs-b06c0e24.js +166 -0
  25. package/build/TextArea-26d3c8a1.js +619 -0
  26. package/build/TextInput-3a567daa.js +372 -0
  27. package/build/Tooltip-d5882b82.js +73 -0
  28. package/build/VerificationStatusIcon-9876b68f.js +120 -0
  29. package/{esm/node_modules/@babel/runtime/helpers/esm/extends.js → build/_rollupPluginBabelHelpers-4b342fad.js} +3 -1
  30. package/build/arrow-forward-d7c77ae3.js +37 -0
  31. package/build/close-1751121a.js +37 -0
  32. package/build/data/Alert/index.js +12 -0
  33. package/build/data/Badge/index.js +11 -0
  34. package/build/data/Popover/index.js +16 -0
  35. package/build/data/Tab/index.js +11 -0
  36. package/build/data/Tabs/index.js +13 -0
  37. package/build/data/Tooltip/index.js +13 -0
  38. package/build/data/index.js +30 -0
  39. package/{esm/node_modules/prop-types/factoryWithTypeCheckers.js → build/defaultTheme-d9a7342e.js} +582 -17
  40. package/build/edit-note-cefe2215.js +37 -0
  41. package/build/expand-more-d74e2bd2.js +37 -0
  42. package/build/icons/add-circle.svg +3 -0
  43. package/build/icons/add.svg +3 -0
  44. package/build/icons/album.svg +3 -0
  45. package/build/icons/arrow-back.svg +4 -0
  46. package/build/icons/arrow-drop-down.svg +4 -0
  47. package/build/icons/arrow-forward.svg +3 -0
  48. package/build/icons/audio.svg +3 -0
  49. package/build/icons/bell.svg +3 -0
  50. package/build/icons/check-circle-filled.svg +3 -0
  51. package/build/icons/check-rectangle-filled.svg +3 -0
  52. package/build/icons/check.svg +3 -0
  53. package/build/icons/clear-circle-filled.svg +14 -0
  54. package/build/icons/close.svg +4 -0
  55. package/build/icons/corporate.svg +3 -0
  56. package/build/icons/delete-context-menu.svg +4 -0
  57. package/build/icons/delete.svg +3 -0
  58. package/build/icons/design-services.svg +4 -0
  59. package/build/icons/download.svg +3 -0
  60. package/build/icons/edit-note.svg +4 -0
  61. package/build/icons/edit.svg +3 -0
  62. package/build/icons/expand-more.svg +4 -0
  63. package/build/icons/file.svg +3 -0
  64. package/build/icons/ftp.svg +3 -0
  65. package/build/icons/gear.svg +3 -0
  66. package/build/icons/headset.svg +1 -0
  67. package/build/icons/index.js +79 -0
  68. package/build/icons/layers.svg +3 -0
  69. package/build/icons/library-add.svg +3 -0
  70. package/build/icons/link.svg +4 -0
  71. package/build/icons/pdf.svg +3 -0
  72. package/build/icons/play.svg +3 -0
  73. package/build/icons/remove-circle.svg +3 -0
  74. package/build/icons/search.svg +3 -0
  75. package/build/icons/share.svg +3 -0
  76. package/build/icons/shopping_cart_add.svg +3 -0
  77. package/build/icons/star-filled.svg +3 -0
  78. package/build/icons/star.svg +3 -0
  79. package/build/icons/triangle-right.svg +4 -0
  80. package/build/icons/verification.svg +3 -0
  81. package/build/icons/warning-circle.svg +3 -0
  82. package/build/icons/warning-triangle.svg +3 -0
  83. package/build/inputs/ActionButton/index.js +12 -0
  84. package/build/inputs/Button/index.js +19 -0
  85. package/build/inputs/Checkbox/index.js +12 -0
  86. package/build/inputs/CompactAutocompleteSelect/index.js +29 -0
  87. package/build/inputs/CompactStarRating/index.js +23 -0
  88. package/build/inputs/CompactTextInput/index.js +25 -0
  89. package/build/inputs/MultiSelect/index.js +16 -0
  90. package/build/inputs/Radio/index.js +13 -0
  91. package/build/inputs/Switch/index.js +12 -0
  92. package/build/inputs/TextArea/index.js +26 -0
  93. package/build/inputs/TextInput/index.js +15 -0
  94. package/build/inputs/index.js +60 -0
  95. package/build/layout/InputGroup/index.js +11 -0
  96. package/build/layout/SectionSeparator/index.js +11 -0
  97. package/build/layout/index.js +15 -0
  98. package/build/shift-away-subtle-158617af.js +9 -0
  99. package/build/styles/all.scss +3 -0
  100. package/build/styles/config.scss +38 -0
  101. package/{styles/utils/.colors.scss → build/styles/utils/colors.scss} +1 -1
  102. package/build/styles/utils/theme.scss +33 -0
  103. package/build/widgets/AssetGallery/index.js +55 -0
  104. package/build/widgets/AssetPreview/AssetPreviewTopBar/index.js +12 -0
  105. package/build/widgets/ContextMenu/ContextMenuItem/index.js +11 -0
  106. package/build/widgets/ContextMenu/ContextMenuItemsGroup/index.js +44 -0
  107. package/build/widgets/ContextMenu/index.js +11 -0
  108. package/build/widgets/InfoCard/index.js +12 -0
  109. package/build/widgets/Instructions/index.js +33 -0
  110. package/build/widgets/ProgressBar/index.js +12 -0
  111. package/build/widgets/index.js +65 -0
  112. package/package.json +49 -56
  113. package/styles/all.scss +3 -3
  114. package/styles/config.scss +38 -0
  115. package/styles/utils/colors.scss +15 -0
  116. package/styles/utils/theme.scss +0 -2
  117. package/.eslintrc +0 -19
  118. package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -84
  119. package/cjs/_virtual/index.js +0 -7
  120. package/cjs/_virtual/index2.js +0 -7
  121. package/cjs/_virtual/index3.js +0 -7
  122. package/cjs/_virtual/index4.js +0 -7
  123. package/cjs/_virtual/index5.js +0 -7
  124. package/cjs/_virtual/react-dom.development.js +0 -7
  125. package/cjs/_virtual/react-dom.production.js +0 -7
  126. package/cjs/_virtual/react-is.development.js +0 -7
  127. package/cjs/_virtual/react-is.development2.js +0 -7
  128. package/cjs/_virtual/react-is.production.min.js +0 -7
  129. package/cjs/_virtual/react-is.production.min2.js +0 -7
  130. package/cjs/_virtual/react.development.js +0 -7
  131. package/cjs/_virtual/react.production.js +0 -7
  132. package/cjs/components/data/Alert/Alert.js +0 -79
  133. package/cjs/components/data/Alert/Alert.styled.js +0 -79
  134. package/cjs/components/data/Alert/data/Alert/index.js +0 -9
  135. package/cjs/components/data/Badge/Badge.js +0 -93
  136. package/cjs/components/data/Badge/Badge.styled.js +0 -167
  137. package/cjs/components/data/Badge/data/Badge/index.js +0 -9
  138. package/cjs/components/data/Popover/Popover.js +0 -104
  139. package/cjs/components/data/Popover/Popover.styled.js +0 -159
  140. package/cjs/components/data/Popover/data/Popover/index.js +0 -9
  141. package/cjs/components/data/Tab/Tab.js +0 -31
  142. package/cjs/components/data/Tab/Tab.styled.js +0 -27
  143. package/cjs/components/data/Tab/data/Tab/index.js +0 -9
  144. package/cjs/components/data/Tabs/Tabs.js +0 -101
  145. package/cjs/components/data/Tabs/Tabs.styled.js +0 -110
  146. package/cjs/components/data/Tabs/data/Tabs/index.js +0 -9
  147. package/cjs/components/data/Tooltip/Tooltip.js +0 -52
  148. package/cjs/components/data/Tooltip/Tooltip.styled.js +0 -38
  149. package/cjs/components/data/Tooltip/data/Tooltip/index.js +0 -9
  150. package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.js +0 -42
  151. package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +0 -88
  152. package/cjs/components/data/data/index.js +0 -21
  153. package/cjs/components/inputs/ActionButton/ActionButton.js +0 -44
  154. package/cjs/components/inputs/ActionButton/ActionButton.styled.js +0 -75
  155. package/cjs/components/inputs/ActionButton/inputs/ActionButton/index.js +0 -9
  156. package/cjs/components/inputs/Button/Button.js +0 -195
  157. package/cjs/components/inputs/Button/Button.styled.js +0 -340
  158. package/cjs/components/inputs/Button/inputs/Button/index.js +0 -9
  159. package/cjs/components/inputs/Checkbox/Checkbox.js +0 -102
  160. package/cjs/components/inputs/Checkbox/Checkbox.styled.js +0 -160
  161. package/cjs/components/inputs/Checkbox/inputs/Checkbox/index.js +0 -9
  162. package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +0 -268
  163. package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +0 -363
  164. package/cjs/components/inputs/CompactAutocompleteSelect/inputs/CompactAutocompleteSelect/index.js +0 -9
  165. package/cjs/components/inputs/CompactStarRating/CompactStarRating.js +0 -177
  166. package/cjs/components/inputs/CompactStarRating/CompactStarRating.styled.js +0 -269
  167. package/cjs/components/inputs/CompactStarRating/inputs/CompactStarRating/index.js +0 -9
  168. package/cjs/components/inputs/CompactTextInput/CompactTextInput.js +0 -187
  169. package/cjs/components/inputs/CompactTextInput/CompactTextInput.styled.js +0 -406
  170. package/cjs/components/inputs/CompactTextInput/inputs/CompactTextInput/index.js +0 -9
  171. package/cjs/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +0 -253
  172. package/cjs/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +0 -106
  173. package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +0 -185
  174. package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +0 -147
  175. package/cjs/components/inputs/MultiSelect/MultiSelect.js +0 -208
  176. package/cjs/components/inputs/MultiSelect/MultiSelect.styled.js +0 -275
  177. package/cjs/components/inputs/MultiSelect/inputs/MultiSelect/index.js +0 -9
  178. package/cjs/components/inputs/Radio/Radio.js +0 -67
  179. package/cjs/components/inputs/Radio/Radio.styled.js +0 -100
  180. package/cjs/components/inputs/Radio/inputs/Radio/index.js +0 -9
  181. package/cjs/components/inputs/Switch/Switch.js +0 -69
  182. package/cjs/components/inputs/Switch/Switch.styled.js +0 -138
  183. package/cjs/components/inputs/Switch/inputs/Switch/index.js +0 -9
  184. package/cjs/components/inputs/TextArea/TextArea.js +0 -176
  185. package/cjs/components/inputs/TextArea/TextArea.styled.js +0 -530
  186. package/cjs/components/inputs/TextArea/inputs/TextArea/index.js +0 -9
  187. package/cjs/components/inputs/TextInput/TextInput.js +0 -146
  188. package/cjs/components/inputs/TextInput/TextInput.styled.js +0 -289
  189. package/cjs/components/inputs/TextInput/inputs/TextInput/index.js +0 -9
  190. package/cjs/components/inputs/inputs/index.js +0 -33
  191. package/cjs/components/layout/InputGroup/InputGroup.js +0 -26
  192. package/cjs/components/layout/InputGroup/InputGroup.styled.js +0 -23
  193. package/cjs/components/layout/InputGroup/layout/InputGroup/index.js +0 -9
  194. package/cjs/components/layout/SectionSeparator/SectionSeparator.js +0 -29
  195. package/cjs/components/layout/SectionSeparator/SectionSeparator.styled.js +0 -28
  196. package/cjs/components/layout/SectionSeparator/layout/SectionSeparator/index.js +0 -9
  197. package/cjs/components/layout/layout/index.js +0 -11
  198. package/cjs/components/widgets/AssetAction/AssetAction.js +0 -106
  199. package/cjs/components/widgets/AssetAction/AssetAction.styled.js +0 -69
  200. package/cjs/components/widgets/AssetActionsBase/AssetActionsBase.js +0 -35
  201. package/cjs/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +0 -29
  202. package/cjs/components/widgets/AssetGallery/AssetGallery.js +0 -106
  203. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +0 -395
  204. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +0 -52
  205. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +0 -405
  206. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +0 -385
  207. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +0 -396
  208. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +0 -328
  209. package/cjs/components/widgets/AssetGallery/asset.propType.js +0 -58
  210. package/cjs/components/widgets/AssetGallery/widgets/AssetGallery/index.js +0 -9
  211. package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +0 -50
  212. package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +0 -107
  213. package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/widgets/AssetPreview/AssetPreviewTopBar/index.js +0 -9
  214. package/cjs/components/widgets/ContextMenu/ContextMenu.js +0 -29
  215. package/cjs/components/widgets/ContextMenu/ContextMenu.styled.js +0 -24
  216. package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +0 -50
  217. package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +0 -102
  218. package/cjs/components/widgets/ContextMenu/ContextMenuItem/widgets/ContextMenu/ContextMenuItem/index.js +0 -9
  219. package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +0 -28
  220. package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +0 -35
  221. package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/widgets/ContextMenu/ContextMenuItemsGroup/index.js +0 -9
  222. package/cjs/components/widgets/ContextMenu/widgets/ContextMenu/index.js +0 -9
  223. package/cjs/components/widgets/InfoCard/InfoCard.js +0 -47
  224. package/cjs/components/widgets/InfoCard/InfoCard.styled.js +0 -137
  225. package/cjs/components/widgets/InfoCard/widgets/InfoCard/index.js +0 -9
  226. package/cjs/components/widgets/ProgressBar/ProgressBar.js +0 -79
  227. package/cjs/components/widgets/ProgressBar/ProgressBar.styled.js +0 -210
  228. package/cjs/components/widgets/ProgressBar/widgets/ProgressBar/index.js +0 -9
  229. package/cjs/components/widgets/SummaryCard/SummaryCard.js +0 -93
  230. package/cjs/components/widgets/SummaryCard/SummaryCard.styled.js +0 -169
  231. package/cjs/components/widgets/widgets/index.js +0 -23
  232. package/cjs/hooks/useEventListner.js +0 -26
  233. package/cjs/hooks/useIsomorphicLayoutEffect.js +0 -11
  234. package/cjs/hooks/useOnClickOutside.js +0 -17
  235. package/cjs/icons/arrow-back.svg.js +0 -20
  236. package/cjs/icons/arrow-forward.svg.js +0 -20
  237. package/cjs/icons/check-rectangle-filled.svg.js +0 -20
  238. package/cjs/icons/close.svg.js +0 -20
  239. package/cjs/icons/edit-note.svg.js +0 -20
  240. package/cjs/icons/expand-more.svg.js +0 -20
  241. package/cjs/icons/headset.svg.js +0 -20
  242. package/cjs/icons/layers.svg.js +0 -20
  243. package/cjs/icons/link.svg.js +0 -20
  244. package/cjs/icons/play.svg.js +0 -20
  245. package/cjs/icons/search.svg.js +0 -20
  246. package/cjs/icons/star-filled.svg.js +0 -20
  247. package/cjs/icons/star.svg.js +0 -20
  248. package/cjs/icons/triangle-right.svg.js +0 -20
  249. package/cjs/icons/verification.svg.js +0 -20
  250. package/cjs/icons/warning-circle.svg.js +0 -20
  251. package/cjs/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -11
  252. package/cjs/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -9
  253. package/cjs/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -11
  254. package/cjs/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -10
  255. package/cjs/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -9
  256. package/cjs/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -19
  257. package/cjs/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -22
  258. package/cjs/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -16
  259. package/cjs/node_modules/@babel/runtime/helpers/esm/extends.js +0 -15
  260. package/cjs/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -11
  261. package/cjs/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -20
  262. package/cjs/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -14
  263. package/cjs/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -9
  264. package/cjs/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -33
  265. package/cjs/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -9
  266. package/cjs/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -9
  267. package/cjs/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -29
  268. package/cjs/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -19
  269. package/cjs/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -15
  270. package/cjs/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -14
  271. package/cjs/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -11
  272. package/cjs/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -14
  273. package/cjs/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -13
  274. package/cjs/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -14
  275. package/cjs/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -18
  276. package/cjs/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -13
  277. package/cjs/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -15
  278. package/cjs/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -15
  279. package/cjs/node_modules/@emotion/cache/dist/emotion-cache.esm.js +0 -503
  280. package/cjs/node_modules/@emotion/hash/dist/emotion-hash.esm.js +0 -59
  281. package/cjs/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +0 -13
  282. package/cjs/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js +0 -158
  283. package/cjs/node_modules/@emotion/react/dist/emotion-react.esm.js +0 -66
  284. package/cjs/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +0 -240
  285. package/cjs/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js +0 -144
  286. package/cjs/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +0 -56
  287. package/cjs/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js +0 -16
  288. package/cjs/node_modules/@emotion/utils/dist/emotion-utils.esm.js +0 -60
  289. package/cjs/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +0 -20
  290. package/cjs/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +0 -915
  291. package/cjs/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +0 -374
  292. package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +0 -130
  293. package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +0 -166
  294. package/cjs/node_modules/@restart/hooks/lib/useMergedRefs.js +0 -43
  295. package/cjs/node_modules/@restart/hooks/lib/useUpdateEffect.js +0 -39
  296. package/cjs/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +0 -24
  297. package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +0 -186
  298. package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +0 -22
  299. package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +0 -13
  300. package/cjs/node_modules/memoize-one/dist/memoize-one.esm.js +0 -55
  301. package/cjs/node_modules/object-assign/index.js +0 -94
  302. package/cjs/node_modules/prop-types/checkPropTypes.js +0 -110
  303. package/cjs/node_modules/prop-types/factoryWithThrowingShims.js +0 -69
  304. package/cjs/node_modules/prop-types/factoryWithTypeCheckers.js +0 -621
  305. package/cjs/node_modules/prop-types/index.js +0 -33
  306. package/cjs/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -16
  307. package/cjs/node_modules/prop-types/lib/has.js +0 -7
  308. package/cjs/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -186
  309. package/cjs/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -22
  310. package/cjs/node_modules/prop-types/node_modules/react-is/index.js +0 -13
  311. package/cjs/node_modules/react/cjs/react.development.js +0 -1289
  312. package/cjs/node_modules/react/cjs/react.production.js +0 -548
  313. package/cjs/node_modules/react/index.js +0 -19
  314. package/cjs/node_modules/react-dom/cjs/react-dom.development.js +0 -432
  315. package/cjs/node_modules/react-dom/cjs/react-dom.production.js +0 -218
  316. package/cjs/node_modules/react-dom/index.js +0 -44
  317. package/cjs/node_modules/react-lazy-load-image-component/src/effects/opacity.css.js +0 -6
  318. package/cjs/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +0 -23
  319. package/cjs/node_modules/react-select/dist/Select-ef7c0426.esm.js +0 -2659
  320. package/cjs/node_modules/react-select/dist/index-641ee5b8.esm.js +0 -1426
  321. package/cjs/node_modules/react-select/dist/useCreatable-09aaeb9a.esm.js +0 -101
  322. package/cjs/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js +0 -78
  323. package/cjs/node_modules/style-inject/dist/style-inject.es.js +0 -32
  324. package/cjs/node_modules/stylis/src/Enum.js +0 -24
  325. package/cjs/node_modules/stylis/src/Middleware.js +0 -37
  326. package/cjs/node_modules/stylis/src/Parser.js +0 -201
  327. package/cjs/node_modules/stylis/src/Serializer.js +0 -43
  328. package/cjs/node_modules/stylis/src/Tokenizer.js +0 -243
  329. package/cjs/node_modules/stylis/src/Utility.js +0 -134
  330. package/cjs/node_modules/tippy.js/animations/shift-away-subtle.css.js +0 -6
  331. package/cjs/node_modules/tippy.js/dist/tippy.css.js +0 -6
  332. package/cjs/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js +0 -13
  333. package/cjs/styles/utils/colors-export.js +0 -41
  334. package/cjs/utils/dateTime.js +0 -20
  335. package/cjs/utils/defaultTheme.js +0 -75
  336. package/doctor-storybook.log +0 -20
  337. package/esm/_virtual/_rollupPluginBabelHelpers.js +0 -74
  338. package/esm/_virtual/index.js +0 -3
  339. package/esm/_virtual/index2.js +0 -3
  340. package/esm/_virtual/index3.js +0 -3
  341. package/esm/_virtual/index4.js +0 -3
  342. package/esm/_virtual/index5.js +0 -3
  343. package/esm/_virtual/react-dom.development.js +0 -3
  344. package/esm/_virtual/react-dom.production.js +0 -3
  345. package/esm/_virtual/react-is.development.js +0 -3
  346. package/esm/_virtual/react-is.development2.js +0 -3
  347. package/esm/_virtual/react-is.production.min.js +0 -3
  348. package/esm/_virtual/react-is.production.min2.js +0 -3
  349. package/esm/_virtual/react.development.js +0 -3
  350. package/esm/_virtual/react.production.js +0 -3
  351. package/esm/components/data/Alert/Alert.js +0 -75
  352. package/esm/components/data/Alert/Alert.styled.js +0 -70
  353. package/esm/components/data/Alert/data/Alert/index.js +0 -1
  354. package/esm/components/data/Badge/Badge.js +0 -89
  355. package/esm/components/data/Badge/Badge.styled.js +0 -156
  356. package/esm/components/data/Badge/data/Badge/index.js +0 -1
  357. package/esm/components/data/Popover/Popover.js +0 -96
  358. package/esm/components/data/Popover/Popover.styled.js +0 -150
  359. package/esm/components/data/Popover/data/Popover/index.js +0 -1
  360. package/esm/components/data/Tab/Tab.js +0 -27
  361. package/esm/components/data/Tab/Tab.styled.js +0 -19
  362. package/esm/components/data/Tab/data/Tab/index.js +0 -1
  363. package/esm/components/data/Tabs/Tabs.js +0 -97
  364. package/esm/components/data/Tabs/Tabs.styled.js +0 -98
  365. package/esm/components/data/Tabs/data/Tabs/index.js +0 -1
  366. package/esm/components/data/Tooltip/Tooltip.js +0 -48
  367. package/esm/components/data/Tooltip/Tooltip.styled.js +0 -29
  368. package/esm/components/data/Tooltip/data/Tooltip/index.js +0 -1
  369. package/esm/components/data/VerificationStatusIcon/VerificationStatusIcon.js +0 -38
  370. package/esm/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +0 -78
  371. package/esm/components/data/data/index.js +0 -7
  372. package/esm/components/inputs/ActionButton/ActionButton.js +0 -40
  373. package/esm/components/inputs/ActionButton/ActionButton.styled.js +0 -67
  374. package/esm/components/inputs/ActionButton/inputs/ActionButton/index.js +0 -1
  375. package/esm/components/inputs/Button/Button.js +0 -191
  376. package/esm/components/inputs/Button/Button.styled.js +0 -323
  377. package/esm/components/inputs/Button/inputs/Button/index.js +0 -1
  378. package/esm/components/inputs/Checkbox/Checkbox.js +0 -98
  379. package/esm/components/inputs/Checkbox/Checkbox.styled.js +0 -147
  380. package/esm/components/inputs/Checkbox/inputs/Checkbox/index.js +0 -1
  381. package/esm/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +0 -264
  382. package/esm/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +0 -335
  383. package/esm/components/inputs/CompactAutocompleteSelect/inputs/CompactAutocompleteSelect/index.js +0 -1
  384. package/esm/components/inputs/CompactStarRating/CompactStarRating.js +0 -173
  385. package/esm/components/inputs/CompactStarRating/CompactStarRating.styled.js +0 -256
  386. package/esm/components/inputs/CompactStarRating/inputs/CompactStarRating/index.js +0 -1
  387. package/esm/components/inputs/CompactTextInput/CompactTextInput.js +0 -183
  388. package/esm/components/inputs/CompactTextInput/CompactTextInput.styled.js +0 -389
  389. package/esm/components/inputs/CompactTextInput/inputs/CompactTextInput/index.js +0 -1
  390. package/esm/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +0 -247
  391. package/esm/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +0 -92
  392. package/esm/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +0 -181
  393. package/esm/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +0 -129
  394. package/esm/components/inputs/MultiSelect/MultiSelect.js +0 -204
  395. package/esm/components/inputs/MultiSelect/MultiSelect.styled.js +0 -251
  396. package/esm/components/inputs/MultiSelect/inputs/MultiSelect/index.js +0 -1
  397. package/esm/components/inputs/Radio/Radio.js +0 -63
  398. package/esm/components/inputs/Radio/Radio.styled.js +0 -91
  399. package/esm/components/inputs/Radio/inputs/Radio/index.js +0 -1
  400. package/esm/components/inputs/Switch/Switch.js +0 -65
  401. package/esm/components/inputs/Switch/Switch.styled.js +0 -125
  402. package/esm/components/inputs/Switch/inputs/Switch/index.js +0 -1
  403. package/esm/components/inputs/TextArea/TextArea.js +0 -172
  404. package/esm/components/inputs/TextArea/TextArea.styled.js +0 -512
  405. package/esm/components/inputs/TextArea/inputs/TextArea/index.js +0 -1
  406. package/esm/components/inputs/TextInput/TextInput.js +0 -142
  407. package/esm/components/inputs/TextInput/TextInput.styled.js +0 -274
  408. package/esm/components/inputs/TextInput/inputs/TextInput/index.js +0 -1
  409. package/esm/components/inputs/inputs/index.js +0 -13
  410. package/esm/components/layout/InputGroup/InputGroup.js +0 -22
  411. package/esm/components/layout/InputGroup/InputGroup.styled.js +0 -15
  412. package/esm/components/layout/InputGroup/layout/InputGroup/index.js +0 -1
  413. package/esm/components/layout/SectionSeparator/SectionSeparator.js +0 -25
  414. package/esm/components/layout/SectionSeparator/SectionSeparator.styled.js +0 -20
  415. package/esm/components/layout/SectionSeparator/layout/SectionSeparator/index.js +0 -1
  416. package/esm/components/layout/layout/index.js +0 -2
  417. package/esm/components/widgets/AssetAction/AssetAction.js +0 -102
  418. package/esm/components/widgets/AssetAction/AssetAction.styled.js +0 -57
  419. package/esm/components/widgets/AssetActionsBase/AssetActionsBase.js +0 -31
  420. package/esm/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +0 -21
  421. package/esm/components/widgets/AssetGallery/AssetGallery.js +0 -102
  422. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +0 -387
  423. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +0 -42
  424. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +0 -401
  425. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +0 -358
  426. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +0 -392
  427. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +0 -302
  428. package/esm/components/widgets/AssetGallery/asset.propType.js +0 -53
  429. package/esm/components/widgets/AssetGallery/widgets/AssetGallery/index.js +0 -1
  430. package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +0 -46
  431. package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +0 -95
  432. package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/widgets/AssetPreview/AssetPreviewTopBar/index.js +0 -1
  433. package/esm/components/widgets/ContextMenu/ContextMenu.js +0 -25
  434. package/esm/components/widgets/ContextMenu/ContextMenu.styled.js +0 -16
  435. package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +0 -46
  436. package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +0 -92
  437. package/esm/components/widgets/ContextMenu/ContextMenuItem/widgets/ContextMenu/ContextMenuItem/index.js +0 -1
  438. package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +0 -24
  439. package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +0 -27
  440. package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/widgets/ContextMenu/ContextMenuItemsGroup/index.js +0 -1
  441. package/esm/components/widgets/ContextMenu/widgets/ContextMenu/index.js +0 -1
  442. package/esm/components/widgets/InfoCard/InfoCard.js +0 -43
  443. package/esm/components/widgets/InfoCard/InfoCard.styled.js +0 -121
  444. package/esm/components/widgets/InfoCard/widgets/InfoCard/index.js +0 -1
  445. package/esm/components/widgets/ProgressBar/ProgressBar.js +0 -75
  446. package/esm/components/widgets/ProgressBar/ProgressBar.styled.js +0 -191
  447. package/esm/components/widgets/ProgressBar/widgets/ProgressBar/index.js +0 -1
  448. package/esm/components/widgets/SummaryCard/SummaryCard.js +0 -89
  449. package/esm/components/widgets/SummaryCard/SummaryCard.styled.js +0 -151
  450. package/esm/components/widgets/widgets/index.js +0 -8
  451. package/esm/hooks/useEventListner.js +0 -22
  452. package/esm/hooks/useIsomorphicLayoutEffect.js +0 -7
  453. package/esm/hooks/useOnClickOutside.js +0 -13
  454. package/esm/icons/arrow-back.svg.js +0 -16
  455. package/esm/icons/arrow-forward.svg.js +0 -16
  456. package/esm/icons/check-rectangle-filled.svg.js +0 -16
  457. package/esm/icons/close.svg.js +0 -16
  458. package/esm/icons/edit-note.svg.js +0 -16
  459. package/esm/icons/expand-more.svg.js +0 -16
  460. package/esm/icons/headset.svg.js +0 -16
  461. package/esm/icons/layers.svg.js +0 -16
  462. package/esm/icons/link.svg.js +0 -16
  463. package/esm/icons/play.svg.js +0 -16
  464. package/esm/icons/search.svg.js +0 -16
  465. package/esm/icons/star-filled.svg.js +0 -16
  466. package/esm/icons/star.svg.js +0 -16
  467. package/esm/icons/triangle-right.svg.js +0 -16
  468. package/esm/icons/verification.svg.js +0 -16
  469. package/esm/icons/warning-circle.svg.js +0 -16
  470. package/esm/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -7
  471. package/esm/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -5
  472. package/esm/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -7
  473. package/esm/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -6
  474. package/esm/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -5
  475. package/esm/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -15
  476. package/esm/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -18
  477. package/esm/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -12
  478. package/esm/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -7
  479. package/esm/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -16
  480. package/esm/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -10
  481. package/esm/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -5
  482. package/esm/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -29
  483. package/esm/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -5
  484. package/esm/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -5
  485. package/esm/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -25
  486. package/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -15
  487. package/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -11
  488. package/esm/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -10
  489. package/esm/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -7
  490. package/esm/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -10
  491. package/esm/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -9
  492. package/esm/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -10
  493. package/esm/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -14
  494. package/esm/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -9
  495. package/esm/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -11
  496. package/esm/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -11
  497. package/esm/node_modules/@emotion/cache/dist/emotion-cache.esm.js +0 -499
  498. package/esm/node_modules/@emotion/hash/dist/emotion-hash.esm.js +0 -55
  499. package/esm/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +0 -9
  500. package/esm/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js +0 -149
  501. package/esm/node_modules/@emotion/react/dist/emotion-react.esm.js +0 -56
  502. package/esm/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +0 -236
  503. package/esm/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js +0 -140
  504. package/esm/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +0 -52
  505. package/esm/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js +0 -12
  506. package/esm/node_modules/@emotion/utils/dist/emotion-utils.esm.js +0 -54
  507. package/esm/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +0 -16
  508. package/esm/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +0 -902
  509. package/esm/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +0 -370
  510. package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +0 -112
  511. package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +0 -139
  512. package/esm/node_modules/@restart/hooks/lib/useMergedRefs.js +0 -38
  513. package/esm/node_modules/@restart/hooks/lib/useUpdateEffect.js +0 -35
  514. package/esm/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +0 -22
  515. package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +0 -181
  516. package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +0 -17
  517. package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +0 -11
  518. package/esm/node_modules/memoize-one/dist/memoize-one.esm.js +0 -51
  519. package/esm/node_modules/object-assign/index.js +0 -90
  520. package/esm/node_modules/prop-types/checkPropTypes.js +0 -106
  521. package/esm/node_modules/prop-types/factoryWithThrowingShims.js +0 -65
  522. package/esm/node_modules/prop-types/index.js +0 -29
  523. package/esm/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -12
  524. package/esm/node_modules/prop-types/lib/has.js +0 -3
  525. package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -181
  526. package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -17
  527. package/esm/node_modules/prop-types/node_modules/react-is/index.js +0 -11
  528. package/esm/node_modules/react/cjs/react.development.js +0 -1287
  529. package/esm/node_modules/react/cjs/react.production.js +0 -543
  530. package/esm/node_modules/react/index.js +0 -15
  531. package/esm/node_modules/react-dom/cjs/react-dom.development.js +0 -427
  532. package/esm/node_modules/react-dom/cjs/react-dom.production.js +0 -213
  533. package/esm/node_modules/react-dom/index.js +0 -42
  534. package/esm/node_modules/react-lazy-load-image-component/src/effects/opacity.css.js +0 -4
  535. package/esm/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +0 -19
  536. package/esm/node_modules/react-select/dist/Select-ef7c0426.esm.js +0 -2650
  537. package/esm/node_modules/react-select/dist/index-641ee5b8.esm.js +0 -1385
  538. package/esm/node_modules/react-select/dist/useCreatable-09aaeb9a.esm.js +0 -97
  539. package/esm/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js +0 -74
  540. package/esm/node_modules/style-inject/dist/style-inject.es.js +0 -28
  541. package/esm/node_modules/stylis/src/Enum.js +0 -12
  542. package/esm/node_modules/stylis/src/Middleware.js +0 -32
  543. package/esm/node_modules/stylis/src/Parser.js +0 -193
  544. package/esm/node_modules/stylis/src/Serializer.js +0 -38
  545. package/esm/node_modules/stylis/src/Tokenizer.js +0 -223
  546. package/esm/node_modules/stylis/src/Utility.js +0 -117
  547. package/esm/node_modules/tippy.js/animations/shift-away-subtle.css.js +0 -4
  548. package/esm/node_modules/tippy.js/dist/tippy.css.js +0 -4
  549. package/esm/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js +0 -9
  550. package/esm/ssr/ssr/index.js +0 -1
  551. package/esm/styles/utils/colors-export.js +0 -37
  552. package/esm/utils/dateTime.js +0 -16
  553. package/esm/utils/defaultTheme.js +0 -70
  554. package/migration-storybook.log +0 -392
  555. package/styles/utils/colors-export.js +0 -35
  556. /package/{cjs/ssr → build}/ssr/index.js +0 -0
@@ -1,915 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var floatingUi_utils = require('../../utils/dist/floating-ui.utils.mjs.js');
6
-
7
- /**
8
- * Resolves with an object of overflow side offsets that determine how much the
9
- * element is overflowing a given clipping boundary on each side.
10
- * - positive = overflowing the boundary by that number of pixels
11
- * - negative = how many pixels left before it will overflow
12
- * - 0 = lies flush with the boundary
13
- * @see https://floating-ui.com/docs/detectOverflow
14
- */
15
- async function detectOverflow(state, options) {
16
- var _await$platform$isEle;
17
- if (options === void 0) {
18
- options = {};
19
- }
20
- const {
21
- x,
22
- y,
23
- platform,
24
- rects,
25
- elements,
26
- strategy
27
- } = state;
28
- const {
29
- boundary = 'clippingAncestors',
30
- rootBoundary = 'viewport',
31
- elementContext = 'floating',
32
- altBoundary = false,
33
- padding = 0
34
- } = floatingUi_utils.evaluate(options, state);
35
- const paddingObject = floatingUi_utils.getPaddingObject(padding);
36
- const altContext = elementContext === 'floating' ? 'reference' : 'floating';
37
- const element = elements[altBoundary ? altContext : elementContext];
38
- const clippingClientRect = floatingUi_utils.rectToClientRect(await platform.getClippingRect({
39
- element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
40
- boundary,
41
- rootBoundary,
42
- strategy
43
- }));
44
- const rect = elementContext === 'floating' ? {
45
- x,
46
- y,
47
- width: rects.floating.width,
48
- height: rects.floating.height
49
- } : rects.reference;
50
- const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
51
- const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
52
- x: 1,
53
- y: 1
54
- } : {
55
- x: 1,
56
- y: 1
57
- };
58
- const elementClientRect = floatingUi_utils.rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
59
- elements,
60
- rect,
61
- offsetParent,
62
- strategy
63
- }) : rect);
64
- return {
65
- top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
66
- bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
67
- left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
68
- right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
69
- };
70
- }
71
-
72
- /**
73
- * Provides data to position an inner element of the floating element so that it
74
- * appears centered to the reference element.
75
- * @see https://floating-ui.com/docs/arrow
76
- */
77
- const arrow = options => ({
78
- name: 'arrow',
79
- options,
80
- async fn(state) {
81
- const {
82
- x,
83
- y,
84
- placement,
85
- rects,
86
- platform,
87
- elements,
88
- middlewareData
89
- } = state;
90
- // Since `element` is required, we don't Partial<> the type.
91
- const {
92
- element,
93
- padding = 0
94
- } = floatingUi_utils.evaluate(options, state) || {};
95
- if (element == null) {
96
- return {};
97
- }
98
- const paddingObject = floatingUi_utils.getPaddingObject(padding);
99
- const coords = {
100
- x,
101
- y
102
- };
103
- const axis = floatingUi_utils.getAlignmentAxis(placement);
104
- const length = floatingUi_utils.getAxisLength(axis);
105
- const arrowDimensions = await platform.getDimensions(element);
106
- const isYAxis = axis === 'y';
107
- const minProp = isYAxis ? 'top' : 'left';
108
- const maxProp = isYAxis ? 'bottom' : 'right';
109
- const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
110
- const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
111
- const startDiff = coords[axis] - rects.reference[axis];
112
- const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
113
- let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
114
-
115
- // DOM platform can return `window` as the `offsetParent`.
116
- if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
117
- clientSize = elements.floating[clientProp] || rects.floating[length];
118
- }
119
- const centerToReference = endDiff / 2 - startDiff / 2;
120
-
121
- // If the padding is large enough that it causes the arrow to no longer be
122
- // centered, modify the padding so that it is centered.
123
- const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
124
- const minPadding = floatingUi_utils.min(paddingObject[minProp], largestPossiblePadding);
125
- const maxPadding = floatingUi_utils.min(paddingObject[maxProp], largestPossiblePadding);
126
-
127
- // Make sure the arrow doesn't overflow the floating element if the center
128
- // point is outside the floating element's bounds.
129
- const min$1 = minPadding;
130
- const max = clientSize - arrowDimensions[length] - maxPadding;
131
- const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
132
- const offset = floatingUi_utils.clamp(min$1, center, max);
133
-
134
- // If the reference is small enough that the arrow's padding causes it to
135
- // to point to nothing for an aligned placement, adjust the offset of the
136
- // floating element itself. To ensure `shift()` continues to take action,
137
- // a single reset is performed when this is true.
138
- const shouldAddOffset = !middlewareData.arrow && floatingUi_utils.getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
139
- const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
140
- return {
141
- [axis]: coords[axis] + alignmentOffset,
142
- data: {
143
- [axis]: offset,
144
- centerOffset: center - offset - alignmentOffset,
145
- ...(shouldAddOffset && {
146
- alignmentOffset
147
- })
148
- },
149
- reset: shouldAddOffset
150
- };
151
- }
152
- });
153
-
154
- function getPlacementList(alignment, autoAlignment, allowedPlacements) {
155
- const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => floatingUi_utils.getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => floatingUi_utils.getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => floatingUi_utils.getSide(placement) === placement);
156
- return allowedPlacementsSortedByAlignment.filter(placement => {
157
- if (alignment) {
158
- return floatingUi_utils.getAlignment(placement) === alignment || (autoAlignment ? floatingUi_utils.getOppositeAlignmentPlacement(placement) !== placement : false);
159
- }
160
- return true;
161
- });
162
- }
163
- /**
164
- * Optimizes the visibility of the floating element by choosing the placement
165
- * that has the most space available automatically, without needing to specify a
166
- * preferred placement. Alternative to `flip`.
167
- * @see https://floating-ui.com/docs/autoPlacement
168
- */
169
- const autoPlacement = function (options) {
170
- if (options === void 0) {
171
- options = {};
172
- }
173
- return {
174
- name: 'autoPlacement',
175
- options,
176
- async fn(state) {
177
- var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
178
- const {
179
- rects,
180
- middlewareData,
181
- placement,
182
- platform,
183
- elements
184
- } = state;
185
- const {
186
- crossAxis = false,
187
- alignment,
188
- allowedPlacements = floatingUi_utils.placements,
189
- autoAlignment = true,
190
- ...detectOverflowOptions
191
- } = floatingUi_utils.evaluate(options, state);
192
- const placements$1 = alignment !== undefined || allowedPlacements === floatingUi_utils.placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
193
- const overflow = await detectOverflow(state, detectOverflowOptions);
194
- const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
195
- const currentPlacement = placements$1[currentIndex];
196
- if (currentPlacement == null) {
197
- return {};
198
- }
199
- const alignmentSides = floatingUi_utils.getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
200
-
201
- // Make `computeCoords` start from the right place.
202
- if (placement !== currentPlacement) {
203
- return {
204
- reset: {
205
- placement: placements$1[0]
206
- }
207
- };
208
- }
209
- const currentOverflows = [overflow[floatingUi_utils.getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
210
- const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
211
- placement: currentPlacement,
212
- overflows: currentOverflows
213
- }];
214
- const nextPlacement = placements$1[currentIndex + 1];
215
-
216
- // There are more placements to check.
217
- if (nextPlacement) {
218
- return {
219
- data: {
220
- index: currentIndex + 1,
221
- overflows: allOverflows
222
- },
223
- reset: {
224
- placement: nextPlacement
225
- }
226
- };
227
- }
228
- const placementsSortedByMostSpace = allOverflows.map(d => {
229
- const alignment = floatingUi_utils.getAlignment(d.placement);
230
- return [d.placement, alignment && crossAxis ?
231
- // Check along the mainAxis and main crossAxis side.
232
- d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
233
- // Check only the mainAxis.
234
- d.overflows[0], d.overflows];
235
- }).sort((a, b) => a[1] - b[1]);
236
- const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
237
- // Aligned placements should not check their opposite crossAxis
238
- // side.
239
- floatingUi_utils.getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
240
- const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
241
- if (resetPlacement !== placement) {
242
- return {
243
- data: {
244
- index: currentIndex + 1,
245
- overflows: allOverflows
246
- },
247
- reset: {
248
- placement: resetPlacement
249
- }
250
- };
251
- }
252
- return {};
253
- }
254
- };
255
- };
256
-
257
- /**
258
- * Optimizes the visibility of the floating element by flipping the `placement`
259
- * in order to keep it in view when the preferred placement(s) will overflow the
260
- * clipping boundary. Alternative to `autoPlacement`.
261
- * @see https://floating-ui.com/docs/flip
262
- */
263
- const flip = function (options) {
264
- if (options === void 0) {
265
- options = {};
266
- }
267
- return {
268
- name: 'flip',
269
- options,
270
- async fn(state) {
271
- var _middlewareData$arrow, _middlewareData$flip;
272
- const {
273
- placement,
274
- middlewareData,
275
- rects,
276
- initialPlacement,
277
- platform,
278
- elements
279
- } = state;
280
- const {
281
- mainAxis: checkMainAxis = true,
282
- crossAxis: checkCrossAxis = true,
283
- fallbackPlacements: specifiedFallbackPlacements,
284
- fallbackStrategy = 'bestFit',
285
- fallbackAxisSideDirection = 'none',
286
- flipAlignment = true,
287
- ...detectOverflowOptions
288
- } = floatingUi_utils.evaluate(options, state);
289
-
290
- // If a reset by the arrow was caused due to an alignment offset being
291
- // added, we should skip any logic now since `flip()` has already done its
292
- // work.
293
- // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
294
- if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
295
- return {};
296
- }
297
- const side = floatingUi_utils.getSide(placement);
298
- const initialSideAxis = floatingUi_utils.getSideAxis(initialPlacement);
299
- const isBasePlacement = floatingUi_utils.getSide(initialPlacement) === initialPlacement;
300
- const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
301
- const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [floatingUi_utils.getOppositePlacement(initialPlacement)] : floatingUi_utils.getExpandedPlacements(initialPlacement));
302
- const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
303
- if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
304
- fallbackPlacements.push(...floatingUi_utils.getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
305
- }
306
- const placements = [initialPlacement, ...fallbackPlacements];
307
- const overflow = await detectOverflow(state, detectOverflowOptions);
308
- const overflows = [];
309
- let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
310
- if (checkMainAxis) {
311
- overflows.push(overflow[side]);
312
- }
313
- if (checkCrossAxis) {
314
- const sides = floatingUi_utils.getAlignmentSides(placement, rects, rtl);
315
- overflows.push(overflow[sides[0]], overflow[sides[1]]);
316
- }
317
- overflowsData = [...overflowsData, {
318
- placement,
319
- overflows
320
- }];
321
-
322
- // One or more sides is overflowing.
323
- if (!overflows.every(side => side <= 0)) {
324
- var _middlewareData$flip2, _overflowsData$filter;
325
- const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
326
- const nextPlacement = placements[nextIndex];
327
- if (nextPlacement) {
328
- const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== floatingUi_utils.getSideAxis(nextPlacement) : false;
329
- if (!ignoreCrossAxisOverflow ||
330
- // We leave the current main axis only if every placement on that axis
331
- // overflows the main axis.
332
- overflowsData.every(d => floatingUi_utils.getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
333
- // Try next placement and re-run the lifecycle.
334
- return {
335
- data: {
336
- index: nextIndex,
337
- overflows: overflowsData
338
- },
339
- reset: {
340
- placement: nextPlacement
341
- }
342
- };
343
- }
344
- }
345
-
346
- // First, find the candidates that fit on the mainAxis side of overflow,
347
- // then find the placement that fits the best on the main crossAxis side.
348
- let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
349
-
350
- // Otherwise fallback.
351
- if (!resetPlacement) {
352
- switch (fallbackStrategy) {
353
- case 'bestFit':
354
- {
355
- var _overflowsData$filter2;
356
- const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
357
- if (hasFallbackAxisSideDirection) {
358
- const currentSideAxis = floatingUi_utils.getSideAxis(d.placement);
359
- return currentSideAxis === initialSideAxis ||
360
- // Create a bias to the `y` side axis due to horizontal
361
- // reading directions favoring greater width.
362
- currentSideAxis === 'y';
363
- }
364
- return true;
365
- }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
366
- if (placement) {
367
- resetPlacement = placement;
368
- }
369
- break;
370
- }
371
- case 'initialPlacement':
372
- resetPlacement = initialPlacement;
373
- break;
374
- }
375
- }
376
- if (placement !== resetPlacement) {
377
- return {
378
- reset: {
379
- placement: resetPlacement
380
- }
381
- };
382
- }
383
- }
384
- return {};
385
- }
386
- };
387
- };
388
-
389
- function getSideOffsets(overflow, rect) {
390
- return {
391
- top: overflow.top - rect.height,
392
- right: overflow.right - rect.width,
393
- bottom: overflow.bottom - rect.height,
394
- left: overflow.left - rect.width
395
- };
396
- }
397
- function isAnySideFullyClipped(overflow) {
398
- return floatingUi_utils.sides.some(side => overflow[side] >= 0);
399
- }
400
- /**
401
- * Provides data to hide the floating element in applicable situations, such as
402
- * when it is not in the same clipping context as the reference element.
403
- * @see https://floating-ui.com/docs/hide
404
- */
405
- const hide = function (options) {
406
- if (options === void 0) {
407
- options = {};
408
- }
409
- return {
410
- name: 'hide',
411
- options,
412
- async fn(state) {
413
- const {
414
- rects
415
- } = state;
416
- const {
417
- strategy = 'referenceHidden',
418
- ...detectOverflowOptions
419
- } = floatingUi_utils.evaluate(options, state);
420
- switch (strategy) {
421
- case 'referenceHidden':
422
- {
423
- const overflow = await detectOverflow(state, {
424
- ...detectOverflowOptions,
425
- elementContext: 'reference'
426
- });
427
- const offsets = getSideOffsets(overflow, rects.reference);
428
- return {
429
- data: {
430
- referenceHiddenOffsets: offsets,
431
- referenceHidden: isAnySideFullyClipped(offsets)
432
- }
433
- };
434
- }
435
- case 'escaped':
436
- {
437
- const overflow = await detectOverflow(state, {
438
- ...detectOverflowOptions,
439
- altBoundary: true
440
- });
441
- const offsets = getSideOffsets(overflow, rects.floating);
442
- return {
443
- data: {
444
- escapedOffsets: offsets,
445
- escaped: isAnySideFullyClipped(offsets)
446
- }
447
- };
448
- }
449
- default:
450
- {
451
- return {};
452
- }
453
- }
454
- }
455
- };
456
- };
457
-
458
- function getBoundingRect(rects) {
459
- const minX = floatingUi_utils.min(...rects.map(rect => rect.left));
460
- const minY = floatingUi_utils.min(...rects.map(rect => rect.top));
461
- const maxX = floatingUi_utils.max(...rects.map(rect => rect.right));
462
- const maxY = floatingUi_utils.max(...rects.map(rect => rect.bottom));
463
- return {
464
- x: minX,
465
- y: minY,
466
- width: maxX - minX,
467
- height: maxY - minY
468
- };
469
- }
470
- function getRectsByLine(rects) {
471
- const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
472
- const groups = [];
473
- let prevRect = null;
474
- for (let i = 0; i < sortedRects.length; i++) {
475
- const rect = sortedRects[i];
476
- if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
477
- groups.push([rect]);
478
- } else {
479
- groups[groups.length - 1].push(rect);
480
- }
481
- prevRect = rect;
482
- }
483
- return groups.map(rect => floatingUi_utils.rectToClientRect(getBoundingRect(rect)));
484
- }
485
- /**
486
- * Provides improved positioning for inline reference elements that can span
487
- * over multiple lines, such as hyperlinks or range selections.
488
- * @see https://floating-ui.com/docs/inline
489
- */
490
- const inline = function (options) {
491
- if (options === void 0) {
492
- options = {};
493
- }
494
- return {
495
- name: 'inline',
496
- options,
497
- async fn(state) {
498
- const {
499
- placement,
500
- elements,
501
- rects,
502
- platform,
503
- strategy
504
- } = state;
505
- // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
506
- // ClientRect's bounds, despite the event listener being triggered. A
507
- // padding of 2 seems to handle this issue.
508
- const {
509
- padding = 2,
510
- x,
511
- y
512
- } = floatingUi_utils.evaluate(options, state);
513
- const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
514
- const clientRects = getRectsByLine(nativeClientRects);
515
- const fallback = floatingUi_utils.rectToClientRect(getBoundingRect(nativeClientRects));
516
- const paddingObject = floatingUi_utils.getPaddingObject(padding);
517
- function getBoundingClientRect() {
518
- // There are two rects and they are disjoined.
519
- if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
520
- // Find the first rect in which the point is fully inside.
521
- return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
522
- }
523
-
524
- // There are 2 or more connected rects.
525
- if (clientRects.length >= 2) {
526
- if (floatingUi_utils.getSideAxis(placement) === 'y') {
527
- const firstRect = clientRects[0];
528
- const lastRect = clientRects[clientRects.length - 1];
529
- const isTop = floatingUi_utils.getSide(placement) === 'top';
530
- const top = firstRect.top;
531
- const bottom = lastRect.bottom;
532
- const left = isTop ? firstRect.left : lastRect.left;
533
- const right = isTop ? firstRect.right : lastRect.right;
534
- const width = right - left;
535
- const height = bottom - top;
536
- return {
537
- top,
538
- bottom,
539
- left,
540
- right,
541
- width,
542
- height,
543
- x: left,
544
- y: top
545
- };
546
- }
547
- const isLeftSide = floatingUi_utils.getSide(placement) === 'left';
548
- const maxRight = floatingUi_utils.max(...clientRects.map(rect => rect.right));
549
- const minLeft = floatingUi_utils.min(...clientRects.map(rect => rect.left));
550
- const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
551
- const top = measureRects[0].top;
552
- const bottom = measureRects[measureRects.length - 1].bottom;
553
- const left = minLeft;
554
- const right = maxRight;
555
- const width = right - left;
556
- const height = bottom - top;
557
- return {
558
- top,
559
- bottom,
560
- left,
561
- right,
562
- width,
563
- height,
564
- x: left,
565
- y: top
566
- };
567
- }
568
- return fallback;
569
- }
570
- const resetRects = await platform.getElementRects({
571
- reference: {
572
- getBoundingClientRect
573
- },
574
- floating: elements.floating,
575
- strategy
576
- });
577
- if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
578
- return {
579
- reset: {
580
- rects: resetRects
581
- }
582
- };
583
- }
584
- return {};
585
- }
586
- };
587
- };
588
-
589
- const originSides = /*#__PURE__*/new Set(['left', 'top']);
590
-
591
- // For type backwards-compatibility, the `OffsetOptions` type was also
592
- // Derivable.
593
-
594
- async function convertValueToCoords(state, options) {
595
- const {
596
- placement,
597
- platform,
598
- elements
599
- } = state;
600
- const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
601
- const side = floatingUi_utils.getSide(placement);
602
- const alignment = floatingUi_utils.getAlignment(placement);
603
- const isVertical = floatingUi_utils.getSideAxis(placement) === 'y';
604
- const mainAxisMulti = originSides.has(side) ? -1 : 1;
605
- const crossAxisMulti = rtl && isVertical ? -1 : 1;
606
- const rawValue = floatingUi_utils.evaluate(options, state);
607
-
608
- // eslint-disable-next-line prefer-const
609
- let {
610
- mainAxis,
611
- crossAxis,
612
- alignmentAxis
613
- } = typeof rawValue === 'number' ? {
614
- mainAxis: rawValue,
615
- crossAxis: 0,
616
- alignmentAxis: null
617
- } : {
618
- mainAxis: rawValue.mainAxis || 0,
619
- crossAxis: rawValue.crossAxis || 0,
620
- alignmentAxis: rawValue.alignmentAxis
621
- };
622
- if (alignment && typeof alignmentAxis === 'number') {
623
- crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
624
- }
625
- return isVertical ? {
626
- x: crossAxis * crossAxisMulti,
627
- y: mainAxis * mainAxisMulti
628
- } : {
629
- x: mainAxis * mainAxisMulti,
630
- y: crossAxis * crossAxisMulti
631
- };
632
- }
633
-
634
- /**
635
- * Modifies the placement by translating the floating element along the
636
- * specified axes.
637
- * A number (shorthand for `mainAxis` or distance), or an axes configuration
638
- * object may be passed.
639
- * @see https://floating-ui.com/docs/offset
640
- */
641
- const offset = function (options) {
642
- if (options === void 0) {
643
- options = 0;
644
- }
645
- return {
646
- name: 'offset',
647
- options,
648
- async fn(state) {
649
- var _middlewareData$offse, _middlewareData$arrow;
650
- const {
651
- x,
652
- y,
653
- placement,
654
- middlewareData
655
- } = state;
656
- const diffCoords = await convertValueToCoords(state, options);
657
-
658
- // If the placement is the same and the arrow caused an alignment offset
659
- // then we don't need to change the positioning coordinates.
660
- if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
661
- return {};
662
- }
663
- return {
664
- x: x + diffCoords.x,
665
- y: y + diffCoords.y,
666
- data: {
667
- ...diffCoords,
668
- placement
669
- }
670
- };
671
- }
672
- };
673
- };
674
-
675
- /**
676
- * Optimizes the visibility of the floating element by shifting it in order to
677
- * keep it in view when it will overflow the clipping boundary.
678
- * @see https://floating-ui.com/docs/shift
679
- */
680
- const shift = function (options) {
681
- if (options === void 0) {
682
- options = {};
683
- }
684
- return {
685
- name: 'shift',
686
- options,
687
- async fn(state) {
688
- const {
689
- x,
690
- y,
691
- placement
692
- } = state;
693
- const {
694
- mainAxis: checkMainAxis = true,
695
- crossAxis: checkCrossAxis = false,
696
- limiter = {
697
- fn: _ref => {
698
- let {
699
- x,
700
- y
701
- } = _ref;
702
- return {
703
- x,
704
- y
705
- };
706
- }
707
- },
708
- ...detectOverflowOptions
709
- } = floatingUi_utils.evaluate(options, state);
710
- const coords = {
711
- x,
712
- y
713
- };
714
- const overflow = await detectOverflow(state, detectOverflowOptions);
715
- const crossAxis = floatingUi_utils.getSideAxis(floatingUi_utils.getSide(placement));
716
- const mainAxis = floatingUi_utils.getOppositeAxis(crossAxis);
717
- let mainAxisCoord = coords[mainAxis];
718
- let crossAxisCoord = coords[crossAxis];
719
- if (checkMainAxis) {
720
- const minSide = mainAxis === 'y' ? 'top' : 'left';
721
- const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
722
- const min = mainAxisCoord + overflow[minSide];
723
- const max = mainAxisCoord - overflow[maxSide];
724
- mainAxisCoord = floatingUi_utils.clamp(min, mainAxisCoord, max);
725
- }
726
- if (checkCrossAxis) {
727
- const minSide = crossAxis === 'y' ? 'top' : 'left';
728
- const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
729
- const min = crossAxisCoord + overflow[minSide];
730
- const max = crossAxisCoord - overflow[maxSide];
731
- crossAxisCoord = floatingUi_utils.clamp(min, crossAxisCoord, max);
732
- }
733
- const limitedCoords = limiter.fn({
734
- ...state,
735
- [mainAxis]: mainAxisCoord,
736
- [crossAxis]: crossAxisCoord
737
- });
738
- return {
739
- ...limitedCoords,
740
- data: {
741
- x: limitedCoords.x - x,
742
- y: limitedCoords.y - y,
743
- enabled: {
744
- [mainAxis]: checkMainAxis,
745
- [crossAxis]: checkCrossAxis
746
- }
747
- }
748
- };
749
- }
750
- };
751
- };
752
- /**
753
- * Built-in `limiter` that will stop `shift()` at a certain point.
754
- */
755
- const limitShift = function (options) {
756
- if (options === void 0) {
757
- options = {};
758
- }
759
- return {
760
- options,
761
- fn(state) {
762
- const {
763
- x,
764
- y,
765
- placement,
766
- rects,
767
- middlewareData
768
- } = state;
769
- const {
770
- offset = 0,
771
- mainAxis: checkMainAxis = true,
772
- crossAxis: checkCrossAxis = true
773
- } = floatingUi_utils.evaluate(options, state);
774
- const coords = {
775
- x,
776
- y
777
- };
778
- const crossAxis = floatingUi_utils.getSideAxis(placement);
779
- const mainAxis = floatingUi_utils.getOppositeAxis(crossAxis);
780
- let mainAxisCoord = coords[mainAxis];
781
- let crossAxisCoord = coords[crossAxis];
782
- const rawOffset = floatingUi_utils.evaluate(offset, state);
783
- const computedOffset = typeof rawOffset === 'number' ? {
784
- mainAxis: rawOffset,
785
- crossAxis: 0
786
- } : {
787
- mainAxis: 0,
788
- crossAxis: 0,
789
- ...rawOffset
790
- };
791
- if (checkMainAxis) {
792
- const len = mainAxis === 'y' ? 'height' : 'width';
793
- const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
794
- const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
795
- if (mainAxisCoord < limitMin) {
796
- mainAxisCoord = limitMin;
797
- } else if (mainAxisCoord > limitMax) {
798
- mainAxisCoord = limitMax;
799
- }
800
- }
801
- if (checkCrossAxis) {
802
- var _middlewareData$offse, _middlewareData$offse2;
803
- const len = mainAxis === 'y' ? 'width' : 'height';
804
- const isOriginSide = originSides.has(floatingUi_utils.getSide(placement));
805
- const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
806
- const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
807
- if (crossAxisCoord < limitMin) {
808
- crossAxisCoord = limitMin;
809
- } else if (crossAxisCoord > limitMax) {
810
- crossAxisCoord = limitMax;
811
- }
812
- }
813
- return {
814
- [mainAxis]: mainAxisCoord,
815
- [crossAxis]: crossAxisCoord
816
- };
817
- }
818
- };
819
- };
820
-
821
- /**
822
- * Provides data that allows you to change the size of the floating element —
823
- * for instance, prevent it from overflowing the clipping boundary or match the
824
- * width of the reference element.
825
- * @see https://floating-ui.com/docs/size
826
- */
827
- const size = function (options) {
828
- if (options === void 0) {
829
- options = {};
830
- }
831
- return {
832
- name: 'size',
833
- options,
834
- async fn(state) {
835
- var _state$middlewareData, _state$middlewareData2;
836
- const {
837
- placement,
838
- rects,
839
- platform,
840
- elements
841
- } = state;
842
- const {
843
- apply = () => {},
844
- ...detectOverflowOptions
845
- } = floatingUi_utils.evaluate(options, state);
846
- const overflow = await detectOverflow(state, detectOverflowOptions);
847
- const side = floatingUi_utils.getSide(placement);
848
- const alignment = floatingUi_utils.getAlignment(placement);
849
- const isYAxis = floatingUi_utils.getSideAxis(placement) === 'y';
850
- const {
851
- width,
852
- height
853
- } = rects.floating;
854
- let heightSide;
855
- let widthSide;
856
- if (side === 'top' || side === 'bottom') {
857
- heightSide = side;
858
- widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
859
- } else {
860
- widthSide = side;
861
- heightSide = alignment === 'end' ? 'top' : 'bottom';
862
- }
863
- const maximumClippingHeight = height - overflow.top - overflow.bottom;
864
- const maximumClippingWidth = width - overflow.left - overflow.right;
865
- const overflowAvailableHeight = floatingUi_utils.min(height - overflow[heightSide], maximumClippingHeight);
866
- const overflowAvailableWidth = floatingUi_utils.min(width - overflow[widthSide], maximumClippingWidth);
867
- const noShift = !state.middlewareData.shift;
868
- let availableHeight = overflowAvailableHeight;
869
- let availableWidth = overflowAvailableWidth;
870
- if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
871
- availableWidth = maximumClippingWidth;
872
- }
873
- if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
874
- availableHeight = maximumClippingHeight;
875
- }
876
- if (noShift && !alignment) {
877
- const xMin = floatingUi_utils.max(overflow.left, 0);
878
- const xMax = floatingUi_utils.max(overflow.right, 0);
879
- const yMin = floatingUi_utils.max(overflow.top, 0);
880
- const yMax = floatingUi_utils.max(overflow.bottom, 0);
881
- if (isYAxis) {
882
- availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : floatingUi_utils.max(overflow.left, overflow.right));
883
- } else {
884
- availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : floatingUi_utils.max(overflow.top, overflow.bottom));
885
- }
886
- }
887
- await apply({
888
- ...state,
889
- availableWidth,
890
- availableHeight
891
- });
892
- const nextDimensions = await platform.getDimensions(elements.floating);
893
- if (width !== nextDimensions.width || height !== nextDimensions.height) {
894
- return {
895
- reset: {
896
- rects: true
897
- }
898
- };
899
- }
900
- return {};
901
- }
902
- };
903
- };
904
-
905
- exports.rectToClientRect = floatingUi_utils.rectToClientRect;
906
- exports.arrow = arrow;
907
- exports.autoPlacement = autoPlacement;
908
- exports.detectOverflow = detectOverflow;
909
- exports.flip = flip;
910
- exports.hide = hide;
911
- exports.inline = inline;
912
- exports.limitShift = limitShift;
913
- exports.offset = offset;
914
- exports.shift = shift;
915
- exports.size = size;