@decisiv/ui-components 2.0.1-alpha.97 → 2.0.1

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 (508) hide show
  1. package/lib/atoms/BooleanInput/elements.d.ts.map +1 -1
  2. package/lib/atoms/BooleanInput/elements.js +8 -3
  3. package/lib/atoms/BooleanInput/index.d.ts.map +1 -1
  4. package/lib/atoms/BooleanInput/index.js +8 -4
  5. package/lib/atoms/BooleanInput/types.d.ts +2 -0
  6. package/lib/atoms/BooleanInput/types.d.ts.map +1 -1
  7. package/lib/atoms/Calendar/index.d.ts.map +1 -1
  8. package/lib/atoms/Calendar/index.js +38 -5
  9. package/lib/atoms/Calendar/index.test.js +5 -5
  10. package/lib/atoms/Calendar/types.d.ts +1 -1
  11. package/lib/atoms/Calendar/types.d.ts.map +1 -1
  12. package/lib/atoms/InputField/Containers.d.ts +2 -1
  13. package/lib/atoms/InputField/Containers.d.ts.map +1 -1
  14. package/lib/atoms/InputField/Containers.js +3 -1
  15. package/lib/atoms/InputField/HelpMessage.d.ts +1 -1
  16. package/lib/atoms/InputField/HelpMessage.d.ts.map +1 -1
  17. package/lib/atoms/InputField/HelpMessage.js +23 -7
  18. package/lib/atoms/InputField/index.d.ts +6 -1
  19. package/lib/atoms/InputField/index.d.ts.map +1 -1
  20. package/lib/atoms/InputField/index.js +21 -4
  21. package/lib/atoms/InputField/index.test.js +53 -0
  22. package/lib/atoms/InputField/schema.js +2 -2
  23. package/lib/atoms/InputField/styles.d.ts +7 -0
  24. package/lib/atoms/InputField/styles.d.ts.map +1 -0
  25. package/lib/atoms/InputField/styles.js +31 -0
  26. package/lib/atoms/OptionsList/Category/index.d.ts +4 -0
  27. package/lib/atoms/OptionsList/Category/index.d.ts.map +1 -0
  28. package/lib/atoms/OptionsList/Category/index.js +85 -0
  29. package/lib/atoms/OptionsList/Category/styles.d.ts +5 -0
  30. package/lib/atoms/OptionsList/Category/styles.d.ts.map +1 -0
  31. package/lib/atoms/OptionsList/Category/styles.js +35 -0
  32. package/lib/atoms/OptionsList/{Option.d.ts → Option/index.d.ts} +2 -2
  33. package/lib/atoms/OptionsList/Option/index.d.ts.map +1 -0
  34. package/lib/atoms/OptionsList/Option/index.js +182 -0
  35. package/lib/atoms/OptionsList/Option/styles.d.ts +17 -0
  36. package/lib/atoms/OptionsList/Option/styles.d.ts.map +1 -0
  37. package/lib/atoms/OptionsList/Option/styles.js +86 -0
  38. package/lib/atoms/OptionsList/context.d.ts +1 -0
  39. package/lib/atoms/OptionsList/context.d.ts.map +1 -1
  40. package/lib/atoms/OptionsList/index.d.ts +1 -44
  41. package/lib/atoms/OptionsList/index.d.ts.map +1 -1
  42. package/lib/atoms/OptionsList/index.js +259 -40
  43. package/lib/atoms/OptionsList/index.test.js +329 -186
  44. package/lib/atoms/OptionsList/schema.d.ts.map +1 -1
  45. package/lib/atoms/OptionsList/schema.js +7 -1
  46. package/lib/atoms/OptionsList/styles.d.ts +45 -0
  47. package/lib/atoms/OptionsList/styles.d.ts.map +1 -0
  48. package/lib/atoms/OptionsList/styles.js +29 -0
  49. package/lib/atoms/OptionsList/types.d.ts +50 -1
  50. package/lib/atoms/OptionsList/types.d.ts.map +1 -1
  51. package/lib/atoms/OptionsList/utils.d.ts +2 -1
  52. package/lib/atoms/OptionsList/utils.d.ts.map +1 -1
  53. package/lib/atoms/OptionsList/utils.js +49 -2
  54. package/lib/components/Alert/Container.d.ts +201 -0
  55. package/lib/components/Alert/Container.d.ts.map +1 -0
  56. package/lib/components/Alert/Container.js +26 -0
  57. package/lib/components/Alert/StyledButton.d.ts +5 -0
  58. package/lib/components/Alert/StyledButton.d.ts.map +1 -0
  59. package/lib/components/Alert/StyledButton.js +23 -0
  60. package/lib/components/Alert/index.d.ts +27 -0
  61. package/lib/components/Alert/index.d.ts.map +1 -0
  62. package/lib/components/Alert/index.js +112 -0
  63. package/lib/components/Alert/index.test.js +79 -0
  64. package/lib/components/Alert/intents.d.ts +13 -0
  65. package/lib/components/Alert/intents.d.ts.map +1 -0
  66. package/lib/components/Alert/intents.js +72 -0
  67. package/lib/components/{Tabs/schema.tab.d.ts → Alert/schema.d.ts} +1 -1
  68. package/lib/components/Alert/schema.d.ts.map +1 -0
  69. package/lib/components/Alert/schema.js +25 -0
  70. package/lib/components/Alert/types.d.ts +36 -0
  71. package/lib/components/Alert/types.d.ts.map +1 -0
  72. package/lib/components/Alert/types.js +32 -0
  73. package/lib/components/Avatar/AvatarContainer.d.ts +1 -13
  74. package/lib/components/Avatar/AvatarContainer.d.ts.map +1 -1
  75. package/lib/components/Avatar/AvatarContainer.js +12 -13
  76. package/lib/components/Avatar/AvatarContent.d.ts +2 -2
  77. package/lib/components/Avatar/AvatarContent.d.ts.map +1 -1
  78. package/lib/components/Avatar/AvatarContent.js +24 -20
  79. package/lib/components/Avatar/index.d.ts.map +1 -1
  80. package/lib/components/Avatar/index.js +42 -5
  81. package/lib/components/Avatar/index.test.js +4 -0
  82. package/lib/components/Avatar/schema.d.ts.map +1 -1
  83. package/lib/components/Avatar/schema.js +3 -1
  84. package/lib/components/Avatar/types.d.ts +15 -2
  85. package/lib/components/Avatar/types.d.ts.map +1 -1
  86. package/lib/components/Badge/index.d.ts.map +1 -1
  87. package/lib/components/Badge/index.js +2 -58
  88. package/lib/components/Badge/index.test.js +15 -4
  89. package/lib/components/Badge/schema.d.ts.map +1 -1
  90. package/lib/components/Badge/schema.js +1 -0
  91. package/lib/components/Badge/styles.d.ts +3 -0
  92. package/lib/components/Badge/styles.d.ts.map +1 -0
  93. package/lib/components/Badge/styles.js +97 -0
  94. package/lib/components/Badge/types.d.ts +3 -1
  95. package/lib/components/Badge/types.d.ts.map +1 -1
  96. package/lib/components/Badge/types.js +2 -1
  97. package/lib/components/Button/StyledButton.d.ts +3 -6
  98. package/lib/components/Button/StyledButton.d.ts.map +1 -1
  99. package/lib/components/Button/StyledButton.js +39 -11
  100. package/lib/components/Button/index.d.ts.map +1 -1
  101. package/lib/components/Button/index.js +51 -12
  102. package/lib/components/Button/index.test.js +43 -8
  103. package/lib/components/Button/schema.d.ts.map +1 -1
  104. package/lib/components/Button/schema.js +4 -1
  105. package/lib/components/Button/types.d.ts +4 -1
  106. package/lib/components/Button/types.d.ts.map +1 -1
  107. package/lib/components/Combobox/Target.d.ts.map +1 -1
  108. package/lib/components/Combobox/Target.js +10 -0
  109. package/lib/components/Combobox/index.d.ts.map +1 -1
  110. package/lib/components/Combobox/index.js +111 -59
  111. package/lib/components/Combobox/index.test.js +110 -25
  112. package/lib/components/Combobox/schema.d.ts.map +1 -1
  113. package/lib/components/Combobox/schema.js +7 -1
  114. package/lib/components/Combobox/types.d.ts +7 -2
  115. package/lib/components/Combobox/types.d.ts.map +1 -1
  116. package/lib/components/Drawer/index.d.ts +22 -0
  117. package/lib/components/Drawer/index.d.ts.map +1 -0
  118. package/lib/components/Drawer/index.js +122 -0
  119. package/lib/components/Drawer/index.test.js +164 -0
  120. package/lib/components/Drawer/schema.d.ts +3 -0
  121. package/lib/components/Drawer/schema.d.ts.map +1 -0
  122. package/lib/components/Drawer/schema.js +32 -0
  123. package/lib/components/Drawer/styles.d.ts +11 -0
  124. package/lib/components/Drawer/styles.d.ts.map +1 -0
  125. package/lib/components/Drawer/styles.js +79 -0
  126. package/lib/components/DropdownList/index.d.ts.map +1 -1
  127. package/lib/components/DropdownList/index.js +10 -3
  128. package/lib/components/DropdownList/index.test.js +38 -25
  129. package/lib/components/DropdownList/schema.js +1 -1
  130. package/lib/components/Filter/ActionFilter/index.d.ts +5 -0
  131. package/lib/components/Filter/ActionFilter/index.d.ts.map +1 -0
  132. package/lib/components/Filter/ActionFilter/index.js +43 -0
  133. package/lib/components/Filter/IconWrapper/index.d.ts +2 -2
  134. package/lib/components/Filter/IconWrapper/index.d.ts.map +1 -1
  135. package/lib/components/Filter/SimplePrimary/index.d.ts +2 -28
  136. package/lib/components/Filter/SimplePrimary/index.d.ts.map +1 -1
  137. package/lib/components/Filter/SimplePrimary/index.js +9 -21
  138. package/lib/components/Filter/StyledFilter.d.ts +2 -2
  139. package/lib/components/Filter/StyledFilter.d.ts.map +1 -1
  140. package/lib/components/Filter/StyledFilter.js +28 -1
  141. package/lib/components/Filter/StyledLabel/index.d.ts +3 -3
  142. package/lib/components/Filter/StyledLabel/index.d.ts.map +1 -1
  143. package/lib/components/Filter/StyledLabel/index.js +14 -6
  144. package/lib/components/Filter/index.d.ts +4 -25
  145. package/lib/components/Filter/index.d.ts.map +1 -1
  146. package/lib/components/Filter/index.js +41 -29
  147. package/lib/components/Filter/index.test.js +33 -4
  148. package/lib/components/Filter/kind.d.ts +4 -3
  149. package/lib/components/Filter/kind.d.ts.map +1 -1
  150. package/lib/components/Filter/kind.js +20 -22
  151. package/lib/components/Filter/schema.d.ts.map +1 -1
  152. package/lib/components/Filter/schema.js +8 -3
  153. package/lib/components/Filter/types.d.ts +21 -7
  154. package/lib/components/Filter/types.d.ts.map +1 -1
  155. package/lib/components/JumpTo/JumpToMenu.d.ts.map +1 -1
  156. package/lib/components/JumpTo/JumpToMenu.js +50 -9
  157. package/lib/components/JumpTo/index.test.js +84 -0
  158. package/lib/components/JumpTo/schema.d.ts.map +1 -1
  159. package/lib/components/JumpTo/schema.js +2 -1
  160. package/lib/components/JumpTo/types.d.ts +1 -0
  161. package/lib/components/JumpTo/types.d.ts.map +1 -1
  162. package/lib/components/JumpTo/utils.d.ts.map +1 -1
  163. package/lib/components/JumpTo/utils.js +3 -7
  164. package/lib/components/LeftNav/Item/NavExpandedItem/index.js +7 -2
  165. package/lib/components/LeftNav/index.test.js +35 -19
  166. package/lib/components/LeftNav/schema.d.ts.map +1 -1
  167. package/lib/components/LeftNav/schema.js +3 -1
  168. package/lib/components/LeftNav/types.d.ts +1 -0
  169. package/lib/components/LeftNav/types.d.ts.map +1 -1
  170. package/lib/components/Link/DisabledLink.d.ts +7 -0
  171. package/lib/components/Link/DisabledLink.d.ts.map +1 -0
  172. package/lib/components/Link/DisabledLink.js +46 -0
  173. package/lib/components/Link/Link.d.ts +4 -0
  174. package/lib/components/Link/Link.d.ts.map +1 -0
  175. package/lib/components/Link/Link.js +67 -0
  176. package/lib/components/Link/index.d.ts +4 -23
  177. package/lib/components/Link/index.d.ts.map +1 -1
  178. package/lib/components/Link/index.js +19 -157
  179. package/lib/components/Link/index.test.js +62 -49
  180. package/lib/components/Link/schema.d.ts.map +1 -1
  181. package/lib/components/Link/schema.js +1 -0
  182. package/lib/components/Link/styles.d.ts +20 -0
  183. package/lib/components/Link/styles.d.ts.map +1 -0
  184. package/lib/components/Link/styles.js +131 -0
  185. package/lib/components/Link/types.d.ts +28 -0
  186. package/lib/components/Link/types.d.ts.map +1 -0
  187. package/lib/components/List/BaseCell/index.d.ts +6 -0
  188. package/lib/components/List/BaseCell/index.d.ts.map +1 -0
  189. package/lib/components/List/BaseCell/index.js +17 -0
  190. package/lib/components/List/BaseCell/index.test.js +33 -0
  191. package/lib/components/List/BaseCell/styles.d.ts +198 -0
  192. package/lib/components/List/BaseCell/styles.d.ts.map +1 -0
  193. package/lib/components/List/BaseCell/styles.js +26 -0
  194. package/lib/components/List/ContentContainer/index.d.ts +21 -0
  195. package/lib/components/List/ContentContainer/index.d.ts.map +1 -0
  196. package/lib/components/List/ContentContainer/index.js +82 -0
  197. package/lib/components/List/ContentContainer/index.test.js +102 -0
  198. package/lib/components/List/DefaultCell/index.d.ts +6 -0
  199. package/lib/components/List/DefaultCell/index.d.ts.map +1 -0
  200. package/lib/components/List/DefaultCell/index.js +26 -0
  201. package/lib/components/List/EditableCell/index.d.ts +13 -0
  202. package/lib/components/List/EditableCell/index.d.ts.map +1 -0
  203. package/lib/components/List/EditableCell/index.js +47 -0
  204. package/lib/components/List/EditableCell/styles.d.ts +204 -0
  205. package/lib/components/List/EditableCell/styles.d.ts.map +1 -0
  206. package/lib/components/List/EditableCell/styles.js +47 -0
  207. package/lib/components/List/LabelContainer/index.d.ts +9 -0
  208. package/lib/components/List/LabelContainer/index.d.ts.map +1 -0
  209. package/lib/components/List/LabelContainer/index.js +38 -0
  210. package/lib/components/List/LabelContainer/index.test.js +105 -0
  211. package/lib/components/List/LabelContainer/styles.d.ts +4 -0
  212. package/lib/components/List/LabelContainer/styles.d.ts.map +1 -0
  213. package/lib/components/List/LabelContainer/styles.js +28 -0
  214. package/lib/components/List/ListItem/index.d.ts +8 -0
  215. package/lib/components/List/ListItem/index.d.ts.map +1 -0
  216. package/lib/components/List/ListItem/index.js +43 -0
  217. package/lib/components/List/ListItem/index.test.js +76 -0
  218. package/lib/components/List/ListItem/schema.d.ts +4 -0
  219. package/lib/components/List/ListItem/schema.d.ts.map +1 -0
  220. package/lib/components/List/ListItem/schema.js +30 -0
  221. package/lib/components/List/ListItem/styles.d.ts +2 -0
  222. package/lib/components/List/ListItem/styles.d.ts.map +1 -0
  223. package/lib/components/List/ListItem/styles.js +23 -0
  224. package/lib/components/List/constants.d.ts +19 -0
  225. package/lib/components/List/constants.d.ts.map +1 -0
  226. package/lib/components/List/constants.js +28 -0
  227. package/lib/components/List/index.d.ts +15 -0
  228. package/lib/components/List/index.d.ts.map +1 -0
  229. package/lib/components/List/index.js +67 -0
  230. package/lib/components/List/index.test.js +64 -0
  231. package/lib/components/List/schema.d.ts +4 -0
  232. package/lib/components/List/schema.d.ts.map +1 -0
  233. package/lib/components/List/schema.js +26 -0
  234. package/lib/components/List/styles.d.ts +198 -0
  235. package/lib/components/List/styles.d.ts.map +1 -0
  236. package/lib/components/List/styles.js +34 -0
  237. package/lib/components/List/types.d.ts +15 -0
  238. package/lib/components/List/types.d.ts.map +1 -0
  239. package/lib/components/List/types.js +5 -0
  240. package/lib/components/Loading/Loading.d.ts +12 -0
  241. package/lib/components/Loading/Loading.d.ts.map +1 -0
  242. package/lib/components/Loading/Loading.js +70 -0
  243. package/lib/components/Loading/index.d.ts +4 -0
  244. package/lib/components/Loading/index.d.ts.map +1 -0
  245. package/lib/components/Loading/index.js +33 -0
  246. package/lib/components/Loading/index.test.js +55 -0
  247. package/lib/components/Loading/schema.d.ts +4 -0
  248. package/lib/components/Loading/schema.d.ts.map +1 -0
  249. package/lib/components/Loading/schema.js +31 -0
  250. package/lib/components/Loading/styles.d.ts +211 -0
  251. package/lib/components/Loading/styles.d.ts.map +1 -0
  252. package/lib/components/Loading/styles.js +77 -0
  253. package/lib/components/Loading/types.d.ts +10 -0
  254. package/lib/components/Loading/types.d.ts.map +1 -0
  255. package/lib/components/Loading/types.js +5 -0
  256. package/lib/components/Modal/Manager.d.ts +6 -0
  257. package/lib/components/Modal/Manager.d.ts.map +1 -0
  258. package/lib/components/Modal/Manager.js +53 -0
  259. package/lib/components/Modal/ResponsiveModalWrapper.d.ts +11 -0
  260. package/lib/components/Modal/ResponsiveModalWrapper.d.ts.map +1 -0
  261. package/lib/components/Modal/ResponsiveModalWrapper.js +82 -0
  262. package/lib/components/Modal/components.d.ts +199 -1
  263. package/lib/components/Modal/components.d.ts.map +1 -1
  264. package/lib/components/Modal/components.js +16 -24
  265. package/lib/components/Modal/index.d.ts +8 -4
  266. package/lib/components/Modal/index.d.ts.map +1 -1
  267. package/lib/components/Modal/index.js +63 -95
  268. package/lib/components/Modal/index.test.js +99 -0
  269. package/lib/components/Modal/schema.d.ts.map +1 -1
  270. package/lib/components/Modal/schema.js +2 -1
  271. package/lib/components/Modal/types.d.ts +2 -1
  272. package/lib/components/Modal/types.d.ts.map +1 -1
  273. package/lib/components/Modal/utils.d.ts +1 -1
  274. package/lib/components/Modal/utils.d.ts.map +1 -1
  275. package/lib/components/Modal/utils.js +7 -5
  276. package/lib/components/Pagination/Pages.d.ts +1 -7
  277. package/lib/components/Pagination/Pages.d.ts.map +1 -1
  278. package/lib/components/Pagination/Pages.js +17 -0
  279. package/lib/components/Pagination/Pagination.d.ts +13 -14
  280. package/lib/components/Pagination/Pagination.d.ts.map +1 -1
  281. package/lib/components/Pagination/Pagination.js +20 -5
  282. package/lib/components/Pagination/Pagination.test.js +14 -0
  283. package/lib/components/Pagination/paginate.d.ts +1 -1
  284. package/lib/components/Pagination/paginate.d.ts.map +1 -1
  285. package/lib/components/Pagination/paginate.js +4 -0
  286. package/lib/components/Pagination/paginate.test.js +38 -17
  287. package/lib/components/Pagination/schema.d.ts.map +1 -1
  288. package/lib/components/Pagination/schema.js +3 -1
  289. package/lib/components/Pagination/types.d.ts +24 -1
  290. package/lib/components/Pagination/types.d.ts.map +1 -1
  291. package/lib/components/PasswordField/IconWrapper.d.ts +198 -0
  292. package/lib/components/PasswordField/IconWrapper.d.ts.map +1 -0
  293. package/lib/components/PasswordField/IconWrapper.js +32 -0
  294. package/lib/components/PasswordField/Input.d.ts +6 -0
  295. package/lib/components/PasswordField/Input.d.ts.map +1 -0
  296. package/lib/components/PasswordField/Input.js +28 -0
  297. package/lib/components/PasswordField/ShowPasswordButton.d.ts +8 -0
  298. package/lib/components/PasswordField/ShowPasswordButton.d.ts.map +1 -0
  299. package/lib/components/PasswordField/ShowPasswordButton.js +48 -0
  300. package/lib/components/PasswordField/index.d.ts +14 -0
  301. package/lib/components/PasswordField/index.d.ts.map +1 -0
  302. package/lib/components/PasswordField/index.js +113 -0
  303. package/lib/components/PasswordField/index.test.js +217 -0
  304. package/lib/components/PasswordField/schema.d.ts +3 -0
  305. package/lib/components/PasswordField/schema.d.ts.map +1 -0
  306. package/lib/components/PasswordField/schema.js +27 -0
  307. package/lib/components/Popover/Arrow.d.ts +2 -2
  308. package/lib/components/Popover/index.d.ts.map +1 -1
  309. package/lib/components/Popover/index.js +25 -10
  310. package/lib/components/Popover/schema.d.ts.map +1 -1
  311. package/lib/components/Popover/schema.js +28 -20
  312. package/lib/components/Popover/types.d.ts +6 -2
  313. package/lib/components/Popover/types.d.ts.map +1 -1
  314. package/lib/components/SearchInput/index.d.ts +11 -0
  315. package/lib/components/SearchInput/index.d.ts.map +1 -0
  316. package/lib/components/SearchInput/index.js +179 -0
  317. package/lib/components/SearchInput/index.test.js +660 -0
  318. package/lib/components/SearchInput/schema.d.ts +3 -0
  319. package/lib/components/SearchInput/schema.d.ts.map +1 -0
  320. package/lib/components/SearchInput/schema.js +38 -0
  321. package/lib/components/SearchInput/styles.d.ts +1176 -0
  322. package/lib/components/SearchInput/styles.d.ts.map +1 -0
  323. package/lib/components/SearchInput/styles.js +97 -0
  324. package/lib/components/SearchInput/types.d.ts +39 -0
  325. package/lib/components/SearchInput/types.d.ts.map +1 -0
  326. package/lib/components/SearchInput/types.js +5 -0
  327. package/lib/components/Select/Target.d.ts.map +1 -1
  328. package/lib/components/Select/Target.js +5 -1
  329. package/lib/components/Select/index.d.ts.map +1 -1
  330. package/lib/components/Select/index.js +7 -3
  331. package/lib/components/Select/index.test.js +43 -19
  332. package/lib/components/Select/schema.d.ts.map +1 -1
  333. package/lib/components/Select/schema.js +2 -0
  334. package/lib/components/Select/types.d.ts +2 -0
  335. package/lib/components/Select/types.d.ts.map +1 -1
  336. package/lib/components/SelectDate/Target.d.ts.map +1 -1
  337. package/lib/components/SelectDate/Target.js +5 -1
  338. package/lib/components/SelectDate/index.d.ts.map +1 -1
  339. package/lib/components/SelectDate/index.js +7 -3
  340. package/lib/components/SelectDate/schema.d.ts.map +1 -1
  341. package/lib/components/SelectDate/schema.js +1 -0
  342. package/lib/components/SelectDate/types.d.ts +1 -0
  343. package/lib/components/SelectDate/types.d.ts.map +1 -1
  344. package/lib/components/SelectDateRange/index.d.ts.map +1 -1
  345. package/lib/components/SelectDateRange/index.js +6 -2
  346. package/lib/components/SelectDateRange/schema.d.ts.map +1 -1
  347. package/lib/components/SelectDateRange/schema.js +1 -0
  348. package/lib/components/StepTracker/index.d.ts +11 -0
  349. package/lib/components/StepTracker/index.d.ts.map +1 -0
  350. package/lib/components/StepTracker/index.js +56 -0
  351. package/lib/components/StepTracker/index.test.js +89 -0
  352. package/lib/components/StepTracker/schema.d.ts +3 -0
  353. package/lib/components/StepTracker/schema.d.ts.map +1 -0
  354. package/lib/components/StepTracker/schema.js +19 -0
  355. package/lib/components/StepTracker/styles.d.ts +605 -0
  356. package/lib/components/StepTracker/styles.d.ts.map +1 -0
  357. package/lib/components/StepTracker/styles.js +114 -0
  358. package/lib/components/Table/Body.d.ts.map +1 -1
  359. package/lib/components/Table/Body.js +2 -5
  360. package/lib/components/Table/Container.d.ts.map +1 -1
  361. package/lib/components/Table/Container.js +6 -1
  362. package/lib/components/Table/Grip.d.ts +6 -2
  363. package/lib/components/Table/Grip.d.ts.map +1 -1
  364. package/lib/components/Table/Grip.js +9 -3
  365. package/lib/components/Table/index.js +1 -1
  366. package/lib/components/Tabs/Tab/index.d.ts +13 -0
  367. package/lib/components/Tabs/Tab/index.d.ts.map +1 -0
  368. package/lib/components/Tabs/Tab/index.js +94 -0
  369. package/lib/components/Tabs/Tab/schema.d.ts +3 -0
  370. package/lib/components/Tabs/Tab/schema.d.ts.map +1 -0
  371. package/lib/components/Tabs/Tab/styles.d.ts +7 -0
  372. package/lib/components/Tabs/Tab/styles.d.ts.map +1 -0
  373. package/lib/components/Tabs/Tab/styles.js +37 -0
  374. package/lib/components/Tabs/context.d.ts +2 -2
  375. package/lib/components/Tabs/context.d.ts.map +1 -1
  376. package/lib/components/Tabs/context.js +1 -1
  377. package/lib/components/Tabs/index.d.ts +17 -6
  378. package/lib/components/Tabs/index.d.ts.map +1 -1
  379. package/lib/components/Tabs/index.js +104 -163
  380. package/lib/components/Tabs/index.test.js +54 -2
  381. package/lib/components/Tabs/styles.d.ts +4 -0
  382. package/lib/components/Tabs/styles.d.ts.map +1 -0
  383. package/lib/components/Tabs/styles.js +35 -0
  384. package/lib/components/Tag/Action.d.ts +4 -0
  385. package/lib/components/Tag/Action.d.ts.map +1 -0
  386. package/lib/components/Tag/Action.js +39 -0
  387. package/lib/components/Tag/constants.d.ts +2 -2
  388. package/lib/components/Tag/constants.d.ts.map +1 -1
  389. package/lib/components/Tag/constants.js +4 -4
  390. package/lib/components/Tag/index.d.ts +1 -3
  391. package/lib/components/Tag/index.d.ts.map +1 -1
  392. package/lib/components/Tag/index.js +40 -97
  393. package/lib/components/Tag/index.test.js +239 -2
  394. package/lib/components/Tag/propTypes.d.ts +4 -1
  395. package/lib/components/Tag/propTypes.d.ts.map +1 -1
  396. package/lib/components/Tag/propTypes.js +5 -2
  397. package/lib/components/Tag/schema.d.ts.map +1 -1
  398. package/lib/components/Tag/schema.js +3 -1
  399. package/lib/components/Tag/styles.d.ts +13 -0
  400. package/lib/components/Tag/styles.d.ts.map +1 -0
  401. package/lib/components/Tag/styles.js +133 -0
  402. package/lib/components/Tag/types.d.ts +11 -12
  403. package/lib/components/Tag/types.d.ts.map +1 -1
  404. package/lib/components/TagInput/index.d.ts +5 -0
  405. package/lib/components/TagInput/index.d.ts.map +1 -0
  406. package/lib/components/TagInput/index.js +363 -0
  407. package/lib/components/TagInput/index.test.js +1143 -0
  408. package/lib/components/TagInput/schema.d.ts +3 -0
  409. package/lib/components/TagInput/schema.d.ts.map +1 -0
  410. package/lib/components/TagInput/schema.js +36 -0
  411. package/lib/components/TagInput/styles.d.ts +10 -0
  412. package/lib/components/TagInput/styles.d.ts.map +1 -0
  413. package/lib/components/TagInput/styles.js +52 -0
  414. package/lib/components/TagInput/types.d.ts +21 -0
  415. package/lib/components/TagInput/types.d.ts.map +1 -0
  416. package/lib/components/TagInput/types.js +5 -0
  417. package/lib/components/Toggle/Fieldset.d.ts.map +1 -1
  418. package/lib/components/Toggle/Fieldset.js +20 -11
  419. package/lib/components/Toggle/Option.d.ts.map +1 -1
  420. package/lib/components/Toggle/Option.js +1 -1
  421. package/lib/components/Toggle/Slider.d.ts +1 -3
  422. package/lib/components/Toggle/Slider.d.ts.map +1 -1
  423. package/lib/components/Toggle/Slider.js +29 -24
  424. package/lib/components/Toggle/index.d.ts.map +1 -1
  425. package/lib/components/Toggle/index.js +2 -1
  426. package/lib/components/Toggle/propTypes.js +1 -1
  427. package/lib/components/Toggle/schema.js +1 -1
  428. package/lib/components/Toggle/types.d.ts +3 -2
  429. package/lib/components/Toggle/types.d.ts.map +1 -1
  430. package/lib/components/ToggleView/ToggleView.d.ts +5 -0
  431. package/lib/components/ToggleView/ToggleView.d.ts.map +1 -0
  432. package/lib/components/ToggleView/ToggleView.js +80 -0
  433. package/lib/components/ToggleView/index.d.ts +4 -0
  434. package/lib/components/ToggleView/index.d.ts.map +1 -0
  435. package/lib/components/ToggleView/index.js +33 -0
  436. package/lib/components/ToggleView/index.test.js +61 -0
  437. package/lib/components/ToggleView/schema.d.ts +3 -0
  438. package/lib/components/ToggleView/schema.d.ts.map +1 -0
  439. package/lib/components/ToggleView/schema.js +24 -0
  440. package/lib/components/ToggleView/styles.d.ts +6 -0
  441. package/lib/components/ToggleView/styles.d.ts.map +1 -0
  442. package/lib/components/ToggleView/styles.js +23 -0
  443. package/lib/components/ToggleView/types.d.ts +23 -0
  444. package/lib/components/ToggleView/types.d.ts.map +1 -0
  445. package/lib/components/ToggleView/types.js +12 -0
  446. package/lib/components/Tooltip/index.d.ts.map +1 -1
  447. package/lib/components/Tooltip/index.js +3 -13
  448. package/lib/components/Tooltip/schema.d.ts +3 -0
  449. package/lib/components/Tooltip/schema.d.ts.map +1 -0
  450. package/lib/components/Tooltip/schema.js +29 -0
  451. package/lib/components/TopNav/Menu/index.d.ts +1 -1
  452. package/lib/components/TopNav/index.d.ts +1 -1
  453. package/lib/components/Typography/withColors.d.ts +1 -1
  454. package/lib/components/Typography/withColors.d.ts.map +1 -1
  455. package/lib/components/Typography/withColors.js +1 -1
  456. package/lib/components/Wizard/index.d.ts +33 -0
  457. package/lib/components/Wizard/index.d.ts.map +1 -0
  458. package/lib/components/Wizard/index.js +161 -0
  459. package/lib/components/Wizard/index.test.js +940 -0
  460. package/lib/components/Wizard/schema.d.ts +3 -0
  461. package/lib/components/Wizard/schema.d.ts.map +1 -0
  462. package/lib/components/Wizard/schema.js +42 -0
  463. package/lib/components/Wizard/styles.d.ts +990 -0
  464. package/lib/components/Wizard/styles.d.ts.map +1 -0
  465. package/lib/components/Wizard/styles.js +79 -0
  466. package/lib/components/index.d.ts +11 -1
  467. package/lib/components/index.d.ts.map +1 -1
  468. package/lib/components/index.js +196 -1
  469. package/lib/modifiers/palette.d.ts +36 -0
  470. package/lib/modifiers/palette.d.ts.map +1 -0
  471. package/lib/modifiers/palette.js +88 -0
  472. package/lib/modifiers/spacingSchema.d.ts.map +1 -1
  473. package/lib/modifiers/spacingSchema.js +29 -16
  474. package/lib/providers/ConfigProvider/utils/linkRenderer.d.ts +2 -1
  475. package/lib/providers/ConfigProvider/utils/linkRenderer.d.ts.map +1 -1
  476. package/lib/providers/ConfigProvider/utils/translations.d.ts +45 -1
  477. package/lib/providers/ConfigProvider/utils/translations.d.ts.map +1 -1
  478. package/lib/providers/ConfigProvider/utils/translations.js +46 -2
  479. package/lib/types/index.d.ts +2 -0
  480. package/lib/types/index.d.ts.map +1 -0
  481. package/lib/types/index.js +5 -0
  482. package/lib/utils/commonUIColors.d.ts +351 -3
  483. package/lib/utils/commonUIColors.d.ts.map +1 -1
  484. package/lib/utils/commonUIColors.js +6 -2
  485. package/lib/utils/useDebounce.d.ts +2 -0
  486. package/lib/utils/useDebounce.d.ts.map +1 -0
  487. package/lib/utils/useDebounce.js +37 -0
  488. package/lib/utils/useStackingContext.d.ts +12 -0
  489. package/lib/utils/useStackingContext.d.ts.map +1 -0
  490. package/lib/utils/useStackingContext.js +46 -0
  491. package/package.json +26 -13
  492. package/CHANGELOG.md +0 -796
  493. package/lib/atoms/OptionsList/Category.d.ts +0 -4
  494. package/lib/atoms/OptionsList/Category.d.ts.map +0 -1
  495. package/lib/atoms/OptionsList/Category.js +0 -53
  496. package/lib/atoms/OptionsList/Option.d.ts.map +0 -1
  497. package/lib/atoms/OptionsList/Option.js +0 -197
  498. package/lib/components/Tabs/Tab.d.ts +0 -5
  499. package/lib/components/Tabs/Tab.d.ts.map +0 -1
  500. package/lib/components/Tabs/Tab.js +0 -109
  501. package/lib/components/Tabs/schema.tab.d.ts.map +0 -1
  502. package/lib/components/Tabs/types.d.ts +0 -27
  503. package/lib/components/Tabs/types.d.ts.map +0 -1
  504. package/lib/components/Tag/ActionButton.d.ts +0 -5
  505. package/lib/components/Tag/ActionButton.d.ts.map +0 -1
  506. package/lib/components/Tag/ActionButton.js +0 -56
  507. /package/lib/components/{Tabs → Link}/types.js +0 -0
  508. /package/lib/components/Tabs/{schema.tab.js → Tab/schema.js} +0 -0
@@ -19,6 +19,8 @@ exports.default = void 0;
19
19
 
20
20
  var _react = _interopRequireWildcard(require("react"));
21
21
 
22
+ var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
23
+
22
24
  var _useTranslations = _interopRequireDefault(require("../../utils/useTranslations"));
23
25
 
24
26
  var _AvatarContainer = _interopRequireDefault(require("./AvatarContainer"));
@@ -35,29 +37,63 @@ var _types = require("./types");
35
37
 
36
38
  var _schema = _interopRequireDefault(require("./schema"));
37
39
 
40
+ var _useGravatar3 = _interopRequireDefault(require("./hooks/useGravatar"));
41
+
38
42
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
39
43
 
40
44
  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; } }
41
45
 
46
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
47
+
48
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
49
+
50
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
51
+
52
+ function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
53
+
54
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
55
+
42
56
  function Avatar(props, ref) {
43
57
  var ariaLabel = props['aria-label'],
44
58
  email = props.email,
45
59
  entityType = props.entityType,
60
+ color = props.color,
46
61
  kind = props.kind,
47
62
  name = props.name,
63
+ palette = props.palette,
48
64
  size = props.size,
49
65
  indicatorColor = props.indicatorColor;
50
66
  var translate = (0, _useTranslations.default)();
67
+
68
+ var _useGravatar = (0, _useGravatar3.default)(props),
69
+ _useGravatar2 = _slicedToArray(_useGravatar, 2),
70
+ gravatarProps = _useGravatar2[0],
71
+ shouldUseGravatar = _useGravatar2[1];
72
+
73
+ (0, _react.useEffect)(function () {
74
+ if (!(0, _isEmpty.default)(kind)) {
75
+ // eslint-disable-next-line no-console
76
+ console.warn('[decisiv] The `kind` prop for the `Avatar` component has been deprecated. Use `color` + `palette` instead.');
77
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
78
+
79
+ }, []); // This is done to not break the now deprecated `secondary` kind variant. Should be removed in the future.
80
+
81
+ var componentColor = kind === 'secondary' ? 'licoriceMousse' : color;
51
82
  return _react.default.createElement(_AvatarContainer.default, {
52
83
  ref: ref,
53
- kind: kind,
54
- size: size
84
+ size: size,
85
+ palette: palette,
86
+ color: componentColor,
87
+ shouldUseGravatar: shouldUseGravatar
55
88
  }, _react.default.createElement("span", {
56
89
  "aria-label": translate(ariaLabel, 'avatar.aria.label', {
57
90
  descriptor: name || email || entityType
58
91
  }),
59
92
  role: "img"
60
- }, _react.default.createElement(_AvatarContent.default, props)), indicatorColor && indicatorColor in _commonUIColors.commonUIColors && _react.default.createElement(_AvatarIndicator.default, {
93
+ }, _react.default.createElement(_AvatarContent.default, _extends({
94
+ gravatarProps: gravatarProps,
95
+ shouldUseGravatar: shouldUseGravatar
96
+ }, props))), indicatorColor && indicatorColor in _commonUIColors.commonUIColors && _react.default.createElement(_AvatarIndicator.default, {
61
97
  size: size,
62
98
  color: indicatorColor
63
99
  }));
@@ -68,10 +104,11 @@ AvatarWithRef.propTypes = _schema.default.propTypes;
68
104
  AvatarWithRef.defaultProps = {
69
105
  email: undefined,
70
106
  entityType: _constants.entityTypes.person,
71
- kind: _constants.kinds.primary,
72
107
  name: undefined,
73
108
  size: _constants.sizes.medium,
74
- indicatorColor: undefined
109
+ indicatorColor: undefined,
110
+ color: 'information',
111
+ palette: 'bright'
75
112
  };
76
113
  var _default = AvatarWithRef;
77
114
  exports.default = _default;
@@ -10,6 +10,8 @@ var _constants = require("./constants");
10
10
 
11
11
  var _commonUIColors = require("../../utils/commonUIColors");
12
12
 
13
+ var _palette = require("../../modifiers/palette");
14
+
13
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
16
 
15
17
  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; }
@@ -25,6 +27,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
25
27
  var modifierMap = {
26
28
  kind: Object.values(_constants.kinds),
27
29
  size: Object.values(_constants.sizes),
30
+ palette: Object.keys(_palette.PALETTE_MAPPER),
31
+ color: Object.keys(_commonUIColors.commonUIColors),
28
32
  indicatorColor: Object.keys(_commonUIColors.commonUIColors)
29
33
  };
30
34
  describe('Avatar', function () {
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/schema.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,MAAM,KAAsC,CAAC;AA4BnD,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/schema.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,MAAM,KAAsC,CAAC;AAwCnD,eAAe,MAAM,CAAC"}
@@ -15,8 +15,10 @@ var schema = (0, _reactDesc.describe)({
15
15
  });
16
16
  schema.propTypes = {
17
17
  email: _reactDesc.PropTypes.string.description("The entity's email address. Used in Gravatar image lookup."),
18
+ color: _reactDesc.PropTypes.string.description('(See note) Sets the color for the background and the icon').defaultValue('information'),
18
19
  entityType: _reactDesc.PropTypes.oneOf(Object.values(_constants.entityTypes)).description('Selects the entity type represented.').defaultValue('person'),
19
- kind: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.oneOf(Object.values(_constants.kinds))]).description('Selects the kind of Avatar.').defaultValue('primary'),
20
+ palette: _reactDesc.PropTypes.oneOf(['bright', 'pastel', 'dark']).description('What color variant to render').defaultValue('bright'),
21
+ kind: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.oneOf(Object.values(_constants.kinds))]).description('***DEPRECATED*** Use color + palette instead. Selects the kind of Avatar.').defaultValue('primary').format('***DEPRECATED*** string').deprecated('Use color + palette instead'),
20
22
  name: _reactDesc.PropTypes.string.description("The entity's name. First letter of first and last words used to generate initials."),
21
23
  size: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.oneOf(Object.values(_constants.sizes))]).description('Selects the size desired.'),
22
24
  indicatorColor: _reactDesc.PropTypes.string.description('(See note) Sets the indicator color')
@@ -1,14 +1,27 @@
1
- import { Ref } from 'react';
1
+ import { HTMLAttributes, Ref } from 'react';
2
2
  import { entityTypes, kinds, sizes } from './constants';
3
3
  import { CommonUIColorKeys } from '../../utils/commonUIColors';
4
+ import { GravatarProps, ShouldUseGravatar } from './hooks/useGravatar';
4
5
  export declare type AvatarRef = HTMLDivElement;
5
- export interface AvatarProps extends React.HTMLAttributes<HTMLElement> {
6
+ export interface AvatarProps extends HTMLAttributes<HTMLElement> {
7
+ color?: CommonUIColorKeys;
6
8
  email?: string;
7
9
  entityType?: keyof typeof entityTypes;
8
10
  indicatorColor?: CommonUIColorKeys;
9
11
  kind?: keyof typeof kinds;
10
12
  name?: string;
13
+ palette?: 'pastel' | 'bright' | 'dark';
11
14
  ref?: Ref<AvatarRef>;
12
15
  size?: keyof typeof sizes;
13
16
  }
17
+ export interface AvatarContentProps extends AvatarProps {
18
+ gravatarProps: GravatarProps;
19
+ shouldUseGravatar: ShouldUseGravatar;
20
+ }
21
+ export interface AvatarContainerProps {
22
+ color?: CommonUIColorKeys;
23
+ palette?: 'pastel' | 'bright' | 'dark';
24
+ size?: keyof typeof sizes;
25
+ shouldUseGravatar: ShouldUseGravatar;
26
+ }
14
27
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,oBAAY,SAAS,GAAG,cAAc,CAAC;AAEvC,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACtC,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,OAAO,KAAK,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,OAAO,KAAK,CAAC;CAC3B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEvE,oBAAY,SAAS,GAAG,cAAc,CAAC;AAEvC,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,WAAW,CAAC;IAC9D,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACtC,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,OAAO,KAAK,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IACvC,GAAG,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,OAAO,KAAK,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,aAAa,EAAE,aAAa,CAAC;IAC7B,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,OAAO,KAAK,CAAC;IAC1B,iBAAiB,EAAE,iBAAiB,CAAC;CACtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAmB,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAQvE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAA2B,MAAM,SAAS,CAAC;AAExE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;AAsDhC,QAAA,MAAM,YAAY,EAAE,sBAAsB,CAAC,QAAQ,EAAE,UAAU,CAE9D,CAAC;AAQF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAmB,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAA2B,MAAM,SAAS,CAAC;AAIxE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;AAWhC,QAAA,MAAM,YAAY,EAAE,sBAAsB,CAAC,QAAQ,EAAE,UAAU,CAE9D,CAAC;AAQF,eAAe,YAAY,CAAC"}
@@ -19,21 +19,9 @@ exports.default = void 0;
19
19
 
20
20
  var _react = _interopRequireWildcard(require("react"));
21
21
 
22
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
23
-
24
- var _styledComponentsModifiers = require("styled-components-modifiers");
25
-
26
- var _color = _interopRequireDefault(require("../../modifiers/color"));
27
-
28
- var _constants = require("./constants");
29
-
30
- var _commonUIColors = require("../../utils/commonUIColors");
31
-
32
- var _utils = require("../../utils");
33
-
34
22
  var _types = require("./types");
35
23
 
36
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
+ var _styles = require("./styles");
37
25
 
38
26
  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; } }
39
27
 
@@ -43,57 +31,13 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
43
31
 
44
32
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
45
33
 
46
- var colorModifiers = (0, _utils.applyDynamicModifiers)('color', function (_ref) {
47
- var color = _ref.color;
48
- return (0, _styledComponents.css)(["", ""], color && color in _commonUIColors.commonUIColors && (0, _color.default)(_commonUIColors.commonUIColors[color]));
49
- });
50
-
51
- var getSizeStyles = function getSizeStyles(key) {
52
- return (0, _styledComponents.css)(_constants.sizeStyles[key] || '');
53
- };
54
-
55
- var sizeModifiers = (0, _styledComponentsModifiers.applyStyleModifiers)({
56
- small: function small(_ref2) {
57
- var v = _ref2.variant;
58
- return getSizeStyles("small.".concat(v));
59
- },
60
- medium: function medium(_ref3) {
61
- var v = _ref3.variant;
62
- return getSizeStyles("medium.".concat(v));
63
- },
64
- large: function large(_ref4) {
65
- var v = _ref4.variant;
66
- return getSizeStyles("large.".concat(v));
67
- }
68
- }, 'size');
69
- var variantModifiers = (0, _styledComponentsModifiers.applyStyleModifiers)({
70
- round: function round() {
71
- return (0, _styledComponents.css)({
72
- borderRadius: '50%'
73
- });
74
- },
75
- square: function square() {
76
- return (0, _styledComponents.css)({
77
- borderRadius: '2px'
78
- });
79
- }
80
- }, 'variant'); // The default coloring is explicitly set instead of relying on the
81
- // `visualInterest.licoriceMousse.medium` colors. The "default" badge is
82
- // intended to be used in “empty” and/or “no results” messages, the snowWhite
83
- // fg color and lower contrast help convey “emptiness”.
84
-
85
- var BadgeContainer = _styledComponents.default.div.withConfig({
86
- displayName: "Badge__BadgeContainer",
87
- componentId: "sc-1y6oxgp-0"
88
- })(["align-items:center;display:inline-flex;justify-content:center;", ";", ";", ";", ";"], (0, _color.default)(_commonUIColors.commonUIColors.information), colorModifiers, sizeModifiers, variantModifiers);
89
-
90
34
  function Badge(props, containerRef) {
91
35
  var ariaLabel = props['aria-label'],
92
36
  Icon = props.icon,
93
37
  size = props.size,
94
38
  rest = _objectWithoutProperties(props, ["aria-label", "icon", "size"]);
95
39
 
96
- return _react.default.createElement(BadgeContainer, _extends({
40
+ return _react.default.createElement(_styles.BadgeContainer, _extends({
97
41
  ref: containerRef,
98
42
  size: size
99
43
  }, rest), _react.default.createElement(Icon, {
@@ -55,12 +55,23 @@ describe('Badge', function () {
55
55
  expect(container).toMatchSnapshot();
56
56
  });
57
57
  });
58
+ ['bright', 'pastel'].forEach(function (palette) {
59
+ it("renders correctly with palette=\"".concat(palette, "\""), function () {
60
+ var _renderBadge3 = renderBadge({
61
+ palette: palette,
62
+ color: 'carrotCake'
63
+ }),
64
+ container = _renderBadge3.container;
65
+
66
+ expect(container).toMatchSnapshot();
67
+ });
68
+ });
58
69
  it("renders correctly with size=\"small\" and variant=\"square\"", function () {
59
- var _renderBadge3 = renderBadge({
70
+ var _renderBadge4 = renderBadge({
60
71
  size: 'small',
61
72
  variant: 'square'
62
73
  }),
63
- container = _renderBadge3.container;
74
+ container = _renderBadge4.container;
64
75
 
65
76
  expect(container).toMatchSnapshot();
66
77
  });
@@ -70,10 +81,10 @@ describe('Badge', function () {
70
81
  key = _ref2[0],
71
82
  value = _ref2[1];
72
83
 
73
- var _renderBadge4 = renderBadge({
84
+ var _renderBadge5 = renderBadge({
74
85
  color: key
75
86
  }),
76
- container = _renderBadge4.container;
87
+ container = _renderBadge5.container;
77
88
 
78
89
  expect(container.firstChild).toHaveStyleRule('background-color', (0, _toColorString.default)(value));
79
90
  });
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAAqC,CAAC;AAwBlD,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAAqC,CAAC;AA4BlD,eAAe,MAAM,CAAC"}
@@ -15,6 +15,7 @@ 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
+ palette: _reactDesc.PropTypes.oneOf(['bright', 'pastel']).description('What color variant to render').defaultValue('bright'),
18
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
  };
@@ -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,97 @@
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
+ _props$color = props.color,
42
+ color = _props$color === void 0 ? 'information' : _props$color;
43
+
44
+ if (color && color in _commonUIColors.commonUIColors) {
45
+ var baseColor = _commonUIColors.commonUIThreeShadeColors[color];
46
+ var fgColor = palette === 'bright' ? _designTokens.color.base.snowWhite : baseColor[FG_COLOR[palette]];
47
+ var bgColor = baseColor[PALETTE_MAPPER[palette]];
48
+ var colorPalette = palette === 'bright' ? bgColor : _objectSpread({}, bgColor, {
49
+ fg: fgColor
50
+ });
51
+ return (0, _styledComponents.css)(["", ""], (0, _color.default)(colorPalette));
52
+ }
53
+
54
+ return null;
55
+ };
56
+
57
+ var getSizeStyles = function getSizeStyles(key) {
58
+ return (0, _styledComponents.css)(_constants.sizeStyles[key] || '');
59
+ };
60
+
61
+ var sizeModifiers = (0, _styledComponentsModifiers.applyStyleModifiers)({
62
+ small: function small(_ref) {
63
+ var v = _ref.variant;
64
+ return getSizeStyles("small.".concat(v));
65
+ },
66
+ medium: function medium(_ref2) {
67
+ var v = _ref2.variant;
68
+ return getSizeStyles("medium.".concat(v));
69
+ },
70
+ large: function large(_ref3) {
71
+ var v = _ref3.variant;
72
+ return getSizeStyles("large.".concat(v));
73
+ }
74
+ }, 'size');
75
+ var variantModifiers = (0, _styledComponentsModifiers.applyStyleModifiers)({
76
+ round: function round() {
77
+ return (0, _styledComponents.css)({
78
+ borderRadius: '50%'
79
+ });
80
+ },
81
+ square: function square() {
82
+ return (0, _styledComponents.css)({
83
+ borderRadius: '2px'
84
+ });
85
+ }
86
+ }, 'variant'); // The default coloring is explicitly set instead of relying on the
87
+ // `visualInterest.licoriceMousse.medium` colors. The "default" badge is
88
+ // intended to be used in “empty” and/or “no results” messages, the snowWhite
89
+ // fg color and lower contrast help convey “emptiness”.
90
+ // eslint-disable-next-line import/prefer-default-export
91
+
92
+ var BadgeContainer = _styledComponents.default.div.withConfig({
93
+ displayName: "styles__BadgeContainer",
94
+ componentId: "sc-1lruwqa-0"
95
+ })(["align-items:center;display:inline-flex;justify-content:center;", ";", ";", ";"], colorModifiers, sizeModifiers, variantModifiers);
96
+
97
+ exports.BadgeContainer = BadgeContainer;
@@ -8,12 +8,13 @@ export interface BadgeProps {
8
8
  'aria-label': string;
9
9
  color?: CommonUIColorKeys;
10
10
  icon: IconComponent;
11
+ palette?: 'pastel' | 'bright';
11
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;
@@ -21,6 +22,7 @@ export declare const propTypes: {
21
22
  export declare const defaultProps: {
22
23
  size: string;
23
24
  variant: string;
25
+ color: string;
24
26
  };
25
27
  export {};
26
28
  //# sourceMappingURL=types.d.ts.map
@@ -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;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,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"}
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;;;;CAIxB,CAAC"}
@@ -43,6 +43,7 @@ var propTypes = {
43
43
  exports.propTypes = propTypes;
44
44
  var defaultProps = {
45
45
  size: 'medium',
46
- variant: 'round'
46
+ variant: 'round',
47
+ color: 'information'
47
48
  };
48
49
  exports.defaultProps = defaultProps;
@@ -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"}