@decisiv/ui-components 2.0.1-alpha.21 → 2.0.1-alpha.211

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 (630) hide show
  1. package/lib/atoms/BaseButton/index.d.ts.map +1 -1
  2. package/lib/atoms/BaseButton/index.js +1 -1
  3. package/lib/atoms/BooleanInput/elements.d.ts.map +1 -1
  4. package/lib/atoms/BooleanInput/elements.js +8 -3
  5. package/lib/atoms/BooleanInput/index.d.ts.map +1 -1
  6. package/lib/atoms/BooleanInput/index.js +26 -5
  7. package/lib/atoms/BooleanInput/index.test.js +17 -6
  8. package/lib/atoms/BooleanInput/types.d.ts +4 -0
  9. package/lib/atoms/BooleanInput/types.d.ts.map +1 -1
  10. package/lib/atoms/BooleanInput/types.js +5 -1
  11. package/lib/atoms/Calendar/hooks/useCalendar/index.d.ts.map +1 -1
  12. package/lib/atoms/Calendar/hooks/useCalendar/index.js +2 -1
  13. package/lib/atoms/Calendar/hooks/useCalendar/index.test.js +5 -6
  14. package/lib/atoms/Calendar/index.d.ts.map +1 -1
  15. package/lib/atoms/Calendar/index.js +46 -6
  16. package/lib/atoms/Calendar/index.test.js +68 -38
  17. package/lib/atoms/Calendar/types.d.ts +1 -1
  18. package/lib/atoms/Calendar/types.d.ts.map +1 -1
  19. package/lib/atoms/Calendar/types.js +5 -1
  20. package/lib/atoms/InputField/Containers.d.ts +12 -6
  21. package/lib/atoms/InputField/Containers.d.ts.map +1 -1
  22. package/lib/atoms/InputField/Containers.js +8 -6
  23. package/lib/atoms/InputField/HelpMessage.d.ts +1 -1
  24. package/lib/atoms/InputField/HelpMessage.d.ts.map +1 -1
  25. package/lib/atoms/InputField/HelpMessage.js +23 -7
  26. package/lib/atoms/InputField/InputLabel.d.ts +1 -0
  27. package/lib/atoms/InputField/InputLabel.d.ts.map +1 -1
  28. package/lib/atoms/InputField/InputLabel.js +2 -1
  29. package/lib/atoms/InputField/index.d.ts +8 -1
  30. package/lib/atoms/InputField/index.d.ts.map +1 -1
  31. package/lib/atoms/InputField/index.js +33 -9
  32. package/lib/atoms/InputField/index.test.js +144 -0
  33. package/lib/atoms/InputField/schema.d.ts.map +1 -1
  34. package/lib/atoms/InputField/schema.js +3 -2
  35. package/lib/atoms/OptionsList/Category/index.d.ts +4 -0
  36. package/lib/atoms/OptionsList/Category/index.d.ts.map +1 -0
  37. package/lib/atoms/OptionsList/{Category.js → Category/index.js} +13 -21
  38. package/lib/atoms/OptionsList/Category/styles.d.ts +6 -0
  39. package/lib/atoms/OptionsList/Category/styles.d.ts.map +1 -0
  40. package/lib/atoms/OptionsList/Category/styles.js +36 -0
  41. package/lib/atoms/OptionsList/{Option.d.ts → Option/index.d.ts} +2 -2
  42. package/lib/atoms/OptionsList/Option/index.d.ts.map +1 -0
  43. package/lib/atoms/OptionsList/Option/index.js +172 -0
  44. package/lib/atoms/OptionsList/Option/styles.d.ts +17 -0
  45. package/lib/atoms/OptionsList/Option/styles.d.ts.map +1 -0
  46. package/lib/atoms/OptionsList/Option/styles.js +86 -0
  47. package/lib/atoms/OptionsList/context.d.ts +1 -0
  48. package/lib/atoms/OptionsList/context.d.ts.map +1 -1
  49. package/lib/atoms/OptionsList/index.d.ts.map +1 -1
  50. package/lib/atoms/OptionsList/index.js +20 -9
  51. package/lib/atoms/OptionsList/index.test.js +249 -156
  52. package/lib/atoms/OptionsList/schema.d.ts.map +1 -1
  53. package/lib/atoms/OptionsList/schema.js +4 -1
  54. package/lib/atoms/OptionsList/types.d.ts +25 -0
  55. package/lib/atoms/OptionsList/types.d.ts.map +1 -1
  56. package/lib/atoms/OptionsList/types.js +5 -1
  57. package/lib/atoms/RequiredIcon.d.ts +9 -0
  58. package/lib/atoms/RequiredIcon.d.ts.map +1 -0
  59. package/lib/atoms/{InputField/RequiredIcon.js → RequiredIcon.js} +7 -3
  60. package/lib/components/Accordion/types.js +5 -1
  61. package/lib/components/Accordion/useAccordion/types.js +5 -1
  62. package/lib/components/Alert/Container.d.ts +201 -0
  63. package/lib/components/Alert/Container.d.ts.map +1 -0
  64. package/lib/components/Alert/Container.js +26 -0
  65. package/lib/components/Alert/StyledButton.d.ts +5 -0
  66. package/lib/components/Alert/StyledButton.d.ts.map +1 -0
  67. package/lib/components/Alert/StyledButton.js +23 -0
  68. package/lib/components/Alert/index.d.ts +27 -0
  69. package/lib/components/Alert/index.d.ts.map +1 -0
  70. package/lib/components/Alert/index.js +112 -0
  71. package/lib/components/Alert/index.test.js +79 -0
  72. package/lib/components/Alert/intents.d.ts +13 -0
  73. package/lib/components/Alert/intents.d.ts.map +1 -0
  74. package/lib/components/Alert/intents.js +72 -0
  75. package/lib/components/{Tabs/schema.tab.d.ts → Alert/schema.d.ts} +1 -1
  76. package/lib/components/Alert/schema.d.ts.map +1 -0
  77. package/lib/components/Alert/schema.js +25 -0
  78. package/lib/components/Alert/types.d.ts +36 -0
  79. package/lib/components/Alert/types.d.ts.map +1 -0
  80. package/lib/components/Alert/types.js +32 -0
  81. package/lib/components/Avatar/AvatarContainer.d.ts +1 -13
  82. package/lib/components/Avatar/AvatarContainer.d.ts.map +1 -1
  83. package/lib/components/Avatar/AvatarContainer.js +12 -13
  84. package/lib/components/Avatar/AvatarContent.d.ts +2 -2
  85. package/lib/components/Avatar/AvatarContent.d.ts.map +1 -1
  86. package/lib/components/Avatar/AvatarContent.js +24 -20
  87. package/lib/components/Avatar/index.d.ts.map +1 -1
  88. package/lib/components/Avatar/index.js +39 -5
  89. package/lib/components/Avatar/index.test.js +4 -0
  90. package/lib/components/Avatar/schema.d.ts.map +1 -1
  91. package/lib/components/Avatar/schema.js +3 -1
  92. package/lib/components/Avatar/types.d.ts +15 -2
  93. package/lib/components/Avatar/types.d.ts.map +1 -1
  94. package/lib/components/Avatar/types.js +5 -1
  95. package/lib/components/Badge/constants.d.ts +2 -0
  96. package/lib/components/Badge/constants.d.ts.map +1 -0
  97. package/lib/components/Badge/constants.js +29 -0
  98. package/lib/components/Badge/index.d.ts.map +1 -1
  99. package/lib/components/Badge/index.js +3 -70
  100. package/lib/components/Badge/index.test.js +62 -8
  101. package/lib/components/Badge/schema.d.ts.map +1 -1
  102. package/lib/components/Badge/schema.js +2 -1
  103. package/lib/components/Badge/styles.d.ts +3 -0
  104. package/lib/components/Badge/styles.d.ts.map +1 -0
  105. package/lib/components/Badge/styles.js +96 -0
  106. package/lib/components/Badge/types.d.ts +3 -2
  107. package/lib/components/Badge/types.d.ts.map +1 -1
  108. package/lib/components/Badge/types.js +7 -3
  109. package/lib/components/Breadcrumbs/types.js +5 -1
  110. package/lib/components/Button/StyledButton.d.ts +3 -6
  111. package/lib/components/Button/StyledButton.d.ts.map +1 -1
  112. package/lib/components/Button/StyledButton.js +39 -11
  113. package/lib/components/Button/index.d.ts.map +1 -1
  114. package/lib/components/Button/index.js +51 -12
  115. package/lib/components/Button/index.test.js +43 -8
  116. package/lib/components/Button/schema.d.ts.map +1 -1
  117. package/lib/components/Button/schema.js +4 -1
  118. package/lib/components/Button/types.d.ts +4 -1
  119. package/lib/components/Button/types.d.ts.map +1 -1
  120. package/lib/components/Button/types.js +5 -1
  121. package/lib/components/Checkbox/index.d.ts.map +1 -1
  122. package/lib/components/Checkbox/index.js +3 -1
  123. package/lib/components/Checkbox/schema.d.ts.map +1 -1
  124. package/lib/components/Checkbox/schema.js +2 -0
  125. package/lib/components/CheckboxGroup/index.d.ts +1 -1
  126. package/lib/components/Combobox/Target.d.ts.map +1 -1
  127. package/lib/components/Combobox/Target.js +52 -14
  128. package/lib/components/Combobox/index.d.ts.map +1 -1
  129. package/lib/components/Combobox/index.js +231 -89
  130. package/lib/components/Combobox/index.test.js +425 -147
  131. package/lib/components/Combobox/schema.d.ts.map +1 -1
  132. package/lib/components/Combobox/schema.js +13 -3
  133. package/lib/components/Combobox/types.d.ts +13 -3
  134. package/lib/components/Combobox/types.d.ts.map +1 -1
  135. package/lib/components/Combobox/types.js +5 -1
  136. package/lib/components/Drawer/index.d.ts +22 -0
  137. package/lib/components/Drawer/index.d.ts.map +1 -0
  138. package/lib/components/Drawer/index.js +115 -0
  139. package/lib/components/Drawer/index.test.js +139 -0
  140. package/lib/components/Drawer/schema.d.ts +3 -0
  141. package/lib/components/Drawer/schema.d.ts.map +1 -0
  142. package/lib/components/Drawer/schema.js +32 -0
  143. package/lib/components/Drawer/styles.d.ts +11 -0
  144. package/lib/components/Drawer/styles.d.ts.map +1 -0
  145. package/lib/components/Drawer/styles.js +79 -0
  146. package/lib/components/DropdownList/index.d.ts +1 -0
  147. package/lib/components/DropdownList/index.d.ts.map +1 -1
  148. package/lib/components/DropdownList/index.js +70 -22
  149. package/lib/components/DropdownList/index.test.js +47 -15
  150. package/lib/components/DropdownList/propTypes.d.ts +4 -0
  151. package/lib/components/DropdownList/propTypes.d.ts.map +1 -0
  152. package/lib/components/DropdownList/propTypes.js +42 -0
  153. package/lib/components/DropdownList/schema.d.ts.map +1 -1
  154. package/lib/components/DropdownList/schema.js +2 -1
  155. package/lib/components/DropdownList/types.d.ts +2 -0
  156. package/lib/components/DropdownList/types.d.ts.map +1 -1
  157. package/lib/components/Filter/ActionFilter/index.d.ts +5 -0
  158. package/lib/components/Filter/ActionFilter/index.d.ts.map +1 -0
  159. package/lib/components/Filter/ActionFilter/index.js +43 -0
  160. package/lib/components/Filter/IconWrapper/index.d.ts +197 -0
  161. package/lib/components/Filter/IconWrapper/index.d.ts.map +1 -0
  162. package/lib/components/Filter/IconWrapper/index.js +35 -0
  163. package/lib/components/Filter/SimplePrimary/index.d.ts +5 -0
  164. package/lib/components/Filter/SimplePrimary/index.d.ts.map +1 -0
  165. package/lib/components/Filter/SimplePrimary/index.js +46 -0
  166. package/lib/components/Filter/SimplePrimary/index.test.js +34 -0
  167. package/lib/components/Filter/StyledFilter.d.ts +4 -0
  168. package/lib/components/Filter/StyledFilter.d.ts.map +1 -0
  169. package/lib/components/Filter/StyledFilter.js +66 -0
  170. package/lib/components/Filter/StyledLabel/index.d.ts +8 -0
  171. package/lib/components/Filter/StyledLabel/index.d.ts.map +1 -0
  172. package/lib/components/Filter/StyledLabel/index.js +38 -0
  173. package/lib/components/Filter/index.d.ts +6 -0
  174. package/lib/components/Filter/index.d.ts.map +1 -0
  175. package/lib/components/Filter/index.js +107 -0
  176. package/lib/components/Filter/index.test.js +70 -0
  177. package/lib/components/Filter/kind.d.ts +7 -0
  178. package/lib/components/Filter/kind.d.ts.map +1 -0
  179. package/lib/components/Filter/kind.js +43 -0
  180. package/lib/components/Filter/schema.d.ts +9 -0
  181. package/lib/components/Filter/schema.d.ts.map +1 -0
  182. package/lib/components/Filter/schema.js +37 -0
  183. package/lib/components/Filter/types.d.ts +31 -0
  184. package/lib/components/Filter/types.d.ts.map +1 -0
  185. package/lib/components/Filter/types.js +5 -0
  186. package/lib/components/JumpTo/JumpToMenu.d.ts +2 -2
  187. package/lib/components/JumpTo/JumpToMenu.d.ts.map +1 -1
  188. package/lib/components/JumpTo/JumpToMenu.js +53 -12
  189. package/lib/components/JumpTo/index.test.js +84 -0
  190. package/lib/components/JumpTo/schema.d.ts.map +1 -1
  191. package/lib/components/JumpTo/schema.js +2 -1
  192. package/lib/components/JumpTo/types.d.ts +1 -0
  193. package/lib/components/JumpTo/types.d.ts.map +1 -1
  194. package/lib/components/JumpTo/types.js +5 -1
  195. package/lib/components/JumpTo/utils.d.ts.map +1 -1
  196. package/lib/components/JumpTo/utils.js +3 -7
  197. package/lib/components/LeftNav/Item/ClickArea.js +1 -1
  198. package/lib/components/LeftNav/Item/ItemWrapper.d.ts.map +1 -1
  199. package/lib/components/LeftNav/Item/ItemWrapper.js +3 -1
  200. package/lib/components/LeftNav/Item/MenuItemWrapper.d.ts +7 -0
  201. package/lib/components/LeftNav/Item/MenuItemWrapper.d.ts.map +1 -0
  202. package/lib/components/LeftNav/Item/MenuItemWrapper.js +20 -0
  203. package/lib/components/LeftNav/Item/NavCollapsedXItem/index.d.ts.map +1 -1
  204. package/lib/components/LeftNav/Item/NavCollapsedXItem/index.js +7 -5
  205. package/lib/components/LeftNav/Item/NavExpandedItem/index.d.ts.map +1 -1
  206. package/lib/components/LeftNav/Item/NavExpandedItem/index.js +24 -13
  207. package/lib/components/LeftNav/Item/types.d.ts +1 -1
  208. package/lib/components/LeftNav/Item/types.d.ts.map +1 -1
  209. package/lib/components/LeftNav/Item/types.js +5 -1
  210. package/lib/components/LeftNav/index.test.js +13 -3
  211. package/lib/components/LeftNav/schema.d.ts.map +1 -1
  212. package/lib/components/LeftNav/schema.js +2 -0
  213. package/lib/components/LeftNav/types.d.ts +1 -0
  214. package/lib/components/LeftNav/types.d.ts.map +1 -1
  215. package/lib/components/LeftNav/types.js +5 -1
  216. package/lib/components/Link/DisabledLink.d.ts +7 -0
  217. package/lib/components/Link/DisabledLink.d.ts.map +1 -0
  218. package/lib/components/Link/DisabledLink.js +46 -0
  219. package/lib/components/Link/Link.d.ts +4 -0
  220. package/lib/components/Link/Link.d.ts.map +1 -0
  221. package/lib/components/Link/Link.js +67 -0
  222. package/lib/components/Link/index.d.ts +4 -23
  223. package/lib/components/Link/index.d.ts.map +1 -1
  224. package/lib/components/Link/index.js +20 -158
  225. package/lib/components/Link/index.test.js +63 -42
  226. package/lib/components/Link/schema.d.ts.map +1 -1
  227. package/lib/components/Link/schema.js +2 -1
  228. package/lib/components/Link/styles.d.ts +20 -0
  229. package/lib/components/Link/styles.d.ts.map +1 -0
  230. package/lib/components/Link/styles.js +131 -0
  231. package/lib/components/Link/types.d.ts +28 -0
  232. package/lib/components/Link/types.d.ts.map +1 -0
  233. package/lib/components/Link/types.js +5 -0
  234. package/lib/components/List/BaseCell/index.d.ts +6 -0
  235. package/lib/components/List/BaseCell/index.d.ts.map +1 -0
  236. package/lib/components/List/BaseCell/index.js +17 -0
  237. package/lib/components/List/BaseCell/index.test.js +33 -0
  238. package/lib/components/List/BaseCell/styles.d.ts +198 -0
  239. package/lib/components/List/BaseCell/styles.d.ts.map +1 -0
  240. package/lib/components/List/BaseCell/styles.js +26 -0
  241. package/lib/components/List/ContentContainer/index.d.ts +21 -0
  242. package/lib/components/List/ContentContainer/index.d.ts.map +1 -0
  243. package/lib/components/List/ContentContainer/index.js +82 -0
  244. package/lib/components/List/ContentContainer/index.test.js +102 -0
  245. package/lib/components/List/DefaultCell/index.d.ts +6 -0
  246. package/lib/components/List/DefaultCell/index.d.ts.map +1 -0
  247. package/lib/components/List/DefaultCell/index.js +26 -0
  248. package/lib/components/List/EditableCell/index.d.ts +13 -0
  249. package/lib/components/List/EditableCell/index.d.ts.map +1 -0
  250. package/lib/components/List/EditableCell/index.js +47 -0
  251. package/lib/components/List/EditableCell/styles.d.ts +204 -0
  252. package/lib/components/List/EditableCell/styles.d.ts.map +1 -0
  253. package/lib/components/List/EditableCell/styles.js +47 -0
  254. package/lib/components/List/LabelContainer/index.d.ts +9 -0
  255. package/lib/components/List/LabelContainer/index.d.ts.map +1 -0
  256. package/lib/components/List/LabelContainer/index.js +38 -0
  257. package/lib/components/List/LabelContainer/index.test.js +105 -0
  258. package/lib/components/List/LabelContainer/styles.d.ts +4 -0
  259. package/lib/components/List/LabelContainer/styles.d.ts.map +1 -0
  260. package/lib/components/List/LabelContainer/styles.js +28 -0
  261. package/lib/components/List/ListItem/index.d.ts +8 -0
  262. package/lib/components/List/ListItem/index.d.ts.map +1 -0
  263. package/lib/components/List/ListItem/index.js +43 -0
  264. package/lib/components/List/ListItem/index.test.js +76 -0
  265. package/lib/components/List/ListItem/schema.d.ts +4 -0
  266. package/lib/components/List/ListItem/schema.d.ts.map +1 -0
  267. package/lib/components/List/ListItem/schema.js +30 -0
  268. package/lib/components/List/ListItem/styles.d.ts +2 -0
  269. package/lib/components/List/ListItem/styles.d.ts.map +1 -0
  270. package/lib/components/List/ListItem/styles.js +23 -0
  271. package/lib/components/List/constants.d.ts +19 -0
  272. package/lib/components/List/constants.d.ts.map +1 -0
  273. package/lib/components/List/constants.js +28 -0
  274. package/lib/components/List/index.d.ts +15 -0
  275. package/lib/components/List/index.d.ts.map +1 -0
  276. package/lib/components/List/index.js +67 -0
  277. package/lib/components/List/index.test.js +64 -0
  278. package/lib/components/List/schema.d.ts +4 -0
  279. package/lib/components/List/schema.d.ts.map +1 -0
  280. package/lib/components/List/schema.js +26 -0
  281. package/lib/components/List/styles.d.ts +198 -0
  282. package/lib/components/List/styles.d.ts.map +1 -0
  283. package/lib/components/List/styles.js +34 -0
  284. package/lib/components/List/types.d.ts +15 -0
  285. package/lib/components/List/types.d.ts.map +1 -0
  286. package/lib/components/List/types.js +5 -0
  287. package/lib/components/Loading/Loading.d.ts +12 -0
  288. package/lib/components/Loading/Loading.d.ts.map +1 -0
  289. package/lib/components/Loading/Loading.js +70 -0
  290. package/lib/components/Loading/index.d.ts +4 -0
  291. package/lib/components/Loading/index.d.ts.map +1 -0
  292. package/lib/components/Loading/index.js +33 -0
  293. package/lib/components/Loading/index.test.js +55 -0
  294. package/lib/components/Loading/schema.d.ts +4 -0
  295. package/lib/components/Loading/schema.d.ts.map +1 -0
  296. package/lib/components/Loading/schema.js +31 -0
  297. package/lib/components/Loading/styles.d.ts +211 -0
  298. package/lib/components/Loading/styles.d.ts.map +1 -0
  299. package/lib/components/Loading/styles.js +77 -0
  300. package/lib/components/Loading/types.d.ts +10 -0
  301. package/lib/components/Loading/types.d.ts.map +1 -0
  302. package/lib/components/Loading/types.js +5 -0
  303. package/lib/components/Menu/types.js +5 -1
  304. package/lib/components/Modal/Manager.d.ts +6 -0
  305. package/lib/components/Modal/Manager.d.ts.map +1 -0
  306. package/lib/components/Modal/Manager.js +53 -0
  307. package/lib/components/Modal/ResponsiveModalWrapper.d.ts +11 -0
  308. package/lib/components/Modal/ResponsiveModalWrapper.d.ts.map +1 -0
  309. package/lib/components/Modal/ResponsiveModalWrapper.js +82 -0
  310. package/lib/components/Modal/components.d.ts +201 -3
  311. package/lib/components/Modal/components.d.ts.map +1 -1
  312. package/lib/components/Modal/components.js +16 -24
  313. package/lib/components/Modal/index.d.ts +8 -4
  314. package/lib/components/Modal/index.d.ts.map +1 -1
  315. package/lib/components/Modal/index.js +63 -95
  316. package/lib/components/Modal/index.test.js +89 -0
  317. package/lib/components/Modal/schema.d.ts.map +1 -1
  318. package/lib/components/Modal/schema.js +2 -1
  319. package/lib/components/Modal/types.d.ts +2 -1
  320. package/lib/components/Modal/types.d.ts.map +1 -1
  321. package/lib/components/Modal/types.js +5 -1
  322. package/lib/components/Modal/utils.d.ts +1 -1
  323. package/lib/components/Modal/utils.d.ts.map +1 -1
  324. package/lib/components/Modal/utils.js +7 -5
  325. package/lib/components/Notifications/Notification/components.d.ts +3 -3
  326. package/lib/components/Notifications/Notification/components.d.ts.map +1 -1
  327. package/lib/components/Notifications/Notification/components.js +12 -6
  328. package/lib/components/Notifications/Notification/index.d.ts +3 -6
  329. package/lib/components/Notifications/Notification/index.d.ts.map +1 -1
  330. package/lib/components/Notifications/Notification/index.js +19 -12
  331. package/lib/components/Notifications/Notification/index.test.js +38 -19
  332. package/lib/components/Notifications/NotificationsPanel/index.d.ts +2 -1
  333. package/lib/components/Notifications/NotificationsPanel/index.d.ts.map +1 -1
  334. package/lib/components/Notifications/NotificationsPanel/index.js +41 -22
  335. package/lib/components/Notifications/NotificationsPanel/schema.js +1 -1
  336. package/lib/components/Notifications/Notifier.test.js +79 -10
  337. package/lib/components/Notifications/constants.d.ts +2 -0
  338. package/lib/components/Notifications/constants.d.ts.map +1 -0
  339. package/lib/components/Notifications/constants.js +16 -0
  340. package/lib/components/Notifications/schema.d.ts.map +1 -1
  341. package/lib/components/Notifications/schema.js +2 -1
  342. package/lib/components/Notifications/useNotifications.d.ts +1 -0
  343. package/lib/components/Notifications/useNotifications.d.ts.map +1 -1
  344. package/lib/components/Notifications/useNotifications.test.js +7 -4
  345. package/lib/components/Pagination/Pages.d.ts +1 -7
  346. package/lib/components/Pagination/Pages.d.ts.map +1 -1
  347. package/lib/components/Pagination/Pages.js +17 -0
  348. package/lib/components/Pagination/Pagination.d.ts +13 -14
  349. package/lib/components/Pagination/Pagination.d.ts.map +1 -1
  350. package/lib/components/Pagination/Pagination.js +20 -5
  351. package/lib/components/Pagination/Pagination.test.js +14 -0
  352. package/lib/components/Pagination/paginate.d.ts +1 -1
  353. package/lib/components/Pagination/paginate.d.ts.map +1 -1
  354. package/lib/components/Pagination/paginate.js +4 -0
  355. package/lib/components/Pagination/paginate.test.js +38 -17
  356. package/lib/components/Pagination/schema.d.ts.map +1 -1
  357. package/lib/components/Pagination/schema.js +3 -1
  358. package/lib/components/Pagination/types.d.ts +24 -1
  359. package/lib/components/Pagination/types.d.ts.map +1 -1
  360. package/lib/components/Pagination/types.js +5 -1
  361. package/lib/components/PasswordField/IconWrapper.d.ts +198 -0
  362. package/lib/components/PasswordField/IconWrapper.d.ts.map +1 -0
  363. package/lib/components/PasswordField/IconWrapper.js +32 -0
  364. package/lib/components/PasswordField/Input.d.ts +6 -0
  365. package/lib/components/PasswordField/Input.d.ts.map +1 -0
  366. package/lib/components/PasswordField/Input.js +28 -0
  367. package/lib/components/PasswordField/ShowPasswordButton.d.ts +8 -0
  368. package/lib/components/PasswordField/ShowPasswordButton.d.ts.map +1 -0
  369. package/lib/components/PasswordField/ShowPasswordButton.js +48 -0
  370. package/lib/components/PasswordField/index.d.ts +14 -0
  371. package/lib/components/PasswordField/index.d.ts.map +1 -0
  372. package/lib/components/PasswordField/index.js +113 -0
  373. package/lib/components/PasswordField/index.test.js +217 -0
  374. package/lib/components/PasswordField/schema.d.ts +3 -0
  375. package/lib/components/PasswordField/schema.d.ts.map +1 -0
  376. package/lib/components/PasswordField/schema.js +27 -0
  377. package/lib/components/Popover/Arrow.d.ts +2 -2
  378. package/lib/components/Popover/index.d.ts.map +1 -1
  379. package/lib/components/Popover/index.js +19 -8
  380. package/lib/components/Popover/schema.d.ts.map +1 -1
  381. package/lib/components/Popover/schema.js +27 -20
  382. package/lib/components/Popover/types.d.ts +4 -2
  383. package/lib/components/Popover/types.d.ts.map +1 -1
  384. package/lib/components/Popover/utils.d.ts +1 -1
  385. package/lib/components/SearchInput/index.d.ts +11 -0
  386. package/lib/components/SearchInput/index.d.ts.map +1 -0
  387. package/lib/components/SearchInput/index.js +176 -0
  388. package/lib/components/SearchInput/index.test.js +660 -0
  389. package/lib/components/SearchInput/schema.d.ts +3 -0
  390. package/lib/components/SearchInput/schema.d.ts.map +1 -0
  391. package/lib/components/SearchInput/schema.js +37 -0
  392. package/lib/components/SearchInput/styles.d.ts +1176 -0
  393. package/lib/components/SearchInput/styles.d.ts.map +1 -0
  394. package/lib/components/SearchInput/styles.js +97 -0
  395. package/lib/components/SearchInput/types.d.ts +38 -0
  396. package/lib/components/SearchInput/types.d.ts.map +1 -0
  397. package/lib/components/SearchInput/types.js +5 -0
  398. package/lib/components/Select/Target.d.ts.map +1 -1
  399. package/lib/components/Select/Target.js +6 -2
  400. package/lib/components/Select/index.d.ts.map +1 -1
  401. package/lib/components/Select/index.js +26 -3
  402. package/lib/components/Select/index.test.js +106 -23
  403. package/lib/components/Select/schema.d.ts.map +1 -1
  404. package/lib/components/Select/schema.js +5 -0
  405. package/lib/components/Select/types.d.ts +6 -3
  406. package/lib/components/Select/types.d.ts.map +1 -1
  407. package/lib/components/Select/types.js +5 -1
  408. package/lib/components/SelectDate/Target.d.ts.map +1 -1
  409. package/lib/components/SelectDate/Target.js +6 -2
  410. package/lib/components/SelectDate/index.d.ts.map +1 -1
  411. package/lib/components/SelectDate/index.js +35 -4
  412. package/lib/components/SelectDate/index.test.js +108 -51
  413. package/lib/components/SelectDate/schema.d.ts.map +1 -1
  414. package/lib/components/SelectDate/schema.js +3 -0
  415. package/lib/components/SelectDate/types.d.ts +3 -0
  416. package/lib/components/SelectDate/types.d.ts.map +1 -1
  417. package/lib/components/SelectDate/types.js +5 -1
  418. package/lib/components/SelectDateRange/index.d.ts.map +1 -1
  419. package/lib/components/SelectDateRange/index.js +34 -3
  420. package/lib/components/SelectDateRange/index.test.js +115 -58
  421. package/lib/components/SelectDateRange/schema.d.ts.map +1 -1
  422. package/lib/components/SelectDateRange/schema.js +3 -0
  423. package/lib/components/SelectDateRange/types.js +5 -1
  424. package/lib/components/StepTracker/index.d.ts +11 -0
  425. package/lib/components/StepTracker/index.d.ts.map +1 -0
  426. package/lib/components/StepTracker/index.js +56 -0
  427. package/lib/components/StepTracker/index.test.js +89 -0
  428. package/lib/components/StepTracker/schema.d.ts +3 -0
  429. package/lib/components/StepTracker/schema.d.ts.map +1 -0
  430. package/lib/components/StepTracker/schema.js +19 -0
  431. package/lib/components/StepTracker/styles.d.ts +605 -0
  432. package/lib/components/StepTracker/styles.d.ts.map +1 -0
  433. package/lib/components/StepTracker/styles.js +114 -0
  434. package/lib/components/Table/Body.d.ts.map +1 -1
  435. package/lib/components/Table/Body.js +28 -17
  436. package/lib/components/Table/Container.d.ts.map +1 -1
  437. package/lib/components/Table/Container.js +6 -1
  438. package/lib/components/Table/DataRow.d.ts.map +1 -1
  439. package/lib/components/Table/DataRow.js +26 -18
  440. package/lib/components/Table/Head.d.ts +1 -1
  441. package/lib/components/Table/Head.d.ts.map +1 -1
  442. package/lib/components/Table/Head.js +10 -5
  443. package/lib/components/Table/HeaderCell/index.d.ts.map +1 -1
  444. package/lib/components/Table/HeaderCell/index.js +19 -6
  445. package/lib/components/Table/HeaderCell/types.d.ts +6 -1
  446. package/lib/components/Table/HeaderCell/types.d.ts.map +1 -1
  447. package/lib/components/Table/HeaderCell/types.js +5 -1
  448. package/lib/components/Table/Provider.d.ts +5 -5
  449. package/lib/components/Table/Provider.d.ts.map +1 -1
  450. package/lib/components/Table/Provider.js +10 -11
  451. package/lib/components/Table/index.d.ts.map +1 -1
  452. package/lib/components/Table/index.js +110 -20
  453. package/lib/components/Table/index.test.js +80 -33
  454. package/lib/components/Table/schema.columns.d.ts.map +1 -1
  455. package/lib/components/Table/schema.columns.js +6 -4
  456. package/lib/components/Table/schema.d.ts.map +1 -1
  457. package/lib/components/Table/schema.js +7 -6
  458. package/lib/components/Table/types.d.ts +19 -4
  459. package/lib/components/Table/types.d.ts.map +1 -1
  460. package/lib/components/Table/utils.d.ts +2 -8
  461. package/lib/components/Table/utils.d.ts.map +1 -1
  462. package/lib/components/Table/utils.js +21 -20
  463. package/lib/components/Tabs/Tab/index.d.ts +13 -0
  464. package/lib/components/Tabs/Tab/index.d.ts.map +1 -0
  465. package/lib/components/Tabs/Tab/index.js +94 -0
  466. package/lib/components/Tabs/Tab/schema.d.ts +3 -0
  467. package/lib/components/Tabs/Tab/schema.d.ts.map +1 -0
  468. package/lib/components/Tabs/Tab/styles.d.ts +7 -0
  469. package/lib/components/Tabs/Tab/styles.d.ts.map +1 -0
  470. package/lib/components/Tabs/Tab/styles.js +37 -0
  471. package/lib/components/Tabs/context.d.ts +2 -2
  472. package/lib/components/Tabs/context.d.ts.map +1 -1
  473. package/lib/components/Tabs/context.js +1 -1
  474. package/lib/components/Tabs/index.d.ts +17 -6
  475. package/lib/components/Tabs/index.d.ts.map +1 -1
  476. package/lib/components/Tabs/index.js +104 -163
  477. package/lib/components/Tabs/index.test.js +54 -2
  478. package/lib/components/Tabs/styles.d.ts +4 -0
  479. package/lib/components/Tabs/styles.d.ts.map +1 -0
  480. package/lib/components/Tabs/styles.js +35 -0
  481. package/lib/components/Tag/Action.d.ts +4 -0
  482. package/lib/components/Tag/Action.d.ts.map +1 -0
  483. package/lib/components/Tag/Action.js +39 -0
  484. package/lib/components/Tag/constants.d.ts +2 -2
  485. package/lib/components/Tag/constants.d.ts.map +1 -1
  486. package/lib/components/Tag/constants.js +4 -4
  487. package/lib/components/Tag/index.d.ts +1 -3
  488. package/lib/components/Tag/index.d.ts.map +1 -1
  489. package/lib/components/Tag/index.js +40 -97
  490. package/lib/components/Tag/index.test.js +239 -2
  491. package/lib/components/Tag/propTypes.d.ts +4 -1
  492. package/lib/components/Tag/propTypes.d.ts.map +1 -1
  493. package/lib/components/Tag/propTypes.js +5 -2
  494. package/lib/components/Tag/schema.d.ts.map +1 -1
  495. package/lib/components/Tag/schema.js +2 -0
  496. package/lib/components/Tag/styles.d.ts +13 -0
  497. package/lib/components/Tag/styles.d.ts.map +1 -0
  498. package/lib/components/Tag/styles.js +133 -0
  499. package/lib/components/Tag/types.d.ts +9 -10
  500. package/lib/components/Tag/types.d.ts.map +1 -1
  501. package/lib/components/Tag/types.js +5 -1
  502. package/lib/components/TagInput/index.d.ts +10 -0
  503. package/lib/components/TagInput/index.d.ts.map +1 -0
  504. package/lib/components/TagInput/index.js +217 -0
  505. package/lib/components/TagInput/index.test.js +1001 -0
  506. package/lib/components/TagInput/schema.d.ts +3 -0
  507. package/lib/components/TagInput/schema.d.ts.map +1 -0
  508. package/lib/components/TagInput/schema.js +30 -0
  509. package/lib/components/TagInput/styles.d.ts +10 -0
  510. package/lib/components/TagInput/styles.d.ts.map +1 -0
  511. package/lib/components/TagInput/styles.js +52 -0
  512. package/lib/components/TextArea/TextArea.d.ts.map +1 -1
  513. package/lib/components/TextArea/TextArea.js +1 -1
  514. package/lib/components/TextArea/index.js +1 -0
  515. package/lib/components/TextArea/index.test.js +5 -0
  516. package/lib/components/TextField/Input.js +1 -1
  517. package/lib/components/TextField/index.test.js +5 -0
  518. package/lib/components/Toggle/Fieldset.d.ts.map +1 -1
  519. package/lib/components/Toggle/Fieldset.js +20 -11
  520. package/lib/components/Toggle/Option.d.ts.map +1 -1
  521. package/lib/components/Toggle/Option.js +1 -1
  522. package/lib/components/Toggle/Slider.d.ts +1 -3
  523. package/lib/components/Toggle/Slider.d.ts.map +1 -1
  524. package/lib/components/Toggle/Slider.js +29 -24
  525. package/lib/components/Toggle/index.d.ts.map +1 -1
  526. package/lib/components/Toggle/index.js +6 -1
  527. package/lib/components/Toggle/index.test.js +39 -10
  528. package/lib/components/Toggle/propTypes.js +1 -1
  529. package/lib/components/Toggle/schema.js +1 -1
  530. package/lib/components/Toggle/types.d.ts +3 -2
  531. package/lib/components/Toggle/types.d.ts.map +1 -1
  532. package/lib/components/Toggle/types.js +5 -1
  533. package/lib/components/ToggleView/ToggleView.d.ts +5 -0
  534. package/lib/components/ToggleView/ToggleView.d.ts.map +1 -0
  535. package/lib/components/ToggleView/ToggleView.js +80 -0
  536. package/lib/components/ToggleView/index.d.ts +4 -0
  537. package/lib/components/ToggleView/index.d.ts.map +1 -0
  538. package/lib/components/ToggleView/index.js +33 -0
  539. package/lib/components/ToggleView/index.test.js +61 -0
  540. package/lib/components/ToggleView/schema.d.ts +3 -0
  541. package/lib/components/ToggleView/schema.d.ts.map +1 -0
  542. package/lib/components/ToggleView/schema.js +24 -0
  543. package/lib/components/ToggleView/styles.d.ts +6 -0
  544. package/lib/components/ToggleView/styles.d.ts.map +1 -0
  545. package/lib/components/ToggleView/styles.js +23 -0
  546. package/lib/components/ToggleView/types.d.ts +23 -0
  547. package/lib/components/ToggleView/types.d.ts.map +1 -0
  548. package/lib/components/ToggleView/types.js +12 -0
  549. package/lib/components/Tooltip/index.d.ts.map +1 -1
  550. package/lib/components/Tooltip/index.js +3 -13
  551. package/lib/components/Tooltip/schema.d.ts +3 -0
  552. package/lib/components/Tooltip/schema.d.ts.map +1 -0
  553. package/lib/components/Tooltip/schema.js +29 -0
  554. package/lib/components/TopNav/Menu/index.d.ts +1 -1
  555. package/lib/components/TopNav/index.d.ts +1 -1
  556. package/lib/components/Typography/withColors.d.ts +1 -1
  557. package/lib/components/Typography/withColors.d.ts.map +1 -1
  558. package/lib/components/Typography/withColors.js +1 -1
  559. package/lib/components/Wizard/index.d.ts +24 -0
  560. package/lib/components/Wizard/index.d.ts.map +1 -0
  561. package/lib/components/Wizard/index.js +146 -0
  562. package/lib/components/Wizard/index.test.js +591 -0
  563. package/lib/components/Wizard/schema.d.ts +3 -0
  564. package/lib/components/Wizard/schema.d.ts.map +1 -0
  565. package/lib/components/Wizard/schema.js +37 -0
  566. package/lib/components/Wizard/styles.d.ts +990 -0
  567. package/lib/components/Wizard/styles.d.ts.map +1 -0
  568. package/lib/components/Wizard/styles.js +79 -0
  569. package/lib/components/index.d.ts +12 -1
  570. package/lib/components/index.d.ts.map +1 -1
  571. package/lib/components/index.js +205 -1
  572. package/lib/modifiers/palette.d.ts +36 -0
  573. package/lib/modifiers/palette.d.ts.map +1 -0
  574. package/lib/modifiers/palette.js +88 -0
  575. package/lib/modifiers/spacingSchema.d.ts.map +1 -1
  576. package/lib/modifiers/spacingSchema.js +29 -16
  577. package/lib/providers/ConfigProvider/index.d.ts.map +1 -1
  578. package/lib/providers/ConfigProvider/index.js +5 -1
  579. package/lib/providers/ConfigProvider/utils/context.d.ts +1 -1
  580. package/lib/providers/ConfigProvider/utils/context.d.ts.map +1 -1
  581. package/lib/providers/ConfigProvider/utils/normalizer.d.ts.map +1 -1
  582. package/lib/providers/ConfigProvider/utils/normalizer.js +1 -1
  583. package/lib/providers/ConfigProvider/utils/translations.d.ts +42 -0
  584. package/lib/providers/ConfigProvider/utils/translations.d.ts.map +1 -1
  585. package/lib/providers/ConfigProvider/utils/translations.js +43 -1
  586. package/lib/providers/NotificationsProvider/index.d.ts +6 -5
  587. package/lib/providers/NotificationsProvider/index.d.ts.map +1 -1
  588. package/lib/providers/NotificationsProvider/index.js +47 -28
  589. package/lib/providers/NotificationsProvider/types.d.ts +4 -1
  590. package/lib/providers/NotificationsProvider/types.d.ts.map +1 -1
  591. package/lib/types/index.d.ts +2 -0
  592. package/lib/types/index.d.ts.map +1 -0
  593. package/lib/types/index.js +5 -0
  594. package/lib/utils/commonUIColors.d.ts +351 -3
  595. package/lib/utils/commonUIColors.d.ts.map +1 -1
  596. package/lib/utils/commonUIColors.js +6 -2
  597. package/lib/utils/joinClassnames.d.ts +3 -0
  598. package/lib/utils/joinClassnames.d.ts.map +1 -0
  599. package/lib/utils/joinClassnames.js +26 -0
  600. package/lib/utils/useDebounce.d.ts +2 -0
  601. package/lib/utils/useDebounce.d.ts.map +1 -0
  602. package/lib/utils/useDebounce.js +37 -0
  603. package/lib/utils/useFirstMount.d.ts +2 -0
  604. package/lib/utils/useFirstMount.d.ts.map +1 -0
  605. package/lib/utils/useFirstMount.js +19 -0
  606. package/lib/utils/useStackingContext.d.ts +12 -0
  607. package/lib/utils/useStackingContext.d.ts.map +1 -0
  608. package/lib/utils/useStackingContext.js +46 -0
  609. package/lib/utils/useUpdateEffect.d.ts +4 -0
  610. package/lib/utils/useUpdateEffect.d.ts.map +1 -0
  611. package/lib/utils/useUpdateEffect.js +28 -0
  612. package/package.json +2 -2
  613. package/CHANGELOG.md +0 -796
  614. package/lib/atoms/InputField/RequiredIcon.d.ts +0 -4
  615. package/lib/atoms/InputField/RequiredIcon.d.ts.map +0 -1
  616. package/lib/atoms/OptionsList/Category.d.ts +0 -4
  617. package/lib/atoms/OptionsList/Category.d.ts.map +0 -1
  618. package/lib/atoms/OptionsList/Option.d.ts.map +0 -1
  619. package/lib/atoms/OptionsList/Option.js +0 -194
  620. package/lib/components/Tabs/Tab.d.ts +0 -5
  621. package/lib/components/Tabs/Tab.d.ts.map +0 -1
  622. package/lib/components/Tabs/Tab.js +0 -109
  623. package/lib/components/Tabs/schema.tab.d.ts.map +0 -1
  624. package/lib/components/Tabs/types.d.ts +0 -27
  625. package/lib/components/Tabs/types.d.ts.map +0 -1
  626. package/lib/components/Tabs/types.js +0 -1
  627. package/lib/components/Tag/ActionButton.d.ts +0 -5
  628. package/lib/components/Tag/ActionButton.d.ts.map +0 -1
  629. package/lib/components/Tag/ActionButton.js +0 -56
  630. /package/lib/components/Tabs/{schema.tab.js → Tab/schema.js} +0 -0
@@ -15,7 +15,8 @@ schema.propTypes = {
15
15
  'aria-label': _reactDesc.PropTypes.string.description('Descriptive text for accessibility purposes').isRequired,
16
16
  color: _reactDesc.PropTypes.string.description('(See note) Sets the color for the background and the icon').defaultValue('information'),
17
17
  icon: _reactDesc.PropTypes.element.description('Must be an icon component from `@decisiv/iconix`').isRequired,
18
- size: _reactDesc.PropTypes.oneOf(['medium', 'large']).description('(See note) Sets the size of the badge').defaultValue('medium'),
18
+ palette: _reactDesc.PropTypes.oneOf(['bright', 'pastel']).description('What color variant to render').defaultValue('bright'),
19
+ size: _reactDesc.PropTypes.oneOf(['small', 'medium', 'large']).description('(See note) Sets the size of the badge').defaultValue('medium'),
19
20
  variant: _reactDesc.PropTypes.oneOf(['round', 'square']).description('(See note) Controls primary style variations of the badge').defaultValue('round')
20
21
  };
21
22
  var _default = schema;
@@ -0,0 +1,3 @@
1
+ import { BadgeProps } from './types';
2
+ export declare const BadgeContainer: import("styled-components").StyledComponent<"div", any, Pick<BadgeProps, "variant" | "size" | "color" | "palette">, never>;
3
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/styles.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA+DrC,eAAO,MAAM,cAAc,4HAQ1B,CAAC"}
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BadgeContainer = void 0;
7
+
8
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
+
10
+ var _styledComponentsModifiers = require("styled-components-modifiers");
11
+
12
+ var _designTokens = require("@decisiv/design-tokens");
13
+
14
+ var _color = _interopRequireDefault(require("../../modifiers/color"));
15
+
16
+ var _constants = require("./constants");
17
+
18
+ var _commonUIColors = require("../../utils/commonUIColors");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+
22
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
23
+
24
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { keys.push.apply(keys, Object.getOwnPropertySymbols(object)); } if (enumerableOnly) keys = keys.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); return keys; }
25
+
26
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
27
+
28
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
29
+
30
+ var FG_COLOR = {
31
+ pastel: 'dark'
32
+ };
33
+ var PALETTE_MAPPER = {
34
+ pastel: 'light',
35
+ bright: 'medium'
36
+ };
37
+
38
+ var colorModifiers = function colorModifiers(props) {
39
+ var _props$palette = props.palette,
40
+ palette = _props$palette === void 0 ? 'bright' : _props$palette,
41
+ color = props.color;
42
+
43
+ if (color && color in _commonUIColors.commonUIColors) {
44
+ var baseColor = _commonUIColors.commonUIThreeShadeColors[color];
45
+ var fgColor = palette === 'bright' ? _designTokens.color.base.snowWhite : baseColor[FG_COLOR[palette]];
46
+ var bgColor = baseColor[PALETTE_MAPPER[palette]];
47
+ var colorPalette = palette === 'bright' ? bgColor : _objectSpread({}, bgColor, {
48
+ fg: fgColor
49
+ });
50
+ return (0, _styledComponents.css)(["", ""], (0, _color.default)(colorPalette));
51
+ }
52
+
53
+ return null;
54
+ };
55
+
56
+ var getSizeStyles = function getSizeStyles(key) {
57
+ return (0, _styledComponents.css)(_constants.sizeStyles[key] || '');
58
+ };
59
+
60
+ var sizeModifiers = (0, _styledComponentsModifiers.applyStyleModifiers)({
61
+ small: function small(_ref) {
62
+ var v = _ref.variant;
63
+ return getSizeStyles("small.".concat(v));
64
+ },
65
+ medium: function medium(_ref2) {
66
+ var v = _ref2.variant;
67
+ return getSizeStyles("medium.".concat(v));
68
+ },
69
+ large: function large(_ref3) {
70
+ var v = _ref3.variant;
71
+ return getSizeStyles("large.".concat(v));
72
+ }
73
+ }, 'size');
74
+ var variantModifiers = (0, _styledComponentsModifiers.applyStyleModifiers)({
75
+ round: function round() {
76
+ return (0, _styledComponents.css)({
77
+ borderRadius: '50%'
78
+ });
79
+ },
80
+ square: function square() {
81
+ return (0, _styledComponents.css)({
82
+ borderRadius: '2px'
83
+ });
84
+ }
85
+ }, 'variant'); // The default coloring is explicitly set instead of relying on the
86
+ // `visualInterest.licoriceMousse.medium` colors. The "default" badge is
87
+ // intended to be used in “empty” and/or “no results” messages, the snowWhite
88
+ // fg color and lower contrast help convey “emptiness”.
89
+ // eslint-disable-next-line import/prefer-default-export
90
+
91
+ var BadgeContainer = _styledComponents.default.div.withConfig({
92
+ displayName: "styles__BadgeContainer",
93
+ componentId: "sc-1lruwqa-0"
94
+ })(["align-items:center;display:inline-flex;justify-content:center;", ";", ";", ";"], colorModifiers, sizeModifiers, variantModifiers);
95
+
96
+ exports.BadgeContainer = BadgeContainer;
@@ -8,12 +8,13 @@ export interface BadgeProps {
8
8
  'aria-label': string;
9
9
  color?: CommonUIColorKeys;
10
10
  icon: IconComponent;
11
- size?: 'medium' | 'large';
11
+ palette?: 'pastel' | 'bright';
12
+ size?: 'small' | 'medium' | 'large';
12
13
  variant?: 'round' | 'square';
13
14
  }
14
15
  declare function variantValidator(props: BadgeProps, propName: 'variant', componentName: 'Badge'): Error | null;
15
16
  export declare const propTypes: {
16
- color: PropTypes.Requireable<CommonUIColorKeys>;
17
+ color: PropTypes.Requireable<"danger" | "success" | "information" | "warning" | "berryCrisp" | "koolaidCake" | "cookieMonster" | "cottonCandy" | "fizzyLime" | "mamboMango" | "carrotCake" | "roseGummy" | "licoriceMousse">;
17
18
  icon: PropTypes.Validator<PropTypes.ReactComponentLike>;
18
19
  size: PropTypes.Requireable<string>;
19
20
  variant: typeof variantValidator;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EACL,iBAAiB,EAElB,MAAM,4BAA4B,CAAC;AAEpC,aAAK,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAEvD,oBAAY,QAAQ,GAAG,cAAc,CAAC;AAEtC,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC9B;AAED,iBAAS,gBAAgB,CACvB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,SAAS,EACnB,aAAa,EAAE,OAAO,GACrB,KAAK,GAAG,IAAI,CAqBd;AAED,eAAO,MAAM,SAAS;;;;;CAKrB,CAAC;AAEF,eAAO,MAAM,YAAY;;;CAGxB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EACL,iBAAiB,EAElB,MAAM,4BAA4B,CAAC;AAIpC,aAAK,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAEvD,oBAAY,QAAQ,GAAG,cAAc,CAAC;AAItC,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC9B;AAED,iBAAS,gBAAgB,CACvB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,SAAS,EACnB,aAAa,EAAE,OAAO,GACrB,KAAK,GAAG,IAAI,CAqBd;AAED,eAAO,MAAM,SAAS;;;;;CAKrB,CAAC;AAEF,eAAO,MAAM,YAAY;;;CAGxB,CAAC"}
@@ -9,15 +9,19 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
10
  var _commonUIColors = require("../../utils/commonUIColors");
11
11
 
12
+ var _constants = require("./constants");
13
+
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
 
16
+ var validSizeVariantCombinations = Object.keys(_constants.sizeStyles);
17
+
14
18
  function variantValidator(props, propName, componentName) {
15
19
  if (process.env.NODE_ENV !== 'production') {
16
20
  var size = props.size,
17
21
  variant = props[propName];
18
22
 
19
- if (size === 'large' && variant === 'square') {
20
- return Error("The prop '".concat(propName, "' can not be 'square' if the 'size' prop is 'large'."));
23
+ if (!validSizeVariantCombinations.includes("".concat(size, ".").concat(variant))) {
24
+ return Error("The Badge component does not support the '".concat(size, "' size and '").concat(variant, "' variant props combination."));
21
25
  }
22
26
 
23
27
  _propTypes.default.checkPropTypes({
@@ -33,7 +37,7 @@ function variantValidator(props, propName, componentName) {
33
37
  var propTypes = {
34
38
  color: _propTypes.default.oneOf(_commonUIColors.commonUIColorKeys),
35
39
  icon: _propTypes.default.elementType.isRequired,
36
- size: _propTypes.default.oneOf(['medium', 'large']),
40
+ size: _propTypes.default.oneOf(['small', 'medium', 'large']),
37
41
  variant: variantValidator
38
42
  };
39
43
  exports.propTypes = propTypes;
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,10 +1,7 @@
1
1
  import React from 'react';
2
- import { Size, Kind, Intent, Variant } from './types';
3
- export interface StyledButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
- kind?: Kind;
5
- intent?: Intent;
6
- variant?: Variant;
7
- size: Size;
2
+ import { ButtonProps } from './types';
3
+ export interface StyledButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ButtonProps {
4
+ $loading?: ButtonProps['loading'];
8
5
  }
9
6
  declare const StyledButton: import("styled-components").StyledComponent<"button", any, StyledButtonProps, never>;
10
7
  export default StyledButton;
@@ -1 +1 @@
1
- {"version":3,"file":"StyledButton.d.ts","sourceRoot":"","sources":["../../../src/components/Button/StyledButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsB1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAe,MAAM,SAAS,CAAC;AA0JnE,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,QAAA,MAAM,YAAY,sFAkBjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"StyledButton.d.ts","sourceRoot":"","sources":["../../../src/components/Button/StyledButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAuB1B,OAAO,EAAQ,WAAW,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,WAAW;IACb,QAAQ,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;CACnC;AA6LD,QAAA,MAAM,YAAY,sFAkBjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -17,6 +17,8 @@ var _designTokens = _interopRequireWildcard(require("@decisiv/design-tokens"));
17
17
 
18
18
  var _ConfigProvider = require("../../providers/ConfigProvider");
19
19
 
20
+ var _dynamicModifiers = require("../../utils/dynamicModifiers");
21
+
20
22
  var _focusRingWithColor = _interopRequireDefault(require("../../utils/focusRingWithColor"));
21
23
 
22
24
  var _BaseButton = _interopRequireDefault(require("../../atoms/BaseButton"));
@@ -45,31 +47,57 @@ var color = _styledTheming.default.variants(_ConfigProvider.themeKeys.mode, 'var
45
47
  dark: (0, _styledComponents.css)(["background-color:", ";color:", ";&:focus:not(:active){border-color:", ";", "}&:hover:not(:active){background-color:", ";color:", ";}"], _colors.interactionPrimaryLightFg, _colors.interactionPrimaryLight, _colors.focusRingColors.dark.inverted.primary.border, (0, _focusRingWithColor.default)(_colors.focusRingColors.dark.inverted.primary.shadow), _colors.snowWhiteAlpha, _colors.interactionPrimaryLightFg)
46
48
  },
47
49
  ghost: {
48
- light: (0, _styledComponents.css)(["background-color:transparent;color:", ";padding:0;&:focus:not(:active){border-color:", ";", "}&:hover:not(:active){color:", ";}&:disabled:disabled{background-color:transparent;color:", ";}"], _colors.interactionPrimaryLight, _colors.focusRingColors.light.ghost.border, (0, _focusRingWithColor.default)(_colors.focusRingColors.light.ghost.shadow), _colors.interactionSecondaryLight, (0, _toColorString.default)(opacityColors.charcoal40)),
49
- dark: (0, _styledComponents.css)(["background-color:transparent;color:", ";padding:0;&:focus:not(:active){border-color:", ";", "}&:hover:not(:active){color:", ";}&:disabled:disabled{background-color:transparent;color:", ";}"], _colors.interactionPrimaryDark, _colors.focusRingColors.dark.ghost.border, (0, _focusRingWithColor.default)(_colors.focusRingColors.dark.ghost.shadow), _colors.interactionSecondaryLight, (0, _toColorString.default)(opacityColors.charcoal40))
50
+ light: (0, _styledComponents.css)(["background-color:transparent;color:", ";padding:0;&:focus:not(:active){border-color:", ";", "}&:hover:not(:active){color:", ";}"], _colors.interactionPrimaryLight, _colors.focusRingColors.light.ghost.border, (0, _focusRingWithColor.default)(_colors.focusRingColors.light.ghost.shadow), _colors.interactionSecondaryLight),
51
+ dark: (0, _styledComponents.css)(["background-color:transparent;color:", ";padding:0;&:focus:not(:active){border-color:", ";", "}&:hover:not(:active){color:", ";}"], _colors.interactionPrimaryDark, _colors.focusRingColors.dark.ghost.border, (0, _focusRingWithColor.default)(_colors.focusRingColors.dark.ghost.shadow), _colors.interactionSecondaryLight)
50
52
  }
51
53
  });
52
- /** map the Button size values to the matching font size values */
54
+ /** map the Button size values to the matching font size scalar values */
53
55
 
54
56
 
55
- var sizeToFontSize = {
56
- medium: 'default',
57
- small: 'paragraph2'
57
+ var sizeToScalarSize = {
58
+ medium: fontSizes.default,
59
+ small: fontSizes.paragraph2,
60
+ large: fontSizes.header4,
61
+ extraLarge: 18
58
62
  };
59
63
  /** map the Button size values to the matching heights, in rem */
60
64
 
61
65
  var sizeToHeight = {
62
66
  medium: (0, _rem.default)(32),
63
- small: (0, _rem.default)(24)
67
+ small: (0, _rem.default)(24),
68
+ large: (0, _rem.default)(44),
69
+ extraLarge: (0, _rem.default)(50)
70
+ };
71
+ /** map the Button size values to the matching X padding, in rem */
72
+
73
+ var sizeToPaddingX = {
74
+ medium: (0, _rem.default)(base),
75
+ small: (0, _rem.default)(base),
76
+ large: (0, _rem.default)(base * 1.5),
77
+ extraLarge: (0, _rem.default)(base * 1.5)
64
78
  };
65
79
 
66
80
  var buttonSizeModifier = function buttonSizeModifier(_ref) {
67
- var size = _ref.size;
68
- return (0, _styledComponents.css)(["font-size:", ";height:", ";"], (0, _rem.default)(fontSizes[sizeToFontSize[size]]), sizeToHeight[size]);
81
+ var size = _ref.size,
82
+ variant = _ref.variant;
83
+ return (0, _styledComponents.css)(["font-size:", ";height:", ";padding:0 ", ";"], (0, _rem.default)(sizeToScalarSize[size]), sizeToHeight[size], variant !== 'ghost' && sizeToPaddingX[size]);
69
84
  };
70
85
 
71
86
  var disabledStyles = function disabledStyles(_ref2) {
72
- var variant = _ref2.variant;
87
+ var variant = _ref2.variant,
88
+ $loading = _ref2.$loading;
89
+
90
+ if ($loading) {
91
+ if (variant === 'ghost') {
92
+ return (0, _styledComponents.css)(["&:disabled:disabled{border-color:transparent;color:", ";cursor:not-allowed;}"], _colors.interactionSecondaryLight);
93
+ }
94
+
95
+ if (variant === 'inverted') {
96
+ return (0, _styledComponents.css)(["&:disabled:disabled{background-color:", ";border-color:transparent;color:", ";cursor:not-allowed;}"], _colors.snowWhiteAlpha, _colors.interactionPrimaryLightFg);
97
+ }
98
+
99
+ return (0, _styledComponents.css)(["&:disabled:disabled{background-color:", ";border-color:transparent;color:", ";cursor:not-allowed;}"], _colors.interactionSecondaryLight, _colors.interactionPrimaryLightFg);
100
+ }
73
101
 
74
102
  if (variant === 'ghost') {
75
103
  return (0, _styledComponents.css)(["&:disabled:disabled{background-color:transparent;color:", ";cursor:not-allowed;}"], (0, _toColorString.default)(opacityColors.charcoal40));
@@ -81,6 +109,6 @@ var disabledStyles = function disabledStyles(_ref2) {
81
109
  var StyledButton = (0, _styledComponents.default)(_BaseButton.default).withConfig({
82
110
  displayName: "StyledButton",
83
111
  componentId: "sc-1khcx6y-0"
84
- })(["align-items:center;border-radius:", ";border:1px solid transparent;display:flex;font-weight:", ";justify-content:center;line-height:1;outline:none;padding:0 ", ";text-transform:uppercase;white-space:nowrap;", ";", ";", ";", ";", ";"], (0, _rem.default)(2), _designTokens.typography.weight.alias.default, (0, _rem.default)(base), color, _kind.default, _intent.default, buttonSizeModifier, disabledStyles);
112
+ })(["align-items:center;border-radius:", ";border:1px solid transparent;display:flex;font-weight:", ";justify-content:center;line-height:1;outline:none;text-transform:uppercase;white-space:nowrap;", ";", ";", ";", ";", ";", ";"], (0, _rem.default)(2), _designTokens.typography.weight.alias.default, color, _kind.default, _intent.default, buttonSizeModifier, (0, _dynamicModifiers.applyDynamicModifiers)('minWidth', 'min-width'), disabledStyles);
85
113
  var _default = StyledButton;
86
114
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAIA,OAAc,EAA4B,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAMhF,OAAO,EACL,WAAW,EACX,SAAS,EAOV,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAuFrD,QAAA,MAAM,aAAa,EAAE,sBAAsB,CACzC,SAAS,EACT,WAAW,CACS,CAAC;AASvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAIA,OAAc,EAA4B,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAchF,OAAO,EACL,WAAW,EACX,SAAS,EAOV,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAoJrD,QAAA,MAAM,aAAa,EAAE,sBAAsB,CACzC,SAAS,EACT,WAAW,CACS,CAAC;AASvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,eAAe,aAAa,CAAC"}
@@ -28,6 +28,10 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
28
28
 
29
29
  var _propTypes2 = require("@decisiv/prop-types");
30
30
 
31
+ var _useTranslations = _interopRequireDefault(require("../../utils/useTranslations"));
32
+
33
+ var _Loading = _interopRequireDefault(require("../Loading"));
34
+
31
35
  var _StyledButton = _interopRequireDefault(require("./StyledButton"));
32
36
 
33
37
  var _schema = require("./schema");
@@ -72,6 +76,12 @@ var iconMarginProp = {
72
76
  left: 'margin-right',
73
77
  right: 'margin-left'
74
78
  };
79
+ var buttonSizeToSize = {
80
+ small: 'small',
81
+ medium: 'medium',
82
+ large: 'medium',
83
+ extraLarge: 'medium'
84
+ };
75
85
 
76
86
  var iconMargin = function iconMargin(props) {
77
87
  return !props.iconOnly && "".concat(iconMarginProp[props.position], ": ").concat((0, _rem.default)(5));
@@ -83,36 +93,59 @@ var IconContainer = _styledComponents.default.span.withConfig({
83
93
  })(["line-height:0;", ";"], iconMargin);
84
94
 
85
95
  var Button = function Button(props, ref) {
86
- var text = props.text,
87
- disabled = props.disabled,
96
+ var disabled = props.disabled,
88
97
  icon = props.icon,
89
98
  iconPosition = props.iconPosition,
90
99
  intent = props.intent,
91
- onClick = props.onClick,
92
100
  kind = props.kind,
101
+ loading = props.loading,
102
+ propLoadingText = props.loadingText,
103
+ minWidth = props.minWidth,
104
+ onClick = props.onClick,
93
105
  size = props.size,
106
+ text = props.text,
94
107
  variant = props.variant,
95
- rest = _objectWithoutProperties(props, ["text", "disabled", "icon", "iconPosition", "intent", "onClick", "kind", "size", "variant"]);
108
+ rest = _objectWithoutProperties(props, ["disabled", "icon", "iconPosition", "intent", "kind", "loading", "loadingText", "minWidth", "onClick", "size", "text", "variant"]);
96
109
 
110
+ var translate = (0, _useTranslations.default)();
111
+ var loadingVariant = (0, _react.useMemo)(function () {
112
+ if (variant === 'ghost') return 'normal';
113
+ return 'inverted';
114
+ }, [variant]);
97
115
  var ButtonIcon = (0, _react.useMemo)(function () {
98
116
  var Icon = icon;
99
117
  return Icon && _react.default.createElement(IconContainer, {
100
118
  position: iconPosition,
101
119
  iconOnly: !text
102
120
  }, _react.default.createElement(Icon, {
103
- size: size
121
+ size: buttonSizeToSize[size]
104
122
  }));
105
123
  }, [icon, iconPosition, size, text]);
124
+ var ButtonContent = (0, _react.useMemo)(function () {
125
+ if (loading) {
126
+ var loadingText = text ? translate(propLoadingText, 'button.loading') : undefined;
127
+ var showLoadingText = !!text || !!loadingText;
128
+ return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_Loading.default, {
129
+ variant: loadingVariant,
130
+ size: "small",
131
+ marginRight: showLoadingText ? 0.5 : 0
132
+ }), _react.default.createElement(_react.default.Fragment, null, showLoadingText && loadingText));
133
+ }
134
+
135
+ return _react.default.createElement(_react.default.Fragment, null, !!icon && iconPosition !== 'right' && ButtonIcon, !!text && text, !!icon && iconPosition === 'right' && ButtonIcon);
136
+ }, [ButtonIcon, icon, iconPosition, loading, loadingVariant, propLoadingText, text, translate]);
106
137
  return _react.default.createElement(_StyledButton.default, _extends({
107
- ref: ref,
108
- disabled: disabled,
109
- kind: kind,
138
+ disabled: disabled || loading,
110
139
  intent: intent,
140
+ kind: kind,
141
+ minWidth: minWidth,
111
142
  onClick: disabled ? _noop.default : onClick,
143
+ ref: ref,
112
144
  size: size,
113
145
  type: "button",
114
- variant: variant
115
- }, rest), !!icon && iconPosition !== 'right' && ButtonIcon, !!text && text, !!icon && iconPosition === 'right' && ButtonIcon);
146
+ variant: variant,
147
+ $loading: loading
148
+ }, rest), ButtonContent);
116
149
  };
117
150
 
118
151
  var propTypes = {
@@ -121,12 +154,15 @@ var propTypes = {
121
154
  return (0, _isEmpty.default)(text);
122
155
  }),
123
156
  disabled: _propTypes.default.bool,
124
- text: _propTypes.default.string,
125
- size: _propTypes.default.oneOf(['small', 'medium']),
126
157
  icon: _propTypes.default.elementType,
127
158
  iconPosition: _propTypes.default.oneOf(['left', 'right']),
128
159
  intent: _propTypes.default.oneOf(['success', 'danger']),
129
160
  kind: _propTypes.default.oneOf(['primary', 'secondary']),
161
+ loading: _propTypes.default.bool,
162
+ loadingText: _propTypes.default.string,
163
+ minWidth: _propTypes.default.string,
164
+ size: _propTypes.default.oneOf(['small', 'medium', 'large', 'extraLarge']),
165
+ text: _propTypes.default.string,
130
166
  variant: _propTypes.default.oneOf(['normal', 'inverted', 'ghost'])
131
167
  };
132
168
  var defaultProps = {
@@ -135,6 +171,9 @@ var defaultProps = {
135
171
  iconPosition: 'left',
136
172
  intent: undefined,
137
173
  kind: undefined,
174
+ loading: false,
175
+ loadingText: null,
176
+ minWidth: undefined,
138
177
  size: 'medium',
139
178
  text: undefined,
140
179
  variant: 'normal'
@@ -101,39 +101,74 @@ describe('Button', function () {
101
101
 
102
102
  expect(container).toMatchSnapshot();
103
103
  });
104
+ it('renders correctly the large size', function () {
105
+ var _renderButton3 = renderButton({
106
+ size: 'large'
107
+ }),
108
+ container = _renderButton3.container;
109
+
110
+ expect(container).toMatchSnapshot();
111
+ });
112
+ it('renders correctly the extraLarge size', function () {
113
+ var _renderButton4 = renderButton({
114
+ size: 'extraLarge'
115
+ }),
116
+ container = _renderButton4.container;
117
+
118
+ expect(container).toMatchSnapshot();
119
+ });
120
+ describe('loading', function () {
121
+ it('renders loading with default text', function () {
122
+ var _renderButton5 = renderButton({
123
+ loading: true
124
+ }),
125
+ container = _renderButton5.container;
126
+
127
+ expect(container).toMatchSnapshot();
128
+ });
129
+ it('renders loading with custom message', function () {
130
+ var _renderButton6 = renderButton({
131
+ loading: true,
132
+ loadingText: 'Action...'
133
+ }),
134
+ container = _renderButton6.container;
135
+
136
+ expect(container).toMatchSnapshot();
137
+ });
138
+ });
104
139
  describe('kind=secondary', function () {
105
140
  it('renders correctly with the light theme', function () {
106
- var _renderButton3 = renderButton({
141
+ var _renderButton7 = renderButton({
107
142
  kind: 'secondary'
108
143
  }),
109
- container = _renderButton3.container;
144
+ container = _renderButton7.container;
110
145
 
111
146
  expect(container).toMatchSnapshot();
112
147
  });
113
148
  it('renders correctly with the dark theme', function () {
114
- var _renderButton4 = renderButton({
149
+ var _renderButton8 = renderButton({
115
150
  kind: 'secondary'
116
151
  }, 'dark'),
117
- container = _renderButton4.container;
152
+ container = _renderButton8.container;
118
153
 
119
154
  expect(container).toMatchSnapshot();
120
155
  });
121
156
  describe('inverted', function () {
122
157
  it('renders correctly with the light theme', function () {
123
- var _renderButton5 = renderButton({
158
+ var _renderButton9 = renderButton({
124
159
  kind: 'secondary',
125
160
  variant: 'inverted'
126
161
  }),
127
- container = _renderButton5.container;
162
+ container = _renderButton9.container;
128
163
 
129
164
  expect(container).toMatchSnapshot();
130
165
  });
131
166
  it('renders correctly with the dark theme', function () {
132
- var _renderButton6 = renderButton({
167
+ var _renderButton10 = renderButton({
133
168
  kind: 'secondary',
134
169
  variant: 'inverted'
135
170
  }, 'dark'),
136
- container = _renderButton6.container;
171
+ container = _renderButton10.container;
137
172
 
138
173
  expect(container).toMatchSnapshot();
139
174
  });
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Button/schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,eAAO,MAAM,yBAAyB;;;;CAiCpC,CAAC;AAEH,QAAA,MAAM,MAAM,KAAsC,CAAC;AAInD,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Button/schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,eAAO,MAAM,yBAAyB;;;;CA6CpC,CAAC;AAEH,QAAA,MAAM,MAAM,KAAsC,CAAC;AAInD,eAAe,MAAM,CAAC"}
@@ -17,11 +17,14 @@ var makeButtonSchemaPropTypes = function makeButtonSchemaPropTypes(extensions) {
17
17
  return _objectSpread({
18
18
  text: _reactDesc.PropTypes.string.description("The button's text"),
19
19
  disabled: _reactDesc.PropTypes.bool.description('Defines if the button will be disabled').defaultValue('false'),
20
- size: _reactDesc.PropTypes.oneOf(['small', 'medium']).description('Defines the size of the button').defaultValue('medium'),
20
+ size: _reactDesc.PropTypes.oneOf(['small', 'medium', 'large', 'extraLarge']).description('Defines the size of the button').defaultValue('medium'),
21
21
  icon: _reactDesc.PropTypes.element.description('Which `iconix` icon to render'),
22
22
  iconPosition: _reactDesc.PropTypes.oneOf(['left', 'right']).description('In which side of the text the icon should be rendered').defaultValue('left'),
23
23
  intent: _reactDesc.PropTypes.oneOf(['success', 'danger']).description('Applies desired hover state of button'),
24
24
  kind: _reactDesc.PropTypes.oneOf(['primary', 'secondary']).description('Applies inverted button styles'),
25
+ loading: _reactDesc.PropTypes.bool.description('Defines if the loading animation within the button should be displayed').defaultValue('false'),
26
+ loadingText: _reactDesc.PropTypes.string.description('Loading animation text'),
27
+ minWidth: _reactDesc.PropTypes.string.description('A pass-through CSS value for the min-width attribute'),
25
28
  variant: _reactDesc.PropTypes.oneOf(['normal', 'inverted']).description('Applies secondary button styles')
26
29
  }, extensions);
27
30
  };
@@ -2,7 +2,7 @@ import { ButtonHTMLAttributes, Ref } from 'react';
2
2
  import { IconProps } from '@decisiv/iconix';
3
3
  import { TranslatedText } from '../../utils/useTranslations';
4
4
  export declare type ButtonRef = HTMLButtonElement;
5
- export declare type Size = 'medium' | 'small';
5
+ export declare type Size = 'small' | 'medium' | 'large' | 'extraLarge';
6
6
  export declare type IconPosition = 'left' | 'right';
7
7
  export declare type Intent = 'danger' | 'success';
8
8
  export declare type Variant = 'normal' | 'inverted' | 'ghost';
@@ -14,6 +14,9 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
14
14
  iconPosition?: IconPosition;
15
15
  intent?: Intent;
16
16
  kind?: Kind;
17
+ loading?: boolean;
18
+ loadingText?: string;
19
+ minWidth?: string;
17
20
  ref?: Ref<ButtonRef>;
18
21
  size?: Size;
19
22
  text?: TranslatedText;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,oBAAY,SAAS,GAAG,iBAAiB,CAAC;AAC1C,oBAAY,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC;AACtC,oBAAY,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAC5C,oBAAY,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC1C,oBAAY,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AACtD,oBAAY,IAAI,GAAG,SAAS,GAAG,WAAW,CAAC;AAC3C,oBAAY,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAE9D,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,GAAG,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;IACrB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,oBAAY,SAAS,GAAG,iBAAiB,CAAC;AAC1C,oBAAY,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;AAC/D,oBAAY,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAC5C,oBAAY,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC1C,oBAAY,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AACtD,oBAAY,IAAI,GAAG,SAAS,GAAG,WAAW,CAAC;AAC3C,oBAAY,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAE9D,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;IACrB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAO,sBAAsB,EAAc,MAAM,OAAO,CAAC;AAGvE,OAAqB,EACnB,KAAK,IAAI,UAAU,EACnB,YAAY,EACb,MAAM,0BAA0B,CAAC;AAElC,oBAAY,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAQ7C,QAAA,MAAM,eAAe,EAAE,sBAAsB,CAAC,YAAY,EAAE,KAAK,CAEhE,CAAC;AAiBF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAO,sBAAsB,EAAc,MAAM,OAAO,CAAC;AAGvE,OAAqB,EACnB,KAAK,IAAI,UAAU,EACnB,YAAY,EACb,MAAM,0BAA0B,CAAC;AAElC,oBAAY,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAQ7C,QAAA,MAAM,eAAe,EAAE,sBAAsB,CAAC,YAAY,EAAE,KAAK,CAEhE,CAAC;AAmBF,eAAe,eAAe,CAAC"}
@@ -33,13 +33,15 @@ CheckboxWithRef.propTypes = {
33
33
  label: _propTypes.default.string,
34
34
  disabled: _propTypes.default.bool,
35
35
  readOnly: _propTypes.default.bool,
36
+ required: _propTypes.default.bool,
36
37
  size: _propTypes.default.oneOf(['normal', 'small']),
37
38
  status: _propTypes.default.oneOf(['normal', 'warning']),
38
39
  warningMessage: _propTypes.default.string
39
40
  };
40
41
  CheckboxWithRef.defaultProps = {
41
42
  size: 'normal',
42
- status: 'normal'
43
+ status: 'normal',
44
+ required: false
43
45
  };
44
46
  var _default = CheckboxWithRef;
45
47
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAAwC,CAAC;AAgDrD,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAAwC,CAAC;AA4DrD,eAAe,MAAM,CAAC"}
@@ -18,6 +18,8 @@ schema.propTypes = {
18
18
  defaultChecked: _reactDesc.PropTypes.bool.description('Whether or not the checkbox is initially checked. Use if you do not want to manually control the state.').defaultValue('false'),
19
19
  disabled: _reactDesc.PropTypes.bool.description('If the checkbox should be disabled and ignore user interactions.').defaultValue('false'),
20
20
  readOnly: _reactDesc.PropTypes.bool.description('Ignore user interactions, but still display the label in a readable manner.').defaultValue('false'),
21
+ required: _reactDesc.PropTypes.bool.description('Whether or not the checkbox should be required. Renders an indicator if true.').defaultValue('false'),
22
+ requiredMessage: _reactDesc.PropTypes.string.description('The text to display in the tooltip when hovering over the required icon. It displays "Required" by default').defaultValue('Required'),
21
23
  size: _reactDesc.PropTypes.oneOf(['normal', 'small']).description('Controls the size of the checkbox and label.').defaultValue('normal'),
22
24
  status: _reactDesc.PropTypes.oneOf(['normal', 'warning']).description('Whether or not to render the warning state.').defaultValue('normal'),
23
25
  warningMessage: _reactDesc.PropTypes.string.description('The warning message to display below the checkbox. If provided, the `status` prop is automatically set to `warning`.')
@@ -4,7 +4,7 @@ import { Props as GroupProps, ItemProps as BaseItemProps } from '../../atoms/Boo
4
4
  export declare type Props = Omit<GroupProps, 'itemRenderer'>;
5
5
  export declare type ItemProps = BaseItemProps;
6
6
  declare const CheckboxGroup: {
7
- (props: Pick<GroupProps, "size" | "onChange" | "vertical" | "disabled" | "readOnly" | "status" | "warningMessage" | "items">): JSX.Element;
7
+ (props: Pick<GroupProps, "size" | "onChange" | "vertical" | "disabled" | "readOnly" | "status" | "items" | "warningMessage">): JSX.Element;
8
8
  propTypes: {
9
9
  disabled: PropTypes.Requireable<boolean>;
10
10
  items: PropTypes.Requireable<(PropTypes.InferProps<{}> | null | undefined)[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"Target.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Target.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAO,sBAAsB,EAAc,MAAM,OAAO,CAAC;AAgBvE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA0HtC,QAAA,MAAM,aAAa,EAAE,sBAAsB,CACzC,gBAAgB,EAChB,WAAW,CACS,CAAC;AAGvB,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"Target.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Target.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAO,sBAAsB,EAAc,MAAM,OAAO,CAAC;AAkBvE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAoLtC,QAAA,MAAM,aAAa,EAAE,sBAAsB,CACzC,gBAAgB,EAChB,WAAW,CACS,CAAC;AAGvB,eAAe,aAAa,CAAC"}