@ceed/cds 0.0.186 → 0.0.187-cjs.0

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 (259) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +33 -0
  2. package/dist/_virtual/bind-all.js +5 -0
  3. package/dist/_virtual/bind.js +5 -0
  4. package/dist/_virtual/colorManipulator.js +7 -0
  5. package/dist/_virtual/colorManipulator2.js +5 -0
  6. package/dist/_virtual/createStyled.js +9 -0
  7. package/dist/_virtual/createStyled2.js +5 -0
  8. package/dist/_virtual/extends.js +5 -0
  9. package/dist/_virtual/index.js +7 -0
  10. package/dist/_virtual/index10.js +8 -0
  11. package/dist/_virtual/index11.js +12 -0
  12. package/dist/_virtual/index12.js +12 -0
  13. package/dist/_virtual/index2.js +5 -0
  14. package/dist/_virtual/index3.js +9 -0
  15. package/dist/_virtual/index4.js +5 -0
  16. package/dist/_virtual/index5.js +8 -0
  17. package/dist/_virtual/index6.js +8 -0
  18. package/dist/_virtual/index7.js +12 -0
  19. package/dist/_virtual/index8.js +8 -0
  20. package/dist/_virtual/index9.js +8 -0
  21. package/dist/_virtual/interopRequireDefault.js +5 -0
  22. package/dist/_virtual/objectWithoutPropertiesLoose.js +5 -0
  23. package/dist/components/Accordions/Accordions.js +48 -0
  24. package/dist/components/Autocomplete/Autocomplete.js +198 -0
  25. package/dist/components/Autocomplete/index.js +10 -0
  26. package/dist/components/Avatar/Avatar.js +47 -0
  27. package/dist/components/Box/Box.js +10 -0
  28. package/dist/components/Box/index.js +10 -0
  29. package/dist/components/Breadcrumbs/Breadcrumbs.js +49 -0
  30. package/dist/components/Button/Button.js +22 -0
  31. package/dist/components/Button/index.js +10 -0
  32. package/dist/components/Calendar/Calendar.js +335 -0
  33. package/dist/components/Calendar/hooks/use-calendar-props.js +76 -0
  34. package/dist/components/Calendar/hooks/use-calendar.js +249 -0
  35. package/dist/components/Calendar/index.js +10 -0
  36. package/dist/components/Calendar/utils/index.js +84 -0
  37. package/dist/components/Card/Card.js +26 -0
  38. package/dist/components/Checkbox/Checkbox.js +21 -0
  39. package/dist/components/Checkbox/index.js +10 -0
  40. package/dist/components/Chip/Chip.js +10 -0
  41. package/dist/components/Chip/index.js +10 -0
  42. package/dist/components/Container/Container.js +51 -0
  43. package/dist/components/CurrencyInput/CurrencyInput.js +93 -0
  44. package/dist/components/CurrencyInput/hooks/use-currency-setting.js +169 -0
  45. package/dist/components/CurrencyInput/index.js +10 -0
  46. package/dist/components/DataTable/DataTable.js +570 -0
  47. package/dist/components/DatePicker/DatePicker.js +212 -0
  48. package/dist/components/DatePicker/index.js +10 -0
  49. package/dist/components/DateRangePicker/DateRangePicker.js +215 -0
  50. package/dist/components/DialogActions/DialogActions.js +16 -0
  51. package/dist/components/DialogActions/index.js +10 -0
  52. package/dist/components/DialogContent/DialogContent.js +13 -0
  53. package/dist/components/DialogContent/index.js +10 -0
  54. package/dist/components/DialogFrame/DialogFrame.js +33 -0
  55. package/dist/components/DialogTitle/DialogTitle.js +13 -0
  56. package/dist/components/DialogTitle/index.js +10 -0
  57. package/dist/components/Divider/Divider.js +21 -0
  58. package/dist/components/Drawer/Drawer.js +42 -0
  59. package/dist/components/Dropdown/Dropdown.js +10 -0
  60. package/dist/components/Dropdown/index.js +10 -0
  61. package/dist/components/FormControl/FormControl.js +17 -0
  62. package/dist/components/FormControl/index.js +10 -0
  63. package/dist/components/FormHelperText/FormHelperText.js +10 -0
  64. package/dist/components/FormHelperText/index.js +10 -0
  65. package/dist/components/FormLabel/FormLabel.js +10 -0
  66. package/dist/components/FormLabel/index.js +10 -0
  67. package/dist/components/IconButton/IconButton.js +22 -0
  68. package/dist/components/IconButton/index.js +10 -0
  69. package/dist/components/Input/Input.js +62 -0
  70. package/dist/components/Input/index.js +10 -0
  71. package/dist/components/InsetDrawer/InsetDrawer.js +32 -0
  72. package/dist/components/Markdown/Markdown.d.ts +6 -22
  73. package/dist/components/Markdown/Markdown.js +86 -0
  74. package/dist/components/Menu/Menu.js +46 -0
  75. package/dist/components/Menu/index.js +11 -0
  76. package/dist/components/MenuButton/MenuButton.d.ts +1 -1
  77. package/dist/components/MenuButton/MenuButton.js +28 -0
  78. package/dist/components/Modal/Modal.js +49 -0
  79. package/dist/components/MonthPicker/MonthPicker.js +164 -0
  80. package/dist/components/MonthRangePicker/MonthRangePicker.js +174 -0
  81. package/dist/components/NavigationGroup/NavigationGroup.js +44 -0
  82. package/dist/components/NavigationItem/NavigationItem.js +47 -0
  83. package/dist/components/Navigator/Navigator.js +32 -0
  84. package/dist/components/Pagination/Pagination.js +119 -0
  85. package/dist/components/Pagination/index.js +10 -0
  86. package/dist/components/PercentageInput/PercentageInput.js +87 -0
  87. package/dist/components/Radio/Radio.js +14 -0
  88. package/dist/components/RadioList/RadioList.js +20 -0
  89. package/dist/components/Select/Select.js +59 -0
  90. package/dist/components/Select/index.js +11 -0
  91. package/dist/components/Sheet/Sheet.js +10 -0
  92. package/dist/components/Sheet/index.js +10 -0
  93. package/dist/components/Stack/index.js +16 -0
  94. package/dist/components/Stepper/Stepper.js +70 -0
  95. package/dist/components/Switch/Switch.js +48 -0
  96. package/dist/components/Table/Table.js +68 -0
  97. package/dist/components/Tabs/Tabs.js +22 -0
  98. package/dist/components/Textarea/Textarea.d.ts +3 -17
  99. package/dist/components/Textarea/Textarea.js +33 -0
  100. package/dist/components/Textarea/index.js +10 -0
  101. package/dist/components/ThemeProvider/ThemeProvider.js +250 -0
  102. package/dist/components/Tooltip/Tooltip.js +21 -0
  103. package/dist/components/Tooltip/index.js +10 -0
  104. package/dist/components/Typography/Typography.js +21 -0
  105. package/dist/components/Typography/index.js +10 -0
  106. package/dist/components/Uploader/Uploader.d.ts +1 -1
  107. package/dist/components/Uploader/Uploader.js +366 -0
  108. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter-native-data-key.js +10 -0
  109. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/external-adapter.js +251 -0
  110. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/get-element-from-point-without-honey-pot.js +21 -0
  111. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/honey-pot-data-attribute.js +7 -0
  112. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/is-honey-pot-element.js +9 -0
  113. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js +130 -0
  114. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/lifecycle-manager.js +342 -0
  115. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/usage-ledger.js +35 -0
  116. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-adapter.js +62 -0
  117. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-drop-target.js +314 -0
  118. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-monitor.js +98 -0
  119. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/combine.js +15 -0
  120. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/external/file.js +26 -0
  121. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/once.js +20 -0
  122. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/prevent-unhandled.js +104 -0
  123. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/add-attribute.js +12 -0
  124. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/android.js +5 -0
  125. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js +126 -0
  126. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-entering-window.js +57 -0
  127. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-from-another-window.js +20 -0
  128. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-leaving-window.js +57 -0
  129. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/detect-broken-drag.js +51 -0
  130. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/get-input.js +18 -0
  131. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-firefox.js +17 -0
  132. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-safari.js +20 -0
  133. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/text-media-type.js +10 -0
  134. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayLikeToArray.js +9 -0
  135. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayWithHoles.js +7 -0
  136. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayWithoutHoles.js +9 -0
  137. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/defineProperty.js +20 -0
  138. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/iterableToArray.js +7 -0
  139. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/iterableToArrayLimit.js +28 -0
  140. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/nonIterableRest.js +7 -0
  141. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/nonIterableSpread.js +7 -0
  142. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/slicedToArray.js +12 -0
  143. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toConsumableArray.js +12 -0
  144. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toPrimitive.js +16 -0
  145. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toPropertyKey.js +11 -0
  146. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/typeof.js +13 -0
  147. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +14 -0
  148. package/dist/external/@babel/runtime/helpers/esm/extends.js +18 -0
  149. package/dist/external/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +16 -0
  150. package/dist/external/@babel/runtime/helpers/extends.js +30 -0
  151. package/dist/external/@babel/runtime/helpers/interopRequireDefault.js +21 -0
  152. package/dist/external/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +28 -0
  153. package/dist/external/@emotion/cache/dist/emotion-cache.esm.js +655 -0
  154. package/dist/external/@emotion/memoize/dist/emotion-memoize.esm.js +11 -0
  155. package/dist/external/@emotion/sheet/dist/emotion-sheet.esm.js +156 -0
  156. package/dist/external/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +18 -0
  157. package/dist/external/@mui/icons-material/esm/ArrowUpwardRounded.js +10 -0
  158. package/dist/external/@mui/icons-material/esm/CalendarToday.js +10 -0
  159. package/dist/external/@mui/icons-material/esm/Check.js +10 -0
  160. package/dist/external/@mui/icons-material/esm/ChevronLeft.js +10 -0
  161. package/dist/external/@mui/icons-material/esm/ChevronRight.js +10 -0
  162. package/dist/external/@mui/icons-material/esm/ClearRounded.js +10 -0
  163. package/dist/external/@mui/icons-material/esm/Close.js +10 -0
  164. package/dist/external/@mui/icons-material/esm/CloudUploadRounded.js +10 -0
  165. package/dist/external/@mui/icons-material/esm/ExpandMore.js +10 -0
  166. package/dist/external/@mui/icons-material/esm/Info.js +10 -0
  167. package/dist/external/@mui/icons-material/esm/UploadFileRounded.js +10 -0
  168. package/dist/external/@mui/material/SvgIcon/SvgIcon.js +207 -0
  169. package/dist/external/@mui/material/SvgIcon/svgIconClasses.js +11 -0
  170. package/dist/external/@mui/material/colors/blue.js +20 -0
  171. package/dist/external/@mui/material/colors/common.js +8 -0
  172. package/dist/external/@mui/material/colors/green.js +20 -0
  173. package/dist/external/@mui/material/colors/grey.js +20 -0
  174. package/dist/external/@mui/material/colors/lightBlue.js +20 -0
  175. package/dist/external/@mui/material/colors/orange.js +20 -0
  176. package/dist/external/@mui/material/colors/purple.js +20 -0
  177. package/dist/external/@mui/material/colors/red.js +20 -0
  178. package/dist/external/@mui/material/styles/createMixins.js +21 -0
  179. package/dist/external/@mui/material/styles/createPalette.js +314 -0
  180. package/dist/external/@mui/material/styles/createTheme.js +84 -0
  181. package/dist/external/@mui/material/styles/createTransitions.js +97 -0
  182. package/dist/external/@mui/material/styles/createTypography.js +95 -0
  183. package/dist/external/@mui/material/styles/defaultTheme.js +7 -0
  184. package/dist/external/@mui/material/styles/identifier.js +5 -0
  185. package/dist/external/@mui/material/styles/rootShouldForwardProp.js +7 -0
  186. package/dist/external/@mui/material/styles/shadows.js +13 -0
  187. package/dist/external/@mui/material/styles/slotShouldForwardProp.js +8 -0
  188. package/dist/external/@mui/material/styles/styled.js +17 -0
  189. package/dist/external/@mui/material/styles/useThemeProps.js +19 -0
  190. package/dist/external/@mui/material/styles/zIndex.js +16 -0
  191. package/dist/external/@mui/material/utils/capitalize.js +7 -0
  192. package/dist/external/@mui/material/utils/createSvgIcon.js +45 -0
  193. package/dist/external/@mui/styled-engine/GlobalStyles/GlobalStyles.js +26 -0
  194. package/dist/external/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js +39 -0
  195. package/dist/external/@mui/styled-engine/index.js +57 -0
  196. package/dist/external/@mui/system/colorManipulator.js +387 -0
  197. package/dist/external/@mui/system/createStyled.js +272 -0
  198. package/dist/external/@mui/system/esm/borders.js +66 -0
  199. package/dist/external/@mui/system/esm/breakpoints.js +71 -0
  200. package/dist/external/@mui/system/esm/compose.js +28 -0
  201. package/dist/external/@mui/system/esm/createTheme/applyStyles.js +78 -0
  202. package/dist/external/@mui/system/esm/createTheme/createBreakpoints.js +84 -0
  203. package/dist/external/@mui/system/esm/createTheme/createSpacing.js +36 -0
  204. package/dist/external/@mui/system/esm/createTheme/createTheme.js +47 -0
  205. package/dist/external/@mui/system/esm/createTheme/index.js +13 -0
  206. package/dist/external/@mui/system/esm/createTheme/shape.js +7 -0
  207. package/dist/external/@mui/system/esm/cssGrid.js +99 -0
  208. package/dist/external/@mui/system/esm/memoize.js +13 -0
  209. package/dist/external/@mui/system/esm/merge.js +14 -0
  210. package/dist/external/@mui/system/esm/palette.js +33 -0
  211. package/dist/external/@mui/system/esm/responsivePropType.js +7 -0
  212. package/dist/external/@mui/system/esm/sizing.js +76 -0
  213. package/dist/external/@mui/system/esm/spacing.js +153 -0
  214. package/dist/external/@mui/system/esm/style.js +83 -0
  215. package/dist/external/@mui/system/esm/styleFunctionSx/defaultSxConfig.js +295 -0
  216. package/dist/external/@mui/system/esm/styleFunctionSx/extendSxProp.js +53 -0
  217. package/dist/external/@mui/system/esm/styleFunctionSx/index.js +14 -0
  218. package/dist/external/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +134 -0
  219. package/dist/external/@mui/system/esm/useTheme.js +14 -0
  220. package/dist/external/@mui/system/esm/useThemeProps/getThemeProps.js +17 -0
  221. package/dist/external/@mui/system/esm/useThemeProps/useThemeProps.js +24 -0
  222. package/dist/external/@mui/system/esm/useThemeWithoutDefault.js +33 -0
  223. package/dist/external/@mui/utils/ClassNameGenerator/ClassNameGenerator.js +20 -0
  224. package/dist/external/@mui/utils/capitalize/capitalize.js +16 -0
  225. package/dist/external/@mui/utils/capitalize/index.js +7 -0
  226. package/dist/external/@mui/utils/clamp/clamp.js +7 -0
  227. package/dist/external/@mui/utils/clamp/index.js +7 -0
  228. package/dist/external/@mui/utils/composeClasses/composeClasses.js +25 -0
  229. package/dist/external/@mui/utils/deepmerge/deepmerge.js +49 -0
  230. package/dist/external/@mui/utils/deepmerge/index.js +10 -0
  231. package/dist/external/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js +23 -0
  232. package/dist/external/@mui/utils/formatMuiErrorMessage/index.js +7 -0
  233. package/dist/external/@mui/utils/generateUtilityClass/generateUtilityClass.js +27 -0
  234. package/dist/external/@mui/utils/generateUtilityClasses/generateUtilityClasses.js +13 -0
  235. package/dist/external/@mui/utils/getDisplayName/getDisplayName.js +54 -0
  236. package/dist/external/@mui/utils/getDisplayName/index.js +10 -0
  237. package/dist/external/@mui/utils/resolveProps/resolveProps.js +39 -0
  238. package/dist/external/bind-event-listener/dist/bind-all.js +56 -0
  239. package/dist/external/bind-event-listener/dist/bind.js +23 -0
  240. package/dist/external/bind-event-listener/dist/index.js +23 -0
  241. package/dist/external/clsx/dist/clsx.js +8 -0
  242. package/dist/external/object-assign/index.js +101 -0
  243. package/dist/external/prop-types/checkPropTypes.js +117 -0
  244. package/dist/external/prop-types/factoryWithThrowingShims.js +76 -0
  245. package/dist/external/prop-types/factoryWithTypeCheckers.js +627 -0
  246. package/dist/external/prop-types/index.js +35 -0
  247. package/dist/external/prop-types/lib/ReactPropTypesSecret.js +23 -0
  248. package/dist/external/prop-types/lib/has.js +13 -0
  249. package/dist/external/raf-schd/dist/raf-schd.esm.js +36 -0
  250. package/dist/external/stylis/src/Enum.js +22 -0
  251. package/dist/external/stylis/src/Middleware.js +35 -0
  252. package/dist/external/stylis/src/Parser.js +199 -0
  253. package/dist/external/stylis/src/Serializer.js +41 -0
  254. package/dist/external/stylis/src/Tokenizer.js +241 -0
  255. package/dist/external/stylis/src/Utility.js +132 -0
  256. package/dist/hooks/use-controlled-state/index.js +25 -0
  257. package/dist/index.js +521 -2
  258. package/dist/libs/rehype-accent/index.js +41 -0
  259. package/package.json +8 -5
@@ -0,0 +1,126 @@
1
+ 'use strict';
2
+
3
+ var index = require('../../../../../../../_virtual/index.js');
4
+ var isSafari = require('../is-safari.js');
5
+
6
+ /* For "dragenter" events, the browser should set `relatedTarget` to the previous element.
7
+ * For external drag operations, our first "dragenter" event should have a `event.relatedTarget` of `null`.
8
+ *
9
+ * Unfortunately in Safari `event.relatedTarget` is *always* set to `null`
10
+ * Safari bug: https://bugs.webkit.org/show_bug.cgi?id=242627
11
+ * To work around this we count "dragenter" and "dragleave" events */
12
+
13
+ // Using symbols for event properties so we don't clash with
14
+ // anything on the `event` object
15
+ var symbols = {
16
+ isLeavingWindow: Symbol('leaving'),
17
+ isEnteringWindow: Symbol('entering')
18
+ };
19
+ function isEnteringWindowInSafari(_ref) {
20
+ var dragEnter = _ref.dragEnter;
21
+ if (!isSafari.isSafari()) {
22
+ return false;
23
+ }
24
+ return dragEnter.hasOwnProperty(symbols.isEnteringWindow);
25
+ }
26
+ function isLeavingWindowInSafari(_ref2) {
27
+ var dragLeave = _ref2.dragLeave;
28
+ if (!isSafari.isSafari()) {
29
+ return false;
30
+ }
31
+ return dragLeave.hasOwnProperty(symbols.isLeavingWindow);
32
+ }
33
+ (function fixSafari() {
34
+ // Don't do anything when server side rendering
35
+ if (typeof window === 'undefined') {
36
+ return;
37
+ }
38
+
39
+ // rather than checking the userAgent for "jsdom" we can do this check
40
+ // so that the check will be removed completely in production code
41
+ if (process.env.NODE_ENV === 'test') {
42
+ return;
43
+ }
44
+ if (!isSafari.isSafari()) {
45
+ return;
46
+ }
47
+ function getInitialState() {
48
+ return {
49
+ enterCount: 0,
50
+ isOverWindow: false
51
+ };
52
+ }
53
+ var state = getInitialState();
54
+ function resetState() {
55
+ state = getInitialState();
56
+ }
57
+
58
+ // These event listeners are bound _forever_ and _never_ removed
59
+ // We don't bother cleaning up these event listeners (for now)
60
+ // as this workaround is only for Safari
61
+
62
+ // This is how the event count works:
63
+ //
64
+ // lift (+1 enterCount)
65
+ // - dragstart(draggable) [enterCount: 0]
66
+ // - dragenter(draggable) [enterCount: 1]
67
+ // leaving draggable (+0 enterCount)
68
+ // - dragenter(document.body) [enterCount: 2]
69
+ // - dragleave(draggable) [enterCount: 1]
70
+ // leaving window (-1 enterCount)
71
+ // - dragleave(document.body) [enterCount: 0] {leaving the window}
72
+
73
+ // Things to note:
74
+ // - dragenter and dragleave bubble
75
+ // - the first dragenter when entering a window might not be on `window`
76
+ // - it could be on an element that is pressed up against the window
77
+ // - (so we cannot rely on `event.target` values)
78
+
79
+ index.distExports.bindAll(window, [{
80
+ type: 'dragstart',
81
+ listener: function listener() {
82
+ state.enterCount = 0;
83
+ // drag start occurs in the source window
84
+ state.isOverWindow = true;
85
+ // When a drag first starts it will also trigger a "dragenter" on the draggable element
86
+ }
87
+ }, {
88
+ type: 'drop',
89
+ listener: resetState
90
+ }, {
91
+ type: 'dragend',
92
+ listener: resetState
93
+ }, {
94
+ type: 'dragenter',
95
+ listener: function listener(event) {
96
+ if (!state.isOverWindow && state.enterCount === 0) {
97
+ // Patching the `event` object
98
+ // The `event` object is shared with all event listeners for the event
99
+ // @ts-expect-error: adding property to the event object
100
+ event[symbols.isEnteringWindow] = true;
101
+ }
102
+ state.isOverWindow = true;
103
+ state.enterCount++;
104
+ }
105
+ }, {
106
+ type: 'dragleave',
107
+ listener: function listener(event) {
108
+ state.enterCount--;
109
+ if (state.isOverWindow && state.enterCount === 0) {
110
+ // Patching the `event` object as it is shared with all event listeners
111
+ // The `event` object is shared with all event listeners for the event
112
+ // @ts-expect-error: adding property to the event object
113
+ event[symbols.isLeavingWindow] = true;
114
+ state.isOverWindow = false;
115
+ }
116
+ }
117
+ }],
118
+ // using `capture: true` so that adding event listeners
119
+ // in bubble phase will have the correct symbols
120
+ {
121
+ capture: true
122
+ });
123
+ })();
124
+
125
+ exports.isEnteringWindowInSafari = isEnteringWindowInSafari;
126
+ exports.isLeavingWindowInSafari = isLeavingWindowInSafari;
@@ -0,0 +1,57 @@
1
+ 'use strict';
2
+
3
+ var isFirefox = require('../is-firefox.js');
4
+ var isSafari = require('../is-safari.js');
5
+ var countEventsForSafari = require('./count-events-for-safari.js');
6
+ var isFromAnotherWindow = require('./is-from-another-window.js');
7
+
8
+ function isEnteringWindow(_ref) {
9
+ var dragEnter = _ref.dragEnter;
10
+ var type = dragEnter.type,
11
+ relatedTarget = dragEnter.relatedTarget;
12
+ if (type !== 'dragenter') {
13
+ return false;
14
+ }
15
+ if (isSafari.isSafari()) {
16
+ return countEventsForSafari.isEnteringWindowInSafari({
17
+ dragEnter: dragEnter
18
+ });
19
+ }
20
+
21
+ // standard check
22
+ if (relatedTarget == null) {
23
+ return true;
24
+ }
25
+
26
+ /**
27
+ * 🦊 Exception: `iframe` in Firefox (`125.0`)
28
+ *
29
+ * Case 1: parent `window` → child `iframe`
30
+ * `relatedTarget` is the `iframe` element in the parent `window`
31
+ * (foreign element)
32
+ *
33
+ * Case 2: child `iframe` → parent `window`
34
+ * `relatedTarget` is an element inside the child `iframe`
35
+ * (foreign element)
36
+ */
37
+
38
+ if (isFirefox.isFirefox()) {
39
+ return isFromAnotherWindow.isFromAnotherWindow(relatedTarget);
40
+ }
41
+
42
+ /**
43
+ * 🌏 Exception: `iframe` in Chrome (`124.0`)
44
+ *
45
+ * Case 1: parent `window` → child `iframe`
46
+ * `relatedTarget` is `null` *(standard check)*
47
+ *
48
+ * Case 2: child `iframe` → parent `window`
49
+ * `relatedTarget` is the `iframe` element in the parent `window`
50
+ */
51
+
52
+ // Case 2
53
+ // Using `instanceof` check as the element will be in the same `window`
54
+ return relatedTarget instanceof HTMLIFrameElement;
55
+ }
56
+
57
+ exports.isEnteringWindow = isEnteringWindow;
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Does the `EventTarget` look like a `Node` based on "duck typing".
5
+ *
6
+ * Helpful when the `Node` might be outside of the current document
7
+ * so we cannot to an `target instanceof Node` check.
8
+ */
9
+ function isNodeLike(target) {
10
+ return 'nodeName' in target;
11
+ }
12
+
13
+ /**
14
+ * Is an `EventTarget` a `Node` from another `window`?
15
+ */
16
+ function isFromAnotherWindow(eventTarget) {
17
+ return isNodeLike(eventTarget) && eventTarget.ownerDocument !== document;
18
+ }
19
+
20
+ exports.isFromAnotherWindow = isFromAnotherWindow;
@@ -0,0 +1,57 @@
1
+ 'use strict';
2
+
3
+ var isFirefox = require('../is-firefox.js');
4
+ var isSafari = require('../is-safari.js');
5
+ var countEventsForSafari = require('./count-events-for-safari.js');
6
+ var isFromAnotherWindow = require('./is-from-another-window.js');
7
+
8
+ function isLeavingWindow(_ref) {
9
+ var dragLeave = _ref.dragLeave;
10
+ var type = dragLeave.type,
11
+ relatedTarget = dragLeave.relatedTarget;
12
+ if (type !== 'dragleave') {
13
+ return false;
14
+ }
15
+ if (isSafari.isSafari()) {
16
+ return countEventsForSafari.isLeavingWindowInSafari({
17
+ dragLeave: dragLeave
18
+ });
19
+ }
20
+
21
+ // Standard check: if going to `null` we are leaving the `window`
22
+ if (relatedTarget == null) {
23
+ return true;
24
+ }
25
+
26
+ /**
27
+ * 🦊 Exception: `iframe` in Firefox (`125.0`)
28
+ *
29
+ * Case 1: parent `window` → child `iframe`
30
+ * `dragLeave.relatedTarget` is element _inside_ the child `iframe`
31
+ * (foreign element)
32
+ *
33
+ * Case 2: child `iframe` → parent `window`
34
+ * `dragLeave.relatedTarget` is the `iframe` in the parent `window`
35
+ * (foreign element)
36
+ */
37
+
38
+ if (isFirefox.isFirefox()) {
39
+ return isFromAnotherWindow.isFromAnotherWindow(relatedTarget);
40
+ }
41
+
42
+ /**
43
+ * 🌏 Exception: `iframe` in Chrome (`124.0`)
44
+ *
45
+ * Case 1: parent `window` → child `iframe`
46
+ * `dragLeave.relatedTarget` is the `iframe` in the parent `window`
47
+ *
48
+ * Case 2: child `iframe` → parent `window`
49
+ * `dragLeave.relatedTarget` is `null` *(standard check)*
50
+ */
51
+
52
+ // Case 2
53
+ // Using `instanceof` check as the element will be in the same `window`
54
+ return relatedTarget instanceof HTMLIFrameElement;
55
+ }
56
+
57
+ exports.isLeavingWindow = isLeavingWindow;
@@ -0,0 +1,51 @@
1
+ 'use strict';
2
+
3
+ function getBindingsForBrokenDrags(_ref) {
4
+ var onDragEnd = _ref.onDragEnd;
5
+ return [
6
+ // ## Detecting drag ending for removed draggables
7
+ //
8
+ // If a draggable element is removed during a drag and the user drops:
9
+ // 1. if over a valid drop target: we get a "drop" event to know the drag is finished
10
+ // 2. if not over a valid drop target (or cancelled): we get nothing
11
+ // The "dragend" event will not fire on the source draggable if it has been
12
+ // removed from the DOM.
13
+ // So we need to figure out if a drag operation has finished by looking at other events
14
+ // We can do this by looking at other events
15
+
16
+ // ### First detection: "pointermove" events
17
+
18
+ // 1. "pointermove" events cannot fire during a drag and drop operation
19
+ // according to the spec. So if we get a "pointermove" it means that
20
+ // the drag and drop operations has finished. So if we get a "pointermove"
21
+ // we know that the drag is over
22
+ // 2. 🦊😤 Drag and drop operations are _supposed_ to suppress
23
+ // other pointer events. However, firefox will allow a few
24
+ // pointer event to get through after a drag starts.
25
+ // The most I've seen is 3
26
+ {
27
+ type: 'pointermove',
28
+ listener: function () {
29
+ var callCount = 0;
30
+ return function listener() {
31
+ // Using 20 as it is far bigger than the most observed (3)
32
+ if (callCount < 20) {
33
+ callCount++;
34
+ return;
35
+ }
36
+ onDragEnd();
37
+ };
38
+ }()
39
+ },
40
+ // ### Second detection: "pointerdown" events
41
+
42
+ // If we receive this event then we know that a drag operation has finished
43
+ // and potentially another one is about to start.
44
+ // Note: `pointerdown` fires on all browsers / platforms before "dragstart"
45
+ {
46
+ type: 'pointerdown',
47
+ listener: onDragEnd
48
+ }];
49
+ }
50
+
51
+ exports.getBindingsForBrokenDrags = getBindingsForBrokenDrags;
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ function getInput(event) {
4
+ return {
5
+ altKey: event.altKey,
6
+ button: event.button,
7
+ buttons: event.buttons,
8
+ ctrlKey: event.ctrlKey,
9
+ metaKey: event.metaKey,
10
+ shiftKey: event.shiftKey,
11
+ clientX: event.clientX,
12
+ clientY: event.clientY,
13
+ pageX: event.pageX,
14
+ pageY: event.pageY
15
+ };
16
+ }
17
+
18
+ exports.getInput = getInput;
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var once = require('../public-utils/once.js');
4
+
5
+ // using `cache` as our `isFirefox()` result will not change in a browser
6
+
7
+ /**
8
+ * Returns `true` if a `Firefox` browser
9
+ * */
10
+ var isFirefox = once.once(function isFirefox() {
11
+ if (process.env.NODE_ENV === 'test') {
12
+ return false;
13
+ }
14
+ return navigator.userAgent.includes('Firefox');
15
+ });
16
+
17
+ exports.isFirefox = isFirefox;
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var once = require('../public-utils/once.js');
4
+
5
+ // using `cache` as our `isSafari()` result will not change in a browser
6
+
7
+ /**
8
+ * Returns `true` if a `Safari` browser.
9
+ * Returns `true` if the browser is running on iOS (they are all Safari).
10
+ * */
11
+ var isSafari = once.once(function isSafari() {
12
+ if (process.env.NODE_ENV === 'test') {
13
+ return false;
14
+ }
15
+ var _navigator = navigator,
16
+ userAgent = _navigator.userAgent;
17
+ return userAgent.includes('AppleWebKit') && !userAgent.includes('Chrome');
18
+ });
19
+
20
+ exports.isSafari = isSafari;
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ // Why we put the media types in their own files:
4
+ //
5
+ // - we are not putting them all in one file as not all adapters need all types
6
+ // - we are not putting them in the external helpers as some things just need the
7
+ // types and not the external functions code
8
+ var textMediaType = 'text/plain';
9
+
10
+ exports.textMediaType = textMediaType;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ function _arrayLikeToArray(arr, len) {
4
+ if (len == null || len > arr.length) len = arr.length;
5
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
6
+ return arr2;
7
+ }
8
+
9
+ module.exports = _arrayLikeToArray;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ function _arrayWithHoles(arr) {
4
+ if (Array.isArray(arr)) return arr;
5
+ }
6
+
7
+ module.exports = _arrayWithHoles;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var arrayLikeToArray = require('./arrayLikeToArray.js');
4
+
5
+ function _arrayWithoutHoles(arr) {
6
+ if (Array.isArray(arr)) return arrayLikeToArray(arr);
7
+ }
8
+
9
+ module.exports = _arrayWithoutHoles;
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var toPropertyKey = require('./toPropertyKey.js');
4
+
5
+ function _defineProperty(obj, key, value) {
6
+ key = toPropertyKey(key);
7
+ if (key in obj) {
8
+ Object.defineProperty(obj, key, {
9
+ value: value,
10
+ enumerable: true,
11
+ configurable: true,
12
+ writable: true
13
+ });
14
+ } else {
15
+ obj[key] = value;
16
+ }
17
+ return obj;
18
+ }
19
+
20
+ module.exports = _defineProperty;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ function _iterableToArray(iter) {
4
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
5
+ }
6
+
7
+ module.exports = _iterableToArray;
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ function _iterableToArrayLimit(r, l) {
4
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
5
+ if (null != t) {
6
+ var e,
7
+ n,
8
+ i,
9
+ u,
10
+ a = [],
11
+ f = true,
12
+ o = false;
13
+ try {
14
+ if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
15
+ } catch (r) {
16
+ o = true, n = r;
17
+ } finally {
18
+ try {
19
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
20
+ } finally {
21
+ if (o) throw n;
22
+ }
23
+ }
24
+ return a;
25
+ }
26
+ }
27
+
28
+ module.exports = _iterableToArrayLimit;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ function _nonIterableRest() {
4
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5
+ }
6
+
7
+ module.exports = _nonIterableRest;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ function _nonIterableSpread() {
4
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5
+ }
6
+
7
+ module.exports = _nonIterableSpread;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var arrayWithHoles = require('./arrayWithHoles.js');
4
+ var iterableToArrayLimit = require('./iterableToArrayLimit.js');
5
+ var unsupportedIterableToArray = require('./unsupportedIterableToArray.js');
6
+ var nonIterableRest = require('./nonIterableRest.js');
7
+
8
+ function _slicedToArray(arr, i) {
9
+ return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
10
+ }
11
+
12
+ module.exports = _slicedToArray;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var arrayWithoutHoles = require('./arrayWithoutHoles.js');
4
+ var iterableToArray = require('./iterableToArray.js');
5
+ var unsupportedIterableToArray = require('./unsupportedIterableToArray.js');
6
+ var nonIterableSpread = require('./nonIterableSpread.js');
7
+
8
+ function _toConsumableArray(arr) {
9
+ return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
10
+ }
11
+
12
+ module.exports = _toConsumableArray;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var _typeof = require('./typeof.js');
4
+
5
+ function toPrimitive(t, r) {
6
+ if ("object" != _typeof(t) || !t) return t;
7
+ var e = t[Symbol.toPrimitive];
8
+ if (undefined !== e) {
9
+ var i = e.call(t, r || "default");
10
+ if ("object" != _typeof(i)) return i;
11
+ throw new TypeError("@@toPrimitive must return a primitive value.");
12
+ }
13
+ return ("string" === r ? String : Number)(t);
14
+ }
15
+
16
+ module.exports = toPrimitive;
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var _typeof = require('./typeof.js');
4
+ var toPrimitive = require('./toPrimitive.js');
5
+
6
+ function toPropertyKey(t) {
7
+ var i = toPrimitive(t, "string");
8
+ return "symbol" == _typeof(i) ? i : i + "";
9
+ }
10
+
11
+ module.exports = toPropertyKey;
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ function _typeof(o) {
4
+ "@babel/helpers - typeof";
5
+
6
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
7
+ return typeof o;
8
+ } : function (o) {
9
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
10
+ }, _typeof(o);
11
+ }
12
+
13
+ module.exports = _typeof;
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var arrayLikeToArray = require('./arrayLikeToArray.js');
4
+
5
+ function _unsupportedIterableToArray(o, minLen) {
6
+ if (!o) return;
7
+ if (typeof o === "string") return arrayLikeToArray(o, minLen);
8
+ var n = Object.prototype.toString.call(o).slice(8, -1);
9
+ if (n === "Object" && o.constructor) n = o.constructor.name;
10
+ if (n === "Map" || n === "Set") return Array.from(o);
11
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
12
+ }
13
+
14
+ module.exports = _unsupportedIterableToArray;
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ function _extends() {
4
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
5
+ for (var i = 1; i < arguments.length; i++) {
6
+ var source = arguments[i];
7
+ for (var key in source) {
8
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
9
+ target[key] = source[key];
10
+ }
11
+ }
12
+ }
13
+ return target;
14
+ };
15
+ return _extends.apply(this, arguments);
16
+ }
17
+
18
+ module.exports = _extends;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ function _objectWithoutPropertiesLoose(source, excluded) {
4
+ if (source == null) return {};
5
+ var target = {};
6
+ var sourceKeys = Object.keys(source);
7
+ var key, i;
8
+ for (i = 0; i < sourceKeys.length; i++) {
9
+ key = sourceKeys[i];
10
+ if (excluded.indexOf(key) >= 0) continue;
11
+ target[key] = source[key];
12
+ }
13
+ return target;
14
+ }
15
+
16
+ module.exports = _objectWithoutPropertiesLoose;
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ var _extends = require('../../../../_virtual/extends.js');
4
+
5
+ var hasRequired_extends;
6
+
7
+ function require_extends () {
8
+ if (hasRequired_extends) return _extends.__module.exports;
9
+ hasRequired_extends = 1;
10
+ (function (module) {
11
+ function _extends() {
12
+ module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {
13
+ for (var i = 1; i < arguments.length; i++) {
14
+ var source = arguments[i];
15
+ for (var key in source) {
16
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
17
+ target[key] = source[key];
18
+ }
19
+ }
20
+ }
21
+ return target;
22
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports;
23
+ return _extends.apply(this, arguments);
24
+ }
25
+ module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
26
+ } (_extends.__module));
27
+ return _extends.__module.exports;
28
+ }
29
+
30
+ exports.__require = require_extends;
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ var interopRequireDefault = require('../../../../_virtual/interopRequireDefault.js');
4
+
5
+ var hasRequiredInteropRequireDefault;
6
+
7
+ function requireInteropRequireDefault () {
8
+ if (hasRequiredInteropRequireDefault) return interopRequireDefault.__module.exports;
9
+ hasRequiredInteropRequireDefault = 1;
10
+ (function (module) {
11
+ function _interopRequireDefault(obj) {
12
+ return obj && obj.__esModule ? obj : {
13
+ "default": obj
14
+ };
15
+ }
16
+ module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
17
+ } (interopRequireDefault.__module));
18
+ return interopRequireDefault.__module.exports;
19
+ }
20
+
21
+ exports.__require = requireInteropRequireDefault;