@decisiv/ui-components 2.0.1-alpha.17 → 2.0.1-alpha.173

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 (469) 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/InputLabel.d.ts +1 -0
  24. package/lib/atoms/InputField/InputLabel.d.ts.map +1 -1
  25. package/lib/atoms/InputField/InputLabel.js +2 -1
  26. package/lib/atoms/InputField/index.d.ts +6 -0
  27. package/lib/atoms/InputField/index.d.ts.map +1 -1
  28. package/lib/atoms/InputField/index.js +25 -8
  29. package/lib/atoms/InputField/index.test.js +91 -0
  30. package/lib/atoms/InputField/schema.d.ts.map +1 -1
  31. package/lib/atoms/InputField/schema.js +3 -2
  32. package/lib/atoms/OptionsList/Category.d.ts +1 -1
  33. package/lib/atoms/OptionsList/Category.d.ts.map +1 -1
  34. package/lib/atoms/OptionsList/Category.js +4 -2
  35. package/lib/atoms/OptionsList/Footer.d.ts +8 -0
  36. package/lib/atoms/OptionsList/Footer.d.ts.map +1 -0
  37. package/lib/atoms/OptionsList/Footer.js +72 -0
  38. package/lib/atoms/OptionsList/Option.d.ts.map +1 -1
  39. package/lib/atoms/OptionsList/Option.js +24 -9
  40. package/lib/atoms/OptionsList/index.d.ts.map +1 -1
  41. package/lib/atoms/OptionsList/index.js +44 -17
  42. package/lib/atoms/OptionsList/index.test.js +127 -17
  43. package/lib/atoms/OptionsList/schema.d.ts.map +1 -1
  44. package/lib/atoms/OptionsList/schema.js +5 -0
  45. package/lib/atoms/OptionsList/types.d.ts +15 -0
  46. package/lib/atoms/OptionsList/types.d.ts.map +1 -1
  47. package/lib/atoms/OptionsList/types.js +5 -1
  48. package/lib/atoms/RequiredIcon.d.ts +9 -0
  49. package/lib/atoms/RequiredIcon.d.ts.map +1 -0
  50. package/lib/atoms/{InputField/RequiredIcon.js → RequiredIcon.js} +7 -3
  51. package/lib/components/Accordion/types.js +5 -1
  52. package/lib/components/Accordion/useAccordion/types.js +5 -1
  53. package/lib/components/Alert/Container.d.ts +201 -0
  54. package/lib/components/Alert/Container.d.ts.map +1 -0
  55. package/lib/components/Alert/Container.js +26 -0
  56. package/lib/components/Alert/StyledButton.d.ts +5 -0
  57. package/lib/components/Alert/StyledButton.d.ts.map +1 -0
  58. package/lib/components/Alert/StyledButton.js +23 -0
  59. package/lib/components/Alert/index.d.ts +27 -0
  60. package/lib/components/Alert/index.d.ts.map +1 -0
  61. package/lib/components/Alert/index.js +112 -0
  62. package/lib/components/Alert/index.test.js +79 -0
  63. package/lib/components/Alert/intents.d.ts +13 -0
  64. package/lib/components/Alert/intents.d.ts.map +1 -0
  65. package/lib/components/Alert/intents.js +72 -0
  66. package/lib/components/{Tabs/schema.tab.d.ts → Alert/schema.d.ts} +1 -1
  67. package/lib/components/Alert/schema.d.ts.map +1 -0
  68. package/lib/components/Alert/schema.js +25 -0
  69. package/lib/components/Alert/types.d.ts +36 -0
  70. package/lib/components/Alert/types.d.ts.map +1 -0
  71. package/lib/components/Alert/types.js +32 -0
  72. package/lib/components/Avatar/types.js +5 -1
  73. package/lib/components/Badge/constants.d.ts +2 -0
  74. package/lib/components/Badge/constants.d.ts.map +1 -0
  75. package/lib/components/Badge/constants.js +29 -0
  76. package/lib/components/Badge/index.d.ts.map +1 -1
  77. package/lib/components/Badge/index.js +12 -23
  78. package/lib/components/Badge/index.test.js +51 -8
  79. package/lib/components/Badge/schema.js +1 -1
  80. package/lib/components/Badge/types.d.ts +1 -1
  81. package/lib/components/Badge/types.d.ts.map +1 -1
  82. package/lib/components/Badge/types.js +7 -3
  83. package/lib/components/Breadcrumbs/types.js +5 -1
  84. package/lib/components/Button/StyledButton.d.ts +3 -2
  85. package/lib/components/Button/StyledButton.d.ts.map +1 -1
  86. package/lib/components/Button/StyledButton.js +21 -7
  87. package/lib/components/Button/index.d.ts.map +1 -1
  88. package/lib/components/Button/index.js +19 -9
  89. package/lib/components/Button/index.test.js +24 -8
  90. package/lib/components/Button/schema.d.ts +6 -1
  91. package/lib/components/Button/schema.d.ts.map +1 -1
  92. package/lib/components/Button/schema.js +11 -5
  93. package/lib/components/Button/types.d.ts +2 -1
  94. package/lib/components/Button/types.d.ts.map +1 -1
  95. package/lib/components/Button/types.js +5 -1
  96. package/lib/components/Checkbox/index.d.ts.map +1 -1
  97. package/lib/components/Checkbox/index.js +3 -1
  98. package/lib/components/Checkbox/schema.d.ts.map +1 -1
  99. package/lib/components/Checkbox/schema.js +2 -0
  100. package/lib/components/Combobox/Target.d.ts.map +1 -1
  101. package/lib/components/Combobox/Target.js +52 -14
  102. package/lib/components/Combobox/index.d.ts.map +1 -1
  103. package/lib/components/Combobox/index.js +196 -66
  104. package/lib/components/Combobox/index.test.js +369 -146
  105. package/lib/components/Combobox/schema.d.ts.map +1 -1
  106. package/lib/components/Combobox/schema.js +10 -2
  107. package/lib/components/Combobox/types.d.ts +12 -3
  108. package/lib/components/Combobox/types.d.ts.map +1 -1
  109. package/lib/components/Combobox/types.js +5 -1
  110. package/lib/components/Drawer/index.d.ts +22 -0
  111. package/lib/components/Drawer/index.d.ts.map +1 -0
  112. package/lib/components/Drawer/index.js +105 -0
  113. package/lib/components/Drawer/index.test.js +122 -0
  114. package/lib/components/Drawer/schema.d.ts +3 -0
  115. package/lib/components/Drawer/schema.d.ts.map +1 -0
  116. package/lib/components/Drawer/schema.js +32 -0
  117. package/lib/components/Drawer/styles.d.ts +11 -0
  118. package/lib/components/Drawer/styles.d.ts.map +1 -0
  119. package/lib/components/Drawer/styles.js +79 -0
  120. package/lib/components/DropdownList/index.d.ts +4 -0
  121. package/lib/components/DropdownList/index.d.ts.map +1 -1
  122. package/lib/components/DropdownList/index.js +76 -11
  123. package/lib/components/DropdownList/propTypes.d.ts +4 -0
  124. package/lib/components/DropdownList/propTypes.d.ts.map +1 -0
  125. package/lib/components/DropdownList/propTypes.js +42 -0
  126. package/lib/components/DropdownList/schema.d.ts.map +1 -1
  127. package/lib/components/DropdownList/schema.js +6 -1
  128. package/lib/components/DropdownList/types.d.ts +4 -1
  129. package/lib/components/DropdownList/types.d.ts.map +1 -1
  130. package/lib/components/Filter/IconWrapper/index.d.ts +197 -0
  131. package/lib/components/Filter/IconWrapper/index.d.ts.map +1 -0
  132. package/lib/components/Filter/IconWrapper/index.js +35 -0
  133. package/lib/components/Filter/SimplePrimary/index.d.ts +31 -0
  134. package/lib/components/Filter/SimplePrimary/index.d.ts.map +1 -0
  135. package/lib/components/Filter/SimplePrimary/index.js +58 -0
  136. package/lib/components/Filter/SimplePrimary/index.test.js +34 -0
  137. package/lib/components/Filter/StyledFilter.d.ts +4 -0
  138. package/lib/components/Filter/StyledFilter.d.ts.map +1 -0
  139. package/lib/components/Filter/StyledFilter.js +41 -0
  140. package/lib/components/Filter/StyledLabel/index.d.ts +8 -0
  141. package/lib/components/Filter/StyledLabel/index.d.ts.map +1 -0
  142. package/lib/components/Filter/StyledLabel/index.js +30 -0
  143. package/lib/components/Filter/index.d.ts +5 -0
  144. package/lib/components/Filter/index.d.ts.map +1 -0
  145. package/lib/components/Filter/index.js +107 -0
  146. package/lib/components/Filter/index.test.js +60 -0
  147. package/lib/components/Filter/kind.d.ts +6 -0
  148. package/lib/components/Filter/kind.d.ts.map +1 -0
  149. package/lib/components/Filter/kind.js +45 -0
  150. package/lib/components/Filter/schema.d.ts +9 -0
  151. package/lib/components/Filter/schema.d.ts.map +1 -0
  152. package/lib/components/Filter/schema.js +33 -0
  153. package/lib/components/Filter/types.d.ts +18 -0
  154. package/lib/components/Filter/types.d.ts.map +1 -0
  155. package/lib/components/Filter/types.js +5 -0
  156. package/lib/components/JumpTo/JumpToMenu.d.ts +2 -2
  157. package/lib/components/JumpTo/JumpToMenu.d.ts.map +1 -1
  158. package/lib/components/JumpTo/JumpToMenu.js +3 -3
  159. package/lib/components/JumpTo/types.js +5 -1
  160. package/lib/components/JumpTo/utils.d.ts.map +1 -1
  161. package/lib/components/JumpTo/utils.js +3 -7
  162. package/lib/components/LeftNav/Item/ClickArea.js +1 -1
  163. package/lib/components/LeftNav/Item/ItemWrapper.d.ts.map +1 -1
  164. package/lib/components/LeftNav/Item/ItemWrapper.js +3 -3
  165. package/lib/components/LeftNav/Item/MenuItemWrapper.d.ts +7 -0
  166. package/lib/components/LeftNav/Item/MenuItemWrapper.d.ts.map +1 -0
  167. package/lib/components/LeftNav/Item/MenuItemWrapper.js +20 -0
  168. package/lib/components/LeftNav/Item/NavCollapsedXItem/index.d.ts.map +1 -1
  169. package/lib/components/LeftNav/Item/NavCollapsedXItem/index.js +7 -5
  170. package/lib/components/LeftNav/Item/NavExpandedItem/index.d.ts.map +1 -1
  171. package/lib/components/LeftNav/Item/NavExpandedItem/index.js +24 -13
  172. package/lib/components/LeftNav/Item/types.d.ts +1 -1
  173. package/lib/components/LeftNav/Item/types.d.ts.map +1 -1
  174. package/lib/components/LeftNav/Item/types.js +5 -1
  175. package/lib/components/LeftNav/index.test.js +13 -3
  176. package/lib/components/LeftNav/schema.d.ts.map +1 -1
  177. package/lib/components/LeftNav/schema.js +2 -0
  178. package/lib/components/LeftNav/types.d.ts +1 -0
  179. package/lib/components/LeftNav/types.d.ts.map +1 -1
  180. package/lib/components/LeftNav/types.js +5 -1
  181. package/lib/components/Link/DisabledLink.d.ts +7 -0
  182. package/lib/components/Link/DisabledLink.d.ts.map +1 -0
  183. package/lib/components/Link/DisabledLink.js +46 -0
  184. package/lib/components/Link/Link.d.ts +4 -0
  185. package/lib/components/Link/Link.d.ts.map +1 -0
  186. package/lib/components/Link/Link.js +67 -0
  187. package/lib/components/Link/index.d.ts +4 -23
  188. package/lib/components/Link/index.d.ts.map +1 -1
  189. package/lib/components/Link/index.js +20 -158
  190. package/lib/components/Link/index.test.js +63 -42
  191. package/lib/components/Link/schema.d.ts.map +1 -1
  192. package/lib/components/Link/schema.js +2 -1
  193. package/lib/components/Link/styles.d.ts +20 -0
  194. package/lib/components/Link/styles.d.ts.map +1 -0
  195. package/lib/components/Link/styles.js +131 -0
  196. package/lib/components/Link/types.d.ts +28 -0
  197. package/lib/components/Link/types.d.ts.map +1 -0
  198. package/lib/components/Link/types.js +5 -0
  199. package/lib/components/Loading/Loading.d.ts +12 -0
  200. package/lib/components/Loading/Loading.d.ts.map +1 -0
  201. package/lib/components/Loading/Loading.js +70 -0
  202. package/lib/components/Loading/index.d.ts +4 -0
  203. package/lib/components/Loading/index.d.ts.map +1 -0
  204. package/lib/components/Loading/index.js +33 -0
  205. package/lib/components/Loading/index.test.js +55 -0
  206. package/lib/components/Loading/schema.d.ts +4 -0
  207. package/lib/components/Loading/schema.d.ts.map +1 -0
  208. package/lib/components/Loading/schema.js +31 -0
  209. package/lib/components/Loading/styles.d.ts +211 -0
  210. package/lib/components/Loading/styles.d.ts.map +1 -0
  211. package/lib/components/Loading/styles.js +77 -0
  212. package/lib/components/Loading/types.d.ts +10 -0
  213. package/lib/components/Loading/types.d.ts.map +1 -0
  214. package/lib/components/Loading/types.js +5 -0
  215. package/lib/components/Menu/index.d.ts.map +1 -1
  216. package/lib/components/Menu/index.js +3 -1
  217. package/lib/components/Menu/types.d.ts +2 -0
  218. package/lib/components/Menu/types.d.ts.map +1 -1
  219. package/lib/components/Menu/types.js +5 -1
  220. package/lib/components/Modal/components.d.ts +2 -2
  221. package/lib/components/Modal/types.js +5 -1
  222. package/lib/components/Notifications/Notification/components.d.ts +3 -3
  223. package/lib/components/Notifications/Notification/components.d.ts.map +1 -1
  224. package/lib/components/Notifications/Notification/components.js +12 -6
  225. package/lib/components/Notifications/Notification/index.d.ts +3 -6
  226. package/lib/components/Notifications/Notification/index.d.ts.map +1 -1
  227. package/lib/components/Notifications/Notification/index.js +19 -12
  228. package/lib/components/Notifications/Notification/index.test.js +38 -19
  229. package/lib/components/Notifications/NotificationsPanel/index.d.ts +2 -1
  230. package/lib/components/Notifications/NotificationsPanel/index.d.ts.map +1 -1
  231. package/lib/components/Notifications/NotificationsPanel/index.js +41 -22
  232. package/lib/components/Notifications/NotificationsPanel/schema.js +1 -1
  233. package/lib/components/Notifications/Notifier.test.js +79 -10
  234. package/lib/components/Notifications/constants.d.ts +2 -0
  235. package/lib/components/Notifications/constants.d.ts.map +1 -0
  236. package/lib/components/Notifications/constants.js +16 -0
  237. package/lib/components/Notifications/schema.d.ts.map +1 -1
  238. package/lib/components/Notifications/schema.js +2 -1
  239. package/lib/components/Notifications/useNotifications.d.ts +1 -0
  240. package/lib/components/Notifications/useNotifications.d.ts.map +1 -1
  241. package/lib/components/Notifications/useNotifications.test.js +7 -4
  242. package/lib/components/Pagination/Pagination.d.ts +1 -1
  243. package/lib/components/Pagination/Pagination.d.ts.map +1 -1
  244. package/lib/components/Pagination/Pagination.js +1 -0
  245. package/lib/components/Pagination/Pagination.test.js +9 -0
  246. package/lib/components/Pagination/types.js +5 -1
  247. package/lib/components/PasswordField/IconWrapper.d.ts +198 -0
  248. package/lib/components/PasswordField/IconWrapper.d.ts.map +1 -0
  249. package/lib/components/PasswordField/IconWrapper.js +32 -0
  250. package/lib/components/PasswordField/Input.d.ts +6 -0
  251. package/lib/components/PasswordField/Input.d.ts.map +1 -0
  252. package/lib/components/PasswordField/Input.js +28 -0
  253. package/lib/components/PasswordField/ShowPasswordButton.d.ts +8 -0
  254. package/lib/components/PasswordField/ShowPasswordButton.d.ts.map +1 -0
  255. package/lib/components/PasswordField/ShowPasswordButton.js +48 -0
  256. package/lib/components/PasswordField/index.d.ts +14 -0
  257. package/lib/components/PasswordField/index.d.ts.map +1 -0
  258. package/lib/components/PasswordField/index.js +113 -0
  259. package/lib/components/PasswordField/index.test.js +217 -0
  260. package/lib/components/PasswordField/schema.d.ts +3 -0
  261. package/lib/components/PasswordField/schema.d.ts.map +1 -0
  262. package/lib/components/PasswordField/schema.js +27 -0
  263. package/lib/components/Popover/index.d.ts.map +1 -1
  264. package/lib/components/Popover/index.js +6 -3
  265. package/lib/components/Popover/schema.d.ts.map +1 -1
  266. package/lib/components/Popover/schema.js +27 -20
  267. package/lib/components/Popover/types.d.ts +1 -0
  268. package/lib/components/Popover/types.d.ts.map +1 -1
  269. package/lib/components/Popover/utils.d.ts +1 -1
  270. package/lib/components/SearchInput/index.d.ts +11 -0
  271. package/lib/components/SearchInput/index.d.ts.map +1 -0
  272. package/lib/components/SearchInput/index.js +190 -0
  273. package/lib/components/SearchInput/index.test.js +417 -0
  274. package/lib/components/SearchInput/schema.d.ts +3 -0
  275. package/lib/components/SearchInput/schema.d.ts.map +1 -0
  276. package/lib/components/SearchInput/schema.js +24 -0
  277. package/lib/components/SearchInput/types.d.ts +28 -0
  278. package/lib/components/SearchInput/types.d.ts.map +1 -0
  279. package/lib/components/SearchInput/types.js +5 -0
  280. package/lib/components/Select/Target.d.ts.map +1 -1
  281. package/lib/components/Select/Target.js +6 -2
  282. package/lib/components/Select/index.d.ts.map +1 -1
  283. package/lib/components/Select/index.js +44 -4
  284. package/lib/components/Select/index.test.js +106 -23
  285. package/lib/components/Select/schema.d.ts.map +1 -1
  286. package/lib/components/Select/schema.js +9 -0
  287. package/lib/components/Select/types.d.ts +6 -1
  288. package/lib/components/Select/types.d.ts.map +1 -1
  289. package/lib/components/Select/types.js +5 -1
  290. package/lib/components/SelectDate/Target.d.ts.map +1 -1
  291. package/lib/components/SelectDate/Target.js +6 -2
  292. package/lib/components/SelectDate/index.d.ts.map +1 -1
  293. package/lib/components/SelectDate/index.js +32 -3
  294. package/lib/components/SelectDate/index.test.js +108 -51
  295. package/lib/components/SelectDate/schema.d.ts.map +1 -1
  296. package/lib/components/SelectDate/schema.js +3 -0
  297. package/lib/components/SelectDate/types.d.ts +3 -0
  298. package/lib/components/SelectDate/types.d.ts.map +1 -1
  299. package/lib/components/SelectDate/types.js +5 -1
  300. package/lib/components/SelectDateRange/index.d.ts.map +1 -1
  301. package/lib/components/SelectDateRange/index.js +31 -2
  302. package/lib/components/SelectDateRange/index.test.js +115 -58
  303. package/lib/components/SelectDateRange/schema.d.ts.map +1 -1
  304. package/lib/components/SelectDateRange/schema.js +3 -0
  305. package/lib/components/SelectDateRange/types.js +5 -1
  306. package/lib/components/SelectMenu/index.d.ts +5 -0
  307. package/lib/components/SelectMenu/index.d.ts.map +1 -1
  308. package/lib/components/SelectMenu/index.js +27 -3
  309. package/lib/components/SelectMenu/schema.d.ts.map +1 -1
  310. package/lib/components/SelectMenu/schema.js +4 -0
  311. package/lib/components/Table/Body.d.ts.map +1 -1
  312. package/lib/components/Table/Body.js +28 -17
  313. package/lib/components/Table/Container.d.ts.map +1 -1
  314. package/lib/components/Table/Container.js +6 -1
  315. package/lib/components/Table/DataRow.d.ts.map +1 -1
  316. package/lib/components/Table/DataRow.js +26 -18
  317. package/lib/components/Table/Head.d.ts +1 -1
  318. package/lib/components/Table/Head.d.ts.map +1 -1
  319. package/lib/components/Table/Head.js +10 -5
  320. package/lib/components/Table/HeaderCell/index.d.ts.map +1 -1
  321. package/lib/components/Table/HeaderCell/index.js +19 -6
  322. package/lib/components/Table/HeaderCell/types.d.ts +6 -1
  323. package/lib/components/Table/HeaderCell/types.d.ts.map +1 -1
  324. package/lib/components/Table/HeaderCell/types.js +5 -1
  325. package/lib/components/Table/Provider.d.ts +5 -5
  326. package/lib/components/Table/Provider.d.ts.map +1 -1
  327. package/lib/components/Table/Provider.js +10 -11
  328. package/lib/components/Table/index.d.ts.map +1 -1
  329. package/lib/components/Table/index.js +110 -20
  330. package/lib/components/Table/index.test.js +80 -33
  331. package/lib/components/Table/schema.columns.d.ts.map +1 -1
  332. package/lib/components/Table/schema.columns.js +6 -4
  333. package/lib/components/Table/schema.d.ts.map +1 -1
  334. package/lib/components/Table/schema.js +7 -6
  335. package/lib/components/Table/types.d.ts +19 -4
  336. package/lib/components/Table/types.d.ts.map +1 -1
  337. package/lib/components/Table/utils.d.ts +2 -8
  338. package/lib/components/Table/utils.d.ts.map +1 -1
  339. package/lib/components/Table/utils.js +21 -20
  340. package/lib/components/Tabs/Tab/index.d.ts +13 -0
  341. package/lib/components/Tabs/Tab/index.d.ts.map +1 -0
  342. package/lib/components/Tabs/Tab/index.js +94 -0
  343. package/lib/components/Tabs/Tab/schema.d.ts +3 -0
  344. package/lib/components/Tabs/Tab/schema.d.ts.map +1 -0
  345. package/lib/components/Tabs/Tab/styles.d.ts +7 -0
  346. package/lib/components/Tabs/Tab/styles.d.ts.map +1 -0
  347. package/lib/components/Tabs/Tab/styles.js +37 -0
  348. package/lib/components/Tabs/context.d.ts +2 -2
  349. package/lib/components/Tabs/context.d.ts.map +1 -1
  350. package/lib/components/Tabs/context.js +1 -1
  351. package/lib/components/Tabs/index.d.ts +17 -6
  352. package/lib/components/Tabs/index.d.ts.map +1 -1
  353. package/lib/components/Tabs/index.js +104 -163
  354. package/lib/components/Tabs/index.test.js +54 -2
  355. package/lib/components/Tabs/styles.d.ts +4 -0
  356. package/lib/components/Tabs/styles.d.ts.map +1 -0
  357. package/lib/components/Tabs/styles.js +35 -0
  358. package/lib/components/Tag/Action.d.ts +4 -0
  359. package/lib/components/Tag/Action.d.ts.map +1 -0
  360. package/lib/components/Tag/Action.js +39 -0
  361. package/lib/components/Tag/constants.d.ts +2 -2
  362. package/lib/components/Tag/constants.d.ts.map +1 -1
  363. package/lib/components/Tag/constants.js +4 -4
  364. package/lib/components/Tag/index.d.ts +1 -3
  365. package/lib/components/Tag/index.d.ts.map +1 -1
  366. package/lib/components/Tag/index.js +40 -97
  367. package/lib/components/Tag/index.test.js +239 -2
  368. package/lib/components/Tag/propTypes.d.ts +3 -0
  369. package/lib/components/Tag/propTypes.d.ts.map +1 -1
  370. package/lib/components/Tag/propTypes.js +5 -2
  371. package/lib/components/Tag/schema.d.ts.map +1 -1
  372. package/lib/components/Tag/schema.js +2 -0
  373. package/lib/components/Tag/styles.d.ts +13 -0
  374. package/lib/components/Tag/styles.d.ts.map +1 -0
  375. package/lib/components/Tag/styles.js +167 -0
  376. package/lib/components/Tag/types.d.ts +9 -10
  377. package/lib/components/Tag/types.d.ts.map +1 -1
  378. package/lib/components/Tag/types.js +5 -1
  379. package/lib/components/TextArea/TextArea.d.ts.map +1 -1
  380. package/lib/components/TextArea/TextArea.js +1 -1
  381. package/lib/components/TextArea/index.js +1 -0
  382. package/lib/components/TextArea/index.test.js +5 -0
  383. package/lib/components/TextField/Input.js +1 -1
  384. package/lib/components/TextField/index.test.js +5 -0
  385. package/lib/components/Toggle/Fieldset.d.ts.map +1 -1
  386. package/lib/components/Toggle/Fieldset.js +20 -11
  387. package/lib/components/Toggle/Option.d.ts.map +1 -1
  388. package/lib/components/Toggle/Option.js +1 -1
  389. package/lib/components/Toggle/Slider.d.ts +1 -3
  390. package/lib/components/Toggle/Slider.d.ts.map +1 -1
  391. package/lib/components/Toggle/Slider.js +29 -24
  392. package/lib/components/Toggle/index.d.ts.map +1 -1
  393. package/lib/components/Toggle/index.js +6 -1
  394. package/lib/components/Toggle/index.test.js +39 -10
  395. package/lib/components/Toggle/propTypes.js +1 -1
  396. package/lib/components/Toggle/schema.js +1 -1
  397. package/lib/components/Toggle/types.d.ts +3 -2
  398. package/lib/components/Toggle/types.d.ts.map +1 -1
  399. package/lib/components/Toggle/types.js +5 -1
  400. package/lib/components/ToggleView/ToggleView.d.ts +5 -0
  401. package/lib/components/ToggleView/ToggleView.d.ts.map +1 -0
  402. package/lib/components/ToggleView/ToggleView.js +80 -0
  403. package/lib/components/ToggleView/index.d.ts +4 -0
  404. package/lib/components/ToggleView/index.d.ts.map +1 -0
  405. package/lib/components/ToggleView/index.js +33 -0
  406. package/lib/components/ToggleView/index.test.js +61 -0
  407. package/lib/components/ToggleView/schema.d.ts +3 -0
  408. package/lib/components/ToggleView/schema.d.ts.map +1 -0
  409. package/lib/components/ToggleView/schema.js +24 -0
  410. package/lib/components/ToggleView/styles.d.ts +6 -0
  411. package/lib/components/ToggleView/styles.d.ts.map +1 -0
  412. package/lib/components/ToggleView/styles.js +23 -0
  413. package/lib/components/ToggleView/types.d.ts +23 -0
  414. package/lib/components/ToggleView/types.d.ts.map +1 -0
  415. package/lib/components/ToggleView/types.js +12 -0
  416. package/lib/components/Tooltip/index.d.ts.map +1 -1
  417. package/lib/components/Tooltip/index.js +3 -13
  418. package/lib/components/Tooltip/schema.d.ts +3 -0
  419. package/lib/components/Tooltip/schema.d.ts.map +1 -0
  420. package/lib/components/Tooltip/schema.js +29 -0
  421. package/lib/components/Typography/withColors.d.ts +1 -1
  422. package/lib/components/Typography/withColors.d.ts.map +1 -1
  423. package/lib/components/Typography/withColors.js +1 -1
  424. package/lib/components/index.d.ts +8 -1
  425. package/lib/components/index.d.ts.map +1 -1
  426. package/lib/components/index.js +126 -0
  427. package/lib/modifiers/spacingSchema.d.ts.map +1 -1
  428. package/lib/modifiers/spacingSchema.js +29 -16
  429. package/lib/providers/ConfigProvider/index.d.ts.map +1 -1
  430. package/lib/providers/ConfigProvider/index.js +5 -1
  431. package/lib/providers/ConfigProvider/utils/context.d.ts +1 -1
  432. package/lib/providers/ConfigProvider/utils/context.d.ts.map +1 -1
  433. package/lib/providers/ConfigProvider/utils/normalizer.d.ts.map +1 -1
  434. package/lib/providers/ConfigProvider/utils/normalizer.js +1 -1
  435. package/lib/providers/ConfigProvider/utils/translations.d.ts +24 -0
  436. package/lib/providers/ConfigProvider/utils/translations.d.ts.map +1 -1
  437. package/lib/providers/ConfigProvider/utils/translations.js +24 -0
  438. package/lib/providers/NotificationsProvider/index.d.ts +6 -5
  439. package/lib/providers/NotificationsProvider/index.d.ts.map +1 -1
  440. package/lib/providers/NotificationsProvider/index.js +47 -28
  441. package/lib/providers/NotificationsProvider/types.d.ts +4 -1
  442. package/lib/providers/NotificationsProvider/types.d.ts.map +1 -1
  443. package/lib/utils/commonUIColors.d.ts +349 -1
  444. package/lib/utils/commonUIColors.d.ts.map +1 -1
  445. package/lib/utils/commonUIColors.js +6 -2
  446. package/lib/utils/joinClassnames.d.ts +3 -0
  447. package/lib/utils/joinClassnames.d.ts.map +1 -0
  448. package/lib/utils/joinClassnames.js +26 -0
  449. package/lib/utils/useFirstMount.d.ts +2 -0
  450. package/lib/utils/useFirstMount.d.ts.map +1 -0
  451. package/lib/utils/useFirstMount.js +19 -0
  452. package/lib/utils/useUpdateEffect.d.ts +4 -0
  453. package/lib/utils/useUpdateEffect.d.ts.map +1 -0
  454. package/lib/utils/useUpdateEffect.js +28 -0
  455. package/package.json +2 -2
  456. package/CHANGELOG.md +0 -796
  457. package/lib/atoms/InputField/RequiredIcon.d.ts +0 -4
  458. package/lib/atoms/InputField/RequiredIcon.d.ts.map +0 -1
  459. package/lib/components/Tabs/Tab.d.ts +0 -5
  460. package/lib/components/Tabs/Tab.d.ts.map +0 -1
  461. package/lib/components/Tabs/Tab.js +0 -109
  462. package/lib/components/Tabs/schema.tab.d.ts.map +0 -1
  463. package/lib/components/Tabs/types.d.ts +0 -27
  464. package/lib/components/Tabs/types.d.ts.map +0 -1
  465. package/lib/components/Tabs/types.js +0 -1
  466. package/lib/components/Tag/ActionButton.d.ts +0 -5
  467. package/lib/components/Tag/ActionButton.d.ts.map +0 -1
  468. package/lib/components/Tag/ActionButton.js +0 -56
  469. /package/lib/components/Tabs/{schema.tab.js → Tab/schema.js} +0 -0
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ var _react = _interopRequireDefault(require("react"));
4
+
5
+ var _react2 = require("@testing-library/react");
6
+
7
+ var _ = _interopRequireDefault(require("."));
8
+
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+
11
+ 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; }
12
+
13
+ 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; }
14
+
15
+ 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; }
16
+
17
+ var defaultProps = {
18
+ text: 'Label',
19
+ count: 0,
20
+ badgeColor: null,
21
+ badgeIcon: null
22
+ };
23
+ describe('Filter', function () {
24
+ it('renders the count when a value is provided', function () {
25
+ var props = _objectSpread({}, defaultProps, {
26
+ count: 10
27
+ });
28
+
29
+ var _render = (0, _react2.render)(_react.default.createElement(_.default, props)),
30
+ queryByText = _render.queryByText;
31
+
32
+ expect(queryByText('10 Label')).toBeInTheDocument();
33
+ });
34
+ });
@@ -0,0 +1,4 @@
1
+ import { FilterProps } from './types';
2
+ declare const StyledFilter: import("styled-components").StyledComponent<"button", any, FilterProps, never>;
3
+ export default StyledFilter;
4
+ //# sourceMappingURL=StyledFilter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StyledFilter.d.ts","sourceRoot":"","sources":["../../../src/components/Filter/StyledFilter.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAuBtC,QAAA,MAAM,YAAY,gFA0CjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
+
10
+ var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
11
+
12
+ var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
13
+
14
+ var _color = _interopRequireDefault(require("@decisiv/design-tokens/lib/color"));
15
+
16
+ var _spacing = _interopRequireDefault(require("@decisiv/design-tokens/lib/spacing"));
17
+
18
+ var _kind = _interopRequireWildcard(require("./kind"));
19
+
20
+ var _colors = require("../Button/colors");
21
+
22
+ var _styleModifiers = require("../../utils/styleModifiers");
23
+
24
+ var _focusRingWithColor = _interopRequireDefault(require("../../utils/focusRingWithColor"));
25
+
26
+ var _IconWrapper = _interopRequireDefault(require("./IconWrapper"));
27
+
28
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
+
30
+ 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; } }
31
+
32
+ var activeStyles = (0, _styledComponents.css)(["color:", ";background-color:", ";border:", " solid ", ";svg{color:", ";}"], (0, _toColorString.default)(_color.default.base.snowWhite), (0, _toColorString.default)(_color.default.status.information.medium), (0, _rem.default)(1), (0, _toColorString.default)(_color.default.status.information.medium), (0, _toColorString.default)(_color.default.base.snowWhite));
33
+ var focusStyles = (0, _styledComponents.css)(["border:", " solid ", ";", ";"], (0, _rem.default)(1), (0, _toColorString.default)(_color.default.interaction.pacificOcean), (0, _focusRingWithColor.default)(_colors.focusRingColors.light.normal.secondary.shadow));
34
+
35
+ var StyledFilter = _styledComponents.default.button.withConfig({
36
+ displayName: "StyledFilter",
37
+ componentId: "sc-10cidio-0"
38
+ })(["display:flex;background:none;padding:", " ", ";border:", " solid ", ";border-radius:", ";justify-content:center;align-items:center;outline:none;font:inherit;color:", ";&:focus{", "}", ";", ";&:hover{", ";}&:disabled:disabled{background:", ";border:", " solid ", ";&,&:hover{color:", ";cursor:not-allowed;", "{background-color:", ";svg{color:", ";}}}}"], (0, _rem.default)(_spacing.default.base * 0.6), (0, _rem.default)(_spacing.default.base), (0, _rem.default)(1), (0, _toColorString.default)(_color.default.base.quarterMoon), (0, _rem.default)(2), (0, _toColorString.default)(_color.default.interaction.pacificOcean), focusStyles, _kind.default, (0, _styleModifiers.when)('active', activeStyles), _kind.hoverStyles, (0, _toColorString.default)(_color.default.opacity.fullMoon50), (0, _rem.default)(1), (0, _toColorString.default)(_color.default.base.quarterMoon), (0, _toColorString.default)(_color.default.opacity.charcoal40), _IconWrapper.default, (0, _toColorString.default)(_color.default.opacity.charcoal15), (0, _toColorString.default)(_color.default.opacity.charcoal40));
39
+
40
+ var _default = StyledFilter;
41
+ exports.default = _default;
@@ -0,0 +1,8 @@
1
+ import { FlexComponentProps } from '../../Flex';
2
+ interface Props extends FlexComponentProps {
3
+ active: boolean;
4
+ hasBadge: boolean;
5
+ }
6
+ declare const StyledLabel: import("styled-components").StyledComponent<"span", any, Props, never>;
7
+ export default StyledLabel;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Filter/StyledLabel/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,UAAU,KAAM,SAAQ,kBAAkB;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,WAAW,wEAMhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
+
10
+ var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
11
+
12
+ var _spacing = _interopRequireDefault(require("@decisiv/design-tokens/lib/spacing"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
16
+ var StyledLabel = _styledComponents.default.span.withConfig({
17
+ displayName: "StyledLabel",
18
+ componentId: "sc-1r95cia-0"
19
+ })(["margin-top:", ";margin-right:", ";margin-left:", ";"], (0, _rem.default)(_spacing.default.base * 0.2), function (_ref) {
20
+ var hasBadge = _ref.hasBadge,
21
+ marginRight = _ref.marginRight;
22
+ return hasBadge && marginRight ? (0, _rem.default)(_spacing.default.base) : '0';
23
+ }, function (_ref2) {
24
+ var hasBadge = _ref2.hasBadge,
25
+ marginLeft = _ref2.marginLeft;
26
+ return hasBadge && marginLeft ? (0, _rem.default)(_spacing.default.base) : '0';
27
+ });
28
+
29
+ var _default = StyledLabel;
30
+ exports.default = _default;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { FilterProps } from './types';
3
+ declare const Filter: React.ForwardRefExoticComponent<FilterProps & React.RefAttributes<HTMLButtonElement>>;
4
+ export default Filter;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Filter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAMtE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAStC,QAAA,MAAM,MAAM,uFAsDX,CAAC;AA4BF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _visualInterest = require("@decisiv/design-tokens/lib/color/visual-interest");
13
+
14
+ var _commonUIColors = require("../../utils/commonUIColors");
15
+
16
+ var _SimplePrimary = _interopRequireDefault(require("./SimplePrimary"));
17
+
18
+ var _StyledFilter = _interopRequireDefault(require("./StyledFilter"));
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 _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); }
25
+
26
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
27
+
28
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
29
+
30
+ 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; }
31
+
32
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
33
+
34
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
35
+
36
+ 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; }
37
+
38
+ var components = {
39
+ simple: _SimplePrimary.default
40
+ }; // variant uses basic
41
+
42
+ var Filter = (0, _react.forwardRef)(function (_ref, ref) {
43
+ var filterActive = _ref.active,
44
+ _ref$variant = _ref.variant,
45
+ variant = _ref$variant === void 0 ? 'simple' : _ref$variant,
46
+ _ref$kind = _ref.kind,
47
+ kind = _ref$kind === void 0 ? 'primary' : _ref$kind,
48
+ onClick = _ref.onClick,
49
+ disabled = _ref.disabled,
50
+ _ref$badgeColor = _ref.badgeColor,
51
+ badgeColor = _ref$badgeColor === void 0 ? 'information' : _ref$badgeColor,
52
+ rest = _objectWithoutProperties(_ref, ["active", "variant", "kind", "onClick", "disabled", "badgeColor"]);
53
+
54
+ var _useState = (0, _react.useState)(false),
55
+ _useState2 = _slicedToArray(_useState, 2),
56
+ active = _useState2[0],
57
+ setActive = _useState2[1];
58
+
59
+ var Component = components[variant];
60
+ var toggleStatus = (0, _react.useCallback)(function () {
61
+ return setActive(!active);
62
+ }, [active, setActive]);
63
+ var handleOnClick = (0, _react.useCallback)(function (e) {
64
+ if (typeof onClick === 'function') {
65
+ onClick(e);
66
+ } else {
67
+ toggleStatus();
68
+ }
69
+ }, [onClick, toggleStatus]);
70
+ return _react.default.createElement(_StyledFilter.default, _extends({
71
+ ref: ref,
72
+ kind: kind,
73
+ tabIndex: 0,
74
+ active: filterActive || active,
75
+ onClick: handleOnClick,
76
+ disabled: disabled
77
+ }, rest), _react.default.createElement(Component, _extends({
78
+ active: active,
79
+ disabled: disabled,
80
+ badgeColor: disabled ? _visualInterest.VisualInterestColorName.licoriceMousse : badgeColor
81
+ }, rest)));
82
+ }); // @ts-ignore
83
+
84
+ Filter.propTypes = {
85
+ active: _propTypes.default.bool,
86
+ variant: _propTypes.default.oneOf(['simple']),
87
+ kind: _propTypes.default.oneOf(['primary']),
88
+ onClick: _propTypes.default.func,
89
+ text: _propTypes.default.string.isRequired,
90
+ badgeColor: _propTypes.default.oneOf(_commonUIColors.commonUIColorKeys),
91
+ badgeIcon: _propTypes.default.elementType,
92
+ count: _propTypes.default.number,
93
+ disabled: _propTypes.default.bool
94
+ };
95
+ Filter.defaultProps = {
96
+ active: false,
97
+ variant: 'simple',
98
+ onClick: undefined,
99
+ kind: 'primary',
100
+ badgeIcon: undefined,
101
+ badgeColor: 'information',
102
+ count: undefined,
103
+ disabled: false
104
+ };
105
+ Filter.displayName = 'Filter';
106
+ var _default = Filter;
107
+ exports.default = _default;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ var _react = _interopRequireDefault(require("react"));
4
+
5
+ var _react2 = require("@testing-library/react");
6
+
7
+ var _ = _interopRequireDefault(require("."));
8
+
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+
11
+ describe('Filter', function () {
12
+ describe('Simple primary variant', function () {
13
+ it('renders label', function () {
14
+ var _render = (0, _react2.render)(_react.default.createElement(_.default, {
15
+ "aria-label": "text sample",
16
+ variant: "simple",
17
+ text: "text sample"
18
+ })),
19
+ container = _render.container,
20
+ queryByText = _render.queryByText;
21
+
22
+ expect(container).toMatchSnapshot();
23
+ });
24
+ it('calls the onClick function provided when the button clicked', function () {
25
+ var onClick = jest.fn();
26
+
27
+ var _render2 = (0, _react2.render)(_react.default.createElement(_.default, {
28
+ "aria-label": "text sample",
29
+ active: false,
30
+ variant: "simple",
31
+ text: "text",
32
+ onClick: onClick
33
+ })),
34
+ getByText = _render2.getByText;
35
+
36
+ _react2.fireEvent.click(getByText(/text/));
37
+
38
+ expect(onClick).toHaveBeenCalled();
39
+ });
40
+ });
41
+ describe('Expect Disable to prevent OnClick', function () {
42
+ it('Prevent onClick', function () {
43
+ var onClick = jest.fn();
44
+
45
+ var _render3 = (0, _react2.render)(_react.default.createElement(_.default, {
46
+ "aria-label": "text sample",
47
+ active: false,
48
+ variant: "simple",
49
+ text: "text",
50
+ onClick: onClick,
51
+ disabled: true
52
+ })),
53
+ getByText = _render3.getByText;
54
+
55
+ _react2.fireEvent.click(getByText(/text/));
56
+
57
+ expect(onClick).not.toHaveBeenCalled();
58
+ });
59
+ });
60
+ });
@@ -0,0 +1,6 @@
1
+ import theme from 'styled-theming';
2
+ import { FlattenSimpleInterpolation as CSS } from 'styled-components';
3
+ export declare const hoverStyles: CSS;
4
+ declare const kindStyles: theme.ThemeSet;
5
+ export default kindStyles;
6
+ //# sourceMappingURL=kind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kind.d.ts","sourceRoot":"","sources":["../../../src/components/Filter/kind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,gBAAgB,CAAC;AAGnC,OAAO,EAAO,0BAA0B,IAAI,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAU3E,eAAO,MAAM,WAAW,KAQvB,CAAC;AA8BF,QAAA,MAAM,UAAU,gBAGd,CAAC;AAEH,eAAe,UAAU,CAAC"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.hoverStyles = void 0;
7
+
8
+ var _styledTheming = _interopRequireDefault(require("styled-theming"));
9
+
10
+ var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
11
+
12
+ var _styledComponents = require("styled-components");
13
+
14
+ var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
15
+
16
+ var _color = _interopRequireDefault(require("@decisiv/design-tokens/lib/color"));
17
+
18
+ var _ConfigProvider = require("../../providers/ConfigProvider");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+
22
+ var hoverStyles = (0, _styledComponents.css)(["color:", ";background-color:", ";border:", " solid ", ";svg{color:", ";}"], (0, _toColorString.default)(_color.default.base.snowWhite), (0, _toColorString.default)(_color.default.interaction.indianOcean), (0, _rem.default)(1), (0, _toColorString.default)(_color.default.interaction.indianOcean), (0, _toColorString.default)(_color.default.base.snowWhite));
23
+ exports.hoverStyles = hoverStyles;
24
+ var primaryStyle = (0, _styledComponents.css)(["border:", " solid ", ";&:hover{", ";}&:disabled:disabled{background-color:transparent;color:", ";}"], (0, _rem.default)(1), (0, _toColorString.default)(_color.default.base.quarterMoon), hoverStyles, (0, _toColorString.default)(_color.default.opacity.charcoal40));
25
+ // light and dark are the same ATM.
26
+ var lightStyles = {
27
+ primary: primaryStyle
28
+ };
29
+ var darkStyles = {
30
+ primary: primaryStyle
31
+ };
32
+ var kindStyles = (0, _styledTheming.default)(_ConfigProvider.themeKeys.mode, {
33
+ light: function light(_ref) {
34
+ var _ref$kind = _ref.kind,
35
+ kind = _ref$kind === void 0 ? 'primary' : _ref$kind;
36
+ return lightStyles[kind];
37
+ },
38
+ dark: function dark(_ref2) {
39
+ var _ref2$kind = _ref2.kind,
40
+ kind = _ref2$kind === void 0 ? 'primary' : _ref2$kind;
41
+ return darkStyles[kind];
42
+ }
43
+ });
44
+ var _default = kindStyles;
45
+ exports.default = _default;
@@ -0,0 +1,9 @@
1
+ import { Validator } from 'prop-types';
2
+ export declare const makeFilterSchemaPropTypes: (extensions?: {
3
+ [x: string]: Validator<unknown>;
4
+ } | undefined) => {
5
+ [x: string]: Validator<unknown>;
6
+ };
7
+ declare const schema: any;
8
+ export default schema;
9
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Filter/schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,eAAO,MAAM,yBAAyB;;;;CAyBpC,CAAC;AAEH,QAAA,MAAM,MAAM,KAAsC,CAAC;AAInD,eAAe,MAAM,CAAC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.makeFilterSchemaPropTypes = void 0;
7
+
8
+ var _reactDesc = require("react-desc");
9
+
10
+ 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; }
11
+
12
+ 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; }
13
+
14
+ 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; }
15
+
16
+ var makeFilterSchemaPropTypes = function makeFilterSchemaPropTypes(extensions) {
17
+ return _objectSpread({
18
+ text: _reactDesc.PropTypes.string.description("The Filter's text"),
19
+ active: _reactDesc.PropTypes.bool.description("The Filter's active status. Use when you want to control the Filter with onClick.").defaultValue('false'),
20
+ badgeIcon: _reactDesc.PropTypes.element.description('Which `iconix` icon to render'),
21
+ badgeColor: _reactDesc.PropTypes.string.description('Which color to use as background for the icon. It always displays when an icon is provided.').defaultValue('information'),
22
+ count: _reactDesc.PropTypes.number.description("The Filter's count, displayed to the left of the text. When not provided, no count is rendered."),
23
+ disabled: _reactDesc.PropTypes.bool.description("The Filter's displayed status of disabled or enabled.").defaultValue('false')
24
+ }, extensions);
25
+ };
26
+
27
+ exports.makeFilterSchemaPropTypes = makeFilterSchemaPropTypes;
28
+ var schema = (0, _reactDesc.describe)({
29
+ displayName: 'Filter'
30
+ });
31
+ schema.propTypes = makeFilterSchemaPropTypes();
32
+ var _default = schema;
33
+ exports.default = _default;
@@ -0,0 +1,18 @@
1
+ import { ButtonHTMLAttributes } from 'react';
2
+ import { IconProps } from '@decisiv/iconix';
3
+ import { CommonUIColorKeys } from '../../utils/commonUIColors';
4
+ import { TranslatedText } from '../../utils/useTranslations';
5
+ export declare type Variant = 'simple';
6
+ export declare type Kind = 'primary';
7
+ export declare type IconComponent = (props: IconProps) => JSX.Element;
8
+ export interface FilterProps extends ButtonHTMLAttributes<HTMLButtonElement> {
9
+ active?: boolean;
10
+ count?: number;
11
+ badgeIcon?: IconComponent;
12
+ badgeColor?: CommonUIColorKeys;
13
+ kind?: Kind;
14
+ text: TranslatedText;
15
+ variant?: Variant;
16
+ disabled?: boolean;
17
+ }
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Filter/types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,oBAAY,OAAO,GAAG,QAAQ,CAAC;AAC/B,oBAAY,IAAI,GAAG,SAAS,CAAC;AAC7B,oBAAY,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAE9D,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { JumpToProps, JumpToRef } from './types';
3
- declare const JumToMenuWithRef: React.ForwardRefExoticComponent<JumpToProps & React.RefAttributes<JumpToRef>>;
4
- export default JumToMenuWithRef;
3
+ declare const JumpToMenuWithRef: React.ForwardRefExoticComponent<JumpToProps & React.RefAttributes<JumpToRef>>;
4
+ export default JumpToMenuWithRef;
5
5
  //# sourceMappingURL=JumpToMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"JumpToMenu.d.ts","sourceRoot":"","sources":["../../../src/components/JumpTo/JumpToMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAa9E,OAAO,EAAc,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAiH7D,QAAA,MAAM,gBAAgB,+EAAyB,CAAC;AAKhD,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"JumpToMenu.d.ts","sourceRoot":"","sources":["../../../src/components/JumpTo/JumpToMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAa9E,OAAO,EAAc,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAiH7D,QAAA,MAAM,iBAAiB,+EAAyB,CAAC;AAKjD,eAAe,iBAAiB,CAAC"}
@@ -136,8 +136,8 @@ function JumpToMenu(props, forwardedRef) {
136
136
  }, rest))));
137
137
  }
138
138
 
139
- var JumToMenuWithRef = (0, _react.forwardRef)(JumpToMenu); // @ts-ignore
139
+ var JumpToMenuWithRef = (0, _react.forwardRef)(JumpToMenu); // @ts-ignore
140
140
 
141
- JumToMenuWithRef.propTypes = _schema.default.propTypes;
142
- var _default = JumToMenuWithRef;
141
+ JumpToMenuWithRef.propTypes = _schema.default.propTypes;
142
+ var _default = JumpToMenuWithRef;
143
143
  exports.default = _default;
@@ -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":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/JumpTo/utils.ts"],"names":[],"mappings":"AAUA,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAExD;AAqBD,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,MAAM,GAClB,IAAI,CAaN"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/JumpTo/utils.ts"],"names":[],"mappings":"AAUA,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAExD;AAmBD,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,MAAM,GAClB,IAAI,CAaN"}
@@ -22,16 +22,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
22
22
  function getFirstNumber(values) {
23
23
  return values.find(_isNumber.default) || 0;
24
24
  }
25
- /**
26
- * Determine whether the current browser supports smooth scrolling.
27
- */
28
-
29
-
30
- var supportsNativeSmoothScroll = ('scrollBehavior' in document.documentElement.style);
31
25
 
32
26
  function scrollToElement(element, offset) {
33
27
  var targetOffset = element.getBoundingClientRect().top + window.pageYOffset;
34
- var scrollTargetY = targetOffset - offset; // in our testing supportsNativeSmoothScroll will always be true
28
+ var scrollTargetY = targetOffset - offset; // does the current browser support smooth scrolling?
29
+
30
+ var supportsNativeSmoothScroll = ('scrollBehavior' in document.documentElement.style); // in our testing supportsNativeSmoothScroll will always be true
35
31
 
36
32
  /* istanbul ignore else */
37
33
 
@@ -46,7 +46,7 @@ var ClickArea = _styledComponents.default.div.withConfig({
46
46
  return (0, _styledComponents.css)(["", ";display:block;text-align:center;", "{display:block;font-size:8px;max-width:100%;overflow:hidden;padding:0 ", ";text-overflow:ellipsis;white-space:nowrap;text-align:center;}", ";", ";"], (0, _styleModifiers.when)('variant', 'expander', (0, _styledComponents.css)(["display:none;visibility:hidden;"])), _TextWrapper.default, (0, _rem.default)(_spacing.default.base * 0.5), (0, _styleModifiers.when)('active', (0, _styledComponents.css)(["", "{padding-left:56px;}"], _TextWrapper.default)), (0, _styleModifiers.when)('variant', 'sub', (0, _styledComponents.css)(["", "{font-size:", ";", ";}"], _TextWrapper.default, (0, _rem.default)(_typography.default.size.scale[1]), (0, _styleModifiers.when)('active', (0, _styledComponents.css)(["padding-left:6px;white-space:normal;text-overflow:unset;overflow:unset;"])))));
47
47
  }), _defineProperty(_applyStyleModifiers, _useNav.NAV_EXPANDED_STATES.EXPANDED, function () {
48
48
  return (0, _styledComponents.css)(["", "{padding-left:22px;padding-right:22px;}"], _IconWrapper.default);
49
- }), _applyStyleModifiers), 'navVariant'), (0, _styleModifiers.when)('variant', 'expander', (0, _styledComponents.css)(["flex:0;"])), (0, _styleModifiers.when)('variant', 'sub', (0, _styledComponents.css)(["padding:", " 0;font-size:", ";"], (0, _rem.default)(_spacing.default.base * 0.5), (0, _rem.default)(_typography.default.size.alias.paragraph2))));
49
+ }), _applyStyleModifiers), 'navVariant'), (0, _styleModifiers.when)('variant', 'expander', (0, _styledComponents.css)(["flex:1 0;"])), (0, _styleModifiers.when)('variant', 'sub', (0, _styledComponents.css)(["padding:", " 0;font-size:", ";"], (0, _rem.default)(_spacing.default.base * 0.5), (0, _rem.default)(_typography.default.size.alias.paragraph2))));
50
50
 
51
51
  var _default = ClickArea;
52
52
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ItemWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/LeftNav/Item/ItemWrapper.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,QAAA,MAAM,WAAW,qFA4ChB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ItemWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/LeftNav/Item/ItemWrapper.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,QAAA,MAAM,WAAW,qFAoChB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -9,9 +9,9 @@ var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorS
9
9
 
10
10
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
11
 
12
- var _styleModifiers = require("../../../utils/styleModifiers");
12
+ var _dynamicModifiers = require("../../../utils/dynamicModifiers");
13
13
 
14
- var _useNav = require("../hooks/useNav");
14
+ var _styleModifiers = require("../../../utils/styleModifiers");
15
15
 
16
16
  var _constants = require("../constants");
17
17
 
@@ -22,7 +22,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
22
22
  var ItemWrapper = _styledComponents.default.li.withConfig({
23
23
  displayName: "ItemWrapper",
24
24
  componentId: "fky2d1-0"
25
- })(["display:flex;flex-direction:column;margin:0;position:relative;white-space:normal;&:focus{outline:none;}", ";", ";"], (0, _styleModifiers.when)('active', (0, _styledComponents.css)(["background-color:", ";border-left:4px solid ", ";a{position:relative;& >:first-child{margin-left:-4px;}}", ";"], (0, _toColorString.default)(_constants.ACTIVE_BG_COLOR), (0, _toColorString.default)(_constants.ACTIVE_BORDER_COLOR), (0, _styleModifiers.when)('navVariant', [_useNav.NAV_EXPANDED_STATES.COLLAPSED_X], (0, _styledComponents.css)(["a > *{margin-left:-4px;}"])))), (0, _styleModifiers.when)('disabled', (0, _styledComponents.css)(["&:hover{background-color:", ";}"], (0, _toColorString.default)(_constants.BG_COLOR))));
25
+ })(["display:flex;margin:0;position:relative;white-space:normal;", " &:focus{outline:none;}", ";", ";"], (0, _dynamicModifiers.applyDynamicModifiers)('flexDirection', 'flex-direction'), (0, _styleModifiers.when)('active', (0, _styledComponents.css)(["background-color:", ";&::before{border-left:4px solid ", ";position:absolute;top:0;left:0;height:100%;content:'';pointer-events:none;}"], (0, _toColorString.default)(_constants.ACTIVE_BG_COLOR), (0, _toColorString.default)(_constants.ACTIVE_BORDER_COLOR))), (0, _styleModifiers.when)('disabled', (0, _styledComponents.css)(["&:hover{background-color:", ";}"], (0, _toColorString.default)(_constants.BG_COLOR))));
26
26
 
27
27
  var _default = ItemWrapper;
28
28
  exports.default = _default;
@@ -0,0 +1,7 @@
1
+ interface MenuItemWrapperProps {
2
+ flex?: string;
3
+ flexDirection?: string;
4
+ }
5
+ declare const MenuItemWrapper: import("styled-components").StyledComponent<"div", any, MenuItemWrapperProps, never>;
6
+ export default MenuItemWrapper;
7
+ //# sourceMappingURL=MenuItemWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItemWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/LeftNav/Item/MenuItemWrapper.ts"],"names":[],"mappings":"AAIA,UAAU,oBAAoB;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,eAAe,sFAKpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
+
10
+ var _dynamicModifiers = require("../../../utils/dynamicModifiers");
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
14
+ var MenuItemWrapper = _styledComponents.default.div.withConfig({
15
+ displayName: "MenuItemWrapper",
16
+ componentId: "sc-1c8sxsx-0"
17
+ })(["display:flex;", " ", ";"], (0, _dynamicModifiers.applyDynamicModifiers)('flex'), (0, _dynamicModifiers.applyDynamicModifiers)('flexDirection', 'flex-direction'));
18
+
19
+ var _default = MenuItemWrapper;
20
+ exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/LeftNav/Item/NavCollapsedXItem/index.tsx"],"names":[],"mappings":";AAWA,OAAO,EAEL,aAAa,EAId,MAAM,aAAa,CAAC;AAiBrB,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CAqQlE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/LeftNav/Item/NavCollapsedXItem/index.tsx"],"names":[],"mappings":";AAWA,OAAO,EAEL,aAAa,EAId,MAAM,aAAa,CAAC;AAiBrB,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CAyQlE"}
@@ -88,11 +88,12 @@ function MenuItem(props) {
88
88
 
89
89
  if (kind === 'MenuItemTopLink') {
90
90
  var _ref2 = item,
91
- Icon = _ref2.icon;
91
+ Icon = _ref2.icon,
92
+ selected = _ref2.active;
92
93
 
93
94
  var _to = (0, _utils.isMenuItemInternalLink)(item) ? item.path : item.url;
94
95
 
95
- var _active = !disabled && currentPath === _to;
96
+ var _active = !disabled && (currentPath === _to || selected);
96
97
 
97
98
  return _react.default.createElement(_ItemWrapper.default, {
98
99
  active: _active,
@@ -111,11 +112,12 @@ function MenuItem(props) {
111
112
  if (kind === 'MenuItemTopLinkWithSubItems') {
112
113
  var _ref3 = item,
113
114
  _Icon = _ref3.icon,
114
- items = _ref3.items;
115
+ items = _ref3.items,
116
+ _selected = _ref3.active;
115
117
 
116
118
  var _to2 = (0, _utils.isMenuItemInternalLink)(item) ? item.path : item.url;
117
119
 
118
- var _active2 = !disabled && currentPath === _to2;
120
+ var _active2 = !disabled && (currentPath === _to2 || _selected);
119
121
 
120
122
  return _react.default.createElement(MenuItemWithSubItems, {
121
123
  onBlur: function onBlur() {
@@ -261,7 +263,7 @@ function MenuItem(props) {
261
263
 
262
264
 
263
265
  var to = (0, _utils.isMenuItemInternalLink)(item) ? item.path : item.url;
264
- var active = !disabled && currentPath === to;
266
+ var active = !disabled && (currentPath === to || item.active);
265
267
  return _react.default.createElement(_ItemWrapper.default, {
266
268
  active: active,
267
269
  disabled: disabled,