@webiny/ui 5.24.0 → 5.25.0-beta.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 (372) hide show
  1. package/Accordion/Accordion.d.ts +1 -1
  2. package/Accordion/Accordion.js +1 -1
  3. package/Accordion/Accordion.js.map +1 -0
  4. package/Accordion/Accordion.stories.js.map +1 -0
  5. package/Accordion/AccordionItem.d.ts +4 -8
  6. package/Accordion/AccordionItem.js +1 -1
  7. package/Accordion/AccordionItem.js.map +1 -0
  8. package/Accordion/index.js.map +1 -0
  9. package/Alert/Alert.d.ts +4 -4
  10. package/Alert/Alert.js +1 -1
  11. package/Alert/Alert.js.map +1 -0
  12. package/Alert/Alert.stories.js.map +1 -0
  13. package/Alert/index.js.map +1 -0
  14. package/AutoComplete/AutoComplete.d.ts +5 -10
  15. package/AutoComplete/AutoComplete.js +6 -4
  16. package/AutoComplete/AutoComplete.js.map +1 -0
  17. package/AutoComplete/AutoComplete.stories.js.map +1 -0
  18. package/AutoComplete/MultiAutoComplete.d.ts +4 -11
  19. package/AutoComplete/MultiAutoComplete.js +9 -5
  20. package/AutoComplete/MultiAutoComplete.js.map +1 -0
  21. package/AutoComplete/MultiAutoComplete.stories.js.map +1 -0
  22. package/AutoComplete/index.js.map +1 -0
  23. package/AutoComplete/styles.js.map +1 -0
  24. package/AutoComplete/types.d.ts +4 -3
  25. package/AutoComplete/types.js.map +1 -0
  26. package/AutoComplete/utils.d.ts +3 -3
  27. package/AutoComplete/utils.js +1 -1
  28. package/AutoComplete/utils.js.map +1 -0
  29. package/Avatar/Avatar.d.ts +5 -11
  30. package/Avatar/Avatar.js +12 -7
  31. package/Avatar/Avatar.js.map +1 -0
  32. package/Avatar/Avatar.stories.js.map +1 -0
  33. package/Avatar/index.js.map +1 -0
  34. package/Button/Button.d.ts +1 -16
  35. package/Button/Button.js +7 -22
  36. package/Button/Button.js.map +1 -0
  37. package/Button/Button.stories.js.map +1 -0
  38. package/Button/CopyButton/CopyButton.d.ts +4 -7
  39. package/Button/CopyButton/CopyButton.js +1 -4
  40. package/Button/CopyButton/CopyButton.js.map +1 -0
  41. package/Button/CopyButton/CopyButton.stories.js.map +1 -0
  42. package/Button/IconButton/IconButton.d.ts +4 -7
  43. package/Button/IconButton/IconButton.js +1 -4
  44. package/Button/IconButton/IconButton.js.map +1 -0
  45. package/Button/IconButton/IconButton.stories.js.map +1 -0
  46. package/Button/index.js.map +1 -0
  47. package/Carousel/Carousel.d.ts +3 -3
  48. package/Carousel/Carousel.js +1 -1
  49. package/Carousel/Carousel.js.map +1 -0
  50. package/Carousel/Carouser.stories.js.map +1 -0
  51. package/Carousel/index.js.map +1 -0
  52. package/Checkbox/Checkbox.d.ts +1 -2
  53. package/Checkbox/Checkbox.js +8 -10
  54. package/Checkbox/Checkbox.js.map +1 -0
  55. package/Checkbox/Checkbox.stories.js.map +1 -0
  56. package/Checkbox/Checkbox.styles.js.map +1 -0
  57. package/Checkbox/CheckboxGroup.d.ts +1 -1
  58. package/Checkbox/CheckboxGroup.js +1 -1
  59. package/Checkbox/CheckboxGroup.js.map +1 -0
  60. package/Checkbox/CheckboxGroup.stories.js +1 -1
  61. package/Checkbox/CheckboxGroup.stories.js.map +1 -0
  62. package/Checkbox/index.js.map +1 -0
  63. package/Chips/Chip.d.ts +3 -8
  64. package/Chips/Chip.js +1 -1
  65. package/Chips/Chip.js.map +1 -0
  66. package/Chips/ChipIcon.d.ts +2 -2
  67. package/Chips/ChipIcon.js +1 -1
  68. package/Chips/ChipIcon.js.map +1 -0
  69. package/Chips/Chips.d.ts +4 -4
  70. package/Chips/Chips.js +1 -1
  71. package/Chips/Chips.js.map +1 -0
  72. package/Chips/Chips.stories.js.map +1 -0
  73. package/Chips/index.js.map +1 -0
  74. package/Chips/styles.js.map +1 -0
  75. package/CodeEditor/CodeEditor.d.ts +3 -4
  76. package/CodeEditor/CodeEditor.js +7 -10
  77. package/CodeEditor/CodeEditor.js.map +1 -0
  78. package/CodeEditor/CodeEditor.stories.js.map +1 -0
  79. package/CodeEditor/index.js.map +1 -0
  80. package/ColorPicker/ColorPicker.d.ts +7 -5
  81. package/ColorPicker/ColorPicker.js +8 -11
  82. package/ColorPicker/ColorPicker.js.map +1 -0
  83. package/ColorPicker/ColorPicker.stories.js +1 -1
  84. package/ColorPicker/ColorPicker.stories.js.map +1 -0
  85. package/ColorPicker/index.js.map +1 -0
  86. package/ConfirmationDialog/ConfirmationDialog.d.ts +12 -12
  87. package/ConfirmationDialog/ConfirmationDialog.js +7 -4
  88. package/ConfirmationDialog/ConfirmationDialog.js.map +1 -0
  89. package/ConfirmationDialog/ConfirmationDialog.stories.js +1 -1
  90. package/ConfirmationDialog/ConfirmationDialog.stories.js.map +1 -0
  91. package/ConfirmationDialog/index.js.map +1 -0
  92. package/ConfirmationDialog/withConfirmation.d.ts +1 -1
  93. package/ConfirmationDialog/withConfirmation.js +1 -1
  94. package/ConfirmationDialog/withConfirmation.js.map +1 -0
  95. package/Dialog/Dialog.d.ts +20 -28
  96. package/Dialog/Dialog.js +4 -1
  97. package/Dialog/Dialog.js.map +1 -0
  98. package/Dialog/Dialog.stories.js.map +1 -0
  99. package/Dialog/index.js.map +1 -0
  100. package/Drawer/Drawer.d.ts +1 -1
  101. package/Drawer/Drawer.js +1 -1
  102. package/Drawer/Drawer.js.map +1 -0
  103. package/Drawer/Drawer.stories.js.map +1 -0
  104. package/Drawer/index.js.map +1 -0
  105. package/DynamicFieldset/Fieldset.d.ts +5 -5
  106. package/DynamicFieldset/Fieldset.js +21 -14
  107. package/DynamicFieldset/Fieldset.js.map +1 -0
  108. package/DynamicFieldset/index.js.map +1 -0
  109. package/Elevation/Elevation.d.ts +1 -1
  110. package/Elevation/Elevation.js +1 -1
  111. package/Elevation/Elevation.js.map +1 -0
  112. package/Elevation/Elevation.stories.js +1 -1
  113. package/Elevation/Elevation.stories.js.map +1 -0
  114. package/Elevation/index.js.map +1 -0
  115. package/FormElementMessage/FormElementMessage.d.ts +1 -1
  116. package/FormElementMessage/FormElementMessage.js +1 -1
  117. package/FormElementMessage/FormElementMessage.js.map +1 -0
  118. package/FormElementMessage/index.js.map +1 -0
  119. package/FullName/FullName.js.map +1 -0
  120. package/FullName/index.js.map +1 -0
  121. package/Grid/Grid.d.ts +1 -1
  122. package/Grid/Grid.js +1 -1
  123. package/Grid/Grid.js.map +1 -0
  124. package/Grid/Grid.stories.js.map +1 -0
  125. package/Grid/index.js.map +1 -0
  126. package/Helpers/ClassNames.d.ts +4 -3
  127. package/Helpers/ClassNames.js +5 -3
  128. package/Helpers/ClassNames.js.map +1 -0
  129. package/Helpers/index.js.map +1 -0
  130. package/Icon/Icon.d.ts +1 -1
  131. package/Icon/Icon.js +1 -1
  132. package/Icon/Icon.js.map +1 -0
  133. package/Icon/Icon.stories.js.map +1 -0
  134. package/Icon/index.js.map +1 -0
  135. package/Image/Image.d.ts +4 -4
  136. package/Image/Image.js +6 -4
  137. package/Image/Image.js.map +1 -0
  138. package/Image/Image.stories.js +1 -1
  139. package/Image/Image.stories.js.map +1 -0
  140. package/Image/index.js.map +1 -0
  141. package/ImageEditor/ImageEditor.d.ts +24 -24
  142. package/ImageEditor/ImageEditor.js +18 -18
  143. package/ImageEditor/ImageEditor.js.map +1 -0
  144. package/ImageEditor/index.js.map +1 -0
  145. package/ImageEditor/toolbar/crop.js +2 -2
  146. package/ImageEditor/toolbar/crop.js.map +1 -0
  147. package/ImageEditor/toolbar/filter.js.map +1 -0
  148. package/ImageEditor/toolbar/flip.js +1 -1
  149. package/ImageEditor/toolbar/flip.js.map +1 -0
  150. package/ImageEditor/toolbar/icons/index.js.map +1 -0
  151. package/ImageEditor/toolbar/index.js.map +1 -0
  152. package/ImageEditor/toolbar/rotate.js +5 -1
  153. package/ImageEditor/toolbar/rotate.js.map +1 -0
  154. package/ImageEditor/toolbar/types.d.ts +1 -1
  155. package/ImageEditor/toolbar/types.js.map +1 -0
  156. package/ImageUpload/Image.d.ts +6 -6
  157. package/ImageUpload/Image.js +1 -1
  158. package/ImageUpload/Image.js.map +1 -0
  159. package/ImageUpload/ImageEditorDialog.d.ts +5 -4
  160. package/ImageUpload/ImageEditorDialog.js +7 -2
  161. package/ImageUpload/ImageEditorDialog.js.map +1 -0
  162. package/ImageUpload/MultiImageUpload.d.ts +5 -5
  163. package/ImageUpload/MultiImageUpload.js +21 -16
  164. package/ImageUpload/MultiImageUpload.js.map +1 -0
  165. package/ImageUpload/MultiImageUpload.stories.js.map +1 -0
  166. package/ImageUpload/SingleImageUpload.d.ts +14 -13
  167. package/ImageUpload/SingleImageUpload.js +18 -12
  168. package/ImageUpload/SingleImageUpload.js.map +1 -0
  169. package/ImageUpload/SingleImageUpload.stories.js.map +1 -0
  170. package/ImageUpload/index.js.map +1 -0
  171. package/ImageUpload/styled.d.ts +18 -14
  172. package/ImageUpload/styled.js.map +1 -0
  173. package/Input/Input.d.ts +1 -1
  174. package/Input/Input.js +8 -8
  175. package/Input/Input.js.map +1 -0
  176. package/Input/Input.stories.js +1 -1
  177. package/Input/Input.stories.js.map +1 -0
  178. package/Input/__tests__/Input.test.js +32 -26
  179. package/Input/__tests__/Input.test.js.map +1 -0
  180. package/Input/index.js.map +1 -0
  181. package/List/CollapsibleList/CollapsibleList.stories.js.map +1 -0
  182. package/List/CollapsibleList/index.d.ts +2 -2
  183. package/List/CollapsibleList/index.js +1 -1
  184. package/List/CollapsibleList/index.js.map +1 -0
  185. package/List/DataList/DataList.d.ts +16 -12
  186. package/List/DataList/DataList.js +41 -11
  187. package/List/DataList/DataList.js.map +1 -0
  188. package/List/DataList/DataList.stories.js.map +1 -0
  189. package/List/DataList/DataListModalOverlay/DataListModalOverlay.d.ts +7 -8
  190. package/List/DataList/DataListModalOverlay/DataListModalOverlay.js.map +1 -0
  191. package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.d.ts +3 -3
  192. package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js.map +1 -0
  193. package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.d.ts +9 -4
  194. package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js +6 -1
  195. package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js.map +1 -0
  196. package/List/DataList/DataListModalOverlay/index.js.map +1 -0
  197. package/List/DataList/Loader.d.ts +2 -2
  198. package/List/DataList/Loader.js +1 -1
  199. package/List/DataList/Loader.js.map +1 -0
  200. package/List/DataList/NoData.d.ts +2 -2
  201. package/List/DataList/NoData.js +1 -1
  202. package/List/DataList/NoData.js.map +1 -0
  203. package/List/DataList/icons/index.d.ts +1 -1
  204. package/List/DataList/icons/index.js +1 -1
  205. package/List/DataList/icons/index.js.map +1 -0
  206. package/List/DataList/index.js.map +1 -0
  207. package/List/DataList/types.d.ts +1 -1
  208. package/List/DataList/types.js.map +1 -0
  209. package/List/List.d.ts +1 -1
  210. package/List/List.js +1 -1
  211. package/List/List.js.map +1 -0
  212. package/List/List.stories.js.map +1 -0
  213. package/List/icons/index.js.map +1 -0
  214. package/List/index.js.map +1 -0
  215. package/Menu/Menu.d.ts +13 -15
  216. package/Menu/Menu.js +1 -2
  217. package/Menu/Menu.js.map +1 -0
  218. package/Menu/Menu.stories.js.map +1 -0
  219. package/Menu/index.js.map +1 -0
  220. package/Mosaic/Mosaic.js.map +1 -0
  221. package/Mosaic/Mosaic.stories.js +1 -1
  222. package/Mosaic/Mosaic.stories.js.map +1 -0
  223. package/Mosaic/index.js.map +1 -0
  224. package/Progress/CircularProgress.d.ts +3 -3
  225. package/Progress/CircularProgress.js +12 -8
  226. package/Progress/CircularProgress.js.map +1 -0
  227. package/Progress/index.js.map +1 -0
  228. package/Radio/Radio.d.ts +1 -2
  229. package/Radio/Radio.js +8 -10
  230. package/Radio/Radio.js.map +1 -0
  231. package/Radio/Radio.styles.js.map +1 -0
  232. package/Radio/RadioGroup.d.ts +1 -2
  233. package/Radio/RadioGroup.js +8 -11
  234. package/Radio/RadioGroup.js.map +1 -0
  235. package/Radio/RadioGroup.stories.js +1 -1
  236. package/Radio/RadioGroup.stories.js.map +1 -0
  237. package/Radio/index.js.map +1 -0
  238. package/RichTextEditor/RichTextEditor.js +26 -4
  239. package/RichTextEditor/RichTextEditor.js.map +1 -0
  240. package/RichTextEditor/RichTextEditor.stories.js +1 -1
  241. package/RichTextEditor/RichTextEditor.stories.js.map +1 -0
  242. package/RichTextEditor/createPropsFromConfig.js.map +1 -0
  243. package/RichTextEditor/index.js.map +1 -0
  244. package/Ripple/Ripple.d.ts +1 -1
  245. package/Ripple/Ripple.js +1 -1
  246. package/Ripple/Ripple.js.map +1 -0
  247. package/Ripple/Ripple.stories.js +1 -1
  248. package/Ripple/Ripple.stories.js.map +1 -0
  249. package/Ripple/index.js.map +1 -0
  250. package/Scrollbar/Scrollbar.d.ts +1 -1
  251. package/Scrollbar/Scrollbar.js +1 -1
  252. package/Scrollbar/Scrollbar.js.map +1 -0
  253. package/Scrollbar/Scrollbar.stories.js +1 -1
  254. package/Scrollbar/Scrollbar.stories.js.map +1 -0
  255. package/Scrollbar/index.js.map +1 -0
  256. package/Section/Section.stories.js.map +1 -0
  257. package/Section/index.d.ts +1 -1
  258. package/Section/index.js +1 -1
  259. package/Section/index.js.map +1 -0
  260. package/Select/Select.d.ts +1 -1
  261. package/Select/Select.js +60 -10
  262. package/Select/Select.js.map +1 -0
  263. package/Select/Select.stories.js.map +1 -0
  264. package/Select/index.js.map +1 -0
  265. package/Slider/Slider.d.ts +1 -2
  266. package/Slider/Slider.js +7 -10
  267. package/Slider/Slider.js.map +1 -0
  268. package/Slider/Slider.stories.js +1 -1
  269. package/Slider/Slider.stories.js.map +1 -0
  270. package/Slider/index.js.map +1 -0
  271. package/Snackbar/Snackbar.d.ts +3 -6
  272. package/Snackbar/Snackbar.js +2 -5
  273. package/Snackbar/Snackbar.js.map +1 -0
  274. package/Snackbar/Snackbar.stories.js +1 -1
  275. package/Snackbar/Snackbar.stories.js.map +1 -0
  276. package/Snackbar/index.js.map +1 -0
  277. package/Switch/Switch.d.ts +1 -2
  278. package/Switch/Switch.js +8 -10
  279. package/Switch/Switch.js.map +1 -0
  280. package/Switch/Switch.stories.js.map +1 -0
  281. package/Switch/index.js.map +1 -0
  282. package/Tabs/Tab.d.ts +2 -2
  283. package/Tabs/Tab.js +1 -1
  284. package/Tabs/Tab.js.map +1 -0
  285. package/Tabs/Tabs.d.ts +3 -3
  286. package/Tabs/Tabs.js +28 -16
  287. package/Tabs/Tabs.js.map +1 -0
  288. package/Tabs/Tabs.stories.js +1 -1
  289. package/Tabs/Tabs.stories.js.map +1 -0
  290. package/Tabs/index.js.map +1 -0
  291. package/Tags/Tags.d.ts +8 -7
  292. package/Tags/Tags.js +7 -11
  293. package/Tags/Tags.js.map +1 -0
  294. package/Tags/Tags.stories.js.map +1 -0
  295. package/Tags/index.js.map +1 -0
  296. package/Tooltip/Tooltip.d.ts +7 -4
  297. package/Tooltip/Tooltip.js +2 -2
  298. package/Tooltip/Tooltip.js.map +1 -0
  299. package/Tooltip/Tooltip.stories.js.map +1 -0
  300. package/Tooltip/index.js.map +1 -0
  301. package/TopAppBar/TopAppBar.d.ts +1 -1
  302. package/TopAppBar/TopAppBar.js +1 -1
  303. package/TopAppBar/TopAppBar.js.map +1 -0
  304. package/TopAppBar/TopAppBar.stories.js.map +1 -0
  305. package/TopAppBar/TopAppBarActionItem.js +1 -1
  306. package/TopAppBar/TopAppBarActionItem.js.map +1 -0
  307. package/TopAppBar/TopAppBarNavigationIcon.js +1 -1
  308. package/TopAppBar/TopAppBarNavigationIcon.js.map +1 -0
  309. package/TopAppBar/TopAppBarPrimary.js +1 -1
  310. package/TopAppBar/TopAppBarPrimary.js.map +1 -0
  311. package/TopAppBar/TopAppBarSecondary.js +1 -1
  312. package/TopAppBar/TopAppBarSecondary.js.map +1 -0
  313. package/TopAppBar/TopAppBarSection.d.ts +1 -1
  314. package/TopAppBar/TopAppBarSection.js +1 -1
  315. package/TopAppBar/TopAppBarSection.js.map +1 -0
  316. package/TopAppBar/TopAppBarTitle.d.ts +1 -1
  317. package/TopAppBar/TopAppBarTitle.js +1 -1
  318. package/TopAppBar/TopAppBarTitle.js.map +1 -0
  319. package/TopAppBar/index.js.map +1 -0
  320. package/TopProgressBar/TopProgressBar.d.ts +2 -2
  321. package/TopProgressBar/TopProgressBar.js.map +1 -0
  322. package/TopProgressBar/TopProgressBar.stories.js +1 -1
  323. package/TopProgressBar/TopProgressBar.stories.js.map +1 -0
  324. package/TopProgressBar/hoc/index.js.map +1 -0
  325. package/TopProgressBar/hoc/withTopProgressBar.d.ts +1 -1
  326. package/TopProgressBar/hoc/withTopProgressBar.js +1 -1
  327. package/TopProgressBar/hoc/withTopProgressBar.js.map +1 -0
  328. package/TopProgressBar/index.js.map +1 -0
  329. package/Typography/Typography.d.ts +1 -1
  330. package/Typography/Typography.js +1 -1
  331. package/Typography/Typography.js.map +1 -0
  332. package/Typography/Typography.stories.js +1 -1
  333. package/Typography/Typography.stories.js.map +1 -0
  334. package/Typography/index.js.map +1 -0
  335. package/package.json +17 -13
  336. package/rmwc/base/LICENSE +21 -0
  337. package/rmwc/base/README.md +3 -0
  338. package/rmwc/base/code/component.d.ts +18 -0
  339. package/rmwc/base/code/component.js +163 -0
  340. package/rmwc/base/code/foundation-component.d.ts +79 -0
  341. package/rmwc/base/code/foundation-component.js +354 -0
  342. package/rmwc/base/code/index.d.ts +16 -0
  343. package/rmwc/base/code/index.js +25 -0
  344. package/rmwc/base/code/test-polyfill.d.ts +3 -0
  345. package/rmwc/base/code/test-polyfill.js +33 -0
  346. package/rmwc/base/code/utils/apply-passive.d.ts +8 -0
  347. package/rmwc/base/code/utils/apply-passive.js +63 -0
  348. package/rmwc/base/code/utils/debounce.d.ts +2 -0
  349. package/rmwc/base/code/utils/debounce.js +17 -0
  350. package/rmwc/base/code/utils/deprecation.d.ts +6 -0
  351. package/rmwc/base/code/utils/deprecation.js +76 -0
  352. package/rmwc/base/code/utils/emitter.d.ts +13 -0
  353. package/rmwc/base/code/utils/emitter.js +120 -0
  354. package/rmwc/base/code/utils/events-map.d.ts +87 -0
  355. package/rmwc/base/code/utils/events-map.js +90 -0
  356. package/rmwc/base/code/utils/index.d.ts +10 -0
  357. package/rmwc/base/code/utils/index.js +19 -0
  358. package/rmwc/base/code/utils/ponyfills.d.ts +3 -0
  359. package/rmwc/base/code/utils/ponyfills.js +29 -0
  360. package/rmwc/base/code/utils/random-id.d.ts +6 -0
  361. package/rmwc/base/code/utils/random-id.js +14 -0
  362. package/rmwc/base/code/utils/strings.d.ts +3 -0
  363. package/rmwc/base/code/utils/strings.js +13 -0
  364. package/rmwc/base/code/utils/use-knob.d.ts +2 -0
  365. package/rmwc/base/code/utils/use-knob.js +64 -0
  366. package/rmwc/base/code/utils/wrap-child.d.ts +3 -0
  367. package/rmwc/base/code/utils/wrap-child.js +55 -0
  368. package/rmwc/base/code/with-theme.d.ts +15 -0
  369. package/rmwc/base/code/with-theme.js +106 -0
  370. package/rmwc/base/package.json +40 -0
  371. package/types.d.ts +2 -2
  372. package/types.js.map +1 -0
@@ -0,0 +1,163 @@
1
+ /* eslint-disable */
2
+ "use strict";
3
+ var __assign =
4
+ (this && this.__assign) ||
5
+ function () {
6
+ __assign =
7
+ Object.assign ||
8
+ function (t) {
9
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
10
+ s = arguments[i];
11
+ for (var p in s) {
12
+ if (Object.prototype.hasOwnProperty.call(s, p)) {
13
+ t[p] = s[p];
14
+ }
15
+ }
16
+ }
17
+ return t;
18
+ };
19
+ return __assign.apply(this, arguments);
20
+ };
21
+ var __rest =
22
+ (this && this.__rest) ||
23
+ function (s, e) {
24
+ var t = {};
25
+ for (var p in s) {
26
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) {
27
+ t[p] = s[p];
28
+ }
29
+ }
30
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") {
31
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
32
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) {
33
+ t[p[i]] = s[p[i]];
34
+ }
35
+ }
36
+ }
37
+ return t;
38
+ };
39
+ var __read =
40
+ (this && this.__read) ||
41
+ function (o, n) {
42
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
43
+ if (!m) {
44
+ return o;
45
+ }
46
+ var i = m.call(o),
47
+ r,
48
+ ar = [],
49
+ e;
50
+ try {
51
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
52
+ ar.push(r.value);
53
+ }
54
+ } catch (error) {
55
+ e = { error: error };
56
+ } finally {
57
+ try {
58
+ if (r && !r.done && (m = i["return"])) {
59
+ m.call(i);
60
+ }
61
+ } finally {
62
+ if (e) {
63
+ throw e.error;
64
+ }
65
+ }
66
+ }
67
+ return ar;
68
+ };
69
+ var __spread =
70
+ (this && this.__spread) ||
71
+ function () {
72
+ for (var ar = [], i = 0; i < arguments.length; i++) {
73
+ ar = ar.concat(__read(arguments[i]));
74
+ }
75
+ return ar;
76
+ };
77
+ var __importStar =
78
+ (this && this.__importStar) ||
79
+ function (mod) {
80
+ if (mod && mod.__esModule) {
81
+ return mod;
82
+ }
83
+ var result = {};
84
+ if (mod != null) {
85
+ for (var k in mod) {
86
+ if (Object.hasOwnProperty.call(mod, k)) {
87
+ result[k] = mod[k];
88
+ }
89
+ }
90
+ }
91
+ result["default"] = mod;
92
+ return result;
93
+ };
94
+ var __importDefault =
95
+ (this && this.__importDefault) ||
96
+ function (mod) {
97
+ return mod && mod.__esModule ? mod : { default: mod };
98
+ };
99
+ Object.defineProperty(exports, "__esModule", { value: true });
100
+ var React = __importStar(require("react"));
101
+ var classnames_1 = __importDefault(require("classnames"));
102
+ var with_theme_1 = require("./with-theme");
103
+ var deprecation_1 = require("./utils/deprecation");
104
+ // ALL OF THESE FUNCTIONS MUTATE THE COPY OF PROPS
105
+ // this is intentional and done for speed and memory
106
+ var handleClassNames = function (props, classNames, className, theme) {
107
+ var finalClassNames = classnames_1.default.apply(
108
+ void 0,
109
+ __spread(
110
+ [className],
111
+ !!theme ? with_theme_1.parseThemeOptions(theme) : [],
112
+ typeof classNames === "function" ? classNames(props) : classNames
113
+ )
114
+ );
115
+ props.className = finalClassNames;
116
+ };
117
+ var handleTag = function (props, defaultTag, tag) {
118
+ // Handle the case where we are extending a component but passing
119
+ // a string as a tag. For instance, extending an Icon but rendering a span
120
+ if (typeof defaultTag !== "string") {
121
+ props.tag = tag;
122
+ return defaultTag;
123
+ }
124
+ return tag || defaultTag;
125
+ };
126
+ var handleConsumeProps = function (props, consumeProps) {
127
+ consumeProps.forEach(function (p) {
128
+ delete props[p];
129
+ });
130
+ };
131
+ exports.componentFactory = function (_a) {
132
+ var displayName = _a.displayName,
133
+ _b = _a.classNames,
134
+ classNames = _b === void 0 ? [] : _b,
135
+ _c = _a.tag,
136
+ defaultTag = _c === void 0 ? "div" : _c,
137
+ deprecate = _a.deprecate,
138
+ defaultProps = _a.defaultProps,
139
+ _d = _a.consumeProps,
140
+ consumeProps = _d === void 0 ? [] : _d,
141
+ render = _a.render;
142
+ var Component = React.forwardRef(function (props, ref) {
143
+ var className = props.className,
144
+ theme = props.theme,
145
+ tag = props.tag,
146
+ rest = __rest(props, ["className", "theme", "tag"]);
147
+ var newProps = rest;
148
+ handleClassNames(newProps, classNames, className, theme);
149
+ var Tag = handleTag(newProps, defaultTag, tag);
150
+ if (deprecate) {
151
+ newProps = deprecation_1.handleDeprecations(newProps, deprecate, displayName);
152
+ }
153
+ handleConsumeProps(newProps, consumeProps);
154
+ var finalProps = newProps;
155
+ // @ts-ignore
156
+ return render
157
+ ? render(finalProps, ref, Tag)
158
+ : React.createElement(Tag, __assign({}, finalProps, { ref: ref }));
159
+ });
160
+ Component.displayName = displayName;
161
+ Component.defaultProps = defaultProps;
162
+ return Component;
163
+ };
@@ -0,0 +1,79 @@
1
+ /* eslint-disable */
2
+ import * as RMWC from "@rmwc/types";
3
+ import { SpecificEventListener } from "@material/base/types";
4
+ import * as React from "react";
5
+ export declare class FoundationElement<Props, ElementType = HTMLElement> {
6
+ private _classes;
7
+ private _events;
8
+ private _style;
9
+ private _props;
10
+ private _ref;
11
+ _onChange: (() => void) | null;
12
+ constructor(onChange: () => void);
13
+ onChange(): void;
14
+ destroy(): void;
15
+ /**************************************************
16
+ * Classes
17
+ **************************************************/
18
+ addClass(className: string): void;
19
+ removeClass(className: string): void;
20
+ hasClass(className: string): boolean;
21
+ /**************************************************
22
+ * Props
23
+ **************************************************/
24
+ setProp(propName: keyof Props, value: any): void;
25
+ getProp(propName: keyof Props): Partial<Props>[keyof Props];
26
+ removeProp(propName: keyof Props): void;
27
+ props(propsToMerge: { [key: string]: any }): any;
28
+ /**************************************************
29
+ * Styles
30
+ **************************************************/
31
+ setStyle(propertyName: string, value: number | string | null): void;
32
+ /**************************************************
33
+ * Events
34
+ **************************************************/
35
+ addEventListener(evtName: string, callback: SpecificEventListener<any>): void;
36
+ removeEventListener(evtName: string, callback: SpecificEventListener<any>): void;
37
+ /**************************************************
38
+ * Refs
39
+ **************************************************/
40
+ setRef(el: any): void;
41
+ readonly ref: ElementType | null;
42
+ }
43
+ declare type ExtractProps<TComponentOrTProps> = TComponentOrTProps extends React.Component<
44
+ infer TProps,
45
+ any
46
+ >
47
+ ? TProps
48
+ : TComponentOrTProps;
49
+ export interface FoundationProps extends RMWC.ComponentProps {}
50
+ interface FoundationState {}
51
+ declare type FoundationPropsT<P> = RMWC.MergeInterfacesT<P, FoundationProps>;
52
+ declare type FoundationStateT<S> = S & FoundationState;
53
+ export declare class FoundationComponent<
54
+ Foundation extends any,
55
+ P,
56
+ S extends any = {}
57
+ > extends React.Component<FoundationPropsT<P>, FoundationStateT<S>> {
58
+ static shouldDebounce: boolean;
59
+ foundation: Foundation;
60
+ elements: {
61
+ [key: string]: FoundationElement<any, any>;
62
+ };
63
+ constructor(props: any);
64
+ public override componentDidMount(): void;
65
+ componentDidUpdate(prevProps: FoundationPropsT<P>): void;
66
+ componentWillUnmount(): void;
67
+ createElement<ElementType extends HTMLElement = HTMLElement>(
68
+ elementName: string
69
+ ): FoundationElement<ExtractProps<ElementType>, ElementType>;
70
+ update(): void;
71
+ sync(props: any, prevProps?: any): void;
72
+ syncProp(prop: any, prevProp: any, callback: () => void): void;
73
+ getDefaultFoundation(): Foundation;
74
+ /**
75
+ * Fires a cross-browser-compatible custom event from the component root of the given type,
76
+ */
77
+ emit(evtType: string, evtData: any, shouldBubble?: boolean): CustomEvent<any>;
78
+ }
79
+ export {};
@@ -0,0 +1,354 @@
1
+ /* eslint-disable */
2
+ "use strict";
3
+ var __extends =
4
+ (this && this.__extends) ||
5
+ (function () {
6
+ var extendStatics = function (d, b) {
7
+ extendStatics =
8
+ Object.setPrototypeOf ||
9
+ ({ __proto__: [] } instanceof Array &&
10
+ function (d, b) {
11
+ d.__proto__ = b;
12
+ }) ||
13
+ function (d, b) {
14
+ for (var p in b) {
15
+ if (b.hasOwnProperty(p)) {
16
+ d[p] = b[p];
17
+ }
18
+ }
19
+ };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ extendStatics(d, b);
24
+ function __() {
25
+ this.constructor = d;
26
+ }
27
+ d.prototype = b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
28
+ };
29
+ })();
30
+ var __assign =
31
+ (this && this.__assign) ||
32
+ function () {
33
+ __assign =
34
+ Object.assign ||
35
+ function (t) {
36
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
37
+ s = arguments[i];
38
+ for (var p in s) {
39
+ if (Object.prototype.hasOwnProperty.call(s, p)) {
40
+ t[p] = s[p];
41
+ }
42
+ }
43
+ }
44
+ return t;
45
+ };
46
+ return __assign.apply(this, arguments);
47
+ };
48
+ var __read =
49
+ (this && this.__read) ||
50
+ function (o, n) {
51
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
52
+ if (!m) {
53
+ return o;
54
+ }
55
+ var i = m.call(o),
56
+ r,
57
+ ar = [],
58
+ e;
59
+ try {
60
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
61
+ ar.push(r.value);
62
+ }
63
+ } catch (error) {
64
+ e = { error: error };
65
+ } finally {
66
+ try {
67
+ if (r && !r.done && (m = i["return"])) {
68
+ m.call(i);
69
+ }
70
+ } finally {
71
+ if (e) {
72
+ throw e.error;
73
+ }
74
+ }
75
+ }
76
+ return ar;
77
+ };
78
+ var __spread =
79
+ (this && this.__spread) ||
80
+ function () {
81
+ for (var ar = [], i = 0; i < arguments.length; i++) {
82
+ ar = ar.concat(__read(arguments[i]));
83
+ }
84
+ return ar;
85
+ };
86
+ var __importStar =
87
+ (this && this.__importStar) ||
88
+ function (mod) {
89
+ if (mod && mod.__esModule) {
90
+ return mod;
91
+ }
92
+ var result = {};
93
+ if (mod != null) {
94
+ for (var k in mod) {
95
+ if (Object.hasOwnProperty.call(mod, k)) {
96
+ result[k] = mod[k];
97
+ }
98
+ }
99
+ }
100
+ result["default"] = mod;
101
+ return result;
102
+ };
103
+ var __importDefault =
104
+ (this && this.__importDefault) ||
105
+ function (mod) {
106
+ return mod && mod.__esModule ? mod : { default: mod };
107
+ };
108
+ Object.defineProperty(exports, "__esModule", { value: true });
109
+ var React = __importStar(require("react"));
110
+ var classnames_1 = __importDefault(require("classnames"));
111
+ var events_map_1 = require("./utils/events-map");
112
+ var debounce_1 = require("./utils/debounce");
113
+ var strings_1 = require("./utils/strings");
114
+ var reactPropFromEventName = function (evtName) {
115
+ return events_map_1.eventsMap[evtName] || evtName;
116
+ };
117
+ var FoundationElement = /** @class */ (function () {
118
+ function FoundationElement(onChange) {
119
+ this._classes = new Set();
120
+ this._events = {};
121
+ this._style = {};
122
+ this._props = {};
123
+ this._ref = null;
124
+ this._onChange = null;
125
+ this._onChange = onChange;
126
+ this.onChange = this.onChange.bind(this);
127
+ this.addClass = this.addClass.bind(this);
128
+ this.removeClass = this.removeClass.bind(this);
129
+ this.hasClass = this.hasClass.bind(this);
130
+ this.setProp = this.setProp.bind(this);
131
+ this.getProp = this.getProp.bind(this);
132
+ this.removeProp = this.removeProp.bind(this);
133
+ this.setStyle = this.setStyle.bind(this);
134
+ this.addEventListener = this.addEventListener.bind(this);
135
+ this.removeEventListener = this.removeEventListener.bind(this);
136
+ this.setRef = this.setRef.bind(this);
137
+ }
138
+ FoundationElement.prototype.onChange = function () {
139
+ this._onChange && this._onChange();
140
+ };
141
+ FoundationElement.prototype.destroy = function () {
142
+ this._onChange = null;
143
+ this._ref = null;
144
+ this._events = {};
145
+ this._style = {};
146
+ this._props = {};
147
+ this._classes = new Set();
148
+ };
149
+ /**************************************************
150
+ * Classes
151
+ **************************************************/
152
+ FoundationElement.prototype.addClass = function (className) {
153
+ if (!this._classes.has(className)) {
154
+ this._classes.add(className);
155
+ this.onChange();
156
+ }
157
+ };
158
+ FoundationElement.prototype.removeClass = function (className) {
159
+ if (this._classes.has(className)) {
160
+ this._classes.delete(className);
161
+ this.onChange();
162
+ }
163
+ };
164
+ FoundationElement.prototype.hasClass = function (className) {
165
+ return this._classes.has(className);
166
+ };
167
+ /**************************************************
168
+ * Props
169
+ **************************************************/
170
+ FoundationElement.prototype.setProp = function (propName, value) {
171
+ if (this._props[propName] !== value) {
172
+ this._props[propName] = value;
173
+ this.onChange();
174
+ }
175
+ };
176
+ FoundationElement.prototype.getProp = function (propName) {
177
+ return this._props[propName];
178
+ };
179
+ FoundationElement.prototype.removeProp = function (propName) {
180
+ if (this._props[propName] !== undefined) {
181
+ delete this._props[propName];
182
+ this.onChange();
183
+ }
184
+ };
185
+ FoundationElement.prototype.props = function (propsToMerge) {
186
+ var _this = this;
187
+ var _a = propsToMerge.className,
188
+ className = _a === void 0 ? "" : _a,
189
+ _b = propsToMerge.style,
190
+ style = _b === void 0 ? {} : _b;
191
+ // handle merging events
192
+ // the foundation should be able to pass something onClick as well as a user
193
+ // This wraps them in a function that calls both
194
+ var mergedEvents = Object.entries(propsToMerge).reduce(function (acc, _a) {
195
+ var _b = __read(_a, 2),
196
+ key = _b[0],
197
+ possibleCallback = _b[1];
198
+ var existingCallback = _this._events[key];
199
+ if (typeof possibleCallback === "function" && typeof existingCallback === "function") {
200
+ var wrappedCallback = function (evt) {
201
+ existingCallback(evt);
202
+ return possibleCallback(evt);
203
+ };
204
+ acc[key] = wrappedCallback;
205
+ }
206
+ return acc;
207
+ }, __assign({}, this._events));
208
+ // handle className
209
+ var mergedClasses = classnames_1.default(className, __spread(this._classes));
210
+ // handle styles
211
+ var mergedStyles = __assign({}, this._style, style);
212
+ return __assign({}, propsToMerge, this._props, mergedEvents, {
213
+ style: mergedStyles,
214
+ className: mergedClasses
215
+ });
216
+ };
217
+ /**************************************************
218
+ * Styles
219
+ **************************************************/
220
+ FoundationElement.prototype.setStyle = function (propertyName, value) {
221
+ propertyName = propertyName.startsWith("--")
222
+ ? propertyName
223
+ : strings_1.toCamel(propertyName);
224
+ if (this._style[propertyName] !== value) {
225
+ this._style[propertyName] = value;
226
+ this.onChange();
227
+ }
228
+ };
229
+ /**************************************************
230
+ * Events
231
+ **************************************************/
232
+ FoundationElement.prototype.addEventListener = function (evtName, callback) {
233
+ var propName = reactPropFromEventName(evtName);
234
+ if (this._events[propName] !== callback) {
235
+ this._events[propName] = callback;
236
+ this.onChange();
237
+ }
238
+ };
239
+ FoundationElement.prototype.removeEventListener = function (evtName, callback) {
240
+ var propName = reactPropFromEventName(evtName);
241
+ if (this._events[propName]) {
242
+ delete this._events[propName];
243
+ this.onChange();
244
+ }
245
+ };
246
+ /**************************************************
247
+ * Refs
248
+ **************************************************/
249
+ FoundationElement.prototype.setRef = function (el) {
250
+ if (el) {
251
+ this._ref = el;
252
+ }
253
+ };
254
+ Object.defineProperty(FoundationElement.prototype, "ref", {
255
+ get: function () {
256
+ return this._ref;
257
+ },
258
+ enumerable: true,
259
+ configurable: true
260
+ });
261
+ return FoundationElement;
262
+ })();
263
+ exports.FoundationElement = FoundationElement;
264
+ var FoundationComponent = /** @class */ (function (_super) {
265
+ __extends(FoundationComponent, _super);
266
+ function FoundationComponent(props) {
267
+ var _this = _super.call(this, props) || this;
268
+ _this.elements = {};
269
+ //@ts-ignore
270
+ if (_this.constructor.shouldDebounce) {
271
+ _this.update = debounce_1.debounce(_this.update.bind(_this), 0);
272
+ } else {
273
+ _this.update = _this.update.bind(_this);
274
+ }
275
+ return _this;
276
+ }
277
+ FoundationComponent.prototype.componentDidMount = function () {
278
+ this.foundation = this.getDefaultFoundation();
279
+ this.foundation.init();
280
+ this.sync(this.props, {});
281
+ };
282
+ FoundationComponent.prototype.componentDidUpdate = function (prevProps) {
283
+ this.sync(this.props, prevProps);
284
+ };
285
+ FoundationComponent.prototype.componentWillUnmount = function () {
286
+ this.foundation && this.foundation.destroy();
287
+ // @ts-ignore
288
+ this.foundation = undefined;
289
+ Object.values(this.elements).forEach(function (el) {
290
+ return el.destroy();
291
+ });
292
+ };
293
+ FoundationComponent.prototype.createElement = function (elementName) {
294
+ var el = new FoundationElement(this.update);
295
+ this.elements[elementName] = el;
296
+ return el;
297
+ };
298
+ FoundationComponent.prototype.update = function () {
299
+ this.foundation && this.setState({});
300
+ };
301
+ FoundationComponent.prototype.sync = function (props, prevProps) {};
302
+ FoundationComponent.prototype.syncProp = function (prop, prevProp, callback) {
303
+ if (
304
+ (prop !== undefined || (prevProp !== undefined && prop === undefined)) &&
305
+ prop !== prevProp
306
+ ) {
307
+ callback();
308
+ }
309
+ };
310
+ FoundationComponent.prototype.getDefaultFoundation = function () {
311
+ return {
312
+ init: function () {},
313
+ destroy: function () {}
314
+ };
315
+ };
316
+ /**
317
+ * Fires a cross-browser-compatible custom event from the component root of the given type,
318
+ */
319
+ FoundationComponent.prototype.emit = function (evtType, evtData, shouldBubble) {
320
+ if (shouldBubble === void 0) {
321
+ shouldBubble = false;
322
+ }
323
+ var evt;
324
+ evt = new CustomEvent(evtType, {
325
+ detail: evtData,
326
+ bubbles: shouldBubble
327
+ });
328
+ // bugfix for events coming from form elements
329
+ // and also fits with reacts form pattern better...
330
+ // This should always otherwise be null since there is no target
331
+ // for Custom Events
332
+ Object.defineProperty(evt, "target", {
333
+ value: evtData,
334
+ writable: false
335
+ });
336
+ Object.defineProperty(evt, "currentTarget", {
337
+ value: evtData,
338
+ writable: false
339
+ });
340
+ // Custom handling for React
341
+ var propName = evtType;
342
+ // check to see if the foundation still exists. If not, we are
343
+ // probably unmounted or destroyed and dont want to call any more handlers
344
+ // This happens when MDC broadcasts certain events on timers
345
+ if (this.foundation) {
346
+ //@ts-ignore
347
+ this.props[propName] && this.props[propName](evt);
348
+ }
349
+ return evt;
350
+ };
351
+ FoundationComponent.shouldDebounce = false;
352
+ return FoundationComponent;
353
+ })(React.Component);
354
+ exports.FoundationComponent = FoundationComponent;
@@ -0,0 +1,16 @@
1
+ /* eslint-disable */
2
+ import { WithThemeProps as _WithThemeProps } from './with-theme';
3
+ import { FoundationProps as _FoundationProps } from './foundation-component';
4
+ import { FocusTrap as _FocusTrap } from 'focus-trap';
5
+ import _createFocusTrap from 'focus-trap';
6
+ export { default as classNames } from 'classnames';
7
+ export * from './with-theme';
8
+ export * from './utils';
9
+ export { FoundationComponent } from './foundation-component';
10
+ export { componentFactory } from './component';
11
+ export declare const createFocusTrap: typeof _createFocusTrap;
12
+ export declare type WithThemeProps = _WithThemeProps;
13
+ export interface FoundationProps extends _FoundationProps {
14
+ }
15
+ export interface FocusTrap extends _FocusTrap {
16
+ }
@@ -0,0 +1,25 @@
1
+ /* eslint-disable */
2
+ "use strict";
3
+ function __export(m) {
4
+ for (var p in m) {
5
+ if (!exports.hasOwnProperty(p)) {
6
+ exports[p] = m[p];
7
+ }
8
+ }
9
+ }
10
+ var __importDefault =
11
+ (this && this.__importDefault) ||
12
+ function (mod) {
13
+ return mod && mod.__esModule ? mod : { default: mod };
14
+ };
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ var focus_trap_1 = __importDefault(require("focus-trap"));
17
+ var classnames_1 = require("classnames");
18
+ exports.classNames = classnames_1.default;
19
+ __export(require("./with-theme"));
20
+ __export(require("./utils"));
21
+ var foundation_component_1 = require("./foundation-component");
22
+ exports.FoundationComponent = foundation_component_1.FoundationComponent;
23
+ var component_1 = require("./component");
24
+ exports.componentFactory = component_1.componentFactory;
25
+ exports.createFocusTrap = focus_trap_1.default;
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ declare const _default: () => void;
3
+ export default _default;
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.default = function () {
5
+ if (global["window"]) {
6
+ var hyperform = require("hyperform");
7
+ hyperform(window);
8
+ Object.defineProperty(window["HTMLElement"].prototype, "dataset", {
9
+ writable: true,
10
+ value: {}
11
+ });
12
+ if (!window["HTMLCanvasElement"]) {
13
+ Object.defineProperty(window["HTMLCanvasElement"].prototype, "getContext", {
14
+ writable: true,
15
+ value: function () {
16
+ return {
17
+ font: "",
18
+ measureText: function () {
19
+ return { width: 0 };
20
+ }
21
+ };
22
+ }
23
+ });
24
+ }
25
+ if (!window.scrollTo) {
26
+ Object.defineProperty(window, "scrollTo", {
27
+ writable: true,
28
+ value: function () {}
29
+ });
30
+ }
31
+ window["MutationObserver"] = window["MutationObserver"] || require("mutation-observer");
32
+ }
33
+ };
@@ -0,0 +1,8 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * Determine whether the current browser supports passive event listeners, and
4
+ * if so, use them.
5
+ */
6
+ export declare function applyPassive(globalObj?: any, forceRefresh?: any): false | {
7
+ passive: boolean;
8
+ };