@newtonschool/grauity 0.0.14 → 0.1.11

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 (392) hide show
  1. package/README.md +145 -9
  2. package/dist/fonts/grauity-icons.eot +0 -0
  3. package/dist/fonts/grauity-icons.ttf +0 -0
  4. package/dist/fonts/grauity-icons.woff +0 -0
  5. package/dist/fonts/grauity-icons.woff2 +0 -0
  6. package/dist/hooks/index.d.ts +4 -0
  7. package/dist/hooks/index.d.ts.map +1 -0
  8. package/dist/hooks/useClickAway.d.ts +15 -0
  9. package/dist/hooks/useClickAway.d.ts.map +1 -0
  10. package/dist/hooks/useDisableBodyScroll.d.ts +7 -0
  11. package/dist/hooks/useDisableBodyScroll.d.ts.map +1 -0
  12. package/dist/hooks/useKeyboardEvent.d.ts +17 -0
  13. package/dist/hooks/useKeyboardEvent.d.ts.map +1 -0
  14. package/dist/index.d.ts +1109 -39
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/main.cjs +1 -1
  17. package/dist/main.cjs.map +1 -1
  18. package/dist/main.css +10 -1
  19. package/dist/main.css.map +1 -1
  20. package/dist/module.css +10 -1
  21. package/dist/module.css.map +1 -1
  22. package/dist/module.mjs +1 -1
  23. package/dist/module.mjs.map +1 -1
  24. package/dist/stories/atoms/Colors/FoundationColors.stories.d.ts +7 -0
  25. package/dist/stories/atoms/Colors/FoundationColors.stories.d.ts.map +1 -0
  26. package/dist/stories/atoms/Colors/index.stories.d.ts +18 -0
  27. package/dist/stories/atoms/Colors/index.stories.d.ts.map +1 -0
  28. package/dist/stories/atoms/CornerRadius/index.stories.d.ts +7 -0
  29. package/dist/stories/atoms/CornerRadius/index.stories.d.ts.map +1 -0
  30. package/dist/stories/atoms/Spacing/index.stories.d.ts +7 -0
  31. package/dist/stories/atoms/Spacing/index.stories.d.ts.map +1 -0
  32. package/dist/stories/decorators/withEnableBodyScroll.d.ts +8 -0
  33. package/dist/stories/decorators/withEnableBodyScroll.d.ts.map +1 -0
  34. package/dist/stories/decorators/withInlineContainer.d.ts +15 -0
  35. package/dist/stories/decorators/withInlineContainer.d.ts.map +1 -0
  36. package/dist/stories/elements/Alert/Gallery.stories.d.ts +30 -0
  37. package/dist/stories/elements/Alert/Gallery.stories.d.ts.map +1 -0
  38. package/dist/stories/elements/Alert/index.stories.d.ts +30 -0
  39. package/dist/stories/elements/Alert/index.stories.d.ts.map +1 -0
  40. package/dist/stories/elements/AlertBanner/Gallery.stories.d.ts +33 -0
  41. package/dist/stories/elements/AlertBanner/Gallery.stories.d.ts.map +1 -0
  42. package/dist/stories/elements/AlertBanner/index.stories.d.ts +30 -0
  43. package/dist/stories/elements/AlertBanner/index.stories.d.ts.map +1 -0
  44. package/dist/stories/elements/Button/Gallery.stories.d.ts +10 -0
  45. package/dist/stories/elements/Button/Gallery.stories.d.ts.map +1 -0
  46. package/dist/stories/elements/Button/index.stories.d.ts +9 -0
  47. package/dist/stories/elements/Button/index.stories.d.ts.map +1 -0
  48. package/dist/stories/elements/Icon/index.stories.d.ts +14 -0
  49. package/dist/stories/elements/Icon/index.stories.d.ts.map +1 -0
  50. package/dist/stories/elements/IconButton/Gallery.stories.d.ts +10 -0
  51. package/dist/stories/elements/IconButton/Gallery.stories.d.ts.map +1 -0
  52. package/dist/stories/elements/IconButton/index.stories.d.ts +9 -0
  53. package/dist/stories/elements/IconButton/index.stories.d.ts.map +1 -0
  54. package/dist/stories/elements/Modal/ConfirmationDialog.source.d.ts +3 -0
  55. package/dist/stories/elements/Modal/ConfirmationDialog.source.d.ts.map +1 -0
  56. package/dist/stories/elements/Modal/ConfirmationDialog.stories.d.ts +43 -0
  57. package/dist/stories/elements/Modal/ConfirmationDialog.stories.d.ts.map +1 -0
  58. package/dist/stories/elements/Modal/ConfirmationDialogWithTrigger.stories.d.ts +42 -0
  59. package/dist/stories/elements/Modal/ConfirmationDialogWithTrigger.stories.d.ts.map +1 -0
  60. package/dist/stories/elements/Modal/MultiStepModal.stories.d.ts +46 -0
  61. package/dist/stories/elements/Modal/MultiStepModal.stories.d.ts.map +1 -0
  62. package/dist/stories/elements/Modal/index.stories.d.ts +32 -0
  63. package/dist/stories/elements/Modal/index.stories.d.ts.map +1 -0
  64. package/dist/stories/elements/Modal/multiStepArgs.d.ts +4 -0
  65. package/dist/stories/elements/Modal/multiStepArgs.d.ts.map +1 -0
  66. package/dist/stories/elements/Modal/singleStepArgs.d.ts +4 -0
  67. package/dist/stories/elements/Modal/singleStepArgs.d.ts.map +1 -0
  68. package/dist/stories/elements/MultiSelectDropdown/index.stories.d.ts +11 -0
  69. package/dist/stories/elements/MultiSelectDropdown/index.stories.d.ts.map +1 -0
  70. package/dist/stories/elements/SelectDropdown/index.stories.d.ts +11 -0
  71. package/dist/stories/elements/SelectDropdown/index.stories.d.ts.map +1 -0
  72. package/dist/stories/elements/Table/Manual.source.d.ts +3 -0
  73. package/dist/stories/elements/Table/Manual.source.d.ts.map +1 -0
  74. package/dist/stories/elements/Table/Manual.stories.d.ts +54 -0
  75. package/dist/stories/elements/Table/Manual.stories.d.ts.map +1 -0
  76. package/dist/stories/elements/Table/ManualColumnNesting.source.d.ts +3 -0
  77. package/dist/stories/elements/Table/ManualColumnNesting.source.d.ts.map +1 -0
  78. package/dist/stories/elements/Table/ManualColumnNesting.stories.d.ts +53 -0
  79. package/dist/stories/elements/Table/ManualColumnNesting.stories.d.ts.map +1 -0
  80. package/dist/stories/elements/Table/index.stories.d.ts +46 -0
  81. package/dist/stories/elements/Table/index.stories.d.ts.map +1 -0
  82. package/dist/stories/elements/Table/simpleArgs.d.ts +4 -0
  83. package/dist/stories/elements/Table/simpleArgs.d.ts.map +1 -0
  84. package/dist/stories/elements/Typography/TypographyGallery.stories.d.ts +29 -0
  85. package/dist/stories/elements/Typography/TypographyGallery.stories.d.ts.map +1 -0
  86. package/dist/stories/elements/Typography/index.stories.d.ts +28 -0
  87. package/dist/stories/elements/Typography/index.stories.d.ts.map +1 -0
  88. package/dist/stories/helper-components/ColorRenderer/index.d.ts +15 -0
  89. package/dist/stories/helper-components/ColorRenderer/index.d.ts.map +1 -0
  90. package/dist/stories/helper-components/DocPageWithPlayground.d.ts +12 -0
  91. package/dist/stories/helper-components/DocPageWithPlayground.d.ts.map +1 -0
  92. package/dist/stories/helper-components/TokenBlock/index.d.ts +21 -0
  93. package/dist/stories/helper-components/TokenBlock/index.d.ts.map +1 -0
  94. package/dist/stories/helper-components/TokenBlock/index.styles.d.ts +4 -0
  95. package/dist/stories/helper-components/TokenBlock/index.styles.d.ts.map +1 -0
  96. package/dist/stories/utils/index.d.ts +82 -0
  97. package/dist/stories/utils/index.d.ts.map +1 -0
  98. package/dist/ui/core/colors/colorTypes.d.ts +1 -0
  99. package/dist/ui/core/colors/colorTypes.d.ts.map +1 -0
  100. package/dist/ui/core/colors/index.d.ts +1 -0
  101. package/dist/ui/core/colors/index.d.ts.map +1 -0
  102. package/dist/ui/core/icons/iconTags.d.ts +409 -0
  103. package/dist/ui/core/icons/iconTags.d.ts.map +1 -0
  104. package/dist/ui/core/icons/iconTypes.d.ts +399 -0
  105. package/dist/ui/core/icons/iconTypes.d.ts.map +1 -0
  106. package/dist/{core → ui/core}/icons/index.d.ts +1 -1
  107. package/dist/ui/core/icons/index.d.ts.map +1 -0
  108. package/dist/ui/core/index.d.ts +7 -0
  109. package/dist/ui/core/index.d.ts.map +1 -0
  110. package/dist/ui/core/miscellaneous-choices/index.d.ts.map +1 -0
  111. package/dist/ui/core/miscellaneous-choices/miscellaneousTypes.d.ts.map +1 -0
  112. package/dist/ui/core/sizes/index.d.ts.map +1 -0
  113. package/dist/ui/core/sizes/sizeTypes.d.ts +3 -0
  114. package/dist/ui/core/sizes/sizeTypes.d.ts.map +1 -0
  115. package/dist/ui/elements/Alert/Alert.d.ts +8 -0
  116. package/dist/ui/elements/Alert/Alert.d.ts.map +1 -0
  117. package/dist/ui/elements/Alert/Alert.styles.d.ts +7 -0
  118. package/dist/ui/elements/Alert/Alert.styles.d.ts.map +1 -0
  119. package/dist/ui/elements/Alert/Alert.test.d.ts +2 -0
  120. package/dist/ui/elements/Alert/Alert.test.d.ts.map +1 -0
  121. package/dist/ui/elements/Alert/constants.d.ts +140 -0
  122. package/dist/ui/elements/Alert/constants.d.ts.map +1 -0
  123. package/dist/ui/elements/Alert/index.d.ts +7 -0
  124. package/dist/ui/elements/Alert/index.d.ts.map +1 -0
  125. package/dist/ui/elements/Alert/types.d.ts +125 -0
  126. package/dist/ui/elements/Alert/types.d.ts.map +1 -0
  127. package/dist/ui/elements/Alert/utils.d.ts +1 -0
  128. package/dist/ui/elements/Alert/utils.d.ts.map +1 -0
  129. package/dist/ui/elements/AlertBanner/AlertBanner.d.ts +9 -0
  130. package/dist/ui/elements/AlertBanner/AlertBanner.d.ts.map +1 -0
  131. package/dist/ui/elements/AlertBanner/AlertBanner.styles.d.ts +4 -0
  132. package/dist/ui/elements/AlertBanner/AlertBanner.styles.d.ts.map +1 -0
  133. package/dist/ui/elements/AlertBanner/AlertBanner.test.d.ts +2 -0
  134. package/dist/ui/elements/AlertBanner/AlertBanner.test.d.ts.map +1 -0
  135. package/dist/ui/elements/AlertBanner/constants.d.ts +140 -0
  136. package/dist/ui/elements/AlertBanner/constants.d.ts.map +1 -0
  137. package/dist/ui/elements/AlertBanner/index.d.ts +7 -0
  138. package/dist/ui/elements/AlertBanner/index.d.ts.map +1 -0
  139. package/dist/ui/elements/AlertBanner/types.d.ts +111 -0
  140. package/dist/ui/elements/AlertBanner/types.d.ts.map +1 -0
  141. package/dist/ui/elements/AlertBanner/utils.d.ts +105 -0
  142. package/dist/ui/elements/AlertBanner/utils.d.ts.map +1 -0
  143. package/dist/ui/elements/Button/Button.d.ts +11 -0
  144. package/dist/ui/elements/Button/Button.d.ts.map +1 -0
  145. package/dist/ui/elements/Button/Button.styles.d.ts +4 -0
  146. package/dist/ui/elements/Button/Button.styles.d.ts.map +1 -0
  147. package/dist/ui/elements/Button/Button.test.d.ts +2 -0
  148. package/dist/ui/elements/Button/Button.test.d.ts.map +1 -0
  149. package/dist/ui/elements/Button/ButtonGroup.d.ts +11 -0
  150. package/dist/ui/elements/Button/ButtonGroup.d.ts.map +1 -0
  151. package/dist/ui/elements/Button/ButtonGroup.styles.d.ts +2 -0
  152. package/dist/ui/elements/Button/ButtonGroup.styles.d.ts.map +1 -0
  153. package/dist/ui/elements/Button/IconButton.d.ts +8 -0
  154. package/dist/ui/elements/Button/IconButton.d.ts.map +1 -0
  155. package/dist/ui/elements/Button/IconButton.test.d.ts +2 -0
  156. package/dist/ui/elements/Button/IconButton.test.d.ts.map +1 -0
  157. package/dist/ui/elements/Button/constants.d.ts +54 -0
  158. package/dist/ui/elements/Button/constants.d.ts.map +1 -0
  159. package/dist/ui/elements/Button/index.d.ts +9 -0
  160. package/dist/ui/elements/Button/index.d.ts.map +1 -0
  161. package/dist/ui/elements/Button/types.d.ts +226 -0
  162. package/dist/ui/elements/Button/types.d.ts.map +1 -0
  163. package/dist/ui/elements/Button/utils.d.ts +1 -0
  164. package/dist/ui/elements/Button/utils.d.ts.map +1 -0
  165. package/dist/ui/elements/Icon/Icon.d.ts +48 -0
  166. package/dist/ui/elements/Icon/Icon.d.ts.map +1 -0
  167. package/dist/ui/elements/Icon/Icon.styles.d.ts +5 -0
  168. package/dist/ui/elements/Icon/Icon.styles.d.ts.map +1 -0
  169. package/dist/ui/elements/Icon/index.d.ts +3 -0
  170. package/dist/ui/elements/Icon/index.d.ts.map +1 -0
  171. package/dist/ui/elements/Icon/types.d.ts +74 -0
  172. package/dist/ui/elements/Icon/types.d.ts.map +1 -0
  173. package/dist/ui/elements/Modal/ConfirmationDialog/index.d.ts +43 -0
  174. package/dist/ui/elements/Modal/ConfirmationDialog/index.d.ts.map +1 -0
  175. package/dist/ui/elements/Modal/ConfirmationDialog/index.test.d.ts +2 -0
  176. package/dist/ui/elements/Modal/ConfirmationDialog/index.test.d.ts.map +1 -0
  177. package/dist/ui/elements/Modal/Modal.d.ts +21 -0
  178. package/dist/ui/elements/Modal/Modal.d.ts.map +1 -0
  179. package/dist/ui/elements/Modal/Modal.styles.d.ts +18 -0
  180. package/dist/ui/elements/Modal/Modal.styles.d.ts.map +1 -0
  181. package/dist/ui/elements/Modal/Modal.test.d.ts +2 -0
  182. package/dist/ui/elements/Modal/Modal.test.d.ts.map +1 -0
  183. package/dist/ui/elements/Modal/MultiStepModal/index.d.ts +46 -0
  184. package/dist/ui/elements/Modal/MultiStepModal/index.d.ts.map +1 -0
  185. package/dist/ui/elements/Modal/MultiStepModal/index.test.d.ts +2 -0
  186. package/dist/ui/elements/Modal/MultiStepModal/index.test.d.ts.map +1 -0
  187. package/dist/ui/elements/Modal/constants.d.ts +1 -0
  188. package/dist/ui/elements/Modal/constants.d.ts.map +1 -0
  189. package/dist/ui/elements/Modal/index.d.ts +5 -0
  190. package/dist/ui/elements/Modal/index.d.ts.map +1 -0
  191. package/dist/ui/elements/Modal/types.d.ts +312 -0
  192. package/dist/ui/elements/Modal/types.d.ts.map +1 -0
  193. package/dist/ui/elements/Modal/utils.d.ts +1 -0
  194. package/dist/ui/elements/Modal/utils.d.ts.map +1 -0
  195. package/dist/ui/elements/MultiSelectDropdown/DropdownListItem.d.ts +4 -0
  196. package/dist/ui/elements/MultiSelectDropdown/DropdownListItem.d.ts.map +1 -0
  197. package/dist/ui/elements/MultiSelectDropdown/MultiSelectDropdown.d.ts +5 -0
  198. package/dist/ui/elements/MultiSelectDropdown/MultiSelectDropdown.d.ts.map +1 -0
  199. package/dist/ui/elements/MultiSelectDropdown/MultiSelectDropdown.styles.d.ts +14 -0
  200. package/dist/ui/elements/MultiSelectDropdown/MultiSelectDropdown.styles.d.ts.map +1 -0
  201. package/dist/ui/elements/MultiSelectDropdown/MultiSelectDropdown.test.d.ts +2 -0
  202. package/dist/ui/elements/MultiSelectDropdown/MultiSelectDropdown.test.d.ts.map +1 -0
  203. package/dist/ui/elements/MultiSelectDropdown/index.d.ts +3 -0
  204. package/dist/ui/elements/MultiSelectDropdown/index.d.ts.map +1 -0
  205. package/dist/ui/elements/MultiSelectDropdown/types.d.ts +70 -0
  206. package/dist/ui/elements/MultiSelectDropdown/types.d.ts.map +1 -0
  207. package/dist/ui/elements/SelectDropdown/SelectDropdown.d.ts +5 -0
  208. package/dist/ui/elements/SelectDropdown/SelectDropdown.d.ts.map +1 -0
  209. package/dist/ui/elements/SelectDropdown/SelectDropdown.styles.d.ts +10 -0
  210. package/dist/ui/elements/SelectDropdown/SelectDropdown.styles.d.ts.map +1 -0
  211. package/dist/ui/elements/SelectDropdown/SelectDropdown.test.d.ts +2 -0
  212. package/dist/ui/elements/SelectDropdown/SelectDropdown.test.d.ts.map +1 -0
  213. package/dist/ui/elements/SelectDropdown/index.d.ts +3 -0
  214. package/dist/ui/elements/SelectDropdown/index.d.ts.map +1 -0
  215. package/dist/ui/elements/SelectDropdown/types.d.ts +59 -0
  216. package/dist/ui/elements/SelectDropdown/types.d.ts.map +1 -0
  217. package/dist/ui/elements/Table/Table.d.ts +47 -0
  218. package/dist/ui/elements/Table/Table.d.ts.map +1 -0
  219. package/dist/ui/elements/Table/Table.styles.d.ts +8 -0
  220. package/dist/ui/elements/Table/Table.styles.d.ts.map +1 -0
  221. package/dist/ui/elements/Table/Table.test.d.ts +2 -0
  222. package/dist/ui/elements/Table/Table.test.d.ts.map +1 -0
  223. package/dist/ui/elements/Table/constants.d.ts +1 -0
  224. package/dist/ui/elements/Table/constants.d.ts.map +1 -0
  225. package/dist/ui/elements/Table/index.d.ts +3 -0
  226. package/dist/ui/elements/Table/index.d.ts.map +1 -0
  227. package/dist/ui/elements/Table/types.d.ts +223 -0
  228. package/dist/ui/elements/Table/types.d.ts.map +1 -0
  229. package/dist/ui/elements/Table/utils.d.ts +1 -0
  230. package/dist/ui/elements/Table/utils.d.ts.map +1 -0
  231. package/dist/ui/elements/Typography/Typography.d.ts +36 -0
  232. package/dist/ui/elements/Typography/Typography.d.ts.map +1 -0
  233. package/dist/ui/elements/Typography/Typography.styles.d.ts +6 -0
  234. package/dist/ui/elements/Typography/Typography.styles.d.ts.map +1 -0
  235. package/dist/ui/elements/Typography/constants.d.ts +22 -0
  236. package/dist/ui/elements/Typography/constants.d.ts.map +1 -0
  237. package/dist/ui/elements/Typography/index.d.ts +5 -0
  238. package/dist/ui/elements/Typography/index.d.ts.map +1 -0
  239. package/dist/ui/elements/Typography/types.d.ts +50 -0
  240. package/dist/ui/elements/Typography/types.d.ts.map +1 -0
  241. package/dist/ui/elements/Typography/utils.d.ts +2 -0
  242. package/dist/ui/elements/Typography/utils.d.ts.map +1 -0
  243. package/dist/ui/helpers/classNameBuilders.d.ts.map +1 -0
  244. package/dist/ui/helpers/index.d.ts +3 -0
  245. package/dist/ui/helpers/index.d.ts.map +1 -0
  246. package/dist/ui/index.d.ts +11 -0
  247. package/dist/ui/index.d.ts.map +1 -0
  248. package/dist/{init → ui/init}/GrauityInit.d.ts +15 -3
  249. package/dist/ui/init/GrauityInit.d.ts.map +1 -0
  250. package/dist/ui/init/index.d.ts.map +1 -0
  251. package/dist/ui/themes/GlobalStyle.d.ts +5 -0
  252. package/dist/ui/themes/GlobalStyle.d.ts.map +1 -0
  253. package/dist/ui/themes/ThemeContext.d.ts +24 -0
  254. package/dist/ui/themes/ThemeContext.d.ts.map +1 -0
  255. package/dist/ui/themes/constants.d.ts +6 -0
  256. package/dist/ui/themes/constants.d.ts.map +1 -0
  257. package/dist/ui/themes/darkThemeConstants.d.ts +70 -0
  258. package/dist/ui/themes/darkThemeConstants.d.ts.map +1 -0
  259. package/dist/ui/themes/lightThemeConstants.d.ts +70 -0
  260. package/dist/ui/themes/lightThemeConstants.d.ts.map +1 -0
  261. package/dist/ui/themes/tokens.d.ts +1 -0
  262. package/dist/ui/themes/tokens.d.ts.map +1 -0
  263. package/dist/ui/themes/types.d.ts +73 -0
  264. package/dist/ui/themes/types.d.ts.map +1 -0
  265. package/package.json +59 -28
  266. package/ui/core/colors/colorTypes.ts +2 -20
  267. package/ui/core/colors/index.ts +23 -23
  268. package/ui/core/icons/iconTags.ts +1063 -59
  269. package/ui/core/icons/iconTypes.ts +837 -84
  270. package/ui/core/icons/index.ts +1 -3
  271. package/ui/core/index.ts +7 -10
  272. package/ui/core/sizes/sizeTypes.ts +1 -0
  273. package/ui/css/fonts.scss +0 -8
  274. package/ui/css/index.scss +0 -8
  275. package/ui/css/reset.scss +2 -5
  276. package/ui/elements/Alert/Alert.styles.ts +66 -0
  277. package/ui/elements/Alert/Alert.test.tsx +81 -0
  278. package/ui/elements/Alert/Alert.tsx +153 -0
  279. package/ui/elements/Alert/constants.ts +169 -0
  280. package/ui/elements/Alert/index.ts +6 -0
  281. package/ui/elements/Alert/types.ts +150 -0
  282. package/ui/elements/AlertBanner/AlertBanner.styles.ts +35 -0
  283. package/ui/elements/AlertBanner/AlertBanner.test.tsx +70 -0
  284. package/ui/elements/AlertBanner/AlertBanner.tsx +137 -0
  285. package/ui/elements/AlertBanner/constants.ts +179 -0
  286. package/ui/elements/AlertBanner/index.ts +6 -0
  287. package/ui/elements/AlertBanner/types.ts +133 -0
  288. package/ui/elements/AlertBanner/utils.ts +52 -0
  289. package/ui/elements/Button/Button.styles.ts +88 -0
  290. package/ui/elements/Button/Button.test.tsx +78 -0
  291. package/ui/elements/Button/Button.tsx +134 -0
  292. package/ui/elements/Button/ButtonGroup.styles.ts +7 -0
  293. package/ui/elements/Button/ButtonGroup.tsx +21 -0
  294. package/ui/elements/Button/IconButton.test.tsx +39 -0
  295. package/ui/elements/Button/IconButton.tsx +118 -0
  296. package/ui/elements/Button/constants.ts +304 -0
  297. package/ui/elements/Button/index.ts +8 -0
  298. package/ui/elements/Button/types.ts +282 -0
  299. package/ui/elements/Button/utils.ts +0 -0
  300. package/ui/elements/Icon/Icon.styles.ts +99 -0
  301. package/ui/elements/Icon/Icon.tsx +17 -107
  302. package/ui/elements/Icon/index.ts +1 -2
  303. package/ui/elements/Icon/types.ts +96 -0
  304. package/ui/elements/Modal/ConfirmationDialog/index.test.tsx +116 -0
  305. package/ui/elements/Modal/ConfirmationDialog/index.tsx +151 -0
  306. package/ui/elements/Modal/Modal.styles.ts +230 -0
  307. package/ui/elements/Modal/Modal.test.tsx +117 -0
  308. package/ui/elements/Modal/Modal.tsx +179 -0
  309. package/ui/elements/Modal/MultiStepModal/index.test.tsx +116 -0
  310. package/ui/elements/Modal/MultiStepModal/index.tsx +184 -0
  311. package/ui/elements/Modal/constants.ts +0 -0
  312. package/ui/elements/Modal/index.ts +4 -0
  313. package/ui/elements/Modal/types.ts +379 -0
  314. package/ui/elements/Modal/utils.tsx +0 -0
  315. package/ui/elements/MultiSelectDropdown/DropdownListItem.tsx +33 -0
  316. package/ui/elements/MultiSelectDropdown/MultiSelectDropdown.styles.ts +127 -0
  317. package/ui/elements/MultiSelectDropdown/MultiSelectDropdown.test.tsx +224 -0
  318. package/ui/elements/MultiSelectDropdown/MultiSelectDropdown.tsx +156 -0
  319. package/ui/elements/MultiSelectDropdown/index.ts +2 -0
  320. package/ui/elements/MultiSelectDropdown/types.ts +87 -0
  321. package/ui/elements/SelectDropdown/SelectDropdown.styles.ts +99 -0
  322. package/ui/elements/SelectDropdown/SelectDropdown.test.tsx +86 -0
  323. package/ui/elements/SelectDropdown/SelectDropdown.tsx +94 -0
  324. package/ui/elements/SelectDropdown/index.tsx +2 -0
  325. package/ui/elements/SelectDropdown/types.ts +73 -0
  326. package/ui/elements/Table/Table.styles.ts +178 -0
  327. package/ui/elements/Table/Table.test.tsx +72 -0
  328. package/ui/elements/Table/Table.tsx +118 -0
  329. package/ui/elements/Table/constants.ts +0 -0
  330. package/ui/elements/Table/index.ts +2 -0
  331. package/ui/elements/Table/types.ts +270 -0
  332. package/ui/elements/Table/utils.ts +0 -0
  333. package/ui/elements/Typography/Typography.styles.ts +29 -0
  334. package/ui/elements/Typography/Typography.tsx +70 -0
  335. package/ui/elements/Typography/constants.ts +292 -0
  336. package/ui/elements/Typography/index.ts +9 -0
  337. package/ui/elements/Typography/types.ts +116 -0
  338. package/ui/elements/Typography/utils.ts +11 -0
  339. package/ui/fonts/grauity-icons.eot +0 -0
  340. package/ui/fonts/grauity-icons.ttf +0 -0
  341. package/ui/fonts/grauity-icons.woff +0 -0
  342. package/ui/fonts/grauity-icons.woff2 +0 -0
  343. package/ui/helpers/index.ts +1 -7
  344. package/ui/index.ts +42 -3
  345. package/ui/init/GrauityInit.tsx +30 -7
  346. package/ui/init/index.ts +0 -1
  347. package/ui/themes/GlobalStyle.ts +273 -0
  348. package/ui/themes/ThemeContext.tsx +140 -0
  349. package/ui/themes/constants.ts +8 -0
  350. package/ui/themes/darkThemeConstants.ts +73 -0
  351. package/ui/themes/lightThemeConstants.ts +73 -0
  352. package/ui/themes/tokens.ts +0 -0
  353. package/ui/themes/types.ts +77 -0
  354. package/dist/core/colors/colorTypes.d.ts +0 -3
  355. package/dist/core/colors/colorTypes.d.ts.map +0 -1
  356. package/dist/core/colors/index.d.ts +0 -14
  357. package/dist/core/colors/index.d.ts.map +0 -1
  358. package/dist/core/icons/iconTags.d.ts +0 -158
  359. package/dist/core/icons/iconTags.d.ts.map +0 -1
  360. package/dist/core/icons/iconTypes.d.ts +0 -148
  361. package/dist/core/icons/iconTypes.d.ts.map +0 -1
  362. package/dist/core/icons/index.d.ts.map +0 -1
  363. package/dist/core/index.d.ts +0 -9
  364. package/dist/core/index.d.ts.map +0 -1
  365. package/dist/core/miscellaneous-choices/index.d.ts.map +0 -1
  366. package/dist/core/miscellaneous-choices/miscellaneousTypes.d.ts.map +0 -1
  367. package/dist/core/sizes/index.d.ts.map +0 -1
  368. package/dist/core/sizes/sizeTypes.d.ts +0 -3
  369. package/dist/core/sizes/sizeTypes.d.ts.map +0 -1
  370. package/dist/elements/Icon/Icon.d.ts +0 -115
  371. package/dist/elements/Icon/Icon.d.ts.map +0 -1
  372. package/dist/elements/Icon/index.d.ts +0 -3
  373. package/dist/elements/Icon/index.d.ts.map +0 -1
  374. package/dist/elements/index.d.ts +0 -3
  375. package/dist/elements/index.d.ts.map +0 -1
  376. package/dist/helpers/classNameBuilders.d.ts.map +0 -1
  377. package/dist/helpers/getElementTypeFromProps.d.ts +0 -14
  378. package/dist/helpers/getElementTypeFromProps.d.ts.map +0 -1
  379. package/dist/helpers/index.d.ts +0 -4
  380. package/dist/helpers/index.d.ts.map +0 -1
  381. package/dist/init/GrauityInit.d.ts.map +0 -1
  382. package/dist/init/index.d.ts.map +0 -1
  383. package/ui/css/colors.scss +0 -131
  384. package/ui/css/icons.scss +0 -96
  385. package/ui/elements/index.ts +0 -2
  386. package/ui/helpers/getElementTypeFromProps.ts +0 -32
  387. /package/dist/{core → ui/core}/miscellaneous-choices/index.d.ts +0 -0
  388. /package/dist/{core → ui/core}/miscellaneous-choices/miscellaneousTypes.d.ts +0 -0
  389. /package/dist/{core → ui/core}/sizes/index.d.ts +0 -0
  390. /package/dist/{helpers → ui/helpers}/classNameBuilders.d.ts +0 -0
  391. /package/dist/{init → ui/init}/index.d.ts +0 -0
  392. /package/ui/{css/sizes.scss → elements/Alert/utils.ts} +0 -0
@@ -0,0 +1,105 @@
1
+ import { AlertProps, AlertType, AlertVariant } from '../Alert/types';
2
+ import { AlertBannerProps, AlertBannerType, AlertBannerVariant } from './types';
3
+ /**
4
+ * Get alert banner icon name based on variant and icon prop
5
+ *
6
+ * If icon prop is set to 'auto', the icon will be selected based on the variant
7
+ *
8
+ * @param icon - Alert banner icon prop
9
+ * @param variant - Alert banner variant
10
+ * @returns Alert banner icon name
11
+ */
12
+ export declare const getAlertIconName: (icon: AlertBannerProps['icon'] | AlertProps['icon'], variant: AlertBannerVariant | AlertVariant) => import("../../core").grauityIconName;
13
+ /**
14
+ * Get alert banner colors based on variant and type
15
+ *
16
+ * @param variant - Alert banner variant
17
+ * @param type - Alert banner type
18
+ * @returns Alert banner colors
19
+ */
20
+ export declare const getAlertBannerColors: (variant: AlertBannerVariant | AlertVariant, type: AlertBannerType | AlertType) => {
21
+ iconColor: string;
22
+ textColor: string;
23
+ backgroundColor: string;
24
+ borderColor: string;
25
+ } | {
26
+ iconColor: string;
27
+ textColor: string;
28
+ backgroundColor: string;
29
+ borderColor: string;
30
+ } | {
31
+ iconColor: string;
32
+ textColor: string;
33
+ backgroundColor: string;
34
+ borderColor: string;
35
+ } | {
36
+ iconColor: string;
37
+ textColor: string;
38
+ backgroundColor: string;
39
+ borderColor: string;
40
+ } | {
41
+ iconColor: string;
42
+ textColor: string;
43
+ backgroundColor: string;
44
+ borderColor: string;
45
+ } | {
46
+ iconColor: string;
47
+ textColor: string;
48
+ backgroundColor: string;
49
+ borderColor: string;
50
+ } | {
51
+ iconColor: string;
52
+ textColor: string;
53
+ backgroundColor: string;
54
+ borderColor: string;
55
+ } | {
56
+ iconColor: string;
57
+ textColor: string;
58
+ backgroundColor: string;
59
+ borderColor: string;
60
+ } | {
61
+ iconColor: string;
62
+ textColor: string;
63
+ backgroundColor: string;
64
+ borderColor: string;
65
+ } | {
66
+ iconColor: string;
67
+ textColor: string;
68
+ backgroundColor: string;
69
+ borderColor: string;
70
+ } | {
71
+ iconColor: string;
72
+ textColor: string;
73
+ backgroundColor: string;
74
+ borderColor: string;
75
+ } | {
76
+ iconColor: string;
77
+ textColor: string;
78
+ backgroundColor: string;
79
+ borderColor: string;
80
+ } | {
81
+ iconColor: string;
82
+ textColor: string;
83
+ backgroundColor: string;
84
+ borderColor: string;
85
+ } | {
86
+ iconColor: string;
87
+ textColor: string;
88
+ backgroundColor: string;
89
+ borderColor: string;
90
+ } | {
91
+ iconColor: string;
92
+ textColor: string;
93
+ backgroundColor: string;
94
+ borderColor: string;
95
+ };
96
+ /**
97
+ * Get button variant based on alert banner variant and type.
98
+ * Useful for showing correct variant for close button.
99
+ *
100
+ * @param variant - Alert banner variant
101
+ * @param type - Alert banner type
102
+ * @returns Button variant
103
+ */
104
+ export declare const getButtonVariantFromAlertBannerTypeVariant: (variant: AlertBannerVariant | AlertVariant, type: AlertBannerType | AlertType) => import("../Button").BUTTON_VARIANTS_ENUM;
105
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../ui/elements/AlertBanner/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAMrE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEhF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,SACnB,gBAAgB,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,WAC1C,kBAAkB,GAAG,YAAY,yCAO7C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,YACpB,kBAAkB,GAAG,YAAY,QACpC,eAAe,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACU,CAAC;AAEhD;;;;;;;GAOG;AACH,eAAO,MAAM,0CAA0C,YAC1C,kBAAkB,GAAG,YAAY,QACpC,eAAe,GAAG,SAAS,6CACsC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { ButtonProps } from './types';
3
+ /**
4
+ * A Button is a component that is used to trigger an action.
5
+ * It can contain text and an icon, or only text.
6
+ *
7
+ * To create an icon button, checkout the IconButton component.
8
+ */
9
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
10
+ export default Button;
11
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AASjD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC;;;;;GAKG;AACH,QAAA,MAAM,MAAM,uFAwEV,CAAC;AA0CH,eAAe,MAAM,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ButtonComponentProps, ButtonContentProps } from './types';
2
+ export declare const StyledButton: import("styled-components").StyledComponent<string, any, ButtonComponentProps, never>;
3
+ export declare const StyledButtonContent: import("styled-components").StyledComponent<string, any, ButtonContentProps, never>;
4
+ //# sourceMappingURL=Button.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/Button.styles.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEnE,eAAO,MAAM,YAAY,uFAoExB,CAAC;AAEF,eAAO,MAAM,mBAAmB,qFAQ/B,CAAC"}
@@ -0,0 +1,2 @@
1
+ import '@testing-library/jest-dom';
2
+ //# sourceMappingURL=Button.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.test.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/Button.test.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1,11 @@
1
+ import PropTypes from 'prop-types';
2
+ import { ButtonGroupProps } from './types';
3
+ declare const ButtonGroup: {
4
+ ({ children }: ButtonGroupProps): JSX.Element;
5
+ defaultProps: ButtonGroupProps;
6
+ propTypes: {
7
+ children: PropTypes.Requireable<any>;
8
+ };
9
+ };
10
+ export default ButtonGroup;
11
+ //# sourceMappingURL=ButtonGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/ButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,QAAA,MAAM,WAAW;mBAAgB,gBAAgB;;;;;CAIhD,CAAC;AAUF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const StyledButtonGroup: import("styled-components").StyledComponent<string, any, {}, never>;
2
+ //# sourceMappingURL=ButtonGroup.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonGroup.styles.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/ButtonGroup.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,qEAI7B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { IconButtonProps } from './types';
3
+ /**
4
+ * An IconButton is a button that contains an icon.
5
+ */
6
+ declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
7
+ export default IconButton;
8
+ //# sourceMappingURL=IconButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/IconButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C;;GAEG;AACH,QAAA,MAAM,UAAU,2FAmEf,CAAC;AAsCF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ import '@testing-library/jest-dom';
2
+ //# sourceMappingURL=IconButton.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.test.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/IconButton.test.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1,54 @@
1
+ export declare enum BUTTON_VARIANTS_ENUM {
2
+ PRIMARY = "primary",
3
+ SECONDARY = "secondary",
4
+ TERTIARY = "tertiary",
5
+ SUCCESS = "success",
6
+ DANGER = "danger",
7
+ WARNING = "warning",
8
+ PRIMARY_OUTLINED = "primary-outlined",
9
+ SECONDARY_OUTLINED = "secondary-outlined",
10
+ TERTIARY_OUTLINED = "tertiary-outlined",
11
+ SUCCESS_OUTLINED = "success-outlined",
12
+ DANGER_OUTLINED = "danger-outlined",
13
+ WARNING_OUTLINED = "warning-outlined"
14
+ }
15
+ export declare enum BUTTON_SIZES_ENUM {
16
+ SMALL = "small",
17
+ MEDIUM = "medium",
18
+ LARGE = "large",
19
+ EXTRA_LARGE = "extra-large"
20
+ }
21
+ export declare enum BUTTON_ICON_POSITIONS_ENUM {
22
+ LEFT = "left",
23
+ RIGHT = "right"
24
+ }
25
+ export declare const BUTTON_VARIANTS: BUTTON_VARIANTS_ENUM[];
26
+ export declare const BUTTON_SIZES: BUTTON_SIZES_ENUM[];
27
+ export declare const BUTTON_ICON_POSITIONS: BUTTON_ICON_POSITIONS_ENUM[];
28
+ export declare const BUTTON_VARIANT_STYLES_MAPPING: {
29
+ primary: string;
30
+ "primary-outlined": string;
31
+ secondary: string;
32
+ "secondary-outlined": string;
33
+ tertiary: string;
34
+ "tertiary-outlined": string;
35
+ success: string;
36
+ "success-outlined": string;
37
+ danger: string;
38
+ "danger-outlined": string;
39
+ warning: string;
40
+ "warning-outlined": string;
41
+ };
42
+ export declare const BUTTON_SIZE_STYLES_MAPPING: {
43
+ small: string;
44
+ medium: string;
45
+ large: string;
46
+ "extra-large": string;
47
+ };
48
+ export declare const ICON_BUTTON_SIZE_STYLES_MAPPING: {
49
+ small: string;
50
+ medium: string;
51
+ large: string;
52
+ "extra-large": string;
53
+ };
54
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC5B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,gBAAgB,qBAAqB;IACrC,kBAAkB,uBAAuB;IACzC,iBAAiB,sBAAsB;IACvC,gBAAgB,qBAAqB;IACrC,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;CACxC;AAED,oBAAY,iBAAiB;IACzB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,WAAW,gBAAgB;CAC9B;AAED,oBAAY,0BAA0B;IAClC,IAAI,SAAS;IACb,KAAK,UAAU;CAClB;AAED,eAAO,MAAM,eAAe,wBAa3B,CAAC;AAEF,eAAO,MAAM,YAAY,qBAKxB,CAAC;AAEF,eAAO,MAAM,qBAAqB,8BAGjC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;CAiMzC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;CAsBtC,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;CA8B3C,CAAC"}
@@ -0,0 +1,9 @@
1
+ export { default } from './Button';
2
+ export { default as ButtonGroup } from './ButtonGroup';
3
+ export { BUTTON_VARIANTS_ENUM } from './constants';
4
+ export { BUTTON_SIZES_ENUM } from './constants';
5
+ export { BUTTON_VARIANTS } from './constants';
6
+ export { BUTTON_ICON_POSITIONS_ENUM } from './constants';
7
+ export { default as IconButton } from './IconButton';
8
+ export type { ButtonProps, IconButtonProps } from './types';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,226 @@
1
+ import React from 'react';
2
+ import { grauityIconName, grauityIconSizeName } from '../../core';
3
+ export type ButtonTypeAttribute = 'button' | 'submit' | 'reset';
4
+ export type ButtonVariants = 'primary' | 'secondary' | 'tertiary' | 'success' | 'danger' | 'warning' | 'primary-outlined' | 'secondary-outlined' | 'tertiary-outlined' | 'success-outlined' | 'danger-outlined' | 'warning-outlined';
5
+ export type ButtonSizes = 'small' | 'medium' | 'large' | 'extra-large';
6
+ export type ButtonIconPositions = 'left' | 'right';
7
+ export interface ButtonProps {
8
+ /**
9
+ * Variant of the button
10
+ *
11
+ * Available choices: `primary`, `secondary`, `tertiary`, `success`, `danger`, `warning`, `primary-outlined`, `secondary-outlined`, `tertiary-outlined`, `success-outlined`, `danger-outlined`, `warning-outlined`
12
+ *
13
+ * Default: `primary`
14
+ * */
15
+ variant?: ButtonVariants;
16
+ /**
17
+ * Size of the button
18
+ * Available choices: `small`, `medium`, `large`
19
+ *
20
+ * Default: `medium`
21
+ * */
22
+ size?: ButtonSizes;
23
+ /**
24
+ * Icon to be displayed in the button.
25
+ * */
26
+ icon?: grauityIconName;
27
+ /**
28
+ * Size of the icon
29
+ * */
30
+ iconSize?: grauityIconSizeName;
31
+ /**
32
+ * Position of the icon
33
+ *
34
+ * Available choices: `left`, `right`
35
+ *
36
+ * Default: `left`
37
+ * */
38
+ iconPosition?: ButtonIconPositions;
39
+ /**
40
+ * Additional classes to be added to the component.
41
+ * */
42
+ className?: string;
43
+ /**
44
+ * Show that the button is inactive
45
+ *
46
+ * Default: `false`
47
+ * */
48
+ disabled?: boolean;
49
+ /**
50
+ * Show that the button is loading
51
+ *
52
+ * Default: `false`
53
+ * */
54
+ loading?: boolean;
55
+ /**
56
+ * Function to be called on click
57
+ *
58
+ * If the button is disabled, the function will not be called
59
+ * */
60
+ onClick?: (e?: any) => void;
61
+ /**
62
+ * Additional styles to be used over the element
63
+ *
64
+ * Default: `{}`
65
+ * */
66
+ style?: React.CSSProperties;
67
+ /**
68
+ * Make the button full width
69
+ *
70
+ * Default: `false`
71
+ * */
72
+ fullWidth?: boolean;
73
+ /**
74
+ * Children of the component
75
+ * */
76
+ children?: React.ReactNode;
77
+ /**
78
+ * Type of the button
79
+ *
80
+ * Default: `button`
81
+ * */
82
+ type?: 'button' | 'submit' | 'reset';
83
+ /**
84
+ * Aria label for the button
85
+ * */
86
+ ariaLabel?: string;
87
+ /**
88
+ * Tooltip to be displayed on hover, uses the `title` attribute
89
+ * */
90
+ tooltip?: string;
91
+ /**
92
+ * Tab index of the button
93
+ * */
94
+ tabIndex?: number;
95
+ /**
96
+ * Function to be called on mouse enter
97
+ * */
98
+ onMouseEnter?: (e: React.MouseEvent<HTMLButtonElement>) => void;
99
+ /**
100
+ * Function to be called on mouse leave
101
+ * */
102
+ onMouseLeave?: (e: React.MouseEvent<HTMLButtonElement>) => void;
103
+ /**
104
+ * Additional props to be passed to the button element
105
+ * */
106
+ buttonProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;
107
+ }
108
+ export interface IconButtonProps {
109
+ /**
110
+ * Variant of the button
111
+ *
112
+ * Available choices: `primary`, `secondary`, `tertiary`, `success`, `danger`, `warning`, `primary-outlined`, `secondary-outlined`, `tertiary-outlined`, `success-outlined`, `danger-outlined`, `warning-outlined`
113
+ *
114
+ * Default: `primary`
115
+ * */
116
+ variant?: ButtonVariants;
117
+ /**
118
+ * Size of the button
119
+ * Available choices: `small`, `medium`, `large`
120
+ *
121
+ * Default: `medium`
122
+ * */
123
+ size?: ButtonSizes;
124
+ /**
125
+ * Icon to be displayed in the button.
126
+ * */
127
+ icon?: grauityIconName;
128
+ /**
129
+ * Size of the icon
130
+ * */
131
+ iconSize?: grauityIconSizeName;
132
+ /**
133
+ * Additional classes to be added to the component.
134
+ * */
135
+ className?: string;
136
+ /**
137
+ * Show that the button is inactive
138
+ *
139
+ * Default: `false`
140
+ * */
141
+ disabled?: boolean;
142
+ /**
143
+ * Show that the button is loading
144
+ *
145
+ * Default: `false`
146
+ * */
147
+ loading?: boolean;
148
+ /**
149
+ * Function to be called on click
150
+ *
151
+ * If the button is disabled, the function will not be called
152
+ * */
153
+ onClick?: (e?: any) => void;
154
+ /**
155
+ * Additional styles to be used over the element
156
+ *
157
+ * Default: `{}`
158
+ * */
159
+ style?: React.CSSProperties;
160
+ /**
161
+ * Make the button full width
162
+ *
163
+ * Default: `false`
164
+ * */
165
+ fullWidth?: boolean;
166
+ /**
167
+ * Type of the button
168
+ *
169
+ * Default: `button`
170
+ * */
171
+ type?: 'button' | 'submit' | 'reset';
172
+ /**
173
+ * Aria label for the button
174
+ * */
175
+ ariaLabel?: string;
176
+ /**
177
+ * Tooltip to be displayed on hover, uses the `title` attribute
178
+ * */
179
+ tooltip?: string;
180
+ /**
181
+ * Tab index of the button
182
+ * */
183
+ tabIndex?: number;
184
+ /**
185
+ * Function to be called on mouse enter
186
+ * */
187
+ onMouseEnter?: (e: React.MouseEvent<HTMLButtonElement>) => void;
188
+ /**
189
+ * Function to be called on mouse leave
190
+ * */
191
+ onMouseLeave?: (e: React.MouseEvent<HTMLButtonElement>) => void;
192
+ /**
193
+ * Additional props to be passed to the button element
194
+ * */
195
+ buttonProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;
196
+ }
197
+ export interface ButtonComponentProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
198
+ variant?: ButtonVariants;
199
+ size?: ButtonSizes;
200
+ icon?: string | number;
201
+ iconSize?: string;
202
+ iconPosition?: 'left' | 'right';
203
+ className?: string;
204
+ disabled?: boolean;
205
+ isLoading?: boolean;
206
+ style?: React.CSSProperties;
207
+ onClick?: (e?: any) => void;
208
+ fullWidth?: boolean;
209
+ isIconButton?: boolean;
210
+ children?: React.ReactNode;
211
+ ref?: React.Ref<HTMLButtonElement>;
212
+ type?: ButtonTypeAttribute;
213
+ ariaLabel?: string;
214
+ title?: string;
215
+ tabIndex?: number;
216
+ onMouseEnter?: (e: React.MouseEvent<HTMLButtonElement>) => void;
217
+ onMouseLeave?: (e: React.MouseEvent<HTMLButtonElement>) => void;
218
+ }
219
+ export interface ButtonContentProps {
220
+ id?: string;
221
+ children: React.ReactNode;
222
+ }
223
+ export interface ButtonGroupProps {
224
+ children: React.ReactNode;
225
+ }
226
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Button/utils.ts"],"names":[],"mappings":""}
@@ -0,0 +1,48 @@
1
+ /// <reference types="react" />
2
+ import PropTypes from 'prop-types';
3
+ import { IconProps } from './types';
4
+ /**
5
+ * An icon is a glyph used to represent something else.
6
+ */
7
+ declare function Icon({ ariaHidden, ariaLabel, as, bordered, circular, color, className, disabled, fitted, flipped, inverted, link, loading, name, rotated, size, style, ...props }: IconProps): JSX.Element;
8
+ declare namespace Icon {
9
+ var propTypes: {
10
+ ariaHidden: PropTypes.Requireable<string>;
11
+ ariaLabel: PropTypes.Requireable<string>;
12
+ as: PropTypes.Requireable<PropTypes.ReactComponentLike>;
13
+ bordered: PropTypes.Requireable<boolean>;
14
+ circular: PropTypes.Requireable<boolean>;
15
+ color: PropTypes.Requireable<string>;
16
+ className: PropTypes.Requireable<string>;
17
+ disabled: PropTypes.Requireable<boolean>;
18
+ fitted: PropTypes.Requireable<boolean>;
19
+ flipped: PropTypes.Requireable<import("../../core/miscellaneous-choices").GRAUITY_FLIPPED_CHOICES>;
20
+ inverted: PropTypes.Requireable<boolean>;
21
+ link: PropTypes.Requireable<boolean>;
22
+ loading: PropTypes.Requireable<boolean>;
23
+ name: PropTypes.Validator<string>;
24
+ rotated: PropTypes.Requireable<import("../../core/miscellaneous-choices").GRAUITY_ROTATED_CHOICES>;
25
+ size: PropTypes.Requireable<import("../../core").GRAUITY_SIZE>;
26
+ style: PropTypes.Requireable<object>;
27
+ };
28
+ var defaultProps: {
29
+ ariaHidden: string;
30
+ ariaLabel: any;
31
+ as: string;
32
+ bordered: boolean;
33
+ circular: boolean;
34
+ color: string;
35
+ className: any;
36
+ disabled: boolean;
37
+ fitted: boolean;
38
+ flipped: any;
39
+ inverted: boolean;
40
+ link: boolean;
41
+ loading: boolean;
42
+ rotated: any;
43
+ size: string;
44
+ style: any;
45
+ };
46
+ }
47
+ export default Icon;
48
+ //# sourceMappingURL=Icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Icon/Icon.tsx"],"names":[],"mappings":";AAEA,OAAO,SAAS,MAAM,YAAY,CAAC;AAWnC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;GAEG;AACH,iBAAS,IAAI,CAAC,EACV,UAAU,EACV,SAAS,EACT,EAAE,EACF,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,KAAK,EACL,GAAG,KAAK,EACX,EAAE,SAAS,eA4DX;kBA/EQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwHb,eAAe,IAAI,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { IconProps } from './types';
2
+ export declare const StyledIcon: import("styled-components").StyledComponent<string, any, {
3
+ as: import("react").ElementType<any>;
4
+ } & IconProps, "as">;
5
+ //# sourceMappingURL=Icon.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.styles.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Icon/Icon.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAOpC,eAAO,MAAM,UAAU;;oBAyFtB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as Icon } from './Icon';
2
+ export { IconProps } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,74 @@
1
+ import React from 'react';
2
+ import { grauityFlippedChoiceName, grauityIconName, grauityIconSizeName, grauityRotatedChoiceName } from 'ui/core';
3
+ interface IconProps {
4
+ /**
5
+ * Icon can have the aria hidden attribute
6
+ * */
7
+ ariaHidden?: string;
8
+ /**
9
+ * Icon can have the aria label attribute
10
+ * */
11
+ ariaLabel?: string;
12
+ /**
13
+ * An element type to render as (string or function).
14
+ * */
15
+ as?: React.ElementType;
16
+ /**
17
+ * Format the icon to appear bordered
18
+ * */
19
+ bordered?: boolean;
20
+ /**
21
+ * Format the icon to appear circular
22
+ * */
23
+ circular?: boolean;
24
+ /**
25
+ * Color of the icon
26
+ * */
27
+ color?: string;
28
+ /**
29
+ * Additional classes to be added to the component
30
+ * */
31
+ className?: string;
32
+ /**
33
+ * Show that the icon is inactive
34
+ * */
35
+ disabled?: boolean;
36
+ /**
37
+ * Fitted, without space to left or right of Icon
38
+ * */
39
+ fitted?: boolean;
40
+ /**
41
+ * Icon can be flipped
42
+ * */
43
+ flipped?: grauityFlippedChoiceName;
44
+ /**
45
+ * The colors of the icon can be inverted in case of used with border
46
+ * * */
47
+ inverted?: boolean;
48
+ /**
49
+ * Icon can be formatted as a link
50
+ * */
51
+ link?: boolean;
52
+ /**
53
+ * Icon can be used as a simple loader
54
+ * */
55
+ loading?: boolean;
56
+ /**
57
+ * Name of the icon
58
+ * */
59
+ name: grauityIconName;
60
+ /**
61
+ * Icon can be rotated
62
+ * */
63
+ rotated?: grauityRotatedChoiceName;
64
+ /**
65
+ * Size of the icon
66
+ * */
67
+ size?: grauityIconSizeName;
68
+ /**
69
+ * Additional styles to be used over the element
70
+ * */
71
+ style?: React.CSSProperties;
72
+ }
73
+ export { IconProps };
74
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../ui/elements/Icon/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACH,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EAC3B,MAAM,SAAS,CAAC;AAEjB,UAAU,SAAS;IACf;;SAEK;IACL,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;SAEK;IACL,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;SAEK;IACL,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IAEvB;;SAEK;IACL,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;SAEK;IACL,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;SAEK;IACL,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;SAEK;IACL,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;SAEK;IACL,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;SAEK;IACL,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;SAEK;IACL,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAEnC;;WAEO;IACP,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;SAEK;IACL,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;SAEK;IACL,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;SAEK;IACL,IAAI,EAAE,eAAe,CAAC;IAEtB;;SAEK;IACL,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAEnC;;SAEK;IACL,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAE3B;;SAEK;IACL,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC/B;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}