@ceed/cds 0.0.187-treeshaking.1 → 0.0.187

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 (335) hide show
  1. package/dist/components/Accordions/index.d.ts +2 -2
  2. package/dist/components/Autocomplete/index.d.ts +2 -2
  3. package/dist/components/Avatar/index.d.ts +2 -2
  4. package/dist/components/Box/index.d.ts +2 -2
  5. package/dist/components/Breadcrumbs/index.d.ts +2 -2
  6. package/dist/components/Button/index.d.ts +2 -2
  7. package/dist/components/Calendar/Calendar.d.ts +1 -1
  8. package/dist/components/Calendar/hooks/use-calendar-props.d.ts +3 -3
  9. package/dist/components/Calendar/hooks/use-calendar.d.ts +1 -1
  10. package/dist/components/Calendar/index.d.ts +2 -2
  11. package/dist/components/Card/index.d.ts +2 -2
  12. package/dist/components/Checkbox/index.d.ts +2 -2
  13. package/dist/components/Chip/index.d.ts +2 -2
  14. package/dist/components/Container/index.d.ts +2 -2
  15. package/dist/components/CurrencyInput/index.d.ts +2 -2
  16. package/dist/components/DataTable/DataTable.d.ts +1 -1
  17. package/dist/components/DataTable/index.d.ts +2 -2
  18. package/dist/components/DataTable/types.d.ts +7 -7
  19. package/dist/components/DatePicker/DatePicker.d.ts +1 -1
  20. package/dist/components/DatePicker/index.d.ts +2 -2
  21. package/dist/components/DateRangePicker/DateRangePicker.d.ts +1 -1
  22. package/dist/components/DateRangePicker/index.d.ts +2 -2
  23. package/dist/components/DialogActions/index.d.ts +2 -2
  24. package/dist/components/DialogContent/index.d.ts +2 -2
  25. package/dist/components/DialogFrame/DialogFrame.d.ts +1 -1
  26. package/dist/components/DialogFrame/index.d.ts +2 -2
  27. package/dist/components/DialogTitle/index.d.ts +2 -2
  28. package/dist/components/Divider/index.d.ts +2 -2
  29. package/dist/components/Drawer/index.d.ts +2 -2
  30. package/dist/components/Dropdown/index.d.ts +2 -2
  31. package/dist/components/FormControl/index.d.ts +2 -2
  32. package/dist/components/FormHelperText/index.d.ts +2 -2
  33. package/dist/components/FormLabel/index.d.ts +2 -2
  34. package/dist/components/Grid/index.d.ts +2 -2
  35. package/dist/components/IconButton/index.d.ts +2 -2
  36. package/dist/components/Input/Input.d.ts +1 -1
  37. package/dist/components/Input/index.d.ts +2 -2
  38. package/dist/components/InsetDrawer/index.d.ts +2 -2
  39. package/dist/components/Markdown/Markdown.d.ts +22 -6
  40. package/dist/components/Markdown/index.d.ts +2 -2
  41. package/dist/components/Menu/index.d.ts +2 -2
  42. package/dist/components/MenuButton/MenuButton.d.ts +1 -1
  43. package/dist/components/Modal/Modal.d.ts +4 -4
  44. package/dist/components/Modal/index.d.ts +2 -2
  45. package/dist/components/MonthPicker/MonthPicker.d.ts +1 -1
  46. package/dist/components/MonthPicker/index.d.ts +2 -2
  47. package/dist/components/MonthRangePicker/MonthRangePicker.d.ts +1 -1
  48. package/dist/components/MonthRangePicker/index.d.ts +2 -2
  49. package/dist/components/NavigationGroup/index.d.ts +2 -2
  50. package/dist/components/NavigationItem/index.d.ts +2 -2
  51. package/dist/components/Navigator/index.d.ts +2 -2
  52. package/dist/components/Pagination/Pagination.d.ts +2 -2
  53. package/dist/components/Pagination/index.d.ts +2 -2
  54. package/dist/components/PercentageInput/index.d.ts +2 -2
  55. package/dist/components/Radio/index.d.ts +2 -2
  56. package/dist/components/RadioList/RadioList.d.ts +1 -1
  57. package/dist/components/RadioList/index.d.ts +2 -2
  58. package/dist/components/Select/Select.d.ts +1 -1
  59. package/dist/components/Select/index.d.ts +2 -2
  60. package/dist/components/Sheet/index.d.ts +2 -2
  61. package/dist/components/Stack/index.d.ts +2 -2
  62. package/dist/components/Stepper/index.d.ts +2 -2
  63. package/dist/components/Switch/index.d.ts +2 -2
  64. package/dist/components/Table/index.d.ts +2 -2
  65. package/dist/components/Tabs/index.d.ts +2 -2
  66. package/dist/components/Textarea/Textarea.d.ts +17 -3
  67. package/dist/components/Textarea/index.d.ts +2 -2
  68. package/dist/components/ThemeProvider/ThemeProvider.d.ts +7 -7
  69. package/dist/components/ThemeProvider/index.d.ts +2 -2
  70. package/dist/components/Tooltip/index.d.ts +2 -2
  71. package/dist/components/Typography/index.d.ts +2 -2
  72. package/dist/components/Uploader/Uploader.d.ts +3 -4
  73. package/dist/components/Uploader/index.d.ts +2 -2
  74. package/dist/components/index.d.ts +53 -53
  75. package/dist/index.d.ts +1 -1
  76. package/dist/index.js +2 -52
  77. package/framer/index.js +30 -30
  78. package/package.json +4 -8
  79. package/dist/_virtual/_commonjsHelpers.js +0 -30
  80. package/dist/_virtual/bind-all.js +0 -3
  81. package/dist/_virtual/bind.js +0 -3
  82. package/dist/_virtual/colorManipulator.js +0 -5
  83. package/dist/_virtual/colorManipulator2.js +0 -3
  84. package/dist/_virtual/createStyled.js +0 -7
  85. package/dist/_virtual/createStyled2.js +0 -3
  86. package/dist/_virtual/extends.js +0 -3
  87. package/dist/_virtual/index.js +0 -5
  88. package/dist/_virtual/index10.js +0 -6
  89. package/dist/_virtual/index11.js +0 -6
  90. package/dist/_virtual/index12.js +0 -6
  91. package/dist/_virtual/index2.js +0 -3
  92. package/dist/_virtual/index3.js +0 -7
  93. package/dist/_virtual/index4.js +0 -3
  94. package/dist/_virtual/index5.js +0 -6
  95. package/dist/_virtual/index6.js +0 -6
  96. package/dist/_virtual/index7.js +0 -6
  97. package/dist/_virtual/index8.js +0 -6
  98. package/dist/_virtual/index9.js +0 -6
  99. package/dist/_virtual/interopRequireDefault.js +0 -3
  100. package/dist/_virtual/objectWithoutPropertiesLoose.js +0 -3
  101. package/dist/components/Accordions/Accordions.js +0 -43
  102. package/dist/components/Autocomplete/Autocomplete.js +0 -196
  103. package/dist/components/Autocomplete/index.js +0 -5
  104. package/dist/components/Avatar/Avatar.js +0 -42
  105. package/dist/components/Box/Box.js +0 -8
  106. package/dist/components/Box/index.js +0 -5
  107. package/dist/components/Breadcrumbs/Breadcrumbs.js +0 -47
  108. package/dist/components/Button/Button.js +0 -20
  109. package/dist/components/Button/index.js +0 -5
  110. package/dist/components/Calendar/Calendar.js +0 -333
  111. package/dist/components/Calendar/hooks/use-calendar-props.js +0 -74
  112. package/dist/components/Calendar/hooks/use-calendar.js +0 -247
  113. package/dist/components/Calendar/index.js +0 -5
  114. package/dist/components/Calendar/utils/index.js +0 -74
  115. package/dist/components/Card/Card.js +0 -20
  116. package/dist/components/Checkbox/Checkbox.js +0 -19
  117. package/dist/components/Checkbox/index.js +0 -5
  118. package/dist/components/Chip/Chip.js +0 -8
  119. package/dist/components/Chip/index.js +0 -5
  120. package/dist/components/Container/Container.js +0 -49
  121. package/dist/components/CurrencyInput/CurrencyInput.js +0 -91
  122. package/dist/components/CurrencyInput/hooks/use-currency-setting.js +0 -167
  123. package/dist/components/CurrencyInput/index.js +0 -5
  124. package/dist/components/DataTable/DataTable.js +0 -568
  125. package/dist/components/DatePicker/DatePicker.js +0 -210
  126. package/dist/components/DatePicker/index.js +0 -5
  127. package/dist/components/DateRangePicker/DateRangePicker.js +0 -213
  128. package/dist/components/DialogActions/DialogActions.js +0 -14
  129. package/dist/components/DialogActions/index.js +0 -5
  130. package/dist/components/DialogContent/DialogContent.js +0 -11
  131. package/dist/components/DialogContent/index.js +0 -5
  132. package/dist/components/DialogFrame/DialogFrame.js +0 -31
  133. package/dist/components/DialogTitle/DialogTitle.js +0 -11
  134. package/dist/components/DialogTitle/index.js +0 -5
  135. package/dist/components/Divider/Divider.js +0 -19
  136. package/dist/components/Drawer/Drawer.js +0 -40
  137. package/dist/components/Dropdown/Dropdown.js +0 -8
  138. package/dist/components/Dropdown/index.js +0 -5
  139. package/dist/components/FormControl/FormControl.js +0 -15
  140. package/dist/components/FormControl/index.js +0 -5
  141. package/dist/components/FormHelperText/FormHelperText.js +0 -8
  142. package/dist/components/FormHelperText/index.js +0 -5
  143. package/dist/components/FormLabel/FormLabel.js +0 -8
  144. package/dist/components/FormLabel/index.js +0 -5
  145. package/dist/components/IconButton/IconButton.js +0 -20
  146. package/dist/components/IconButton/index.js +0 -5
  147. package/dist/components/Input/Input.js +0 -60
  148. package/dist/components/Input/index.js +0 -5
  149. package/dist/components/InsetDrawer/InsetDrawer.js +0 -30
  150. package/dist/components/Markdown/Markdown.js +0 -36
  151. package/dist/components/Menu/Menu.js +0 -43
  152. package/dist/components/Menu/index.js +0 -6
  153. package/dist/components/MenuButton/MenuButton.js +0 -26
  154. package/dist/components/Modal/Modal.js +0 -43
  155. package/dist/components/MonthPicker/MonthPicker.js +0 -162
  156. package/dist/components/MonthRangePicker/MonthRangePicker.js +0 -172
  157. package/dist/components/NavigationGroup/NavigationGroup.js +0 -42
  158. package/dist/components/NavigationItem/NavigationItem.js +0 -45
  159. package/dist/components/Navigator/Navigator.js +0 -30
  160. package/dist/components/Pagination/Pagination.js +0 -117
  161. package/dist/components/Pagination/index.js +0 -5
  162. package/dist/components/PercentageInput/PercentageInput.js +0 -85
  163. package/dist/components/Radio/Radio.js +0 -11
  164. package/dist/components/RadioList/RadioList.js +0 -18
  165. package/dist/components/Select/Select.js +0 -56
  166. package/dist/components/Select/index.js +0 -6
  167. package/dist/components/Sheet/Sheet.js +0 -8
  168. package/dist/components/Sheet/index.js +0 -5
  169. package/dist/components/Stack/index.js +0 -2
  170. package/dist/components/Stepper/Stepper.js +0 -66
  171. package/dist/components/Switch/Switch.js +0 -46
  172. package/dist/components/Table/Table.js +0 -64
  173. package/dist/components/Tabs/Tabs.js +0 -17
  174. package/dist/components/Textarea/Textarea.js +0 -31
  175. package/dist/components/Textarea/index.js +0 -5
  176. package/dist/components/ThemeProvider/ThemeProvider.js +0 -240
  177. package/dist/components/Tooltip/Tooltip.js +0 -19
  178. package/dist/components/Tooltip/index.js +0 -5
  179. package/dist/components/Typography/Typography.js +0 -19
  180. package/dist/components/Typography/index.js +0 -5
  181. package/dist/components/Uploader/Uploader.js +0 -402
  182. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter-native-data-key.js +0 -8
  183. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/external-adapter.js +0 -245
  184. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js +0 -1
  185. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js +0 -1
  186. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js +0 -1
  187. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js +0 -1
  188. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/get-element-from-point-without-honey-pot.js +0 -19
  189. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/honey-pot-data-attribute.js +0 -5
  190. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/is-honey-pot-element.js +0 -7
  191. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js +0 -128
  192. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/lifecycle-manager.js +0 -340
  193. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/usage-ledger.js +0 -33
  194. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-adapter.js +0 -60
  195. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-drop-target.js +0 -312
  196. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-monitor.js +0 -96
  197. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/combine.js +0 -13
  198. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/external/file.js +0 -23
  199. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/once.js +0 -18
  200. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/prevent-unhandled.js +0 -102
  201. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/add-attribute.js +0 -10
  202. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/android.js +0 -3
  203. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js +0 -123
  204. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-entering-window.js +0 -55
  205. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-from-another-window.js +0 -18
  206. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-leaving-window.js +0 -55
  207. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/detect-broken-drag.js +0 -49
  208. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/get-input.js +0 -16
  209. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-firefox.js +0 -15
  210. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-safari.js +0 -18
  211. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/text-media-type.js +0 -8
  212. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -7
  213. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -5
  214. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -7
  215. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/defineProperty.js +0 -18
  216. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/iterableToArray.js +0 -5
  217. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -26
  218. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/nonIterableRest.js +0 -5
  219. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -5
  220. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/slicedToArray.js +0 -10
  221. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toConsumableArray.js +0 -10
  222. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toPrimitive.js +0 -14
  223. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toPropertyKey.js +0 -9
  224. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/typeof.js +0 -11
  225. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -12
  226. package/dist/external/@babel/runtime/helpers/esm/extends.js +0 -16
  227. package/dist/external/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -14
  228. package/dist/external/@babel/runtime/helpers/extends.js +0 -28
  229. package/dist/external/@babel/runtime/helpers/interopRequireDefault.js +0 -19
  230. package/dist/external/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -26
  231. package/dist/external/@emotion/cache/dist/emotion-cache.esm.js +0 -653
  232. package/dist/external/@emotion/memoize/dist/emotion-memoize.esm.js +0 -9
  233. package/dist/external/@emotion/sheet/dist/emotion-sheet.esm.js +0 -154
  234. package/dist/external/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +0 -16
  235. package/dist/external/@mui/icons-material/esm/ArrowUpwardRounded.js +0 -8
  236. package/dist/external/@mui/icons-material/esm/CalendarToday.js +0 -8
  237. package/dist/external/@mui/icons-material/esm/Check.js +0 -8
  238. package/dist/external/@mui/icons-material/esm/ChevronLeft.js +0 -8
  239. package/dist/external/@mui/icons-material/esm/ChevronRight.js +0 -8
  240. package/dist/external/@mui/icons-material/esm/ClearRounded.js +0 -8
  241. package/dist/external/@mui/icons-material/esm/Close.js +0 -8
  242. package/dist/external/@mui/icons-material/esm/CloudUploadRounded.js +0 -8
  243. package/dist/external/@mui/icons-material/esm/ExpandMore.js +0 -8
  244. package/dist/external/@mui/icons-material/esm/Info.js +0 -8
  245. package/dist/external/@mui/icons-material/esm/UploadFileRounded.js +0 -8
  246. package/dist/external/@mui/material/SvgIcon/SvgIcon.js +0 -186
  247. package/dist/external/@mui/material/SvgIcon/svgIconClasses.js +0 -9
  248. package/dist/external/@mui/material/colors/blue.js +0 -18
  249. package/dist/external/@mui/material/colors/common.js +0 -6
  250. package/dist/external/@mui/material/colors/green.js +0 -18
  251. package/dist/external/@mui/material/colors/grey.js +0 -18
  252. package/dist/external/@mui/material/colors/lightBlue.js +0 -18
  253. package/dist/external/@mui/material/colors/orange.js +0 -18
  254. package/dist/external/@mui/material/colors/purple.js +0 -18
  255. package/dist/external/@mui/material/colors/red.js +0 -18
  256. package/dist/external/@mui/material/styles/createMixins.js +0 -19
  257. package/dist/external/@mui/material/styles/createPalette.js +0 -308
  258. package/dist/external/@mui/material/styles/createTheme.js +0 -82
  259. package/dist/external/@mui/material/styles/createTransitions.js +0 -91
  260. package/dist/external/@mui/material/styles/createTypography.js +0 -93
  261. package/dist/external/@mui/material/styles/defaultTheme.js +0 -5
  262. package/dist/external/@mui/material/styles/identifier.js +0 -3
  263. package/dist/external/@mui/material/styles/rootShouldForwardProp.js +0 -5
  264. package/dist/external/@mui/material/styles/shadows.js +0 -11
  265. package/dist/external/@mui/material/styles/slotShouldForwardProp.js +0 -6
  266. package/dist/external/@mui/material/styles/styled.js +0 -12
  267. package/dist/external/@mui/material/styles/useThemeProps.js +0 -17
  268. package/dist/external/@mui/material/styles/zIndex.js +0 -14
  269. package/dist/external/@mui/material/utils/capitalize.js +0 -5
  270. package/dist/external/@mui/material/utils/createSvgIcon.js +0 -24
  271. package/dist/external/@mui/styled-engine/GlobalStyles/GlobalStyles.js +0 -24
  272. package/dist/external/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js +0 -37
  273. package/dist/external/@mui/styled-engine/index.js +0 -38
  274. package/dist/external/@mui/system/colorManipulator.js +0 -385
  275. package/dist/external/@mui/system/createStyled.js +0 -270
  276. package/dist/external/@mui/system/esm/borders.js +0 -51
  277. package/dist/external/@mui/system/esm/breakpoints.js +0 -66
  278. package/dist/external/@mui/system/esm/compose.js +0 -26
  279. package/dist/external/@mui/system/esm/createTheme/applyStyles.js +0 -76
  280. package/dist/external/@mui/system/esm/createTheme/createBreakpoints.js +0 -82
  281. package/dist/external/@mui/system/esm/createTheme/createSpacing.js +0 -34
  282. package/dist/external/@mui/system/esm/createTheme/createTheme.js +0 -45
  283. package/dist/external/@mui/system/esm/createTheme/index.js +0 -3
  284. package/dist/external/@mui/system/esm/createTheme/shape.js +0 -5
  285. package/dist/external/@mui/system/esm/cssGrid.js +0 -86
  286. package/dist/external/@mui/system/esm/memoize.js +0 -11
  287. package/dist/external/@mui/system/esm/merge.js +0 -12
  288. package/dist/external/@mui/system/esm/palette.js +0 -28
  289. package/dist/external/@mui/system/esm/responsivePropType.js +0 -5
  290. package/dist/external/@mui/system/esm/sizing.js +0 -67
  291. package/dist/external/@mui/system/esm/spacing.js +0 -144
  292. package/dist/external/@mui/system/esm/style.js +0 -77
  293. package/dist/external/@mui/system/esm/styleFunctionSx/defaultSxConfig.js +0 -293
  294. package/dist/external/@mui/system/esm/styleFunctionSx/extendSxProp.js +0 -51
  295. package/dist/external/@mui/system/esm/styleFunctionSx/index.js +0 -3
  296. package/dist/external/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +0 -129
  297. package/dist/external/@mui/system/esm/useTheme.js +0 -9
  298. package/dist/external/@mui/system/esm/useThemeProps/getThemeProps.js +0 -15
  299. package/dist/external/@mui/system/esm/useThemeProps/useThemeProps.js +0 -22
  300. package/dist/external/@mui/system/esm/useThemeWithoutDefault.js +0 -12
  301. package/dist/external/@mui/utils/ClassNameGenerator/ClassNameGenerator.js +0 -18
  302. package/dist/external/@mui/utils/capitalize/capitalize.js +0 -14
  303. package/dist/external/@mui/utils/capitalize/index.js +0 -1
  304. package/dist/external/@mui/utils/clamp/clamp.js +0 -5
  305. package/dist/external/@mui/utils/clamp/index.js +0 -1
  306. package/dist/external/@mui/utils/composeClasses/composeClasses.js +0 -23
  307. package/dist/external/@mui/utils/deepmerge/deepmerge.js +0 -44
  308. package/dist/external/@mui/utils/deepmerge/index.js +0 -1
  309. package/dist/external/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js +0 -21
  310. package/dist/external/@mui/utils/formatMuiErrorMessage/index.js +0 -1
  311. package/dist/external/@mui/utils/generateUtilityClass/generateUtilityClass.js +0 -22
  312. package/dist/external/@mui/utils/generateUtilityClasses/generateUtilityClasses.js +0 -11
  313. package/dist/external/@mui/utils/getDisplayName/getDisplayName.js +0 -49
  314. package/dist/external/@mui/utils/getDisplayName/index.js +0 -1
  315. package/dist/external/@mui/utils/resolveProps/resolveProps.js +0 -37
  316. package/dist/external/bind-event-listener/dist/bind-all.js +0 -54
  317. package/dist/external/bind-event-listener/dist/bind.js +0 -21
  318. package/dist/external/bind-event-listener/dist/index.js +0 -21
  319. package/dist/external/clsx/dist/clsx.js +0 -3
  320. package/dist/external/object-assign/index.js +0 -99
  321. package/dist/external/prop-types/checkPropTypes.js +0 -115
  322. package/dist/external/prop-types/factoryWithThrowingShims.js +0 -74
  323. package/dist/external/prop-types/factoryWithTypeCheckers.js +0 -625
  324. package/dist/external/prop-types/index.js +0 -33
  325. package/dist/external/prop-types/lib/ReactPropTypesSecret.js +0 -21
  326. package/dist/external/prop-types/lib/has.js +0 -11
  327. package/dist/external/raf-schd/dist/raf-schd.esm.js +0 -34
  328. package/dist/external/stylis/src/Enum.js +0 -12
  329. package/dist/external/stylis/src/Middleware.js +0 -32
  330. package/dist/external/stylis/src/Parser.js +0 -193
  331. package/dist/external/stylis/src/Serializer.js +0 -38
  332. package/dist/external/stylis/src/Tokenizer.js +0 -223
  333. package/dist/external/stylis/src/Utility.js +0 -117
  334. package/dist/hooks/use-controlled-state/index.js +0 -23
  335. package/dist/libs/rehype-accent/index.js +0 -39
@@ -1,402 +0,0 @@
1
- import React__default, { createContext, useRef, useState, useMemo, useCallback, useEffect, useContext } from 'react';
2
- import { styled, Input, Stack } from '@mui/joy';
3
- import MuiFileUploadIcon from '../../external/@mui/icons-material/esm/CloudUploadRounded.js';
4
- import MuiUploadFileIcon from '../../external/@mui/icons-material/esm/UploadFileRounded.js';
5
- import MuiClearIcon from '../../external/@mui/icons-material/esm/ClearRounded.js';
6
- import { Typography } from '../Typography/Typography.js';
7
- import { Card } from '../Card/Card.js';
8
- import { IconButton } from '../IconButton/IconButton.js';
9
- import { FormControl } from '../FormControl/FormControl.js';
10
- import { FormHelperText } from '../FormHelperText/FormHelperText.js';
11
- import { Sheet } from '../Sheet/Sheet.js';
12
- import { FormLabel } from '../FormLabel/FormLabel.js';
13
-
14
- const AtlaskitContext = createContext({});
15
- const AtlaskitProvider = (props) => {
16
- const [libs, setLibs] = useState({});
17
- useEffect(() => {
18
- (async () => {
19
- setLibs({
20
- combine: (await import('../../external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js'))
21
- .combine,
22
- dropTargetForExternal: (await import('../../external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js')).dropTargetForExternal,
23
- monitorForExternal: (await import('../../external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js')).monitorForExternal,
24
- containsFiles: (await import('../../external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js')).containsFiles,
25
- getFiles: (await import('../../external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js')).getFiles,
26
- preventUnhandled: (await import('../../external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js')).preventUnhandled,
27
- });
28
- })();
29
- }, []);
30
- return (React__default.createElement(AtlaskitContext.Provider, { value: libs }, props.children));
31
- };
32
- const useAtlaskit = () => {
33
- return useContext(AtlaskitContext);
34
- };
35
- const VisuallyHiddenInput = styled(Input)({
36
- width: "1px",
37
- height: "1px",
38
- overflow: "hidden",
39
- whiteSpace: "nowrap",
40
- clip: "rect(0 0 0 0)",
41
- clipPath: "inset(50%)",
42
- position: "absolute",
43
- });
44
- const PreviewRoot = styled(Stack, {
45
- name: "Uploader",
46
- slot: "PreviewRoot",
47
- })({});
48
- const UploadCard = styled(Card, {
49
- name: "Uploader",
50
- slot: "UploadCard",
51
- })(({ theme }) => ({
52
- padding: theme.spacing(2.5),
53
- border: `1px solid ${theme.palette.neutral.outlinedBorder}`,
54
- }));
55
- const UploadFileIcon = styled(MuiUploadFileIcon, {
56
- name: "Uploader",
57
- slot: "UploadFileIcon",
58
- })(({ theme }) => ({
59
- color: theme.palette.neutral["400"],
60
- width: "32px",
61
- height: "32px",
62
- }));
63
- const ClearIcon = styled(MuiClearIcon, {
64
- name: "Uploader",
65
- slot: "ClearIcon",
66
- })(({ theme }) => ({
67
- color: theme.palette.neutral.plainColor,
68
- width: "18px",
69
- height: "18px",
70
- }));
71
- const UNITS = [
72
- "byte",
73
- "kilobyte",
74
- "megabyte",
75
- "gigabyte",
76
- "terabyte",
77
- "petabyte",
78
- ];
79
- const ALL_EXTENSIONS_BY_TYPE = {
80
- "image/*": [
81
- ".jpeg",
82
- ".jpg",
83
- ".png",
84
- ".gif",
85
- ".bmp",
86
- ".tiff",
87
- ".svg",
88
- ".webp",
89
- ".heic",
90
- ".ico",
91
- ],
92
- "audio/*": [
93
- ".mp3",
94
- ".wav",
95
- ".flac",
96
- ".aac",
97
- ".ogg",
98
- ".m4a",
99
- ".wma",
100
- ".aiff",
101
- ".alac",
102
- ".midi",
103
- ".mp4",
104
- ],
105
- "video/*": [
106
- ".mp4",
107
- ".avi",
108
- ".mkv",
109
- ".mov",
110
- ".wmv",
111
- ".flv",
112
- ".webm",
113
- ".mpeg",
114
- ".3gp",
115
- ".m4v",
116
- ],
117
- };
118
- const getFileSize = (n) => {
119
- const i = n == 0 ? 0 : Math.floor(Math.log(n) / Math.log(1024));
120
- const value = n / Math.pow(1024, i);
121
- const unit = UNITS[i];
122
- return Intl.NumberFormat("en-us", {
123
- style: "unit",
124
- unit,
125
- unitDisplay: "narrow",
126
- }).format(value);
127
- };
128
- const Preview = (props) => {
129
- // prop destruction
130
- const { files, uploaded, onDelete } = props;
131
- // lib hooks
132
- // state, ref, querystring hooks
133
- // form hooks
134
- // query hooks
135
- // calculated values
136
- // effects
137
- // handlers
138
- return (React__default.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => (React__default.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" },
139
- React__default.createElement(Stack, { direction: "row", alignItems: "center", gap: 2 },
140
- React__default.createElement(UploadFileIcon, null),
141
- React__default.createElement(Stack, { flex: "1" },
142
- React__default.createElement(Typography, { level: "body-sm", textColor: "common.black" }, file.name),
143
- !!file.size && (React__default.createElement(Typography, { level: "body-xs", fontWeight: "300", lineHeight: "1.33", textColor: "text.tertiary" }, getFileSize(file.size)))),
144
- React__default.createElement(IconButton, { onClick: () => onDelete?.(file) },
145
- React__default.createElement(ClearIcon, null))))))));
146
- };
147
- const UploaderRoot = styled(Stack, {
148
- name: "Uploader",
149
- slot: "root",
150
- })(({ theme }) => ({
151
- gap: theme.spacing(2),
152
- }));
153
- const FileDropZone = styled(Sheet, {
154
- name: "Uploader",
155
- slot: "dropZone",
156
- shouldForwardProp: (prop) => prop !== "error",
157
- })(({ theme, state, error }) => ({
158
- width: "100%",
159
- display: "flex",
160
- flexDirection: "column",
161
- justifyContent: "center",
162
- alignItems: "center",
163
- padding: theme.spacing(5),
164
- gap: theme.spacing(4),
165
- cursor: "pointer",
166
- backgroundColor: theme.palette.background.surface,
167
- border: error
168
- ? `1px solid ${theme.palette.danger.outlinedBorder}`
169
- : state === "idle"
170
- ? `1px solid ${theme.palette.neutral.outlinedBorder}`
171
- : `1px solid ${theme.palette.primary.outlinedBorder}`,
172
- }));
173
- const UploaderIcon = styled(MuiFileUploadIcon, {
174
- name: "Uploader",
175
- slot: "iconContainer",
176
- shouldForwardProp: (prop) => prop !== "error",
177
- })(({ theme, state, error }) => ({
178
- color: error
179
- ? `rgba(${theme.vars.palette.danger.mainChannel} / 0.6)`
180
- : state === "over"
181
- ? `rgba(${theme.palette.primary.mainChannel} / 0.6)`
182
- : theme.palette.neutral.softActiveBg,
183
- width: "32px",
184
- height: "32px",
185
- }));
186
- const _Uploader = React__default.memo((props) => {
187
- // prop destruction
188
- const { accept, minCount, maxCount, name, size, maxFileSize, maxFileTotalSize, onChange, label, disabled, onDelete, } = props;
189
- // lib hooks
190
- const { combine, dropTargetForExternal, monitorForExternal, containsFiles, getFiles, preventUnhandled, } = useAtlaskit();
191
- // state, ref, querystring hooks
192
- const dropZoneRef = useRef(null);
193
- const inputRef = useRef(null);
194
- const [errorText, setErrorText] = useState();
195
- const [files, setFiles] = useState([]);
196
- const [uploaded, setUploaded] = useState(props.uploaded || []);
197
- const [previewState, setPreviewState] = useState("idle");
198
- // form hooks
199
- // query hooks
200
- // calculated values
201
- const accepts = useMemo(() => accept.split(",").map((accept) => accept.trim()), [accept]);
202
- const parsedAccepts = useMemo(() => accepts.flatMap((type) => {
203
- if (["image/*", "video/*", "audio/*"].includes(type)) {
204
- return ALL_EXTENSIONS_BY_TYPE[type];
205
- }
206
- return type;
207
- }), [accepts]);
208
- const helperText = useMemo(() => {
209
- const [allAcceptedTypes, acceptedTypes] = [
210
- accepts
211
- .filter((accept) => ["image/*", "video/*", "audio/*"].includes(accept))
212
- .map((accept) => {
213
- const [type] = accept.split("/");
214
- return type.toLowerCase();
215
- }),
216
- accepts
217
- .filter((accept) => !["image/*", "video/*", "audio/*"].includes(accept))
218
- .map((accept) => {
219
- const [extensionOrType, subType] = accept.split("/");
220
- if (!subType) {
221
- return extensionOrType.toUpperCase().replace(".", "");
222
- }
223
- return subType.toUpperCase();
224
- }),
225
- ];
226
- const helperTexts = [];
227
- if (allAcceptedTypes.length > 0) {
228
- helperTexts.push(`Any ${allAcceptedTypes.join(", ")} file`);
229
- }
230
- if (acceptedTypes.length > 0) {
231
- helperTexts.push(acceptedTypes.join(", "));
232
- }
233
- helperTexts.push(`Maximum ${getFileSize(maxFileTotalSize)}`);
234
- if (maxCount) {
235
- helperTexts.push(`Up to ${maxCount} ${maxCount === 1 ? "file" : "files"}`);
236
- }
237
- return helperTexts.join(", ");
238
- }, [accepts, maxFileTotalSize, maxCount]);
239
- const error = useMemo(() => !!errorText || props.error, [props.error, errorText]);
240
- const showDropZone = useMemo(() => !maxCount || (maxCount && [...uploaded, ...files].length !== maxCount), [files, maxCount, uploaded]);
241
- const addFiles = useCallback((uploads) => {
242
- try {
243
- const types = parsedAccepts.map((type) => type.replace(".", "")) || [];
244
- const fileExtension = new RegExp(`${types.join("|")}`);
245
- uploads.forEach((file) => {
246
- const ext = file.name.split(".").pop() || "";
247
- if (!fileExtension.test(ext)) {
248
- throw new Error("Please upload acceptable file type.");
249
- }
250
- });
251
- if (maxFileSize) {
252
- uploads.forEach((file) => {
253
- if (file.size > maxFileSize) {
254
- throw new Error(`One or more File size exceeded the maximum limit. Each file size must be ${getFileSize(maxFileSize)} or less.`);
255
- }
256
- });
257
- }
258
- const totalFileSize = [...files, ...uploads].reduce((acc, file) => acc + file.size, 0);
259
- if (totalFileSize > maxFileTotalSize) {
260
- throw new Error(`Total File size exceeded the maximum limit.`);
261
- }
262
- const newFiles = [...files, ...uploads];
263
- if (maxCount && [...uploaded, ...newFiles].length > maxCount) {
264
- throw new Error(`Exceeded the maximum number of files.`);
265
- }
266
- onChange?.({
267
- target: {
268
- name,
269
- value: newFiles,
270
- },
271
- });
272
- setFiles(newFiles);
273
- setErrorText(undefined);
274
- }
275
- catch (error) {
276
- // TODO: localization, internationalization해야하는 reserved 에러 메세지, 필요한가?
277
- const err = error;
278
- setErrorText(err.message);
279
- }
280
- }, [
281
- files,
282
- uploaded,
283
- maxCount,
284
- parsedAccepts,
285
- maxFileSize,
286
- maxFileTotalSize,
287
- name,
288
- onChange,
289
- ]);
290
- // effects
291
- useEffect(() => {
292
- const el = dropZoneRef.current;
293
- if (!el ||
294
- disabled ||
295
- !combine ||
296
- !monitorForExternal ||
297
- !dropTargetForExternal ||
298
- !containsFiles ||
299
- !getFiles ||
300
- !preventUnhandled) {
301
- return;
302
- }
303
- return combine(dropTargetForExternal({
304
- element: el,
305
- canDrop: containsFiles,
306
- onDragEnter: () => setPreviewState("over"),
307
- onDragLeave: () => setPreviewState("potential"),
308
- onDrop: async ({ source }) => {
309
- const files = await getFiles({ source });
310
- addFiles(files);
311
- },
312
- }), monitorForExternal({
313
- canMonitor: containsFiles,
314
- onDragStart: () => {
315
- setPreviewState("potential");
316
- preventUnhandled.start();
317
- },
318
- onDrop: () => {
319
- setPreviewState("idle");
320
- preventUnhandled.stop();
321
- },
322
- }));
323
- }, [
324
- disabled,
325
- combine,
326
- monitorForExternal,
327
- dropTargetForExternal,
328
- containsFiles,
329
- getFiles,
330
- preventUnhandled,
331
- addFiles,
332
- ]);
333
- useEffect(() => {
334
- if (inputRef.current && minCount) {
335
- if (files.length < minCount) {
336
- inputRef.current.setCustomValidity(`At least ${minCount} files are required.`);
337
- }
338
- else {
339
- inputRef.current.setCustomValidity("");
340
- }
341
- }
342
- }, [inputRef, files, minCount]);
343
- // handlers
344
- const handleFileChanged = useCallback((event) => {
345
- const files = Array.from(event.target.files || []);
346
- addFiles(files);
347
- }, [addFiles]);
348
- const handleDeleteFile = useCallback((deletedFile) => {
349
- if (deletedFile instanceof File) {
350
- setFiles((current) => {
351
- onChange?.({
352
- target: {
353
- name,
354
- value: current.filter((file) => file !== deletedFile),
355
- },
356
- });
357
- return current.filter((file) => file !== deletedFile);
358
- });
359
- }
360
- else {
361
- setUploaded((uploaded) => uploaded.filter((file) => file.id !== deletedFile.id));
362
- // NOTE: 이미 업로드된 파일에 대해서만 onDeleted를 호출한다.
363
- onDelete?.(deletedFile);
364
- }
365
- setErrorText(undefined);
366
- }, [name, onChange, onDelete]);
367
- const handleUploaderButtonClick = useCallback(() => {
368
- inputRef.current?.click();
369
- }, []);
370
- const uploader = (React__default.createElement(FileDropZone, { state: previewState, error: !!(error || errorText), ref: dropZoneRef, onClick: handleUploaderButtonClick },
371
- React__default.createElement(Stack, { alignItems: "center", gap: 1 },
372
- React__default.createElement(UploaderIcon, { state: previewState, error: !!(error || errorText) })),
373
- React__default.createElement(VisuallyHiddenInput, { disabled: disabled, required: !!minCount, onInvalid: (e) => {
374
- if (minCount && files.length < minCount) {
375
- setErrorText(`Please choose ${minCount} ${minCount === 1 ? "file" : "files"} to upload.`);
376
- }
377
- }, slotProps: {
378
- input: {
379
- multiple: true,
380
- accept: parsedAccepts.join(","),
381
- type: "file",
382
- ref: inputRef,
383
- role: "button",
384
- onChange: handleFileChanged,
385
- },
386
- } })));
387
- return (React__default.createElement(UploaderRoot, null,
388
- showDropZone && (React__default.createElement(FormControl, { size: size, error: !!(error || errorText), disabled: disabled, required: !!minCount },
389
- label && React__default.createElement(FormLabel, null, label),
390
- uploader,
391
- React__default.createElement(FormHelperText, null,
392
- React__default.createElement(Stack, null,
393
- errorText && React__default.createElement("div", null, errorText),
394
- React__default.createElement("div", null, helperText))))),
395
- [...uploaded, ...files].length > 0 && (React__default.createElement(Preview, { files: files, uploaded: uploaded, onDelete: handleDeleteFile }))));
396
- });
397
- const Uploader = React__default.memo((props) => {
398
- return (React__default.createElement(AtlaskitProvider, null,
399
- React__default.createElement(_Uploader, { ...props })));
400
- });
401
-
402
- export { Uploader };
@@ -1,8 +0,0 @@
1
- /**
2
- * This key has been pulled into a separate module
3
- * so that the external adapter does not need to import
4
- * the element adapter
5
- */
6
- var elementAdapterNativeDataKey = 'application/vnd.pdnd';
7
-
8
- export { elementAdapterNativeDataKey };
@@ -1,245 +0,0 @@
1
- import _toConsumableArray from '../../../external/@babel/runtime/helpers/esm/toConsumableArray.js';
2
- import { d as distExports } from '../../../../../../_virtual/index.js';
3
- import { makeAdapter } from '../make-adapter/make-adapter.js';
4
- import { androidFallbackText } from '../util/android.js';
5
- import { isEnteringWindow } from '../util/changing-window/is-entering-window.js';
6
- import { getBindingsForBrokenDrags } from '../util/detect-broken-drag.js';
7
- import { textMediaType } from '../util/media-types/text-media-type.js';
8
- import { elementAdapterNativeDataKey } from './element-adapter-native-data-key.js';
9
-
10
- function isAnAvailableType(_ref) {
11
- var type = _ref.type,
12
- value = _ref.value;
13
- // We don't want to expose our private elementAdapter key / value
14
- if (type === elementAdapterNativeDataKey) {
15
- return false;
16
- }
17
- // Not exposing "text/plain" if it contains the android fallback text
18
- // We _could_ add an `isAndroid()` check, but it's probably safest
19
- // to trim this data out, regardless of what OS we see it on.
20
- if (type === textMediaType && value === androidFallbackText) {
21
- return false;
22
- }
23
- return true;
24
- }
25
- function getAvailableTypes(transfer) {
26
- return Array.from(transfer.types).filter(function (type) {
27
- return isAnAvailableType({
28
- type: type,
29
- value: transfer.getData(type)
30
- });
31
- });
32
- }
33
- function getAvailableItems(dataTransfer) {
34
- // item.kind is 'string' | 'file'
35
- // For 'string' item.type is the mimeType (eg 'text/plain')
36
- // For 'file' item.type is the file type (eg 'image/jpg')
37
-
38
- return Array.from(dataTransfer.items).filter(function (item) {
39
- return item.kind === 'file' || isAnAvailableType({
40
- type: item.type,
41
- value: dataTransfer.getData(item.type)
42
- });
43
- });
44
- }
45
- var didDragStartLocally = false;
46
- var adapter = makeAdapter({
47
- typeKey: 'external',
48
- // for external drags, we are generally making a copy of something that is being dragged
49
- defaultDropEffect: 'copy',
50
- mount: function mount(api) {
51
- // Binding to the `window` so that the element adapter
52
- // has a chance to get in first on the`document`.
53
- // We are giving preference to the element adapter.
54
- return distExports.bind(window, {
55
- type: 'dragenter',
56
- listener: function listener(event) {
57
- // drag operation was started within the document, it won't be an "external" drag
58
- if (didDragStartLocally) {
59
- return;
60
- }
61
-
62
- // Note: not checking if event was cancelled (`event.defaultPrevented`) as
63
- // cancelling a "dragenter" accepts the drag operation (not prevent it)
64
-
65
- // Something has gone wrong with our drag event
66
- if (!event.dataTransfer) {
67
- // Including this code on "test" and "development" environments:
68
- // - Browser tests commonly run against "development" builds
69
- // - Unit tests commonly run in "test"
70
- if (process.env.NODE_ENV !== 'production') {
71
- // eslint-disable-next-line no-console
72
- console.warn("\n It appears as though you have are not testing DragEvents correctly.\n\n - If you are unit testing, ensure you have polyfilled DragEvent.\n - If you are browser testing, ensure you are dispatching drag events correctly.\n\n Please see our testing guides for more information:\n https://atlassian.design/components/pragmatic-drag-and-drop/core-package/testing\n ".replace(/ {2}/g, ''));
73
- }
74
- return;
75
- }
76
- if (!api.canStart(event)) {
77
- return;
78
- }
79
- if (!isEnteringWindow({
80
- dragEnter: event
81
- })) {
82
- return;
83
- }
84
-
85
- // Note: not checking types for `elementAdapterNativeDataKey` as we expect to see that
86
- // key when pdnd started the drag in another document
87
- var types = getAvailableTypes(event.dataTransfer);
88
- if (!types.length) {
89
- return;
90
- }
91
- var locked = {
92
- types: types,
93
- items: [],
94
- getStringData: function getStringData() {
95
- return null;
96
- }
97
- };
98
- api.start({
99
- event: event,
100
- dragType: {
101
- type: 'external',
102
- startedFrom: 'external',
103
- payload: locked,
104
- getDropPayload: function getDropPayload(event) {
105
- // this would be a platform error
106
- // trying to handle it gracefully rather than throwing (for now)
107
- if (!event.dataTransfer) {
108
- return locked;
109
- }
110
- var items = getAvailableItems(event.dataTransfer);
111
- // need to use `.bind` as `getData` is required
112
- // to be run with `event.dataTransfer` as the "this" context
113
- var nativeGetData = event.dataTransfer.getData.bind(event.dataTransfer);
114
- return {
115
- types: types,
116
- items: items,
117
- // return `null` if there is no result, otherwise string
118
- getStringData: function getStringData(mediaType) {
119
- // not dragging the requested type
120
- // return `null` (no result)
121
- if (!types.includes(mediaType)) {
122
- return null;
123
- }
124
-
125
- // nativeGetData will return `""` when there is no value,
126
- // but at this point we know we will only get explicitly set
127
- // values back as we have checked the `types`.
128
- // `""` can be an explicitly set value.
129
- var value = nativeGetData(mediaType);
130
-
131
- // not exposing data for unavailable types
132
- if (!isAnAvailableType({
133
- type: mediaType,
134
- value: value
135
- })) {
136
- return null;
137
- }
138
- return value;
139
- }
140
- };
141
- }
142
- }
143
- });
144
- }
145
- });
146
- }
147
- });
148
-
149
- /**
150
- * Some events don't make sense for the external adapter
151
- *
152
- * `onGenerateDragPreview`
153
- * The browser creates the drag preview for external drags, so we don't
154
- * need an event to generate the preview for _monitors_ or the _dropTarget_
155
- *
156
- * `onDragStart`
157
- * An external drag can never start from in the `window`, so _dropTarget_'s
158
- * don't need `onDragStart`
159
- */
160
-
161
- function dropTargetForExternal(args) {
162
- // not removing unused events, just leaning on the type system
163
- return adapter.dropTarget(args);
164
- }
165
- function monitorForExternal(args) {
166
- // not removing unused events, just leaning on the type system
167
- return adapter.monitor(args);
168
- }
169
- (function startup() {
170
- // server side rendering check
171
- if (typeof window === 'undefined') {
172
- return;
173
- }
174
-
175
- // A shared single usage registration as we want to capture
176
- // all external drag operations, even if there are no drop targets
177
- // on the page yet
178
- adapter.registerUsage();
179
- // independent of pdnd, we need to keep track of
180
- // all drag operations so that we can know if a drag operation
181
- // has started locally
182
-
183
- var idle = {
184
- type: 'idle'
185
- };
186
- var state = idle;
187
- function clear() {
188
- if (state.type !== 'dragging') {
189
- return;
190
- }
191
- didDragStartLocally = false;
192
- state.cleanup();
193
- state = idle;
194
- }
195
- function bindEndEvents() {
196
- return distExports.bindAll(window, [{
197
- type: 'dragend',
198
- listener: clear
199
- }].concat(_toConsumableArray(getBindingsForBrokenDrags({
200
- onDragEnd: clear
201
- }))),
202
- // we want to make sure we get all the events,
203
- // and this helps avoid not seeing events when folks stop
204
- // them later on the event path
205
- {
206
- capture: true
207
- });
208
- }
209
-
210
- // we always keep this event listener active
211
- distExports.bind(window, {
212
- type: 'dragstart',
213
- listener: function listener() {
214
- // something bad has happened if this is true!
215
- if (state.type !== 'idle') {
216
- return;
217
- }
218
- // set our global flag
219
- didDragStartLocally = true;
220
- state = {
221
- type: 'dragging',
222
- cleanup: bindEndEvents()
223
- };
224
- },
225
- // binding in the capture phase so these listeners are called
226
- // before our listeners in the adapters `mount` function
227
- options: {
228
- capture: true
229
- }
230
- });
231
- })();
232
-
233
- /** Common event payload for all events */
234
-
235
- /** A map containing payloads for all events */
236
-
237
- /** Common event payload for all drop target events */
238
-
239
- /** A map containing payloads for all events on drop targets */
240
-
241
- /** Arguments given to all feedback functions (eg `canDrop()`) on a `dropTargetForExternal` */
242
-
243
- /** Arguments given to all monitor feedback functions (eg `canMonitor()`) for a `monitorForExternal` */
244
-
245
- export { dropTargetForExternal, getAvailableItems, getAvailableTypes, isAnAvailableType, monitorForExternal };
@@ -1 +0,0 @@
1
- export { combine } from '../public-utils/combine.js';
@@ -1 +0,0 @@
1
- export { dropTargetForExternal, monitorForExternal } from '../../adapter/external-adapter.js';
@@ -1 +0,0 @@
1
- export { containsFiles, getFiles } from '../../public-utils/external/file.js';
@@ -1 +0,0 @@
1
- export { preventUnhandled } from '../public-utils/prevent-unhandled.js';
@@ -1,19 +0,0 @@
1
- import _slicedToArray from '../../../external/@babel/runtime/helpers/esm/slicedToArray.js';
2
- import { isHoneyPotElement } from './is-honey-pot-element.js';
3
-
4
- function getElementFromPointWithoutHoneypot(client) {
5
- // eslint-disable-next-line no-restricted-syntax
6
- var _document$elementsFro = document.elementsFromPoint(client.x, client.y),
7
- _document$elementsFro2 = _slicedToArray(_document$elementsFro, 2),
8
- top = _document$elementsFro2[0],
9
- second = _document$elementsFro2[1];
10
- if (!top) {
11
- return null;
12
- }
13
- if (isHoneyPotElement(top)) {
14
- return second !== null && second !== undefined ? second : null;
15
- }
16
- return top;
17
- }
18
-
19
- export { getElementFromPointWithoutHoneypot };