@webiny/ui 0.0.0-mt-3 → 0.0.0-unstable.2af142b57e

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 (484) hide show
  1. package/Accordion/Accordion.d.ts +5 -5
  2. package/Accordion/Accordion.js +22 -22
  3. package/Accordion/Accordion.js.map +1 -0
  4. package/Accordion/Accordion.stories.js +26 -23
  5. package/Accordion/Accordion.stories.js.map +1 -0
  6. package/Accordion/AccordionItem.d.ts +24 -8
  7. package/Accordion/AccordionItem.js +91 -84
  8. package/Accordion/AccordionItem.js.map +1 -0
  9. package/Accordion/AccordionItemActions.d.ts +8 -0
  10. package/Accordion/AccordionItemActions.js +28 -0
  11. package/Accordion/AccordionItemActions.js.map +1 -0
  12. package/Accordion/index.js +27 -2
  13. package/Accordion/index.js.map +1 -0
  14. package/Alert/Alert.d.ts +4 -4
  15. package/Alert/Alert.js +19 -15
  16. package/Alert/Alert.js.map +1 -0
  17. package/Alert/Alert.stories.js +16 -13
  18. package/Alert/Alert.stories.js.map +1 -0
  19. package/Alert/index.js +16 -1
  20. package/Alert/index.js.map +1 -0
  21. package/AutoComplete/AutoComplete.d.ts +12 -19
  22. package/AutoComplete/AutoComplete.js +147 -148
  23. package/AutoComplete/AutoComplete.js.map +1 -0
  24. package/AutoComplete/AutoComplete.stories.js +20 -17
  25. package/AutoComplete/AutoComplete.stories.js.map +1 -0
  26. package/AutoComplete/MultiAutoComplete.d.ts +44 -40
  27. package/AutoComplete/MultiAutoComplete.js +304 -311
  28. package/AutoComplete/MultiAutoComplete.js.map +1 -0
  29. package/AutoComplete/MultiAutoComplete.stories.js +31 -28
  30. package/AutoComplete/MultiAutoComplete.stories.js.map +1 -0
  31. package/AutoComplete/index.js +27 -2
  32. package/AutoComplete/index.js.map +1 -0
  33. package/AutoComplete/styles.js +12 -4
  34. package/AutoComplete/styles.js.map +1 -0
  35. package/AutoComplete/types.d.ts +4 -3
  36. package/AutoComplete/types.js +5 -1
  37. package/AutoComplete/types.js.map +1 -0
  38. package/AutoComplete/utils.d.ts +11 -5
  39. package/AutoComplete/utils.js +15 -8
  40. package/AutoComplete/utils.js.map +1 -0
  41. package/Avatar/Avatar.d.ts +5 -11
  42. package/Avatar/Avatar.js +37 -28
  43. package/Avatar/Avatar.js.map +1 -0
  44. package/Avatar/Avatar.stories.js +13 -10
  45. package/Avatar/Avatar.stories.js.map +1 -0
  46. package/Avatar/index.js +16 -1
  47. package/Avatar/index.js.map +1 -0
  48. package/Button/Button.d.ts +39 -24
  49. package/Button/Button.js +74 -83
  50. package/Button/Button.js.map +1 -0
  51. package/Button/Button.stories.js +32 -29
  52. package/Button/Button.stories.js.map +1 -0
  53. package/Button/Button.styles.d.ts +6 -0
  54. package/Button/Button.styles.js +13 -0
  55. package/Button/Button.styles.js.map +1 -0
  56. package/Button/CopyButton/CopyButton.d.ts +4 -7
  57. package/Button/CopyButton/CopyButton.js +18 -18
  58. package/Button/CopyButton/CopyButton.js.map +1 -0
  59. package/Button/CopyButton/CopyButton.stories.js +13 -10
  60. package/Button/CopyButton/CopyButton.stories.js.map +1 -0
  61. package/Button/IconButton/IconButton.d.ts +4 -7
  62. package/Button/IconButton/IconButton.js +16 -15
  63. package/Button/IconButton/IconButton.js.map +1 -0
  64. package/Button/IconButton/IconButton.stories.js +22 -19
  65. package/Button/IconButton/IconButton.stories.js.map +1 -0
  66. package/Button/index.js +38 -3
  67. package/Button/index.js.map +1 -0
  68. package/Carousel/Carousel.d.ts +3 -3
  69. package/Carousel/Carousel.js +24 -25
  70. package/Carousel/Carousel.js.map +1 -0
  71. package/Carousel/Carouser.stories.js +20 -17
  72. package/Carousel/Carouser.stories.js.map +1 -0
  73. package/Carousel/index.js +13 -1
  74. package/Carousel/index.js.map +1 -0
  75. package/Checkbox/Checkbox.d.ts +5 -9
  76. package/Checkbox/Checkbox.js +38 -43
  77. package/Checkbox/Checkbox.js.map +1 -0
  78. package/Checkbox/Checkbox.stories.js +19 -16
  79. package/Checkbox/Checkbox.stories.js.map +1 -0
  80. package/Checkbox/Checkbox.styles.js +9 -4
  81. package/Checkbox/Checkbox.styles.js.map +1 -0
  82. package/Checkbox/CheckboxGroup.d.ts +2 -2
  83. package/Checkbox/CheckboxGroup.js +34 -35
  84. package/Checkbox/CheckboxGroup.js.map +1 -0
  85. package/Checkbox/CheckboxGroup.stories.js +23 -20
  86. package/Checkbox/CheckboxGroup.stories.js.map +1 -0
  87. package/Checkbox/index.js +20 -2
  88. package/Checkbox/index.js.map +1 -0
  89. package/Chips/Chip.d.ts +3 -8
  90. package/Chips/Chip.js +15 -8
  91. package/Chips/Chip.js.map +1 -0
  92. package/Chips/Chips.d.ts +4 -4
  93. package/Chips/Chips.js +21 -14
  94. package/Chips/Chips.js.map +1 -0
  95. package/Chips/Chips.stories.js +25 -18
  96. package/Chips/Chips.stories.js.map +1 -0
  97. package/Chips/index.d.ts +0 -1
  98. package/Chips/index.js +27 -3
  99. package/Chips/index.js.map +1 -0
  100. package/Chips/styles.js +19 -9
  101. package/Chips/styles.js.map +1 -0
  102. package/CodeEditor/CodeEditor.d.ts +5 -8
  103. package/CodeEditor/CodeEditor.js +42 -49
  104. package/CodeEditor/CodeEditor.js.map +1 -0
  105. package/CodeEditor/CodeEditor.stories.js +20 -17
  106. package/CodeEditor/CodeEditor.stories.js.map +1 -0
  107. package/CodeEditor/index.js +16 -1
  108. package/CodeEditor/index.js.map +1 -0
  109. package/ColorPicker/ColorPicker.d.ts +9 -10
  110. package/ColorPicker/ColorPicker.js +54 -66
  111. package/ColorPicker/ColorPicker.js.map +1 -0
  112. package/ColorPicker/ColorPicker.stories.js +18 -15
  113. package/ColorPicker/ColorPicker.stories.js.map +1 -0
  114. package/ColorPicker/index.js +16 -1
  115. package/ColorPicker/index.js.map +1 -0
  116. package/ConfirmationDialog/ConfirmationDialog.d.ts +13 -13
  117. package/ConfirmationDialog/ConfirmationDialog.js +75 -96
  118. package/ConfirmationDialog/ConfirmationDialog.js.map +1 -0
  119. package/ConfirmationDialog/ConfirmationDialog.stories.js +15 -12
  120. package/ConfirmationDialog/ConfirmationDialog.stories.js.map +1 -0
  121. package/ConfirmationDialog/index.js +27 -2
  122. package/ConfirmationDialog/index.js.map +1 -0
  123. package/ConfirmationDialog/withConfirmation.d.ts +2 -2
  124. package/ConfirmationDialog/withConfirmation.js +14 -6
  125. package/ConfirmationDialog/withConfirmation.js.map +1 -0
  126. package/DataTable/DataTable.d.ts +25 -0
  127. package/DataTable/DataTable.js +146 -0
  128. package/DataTable/DataTable.js.map +1 -0
  129. package/DataTable/DataTable.stories.d.ts +1 -0
  130. package/DataTable/DataTable.stories.js +71 -0
  131. package/DataTable/DataTable.stories.js.map +1 -0
  132. package/DataTable/README.md +72 -0
  133. package/DataTable/index.d.ts +1 -0
  134. package/DataTable/index.js +16 -0
  135. package/DataTable/index.js.map +1 -0
  136. package/DataTable/styled.d.ts +2 -0
  137. package/DataTable/styled.js +14 -0
  138. package/DataTable/styled.js.map +1 -0
  139. package/DelayedOnChange/DelayedOnChange.d.ts +40 -0
  140. package/DelayedOnChange/DelayedOnChange.js +110 -0
  141. package/DelayedOnChange/DelayedOnChange.js.map +1 -0
  142. package/DelayedOnChange/index.d.ts +2 -0
  143. package/DelayedOnChange/index.js +20 -0
  144. package/DelayedOnChange/index.js.map +1 -0
  145. package/DelayedOnChange/withDelayedOnChange.d.ts +3 -0
  146. package/DelayedOnChange/withDelayedOnChange.js +31 -0
  147. package/DelayedOnChange/withDelayedOnChange.js.map +1 -0
  148. package/Dialog/Dialog.d.ts +22 -30
  149. package/Dialog/Dialog.js +59 -55
  150. package/Dialog/Dialog.js.map +1 -0
  151. package/Dialog/Dialog.stories.js +19 -16
  152. package/Dialog/Dialog.stories.js.map +1 -0
  153. package/Dialog/index.js +16 -1
  154. package/Dialog/index.js.map +1 -0
  155. package/Drawer/Drawer.d.ts +1 -1
  156. package/Drawer/Drawer.js +14 -9
  157. package/Drawer/Drawer.js.map +1 -0
  158. package/Drawer/Drawer.stories.js +18 -15
  159. package/Drawer/Drawer.stories.js.map +1 -0
  160. package/Drawer/index.js +16 -1
  161. package/Drawer/index.js.map +1 -0
  162. package/DynamicFieldset/Fieldset.d.ts +26 -16
  163. package/DynamicFieldset/Fieldset.js +69 -74
  164. package/DynamicFieldset/Fieldset.js.map +1 -0
  165. package/DynamicFieldset/index.js +13 -1
  166. package/DynamicFieldset/index.js.map +1 -0
  167. package/Elevation/Elevation.d.ts +1 -1
  168. package/Elevation/Elevation.js +12 -6
  169. package/Elevation/Elevation.js.map +1 -0
  170. package/Elevation/Elevation.stories.js +19 -16
  171. package/Elevation/Elevation.stories.js.map +1 -0
  172. package/Elevation/index.js +16 -1
  173. package/Elevation/index.js.map +1 -0
  174. package/FormElementMessage/FormElementMessage.d.ts +1 -1
  175. package/FormElementMessage/FormElementMessage.js +11 -6
  176. package/FormElementMessage/FormElementMessage.js.map +1 -0
  177. package/FormElementMessage/index.js +12 -1
  178. package/FormElementMessage/index.js.map +1 -0
  179. package/FullName/FullName.js +7 -7
  180. package/FullName/FullName.js.map +1 -0
  181. package/FullName/index.js +16 -1
  182. package/FullName/index.js.map +1 -0
  183. package/Grid/Grid.d.ts +1 -1
  184. package/Grid/Grid.js +19 -10
  185. package/Grid/Grid.js.map +1 -0
  186. package/Grid/Grid.stories.js +15 -12
  187. package/Grid/Grid.stories.js.map +1 -0
  188. package/Grid/index.js +16 -1
  189. package/Grid/index.js.map +1 -0
  190. package/Helpers/ClassNames.d.ts +4 -3
  191. package/Helpers/ClassNames.js +16 -14
  192. package/Helpers/ClassNames.js.map +1 -0
  193. package/Helpers/index.js +12 -2
  194. package/Helpers/index.js.map +1 -0
  195. package/Icon/Icon.d.ts +3 -6
  196. package/Icon/Icon.js +15 -12
  197. package/Icon/Icon.js.map +1 -0
  198. package/Icon/Icon.stories.js +23 -20
  199. package/Icon/Icon.stories.js.map +1 -0
  200. package/Icon/index.js +16 -1
  201. package/Icon/index.js.map +1 -0
  202. package/Image/Image.d.ts +5 -4
  203. package/Image/Image.js +17 -13
  204. package/Image/Image.js.map +1 -0
  205. package/Image/Image.stories.js +14 -11
  206. package/Image/Image.stories.js.map +1 -0
  207. package/Image/index.js +16 -1
  208. package/Image/index.js.map +1 -0
  209. package/ImageEditor/ImageEditor.d.ts +33 -34
  210. package/ImageEditor/ImageEditor.js +129 -163
  211. package/ImageEditor/ImageEditor.js.map +1 -0
  212. package/ImageEditor/index.js +16 -1
  213. package/ImageEditor/index.js.map +1 -0
  214. package/ImageEditor/toolbar/crop.js +26 -22
  215. package/ImageEditor/toolbar/crop.js.map +1 -0
  216. package/ImageEditor/toolbar/filter.js +63 -59
  217. package/ImageEditor/toolbar/filter.js.map +1 -0
  218. package/ImageEditor/toolbar/flip.js +27 -25
  219. package/ImageEditor/toolbar/flip.js.map +1 -0
  220. package/ImageEditor/toolbar/icons/index.js +61 -8
  221. package/ImageEditor/toolbar/icons/index.js.map +1 -0
  222. package/ImageEditor/toolbar/index.js +34 -4
  223. package/ImageEditor/toolbar/index.js.map +1 -0
  224. package/ImageEditor/toolbar/rotate.js +55 -61
  225. package/ImageEditor/toolbar/rotate.js.map +1 -0
  226. package/ImageEditor/toolbar/types.d.ts +23 -12
  227. package/ImageEditor/toolbar/types.js +5 -1
  228. package/ImageEditor/toolbar/types.js.map +1 -0
  229. package/ImageUpload/Image.d.ts +6 -6
  230. package/ImageUpload/Image.js +52 -54
  231. package/ImageUpload/Image.js.map +1 -0
  232. package/ImageUpload/ImageEditorDialog.d.ts +11 -6
  233. package/ImageUpload/ImageEditorDialog.js +45 -46
  234. package/ImageUpload/ImageEditorDialog.js.map +1 -0
  235. package/ImageUpload/MultiImageUpload.d.ts +10 -31
  236. package/ImageUpload/MultiImageUpload.js +194 -222
  237. package/ImageUpload/MultiImageUpload.js.map +1 -0
  238. package/ImageUpload/MultiImageUpload.stories.js +18 -15
  239. package/ImageUpload/MultiImageUpload.stories.js.map +1 -0
  240. package/ImageUpload/SingleImageUpload.d.ts +16 -37
  241. package/ImageUpload/SingleImageUpload.js +96 -106
  242. package/ImageUpload/SingleImageUpload.js.map +1 -0
  243. package/ImageUpload/SingleImageUpload.stories.js +19 -16
  244. package/ImageUpload/SingleImageUpload.stories.js.map +1 -0
  245. package/ImageUpload/index.js +34 -4
  246. package/ImageUpload/index.js.map +1 -0
  247. package/ImageUpload/styled.d.ts +20 -14
  248. package/ImageUpload/styled.js +25 -16
  249. package/ImageUpload/styled.js.map +1 -0
  250. package/Input/Input.d.ts +5 -19
  251. package/Input/Input.js +106 -140
  252. package/Input/Input.js.map +1 -0
  253. package/Input/Input.stories.js +49 -46
  254. package/Input/Input.stories.js.map +1 -0
  255. package/Input/__tests__/Input.test.js +54 -63
  256. package/Input/__tests__/Input.test.js.map +1 -0
  257. package/Input/index.js +16 -1
  258. package/Input/index.js.map +1 -0
  259. package/List/CollapsibleList/CollapsibleList.stories.js +19 -16
  260. package/List/CollapsibleList/CollapsibleList.stories.js.map +1 -0
  261. package/List/CollapsibleList/index.d.ts +2 -2
  262. package/List/CollapsibleList/index.js +15 -6
  263. package/List/CollapsibleList/index.js.map +1 -0
  264. package/List/DataList/DataList.d.ts +24 -43
  265. package/List/DataList/DataList.js +87 -122
  266. package/List/DataList/DataList.js.map +1 -0
  267. package/List/DataList/DataList.stories.js +30 -26
  268. package/List/DataList/DataList.stories.js.map +1 -0
  269. package/List/DataList/DataListModalOverlay/DataListModalOverlay.d.ts +8 -8
  270. package/List/DataList/DataListModalOverlay/DataListModalOverlay.js +26 -18
  271. package/List/DataList/DataListModalOverlay/DataListModalOverlay.js.map +1 -0
  272. package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.d.ts +3 -3
  273. package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js +20 -13
  274. package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js.map +1 -0
  275. package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.d.ts +9 -4
  276. package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js +24 -12
  277. package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js.map +1 -0
  278. package/List/DataList/DataListModalOverlay/index.js +32 -3
  279. package/List/DataList/DataListModalOverlay/index.js.map +1 -0
  280. package/List/DataList/DataListWithSections.d.ts +45 -0
  281. package/List/DataList/DataListWithSections.js +312 -0
  282. package/List/DataList/DataListWithSections.js.map +1 -0
  283. package/List/DataList/Loader.d.ts +2 -2
  284. package/List/DataList/Loader.js +48 -52
  285. package/List/DataList/Loader.js.map +1 -0
  286. package/List/DataList/NoData.d.ts +2 -2
  287. package/List/DataList/NoData.js +14 -8
  288. package/List/DataList/NoData.js.map +1 -0
  289. package/List/DataList/icons/index.d.ts +1 -1
  290. package/List/DataList/icons/index.js +54 -38
  291. package/List/DataList/icons/index.js.map +1 -0
  292. package/List/DataList/index.d.ts +1 -0
  293. package/List/DataList/index.js +58 -3
  294. package/List/DataList/index.js.map +1 -0
  295. package/List/DataList/types.d.ts +1 -1
  296. package/List/DataList/types.js +5 -1
  297. package/List/DataList/types.js.map +1 -0
  298. package/List/List.d.ts +3 -2
  299. package/List/List.js +66 -62
  300. package/List/List.js.map +1 -0
  301. package/List/List.stories.js +40 -37
  302. package/List/List.stories.js.map +1 -0
  303. package/List/icons/index.js +20 -3
  304. package/List/icons/index.js.map +1 -0
  305. package/List/index.d.ts +1 -1
  306. package/List/index.js +70 -3
  307. package/List/index.js.map +1 -0
  308. package/Menu/Menu.d.ts +14 -21
  309. package/Menu/Menu.js +47 -61
  310. package/Menu/Menu.js.map +1 -0
  311. package/Menu/Menu.stories.js +17 -14
  312. package/Menu/Menu.stories.js.map +1 -0
  313. package/Menu/index.js +16 -1
  314. package/Menu/index.js.map +1 -0
  315. package/Mosaic/Mosaic.d.ts +4 -14
  316. package/Mosaic/Mosaic.js +20 -7
  317. package/Mosaic/Mosaic.js.map +1 -0
  318. package/Mosaic/Mosaic.stories.js +31 -28
  319. package/Mosaic/Mosaic.stories.js.map +1 -0
  320. package/Mosaic/index.js +16 -1
  321. package/Mosaic/index.js.map +1 -0
  322. package/Progress/CircularProgress.d.ts +8 -16
  323. package/Progress/CircularProgress.js +32 -22
  324. package/Progress/CircularProgress.js.map +1 -0
  325. package/Progress/index.js +13 -1
  326. package/Progress/index.js.map +1 -0
  327. package/Radio/Radio.d.ts +2 -6
  328. package/Radio/Radio.js +36 -41
  329. package/Radio/Radio.js.map +1 -0
  330. package/Radio/Radio.styles.js +9 -4
  331. package/Radio/Radio.styles.js.map +1 -0
  332. package/Radio/RadioGroup.d.ts +1 -6
  333. package/Radio/RadioGroup.js +30 -34
  334. package/Radio/RadioGroup.js.map +1 -0
  335. package/Radio/RadioGroup.stories.js +23 -20
  336. package/Radio/RadioGroup.stories.js.map +1 -0
  337. package/Radio/index.js +20 -2
  338. package/Radio/index.js.map +1 -0
  339. package/RichTextEditor/RichTextEditor.d.ts +13 -9
  340. package/RichTextEditor/RichTextEditor.js +79 -78
  341. package/RichTextEditor/RichTextEditor.js.map +1 -0
  342. package/RichTextEditor/RichTextEditor.stories.js +15 -11
  343. package/RichTextEditor/RichTextEditor.stories.js.map +1 -0
  344. package/RichTextEditor/createPropsFromConfig.d.ts +11 -1
  345. package/RichTextEditor/createPropsFromConfig.js +16 -5
  346. package/RichTextEditor/createPropsFromConfig.js.map +1 -0
  347. package/RichTextEditor/index.d.ts +1 -0
  348. package/RichTextEditor/index.js +27 -2
  349. package/RichTextEditor/index.js.map +1 -0
  350. package/Ripple/Ripple.d.ts +4 -5
  351. package/Ripple/Ripple.js +11 -6
  352. package/Ripple/Ripple.js.map +1 -0
  353. package/Ripple/Ripple.stories.js +45 -42
  354. package/Ripple/Ripple.stories.js.map +1 -0
  355. package/Ripple/index.js +16 -1
  356. package/Ripple/index.js.map +1 -0
  357. package/Scrollbar/Scrollbar.d.ts +5 -5
  358. package/Scrollbar/Scrollbar.js +10 -5
  359. package/Scrollbar/Scrollbar.js.map +1 -0
  360. package/Scrollbar/Scrollbar.stories.js +12 -9
  361. package/Scrollbar/Scrollbar.stories.js.map +1 -0
  362. package/Scrollbar/index.js +16 -1
  363. package/Scrollbar/index.js.map +1 -0
  364. package/Section/Section.stories.js +15 -12
  365. package/Section/Section.stories.js.map +1 -0
  366. package/Section/index.d.ts +4 -5
  367. package/Section/index.js +23 -18
  368. package/Section/index.js.map +1 -0
  369. package/Select/Select.d.ts +7 -10
  370. package/Select/Select.js +84 -29
  371. package/Select/Select.js.map +1 -0
  372. package/Select/Select.stories.js +28 -25
  373. package/Select/Select.stories.js.map +1 -0
  374. package/Select/index.js +16 -1
  375. package/Select/index.js.map +1 -0
  376. package/Skeleton/README.md +21 -0
  377. package/Skeleton/Skeleton.d.ts +4 -0
  378. package/Skeleton/Skeleton.js +18 -0
  379. package/Skeleton/Skeleton.js.map +1 -0
  380. package/Skeleton/Skeleton.stories.d.ts +1 -0
  381. package/Skeleton/Skeleton.stories.js +22 -0
  382. package/Skeleton/Skeleton.stories.js.map +1 -0
  383. package/Skeleton/index.d.ts +1 -0
  384. package/Skeleton/index.js +16 -0
  385. package/Skeleton/index.js.map +1 -0
  386. package/Slider/Slider.d.ts +1 -6
  387. package/Slider/Slider.js +39 -47
  388. package/Slider/Slider.js.map +1 -0
  389. package/Slider/Slider.stories.js +20 -17
  390. package/Slider/Slider.stories.js.map +1 -0
  391. package/Slider/index.js +13 -1
  392. package/Slider/index.js.map +1 -0
  393. package/Snackbar/Snackbar.d.ts +5 -7
  394. package/Snackbar/Snackbar.js +29 -33
  395. package/Snackbar/Snackbar.js.map +1 -0
  396. package/Snackbar/Snackbar.stories.js +29 -38
  397. package/Snackbar/Snackbar.stories.js.map +1 -0
  398. package/Snackbar/index.js +18 -1
  399. package/Snackbar/index.js.map +1 -0
  400. package/Switch/Switch.d.ts +3 -7
  401. package/Switch/Switch.js +35 -43
  402. package/Switch/Switch.js.map +1 -0
  403. package/Switch/Switch.stories.js +19 -16
  404. package/Switch/Switch.stories.js.map +1 -0
  405. package/Switch/index.js +16 -1
  406. package/Switch/index.js.map +1 -0
  407. package/Tabs/Tab.d.ts +7 -2
  408. package/Tabs/Tab.js +30 -9
  409. package/Tabs/Tab.js.map +1 -0
  410. package/Tabs/Tabs.d.ts +44 -21
  411. package/Tabs/Tabs.js +123 -130
  412. package/Tabs/Tabs.js.map +1 -0
  413. package/Tabs/Tabs.stories.js +25 -23
  414. package/Tabs/Tabs.stories.js.map +1 -0
  415. package/Tabs/index.js +27 -2
  416. package/Tabs/index.js.map +1 -0
  417. package/Tags/Tags.d.ts +9 -21
  418. package/Tags/Tags.js +95 -124
  419. package/Tags/Tags.js.map +1 -0
  420. package/Tags/Tags.stories.js +19 -16
  421. package/Tags/Tags.stories.js.map +1 -0
  422. package/Tags/index.js +16 -1
  423. package/Tags/index.js.map +1 -0
  424. package/Tooltip/Tooltip.d.ts +9 -8
  425. package/Tooltip/Tooltip.js +33 -33
  426. package/Tooltip/Tooltip.js.map +1 -0
  427. package/Tooltip/Tooltip.stories.js +14 -11
  428. package/Tooltip/Tooltip.stories.js.map +1 -0
  429. package/Tooltip/index.js +16 -1
  430. package/Tooltip/index.js.map +1 -0
  431. package/TopAppBar/TopAppBar.d.ts +1 -1
  432. package/TopAppBar/TopAppBar.js +13 -9
  433. package/TopAppBar/TopAppBar.js.map +1 -0
  434. package/TopAppBar/TopAppBar.stories.js +31 -30
  435. package/TopAppBar/TopAppBar.stories.js.map +1 -0
  436. package/TopAppBar/TopAppBarActionItem.d.ts +1 -1
  437. package/TopAppBar/TopAppBarActionItem.js +10 -5
  438. package/TopAppBar/TopAppBarActionItem.js.map +1 -0
  439. package/TopAppBar/TopAppBarNavigationIcon.d.ts +1 -1
  440. package/TopAppBar/TopAppBarNavigationIcon.js +10 -5
  441. package/TopAppBar/TopAppBarNavigationIcon.js.map +1 -0
  442. package/TopAppBar/TopAppBarPrimary.js +13 -9
  443. package/TopAppBar/TopAppBarPrimary.js.map +1 -0
  444. package/TopAppBar/TopAppBarSecondary.js +15 -11
  445. package/TopAppBar/TopAppBarSecondary.js.map +1 -0
  446. package/TopAppBar/TopAppBarSection.d.ts +1 -1
  447. package/TopAppBar/TopAppBarSection.js +13 -9
  448. package/TopAppBar/TopAppBarSection.js.map +1 -0
  449. package/TopAppBar/TopAppBarTitle.d.ts +1 -1
  450. package/TopAppBar/TopAppBarTitle.js +13 -9
  451. package/TopAppBar/TopAppBarTitle.js.map +1 -0
  452. package/TopAppBar/index.js +82 -7
  453. package/TopAppBar/index.js.map +1 -0
  454. package/TopProgressBar/TopProgressBar.d.ts +7 -7
  455. package/TopProgressBar/TopProgressBar.js +15 -7
  456. package/TopProgressBar/TopProgressBar.js.map +1 -0
  457. package/TopProgressBar/TopProgressBar.stories.js +16 -13
  458. package/TopProgressBar/TopProgressBar.stories.js.map +1 -0
  459. package/TopProgressBar/hoc/index.js +13 -1
  460. package/TopProgressBar/hoc/index.js.map +1 -0
  461. package/TopProgressBar/hoc/withTopProgressBar.d.ts +1 -1
  462. package/TopProgressBar/hoc/withTopProgressBar.js +14 -9
  463. package/TopProgressBar/hoc/withTopProgressBar.js.map +1 -0
  464. package/TopProgressBar/index.js +16 -1
  465. package/TopProgressBar/index.js.map +1 -0
  466. package/Typography/Typography.d.ts +5 -5
  467. package/Typography/Typography.js +10 -5
  468. package/Typography/Typography.js.map +1 -0
  469. package/Typography/Typography.stories.js +37 -34
  470. package/Typography/Typography.stories.js.map +1 -0
  471. package/Typography/index.js +16 -1
  472. package/Typography/index.js.map +1 -0
  473. package/package.json +58 -64
  474. package/styles.scss +3 -4
  475. package/types.d.ts +4 -4
  476. package/types.js +5 -1
  477. package/types.js.map +1 -0
  478. package/Chips/ChipIcon.d.ts +0 -4
  479. package/Chips/ChipIcon.js +0 -8
  480. package/rmwc/textfield/code/index.d.ts +0 -135
  481. package/rmwc/textfield/code/index.js +0 -571
  482. package/rmwc/textfield/next/index.d.ts +0 -135
  483. package/rmwc/textfield/next/index.js +0 -560
  484. package/rmwc/textfield/package.json +0 -45
@@ -1,11 +1,16 @@
1
- import * as React from "react";
2
- import { Scrollbars } from "react-custom-scrollbars";
1
+ "use strict";
3
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.Scrollbar = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _reactCustomScrollbars = require("react-custom-scrollbars");
4
10
  /**
5
11
  * Use Scrollbar component to show vertical or horizontal scrollbars.
6
12
  */
7
13
  var Scrollbar = function Scrollbar(props) {
8
- return /*#__PURE__*/React.createElement(Scrollbars, props);
14
+ return /*#__PURE__*/_react.default.createElement(_reactCustomScrollbars.Scrollbars, props);
9
15
  };
10
-
11
- export { Scrollbar };
16
+ exports.Scrollbar = Scrollbar;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Scrollbar","props"],"sources":["Scrollbar.tsx"],"sourcesContent":["import React from \"react\";\nimport { ScrollbarProps, Scrollbars } from \"react-custom-scrollbars\";\n\ninterface Props extends ScrollbarProps {\n style?: React.CSSProperties;\n [key: string]: any;\n}\n\n/**\n * Use Scrollbar component to show vertical or horizontal scrollbars.\n */\nconst Scrollbar: React.FC<Props> = props => {\n return <Scrollbars {...props} />;\n};\n\nexport { Scrollbar };\n"],"mappings":";;;;;;;AAAA;AACA;AAOA;AACA;AACA;AACA,IAAMA,SAA0B,GAAG,SAA7BA,SAA0B,CAAGC,KAAK,EAAI;EACxC,oBAAO,6BAAC,iCAAU,EAAKA,KAAK,CAAI;AACpC,CAAC;AAAC"}
@@ -1,13 +1,16 @@
1
- import * as React from "react";
2
- import { storiesOf } from "@storybook/react";
3
- import { Story, StoryReadme, StorySandbox } from "@webiny/storybook-utils/Story";
4
- import readme from "./../Scrollbar/README.md";
5
- import { Scrollbar } from "./Scrollbar";
6
- var story = storiesOf("Components/Scrollbar", module);
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _react = _interopRequireDefault(require("react"));
5
+ var _react2 = require("@storybook/react");
6
+ var _Story = require("@webiny/storybook-utils/Story");
7
+ var _README = _interopRequireDefault(require("./../Scrollbar/README.md"));
8
+ var _Scrollbar = require("./Scrollbar");
9
+ var story = (0, _react2.storiesOf)("Components/Scrollbar", module);
7
10
  story.add("usage", function () {
8
- return /*#__PURE__*/React.createElement(Story, null, /*#__PURE__*/React.createElement(StoryReadme, null, readme), /*#__PURE__*/React.createElement(StorySandbox, {
11
+ return /*#__PURE__*/_react.default.createElement(_Story.Story, null, /*#__PURE__*/_react.default.createElement(_Story.StoryReadme, null, _README.default), /*#__PURE__*/_react.default.createElement(_Story.StorySandbox, {
9
12
  title: "Scrollbar demo"
10
- }, /*#__PURE__*/React.createElement(Scrollbar, {
13
+ }, /*#__PURE__*/_react.default.createElement(_Scrollbar.Scrollbar, {
11
14
  style: {
12
15
  width: 300,
13
16
  height: 200
@@ -15,6 +18,6 @@ story.add("usage", function () {
15
18
  }, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec lorem leo, aliquam aliquet arcu vel, faucibus feugiat est. Nulla facilisi. Donec lobortis metus dictum sem egestas, non lobortis erat suscipit. Nunc fermentum tempor nisi, nec venenatis odio egestas at. Nulla facilisi. Fusce sed venenatis velit, ac rhoncus ligula. Integer hendrerit egestas ante, tristique posuere augue auctor non. Curabitur accumsan, ipsum cursus euismod volutpat, enim ligula interdum diam, id suscipit ipsum lectus id ligula. Ut nec odio vel lacus volutpat commodo. In hac habitasse platea dictumst. Donec nunc lacus, venenatis non tellus vel, semper porta quam. Ut fermentum mattis urna non imperdiet. Fusce tincidunt enim nec tincidunt dapibus. Aliquam eu ligula quis ligula pretium tincidunt non sit amet velit. Curabitur vel interdum enim, ut molestie ligula.")));
16
19
  }, {
17
20
  info: {
18
- propTables: [Scrollbar]
21
+ propTables: [_Scrollbar.Scrollbar]
19
22
  }
20
23
  });
@@ -0,0 +1 @@
1
+ {"version":3,"names":["story","storiesOf","module","add","readme","width","height","info","propTables","Scrollbar"],"sources":["Scrollbar.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport { Story, StoryReadme, StorySandbox } from \"@webiny/storybook-utils/Story\";\nimport readme from \"./../Scrollbar/README.md\";\nimport { Scrollbar } from \"./Scrollbar\";\n\nconst story = storiesOf(\"Components/Scrollbar\", module);\n\nstory.add(\n \"usage\",\n () => {\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox title={\"Scrollbar demo\"}>\n <Scrollbar style={{ width: 300, height: 200 }}>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec lorem leo,\n aliquam aliquet arcu vel, faucibus feugiat est. Nulla facilisi. Donec\n lobortis metus dictum sem egestas, non lobortis erat suscipit. Nunc\n fermentum tempor nisi, nec venenatis odio egestas at. Nulla facilisi. Fusce\n sed venenatis velit, ac rhoncus ligula. Integer hendrerit egestas ante,\n tristique posuere augue auctor non. Curabitur accumsan, ipsum cursus euismod\n volutpat, enim ligula interdum diam, id suscipit ipsum lectus id ligula. Ut\n nec odio vel lacus volutpat commodo. In hac habitasse platea dictumst. Donec\n nunc lacus, venenatis non tellus vel, semper porta quam. Ut fermentum mattis\n urna non imperdiet. Fusce tincidunt enim nec tincidunt dapibus. Aliquam eu\n ligula quis ligula pretium tincidunt non sit amet velit. Curabitur vel\n interdum enim, ut molestie ligula.\n </Scrollbar>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [Scrollbar] } }\n);\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AAEA,IAAMA,KAAK,GAAG,IAAAC,iBAAS,EAAC,sBAAsB,EAAEC,MAAM,CAAC;AAEvDF,KAAK,CAACG,GAAG,CACL,OAAO,EACP,YAAM;EACF,oBACI,6BAAC,YAAK,qBACF,6BAAC,kBAAW,QAAEC,eAAM,CAAe,eACnC,6BAAC,mBAAY;IAAC,KAAK,EAAE;EAAiB,gBAClC,6BAAC,oBAAS;IAAC,KAAK,EAAE;MAAEC,KAAK,EAAE,GAAG;MAAEC,MAAM,EAAE;IAAI;EAAE,GAAC,i1BAa/C,CAAY,CACD,CACX;AAEhB,CAAC,EACD;EAAEC,IAAI,EAAE;IAAEC,UAAU,EAAE,CAACC,oBAAS;EAAE;AAAE,CAAC,CACxC"}
@@ -1 +1,16 @@
1
- export * from "./Scrollbar";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Scrollbar = require("./Scrollbar");
7
+ Object.keys(_Scrollbar).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _Scrollbar[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _Scrollbar[key];
14
+ }
15
+ });
16
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Scrollbar\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1,11 +1,14 @@
1
- import React from "react";
2
- import { storiesOf } from "@storybook/react";
3
- import { Story, StoryReadme, StorySandboxCode, StorySandbox, StorySandboxExample } from "@webiny/storybook-utils/Story";
4
- import readme from "./README.md";
5
- import Section from "./index";
6
- import styled from "@emotion/styled";
7
- var story = storiesOf("Components/Section", module);
8
- var RenderSection = /*#__PURE__*/styled("div", {
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _react = _interopRequireDefault(require("react"));
5
+ var _react2 = require("@storybook/react");
6
+ var _Story = require("@webiny/storybook-utils/Story");
7
+ var _README = _interopRequireDefault(require("./README.md"));
8
+ var _index = _interopRequireDefault(require("./index"));
9
+ var _styled = _interopRequireDefault(require("@emotion/styled"));
10
+ var story = (0, _react2.storiesOf)("Components/Section", module);
11
+ var RenderSection = /*#__PURE__*/(0, _styled.default)("div", {
9
12
  target: "e1mp9e2d0",
10
13
  label: "RenderSection"
11
14
  })({
@@ -13,13 +16,13 @@ var RenderSection = /*#__PURE__*/styled("div", {
13
16
  padding: "1px 25px 0 25px"
14
17
  });
15
18
  story.add("usage", function () {
16
- return /*#__PURE__*/React.createElement(Story, null, /*#__PURE__*/React.createElement(StoryReadme, null, readme), /*#__PURE__*/React.createElement(StorySandbox, null, /*#__PURE__*/React.createElement(StorySandboxExample, null, /*#__PURE__*/React.createElement(RenderSection, null, /*#__PURE__*/React.createElement(Section, {
19
+ return /*#__PURE__*/_react.default.createElement(_Story.Story, null, /*#__PURE__*/_react.default.createElement(_Story.StoryReadme, null, _README.default), /*#__PURE__*/_react.default.createElement(_Story.StorySandbox, null, /*#__PURE__*/_react.default.createElement(_Story.StorySandboxExample, null, /*#__PURE__*/_react.default.createElement(RenderSection, null, /*#__PURE__*/_react.default.createElement(_index.default, {
17
20
  title: "Section 1"
18
- }, "Here goes the first section"), /*#__PURE__*/React.createElement(Section, {
21
+ }, "Here goes the first section"), /*#__PURE__*/_react.default.createElement(_index.default, {
19
22
  title: "Section 2"
20
- }, "And this is the second section \uD83E\uDD84"))), /*#__PURE__*/React.createElement(StorySandboxCode, null, "\n import styled from \"@emotion/styled\";\n \n const RenderSection = styled(\"div\")({\n backgroundColor: \"var(--mdc-theme-background)\",\n padding: \"1px 25px 0 25px\"\n });\n\n <RenderSection>\n <Section title=\"Section 1\">Here goes the first section</Section>\n <Section title=\"Section 2\">And this is the second section \uD83E\uDD84</Section>\n </RenderSection>\n ")));
23
+ }, "And this is the second section \uD83E\uDD84"))), /*#__PURE__*/_react.default.createElement(_Story.StorySandboxCode, null, "\n import styled from \"@emotion/styled\";\n \n const RenderSection = styled(\"div\")({\n backgroundColor: \"var(--mdc-theme-background)\",\n padding: \"1px 25px 0 25px\"\n });\n\n <RenderSection>\n <Section title=\"Section 1\">Here goes the first section</Section>\n <Section title=\"Section 2\">And this is the second section \uD83E\uDD84</Section>\n </RenderSection>\n ")));
21
24
  }, {
22
25
  info: {
23
- propTables: [Section]
26
+ propTables: [_index.default]
24
27
  }
25
28
  });
@@ -0,0 +1 @@
1
+ {"version":3,"names":["story","storiesOf","module","RenderSection","styled","backgroundColor","padding","add","readme","info","propTables","Section"],"sources":["Section.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport {\n Story,\n StoryReadme,\n StorySandboxCode,\n StorySandbox,\n StorySandboxExample\n} from \"@webiny/storybook-utils/Story\";\nimport readme from \"./README.md\";\n\nimport Section from \"./index\";\nimport styled from \"@emotion/styled\";\n\nconst story = storiesOf(\"Components/Section\", module);\n\nconst RenderSection = styled(\"div\")({\n backgroundColor: \"var(--mdc-theme-background)\",\n padding: \"1px 25px 0 25px\"\n});\n\nstory.add(\n \"usage\",\n () => {\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox>\n <StorySandboxExample>\n <RenderSection>\n <Section title=\"Section 1\">Here goes the first section</Section>\n <Section title=\"Section 2\">And this is the second section 🦄</Section>\n </RenderSection>\n </StorySandboxExample>\n <StorySandboxCode>\n {`\n import styled from \"@emotion/styled\";\n \n const RenderSection = styled(\"div\")({\n backgroundColor: \"var(--mdc-theme-background)\",\n padding: \"1px 25px 0 25px\"\n });\n\n <RenderSection>\n <Section title=\"Section 1\">Here goes the first section</Section>\n <Section title=\"Section 2\">And this is the second section 🦄</Section>\n </RenderSection>\n `}\n </StorySandboxCode>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [Section] } }\n);\n"],"mappings":";;;AAAA;AACA;AACA;AAOA;AAEA;AACA;AAEA,IAAMA,KAAK,GAAG,IAAAC,iBAAS,EAAC,oBAAoB,EAAEC,MAAM,CAAC;AAErD,IAAMC,aAAa,oBAAGC,eAAM,EAAC,KAAK;EAAA;EAAA;AAAA,GAAE;EAChCC,eAAe,EAAE,6BAA6B;EAC9CC,OAAO,EAAE;AACb,CAAC,CAAC;AAEFN,KAAK,CAACO,GAAG,CACL,OAAO,EACP,YAAM;EACF,oBACI,6BAAC,YAAK,qBACF,6BAAC,kBAAW,QAAEC,eAAM,CAAe,eACnC,6BAAC,mBAAY,qBACT,6BAAC,0BAAmB,qBAChB,6BAAC,aAAa,qBACV,6BAAC,cAAO;IAAC,KAAK,EAAC;EAAW,GAAC,6BAA2B,CAAU,eAChE,6BAAC,cAAO;IAAC,KAAK,EAAC;EAAW,GAAC,6CAAiC,CAAU,CAC1D,CACE,eACtB,6BAAC,uBAAgB,yoBAcE,CACR,CACX;AAEhB,CAAC,EACD;EAAEC,IAAI,EAAE;IAAEC,UAAU,EAAE,CAACC,cAAO;EAAE;AAAE,CAAC,CACtC"}
@@ -1,7 +1,6 @@
1
- import * as React from "react";
2
- declare type SectionProps = {
3
- children?: React.ReactNode;
1
+ import React from "react";
2
+ interface SectionProps {
4
3
  title?: String;
5
- };
6
- declare const Section: ({ children, title, ...props }: SectionProps) => JSX.Element;
4
+ }
5
+ declare const Section: React.FC<SectionProps>;
7
6
  export default Section;
package/Section/index.js CHANGED
@@ -1,18 +1,25 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _styled = _interopRequireDefault(require("@emotion/styled"));
11
+ var _emotion = require("emotion");
12
+ var _Typography = require("../Typography");
13
+ var _Elevation = require("../Elevation");
2
14
  var _excluded = ["children", "title"];
3
- import * as React from "react";
4
- import styled from "@emotion/styled";
5
- import { css } from "emotion";
6
- import { Typography } from "../Typography";
7
- import { Elevation } from "../Elevation";
8
- var SectionWrapper = /*#__PURE__*/styled("div", {
15
+ var SectionWrapper = /*#__PURE__*/(0, _styled.default)("div", {
9
16
  target: "e12inb750",
10
17
  label: "SectionWrapper"
11
18
  })({
12
19
  backgroundColor: "var(--mdc-theme-background)",
13
20
  padding: "0 0 25px 0"
14
21
  });
15
- var titleStyle = /*#__PURE__*/css({
22
+ var titleStyle = /*#__PURE__*/(0, _emotion.css)({
16
23
  display: "flex",
17
24
  alignItems: "center",
18
25
  color: "var(--mdc-theme-on-surface)",
@@ -24,25 +31,23 @@ var titleStyle = /*#__PURE__*/css({
24
31
  }
25
32
  }
26
33
  }, "label:titleStyle;");
27
- var ElevationContent = /*#__PURE__*/styled("div", {
34
+ var ElevationContent = /*#__PURE__*/(0, _styled.default)("div", {
28
35
  target: "e12inb751",
29
36
  label: "ElevationContent"
30
37
  })({
31
38
  padding: 20,
32
39
  backgroundColor: "#fff"
33
40
  });
34
-
35
41
  var Section = function Section(_ref) {
36
42
  var children = _ref.children,
37
- title = _ref.title,
38
- props = _objectWithoutProperties(_ref, _excluded);
39
-
40
- return /*#__PURE__*/React.createElement(SectionWrapper, props, /*#__PURE__*/React.createElement("h4", null, /*#__PURE__*/React.createElement(Typography, {
43
+ title = _ref.title,
44
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
45
+ return /*#__PURE__*/_react.default.createElement(SectionWrapper, props, /*#__PURE__*/_react.default.createElement("h4", null, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
41
46
  className: titleStyle,
42
47
  use: "overline"
43
- }, title)), /*#__PURE__*/React.createElement(Elevation, {
48
+ }, title)), /*#__PURE__*/_react.default.createElement(_Elevation.Elevation, {
44
49
  z: 2
45
- }, /*#__PURE__*/React.createElement(ElevationContent, null, children)));
50
+ }, /*#__PURE__*/_react.default.createElement(ElevationContent, null, children)));
46
51
  };
47
-
48
- export default Section;
52
+ var _default = Section;
53
+ exports.default = _default;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SectionWrapper","styled","backgroundColor","padding","titleStyle","css","display","alignItems","color","lineHeight","svg","height","ElevationContent","Section","children","title","props"],"sources":["index.tsx"],"sourcesContent":["import React from \"react\";\nimport styled from \"@emotion/styled\";\nimport { css } from \"emotion\";\nimport { Typography } from \"~/Typography\";\nimport { Elevation } from \"~/Elevation\";\n\nconst SectionWrapper = styled(\"div\")({\n backgroundColor: \"var(--mdc-theme-background)\",\n padding: \"0 0 25px 0\"\n});\n\nconst titleStyle = css({\n display: \"flex\",\n alignItems: \"center\",\n color: \"var(--mdc-theme-on-surface)\",\n \".tooltip-content-wrapper\": {\n lineHeight: \"100%\",\n svg: {\n height: 13,\n color: \"var(--mdc-theme-on-surface)\"\n }\n }\n});\n\nconst ElevationContent = styled(\"div\")({\n padding: 20,\n backgroundColor: \"#fff\"\n});\n\ninterface SectionProps {\n title?: String;\n}\n\nconst Section: React.FC<SectionProps> = ({ children, title, ...props }) => {\n return (\n <SectionWrapper {...props}>\n <h4>\n <Typography className={titleStyle} use={\"overline\"}>\n {title}\n </Typography>\n </h4>\n\n <Elevation z={2}>\n <ElevationContent>{children}</ElevationContent>\n </Elevation>\n </SectionWrapper>\n );\n};\n\nexport default Section;\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAAwC;AAExC,IAAMA,cAAc,oBAAGC,eAAM,EAAC,KAAK;EAAA;EAAA;AAAA,GAAE;EACjCC,eAAe,EAAE,6BAA6B;EAC9CC,OAAO,EAAE;AACb,CAAC,CAAC;AAEF,IAAMC,UAAU,gBAAG,IAAAC,YAAG,EAAC;EACnBC,OAAO,EAAE,MAAM;EACfC,UAAU,EAAE,QAAQ;EACpBC,KAAK,EAAE,6BAA6B;EACpC,0BAA0B,EAAE;IACxBC,UAAU,EAAE,MAAM;IAClBC,GAAG,EAAE;MACDC,MAAM,EAAE,EAAE;MACVH,KAAK,EAAE;IACX;EACJ;AACJ,CAAC,sBAAC;AAEF,IAAMI,gBAAgB,oBAAGX,eAAM,EAAC,KAAK;EAAA;EAAA;AAAA,GAAE;EACnCE,OAAO,EAAE,EAAE;EACXD,eAAe,EAAE;AACrB,CAAC,CAAC;AAMF,IAAMW,OAA+B,GAAG,SAAlCA,OAA+B,OAAsC;EAAA,IAAhCC,QAAQ,QAARA,QAAQ;IAAEC,KAAK,QAALA,KAAK;IAAKC,KAAK;EAChE,oBACI,6BAAC,cAAc,EAAKA,KAAK,eACrB,sDACI,6BAAC,sBAAU;IAAC,SAAS,EAAEZ,UAAW;IAAC,GAAG,EAAE;EAAW,GAC9CW,KAAK,CACG,CACZ,eAEL,6BAAC,oBAAS;IAAC,CAAC,EAAE;EAAE,gBACZ,6BAAC,gBAAgB,QAAED,QAAQ,CAAoB,CACvC,CACC;AAEzB,CAAC;AAAC,eAEaD,OAAO;AAAA"}
@@ -1,7 +1,7 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { SelectProps as RmwcSelectProps } from "@rmwc/select";
3
3
  import { FormComponentProps } from "../types";
4
- declare type SelectProps = FormComponentProps & RmwcSelectProps & {
4
+ export declare type SelectProps = FormComponentProps & RmwcSelectProps & {
5
5
  label?: string;
6
6
  disabled?: boolean;
7
7
  description?: string;
@@ -11,12 +11,9 @@ declare type SelectProps = FormComponentProps & RmwcSelectProps & {
11
11
  rootProps?: Object;
12
12
  className?: string;
13
13
  };
14
- export declare const Select: {
15
- (props: SelectProps): JSX.Element;
16
- defaultProps: {
17
- validation: {
18
- isValid: any;
19
- };
20
- };
21
- };
14
+ /**
15
+ * We check for null and undefined in the value because React is complaining about those values.
16
+ * Error says to use the empty string in null/undefined case.
17
+ */
18
+ export declare const Select: React.FC<SelectProps>;
22
19
  export default Select;
package/Select/Select.js CHANGED
@@ -1,12 +1,21 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = exports.Select = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
+ var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
11
+ var _react = _interopRequireDefault(require("react"));
12
+ var _select = require("@rmwc/select");
13
+ var _FormElementMessage = require("../FormElementMessage");
14
+ var _emotion = require("emotion");
15
+ var _classnames = _interopRequireDefault(require("classnames"));
3
16
  var _excluded = ["value", "description", "validation"];
4
- import * as React from "react";
5
- import { Select as RmwcSelect } from "@rmwc/select";
6
- import { FormElementMessage } from "../FormElementMessage";
7
- import { css } from "emotion";
8
- import classNames from "classnames";
9
- var noLabel = /*#__PURE__*/css({
17
+ var webinySelect = /*#__PURE__*/(0, _emotion.css)("display:grid;background-color:transparent;border-color:transparent;color:var(--webiny-theme-color-primary);.rmwc-select__native-control{opacity:0;position:absolute;top:0;bottom:0;left:0;right:0;}label:webinySelect;");
18
+ var noLabel = /*#__PURE__*/(0, _emotion.css)({
10
19
  "&.mdc-select": {
11
20
  height: 35,
12
21
  ".mdc-select__native-control": {
@@ -21,40 +30,86 @@ var noLabel = /*#__PURE__*/css({
21
30
  }
22
31
  }, "label:noLabel;");
23
32
  /**
24
- * Select component lets users choose a value from given set of options.
33
+ * TODO verify that this is correct method get all options.
25
34
  */
35
+ var getOptions = function getOptions(initialOptions) {
36
+ if (!initialOptions) {
37
+ return [];
38
+ } else if (Array.isArray(initialOptions)) {
39
+ var options = [];
40
+ var _iterator = (0, _createForOfIteratorHelper2.default)(initialOptions),
41
+ _step;
42
+ try {
43
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
44
+ var option = _step.value;
45
+ if (typeof option === "string") {
46
+ options.push({
47
+ label: option,
48
+ value: option
49
+ });
50
+ continue;
51
+ }
52
+ options.push({
53
+ label: option.label,
54
+ value: option.value,
55
+ options: option.options
56
+ });
57
+ }
58
+ } catch (err) {
59
+ _iterator.e(err);
60
+ } finally {
61
+ _iterator.f();
62
+ }
63
+ return options;
64
+ }
65
+ return Object.keys(initialOptions).map(function (key) {
66
+ return {
67
+ label: initialOptions[key],
68
+ value: key
69
+ };
70
+ });
71
+ };
26
72
 
27
- var skipProps = ["validate"];
28
-
73
+ /**
74
+ * Select component lets users choose a value from given set of options.
75
+ */
76
+ var skipProps = ["validate", "form"];
29
77
  var getRmwcProps = function getRmwcProps(props) {
30
78
  var newProps = {};
31
79
  Object.keys(props).filter(function (name) {
32
80
  return !skipProps.includes(name);
33
- }).forEach(function (name) {
81
+ })
82
+ // @ts-ignore
83
+ .forEach(function (name) {
34
84
  return newProps[name] = props[name];
35
85
  });
36
86
  return newProps;
37
87
  };
38
-
39
- export var Select = function Select(props) {
40
- var value = props.value,
41
- description = props.description,
42
- validation = props.validation,
43
- other = _objectWithoutProperties(props, _excluded);
44
-
45
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(RmwcSelect, Object.assign({}, getRmwcProps(other), {
88
+ /**
89
+ * We check for null and undefined in the value because React is complaining about those values.
90
+ * Error says to use the empty string in null/undefined case.
91
+ */
92
+ var Select = function Select(props) {
93
+ var initialValue = props.value,
94
+ description = props.description,
95
+ validation = props.validation,
96
+ other = (0, _objectWithoutProperties2.default)(props, _excluded);
97
+ var value = initialValue === null || initialValue === undefined ? "" : initialValue;
98
+ var _ref = validation || {},
99
+ validationIsValid = _ref.isValid,
100
+ validationMessage = _ref.message;
101
+ var options = getOptions(other.options);
102
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_select.Select, Object.assign({}, getRmwcProps(other), {
103
+ options: options,
46
104
  value: value,
47
- className: classNames("webiny-ui-select", props.className, _defineProperty({}, noLabel, !props.label)),
105
+ className: (0, _classnames.default)("webiny-ui-select mdc-ripple-surface mdc-ripple-upgraded", webinySelect, props.className, (0, _defineProperty2.default)({}, noLabel, !props.label)),
48
106
  onChange: function onChange(e) {
49
107
  props.onChange && props.onChange(e.target.value);
50
108
  }
51
- })), validation.isValid === false && /*#__PURE__*/React.createElement(FormElementMessage, {
109
+ })), validationIsValid === false && /*#__PURE__*/_react.default.createElement(_FormElementMessage.FormElementMessage, {
52
110
  error: true
53
- }, validation.message), validation.isValid !== false && description && /*#__PURE__*/React.createElement(FormElementMessage, null, description));
54
- };
55
- Select.defaultProps = {
56
- validation: {
57
- isValid: null
58
- }
111
+ }, validationMessage), validationIsValid !== false && description && /*#__PURE__*/_react.default.createElement(_FormElementMessage.FormElementMessage, null, description));
59
112
  };
60
- export default Select;
113
+ exports.Select = Select;
114
+ var _default = Select;
115
+ exports.default = _default;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["webinySelect","css","noLabel","height","paddingTop","getOptions","initialOptions","Array","isArray","options","option","push","label","value","Object","keys","map","key","skipProps","getRmwcProps","props","newProps","filter","name","includes","forEach","Select","initialValue","description","validation","other","undefined","validationIsValid","isValid","validationMessage","message","classNames","className","e","onChange","target"],"sources":["Select.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n FormattedOption,\n Select as RmwcSelect,\n SelectProps as RmwcSelectProps\n} from \"@rmwc/select\";\nimport { FormElementMessage } from \"~/FormElementMessage\";\nimport { FormComponentProps } from \"~/types\";\nimport { css } from \"emotion\";\nimport classNames from \"classnames\";\n\nexport type SelectProps = FormComponentProps &\n RmwcSelectProps & {\n // Component label.\n label?: string;\n\n // Is checkbox disabled?\n disabled?: boolean;\n\n // Description beneath the select.\n description?: string;\n\n // Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label.\n placeholder?: string;\n\n // Makes the Select have a visual box.\n box?: string;\n\n // One or more <option> or <optgroup> elements.\n children?: Array<React.ReactElement<\"option\"> | React.ReactElement<\"optgroup\">>;\n\n // IconProps for the root element. By default, additional props spread to the native select element.\n rootProps?: Object;\n\n // A className for the root element.\n className?: string;\n };\n\nconst webinySelect = css`\n display: grid;\n background-color: transparent;\n border-color: transparent;\n color: var(--webiny-theme-color-primary);\n\n .rmwc-select__native-control {\n opacity: 0;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n`;\n\nconst noLabel = css({\n \"&.mdc-select\": {\n height: 35,\n \".mdc-select__native-control\": {\n paddingTop: 0\n },\n \"&.mdc-select--box\": {\n \".mdc-select__native-control\": {\n height: 35,\n paddingTop: 5\n }\n }\n }\n});\n/**\n * TODO verify that this is correct method get all options.\n */\nconst getOptions = (initialOptions: SelectProps[\"options\"]): FormattedOption[] => {\n if (!initialOptions) {\n return [];\n } else if (Array.isArray(initialOptions)) {\n const options: FormattedOption[] = [];\n for (const option of initialOptions) {\n if (typeof option === \"string\") {\n options.push({\n label: option,\n value: option\n });\n continue;\n }\n options.push({\n label: option.label,\n value: option.value,\n options: option.options\n });\n }\n return options;\n }\n return Object.keys(initialOptions).map(key => {\n return {\n label: initialOptions[key],\n value: key\n };\n });\n};\n\n/**\n * Select component lets users choose a value from given set of options.\n */\nconst skipProps = [\"validate\", \"form\"];\n\nconst getRmwcProps = (props: SelectProps): FormComponentProps & RmwcSelectProps => {\n const newProps: FormComponentProps & RmwcSelectProps = {};\n Object.keys(props)\n .filter(name => !skipProps.includes(name))\n // @ts-ignore\n .forEach((name: any) => (newProps[name] = props[name]));\n\n return newProps;\n};\n/**\n * We check for null and undefined in the value because React is complaining about those values.\n * Error says to use the empty string in null/undefined case.\n */\nexport const Select: React.FC<SelectProps> = props => {\n const { value: initialValue, description, validation, ...other } = props;\n\n const value = initialValue === null || initialValue === undefined ? \"\" : initialValue;\n\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n\n const options = getOptions(other.options);\n\n return (\n <React.Fragment>\n <RmwcSelect\n {...getRmwcProps(other)}\n options={options}\n value={value}\n className={classNames(\n \"webiny-ui-select mdc-ripple-surface mdc-ripple-upgraded\",\n webinySelect,\n props.className,\n {\n [noLabel]: !props.label\n }\n )}\n onChange={e => {\n props.onChange && props.onChange((e.target as any).value);\n }}\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\nexport default Select;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AAKA;AAEA;AACA;AAAoC;AA6BpC,IAAMA,YAAY,oBAAGC,YAAG,2NAcvB;AAED,IAAMC,OAAO,gBAAG,IAAAD,YAAG,EAAC;EAChB,cAAc,EAAE;IACZE,MAAM,EAAE,EAAE;IACV,6BAA6B,EAAE;MAC3BC,UAAU,EAAE;IAChB,CAAC;IACD,mBAAmB,EAAE;MACjB,6BAA6B,EAAE;QAC3BD,MAAM,EAAE,EAAE;QACVC,UAAU,EAAE;MAChB;IACJ;EACJ;AACJ,CAAC,mBAAC;AACF;AACA;AACA;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAU,CAAIC,cAAsC,EAAwB;EAC9E,IAAI,CAACA,cAAc,EAAE;IACjB,OAAO,EAAE;EACb,CAAC,MAAM,IAAIC,KAAK,CAACC,OAAO,CAACF,cAAc,CAAC,EAAE;IACtC,IAAMG,OAA0B,GAAG,EAAE;IAAC,yDACjBH,cAAc;MAAA;IAAA;MAAnC,oDAAqC;QAAA,IAA1BI,MAAM;QACb,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;UAC5BD,OAAO,CAACE,IAAI,CAAC;YACTC,KAAK,EAAEF,MAAM;YACbG,KAAK,EAAEH;UACX,CAAC,CAAC;UACF;QACJ;QACAD,OAAO,CAACE,IAAI,CAAC;UACTC,KAAK,EAAEF,MAAM,CAACE,KAAK;UACnBC,KAAK,EAAEH,MAAM,CAACG,KAAK;UACnBJ,OAAO,EAAEC,MAAM,CAACD;QACpB,CAAC,CAAC;MACN;IAAC;MAAA;IAAA;MAAA;IAAA;IACD,OAAOA,OAAO;EAClB;EACA,OAAOK,MAAM,CAACC,IAAI,CAACT,cAAc,CAAC,CAACU,GAAG,CAAC,UAAAC,GAAG,EAAI;IAC1C,OAAO;MACHL,KAAK,EAAEN,cAAc,CAACW,GAAG,CAAC;MAC1BJ,KAAK,EAAEI;IACX,CAAC;EACL,CAAC,CAAC;AACN,CAAC;;AAED;AACA;AACA;AACA,IAAMC,SAAS,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC;AAEtC,IAAMC,YAAY,GAAG,SAAfA,YAAY,CAAIC,KAAkB,EAA2C;EAC/E,IAAMC,QAA8C,GAAG,CAAC,CAAC;EACzDP,MAAM,CAACC,IAAI,CAACK,KAAK,CAAC,CACbE,MAAM,CAAC,UAAAC,IAAI;IAAA,OAAI,CAACL,SAAS,CAACM,QAAQ,CAACD,IAAI,CAAC;EAAA;EACzC;EAAA,CACCE,OAAO,CAAC,UAACF,IAAS;IAAA,OAAMF,QAAQ,CAACE,IAAI,CAAC,GAAGH,KAAK,CAACG,IAAI,CAAC;EAAA,CAAC,CAAC;EAE3D,OAAOF,QAAQ;AACnB,CAAC;AACD;AACA;AACA;AACA;AACO,IAAMK,MAA6B,GAAG,SAAhCA,MAA6B,CAAGN,KAAK,EAAI;EAClD,IAAeO,YAAY,GAAwCP,KAAK,CAAhEP,KAAK;IAAgBe,WAAW,GAA2BR,KAAK,CAA3CQ,WAAW;IAAEC,UAAU,GAAeT,KAAK,CAA9BS,UAAU;IAAKC,KAAK,0CAAKV,KAAK;EAExE,IAAMP,KAAK,GAAGc,YAAY,KAAK,IAAI,IAAIA,YAAY,KAAKI,SAAS,GAAG,EAAE,GAAGJ,YAAY;EAErF,WAAmEE,UAAU,IAAI,CAAC,CAAC;IAAlEG,iBAAiB,QAA1BC,OAAO;IAA8BC,iBAAiB,QAA1BC,OAAO;EAE3C,IAAM1B,OAAO,GAAGJ,UAAU,CAACyB,KAAK,CAACrB,OAAO,CAAC;EAEzC,oBACI,6BAAC,cAAK,CAAC,QAAQ,qBACX,6BAAC,cAAU,oBACHU,YAAY,CAACW,KAAK,CAAC;IACvB,OAAO,EAAErB,OAAQ;IACjB,KAAK,EAAEI,KAAM;IACb,SAAS,EAAE,IAAAuB,mBAAU,EACjB,yDAAyD,EACzDpC,YAAY,EACZoB,KAAK,CAACiB,SAAS,oCAEVnC,OAAO,EAAG,CAACkB,KAAK,CAACR,KAAK,EAE7B;IACF,QAAQ,EAAE,kBAAA0B,CAAC,EAAI;MACXlB,KAAK,CAACmB,QAAQ,IAAInB,KAAK,CAACmB,QAAQ,CAAED,CAAC,CAACE,MAAM,CAAS3B,KAAK,CAAC;IAC7D;EAAE,GACJ,EAEDmB,iBAAiB,KAAK,KAAK,iBACxB,6BAAC,sCAAkB;IAAC,KAAK;EAAA,GAAEE,iBAAiB,CAC/C,EAEAF,iBAAiB,KAAK,KAAK,IAAIJ,WAAW,iBACvC,6BAAC,sCAAkB,QAAEA,WAAW,CACnC,CACY;AAEzB,CAAC;AAAC;AAAA,eAEaF,MAAM;AAAA"}
@@ -1,46 +1,49 @@
1
- import React from "react";
2
- import { storiesOf } from "@storybook/react";
3
- import { Story, StoryReadme, StorySandboxCode, StorySandbox, StorySandboxExample } from "@webiny/storybook-utils/Story";
4
- import { withKnobs, boolean } from "@storybook/addon-knobs";
5
- import readme from "./README.md";
6
- import { Form } from "@webiny/form";
7
- import { Select } from "./Select";
8
- var story = storiesOf("Components/Select", module);
9
- story.addDecorator(withKnobs);
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _react = _interopRequireDefault(require("react"));
5
+ var _react2 = require("@storybook/react");
6
+ var _Story = require("@webiny/storybook-utils/Story");
7
+ var _addonKnobs = require("@storybook/addon-knobs");
8
+ var _README = _interopRequireDefault(require("./README.md"));
9
+ var _form = require("@webiny/form");
10
+ var _Select = require("./Select");
11
+ var story = (0, _react2.storiesOf)("Components/Select", module);
12
+ story.addDecorator(_addonKnobs.withKnobs);
10
13
  story.add("usage", function () {
11
- var disabled = boolean("Disabled", false);
12
- var box = boolean("Box", false);
13
- return /*#__PURE__*/React.createElement(Story, null, /*#__PURE__*/React.createElement(StoryReadme, null, readme), /*#__PURE__*/React.createElement(StorySandbox, null, /*#__PURE__*/React.createElement(StorySandboxExample, {
14
+ var disabled = (0, _addonKnobs.boolean)("Disabled", false);
15
+ var box = (0, _addonKnobs.boolean)("Box", false);
16
+ return /*#__PURE__*/_react.default.createElement(_Story.Story, null, /*#__PURE__*/_react.default.createElement(_Story.StoryReadme, null, _README.default), /*#__PURE__*/_react.default.createElement(_Story.StorySandbox, null, /*#__PURE__*/_react.default.createElement(_Story.StorySandboxExample, {
14
17
  title: "Simple select with a label and description"
15
- }, /*#__PURE__*/React.createElement(Form, null, function (_ref) {
18
+ }, /*#__PURE__*/_react.default.createElement(_form.Form, null, function (_ref) {
16
19
  var Bind = _ref.Bind;
17
- return /*#__PURE__*/React.createElement(Bind, {
20
+ return /*#__PURE__*/_react.default.createElement(Bind, {
18
21
  name: "pet"
19
- }, /*#__PURE__*/React.createElement(Select, {
22
+ }, /*#__PURE__*/_react.default.createElement(_Select.Select, {
20
23
  label: "Pets",
21
24
  disabled: disabled,
22
25
  box: box.toString(),
23
26
  description: "Choose a pet of your liking."
24
- }, /*#__PURE__*/React.createElement("optgroup", {
27
+ }, /*#__PURE__*/_react.default.createElement("optgroup", {
25
28
  label: "Dogs"
26
- }, /*#__PURE__*/React.createElement("option", {
29
+ }, /*#__PURE__*/_react.default.createElement("option", {
27
30
  value: "germanShepherd"
28
- }, "German Shepherd"), /*#__PURE__*/React.createElement("option", {
31
+ }, "German Shepherd"), /*#__PURE__*/_react.default.createElement("option", {
29
32
  value: "bulldog"
30
- }, "Bulldog"), /*#__PURE__*/React.createElement("option", {
33
+ }, "Bulldog"), /*#__PURE__*/_react.default.createElement("option", {
31
34
  value: "sharPei"
32
- }, "Shar-Pei")), /*#__PURE__*/React.createElement("optgroup", {
35
+ }, "Shar-Pei")), /*#__PURE__*/_react.default.createElement("optgroup", {
33
36
  label: "Other"
34
- }, /*#__PURE__*/React.createElement("option", {
37
+ }, /*#__PURE__*/_react.default.createElement("option", {
35
38
  value: "parrot"
36
- }, "Parrot"), /*#__PURE__*/React.createElement("option", {
39
+ }, "Parrot"), /*#__PURE__*/_react.default.createElement("option", {
37
40
  value: "cat"
38
- }, "Cat"), /*#__PURE__*/React.createElement("option", {
41
+ }, "Cat"), /*#__PURE__*/_react.default.createElement("option", {
39
42
  value: "guinea "
40
43
  }, "Guinea Pig"))));
41
- })), /*#__PURE__*/React.createElement(StorySandboxCode, null, "\n <Form>\n {({ Bind }) => (\n <Bind name=\"pet\">\n <Select\n label=\"Pets\"\n disabled={disabled}\n box={box.toString()}\n description=\"Choose a pet of your liking.\"\n >\n <optgroup label=\"Dogs\">\n <option value=\"germanShepherd\">\n German Shepherd\n </option>\n <option value=\"bulldog\">Bulldog</option>\n <option value=\"sharPei\">Shar-Pei</option>\n </optgroup>\n <optgroup label=\"Other\">\n <option value=\"parrot\">Parrot</option>\n <option value=\"cat\">Cat</option>\n <option value=\"guinea \">Guinea Pig</option>\n </optgroup>\n </Select>\n </Bind>\n )}\n </Form>\n ")));
44
+ })), /*#__PURE__*/_react.default.createElement(_Story.StorySandboxCode, null, "\n <Form>\n {({ Bind }) => (\n <Bind name=\"pet\">\n <Select\n label=\"Pets\"\n disabled={disabled}\n box={box.toString()}\n description=\"Choose a pet of your liking.\"\n >\n <optgroup label=\"Dogs\">\n <option value=\"germanShepherd\">\n German Shepherd\n </option>\n <option value=\"bulldog\">Bulldog</option>\n <option value=\"sharPei\">Shar-Pei</option>\n </optgroup>\n <optgroup label=\"Other\">\n <option value=\"parrot\">Parrot</option>\n <option value=\"cat\">Cat</option>\n <option value=\"guinea \">Guinea Pig</option>\n </optgroup>\n </Select>\n </Bind>\n )}\n </Form>\n ")));
42
45
  }, {
43
46
  info: {
44
- propTables: [Select]
47
+ propTables: [_Select.Select]
45
48
  }
46
49
  });
@@ -0,0 +1 @@
1
+ {"version":3,"names":["story","storiesOf","module","addDecorator","withKnobs","add","disabled","boolean","box","readme","Bind","toString","info","propTables","Select"],"sources":["Select.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport {\n Story,\n StoryReadme,\n StorySandboxCode,\n StorySandbox,\n StorySandboxExample\n} from \"@webiny/storybook-utils/Story\";\nimport { withKnobs, boolean } from \"@storybook/addon-knobs\";\nimport readme from \"./README.md\";\n\nimport { Form } from \"@webiny/form\";\nimport { Select } from \"./Select\";\n\nconst story = storiesOf(\"Components/Select\", module);\nstory.addDecorator(withKnobs);\n\nstory.add(\n \"usage\",\n () => {\n const disabled = boolean(\"Disabled\", false);\n const box = boolean(\"Box\", false);\n\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox>\n <StorySandboxExample title={\"Simple select with a label and description\"}>\n <Form>\n {({ Bind }) => (\n <Bind name=\"pet\">\n <Select\n label=\"Pets\"\n disabled={disabled}\n box={box.toString()}\n description=\"Choose a pet of your liking.\"\n >\n <optgroup label=\"Dogs\">\n <option value=\"germanShepherd\">German Shepherd</option>\n <option value=\"bulldog\">Bulldog</option>\n <option value=\"sharPei\">Shar-Pei</option>\n </optgroup>\n <optgroup label=\"Other\">\n <option value=\"parrot\">Parrot</option>\n <option value=\"cat\">Cat</option>\n <option value=\"guinea \">Guinea Pig</option>\n </optgroup>\n </Select>\n </Bind>\n )}\n </Form>\n </StorySandboxExample>\n <StorySandboxCode>\n {`\n <Form>\n {({ Bind }) => (\n <Bind name=\"pet\">\n <Select\n label=\"Pets\"\n disabled={disabled}\n box={box.toString()}\n description=\"Choose a pet of your liking.\"\n >\n <optgroup label=\"Dogs\">\n <option value=\"germanShepherd\">\n German Shepherd\n </option>\n <option value=\"bulldog\">Bulldog</option>\n <option value=\"sharPei\">Shar-Pei</option>\n </optgroup>\n <optgroup label=\"Other\">\n <option value=\"parrot\">Parrot</option>\n <option value=\"cat\">Cat</option>\n <option value=\"guinea \">Guinea Pig</option>\n </optgroup>\n </Select>\n </Bind>\n )}\n </Form>\n `}\n </StorySandboxCode>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [Select] } }\n);\n"],"mappings":";;;AAAA;AACA;AACA;AAOA;AACA;AAEA;AACA;AAEA,IAAMA,KAAK,GAAG,IAAAC,iBAAS,EAAC,mBAAmB,EAAEC,MAAM,CAAC;AACpDF,KAAK,CAACG,YAAY,CAACC,qBAAS,CAAC;AAE7BJ,KAAK,CAACK,GAAG,CACL,OAAO,EACP,YAAM;EACF,IAAMC,QAAQ,GAAG,IAAAC,mBAAO,EAAC,UAAU,EAAE,KAAK,CAAC;EAC3C,IAAMC,GAAG,GAAG,IAAAD,mBAAO,EAAC,KAAK,EAAE,KAAK,CAAC;EAEjC,oBACI,6BAAC,YAAK,qBACF,6BAAC,kBAAW,QAAEE,eAAM,CAAe,eACnC,6BAAC,mBAAY,qBACT,6BAAC,0BAAmB;IAAC,KAAK,EAAE;EAA6C,gBACrE,6BAAC,UAAI,QACA;IAAA,IAAGC,IAAI,QAAJA,IAAI;IAAA,oBACJ,6BAAC,IAAI;MAAC,IAAI,EAAC;IAAK,gBACZ,6BAAC,cAAM;MACH,KAAK,EAAC,MAAM;MACZ,QAAQ,EAAEJ,QAAS;MACnB,GAAG,EAAEE,GAAG,CAACG,QAAQ,EAAG;MACpB,WAAW,EAAC;IAA8B,gBAE1C;MAAU,KAAK,EAAC;IAAM,gBAClB;MAAQ,KAAK,EAAC;IAAgB,GAAC,iBAAe,CAAS,eACvD;MAAQ,KAAK,EAAC;IAAS,GAAC,SAAO,CAAS,eACxC;MAAQ,KAAK,EAAC;IAAS,GAAC,UAAQ,CAAS,CAClC,eACX;MAAU,KAAK,EAAC;IAAO,gBACnB;MAAQ,KAAK,EAAC;IAAQ,GAAC,QAAM,CAAS,eACtC;MAAQ,KAAK,EAAC;IAAK,GAAC,KAAG,CAAS,eAChC;MAAQ,KAAK,EAAC;IAAS,GAAC,YAAU,CAAS,CACpC,CACN,CACN;EAAA,CACV,CACE,CACW,eACtB,6BAAC,uBAAgB,85CA4BE,CACR,CACX;AAEhB,CAAC,EACD;EAAEC,IAAI,EAAE;IAAEC,UAAU,EAAE,CAACC,cAAM;EAAE;AAAE,CAAC,CACrC"}
package/Select/index.js CHANGED
@@ -1 +1,16 @@
1
- export * from "./Select";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Select = require("./Select");
7
+ Object.keys(_Select).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _Select[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _Select[key];
14
+ }
15
+ });
16
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Select\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -0,0 +1,21 @@
1
+ # Skeleton
2
+
3
+ ### Additional information
4
+
5
+ [https://www.npmjs.com/package/react-loading-skeleton](https://www.npmjs.com/package/react-loading-skeleton)
6
+
7
+ ### Description
8
+
9
+ `Skeleton` component is used to render animated loading skeletons within Webiny.
10
+
11
+ ### Usage
12
+
13
+ ```jsx
14
+ import { Skeleton } from "@webiny/ui/Skeleton";
15
+
16
+ ...
17
+
18
+ return (
19
+ <Skeleton />
20
+ )
21
+ ```
@@ -0,0 +1,4 @@
1
+ import { ReactElement } from "react";
2
+ import { SkeletonProps } from "react-loading-skeleton";
3
+ import "react-loading-skeleton/dist/skeleton.css";
4
+ export declare const Skeleton: (props: SkeletonProps) => ReactElement;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Skeleton = void 0;
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _reactLoadingSkeleton = _interopRequireWildcard(require("react-loading-skeleton"));
11
+ require("react-loading-skeleton/dist/skeleton.css");
12
+ var Skeleton = function Skeleton(props) {
13
+ return /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.SkeletonTheme, {
14
+ baseColor: "var(--mdc-theme-background)",
15
+ highlightColor: "var(--mdc-theme-surface)"
16
+ }, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, props));
17
+ };
18
+ exports.Skeleton = Skeleton;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Skeleton","props"],"sources":["Skeleton.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\nimport ReactLoadingSkeleton, { SkeletonProps, SkeletonTheme } from \"react-loading-skeleton\";\n\nimport \"react-loading-skeleton/dist/skeleton.css\";\n\nexport const Skeleton = (props: SkeletonProps): ReactElement => {\n return (\n <SkeletonTheme\n baseColor={\"var(--mdc-theme-background)\"}\n highlightColor={\"var(--mdc-theme-surface)\"}\n >\n <ReactLoadingSkeleton {...props} />\n </SkeletonTheme>\n );\n};\n"],"mappings":";;;;;;;;AAAA;AACA;AAEA;AAEO,IAAMA,QAAQ,GAAG,SAAXA,QAAQ,CAAIC,KAAoB,EAAmB;EAC5D,oBACI,6BAAC,mCAAa;IACV,SAAS,EAAE,6BAA8B;IACzC,cAAc,EAAE;EAA2B,gBAE3C,6BAAC,6BAAoB,EAAKA,KAAK,CAAI,CACvB;AAExB,CAAC;AAAC"}
@@ -0,0 +1 @@
1
+ export {};