@webiny/ui 0.0.0-unstable.fcdad0bc61 → 0.0.0-unstable.fdd9228b5d

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 (708) hide show
  1. package/Accordion/Accordion.d.ts +10 -6
  2. package/Accordion/Accordion.js +10 -42
  3. package/Accordion/Accordion.js.map +1 -1
  4. package/Accordion/AccordionItem.d.ts +98 -18
  5. package/Accordion/AccordionItem.js +32 -148
  6. package/Accordion/AccordionItem.js.map +1 -1
  7. package/Accordion/AccordionItemActions.d.ts +25 -0
  8. package/Accordion/AccordionItemActions.js +47 -0
  9. package/Accordion/AccordionItemActions.js.map +1 -0
  10. package/Accordion/index.js +3 -30
  11. package/Accordion/index.js.map +1 -1
  12. package/Alert/Alert.d.ts +5 -4
  13. package/Alert/Alert.js +17 -59
  14. package/Alert/Alert.js.map +1 -1
  15. package/Alert/index.js +2 -17
  16. package/Alert/index.js.map +1 -1
  17. package/AutoComplete/AutoComplete.d.ts +8 -19
  18. package/AutoComplete/AutoComplete.js +64 -340
  19. package/AutoComplete/AutoComplete.js.map +1 -1
  20. package/AutoComplete/MultiAutoComplete.d.ts +18 -48
  21. package/AutoComplete/MultiAutoComplete.js +79 -630
  22. package/AutoComplete/MultiAutoComplete.js.map +1 -1
  23. package/AutoComplete/index.js +3 -30
  24. package/AutoComplete/index.js.map +1 -1
  25. package/AutoComplete/types.d.ts +8 -8
  26. package/AutoComplete/types.js +2 -4
  27. package/AutoComplete/types.js.map +1 -1
  28. package/AutoComplete/utils.d.ts +1 -1
  29. package/AutoComplete/utils.js +5 -20
  30. package/AutoComplete/utils.js.map +1 -1
  31. package/Avatar/Avatar.d.ts +3 -2
  32. package/Avatar/Avatar.js +31 -94
  33. package/Avatar/Avatar.js.map +1 -1
  34. package/Avatar/index.js +2 -17
  35. package/Avatar/index.js.map +1 -1
  36. package/Button/Button.d.ts +38 -29
  37. package/Button/Button.js +13 -149
  38. package/Button/Button.js.map +1 -1
  39. package/Button/ButtonDefault.d.ts +7 -0
  40. package/Button/ButtonDefault.js +16 -0
  41. package/Button/ButtonDefault.js.map +1 -0
  42. package/Button/ButtonFloating.d.ts +7 -0
  43. package/Button/ButtonFloating.js +12 -0
  44. package/Button/ButtonFloating.js.map +1 -0
  45. package/Button/ButtonIcon.d.ts +9 -0
  46. package/Button/ButtonIcon.js +11 -0
  47. package/Button/ButtonIcon.js.map +1 -0
  48. package/Button/ButtonPrimary.d.ts +7 -0
  49. package/Button/ButtonPrimary.js +16 -0
  50. package/Button/ButtonPrimary.js.map +1 -0
  51. package/Button/ButtonSecondary.d.ts +7 -0
  52. package/Button/ButtonSecondary.js +16 -0
  53. package/Button/ButtonSecondary.js.map +1 -0
  54. package/Button/CopyButton.d.ts +17 -0
  55. package/Button/CopyButton.js +12 -0
  56. package/Button/CopyButton.js.map +1 -0
  57. package/Button/IconButton.d.ts +17 -0
  58. package/Button/IconButton.js +15 -0
  59. package/Button/IconButton.js.map +1 -0
  60. package/Button/index.d.ts +7 -2
  61. package/Button/index.js +10 -44
  62. package/Button/index.js.map +1 -1
  63. package/Button/useMappedButtonProps.d.ts +14 -0
  64. package/Button/useMappedButtonProps.js +21 -0
  65. package/Button/useMappedButtonProps.js.map +1 -0
  66. package/Carousel/Carousel.d.ts +6 -15
  67. package/Carousel/Carousel.js +12 -59
  68. package/Carousel/Carousel.js.map +1 -1
  69. package/Carousel/index.js +2 -14
  70. package/Carousel/index.js.map +1 -1
  71. package/Checkbox/Checkbox.d.ts +9 -9
  72. package/Checkbox/Checkbox.js +33 -85
  73. package/Checkbox/Checkbox.js.map +1 -1
  74. package/Checkbox/CheckboxGroup.d.ts +7 -3
  75. package/Checkbox/CheckboxGroup.js +47 -77
  76. package/Checkbox/CheckboxGroup.js.map +1 -1
  77. package/Checkbox/index.js +3 -22
  78. package/Checkbox/index.js.map +1 -1
  79. package/Chips/Chip.d.ts +35 -3
  80. package/Chips/Chip.js +49 -22
  81. package/Chips/Chip.js.map +1 -1
  82. package/Chips/Chips.d.ts +6 -2
  83. package/Chips/Chips.js +16 -32
  84. package/Chips/Chips.js.map +1 -1
  85. package/Chips/index.js +3 -30
  86. package/Chips/index.js.map +1 -1
  87. package/CodeEditor/CodeEditor.d.ts +6 -9
  88. package/CodeEditor/CodeEditor.js +14 -103
  89. package/CodeEditor/CodeEditor.js.map +1 -1
  90. package/CodeEditor/index.js +2 -17
  91. package/CodeEditor/index.js.map +1 -1
  92. package/ColorPicker/ColorPicker.d.ts +6 -16
  93. package/ColorPicker/ColorPicker.js +26 -147
  94. package/ColorPicker/ColorPicker.js.map +1 -1
  95. package/ColorPicker/index.js +2 -17
  96. package/ColorPicker/index.js.map +1 -1
  97. package/ConfirmationDialog/ConfirmationDialog.d.ts +2 -2
  98. package/ConfirmationDialog/ConfirmationDialog.js +81 -166
  99. package/ConfirmationDialog/ConfirmationDialog.js.map +1 -1
  100. package/ConfirmationDialog/index.js +3 -30
  101. package/ConfirmationDialog/index.js.map +1 -1
  102. package/ConfirmationDialog/withConfirmation.d.ts +5 -5
  103. package/ConfirmationDialog/withConfirmation.js +11 -23
  104. package/ConfirmationDialog/withConfirmation.js.map +1 -1
  105. package/DataTable/DataTable.d.ts +56 -19
  106. package/DataTable/DataTable.js +63 -155
  107. package/DataTable/DataTable.js.map +1 -1
  108. package/DataTable/index.js +2 -17
  109. package/DataTable/index.js.map +1 -1
  110. package/DateTime/Date.d.ts +7 -0
  111. package/DateTime/Date.js +33 -0
  112. package/DateTime/Date.js.map +1 -0
  113. package/DateTime/index.d.ts +1 -0
  114. package/DateTime/index.js +3 -0
  115. package/DateTime/index.js.map +1 -0
  116. package/DelayedOnChange/index.d.ts +7 -2
  117. package/DelayedOnChange/index.js +9 -23
  118. package/DelayedOnChange/index.js.map +1 -1
  119. package/Dialog/Dialog.d.ts +47 -60
  120. package/Dialog/Dialog.js +71 -117
  121. package/Dialog/Dialog.js.map +1 -1
  122. package/Dialog/index.js +2 -17
  123. package/Dialog/index.js.map +1 -1
  124. package/Drawer/Drawer.d.ts +31 -22
  125. package/Drawer/Drawer.js +44 -26
  126. package/Drawer/Drawer.js.map +1 -1
  127. package/Drawer/index.js +2 -17
  128. package/Drawer/index.js.map +1 -1
  129. package/DynamicFieldset/index.d.ts +7 -1
  130. package/DynamicFieldset/index.js +8 -14
  131. package/DynamicFieldset/index.js.map +1 -1
  132. package/Elevation/Elevation.d.ts +7 -3
  133. package/Elevation/Elevation.js +15 -21
  134. package/Elevation/Elevation.js.map +1 -1
  135. package/Elevation/index.js +2 -17
  136. package/Elevation/index.js.map +1 -1
  137. package/FormElementMessage/FormElementMessage.d.ts +6 -2
  138. package/FormElementMessage/FormElementMessage.js +22 -21
  139. package/FormElementMessage/FormElementMessage.js.map +1 -1
  140. package/FormElementMessage/index.js +2 -12
  141. package/FormElementMessage/index.js.map +1 -1
  142. package/FullName/FullName.d.ts +5 -1
  143. package/FullName/FullName.js +12 -16
  144. package/FullName/FullName.js.map +1 -1
  145. package/FullName/index.js +2 -17
  146. package/FullName/index.js.map +1 -1
  147. package/Grid/Grid.d.ts +36 -11
  148. package/Grid/Grid.js +38 -26
  149. package/Grid/Grid.js.map +1 -1
  150. package/Grid/index.js +2 -17
  151. package/Grid/index.js.map +1 -1
  152. package/Helpers/ClassNames.d.ts +3 -3
  153. package/Helpers/ClassNames.js +14 -28
  154. package/Helpers/ClassNames.js.map +1 -1
  155. package/Helpers/index.js +3 -12
  156. package/Helpers/index.js.map +1 -1
  157. package/Icon/Icon.d.ts +9 -4
  158. package/Icon/Icon.js +10 -31
  159. package/Icon/Icon.js.map +1 -1
  160. package/Icon/index.js +2 -17
  161. package/Icon/index.js.map +1 -1
  162. package/Image/index.d.ts +6 -1
  163. package/Image/index.js +7 -16
  164. package/Image/index.js.map +1 -1
  165. package/ImageEditor/ImageEditor.d.ts +11 -27
  166. package/ImageEditor/ImageEditor.js +10 -358
  167. package/ImageEditor/ImageEditor.js.map +1 -1
  168. package/ImageEditor/index.js +2 -17
  169. package/ImageEditor/index.js.map +1 -1
  170. package/ImageUpload/Image.d.ts +8 -14
  171. package/ImageUpload/Image.js +14 -141
  172. package/ImageUpload/Image.js.map +1 -1
  173. package/ImageUpload/ImageEditorDialog.d.ts +7 -10
  174. package/ImageUpload/ImageEditorDialog.js +14 -117
  175. package/ImageUpload/ImageEditorDialog.js.map +1 -1
  176. package/ImageUpload/MultiImageUpload.d.ts +11 -24
  177. package/ImageUpload/MultiImageUpload.js +14 -419
  178. package/ImageUpload/MultiImageUpload.js.map +1 -1
  179. package/ImageUpload/SingleImageUpload.d.ts +10 -25
  180. package/ImageUpload/SingleImageUpload.js +14 -255
  181. package/ImageUpload/SingleImageUpload.js.map +1 -1
  182. package/ImageUpload/index.d.ts +2 -2
  183. package/ImageUpload/index.js +5 -38
  184. package/ImageUpload/index.js.map +1 -1
  185. package/Input/Input.d.ts +62 -16
  186. package/Input/Input.js +81 -173
  187. package/Input/Input.js.map +1 -1
  188. package/Input/index.js +2 -17
  189. package/Input/index.js.map +1 -1
  190. package/List/CollapsibleList/index.d.ts +19 -5
  191. package/List/CollapsibleList/index.js +10 -20
  192. package/List/CollapsibleList/index.js.map +1 -1
  193. package/List/DataList/DataList.d.ts +13 -39
  194. package/List/DataList/DataList.js +18 -356
  195. package/List/DataList/DataList.js.map +1 -1
  196. package/List/DataList/DataListModalOverlay/index.d.ts +12 -3
  197. package/List/DataList/DataListModalOverlay/index.js +13 -32
  198. package/List/DataList/DataListModalOverlay/index.js.map +1 -1
  199. package/List/DataList/DataListWithSections.d.ts +13 -37
  200. package/List/DataList/DataListWithSections.js +18 -356
  201. package/List/DataList/DataListWithSections.js.map +1 -1
  202. package/List/DataList/icons/index.d.ts +1 -15
  203. package/List/DataList/icons/index.js +2 -99
  204. package/List/DataList/icons/index.js.map +1 -1
  205. package/List/DataList/index.d.ts +0 -1
  206. package/List/DataList/index.js +4 -63
  207. package/List/DataList/index.js.map +1 -1
  208. package/List/DataList/types.d.ts +1 -28
  209. package/List/DataList/types.js +2 -4
  210. package/List/DataList/types.js.map +1 -1
  211. package/List/List/List.d.ts +51 -0
  212. package/List/List/List.js +16 -0
  213. package/List/List/List.js.map +1 -0
  214. package/List/List/ListItem.d.ts +61 -0
  215. package/List/List/ListItem.js +91 -0
  216. package/List/List/ListItem.js.map +1 -0
  217. package/List/List/ListItemAction.d.ts +9 -0
  218. package/List/List/ListItemAction.js +15 -0
  219. package/List/List/ListItemAction.js.map +1 -0
  220. package/List/List/ListItemGraphic.d.ts +18 -0
  221. package/List/List/ListItemGraphic.js +26 -0
  222. package/List/List/ListItemGraphic.js.map +1 -0
  223. package/List/List/ListItemMeta.d.ts +26 -0
  224. package/List/List/ListItemMeta.js +24 -0
  225. package/List/List/ListItemMeta.js.map +1 -0
  226. package/List/List/ListItemText.d.ts +42 -0
  227. package/List/List/ListItemText.js +51 -0
  228. package/List/List/ListItemText.js.map +1 -0
  229. package/List/List/index.d.ts +6 -0
  230. package/List/List/index.js +8 -0
  231. package/List/List/index.js.map +1 -0
  232. package/List/index.d.ts +1 -0
  233. package/List/index.js +5 -73
  234. package/List/index.js.map +1 -1
  235. package/Menu/Menu.d.ts +57 -20
  236. package/Menu/Menu.js +74 -127
  237. package/Menu/Menu.js.map +1 -1
  238. package/Menu/index.js +2 -17
  239. package/Menu/index.js.map +1 -1
  240. package/Mosaic/Mosaic.d.ts +7 -6
  241. package/Mosaic/Mosaic.js +7 -32
  242. package/Mosaic/Mosaic.js.map +1 -1
  243. package/Mosaic/index.js +2 -17
  244. package/Mosaic/index.js.map +1 -1
  245. package/Progress/CircularProgress.d.ts +10 -2
  246. package/Progress/CircularProgress.js +17 -79
  247. package/Progress/CircularProgress.js.map +1 -1
  248. package/Progress/index.d.ts +1 -1
  249. package/Progress/index.js +2 -14
  250. package/Progress/index.js.map +1 -1
  251. package/README.md +1 -3
  252. package/Radio/Radio.d.ts +7 -8
  253. package/Radio/Radio.js +35 -78
  254. package/Radio/Radio.js.map +1 -1
  255. package/Radio/RadioGroup.d.ts +9 -5
  256. package/Radio/RadioGroup.js +38 -66
  257. package/Radio/RadioGroup.js.map +1 -1
  258. package/Radio/index.js +3 -22
  259. package/Radio/index.js.map +1 -1
  260. package/RichTextEditor/RichTextEditor.d.ts +10 -29
  261. package/RichTextEditor/RichTextEditor.js +15 -169
  262. package/RichTextEditor/RichTextEditor.js.map +1 -1
  263. package/RichTextEditor/index.d.ts +3 -2
  264. package/RichTextEditor/index.js +3 -29
  265. package/RichTextEditor/index.js.map +1 -1
  266. package/Ripple/Ripple.d.ts +3 -2
  267. package/Ripple/Ripple.js +7 -21
  268. package/Ripple/Ripple.js.map +1 -1
  269. package/Ripple/index.js +2 -17
  270. package/Ripple/index.js.map +1 -1
  271. package/Scrollbar/Scrollbar.d.ts +5 -8
  272. package/Scrollbar/Scrollbar.js +8 -16
  273. package/Scrollbar/Scrollbar.js.map +1 -1
  274. package/Scrollbar/index.js +2 -17
  275. package/Scrollbar/index.js.map +1 -1
  276. package/Section/index.d.ts +7 -2
  277. package/Section/index.js +14 -61
  278. package/Section/index.js.map +1 -1
  279. package/Select/Select.d.ts +44 -8
  280. package/Select/Select.js +102 -109
  281. package/Select/Select.js.map +1 -1
  282. package/Select/index.js +2 -17
  283. package/Select/index.js.map +1 -1
  284. package/Skeleton/Skeleton.d.ts +27 -4
  285. package/Skeleton/Skeleton.js +17 -23
  286. package/Skeleton/Skeleton.js.map +1 -1
  287. package/Skeleton/index.js +2 -17
  288. package/Skeleton/index.js.map +1 -1
  289. package/Slider/Slider.d.ts +12 -17
  290. package/Slider/Slider.js +47 -95
  291. package/Slider/Slider.js.map +1 -1
  292. package/Slider/index.js +2 -14
  293. package/Slider/index.js.map +1 -1
  294. package/Snackbar/Snackbar.d.ts +44 -9
  295. package/Snackbar/Snackbar.js +29 -66
  296. package/Snackbar/Snackbar.js.map +1 -1
  297. package/Snackbar/index.js +2 -18
  298. package/Snackbar/index.js.map +1 -1
  299. package/Switch/Switch.d.ts +21 -8
  300. package/Switch/Switch.js +25 -77
  301. package/Switch/Switch.js.map +1 -1
  302. package/Switch/index.js +2 -17
  303. package/Switch/index.js.map +1 -1
  304. package/Tabs/Tab.d.ts +25 -3
  305. package/Tabs/Tab.js +20 -30
  306. package/Tabs/Tab.js.map +1 -1
  307. package/Tabs/Tabs.d.ts +16 -37
  308. package/Tabs/Tabs.js +56 -139
  309. package/Tabs/Tabs.js.map +1 -1
  310. package/Tabs/index.js +3 -30
  311. package/Tabs/index.js.map +1 -1
  312. package/Tags/Tags.d.ts +12 -19
  313. package/Tags/Tags.js +63 -168
  314. package/Tags/Tags.js.map +1 -1
  315. package/Tags/index.js +2 -17
  316. package/Tags/index.js.map +1 -1
  317. package/TimeAgo/index.d.ts +7 -0
  318. package/TimeAgo/index.js +8 -0
  319. package/TimeAgo/index.js.map +1 -0
  320. package/Tooltip/Tooltip.d.ts +4 -16
  321. package/Tooltip/Tooltip.js +63 -77
  322. package/Tooltip/Tooltip.js.map +1 -1
  323. package/Tooltip/index.js +2 -17
  324. package/Tooltip/index.js.map +1 -1
  325. package/TopAppBar/TopAppBar.d.ts +27 -3
  326. package/TopAppBar/TopAppBar.js +36 -22
  327. package/TopAppBar/TopAppBar.js.map +1 -1
  328. package/TopAppBar/TopAppBarActionItem.d.ts +6 -4
  329. package/TopAppBar/TopAppBarActionItem.js +11 -16
  330. package/TopAppBar/TopAppBarActionItem.js.map +1 -1
  331. package/TopAppBar/TopAppBarNavigationIcon.d.ts +6 -4
  332. package/TopAppBar/TopAppBarNavigationIcon.js +11 -16
  333. package/TopAppBar/TopAppBarNavigationIcon.js.map +1 -1
  334. package/TopAppBar/TopAppBarPrimary.d.ts +8 -4
  335. package/TopAppBar/TopAppBarPrimary.js +14 -22
  336. package/TopAppBar/TopAppBarPrimary.js.map +1 -1
  337. package/TopAppBar/TopAppBarSecondary.d.ts +8 -4
  338. package/TopAppBar/TopAppBarSecondary.js +15 -24
  339. package/TopAppBar/TopAppBarSecondary.js.map +1 -1
  340. package/TopAppBar/TopAppBarSection.d.ts +12 -3
  341. package/TopAppBar/TopAppBarSection.js +9 -22
  342. package/TopAppBar/TopAppBarSection.js.map +1 -1
  343. package/TopAppBar/TopAppBarTitle.d.ts +7 -4
  344. package/TopAppBar/TopAppBarTitle.js +10 -22
  345. package/TopAppBar/TopAppBarTitle.js.map +1 -1
  346. package/TopAppBar/index.js +9 -96
  347. package/TopAppBar/index.js.map +1 -1
  348. package/Typography/Typography.d.ts +10 -5
  349. package/Typography/Typography.js +33 -17
  350. package/Typography/Typography.js.map +1 -1
  351. package/Typography/index.js +2 -17
  352. package/Typography/index.js.map +1 -1
  353. package/package.json +24 -95
  354. package/styles.scss +15 -41
  355. package/types.d.ts +5 -5
  356. package/types.js +2 -4
  357. package/types.js.map +1 -1
  358. package/Accordion/Accordion.stories.d.ts +0 -1
  359. package/Accordion/Accordion.stories.js +0 -54
  360. package/Accordion/Accordion.stories.js.map +0 -1
  361. package/Accordion/README.md +0 -11
  362. package/Accordion/icons/round-keyboard_arrow_down-24px.svg +0 -16
  363. package/Accordion/icons/round-keyboard_arrow_up-24px.svg +0 -16
  364. package/Accordion/icons/round-settings-24px.svg +0 -21
  365. package/Alert/Alert.stories.d.ts +0 -1
  366. package/Alert/Alert.stories.js +0 -38
  367. package/Alert/Alert.stories.js.map +0 -1
  368. package/Alert/README.md +0 -11
  369. package/AutoComplete/AutoComplete.stories.d.ts +0 -1
  370. package/AutoComplete/AutoComplete.stories.js +0 -86
  371. package/AutoComplete/AutoComplete.stories.js.map +0 -1
  372. package/AutoComplete/AutoCompleteReadme.md +0 -11
  373. package/AutoComplete/MultiAutoComplete.stories.d.ts +0 -1
  374. package/AutoComplete/MultiAutoComplete.stories.js +0 -143
  375. package/AutoComplete/MultiAutoComplete.stories.js.map +0 -1
  376. package/AutoComplete/MultiAutoCompleteReadme.md +0 -11
  377. package/AutoComplete/icons/baseline-close-24px.svg +0 -4
  378. package/AutoComplete/icons/delete.svg +0 -12
  379. package/AutoComplete/icons/navigate_before-24px.svg +0 -1
  380. package/AutoComplete/icons/navigate_next-24px.svg +0 -1
  381. package/AutoComplete/icons/reorder_black_24dp.svg +0 -1
  382. package/AutoComplete/icons/skip_next-24px.svg +0 -1
  383. package/AutoComplete/icons/skip_previous-24px.svg +0 -1
  384. package/AutoComplete/icons/spinner.svg +0 -3
  385. package/AutoComplete/styles.d.ts +0 -2
  386. package/AutoComplete/styles.js +0 -47
  387. package/AutoComplete/styles.js.map +0 -1
  388. package/Avatar/Avatar.stories.d.ts +0 -1
  389. package/Avatar/Avatar.stories.js +0 -36
  390. package/Avatar/Avatar.stories.js.map +0 -1
  391. package/Avatar/README.md +0 -11
  392. package/Button/Button.stories.d.ts +0 -1
  393. package/Button/Button.stories.js +0 -66
  394. package/Button/Button.stories.js.map +0 -1
  395. package/Button/Button.styles.d.ts +0 -6
  396. package/Button/Button.styles.js +0 -15
  397. package/Button/Button.styles.js.map +0 -1
  398. package/Button/CopyButton/CopyButton.d.ts +0 -11
  399. package/Button/CopyButton/CopyButton.js +0 -42
  400. package/Button/CopyButton/CopyButton.js.map +0 -1
  401. package/Button/CopyButton/CopyButton.stories.d.ts +0 -1
  402. package/Button/CopyButton/CopyButton.stories.js +0 -28
  403. package/Button/CopyButton/CopyButton.stories.js.map +0 -1
  404. package/Button/CopyButton/README.md +0 -11
  405. package/Button/IconButton/IconButton.d.ts +0 -36
  406. package/Button/IconButton/IconButton.js +0 -38
  407. package/Button/IconButton/IconButton.js.map +0 -1
  408. package/Button/IconButton/IconButton.stories.d.ts +0 -1
  409. package/Button/IconButton/IconButton.stories.js +0 -50
  410. package/Button/IconButton/IconButton.stories.js.map +0 -1
  411. package/Button/IconButton/README.md +0 -15
  412. package/Button/README.md +0 -28
  413. package/Button/assets/baseline-cloud_done-24px.svg +0 -3
  414. package/Button/assets/file_copy-24px.svg +0 -1
  415. package/Button/assets/round-more_vert-24px.svg +0 -12
  416. package/Carousel/Carouser.stories.d.ts +0 -1
  417. package/Carousel/Carouser.stories.js +0 -39
  418. package/Carousel/Carouser.stories.js.map +0 -1
  419. package/Carousel/README.md +0 -15
  420. package/Checkbox/Checkbox.stories.d.ts +0 -1
  421. package/Checkbox/Checkbox.stories.js +0 -39
  422. package/Checkbox/Checkbox.stories.js.map +0 -1
  423. package/Checkbox/Checkbox.styles.d.ts +0 -6
  424. package/Checkbox/Checkbox.styles.js +0 -22
  425. package/Checkbox/Checkbox.styles.js.map +0 -1
  426. package/Checkbox/CheckboxGroup.stories.d.ts +0 -1
  427. package/Checkbox/CheckboxGroup.stories.js +0 -66
  428. package/Checkbox/CheckboxGroup.stories.js.map +0 -1
  429. package/Checkbox/README_Checkbox.md +0 -15
  430. package/Checkbox/README_CheckboxGroup.md +0 -19
  431. package/Chips/Chips.stories.d.ts +0 -1
  432. package/Chips/Chips.stories.js +0 -40
  433. package/Chips/Chips.stories.js.map +0 -1
  434. package/Chips/README.md +0 -15
  435. package/Chips/icons/baseline-done-24px.svg +0 -4
  436. package/Chips/icons/baseline-email-24px.svg +0 -3
  437. package/Chips/styles.d.ts +0 -2
  438. package/Chips/styles.js +0 -29
  439. package/Chips/styles.js.map +0 -1
  440. package/CodeEditor/CodeEditor.stories.d.ts +0 -2
  441. package/CodeEditor/CodeEditor.stories.js +0 -45
  442. package/CodeEditor/CodeEditor.stories.js.map +0 -1
  443. package/CodeEditor/README.md +0 -21
  444. package/ColorPicker/ColorPicker.stories.d.ts +0 -1
  445. package/ColorPicker/ColorPicker.stories.js +0 -41
  446. package/ColorPicker/ColorPicker.stories.js.map +0 -1
  447. package/ColorPicker/README.md +0 -11
  448. package/ConfirmationDialog/ConfirmationDialog.stories.d.ts +0 -1
  449. package/ConfirmationDialog/ConfirmationDialog.stories.js +0 -40
  450. package/ConfirmationDialog/ConfirmationDialog.stories.js.map +0 -1
  451. package/ConfirmationDialog/README.md +0 -11
  452. package/DataTable/DataTable.stories.d.ts +0 -1
  453. package/DataTable/DataTable.stories.js +0 -77
  454. package/DataTable/DataTable.stories.js.map +0 -1
  455. package/DataTable/README.md +0 -72
  456. package/DataTable/styled.d.ts +0 -1
  457. package/DataTable/styled.js +0 -18
  458. package/DataTable/styled.js.map +0 -1
  459. package/DelayedOnChange/DelayedOnChange.d.ts +0 -40
  460. package/DelayedOnChange/DelayedOnChange.js +0 -129
  461. package/DelayedOnChange/DelayedOnChange.js.map +0 -1
  462. package/DelayedOnChange/withDelayedOnChange.d.ts +0 -3
  463. package/DelayedOnChange/withDelayedOnChange.js +0 -37
  464. package/DelayedOnChange/withDelayedOnChange.js.map +0 -1
  465. package/Dialog/Dialog.stories.d.ts +0 -1
  466. package/Dialog/Dialog.stories.js +0 -40
  467. package/Dialog/Dialog.stories.js.map +0 -1
  468. package/Dialog/README.md +0 -23
  469. package/Drawer/Drawer.stories.d.ts +0 -1
  470. package/Drawer/Drawer.stories.js +0 -34
  471. package/Drawer/Drawer.stories.js.map +0 -1
  472. package/Drawer/README.md +0 -15
  473. package/DynamicFieldset/Fieldset.d.ts +0 -51
  474. package/DynamicFieldset/Fieldset.js +0 -165
  475. package/DynamicFieldset/Fieldset.js.map +0 -1
  476. package/Elevation/Elevation.stories.d.ts +0 -1
  477. package/Elevation/Elevation.stories.js +0 -40
  478. package/Elevation/Elevation.stories.js.map +0 -1
  479. package/Elevation/README.md +0 -15
  480. package/FullName/README.md +0 -11
  481. package/Grid/Grid.stories.d.ts +0 -1
  482. package/Grid/Grid.stories.js +0 -40
  483. package/Grid/Grid.stories.js.map +0 -1
  484. package/Grid/README.md +0 -15
  485. package/Icon/Icon.stories.d.ts +0 -1
  486. package/Icon/Icon.stories.js +0 -40
  487. package/Icon/Icon.stories.js.map +0 -1
  488. package/Icon/README.md +0 -11
  489. package/Icon/svg/baseline-autorenew-24px.svg +0 -4
  490. package/Icon/svg/baseline-cloud_done-24px.svg +0 -4
  491. package/Icon/svg/baseline-delete-24px.svg +0 -4
  492. package/Icon/svg/baseline-done-24px.svg +0 -4
  493. package/Image/Image.d.ts +0 -7
  494. package/Image/Image.js +0 -30
  495. package/Image/Image.js.map +0 -1
  496. package/Image/Image.stories.d.ts +0 -1
  497. package/Image/Image.stories.js +0 -31
  498. package/Image/Image.stories.js.map +0 -1
  499. package/Image/README.md +0 -12
  500. package/ImageEditor/toolbar/crop.d.ts +0 -4
  501. package/ImageEditor/toolbar/crop.js +0 -88
  502. package/ImageEditor/toolbar/crop.js.map +0 -1
  503. package/ImageEditor/toolbar/filter.d.ts +0 -3
  504. package/ImageEditor/toolbar/filter.js +0 -238
  505. package/ImageEditor/toolbar/filter.js.map +0 -1
  506. package/ImageEditor/toolbar/flip.d.ts +0 -4
  507. package/ImageEditor/toolbar/flip.js +0 -115
  508. package/ImageEditor/toolbar/flip.js.map +0 -1
  509. package/ImageEditor/toolbar/icons/crop.svg +0 -4
  510. package/ImageEditor/toolbar/icons/draw.svg +0 -4
  511. package/ImageEditor/toolbar/icons/filter.svg +0 -4
  512. package/ImageEditor/toolbar/icons/flip.svg +0 -4
  513. package/ImageEditor/toolbar/icons/index.d.ts +0 -8
  514. package/ImageEditor/toolbar/icons/index.js +0 -69
  515. package/ImageEditor/toolbar/icons/index.js.map +0 -1
  516. package/ImageEditor/toolbar/icons/redo.svg +0 -4
  517. package/ImageEditor/toolbar/icons/rotateLeft.svg +0 -4
  518. package/ImageEditor/toolbar/icons/rotateRight.svg +0 -4
  519. package/ImageEditor/toolbar/icons/undo.svg +0 -4
  520. package/ImageEditor/toolbar/index.d.ts +0 -4
  521. package/ImageEditor/toolbar/index.js +0 -39
  522. package/ImageEditor/toolbar/index.js.map +0 -1
  523. package/ImageEditor/toolbar/rotate.d.ts +0 -4
  524. package/ImageEditor/toolbar/rotate.js +0 -174
  525. package/ImageEditor/toolbar/rotate.js.map +0 -1
  526. package/ImageEditor/toolbar/types.d.ts +0 -33
  527. package/ImageEditor/toolbar/types.js +0 -5
  528. package/ImageEditor/toolbar/types.js.map +0 -1
  529. package/ImageUpload/MultiImageUpload.stories.d.ts +0 -1
  530. package/ImageUpload/MultiImageUpload.stories.js +0 -77
  531. package/ImageUpload/MultiImageUpload.stories.js.map +0 -1
  532. package/ImageUpload/README.md +0 -11
  533. package/ImageUpload/SingleImageUpload.stories.d.ts +0 -1
  534. package/ImageUpload/SingleImageUpload.stories.js +0 -54
  535. package/ImageUpload/SingleImageUpload.stories.js.map +0 -1
  536. package/ImageUpload/icons/round-add_photo_alternate-24px.svg +0 -23
  537. package/ImageUpload/icons/round-close-24px.svg +0 -13
  538. package/ImageUpload/icons/round-edit-24px.svg +0 -4
  539. package/ImageUpload/image.jpeg +0 -0
  540. package/ImageUpload/styled.d.ts +0 -21
  541. package/ImageUpload/styled.js +0 -136
  542. package/ImageUpload/styled.js.map +0 -1
  543. package/Input/Input.stories.d.ts +0 -1
  544. package/Input/Input.stories.js +0 -120
  545. package/Input/Input.stories.js.map +0 -1
  546. package/Input/README.md +0 -16
  547. package/Input/__tests__/Input.test.d.ts +0 -1
  548. package/Input/__tests__/Input.test.js +0 -130
  549. package/Input/__tests__/Input.test.js.map +0 -1
  550. package/Input/svg/baseline-autorenew-24px.svg +0 -4
  551. package/Input/svg/baseline-cloud_done-24px.svg +0 -4
  552. package/Input/svg/baseline-delete-24px.svg +0 -4
  553. package/Input/svg/baseline-done-24px.svg +0 -4
  554. package/List/CollapsibleList/CollapsibleList.stories.d.ts +0 -1
  555. package/List/CollapsibleList/CollapsibleList.stories.js +0 -37
  556. package/List/CollapsibleList/CollapsibleList.stories.js.map +0 -1
  557. package/List/CollapsibleList/README.md +0 -11
  558. package/List/CollapsibleList/index.css +0 -31
  559. package/List/DataList/DataList.stories.d.ts +0 -1
  560. package/List/DataList/DataList.stories.js +0 -119
  561. package/List/DataList/DataList.stories.js.map +0 -1
  562. package/List/DataList/DataListModalOverlay/DataListModalOverlay.d.ts +0 -18
  563. package/List/DataList/DataListModalOverlay/DataListModalOverlay.js +0 -106
  564. package/List/DataList/DataListModalOverlay/DataListModalOverlay.js.map +0 -1
  565. package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.d.ts +0 -6
  566. package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js +0 -39
  567. package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js.map +0 -1
  568. package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.d.ts +0 -11
  569. package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js +0 -39
  570. package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js.map +0 -1
  571. package/List/DataList/Loader.d.ts +0 -3
  572. package/List/DataList/Loader.js +0 -60
  573. package/List/DataList/Loader.js.map +0 -1
  574. package/List/DataList/NoData.d.ts +0 -3
  575. package/List/DataList/NoData.js +0 -32
  576. package/List/DataList/NoData.js.map +0 -1
  577. package/List/DataList/README.md +0 -17
  578. package/List/DataList/icons/baseline-autorenew-24px.svg +0 -4
  579. package/List/DataList/icons/baseline-delete-24px.svg +0 -4
  580. package/List/DataList/icons/baseline-edit-24px.svg +0 -4
  581. package/List/DataList/icons/baseline-navigate_before-24px.svg +0 -4
  582. package/List/DataList/icons/baseline-navigate_next-24px.svg +0 -4
  583. package/List/DataList/icons/baseline-sort-24px.svg +0 -4
  584. package/List/DataList/icons/baseline-tune-24px.svg +0 -4
  585. package/List/DataList/icons/filter_alt-24px.svg +0 -1
  586. package/List/DataList/icons/round-more_vert-24px.svg +0 -12
  587. package/List/List.d.ts +0 -132
  588. package/List/List.js +0 -210
  589. package/List/List.js.map +0 -1
  590. package/List/List.stories.d.ts +0 -1
  591. package/List/List.stories.js +0 -62
  592. package/List/List.stories.js.map +0 -1
  593. package/List/README.md +0 -22
  594. package/List/icons/baseline-autorenew-24px.svg +0 -4
  595. package/List/icons/baseline-cloud_done-24px.svg +0 -4
  596. package/List/icons/baseline-delete-24px.svg +0 -4
  597. package/List/icons/baseline-done-24px.svg +0 -4
  598. package/List/icons/baseline-email-24px.svg +0 -4
  599. package/List/icons/index.d.ts +0 -3
  600. package/List/icons/index.js +0 -23
  601. package/List/icons/index.js.map +0 -1
  602. package/Menu/Menu.stories.d.ts +0 -1
  603. package/Menu/Menu.stories.js +0 -39
  604. package/Menu/Menu.stories.js.map +0 -1
  605. package/Menu/README.md +0 -15
  606. package/Mosaic/Mosaic.stories.d.ts +0 -1
  607. package/Mosaic/Mosaic.stories.js +0 -84
  608. package/Mosaic/Mosaic.stories.js.map +0 -1
  609. package/Mosaic/README.md +0 -15
  610. package/Progress/README.md +0 -19
  611. package/Progress/svg/circularProgress.svg +0 -3
  612. package/Radio/README.md +0 -17
  613. package/Radio/Radio.styles.d.ts +0 -6
  614. package/Radio/Radio.styles.js +0 -22
  615. package/Radio/Radio.styles.js.map +0 -1
  616. package/Radio/RadioGroup.stories.d.ts +0 -1
  617. package/Radio/RadioGroup.stories.js +0 -66
  618. package/Radio/RadioGroup.stories.js.map +0 -1
  619. package/RichTextEditor/README.md +0 -10
  620. package/RichTextEditor/RichTextEditor.stories.d.ts +0 -1
  621. package/RichTextEditor/RichTextEditor.stories.js +0 -30
  622. package/RichTextEditor/RichTextEditor.stories.js.map +0 -1
  623. package/RichTextEditor/createPropsFromConfig.d.ts +0 -15
  624. package/RichTextEditor/createPropsFromConfig.js +0 -33
  625. package/RichTextEditor/createPropsFromConfig.js.map +0 -1
  626. package/Ripple/README.md +0 -15
  627. package/Ripple/Ripple.stories.d.ts +0 -1
  628. package/Ripple/Ripple.stories.js +0 -86
  629. package/Ripple/Ripple.stories.js.map +0 -1
  630. package/Ripple/svg/baseline-autorenew-24px.svg +0 -4
  631. package/Ripple/svg/baseline-cloud_done-24px.svg +0 -4
  632. package/Ripple/svg/baseline-delete-24px.svg +0 -4
  633. package/Ripple/svg/baseline-done-24px.svg +0 -4
  634. package/Scrollbar/README.md +0 -15
  635. package/Scrollbar/Scrollbar.stories.d.ts +0 -1
  636. package/Scrollbar/Scrollbar.stories.js +0 -29
  637. package/Scrollbar/Scrollbar.stories.js.map +0 -1
  638. package/Section/README.md +0 -11
  639. package/Section/Section.stories.d.ts +0 -1
  640. package/Section/Section.stories.js +0 -35
  641. package/Section/Section.stories.js.map +0 -1
  642. package/Select/README.md +0 -15
  643. package/Select/Select.stories.d.ts +0 -1
  644. package/Select/Select.stories.js +0 -57
  645. package/Select/Select.stories.js.map +0 -1
  646. package/Skeleton/README.md +0 -21
  647. package/Skeleton/Skeleton.stories.d.ts +0 -1
  648. package/Skeleton/Skeleton.stories.js +0 -28
  649. package/Skeleton/Skeleton.stories.js.map +0 -1
  650. package/Slider/README.md +0 -15
  651. package/Slider/Slider.stories.d.ts +0 -1
  652. package/Slider/Slider.stories.js +0 -55
  653. package/Slider/Slider.stories.js.map +0 -1
  654. package/Snackbar/README.md +0 -15
  655. package/Snackbar/Snackbar.stories.d.ts +0 -1
  656. package/Snackbar/Snackbar.stories.js +0 -91
  657. package/Snackbar/Snackbar.stories.js.map +0 -1
  658. package/Switch/README.md +0 -15
  659. package/Switch/Switch.stories.d.ts +0 -1
  660. package/Switch/Switch.stories.js +0 -43
  661. package/Switch/Switch.stories.js.map +0 -1
  662. package/Tabs/Tabs.stories.d.ts +0 -1
  663. package/Tabs/Tabs.stories.js +0 -53
  664. package/Tabs/Tabs.stories.js.map +0 -1
  665. package/Tabs/svg/baseline-autorenew-24px.svg +0 -4
  666. package/Tabs/svg/baseline-cloud_done-24px.svg +0 -4
  667. package/Tabs/svg/baseline-delete-24px.svg +0 -4
  668. package/Tabs/svg/baseline-done-24px.svg +0 -4
  669. package/Tags/README.md +0 -15
  670. package/Tags/Tags.stories.d.ts +0 -1
  671. package/Tags/Tags.stories.js +0 -43
  672. package/Tags/Tags.stories.js.map +0 -1
  673. package/Tags/icons/baseline-close-24px.svg +0 -4
  674. package/Tooltip/README.md +0 -15
  675. package/Tooltip/Tooltip.stories.d.ts +0 -1
  676. package/Tooltip/Tooltip.stories.js +0 -26
  677. package/Tooltip/Tooltip.stories.js.map +0 -1
  678. package/Tooltip/style.scss +0 -97
  679. package/TopAppBar/README.md +0 -20
  680. package/TopAppBar/TopAppBar.stories.d.ts +0 -1
  681. package/TopAppBar/TopAppBar.stories.js +0 -70
  682. package/TopAppBar/TopAppBar.stories.js.map +0 -1
  683. package/TopAppBar/icons/baseline-autorenew-24px.svg +0 -4
  684. package/TopAppBar/icons/baseline-cloud_done-24px.svg +0 -4
  685. package/TopAppBar/icons/baseline-delete-24px.svg +0 -4
  686. package/TopAppBar/icons/baseline-email-24px.svg +0 -4
  687. package/TopAppBar/icons/baseline-menu-24px.svg +0 -4
  688. package/TopProgressBar/README.md +0 -11
  689. package/TopProgressBar/TopProgressBar.d.ts +0 -15
  690. package/TopProgressBar/TopProgressBar.js +0 -22
  691. package/TopProgressBar/TopProgressBar.js.map +0 -1
  692. package/TopProgressBar/TopProgressBar.stories.d.ts +0 -1
  693. package/TopProgressBar/TopProgressBar.stories.js +0 -32
  694. package/TopProgressBar/TopProgressBar.stories.js.map +0 -1
  695. package/TopProgressBar/hoc/index.d.ts +0 -1
  696. package/TopProgressBar/hoc/index.js +0 -15
  697. package/TopProgressBar/hoc/index.js.map +0 -1
  698. package/TopProgressBar/hoc/withTopProgressBar.d.ts +0 -3
  699. package/TopProgressBar/hoc/withTopProgressBar.js +0 -34
  700. package/TopProgressBar/hoc/withTopProgressBar.js.map +0 -1
  701. package/TopProgressBar/index.d.ts +0 -1
  702. package/TopProgressBar/index.js +0 -18
  703. package/TopProgressBar/index.js.map +0 -1
  704. package/TopProgressBar/style.scss +0 -21
  705. package/Typography/README.md +0 -15
  706. package/Typography/Typography.stories.d.ts +0 -1
  707. package/Typography/Typography.stories.js +0 -76
  708. package/Typography/Typography.stories.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["Wrapper","styled","width","left","Slider","e","props","onChange","detail","value","onInput","label","description","validation","sliderValue","min","validationIsValid","isValid","validationMessage","message","React","Component"],"sources":["Slider.tsx"],"sourcesContent":["import React from \"react\";\nimport { Slider as RmwcSlider } from \"@rmwc/slider\";\nimport { FormComponentProps } from \"~/types\";\nimport styled from \"@emotion/styled\";\nimport { FormElementMessage } from \"~/FormElementMessage\";\n\ntype Props = FormComponentProps & {\n // Component label.\n label?: string;\n\n // Is checkbox disabled?\n disabled?: boolean;\n\n // Description beneath the slider.\n description?: string;\n\n // The minimum value of the Slider.\n min: number | string;\n\n // The maximum value of the Slider.\n max: number | string;\n\n // A step to quantize values by.\n step?: number | string;\n\n // Displays the exact value of the Slider on the knob.\n discrete?: boolean;\n\n // Displays the individual step markers on the Slider track.\n displayMarkers?: boolean;\n\n // Function that gets triggered on each input.\n onInput?: Function;\n};\n\n// wrapper fixes a bug in slider where the slider handle is rendered outside the bounds of the slider box\nconst Wrapper = styled(\"div\")({\n width: \"100%\",\n \".mdc-slider .mdc-slider__thumb-container\": {\n left: 5\n }\n});\n\n/**\n * Slider component lets users choose a value from given range.\n */\nclass Slider extends React.Component<Props> {\n onChange = (e: { detail: { value: number } }) => {\n this.props.onChange && this.props.onChange(e.detail.value);\n };\n\n onInput = (e: { detail: { value: number } }) => {\n this.props.onInput && this.props.onInput(e.detail.value);\n };\n\n public override render() {\n const { value, label, description, validation } = this.props;\n\n let sliderValue = value;\n if (value === null || typeof value === \"undefined\") {\n sliderValue = this.props.min || 0;\n }\n\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n\n return (\n <React.Fragment>\n {label && (\n <div className=\"mdc-text-field-helper-text mdc-text-field-helper-text--persistent\">\n {label}\n </div>\n )}\n\n <Wrapper>\n <RmwcSlider\n {...this.props}\n value={sliderValue}\n onChange={this.onChange}\n onInput={this.onInput}\n />\n </Wrapper>\n\n {validationIsValid === false && (\n <FormElementMessage error>{validationMessage}</FormElementMessage>\n )}\n\n {validationIsValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\n </React.Fragment>\n );\n }\n}\n\nexport default Slider;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AA+BA;AACA,IAAMA,OAAO,oBAAGC,eAAH,EAAU,KAAV;EAAA;EAAA;AAAA,GAAiB;EAC1BC,KAAK,EAAE,MADmB;EAE1B,4CAA4C;IACxCC,IAAI,EAAE;EADkC;AAFlB,CAAjB,CAAb;AAOA;AACA;AACA;;IACMC,M;;;;;;;;;;;;;;;2FACS,UAACC,CAAD,EAAsC;MAC7C,MAAKC,KAAL,CAAWC,QAAX,IAAuB,MAAKD,KAAL,CAAWC,QAAX,CAAoBF,CAAC,CAACG,MAAF,CAASC,KAA7B,CAAvB;IACH,C;0FAES,UAACJ,CAAD,EAAsC;MAC5C,MAAKC,KAAL,CAAWI,OAAX,IAAsB,MAAKJ,KAAL,CAAWI,OAAX,CAAmBL,CAAC,CAACG,MAAF,CAASC,KAA5B,CAAtB;IACH,C;;;;;;WAED,kBAAyB;MACrB,kBAAkD,KAAKH,KAAvD;MAAA,IAAQG,KAAR,eAAQA,KAAR;MAAA,IAAeE,KAAf,eAAeA,KAAf;MAAA,IAAsBC,WAAtB,eAAsBA,WAAtB;MAAA,IAAmCC,UAAnC,eAAmCA,UAAnC;MAEA,IAAIC,WAAW,GAAGL,KAAlB;;MACA,IAAIA,KAAK,KAAK,IAAV,IAAkB,OAAOA,KAAP,KAAiB,WAAvC,EAAoD;QAChDK,WAAW,GAAG,KAAKR,KAAL,CAAWS,GAAX,IAAkB,CAAhC;MACH;;MAED,WAAmEF,UAAU,IAAI,EAAjF;MAAA,IAAiBG,iBAAjB,QAAQC,OAAR;MAAA,IAA6CC,iBAA7C,QAAoCC,OAApC;;MAEA,oBACI,6BAAC,cAAD,CAAO,QAAP,QACKR,KAAK,iBACF;QAAK,SAAS,EAAC;MAAf,GACKA,KADL,CAFR,eAOI,6BAAC,OAAD,qBACI,6BAAC,cAAD,oBACQ,KAAKL,KADb;QAEI,KAAK,EAAEQ,WAFX;QAGI,QAAQ,EAAE,KAAKP,QAHnB;QAII,OAAO,EAAE,KAAKG;MAJlB,GADJ,CAPJ,EAgBKM,iBAAiB,KAAK,KAAtB,iBACG,6BAAC,sCAAD;QAAoB,KAAK;MAAzB,GAA2BE,iBAA3B,CAjBR,EAoBKF,iBAAiB,KAAK,KAAtB,IAA+BJ,WAA/B,iBACG,6BAAC,sCAAD,QAAqBA,WAArB,CArBR,CADJ;IA0BH;;;EA7CgBQ,cAAA,CAAMC,S;;eAgDZjB,M"}
1
+ {"version":3,"names":["React","omit","Slider","AdminSlider","Component","onValueCommit","value","props","onChange","onValueChange","onInput","toFloat","defaultValue","result","parseFloat","toString","isNaN","render","label","description","validation","sliderValue","min","createElement","Object","assign","max","step","showTooltip","discrete","note"],"sources":["Slider.tsx"],"sourcesContent":["import React from \"react\";\nimport omit from \"lodash/omit\";\nimport { Slider as AdminSlider } from \"@webiny/admin-ui\";\nimport type { FormComponentProps } from \"~/types\";\n\ntype Props = FormComponentProps & {\n // Component label.\n label?: string;\n\n // Is checkbox disabled?\n disabled?: boolean;\n\n // Description beneath the slider.\n description?: string;\n\n // The minimum value of the Slider.\n min?: number | string;\n\n // The maximum value of the Slider.\n max?: number | string;\n\n // A step to quantize values by.\n step?: number | string;\n\n // Displays the exact value of the Slider on the knob.\n discrete?: boolean;\n\n // Displays the individual step markers on the Slider track.\n displayMarkers?: boolean;\n\n // Function that gets triggered on each input.\n onInput?: (value: any) => void;\n\n readOnly?: boolean;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Slider` component from the `@webiny/admin-ui` package instead.\n */\nclass Slider extends React.Component<Props> {\n onValueCommit = (value: number) => {\n this.props.onChange && this.props.onChange(value);\n };\n\n onValueChange = (value: number) => {\n this.props.onInput && this.props.onInput(value);\n };\n\n toFloat = (value: number | string | undefined, defaultValue = 0): number => {\n if (!value) {\n return defaultValue;\n }\n\n // Convert the value to a string before passing it to parseFloat\n const result = parseFloat(value.toString());\n\n // Check if the result is a valid number\n return isNaN(result) ? defaultValue : result;\n };\n\n public override render() {\n const { value, label, description, validation } = this.props;\n\n let sliderValue = value;\n if (value === null || typeof value === \"undefined\") {\n sliderValue = this.props.min || 0;\n }\n\n return (\n <AdminSlider\n {...omit(this.props, [\"displayMarkers\", \"discrete\", \"onInput\", \"onChange\"])}\n label={label}\n min={this.toFloat(this.props.min)}\n max={this.toFloat(this.props.max, 100)}\n step={this.toFloat(this.props.step, 1)}\n value={sliderValue}\n onValueCommit={this.onValueCommit}\n onValueChange={this.onValueChange}\n showTooltip={this.props.discrete}\n validation={validation}\n note={description}\n />\n );\n }\n}\n\nexport default Slider;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,IAAI,MAAM,aAAa;AAC9B,SAASC,MAAM,IAAIC,WAAW,QAAQ,kBAAkB;AAkCxD;AACA;AACA;AACA;AACA,MAAMD,MAAM,SAASF,KAAK,CAACI,SAAS,CAAQ;EACxCC,aAAa,GAAIC,KAAa,IAAK;IAC/B,IAAI,CAACC,KAAK,CAACC,QAAQ,IAAI,IAAI,CAACD,KAAK,CAACC,QAAQ,CAACF,KAAK,CAAC;EACrD,CAAC;EAEDG,aAAa,GAAIH,KAAa,IAAK;IAC/B,IAAI,CAACC,KAAK,CAACG,OAAO,IAAI,IAAI,CAACH,KAAK,CAACG,OAAO,CAACJ,KAAK,CAAC;EACnD,CAAC;EAEDK,OAAO,GAAGA,CAACL,KAAkC,EAAEM,YAAY,GAAG,CAAC,KAAa;IACxE,IAAI,CAACN,KAAK,EAAE;MACR,OAAOM,YAAY;IACvB;;IAEA;IACA,MAAMC,MAAM,GAAGC,UAAU,CAACR,KAAK,CAACS,QAAQ,CAAC,CAAC,CAAC;;IAE3C;IACA,OAAOC,KAAK,CAACH,MAAM,CAAC,GAAGD,YAAY,GAAGC,MAAM;EAChD,CAAC;EAEeI,MAAMA,CAAA,EAAG;IACrB,MAAM;MAAEX,KAAK;MAAEY,KAAK;MAAEC,WAAW;MAAEC;IAAW,CAAC,GAAG,IAAI,CAACb,KAAK;IAE5D,IAAIc,WAAW,GAAGf,KAAK;IACvB,IAAIA,KAAK,KAAK,IAAI,IAAI,OAAOA,KAAK,KAAK,WAAW,EAAE;MAChDe,WAAW,GAAG,IAAI,CAACd,KAAK,CAACe,GAAG,IAAI,CAAC;IACrC;IAEA,oBACItB,KAAA,CAAAuB,aAAA,CAACpB,WAAW,EAAAqB,MAAA,CAAAC,MAAA,KACJxB,IAAI,CAAC,IAAI,CAACM,KAAK,EAAE,CAAC,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;MAC3EW,KAAK,EAAEA,KAAM;MACbI,GAAG,EAAE,IAAI,CAACX,OAAO,CAAC,IAAI,CAACJ,KAAK,CAACe,GAAG,CAAE;MAClCI,GAAG,EAAE,IAAI,CAACf,OAAO,CAAC,IAAI,CAACJ,KAAK,CAACmB,GAAG,EAAE,GAAG,CAAE;MACvCC,IAAI,EAAE,IAAI,CAAChB,OAAO,CAAC,IAAI,CAACJ,KAAK,CAACoB,IAAI,EAAE,CAAC,CAAE;MACvCrB,KAAK,EAAEe,WAAY;MACnBhB,aAAa,EAAE,IAAI,CAACA,aAAc;MAClCI,aAAa,EAAE,IAAI,CAACA,aAAc;MAClCmB,WAAW,EAAE,IAAI,CAACrB,KAAK,CAACsB,QAAS;MACjCT,UAAU,EAAEA,UAAW;MACvBU,IAAI,EAAEX;IAAY,EACrB,CAAC;EAEV;AACJ;AAEA,eAAejB,MAAM","ignoreList":[]}
package/Slider/index.js CHANGED
@@ -1,15 +1,3 @@
1
- "use strict";
1
+ export { default as Slider } from "./Slider";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- Object.defineProperty(exports, "Slider", {
9
- enumerable: true,
10
- get: function get() {
11
- return _Slider.default;
12
- }
13
- });
14
-
15
- var _Slider = _interopRequireDefault(require("./Slider"));
3
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default as Slider } from \"./Slider\";\n"],"mappings":";;;;;;;;;;;;;;AAAA"}
1
+ {"version":3,"names":["default","Slider"],"sources":["index.ts"],"sourcesContent":["export { default as Slider } from \"./Slider\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,MAAM","ignoreList":[]}
@@ -1,13 +1,48 @@
1
- /// <reference types="web" />
2
1
  import React from "react";
3
- import { SnackbarAction, SnackbarProps } from "@rmwc/snackbar";
4
- declare type Props = SnackbarProps;
2
+ import type { ButtonProps } from "@webiny/admin-ui";
3
+ type CustomEventT<T> = CustomEvent<T> & React.SyntheticEvent<EventTarget>;
4
+ type SnackbarActionProps = ButtonProps & {
5
+ /** Content specified as a label prop. */
6
+ label?: React.ReactNode | any;
7
+ /** An action returned in evt.detail.reason to the onClose handler. */
8
+ action?: string;
9
+ };
10
+ type ToastActionWithDataActionProps = ButtonProps & {
11
+ "data-action"?: string;
12
+ };
13
+ type SnackbarProps = {
14
+ open?: boolean;
15
+ /** A callback thats fired when the Snackbar shows. */
16
+ onOpen?: (evt: CustomEventT<any>) => void;
17
+ /** A callback thats fired when the Snackbar hides. evt.detail = { reason?: string } */
18
+ onClose?: (evt: CustomEventT<{
19
+ reason?: string;
20
+ }>) => void;
21
+ /** A string or other renderable JSX to be used as the message body. */
22
+ message?: React.ReactNode;
23
+ /** One or more actions to add to the snackbar. */
24
+ action?: React.ReactElement<ToastActionWithDataActionProps> | React.ReactElement<ToastActionWithDataActionProps>[];
25
+ /** Milliseconds to show the Snackbar for. Set to -1 to show indefinitely. */
26
+ timeout?: number;
27
+ /** Places the action underneath the message text. */
28
+ stacked?: boolean;
29
+ leading?: boolean;
30
+ dismissIcon?: boolean | React.ReactNode;
31
+ /** Whether or not your want clicking an action to close the Snackbar. */
32
+ dismissesOnAction?: boolean;
33
+ /** An icon for the snackbar */
34
+ icon?: React.ReactNode;
35
+ };
5
36
  /**
6
- * Use Snackbar component to display an informative or alert message and allow users to act upon it.
37
+ * @deprecated This component is deprecated and will be removed in future releases.
38
+ * Please use the `useToast` hook from the `@webiny/admin-ui` to show messages package instead.
7
39
  */
8
- declare class Snackbar extends React.Component<Props> {
9
- readonly container: HTMLElement | null;
10
- constructor(props: Props);
11
- render(): React.ReactElement;
12
- }
40
+ declare const Snackbar: ({ message }: SnackbarProps) => React.JSX.Element;
41
+ /**
42
+ * @deprecated This component is deprecated and will be removed in future releases.
43
+ * Please use the `Button` component from the `@webiny/admin-ui` package instead.
44
+ */
45
+ declare const SnackbarAction: ({ label, action, onClick }: SnackbarActionProps) => React.ReactElement<ButtonProps & {
46
+ "data-action"?: string;
47
+ }>;
13
48
  export { Snackbar, SnackbarAction };
@@ -1,69 +1,32 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.Snackbar = void 0;
9
- Object.defineProperty(exports, "SnackbarAction", {
10
- enumerable: true,
11
- get: function get() {
12
- return _snackbar.SnackbarAction;
13
- }
14
- });
15
-
16
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
17
-
18
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
19
-
20
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
21
-
22
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
23
-
24
- var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
25
-
26
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
27
-
28
- var _react = _interopRequireDefault(require("react"));
29
-
30
- var _snackbar = require("@rmwc/snackbar");
31
-
1
+ import React from "react";
2
+ import { Button } from "@webiny/admin-ui";
32
3
  /**
33
- * Use Snackbar component to display an informative or alert message and allow users to act upon it.
4
+ * @deprecated This component is deprecated and will be removed in future releases.
5
+ * Please use the `useToast` hook from the `@webiny/admin-ui` to show messages package instead.
34
6
  */
35
- var Snackbar = /*#__PURE__*/function (_React$Component) {
36
- (0, _inherits2.default)(Snackbar, _React$Component);
7
+ const Snackbar = ({
8
+ message
9
+ }) => {
10
+ console.warn("Snackbar component has been deprecated: use the `useToast` hook from the `@webiny/admin-ui` to show messages package instead.");
11
+ return /*#__PURE__*/React.createElement(React.Fragment, null, message);
12
+ };
37
13
 
38
- var _super = (0, _createSuper2.default)(Snackbar);
39
-
40
- function Snackbar(props) {
41
- var _this;
42
-
43
- (0, _classCallCheck2.default)(this, Snackbar);
44
- _this = _super.call(this, props);
45
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "container", null);
46
- _this.container = document.getElementById("snackbar-container");
47
-
48
- if (!_this.container) {
49
- _this.container = document.createElement("div");
50
-
51
- _this.container.setAttribute("id", "snackbar-container");
52
-
53
- var container = _this.container;
54
- document.body && document.body.appendChild(container);
55
- }
56
-
57
- return _this;
58
- }
59
-
60
- (0, _createClass2.default)(Snackbar, [{
61
- key: "render",
62
- value: function render() {
63
- return /*#__PURE__*/_react.default.createElement(_snackbar.Snackbar, this.props);
64
- }
65
- }]);
66
- return Snackbar;
67
- }(_react.default.Component);
68
-
69
- exports.Snackbar = Snackbar;
14
+ /**
15
+ * @deprecated This component is deprecated and will be removed in future releases.
16
+ * Please use the `Button` component from the `@webiny/admin-ui` package instead.
17
+ */
18
+ const SnackbarAction = ({
19
+ label,
20
+ action,
21
+ onClick
22
+ }) => {
23
+ return /*#__PURE__*/React.createElement(Button, {
24
+ variant: "primary",
25
+ onClick: onClick,
26
+ "data-action": action,
27
+ text: label
28
+ });
29
+ };
30
+ export { Snackbar, SnackbarAction };
31
+
32
+ //# sourceMappingURL=Snackbar.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Snackbar","props","container","document","getElementById","createElement","setAttribute","body","appendChild","React","Component"],"sources":["Snackbar.tsx"],"sourcesContent":["import React from \"react\";\nimport { Snackbar as RmwcSnackbar, SnackbarAction, SnackbarProps } from \"@rmwc/snackbar\";\n\ntype Props = SnackbarProps;\n\n/**\n * Use Snackbar component to display an informative or alert message and allow users to act upon it.\n */\nclass Snackbar extends React.Component<Props> {\n public readonly container: HTMLElement | null = null;\n\n public constructor(props: Props) {\n super(props);\n\n this.container = document.getElementById(\"snackbar-container\");\n\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.setAttribute(\"id\", \"snackbar-container\");\n const container: HTMLElement = this.container;\n document.body && document.body.appendChild(container);\n }\n }\n\n public override render(): React.ReactElement {\n return <RmwcSnackbar {...this.props} />;\n }\n}\n\nexport { Snackbar, SnackbarAction };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAIA;AACA;AACA;IACMA,Q;;;;;EAGF,kBAAmBC,KAAnB,EAAiC;IAAA;;IAAA;IAC7B,0BAAMA,KAAN;IAD6B,wFAFe,IAEf;IAG7B,MAAKC,SAAL,GAAiBC,QAAQ,CAACC,cAAT,CAAwB,oBAAxB,CAAjB;;IAEA,IAAI,CAAC,MAAKF,SAAV,EAAqB;MACjB,MAAKA,SAAL,GAAiBC,QAAQ,CAACE,aAAT,CAAuB,KAAvB,CAAjB;;MACA,MAAKH,SAAL,CAAeI,YAAf,CAA4B,IAA5B,EAAkC,oBAAlC;;MACA,IAAMJ,SAAsB,GAAG,MAAKA,SAApC;MACAC,QAAQ,CAACI,IAAT,IAAiBJ,QAAQ,CAACI,IAAT,CAAcC,WAAd,CAA0BN,SAA1B,CAAjB;IACH;;IAV4B;EAWhC;;;;WAED,kBAA6C;MACzC,oBAAO,6BAAC,kBAAD,EAAkB,KAAKD,KAAvB,CAAP;IACH;;;EAlBkBQ,cAAA,CAAMC,S"}
1
+ {"version":3,"names":["React","Button","Snackbar","message","console","warn","createElement","Fragment","SnackbarAction","label","action","onClick","variant","text"],"sources":["Snackbar.tsx"],"sourcesContent":["import React from \"react\";\nimport type { ButtonProps } from \"@webiny/admin-ui\";\nimport { Button } from \"@webiny/admin-ui\";\n\ntype CustomEventT<T> = CustomEvent<T> & React.SyntheticEvent<EventTarget>;\n\ntype SnackbarActionProps = ButtonProps & {\n /** Content specified as a label prop. */\n label?: React.ReactNode | any;\n /** An action returned in evt.detail.reason to the onClose handler. */\n action?: string;\n};\n\ntype ToastActionWithDataActionProps = ButtonProps & {\n \"data-action\"?: string;\n};\n\ntype SnackbarProps = {\n open?: boolean;\n /** A callback thats fired when the Snackbar shows. */\n onOpen?: (evt: CustomEventT<any>) => void;\n /** A callback thats fired when the Snackbar hides. evt.detail = { reason?: string } */\n onClose?: (\n evt: CustomEventT<{\n reason?: string;\n }>\n ) => void;\n /** A string or other renderable JSX to be used as the message body. */\n message?: React.ReactNode;\n /** One or more actions to add to the snackbar. */\n action?:\n | React.ReactElement<ToastActionWithDataActionProps>\n | React.ReactElement<ToastActionWithDataActionProps>[];\n /** Milliseconds to show the Snackbar for. Set to -1 to show indefinitely. */\n timeout?: number;\n /** Places the action underneath the message text. */\n stacked?: boolean;\n leading?: boolean;\n dismissIcon?: boolean | React.ReactNode;\n /** Whether or not your want clicking an action to close the Snackbar. */\n dismissesOnAction?: boolean;\n /** An icon for the snackbar */\n icon?: React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `useToast` hook from the `@webiny/admin-ui` to show messages package instead.\n */\nconst Snackbar = ({ message }: SnackbarProps) => {\n console.warn(\n \"Snackbar component has been deprecated: use the `useToast` hook from the `@webiny/admin-ui` to show messages package instead.\"\n );\n return <>{message}</>;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Button` component from the `@webiny/admin-ui` package instead.\n */\nconst SnackbarAction = ({\n label,\n action,\n onClick\n}: SnackbarActionProps): React.ReactElement<ButtonProps & { \"data-action\"?: string }> => {\n return <Button variant={\"primary\"} onClick={onClick} data-action={action} text={label} />;\n};\n\nexport { Snackbar, SnackbarAction };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,MAAM,QAAQ,kBAAkB;AA2CzC;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAGA,CAAC;EAAEC;AAAuB,CAAC,KAAK;EAC7CC,OAAO,CAACC,IAAI,CACR,+HACJ,CAAC;EACD,oBAAOL,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,OAAU,CAAC;AACzB,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMK,cAAc,GAAGA,CAAC;EACpBC,KAAK;EACLC,MAAM;EACNC;AACiB,CAAC,KAAmE;EACrF,oBAAOX,KAAA,CAAAM,aAAA,CAACL,MAAM;IAACW,OAAO,EAAE,SAAU;IAACD,OAAO,EAAEA,OAAQ;IAAC,eAAaD,MAAO;IAACG,IAAI,EAAEJ;EAAM,CAAE,CAAC;AAC7F,CAAC;AAED,SAASP,QAAQ,EAAEM,cAAc","ignoreList":[]}
package/Snackbar/index.js CHANGED
@@ -1,19 +1,3 @@
1
- "use strict";
1
+ export { Snackbar, SnackbarAction } from "./Snackbar";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Snackbar", {
7
- enumerable: true,
8
- get: function get() {
9
- return _Snackbar.Snackbar;
10
- }
11
- });
12
- Object.defineProperty(exports, "SnackbarAction", {
13
- enumerable: true,
14
- get: function get() {
15
- return _Snackbar.SnackbarAction;
16
- }
17
- });
18
-
19
- var _Snackbar = require("./Snackbar");
3
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { Snackbar, SnackbarAction } from \"./Snackbar\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA"}
1
+ {"version":3,"names":["Snackbar","SnackbarAction"],"sources":["index.ts"],"sourcesContent":["export { Snackbar, SnackbarAction } from \"./Snackbar\";\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,cAAc","ignoreList":[]}
@@ -1,17 +1,30 @@
1
- /// <reference types="web" />
2
1
  import React from "react";
3
- import { SwitchProps } from "@rmwc/switch";
4
- import { FormComponentProps } from "../types";
5
- declare type Props = FormComponentProps & SwitchProps & {
2
+ import type { FormComponentProps } from "../types";
3
+ type SwitchProps = {
4
+ /** A DOM ID for the toggle. */
5
+ id?: string;
6
+ /** Disables the control. */
7
+ disabled?: boolean;
8
+ /** Toggle the control on and off. */
9
+ checked?: boolean;
10
+ /** The value of the control. */
11
+ value?: string | number | string[];
12
+ /** A label for the control. */
13
+ label?: React.ReactNode;
14
+ /** By default, all props except className and style spread to the input. These are additional props for the root of the checkbox. */
15
+ rootProps?: React.HTMLProps<any>;
16
+ /** A reference to the native input. */
17
+ inputRef?: React.Ref<HTMLInputElement>;
18
+ };
19
+ type Props = Omit<SwitchProps, "value"> & FormComponentProps<boolean> & {
6
20
  description?: string;
7
21
  className?: string;
8
22
  };
9
23
  /**
10
- * Switch component can be used to store simple boolean values.
24
+ * @deprecated This component is deprecated and will be removed in future releases.
25
+ * Please use the `Switch` component from the `@webiny/admin-ui` package instead.
11
26
  */
12
27
  declare class Switch extends React.Component<Props> {
13
- static rmwcProps: string[];
14
- onChange: (e: React.SyntheticEvent<HTMLElement>) => void;
15
- render(): JSX.Element;
28
+ render(): React.JSX.Element;
16
29
  }
17
30
  export { Switch };
package/Switch/Switch.js CHANGED
@@ -1,82 +1,30 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.Switch = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
-
14
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
-
16
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
17
-
18
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
19
-
20
- var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
21
-
22
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
23
-
24
- var _react = _interopRequireDefault(require("react"));
25
-
26
- var _switch = require("@rmwc/switch");
27
-
28
- var _pick = _interopRequireDefault(require("lodash/pick"));
29
-
30
- var _FormElementMessage = require("../FormElementMessage");
31
-
32
- var _Helpers = require("../Helpers");
33
-
1
+ import React from "react";
2
+ import { Switch as AdminSwitch } from "@webiny/admin-ui";
34
3
  /**
35
- * Switch component can be used to store simple boolean values.
4
+ * @deprecated This component is deprecated and will be removed in future releases.
5
+ * Please use the `Switch` component from the `@webiny/admin-ui` package instead.
36
6
  */
37
- var Switch = /*#__PURE__*/function (_React$Component) {
38
- (0, _inherits2.default)(Switch, _React$Component);
39
-
40
- var _super = (0, _createSuper2.default)(Switch);
41
-
42
- function Switch() {
43
- var _this;
44
-
45
- (0, _classCallCheck2.default)(this, Switch);
46
-
47
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
48
- args[_key] = arguments[_key];
49
- }
50
-
51
- _this = _super.call.apply(_super, [this].concat(args));
52
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onChange", function (e) {
53
- _this.props.onChange && _this.props.onChange(e.target.checked);
7
+ class Switch extends React.Component {
8
+ render() {
9
+ const {
10
+ value,
11
+ description,
12
+ validation,
13
+ label,
14
+ disabled
15
+ } = this.props;
16
+ return /*#__PURE__*/React.createElement(AdminSwitch, {
17
+ label: label,
18
+ note: description,
19
+ validation: validation,
20
+ className: "webiny-ui-switch",
21
+ checked: Boolean(value),
22
+ value: String(value),
23
+ onChange: () => this.props.onChange && this.props.onChange(!value),
24
+ disabled: disabled
54
25
  });
55
- return _this;
56
26
  }
27
+ }
28
+ export { Switch };
57
29
 
58
- (0, _createClass2.default)(Switch, [{
59
- key: "render",
60
- value: function render() {
61
- var _this$props = this.props,
62
- value = _this$props.value,
63
- description = _this$props.description,
64
- validation = _this$props.validation;
65
-
66
- var _ref = validation || {},
67
- validationIsValid = _ref.isValid,
68
- validationMessage = _ref.message;
69
-
70
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_switch.Switch, Object.assign({}, (0, _Helpers.getClasses)((0, _objectSpread2.default)({}, (0, _pick.default)(this.props, Switch.rmwcProps)), "webiny-ui-switch"), {
71
- checked: Boolean(value),
72
- onChange: this.onChange
73
- })), validationIsValid === false && /*#__PURE__*/_react.default.createElement(_FormElementMessage.FormElementMessage, {
74
- error: true
75
- }, validationMessage), validationIsValid !== false && description && /*#__PURE__*/_react.default.createElement(_FormElementMessage.FormElementMessage, null, description));
76
- }
77
- }]);
78
- return Switch;
79
- }(_react.default.Component);
80
-
81
- exports.Switch = Switch;
82
- (0, _defineProperty2.default)(Switch, "rmwcProps", ["id", "disabled", "checked", "label", "rootProps", "className"]);
30
+ //# sourceMappingURL=Switch.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Switch","e","props","onChange","target","checked","value","description","validation","validationIsValid","isValid","validationMessage","message","getClasses","pick","rmwcProps","Boolean","React","Component"],"sources":["Switch.tsx"],"sourcesContent":["import React from \"react\";\nimport { Switch as RmwcSwitch, SwitchProps } from \"@rmwc/switch\";\nimport { FormComponentProps } from \"~/types\";\nimport pick from \"lodash/pick\";\nimport { FormElementMessage } from \"~/FormElementMessage\";\nimport { getClasses } from \"~/Helpers\";\n\ntype Props = FormComponentProps &\n SwitchProps & {\n // Description beneath the switch.\n description?: string;\n\n // Optional class name.\n className?: string;\n };\n\n/**\n * Switch component can be used to store simple boolean values.\n */\nclass Switch extends React.Component<Props> {\n static rmwcProps = [\"id\", \"disabled\", \"checked\", \"label\", \"rootProps\", \"className\"];\n\n onChange = (e: React.SyntheticEvent<HTMLElement>) => {\n this.props.onChange && this.props.onChange((e.target as any).checked);\n };\n\n public override render() {\n const { value, description, validation } = this.props;\n\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n\n return (\n <React.Fragment>\n <RmwcSwitch\n {...getClasses({ ...pick(this.props, Switch.rmwcProps) }, \"webiny-ui-switch\")}\n checked={Boolean(value)}\n onChange={this.onChange}\n />\n\n {validationIsValid === false && (\n <FormElementMessage error>{validationMessage}</FormElementMessage>\n )}\n\n {validationIsValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\n </React.Fragment>\n );\n }\n}\n\nexport { Switch };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AAWA;AACA;AACA;IACMA,M;;;;;;;;;;;;;;;2FAGS,UAACC,CAAD,EAA0C;MACjD,MAAKC,KAAL,CAAWC,QAAX,IAAuB,MAAKD,KAAL,CAAWC,QAAX,CAAqBF,CAAC,CAACG,MAAH,CAAkBC,OAAtC,CAAvB;IACH,C;;;;;;WAED,kBAAyB;MACrB,kBAA2C,KAAKH,KAAhD;MAAA,IAAQI,KAAR,eAAQA,KAAR;MAAA,IAAeC,WAAf,eAAeA,WAAf;MAAA,IAA4BC,UAA5B,eAA4BA,UAA5B;;MAEA,WAAmEA,UAAU,IAAI,EAAjF;MAAA,IAAiBC,iBAAjB,QAAQC,OAAR;MAAA,IAA6CC,iBAA7C,QAAoCC,OAApC;;MAEA,oBACI,6BAAC,cAAD,CAAO,QAAP,qBACI,6BAAC,cAAD,oBACQ,IAAAC,mBAAA,kCAAgB,IAAAC,aAAA,EAAK,KAAKZ,KAAV,EAAiBF,MAAM,CAACe,SAAxB,CAAhB,GAAsD,kBAAtD,CADR;QAEI,OAAO,EAAEC,OAAO,CAACV,KAAD,CAFpB;QAGI,QAAQ,EAAE,KAAKH;MAHnB,GADJ,EAOKM,iBAAiB,KAAK,KAAtB,iBACG,6BAAC,sCAAD;QAAoB,KAAK;MAAzB,GAA2BE,iBAA3B,CARR,EAWKF,iBAAiB,KAAK,KAAtB,IAA+BF,WAA/B,iBACG,6BAAC,sCAAD,QAAqBA,WAArB,CAZR,CADJ;IAiBH;;;EA7BgBU,cAAA,CAAMC,S;;;8BAArBlB,M,eACiB,CAAC,IAAD,EAAO,UAAP,EAAmB,SAAnB,EAA8B,OAA9B,EAAuC,WAAvC,EAAoD,WAApD,C"}
1
+ {"version":3,"names":["React","Switch","AdminSwitch","Component","render","value","description","validation","label","disabled","props","createElement","note","className","checked","Boolean","String","onChange"],"sources":["Switch.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FormComponentProps } from \"~/types\";\nimport { Switch as AdminSwitch } from \"@webiny/admin-ui\";\n\ntype SwitchProps = {\n /** A DOM ID for the toggle. */\n id?: string;\n /** Disables the control. */\n disabled?: boolean;\n /** Toggle the control on and off. */\n checked?: boolean;\n /** The value of the control. */\n value?: string | number | string[];\n /** A label for the control. */\n label?: React.ReactNode;\n /** By default, all props except className and style spread to the input. These are additional props for the root of the checkbox. */\n rootProps?: React.HTMLProps<any>;\n /** A reference to the native input. */\n inputRef?: React.Ref<HTMLInputElement>;\n};\n\ntype Props = Omit<SwitchProps, \"value\"> &\n FormComponentProps<boolean> & {\n // Description beneath the switch.\n description?: string;\n\n // Optional class name.\n className?: string;\n };\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Switch` component from the `@webiny/admin-ui` package instead.\n */\nclass Switch extends React.Component<Props> {\n public override render() {\n const { value, description, validation, label, disabled } = this.props;\n\n return (\n <AdminSwitch\n label={label}\n note={description}\n validation={validation}\n className={\"webiny-ui-switch\"}\n checked={Boolean(value)}\n value={String(value)}\n onChange={() => this.props.onChange && this.props.onChange(!value)}\n disabled={disabled}\n />\n );\n }\n}\n\nexport { Switch };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,MAAM,IAAIC,WAAW,QAAQ,kBAAkB;AA4BxD;AACA;AACA;AACA;AACA,MAAMD,MAAM,SAASD,KAAK,CAACG,SAAS,CAAQ;EACxBC,MAAMA,CAAA,EAAG;IACrB,MAAM;MAAEC,KAAK;MAAEC,WAAW;MAAEC,UAAU;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACC,KAAK;IAEtE,oBACIV,KAAA,CAAAW,aAAA,CAACT,WAAW;MACRM,KAAK,EAAEA,KAAM;MACbI,IAAI,EAAEN,WAAY;MAClBC,UAAU,EAAEA,UAAW;MACvBM,SAAS,EAAE,kBAAmB;MAC9BC,OAAO,EAAEC,OAAO,CAACV,KAAK,CAAE;MACxBA,KAAK,EAAEW,MAAM,CAACX,KAAK,CAAE;MACrBY,QAAQ,EAAEA,CAAA,KAAM,IAAI,CAACP,KAAK,CAACO,QAAQ,IAAI,IAAI,CAACP,KAAK,CAACO,QAAQ,CAAC,CAACZ,KAAK,CAAE;MACnEI,QAAQ,EAAEA;IAAS,CACtB,CAAC;EAEV;AACJ;AAEA,SAASR,MAAM","ignoreList":[]}
package/Switch/index.js CHANGED
@@ -1,18 +1,3 @@
1
- "use strict";
1
+ export * from "./Switch";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _Switch = require("./Switch");
8
-
9
- Object.keys(_Switch).forEach(function (key) {
10
- if (key === "default" || key === "__esModule") return;
11
- if (key in exports && exports[key] === _Switch[key]) return;
12
- Object.defineProperty(exports, key, {
13
- enumerable: true,
14
- get: function get() {
15
- return _Switch[key];
16
- }
17
- });
18
- });
3
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Switch\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Switch\";\n"],"mappings":"AAAA","ignoreList":[]}
package/Tabs/Tab.d.ts CHANGED
@@ -1,6 +1,24 @@
1
1
  import React from "react";
2
- import { TabProps as RmwcTabProps } from "@rmwc/tabs";
3
- export declare type TabProps = RmwcTabProps & {
2
+ export type TabProps = {
3
+ /**
4
+ * A label for the tab.
5
+ */
6
+ label?: any;
7
+ /**
8
+ * The label for the tab, passed as children.
9
+ */
10
+ children?: React.ReactNode;
11
+ /**
12
+ * The icon to use for the tab.
13
+ */
14
+ icon?: React.ReactElement;
15
+ /**
16
+ * Is tab visible?
17
+ */
18
+ visible?: boolean;
19
+ /**
20
+ * @deprecated
21
+ */
4
22
  tag?: string;
5
23
  /**
6
24
  * Is tab disabled?
@@ -15,4 +33,8 @@ export declare type TabProps = RmwcTabProps & {
15
33
  */
16
34
  "data-testid"?: string;
17
35
  };
18
- export declare const Tab: React.FC<TabProps>;
36
+ /**
37
+ * @deprecated This component is deprecated and will be removed in future releases.
38
+ * Please find out the new `Tabs` component props from the `@webiny/admin-ui` package instead.
39
+ */
40
+ export declare const Tab: React.MemoExoticComponent<(props: TabProps) => null>;
package/Tabs/Tab.js CHANGED
@@ -1,37 +1,27 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
-
5
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports.Tab = void 0;
11
-
12
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
13
-
14
- var _react = _interopRequireWildcard(require("react"));
15
-
16
- var _shortid = _interopRequireDefault(require("shortid"));
17
-
18
- var _Tabs = require("./Tabs");
19
-
20
- var Tab = /*#__PURE__*/_react.default.memo(function (props) {
21
- var tabsContext = (0, _react.useContext)(_Tabs.TabsContext);
22
- var idRef = (0, _react.useRef)(_shortid.default.generate());
23
- (0, _react.useEffect)(function () {
24
- tabsContext.addTab((0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
25
- id: idRef.current
26
- }));
1
+ import React, { useContext, useEffect, useRef } from "react";
2
+ import { generateAlphaNumericId } from "@webiny/utils/generateId";
3
+ import { DeprecatedTabsContext } from "./Tabs";
4
+ /**
5
+ * @deprecated This component is deprecated and will be removed in future releases.
6
+ * Please find out the new `Tabs` component props from the `@webiny/admin-ui` package instead.
7
+ */
8
+ export const Tab = /*#__PURE__*/React.memo(props => {
9
+ const tabsContext = useContext(DeprecatedTabsContext);
10
+ const idRef = useRef(generateAlphaNumericId(12));
11
+ useEffect(() => {
12
+ tabsContext.addTab({
13
+ ...props,
14
+ id: idRef.current,
15
+ visible: props.visible ?? true
16
+ });
27
17
  }, [props]);
28
- (0, _react.useEffect)(function () {
29
- return function () {
18
+ useEffect(() => {
19
+ return () => {
30
20
  return tabsContext.removeTab(idRef.current);
31
21
  };
32
22
  }, []);
33
23
  return null;
34
24
  });
25
+ Tab.displayName = "Tab";
35
26
 
36
- exports.Tab = Tab;
37
- Tab.displayName = "Tab";
27
+ //# sourceMappingURL=Tab.js.map
package/Tabs/Tab.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["Tab","React","memo","props","tabsContext","useContext","TabsContext","idRef","useRef","shortid","generate","useEffect","addTab","id","current","removeTab","displayName"],"sources":["Tab.tsx"],"sourcesContent":["import React, { useContext, useEffect, useRef } from \"react\";\nimport { TabProps as RmwcTabProps } from \"@rmwc/tabs\";\nimport shortid from \"shortid\";\nimport { TabsContext } from \"./Tabs\";\n\nexport type TabProps = RmwcTabProps & {\n tag?: string;\n /**\n * Is tab disabled?\n */\n disabled?: boolean;\n /**\n * Style object\n */\n style?: React.CSSProperties;\n /**\n * Tab ID for the testing.\n */\n \"data-testid\"?: string;\n};\n\nexport const Tab: React.FC<TabProps> = React.memo(props => {\n const tabsContext = useContext(TabsContext);\n const idRef = useRef(shortid.generate());\n\n useEffect(() => {\n tabsContext!.addTab({ ...props, id: idRef.current });\n }, [props]);\n\n useEffect(() => {\n return () => {\n return tabsContext!.removeTab(idRef.current);\n };\n }, []);\n\n return null;\n});\n\nTab.displayName = \"Tab\";\n"],"mappings":";;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AAkBO,IAAMA,GAAuB,gBAAGC,cAAA,CAAMC,IAAN,CAAW,UAAAC,KAAK,EAAI;EACvD,IAAMC,WAAW,GAAG,IAAAC,iBAAA,EAAWC,iBAAX,CAApB;EACA,IAAMC,KAAK,GAAG,IAAAC,aAAA,EAAOC,gBAAA,CAAQC,QAAR,EAAP,CAAd;EAEA,IAAAC,gBAAA,EAAU,YAAM;IACZP,WAAW,CAAEQ,MAAb,6DAAyBT,KAAzB;MAAgCU,EAAE,EAAEN,KAAK,CAACO;IAA1C;EACH,CAFD,EAEG,CAACX,KAAD,CAFH;EAIA,IAAAQ,gBAAA,EAAU,YAAM;IACZ,OAAO,YAAM;MACT,OAAOP,WAAW,CAAEW,SAAb,CAAuBR,KAAK,CAACO,OAA7B,CAAP;IACH,CAFD;EAGH,CAJD,EAIG,EAJH;EAMA,OAAO,IAAP;AACH,CAfsC,CAAhC;;;AAiBPd,GAAG,CAACgB,WAAJ,GAAkB,KAAlB"}
1
+ {"version":3,"names":["React","useContext","useEffect","useRef","generateAlphaNumericId","DeprecatedTabsContext","Tab","memo","props","tabsContext","idRef","addTab","id","current","visible","removeTab","displayName"],"sources":["Tab.tsx"],"sourcesContent":["import React, { useContext, useEffect, useRef } from \"react\";\nimport { generateAlphaNumericId } from \"@webiny/utils/generateId\";\nimport { DeprecatedTabsContext } from \"./Tabs\";\n\nexport type TabProps = {\n /**\n * A label for the tab.\n */\n label?: any;\n /**\n * The label for the tab, passed as children.\n */\n children?: React.ReactNode;\n /**\n * The icon to use for the tab.\n */\n icon?: React.ReactElement;\n /**\n * Is tab visible?\n */\n visible?: boolean;\n /**\n * @deprecated\n */\n tag?: string;\n /**\n * Is tab disabled?\n */\n disabled?: boolean;\n /**\n * Style object\n */\n style?: React.CSSProperties;\n /**\n * Tab ID for the testing.\n */\n \"data-testid\"?: string;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `Tabs` component props from the `@webiny/admin-ui` package instead.\n */\nexport const Tab = React.memo((props: TabProps) => {\n const tabsContext = useContext(DeprecatedTabsContext);\n const idRef = useRef(generateAlphaNumericId(12));\n\n useEffect(() => {\n tabsContext!.addTab({ ...props, id: idRef.current, visible: props.visible ?? true });\n }, [props]);\n\n useEffect(() => {\n return () => {\n return tabsContext!.removeTab(idRef.current);\n };\n }, []);\n\n return null;\n});\n\nTab.displayName = \"Tab\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAC5D,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,SAASC,qBAAqB;AAqC9B;AACA;AACA;AACA;AACA,OAAO,MAAMC,GAAG,gBAAGN,KAAK,CAACO,IAAI,CAAEC,KAAe,IAAK;EAC/C,MAAMC,WAAW,GAAGR,UAAU,CAACI,qBAAqB,CAAC;EACrD,MAAMK,KAAK,GAAGP,MAAM,CAACC,sBAAsB,CAAC,EAAE,CAAC,CAAC;EAEhDF,SAAS,CAAC,MAAM;IACZO,WAAW,CAAEE,MAAM,CAAC;MAAE,GAAGH,KAAK;MAAEI,EAAE,EAAEF,KAAK,CAACG,OAAO;MAAEC,OAAO,EAAEN,KAAK,CAACM,OAAO,IAAI;IAAK,CAAC,CAAC;EACxF,CAAC,EAAE,CAACN,KAAK,CAAC,CAAC;EAEXN,SAAS,CAAC,MAAM;IACZ,OAAO,MAAM;MACT,OAAOO,WAAW,CAAEM,SAAS,CAACL,KAAK,CAACG,OAAO,CAAC;IAChD,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO,IAAI;AACf,CAAC,CAAC;AAEFP,GAAG,CAACU,WAAW,GAAG,KAAK","ignoreList":[]}