@webiny/ui 5.34.8 → 5.35.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (382) hide show
  1. package/Accordion/Accordion.js +4 -14
  2. package/Accordion/Accordion.js.map +1 -1
  3. package/Accordion/Accordion.stories.js +0 -8
  4. package/Accordion/Accordion.stories.js.map +1 -1
  5. package/Accordion/AccordionItem.d.ts +4 -1
  6. package/Accordion/AccordionItem.js +5 -26
  7. package/Accordion/AccordionItem.js.map +1 -1
  8. package/Accordion/AccordionItemActions.js +2 -10
  9. package/Accordion/AccordionItemActions.js.map +1 -1
  10. package/Accordion/index.js +0 -4
  11. package/Accordion/index.js.map +1 -1
  12. package/Alert/Alert.js +3 -10
  13. package/Alert/Alert.js.map +1 -1
  14. package/Alert/Alert.stories.js +0 -6
  15. package/Alert/Alert.stories.js.map +1 -1
  16. package/Alert/index.js +0 -2
  17. package/Alert/index.js.map +1 -1
  18. package/AutoComplete/AutoComplete.js +38 -88
  19. package/AutoComplete/AutoComplete.js.map +1 -1
  20. package/AutoComplete/AutoComplete.stories.js +0 -7
  21. package/AutoComplete/AutoComplete.stories.js.map +1 -1
  22. package/AutoComplete/MultiAutoComplete.js +52 -128
  23. package/AutoComplete/MultiAutoComplete.js.map +1 -1
  24. package/AutoComplete/MultiAutoComplete.stories.js +0 -8
  25. package/AutoComplete/MultiAutoComplete.stories.js.map +1 -1
  26. package/AutoComplete/index.js +0 -4
  27. package/AutoComplete/index.js.map +1 -1
  28. package/AutoComplete/styles.js +0 -2
  29. package/AutoComplete/styles.js.map +1 -1
  30. package/AutoComplete/utils.js +0 -8
  31. package/AutoComplete/utils.js.map +1 -1
  32. package/Avatar/Avatar.js +7 -18
  33. package/Avatar/Avatar.js.map +1 -1
  34. package/Avatar/Avatar.stories.js +0 -6
  35. package/Avatar/Avatar.stories.js.map +1 -1
  36. package/Avatar/index.js +0 -2
  37. package/Avatar/index.js.map +1 -1
  38. package/Button/Button.js +39 -59
  39. package/Button/Button.js.map +1 -1
  40. package/Button/Button.stories.js +0 -10
  41. package/Button/Button.stories.js.map +1 -1
  42. package/Button/Button.styles.js +0 -2
  43. package/Button/Button.styles.js.map +1 -1
  44. package/Button/CopyButton/CopyButton.js +2 -12
  45. package/Button/CopyButton/CopyButton.js.map +1 -1
  46. package/Button/CopyButton/CopyButton.stories.js +0 -7
  47. package/Button/CopyButton/CopyButton.stories.js.map +1 -1
  48. package/Button/IconButton/IconButton.js +6 -11
  49. package/Button/IconButton/IconButton.js.map +1 -1
  50. package/Button/IconButton/IconButton.stories.js +0 -9
  51. package/Button/IconButton/IconButton.stories.js.map +1 -1
  52. package/Button/index.js +0 -6
  53. package/Button/index.js.map +1 -1
  54. package/Carousel/Carousel.js +0 -14
  55. package/Carousel/Carousel.js.map +1 -1
  56. package/Carousel/Carouser.stories.js +0 -7
  57. package/Carousel/Carouser.stories.js.map +1 -1
  58. package/Carousel/index.js +0 -2
  59. package/Carousel/index.js.map +1 -1
  60. package/Checkbox/Checkbox.d.ts +1 -0
  61. package/Checkbox/Checkbox.js +13 -31
  62. package/Checkbox/Checkbox.js.map +1 -1
  63. package/Checkbox/Checkbox.stories.js +0 -8
  64. package/Checkbox/Checkbox.stories.js.map +1 -1
  65. package/Checkbox/Checkbox.styles.js +0 -2
  66. package/Checkbox/Checkbox.styles.js.map +1 -1
  67. package/Checkbox/CheckboxGroup.js +7 -24
  68. package/Checkbox/CheckboxGroup.js.map +1 -1
  69. package/Checkbox/CheckboxGroup.stories.js +2 -10
  70. package/Checkbox/CheckboxGroup.stories.js.map +1 -1
  71. package/Checkbox/index.js +0 -3
  72. package/Checkbox/index.js.map +1 -1
  73. package/Chips/Chip.js +1 -8
  74. package/Chips/Chip.js.map +1 -1
  75. package/Chips/Chips.js +3 -13
  76. package/Chips/Chips.js.map +1 -1
  77. package/Chips/Chips.stories.js +0 -8
  78. package/Chips/Chips.stories.js.map +1 -1
  79. package/Chips/index.js +0 -4
  80. package/Chips/index.js.map +1 -1
  81. package/Chips/styles.js +0 -2
  82. package/Chips/styles.js.map +1 -1
  83. package/CodeEditor/CodeEditor.js +8 -36
  84. package/CodeEditor/CodeEditor.js.map +1 -1
  85. package/CodeEditor/CodeEditor.stories.js +0 -10
  86. package/CodeEditor/CodeEditor.stories.js.map +1 -1
  87. package/CodeEditor/index.js +0 -2
  88. package/CodeEditor/index.js.map +1 -1
  89. package/ColorPicker/ColorPicker.js +7 -31
  90. package/ColorPicker/ColorPicker.js.map +1 -1
  91. package/ColorPicker/ColorPicker.stories.js +0 -8
  92. package/ColorPicker/ColorPicker.stories.js.map +1 -1
  93. package/ColorPicker/index.js +0 -2
  94. package/ColorPicker/index.js.map +1 -1
  95. package/ConfirmationDialog/ConfirmationDialog.js +33 -65
  96. package/ConfirmationDialog/ConfirmationDialog.js.map +1 -1
  97. package/ConfirmationDialog/ConfirmationDialog.stories.js +0 -7
  98. package/ConfirmationDialog/ConfirmationDialog.stories.js.map +1 -1
  99. package/ConfirmationDialog/index.js +0 -4
  100. package/ConfirmationDialog/index.js.map +1 -1
  101. package/ConfirmationDialog/withConfirmation.js +0 -5
  102. package/ConfirmationDialog/withConfirmation.js.map +1 -1
  103. package/DataTable/DataTable.d.ts +14 -1
  104. package/DataTable/DataTable.js +60 -45
  105. package/DataTable/DataTable.js.map +1 -1
  106. package/DataTable/DataTable.stories.js +0 -6
  107. package/DataTable/DataTable.stories.js.map +1 -1
  108. package/DataTable/index.js +0 -2
  109. package/DataTable/index.js.map +1 -1
  110. package/DataTable/styled.d.ts +29 -1
  111. package/DataTable/styled.js +25 -7
  112. package/DataTable/styled.js.map +1 -1
  113. package/DelayedOnChange/DelayedOnChange.js +19 -35
  114. package/DelayedOnChange/DelayedOnChange.js.map +1 -1
  115. package/DelayedOnChange/index.js +0 -3
  116. package/DelayedOnChange/index.js.map +1 -1
  117. package/DelayedOnChange/withDelayedOnChange.js +3 -9
  118. package/DelayedOnChange/withDelayedOnChange.js.map +1 -1
  119. package/Dialog/Dialog.js +5 -40
  120. package/Dialog/Dialog.js.map +1 -1
  121. package/Dialog/Dialog.stories.js +0 -7
  122. package/Dialog/Dialog.stories.js.map +1 -1
  123. package/Dialog/index.js +0 -2
  124. package/Dialog/index.js.map +1 -1
  125. package/Drawer/Drawer.js +0 -9
  126. package/Drawer/Drawer.js.map +1 -1
  127. package/Drawer/Drawer.stories.js +0 -8
  128. package/Drawer/Drawer.stories.js.map +1 -1
  129. package/Drawer/index.js +0 -2
  130. package/Drawer/index.js.map +1 -1
  131. package/DynamicFieldset/Fieldset.js +7 -34
  132. package/DynamicFieldset/Fieldset.js.map +1 -1
  133. package/DynamicFieldset/index.js +0 -2
  134. package/DynamicFieldset/index.js.map +1 -1
  135. package/Elevation/Elevation.js +0 -5
  136. package/Elevation/Elevation.js.map +1 -1
  137. package/Elevation/Elevation.stories.js +0 -8
  138. package/Elevation/Elevation.stories.js.map +1 -1
  139. package/Elevation/index.js +0 -2
  140. package/Elevation/index.js.map +1 -1
  141. package/FormElementMessage/FormElementMessage.js +0 -5
  142. package/FormElementMessage/FormElementMessage.js.map +1 -1
  143. package/FormElementMessage/index.js +0 -1
  144. package/FormElementMessage/index.js.map +1 -1
  145. package/FullName/FullName.js +0 -7
  146. package/FullName/FullName.js.map +1 -1
  147. package/FullName/index.js +0 -2
  148. package/FullName/index.js.map +1 -1
  149. package/Grid/Grid.js +1 -9
  150. package/Grid/Grid.js.map +1 -1
  151. package/Grid/Grid.stories.js +0 -6
  152. package/Grid/Grid.stories.js.map +1 -1
  153. package/Grid/index.js +0 -2
  154. package/Grid/index.js.map +1 -1
  155. package/Helpers/ClassNames.js +0 -9
  156. package/Helpers/ClassNames.js.map +1 -1
  157. package/Helpers/index.js +0 -1
  158. package/Helpers/index.js.map +1 -1
  159. package/Icon/Icon.js +1 -7
  160. package/Icon/Icon.js.map +1 -1
  161. package/Icon/Icon.stories.js +0 -10
  162. package/Icon/Icon.stories.js.map +1 -1
  163. package/Icon/index.js +0 -2
  164. package/Icon/index.js.map +1 -1
  165. package/Image/Image.js +0 -8
  166. package/Image/Image.js.map +1 -1
  167. package/Image/Image.stories.js +0 -7
  168. package/Image/Image.stories.js.map +1 -1
  169. package/Image/index.js +0 -2
  170. package/Image/index.js.map +1 -1
  171. package/ImageEditor/ImageEditor.js +46 -107
  172. package/ImageEditor/ImageEditor.js.map +1 -1
  173. package/ImageEditor/index.js +0 -2
  174. package/ImageEditor/index.js.map +1 -1
  175. package/ImageEditor/toolbar/crop.js +1 -16
  176. package/ImageEditor/toolbar/crop.js.map +1 -1
  177. package/ImageEditor/toolbar/filter.js +11 -36
  178. package/ImageEditor/toolbar/filter.js.map +1 -1
  179. package/ImageEditor/toolbar/flip.js +0 -17
  180. package/ImageEditor/toolbar/flip.js.map +1 -1
  181. package/ImageEditor/toolbar/icons/index.js +0 -8
  182. package/ImageEditor/toolbar/icons/index.js.map +1 -1
  183. package/ImageEditor/toolbar/index.js +0 -5
  184. package/ImageEditor/toolbar/index.js.map +1 -1
  185. package/ImageEditor/toolbar/rotate.js +8 -43
  186. package/ImageEditor/toolbar/rotate.js.map +1 -1
  187. package/ImageUpload/Image.js +10 -34
  188. package/ImageUpload/Image.js.map +1 -1
  189. package/ImageUpload/ImageEditorDialog.js +11 -33
  190. package/ImageUpload/ImageEditorDialog.js.map +1 -1
  191. package/ImageUpload/MultiImageUpload.js +111 -175
  192. package/ImageUpload/MultiImageUpload.js.map +1 -1
  193. package/ImageUpload/MultiImageUpload.stories.js +0 -8
  194. package/ImageUpload/MultiImageUpload.stories.js.map +1 -1
  195. package/ImageUpload/SingleImageUpload.js +38 -79
  196. package/ImageUpload/SingleImageUpload.js.map +1 -1
  197. package/ImageUpload/SingleImageUpload.stories.js +0 -8
  198. package/ImageUpload/SingleImageUpload.stories.js.map +1 -1
  199. package/ImageUpload/index.js +0 -5
  200. package/ImageUpload/index.js.map +1 -1
  201. package/ImageUpload/styled.d.ts +27 -17
  202. package/ImageUpload/styled.js +0 -5
  203. package/ImageUpload/styled.js.map +1 -1
  204. package/Input/Input.js +34 -60
  205. package/Input/Input.js.map +1 -1
  206. package/Input/Input.stories.js +0 -13
  207. package/Input/Input.stories.js.map +1 -1
  208. package/Input/__tests__/Input.test.js +4 -30
  209. package/Input/__tests__/Input.test.js.map +1 -1
  210. package/Input/index.js +0 -2
  211. package/Input/index.js.map +1 -1
  212. package/List/CollapsibleList/CollapsibleList.stories.js +0 -8
  213. package/List/CollapsibleList/CollapsibleList.stories.js.map +1 -1
  214. package/List/CollapsibleList/index.js +0 -6
  215. package/List/CollapsibleList/index.js.map +1 -1
  216. package/List/DataList/DataList.js +7 -45
  217. package/List/DataList/DataList.js.map +1 -1
  218. package/List/DataList/DataList.stories.js +2 -10
  219. package/List/DataList/DataList.stories.js.map +1 -1
  220. package/List/DataList/DataListModalOverlay/DataListModalOverlay.d.ts +8 -6
  221. package/List/DataList/DataListModalOverlay/DataListModalOverlay.js +8 -18
  222. package/List/DataList/DataListModalOverlay/DataListModalOverlay.js.map +1 -1
  223. package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js +3 -14
  224. package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js.map +1 -1
  225. package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js +3 -12
  226. package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js.map +1 -1
  227. package/List/DataList/DataListModalOverlay/index.js +0 -3
  228. package/List/DataList/DataListModalOverlay/index.js.map +1 -1
  229. package/List/DataList/DataListWithSections.js +4 -48
  230. package/List/DataList/DataListWithSections.js.map +1 -1
  231. package/List/DataList/Loader.js +0 -7
  232. package/List/DataList/Loader.js.map +1 -1
  233. package/List/DataList/NoData.js +0 -7
  234. package/List/DataList/NoData.js.map +1 -1
  235. package/List/DataList/icons/index.js +0 -29
  236. package/List/DataList/icons/index.js.map +1 -1
  237. package/List/DataList/index.js +0 -6
  238. package/List/DataList/index.js.map +1 -1
  239. package/List/List.js +0 -39
  240. package/List/List.js.map +1 -1
  241. package/List/List.stories.js +0 -12
  242. package/List/List.stories.js.map +1 -1
  243. package/List/icons/index.js +0 -3
  244. package/List/icons/index.js.map +1 -1
  245. package/List/index.js +0 -4
  246. package/List/index.js.map +1 -1
  247. package/Menu/Menu.js +2 -28
  248. package/Menu/Menu.js.map +1 -1
  249. package/Menu/Menu.stories.js +0 -7
  250. package/Menu/Menu.stories.js.map +1 -1
  251. package/Menu/index.js +0 -2
  252. package/Menu/index.js.map +1 -1
  253. package/Mosaic/Mosaic.js +3 -7
  254. package/Mosaic/Mosaic.js.map +1 -1
  255. package/Mosaic/Mosaic.stories.js +0 -6
  256. package/Mosaic/Mosaic.stories.js.map +1 -1
  257. package/Mosaic/index.js +0 -2
  258. package/Mosaic/index.js.map +1 -1
  259. package/Progress/CircularProgress.js +6 -14
  260. package/Progress/CircularProgress.js.map +1 -1
  261. package/Progress/index.js +0 -2
  262. package/Progress/index.js.map +1 -1
  263. package/Radio/Radio.js +9 -28
  264. package/Radio/Radio.js.map +1 -1
  265. package/Radio/Radio.styles.js +0 -2
  266. package/Radio/Radio.styles.js.map +1 -1
  267. package/Radio/RadioGroup.js +5 -21
  268. package/Radio/RadioGroup.js.map +1 -1
  269. package/Radio/RadioGroup.stories.js +2 -10
  270. package/Radio/RadioGroup.stories.js.map +1 -1
  271. package/Radio/index.js +0 -3
  272. package/Radio/index.js.map +1 -1
  273. package/RichTextEditor/RichTextEditor.js +30 -64
  274. package/RichTextEditor/RichTextEditor.js.map +1 -1
  275. package/RichTextEditor/RichTextEditor.stories.js +0 -7
  276. package/RichTextEditor/RichTextEditor.stories.js.map +1 -1
  277. package/RichTextEditor/createPropsFromConfig.js +0 -4
  278. package/RichTextEditor/createPropsFromConfig.js.map +1 -1
  279. package/RichTextEditor/index.js +0 -3
  280. package/RichTextEditor/index.js.map +1 -1
  281. package/Ripple/Ripple.js +0 -6
  282. package/Ripple/Ripple.js.map +1 -1
  283. package/Ripple/Ripple.stories.js +0 -12
  284. package/Ripple/Ripple.stories.js.map +1 -1
  285. package/Ripple/index.js +0 -2
  286. package/Ripple/index.js.map +1 -1
  287. package/Scrollbar/Scrollbar.js +0 -5
  288. package/Scrollbar/Scrollbar.js.map +1 -1
  289. package/Scrollbar/Scrollbar.stories.js +0 -6
  290. package/Scrollbar/Scrollbar.stories.js.map +1 -1
  291. package/Scrollbar/index.js +0 -2
  292. package/Scrollbar/index.js.map +1 -1
  293. package/Section/Section.stories.js +0 -7
  294. package/Section/Section.stories.js.map +1 -1
  295. package/Section/index.js +2 -12
  296. package/Section/index.js.map +1 -1
  297. package/Select/Select.js +9 -32
  298. package/Select/Select.js.map +1 -1
  299. package/Select/Select.stories.js +0 -8
  300. package/Select/Select.stories.js.map +1 -1
  301. package/Select/index.js +0 -2
  302. package/Select/index.js.map +1 -1
  303. package/Skeleton/Skeleton.d.ts +6 -2
  304. package/Skeleton/Skeleton.js +8 -11
  305. package/Skeleton/Skeleton.js.map +1 -1
  306. package/Skeleton/Skeleton.stories.js +0 -6
  307. package/Skeleton/Skeleton.stories.js.map +1 -1
  308. package/Skeleton/index.js +0 -2
  309. package/Skeleton/index.js.map +1 -1
  310. package/Slider/Slider.js +7 -29
  311. package/Slider/Slider.js.map +1 -1
  312. package/Slider/Slider.stories.js +1 -9
  313. package/Slider/Slider.stories.js.map +1 -1
  314. package/Slider/index.js +0 -2
  315. package/Slider/index.js.map +1 -1
  316. package/Snackbar/Snackbar.js +0 -19
  317. package/Snackbar/Snackbar.js.map +1 -1
  318. package/Snackbar/Snackbar.stories.js +0 -23
  319. package/Snackbar/Snackbar.stories.js.map +1 -1
  320. package/Snackbar/index.js +0 -1
  321. package/Snackbar/index.js.map +1 -1
  322. package/Switch/Switch.js +5 -28
  323. package/Switch/Switch.js.map +1 -1
  324. package/Switch/Switch.stories.js +0 -8
  325. package/Switch/Switch.stories.js.map +1 -1
  326. package/Switch/index.js +0 -2
  327. package/Switch/index.js.map +1 -1
  328. package/Tabs/Tab.js +0 -9
  329. package/Tabs/Tab.js.map +1 -1
  330. package/Tabs/Tabs.js +15 -29
  331. package/Tabs/Tabs.js.map +1 -1
  332. package/Tabs/Tabs.stories.js +0 -10
  333. package/Tabs/Tabs.stories.js.map +1 -1
  334. package/Tabs/index.js +0 -4
  335. package/Tabs/index.js.map +1 -1
  336. package/Tags/Tags.js +13 -37
  337. package/Tags/Tags.js.map +1 -1
  338. package/Tags/Tags.stories.js +0 -8
  339. package/Tags/Tags.stories.js.map +1 -1
  340. package/Tags/index.js +0 -2
  341. package/Tags/index.js.map +1 -1
  342. package/Tooltip/Tooltip.js +0 -19
  343. package/Tooltip/Tooltip.js.map +1 -1
  344. package/Tooltip/Tooltip.stories.js +0 -6
  345. package/Tooltip/Tooltip.stories.js.map +1 -1
  346. package/Tooltip/index.js +0 -2
  347. package/Tooltip/index.js.map +1 -1
  348. package/TopAppBar/TopAppBar.js +1 -8
  349. package/TopAppBar/TopAppBar.js.map +1 -1
  350. package/TopAppBar/TopAppBar.stories.js +3 -16
  351. package/TopAppBar/TopAppBar.stories.js.map +1 -1
  352. package/TopAppBar/TopAppBarActionItem.js +0 -5
  353. package/TopAppBar/TopAppBarActionItem.js.map +1 -1
  354. package/TopAppBar/TopAppBarNavigationIcon.js +0 -5
  355. package/TopAppBar/TopAppBarNavigationIcon.js.map +1 -1
  356. package/TopAppBar/TopAppBarPrimary.js +1 -8
  357. package/TopAppBar/TopAppBarPrimary.js.map +1 -1
  358. package/TopAppBar/TopAppBarSecondary.js +3 -10
  359. package/TopAppBar/TopAppBarSecondary.js.map +1 -1
  360. package/TopAppBar/TopAppBarSection.js +1 -8
  361. package/TopAppBar/TopAppBarSection.js.map +1 -1
  362. package/TopAppBar/TopAppBarTitle.js +1 -8
  363. package/TopAppBar/TopAppBarTitle.js.map +1 -1
  364. package/TopAppBar/index.js +0 -14
  365. package/TopAppBar/index.js.map +1 -1
  366. package/TopProgressBar/TopProgressBar.js +0 -5
  367. package/TopProgressBar/TopProgressBar.js.map +1 -1
  368. package/TopProgressBar/TopProgressBar.stories.js +1 -8
  369. package/TopProgressBar/TopProgressBar.stories.js.map +1 -1
  370. package/TopProgressBar/hoc/index.js +0 -2
  371. package/TopProgressBar/hoc/index.js.map +1 -1
  372. package/TopProgressBar/hoc/withTopProgressBar.js +2 -8
  373. package/TopProgressBar/hoc/withTopProgressBar.js.map +1 -1
  374. package/TopProgressBar/index.js +0 -2
  375. package/TopProgressBar/index.js.map +1 -1
  376. package/Typography/Typography.js +0 -5
  377. package/Typography/Typography.js.map +1 -1
  378. package/Typography/Typography.stories.js +0 -6
  379. package/Typography/Typography.stories.js.map +1 -1
  380. package/Typography/index.js +0 -2
  381. package/Typography/index.js.map +1 -1
  382. package/package.json +16 -15
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Drawer\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Drawer\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1,34 +1,21 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
-
12
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
-
14
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
-
16
11
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
17
-
18
12
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
19
-
20
13
  var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
21
-
22
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
23
-
24
15
  var _react = _interopRequireDefault(require("react"));
25
-
26
16
  var _dotPropImmutable = _interopRequireDefault(require("dot-prop-immutable"));
27
-
28
17
  var _FormElementMessage = require("../FormElementMessage");
29
-
30
18
  var _styled = _interopRequireDefault(require("@emotion/styled"));
31
-
32
19
  var DynamicFieldsetRow = /*#__PURE__*/(0, _styled.default)("div", {
33
20
  target: "eqcnudi0",
34
21
  label: "DynamicFieldsetRow"
@@ -41,21 +28,15 @@ var DynamicFieldsetRow = /*#__PURE__*/(0, _styled.default)("div", {
41
28
  }
42
29
  }
43
30
  });
44
-
45
31
  var Fieldset = /*#__PURE__*/function (_React$Component) {
46
32
  (0, _inherits2.default)(Fieldset, _React$Component);
47
-
48
33
  var _super = (0, _createSuper2.default)(Fieldset);
49
-
50
34
  function Fieldset() {
51
35
  var _this;
52
-
53
36
  (0, _classCallCheck2.default)(this, Fieldset);
54
-
55
37
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
56
38
  args[_key] = arguments[_key];
57
39
  }
58
-
59
40
  _this = _super.call.apply(_super, [this].concat(args));
60
41
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "header", null);
61
42
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "rows", null);
@@ -76,19 +57,17 @@ var Fieldset = /*#__PURE__*/function (_React$Component) {
76
57
  });
77
58
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "removeData", function (index) {
78
59
  var _this$props = _this.props,
79
- value = _this$props.value,
80
- onChange = _this$props.onChange;
60
+ value = _this$props.value,
61
+ onChange = _this$props.onChange;
81
62
  onChange(_dotPropImmutable.default.delete(value, index));
82
63
  });
83
64
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "addData", function () {
84
65
  var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
85
66
  var onChange = _this.props.onChange;
86
67
  var value = _this.props.value;
87
-
88
68
  if (!value) {
89
69
  value = [];
90
70
  }
91
-
92
71
  if (index < 0) {
93
72
  onChange([].concat((0, _toConsumableArray2.default)(value), [{}]));
94
73
  } else {
@@ -101,11 +80,9 @@ var Fieldset = /*#__PURE__*/function (_React$Component) {
101
80
  });
102
81
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderRow", function (cb) {
103
82
  var value = _this.props.value;
104
-
105
83
  if (!value) {
106
84
  return null;
107
85
  }
108
-
109
86
  _this.rows = value.map(function (record, index) {
110
87
  return /*#__PURE__*/_react.default.createElement(DynamicFieldsetRow, {
111
88
  key: index
@@ -122,7 +99,6 @@ var Fieldset = /*#__PURE__*/function (_React$Component) {
122
99
  });
123
100
  return _this;
124
101
  }
125
-
126
102
  (0, _createClass2.default)(Fieldset, [{
127
103
  key: "renderComponent",
128
104
  value: function renderComponent() {
@@ -134,22 +110,20 @@ var Fieldset = /*#__PURE__*/function (_React$Component) {
134
110
  row: this.renderRow,
135
111
  empty: this.renderEmpty
136
112
  });
137
-
138
113
  if (!value || value.length === 0) {
139
114
  return this.empty;
140
115
  }
141
-
142
116
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, this.header, this.rows);
143
117
  }
144
118
  }, {
145
119
  key: "render",
146
120
  value: function render() {
147
121
  var _this$props2 = this.props,
148
- description = _this$props2.description,
149
- _this$props2$validati = _this$props2.validation,
150
- validation = _this$props2$validati === void 0 ? {
151
- isValid: null
152
- } : _this$props2$validati;
122
+ description = _this$props2.description,
123
+ _this$props2$validati = _this$props2.validation,
124
+ validation = _this$props2$validati === void 0 ? {
125
+ isValid: null
126
+ } : _this$props2$validati;
153
127
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, this.renderComponent(), validation.isValid === false && /*#__PURE__*/_react.default.createElement(_FormElementMessage.FormElementMessage, {
154
128
  error: true
155
129
  }, validation.message), validation.isValid !== false && description && /*#__PURE__*/_react.default.createElement(_FormElementMessage.FormElementMessage, null, description));
@@ -157,7 +131,6 @@ var Fieldset = /*#__PURE__*/function (_React$Component) {
157
131
  }]);
158
132
  return Fieldset;
159
133
  }(_react.default.Component);
160
-
161
134
  (0, _defineProperty2.default)(Fieldset, "defaultProps", {
162
135
  value: []
163
136
  });
@@ -1 +1 @@
1
- {"version":3,"names":["DynamicFieldsetRow","styled","paddingBottom","padding","display","Fieldset","add","index","addData","remove","removeData","props","value","onChange","dotProp","delete","slice","cb","header","rows","map","record","data","empty","children","actions","renderHeader","row","renderRow","renderEmpty","length","description","validation","isValid","renderComponent","message","React","Component"],"sources":["Fieldset.tsx"],"sourcesContent":["import React from \"react\";\nimport dotProp from \"dot-prop-immutable\";\nimport { FormElementMessage } from \"~/FormElementMessage\";\nimport styled from \"@emotion/styled\";\n\ninterface ChildrenRenderPropRowCallableParams {\n index: number;\n data: any;\n}\ninterface ChildrenRenderPropRowCallable {\n (params: ChildrenRenderPropRowCallableParams): React.ReactNode;\n}\n\ninterface ChildrenRenderPropHeaderCallable {\n (): React.ReactNode;\n}\ninterface ChildrenRenderPropEmptyCallable {\n (): React.ReactNode;\n}\ninterface ChildrenRenderProp {\n actions: {\n add: Function;\n remove: Function;\n };\n header: (cb: ChildrenRenderPropHeaderCallable) => React.ReactNode;\n row: (cb: ChildrenRenderPropRowCallable) => React.ReactNode;\n empty: (cb: ChildrenRenderPropEmptyCallable) => React.ReactNode;\n}\n\ninterface FieldsetProps {\n value?: any[];\n description?: string;\n validation?: { isValid: null | boolean; message?: string };\n onChange: Function;\n children: (props: ChildrenRenderProp) => React.ReactNode;\n}\n\nconst DynamicFieldsetRow = styled(\"div\")({\n paddingBottom: 10,\n \"> .mdc-layout-grid\": {\n padding: 0,\n \"> .mdc-layout-grid__inner\": {\n display: \"block\"\n }\n }\n});\n\nclass Fieldset extends React.Component<FieldsetProps> {\n static defaultProps: Partial<FieldsetProps> = {\n value: []\n };\n\n header: React.ReactNode = null;\n rows: React.ReactNode = null;\n empty: React.ReactNode = null;\n\n actions = {\n add:\n (index = -1) =>\n () =>\n this.addData(index),\n remove:\n (index = -1) =>\n () =>\n this.removeData(index)\n };\n\n removeData = (index: number) => {\n const { value, onChange } = this.props;\n onChange(dotProp.delete(value, index));\n };\n\n addData = (index = -1) => {\n const { onChange } = this.props;\n let value = this.props.value;\n if (!value) {\n value = [];\n }\n if (index < 0) {\n onChange([...value, {}]);\n } else {\n onChange([...value.slice(0, index + 1), {}, ...value.slice(index + 1)]);\n }\n };\n\n renderHeader = (cb: () => React.ReactNode): React.ReactNode => {\n this.header = cb();\n return null;\n };\n\n renderRow = (cb: ChildrenRenderPropRowCallable): React.ReactNode => {\n const { value } = this.props;\n if (!value) {\n return null;\n }\n this.rows = value.map((record, index) => {\n return (\n <DynamicFieldsetRow key={index}>{cb({ data: record, index })}</DynamicFieldsetRow>\n );\n });\n return null;\n };\n\n renderEmpty = (cb: () => React.ReactNode): React.ReactNode => {\n this.empty = cb();\n return null;\n };\n\n public renderComponent(): React.ReactNode {\n const { value } = this.props;\n const { children } = this.props;\n\n children({\n actions: this.actions,\n header: this.renderHeader,\n row: this.renderRow,\n empty: this.renderEmpty\n });\n\n if (!value || value.length === 0) {\n return this.empty;\n }\n\n return (\n <React.Fragment>\n {this.header}\n {this.rows}\n </React.Fragment>\n );\n }\n\n public override render() {\n const { description, validation = { isValid: null } } = this.props;\n\n return (\n <>\n {this.renderComponent()}\n {validation.isValid === false && (\n <FormElementMessage error>{validation.message}</FormElementMessage>\n )}\n\n {validation.isValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\n </>\n );\n }\n}\n\nexport default Fieldset;\n"],"mappings":"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"}
1
+ {"version":3,"names":["DynamicFieldsetRow","styled","paddingBottom","padding","display","Fieldset","add","index","addData","remove","removeData","props","value","onChange","dotProp","delete","slice","cb","header","rows","map","record","data","empty","children","actions","renderHeader","row","renderRow","renderEmpty","length","description","validation","isValid","renderComponent","message","React","Component"],"sources":["Fieldset.tsx"],"sourcesContent":["import React from \"react\";\nimport dotProp from \"dot-prop-immutable\";\nimport { FormElementMessage } from \"~/FormElementMessage\";\nimport styled from \"@emotion/styled\";\n\ninterface ChildrenRenderPropRowCallableParams {\n index: number;\n data: any;\n}\ninterface ChildrenRenderPropRowCallable {\n (params: ChildrenRenderPropRowCallableParams): React.ReactNode;\n}\n\ninterface ChildrenRenderPropHeaderCallable {\n (): React.ReactNode;\n}\ninterface ChildrenRenderPropEmptyCallable {\n (): React.ReactNode;\n}\ninterface ChildrenRenderProp {\n actions: {\n add: Function;\n remove: Function;\n };\n header: (cb: ChildrenRenderPropHeaderCallable) => React.ReactNode;\n row: (cb: ChildrenRenderPropRowCallable) => React.ReactNode;\n empty: (cb: ChildrenRenderPropEmptyCallable) => React.ReactNode;\n}\n\ninterface FieldsetProps {\n value?: any[];\n description?: string;\n validation?: { isValid: null | boolean; message?: string };\n onChange: Function;\n children: (props: ChildrenRenderProp) => React.ReactNode;\n}\n\nconst DynamicFieldsetRow = styled(\"div\")({\n paddingBottom: 10,\n \"> .mdc-layout-grid\": {\n padding: 0,\n \"> .mdc-layout-grid__inner\": {\n display: \"block\"\n }\n }\n});\n\nclass Fieldset extends React.Component<FieldsetProps> {\n static defaultProps: Partial<FieldsetProps> = {\n value: []\n };\n\n header: React.ReactNode = null;\n rows: React.ReactNode = null;\n empty: React.ReactNode = null;\n\n actions = {\n add:\n (index = -1) =>\n () =>\n this.addData(index),\n remove:\n (index = -1) =>\n () =>\n this.removeData(index)\n };\n\n removeData = (index: number) => {\n const { value, onChange } = this.props;\n onChange(dotProp.delete(value, index));\n };\n\n addData = (index = -1) => {\n const { onChange } = this.props;\n let value = this.props.value;\n if (!value) {\n value = [];\n }\n if (index < 0) {\n onChange([...value, {}]);\n } else {\n onChange([...value.slice(0, index + 1), {}, ...value.slice(index + 1)]);\n }\n };\n\n renderHeader = (cb: () => React.ReactNode): React.ReactNode => {\n this.header = cb();\n return null;\n };\n\n renderRow = (cb: ChildrenRenderPropRowCallable): React.ReactNode => {\n const { value } = this.props;\n if (!value) {\n return null;\n }\n this.rows = value.map((record, index) => {\n return (\n <DynamicFieldsetRow key={index}>{cb({ data: record, index })}</DynamicFieldsetRow>\n );\n });\n return null;\n };\n\n renderEmpty = (cb: () => React.ReactNode): React.ReactNode => {\n this.empty = cb();\n return null;\n };\n\n public renderComponent(): React.ReactNode {\n const { value } = this.props;\n const { children } = this.props;\n\n children({\n actions: this.actions,\n header: this.renderHeader,\n row: this.renderRow,\n empty: this.renderEmpty\n });\n\n if (!value || value.length === 0) {\n return this.empty;\n }\n\n return (\n <React.Fragment>\n {this.header}\n {this.rows}\n </React.Fragment>\n );\n }\n\n public override render() {\n const { description, validation = { isValid: null } } = this.props;\n\n return (\n <>\n {this.renderComponent()}\n {validation.isValid === false && (\n <FormElementMessage error>{validation.message}</FormElementMessage>\n )}\n\n {validation.isValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\n </>\n );\n }\n}\n\nexport default Fieldset;\n"],"mappings":"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"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -11,5 +10,4 @@ Object.defineProperty(exports, "DynamicFieldset", {
11
10
  return _Fieldset.default;
12
11
  }
13
12
  });
14
-
15
13
  var _Fieldset = _interopRequireDefault(require("./Fieldset"));
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default as DynamicFieldset } from \"./Fieldset\";\n"],"mappings":";;;;;;;;;;;;;;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default as DynamicFieldset } from \"./Fieldset\";\n"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -1,16 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.Elevation = void 0;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _elevation = require("@rmwc/elevation");
13
-
14
10
  /**
15
11
  * Elevation component visually raises any content by applying shadow.
16
12
  */
@@ -19,6 +15,5 @@ var Elevation = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
19
15
  ref: ref
20
16
  }, props), props.children);
21
17
  });
22
-
23
18
  exports.Elevation = Elevation;
24
19
  Elevation.displayName = "Elevation";
@@ -1 +1 @@
1
- {"version":3,"names":["Elevation","React","forwardRef","props","ref","children","displayName"],"sources":["Elevation.tsx"],"sourcesContent":["import React from \"react\";\nimport { Elevation as RmwcElevation } from \"@rmwc/elevation\";\n\nexport type ElevationProps = {\n // Any element that needs to be highlighted.\n children?: React.ReactNode;\n\n // Increasing this number (from 0 to 24) will increase the amount of shadow applied.\n z: number;\n\n // Adds smooth transitions when the z value changes.\n transition?: boolean;\n\n // CSS class name\n className?: string;\n\n // Style object\n style?: React.CSSProperties;\n};\n\n/**\n * Elevation component visually raises any content by applying shadow.\n */\nconst Elevation = React.forwardRef((props: ElevationProps, ref: React.Ref<any>) => {\n return (\n <RmwcElevation ref={ref} {...props}>\n {props.children}\n </RmwcElevation>\n );\n});\n\nElevation.displayName = \"Elevation\";\n\nexport { Elevation };\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAmBA;AACA;AACA;AACA,IAAMA,SAAS,gBAAGC,cAAA,CAAMC,UAAN,CAAiB,UAACC,KAAD,EAAwBC,GAAxB,EAAgD;EAC/E,oBACI,6BAAC,oBAAD;IAAe,GAAG,EAAEA;EAApB,GAA6BD,KAA7B,GACKA,KAAK,CAACE,QADX,CADJ;AAKH,CANiB,CAAlB;;;AAQAL,SAAS,CAACM,WAAV,GAAwB,WAAxB"}
1
+ {"version":3,"names":["Elevation","React","forwardRef","props","ref","children","displayName"],"sources":["Elevation.tsx"],"sourcesContent":["import React from \"react\";\nimport { Elevation as RmwcElevation } from \"@rmwc/elevation\";\n\nexport type ElevationProps = {\n // Any element that needs to be highlighted.\n children?: React.ReactNode;\n\n // Increasing this number (from 0 to 24) will increase the amount of shadow applied.\n z: number;\n\n // Adds smooth transitions when the z value changes.\n transition?: boolean;\n\n // CSS class name\n className?: string;\n\n // Style object\n style?: React.CSSProperties;\n};\n\n/**\n * Elevation component visually raises any content by applying shadow.\n */\nconst Elevation = React.forwardRef((props: ElevationProps, ref: React.Ref<any>) => {\n return (\n <RmwcElevation ref={ref} {...props}>\n {props.children}\n </RmwcElevation>\n );\n});\n\nElevation.displayName = \"Elevation\";\n\nexport { Elevation };\n"],"mappings":";;;;;;;AAAA;AACA;AAmBA;AACA;AACA;AACA,IAAMA,SAAS,gBAAGC,cAAK,CAACC,UAAU,CAAC,UAACC,KAAqB,EAAEC,GAAmB,EAAK;EAC/E,oBACI,6BAAC,oBAAa;IAAC,GAAG,EAAEA;EAAI,GAAKD,KAAK,GAC7BA,KAAK,CAACE,QAAQ,CACH;AAExB,CAAC,CAAC;AAAC;AAEHL,SAAS,CAACM,WAAW,GAAG,WAAW"}
@@ -1,21 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
6
-
7
5
  var _react = _interopRequireDefault(require("react"));
8
-
9
6
  var _react2 = require("@storybook/react");
10
-
11
7
  var _Story = require("@webiny/storybook-utils/Story");
12
-
13
8
  var _README = _interopRequireDefault(require("./../Elevation/README.md"));
14
-
15
9
  var _addonKnobs = require("@storybook/addon-knobs");
16
-
17
10
  var _Elevation = require("./Elevation");
18
-
19
11
  var story = (0, _react2.storiesOf)("Components/Elevation", module);
20
12
  story.addDecorator(_addonKnobs.withKnobs);
21
13
  story.add("usage", function () {
@@ -1 +1 @@
1
- {"version":3,"names":["story","storiesOf","module","addDecorator","withKnobs","add","transition","boolean","z","select","Array","keys","style","padding","backgroundColor","readme","info","propTables","Elevation"],"sources":["Elevation.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 \"./../Elevation/README.md\";\nimport { withKnobs, boolean, select } from \"@storybook/addon-knobs\";\nimport { Elevation } from \"./Elevation\";\n\nconst story = storiesOf(\"Components/Elevation\", module);\nstory.addDecorator(withKnobs);\n\nstory.add(\n \"usage\",\n () => {\n const transition = boolean(\"Transition\", true);\n const z = select(\"Z (elevation height)\", [...Array(25).keys()], 1);\n\n const style = {\n padding: 20,\n backgroundColor: \"white\"\n };\n\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox title={\"An area with applied elevation\"}>\n <StorySandboxExample>\n <Elevation z={z} transition={transition}>\n <div style={style}>This is an elevated content.</div>\n </Elevation>\n </StorySandboxExample>\n <StorySandboxCode>\n {`\n <Elevation z={${z}} transition={${transition}}>\n <div>This is an elevated content.</div>\n </Elevation>\n `}\n </StorySandboxCode>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [Elevation] } }\n);\n"],"mappings":";;;;;;AAAA;;AACA;;AACA;;AAOA;;AACA;;AACA;;AAEA,IAAMA,KAAK,GAAG,IAAAC,iBAAA,EAAU,sBAAV,EAAkCC,MAAlC,CAAd;AACAF,KAAK,CAACG,YAAN,CAAmBC,qBAAnB;AAEAJ,KAAK,CAACK,GAAN,CACI,OADJ,EAEI,YAAM;EACF,IAAMC,UAAU,GAAG,IAAAC,mBAAA,EAAQ,YAAR,EAAsB,IAAtB,CAAnB;EACA,IAAMC,CAAC,GAAG,IAAAC,kBAAA,EAAO,sBAAP,mCAAmCC,KAAK,CAAC,EAAD,CAAL,CAAUC,IAAV,EAAnC,GAAsD,CAAtD,CAAV;EAEA,IAAMC,KAAK,GAAG;IACVC,OAAO,EAAE,EADC;IAEVC,eAAe,EAAE;EAFP,CAAd;EAKA,oBACI,6BAAC,YAAD,qBACI,6BAAC,kBAAD,QAAcC,eAAd,CADJ,eAEI,6BAAC,mBAAD;IAAc,KAAK,EAAE;EAArB,gBACI,6BAAC,0BAAD,qBACI,6BAAC,oBAAD;IAAW,CAAC,EAAEP,CAAd;IAAiB,UAAU,EAAEF;EAA7B,gBACI;IAAK,KAAK,EAAEM;EAAZ,GAAmB,8BAAnB,CADJ,CADJ,CADJ,eAMI,6BAAC,uBAAD,0DAEoBJ,CAFpB,2BAEsCF,UAFtC,yIANJ,CAFJ,CADJ;AAmBH,CA9BL,EA+BI;EAAEU,IAAI,EAAE;IAAEC,UAAU,EAAE,CAACC,oBAAD;EAAd;AAAR,CA/BJ"}
1
+ {"version":3,"names":["story","storiesOf","module","addDecorator","withKnobs","add","transition","boolean","z","select","Array","keys","style","padding","backgroundColor","readme","info","propTables","Elevation"],"sources":["Elevation.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 \"./../Elevation/README.md\";\nimport { withKnobs, boolean, select } from \"@storybook/addon-knobs\";\nimport { Elevation } from \"./Elevation\";\n\nconst story = storiesOf(\"Components/Elevation\", module);\nstory.addDecorator(withKnobs);\n\nstory.add(\n \"usage\",\n () => {\n const transition = boolean(\"Transition\", true);\n const z = select(\"Z (elevation height)\", [...Array(25).keys()], 1);\n\n const style = {\n padding: 20,\n backgroundColor: \"white\"\n };\n\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox title={\"An area with applied elevation\"}>\n <StorySandboxExample>\n <Elevation z={z} transition={transition}>\n <div style={style}>This is an elevated content.</div>\n </Elevation>\n </StorySandboxExample>\n <StorySandboxCode>\n {`\n <Elevation z={${z}} transition={${transition}}>\n <div>This is an elevated content.</div>\n </Elevation>\n `}\n </StorySandboxCode>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [Elevation] } }\n);\n"],"mappings":";;;;AAAA;AACA;AACA;AAOA;AACA;AACA;AAEA,IAAMA,KAAK,GAAG,IAAAC,iBAAS,EAAC,sBAAsB,EAAEC,MAAM,CAAC;AACvDF,KAAK,CAACG,YAAY,CAACC,qBAAS,CAAC;AAE7BJ,KAAK,CAACK,GAAG,CACL,OAAO,EACP,YAAM;EACF,IAAMC,UAAU,GAAG,IAAAC,mBAAO,EAAC,YAAY,EAAE,IAAI,CAAC;EAC9C,IAAMC,CAAC,GAAG,IAAAC,kBAAM,EAAC,sBAAsB,mCAAMC,KAAK,CAAC,EAAE,CAAC,CAACC,IAAI,EAAE,GAAG,CAAC,CAAC;EAElE,IAAMC,KAAK,GAAG;IACVC,OAAO,EAAE,EAAE;IACXC,eAAe,EAAE;EACrB,CAAC;EAED,oBACI,6BAAC,YAAK,qBACF,6BAAC,kBAAW,QAAEC,eAAM,CAAe,eACnC,6BAAC,mBAAY;IAAC,KAAK,EAAE;EAAiC,gBAClD,6BAAC,0BAAmB,qBAChB,6BAAC,oBAAS;IAAC,CAAC,EAAEP,CAAE;IAAC,UAAU,EAAEF;EAAW,gBACpC;IAAK,KAAK,EAAEM;EAAM,GAAC,8BAA4B,CAAM,CAC7C,CACM,eACtB,6BAAC,uBAAgB,0DAEGJ,CAAC,2BAAiBF,UAAU,yIAI7B,CACR,CACX;AAEhB,CAAC,EACD;EAAEU,IAAI,EAAE;IAAEC,UAAU,EAAE,CAACC,oBAAS;EAAE;AAAE,CAAC,CACxC"}
@@ -3,9 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  var _Elevation = require("./Elevation");
8
-
9
7
  Object.keys(_Elevation).forEach(function (key) {
10
8
  if (key === "default" || key === "__esModule") return;
11
9
  if (key in exports && exports[key] === _Elevation[key]) return;
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Elevation\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Elevation\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1,16 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.FormElementMessage = void 0;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
10
  var FormElementMessage = function FormElementMessage(props) {
15
11
  var classNames = (0, _classnames.default)("mdc-text-field-helper-text mdc-text-field-helper-text--persistent", props.className, {
16
12
  "mdc-text-field-helper-text--error": props.error
@@ -19,5 +15,4 @@ var FormElementMessage = function FormElementMessage(props) {
19
15
  className: classNames
20
16
  }, props.children);
21
17
  };
22
-
23
18
  exports.FormElementMessage = FormElementMessage;
@@ -1 +1 @@
1
- {"version":3,"names":["FormElementMessage","props","classNames","classnames","className","error","children"],"sources":["FormElementMessage.tsx"],"sourcesContent":["import React from \"react\";\nimport classnames from \"classnames\";\n\ntype Props = {\n // message to display\n children: React.ReactNode;\n\n // optional class name\n className?: string;\n\n // is it an error message we're displaying\n error?: boolean;\n};\n\nconst FormElementMessage = (props: Props) => {\n const classNames = classnames(\n \"mdc-text-field-helper-text mdc-text-field-helper-text--persistent\",\n props.className,\n { \"mdc-text-field-helper-text--error\": props.error }\n );\n\n return <div className={classNames}>{props.children}</div>;\n};\n\nexport { FormElementMessage };\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAaA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,KAAD,EAAkB;EACzC,IAAMC,UAAU,GAAG,IAAAC,mBAAA,EACf,mEADe,EAEfF,KAAK,CAACG,SAFS,EAGf;IAAE,qCAAqCH,KAAK,CAACI;EAA7C,CAHe,CAAnB;EAMA,oBAAO;IAAK,SAAS,EAAEH;EAAhB,GAA6BD,KAAK,CAACK,QAAnC,CAAP;AACH,CARD"}
1
+ {"version":3,"names":["FormElementMessage","props","classNames","classnames","className","error","children"],"sources":["FormElementMessage.tsx"],"sourcesContent":["import React from \"react\";\nimport classnames from \"classnames\";\n\ntype Props = {\n // message to display\n children: React.ReactNode;\n\n // optional class name\n className?: string;\n\n // is it an error message we're displaying\n error?: boolean;\n};\n\nconst FormElementMessage = (props: Props) => {\n const classNames = classnames(\n \"mdc-text-field-helper-text mdc-text-field-helper-text--persistent\",\n props.className,\n { \"mdc-text-field-helper-text--error\": props.error }\n );\n\n return <div className={classNames}>{props.children}</div>;\n};\n\nexport { FormElementMessage };\n"],"mappings":";;;;;;;AAAA;AACA;AAaA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkB,CAAIC,KAAY,EAAK;EACzC,IAAMC,UAAU,GAAG,IAAAC,mBAAU,EACzB,mEAAmE,EACnEF,KAAK,CAACG,SAAS,EACf;IAAE,mCAAmC,EAAEH,KAAK,CAACI;EAAM,CAAC,CACvD;EAED,oBAAO;IAAK,SAAS,EAAEH;EAAW,GAAED,KAAK,CAACK,QAAQ,CAAO;AAC7D,CAAC;AAAC"}
@@ -9,5 +9,4 @@ Object.defineProperty(exports, "FormElementMessage", {
9
9
  return _FormElementMessage.FormElementMessage;
10
10
  }
11
11
  });
12
-
13
12
  var _FormElementMessage = require("./FormElementMessage");
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { FormElementMessage } from \"./FormElementMessage\";\n"],"mappings":";;;;;;;;;;;;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { FormElementMessage } from \"./FormElementMessage\";\n"],"mappings":";;;;;;;;;;;AAAA"}
@@ -4,25 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.FullName = void 0;
7
-
8
7
  var FullName = function FullName(props) {
9
8
  var data = props.data;
10
-
11
9
  if (!data) {
12
10
  return "N/A";
13
11
  }
14
-
15
12
  var output = "";
16
-
17
13
  if (data.firstName) {
18
14
  output += data.firstName;
19
15
  }
20
-
21
16
  if (data.lastName) {
22
17
  output += " " + data.lastName;
23
18
  }
24
-
25
19
  return output;
26
20
  };
27
-
28
21
  exports.FullName = FullName;
@@ -1 +1 @@
1
- {"version":3,"names":["FullName","props","data","output","firstName","lastName"],"sources":["FullName.ts"],"sourcesContent":["type Props = {\n data?: {\n firstName?: string;\n lastName?: string;\n };\n};\n\nconst FullName = (props: Props) => {\n const { data } = props;\n\n if (!data) {\n return \"N/A\";\n }\n\n let output = \"\";\n if (data.firstName) {\n output += data.firstName;\n }\n\n if (data.lastName) {\n output += \" \" + data.lastName;\n }\n\n return output;\n};\n\nexport { FullName };\n"],"mappings":";;;;;;;AAOA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAAkB;EAC/B,IAAQC,IAAR,GAAiBD,KAAjB,CAAQC,IAAR;;EAEA,IAAI,CAACA,IAAL,EAAW;IACP,OAAO,KAAP;EACH;;EAED,IAAIC,MAAM,GAAG,EAAb;;EACA,IAAID,IAAI,CAACE,SAAT,EAAoB;IAChBD,MAAM,IAAID,IAAI,CAACE,SAAf;EACH;;EAED,IAAIF,IAAI,CAACG,QAAT,EAAmB;IACfF,MAAM,IAAI,MAAMD,IAAI,CAACG,QAArB;EACH;;EAED,OAAOF,MAAP;AACH,CAjBD"}
1
+ {"version":3,"names":["FullName","props","data","output","firstName","lastName"],"sources":["FullName.ts"],"sourcesContent":["type Props = {\n data?: {\n firstName?: string;\n lastName?: string;\n };\n};\n\nconst FullName = (props: Props) => {\n const { data } = props;\n\n if (!data) {\n return \"N/A\";\n }\n\n let output = \"\";\n if (data.firstName) {\n output += data.firstName;\n }\n\n if (data.lastName) {\n output += \" \" + data.lastName;\n }\n\n return output;\n};\n\nexport { FullName };\n"],"mappings":";;;;;;AAOA,IAAMA,QAAQ,GAAG,SAAXA,QAAQ,CAAIC,KAAY,EAAK;EAC/B,IAAQC,IAAI,GAAKD,KAAK,CAAdC,IAAI;EAEZ,IAAI,CAACA,IAAI,EAAE;IACP,OAAO,KAAK;EAChB;EAEA,IAAIC,MAAM,GAAG,EAAE;EACf,IAAID,IAAI,CAACE,SAAS,EAAE;IAChBD,MAAM,IAAID,IAAI,CAACE,SAAS;EAC5B;EAEA,IAAIF,IAAI,CAACG,QAAQ,EAAE;IACfF,MAAM,IAAI,GAAG,GAAGD,IAAI,CAACG,QAAQ;EACjC;EAEA,OAAOF,MAAM;AACjB,CAAC;AAAC"}
package/FullName/index.js CHANGED
@@ -3,9 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  var _FullName = require("./FullName");
8
-
9
7
  Object.keys(_FullName).forEach(function (key) {
10
8
  if (key === "default" || key === "__esModule") return;
11
9
  if (key in exports && exports[key] === _FullName[key]) return;
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./FullName\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./FullName\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
package/Grid/Grid.js CHANGED
@@ -1,37 +1,29 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.GridInner = exports.Grid = exports.Cell = void 0;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _grid = require("@rmwc/grid");
13
-
14
10
  /**
15
11
  * Cell must be direct children of Grid component.
16
12
  */
17
13
  var Cell = function Cell(props) {
18
14
  return /*#__PURE__*/_react.default.createElement(_grid.GridCell, props, props.children);
19
15
  };
20
-
21
16
  exports.Cell = Cell;
22
-
23
17
  var GridInner = function GridInner(props) {
24
18
  return /*#__PURE__*/_react.default.createElement(_grid.GridRow, props, props.children);
25
19
  };
26
-
27
20
  exports.GridInner = GridInner;
28
21
  GridInner.displayName = "GridInner";
22
+
29
23
  /**
30
24
  * Use Grid component to display a list of choices, once the handler is triggered.
31
25
  */
32
-
33
26
  var Grid = function Grid(props) {
34
27
  return /*#__PURE__*/_react.default.createElement(_grid.Grid, props, props.children);
35
28
  };
36
-
37
29
  exports.Grid = Grid;
package/Grid/Grid.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["Cell","props","children","GridInner","displayName","Grid"],"sources":["Grid.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Grid as RmwcGrid,\n GridCell as RmwcGridCell,\n GridRow as RmwcGridInner,\n GridCellProps as RmwcGridCellProps,\n GridProps as RmwcGridProps\n} from \"@rmwc/grid\";\nimport { CSSProperties } from \"react\";\n\nexport type CellProps = RmwcGridCellProps & {\n // One or more Cell components.\n children?: React.ReactNode;\n\n // CSS class name that will be added to the element\n className?: string;\n\n style?: { [key: string]: any };\n};\n\nexport type GridProps = RmwcGridProps & {\n className?: string;\n style?: CSSProperties;\n};\n\n/**\n * Cell must be direct children of Grid component.\n */\nexport const Cell = (props: CellProps) => {\n return <RmwcGridCell {...props}>{props.children}</RmwcGridCell>;\n};\n\nexport type GridInnerProps = {\n // One or more Cell components.\n children: React.ReactElement<typeof Cell> | React.ReactElement<typeof Cell>[];\n\n /**\n * CSS class name\n */\n className?: string;\n};\n\nexport const GridInner = (props: GridInnerProps) => {\n return <RmwcGridInner {...props}>{props.children}</RmwcGridInner>;\n};\n\nGridInner.displayName = \"GridInner\";\n\n/**\n * Use Grid component to display a list of choices, once the handler is triggered.\n */\nexport const Grid = (props: GridProps) => {\n return <RmwcGrid {...props}>{props.children}</RmwcGrid>;\n};\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAwBA;AACA;AACA;AACO,IAAMA,IAAI,GAAG,SAAPA,IAAO,CAACC,KAAD,EAAsB;EACtC,oBAAO,6BAAC,cAAD,EAAkBA,KAAlB,EAA0BA,KAAK,CAACC,QAAhC,CAAP;AACH,CAFM;;;;AAcA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAACF,KAAD,EAA2B;EAChD,oBAAO,6BAAC,aAAD,EAAmBA,KAAnB,EAA2BA,KAAK,CAACC,QAAjC,CAAP;AACH,CAFM;;;AAIPC,SAAS,CAACC,WAAV,GAAwB,WAAxB;AAEA;AACA;AACA;;AACO,IAAMC,IAAI,GAAG,SAAPA,IAAO,CAACJ,KAAD,EAAsB;EACtC,oBAAO,6BAAC,UAAD,EAAcA,KAAd,EAAsBA,KAAK,CAACC,QAA5B,CAAP;AACH,CAFM"}
1
+ {"version":3,"names":["Cell","props","children","GridInner","displayName","Grid"],"sources":["Grid.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Grid as RmwcGrid,\n GridCell as RmwcGridCell,\n GridRow as RmwcGridInner,\n GridCellProps as RmwcGridCellProps,\n GridProps as RmwcGridProps\n} from \"@rmwc/grid\";\nimport { CSSProperties } from \"react\";\n\nexport type CellProps = RmwcGridCellProps & {\n // One or more Cell components.\n children?: React.ReactNode;\n\n // CSS class name that will be added to the element\n className?: string;\n\n style?: { [key: string]: any };\n};\n\nexport type GridProps = RmwcGridProps & {\n className?: string;\n style?: CSSProperties;\n};\n\n/**\n * Cell must be direct children of Grid component.\n */\nexport const Cell = (props: CellProps) => {\n return <RmwcGridCell {...props}>{props.children}</RmwcGridCell>;\n};\n\nexport type GridInnerProps = {\n // One or more Cell components.\n children: React.ReactElement<typeof Cell> | React.ReactElement<typeof Cell>[];\n\n /**\n * CSS class name\n */\n className?: string;\n};\n\nexport const GridInner = (props: GridInnerProps) => {\n return <RmwcGridInner {...props}>{props.children}</RmwcGridInner>;\n};\n\nGridInner.displayName = \"GridInner\";\n\n/**\n * Use Grid component to display a list of choices, once the handler is triggered.\n */\nexport const Grid = (props: GridProps) => {\n return <RmwcGrid {...props}>{props.children}</RmwcGrid>;\n};\n"],"mappings":";;;;;;;AAAA;AACA;AAwBA;AACA;AACA;AACO,IAAMA,IAAI,GAAG,SAAPA,IAAI,CAAIC,KAAgB,EAAK;EACtC,oBAAO,6BAAC,cAAY,EAAKA,KAAK,EAAGA,KAAK,CAACC,QAAQ,CAAgB;AACnE,CAAC;AAAC;AAYK,IAAMC,SAAS,GAAG,SAAZA,SAAS,CAAIF,KAAqB,EAAK;EAChD,oBAAO,6BAAC,aAAa,EAAKA,KAAK,EAAGA,KAAK,CAACC,QAAQ,CAAiB;AACrE,CAAC;AAAC;AAEFC,SAAS,CAACC,WAAW,GAAG,WAAW;;AAEnC;AACA;AACA;AACO,IAAMC,IAAI,GAAG,SAAPA,IAAI,CAAIJ,KAAgB,EAAK;EACtC,oBAAO,6BAAC,UAAQ,EAAKA,KAAK,EAAGA,KAAK,CAACC,QAAQ,CAAY;AAC3D,CAAC;AAAC"}
@@ -1,17 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  var _react = _interopRequireDefault(require("react"));
6
-
7
5
  var _react2 = require("@storybook/react");
8
-
9
6
  var _Story = require("@webiny/storybook-utils/Story");
10
-
11
7
  var _README = _interopRequireDefault(require("./../Grid/README.md"));
12
-
13
8
  var _Grid = require("./Grid");
14
-
15
9
  var story = (0, _react2.storiesOf)("Components/Grid", module);
16
10
  story.add("usage", function () {
17
11
  return /*#__PURE__*/_react.default.createElement(_Story.Story, null, /*#__PURE__*/_react.default.createElement(_Story.StoryReadme, null, _README.default), /*#__PURE__*/_react.default.createElement(_Story.StorySandbox, {
@@ -1 +1 @@
1
- {"version":3,"names":["story","storiesOf","module","add","readme","info","propTables","Grid","Cell"],"sources":["Grid.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport { Story, StoryReadme, StorySandbox } from \"@webiny/storybook-utils/Story\";\nimport readme from \"./../Grid/README.md\";\nimport { Grid, Cell } from \"./Grid\";\n\nconst story = storiesOf(\"Components/Grid\", module);\n\nstory.add(\n \"usage\",\n () => {\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox title={\"A simple grid.\"}>\n <Grid>\n <Cell span={3} tablet={6} phone={12}>\n Apples\n </Cell>\n <Cell span={3} tablet={6} phone={12}>\n Oranges\n </Cell>\n <Cell span={3} tablet={6} phone={12}>\n Bananas\n </Cell>\n <Cell span={3} tablet={6} phone={12}>\n Strawberries\n </Cell>\n </Grid>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [Grid, Cell] } }\n);\n"],"mappings":";;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,KAAK,GAAG,IAAAC,iBAAA,EAAU,iBAAV,EAA6BC,MAA7B,CAAd;AAEAF,KAAK,CAACG,GAAN,CACI,OADJ,EAEI,YAAM;EACF,oBACI,6BAAC,YAAD,qBACI,6BAAC,kBAAD,QAAcC,eAAd,CADJ,eAEI,6BAAC,mBAAD;IAAc,KAAK,EAAE;EAArB,gBACI,6BAAC,UAAD,qBACI,6BAAC,UAAD;IAAM,IAAI,EAAE,CAAZ;IAAe,MAAM,EAAE,CAAvB;IAA0B,KAAK,EAAE;EAAjC,GAAqC,QAArC,CADJ,eAII,6BAAC,UAAD;IAAM,IAAI,EAAE,CAAZ;IAAe,MAAM,EAAE,CAAvB;IAA0B,KAAK,EAAE;EAAjC,GAAqC,SAArC,CAJJ,eAOI,6BAAC,UAAD;IAAM,IAAI,EAAE,CAAZ;IAAe,MAAM,EAAE,CAAvB;IAA0B,KAAK,EAAE;EAAjC,GAAqC,SAArC,CAPJ,eAUI,6BAAC,UAAD;IAAM,IAAI,EAAE,CAAZ;IAAe,MAAM,EAAE,CAAvB;IAA0B,KAAK,EAAE;EAAjC,GAAqC,cAArC,CAVJ,CADJ,CAFJ,CADJ;AAqBH,CAxBL,EAyBI;EAAEC,IAAI,EAAE;IAAEC,UAAU,EAAE,CAACC,UAAD,EAAOC,UAAP;EAAd;AAAR,CAzBJ"}
1
+ {"version":3,"names":["story","storiesOf","module","add","readme","info","propTables","Grid","Cell"],"sources":["Grid.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport { Story, StoryReadme, StorySandbox } from \"@webiny/storybook-utils/Story\";\nimport readme from \"./../Grid/README.md\";\nimport { Grid, Cell } from \"./Grid\";\n\nconst story = storiesOf(\"Components/Grid\", module);\n\nstory.add(\n \"usage\",\n () => {\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox title={\"A simple grid.\"}>\n <Grid>\n <Cell span={3} tablet={6} phone={12}>\n Apples\n </Cell>\n <Cell span={3} tablet={6} phone={12}>\n Oranges\n </Cell>\n <Cell span={3} tablet={6} phone={12}>\n Bananas\n </Cell>\n <Cell span={3} tablet={6} phone={12}>\n Strawberries\n </Cell>\n </Grid>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [Grid, Cell] } }\n);\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AAEA,IAAMA,KAAK,GAAG,IAAAC,iBAAS,EAAC,iBAAiB,EAAEC,MAAM,CAAC;AAElDF,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,UAAI,qBACD,6BAAC,UAAI;IAAC,IAAI,EAAE,CAAE;IAAC,MAAM,EAAE,CAAE;IAAC,KAAK,EAAE;EAAG,GAAC,QAErC,CAAO,eACP,6BAAC,UAAI;IAAC,IAAI,EAAE,CAAE;IAAC,MAAM,EAAE,CAAE;IAAC,KAAK,EAAE;EAAG,GAAC,SAErC,CAAO,eACP,6BAAC,UAAI;IAAC,IAAI,EAAE,CAAE;IAAC,MAAM,EAAE,CAAE;IAAC,KAAK,EAAE;EAAG,GAAC,SAErC,CAAO,eACP,6BAAC,UAAI;IAAC,IAAI,EAAE,CAAE;IAAC,MAAM,EAAE,CAAE;IAAC,KAAK,EAAE;EAAG,GAAC,cAErC,CAAO,CACJ,CACI,CACX;AAEhB,CAAC,EACD;EAAEC,IAAI,EAAE;IAAEC,UAAU,EAAE,CAACC,UAAI,EAAEC,UAAI;EAAE;AAAE,CAAC,CACzC"}
package/Grid/index.js CHANGED
@@ -3,9 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  var _Grid = require("./Grid");
8
-
9
7
  Object.keys(_Grid).forEach(function (key) {
10
8
  if (key === "default" || key === "__esModule") return;
11
9
  if (key in exports && exports[key] === _Grid[key]) return;
package/Grid/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Grid\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Grid\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1,41 +1,32 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.getClasses = void 0;
9
-
10
8
  var _clone2 = _interopRequireDefault(require("lodash/clone"));
11
-
12
9
  var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
10
  /**
15
11
  * This is a pass-through that modifies your object's props and creates the required className prop by merging
16
12
  * the provided appendClasses(string) and any class names defined inside your props.
17
13
  * To you the function just do: {...getClasses (props)}
18
14
  * and make sure you are not spreading the `props` element, as this will clone and spread your current `props` element already.
19
15
  */
20
-
21
16
  /**
22
17
  * TODO @ts-refactor figure out propList type
23
18
  */
24
19
  var getClasses = function getClasses(propList, appendClasses) {
25
20
  var classes = "";
26
21
  var props = (0, _clone2.default)(propList);
27
-
28
22
  if (propList.hasOwnProperty("className")) {
29
23
  classes = (0, _classnames.default)(propList.className);
30
24
  delete props.className;
31
25
  }
32
-
33
26
  if (typeof appendClasses !== "undefined") {
34
27
  classes = (0, _classnames.default)(classes, appendClasses);
35
28
  }
36
-
37
29
  props.className = classes;
38
30
  return props;
39
31
  };
40
-
41
32
  exports.getClasses = getClasses;
@@ -1 +1 @@
1
- {"version":3,"names":["getClasses","propList","appendClasses","classes","props","hasOwnProperty","classnames","className"],"sources":["ClassNames.ts"],"sourcesContent":["import classnames from \"classnames\";\nimport { clone } from \"lodash\";\n\n/**\n * This is a pass-through that modifies your object's props and creates the required className prop by merging\n * the provided appendClasses(string) and any class names defined inside your props.\n * To you the function just do: {...getClasses (props)}\n * and make sure you are not spreading the `props` element, as this will clone and spread your current `props` element already.\n */\n/**\n * TODO @ts-refactor figure out propList type\n */\nconst getClasses = (propList: any, appendClasses: string[] | string) => {\n let classes = \"\";\n const props = clone(propList);\n if (propList.hasOwnProperty(\"className\")) {\n classes = classnames(propList.className);\n delete props.className;\n }\n\n if (typeof appendClasses !== \"undefined\") {\n classes = classnames(classes, appendClasses);\n }\n\n props.className = classes;\n\n return props;\n};\n\nexport { getClasses };\n"],"mappings":";;;;;;;;;;;AAAA;;AAGA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,QAAD,EAAgBC,aAAhB,EAAqD;EACpE,IAAIC,OAAO,GAAG,EAAd;EACA,IAAMC,KAAK,GAAG,qBAAMH,QAAN,CAAd;;EACA,IAAIA,QAAQ,CAACI,cAAT,CAAwB,WAAxB,CAAJ,EAA0C;IACtCF,OAAO,GAAG,IAAAG,mBAAA,EAAWL,QAAQ,CAACM,SAApB,CAAV;IACA,OAAOH,KAAK,CAACG,SAAb;EACH;;EAED,IAAI,OAAOL,aAAP,KAAyB,WAA7B,EAA0C;IACtCC,OAAO,GAAG,IAAAG,mBAAA,EAAWH,OAAX,EAAoBD,aAApB,CAAV;EACH;;EAEDE,KAAK,CAACG,SAAN,GAAkBJ,OAAlB;EAEA,OAAOC,KAAP;AACH,CAfD"}
1
+ {"version":3,"names":["getClasses","propList","appendClasses","classes","props","hasOwnProperty","classnames","className"],"sources":["ClassNames.ts"],"sourcesContent":["import classnames from \"classnames\";\nimport { clone } from \"lodash\";\n\n/**\n * This is a pass-through that modifies your object's props and creates the required className prop by merging\n * the provided appendClasses(string) and any class names defined inside your props.\n * To you the function just do: {...getClasses (props)}\n * and make sure you are not spreading the `props` element, as this will clone and spread your current `props` element already.\n */\n/**\n * TODO @ts-refactor figure out propList type\n */\nconst getClasses = (propList: any, appendClasses: string[] | string) => {\n let classes = \"\";\n const props = clone(propList);\n if (propList.hasOwnProperty(\"className\")) {\n classes = classnames(propList.className);\n delete props.className;\n }\n\n if (typeof appendClasses !== \"undefined\") {\n classes = classnames(classes, appendClasses);\n }\n\n props.className = classes;\n\n return props;\n};\n\nexport { getClasses };\n"],"mappings":";;;;;;;;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,UAAU,GAAG,SAAbA,UAAU,CAAIC,QAAa,EAAEC,aAAgC,EAAK;EACpE,IAAIC,OAAO,GAAG,EAAE;EAChB,IAAMC,KAAK,GAAG,qBAAMH,QAAQ,CAAC;EAC7B,IAAIA,QAAQ,CAACI,cAAc,CAAC,WAAW,CAAC,EAAE;IACtCF,OAAO,GAAG,IAAAG,mBAAU,EAACL,QAAQ,CAACM,SAAS,CAAC;IACxC,OAAOH,KAAK,CAACG,SAAS;EAC1B;EAEA,IAAI,OAAOL,aAAa,KAAK,WAAW,EAAE;IACtCC,OAAO,GAAG,IAAAG,mBAAU,EAACH,OAAO,EAAED,aAAa,CAAC;EAChD;EAEAE,KAAK,CAACG,SAAS,GAAGJ,OAAO;EAEzB,OAAOC,KAAK;AAChB,CAAC;AAAC"}
package/Helpers/index.js CHANGED
@@ -9,5 +9,4 @@ Object.defineProperty(exports, "getClasses", {
9
9
  return _ClassNames.getClasses;
10
10
  }
11
11
  });
12
-
13
12
  var _ClassNames = require("./ClassNames");
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import { getClasses } from \"./ClassNames\";\n\nexport { getClasses };\n"],"mappings":";;;;;;;;;;;;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import { getClasses } from \"./ClassNames\";\n\nexport { getClasses };\n"],"mappings":";;;;;;;;;;;AAAA"}
package/Icon/Icon.js CHANGED
@@ -1,18 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.Icon = void 0;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _emotion = require("emotion");
13
-
14
10
  var _classnames = _interopRequireDefault(require("classnames"));
15
-
16
11
  var webinyIcon = /*#__PURE__*/(0, _emotion.css)({}, {
17
12
  "&.mdc-button__icon": {
18
13
  marginLeft: 0,
@@ -20,10 +15,10 @@ var webinyIcon = /*#__PURE__*/(0, _emotion.css)({}, {
20
15
  display: "block"
21
16
  }
22
17
  }, "label:webinyIcon;");
18
+
23
19
  /**
24
20
  * Use Icon component to display an icon.
25
21
  */
26
-
27
22
  var Icon = function Icon(props) {
28
23
  return /*#__PURE__*/_react.default.cloneElement(props.icon, {
29
24
  "data-testid": props["data-testid"],
@@ -31,5 +26,4 @@ var Icon = function Icon(props) {
31
26
  onClick: props.onClick
32
27
  });
33
28
  };
34
-
35
29
  exports.Icon = Icon;
package/Icon/Icon.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["webinyIcon","css","marginLeft","width","display","Icon","props","React","cloneElement","icon","className","classNames","onClick"],"sources":["Icon.tsx"],"sourcesContent":["import React from \"react\";\nimport { css } from \"emotion\";\nimport classNames from \"classnames\";\n\nexport type IconProps = {\n /**\n * SvgComponent containing the svg icon\n */\n icon: React.ReactElement;\n\n /**\n * Optional onclick handler\n */\n onClick?: Function;\n\n /**\n * CSS class to be added to the icon\n */\n className?: string;\n\n // For testing purposes.\n \"data-testid\"?: string;\n};\n\nconst webinyIcon = css(\n {},\n {\n \"&.mdc-button__icon\": {\n marginLeft: 0,\n width: \"inherit\",\n display: \"block\"\n }\n }\n);\n\n/**\n * Use Icon component to display an icon.\n */\nconst Icon: React.FC<IconProps> = props => {\n return React.cloneElement(props.icon, {\n \"data-testid\": props[\"data-testid\"],\n className: classNames(\"mdc-button__icon webiny-ui-icon\", webinyIcon, props.className),\n onClick: props.onClick\n });\n};\n\nexport { Icon };\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAsBA,IAAMA,UAAU,gBAAG,IAAAC,YAAA,EACf,EADe,EAEf;EACI,sBAAsB;IAClBC,UAAU,EAAE,CADM;IAElBC,KAAK,EAAE,SAFW;IAGlBC,OAAO,EAAE;EAHS;AAD1B,CAFe,sBAAnB;AAWA;AACA;AACA;;AACA,IAAMC,IAAyB,GAAG,SAA5BA,IAA4B,CAAAC,KAAK,EAAI;EACvC,oBAAOC,cAAA,CAAMC,YAAN,CAAmBF,KAAK,CAACG,IAAzB,EAA+B;IAClC,eAAeH,KAAK,CAAC,aAAD,CADc;IAElCI,SAAS,EAAE,IAAAC,mBAAA,EAAW,iCAAX,EAA8CX,UAA9C,EAA0DM,KAAK,CAACI,SAAhE,CAFuB;IAGlCE,OAAO,EAAEN,KAAK,CAACM;EAHmB,CAA/B,CAAP;AAKH,CAND"}
1
+ {"version":3,"names":["webinyIcon","css","marginLeft","width","display","Icon","props","React","cloneElement","icon","className","classNames","onClick"],"sources":["Icon.tsx"],"sourcesContent":["import React from \"react\";\nimport { css } from \"emotion\";\nimport classNames from \"classnames\";\n\nexport type IconProps = {\n /**\n * SvgComponent containing the svg icon\n */\n icon: React.ReactElement;\n\n /**\n * Optional onclick handler\n */\n onClick?: Function;\n\n /**\n * CSS class to be added to the icon\n */\n className?: string;\n\n // For testing purposes.\n \"data-testid\"?: string;\n};\n\nconst webinyIcon = css(\n {},\n {\n \"&.mdc-button__icon\": {\n marginLeft: 0,\n width: \"inherit\",\n display: \"block\"\n }\n }\n);\n\n/**\n * Use Icon component to display an icon.\n */\nconst Icon: React.FC<IconProps> = props => {\n return React.cloneElement(props.icon, {\n \"data-testid\": props[\"data-testid\"],\n className: classNames(\"mdc-button__icon webiny-ui-icon\", webinyIcon, props.className),\n onClick: props.onClick\n });\n};\n\nexport { Icon };\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AAsBA,IAAMA,UAAU,gBAAG,IAAAC,YAAG,EAClB,CAAC,CAAC,EACF;EACI,oBAAoB,EAAE;IAClBC,UAAU,EAAE,CAAC;IACbC,KAAK,EAAE,SAAS;IAChBC,OAAO,EAAE;EACb;AACJ,CAAC,sBACJ;;AAED;AACA;AACA;AACA,IAAMC,IAAyB,GAAG,SAA5BA,IAAyB,CAAGC,KAAK,EAAI;EACvC,oBAAOC,cAAK,CAACC,YAAY,CAACF,KAAK,CAACG,IAAI,EAAE;IAClC,aAAa,EAAEH,KAAK,CAAC,aAAa,CAAC;IACnCI,SAAS,EAAE,IAAAC,mBAAU,EAAC,iCAAiC,EAAEX,UAAU,EAAEM,KAAK,CAACI,SAAS,CAAC;IACrFE,OAAO,EAAEN,KAAK,CAACM;EACnB,CAAC,CAAC;AACN,CAAC;AAAC"}