@qoretechnologies/reqore 0.78.6-pr.715.gdfefa70 → 0.78.7-pr.717.gae33bdc

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 (366) hide show
  1. package/.claude/CLAUDE.md +14 -0
  2. package/dist/components/Accordion/index.d.ts.map +1 -1
  3. package/dist/components/Accordion/index.js +73 -23
  4. package/dist/components/Accordion/index.js.map +1 -1
  5. package/dist/components/Breadcrumbs/index.d.ts.map +1 -1
  6. package/dist/components/Breadcrumbs/index.js +344 -44
  7. package/dist/components/Breadcrumbs/index.js.map +1 -1
  8. package/dist/components/Breadcrumbs/item.d.ts.map +1 -1
  9. package/dist/components/Breadcrumbs/item.js +6 -2
  10. package/dist/components/Breadcrumbs/item.js.map +1 -1
  11. package/dist/components/Bubble/index.d.ts.map +1 -1
  12. package/dist/components/Bubble/index.js +20 -43
  13. package/dist/components/Bubble/index.js.map +1 -1
  14. package/dist/components/Button/index.d.ts +75 -0
  15. package/dist/components/Button/index.d.ts.map +1 -1
  16. package/dist/components/Button/index.js +324 -110
  17. package/dist/components/Button/index.js.map +1 -1
  18. package/dist/components/ButtonRail/index.d.ts.map +1 -1
  19. package/dist/components/ButtonRail/index.js +3 -2
  20. package/dist/components/ButtonRail/index.js.map +1 -1
  21. package/dist/components/Callout/index.d.ts +4 -3
  22. package/dist/components/Callout/index.d.ts.map +1 -1
  23. package/dist/components/Callout/index.js +78 -27
  24. package/dist/components/Callout/index.js.map +1 -1
  25. package/dist/components/Checkbox/index.d.ts.map +1 -1
  26. package/dist/components/Checkbox/index.js +120 -44
  27. package/dist/components/Checkbox/index.js.map +1 -1
  28. package/dist/components/Collapse/index.d.ts.map +1 -1
  29. package/dist/components/Collapse/index.js +7 -36
  30. package/dist/components/Collapse/index.js.map +1 -1
  31. package/dist/components/CollapsibleContent/index.d.ts.map +1 -1
  32. package/dist/components/CollapsibleContent/index.js +11 -39
  33. package/dist/components/CollapsibleContent/index.js.map +1 -1
  34. package/dist/components/Collection/index.js +3 -3
  35. package/dist/components/Collection/index.js.map +1 -1
  36. package/dist/components/Collection/item.d.ts.map +1 -1
  37. package/dist/components/Collection/item.js +4 -4
  38. package/dist/components/Collection/item.js.map +1 -1
  39. package/dist/components/Columns/column.d.ts.map +1 -1
  40. package/dist/components/Columns/column.js +6 -35
  41. package/dist/components/Columns/column.js.map +1 -1
  42. package/dist/components/Columns/index.d.ts.map +1 -1
  43. package/dist/components/Columns/index.js +3 -35
  44. package/dist/components/Columns/index.js.map +1 -1
  45. package/dist/components/Comment/index.js +8 -8
  46. package/dist/components/Comment/index.js.map +1 -1
  47. package/dist/components/CommentFeed/index.js +2 -2
  48. package/dist/components/CommentFeed/index.js.map +1 -1
  49. package/dist/components/Content/index.d.ts.map +1 -1
  50. package/dist/components/Content/index.js +3 -35
  51. package/dist/components/Content/index.js.map +1 -1
  52. package/dist/components/Content/wrapper.js +2 -2
  53. package/dist/components/Content/wrapper.js.map +1 -1
  54. package/dist/components/ControlGroup/index.d.ts.map +1 -1
  55. package/dist/components/ControlGroup/index.js +52 -19
  56. package/dist/components/ControlGroup/index.js.map +1 -1
  57. package/dist/components/ControlGroup/item.d.ts.map +1 -1
  58. package/dist/components/ControlGroup/item.js +35 -6
  59. package/dist/components/ControlGroup/item.js.map +1 -1
  60. package/dist/components/DataView/index.d.ts.map +1 -1
  61. package/dist/components/DataView/index.js +35 -65
  62. package/dist/components/DataView/index.js.map +1 -1
  63. package/dist/components/DatePicker/index.d.ts.map +1 -1
  64. package/dist/components/DatePicker/index.js +40 -8
  65. package/dist/components/DatePicker/index.js.map +1 -1
  66. package/dist/components/DescriptionList/index.d.ts.map +1 -1
  67. package/dist/components/DescriptionList/index.js +36 -42
  68. package/dist/components/DescriptionList/index.js.map +1 -1
  69. package/dist/components/Drawer/backdrop.d.ts.map +1 -1
  70. package/dist/components/Drawer/backdrop.js +35 -6
  71. package/dist/components/Drawer/backdrop.js.map +1 -1
  72. package/dist/components/Drawer/index.d.ts.map +1 -1
  73. package/dist/components/Drawer/index.js +77 -66
  74. package/dist/components/Drawer/index.js.map +1 -1
  75. package/dist/components/Dropdown/index.d.ts.map +1 -1
  76. package/dist/components/Dropdown/index.js +3 -1
  77. package/dist/components/Dropdown/index.js.map +1 -1
  78. package/dist/components/Dropdown/list.d.ts.map +1 -1
  79. package/dist/components/Dropdown/list.js +90 -19
  80. package/dist/components/Dropdown/list.js.map +1 -1
  81. package/dist/components/Effect/index.d.ts +37 -6
  82. package/dist/components/Effect/index.d.ts.map +1 -1
  83. package/dist/components/Effect/index.js +216 -49
  84. package/dist/components/Effect/index.js.map +1 -1
  85. package/dist/components/EntityRow/index.d.ts +19 -1
  86. package/dist/components/EntityRow/index.d.ts.map +1 -1
  87. package/dist/components/EntityRow/index.js +139 -44
  88. package/dist/components/EntityRow/index.js.map +1 -1
  89. package/dist/components/FadeScroller/index.d.ts.map +1 -1
  90. package/dist/components/FadeScroller/index.js +14 -64
  91. package/dist/components/FadeScroller/index.js.map +1 -1
  92. package/dist/components/FeatureCard/index.d.ts +7 -1
  93. package/dist/components/FeatureCard/index.d.ts.map +1 -1
  94. package/dist/components/FeatureCard/index.js +82 -27
  95. package/dist/components/FeatureCard/index.js.map +1 -1
  96. package/dist/components/Header/index.d.ts.map +1 -1
  97. package/dist/components/Header/index.js +8 -5
  98. package/dist/components/Header/index.js.map +1 -1
  99. package/dist/components/Icon/index.d.ts.map +1 -1
  100. package/dist/components/Icon/index.js +39 -19
  101. package/dist/components/Icon/index.js.map +1 -1
  102. package/dist/components/IconPicker/index.js +2 -2
  103. package/dist/components/IconPicker/index.js.map +1 -1
  104. package/dist/components/Input/index.d.ts +44 -1
  105. package/dist/components/Input/index.d.ts.map +1 -1
  106. package/dist/components/Input/index.js +96 -30
  107. package/dist/components/Input/index.js.map +1 -1
  108. package/dist/components/InputClearButton/index.d.ts +7 -2
  109. package/dist/components/InputClearButton/index.d.ts.map +1 -1
  110. package/dist/components/InputClearButton/index.js +47 -8
  111. package/dist/components/InputClearButton/index.js.map +1 -1
  112. package/dist/components/InternalPopover/index.d.ts.map +1 -1
  113. package/dist/components/InternalPopover/index.js +56 -19
  114. package/dist/components/InternalPopover/index.js.map +1 -1
  115. package/dist/components/KeyboardShortcut/index.js +3 -3
  116. package/dist/components/KeyboardShortcut/index.js.map +1 -1
  117. package/dist/components/Layout/content.js +2 -2
  118. package/dist/components/Layout/content.js.map +1 -1
  119. package/dist/components/Layout/index.d.ts.map +1 -1
  120. package/dist/components/Layout/index.js +3 -35
  121. package/dist/components/Layout/index.js.map +1 -1
  122. package/dist/components/Link/index.d.ts.map +1 -1
  123. package/dist/components/Link/index.js +12 -39
  124. package/dist/components/Link/index.js.map +1 -1
  125. package/dist/components/Menu/divider.d.ts.map +1 -1
  126. package/dist/components/Menu/divider.js +11 -6
  127. package/dist/components/Menu/divider.js.map +1 -1
  128. package/dist/components/Menu/index.d.ts.map +1 -1
  129. package/dist/components/Menu/index.js +40 -22
  130. package/dist/components/Menu/index.js.map +1 -1
  131. package/dist/components/Menu/item.d.ts.map +1 -1
  132. package/dist/components/Menu/item.js +35 -5
  133. package/dist/components/Menu/item.js.map +1 -1
  134. package/dist/components/Menu/section.d.ts.map +1 -1
  135. package/dist/components/Menu/section.js +11 -6
  136. package/dist/components/Menu/section.js.map +1 -1
  137. package/dist/components/Message/index.d.ts.map +1 -1
  138. package/dist/components/Message/index.js +20 -4
  139. package/dist/components/Message/index.js.map +1 -1
  140. package/dist/components/NavRail/index.d.ts +2 -0
  141. package/dist/components/NavRail/index.d.ts.map +1 -1
  142. package/dist/components/NavRail/index.js +136 -46
  143. package/dist/components/NavRail/index.js.map +1 -1
  144. package/dist/components/Navbar/divider.d.ts.map +1 -1
  145. package/dist/components/Navbar/divider.js +35 -6
  146. package/dist/components/Navbar/divider.js.map +1 -1
  147. package/dist/components/Navbar/group.js +3 -3
  148. package/dist/components/Navbar/group.js.map +1 -1
  149. package/dist/components/Navbar/index.js +3 -3
  150. package/dist/components/Navbar/index.js.map +1 -1
  151. package/dist/components/Navbar/item.js +3 -3
  152. package/dist/components/Navbar/item.js.map +1 -1
  153. package/dist/components/Notifications/index.d.ts.map +1 -1
  154. package/dist/components/Notifications/index.js +6 -35
  155. package/dist/components/Notifications/index.js.map +1 -1
  156. package/dist/components/Notifications/notification.d.ts +6 -2
  157. package/dist/components/Notifications/notification.d.ts.map +1 -1
  158. package/dist/components/Notifications/notification.js +95 -60
  159. package/dist/components/Notifications/notification.js.map +1 -1
  160. package/dist/components/Notifications/styles.d.ts +20 -0
  161. package/dist/components/Notifications/styles.d.ts.map +1 -1
  162. package/dist/components/Notifications/styles.js +45 -17
  163. package/dist/components/Notifications/styles.js.map +1 -1
  164. package/dist/components/Paging/index.d.ts.map +1 -1
  165. package/dist/components/Paging/index.js +19 -19
  166. package/dist/components/Paging/index.js.map +1 -1
  167. package/dist/components/Panel/index.d.ts +15 -0
  168. package/dist/components/Panel/index.d.ts.map +1 -1
  169. package/dist/components/Panel/index.js +513 -202
  170. package/dist/components/Panel/index.js.map +1 -1
  171. package/dist/components/Paragraph/index.d.ts +6 -0
  172. package/dist/components/Paragraph/index.d.ts.map +1 -1
  173. package/dist/components/Paragraph/index.js +65 -13
  174. package/dist/components/Paragraph/index.js.map +1 -1
  175. package/dist/components/Popover/index.d.ts +8 -0
  176. package/dist/components/Popover/index.d.ts.map +1 -1
  177. package/dist/components/Popover/index.js +169 -21
  178. package/dist/components/Popover/index.js.map +1 -1
  179. package/dist/components/Progress/index.d.ts.map +1 -1
  180. package/dist/components/Progress/index.js +11 -43
  181. package/dist/components/Progress/index.js.map +1 -1
  182. package/dist/components/Rating/index.d.ts.map +1 -1
  183. package/dist/components/Rating/index.js +33 -47
  184. package/dist/components/Rating/index.js.map +1 -1
  185. package/dist/components/RichTextEditor/index.d.ts.map +1 -1
  186. package/dist/components/RichTextEditor/index.js +130 -52
  187. package/dist/components/RichTextEditor/index.js.map +1 -1
  188. package/dist/components/RowActionsMenu/index.d.ts +80 -0
  189. package/dist/components/RowActionsMenu/index.d.ts.map +1 -0
  190. package/dist/components/RowActionsMenu/index.js +182 -0
  191. package/dist/components/RowActionsMenu/index.js.map +1 -0
  192. package/dist/components/SegmentedControl/index.d.ts.map +1 -1
  193. package/dist/components/SegmentedControl/index.js +92 -77
  194. package/dist/components/SegmentedControl/index.js.map +1 -1
  195. package/dist/components/Select/valuePreview.js +2 -2
  196. package/dist/components/Select/valuePreview.js.map +1 -1
  197. package/dist/components/SeverityRow/index.d.ts +20 -1
  198. package/dist/components/SeverityRow/index.d.ts.map +1 -1
  199. package/dist/components/SeverityRow/index.js +58 -15
  200. package/dist/components/SeverityRow/index.js.map +1 -1
  201. package/dist/components/Skeleton/index.d.ts.map +1 -1
  202. package/dist/components/Skeleton/index.js +6 -35
  203. package/dist/components/Skeleton/index.js.map +1 -1
  204. package/dist/components/Slider/index.js +9 -9
  205. package/dist/components/Slider/index.js.map +1 -1
  206. package/dist/components/Spacer/index.js +7 -7
  207. package/dist/components/Spacer/index.js.map +1 -1
  208. package/dist/components/Span/index.d.ts.map +1 -1
  209. package/dist/components/Span/index.js +43 -11
  210. package/dist/components/Span/index.js.map +1 -1
  211. package/dist/components/StackedBar/index.d.ts.map +1 -1
  212. package/dist/components/StackedBar/index.js +48 -47
  213. package/dist/components/StackedBar/index.js.map +1 -1
  214. package/dist/components/Statistic/index.d.ts +0 -8
  215. package/dist/components/Statistic/index.d.ts.map +1 -1
  216. package/dist/components/Statistic/index.js +44 -45
  217. package/dist/components/Statistic/index.js.map +1 -1
  218. package/dist/components/Table/body.d.ts.map +1 -1
  219. package/dist/components/Table/body.js +12 -44
  220. package/dist/components/Table/body.js.map +1 -1
  221. package/dist/components/Table/cell.d.ts.map +1 -1
  222. package/dist/components/Table/cell.js +76 -52
  223. package/dist/components/Table/cell.js.map +1 -1
  224. package/dist/components/Table/header.d.ts.map +1 -1
  225. package/dist/components/Table/header.js +15 -12
  226. package/dist/components/Table/header.js.map +1 -1
  227. package/dist/components/Table/headerCell.d.ts.map +1 -1
  228. package/dist/components/Table/headerCell.js +8 -38
  229. package/dist/components/Table/headerCell.js.map +1 -1
  230. package/dist/components/Table/helpers.d.ts +20 -0
  231. package/dist/components/Table/helpers.d.ts.map +1 -1
  232. package/dist/components/Table/helpers.js +52 -1
  233. package/dist/components/Table/helpers.js.map +1 -1
  234. package/dist/components/Table/index.d.ts +57 -2
  235. package/dist/components/Table/index.d.ts.map +1 -1
  236. package/dist/components/Table/index.js +154 -59
  237. package/dist/components/Table/index.js.map +1 -1
  238. package/dist/components/Table/row.d.ts +3 -1
  239. package/dist/components/Table/row.d.ts.map +1 -1
  240. package/dist/components/Table/row.js +44 -13
  241. package/dist/components/Table/row.js.map +1 -1
  242. package/dist/components/Table/scrollbar.js +3 -3
  243. package/dist/components/Table/scrollbar.js.map +1 -1
  244. package/dist/components/Tabs/content.js +2 -2
  245. package/dist/components/Tabs/content.js.map +1 -1
  246. package/dist/components/Tabs/index.js +3 -3
  247. package/dist/components/Tabs/index.js.map +1 -1
  248. package/dist/components/Tabs/item.d.ts.map +1 -1
  249. package/dist/components/Tabs/item.js +8 -6
  250. package/dist/components/Tabs/item.js.map +1 -1
  251. package/dist/components/Tabs/list.d.ts.map +1 -1
  252. package/dist/components/Tabs/list.js +6 -4
  253. package/dist/components/Tabs/list.js.map +1 -1
  254. package/dist/components/Tag/group.d.ts.map +1 -1
  255. package/dist/components/Tag/group.js +3 -35
  256. package/dist/components/Tag/group.js.map +1 -1
  257. package/dist/components/Tag/index.d.ts +77 -3
  258. package/dist/components/Tag/index.d.ts.map +1 -1
  259. package/dist/components/Tag/index.js +315 -83
  260. package/dist/components/Tag/index.js.map +1 -1
  261. package/dist/components/Testimonial/index.d.ts +6 -1
  262. package/dist/components/Testimonial/index.d.ts.map +1 -1
  263. package/dist/components/Testimonial/index.js +59 -23
  264. package/dist/components/Testimonial/index.js.map +1 -1
  265. package/dist/components/Textarea/index.d.ts +16 -0
  266. package/dist/components/Textarea/index.d.ts.map +1 -1
  267. package/dist/components/Textarea/index.js +178 -33
  268. package/dist/components/Textarea/index.js.map +1 -1
  269. package/dist/components/Tier/group.d.ts.map +1 -1
  270. package/dist/components/Tier/group.js +9 -8
  271. package/dist/components/Tier/group.js.map +1 -1
  272. package/dist/components/Tier/index.d.ts +5 -0
  273. package/dist/components/Tier/index.d.ts.map +1 -1
  274. package/dist/components/Tier/index.js +14 -10
  275. package/dist/components/Tier/index.js.map +1 -1
  276. package/dist/components/Timeline/index.d.ts +2 -0
  277. package/dist/components/Timeline/index.d.ts.map +1 -1
  278. package/dist/components/Timeline/index.js +73 -28
  279. package/dist/components/Timeline/index.js.map +1 -1
  280. package/dist/components/TooltipComponent/index.d.ts.map +1 -1
  281. package/dist/components/TooltipComponent/index.js +6 -7
  282. package/dist/components/TooltipComponent/index.js.map +1 -1
  283. package/dist/components/Tree/index.d.ts.map +1 -1
  284. package/dist/components/Tree/index.js +27 -23
  285. package/dist/components/Tree/index.js.map +1 -1
  286. package/dist/components/Tree/modal.d.ts.map +1 -1
  287. package/dist/components/Tree/modal.js +3 -1
  288. package/dist/components/Tree/modal.js.map +1 -1
  289. package/dist/constants/sizes.d.ts +5 -0
  290. package/dist/constants/sizes.d.ts.map +1 -1
  291. package/dist/constants/sizes.js +6 -1
  292. package/dist/constants/sizes.js.map +1 -1
  293. package/dist/constants/theme.d.ts +0 -21
  294. package/dist/constants/theme.d.ts.map +1 -1
  295. package/dist/constants/theme.js.map +1 -1
  296. package/dist/containers/ReqoreProvider.d.ts.map +1 -1
  297. package/dist/containers/ReqoreProvider.js +27 -13
  298. package/dist/containers/ReqoreProvider.js.map +1 -1
  299. package/dist/containers/UIProvider.d.ts +10 -0
  300. package/dist/containers/UIProvider.d.ts.map +1 -1
  301. package/dist/containers/UIProvider.js +34 -36
  302. package/dist/containers/UIProvider.js.map +1 -1
  303. package/dist/context/SurfaceContext.d.ts +18 -0
  304. package/dist/context/SurfaceContext.d.ts.map +1 -0
  305. package/dist/context/SurfaceContext.js +39 -0
  306. package/dist/context/SurfaceContext.js.map +1 -0
  307. package/dist/helpers/colors.d.ts +183 -11
  308. package/dist/helpers/colors.d.ts.map +1 -1
  309. package/dist/helpers/colors.js +736 -100
  310. package/dist/helpers/colors.js.map +1 -1
  311. package/dist/helpers/hoveringPointer.d.ts +54 -0
  312. package/dist/helpers/hoveringPointer.d.ts.map +1 -0
  313. package/dist/helpers/hoveringPointer.js +66 -0
  314. package/dist/helpers/hoveringPointer.js.map +1 -0
  315. package/dist/helpers/iconProps.d.ts +14 -0
  316. package/dist/helpers/iconProps.d.ts.map +1 -0
  317. package/dist/helpers/iconProps.js +33 -0
  318. package/dist/helpers/iconProps.js.map +1 -0
  319. package/dist/helpers/styled.d.ts +39 -26
  320. package/dist/helpers/styled.d.ts.map +1 -1
  321. package/dist/helpers/styled.js +156 -4
  322. package/dist/helpers/styled.js.map +1 -1
  323. package/dist/helpers/surface.d.ts +31 -0
  324. package/dist/helpers/surface.d.ts.map +1 -0
  325. package/dist/helpers/surface.js +87 -0
  326. package/dist/helpers/surface.js.map +1 -0
  327. package/dist/hooks/useAutoFocus.d.ts.map +1 -1
  328. package/dist/hooks/useAutoFocus.js +11 -1
  329. package/dist/hooks/useAutoFocus.js.map +1 -1
  330. package/dist/hooks/useCloneThroughFragments.d.ts.map +1 -1
  331. package/dist/hooks/useCloneThroughFragments.js +51 -18
  332. package/dist/hooks/useCloneThroughFragments.js.map +1 -1
  333. package/dist/hooks/useCombinedRefs.d.ts +16 -6
  334. package/dist/hooks/useCombinedRefs.d.ts.map +1 -1
  335. package/dist/hooks/useCombinedRefs.js +34 -27
  336. package/dist/hooks/useCombinedRefs.js.map +1 -1
  337. package/dist/hooks/useDragToScroll.d.ts +58 -0
  338. package/dist/hooks/useDragToScroll.d.ts.map +1 -0
  339. package/dist/hooks/useDragToScroll.js +262 -0
  340. package/dist/hooks/useDragToScroll.js.map +1 -0
  341. package/dist/hooks/useDrawnSurface.d.ts +38 -0
  342. package/dist/hooks/useDrawnSurface.d.ts.map +1 -0
  343. package/dist/hooks/useDrawnSurface.js +48 -0
  344. package/dist/hooks/useDrawnSurface.js.map +1 -0
  345. package/dist/hooks/useMarqueeOnHover.d.ts.map +1 -1
  346. package/dist/hooks/useMarqueeOnHover.js +10 -0
  347. package/dist/hooks/useMarqueeOnHover.js.map +1 -1
  348. package/dist/hooks/usePaging.d.ts +9 -4
  349. package/dist/hooks/usePaging.d.ts.map +1 -1
  350. package/dist/hooks/usePaging.js +21 -32
  351. package/dist/hooks/usePaging.js.map +1 -1
  352. package/dist/hooks/usePointerDrag.d.ts.map +1 -1
  353. package/dist/hooks/usePointerDrag.js +13 -3
  354. package/dist/hooks/usePointerDrag.js.map +1 -1
  355. package/dist/hooks/useReqoreMedia.d.ts +22 -7
  356. package/dist/hooks/useReqoreMedia.d.ts.map +1 -1
  357. package/dist/hooks/useReqoreMedia.js +33 -9
  358. package/dist/hooks/useReqoreMedia.js.map +1 -1
  359. package/dist/index.d.ts +6 -0
  360. package/dist/index.d.ts.map +1 -1
  361. package/dist/index.js +11 -3
  362. package/dist/index.js.map +1 -1
  363. package/dist/styles.js +6 -6
  364. package/dist/styles.js.map +1 -1
  365. package/package.json +3 -4
  366. package/vitest.config.ts +115 -31
@@ -58,27 +58,142 @@ var __rest = (this && this.__rest) || function (s, e) {
58
58
  }
59
59
  return t;
60
60
  };
61
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
62
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
63
+ if (ar || !(i in from)) {
64
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
65
+ ar[i] = from[i];
66
+ }
67
+ }
68
+ return to.concat(ar || Array.prototype.slice.call(from));
69
+ };
61
70
  var __importDefault = (this && this.__importDefault) || function (mod) {
62
71
  return (mod && mod.__esModule) ? mod : { "default": mod };
63
72
  };
64
73
  Object.defineProperty(exports, "__esModule", { value: true });
65
- exports.StyledTag = exports.getTagAppearanceColors = exports.TAG_SOFT_BACKGROUND_OPACITY = void 0;
74
+ exports.StyledTag = exports.REQORE_TAG_STYLE_PROPS = exports.getTagAppearanceColors = exports.TAG_SOFT_BACKGROUND_OPACITY = exports.getTagPaint = exports.getTagSolidColors = void 0;
66
75
  var jsx_runtime_1 = require("react/jsx-runtime");
67
76
  var classnames_1 = __importDefault(require("classnames"));
68
77
  var size_1 = __importDefault(require("lodash/size"));
69
78
  var polished_1 = require("polished");
70
79
  var react_1 = __importStar(require("react"));
71
- var styled_components_1 = __importStar(require("styled-components"));
80
+ var styled_components_1 = require("styled-components");
72
81
  var __1 = require("../..");
73
82
  var colors_1 = require("../../constants/colors");
74
83
  var fonts_1 = require("../../constants/fonts");
75
84
  var sizes_1 = require("../../constants/sizes");
76
85
  var colors_2 = require("../../helpers/colors");
77
- var styled_1 = require("../../helpers/styled");
86
+ var SurfaceContext_1 = require("../../context/SurfaceContext");
87
+ var styled_1 = __importStar(require("../../helpers/styled"));
88
+ var iconProps_1 = require("../../helpers/iconProps");
78
89
  var styles_1 = require("../../styles");
79
90
  var Effect_1 = require("../Effect");
80
91
  var Icon_1 = __importDefault(require("../Icon"));
81
92
  var TooltipComponent_1 = require("../TooltipComponent");
93
+ /**
94
+ * The fill a solid tag paints, at rest or hovered: its colour (the theme's a step lighter without one), or a wash
95
+ * of it when minimal. A colour the helpers cannot read (a CSS variable) is washed by the browser.
96
+ */
97
+ var getTagFill = function (theme, color, minimal, hover) {
98
+ return minimal
99
+ ? color
100
+ ? (0, colors_2.getColorAtAlpha)(color, hover ? 0.5 : 0.2)
101
+ : (0, colors_2.getColorAtAlpha)((0, colors_2.changeLightness)('#000000', 0.05), hover ? 0.4 : 0.3)
102
+ : color || (0, colors_2.changeLightness)(theme.main, hover ? 0.15 : 0.1);
103
+ };
104
+ /**
105
+ * What a solid tag is drawn on and in, at rest or hovered: its fill as drawn over the theme's surface (a minimal
106
+ * tag's wash, a translucent colour, each colour of a gradient), the key darkened over it, and a label and a key
107
+ * that read on them. A minimal tag with a colour keeps the colour in its label, in a shade that reads.
108
+ */
109
+ var getTagSolidColors = function (theme, color, minimal, labelKey, effect, hovered, surface) {
110
+ if (hovered === void 0) { hovered = false; }
111
+ // what the tag is drawn on: one color, or each color of a gradient (a button's, a panel's)
112
+ var unders = (0, colors_2.getThemeSurfaces)(theme, surface);
113
+ var named = color && color !== 'transparent' ? color : undefined;
114
+ var gradient = (0, Effect_1.getPrimaryGradient)(effect === null || effect === void 0 ? void 0 : effect.gradient);
115
+ var paint = function (hover) {
116
+ return unders.flatMap(function (under) {
117
+ /* A gradient is read as it is painted: a minimal one's translucent fill shows its ring and the tag's own
118
+ wash through it. */
119
+ return gradient
120
+ ? (0, Effect_1.getEffectGradientBackgrounds)(theme, gradient.colors, minimal, getTagFill(theme, named, minimal, false), under)
121
+ : [(0, colors_2.getDrawnColor)(getTagFill(theme, named, minimal, hover), under)];
122
+ });
123
+ };
124
+ var backgrounds = paint(hovered);
125
+ /* The key is drawn darker than the label, so it has a text colour of its own: black at 30% (10% minimal) over
126
+ the fill, or darker, as far as it takes for one text colour to read on all of it - over a light colour the key
127
+ lands in the mid-tones, where neither light nor dark text reads. The shade is the one the tag is painted with
128
+ at rest, hovered too. */
129
+ var shadeOver = function (fill, alpha) {
130
+ return fill.map(function (background) { return (0, colors_2.getDrawnColor)((0, polished_1.rgba)('#000000', alpha), background); });
131
+ };
132
+ var readsOn = function (fill) {
133
+ var text = (0, colors_2.getReadableColorOn)(fill);
134
+ return fill.every(function (background) { return (0, colors_2.getContrastRatio)(text, background) >= colors_2.READABLE_TEXT_CONTRAST; });
135
+ };
136
+ var resting = hovered ? paint(false) : backgrounds;
137
+ var keyAlpha = minimal ? 0.1 : 0.3;
138
+ while (labelKey && keyAlpha < 0.8 && !readsOn(shadeOver(resting, keyAlpha))) {
139
+ keyAlpha = Math.round((keyAlpha + 0.05) * 100) / 100;
140
+ }
141
+ var keyShade = (0, polished_1.rgba)('#000000', keyAlpha);
142
+ var keyBackgrounds = labelKey ? shadeOver(backgrounds, keyAlpha) : backgrounds;
143
+ if (minimal && named && !(0, colors_2.isAchromatic)(named) && !hovered && !gradient) {
144
+ // a colour the helpers cannot read is as it is given: its label is written in it, on the wash of it
145
+ var text = (0, colors_2.getReadableAccentColorOn)((0, colors_2.getSaturatedTint)(named, 0.8), backgrounds);
146
+ return {
147
+ backgrounds: backgrounds,
148
+ keyBackgrounds: keyBackgrounds,
149
+ keyShade: keyShade,
150
+ text: text,
151
+ keyText: (0, colors_2.getReadableAccentColorOn)(text, keyBackgrounds),
152
+ };
153
+ }
154
+ return {
155
+ backgrounds: backgrounds,
156
+ keyBackgrounds: keyBackgrounds,
157
+ keyShade: keyShade,
158
+ text: (0, colors_2.getReadableColorOn)(backgrounds),
159
+ keyText: (0, colors_2.getReadableColorOn)(keyBackgrounds),
160
+ };
161
+ };
162
+ exports.getTagSolidColors = getTagSolidColors;
163
+ /**
164
+ * Everything a tag is painted with (`IReqoreTagPaint`), and the solid colours it is worked out from: `resting`,
165
+ * and `hovered` when the tag answers the pointer. A soft or text tag (`solid` false) has its own colours
166
+ * (`getTagAppearanceColors`), so none of the solid ones are worked out for it.
167
+ */
168
+ var getTagPaint = function (theme, color, minimal, labelKey, effect, interactive, surface, solid) {
169
+ var own = color || theme.main;
170
+ var paint = {
171
+ edge: (0, colors_2.changeLightness)(own, 0.2),
172
+ outline: (0, colors_2.changeLightness)(own, 0.25),
173
+ };
174
+ if (!solid) {
175
+ return { paint: paint };
176
+ }
177
+ var resting = (0, exports.getTagSolidColors)(theme, color, minimal, labelKey, effect, false, surface);
178
+ var hovered = interactive
179
+ ? (0, exports.getTagSolidColors)(theme, color, minimal, labelKey, effect, true, surface)
180
+ : undefined;
181
+ paint.rest = {
182
+ background: getTagFill(theme, color, minimal, false),
183
+ text: resting.text,
184
+ keyShade: resting.keyShade,
185
+ keyText: resting.keyText,
186
+ };
187
+ if (hovered) {
188
+ paint.hover = {
189
+ background: getTagFill(theme, color, minimal, true),
190
+ text: hovered.text,
191
+ keyText: hovered.keyText,
192
+ };
193
+ }
194
+ return { paint: paint, resting: resting, hovered: hovered };
195
+ };
196
+ exports.getTagPaint = getTagPaint;
82
197
  /** Share of the colour laid over the surface behind a soft tag. */
83
198
  exports.TAG_SOFT_BACKGROUND_OPACITY = 0.2;
84
199
  /**
@@ -89,38 +204,123 @@ exports.TAG_SOFT_BACKGROUND_OPACITY = 0.2;
89
204
  * is the tag's own colour pushed lighter (dark theme) or darker (light theme) until it
90
205
  * reaches a 4.5:1 contrast there — a green label stays green, only a shade that reads.
91
206
  * With no colour at all the tag is neutral: the surface's readable text colour plays
92
- * the part of the colour.
207
+ * the part of the colour. The surface is `drawnOn` when the tag knows what it is drawn on
208
+ * (`useReqoreSurface`; every colour of a gradient), the theme's surface otherwise
209
+ * (`getThemeSurfaces`). A colour the helpers cannot read (a CSS variable) is drawn as it
210
+ * is given: the label in it, over a wash of it the browser mixes.
93
211
  */
94
- var getTagAppearanceColors = function (theme, appearance, color) {
95
- var surface = (0, colors_2.getOpaqueColor)(theme.main);
96
- var base = (0, colors_2.getOpaqueColor)(color && color !== 'transparent' ? color : (0, colors_2.getReadableColorFrom)(surface));
212
+ var getTagAppearanceColors = function (theme, appearance, color, drawnOn) {
213
+ var surfaces = (0, colors_2.getThemeSurfaces)(theme, drawnOn);
214
+ var neutral = (0, colors_2.getReadableColorOn)(surfaces);
215
+ var base = (0, colors_2.getOpaqueColor)(color && color !== 'transparent' ? color : neutral);
97
216
  if (appearance === 'soft') {
98
- var background = (0, polished_1.mix)(exports.TAG_SOFT_BACKGROUND_OPACITY, base, surface);
99
- var text_1 = (0, colors_2.getReadableAccentColor)(base, background);
217
+ // the wash as drawn over each color of the surface; over what it cannot be read on, the surface
218
+ var backgrounds = (0, colors_2.isReadableColor)(base)
219
+ ? surfaces.map(function (surface) { return (0, polished_1.mix)(exports.TAG_SOFT_BACKGROUND_OPACITY, base, surface); })
220
+ : surfaces;
221
+ var text_1 = (0, colors_2.getReadableAccentColorOn)(base, backgrounds);
222
+ var keyBackground_1 = (0, colors_2.getColorAtAlpha)(base, 0.15);
223
+ var drawnKeyBackgrounds_1 = backgrounds.map(function (background) {
224
+ return (0, colors_2.getDrawnColor)(keyBackground_1, background);
225
+ });
100
226
  return {
101
227
  text: text_1,
102
- background: (0, polished_1.rgba)(base, exports.TAG_SOFT_BACKGROUND_OPACITY),
103
- hoverBackground: (0, polished_1.rgba)(base, exports.TAG_SOFT_BACKGROUND_OPACITY + 0.1),
104
- border: (0, polished_1.rgba)(text_1, 0.6),
105
- keyBackground: (0, polished_1.rgba)(base, 0.15),
106
- buttonHoverBackground: (0, polished_1.rgba)(base, 0.25),
228
+ background: (0, colors_2.getColorAtAlpha)(base, exports.TAG_SOFT_BACKGROUND_OPACITY),
229
+ hoverBackground: (0, colors_2.getColorAtAlpha)(base, exports.TAG_SOFT_BACKGROUND_OPACITY + 0.1),
230
+ border: (0, colors_2.getColorAtAlpha)(text_1, 0.6),
231
+ keyBackground: keyBackground_1,
232
+ keyText: (0, colors_2.getReadableAccentColorOn)(text_1, drawnKeyBackgrounds_1),
233
+ drawnBackground: backgrounds[0],
234
+ drawnBackgrounds: backgrounds,
235
+ drawnKeyBackground: drawnKeyBackgrounds_1[0],
236
+ drawnKeyBackgrounds: drawnKeyBackgrounds_1,
237
+ buttonHoverBackground: (0, colors_2.getColorAtAlpha)(base, 0.25),
107
238
  };
108
239
  }
109
- var text = (0, colors_2.getReadableAccentColor)(base, surface);
240
+ var text = (0, colors_2.getReadableAccentColorOn)(base, surfaces);
241
+ var keyBackground = (0, colors_2.getColorAtAlpha)(neutral, 0.08);
242
+ var drawnKeyBackgrounds = surfaces.map(function (surface) { return (0, colors_2.getDrawnColor)(keyBackground, surface); });
110
243
  return {
111
244
  text: text,
112
245
  background: 'transparent',
113
- hoverBackground: (0, polished_1.rgba)(text, 0.1),
114
- keyBackground: (0, polished_1.rgba)((0, colors_2.getReadableColorFrom)(surface), 0.08),
115
- buttonHoverBackground: (0, polished_1.rgba)(text, 0.15),
246
+ hoverBackground: (0, colors_2.getColorAtAlpha)(text, 0.1),
247
+ keyBackground: keyBackground,
248
+ keyText: (0, colors_2.getReadableAccentColorOn)(text, drawnKeyBackgrounds),
249
+ drawnBackground: surfaces[0],
250
+ drawnBackgrounds: surfaces,
251
+ drawnKeyBackground: drawnKeyBackgrounds[0],
252
+ drawnKeyBackgrounds: drawnKeyBackgrounds,
253
+ buttonHoverBackground: (0, colors_2.getColorAtAlpha)(text, 0.15),
116
254
  };
117
255
  };
118
256
  exports.getTagAppearanceColors = getTagAppearanceColors;
119
- // `fill` is handed down by a containing `ReqoreControlGroup`; it is an SVG attribute, so a
120
- // `span` would keep it. `width` sizes the tag through its styles.
121
- exports.StyledTag = (0, styled_components_1.default)(Effect_1.StyledEffect).withConfig({
122
- shouldForwardProp: (0, styled_1.omitStyleProps)('fill', 'width'),
123
- })(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n display: inline-flex;\n justify-content: center;\n flex-shrink: 0;\n align-items: stretch;\n /* Only when the caller has not asked for a family. StyledTag extends StyledEffect,\n so an unconditional declaration here always won the cascade over effect.fontFamily\n \u2014 which is why ReqoreDataView had to force monospace back on with a specificity-\n boosted descendant override instead of just setting the effect.\n NO BACKTICKS in this comment: it lives inside a template literal and they end it. */\n ", "\n overflow: hidden;\n vertical-align: ", ";\n font-size: ", "px;\n line-height: 1.1;\n\n min-width: ", "px;\n /* An explicit cap wins over the implicit one: a caller asking for 30ch means 30ch\n even inside a container wider than that, and 100% would let the tag grow past it. */\n max-width: ", ";\n flex: ", ";\n justify-self: ", ";\n border: ", ";\n /* Same flat !== false guard as EntityRow / FeatureCard / Callout: the inset\n highlight and the border are two ways of drawing the same edge, so a tag that\n already has a border does not also get the raised shading. */\n ", "\n border-radius: ", ";\n width: ", ";\n transition: all 0.2s ease-out;\n\n ", "\n\n ", ";\n\n ", "\n\n /* How a MINIMAL tag colours its label.\n\n Minimal paints the colour at 20% alpha, so what the label actually sits on\n is mostly the surface underneath \u2014 not the colour. For a CHROMATIC colour a\n light tint of it reads on either theme. For an ACHROMATIC one there is no\n tint to take: a 20% wash of grey over the surface IS the surface, so the\n label is read against the surface, exactly as the no-colour case does.\n\n It used to fall through to the readable colour for the colour at FULL\n strength. A near-white muted intent is light, so that returned BLACK, and\n the tag rendered black text on a 20% wash over a near-black page \u2014 reported\n as \"black text on a dark grey background; it's very hard to read\", and true\n of every minimal tag with a grey intent. */\n ", "\n\n ", "\n\n /* Soft and text tags: the colour draws the label (and, soft, the ring and a wash)\n instead of filling the tag. The ring is an inset shadow rather than a border so a\n soft tag keeps the exact box of a solid one \u2014 side by side in a group they line\n up \u2014 and it replaces any flat={false} border and the raised shading. */\n ", "\n\n ", "\n\n /* Read only is NOT disabled: the tag keeps its pointer events, so its tooltip and\n its actions still answer \u2014 it only stops advertising itself as something to\n press. Same meaning the prop has on ReqoreButton, ReqoreCheckbox and\n ReqoreRating. Last, so it wins over the interactive block's cursor: pointer. */\n ", "\n\n /* Only gate on hover where hover exists \u2014 see the same guard on ReqorePanel.\n On touch a `show: 'hover'` tag action would otherwise be display:none with\n no route to it at all. */\n @media (hover: hover) and (pointer: fine) {\n &:not(:hover) {\n .reqore-tag-action-hidden {\n display: none;\n }\n }\n }\n\n &:focus,\n &:active {\n outline: 2px solid ", ";\n outline-offset: -2px;\n }\n"], ["\n display: inline-flex;\n justify-content: center;\n flex-shrink: 0;\n align-items: stretch;\n /* Only when the caller has not asked for a family. StyledTag extends StyledEffect,\n so an unconditional declaration here always won the cascade over effect.fontFamily\n \u2014 which is why ReqoreDataView had to force monospace back on with a specificity-\n boosted descendant override instead of just setting the effect.\n NO BACKTICKS in this comment: it lives inside a template literal and they end it. */\n ", "\n overflow: hidden;\n vertical-align: ", ";\n font-size: ", "px;\n line-height: 1.1;\n\n min-width: ", "px;\n /* An explicit cap wins over the implicit one: a caller asking for 30ch means 30ch\n even inside a container wider than that, and 100% would let the tag grow past it. */\n max-width: ", ";\n flex: ", ";\n justify-self: ", ";\n border: ", ";\n /* Same flat !== false guard as EntityRow / FeatureCard / Callout: the inset\n highlight and the border are two ways of drawing the same edge, so a tag that\n already has a border does not also get the raised shading. */\n ", "\n border-radius: ", ";\n width: ", ";\n transition: all 0.2s ease-out;\n\n ", "\n\n ", ";\n\n ", "\n\n /* How a MINIMAL tag colours its label.\n\n Minimal paints the colour at 20% alpha, so what the label actually sits on\n is mostly the surface underneath \u2014 not the colour. For a CHROMATIC colour a\n light tint of it reads on either theme. For an ACHROMATIC one there is no\n tint to take: a 20% wash of grey over the surface IS the surface, so the\n label is read against the surface, exactly as the no-colour case does.\n\n It used to fall through to the readable colour for the colour at FULL\n strength. A near-white muted intent is light, so that returned BLACK, and\n the tag rendered black text on a 20% wash over a near-black page \u2014 reported\n as \"black text on a dark grey background; it's very hard to read\", and true\n of every minimal tag with a grey intent. */\n ", "\n\n ", "\n\n /* Soft and text tags: the colour draws the label (and, soft, the ring and a wash)\n instead of filling the tag. The ring is an inset shadow rather than a border so a\n soft tag keeps the exact box of a solid one \u2014 side by side in a group they line\n up \u2014 and it replaces any flat={false} border and the raised shading. */\n ", "\n\n ", "\n\n /* Read only is NOT disabled: the tag keeps its pointer events, so its tooltip and\n its actions still answer \u2014 it only stops advertising itself as something to\n press. Same meaning the prop has on ReqoreButton, ReqoreCheckbox and\n ReqoreRating. Last, so it wins over the interactive block's cursor: pointer. */\n ", "\n\n /* Only gate on hover where hover exists \u2014 see the same guard on ReqorePanel.\n On touch a \\`show: 'hover'\\` tag action would otherwise be display:none with\n no route to it at all. */\n @media (hover: hover) and (pointer: fine) {\n &:not(:hover) {\n .reqore-tag-action-hidden {\n display: none;\n }\n }\n }\n\n &:focus,\n &:active {\n outline: 2px solid ", ";\n outline-offset: -2px;\n }\n"])), function (_a) {
257
+ /**
258
+ * What a styled tag is painted with: what the tag worked out for this render, or - a `StyledTag` rendered on its
259
+ * own - worked out from its props.
260
+ */
261
+ var getStyledTagPaint = function (props) {
262
+ var _a;
263
+ return (_a = props.$paint) !== null && _a !== void 0 ? _a : (0, exports.getTagPaint)(props.theme, props.color, props.minimal, !!props.labelKey, props.effect, !!props.interactive, props.$surface, !props.$appearanceColors).paint;
264
+ };
265
+ /**
266
+ * Every tag prop that only styles or configures the tag. None of them reaches the rendered
267
+ * element — the `span`, or a component given as `as`. The compiler checks the record against
268
+ * `IReqoreTagStyle`, so a new prop that is not added here fails the build instead of leaking.
269
+ */
270
+ exports.REQORE_TAG_STYLE_PROPS = (0, styled_1.listReqoreStyleProps)({
271
+ actions: true,
272
+ align: true,
273
+ appearance: true,
274
+ asBadge: true,
275
+ compact: true,
276
+ customTheme: true,
277
+ disabled: true,
278
+ effect: true,
279
+ fixed: true,
280
+ flat: true,
281
+ fluid: true,
282
+ icon: true,
283
+ iconColor: true,
284
+ inheritCustomTheme: true,
285
+ intent: true,
286
+ interactive: true,
287
+ label: true,
288
+ labelAlign: true,
289
+ labelEffect: true,
290
+ labelKey: true,
291
+ labelKeyAlign: true,
292
+ labelKeyEffect: true,
293
+ leftIconColor: true,
294
+ leftIconProps: true,
295
+ loading: true,
296
+ loadingIconType: true,
297
+ maxWidth: true,
298
+ minimal: true,
299
+ onRemoveClick: true,
300
+ paddingSize: true,
301
+ radiusSize: true,
302
+ raised: true,
303
+ readOnly: true,
304
+ removable: true,
305
+ removeTooltip: true,
306
+ rightIcon: true,
307
+ rightIconColor: true,
308
+ rightIconProps: true,
309
+ rounded: true,
310
+ size: true,
311
+ skeleton: true,
312
+ theme: true,
313
+ tooltip: true,
314
+ truncate: true,
315
+ verticalAlign: true,
316
+ width: true,
317
+ wrap: true,
318
+ });
319
+ // The layout flags a containing `ReqoreControlGroup` hands the tag are not the element's either
320
+ // (`fill` is an SVG attribute, so a `span` would keep it).
321
+ exports.StyledTag = (0, styled_1.default)(Effect_1.StyledEffect).withConfig({
322
+ shouldForwardProp: styled_1.omitStyleProps.apply(void 0, __spreadArray(__spreadArray([], exports.REQORE_TAG_STYLE_PROPS, false), styled_1.REQORE_CONTROL_GROUP_CHILD_PROPS, false)),
323
+ })(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n display: inline-flex;\n justify-content: center;\n flex-shrink: 0;\n align-items: stretch;\n /* Only when the caller has not asked for a family. StyledTag extends StyledEffect,\n so an unconditional declaration here always won the cascade over effect.fontFamily\n \u2014 which is why ReqoreDataView had to force monospace back on with a specificity-\n boosted descendant override instead of just setting the effect.\n NO BACKTICKS in this comment: it lives inside a template literal and they end it. */\n ", "\n overflow: hidden;\n vertical-align: ", ";\n font-size: ", "px;\n line-height: 1.1;\n\n min-width: ", "px;\n /* An explicit cap wins over the implicit one: a caller asking for 30ch means 30ch\n even inside a container wider than that, and 100% would let the tag grow past it. */\n max-width: ", ";\n flex: ", ";\n justify-self: ", ";\n border: ", ";\n /* Same flat !== false guard as EntityRow / FeatureCard / Callout: the inset\n highlight and the border are two ways of drawing the same edge, so a tag that\n already has a border does not also get the raised shading. */\n ", "\n border-radius: ", ";\n width: ", ";\n transition: all 0.2s ease-out;\n\n ", "\n\n ", ";\n\n ", "\n\n /* How a solid tag colours its label: against what it is actually drawn on\n (getTagSolidColors), never against the colour it is made from.\n\n Minimal paints the colour at 20% alpha, so what the label actually sits on\n is mostly the surface underneath \u2014 not the colour. For a CHROMATIC colour a\n tint of it, in a shade that reads there, keeps the colour in the label. For\n an ACHROMATIC one there is no tint to take: a 20% wash of grey over the\n surface IS the surface, so the label is read against that.\n\n It used to fall through to the readable colour for the colour at FULL\n strength. A near-white muted intent is light, so that returned BLACK, and\n the tag rendered black text on a 20% wash over a near-black page \u2014 reported\n as \"black text on a dark grey background; it's very hard to read\", and true\n of every minimal tag with a grey intent. The key beside the label is drawn\n darker, so it has a text colour of its own. */\n ", "\n\n ", "\n\n /* Soft and text tags: the colour draws the label (and, soft, the ring and a wash)\n instead of filling the tag. The ring is an inset shadow rather than a border so a\n soft tag keeps the exact box of a solid one \u2014 side by side in a group they line\n up \u2014 and it replaces any flat={false} border and the raised shading. */\n ", "\n\n ", "\n\n /* Read only is NOT disabled: the tag keeps its pointer events, so its tooltip and\n its actions still answer \u2014 it only stops advertising itself as something to\n press. Same meaning the prop has on ReqoreButton, ReqoreCheckbox and\n ReqoreRating. Last, so it wins over the interactive block's cursor: pointer. */\n ", "\n\n /* Only gate on hover where hover exists \u2014 see the same guard on ReqorePanel.\n On touch a `show: 'hover'` tag action would otherwise be display:none with\n no route to it at all. */\n @media (hover: hover) and (pointer: fine) {\n &:not(:hover) {\n .reqore-tag-action-hidden {\n display: none;\n }\n }\n }\n\n &:focus,\n &:active {\n outline: 2px solid ", ";\n outline-offset: -2px;\n }\n"], ["\n display: inline-flex;\n justify-content: center;\n flex-shrink: 0;\n align-items: stretch;\n /* Only when the caller has not asked for a family. StyledTag extends StyledEffect,\n so an unconditional declaration here always won the cascade over effect.fontFamily\n \u2014 which is why ReqoreDataView had to force monospace back on with a specificity-\n boosted descendant override instead of just setting the effect.\n NO BACKTICKS in this comment: it lives inside a template literal and they end it. */\n ", "\n overflow: hidden;\n vertical-align: ", ";\n font-size: ", "px;\n line-height: 1.1;\n\n min-width: ", "px;\n /* An explicit cap wins over the implicit one: a caller asking for 30ch means 30ch\n even inside a container wider than that, and 100% would let the tag grow past it. */\n max-width: ", ";\n flex: ", ";\n justify-self: ", ";\n border: ", ";\n /* Same flat !== false guard as EntityRow / FeatureCard / Callout: the inset\n highlight and the border are two ways of drawing the same edge, so a tag that\n already has a border does not also get the raised shading. */\n ", "\n border-radius: ", ";\n width: ", ";\n transition: all 0.2s ease-out;\n\n ", "\n\n ", ";\n\n ", "\n\n /* How a solid tag colours its label: against what it is actually drawn on\n (getTagSolidColors), never against the colour it is made from.\n\n Minimal paints the colour at 20% alpha, so what the label actually sits on\n is mostly the surface underneath \u2014 not the colour. For a CHROMATIC colour a\n tint of it, in a shade that reads there, keeps the colour in the label. For\n an ACHROMATIC one there is no tint to take: a 20% wash of grey over the\n surface IS the surface, so the label is read against that.\n\n It used to fall through to the readable colour for the colour at FULL\n strength. A near-white muted intent is light, so that returned BLACK, and\n the tag rendered black text on a 20% wash over a near-black page \u2014 reported\n as \"black text on a dark grey background; it's very hard to read\", and true\n of every minimal tag with a grey intent. The key beside the label is drawn\n darker, so it has a text colour of its own. */\n ", "\n\n ", "\n\n /* Soft and text tags: the colour draws the label (and, soft, the ring and a wash)\n instead of filling the tag. The ring is an inset shadow rather than a border so a\n soft tag keeps the exact box of a solid one \u2014 side by side in a group they line\n up \u2014 and it replaces any flat={false} border and the raised shading. */\n ", "\n\n ", "\n\n /* Read only is NOT disabled: the tag keeps its pointer events, so its tooltip and\n its actions still answer \u2014 it only stops advertising itself as something to\n press. Same meaning the prop has on ReqoreButton, ReqoreCheckbox and\n ReqoreRating. Last, so it wins over the interactive block's cursor: pointer. */\n ", "\n\n /* Only gate on hover where hover exists \u2014 see the same guard on ReqorePanel.\n On touch a \\`show: 'hover'\\` tag action would otherwise be display:none with\n no route to it at all. */\n @media (hover: hover) and (pointer: fine) {\n &:not(:hover) {\n .reqore-tag-action-hidden {\n display: none;\n }\n }\n }\n\n &:focus,\n &:active {\n outline: 2px solid ", ";\n outline-offset: -2px;\n }\n"])), function (_a) {
124
324
  var effect = _a.effect;
125
325
  return !(effect === null || effect === void 0 ? void 0 : effect.fontFamily) && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n "], ["\n font-family: ", ";\n "])), fonts_1.SYSTEM_FONT);
126
326
  }, function (_a) {
@@ -141,10 +341,7 @@ exports.StyledTag = (0, styled_components_1.default)(Effect_1.StyledEffect).with
141
341
  }, function (_a) {
142
342
  var fixed = _a.fixed, fluid = _a.fluid;
143
343
  return fixed === true ? 'flex-start' : fluid ? 'stretch' : undefined;
144
- }, function (_a) {
145
- var theme = _a.theme, color = _a.color, _b = _a.flat, flat = _b === void 0 ? true : _b;
146
- return !flat ? "1px solid ".concat((0, colors_2.changeLightness)(color || theme.main, 0.2)) : 0;
147
- }, function (_a) {
344
+ }, function (props) { var _a; return !((_a = props.flat) !== null && _a !== void 0 ? _a : true) ? "1px solid ".concat(getStyledTagPaint(props).edge) : 0; }, function (_a) {
148
345
  var raised = _a.raised, _b = _a.flat, flat = _b === void 0 ? true : _b;
149
346
  return raised && flat !== false && styles_1.RaisedElement;
150
347
  }, function (_a) {
@@ -178,52 +375,33 @@ exports.StyledTag = (0, styled_components_1.default)(Effect_1.StyledEffect).with
178
375
  var size = _a.size, asBadge = _a.asBadge;
179
376
  return asBadge ? sizes_1.BADGE_SIZE_TO_PX[size] : sizes_1.TAG_SIZE_TO_PX[size];
180
377
  });
181
- }, function (_a) {
182
- var theme = _a.theme, color = _a.color, labelKey = _a.labelKey, minimal = _a.minimal, $appearanceColors = _a.$appearanceColors;
183
- if ($appearanceColors) {
378
+ }, function (props) {
379
+ var rest = getStyledTagPaint(props).rest;
380
+ if (props.$appearanceColors || !rest) {
184
381
  return undefined;
185
382
  }
186
- return (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n\n ", " {\n background-color: ", ";\n }\n "], ["\n background-color: ", ";\n color: ", ";\n\n ", " {\n background-color: ", ";\n }\n "])), minimal
187
- ? color
188
- ? (0, polished_1.rgba)(color, 0.2)
189
- : (0, polished_1.rgba)((0, colors_2.changeLightness)('#000000', 0.05), 0.3)
190
- : color || (0, colors_2.changeLightness)(theme.main, 0.1), minimal && color && color !== 'transparent'
191
- ? (0, colors_2.isAchromatic)(color)
192
- ? (0, colors_2.getReadableColorFrom)((0, colors_2.changeLightness)(theme.main, 0.1))
193
- : (0, polished_1.saturate)(1, (0, polished_1.tint)(0.8, color))
194
- : color && color !== 'transparent'
195
- ? (0, colors_2.getReadableColorFrom)(color)
196
- : (0, colors_2.getReadableColorFrom)((0, colors_2.changeLightness)(theme.main, 0.1)), StyledTagKeyWrapper, labelKey ? (0, polished_1.rgba)('#000000', minimal ? 0.1 : 0.3) : undefined);
197
- }, function (_a) {
198
- var theme = _a.theme, color = _a.color, interactive = _a.interactive, minimal = _a.minimal, effect = _a.effect, $appearanceColors = _a.$appearanceColors;
383
+ return (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n "], ["\n background-color: ", ";\n color: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n "])), rest.background, rest.text, StyledTagKeyWrapper, props.labelKey ? rest.keyShade : undefined, props.labelKey ? rest.keyText : undefined);
384
+ }, function (props) {
385
+ var interactive = props.interactive, effect = props.effect, labelKey = props.labelKey, $appearanceColors = props.$appearanceColors;
386
+ var hover = (interactive && !$appearanceColors ? getStyledTagPaint(props) : {}).hover;
199
387
  return interactive && !$appearanceColors
200
- ? (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n cursor: pointer;\n &:hover {\n .reqore-tag-content,\n .reqore-tag-key-content {\n ", "\n }\n\n ", "\n }\n "], ["\n cursor: pointer;\n &:hover {\n .reqore-tag-content,\n .reqore-tag-key-content {\n ", "\n }\n\n ", "\n }\n "])), styles_1.ActiveIconScale, !(effect === null || effect === void 0 ? void 0 : effect.gradient) && (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n "], ["\n background-color: ", ";\n color: ", ";\n "])), minimal
201
- ? color
202
- ? (0, polished_1.rgba)(color, 0.5)
203
- : (0, polished_1.rgba)((0, colors_2.changeLightness)('#000000', 0.05), 0.4)
204
- : color || (0, colors_2.changeLightness)(theme.main, 0.15), minimal
205
- ? (0, colors_2.getReadableColor)(theme, undefined, undefined, false, theme.originalMain)
206
- : color
207
- ? (0, colors_2.getReadableColorFrom)(color)
208
- : (0, colors_2.getReadableColor)(theme, undefined, undefined))) : undefined;
388
+ ? (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n cursor: pointer;\n &:hover {\n .reqore-tag-content,\n .reqore-tag-key-content {\n ", "\n }\n\n ", "\n }\n "], ["\n cursor: pointer;\n &:hover {\n .reqore-tag-content,\n .reqore-tag-key-content {\n ", "\n }\n\n ", "\n }\n "])), styles_1.ActiveIconScale, !(effect === null || effect === void 0 ? void 0 : effect.gradient) &&
389
+ hover && (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n\n ", " {\n color: ", ";\n }\n "], ["\n background-color: ", ";\n color: ", ";\n\n ", " {\n color: ", ";\n }\n "])), hover.background, hover.text, StyledTagKeyWrapper, labelKey ? hover.keyText : undefined)) : undefined;
209
390
  }, function (_a) {
210
391
  var $appearance = _a.$appearance, $appearanceColors = _a.$appearanceColors, labelKey = _a.labelKey, interactive = _a.interactive, effect = _a.effect;
211
- return $appearanceColors && (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n border: 0;\n box-shadow: ", ";\n\n ", " {\n background-color: ", ";\n }\n\n ", "\n\n &:focus,\n &:active {\n outline-color: ", ";\n }\n "], ["\n background-color: ", ";\n color: ", ";\n border: 0;\n box-shadow: ", ";\n\n ", " {\n background-color: ", ";\n }\n\n ", "\n\n &:focus,\n &:active {\n outline-color: ", ";\n }\n "])), $appearanceColors.background, $appearanceColors.text, $appearanceColors.border
392
+ return $appearanceColors && (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n border: 0;\n box-shadow: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n\n ", "\n\n &:focus,\n &:active {\n outline-color: ", ";\n }\n "], ["\n background-color: ", ";\n color: ", ";\n border: 0;\n box-shadow: ", ";\n\n ", " {\n background-color: ", ";\n color: ", ";\n }\n\n ", "\n\n &:focus,\n &:active {\n outline-color: ", ";\n }\n "])), $appearanceColors.background, $appearanceColors.text, $appearanceColors.border
212
393
  ? "inset 0 0 0 1px ".concat($appearanceColors.border)
213
- : 'none', StyledTagKeyWrapper, labelKey ? $appearanceColors.keyBackground : undefined, interactive && (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n cursor: pointer;\n &:hover {\n .reqore-tag-content,\n .reqore-tag-key-content {\n ", "\n }\n\n ", "\n }\n "], ["\n cursor: pointer;\n &:hover {\n .reqore-tag-content,\n .reqore-tag-key-content {\n ", "\n }\n\n ", "\n }\n "])), styles_1.ActiveIconScale, !(effect === null || effect === void 0 ? void 0 : effect.gradient) && (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n background-color: ", ";\n "], ["\n background-color: ", ";\n "])), $appearanceColors.hoverBackground)), $appearance === 'soft'
394
+ : 'none', StyledTagKeyWrapper, labelKey ? $appearanceColors.keyBackground : undefined, labelKey ? $appearanceColors.keyText : undefined, interactive && (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n cursor: pointer;\n &:hover {\n .reqore-tag-content,\n .reqore-tag-key-content {\n ", "\n }\n\n ", "\n }\n "], ["\n cursor: pointer;\n &:hover {\n .reqore-tag-content,\n .reqore-tag-key-content {\n ", "\n }\n\n ", "\n }\n "])), styles_1.ActiveIconScale, !(effect === null || effect === void 0 ? void 0 : effect.gradient) && (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n background-color: ", ";\n "], ["\n background-color: ", ";\n "])), $appearanceColors.hoverBackground)), $appearance === 'soft'
214
395
  ? $appearanceColors.border
215
- : (0, polished_1.rgba)($appearanceColors.text, 0.5));
396
+ : (0, colors_2.getColorAtAlpha)($appearanceColors.text, 0.5));
216
397
  }, function (_a) {
217
398
  var disabled = _a.disabled;
218
399
  return disabled && (0, styled_components_1.css)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n opacity: 0.5;\n pointer-events: none;\n cursor: not-allowed;\n "], ["\n opacity: 0.5;\n pointer-events: none;\n cursor: not-allowed;\n "])));
219
400
  }, function (_a) {
220
401
  var $readOnly = _a.$readOnly;
221
402
  return $readOnly && (0, styled_components_1.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), styles_1.ReadOnlyElement);
222
- }, function (_a) {
223
- var theme = _a.theme, color = _a.color;
224
- return (0, colors_2.changeLightness)(color || theme.main, 0.25);
225
- });
226
- var StyledTagKeyWrapper = styled_components_1.default.span(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n /* A key normally GROWS to share the tag with the label, which is what gives an\n uncapped key/value tag its even split. Under a cap that split is wrong twice\n over: the key takes half the width to render four characters, and the label is\n left with too little room for a tail it is not allowed to shrink \u2014 so the tail\n runs out past the tag's edge with a hole where the key's unused half was. Capped,\n the key takes what it needs and the label gets the rest. */\n flex: ", ";\n flex-shrink: 0;\n min-height: 100%;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n /* A key normally GROWS to share the tag with the label, which is what gives an\n uncapped key/value tag its even split. Under a cap that split is wrong twice\n over: the key takes half the width to render four characters, and the label is\n left with too little room for a tail it is not allowed to shrink \u2014 so the tail\n runs out past the tag's edge with a hole where the key's unused half was. Capped,\n the key takes what it needs and the label gets the rest. */\n flex: ", ";\n flex-shrink: 0;\n min-height: 100%;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
403
+ }, function (props) { return getStyledTagPaint(props).outline; });
404
+ var StyledTagKeyWrapper = styled_1.default.span(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n /* A key normally GROWS to share the tag with the label, which is what gives an\n uncapped key/value tag its even split. Under a cap that split is wrong twice\n over: the key takes half the width to render four characters, and the label is\n left with too little room for a tail it is not allowed to shrink \u2014 so the tail\n runs out past the tag's edge with a hole where the key's unused half was. Capped,\n the key takes what it needs and the label gets the rest. */\n flex: ", ";\n flex-shrink: 0;\n min-height: 100%;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n /* A key normally GROWS to share the tag with the label, which is what gives an\n uncapped key/value tag its even split. Under a cap that split is wrong twice\n over: the key takes half the width to render four characters, and the label is\n left with too little room for a tail it is not allowed to shrink \u2014 so the tail\n runs out past the tag's edge with a hole where the key's unused half was. Capped,\n the key takes what it needs and the label gets the rest. */\n flex: ", ";\n flex-shrink: 0;\n min-height: 100%;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
227
405
  var hasKey = _a.hasKey, fixed = _a.fixed, $capped = _a.$capped;
228
406
  return hasKey ? (fixed === 'key' || $capped ? '0 0 auto' : 1) : undefined;
229
407
  }, function (_a) {
@@ -233,7 +411,7 @@ var StyledTagKeyWrapper = styled_components_1.default.span(templateObject_16 ||
233
411
  var size = _a.size, padOnRight = _a.padOnRight;
234
412
  return padOnRight && "".concat(sizes_1.TAG_HORIZONTAL_PADDING_FROM_SIZE[size], "px");
235
413
  });
236
- var StyledTagContentWrapper = styled_components_1.default.span(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex: ", ";\n min-height: 100%;\n\n /* This wrapper is what makes a capped tag possible, and by default it is what makes\n it impossible. It refuses to shrink so a label is never squashed inside a fluid\n tag \u2014 correct when the tag sizes to its content, but with a cap it means the box\n cannot get narrower than the text, so the tag's own overflow:hidden clips it. And\n because the content is CENTRED, it clips at BOTH ends: \"https://host/a/b\" renders\n as \"ps://host/a/\", and a label key disappears off the left entirely.\n\n min-width is the other half: a flex item defaults to min-width:auto, which is its\n content's width, so flex-shrink alone still cannot take it below the text. */\n ", "\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n flex: ", ";\n min-height: 100%;\n\n /* This wrapper is what makes a capped tag possible, and by default it is what makes\n it impossible. It refuses to shrink so a label is never squashed inside a fluid\n tag \u2014 correct when the tag sizes to its content, but with a cap it means the box\n cannot get narrower than the text, so the tag's own overflow:hidden clips it. And\n because the content is CENTRED, it clips at BOTH ends: \"https://host/a/b\" renders\n as \"ps://host/a/\", and a label key disappears off the left entirely.\n\n min-width is the other half: a flex item defaults to min-width:auto, which is its\n content's width, so flex-shrink alone still cannot take it below the text. */\n ", "\n"])), function (_a) {
414
+ var StyledTagContentWrapper = styled_1.default.span(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex: ", ";\n min-height: 100%;\n\n /* This wrapper is what makes a capped tag possible, and by default it is what makes\n it impossible. It refuses to shrink so a label is never squashed inside a fluid\n tag \u2014 correct when the tag sizes to its content, but with a cap it means the box\n cannot get narrower than the text, so the tag's own overflow:hidden clips it. And\n because the content is CENTRED, it clips at BOTH ends: \"https://host/a/b\" renders\n as \"ps://host/a/\", and a label key disappears off the left entirely.\n\n min-width is the other half: a flex item defaults to min-width:auto, which is its\n content's width, so flex-shrink alone still cannot take it below the text. */\n ", "\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n flex: ", ";\n min-height: 100%;\n\n /* This wrapper is what makes a capped tag possible, and by default it is what makes\n it impossible. It refuses to shrink so a label is never squashed inside a fluid\n tag \u2014 correct when the tag sizes to its content, but with a cap it means the box\n cannot get narrower than the text, so the tag's own overflow:hidden clips it. And\n because the content is CENTRED, it clips at BOTH ends: \"https://host/a/b\" renders\n as \"ps://host/a/\", and a label key disappears off the left entirely.\n\n min-width is the other half: a flex item defaults to min-width:auto, which is its\n content's width, so flex-shrink alone still cannot take it below the text. */\n ", "\n"])), function (_a) {
237
415
  var fixed = _a.fixed;
238
416
  return (fixed === 'label' ? '0 0 auto' : 1);
239
417
  }, function (_a) {
@@ -241,7 +419,7 @@ var StyledTagContentWrapper = styled_components_1.default.span(templateObject_19
241
419
  return $capped
242
420
  ? (0, styled_components_1.css)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n flex-shrink: 1;\n min-width: 0;\n justify-content: flex-start;\n "], ["\n flex-shrink: 1;\n min-width: 0;\n justify-content: flex-start;\n "]))) : (0, styled_components_1.css)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n flex-shrink: 0;\n "], ["\n flex-shrink: 0;\n "])));
243
421
  });
244
- var StyledTagContent = (0, styled_components_1.default)(Effect_1.StyledTextEffect)(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n ", "\n padding: ", "px\n ", "px;\n min-height: 100%;\n display: flex;\n align-items: center;\n flex: 1;\n\n ", "\n\n ", "\n"], ["\n ", "\n padding: ", "px\n ", "px;\n min-height: 100%;\n display: flex;\n align-items: center;\n flex: 1;\n\n ", "\n\n ", "\n"])), function (_a) {
422
+ var StyledTagContent = (0, styled_1.default)(Effect_1.StyledTextEffect)(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n ", "\n padding: ", "px\n ", "px;\n min-height: 100%;\n display: flex;\n align-items: center;\n flex: 1;\n\n ", "\n\n ", "\n"], ["\n ", "\n padding: ", "px\n ", "px;\n min-height: 100%;\n display: flex;\n align-items: center;\n flex: 1;\n\n ", "\n\n ", "\n"])), function (_a) {
245
423
  var $capped = _a.$capped;
246
424
  return $capped && (0, styled_components_1.css)(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n min-width: 0;\n "], ["\n min-width: 0;\n "])));
247
425
  }, function (_a) {
@@ -262,7 +440,7 @@ var StyledTagContent = (0, styled_components_1.default)(Effect_1.StyledTextEffec
262
440
  return !$wrap && !$hasWidth
263
441
  ? (0, styled_components_1.css)(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n "], ["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]))) : (0, styled_components_1.css)(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n word-break: break-word;\n "], ["\n word-break: break-word;\n "])));
264
442
  });
265
- var StyledTagContentKey = (0, styled_components_1.default)(StyledTagContent)(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n flex: 1;\n\n ", "\n"], ["\n flex: 1;\n\n ", "\n"])), function (_a) {
443
+ var StyledTagContentKey = (0, styled_1.default)(StyledTagContent)(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n flex: 1;\n\n ", "\n"], ["\n flex: 1;\n\n ", "\n"])), function (_a) {
266
444
  var $wrap = _a.$wrap, $hasWidth = _a.$hasWidth;
267
445
  return !$wrap && !$hasWidth
268
446
  ? undefined
@@ -282,7 +460,7 @@ var StyledTagContentKey = (0, styled_components_1.default)(StyledTagContent)(tem
282
460
  * tag: the slot clips, the text-bearing element inside it ellipsizes, and only the
283
461
  * LABEL is wrapped so the icons and the label key keep their natural width.
284
462
  */
285
- var StyledTruncatedLabel = styled_components_1.default.span(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n min-width: 0;\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"], ["\n min-width: 0;\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));
463
+ var StyledTruncatedLabel = styled_1.default.span(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n min-width: 0;\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"], ["\n min-width: 0;\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));
286
464
  /**
287
465
  * A label that drops its MIDDLE rather than its tail.
288
466
  *
@@ -295,10 +473,10 @@ var StyledTruncatedLabel = styled_components_1.default.span(templateObject_27 ||
295
473
  * complete value and a screen reader reads it out whole. That is the part a JS
296
474
  * shortener cannot match: it deletes the characters it hides.
297
475
  */
298
- var StyledMiddleTruncatedLabel = styled_components_1.default.span(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n min-width: 0;\n max-width: 100%;\n display: flex;\n white-space: nowrap;\n"], ["\n min-width: 0;\n max-width: 100%;\n display: flex;\n white-space: nowrap;\n"])));
299
- var StyledTruncatedLabelHead = styled_components_1.default.span(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"], ["\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));
476
+ var StyledMiddleTruncatedLabel = styled_1.default.span(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n min-width: 0;\n max-width: 100%;\n display: flex;\n white-space: nowrap;\n"], ["\n min-width: 0;\n max-width: 100%;\n display: flex;\n white-space: nowrap;\n"])));
477
+ var StyledTruncatedLabelHead = styled_1.default.span(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"], ["\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));
300
478
  /* Never shrinks: it is the half the caller asked to keep. */
301
- var StyledTruncatedLabelTail = styled_components_1.default.span(templateObject_30 || (templateObject_30 = __makeTemplateObject(["\n flex-shrink: 0;\n white-space: nowrap;\n"], ["\n flex-shrink: 0;\n white-space: nowrap;\n"])));
479
+ var StyledTruncatedLabelTail = styled_1.default.span(templateObject_30 || (templateObject_30 = __makeTemplateObject(["\n flex-shrink: 0;\n white-space: nowrap;\n"], ["\n flex-shrink: 0;\n white-space: nowrap;\n"])));
302
480
  /**
303
481
  * Where to cut a label whose middle is dropped.
304
482
  *
@@ -319,7 +497,7 @@ var splitTagLabel = function (label) {
319
497
  characters.slice(characters.length - tailLength).join(''),
320
498
  ];
321
499
  };
322
- var StyledButtonWrapper = styled_components_1.default.span.withConfig({
500
+ var StyledButtonWrapper = styled_1.default.span.withConfig({
323
501
  shouldForwardProp: (0, styled_1.omitStyleProps)('color'),
324
502
  })(templateObject_32 || (templateObject_32 = __makeTemplateObject(["\n flex-shrink: 0;\n font-size: ", "px;\n width: ", "px;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: all 0.2s ease-out;\n\n ", "\n"], ["\n flex-shrink: 0;\n font-size: ", "px;\n width: ", "px;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: all 0.2s ease-out;\n\n ", "\n"])), function (_a) {
325
503
  var size = _a.size;
@@ -335,10 +513,11 @@ var StyledButtonWrapper = styled_components_1.default.span.withConfig({
335
513
  ? (0, colors_2.changeLightness)(color, 0.09)
336
514
  : (0, polished_1.rgba)('#000000', 0.2));
337
515
  });
338
- var ReqoreTag = (0, react_1.forwardRef)(function (_a, ref) {
339
- var _b, _c;
340
- var tooltip = _a.tooltip, label = _a.label, labelKey = _a.labelKey, icon = _a.icon, rightIcon = _a.rightIcon, className = _a.className, onClick = _a.onClick, _d = _a.size, size = _d === void 0 ? 'normal' : _d, paddingSize = _a.paddingSize, onRemoveClick = _a.onRemoveClick, actions = _a.actions, asBadge = _a.asBadge, intent = _a.intent, color = _a.color, minimal = _a.minimal, customTheme = _a.customTheme, inheritCustomTheme = _a.inheritCustomTheme, _e = _a.wrap, wrap = _e === void 0 ? false : _e, width = _a.width, maxWidth = _a.maxWidth, _f = _a.truncate, truncate = _f === void 0 ? 'end' : _f, leftIconColor = _a.leftIconColor, rightIconColor = _a.rightIconColor, iconColor = _a.iconColor, _g = _a.labelKeyAlign, labelKeyAlign = _g === void 0 ? 'left' : _g, labelAlign = _a.labelAlign, labelEffect = _a.labelEffect, labelKeyEffect = _a.labelKeyEffect, leftIconProps = _a.leftIconProps, rightIconProps = _a.rightIconProps, loading = _a.loading, loadingIconType = _a.loadingIconType, compact = _a.compact, readOnly = _a.readOnly, _h = _a.removeTooltip, removeTooltip = _h === void 0 ? 'Remove' : _h, _j = _a.appearance, appearance = _j === void 0 ? 'solid' : _j, rest = __rest(_a, ["tooltip", "label", "labelKey", "icon", "rightIcon", "className", "onClick", "size", "paddingSize", "onRemoveClick", "actions", "asBadge", "intent", "color", "minimal", "customTheme", "inheritCustomTheme", "wrap", "width", "maxWidth", "truncate", "leftIconColor", "rightIconColor", "iconColor", "labelKeyAlign", "labelAlign", "labelEffect", "labelKeyEffect", "leftIconProps", "rightIconProps", "loading", "loadingIconType", "compact", "readOnly", "removeTooltip", "appearance"]);
516
+ var ReqoreTagComponent = (0, react_1.forwardRef)(function (_a, ref) {
517
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
518
+ var tooltip = _a.tooltip, label = _a.label, labelKey = _a.labelKey, icon = _a.icon, rightIcon = _a.rightIcon, className = _a.className, onClick = _a.onClick, _m = _a.size, size = _m === void 0 ? 'normal' : _m, paddingSize = _a.paddingSize, onRemoveClick = _a.onRemoveClick, actions = _a.actions, asBadge = _a.asBadge, intent = _a.intent, color = _a.color, minimal = _a.minimal, customTheme = _a.customTheme, inheritCustomTheme = _a.inheritCustomTheme, _o = _a.wrap, wrap = _o === void 0 ? false : _o, width = _a.width, maxWidth = _a.maxWidth, _p = _a.truncate, truncate = _p === void 0 ? 'end' : _p, leftIconColor = _a.leftIconColor, rightIconColor = _a.rightIconColor, iconColor = _a.iconColor, _q = _a.labelKeyAlign, labelKeyAlign = _q === void 0 ? 'left' : _q, labelAlign = _a.labelAlign, labelEffect = _a.labelEffect, labelKeyEffect = _a.labelKeyEffect, leftIconProps = _a.leftIconProps, rightIconProps = _a.rightIconProps, loading = _a.loading, loadingIconType = _a.loadingIconType, compact = _a.compact, readOnly = _a.readOnly, _r = _a.removeTooltip, removeTooltip = _r === void 0 ? 'Remove' : _r, _s = _a.appearance, appearance = _s === void 0 ? 'solid' : _s, rest = __rest(_a, ["tooltip", "label", "labelKey", "icon", "rightIcon", "className", "onClick", "size", "paddingSize", "onRemoveClick", "actions", "asBadge", "intent", "color", "minimal", "customTheme", "inheritCustomTheme", "wrap", "width", "maxWidth", "truncate", "leftIconColor", "rightIconColor", "iconColor", "labelKeyAlign", "labelAlign", "labelEffect", "labelKeyEffect", "leftIconProps", "rightIconProps", "loading", "loadingIconType", "compact", "readOnly", "removeTooltip", "appearance"]);
341
519
  var theme = (0, __1.useReqoreTheme)('main', customTheme, undefined, undefined, inheritCustomTheme);
520
+ var surface = (0, SurfaceContext_1.useReqoreSurface)();
342
521
  // If color or intent was specified, set the color
343
522
  var getCustomColor = (0, react_1.useCallback)(function (itemIntent) {
344
523
  var customColor = itemIntent
@@ -377,9 +556,9 @@ var ReqoreTag = (0, react_1.forwardRef)(function (_a, ref) {
377
556
  (((_b = rest.effect) === null || _b === void 0 ? void 0 : _b.color) ? (0, colors_2.getColorFromMaybeString)(theme, rest.effect.color) : undefined);
378
557
  var appearanceColors = (0, react_1.useMemo)(function () {
379
558
  return appearance === 'soft' || appearance === 'text'
380
- ? (0, exports.getTagAppearanceColors)(theme, appearance, appearanceColor)
559
+ ? (0, exports.getTagAppearanceColors)(theme, appearance, appearanceColor, surface)
381
560
  : undefined;
382
- }, [appearance, theme, appearanceColor]);
561
+ }, [appearance, theme, appearanceColor, surface]);
383
562
  /* When effect.color IS the soft / text tag's colour, it has been turned into a
384
563
  readable shade already — left in the effect it would repaint the label in the
385
564
  raw colour, which is what the appearance exists to avoid. */
@@ -388,18 +567,71 @@ var ReqoreTag = (0, react_1.forwardRef)(function (_a, ref) {
388
567
  var _a;
389
568
  return (__assign(__assign(__assign({}, rest.effect), (effectColorIsTagColor ? { color: undefined } : {})), { gradient: intent ? undefined : (_a = rest.effect) === null || _a === void 0 ? void 0 : _a.gradient, interactive: interactive }));
390
569
  }, [intent, interactive, effectColorIsTagColor, JSON.stringify(rest.effect)]);
391
- return ((0, jsx_runtime_1.jsxs)(TooltipComponent_1.ReqoreTooltipComponent, __assign({}, rest, { Component: exports.StyledTag, tooltip: tooltip, theme: theme, effect: effect, width: width, "$maxWidth": maxWidth, labelKey: labelKey, color: tagColor, "$appearance": appearanceColors ? appearance : undefined, "$appearanceColors": appearanceColors, className: "".concat(className || '', " reqore-tag"), size: size, ref: ref, asBadge: asBadge, minimal: minimal, removable: !!onRemoveClick, interactive: interactive, "$readOnly": readOnly,
570
+ /* What the tag is painted with, worked out once per render rather than in each of its
571
+ style rules: a solid tag's colours at rest and, when it answers the pointer, hovered. */
572
+ var _t = (0, react_1.useMemo)(function () {
573
+ return (0, exports.getTagPaint)(theme, tagColor, minimal, !!labelKey, effect, interactive, surface, !appearanceColors);
574
+ }, [theme, tagColor, minimal, labelKey, effect, interactive, surface, appearanceColors]), paint = _t.paint, resting = _t.resting, hovered = _t.hovered;
575
+ /* The icons stand out from what they are drawn on, as the text does: the left one
576
+ sits in the key, the right one and the actions beside the label. */
577
+ var sides = (0, react_1.useMemo)(function () {
578
+ if (appearanceColors) {
579
+ var label_1 = {
580
+ backgrounds: appearanceColors.drawnBackgrounds,
581
+ text: appearanceColors.text,
582
+ };
583
+ return {
584
+ // the key's own wash is drawn only with a key: an icon alone sits on the tag
585
+ key: labelKey
586
+ ? { backgrounds: appearanceColors.drawnKeyBackgrounds, text: appearanceColors.keyText }
587
+ : label_1,
588
+ label: label_1,
589
+ };
590
+ }
591
+ var hover = hovered !== null && hovered !== void 0 ? hovered : resting;
592
+ return {
593
+ key: {
594
+ backgrounds: __spreadArray(__spreadArray([], resting.keyBackgrounds, true), hover.keyBackgrounds, true),
595
+ text: resting.keyText,
596
+ },
597
+ label: {
598
+ backgrounds: __spreadArray(__spreadArray([], resting.backgrounds, true), hover.backgrounds, true),
599
+ text: resting.text,
600
+ },
601
+ };
602
+ }, [appearanceColors, labelKey, resting, hovered]);
603
+ // an icon's own color: in its props (which win, as they are spread over the rest), else the tag's
604
+ var _u = (0, iconProps_1.splitIconColor)(leftIconProps), leftIconPropsColor = _u[0], leftIconRest = _u[1];
605
+ var _v = (0, iconProps_1.splitIconColor)(rightIconProps), rightIconPropsColor = _v[0], rightIconRest = _v[1];
606
+ var leftIconOwn = leftIconPropsColor || leftIconColor || iconColor;
607
+ var rightIconOwn = rightIconPropsColor || rightIconColor || iconColor;
608
+ var hasActions = !!(0, size_1.default)(actions);
609
+ // only for the icons the tag draws
610
+ var iconLooks = (0, react_1.useMemo)(function () {
611
+ var look = function (side, own) {
612
+ return (0, colors_2.getReadableIconLook)(theme, side.backgrounds, side.text, colors_1.CONTROL_ICON_OPACITY, own);
613
+ };
614
+ return {
615
+ left: hasLeftIcon ? look(sides.key, leftIconOwn) : undefined,
616
+ right: hasRightIcon ? look(sides.label, rightIconOwn) : undefined,
617
+ action: hasActions ? look(sides.label) : undefined,
618
+ };
619
+ }, [sides, theme, leftIconOwn, rightIconOwn, hasLeftIcon, hasRightIcon, hasActions]);
620
+ // one object per icon for as long as its opacity holds: an icon is a memo component
621
+ var leftIconEffect = (0, react_1.useMemo)(function () { var _a; return ({ opacity: (_a = iconLooks.left) === null || _a === void 0 ? void 0 : _a.opacity }); }, [(_d = iconLooks.left) === null || _d === void 0 ? void 0 : _d.opacity]);
622
+ var rightIconEffect = (0, react_1.useMemo)(function () { var _a; return ({ opacity: (_a = iconLooks.right) === null || _a === void 0 ? void 0 : _a.opacity }); }, [(_e = iconLooks.right) === null || _e === void 0 ? void 0 : _e.opacity]);
623
+ var actionIconEffect = (0, react_1.useMemo)(function () { var _a; return ({ opacity: (_a = iconLooks.action) === null || _a === void 0 ? void 0 : _a.opacity }); }, [(_f = iconLooks.action) === null || _f === void 0 ? void 0 : _f.opacity]);
624
+ return ((0, jsx_runtime_1.jsxs)(TooltipComponent_1.ReqoreTooltipComponent, __assign({}, rest, { Component: exports.StyledTag, tooltip: tooltip, theme: theme, "$surface": surface, "$backgrounds": sides.label.backgrounds, "$paint": paint, effect: effect, width: width, "$maxWidth": maxWidth, labelKey: labelKey, color: tagColor, "$appearance": appearanceColors ? appearance : undefined, "$appearanceColors": appearanceColors, className: "".concat(className || '', " reqore-tag"), size: size, ref: ref, asBadge: asBadge, minimal: minimal, removable: !!onRemoveClick, interactive: interactive, "$readOnly": readOnly,
392
625
  /* `interactive`, not `onClick`, decides the tab stop. A read-only tag
393
626
  keeps its handler — refusing the CHANGE is the picker's job, not the
394
627
  tag's — but it has stopped advertising itself as something to press,
395
628
  and a tab stop is that same advertisement made to the keyboard. Wired
396
629
  off the one flag so the cursor, the hover effect and the tab order
397
- cannot disagree about whether this tag is pressable. */
398
- tabIndex: interactive ? 0 : undefined, "$wrap": wrap, "$hasWidth": !!width, children: [labelKey || hasLeftIcon ? ((0, jsx_runtime_1.jsxs)(StyledTagKeyWrapper, { size: size, className: 'reqore-tag-key-content', onClick: rest.disabled ? undefined : onClick, "$wrap": wrap, "$hasWidth": !!width, "$capped": capped, hasKey: !!labelKey, hasIcon: hasLeftIcon, padOnRight: !label && !labelKey && !hasRightIcon, fixed: rest.fixed, children: [leftIcon || (leftIconProps === null || leftIconProps === void 0 ? void 0 : leftIconProps.image) ? ((0, jsx_runtime_1.jsx)(Icon_1.default, __assign({ size: "".concat(sizes_1.TAG_ICON_FROM_SIZE[size], "px"), color: leftIconColor || iconColor, compact: compact, effect: {
399
- opacity: colors_1.CONTROL_ICON_OPACITY,
400
- } }, leftIconProps, { animation: loading ? 'spin' : leftIconProps === null || leftIconProps === void 0 ? void 0 : leftIconProps.animation, icon: leftIcon }))) : null, labelKey && ((0, jsx_runtime_1.jsx)(StyledTagContentKey, { "$wrap": wrap, "$hasWidth": !!width, size: size, "$paddingSize": paddingSize, labelAlign: labelKeyAlign, compact: compact, effect: __assign({ weight: 'bold' }, labelKeyEffect), children: labelKey }))] })) : null, label || label === 0 || hasRightIcon ? ((0, jsx_runtime_1.jsxs)(StyledTagContentWrapper, { size: size, className: 'reqore-tag-content', onClick: rest.disabled ? undefined : onClick, "$wrap": wrap, "$hasWidth": !!width, "$capped": capped, hasKey: !!labelKey, fixed: rest.fixed, children: [label || label === 0 ? ((0, jsx_runtime_1.jsx)(StyledTagContent, { size: size, "$paddingSize": paddingSize, "$wrap": wrap, "$hasWidth": !!width, "$capped": capped, labelAlign: labelAlign || (labelKey ? 'left' : 'center'), compact: compact, effect: __assign({ weight: 'bold' }, labelEffect), children: !capped ? (label) : middleParts ? ((0, jsx_runtime_1.jsxs)(StyledMiddleTruncatedLabel, { className: 'reqore-tag-label', children: [(0, jsx_runtime_1.jsx)(StyledTruncatedLabelHead, { className: 'reqore-tag-label-head', children: middleParts[0] }), (0, jsx_runtime_1.jsx)(StyledTruncatedLabelTail, { className: 'reqore-tag-label-tail', children: middleParts[1] })] })) : ((0, jsx_runtime_1.jsx)(StyledTruncatedLabel, { className: 'reqore-tag-label', children: label })) })) : null, hasRightIcon ? ((0, jsx_runtime_1.jsx)(Icon_1.default, __assign({ icon: rightIcon, size: "".concat(sizes_1.TAG_ICON_FROM_SIZE[size], "px"), margin: label || (!icon && !labelKey) ? 'right' : 'both', color: rightIconColor || iconColor, compact: compact, effect: {
401
- opacity: colors_1.CONTROL_ICON_OPACITY,
402
- } }, rightIconProps))) : null] })) : null, (0, size_1.default)(actions)
630
+ cannot disagree about whether this tag is pressable. A pressable tag
631
+ keeps a `tabIndex` it is given, as a button does: a tag inside a
632
+ control that is itself the tab stop (a chip in a text editor) is
633
+ reached with that control's own keys, not with Tab. */
634
+ tabIndex: interactive ? ((_g = rest.tabIndex) !== null && _g !== void 0 ? _g : 0) : undefined, "aria-disabled": rest.disabled ? true : undefined, "$wrap": wrap, "$hasWidth": !!width, children: [labelKey || hasLeftIcon ? ((0, jsx_runtime_1.jsxs)(StyledTagKeyWrapper, { size: size, className: 'reqore-tag-key-content', onClick: rest.disabled ? undefined : onClick, "$wrap": wrap, "$hasWidth": !!width, "$capped": capped, hasKey: !!labelKey, hasIcon: hasLeftIcon, padOnRight: !label && !labelKey && !hasRightIcon, fixed: rest.fixed, children: [leftIcon || (leftIconProps === null || leftIconProps === void 0 ? void 0 : leftIconProps.image) ? ((0, jsx_runtime_1.jsx)(Icon_1.default, __assign({ size: "".concat(sizes_1.TAG_ICON_FROM_SIZE[size], "px"), color: (_j = (_h = iconLooks.left) === null || _h === void 0 ? void 0 : _h.color) !== null && _j !== void 0 ? _j : leftIconOwn, compact: compact, effect: leftIconEffect }, leftIconRest, { animation: loading ? 'spin' : leftIconProps === null || leftIconProps === void 0 ? void 0 : leftIconProps.animation, icon: leftIcon }))) : null, labelKey && ((0, jsx_runtime_1.jsx)(StyledTagContentKey, { "$wrap": wrap, "$hasWidth": !!width, size: size, "$paddingSize": paddingSize, labelAlign: labelKeyAlign, compact: compact, "$backgrounds": sides.key.backgrounds, effect: __assign({ weight: 'bold' }, labelKeyEffect), children: labelKey }))] })) : null, label || label === 0 || hasRightIcon ? ((0, jsx_runtime_1.jsxs)(StyledTagContentWrapper, { size: size, className: 'reqore-tag-content', onClick: rest.disabled ? undefined : onClick, "$wrap": wrap, "$hasWidth": !!width, "$capped": capped, hasKey: !!labelKey, fixed: rest.fixed, children: [label || label === 0 ? ((0, jsx_runtime_1.jsx)(StyledTagContent, { size: size, "$paddingSize": paddingSize, "$wrap": wrap, "$hasWidth": !!width, "$capped": capped, labelAlign: labelAlign || (labelKey ? 'left' : 'center'), compact: compact, "$backgrounds": sides.label.backgrounds, effect: __assign({ weight: 'bold' }, labelEffect), children: !capped ? (label) : middleParts ? ((0, jsx_runtime_1.jsxs)(StyledMiddleTruncatedLabel, { className: 'reqore-tag-label', children: [(0, jsx_runtime_1.jsx)(StyledTruncatedLabelHead, { className: 'reqore-tag-label-head', children: middleParts[0] }), (0, jsx_runtime_1.jsx)(StyledTruncatedLabelTail, { className: 'reqore-tag-label-tail', children: middleParts[1] })] })) : ((0, jsx_runtime_1.jsx)(StyledTruncatedLabel, { className: 'reqore-tag-label', children: label })) })) : null, hasRightIcon ? ((0, jsx_runtime_1.jsx)(Icon_1.default, __assign({ icon: rightIcon, size: "".concat(sizes_1.TAG_ICON_FROM_SIZE[size], "px"), margin: label || (!icon && !labelKey) ? 'right' : 'both', color: (_l = (_k = iconLooks.right) === null || _k === void 0 ? void 0 : _k.color) !== null && _l !== void 0 ? _l : rightIconOwn, compact: compact, effect: rightIconEffect }, rightIconRest))) : null] })) : null, (0, size_1.default)(actions)
403
635
  ? actions
404
636
  .filter(function (action) { return action.show !== false; })
405
637
  .map(function (_a, index) {
@@ -413,9 +645,7 @@ var ReqoreTag = (0, react_1.forwardRef)(function (_a, ref) {
413
645
  ? typeof tooltip === 'string'
414
646
  ? { tooltip: tooltip }
415
647
  : tooltip
416
- : {}), { isReqoreComponent: true, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { icon: icon, size: "".concat(sizes_1.TAG_ICON_FROM_SIZE[size], "px"), effect: {
417
- opacity: colors_1.CONTROL_ICON_OPACITY,
418
- } }) })) }, index));
648
+ : {}), { isReqoreComponent: true, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { icon: icon, size: "".concat(sizes_1.TAG_ICON_FROM_SIZE[size], "px"), effect: actionIconEffect }) })) }, index));
419
649
  })
420
650
  : null, onRemoveClick && !rest.disabled ? ((0, jsx_runtime_1.jsx)(__1.ReqorePopover, { component: StyledButtonWrapper, componentProps: {
421
651
  size: size,
@@ -426,6 +656,8 @@ var ReqoreTag = (0, react_1.forwardRef)(function (_a, ref) {
426
656
  $appearanceColors: appearanceColors,
427
657
  }, isReqoreComponent: true, content: removeTooltip, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { icon: 'CloseLine', size: size }) })) : null] })));
428
658
  });
659
+ /** A memo component, as Reqore's components are: a tag re-renders when its props or what it reads change. */
660
+ var ReqoreTag = (0, react_1.memo)(ReqoreTagComponent);
429
661
  exports.default = ReqoreTag;
430
662
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32;
431
663
  //# sourceMappingURL=index.js.map