@alfalab/core-components 45.8.0-beta.2 → 45.8.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (552) hide show
  1. package/base-modal/Component.d.ts +0 -4
  2. package/base-modal/Component.js +11 -28
  3. package/base-modal/cssm/Component.d.ts +0 -4
  4. package/base-modal/cssm/Component.js +11 -28
  5. package/base-modal/cssm/utils.d.ts +1 -1
  6. package/base-modal/cssm/utils.js +2 -5
  7. package/base-modal/esm/Component.d.ts +0 -4
  8. package/base-modal/esm/Component.js +12 -29
  9. package/base-modal/esm/index.js +0 -1
  10. package/base-modal/esm/utils.d.ts +1 -1
  11. package/base-modal/esm/utils.js +2 -5
  12. package/base-modal/modern/Component.d.ts +0 -4
  13. package/base-modal/modern/Component.js +5 -22
  14. package/base-modal/modern/index.js +0 -1
  15. package/base-modal/modern/utils.d.ts +1 -1
  16. package/base-modal/modern/utils.js +2 -4
  17. package/base-modal/utils.d.ts +1 -1
  18. package/base-modal/utils.js +2 -5
  19. package/calendar-range/esm/Component.js +1 -1
  20. package/calendar-range/esm/index.js +1 -1
  21. package/calendar-range/esm/views/popover.js +1 -1
  22. package/calendar-range/esm/views/static.js +1 -1
  23. package/calendar-range/modern/Component.js +1 -1
  24. package/calendar-range/modern/index.js +1 -1
  25. package/calendar-range/modern/views/popover.js +1 -1
  26. package/calendar-range/modern/views/static.js +1 -1
  27. package/calendar-range/utils.js +1 -3
  28. package/calendar-range/views/popover.js +1 -1
  29. package/calendar-range/views/static.js +1 -1
  30. package/confirmation/components/screens/initial/component.js +1 -1
  31. package/confirmation/components/screens/initial/countdown-section.js +1 -1
  32. package/confirmation/esm/component.responsive.js +1 -1
  33. package/confirmation/esm/components/base-confirmation/component.js +1 -1
  34. package/confirmation/esm/components/base-confirmation/index.js +1 -1
  35. package/confirmation/esm/components/index.js +1 -1
  36. package/confirmation/esm/components/screens/index.js +1 -1
  37. package/confirmation/esm/components/screens/initial/component.js +1 -1
  38. package/confirmation/esm/components/screens/initial/countdown-section.js +1 -1
  39. package/confirmation/esm/components/screens/initial/index.js +1 -1
  40. package/confirmation/esm/desktop/component.desktop.js +1 -1
  41. package/confirmation/esm/desktop/index.js +1 -1
  42. package/confirmation/esm/index.js +1 -1
  43. package/confirmation/esm/mobile/component.mobile.js +1 -1
  44. package/confirmation/esm/mobile/index.js +1 -1
  45. package/confirmation/esm/shared/index.js +1 -1
  46. package/confirmation/modern/component.responsive.js +1 -1
  47. package/confirmation/modern/components/base-confirmation/component.js +1 -1
  48. package/confirmation/modern/components/base-confirmation/index.js +1 -1
  49. package/confirmation/modern/components/index.js +1 -1
  50. package/confirmation/modern/components/screens/index.js +1 -1
  51. package/confirmation/modern/components/screens/initial/component.js +1 -1
  52. package/confirmation/modern/components/screens/initial/countdown-section.js +1 -1
  53. package/confirmation/modern/components/screens/initial/index.js +1 -1
  54. package/confirmation/modern/desktop/component.desktop.js +1 -1
  55. package/confirmation/modern/desktop/index.js +1 -1
  56. package/confirmation/modern/index.js +1 -1
  57. package/confirmation/modern/mobile/component.mobile.js +1 -1
  58. package/confirmation/modern/mobile/index.js +1 -1
  59. package/confirmation/modern/shared/index.js +1 -1
  60. package/dropzone/Component.d.ts +1 -1
  61. package/dropzone/Component.js +1 -1
  62. package/dropzone/cssm/Component.d.ts +1 -1
  63. package/dropzone/cssm/Component.js +1 -1
  64. package/dropzone/esm/Component.d.ts +1 -1
  65. package/dropzone/esm/Component.js +1 -1
  66. package/dropzone/modern/Component.d.ts +1 -1
  67. package/dropzone/modern/Component.js +1 -1
  68. package/gallery/components/header/Component.js +1 -1
  69. package/gallery/components/header/buttons.js +1 -1
  70. package/gallery/components/image-viewer/component.js +1 -1
  71. package/gallery/components/image-viewer/slide.js +1 -1
  72. package/gallery/esm/Component.js +2 -2
  73. package/gallery/esm/components/header/Component.js +1 -1
  74. package/gallery/esm/components/header/buttons.js +1 -1
  75. package/gallery/esm/components/header/index.js +1 -1
  76. package/gallery/esm/components/image-preview/Component.js +1 -1
  77. package/gallery/esm/components/image-preview/index.js +1 -1
  78. package/gallery/esm/components/image-viewer/component.js +1 -1
  79. package/gallery/esm/components/image-viewer/index.js +1 -1
  80. package/gallery/esm/components/image-viewer/slide.js +1 -1
  81. package/gallery/esm/components/index.js +2 -2
  82. package/gallery/esm/components/navigation-bar/Component.js +1 -1
  83. package/gallery/esm/components/navigation-bar/index.js +1 -1
  84. package/gallery/esm/index.js +2 -2
  85. package/gallery/modern/Component.js +2 -2
  86. package/gallery/modern/components/header/Component.js +1 -1
  87. package/gallery/modern/components/header/buttons.js +1 -1
  88. package/gallery/modern/components/header/index.js +1 -1
  89. package/gallery/modern/components/image-preview/Component.js +1 -1
  90. package/gallery/modern/components/image-preview/index.js +1 -1
  91. package/gallery/modern/components/image-viewer/component.js +1 -1
  92. package/gallery/modern/components/image-viewer/index.js +1 -1
  93. package/gallery/modern/components/image-viewer/slide.js +1 -1
  94. package/gallery/modern/components/index.js +2 -2
  95. package/gallery/modern/components/navigation-bar/Component.js +1 -1
  96. package/gallery/modern/components/navigation-bar/index.js +1 -1
  97. package/gallery/modern/index.js +2 -2
  98. package/international-phone-input/cssm/index-bdb4c6b9.d.ts +2 -9
  99. package/international-phone-input/cssm/use-skeleton-1328ead9.d.ts +4 -0
  100. package/international-phone-input/esm/index-bdb4c6b9.d.ts +2 -9
  101. package/international-phone-input/esm/use-skeleton-1328ead9.d.ts +4 -0
  102. package/international-phone-input/index-bdb4c6b9.d.ts +2 -9
  103. package/international-phone-input/modern/index-bdb4c6b9.d.ts +2 -9
  104. package/international-phone-input/modern/use-skeleton-1328ead9.d.ts +4 -0
  105. package/international-phone-input/use-skeleton-1328ead9.d.ts +4 -0
  106. package/modal/components/controls/Component.js +1 -1
  107. package/modal/components/footer/Component.js +1 -1
  108. package/modal/esm/Component.responsive.js +1 -1
  109. package/modal/esm/components/controls/Component.js +1 -1
  110. package/modal/esm/components/controls/index.js +1 -1
  111. package/modal/esm/components/footer/Component.js +1 -1
  112. package/modal/esm/desktop/Component.desktop.js +1 -1
  113. package/modal/esm/desktop/index.js +1 -1
  114. package/modal/esm/index.js +1 -1
  115. package/modal/esm/mobile/Component.mobile.js +1 -1
  116. package/modal/esm/mobile/index.js +1 -1
  117. package/modal/modern/Component.responsive.js +1 -1
  118. package/modal/modern/components/controls/Component.js +1 -1
  119. package/modal/modern/components/controls/index.js +1 -1
  120. package/modal/modern/components/footer/Component.js +1 -1
  121. package/modal/modern/desktop/Component.desktop.js +1 -1
  122. package/modal/modern/desktop/index.js +1 -1
  123. package/modal/modern/index.js +1 -1
  124. package/modal/modern/mobile/Component.mobile.js +1 -1
  125. package/modal/modern/mobile/index.js +1 -1
  126. package/notification/browser-a216f694.d.ts +6 -0
  127. package/notification/cssm/browser-a216f694.d.ts +6 -0
  128. package/notification/cssm/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  129. package/notification/cssm/utils/getNotificationTestIds.d.ts +5 -0
  130. package/notification/cssm/utils/getNotificationTestIds.js +18 -0
  131. package/notification/esm/browser-a216f694.d.ts +6 -0
  132. package/notification/esm/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  133. package/notification/esm/utils/getNotificationTestIds.d.ts +5 -0
  134. package/notification/esm/utils/getNotificationTestIds.js +16 -0
  135. package/notification/modern/browser-a216f694.d.ts +6 -0
  136. package/notification/modern/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  137. package/notification/modern/utils/getNotificationTestIds.d.ts +5 -0
  138. package/notification/modern/utils/getNotificationTestIds.js +16 -0
  139. package/notification/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  140. package/notification/utils/getNotificationTestIds.d.ts +5 -0
  141. package/notification/utils/getNotificationTestIds.js +18 -0
  142. package/package.json +1 -1
  143. package/picker-button/{modern/index-a5b021bd.d.ts → cssm/index-307da6d7.d.ts} +2 -1
  144. package/picker-button/cssm/index-bdb4c6b9.d.ts +2 -9
  145. package/picker-button/cssm/use-skeleton-1328ead9.d.ts +4 -0
  146. package/picker-button/{cssm/index-a5b021bd.d.ts → esm/index-307da6d7.d.ts} +2 -1
  147. package/picker-button/esm/index-bdb4c6b9.d.ts +2 -9
  148. package/picker-button/esm/use-skeleton-1328ead9.d.ts +4 -0
  149. package/picker-button/{index-a5b021bd.d.ts → index-307da6d7.d.ts} +2 -1
  150. package/picker-button/index-bdb4c6b9.d.ts +2 -9
  151. package/picker-button/{esm/index-a5b021bd.d.ts → modern/index-307da6d7.d.ts} +2 -1
  152. package/picker-button/modern/index-bdb4c6b9.d.ts +2 -9
  153. package/picker-button/modern/use-skeleton-1328ead9.d.ts +4 -0
  154. package/picker-button/use-skeleton-1328ead9.d.ts +4 -0
  155. package/pure-cell/component.js +1 -1
  156. package/pure-cell/components/addon/component.js +1 -1
  157. package/pure-cell/components/addon/index.d.ts +1 -1
  158. package/pure-cell/components/addon/index.js +1 -1
  159. package/pure-cell/components/amount/component.js +1 -1
  160. package/pure-cell/components/amount/index.d.ts +1 -1
  161. package/pure-cell/components/amount/index.js +1 -1
  162. package/pure-cell/components/amount-title/component.js +1 -1
  163. package/pure-cell/components/amount-title/index.d.ts +1 -1
  164. package/pure-cell/components/amount-title/index.js +1 -1
  165. package/pure-cell/components/category/component.js +1 -1
  166. package/pure-cell/components/category/index.d.ts +1 -1
  167. package/pure-cell/components/category/index.js +1 -1
  168. package/pure-cell/components/content/component.js +1 -1
  169. package/pure-cell/components/content/index.d.ts +1 -1
  170. package/pure-cell/components/content/index.js +1 -1
  171. package/pure-cell/components/footer/component.js +1 -1
  172. package/pure-cell/components/footer/index.d.ts +1 -1
  173. package/pure-cell/components/footer/index.js +1 -1
  174. package/pure-cell/components/footer-button/component.js +1 -1
  175. package/pure-cell/components/footer-button/index.d.ts +1 -1
  176. package/pure-cell/components/footer-button/index.js +1 -1
  177. package/pure-cell/components/footer-text/component.js +1 -1
  178. package/pure-cell/components/footer-text/index.d.ts +1 -1
  179. package/pure-cell/components/footer-text/index.js +1 -1
  180. package/pure-cell/components/graphics/component.js +1 -1
  181. package/pure-cell/components/graphics/index.d.ts +1 -1
  182. package/pure-cell/components/graphics/index.js +1 -1
  183. package/pure-cell/components/main/component.js +1 -1
  184. package/pure-cell/components/main/index.d.ts +1 -1
  185. package/pure-cell/components/main/index.js +1 -1
  186. package/pure-cell/components/text/component.js +1 -1
  187. package/pure-cell/components/text/index.d.ts +1 -1
  188. package/pure-cell/components/text/index.js +1 -1
  189. package/pure-cell/esm/component.js +1 -1
  190. package/pure-cell/esm/components/addon/component.js +1 -1
  191. package/pure-cell/esm/components/addon/index.d.ts +1 -1
  192. package/pure-cell/esm/components/addon/index.js +1 -1
  193. package/pure-cell/esm/components/amount/component.js +1 -1
  194. package/pure-cell/esm/components/amount/index.d.ts +1 -1
  195. package/pure-cell/esm/components/amount/index.js +1 -1
  196. package/pure-cell/esm/components/amount-title/component.js +1 -1
  197. package/pure-cell/esm/components/amount-title/index.d.ts +1 -1
  198. package/pure-cell/esm/components/amount-title/index.js +1 -1
  199. package/pure-cell/esm/components/category/component.js +1 -1
  200. package/pure-cell/esm/components/category/index.d.ts +1 -1
  201. package/pure-cell/esm/components/category/index.js +1 -1
  202. package/pure-cell/esm/components/content/component.js +1 -1
  203. package/pure-cell/esm/components/content/index.d.ts +1 -1
  204. package/pure-cell/esm/components/content/index.js +1 -1
  205. package/pure-cell/esm/components/footer/component.js +1 -1
  206. package/pure-cell/esm/components/footer/index.d.ts +1 -1
  207. package/pure-cell/esm/components/footer/index.js +1 -1
  208. package/pure-cell/esm/components/footer-button/component.js +1 -1
  209. package/pure-cell/esm/components/footer-button/index.d.ts +1 -1
  210. package/pure-cell/esm/components/footer-button/index.js +1 -1
  211. package/pure-cell/esm/components/footer-text/component.js +1 -1
  212. package/pure-cell/esm/components/footer-text/index.d.ts +1 -1
  213. package/pure-cell/esm/components/footer-text/index.js +1 -1
  214. package/pure-cell/esm/components/graphics/component.js +1 -1
  215. package/pure-cell/esm/components/graphics/index.d.ts +1 -1
  216. package/pure-cell/esm/components/graphics/index.js +1 -1
  217. package/pure-cell/esm/components/main/component.js +1 -1
  218. package/pure-cell/esm/components/main/index.d.ts +1 -1
  219. package/pure-cell/esm/components/main/index.js +1 -1
  220. package/pure-cell/esm/components/text/component.js +1 -1
  221. package/pure-cell/esm/components/text/index.d.ts +1 -1
  222. package/pure-cell/esm/components/text/index.js +1 -1
  223. package/pure-cell/esm/index.js +1 -1
  224. package/pure-cell/index.js +1 -1
  225. package/pure-cell/modern/component.js +1 -1
  226. package/pure-cell/modern/components/addon/component.js +1 -1
  227. package/pure-cell/modern/components/addon/index.d.ts +1 -1
  228. package/pure-cell/modern/components/addon/index.js +1 -1
  229. package/pure-cell/modern/components/amount/component.js +1 -1
  230. package/pure-cell/modern/components/amount/index.d.ts +1 -1
  231. package/pure-cell/modern/components/amount/index.js +1 -1
  232. package/pure-cell/modern/components/amount-title/component.js +1 -1
  233. package/pure-cell/modern/components/amount-title/index.d.ts +1 -1
  234. package/pure-cell/modern/components/amount-title/index.js +1 -1
  235. package/pure-cell/modern/components/category/component.js +1 -1
  236. package/pure-cell/modern/components/category/index.d.ts +1 -1
  237. package/pure-cell/modern/components/category/index.js +1 -1
  238. package/pure-cell/modern/components/content/component.js +1 -1
  239. package/pure-cell/modern/components/content/index.d.ts +1 -1
  240. package/pure-cell/modern/components/content/index.js +1 -1
  241. package/pure-cell/modern/components/footer/component.js +1 -1
  242. package/pure-cell/modern/components/footer/index.d.ts +1 -1
  243. package/pure-cell/modern/components/footer/index.js +1 -1
  244. package/pure-cell/modern/components/footer-button/component.js +1 -1
  245. package/pure-cell/modern/components/footer-button/index.d.ts +1 -1
  246. package/pure-cell/modern/components/footer-button/index.js +1 -1
  247. package/pure-cell/modern/components/footer-text/component.js +1 -1
  248. package/pure-cell/modern/components/footer-text/index.d.ts +1 -1
  249. package/pure-cell/modern/components/footer-text/index.js +1 -1
  250. package/pure-cell/modern/components/graphics/component.js +1 -1
  251. package/pure-cell/modern/components/graphics/index.d.ts +1 -1
  252. package/pure-cell/modern/components/graphics/index.js +1 -1
  253. package/pure-cell/modern/components/main/component.js +1 -1
  254. package/pure-cell/modern/components/main/index.d.ts +1 -1
  255. package/pure-cell/modern/components/main/index.js +1 -1
  256. package/pure-cell/modern/components/text/component.js +1 -1
  257. package/pure-cell/modern/components/text/index.d.ts +1 -1
  258. package/pure-cell/modern/components/text/index.js +1 -1
  259. package/pure-cell/modern/index.js +1 -1
  260. package/shared/cssm/exhaustiveCheck.d.ts +2 -0
  261. package/shared/cssm/exhaustiveCheck.js +5 -0
  262. package/shared/cssm/index.d.ts +1 -0
  263. package/shared/cssm/index.js +2 -0
  264. package/shared/esm/exhaustiveCheck.d.ts +2 -0
  265. package/shared/esm/exhaustiveCheck.js +3 -0
  266. package/shared/esm/index.d.ts +1 -0
  267. package/shared/esm/index.js +1 -0
  268. package/shared/exhaustiveCheck.d.ts +2 -0
  269. package/shared/exhaustiveCheck.js +5 -0
  270. package/shared/index.d.ts +1 -0
  271. package/shared/index.js +2 -0
  272. package/shared/modern/exhaustiveCheck.d.ts +2 -0
  273. package/shared/modern/exhaustiveCheck.js +3 -0
  274. package/shared/modern/index.d.ts +1 -0
  275. package/shared/modern/index.js +1 -0
  276. package/side-panel/components/controls/Component.js +1 -1
  277. package/side-panel/components/footer/Component.js +1 -1
  278. package/side-panel/esm/Component.responsive.js +1 -1
  279. package/side-panel/esm/components/controls/Component.js +1 -1
  280. package/side-panel/esm/components/controls/index.js +1 -1
  281. package/side-panel/esm/components/footer/Component.desktop.js +1 -1
  282. package/side-panel/esm/components/footer/Component.js +1 -1
  283. package/side-panel/esm/components/footer/Component.mobile.js +1 -1
  284. package/side-panel/esm/desktop/Component.desktop.js +1 -1
  285. package/side-panel/esm/desktop/index.js +1 -1
  286. package/side-panel/esm/index.js +1 -1
  287. package/side-panel/esm/mobile/Component.mobile.js +1 -1
  288. package/side-panel/esm/mobile/index.js +1 -1
  289. package/side-panel/modern/Component.responsive.js +1 -1
  290. package/side-panel/modern/components/controls/Component.js +1 -1
  291. package/side-panel/modern/components/controls/index.js +1 -1
  292. package/side-panel/modern/components/footer/Component.desktop.js +1 -1
  293. package/side-panel/modern/components/footer/Component.js +1 -1
  294. package/side-panel/modern/components/footer/Component.mobile.js +1 -1
  295. package/side-panel/modern/desktop/Component.desktop.js +1 -1
  296. package/side-panel/modern/desktop/index.js +1 -1
  297. package/side-panel/modern/index.js +1 -1
  298. package/side-panel/modern/mobile/Component.mobile.js +1 -1
  299. package/side-panel/modern/mobile/index.js +1 -1
  300. package/skeleton/Component.d.ts +4 -0
  301. package/skeleton/Component.js +6 -3
  302. package/skeleton/cssm/Component.d.ts +4 -0
  303. package/skeleton/cssm/Component.js +5 -2
  304. package/skeleton/cssm/index.module.css +9 -42
  305. package/skeleton/esm/Component.d.ts +4 -0
  306. package/skeleton/esm/Component.js +6 -3
  307. package/skeleton/esm/index.css +9 -42
  308. package/skeleton/index.css +9 -42
  309. package/skeleton/modern/Component.d.ts +4 -0
  310. package/skeleton/modern/Component.js +6 -3
  311. package/skeleton/modern/index.css +9 -42
  312. package/status-badge/Component.d.ts +8 -3
  313. package/status-badge/Component.js +3 -73
  314. package/status-badge/consts/iconMap.d.ts +4 -0
  315. package/status-badge/consts/iconMap.js +76 -0
  316. package/status-badge/cssm/Component.d.ts +8 -3
  317. package/status-badge/cssm/Component.js +3 -73
  318. package/status-badge/cssm/consts/iconMap.d.ts +4 -0
  319. package/status-badge/cssm/consts/iconMap.js +76 -0
  320. package/status-badge/cssm/hooks/useStatusBadgeIcon.d.ts +5 -0
  321. package/status-badge/cssm/hooks/useStatusBadgeIcon.js +21 -0
  322. package/status-badge/cssm/index.d.ts +1 -0
  323. package/status-badge/cssm/types/statusBadgePropTypes.d.ts +7 -0
  324. package/status-badge/cssm/types/statusBadgePropTypes.js +1 -0
  325. package/status-badge/esm/Component.d.ts +8 -3
  326. package/status-badge/esm/Component.js +18 -73
  327. package/status-badge/esm/consts/iconMap.d.ts +4 -0
  328. package/status-badge/esm/consts/iconMap.js +74 -0
  329. package/status-badge/esm/hooks/useStatusBadgeIcon.d.ts +5 -0
  330. package/status-badge/esm/hooks/useStatusBadgeIcon.js +32 -0
  331. package/status-badge/esm/index.d.ts +1 -0
  332. package/status-badge/esm/index.js +3 -0
  333. package/status-badge/esm/types/statusBadgePropTypes.d.ts +7 -0
  334. package/status-badge/esm/types/statusBadgePropTypes.js +1 -0
  335. package/status-badge/hooks/useStatusBadgeIcon.d.ts +5 -0
  336. package/status-badge/hooks/useStatusBadgeIcon.js +21 -0
  337. package/status-badge/index.d.ts +1 -0
  338. package/status-badge/modern/Component.d.ts +8 -3
  339. package/status-badge/modern/Component.js +17 -73
  340. package/status-badge/modern/consts/iconMap.d.ts +4 -0
  341. package/status-badge/modern/consts/iconMap.js +74 -0
  342. package/status-badge/modern/hooks/useStatusBadgeIcon.d.ts +5 -0
  343. package/status-badge/modern/hooks/useStatusBadgeIcon.js +34 -0
  344. package/status-badge/modern/index.d.ts +1 -0
  345. package/status-badge/modern/index.js +2 -0
  346. package/status-badge/modern/types/statusBadgePropTypes.d.ts +7 -0
  347. package/status-badge/modern/types/statusBadgePropTypes.js +1 -0
  348. package/status-badge/types/statusBadgePropTypes.d.ts +7 -0
  349. package/status-badge/types/statusBadgePropTypes.js +1 -0
  350. package/tab-bar/Component.js +7 -3
  351. package/tab-bar/components/tab/Component.js +9 -5
  352. package/tab-bar/components/tab/index.css +5 -2
  353. package/tab-bar/consts.d.ts +9 -0
  354. package/tab-bar/consts.js +13 -0
  355. package/tab-bar/cssm/Component.js +6 -2
  356. package/tab-bar/cssm/components/tab/Component.js +8 -4
  357. package/tab-bar/cssm/components/tab/index.module.css +5 -2
  358. package/tab-bar/cssm/consts.d.ts +9 -0
  359. package/tab-bar/cssm/consts.js +13 -0
  360. package/tab-bar/cssm/index.module.css +9 -7
  361. package/tab-bar/cssm/types.d.ts +11 -3
  362. package/tab-bar/esm/Component.js +9 -4
  363. package/tab-bar/esm/components/tab/Component.js +9 -5
  364. package/tab-bar/esm/components/tab/index.css +5 -2
  365. package/tab-bar/esm/components/tab/index.js +2 -1
  366. package/tab-bar/esm/consts.d.ts +9 -0
  367. package/tab-bar/esm/consts.js +10 -0
  368. package/tab-bar/esm/index.css +9 -7
  369. package/tab-bar/esm/index.js +2 -1
  370. package/tab-bar/esm/types.d.ts +11 -3
  371. package/tab-bar/index.css +9 -7
  372. package/tab-bar/modern/Component.js +9 -4
  373. package/tab-bar/modern/components/tab/Component.js +9 -5
  374. package/tab-bar/modern/components/tab/index.css +5 -2
  375. package/tab-bar/modern/components/tab/index.js +2 -1
  376. package/tab-bar/modern/consts.d.ts +9 -0
  377. package/tab-bar/modern/consts.js +10 -0
  378. package/tab-bar/modern/index.css +9 -7
  379. package/tab-bar/modern/index.js +2 -1
  380. package/tab-bar/modern/types.d.ts +11 -3
  381. package/tab-bar/types.d.ts +11 -3
  382. package/themes/click.css +0 -6
  383. package/themes/compiled/mobile-dark-bluetint.css +70 -219
  384. package/themes/mixins/click.css +0 -2
  385. package/toast-plate/browser-a216f694.d.ts +6 -0
  386. package/toast-plate/components/base-toast-plate/component.d.ts +9 -12
  387. package/toast-plate/components/base-toast-plate/component.js +16 -14
  388. package/toast-plate/components/base-toast-plate/hooks/useCustomIcons.d.ts +6 -0
  389. package/toast-plate/components/base-toast-plate/hooks/useCustomIcons.js +13 -0
  390. package/toast-plate/components/base-toast-plate/hooks/useDeprecatedBadge.d.ts +7 -0
  391. package/toast-plate/components/base-toast-plate/hooks/useDeprecatedBadge.js +26 -0
  392. package/toast-plate/components/base-toast-plate/types/unsafeBadgeProps.d.ts +6 -0
  393. package/toast-plate/components/base-toast-plate/types/unsafeBadgeProps.js +1 -0
  394. package/toast-plate/components/base-toast-plate/utils/getBaseToastPlateTestIds.d.ts +5 -0
  395. package/toast-plate/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +14 -0
  396. package/toast-plate/components/base-toast-plate/utils/isUnsafeBadge.d.ts +5 -0
  397. package/toast-plate/components/base-toast-plate/utils/isUnsafeBadge.js +8 -0
  398. package/toast-plate/cssm/browser-a216f694.d.ts +6 -0
  399. package/toast-plate/cssm/components/base-toast-plate/component.d.ts +9 -12
  400. package/toast-plate/cssm/components/base-toast-plate/component.js +16 -14
  401. package/toast-plate/cssm/components/base-toast-plate/hooks/useCustomIcons.d.ts +6 -0
  402. package/toast-plate/cssm/components/base-toast-plate/hooks/useCustomIcons.js +13 -0
  403. package/toast-plate/cssm/components/base-toast-plate/hooks/useDeprecatedBadge.d.ts +7 -0
  404. package/toast-plate/cssm/components/base-toast-plate/hooks/useDeprecatedBadge.js +26 -0
  405. package/toast-plate/cssm/components/base-toast-plate/types/unsafeBadgeProps.d.ts +6 -0
  406. package/toast-plate/cssm/components/base-toast-plate/types/unsafeBadgeProps.js +1 -0
  407. package/toast-plate/cssm/components/base-toast-plate/utils/getBaseToastPlateTestIds.d.ts +5 -0
  408. package/toast-plate/cssm/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +14 -0
  409. package/toast-plate/cssm/components/base-toast-plate/utils/isUnsafeBadge.d.ts +5 -0
  410. package/toast-plate/cssm/components/base-toast-plate/utils/isUnsafeBadge.js +8 -0
  411. package/toast-plate/cssm/getDataTestId-73ea38f8.d.ts +3 -0
  412. package/toast-plate/cssm/getDataTestId-73ea38f8.js +6 -0
  413. package/toast-plate/cssm/index-307da6d7.d.ts +71 -0
  414. package/toast-plate/cssm/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  415. package/toast-plate/esm/Component.responsive.js +6 -4
  416. package/toast-plate/esm/browser-a216f694.d.ts +6 -0
  417. package/toast-plate/esm/components/base-toast-plate/component.d.ts +9 -12
  418. package/toast-plate/esm/components/base-toast-plate/component.js +16 -14
  419. package/toast-plate/esm/components/base-toast-plate/hooks/useCustomIcons.d.ts +6 -0
  420. package/toast-plate/esm/components/base-toast-plate/hooks/useCustomIcons.js +11 -0
  421. package/toast-plate/esm/components/base-toast-plate/hooks/useDeprecatedBadge.d.ts +7 -0
  422. package/toast-plate/esm/components/base-toast-plate/hooks/useDeprecatedBadge.js +24 -0
  423. package/toast-plate/esm/components/base-toast-plate/index.js +6 -4
  424. package/toast-plate/esm/components/base-toast-plate/types/unsafeBadgeProps.d.ts +6 -0
  425. package/toast-plate/esm/components/base-toast-plate/types/unsafeBadgeProps.js +1 -0
  426. package/toast-plate/esm/components/base-toast-plate/utils/getBaseToastPlateTestIds.d.ts +5 -0
  427. package/toast-plate/esm/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +12 -0
  428. package/toast-plate/esm/components/base-toast-plate/utils/isUnsafeBadge.d.ts +5 -0
  429. package/toast-plate/esm/components/base-toast-plate/utils/isUnsafeBadge.js +6 -0
  430. package/toast-plate/esm/desktop/Component.desktop.js +6 -4
  431. package/toast-plate/esm/desktop/index.js +6 -4
  432. package/toast-plate/esm/getDataTestId-b3cf0f77.d.ts +3 -0
  433. package/toast-plate/esm/getDataTestId-b3cf0f77.js +6 -0
  434. package/toast-plate/esm/index-307da6d7.d.ts +71 -0
  435. package/toast-plate/esm/index.js +6 -4
  436. package/toast-plate/esm/mobile/Component.mobile.js +6 -4
  437. package/toast-plate/esm/mobile/index.js +6 -4
  438. package/toast-plate/esm/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  439. package/toast-plate/getDataTestId-439ac98c.d.ts +3 -0
  440. package/toast-plate/getDataTestId-439ac98c.js +6 -0
  441. package/toast-plate/index-307da6d7.d.ts +71 -0
  442. package/toast-plate/modern/Component.responsive.js +6 -4
  443. package/toast-plate/modern/browser-a216f694.d.ts +6 -0
  444. package/toast-plate/modern/components/base-toast-plate/component.d.ts +9 -12
  445. package/toast-plate/modern/components/base-toast-plate/component.js +16 -14
  446. package/toast-plate/modern/components/base-toast-plate/hooks/useCustomIcons.d.ts +6 -0
  447. package/toast-plate/modern/components/base-toast-plate/hooks/useCustomIcons.js +11 -0
  448. package/toast-plate/modern/components/base-toast-plate/hooks/useDeprecatedBadge.d.ts +7 -0
  449. package/toast-plate/modern/components/base-toast-plate/hooks/useDeprecatedBadge.js +24 -0
  450. package/toast-plate/modern/components/base-toast-plate/index.js +6 -4
  451. package/toast-plate/modern/components/base-toast-plate/types/unsafeBadgeProps.d.ts +6 -0
  452. package/toast-plate/modern/components/base-toast-plate/types/unsafeBadgeProps.js +1 -0
  453. package/toast-plate/modern/components/base-toast-plate/utils/getBaseToastPlateTestIds.d.ts +5 -0
  454. package/toast-plate/modern/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +12 -0
  455. package/toast-plate/modern/components/base-toast-plate/utils/isUnsafeBadge.d.ts +5 -0
  456. package/toast-plate/modern/components/base-toast-plate/utils/isUnsafeBadge.js +4 -0
  457. package/toast-plate/modern/desktop/Component.desktop.js +6 -4
  458. package/toast-plate/modern/desktop/index.js +6 -4
  459. package/toast-plate/modern/getDataTestId-8aa8ef85.d.ts +3 -0
  460. package/toast-plate/modern/getDataTestId-8aa8ef85.js +6 -0
  461. package/toast-plate/modern/index-307da6d7.d.ts +71 -0
  462. package/toast-plate/modern/index.js +6 -4
  463. package/toast-plate/modern/mobile/Component.mobile.js +6 -4
  464. package/toast-plate/modern/mobile/index.js +6 -4
  465. package/toast-plate/modern/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  466. package/toast-plate/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  467. package/typography/esm/component.js +2 -2
  468. package/typography/esm/index.js +2 -2
  469. package/typography/esm/text/component.js +1 -1
  470. package/typography/esm/text/index.js +1 -1
  471. package/typography/esm/title/component.js +1 -1
  472. package/typography/esm/title/index.js +2 -2
  473. package/typography/esm/title-mobile/component.js +2 -2
  474. package/typography/esm/title-mobile/index.js +2 -2
  475. package/typography/esm/title-responsive/component.js +2 -2
  476. package/typography/esm/title-responsive/index.js +2 -2
  477. package/typography/modern/component.js +2 -2
  478. package/typography/modern/index.js +2 -2
  479. package/typography/modern/text/component.js +1 -1
  480. package/typography/modern/text/index.js +1 -1
  481. package/typography/modern/title/component.js +1 -1
  482. package/typography/modern/title/index.js +2 -2
  483. package/typography/modern/title-mobile/component.js +2 -2
  484. package/typography/modern/title-mobile/index.js +2 -2
  485. package/typography/modern/title-responsive/component.js +2 -2
  486. package/typography/modern/title-responsive/index.js +2 -2
  487. package/typography/text/component.js +1 -1
  488. package/typography/title/component.js +1 -1
  489. package/typography/title/index.js +1 -1
  490. package/typography/title-mobile/component.js +1 -1
  491. package/typography/title-responsive/component.js +1 -1
  492. package/universal-date-input/cssm/index-5712fce2.d.ts +1 -8
  493. package/universal-date-input/cssm/use-skeleton-1328ead9.d.ts +4 -0
  494. package/universal-date-input/esm/index-5712fce2.d.ts +1 -8
  495. package/universal-date-input/esm/use-skeleton-1328ead9.d.ts +4 -0
  496. package/universal-date-input/index-5712fce2.d.ts +1 -8
  497. package/universal-date-input/modern/index-5712fce2.d.ts +1 -8
  498. package/universal-date-input/modern/use-skeleton-1328ead9.d.ts +4 -0
  499. package/universal-date-input/use-skeleton-1328ead9.d.ts +4 -0
  500. package/base-modal/cssm/helpers/lockScroll.d.ts +0 -4
  501. package/base-modal/cssm/helpers/lockScroll.js +0 -18
  502. package/base-modal/esm/helpers/lockScroll.d.ts +0 -4
  503. package/base-modal/esm/helpers/lockScroll.js +0 -14
  504. package/base-modal/helpers/lockScroll.d.ts +0 -4
  505. package/base-modal/helpers/lockScroll.js +0 -18
  506. package/base-modal/modern/helpers/lockScroll.d.ts +0 -4
  507. package/base-modal/modern/helpers/lockScroll.js +0 -14
  508. package/themes/mixins/skeleton/click.css +0 -8
  509. package/themes/skeleton/click.css +0 -8
  510. /package/calendar-range/esm/{index.module-7ba85cb1.js → index.module-912e88cf.js} +0 -0
  511. /package/calendar-range/{index.module-c6ded4a2.js → index.module-bf0591f0.js} +0 -0
  512. /package/calendar-range/modern/{index.module-0604d154.js → index.module-636e08a2.js} +0 -0
  513. /package/confirmation/{countdown-section-9194293e.d.ts → countdown-section-b30d5212.d.ts} +0 -0
  514. /package/confirmation/{countdown-section-9194293e.js → countdown-section-b30d5212.js} +0 -0
  515. /package/confirmation/esm/{countdown-section-fc384721.d.ts → countdown-section-c4f73a77.d.ts} +0 -0
  516. /package/confirmation/esm/{countdown-section-fc384721.js → countdown-section-c4f73a77.js} +0 -0
  517. /package/confirmation/modern/{countdown-section-f33e01b7.d.ts → countdown-section-f3215ad8.d.ts} +0 -0
  518. /package/confirmation/modern/{countdown-section-f33e01b7.js → countdown-section-f3215ad8.js} +0 -0
  519. /package/gallery/{buttons-160fdb5a.d.ts → buttons-19c30d23.d.ts} +0 -0
  520. /package/gallery/{buttons-160fdb5a.js → buttons-19c30d23.js} +0 -0
  521. /package/gallery/esm/{buttons-f951e5ce.d.ts → buttons-37ed3ab5.d.ts} +0 -0
  522. /package/gallery/esm/{buttons-f951e5ce.js → buttons-37ed3ab5.js} +0 -0
  523. /package/gallery/esm/{slide-3595abb4.d.ts → slide-8d1299a5.d.ts} +0 -0
  524. /package/gallery/esm/{slide-3595abb4.js → slide-8d1299a5.js} +0 -0
  525. /package/gallery/modern/{buttons-a3ff616b.d.ts → buttons-92efe05c.d.ts} +0 -0
  526. /package/gallery/modern/{buttons-a3ff616b.js → buttons-92efe05c.js} +0 -0
  527. /package/gallery/modern/{slide-acb49e8e.d.ts → slide-57aa7661.d.ts} +0 -0
  528. /package/gallery/modern/{slide-acb49e8e.js → slide-57aa7661.js} +0 -0
  529. /package/gallery/{slide-2268997b.d.ts → slide-45ca49f1.d.ts} +0 -0
  530. /package/gallery/{slide-2268997b.js → slide-45ca49f1.js} +0 -0
  531. /package/modal/esm/{layout.module-2fe04090.js → layout.module-b635b128.js} +0 -0
  532. /package/modal/{layout.module-8adfa2ca.js → layout.module-34149103.js} +0 -0
  533. /package/modal/modern/{layout.module-5847d827.js → layout.module-41e8947b.js} +0 -0
  534. /package/picker-button/{Component-a5b021bd.d.ts → Component-307da6d7.d.ts} +0 -0
  535. /package/picker-button/cssm/{Component-a5b021bd.d.ts → Component-307da6d7.d.ts} +0 -0
  536. /package/picker-button/esm/{Component-a5b021bd.d.ts → Component-307da6d7.d.ts} +0 -0
  537. /package/picker-button/modern/{Component-a5b021bd.d.ts → Component-307da6d7.d.ts} +0 -0
  538. /package/pure-cell/{component-41907143.d.ts → component-5e8acf12.d.ts} +0 -0
  539. /package/pure-cell/{component-41907143.js → component-5e8acf12.js} +0 -0
  540. /package/pure-cell/esm/{component-e23350f5.d.ts → component-f28a5631.d.ts} +0 -0
  541. /package/pure-cell/esm/{component-e23350f5.js → component-f28a5631.js} +0 -0
  542. /package/pure-cell/modern/{component-b9194169.d.ts → component-10bc9276.d.ts} +0 -0
  543. /package/pure-cell/modern/{component-b9194169.js → component-10bc9276.js} +0 -0
  544. /package/side-panel/esm/{layout.module-a9e68775.js → layout.module-0dc6a00f.js} +0 -0
  545. /package/side-panel/{layout.module-df4fedc9.js → layout.module-5eeb8248.js} +0 -0
  546. /package/side-panel/modern/{layout.module-d348cc57.js → layout.module-6f83e451.js} +0 -0
  547. /package/typography/{colors.module-a11b73e9.js → colors.module-5b90a9cc.js} +0 -0
  548. /package/typography/{common.module-25e7ce83.js → common.module-53a00318.js} +0 -0
  549. /package/typography/esm/{colors.module-e5414e42.js → colors.module-f2501c6f.js} +0 -0
  550. /package/typography/esm/{common.module-bd07cc74.js → common.module-04c7810e.js} +0 -0
  551. /package/typography/modern/{colors.module-9fa7fdee.js → colors.module-83a4b747.js} +0 -0
  552. /package/typography/modern/{common.module-e73684d9.js → common.module-278c339a.js} +0 -0
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
+ import { StatusBadgeCustomIcon, StatusBadgeSizes, StatusBadgeViews } from "./types/statusBadgePropTypes";
3
4
  type StatusBadgeProps = {
4
5
  /**
5
6
  * Дополнительный класс
@@ -9,7 +10,7 @@ type StatusBadgeProps = {
9
10
  * Размер компонента
10
11
  * @default 24
11
12
  */
12
- size?: 16 | 20 | 24 | 32 | 40;
13
+ size?: StatusBadgeSizes;
13
14
  /**
14
15
  * Набор цветов для компонента
15
16
  */
@@ -17,11 +18,15 @@ type StatusBadgeProps = {
17
18
  /**
18
19
  * Вид бейджа.
19
20
  */
20
- view: 'positive-checkmark' | 'negative-cross' | 'negative-alert' | 'negative-block' | 'attention-alert' | 'neutral-information' | 'neutral-operation' | 'neutral-cross';
21
+ view: StatusBadgeViews;
21
22
  /**
22
23
  * Идентификатор для систем автоматизированного тестирования
23
24
  */
24
25
  dataTestId?: string;
26
+ /**
27
+ * Кастомные иконки
28
+ */
29
+ customIcons?: StatusBadgeCustomIcon;
25
30
  };
26
- declare const StatusBadge: ({ className, dataTestId, size, view, colors, }: StatusBadgeProps) => React.JSX.Element;
31
+ declare const StatusBadge: ({ className, dataTestId, size, view, colors, customIcons, }: StatusBadgeProps) => React.JSX.Element;
27
32
  export { StatusBadgeProps, StatusBadge };
@@ -2,19 +2,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
3
  var React = require('react');
4
4
  var cn = require('classnames');
5
- var CheckmarkCompactMIcon = require('@alfalab/icons-glyph/CheckmarkCompactMIcon');
6
- var CheckmarkCompactSIcon = require('@alfalab/icons-glyph/CheckmarkCompactSIcon');
7
- var ClockHandsCompactMIcon = require('@alfalab/icons-glyph/ClockHandsCompactMIcon');
8
- var ClockHandsCompactSIcon = require('@alfalab/icons-glyph/ClockHandsCompactSIcon');
9
- var CrossCompactMIcon = require('@alfalab/icons-glyph/CrossCompactMIcon');
10
- var CrossCompactSIcon = require('@alfalab/icons-glyph/CrossCompactSIcon');
11
- var ExclamationCompactMIcon = require('@alfalab/icons-glyph/ExclamationCompactMIcon');
12
- var ExclamationCompactSIcon = require('@alfalab/icons-glyph/ExclamationCompactSIcon');
13
- var InformationCompactMIcon = require('@alfalab/icons-glyph/InformationCompactMIcon');
14
- var InformationCompactSIcon = require('@alfalab/icons-glyph/InformationCompactSIcon');
15
- var StopBrickCompactMIcon = require('@alfalab/icons-glyph/StopBrickCompactMIcon');
16
- var StopBrickMIcon = require('@alfalab/icons-glyph/StopBrickMIcon');
17
- var StopBrickSIcon = require('@alfalab/icons-glyph/StopBrickSIcon');
5
+ var hooks_useStatusBadgeIcon = require('./hooks/useStatusBadgeIcon.js');
18
6
 
19
7
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
20
8
 
@@ -34,67 +22,9 @@ var colorStyles = {
34
22
  default: defaultColors,
35
23
  inverted: invertedColors,
36
24
  };
37
- var ICON_MAP = {
38
- 'positive-checkmark': {
39
- 16: CheckmarkCompactSIcon.CheckmarkCompactSIcon,
40
- 20: CheckmarkCompactSIcon.CheckmarkCompactSIcon,
41
- 24: CheckmarkCompactMIcon.CheckmarkCompactMIcon,
42
- 32: CheckmarkCompactMIcon.CheckmarkCompactMIcon,
43
- 40: CheckmarkCompactMIcon.CheckmarkCompactMIcon,
44
- },
45
- 'negative-cross': {
46
- 16: CrossCompactSIcon.CrossCompactSIcon,
47
- 20: CrossCompactSIcon.CrossCompactSIcon,
48
- 24: CrossCompactMIcon.CrossCompactMIcon,
49
- 32: CrossCompactMIcon.CrossCompactMIcon,
50
- 40: CrossCompactMIcon.CrossCompactMIcon,
51
- },
52
- 'negative-alert': {
53
- 16: ExclamationCompactSIcon.ExclamationCompactSIcon,
54
- 20: ExclamationCompactSIcon.ExclamationCompactSIcon,
55
- 24: ExclamationCompactMIcon.ExclamationCompactMIcon,
56
- 32: ExclamationCompactMIcon.ExclamationCompactMIcon,
57
- 40: ExclamationCompactMIcon.ExclamationCompactMIcon,
58
- },
59
- 'negative-block': {
60
- 16: StopBrickSIcon.StopBrickSIcon,
61
- 20: StopBrickSIcon.StopBrickSIcon,
62
- 24: StopBrickCompactMIcon.StopBrickCompactMIcon,
63
- 32: StopBrickMIcon.StopBrickMIcon,
64
- 40: StopBrickMIcon.StopBrickMIcon,
65
- },
66
- 'attention-alert': {
67
- 16: ExclamationCompactSIcon.ExclamationCompactSIcon,
68
- 20: ExclamationCompactSIcon.ExclamationCompactSIcon,
69
- 24: ExclamationCompactMIcon.ExclamationCompactMIcon,
70
- 32: ExclamationCompactMIcon.ExclamationCompactMIcon,
71
- 40: ExclamationCompactMIcon.ExclamationCompactMIcon,
72
- },
73
- 'neutral-information': {
74
- 16: InformationCompactSIcon.InformationCompactSIcon,
75
- 20: InformationCompactSIcon.InformationCompactSIcon,
76
- 24: InformationCompactMIcon.InformationCompactMIcon,
77
- 32: InformationCompactMIcon.InformationCompactMIcon,
78
- 40: InformationCompactMIcon.InformationCompactMIcon,
79
- },
80
- 'neutral-operation': {
81
- 16: ClockHandsCompactSIcon.ClockHandsCompactSIcon,
82
- 20: ClockHandsCompactSIcon.ClockHandsCompactSIcon,
83
- 24: ClockHandsCompactMIcon.ClockHandsCompactMIcon,
84
- 32: ClockHandsCompactMIcon.ClockHandsCompactMIcon,
85
- 40: ClockHandsCompactMIcon.ClockHandsCompactMIcon,
86
- },
87
- 'neutral-cross': {
88
- 16: CrossCompactSIcon.CrossCompactSIcon,
89
- 20: CrossCompactSIcon.CrossCompactSIcon,
90
- 24: CrossCompactMIcon.CrossCompactMIcon,
91
- 32: CrossCompactMIcon.CrossCompactMIcon,
92
- 40: CrossCompactMIcon.CrossCompactMIcon,
93
- },
94
- };
95
25
  var StatusBadge = function (_a) {
96
- var className = _a.className, dataTestId = _a.dataTestId, _b = _a.size, size = _b === void 0 ? 24 : _b, view = _a.view, _c = _a.colors, colors = _c === void 0 ? 'default' : _c;
97
- var Icon = ICON_MAP[view][size];
26
+ var className = _a.className, dataTestId = _a.dataTestId, _b = _a.size, size = _b === void 0 ? 24 : _b, view = _a.view, _c = _a.colors, colors = _c === void 0 ? 'default' : _c, customIcons = _a.customIcons;
27
+ var Icon = hooks_useStatusBadgeIcon.useStatusBadgeIcon(view, size, customIcons).Icon;
98
28
  return (React__default.default.createElement("div", { className: cn__default.default(styles.component, className, styles["size-".concat(size)], colorStyles[colors].component, colorStyles[colors][view]), "data-test-id": dataTestId },
99
29
  React__default.default.createElement(Icon, null)));
100
30
  };
@@ -0,0 +1,4 @@
1
+ import { StatusBadgeIcon, StatusBadgeSizes, StatusBadgeViews } from "../index";
2
+ type IconMap = Record<StatusBadgeViews, Record<NonNullable<StatusBadgeSizes>, StatusBadgeIcon>>;
3
+ declare const ICON_MAP: IconMap;
4
+ export { IconMap, ICON_MAP };
@@ -0,0 +1,76 @@
1
+ Object.defineProperty(exports, '__esModule', { value: true });
2
+
3
+ var CheckmarkCompactMIcon = require('@alfalab/icons-glyph/CheckmarkCompactMIcon');
4
+ var CheckmarkCompactSIcon = require('@alfalab/icons-glyph/CheckmarkCompactSIcon');
5
+ var ClockHandsCompactMIcon = require('@alfalab/icons-glyph/ClockHandsCompactMIcon');
6
+ var ClockHandsCompactSIcon = require('@alfalab/icons-glyph/ClockHandsCompactSIcon');
7
+ var CrossCompactMIcon = require('@alfalab/icons-glyph/CrossCompactMIcon');
8
+ var CrossCompactSIcon = require('@alfalab/icons-glyph/CrossCompactSIcon');
9
+ var ExclamationCompactMIcon = require('@alfalab/icons-glyph/ExclamationCompactMIcon');
10
+ var ExclamationCompactSIcon = require('@alfalab/icons-glyph/ExclamationCompactSIcon');
11
+ var InformationCompactMIcon = require('@alfalab/icons-glyph/InformationCompactMIcon');
12
+ var InformationCompactSIcon = require('@alfalab/icons-glyph/InformationCompactSIcon');
13
+ var StopBrickCompactMIcon = require('@alfalab/icons-glyph/StopBrickCompactMIcon');
14
+ var StopBrickMIcon = require('@alfalab/icons-glyph/StopBrickMIcon');
15
+ var StopBrickSIcon = require('@alfalab/icons-glyph/StopBrickSIcon');
16
+
17
+ var ICON_MAP = {
18
+ 'positive-checkmark': {
19
+ 16: CheckmarkCompactSIcon.CheckmarkCompactSIcon,
20
+ 20: CheckmarkCompactSIcon.CheckmarkCompactSIcon,
21
+ 24: CheckmarkCompactMIcon.CheckmarkCompactMIcon,
22
+ 32: CheckmarkCompactMIcon.CheckmarkCompactMIcon,
23
+ 40: CheckmarkCompactMIcon.CheckmarkCompactMIcon,
24
+ },
25
+ 'negative-cross': {
26
+ 16: CrossCompactSIcon.CrossCompactSIcon,
27
+ 20: CrossCompactSIcon.CrossCompactSIcon,
28
+ 24: CrossCompactMIcon.CrossCompactMIcon,
29
+ 32: CrossCompactMIcon.CrossCompactMIcon,
30
+ 40: CrossCompactMIcon.CrossCompactMIcon,
31
+ },
32
+ 'negative-alert': {
33
+ 16: ExclamationCompactSIcon.ExclamationCompactSIcon,
34
+ 20: ExclamationCompactSIcon.ExclamationCompactSIcon,
35
+ 24: ExclamationCompactMIcon.ExclamationCompactMIcon,
36
+ 32: ExclamationCompactMIcon.ExclamationCompactMIcon,
37
+ 40: ExclamationCompactMIcon.ExclamationCompactMIcon,
38
+ },
39
+ 'negative-block': {
40
+ 16: StopBrickSIcon.StopBrickSIcon,
41
+ 20: StopBrickSIcon.StopBrickSIcon,
42
+ 24: StopBrickCompactMIcon.StopBrickCompactMIcon,
43
+ 32: StopBrickMIcon.StopBrickMIcon,
44
+ 40: StopBrickMIcon.StopBrickMIcon,
45
+ },
46
+ 'attention-alert': {
47
+ 16: ExclamationCompactSIcon.ExclamationCompactSIcon,
48
+ 20: ExclamationCompactSIcon.ExclamationCompactSIcon,
49
+ 24: ExclamationCompactMIcon.ExclamationCompactMIcon,
50
+ 32: ExclamationCompactMIcon.ExclamationCompactMIcon,
51
+ 40: ExclamationCompactMIcon.ExclamationCompactMIcon,
52
+ },
53
+ 'neutral-information': {
54
+ 16: InformationCompactSIcon.InformationCompactSIcon,
55
+ 20: InformationCompactSIcon.InformationCompactSIcon,
56
+ 24: InformationCompactMIcon.InformationCompactMIcon,
57
+ 32: InformationCompactMIcon.InformationCompactMIcon,
58
+ 40: InformationCompactMIcon.InformationCompactMIcon,
59
+ },
60
+ 'neutral-operation': {
61
+ 16: ClockHandsCompactSIcon.ClockHandsCompactSIcon,
62
+ 20: ClockHandsCompactSIcon.ClockHandsCompactSIcon,
63
+ 24: ClockHandsCompactMIcon.ClockHandsCompactMIcon,
64
+ 32: ClockHandsCompactMIcon.ClockHandsCompactMIcon,
65
+ 40: ClockHandsCompactMIcon.ClockHandsCompactMIcon,
66
+ },
67
+ 'neutral-cross': {
68
+ 16: CrossCompactSIcon.CrossCompactSIcon,
69
+ 20: CrossCompactSIcon.CrossCompactSIcon,
70
+ 24: CrossCompactMIcon.CrossCompactMIcon,
71
+ 32: CrossCompactMIcon.CrossCompactMIcon,
72
+ 40: CrossCompactMIcon.CrossCompactMIcon,
73
+ },
74
+ };
75
+
76
+ exports.ICON_MAP = ICON_MAP;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
+ import { StatusBadgeCustomIcon, StatusBadgeSizes, StatusBadgeViews } from "./types/statusBadgePropTypes";
3
4
  type StatusBadgeProps = {
4
5
  /**
5
6
  * Дополнительный класс
@@ -9,7 +10,7 @@ type StatusBadgeProps = {
9
10
  * Размер компонента
10
11
  * @default 24
11
12
  */
12
- size?: 16 | 20 | 24 | 32 | 40;
13
+ size?: StatusBadgeSizes;
13
14
  /**
14
15
  * Набор цветов для компонента
15
16
  */
@@ -17,11 +18,15 @@ type StatusBadgeProps = {
17
18
  /**
18
19
  * Вид бейджа.
19
20
  */
20
- view: 'positive-checkmark' | 'negative-cross' | 'negative-alert' | 'negative-block' | 'attention-alert' | 'neutral-information' | 'neutral-operation' | 'neutral-cross';
21
+ view: StatusBadgeViews;
21
22
  /**
22
23
  * Идентификатор для систем автоматизированного тестирования
23
24
  */
24
25
  dataTestId?: string;
26
+ /**
27
+ * Кастомные иконки
28
+ */
29
+ customIcons?: StatusBadgeCustomIcon;
25
30
  };
26
- declare const StatusBadge: ({ className, dataTestId, size, view, colors, }: StatusBadgeProps) => React.JSX.Element;
31
+ declare const StatusBadge: ({ className, dataTestId, size, view, colors, customIcons, }: StatusBadgeProps) => React.JSX.Element;
27
32
  export { StatusBadgeProps, StatusBadge };
@@ -2,19 +2,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
3
  var React = require('react');
4
4
  var cn = require('classnames');
5
- var CheckmarkCompactMIcon = require('@alfalab/icons-glyph/CheckmarkCompactMIcon');
6
- var CheckmarkCompactSIcon = require('@alfalab/icons-glyph/CheckmarkCompactSIcon');
7
- var ClockHandsCompactMIcon = require('@alfalab/icons-glyph/ClockHandsCompactMIcon');
8
- var ClockHandsCompactSIcon = require('@alfalab/icons-glyph/ClockHandsCompactSIcon');
9
- var CrossCompactMIcon = require('@alfalab/icons-glyph/CrossCompactMIcon');
10
- var CrossCompactSIcon = require('@alfalab/icons-glyph/CrossCompactSIcon');
11
- var ExclamationCompactMIcon = require('@alfalab/icons-glyph/ExclamationCompactMIcon');
12
- var ExclamationCompactSIcon = require('@alfalab/icons-glyph/ExclamationCompactSIcon');
13
- var InformationCompactMIcon = require('@alfalab/icons-glyph/InformationCompactMIcon');
14
- var InformationCompactSIcon = require('@alfalab/icons-glyph/InformationCompactSIcon');
15
- var StopBrickCompactMIcon = require('@alfalab/icons-glyph/StopBrickCompactMIcon');
16
- var StopBrickMIcon = require('@alfalab/icons-glyph/StopBrickMIcon');
17
- var StopBrickSIcon = require('@alfalab/icons-glyph/StopBrickSIcon');
5
+ var hooks_useStatusBadgeIcon = require('./hooks/useStatusBadgeIcon.js');
18
6
  var defaultColors = require('./default.module.css');
19
7
  var styles = require('./index.module.css');
20
8
  var invertedColors = require('./inverted.module.css');
@@ -31,67 +19,9 @@ var colorStyles = {
31
19
  default: defaultColors__default.default,
32
20
  inverted: invertedColors__default.default,
33
21
  };
34
- var ICON_MAP = {
35
- 'positive-checkmark': {
36
- 16: CheckmarkCompactSIcon.CheckmarkCompactSIcon,
37
- 20: CheckmarkCompactSIcon.CheckmarkCompactSIcon,
38
- 24: CheckmarkCompactMIcon.CheckmarkCompactMIcon,
39
- 32: CheckmarkCompactMIcon.CheckmarkCompactMIcon,
40
- 40: CheckmarkCompactMIcon.CheckmarkCompactMIcon,
41
- },
42
- 'negative-cross': {
43
- 16: CrossCompactSIcon.CrossCompactSIcon,
44
- 20: CrossCompactSIcon.CrossCompactSIcon,
45
- 24: CrossCompactMIcon.CrossCompactMIcon,
46
- 32: CrossCompactMIcon.CrossCompactMIcon,
47
- 40: CrossCompactMIcon.CrossCompactMIcon,
48
- },
49
- 'negative-alert': {
50
- 16: ExclamationCompactSIcon.ExclamationCompactSIcon,
51
- 20: ExclamationCompactSIcon.ExclamationCompactSIcon,
52
- 24: ExclamationCompactMIcon.ExclamationCompactMIcon,
53
- 32: ExclamationCompactMIcon.ExclamationCompactMIcon,
54
- 40: ExclamationCompactMIcon.ExclamationCompactMIcon,
55
- },
56
- 'negative-block': {
57
- 16: StopBrickSIcon.StopBrickSIcon,
58
- 20: StopBrickSIcon.StopBrickSIcon,
59
- 24: StopBrickCompactMIcon.StopBrickCompactMIcon,
60
- 32: StopBrickMIcon.StopBrickMIcon,
61
- 40: StopBrickMIcon.StopBrickMIcon,
62
- },
63
- 'attention-alert': {
64
- 16: ExclamationCompactSIcon.ExclamationCompactSIcon,
65
- 20: ExclamationCompactSIcon.ExclamationCompactSIcon,
66
- 24: ExclamationCompactMIcon.ExclamationCompactMIcon,
67
- 32: ExclamationCompactMIcon.ExclamationCompactMIcon,
68
- 40: ExclamationCompactMIcon.ExclamationCompactMIcon,
69
- },
70
- 'neutral-information': {
71
- 16: InformationCompactSIcon.InformationCompactSIcon,
72
- 20: InformationCompactSIcon.InformationCompactSIcon,
73
- 24: InformationCompactMIcon.InformationCompactMIcon,
74
- 32: InformationCompactMIcon.InformationCompactMIcon,
75
- 40: InformationCompactMIcon.InformationCompactMIcon,
76
- },
77
- 'neutral-operation': {
78
- 16: ClockHandsCompactSIcon.ClockHandsCompactSIcon,
79
- 20: ClockHandsCompactSIcon.ClockHandsCompactSIcon,
80
- 24: ClockHandsCompactMIcon.ClockHandsCompactMIcon,
81
- 32: ClockHandsCompactMIcon.ClockHandsCompactMIcon,
82
- 40: ClockHandsCompactMIcon.ClockHandsCompactMIcon,
83
- },
84
- 'neutral-cross': {
85
- 16: CrossCompactSIcon.CrossCompactSIcon,
86
- 20: CrossCompactSIcon.CrossCompactSIcon,
87
- 24: CrossCompactMIcon.CrossCompactMIcon,
88
- 32: CrossCompactMIcon.CrossCompactMIcon,
89
- 40: CrossCompactMIcon.CrossCompactMIcon,
90
- },
91
- };
92
22
  var StatusBadge = function (_a) {
93
- var className = _a.className, dataTestId = _a.dataTestId, _b = _a.size, size = _b === void 0 ? 24 : _b, view = _a.view, _c = _a.colors, colors = _c === void 0 ? 'default' : _c;
94
- var Icon = ICON_MAP[view][size];
23
+ var className = _a.className, dataTestId = _a.dataTestId, _b = _a.size, size = _b === void 0 ? 24 : _b, view = _a.view, _c = _a.colors, colors = _c === void 0 ? 'default' : _c, customIcons = _a.customIcons;
24
+ var Icon = hooks_useStatusBadgeIcon.useStatusBadgeIcon(view, size, customIcons).Icon;
95
25
  return (React__default.default.createElement("div", { className: cn__default.default(styles__default.default.component, className, styles__default.default["size-".concat(size)], colorStyles[colors].component, colorStyles[colors][view]), "data-test-id": dataTestId },
96
26
  React__default.default.createElement(Icon, null)));
97
27
  };
@@ -0,0 +1,4 @@
1
+ import { StatusBadgeIcon, StatusBadgeSizes, StatusBadgeViews } from "../index";
2
+ type IconMap = Record<StatusBadgeViews, Record<NonNullable<StatusBadgeSizes>, StatusBadgeIcon>>;
3
+ declare const ICON_MAP: IconMap;
4
+ export { IconMap, ICON_MAP };
@@ -0,0 +1,76 @@
1
+ Object.defineProperty(exports, '__esModule', { value: true });
2
+
3
+ var CheckmarkCompactMIcon = require('@alfalab/icons-glyph/CheckmarkCompactMIcon');
4
+ var CheckmarkCompactSIcon = require('@alfalab/icons-glyph/CheckmarkCompactSIcon');
5
+ var ClockHandsCompactMIcon = require('@alfalab/icons-glyph/ClockHandsCompactMIcon');
6
+ var ClockHandsCompactSIcon = require('@alfalab/icons-glyph/ClockHandsCompactSIcon');
7
+ var CrossCompactMIcon = require('@alfalab/icons-glyph/CrossCompactMIcon');
8
+ var CrossCompactSIcon = require('@alfalab/icons-glyph/CrossCompactSIcon');
9
+ var ExclamationCompactMIcon = require('@alfalab/icons-glyph/ExclamationCompactMIcon');
10
+ var ExclamationCompactSIcon = require('@alfalab/icons-glyph/ExclamationCompactSIcon');
11
+ var InformationCompactMIcon = require('@alfalab/icons-glyph/InformationCompactMIcon');
12
+ var InformationCompactSIcon = require('@alfalab/icons-glyph/InformationCompactSIcon');
13
+ var StopBrickCompactMIcon = require('@alfalab/icons-glyph/StopBrickCompactMIcon');
14
+ var StopBrickMIcon = require('@alfalab/icons-glyph/StopBrickMIcon');
15
+ var StopBrickSIcon = require('@alfalab/icons-glyph/StopBrickSIcon');
16
+
17
+ var ICON_MAP = {
18
+ 'positive-checkmark': {
19
+ 16: CheckmarkCompactSIcon.CheckmarkCompactSIcon,
20
+ 20: CheckmarkCompactSIcon.CheckmarkCompactSIcon,
21
+ 24: CheckmarkCompactMIcon.CheckmarkCompactMIcon,
22
+ 32: CheckmarkCompactMIcon.CheckmarkCompactMIcon,
23
+ 40: CheckmarkCompactMIcon.CheckmarkCompactMIcon,
24
+ },
25
+ 'negative-cross': {
26
+ 16: CrossCompactSIcon.CrossCompactSIcon,
27
+ 20: CrossCompactSIcon.CrossCompactSIcon,
28
+ 24: CrossCompactMIcon.CrossCompactMIcon,
29
+ 32: CrossCompactMIcon.CrossCompactMIcon,
30
+ 40: CrossCompactMIcon.CrossCompactMIcon,
31
+ },
32
+ 'negative-alert': {
33
+ 16: ExclamationCompactSIcon.ExclamationCompactSIcon,
34
+ 20: ExclamationCompactSIcon.ExclamationCompactSIcon,
35
+ 24: ExclamationCompactMIcon.ExclamationCompactMIcon,
36
+ 32: ExclamationCompactMIcon.ExclamationCompactMIcon,
37
+ 40: ExclamationCompactMIcon.ExclamationCompactMIcon,
38
+ },
39
+ 'negative-block': {
40
+ 16: StopBrickSIcon.StopBrickSIcon,
41
+ 20: StopBrickSIcon.StopBrickSIcon,
42
+ 24: StopBrickCompactMIcon.StopBrickCompactMIcon,
43
+ 32: StopBrickMIcon.StopBrickMIcon,
44
+ 40: StopBrickMIcon.StopBrickMIcon,
45
+ },
46
+ 'attention-alert': {
47
+ 16: ExclamationCompactSIcon.ExclamationCompactSIcon,
48
+ 20: ExclamationCompactSIcon.ExclamationCompactSIcon,
49
+ 24: ExclamationCompactMIcon.ExclamationCompactMIcon,
50
+ 32: ExclamationCompactMIcon.ExclamationCompactMIcon,
51
+ 40: ExclamationCompactMIcon.ExclamationCompactMIcon,
52
+ },
53
+ 'neutral-information': {
54
+ 16: InformationCompactSIcon.InformationCompactSIcon,
55
+ 20: InformationCompactSIcon.InformationCompactSIcon,
56
+ 24: InformationCompactMIcon.InformationCompactMIcon,
57
+ 32: InformationCompactMIcon.InformationCompactMIcon,
58
+ 40: InformationCompactMIcon.InformationCompactMIcon,
59
+ },
60
+ 'neutral-operation': {
61
+ 16: ClockHandsCompactSIcon.ClockHandsCompactSIcon,
62
+ 20: ClockHandsCompactSIcon.ClockHandsCompactSIcon,
63
+ 24: ClockHandsCompactMIcon.ClockHandsCompactMIcon,
64
+ 32: ClockHandsCompactMIcon.ClockHandsCompactMIcon,
65
+ 40: ClockHandsCompactMIcon.ClockHandsCompactMIcon,
66
+ },
67
+ 'neutral-cross': {
68
+ 16: CrossCompactSIcon.CrossCompactSIcon,
69
+ 20: CrossCompactSIcon.CrossCompactSIcon,
70
+ 24: CrossCompactMIcon.CrossCompactMIcon,
71
+ 32: CrossCompactMIcon.CrossCompactMIcon,
72
+ 40: CrossCompactMIcon.CrossCompactMIcon,
73
+ },
74
+ };
75
+
76
+ exports.ICON_MAP = ICON_MAP;
@@ -0,0 +1,5 @@
1
+ import { StatusBadgeCustomIcon, StatusBadgeSizes, StatusBadgeViews } from "../types/statusBadgePropTypes";
2
+ declare const useStatusBadgeIcon: (view: StatusBadgeViews, size: StatusBadgeSizes, customIcons?: StatusBadgeCustomIcon) => {
3
+ Icon: import("../types/statusBadgePropTypes").StatusBadgeIcon;
4
+ };
5
+ export { useStatusBadgeIcon };
@@ -0,0 +1,21 @@
1
+ Object.defineProperty(exports, '__esModule', { value: true });
2
+
3
+ var tslib = require('tslib');
4
+ var consts_iconMap = require('../consts/iconMap.js');
5
+
6
+ var useStatusBadgeIcon = function (view, size, customIcons) {
7
+ var iconsMap = consts_iconMap.ICON_MAP;
8
+ // transform initial icons map
9
+ if (customIcons) {
10
+ iconsMap = Object.keys(consts_iconMap.ICON_MAP).reduce(function (acc, current) {
11
+ var _a;
12
+ return (tslib.__assign(tslib.__assign({}, acc), (_a = {},
13
+ _a[current] = tslib.__assign(tslib.__assign({}, consts_iconMap.ICON_MAP[current]), customIcons[current]),
14
+ _a)));
15
+ }, {});
16
+ }
17
+ var Icon = iconsMap[view][size];
18
+ return { Icon: Icon };
19
+ };
20
+
21
+ exports.useStatusBadgeIcon = useStatusBadgeIcon;
@@ -1 +1,2 @@
1
1
  export * from "./Component";
2
+ export { StatusBadgeViews, StatusBadgeSizes, StatusBadgeIcon, StatusBadgeCustomIcon } from "./types/statusBadgePropTypes";
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ type StatusBadgeViews = 'positive-checkmark' | 'negative-cross' | 'negative-alert' | 'negative-block' | 'attention-alert' | 'neutral-information' | 'neutral-operation' | 'neutral-cross';
4
+ type StatusBadgeSizes = 16 | 20 | 24 | 32 | 40;
5
+ type StatusBadgeIcon = React.FC<React.SVGProps<SVGSVGElement>>;
6
+ type StatusBadgeCustomIcon = Partial<Record<StatusBadgeViews, Partial<Record<StatusBadgeSizes, StatusBadgeIcon>>>>;
7
+ export { StatusBadgeViews, StatusBadgeSizes, StatusBadgeIcon, StatusBadgeCustomIcon };
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
+ import { StatusBadgeCustomIcon, StatusBadgeSizes, StatusBadgeViews } from "./types/statusBadgePropTypes";
3
4
  type StatusBadgeProps = {
4
5
  /**
5
6
  * Дополнительный класс
@@ -9,7 +10,7 @@ type StatusBadgeProps = {
9
10
  * Размер компонента
10
11
  * @default 24
11
12
  */
12
- size?: 16 | 20 | 24 | 32 | 40;
13
+ size?: StatusBadgeSizes;
13
14
  /**
14
15
  * Набор цветов для компонента
15
16
  */
@@ -17,11 +18,15 @@ type StatusBadgeProps = {
17
18
  /**
18
19
  * Вид бейджа.
19
20
  */
20
- view: 'positive-checkmark' | 'negative-cross' | 'negative-alert' | 'negative-block' | 'attention-alert' | 'neutral-information' | 'neutral-operation' | 'neutral-cross';
21
+ view: StatusBadgeViews;
21
22
  /**
22
23
  * Идентификатор для систем автоматизированного тестирования
23
24
  */
24
25
  dataTestId?: string;
26
+ /**
27
+ * Кастомные иконки
28
+ */
29
+ customIcons?: StatusBadgeCustomIcon;
25
30
  };
26
- declare const StatusBadge: ({ className, dataTestId, size, view, colors, }: StatusBadgeProps) => React.JSX.Element;
31
+ declare const StatusBadge: ({ className, dataTestId, size, view, colors, customIcons, }: StatusBadgeProps) => React.JSX.Element;
27
32
  export { StatusBadgeProps, StatusBadge };
@@ -1,18 +1,21 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
- import { CheckmarkCompactMIcon } from '@alfalab/icons-glyph/CheckmarkCompactMIcon';
4
- import { CheckmarkCompactSIcon } from '@alfalab/icons-glyph/CheckmarkCompactSIcon';
5
- import { ClockHandsCompactMIcon } from '@alfalab/icons-glyph/ClockHandsCompactMIcon';
6
- import { ClockHandsCompactSIcon } from '@alfalab/icons-glyph/ClockHandsCompactSIcon';
7
- import { CrossCompactMIcon } from '@alfalab/icons-glyph/CrossCompactMIcon';
8
- import { CrossCompactSIcon } from '@alfalab/icons-glyph/CrossCompactSIcon';
9
- import { ExclamationCompactMIcon } from '@alfalab/icons-glyph/ExclamationCompactMIcon';
10
- import { ExclamationCompactSIcon } from '@alfalab/icons-glyph/ExclamationCompactSIcon';
11
- import { InformationCompactMIcon } from '@alfalab/icons-glyph/InformationCompactMIcon';
12
- import { InformationCompactSIcon } from '@alfalab/icons-glyph/InformationCompactSIcon';
13
- import { StopBrickCompactMIcon } from '@alfalab/icons-glyph/StopBrickCompactMIcon';
14
- import { StopBrickMIcon } from '@alfalab/icons-glyph/StopBrickMIcon';
15
- import { StopBrickSIcon } from '@alfalab/icons-glyph/StopBrickSIcon';
3
+ import { useStatusBadgeIcon } from './hooks/useStatusBadgeIcon.js';
4
+ import 'tslib';
5
+ import './consts/iconMap.js';
6
+ import '@alfalab/icons-glyph/CheckmarkCompactMIcon';
7
+ import '@alfalab/icons-glyph/CheckmarkCompactSIcon';
8
+ import '@alfalab/icons-glyph/ClockHandsCompactMIcon';
9
+ import '@alfalab/icons-glyph/ClockHandsCompactSIcon';
10
+ import '@alfalab/icons-glyph/CrossCompactMIcon';
11
+ import '@alfalab/icons-glyph/CrossCompactSIcon';
12
+ import '@alfalab/icons-glyph/ExclamationCompactMIcon';
13
+ import '@alfalab/icons-glyph/ExclamationCompactSIcon';
14
+ import '@alfalab/icons-glyph/InformationCompactMIcon';
15
+ import '@alfalab/icons-glyph/InformationCompactSIcon';
16
+ import '@alfalab/icons-glyph/StopBrickCompactMIcon';
17
+ import '@alfalab/icons-glyph/StopBrickMIcon';
18
+ import '@alfalab/icons-glyph/StopBrickSIcon';
16
19
 
17
20
  var defaultColors = {"positive-checkmark":"status-badge__positive-checkmark_1qjlx","negative-cross":"status-badge__negative-cross_1qjlx","negative-alert":"status-badge__negative-alert_1qjlx","negative-block":"status-badge__negative-block_1qjlx","attention-alert":"status-badge__attention-alert_1qjlx","neutral-information":"status-badge__neutral-information_1qjlx","neutral-operation":"status-badge__neutral-operation_1qjlx","neutral-cross":"status-badge__neutral-cross_1qjlx"};
18
21
  require('./default.css');
@@ -27,67 +30,9 @@ var colorStyles = {
27
30
  default: defaultColors,
28
31
  inverted: invertedColors,
29
32
  };
30
- var ICON_MAP = {
31
- 'positive-checkmark': {
32
- 16: CheckmarkCompactSIcon,
33
- 20: CheckmarkCompactSIcon,
34
- 24: CheckmarkCompactMIcon,
35
- 32: CheckmarkCompactMIcon,
36
- 40: CheckmarkCompactMIcon,
37
- },
38
- 'negative-cross': {
39
- 16: CrossCompactSIcon,
40
- 20: CrossCompactSIcon,
41
- 24: CrossCompactMIcon,
42
- 32: CrossCompactMIcon,
43
- 40: CrossCompactMIcon,
44
- },
45
- 'negative-alert': {
46
- 16: ExclamationCompactSIcon,
47
- 20: ExclamationCompactSIcon,
48
- 24: ExclamationCompactMIcon,
49
- 32: ExclamationCompactMIcon,
50
- 40: ExclamationCompactMIcon,
51
- },
52
- 'negative-block': {
53
- 16: StopBrickSIcon,
54
- 20: StopBrickSIcon,
55
- 24: StopBrickCompactMIcon,
56
- 32: StopBrickMIcon,
57
- 40: StopBrickMIcon,
58
- },
59
- 'attention-alert': {
60
- 16: ExclamationCompactSIcon,
61
- 20: ExclamationCompactSIcon,
62
- 24: ExclamationCompactMIcon,
63
- 32: ExclamationCompactMIcon,
64
- 40: ExclamationCompactMIcon,
65
- },
66
- 'neutral-information': {
67
- 16: InformationCompactSIcon,
68
- 20: InformationCompactSIcon,
69
- 24: InformationCompactMIcon,
70
- 32: InformationCompactMIcon,
71
- 40: InformationCompactMIcon,
72
- },
73
- 'neutral-operation': {
74
- 16: ClockHandsCompactSIcon,
75
- 20: ClockHandsCompactSIcon,
76
- 24: ClockHandsCompactMIcon,
77
- 32: ClockHandsCompactMIcon,
78
- 40: ClockHandsCompactMIcon,
79
- },
80
- 'neutral-cross': {
81
- 16: CrossCompactSIcon,
82
- 20: CrossCompactSIcon,
83
- 24: CrossCompactMIcon,
84
- 32: CrossCompactMIcon,
85
- 40: CrossCompactMIcon,
86
- },
87
- };
88
33
  var StatusBadge = function (_a) {
89
- var className = _a.className, dataTestId = _a.dataTestId, _b = _a.size, size = _b === void 0 ? 24 : _b, view = _a.view, _c = _a.colors, colors = _c === void 0 ? 'default' : _c;
90
- var Icon = ICON_MAP[view][size];
34
+ var className = _a.className, dataTestId = _a.dataTestId, _b = _a.size, size = _b === void 0 ? 24 : _b, view = _a.view, _c = _a.colors, colors = _c === void 0 ? 'default' : _c, customIcons = _a.customIcons;
35
+ var Icon = useStatusBadgeIcon(view, size, customIcons).Icon;
91
36
  return (React.createElement("div", { className: cn(styles.component, className, styles["size-".concat(size)], colorStyles[colors].component, colorStyles[colors][view]), "data-test-id": dataTestId },
92
37
  React.createElement(Icon, null)));
93
38
  };
@@ -0,0 +1,4 @@
1
+ import { StatusBadgeIcon, StatusBadgeSizes, StatusBadgeViews } from "../index";
2
+ type IconMap = Record<StatusBadgeViews, Record<NonNullable<StatusBadgeSizes>, StatusBadgeIcon>>;
3
+ declare const ICON_MAP: IconMap;
4
+ export { IconMap, ICON_MAP };