@pedidopago/ui 1.1.2 → 1.1.3

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 (320) hide show
  1. package/dist/@types/index.d.ts +6 -6
  2. package/dist/components/Alert/alert.test.d.ts +1 -1
  3. package/dist/components/Alert/index.d.ts +4 -4
  4. package/dist/components/Alert/styles.d.ts +36 -36
  5. package/dist/components/Alert/types.d.ts +48 -48
  6. package/dist/components/Avatar/avatar.test.d.ts +1 -1
  7. package/dist/components/Avatar/index.d.ts +4 -4
  8. package/dist/components/Avatar/styles.d.ts +25 -25
  9. package/dist/components/Avatar/types.d.ts +15 -15
  10. package/dist/components/Badge/badge.test.d.ts +1 -1
  11. package/dist/components/Badge/index.d.ts +4 -4
  12. package/dist/components/Badge/styles.d.ts +20 -20
  13. package/dist/components/Badge/types.d.ts +10 -10
  14. package/dist/components/Button/Button.test.d.ts +1 -1
  15. package/dist/components/Button/Button.test.js +150 -16
  16. package/dist/components/Button/index.d.ts +4 -5
  17. package/dist/components/Button/index.d.ts.map +1 -1
  18. package/dist/components/Button/index.js +51 -64
  19. package/dist/components/Button/styles.d.ts +14 -22
  20. package/dist/components/Button/styles.d.ts.map +1 -1
  21. package/dist/components/Button/styles.js +101 -23
  22. package/dist/components/Button/types.d.ts +103 -31
  23. package/dist/components/Button/types.d.ts.map +1 -1
  24. package/dist/components/Card/ButtonCard/index.d.ts +3 -3
  25. package/dist/components/Card/ButtonCard/styles.d.ts +13 -13
  26. package/dist/components/Card/Expansion/index.d.ts +5 -5
  27. package/dist/components/Card/Expansion/style.d.ts +14 -14
  28. package/dist/components/Card/card.test.d.ts +1 -1
  29. package/dist/components/Card/card.test.js +5 -10
  30. package/dist/components/Card/index.d.ts +3 -3
  31. package/dist/components/Card/styles.d.ts +56 -56
  32. package/dist/components/Card/types.d.ts +41 -41
  33. package/dist/components/CheckboxInput/checkbox-input.test.d.ts +1 -1
  34. package/dist/components/CheckboxInput/components/MultipleCheckbox.d.ts +4 -4
  35. package/dist/components/CheckboxInput/index.d.ts +4 -4
  36. package/dist/components/CheckboxInput/styles.d.ts +31 -31
  37. package/dist/components/CheckboxInput/types.d.ts +26 -26
  38. package/dist/components/ColorPicker/colorpicker.test.d.ts +1 -1
  39. package/dist/components/ColorPicker/components/ColorHue.d.ts +4 -4
  40. package/dist/components/ColorPicker/components/ColorInput.d.ts +4 -4
  41. package/dist/components/ColorPicker/components/ColorPickerBox.d.ts +4 -4
  42. package/dist/components/ColorPicker/components/ColorPointer.d.ts +4 -4
  43. package/dist/components/ColorPicker/components/ColorSelector.d.ts +4 -4
  44. package/dist/components/ColorPicker/hooks/useCachedCallback.d.ts +1 -1
  45. package/dist/components/ColorPicker/hooks/useHsva.d.ts +2 -2
  46. package/dist/components/ColorPicker/index.d.ts +4 -4
  47. package/dist/components/ColorPicker/styles.d.ts +44 -44
  48. package/dist/components/ColorPicker/types.d.ts +73 -73
  49. package/dist/components/ColorPicker/utils/checkers.d.ts +7 -7
  50. package/dist/components/ColorPicker/utils/conversors.d.ts +60 -60
  51. package/dist/components/ColorPicker/utils/parsers.d.ts +27 -27
  52. package/dist/components/DatePicker/components/DatePickerContent.d.ts +3 -3
  53. package/dist/components/DatePicker/components/DateYearPicker.d.ts +3 -3
  54. package/dist/components/DatePicker/datepicker.test.d.ts +1 -1
  55. package/dist/components/DatePicker/index.d.ts +4 -4
  56. package/dist/components/DatePicker/styles.d.ts +74 -74
  57. package/dist/components/DatePicker/types.d.ts +59 -59
  58. package/dist/components/DatePicker/utils/getMonthName.d.ts +1 -1
  59. package/dist/components/Dialog/dialog-example.d.ts +3 -3
  60. package/dist/components/Dialog/dialog.test.d.ts +1 -1
  61. package/dist/components/Dialog/index.d.ts +3 -3
  62. package/dist/components/Dialog/styles.d.ts +25 -25
  63. package/dist/components/Dialog/types.d.ts +30 -30
  64. package/dist/components/Dropzone/dropzone.test.d.ts +1 -1
  65. package/dist/components/Dropzone/index.d.ts +4 -4
  66. package/dist/components/Dropzone/styles.d.ts +46 -46
  67. package/dist/components/Dropzone/types.d.ts +19 -19
  68. package/dist/components/Dropzone/utils/accepts.d.ts +10 -10
  69. package/dist/components/Flex/flex.test.d.ts +1 -1
  70. package/dist/components/Flex/index.d.ts +4 -4
  71. package/dist/components/Flex/styles.d.ts +293 -293
  72. package/dist/components/Flex/types.d.ts +175 -175
  73. package/dist/components/Grid/grid.test.d.ts +1 -1
  74. package/dist/components/Grid/index.d.ts +4 -4
  75. package/dist/components/Grid/styles.d.ts +285 -285
  76. package/dist/components/Grid/types.d.ts +88 -88
  77. package/dist/components/Icon/data/beauty.d.ts +8 -8
  78. package/dist/components/Icon/data/dash.d.ts +8 -8
  79. package/dist/components/Icon/data/dash.d.ts.map +1 -1
  80. package/dist/components/Icon/data/dash.js +1 -1
  81. package/dist/components/Icon/data/ecommerce.d.ts +8 -8
  82. package/dist/components/Icon/data/health.d.ts +8 -8
  83. package/dist/components/Icon/data/illustrations.d.ts +8 -8
  84. package/dist/components/Icon/data/men.d.ts +8 -8
  85. package/dist/components/Icon/data/payment.d.ts +8 -8
  86. package/dist/components/Icon/data/physicalPerfomance.d.ts +8 -8
  87. package/dist/components/Icon/data/social.d.ts +8 -8
  88. package/dist/components/Icon/data/status.d.ts +8 -8
  89. package/dist/components/Icon/data/summer.d.ts +8 -8
  90. package/dist/components/Icon/data/woman.d.ts +8 -8
  91. package/dist/components/Icon/icon.test.d.ts +1 -1
  92. package/dist/components/Icon/index.d.ts +4 -4
  93. package/dist/components/Icon/scripts/build.d.ts +5 -7
  94. package/dist/components/Icon/scripts/build.d.ts.map +1 -1
  95. package/dist/components/Icon/scripts/build.js +0 -2
  96. package/dist/components/Icon/scripts/extractor.d.ts +15 -15
  97. package/dist/components/Icon/scripts/run-build.d.ts +1 -1
  98. package/dist/components/Icon/scripts/writers.d.ts +22 -22
  99. package/dist/components/Icon/styles.d.ts +13 -13
  100. package/dist/components/Icon/types.d.ts +8 -8
  101. package/dist/components/Icon/types.d.ts.map +1 -1
  102. package/dist/components/Icon/utils/allIcons.d.ts +8 -8
  103. package/dist/components/IconItem/IconItem.test.d.ts +1 -1
  104. package/dist/components/IconItem/index.d.ts +4 -4
  105. package/dist/components/IconItem/styles.d.ts +18 -18
  106. package/dist/components/IconItem/types.d.ts +22 -22
  107. package/dist/components/ImageItem/imageFake.d.ts +2 -2
  108. package/dist/components/ImageItem/index.d.ts +4 -4
  109. package/dist/components/ImageItem/input.test.d.ts +1 -1
  110. package/dist/components/ImageItem/styles.d.ts +26 -26
  111. package/dist/components/ImageItem/types.d.ts +25 -25
  112. package/dist/components/Input/index.d.ts +4 -4
  113. package/dist/components/Input/input.test.d.ts +1 -1
  114. package/dist/components/Input/styles.d.ts +73 -73
  115. package/dist/components/Input/types.d.ts +26 -26
  116. package/dist/components/Label/index.d.ts +4 -4
  117. package/dist/components/Label/input.test.d.ts +1 -1
  118. package/dist/components/Label/styles.d.ts +6 -6
  119. package/dist/components/Label/types.d.ts +16 -16
  120. package/dist/components/List/index.d.ts +4 -4
  121. package/dist/components/List/list.test.d.ts +1 -1
  122. package/dist/components/List/styles.d.ts +15 -15
  123. package/dist/components/List/types.d.ts +6 -6
  124. package/dist/components/Modal/index.d.ts +3 -3
  125. package/dist/components/Modal/modal.test.d.ts +1 -1
  126. package/dist/components/Modal/styles.d.ts +12 -12
  127. package/dist/components/Modal/types.d.ts +28 -28
  128. package/dist/components/Pagination/hooks/usePagination.d.ts +3 -3
  129. package/dist/components/Pagination/index.d.ts +3 -3
  130. package/dist/components/Pagination/pagination.test.d.ts +1 -1
  131. package/dist/components/Pagination/styles.d.ts +34 -34
  132. package/dist/components/Pagination/types.d.ts +28 -28
  133. package/dist/components/Progress/Circle/index.d.ts +3 -3
  134. package/dist/components/Progress/Linear/index.d.ts +3 -3
  135. package/dist/components/Progress/getSteps.d.ts +1 -1
  136. package/dist/components/Progress/index.d.ts +4 -4
  137. package/dist/components/Progress/progress.test.d.ts +1 -1
  138. package/dist/components/Progress/style.d.ts +38 -38
  139. package/dist/components/Progress/type.d.ts +69 -69
  140. package/dist/components/Progress/type.d.ts.map +1 -1
  141. package/dist/components/RadioInput/components/ChoiceList/index.d.ts +5 -5
  142. package/dist/components/RadioInput/index.d.ts +4 -4
  143. package/dist/components/RadioInput/radio-input.test.d.ts +1 -1
  144. package/dist/components/RadioInput/styles.d.ts +30 -30
  145. package/dist/components/RadioInput/types.d.ts +60 -60
  146. package/dist/components/RadioInput/utils/get-colors-props.d.ts +11 -11
  147. package/dist/components/Rating/components/GradientIcon/data/dash.d.ts +8 -8
  148. package/dist/components/Rating/components/GradientIcon/data/ecommerce.d.ts +8 -8
  149. package/dist/components/Rating/components/GradientIcon/index.d.ts +4 -4
  150. package/dist/components/Rating/components/GradientIcon/scripts/build.d.ts +7 -7
  151. package/dist/components/Rating/components/GradientIcon/scripts/extractor.d.ts +15 -15
  152. package/dist/components/Rating/components/GradientIcon/scripts/writers.d.ts +22 -22
  153. package/dist/components/Rating/components/GradientIcon/styles.d.ts +12 -12
  154. package/dist/components/Rating/components/GradientIcon/types.d.ts +15 -15
  155. package/dist/components/Rating/components/GradientIcon/utils/allIcons.d.ts +8 -8
  156. package/dist/components/Rating/components/RatingWithMultipleValues/RatingWithMultipleValues.d.ts +3 -3
  157. package/dist/components/Rating/components/RatingWithMultipleValues/styles.d.ts +6 -6
  158. package/dist/components/Rating/components/RatingWithMultipleValues/types.d.ts +16 -16
  159. package/dist/components/Rating/components/RatingWithSingleValue/RatingWithSingleValue.d.ts +3 -3
  160. package/dist/components/Rating/components/RatingWithSingleValue/icons/0.d.ts +3 -3
  161. package/dist/components/Rating/components/RatingWithSingleValue/icons/1.d.ts +3 -3
  162. package/dist/components/Rating/components/RatingWithSingleValue/icons/2.d.ts +3 -3
  163. package/dist/components/Rating/components/RatingWithSingleValue/icons/3.d.ts +3 -3
  164. package/dist/components/Rating/components/RatingWithSingleValue/icons/4.d.ts +3 -3
  165. package/dist/components/Rating/components/RatingWithSingleValue/icons/index.d.ts +6 -6
  166. package/dist/components/Rating/components/RatingWithSingleValue/styles.d.ts +6 -6
  167. package/dist/components/Rating/components/RatingWithSingleValue/types.d.ts +10 -10
  168. package/dist/components/Rating/index.d.ts +4 -4
  169. package/dist/components/Rating/rating.test.d.ts +1 -1
  170. package/dist/components/Rating/types.d.ts +28 -28
  171. package/dist/components/Rating/utils/IconObjectsController.d.ts +9 -9
  172. package/dist/components/Rating/utils/svgDataTratamentFunction.d.ts +9 -9
  173. package/dist/components/SelectInput/components/InputWrapper/index.d.ts +10 -10
  174. package/dist/components/SelectInput/components/InputWrapper/index.js +1 -1
  175. package/dist/components/SelectInput/components/OptionsArea/OptionsArea.d.ts +18 -18
  176. package/dist/components/SelectInput/components/OptionsArea/index.d.ts +15 -15
  177. package/dist/components/SelectInput/components/SelectArea/ButtonsArea.d.ts +10 -10
  178. package/dist/components/SelectInput/components/SelectArea/Label.d.ts +6 -6
  179. package/dist/components/SelectInput/components/SelectArea/SelectAreaWrapper.d.ts +6 -6
  180. package/dist/components/SelectInput/components/SelectArea/SelectAreaWrapper.js +1 -1
  181. package/dist/components/SelectInput/components/SelectArea/SelectedOptionsArea.d.ts +14 -14
  182. package/dist/components/SelectInput/components/SelectArea/index.d.ts +15 -15
  183. package/dist/components/SelectInput/components/index.d.ts +3 -3
  184. package/dist/components/SelectInput/index.d.ts +5 -5
  185. package/dist/components/SelectInput/selectInput.test.d.ts +1 -1
  186. package/dist/components/SelectInput/types.d.ts +36 -36
  187. package/dist/components/Skeleton/index.d.ts +4 -4
  188. package/dist/components/Skeleton/skeleton.test.d.ts +1 -1
  189. package/dist/components/Skeleton/styles.d.ts +7 -7
  190. package/dist/components/Skeleton/types.d.ts +35 -35
  191. package/dist/components/Slider/components/SliderPointer.d.ts +3 -3
  192. package/dist/components/Slider/components/SliderRail.d.ts +3 -3
  193. package/dist/components/Slider/components/SliderSelector.d.ts +3 -3
  194. package/dist/components/Slider/hooks/useEventCallback.d.ts +2 -2
  195. package/dist/components/Slider/hooks/useValues.d.ts +1 -1
  196. package/dist/components/Slider/index.d.ts +4 -4
  197. package/dist/components/Slider/slider.test.d.ts +1 -1
  198. package/dist/components/Slider/styles.d.ts +65 -65
  199. package/dist/components/Slider/styles.d.ts.map +1 -1
  200. package/dist/components/Slider/types.d.ts +38 -38
  201. package/dist/components/Slider/types.d.ts.map +1 -1
  202. package/dist/components/Spinner/index.d.ts +4 -4
  203. package/dist/components/Spinner/spinner.test.d.ts +1 -1
  204. package/dist/components/Spinner/styles.d.ts +285 -285
  205. package/dist/components/Spinner/types.d.ts +11 -11
  206. package/dist/components/Steps/index.d.ts +4 -4
  207. package/dist/components/Steps/steps.test.d.ts +1 -1
  208. package/dist/components/Steps/styles.d.ts +34 -34
  209. package/dist/components/Steps/types.d.ts +6 -6
  210. package/dist/components/Switch/index.d.ts +4 -4
  211. package/dist/components/Switch/input.test.d.ts +1 -1
  212. package/dist/components/Switch/styles.d.ts +18 -18
  213. package/dist/components/Switch/types.d.ts +15 -15
  214. package/dist/components/Table/components/MenuItem.d.ts +3 -3
  215. package/dist/components/Table/index.d.ts +3 -3
  216. package/dist/components/Table/styles.d.ts +34 -34
  217. package/dist/components/Table/table.test.d.ts +1 -1
  218. package/dist/components/Table/types.d.ts +37 -37
  219. package/dist/components/Tabs/TabsExample.d.ts +3 -3
  220. package/dist/components/Tabs/components/Tab.d.ts +3 -3
  221. package/dist/components/Tabs/components/Tab.js +2 -2
  222. package/dist/components/Tabs/components/TabPanel.d.ts +3 -3
  223. package/dist/components/Tabs/components/Tabs.d.ts +4 -4
  224. package/dist/components/Tabs/components/Tabs.d.ts.map +1 -1
  225. package/dist/components/Tabs/components/Tabs.js +8 -6
  226. package/dist/components/Tabs/index.d.ts +3 -3
  227. package/dist/components/Tabs/styles.d.ts +39 -37
  228. package/dist/components/Tabs/styles.d.ts.map +1 -1
  229. package/dist/components/Tabs/styles.js +29 -21
  230. package/dist/components/Tabs/tabs.test.d.ts +1 -1
  231. package/dist/components/Tabs/types.d.ts +49 -48
  232. package/dist/components/Tabs/types.d.ts.map +1 -1
  233. package/dist/components/Tag/index.d.ts +4 -4
  234. package/dist/components/Tag/styles.d.ts +860 -860
  235. package/dist/components/Tag/tag.test.d.ts +1 -1
  236. package/dist/components/Tag/types.d.ts +9 -9
  237. package/dist/components/TextAreaInput/index.d.ts +4 -4
  238. package/dist/components/TextAreaInput/styles.d.ts +18 -18
  239. package/dist/components/TextAreaInput/text-area-input.test.d.ts +1 -1
  240. package/dist/components/TextAreaInput/types.d.ts +25 -25
  241. package/dist/components/Thumbnail/index.d.ts +3 -3
  242. package/dist/components/Thumbnail/styles.d.ts +42 -42
  243. package/dist/components/Thumbnail/thumbnail.test.d.ts +1 -1
  244. package/dist/components/Thumbnail/types.d.ts +28 -28
  245. package/dist/components/Thumbnail/utils/index.d.ts +2 -2
  246. package/dist/components/Thumbnail/utils/validate-file-size.d.ts +1 -1
  247. package/dist/components/Thumbnail/utils/validate-file-type.d.ts +1 -1
  248. package/dist/components/Timeline/components/Timeline.d.ts +3 -3
  249. package/dist/components/Timeline/components/TimelineContent.d.ts +3 -3
  250. package/dist/components/Timeline/components/TimelineItem.d.ts +2 -2
  251. package/dist/components/Timeline/components/TimelineSeparator.d.ts +3 -3
  252. package/dist/components/Timeline/index.d.ts +4 -4
  253. package/dist/components/Timeline/styles.d.ts +31 -31
  254. package/dist/components/Timeline/timeline.test.d.ts +1 -1
  255. package/dist/components/Timeline/types.d.ts +20 -20
  256. package/dist/components/Toast/button-example.d.ts +6 -6
  257. package/dist/components/Toast/components/Toast.d.ts +4 -4
  258. package/dist/components/Toast/contexts/ToastProvider.d.ts +5 -5
  259. package/dist/components/Toast/hooks/useToast.d.ts +2 -2
  260. package/dist/components/Toast/index.d.ts +3 -3
  261. package/dist/components/Toast/styles.d.ts +22 -22
  262. package/dist/components/Toast/toast.test.d.ts +1 -1
  263. package/dist/components/Toast/types.d.ts +33 -33
  264. package/dist/components/Tooltip/componenteTeste.d.ts +6 -6
  265. package/dist/components/Tooltip/index.d.ts +4 -4
  266. package/dist/components/Tooltip/styles.d.ts +273 -273
  267. package/dist/components/Tooltip/tooltip.test.d.ts +1 -1
  268. package/dist/components/Tooltip/types.d.ts +29 -29
  269. package/dist/components/Tooltip/util.d.ts +27 -27
  270. package/dist/components/Typography/index.d.ts +4 -4
  271. package/dist/components/Typography/styles.d.ts +20 -20
  272. package/dist/components/Typography/types.d.ts +15 -15
  273. package/dist/components/Typography/types.d.ts.map +1 -1
  274. package/dist/components/Typography/typography.test.d.ts +1 -1
  275. package/dist/index.d.ts +40 -39
  276. package/dist/index.d.ts.map +1 -1
  277. package/dist/index.js +18 -9
  278. package/dist/shared/components/FocusLock/index.d.ts +7 -7
  279. package/dist/shared/hooks/breakpoints.d.ts +8 -8
  280. package/dist/shared/hooks/useBreakpoint.d.ts +8 -8
  281. package/dist/shared/hooks/useKeyPress.d.ts +1 -1
  282. package/dist/shared/hooks/useOnClickOutside.d.ts +2 -2
  283. package/dist/shared/tests/test-utils.d.ts +4 -4
  284. package/dist/shared/theme/button-example.d.ts +2 -2
  285. package/dist/shared/theme/contexts/ThemeContext.d.ts +15 -15
  286. package/dist/shared/theme/hooks/useColorMode.d.ts +4 -4
  287. package/dist/shared/theme/hooks/useColorModeValue.d.ts +1 -1
  288. package/dist/shared/theme/hooks/useTheme.d.ts +281 -281
  289. package/dist/shared/theme/index.d.ts +7 -7
  290. package/dist/shared/theme/theme.d.ts +279 -279
  291. package/dist/shared/theme/theme.test.d.ts +1 -1
  292. package/dist/shared/theme/theme.types.d.ts +14 -14
  293. package/dist/shared/theme/utils/extendTheme.d.ts +2 -2
  294. package/dist/shared/theme/utils/localStorageController.d.ts +6 -6
  295. package/dist/utils/GenerateKey.d.ts +10 -10
  296. package/dist/utils/brightnessColorChange.d.ts +8 -8
  297. package/dist/utils/colorCheck.d.ts +40 -40
  298. package/dist/utils/colorFunctions.d.ts +2 -2
  299. package/dist/utils/colorToGray.d.ts +5 -5
  300. package/dist/utils/fuctionsColors.d.ts +2 -2
  301. package/dist/utils/generateUUID.d.ts +1 -1
  302. package/dist/utils/getColorValue.d.ts +297 -297
  303. package/dist/utils/getSvg.d.ts +10 -10
  304. package/dist/utils/invertColor.d.ts +7 -7
  305. package/package.json +18 -15
  306. package/dist/components/Menu/components/Submenu.d.ts +0 -5
  307. package/dist/components/Menu/components/Submenu.d.ts.map +0 -1
  308. package/dist/components/Menu/components/Submenu.js +0 -96
  309. package/dist/components/Menu/index.d.ts +0 -5
  310. package/dist/components/Menu/index.d.ts.map +0 -1
  311. package/dist/components/Menu/index.js +0 -43
  312. package/dist/components/Menu/menu.test.d.ts +0 -2
  313. package/dist/components/Menu/menu.test.d.ts.map +0 -1
  314. package/dist/components/Menu/menu.test.js +0 -188
  315. package/dist/components/Menu/styles.d.ts +0 -31
  316. package/dist/components/Menu/styles.d.ts.map +0 -1
  317. package/dist/components/Menu/styles.js +0 -119
  318. package/dist/components/Menu/types.d.ts +0 -25
  319. package/dist/components/Menu/types.d.ts.map +0 -1
  320. package/dist/components/Menu/types.js +0 -1
@@ -9,15 +9,15 @@ var _Icon = _interopRequireDefault(require("../Icon"));
9
9
 
10
10
  var _index = require("../../shared/theme/index");
11
11
 
12
- var _fuctionsColors = require("../../utils/fuctionsColors");
12
+ var _getColorValue = require("../../utils/getColorValue");
13
13
 
14
14
  var _styles = require("./styles");
15
15
 
16
- var _getColorValue = require("../../utils/getColorValue");
16
+ var _Skeleton = _interopRequireDefault(require("../Skeleton"));
17
17
 
18
18
  var _jsxRuntime = require("react/jsx-runtime");
19
19
 
20
- var _excluded = ["children", "disabled", "icon", "isLoading", "onClick", "text", "variant", "color", "size", "hoverSolid", "focusSolid", "disabledColor", "iconPosition", "fullWidth", "colorText"];
20
+ var _excluded = ["children", "leftIcon", "rightIcon", "isLoading", "variant", "bgColor", "size", "fullWidth", "textColor"];
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
@@ -33,86 +33,73 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
33
33
 
34
34
  var Button = function Button(_ref) {
35
35
  var children = _ref.children,
36
- disabled = _ref.disabled,
37
- icon = _ref.icon,
36
+ leftIcon = _ref.leftIcon,
37
+ rightIcon = _ref.rightIcon,
38
38
  isLoading = _ref.isLoading,
39
- onClick = _ref.onClick,
40
- text = _ref.text,
41
- variant = _ref.variant,
42
- color = _ref.color,
39
+ _ref$variant = _ref.variant,
40
+ variant = _ref$variant === void 0 ? 'solid' : _ref$variant,
41
+ _ref$bgColor = _ref.bgColor,
42
+ bgColor = _ref$bgColor === void 0 ? '' : _ref$bgColor,
43
43
  _ref$size = _ref.size,
44
44
  size = _ref$size === void 0 ? 'md' : _ref$size,
45
- hoverSolid = _ref.hoverSolid,
46
- focusSolid = _ref.focusSolid,
47
- disabledColor = _ref.disabledColor,
48
- iconPosition = _ref.iconPosition,
49
45
  fullWidth = _ref.fullWidth,
50
- colorText = _ref.colorText,
51
- rest = _objectWithoutProperties(_ref, _excluded);
46
+ _ref$textColor = _ref.textColor,
47
+ textColor = _ref$textColor === void 0 ? '' : _ref$textColor,
48
+ props = _objectWithoutProperties(_ref, _excluded);
52
49
 
53
50
  var _useTheme = (0, _index.useTheme)(),
54
51
  theme = _useTheme.theme;
55
52
 
56
- if (variant == null) {
57
- variant = 'solid';
58
- }
53
+ var parsedBgColor = (0, _getColorValue.getColorValue)(bgColor, theme, 'success.default');
54
+ var parsedTextColor = (0, _getColorValue.getColorValue)(textColor, theme, 'text.default');
59
55
 
60
- var colorr = (0, _getColorValue.getColorValue)(colorText || '', theme, 'success.default');
56
+ var getThemeHex = function getThemeHex(path, obj) {
57
+ var separator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';
58
+ var properties = path.split(separator);
59
+ return properties.reduce(function (prev, curr) {
60
+ return prev && prev[curr];
61
+ }, obj);
62
+ };
61
63
 
62
- if (!color) {
63
- color = colorr;
64
+ if (parsedBgColor.includes('.')) {
65
+ parsedBgColor = getThemeHex(parsedBgColor, theme);
64
66
  }
65
67
 
66
- disabledColor = color + 76;
67
- var newHover = (0, _fuctionsColors.hoverFunction)(color);
68
- var newFocus = (0, _fuctionsColors.focusFunction)(color);
69
- var sharedProps = {
70
- fullWidth: fullWidth,
71
- disabledColor: disabledColor,
72
- color: color,
73
- isLoading: isLoading,
74
- text: text,
75
- variant: variant,
76
- size: size,
77
- iconPosition: iconPosition
78
- };
79
-
80
- if (icon === undefined) {
81
- icon = 'message-square';
68
+ if (parsedTextColor.includes('.')) {
69
+ parsedTextColor = getThemeHex(parsedTextColor, theme);
82
70
  }
83
71
 
84
72
  if (isLoading) {
85
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.LoadingButton, {
86
- variant: variant,
87
- size: size,
88
- fullWidth: fullWidth
73
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Skeleton.default, {
74
+ width: 200,
75
+ height: 52,
76
+ "data-testid": "skeleton"
89
77
  });
90
78
  }
91
79
 
92
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Buttons, _objectSpread(_objectSpread(_objectSpread({}, sharedProps), {}, {
93
- hoverSolid: newHover,
94
- colorText: colorr,
95
- focusSolid: newFocus,
96
- onClick: onClick,
97
- disabled: disabled
98
- }, rest), {}, {
99
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.DivIcon, _objectSpread(_objectSpread({
100
- disabled: disabled,
101
- hoverSolid: newHover,
102
- focusSolid: newFocus
103
- }, sharedProps), {}, {
104
- children: [iconPosition === 'left' && !isLoading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
105
- name: icon
106
- }), children, text, /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.SpanIcon, _objectSpread(_objectSpread({
107
- disabled: disabled,
108
- hoverSolid: newHover,
109
- focusSolid: newFocus
110
- }, sharedProps), {}, {
111
- children: iconPosition === 'right' && !isLoading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
112
- name: icon
80
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Buttons, _objectSpread(_objectSpread({
81
+ button: {
82
+ bgColor: parsedBgColor,
83
+ textColor: parsedTextColor,
84
+ fullWidth: fullWidth,
85
+ isLoading: isLoading,
86
+ variant: variant,
87
+ size: size
88
+ }
89
+ }, props), {}, {
90
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.IconContainer, {
91
+ children: [leftIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.IconWrapper, {
92
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
93
+ name: leftIcon,
94
+ "data-testid": "leftIconId"
95
+ })
96
+ }), children, !leftIcon && rightIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.IconWrapper, {
97
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
98
+ name: rightIcon,
99
+ "data-testid": "rightIconId"
113
100
  })
114
- }))]
115
- }))
101
+ })]
102
+ })
116
103
  }));
117
104
  };
118
105
 
@@ -1,23 +1,15 @@
1
- /// <reference types="react" />
2
- import { IButtonProps, GenericInputProps, GenericThemeProps } from './types';
3
- declare type StyledIconProps = {
4
- colorText?: string;
5
- };
6
- export declare const Buttons: import("@emotion/styled").StyledComponent<{
7
- theme?: import("@emotion/react").Theme | undefined;
8
- as?: import("react").ElementType<any> | undefined;
9
- } & GenericInputProps & IButtonProps & StyledIconProps, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
10
- export declare const SpanIcon: import("@emotion/styled").StyledComponent<{
11
- theme?: import("@emotion/react").Theme | undefined;
12
- as?: import("react").ElementType<any> | undefined;
13
- } & IButtonProps & GenericInputProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
14
- export declare const DivIcon: import("@emotion/styled").StyledComponent<{
15
- theme?: import("@emotion/react").Theme | undefined;
16
- as?: import("react").ElementType<any> | undefined;
17
- } & IButtonProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
18
- export declare const LoadingButton: import("@emotion/styled").StyledComponent<{
19
- theme?: import("@emotion/react").Theme | undefined;
20
- as?: import("react").ElementType<any> | undefined;
21
- } & GenericThemeProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
22
- export {};
1
+ /// <reference types="react" />
2
+ import { StyledMapping } from './types';
3
+ export declare const Buttons: import("@emotion/styled").StyledComponent<{
4
+ theme?: import("@emotion/react").Theme | undefined;
5
+ as?: import("react").ElementType<any> | undefined;
6
+ } & StyledMapping, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
7
+ export declare const IconContainer: import("@emotion/styled").StyledComponent<{
8
+ theme?: import("@emotion/react").Theme | undefined;
9
+ as?: import("react").ElementType<any> | undefined;
10
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
11
+ export declare const IconWrapper: import("@emotion/styled").StyledComponent<{
12
+ theme?: import("@emotion/react").Theme | undefined;
13
+ as?: import("react").ElementType<any> | undefined;
14
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
23
15
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Button/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE7E,aAAK,eAAe,GAAG;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,OAAO;;;0KA4FnB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;8IAAkD,CAAC;AACxE,eAAO,MAAM,OAAO;;;wHAQnB,CAAC;AAEF,eAAO,MAAM,aAAa;;;6HAiDzB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Button/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGxC,eAAO,MAAM,OAAO;;;qIA4HnB,CAAC;AAEF,eAAO,MAAM,aAAa;;;yGAIzB,CAAC;AAEF,eAAO,MAAM,WAAW;;;yGAIvB,CAAC"}
@@ -3,44 +3,122 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.SpanIcon = exports.LoadingButton = exports.DivIcon = exports.Buttons = void 0;
6
+ exports.IconWrapper = exports.IconContainer = exports.Buttons = void 0;
7
7
 
8
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
9
9
 
10
10
  var _react = require("@emotion/react");
11
11
 
12
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
12
+ var _invertColor = require("src/utils/invertColor");
13
+
14
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
13
15
 
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
17
 
18
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
19
+
16
20
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
17
21
 
18
- var Buttons = _styled.default.button(function (props) {
19
- return (0, _react.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-family: Poppins;\n font-style: normal;\n font-weight: 600;\n font-size: 16px;\n line-height: 150%;\n border-radius: 8px;\n border: 0px;\n cursor: pointer;\n //width: 102px;\n height: ", ";\n padding-left: 24px;\n padding-right: 24px;\n color: white;\n background-color: ", ";\n ", "\n ", "\n\n ", "\n\n\n ", "\n ", "\n "])), props.theme.buttonSize[props.size || 'sm'], props.color || props.colorText, props.fullWidth === true && (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", ";\n "])), props.fullWidth ? '100%' : props.theme.buttonSize[props.size || 'sm']), props.variant === 'solid' && (0, _react.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &:hover {\n background-color: ", ";\n }\n\n &:focus {\n background-color: ", ";\n }\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n "])), props.hoverSolid, props.focusSolid, props.disabledColor), props.variant === 'outline' && (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: transparent;\n color: ", ";\n border: 3px ", " solid;\n\n &:hover {\n background-color: ", ";\n }\n &:focus {\n background-color: ", ";\n }\n &:disabled {\n background-color: transparent;\n cursor: not-allowed;\n border: 3px ", " solid;\n color: ", ";\n }\n "])), props.color, props.color, props.color + 33, props.color + 51, props.disabledColor, props.disabledColor), props.variant === 'ghost' && (0, _react.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background-color: transparent;\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n &:focus {\n color: ", ";\n }\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n "])), props.color, props.hoverSolid, props.focusSolid, props.disabledColor), props.variant === 'link' && (0, _react.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n text-decoration: underline;\n background-color: transparent;\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n &:focus {\n color: ", ";\n }\n &:disabled {\n color: ", ";\n cursor: not-allowed;\n }\n "])), props.color, props.hoverSolid, props.focusSolid, props.disabledColor));
20
- });
22
+ var Buttons = _styled.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-family: Poppins;\n font-style: normal;\n font-weight: ", ";\n font-size: ", ";\n border-radius: 8px;\n border: 0px;\n cursor: pointer;\n padding-left: 24px;\n padding-right: 24px;\n\n color: ", ";\n\n background-color: ", ";\n\n height: ", ";\n\n width: ", ";\n\n &:hover {\n filter: brightness(0.8);\n }\n\n &:focus {\n filter: brightness(0.8);\n }\n\n &:disabled {\n filter: opacity(0.5);\n cursor: not-allowed;\n }\n\n ", "\n\n @media screen and (min-width: ", ") {\n width: ", ";\n }\n\n @media screen and (min-width: ", ") {\n width: ", ";\n }\n\n @media screen and (min-width: ", ") {\n width: ", ";\n }\n\n @media screen and (min-width: ", ") {\n width: ", ";\n }\n"])), function (_ref) {
23
+ var theme = _ref.theme;
24
+ return theme.fontWeight.normal;
25
+ }, function (_ref2) {
26
+ var theme = _ref2.theme;
27
+ return theme.fontSizes.md;
28
+ }, function (_ref3) {
29
+ var _button$textColor;
21
30
 
22
- exports.Buttons = Buttons;
31
+ var button = _ref3.button,
32
+ theme = _ref3.theme;
33
+ var baseColor = (0, _invertColor.invertColor)(button.textColor || button.bgColor || theme.colors.primary.default, true);
34
+ return (_button$textColor = button.textColor) !== null && _button$textColor !== void 0 ? _button$textColor : baseColor;
35
+ }, function (_ref4) {
36
+ var _button$bgColor;
37
+
38
+ var button = _ref4.button,
39
+ theme = _ref4.theme;
40
+ return (_button$bgColor = button.bgColor) !== null && _button$bgColor !== void 0 ? _button$bgColor : theme.colors.primary.default;
41
+ }, function (_ref5) {
42
+ var button = _ref5.button,
43
+ theme = _ref5.theme;
44
+ if (button.size) return theme.buttonSize[button.size];
45
+ return theme.buttonSize.md;
46
+ }, function (_ref6) {
47
+ var button = _ref6.button;
48
+
49
+ if (button.fullWidth) {
50
+ if (_typeof(button.fullWidth) === 'object' && button.fullWidth !== undefined) {
51
+ return button.fullWidth.base && '100%';
52
+ }
53
+
54
+ return '100%';
55
+ }
56
+ }, function (_ref7) {
57
+ var button = _ref7.button,
58
+ theme = _ref7.theme;
23
59
 
24
- var SpanIcon = _styled.default.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral([""])));
60
+ switch (button.variant) {
61
+ case 'outline':
62
+ return (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: transparent;\n color: ", ";\n border: 3px ", " solid;\n "])), button.bgColor || button.textColor || theme.colors.primary.default, button.bgColor || button.textColor || theme.colors.primary.default);
25
63
 
26
- exports.SpanIcon = SpanIcon;
64
+ case 'ghost':
65
+ return (0, _react.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: transparent;\n color: ", ";\n "])), button.bgColor || button.textColor || theme.colors.primary.default);
27
66
 
28
- var DivIcon = _styled.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n gap: 5px;\n\n align-items: center;\n text-align: center;\n align-content: center;\n justify-content: center;\n"])));
67
+ case 'link':
68
+ return (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n text-decoration: underline;\n background-color: transparent;\n color: ", ";\n "])), button.bgColor || button.textColor || theme.colors.primary.default);
69
+ }
70
+ }, function (_ref8) {
71
+ var theme = _ref8.theme;
72
+ return theme.breakpoints.sm;
73
+ }, function (_ref9) {
74
+ var button = _ref9.button;
29
75
 
30
- exports.DivIcon = DivIcon;
76
+ if (_typeof(button.fullWidth) === 'object') {
77
+ var widthWasNotSet = button.fullWidth.sm === undefined;
78
+ if (widthWasNotSet) return;
79
+ return button.fullWidth.sm ? '100%' : 'fit-content';
80
+ }
81
+ }, function (_ref10) {
82
+ var theme = _ref10.theme;
83
+ return theme.breakpoints.md;
84
+ }, function (_ref11) {
85
+ var button = _ref11.button;
31
86
 
32
- var LoadingButton = _styled.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n border-radius: 8px;\n background-color: ", ";\n overflow: hidden;\n height: ", ";\n\n ", "\n\n &::after {\n content: '';\n inset: 0px;\n width: 100%;\n height: 100%;\n display: block;\n animation: 1.6s linear 0.5s infinite normal none running move;\n transform: translateX(-100%);\n background: linear-gradient(\n 90deg,\n transparent,\n ", ",\n transparent\n );\n }\n\n @keyframes move {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(100%);\n }\n }\n\n ", "\n ", "\n"])), function (props) {
33
- return props.theme.colors.neutral.neutral1;
34
- }, function (props) {
35
- return props.theme.buttonSize[props.size || 'sm'];
36
- }, function (props) {
37
- return props.fullWidth === true && (0, _react.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n width: ", ";\n "])), props.fullWidth ? '100%' : props.theme.buttonSize[props.size || 'sm']);
38
- }, function (props) {
39
- return props.theme.colors.neutral.neutral2;
40
- }, function (props) {
41
- return props.variant === 'ghost' && (0, _react.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n width: 102px;\n height: 24px;\n "])));
42
- }, function (props) {
43
- return props.variant === 'link' && (0, _react.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n width: 102px;\n height: 24px;\n "])));
87
+ if (_typeof(button.fullWidth) === 'object') {
88
+ var widthWasNotSet = button.fullWidth.md === undefined;
89
+ if (widthWasNotSet) return;
90
+ return button.fullWidth.md ? '100%' : 'fit-content';
91
+ }
92
+ }, function (_ref12) {
93
+ var theme = _ref12.theme;
94
+ return theme.breakpoints.lg;
95
+ }, function (_ref13) {
96
+ var button = _ref13.button;
97
+
98
+ if (_typeof(button.fullWidth) === 'object') {
99
+ var widthWasNotSet = button.fullWidth.lg === undefined;
100
+ if (widthWasNotSet) return;
101
+ return button.fullWidth.lg ? '100%' : 'fit-content';
102
+ }
103
+ }, function (_ref14) {
104
+ var theme = _ref14.theme;
105
+ return theme.breakpoints.xl;
106
+ }, function (_ref15) {
107
+ var button = _ref15.button;
108
+
109
+ if (_typeof(button.fullWidth) === 'object') {
110
+ var widthWasNotSet = button.fullWidth.xl === undefined;
111
+ if (widthWasNotSet) return;
112
+ return button.fullWidth.xl ? '100%' : 'fit-content';
113
+ }
44
114
  });
45
115
 
46
- exports.LoadingButton = LoadingButton;
116
+ exports.Buttons = Buttons;
117
+
118
+ var IconContainer = _styled.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n gap: 5px;\n"])));
119
+
120
+ exports.IconContainer = IconContainer;
121
+
122
+ var IconWrapper = _styled.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n"])));
123
+
124
+ exports.IconWrapper = IconWrapper;
@@ -1,32 +1,104 @@
1
- import { HTMLProps } from 'react';
2
- import { ExtendThemeProps } from '../../shared/theme/index';
3
- import { IconName } from '../Icon/types';
4
- import { GlobalColorsProps } from '../../shared/theme';
5
- export declare type GenericInputProps = {
6
- theme?: ExtendThemeProps;
7
- };
8
- export interface IButtonProps {
9
- disabled?: boolean;
10
- icon?: IconName;
11
- isLoading?: boolean;
12
- size?: 'sm' | 'md' | 'xl';
13
- variant: 'outline' | 'solid' | 'ghost' | 'link';
14
- color: string;
15
- hoverSolid?: string;
16
- focusSolid?: string;
17
- disabledColor?: string;
18
- iconPosition?: 'left' | 'right';
19
- shadesColor?: string;
20
- fullWidth?: boolean;
21
- colorText?: string | GlobalColorsProps;
22
- text: string;
23
- buttonProps?: HTMLProps<HTMLButtonElement>;
24
- }
25
- export declare type GenericThemeProps = {
26
- theme?: ExtendThemeProps;
27
- indicatorColor?: GlobalColorsProps | (string & {});
28
- fullWidth?: boolean;
29
- size: 'sm' | 'md' | 'xl';
30
- variant: 'link' | 'outline' | 'solid' | 'ghost';
31
- };
1
+ import { IconName } from '../Icon/types';
2
+ import { GlobalColorsProps } from '../../shared/theme';
3
+ declare type buttonVariant = 'outline' | 'solid' | 'ghost' | 'link';
4
+ declare type buttonColor = GlobalColorsProps | (string & {});
5
+ declare type responsivePattern<T = any> = {
6
+ base?: T;
7
+ sm?: T;
8
+ md?: T;
9
+ lg?: T;
10
+ xl?: T;
11
+ xxl?: T;
12
+ };
13
+ declare type sizeOptions = 'sm' | 'md' | 'xl';
14
+ export interface IButtonProps {
15
+ /**
16
+ * The button's properties change making it not clickable and changing it's color.
17
+ *
18
+ * @default 'solid'
19
+ * @example 'solid' | 'outline' | 'ghost' | 'link'
20
+ * @type buttonVariant
21
+ * @memberof IButtonProps
22
+ */
23
+ disabled?: boolean;
24
+ /**
25
+ * The icon to be displayed on the left side of the button.
26
+ * This property takes priority when rightIcon is passed too.
27
+ *
28
+ * @default ''
29
+ * @type IconName
30
+ * @memberof IButtonProps
31
+ */
32
+ leftIcon?: IconName;
33
+ /**
34
+ * The icon to be displayed on the right side of the button.
35
+ * This property has no priority and will **not** be rendered
36
+ * when leftIcon is passed.
37
+ *
38
+ * @default ''
39
+ * @type IconName
40
+ * @memberof IButtonProps
41
+ */
42
+ rightIcon?: IconName;
43
+ /**
44
+ * The button rendered changes to a LoadingButton component
45
+ *
46
+ * @default false
47
+ * @type boolean
48
+ * @memberof IButtonProps
49
+ * @example true
50
+ */
51
+ isLoading?: boolean;
52
+ /**
53
+ * The button height changes based on the string passed to this prop
54
+ *
55
+ * @default 'md'
56
+ * @type sizeOptions
57
+ * @memberof IButtonProps
58
+ * @example 'sm' | 'md' | 'xl'
59
+ */
60
+ size?: sizeOptions;
61
+ /**
62
+ * The button's type, it can be ghost, solid, outline or link.
63
+ *
64
+ * @default 'solid'
65
+ * @example 'solid' | 'outline' | 'ghost' | 'link'
66
+ * @type buttonVariant
67
+ * @memberof IButtonProps
68
+ */
69
+ variant?: buttonVariant;
70
+ /**
71
+ * The button's color, should be passed as a string.
72
+ *
73
+ * @default 'primary'
74
+ * @example 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark'
75
+ * @type buttonColor
76
+ * @memberof IButtonProps
77
+ */
78
+ bgColor?: buttonColor;
79
+ /**
80
+ * Property that makes the button take 100% of the width of the parent component.
81
+ *
82
+ * @default false
83
+ * @example true
84
+ * @example { base: true, sm: false', md: false }
85
+ * @example { base: 'md', md: 'xl' }
86
+ * @type boolean | responsivePattern<boolean>
87
+ * @memberof IButtonProps
88
+ */
89
+ fullWidth?: boolean | responsivePattern<boolean>;
90
+ /**
91
+ * The color text of the button.
92
+ *
93
+ * @default 'white'
94
+ * @example 'white' | 'black'
95
+ * @type string
96
+ * @memberof IButtonProps
97
+ */
98
+ textColor?: buttonColor;
99
+ }
100
+ export declare type StyledMapping = {
101
+ button: IButtonProps;
102
+ };
103
+ export {};
32
104
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,oBAAY,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AACF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;CAC5C;AAED,oBAAY,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,cAAc,CAAC,EAAE,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;CACjD,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,aAAK,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAC5D,aAAK,WAAW,GAAG,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AACrD,aAAK,iBAAiB,CAAC,CAAC,GAAG,GAAG,IAAI;IAChC,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,EAAE,CAAC,EAAE,CAAC,CAAC;IACP,EAAE,CAAC,EAAE,CAAC,CAAC;IACP,EAAE,CAAC,EAAE,CAAC,CAAC;IACP,EAAE,CAAC,EAAE,CAAC,CAAC;IACP,GAAG,CAAC,EAAE,CAAC,CAAC;CACT,CAAC;AACF,aAAK,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtC,MAAM,WAAW,YAAY;IAC3B;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC;IAErB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAEjD;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;CACzB;AAED,oBAAY,aAAa,GAAG;IAC1B,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC"}
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- import { Buttons } from '../types';
3
- export declare function ButtonCardArea({ btSecondary, btPrimary, btColumn }: Buttons): JSX.Element;
1
+ /// <reference types="react" />
2
+ import { Buttons } from '../types';
3
+ export declare function ButtonCardArea({ btSecondary, btPrimary, btColumn }: Buttons): JSX.Element;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,14 +1,14 @@
1
- /// <reference types="react" />
2
- import { ThemeProps } from 'src';
3
- export declare const ButtonArea: import("@emotion/styled").StyledComponent<{
4
- theme?: import("@emotion/react").Theme | undefined;
5
- as?: import("react").ElementType<any> | undefined;
6
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
- export declare const MultipleButton: import("@emotion/styled").StyledComponent<{
8
- theme?: import("@emotion/react").Theme | undefined;
9
- as?: import("react").ElementType<any> | undefined;
10
- } & {
11
- theme?: ThemeProps | undefined;
12
- btColumn?: boolean | undefined;
13
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
1
+ /// <reference types="react" />
2
+ import { ThemeProps } from 'src';
3
+ export declare const ButtonArea: import("@emotion/styled").StyledComponent<{
4
+ theme?: import("@emotion/react").Theme | undefined;
5
+ as?: import("react").ElementType<any> | undefined;
6
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
+ export declare const MultipleButton: import("@emotion/styled").StyledComponent<{
8
+ theme?: import("@emotion/react").Theme | undefined;
9
+ as?: import("react").ElementType<any> | undefined;
10
+ } & {
11
+ theme?: ThemeProps | undefined;
12
+ btColumn?: boolean | undefined;
13
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
14
14
  //# sourceMappingURL=styles.d.ts.map
@@ -1,6 +1,6 @@
1
- import react from 'react';
2
- export declare function Expansion({ children, expandedHeight, }: {
3
- children?: react.ReactChild;
4
- expandedHeight?: string;
5
- }): JSX.Element;
1
+ import react from 'react';
2
+ export declare function Expansion({ children, expandedHeight, }: {
3
+ children?: react.ReactChild;
4
+ expandedHeight?: string;
5
+ }): JSX.Element;
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1,15 +1,15 @@
1
- /// <reference types="react" />
2
- export declare const ExpandBody: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
5
- } & {
6
- expanded: boolean;
7
- expandedHeight?: string | undefined;
8
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
- export declare const ExpandIcon: import("@emotion/styled").StyledComponent<{
10
- theme?: import("@emotion/react").Theme | undefined;
11
- as?: import("react").ElementType<any> | undefined;
12
- } & {
13
- expanded: boolean;
14
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
1
+ /// <reference types="react" />
2
+ export declare const ExpandBody: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ } & {
6
+ expanded: boolean;
7
+ expandedHeight?: string | undefined;
8
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
+ export declare const ExpandIcon: import("@emotion/styled").StyledComponent<{
10
+ theme?: import("@emotion/react").Theme | undefined;
11
+ as?: import("react").ElementType<any> | undefined;
12
+ } & {
13
+ expanded: boolean;
14
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
15
15
  //# sourceMappingURL=style.d.ts.map
@@ -1,2 +1,2 @@
1
- import '@testing-library/jest-dom';
1
+ import '@testing-library/jest-dom';
2
2
  //# sourceMappingURL=card.test.d.ts.map
@@ -107,8 +107,7 @@ describe('Card', function () {
107
107
  it('Should render a card with one button', function () {
108
108
  var _setup11 = setup({
109
109
  btPrimary: {
110
- text: 'read more',
111
- color: 'blue',
110
+ bgColor: 'blue',
112
111
  variant: 'outline'
113
112
  }
114
113
  }),
@@ -119,13 +118,11 @@ describe('Card', function () {
119
118
  it('Should render a card with two buttons', function () {
120
119
  var _setup12 = setup({
121
120
  btPrimary: {
122
- text: 'read more',
123
- color: 'blue',
121
+ bgColor: 'blue',
124
122
  variant: 'outline'
125
123
  },
126
124
  btSecondary: {
127
- text: 'read more',
128
- color: 'blue',
125
+ bgColor: 'blue',
129
126
  variant: 'outline'
130
127
  }
131
128
  }),
@@ -137,13 +134,11 @@ describe('Card', function () {
137
134
  var _setup13 = setup({
138
135
  btColumn: true,
139
136
  btPrimary: {
140
- text: 'read more',
141
- color: 'blue',
137
+ bgColor: 'blue',
142
138
  variant: 'outline'
143
139
  },
144
140
  btSecondary: {
145
- text: 'read more',
146
- color: 'blue',
141
+ bgColor: 'blue',
147
142
  variant: 'outline'
148
143
  }
149
144
  }),