@ntbjs/react-components 2.0.13 → 3.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/build/data/Alert/Alert.js +18 -33
  2. package/build/data/Alert/Alert.js.map +1 -1
  3. package/build/data/Alert/Alert.styled.js +9 -47
  4. package/build/data/Alert/Alert.styled.js.map +1 -1
  5. package/build/data/Badge/Badge.js +36 -61
  6. package/build/data/Badge/Badge.js.map +1 -1
  7. package/build/data/Badge/Badge.styled.js +21 -70
  8. package/build/data/Badge/Badge.styled.js.map +1 -1
  9. package/build/data/Popover/Popover.js +125 -71
  10. package/build/data/Popover/Popover.js.map +1 -1
  11. package/build/data/Popover/Popover.styled.js +10 -140
  12. package/build/data/Popover/Popover.styled.js.map +1 -1
  13. package/build/data/SeverityBadge/SeverityBadge.js +13 -22
  14. package/build/data/SeverityBadge/SeverityBadge.js.map +1 -1
  15. package/build/data/SeverityBadge/index.js +2 -0
  16. package/build/data/SeverityBadge/index.js.map +1 -0
  17. package/build/data/Tab/Tab.js +7 -13
  18. package/build/data/Tab/Tab.js.map +1 -1
  19. package/build/data/Tab/Tab.styled.js +4 -7
  20. package/build/data/Tab/Tab.styled.js.map +1 -1
  21. package/build/data/Tabs/Tabs.js +30 -32
  22. package/build/data/Tabs/Tabs.js.map +1 -1
  23. package/build/data/Tabs/Tabs.styled.js +21 -57
  24. package/build/data/Tabs/Tabs.styled.js.map +1 -1
  25. package/build/data/Tooltip/Tooltip.js +102 -33
  26. package/build/data/Tooltip/Tooltip.js.map +1 -1
  27. package/build/data/Tooltip/Tooltip.styled.js +9 -22
  28. package/build/data/Tooltip/Tooltip.styled.js.map +1 -1
  29. package/build/data/VerificationStatusIcon/VerificationStatusIcon.js +16 -23
  30. package/build/data/VerificationStatusIcon/VerificationStatusIcon.js.map +1 -1
  31. package/build/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +13 -31
  32. package/build/data/VerificationStatusIcon/VerificationStatusIcon.styled.js.map +1 -1
  33. package/build/data/VerificationStatusIcon/index.js +2 -0
  34. package/build/data/VerificationStatusIcon/index.js.map +1 -0
  35. package/build/data/_shared/FloatingArrow.styled.js +30 -0
  36. package/build/data/_shared/FloatingArrow.styled.js.map +1 -0
  37. package/build/hooks/useEventListner.js.map +1 -1
  38. package/build/hooks/useFloatingPopover.js +187 -0
  39. package/build/hooks/useFloatingPopover.js.map +1 -0
  40. package/build/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  41. package/build/hooks/useOnClickOutside.js.map +1 -1
  42. package/build/hooks/useTooltipAutoShow.js.map +1 -1
  43. package/build/icons/arrow-back.svg.js +3 -3
  44. package/build/icons/arrow-back.svg.js.map +1 -1
  45. package/build/icons/arrow-forward.svg.js +4 -4
  46. package/build/icons/arrow-forward.svg.js.map +1 -1
  47. package/build/icons/check-rectangle-filled.svg.js +3 -3
  48. package/build/icons/check-rectangle-filled.svg.js.map +1 -1
  49. package/build/icons/close.svg.js +3 -3
  50. package/build/icons/close.svg.js.map +1 -1
  51. package/build/icons/edit-note.svg.js +3 -3
  52. package/build/icons/edit-note.svg.js.map +1 -1
  53. package/build/icons/expand-more.svg.js +3 -3
  54. package/build/icons/expand-more.svg.js.map +1 -1
  55. package/build/icons/headset.svg.js +3 -3
  56. package/build/icons/headset.svg.js.map +1 -1
  57. package/build/icons/layers.svg.js +3 -3
  58. package/build/icons/layers.svg.js.map +1 -1
  59. package/build/icons/link.svg.js +3 -3
  60. package/build/icons/link.svg.js.map +1 -1
  61. package/build/icons/play.svg.js +3 -3
  62. package/build/icons/play.svg.js.map +1 -1
  63. package/build/icons/search.svg.js +3 -3
  64. package/build/icons/search.svg.js.map +1 -1
  65. package/build/icons/star-filled.svg.js +3 -3
  66. package/build/icons/star-filled.svg.js.map +1 -1
  67. package/build/icons/star.svg.js +3 -3
  68. package/build/icons/star.svg.js.map +1 -1
  69. package/build/icons/triangle-right.svg.js +3 -3
  70. package/build/icons/triangle-right.svg.js.map +1 -1
  71. package/build/icons/verification.svg.js +3 -3
  72. package/build/icons/verification.svg.js.map +1 -1
  73. package/build/icons/warning-circle.svg.js +3 -3
  74. package/build/icons/warning-circle.svg.js.map +1 -1
  75. package/build/inputs/ActionButton/ActionButton.js +11 -22
  76. package/build/inputs/ActionButton/ActionButton.js.map +1 -1
  77. package/build/inputs/ActionButton/ActionButton.styled.js +5 -54
  78. package/build/inputs/ActionButton/ActionButton.styled.js.map +1 -1
  79. package/build/inputs/Button/Button.js +125 -121
  80. package/build/inputs/Button/Button.js.map +1 -1
  81. package/build/inputs/Button/Button.styled.js +42 -260
  82. package/build/inputs/Button/Button.styled.js.map +1 -1
  83. package/build/inputs/Checkbox/Checkbox.js +45 -61
  84. package/build/inputs/Checkbox/Checkbox.js.map +1 -1
  85. package/build/inputs/Checkbox/Checkbox.styled.js +24 -153
  86. package/build/inputs/Checkbox/Checkbox.styled.js.map +1 -1
  87. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +106 -111
  88. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js.map +1 -1
  89. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +88 -273
  90. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js.map +1 -1
  91. package/build/inputs/CompactStarRating/CompactStarRating.js +56 -77
  92. package/build/inputs/CompactStarRating/CompactStarRating.js.map +1 -1
  93. package/build/inputs/CompactStarRating/CompactStarRating.styled.js +32 -211
  94. package/build/inputs/CompactStarRating/CompactStarRating.styled.js.map +1 -1
  95. package/build/inputs/CompactTextInput/CompactTextInput.js +86 -105
  96. package/build/inputs/CompactTextInput/CompactTextInput.js.map +1 -1
  97. package/build/inputs/CompactTextInput/CompactTextInput.styled.js +55 -258
  98. package/build/inputs/CompactTextInput/CompactTextInput.styled.js.map +1 -1
  99. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +70 -77
  100. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js.map +1 -1
  101. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +28 -60
  102. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js.map +1 -1
  103. package/build/inputs/MultiLevelCheckbox/types.js +12 -12
  104. package/build/inputs/MultiLevelCheckbox/types.js.map +1 -1
  105. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +69 -73
  106. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js.map +1 -1
  107. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +44 -87
  108. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js.map +1 -1
  109. package/build/inputs/MultiSelect/MultiSelect.js +69 -79
  110. package/build/inputs/MultiSelect/MultiSelect.js.map +1 -1
  111. package/build/inputs/MultiSelect/MultiSelect.styled.js +70 -76
  112. package/build/inputs/MultiSelect/MultiSelect.styled.js.map +1 -1
  113. package/build/inputs/Radio/Radio.js +20 -33
  114. package/build/inputs/Radio/Radio.js.map +1 -1
  115. package/build/inputs/Radio/Radio.styled.js +15 -96
  116. package/build/inputs/Radio/Radio.styled.js.map +1 -1
  117. package/build/inputs/Switch/Switch.js +28 -40
  118. package/build/inputs/Switch/Switch.js.map +1 -1
  119. package/build/inputs/Switch/Switch.styled.js +24 -94
  120. package/build/inputs/Switch/Switch.styled.js.map +1 -1
  121. package/build/inputs/TextArea/TextArea.js +98 -123
  122. package/build/inputs/TextArea/TextArea.js.map +1 -1
  123. package/build/inputs/TextArea/TextArea.styled.js +64 -379
  124. package/build/inputs/TextArea/TextArea.styled.js.map +1 -1
  125. package/build/inputs/TextInput/TextInput.js +59 -79
  126. package/build/inputs/TextInput/TextInput.js.map +1 -1
  127. package/build/inputs/TextInput/TextInput.styled.js +33 -224
  128. package/build/inputs/TextInput/TextInput.styled.js.map +1 -1
  129. package/build/layout/InputGroup/InputGroup.js +6 -9
  130. package/build/layout/InputGroup/InputGroup.js.map +1 -1
  131. package/build/layout/InputGroup/InputGroup.styled.js +4 -3
  132. package/build/layout/InputGroup/InputGroup.styled.js.map +1 -1
  133. package/build/layout/InputGroup/index.js +2 -0
  134. package/build/layout/InputGroup/index.js.map +1 -0
  135. package/build/layout/SectionSeparator/SectionSeparator.js +5 -9
  136. package/build/layout/SectionSeparator/SectionSeparator.js.map +1 -1
  137. package/build/layout/SectionSeparator/SectionSeparator.styled.js +4 -8
  138. package/build/layout/SectionSeparator/SectionSeparator.styled.js.map +1 -1
  139. package/build/styles/utils/colors-export.d.ts +73 -0
  140. package/build/styles/utils/colors-export.js.map +1 -1
  141. package/build/utils/dateTime.js.map +1 -1
  142. package/build/utils/defaultTheme.js +14 -28
  143. package/build/utils/defaultTheme.js.map +1 -1
  144. package/build/utils/getElementRef.js +14 -0
  145. package/build/utils/getElementRef.js.map +1 -0
  146. package/build/utils/parseTrigger.js +16 -0
  147. package/build/utils/parseTrigger.js.map +1 -0
  148. package/build/widgets/AssetAction/AssetAction.js +26 -33
  149. package/build/widgets/AssetAction/AssetAction.js.map +1 -1
  150. package/build/widgets/AssetAction/AssetAction.styled.js +20 -34
  151. package/build/widgets/AssetAction/AssetAction.styled.js.map +1 -1
  152. package/build/widgets/AssetActionsBase/AssetActionsBase.js +8 -13
  153. package/build/widgets/AssetActionsBase/AssetActionsBase.js.map +1 -1
  154. package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js +4 -9
  155. package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js.map +1 -1
  156. package/build/widgets/AssetGallery/AssetGallery.js +15 -40
  157. package/build/widgets/AssetGallery/AssetGallery.js.map +1 -1
  158. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +55 -70
  159. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js.map +1 -1
  160. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +12 -24
  161. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js.map +1 -1
  162. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +146 -120
  163. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js.map +1 -1
  164. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +99 -285
  165. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js.map +1 -1
  166. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +170 -125
  167. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js.map +1 -1
  168. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +135 -364
  169. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js.map +1 -1
  170. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +20 -21
  171. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js.map +1 -1
  172. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +20 -71
  173. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js.map +1 -1
  174. package/build/widgets/ContextMenu/ContextMenu.js +12 -11
  175. package/build/widgets/ContextMenu/ContextMenu.js.map +1 -1
  176. package/build/widgets/ContextMenu/ContextMenu.styled.js +4 -4
  177. package/build/widgets/ContextMenu/ContextMenu.styled.js.map +1 -1
  178. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +17 -25
  179. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js.map +1 -1
  180. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +16 -71
  181. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js.map +1 -1
  182. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +7 -11
  183. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js.map +1 -1
  184. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +4 -11
  185. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js.map +1 -1
  186. package/build/widgets/InfoCard/InfoCard.js +26 -21
  187. package/build/widgets/InfoCard/InfoCard.js.map +1 -1
  188. package/build/widgets/InfoCard/InfoCard.styled.js +36 -84
  189. package/build/widgets/InfoCard/InfoCard.styled.js.map +1 -1
  190. package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.js +28 -34
  191. package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.js.map +1 -1
  192. package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.js +21 -57
  193. package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.js.map +1 -1
  194. package/build/widgets/InstructionSeverityDisplay/index.js +2 -0
  195. package/build/widgets/InstructionSeverityDisplay/index.js.map +1 -0
  196. package/build/widgets/Instructions/Instructions.js +53 -95
  197. package/build/widgets/Instructions/Instructions.js.map +1 -1
  198. package/build/widgets/Instructions/Instructions.styled.js +27 -26
  199. package/build/widgets/Instructions/Instructions.styled.js.map +1 -1
  200. package/build/widgets/ProgressBar/ProgressBar.js +39 -37
  201. package/build/widgets/ProgressBar/ProgressBar.js.map +1 -1
  202. package/build/widgets/ProgressBar/ProgressBar.styled.js +56 -125
  203. package/build/widgets/ProgressBar/ProgressBar.styled.js.map +1 -1
  204. package/build/widgets/SummaryCard/SummaryCard.js +55 -64
  205. package/build/widgets/SummaryCard/SummaryCard.js.map +1 -1
  206. package/build/widgets/SummaryCard/SummaryCard.styled.js +51 -106
  207. package/build/widgets/SummaryCard/SummaryCard.styled.js.map +1 -1
  208. package/package.json +77 -36
  209. package/styles/utils/colors-export.d.ts +73 -0
  210. package/types/components/data/Alert/Alert.d.ts +76 -0
  211. package/types/components/data/Alert/Alert.styled.d.ts +83 -0
  212. package/types/components/data/Alert/index.d.ts +1 -0
  213. package/types/components/data/Badge/Badge.d.ts +128 -0
  214. package/types/components/data/Badge/Badge.styled.d.ts +132 -0
  215. package/types/components/data/Badge/index.d.ts +1 -0
  216. package/types/components/data/Popover/Popover.d.ts +205 -0
  217. package/types/components/data/Popover/Popover.styled.d.ts +15 -0
  218. package/types/components/data/Popover/index.d.ts +1 -0
  219. package/types/components/data/SeverityBadge/SeverityBadge.d.ts +72 -0
  220. package/types/components/data/SeverityBadge/index.d.ts +1 -0
  221. package/types/components/data/Tab/Tab.d.ts +27 -0
  222. package/types/components/data/Tab/Tab.styled.d.ts +1 -0
  223. package/types/components/data/Tab/index.d.ts +1 -0
  224. package/types/components/data/Tabs/Tabs.d.ts +111 -0
  225. package/types/components/data/Tabs/Tabs.styled.d.ts +42 -0
  226. package/types/components/data/Tabs/index.d.ts +1 -0
  227. package/types/components/data/Tooltip/Tooltip.d.ts +134 -0
  228. package/types/components/data/Tooltip/Tooltip.styled.d.ts +8 -0
  229. package/types/components/data/Tooltip/index.d.ts +1 -0
  230. package/types/components/data/VerificationStatusIcon/VerificationStatusIcon.d.ts +35 -0
  231. package/types/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.d.ts +46 -0
  232. package/types/components/data/VerificationStatusIcon/index.d.ts +1 -0
  233. package/types/components/data/_shared/FloatingArrow.styled.d.ts +129 -0
  234. package/types/components/data/index.d.ts +8 -0
  235. package/types/components/index.d.ts +3 -0
  236. package/types/components/inputs/ActionButton/ActionButton.d.ts +55 -0
  237. package/types/components/inputs/ActionButton/ActionButton.styled.d.ts +34 -0
  238. package/types/components/inputs/ActionButton/index.d.ts +1 -0
  239. package/types/components/inputs/Button/Button.d.ts +82 -0
  240. package/types/components/inputs/Button/Button.styled.d.ts +102 -0
  241. package/types/components/inputs/Button/index.d.ts +1 -0
  242. package/types/components/inputs/Checkbox/Checkbox.d.ts +92 -0
  243. package/types/components/inputs/Checkbox/Checkbox.styled.d.ts +33 -0
  244. package/types/components/inputs/Checkbox/index.d.ts +1 -0
  245. package/types/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.d.ts +242 -0
  246. package/types/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.d.ts +157 -0
  247. package/types/components/inputs/CompactAutocompleteSelect/index.d.ts +1 -0
  248. package/types/components/inputs/CompactStarRating/CompactStarRating.d.ts +96 -0
  249. package/types/components/inputs/CompactStarRating/CompactStarRating.styled.d.ts +86 -0
  250. package/types/components/inputs/CompactStarRating/index.d.ts +1 -0
  251. package/types/components/inputs/CompactTextInput/CompactTextInput.d.ts +116 -0
  252. package/types/components/inputs/CompactTextInput/CompactTextInput.styled.d.ts +70 -0
  253. package/types/components/inputs/CompactTextInput/index.d.ts +1 -0
  254. package/types/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.d.ts +41 -0
  255. package/types/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.d.ts +21 -0
  256. package/types/components/inputs/MultiLevelCheckbox/index.d.ts +2 -0
  257. package/types/components/inputs/MultiLevelCheckbox/types.d.ts +72 -0
  258. package/types/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.d.ts +44 -0
  259. package/types/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.d.ts +11 -0
  260. package/types/components/inputs/MultiLevelCheckboxSelect/index.d.ts +1 -0
  261. package/types/components/inputs/MultiSelect/MultiSelect.d.ts +172 -0
  262. package/types/components/inputs/MultiSelect/MultiSelect.styled.d.ts +99 -0
  263. package/types/components/inputs/MultiSelect/index.d.ts +1 -0
  264. package/types/components/inputs/Radio/Radio.d.ts +65 -0
  265. package/types/components/inputs/Radio/Radio.styled.d.ts +11 -0
  266. package/types/components/inputs/Radio/index.d.ts +1 -0
  267. package/types/components/inputs/Switch/Switch.d.ts +62 -0
  268. package/types/components/inputs/Switch/Switch.styled.d.ts +20 -0
  269. package/types/components/inputs/Switch/index.d.ts +1 -0
  270. package/types/components/inputs/TextArea/TextArea.d.ts +124 -0
  271. package/types/components/inputs/TextArea/TextArea.styled.d.ts +95 -0
  272. package/types/components/inputs/TextArea/index.d.ts +1 -0
  273. package/types/components/inputs/TextInput/TextInput.d.ts +109 -0
  274. package/types/components/inputs/TextInput/TextInput.styled.d.ts +43 -0
  275. package/types/components/inputs/TextInput/index.d.ts +1 -0
  276. package/types/components/inputs/index.d.ts +13 -0
  277. package/types/components/layout/InputGroup/InputGroup.d.ts +31 -0
  278. package/types/components/layout/InputGroup/InputGroup.styled.d.ts +1 -0
  279. package/types/components/layout/InputGroup/index.d.ts +1 -0
  280. package/types/components/layout/SectionSeparator/SectionSeparator.d.ts +28 -0
  281. package/types/components/layout/SectionSeparator/SectionSeparator.styled.d.ts +14 -0
  282. package/types/components/layout/SectionSeparator/index.d.ts +1 -0
  283. package/types/components/layout/index.d.ts +2 -0
  284. package/types/components/widgets/AssetAction/AssetAction.d.ts +16 -0
  285. package/types/components/widgets/AssetAction/AssetAction.styled.d.ts +20 -0
  286. package/types/components/widgets/AssetAction/index.d.ts +1 -0
  287. package/types/components/widgets/AssetActionsBase/AssetActionsBase.d.ts +25 -0
  288. package/types/components/widgets/AssetActionsBase/AssetActionsBase.styled.d.ts +1 -0
  289. package/types/components/widgets/AssetActionsBase/index.d.ts +1 -0
  290. package/types/components/widgets/AssetGallery/AssetGallery.d.ts +170 -0
  291. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.d.ts +88 -0
  292. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.d.ts +3 -0
  293. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.d.ts +3 -0
  294. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.d.ts +100 -0
  295. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.d.ts +2 -0
  296. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.d.ts +85 -0
  297. package/types/components/widgets/AssetGallery/asset.types.d.ts +446 -0
  298. package/types/components/widgets/AssetGallery/index.d.ts +1 -0
  299. package/types/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.d.ts +60 -0
  300. package/types/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.d.ts +35 -0
  301. package/types/components/widgets/AssetPreview/AssetPreviewTopBar/index.d.ts +1 -0
  302. package/types/components/widgets/ContextMenu/ContextMenu.d.ts +134 -0
  303. package/types/components/widgets/ContextMenu/ContextMenu.styled.d.ts +1 -0
  304. package/types/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.d.ts +45 -0
  305. package/types/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.d.ts +26 -0
  306. package/types/components/widgets/ContextMenu/ContextMenuItem/index.d.ts +1 -0
  307. package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.d.ts +41 -0
  308. package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.d.ts +1 -0
  309. package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/index.d.ts +1 -0
  310. package/types/components/widgets/ContextMenu/index.d.ts +1 -0
  311. package/types/components/widgets/InfoCard/InfoCard.d.ts +33 -0
  312. package/types/components/widgets/InfoCard/InfoCard.styled.d.ts +45 -0
  313. package/types/components/widgets/InfoCard/index.d.ts +1 -0
  314. package/types/components/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.d.ts +46 -0
  315. package/types/components/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.d.ts +40 -0
  316. package/types/components/widgets/InstructionSeverityDisplay/index.d.ts +1 -0
  317. package/types/components/widgets/Instructions/Instructions.d.ts +156 -0
  318. package/types/components/widgets/Instructions/Instructions.styled.d.ts +26 -0
  319. package/types/components/widgets/Instructions/index.d.ts +1 -0
  320. package/types/components/widgets/ProgressBar/ProgressBar.d.ts +30 -0
  321. package/types/components/widgets/ProgressBar/ProgressBar.styled.d.ts +78 -0
  322. package/types/components/widgets/ProgressBar/index.d.ts +1 -0
  323. package/types/components/widgets/SummaryCard/SummaryCard.d.ts +83 -0
  324. package/types/components/widgets/SummaryCard/SummaryCard.styled.d.ts +68 -0
  325. package/types/components/widgets/SummaryCard/index.d.ts +1 -0
  326. package/types/components/widgets/index.d.ts +11 -0
  327. package/types/hooks/useElementSize.d.ts +25 -0
  328. package/types/hooks/useEventListner.d.ts +46 -0
  329. package/types/hooks/useFloatingPopover.d.ts +242 -0
  330. package/types/hooks/useIsomorphicLayoutEffect.d.ts +26 -0
  331. package/types/hooks/useOnClickOutside.d.ts +31 -0
  332. package/types/hooks/useTooltipAutoShow.d.ts +80 -0
  333. package/types/icons/index.d.ts +41 -0
  334. package/types/ssr/index.d.ts +1 -0
  335. package/types/styles/utils/colors-export.d.ts +73 -0
  336. package/types/utils/dateTime.d.ts +13 -0
  337. package/types/utils/defaultTheme.d.ts +174 -0
  338. package/types/utils/getElementRef.d.ts +21 -0
  339. package/types/utils/parseTrigger.d.ts +92 -0
  340. package/build/_virtual/_rollupPluginBabelHelpers.js +0 -12
  341. package/build/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
  342. package/build/widgets/AssetGallery/asset.propType.js +0 -56
  343. package/build/widgets/AssetGallery/asset.propType.js.map +0 -1
@@ -6,81 +6,26 @@ const shouldForwardProp = prop => {
6
6
  };
7
7
  const ContextMenuItem = styled.span.withConfig({
8
8
  shouldForwardProp
9
- }).attrs(applyDefaultTheme)`
10
- align-items: center;
11
- cursor: pointer;
12
- display: flex;
13
- font-family: ${props => props.theme.primaryFontFamily};
14
- font-size: 0.875rem;
15
- font-weight: normal;
16
- height: 31px;
17
- min-width: 160px;
18
- padding: ${props => props.$openssublevel ? '0 8px' : '0 28px 0 8px'};
19
-
20
- ${props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-700'))}
21
-
22
- ${props => props.theme.themeProp('background-color', props.theme.getColor('gray-700'), '#FEFEFE')}
23
-
24
- ${props => !props.$icon && css`
25
- padding-left: 28px;
26
- `}
27
-
28
-
29
- :last-of-type {
30
- height: 32px;
31
- }
32
-
33
- &:hover {
34
- cursor: pointer;
35
-
36
- ${props => props.theme.themeProp('background-color', props.theme.getColor('gray-600'), props.theme.getColor('gray-200'))}
37
- }
38
-
39
- ${props => props.$openssublevelhoverColors && props.$hoverColors[0] && props.$hoverColors[1] && css`
40
- &&:hover {
41
- ${props => props.theme.themeProp('color', props.hoverColors[0], props.hoverColors[1])}
42
- }
43
- `}
44
-
45
- ${props => props.$hoverBackgroundColors && props.$hoverBackgroundColors[0] && props.$hoverBackgroundColors[1] && css`
46
- &&:hover {
47
- ${props => props.theme.themeProp('background-color', props.$hoverBackgroundColors[0], props.$hoverBackgroundColors[1])}
48
- }
49
- `}
50
- `;
9
+ }).attrs(applyDefaultTheme).withConfig({
10
+ displayName: "ContextMenuItemstyled__ContextMenuItem",
11
+ componentId: "sc-8s6zvg-0"
12
+ })(["align-items:center;cursor:pointer;display:flex;font-family:", ";font-size:0.875rem;font-weight:normal;height:31px;min-width:160px;padding:", ";", " ", " ", " :last-of-type{height:32px;}&:hover{cursor:pointer;", "}", " ", ""], props => props.theme.primaryFontFamily, props => props.$openssublevel ? '0 8px' : '0 28px 0 8px', props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-700')), props => props.theme.themeProp('background-color', props.theme.getColor('gray-700'), '#FEFEFE'), props => !props.$icon && css(["padding-left:28px;"]), props => props.theme.themeProp('background-color', props.theme.getColor('gray-600'), props.theme.getColor('gray-200')), props => props.$hoverColors && props.$hoverColors[0] && props.$hoverColors[1] && css(["&&:hover{", "}"], props => props.theme.themeProp('color', props.$hoverColors[0], props.$hoverColors[1])), props => props.$hoverBackgroundColors && props.$hoverBackgroundColors[0] && props.$hoverBackgroundColors[1] && css(["&&:hover{", "}"], props => props.theme.themeProp('background-color', props.$hoverBackgroundColors[0], props.$hoverBackgroundColors[1])));
51
13
  const IconContainer = styled.span.withConfig({
52
14
  shouldForwardProp
53
- }).attrs(applyDefaultTheme)`
54
- align-items: center;
55
- display: flex;
56
- height: fit-content;
57
- max-width: 12px;
58
- margin-right: 8px;
59
-
60
- svg {
61
- height: 12px;
62
- }
63
- `;
15
+ }).attrs(applyDefaultTheme).withConfig({
16
+ displayName: "ContextMenuItemstyled__IconContainer",
17
+ componentId: "sc-8s6zvg-1"
18
+ })(["align-items:center;display:flex;height:fit-content;max-width:12px;margin-right:8px;svg{height:12px;}"]);
64
19
  const SublevelIconContainer = styled.span.withConfig({
65
20
  shouldForwardProp
66
- }).attrs(applyDefaultTheme)`
67
- align-items: center;
68
- display: flex;
69
- height: fit-content;
70
- max-width: 12px;
71
- margin-left: auto;
72
- margin-right: 8px;
73
- padding-left: 24px;
74
-
75
- svg {
76
- height: 6px;
77
- width: 6px;
78
- }
79
- `;
80
- const Label = styled.span`
81
- align-items: center;
82
- display: flex;
83
- `;
21
+ }).attrs(applyDefaultTheme).withConfig({
22
+ displayName: "ContextMenuItemstyled__SublevelIconContainer",
23
+ componentId: "sc-8s6zvg-2"
24
+ })(["align-items:center;display:flex;height:fit-content;max-width:12px;margin-left:auto;margin-right:8px;padding-left:24px;svg{height:6px;width:6px;}"]);
25
+ const Label = styled.span.withConfig({
26
+ displayName: "ContextMenuItemstyled__Label",
27
+ componentId: "sc-8s6zvg-3"
28
+ })(["align-items:center;display:flex;"]);
84
29
 
85
30
  export { ContextMenuItem, IconContainer, Label, SublevelIconContainer };
86
31
  //# sourceMappingURL=ContextMenuItem.styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuItem.styled.js","sources":["../../../../src/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../../utils/defaultTheme';\n\nconst shouldForwardProp = prop => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const ContextMenuItem = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-items: center;\n cursor: pointer;\n display: flex;\n font-family: ${props => props.theme.primaryFontFamily};\n font-size: 0.875rem;\n font-weight: normal;\n height: 31px;\n min-width: 160px;\n padding: ${props => (props.$openssublevel ? '0 8px' : '0 28px 0 8px')};\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-700')\n )}\n\n ${props => props.theme.themeProp('background-color', props.theme.getColor('gray-700'), '#FEFEFE')}\n\n ${props =>\n !props.$icon &&\n css`\n padding-left: 28px;\n `}\n\n\n :last-of-type {\n height: 32px;\n }\n\n &:hover {\n cursor: pointer;\n\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-600'),\n props.theme.getColor('gray-200')\n )}\n }\n\n ${props =>\n props.$openssublevelhoverColors &&\n props.$hoverColors[0] &&\n props.$hoverColors[1] &&\n css`\n &&:hover {\n ${props => props.theme.themeProp('color', props.hoverColors[0], props.hoverColors[1])}\n }\n `}\n\n ${props =>\n props.$hoverBackgroundColors &&\n props.$hoverBackgroundColors[0] &&\n props.$hoverBackgroundColors[1] &&\n css`\n &&:hover {\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.$hoverBackgroundColors[0],\n props.$hoverBackgroundColors[1]\n )}\n }\n `}\n`;\n\nexport const IconContainer = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-items: center;\n display: flex;\n height: fit-content;\n max-width: 12px;\n margin-right: 8px;\n\n svg {\n height: 12px;\n }\n`;\n\nexport const SublevelIconContainer = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-items: center;\n display: flex;\n height: fit-content;\n max-width: 12px;\n margin-left: auto;\n margin-right: 8px;\n padding-left: 24px;\n\n svg {\n height: 6px;\n width: 6px;\n }\n`;\n\nexport const Label = styled.span`\n align-items: center;\n display: flex;\n`;\n"],"names":["shouldForwardProp","prop","startsWith","ContextMenuItem","styled","span","withConfig","attrs","applyDefaultTheme","props","theme","primaryFontFamily","$openssublevel","themeProp","getColor","$icon","css","$openssublevelhoverColors","$hoverColors","hoverColors","$hoverBackgroundColors","IconContainer","SublevelIconContainer","Label"],"mappings":";;;AAGA,MAAMA,iBAAiB,GAAGC,IAAI,IAAI;EAChC,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,CAAA;AAClD,CAAC,CAAA;AAEM,MAAMC,eAAe,GAAGC,MAAM,CAACC,IAAI,CACvCC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA;AACA,eAAA,EAAiBC,KAAK,IAAIA,KAAK,CAACC,KAAK,CAACC,iBAAiB,CAAA;AACvD;AACA;AACA;AACA;AACA,WAAaF,EAAAA,KAAK,IAAKA,KAAK,CAACG,cAAc,GAAG,OAAO,GAAG,cAAe,CAAA;AACvE;AACA,EAAIH,EAAAA,KAAK,IACLA,KAAK,CAACC,KAAK,CAACG,SAAS,CACnB,OAAO,EACPJ,KAAK,CAACC,KAAK,CAACI,QAAQ,CAAC,UAAU,CAAC,EAChCL,KAAK,CAACC,KAAK,CAACI,QAAQ,CAAC,UAAU,CACjC,CAAC,CAAA;AACL;AACA,EAAIL,EAAAA,KAAK,IAAIA,KAAK,CAACC,KAAK,CAACG,SAAS,CAAC,kBAAkB,EAAEJ,KAAK,CAACC,KAAK,CAACI,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC,CAAA;AACnG;AACA,EAAA,EAAIL,KAAK,IAC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AA;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AAEM,MAAMc,qBAAqB,GAAGlB,MAAM,CAACC,IAAI,CAC7CC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AAEYe,MAAAA,KAAK,GAAGnB,MAAM,CAACC,IAAI,CAAA;AAChC;AACA;AACA;;;;"}
1
+ {"version":3,"file":"ContextMenuItem.styled.js","sources":["../../../../src/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.ts"],"sourcesContent":["/*\n * $-transient-prop pattern: rules in\n * `src/components/layout/SectionSeparator/SectionSeparator.styled.ts`, derivation and\n * measurements in `scripts/TS-MIGRATION-PLAYBOOK.md` §J.\n *\n * The two stacked defects this file used to carry in its first `&&:hover` block are FIXED,\n * together, because fixing either alone throws: the guard read the run-together\n * `$openssublevelhoverColors` and the rule inside it read `props.hoverColors` with no `$`.\n * Both now read `$hoverColors`, and the guard tests the array's presence before indexing\n * it, exactly like the `$hoverBackgroundColors` block below. That activates a rule that has\n * never been emitted, so it moves the render baseline (§E.3/§J.8); the re-record is a\n * separate, reviewed commit.\n */\nimport styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../../utils/defaultTheme';\n\nimport type { ReactElement } from 'react';\n\n/**\n * `ContextMenuItem`'s props, i.e. what `ContextMenuItem.tsx` passes to\n * `<S.ContextMenuItem>`: `$icon`, `$hoverColors`, `$hoverBackgroundColors` and\n * `$openssublevel`. Value types from that file's propTypes; all optional per §J.5.\n */\nexport interface ContextMenuItemStyleProps {\n /** `icon` — `PropTypes.element`, so a React element and not a `ReactNode`. Read only\n * as `!props.$icon`, i.e. for presence. */\n $icon?: ReactElement<any>;\n /** `opensSublevel` — `PropTypes.bool`. Selects the right-hand padding, since a\n * sublevel item has its own chevron in that space. Lower-case by existing convention\n * at both ends; renaming it would be a two-file change for no type benefit. */\n $openssublevel?: boolean;\n /** `hoverColors` — `PropTypes.arrayOf(PropTypes.string)`, documented as exactly\n * `[darkModeColor, lightModeColor]` hex strings. `string[]` and not\n * `[string, string]`: the propTypes say an array of any length, which is why the\n * template guards the array's presence and then `[0]` and `[1]` individually. */\n $hoverColors?: string[];\n /** `hoverBackgroundColors` — same shape as `$hoverColors`. */\n $hoverBackgroundColors?: string[];\n}\n\n/*\n * Single-argument, and it stays that way — peer floor `styled-components: >=5.1.0`, and\n * the two majors disagree on the second parameter. §J.4. `prop` needs the annotation\n * because `withConfig` takes this by reference, so it gets no contextual typing.\n */\nconst shouldForwardProp = (prop: string): boolean => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const ContextMenuItem = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs<ContextMenuItemStyleProps>(applyDefaultTheme)`\n align-items: center;\n cursor: pointer;\n display: flex;\n font-family: ${props => props.theme.primaryFontFamily};\n font-size: 0.875rem;\n font-weight: normal;\n height: 31px;\n min-width: 160px;\n padding: ${props => (props.$openssublevel ? '0 8px' : '0 28px 0 8px')};\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-700')\n )}\n\n ${props => props.theme.themeProp('background-color', props.theme.getColor('gray-700'), '#FEFEFE')}\n\n ${props =>\n !props.$icon &&\n css`\n padding-left: 28px;\n `}\n\n\n :last-of-type {\n height: 32px;\n }\n\n &:hover {\n cursor: pointer;\n\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-600'),\n props.theme.getColor('gray-200')\n )}\n }\n\n ${props =>\n props.$hoverColors &&\n props.$hoverColors[0] &&\n props.$hoverColors[1] &&\n css<Pick<ContextMenuItemStyleProps, '$hoverColors'>>`\n &&:hover {\n ${props => props.theme.themeProp('color', props.$hoverColors[0], props.$hoverColors[1])}\n }\n `}\n\n ${props =>\n props.$hoverBackgroundColors &&\n props.$hoverBackgroundColors[0] &&\n props.$hoverBackgroundColors[1] &&\n css<Pick<ContextMenuItemStyleProps, '$hoverBackgroundColors'>>`\n &&:hover {\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.$hoverBackgroundColors[0],\n props.$hoverBackgroundColors[1]\n )}\n }\n `}\n`;\n\nexport const IconContainer = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-items: center;\n display: flex;\n height: fit-content;\n max-width: 12px;\n margin-right: 8px;\n\n svg {\n height: 12px;\n }\n`;\n\nexport const SublevelIconContainer = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-items: center;\n display: flex;\n height: fit-content;\n max-width: 12px;\n margin-left: auto;\n margin-right: 8px;\n padding-left: 24px;\n\n svg {\n height: 6px;\n width: 6px;\n }\n`;\n\nexport const Label = styled.span`\n align-items: center;\n display: flex;\n`;\n"],"names":["shouldForwardProp","prop","startsWith","ContextMenuItem","styled","span","withConfig","attrs","applyDefaultTheme","displayName","componentId","props","theme","primaryFontFamily","$openssublevel","themeProp","getColor","$icon","css","$hoverColors","$hoverBackgroundColors","IconContainer","SublevelIconContainer","Label"],"mappings":";;;AA6CA,MAAMA,iBAAiB,GAAIC,IAAY,IAAc;EACnD,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC;AAClD,CAAC;AAEM,MAAMC,eAAe,GAAGC,MAAM,CAACC,IAAI,CACvCC,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAA4BC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,wCAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,6DAAA,EAAA,6EAAA,EAAA,GAAA,EAAA,GAAA,EAAA,GAAA,EAAA,qDAAA,EAAA,GAAA,EAAA,GAAA,EAAA,EAAA,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AAA,CAAA,EAEGP,KAAK,IACLA,KAAK,CAACC,KAAK,CAACG,SAAS,CACnB,kBAAkB,EAClBJ,KAAK,CAACS,sBAAsB,CAAC,CAAC,CAAC,EAC/BT,KAAK,CAACS,sBAAsB,CAAC,CAAC,CAChC,CAAC,CAEN;AAGE,MAAMC,aAAa,GAAGjB,MAAM,CAACC,IAAI,CACrCC,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,sCAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,sGAAA,CAAA;AAYpB,MAAMY,qBAAqB,GAAGlB,MAAM,CAACC,IAAI,CAC7CC,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,8CAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,kJAAA,CAAA;MAeda,KAAK,GAAGnB,MAAM,CAACC,IAAI,CAAAC,UAAA,CAAA;EAAAG,WAAA,EAAA,8BAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,kCAAA,CAAA;;;;"}
@@ -1,22 +1,18 @@
1
- import { extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import React__default from 'react';
3
- import PropTypes from 'prop-types';
4
2
  import { ContextMenuItemsGroup as ContextMenuItemsGroup$1 } from './ContextMenuItemsGroup.styled.js';
3
+ import { jsx } from 'react/jsx-runtime';
5
4
 
6
5
  const ContextMenuItemsGroup = React__default.forwardRef(function ContextMenuItemsGroup({
7
6
  children,
8
7
  ...props
9
8
  }, forwardedRef) {
10
- return React__default.createElement(ContextMenuItemsGroup$1, _extends({
11
- ref: forwardedRef
12
- }, props, {
13
- role: "group"
14
- }), children);
9
+ return jsx(ContextMenuItemsGroup$1, {
10
+ ref: forwardedRef,
11
+ ...props,
12
+ role: "group",
13
+ children: children
14
+ });
15
15
  });
16
- ContextMenuItemsGroup.propTypes = process.env.NODE_ENV !== "production" ? {
17
- children: PropTypes.arrayOf(PropTypes.node)
18
- } : {};
19
- ContextMenuItemsGroup.defaultProps = {};
20
16
 
21
17
  export { ContextMenuItemsGroup as default };
22
18
  //# sourceMappingURL=ContextMenuItemsGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuItemsGroup.js","sources":["../../../../src/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport * as S from './ContextMenuItemsGroup.styled';\n\n/**\n * Simple wrapper for a group of context menu items. These will be displayed without a border between each item.\n *\n * See the documentation for `ContextMenu` for an example.\n *\n * ### Import\n *\n * ``` js\n * import { ContextMenuItemsGroup } from '@ntbjs/react-components/widgets/ContextMenu'\n * // or\n * import ContextMenuItemsGroup from '@ntbjs/react-components/widgets/ContextMenu/ContextMenuItemsGroup'\n * ```\n *\n */\nconst ContextMenuItemsGroup = React.forwardRef(function ContextMenuItemsGroup(\n { children, ...props },\n forwardedRef\n) {\n return (\n <S.ContextMenuItemsGroup ref={forwardedRef} {...props} role=\"group\">\n {children}\n </S.ContextMenuItemsGroup>\n );\n});\n\nContextMenuItemsGroup.propTypes = {\n /**\n * An array containing nodes of the `ContextMenuItem` component\n */\n children: PropTypes.arrayOf(PropTypes.node)\n};\n\nContextMenuItemsGroup.defaultProps = {};\n\nexport default ContextMenuItemsGroup;\n"],"names":["ContextMenuItemsGroup","React","forwardRef","children","props","forwardedRef","createElement","S","_extends","ref","role","propTypes","process","env","NODE_ENV","PropTypes","arrayOf","node","defaultProps"],"mappings":";;;;;AAkBMA,MAAAA,qBAAqB,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,qBAAqBA,CAC3E;EAAEG,QAAQ;EAAE,GAAGC,KAAAA;AAAM,CAAC,EACtBC,YAAY,EACZ;EACA,OACEJ,cAAA,CAAAK,aAAA,CAACC,uBAAuB,EAAAC,QAAA,CAAA;AAACC,IAAAA,GAAG,EAAEJ,YAAAA;AAAa,GAAA,EAAKD,KAAK,EAAA;AAAEM,IAAAA,IAAI,EAAC,OAAA;AAAO,GAAA,CAAA,EAChEP,QACsB,CAAC,CAAA;AAE9B,CAAC,EAAC;AAEFH,qBAAqB,CAACW,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,KAAG,YAAA,GAAA;AAIhCX,EAAAA,QAAQ,EAAEY,SAAS,CAACC,OAAO,CAACD,SAAS,CAACE,IAAI,CAAA;AAC5C,CAAC,GAAA,EAAA,CAAA;AAEDjB,qBAAqB,CAACkB,YAAY,GAAG,EAAE;;;;"}
1
+ {"version":3,"file":"ContextMenuItemsGroup.js","sources":["../../../../src/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.tsx"],"sourcesContent":["import React from 'react';\nimport * as S from './ContextMenuItemsGroup.styled';\n\ntype ContextMenuItemsGroupOwnProps = {\n /**\n * Nodes of the `ContextMenuItem` component — one, or an array.\n *\n * DEFECT FIXED, NOT TRANSCRIBED. The propTypes said\n * `children: PropTypes.arrayOf(PropTypes.node)`, and the codemod faithfully rendered\n * that as `React.ReactNode[]` — which REJECTS A SINGLE JSX CHILD, because React does not\n * wrap one child in an array:\n *\n * <ContextMenuItemsGroup><ContextMenuItem title=\"Edit\" /></ContextMenuItemsGroup>\n *\n * gives `children` as one element. On React 16 this was a dev-time propTypes warning\n * only, which is how it survived — the React 16 gate is what surfaced it. Under the\n * generated closed type it became a hard COMPILE error at every such call site, in the\n * consumer as well as here, so faithfully reproducing the propTypes would have shipped a\n * type that forbids the component's most obvious usage.\n *\n * `React.ReactNode` is the accurate type and it still admits the array form, since\n * `ReactNode` includes `Iterable<ReactNode>`. The component only forwards `children` to\n * `S.ContextMenuItemsGroup`, so nothing here depends on it being an array. Zero runtime\n * change: the propTypes this replaces were already deleted by the codemod.\n */\n children?: React.ReactNode;\n};\n\n/*\n * NMB-3998 §C.2: `props` is spread onto `S.ContextMenuItemsGroup`, so the published type\n * has to admit that target's props too — a closed type here is worse than `any` for the\n * 125 consumer files. Declared members win over the base (`Omit` by `keyof ContextMenuItemsGroupOwnProps`);\n * a bare `&` would INTERSECT a colliding member instead of overriding it, which narrows\n * it (measured: `rows?: number | string` & `rows?: number`) or empties it to `never`.\n */\ntype Props = Omit<\n React.ComponentPropsWithoutRef<typeof S.ContextMenuItemsGroup>,\n keyof ContextMenuItemsGroupOwnProps\n> &\n ContextMenuItemsGroupOwnProps;\n\n/**\n * Simple wrapper for a group of context menu items. These will be displayed without a border between each item.\n *\n * See the documentation for `ContextMenu` for an example.\n *\n * ### Import\n *\n * ``` js\n * import { ContextMenuItemsGroup } from '@ntbjs/react-components/widgets/ContextMenu'\n * // or\n * import ContextMenuItemsGroup from '@ntbjs/react-components/widgets/ContextMenu/ContextMenuItemsGroup'\n * ```\n *\n */\nconst ContextMenuItemsGroup = React.forwardRef<any, Props>(function ContextMenuItemsGroup(\n { children, ...props },\n forwardedRef\n) {\n return (\n <S.ContextMenuItemsGroup ref={forwardedRef} {...props} role=\"group\">\n {children}\n </S.ContextMenuItemsGroup>\n );\n});\n\nexport default ContextMenuItemsGroup;\n"],"names":["ContextMenuItemsGroup","React","forwardRef","children","props","forwardedRef","_jsx","S","ref","role"],"mappings":";;;;AAuDA,MAAMA,qBAAqB,GAAGC,cAAK,CAACC,UAAU,CAAa,SAASF,qBAAqBA,CACvF;EAAEG,QAAQ;EAAE,GAAGC;AAAM,CAAC,EACtBC,YAAY,EACZ;AACA,EAAA,OACEC,GAAA,CAACC,uBAAuB,EAAA;AAACC,IAAAA,GAAG,EAAEH,YAAa;AAAA,IAAA,GAAKD,KAAK;AAAEK,IAAAA,IAAI,EAAC,OAAO;AAAAN,IAAAA,QAAA,EAChEA;AAAQ,GACc,CAAC;AAE9B,CAAC;;;;"}
@@ -6,17 +6,10 @@ const shouldForwardProp = prop => {
6
6
  };
7
7
  const ContextMenuItemsGroup = styled.div.withConfig({
8
8
  shouldForwardProp
9
- }).attrs(applyDefaultTheme)`
10
-
11
-
12
- > * {
13
- border-bottom: none !important;
14
- }
15
-
16
- > *:not(:last-child) {
17
- height: 32px;
18
- }
19
- `;
9
+ }).attrs(applyDefaultTheme).withConfig({
10
+ displayName: "ContextMenuItemsGroupstyled__ContextMenuItemsGroup",
11
+ componentId: "sc-ot5edl-0"
12
+ })(["> *{border-bottom:none !important;}> *:not(:last-child){height:32px;}"]);
20
13
 
21
14
  export { ContextMenuItemsGroup };
22
15
  //# sourceMappingURL=ContextMenuItemsGroup.styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuItemsGroup.styled.js","sources":["../../../../src/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js"],"sourcesContent":["import styled from 'styled-components';\nimport { applyDefaultTheme } from '../../../../utils/defaultTheme';\n\nconst shouldForwardProp = prop => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const ContextMenuItemsGroup = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n\n\n > * {\n border-bottom: none !important;\n }\n\n > *:not(:last-child) {\n height: 32px;\n }\n`;\n"],"names":["shouldForwardProp","prop","startsWith","ContextMenuItemsGroup","styled","div","withConfig","attrs","applyDefaultTheme"],"mappings":";;;AAGA,MAAMA,iBAAiB,GAAGC,IAAI,IAAI;EAChC,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,CAAA;AAClD,CAAC,CAAA;AAEM,MAAMC,qBAAqB,GAAGC,MAAM,CAACC,GAAG,CAC5CC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"ContextMenuItemsGroup.styled.js","sources":["../../../../src/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.ts"],"sourcesContent":["/*\n * $-transient-prop pattern: rules in\n * `src/components/layout/SectionSeparator/SectionSeparator.styled.ts`, derivation and\n * measurements in `scripts/TS-MIGRATION-PLAYBOOK.md` §J.\n *\n * NO COMPONENT IN THIS FILE READS A PROP, so there is no transient-prop type to declare —\n * rule 2, declare only what is actually passed and read. It reported ZERO errors before\n * this commit, and the one thing left to do is the predicate below.\n */\nimport styled from 'styled-components';\nimport { applyDefaultTheme } from '../../../../utils/defaultTheme';\n\n/*\n * Single-argument, and it stays that way — peer floor `styled-components: >=5.1.0`, and\n * the two majors disagree on the second parameter (v6 `elementToBeCreated`, v5.1\n * `defaultValidatorFn`). A one-parameter function is assignable to both. §J.4.\n *\n * `prop` NEEDS THE ANNOTATION EVEN THOUGH ITS ABSENCE REPORTED NO ERROR. `withConfig`\n * receives this by reference, so it gets no contextual typing and `prop` was an implicit\n * `any` — silent, because `noImplicitAny` is off (+474 errors, see `tsconfig.json`). With\n * `any` there, `prop.startsWith` is unchecked: a typo in the method name would have been a\n * runtime TypeError in the prop filter of every component in the file. A file at zero\n * errors is not the same as a file that is checked.\n */\nconst shouldForwardProp = (prop: string): boolean => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const ContextMenuItemsGroup = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n\n\n > * {\n border-bottom: none !important;\n }\n\n > *:not(:last-child) {\n height: 32px;\n }\n`;\n"],"names":["shouldForwardProp","prop","startsWith","ContextMenuItemsGroup","styled","div","withConfig","attrs","applyDefaultTheme","displayName","componentId"],"mappings":";;;AAwBA,MAAMA,iBAAiB,GAAIC,IAAY,IAAc;EACnD,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC;AAClD,CAAC;AAEM,MAAMC,qBAAqB,GAAGC,MAAM,CAACC,GAAG,CAC5CC,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,oDAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,uEAAA,CAAA;;;;"}
@@ -1,7 +1,6 @@
1
- import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import React__default, { useState } from 'react';
3
- import PropTypes from 'prop-types';
4
2
  import { Container, MetricsContainer, IconTotalContainer, IconContainer, Total, Label, Link, ButtonLink, StyledArrowIcon } from './InfoCard.styled.js';
3
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
4
 
6
5
  const InfoCard = React__default.forwardRef(function InfoCard({
7
6
  icon,
@@ -14,27 +13,33 @@ const InfoCard = React__default.forwardRef(function InfoCard({
14
13
  }, forwardedRef) {
15
14
  const [isLinkHovered, setIsLinkHovered] = useState(false);
16
15
  const handleLinkClick = e => onClick(e);
17
- return React__default.createElement(Container, _extends({
16
+ return jsxs(Container, {
18
17
  height: height,
19
- ref: forwardedRef
20
- }, props), React__default.createElement(MetricsContainer, null, React__default.createElement(IconTotalContainer, null, React__default.createElement(IconContainer, null, icon), React__default.createElement(Total, null, total)), React__default.createElement(Label, null, label)), linkLabel && onClick && React__default.createElement(Link, {
21
- onClick: handleLinkClick,
22
- onMouseEnter: () => setIsLinkHovered(true),
23
- onMouseLeave: () => setIsLinkHovered(false)
24
- }, React__default.createElement(ButtonLink, {
25
- $isHovered: isLinkHovered
26
- }, linkLabel), React__default.createElement(StyledArrowIcon, {
27
- $isHovered: isLinkHovered
28
- })));
18
+ ref: forwardedRef,
19
+ ...props,
20
+ children: [jsxs(MetricsContainer, {
21
+ children: [jsxs(IconTotalContainer, {
22
+ children: [jsx(IconContainer, {
23
+ children: icon
24
+ }), jsx(Total, {
25
+ children: total
26
+ })]
27
+ }), jsx(Label, {
28
+ children: label
29
+ })]
30
+ }), linkLabel && onClick && jsxs(Link, {
31
+ onClick: handleLinkClick,
32
+ onMouseEnter: () => setIsLinkHovered(true),
33
+ onMouseLeave: () => setIsLinkHovered(false),
34
+ children: [jsx(ButtonLink, {
35
+ $isHovered: isLinkHovered,
36
+ children: linkLabel
37
+ }), jsx(StyledArrowIcon, {
38
+ $isHovered: isLinkHovered
39
+ })]
40
+ })]
41
+ });
29
42
  });
30
- InfoCard.propTypes = process.env.NODE_ENV !== "production" ? {
31
- icon: PropTypes.element.isRequired,
32
- total: PropTypes.number.isRequired,
33
- label: PropTypes.string.isRequired,
34
- linkLabel: PropTypes.string,
35
- onClick: PropTypes.func,
36
- height: PropTypes.number
37
- } : {};
38
43
 
39
44
  export { InfoCard as default };
40
45
  //# sourceMappingURL=InfoCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InfoCard.js","sources":["../../../src/components/widgets/InfoCard/InfoCard.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport * as S from './InfoCard.styled';\n\n/**\n * Info Card\n *\n * ### Import\n *\n * ``` js\n * import { InfoCard } from '@ntbjs/react-components/widgets'\n * // or\n * import InfoCard from '@ntbjs/react-components/widgets/InfoCard'\n * ```\n *\n * ### Props\n * ```\n * Pass `icon={<svg></svg>}` to display an icon.\n * Pass `total={100}` to display number.\n * Pass `label={\"this is a label\"}` to display a label.\n * Pass `linkLabel={\"this is a label\"}` to display a link next to the arrow icon.\n * Pass `height={50}` to adjust the card´s height.\n * Pass `onClick={function}` to handle click event.\n * ```\n */\n\nconst InfoCard = React.forwardRef(function InfoCard(\n { icon, total, label, linkLabel, onClick, height, ...props },\n forwardedRef\n) {\n const [isLinkHovered, setIsLinkHovered] = useState(false);\n\n const handleLinkClick = e => onClick(e);\n\n return (\n <S.Container height={height} ref={forwardedRef} {...props}>\n <S.MetricsContainer>\n <S.IconTotalContainer>\n <S.IconContainer>{icon}</S.IconContainer>\n <S.Total>{total}</S.Total>\n </S.IconTotalContainer>\n <S.Label>{label}</S.Label>\n </S.MetricsContainer>\n {linkLabel && onClick && (\n <S.Link\n onClick={handleLinkClick}\n onMouseEnter={() => setIsLinkHovered(true)}\n onMouseLeave={() => setIsLinkHovered(false)}\n >\n <S.ButtonLink $isHovered={isLinkHovered}>{linkLabel}</S.ButtonLink>\n <S.StyledArrowIcon $isHovered={isLinkHovered} />\n </S.Link>\n )}\n </S.Container>\n );\n});\n\nInfoCard.propTypes = {\n icon: PropTypes.element.isRequired,\n total: PropTypes.number.isRequired,\n label: PropTypes.string.isRequired,\n linkLabel: PropTypes.string,\n onClick: PropTypes.func,\n height: PropTypes.number\n};\n\nexport default InfoCard;\n"],"names":["InfoCard","React","forwardRef","icon","total","label","linkLabel","onClick","height","props","forwardedRef","isLinkHovered","setIsLinkHovered","useState","handleLinkClick","e","createElement","S","_extends","ref","onMouseEnter","onMouseLeave","$isHovered","propTypes","process","env","NODE_ENV","PropTypes","element","isRequired","number","string","func"],"mappings":";;;;;AA0BMA,MAAAA,QAAQ,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,QAAQA,CACjD;EAAEG,IAAI;EAAEC,KAAK;EAAEC,KAAK;EAAEC,SAAS;EAAEC,OAAO;EAAEC,MAAM;EAAE,GAAGC,KAAAA;AAAM,CAAC,EAC5DC,YAAY,EACZ;EACA,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAEzD,EAAA,MAAMC,eAAe,GAAGC,CAAC,IAAIR,OAAO,CAACQ,CAAC,CAAC,CAAA;EAEvC,OACEd,cAAA,CAAAe,aAAA,CAACC,SAAW,EAAAC,QAAA,CAAA;AAACV,IAAAA,MAAM,EAAEA,MAAO;AAACW,IAAAA,GAAG,EAAET,YAAAA;AAAa,GAAA,EAAKD,KAAK,CAAA,EACvDR,cAAA,CAAAe,aAAA,CAACC,gBAAkB,EAAA,IAAA,EACjBhB,cAAA,CAAAe,a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import React, { useState } from 'react';\nimport * as S from './InfoCard.styled';\n\ntype InfoCardOwnProps = {\n icon: React.ReactElement<any>;\n total: number;\n label: string;\n linkLabel?: string;\n onClick?: (...args: any[]) => any;\n height?: number;\n};\n\n/*\n * NMB-3998 §C.2: `props` is spread onto `S.Container`, so the published type\n * has to admit that target's props too — a closed type here is worse than `any` for the\n * 125 consumer files. Declared members win over the base (`Omit` by `keyof InfoCardOwnProps`);\n * a bare `&` would INTERSECT a colliding member instead of overriding it, which narrows\n * it (measured: `rows?: number | string` & `rows?: number`) or empties it to `never`.\n */\ntype Props = Omit<React.ComponentPropsWithoutRef<typeof S.Container>, keyof InfoCardOwnProps> &\n InfoCardOwnProps;\n\n/**\n * Info Card\n *\n * ### Import\n *\n * ``` js\n * import { InfoCard } from '@ntbjs/react-components/widgets'\n * // or\n * import InfoCard from '@ntbjs/react-components/widgets/InfoCard'\n * ```\n *\n * ### Props\n * ```\n * Pass `icon={<svg></svg>}` to display an icon.\n * Pass `total={100}` to display number.\n * Pass `label={\"this is a label\"}` to display a label.\n * Pass `linkLabel={\"this is a label\"}` to display a link next to the arrow icon.\n * Pass `height={50}` to adjust the card´s height.\n * Pass `onClick={function}` to handle click event.\n * ```\n */\n\nconst InfoCard = React.forwardRef<any, Props>(function InfoCard(\n { icon, total, label, linkLabel, onClick, height, ...props },\n forwardedRef\n) {\n const [isLinkHovered, setIsLinkHovered] = useState(false);\n\n const handleLinkClick = e => onClick(e);\n\n return (\n <S.Container height={height} ref={forwardedRef} {...props}>\n <S.MetricsContainer>\n <S.IconTotalContainer>\n <S.IconContainer>{icon}</S.IconContainer>\n <S.Total>{total}</S.Total>\n </S.IconTotalContainer>\n <S.Label>{label}</S.Label>\n </S.MetricsContainer>\n {linkLabel && onClick && (\n <S.Link\n onClick={handleLinkClick}\n onMouseEnter={() => setIsLinkHovered(true)}\n onMouseLeave={() => setIsLinkHovered(false)}\n >\n <S.ButtonLink $isHovered={isLinkHovered}>{linkLabel}</S.ButtonLink>\n <S.StyledArrowIcon $isHovered={isLinkHovered} />\n </S.Link>\n )}\n </S.Container>\n );\n});\n\nexport default InfoCard;\n"],"names":["InfoCard","React","forwardRef","icon","total","label","linkLabel","onClick","height","props","forwardedRef","isLinkHovered","setIsLinkHovered","useState","handleLinkClick","e","_jsxs","S","ref","children","_jsx","onMouseEnter","onMouseLeave","$isHovered"],"mappings":";;;;AA4CA,MAAMA,QAAQ,GAAGC,cAAK,CAACC,UAAU,CAAa,SAASF,QAAQA,CAC7D;EAAEG,IAAI;EAAEC,KAAK;EAAEC,KAAK;EAAEC,SAAS;EAAEC,OAAO;EAAEC,MAAM;EAAE,GAAGC;AAAM,CAAC,EAC5DC,YAAY,EACZ;EACA,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGC,QAAQ,CAAC,KAAK,CAAC;AAEzD,EAAA,MAAMC,eAAe,GAAGC,CAAC,IAAIR,OAAO,CAACQ,CAAC,CAAC;AAEvC,EAAA,OACEC,IAAA,CAACC,SAAW,EAAA;AAACT,IAAAA,MAAM,EAAEA,MAAO;AAACU,IAAAA,GAAG,EAAER,YAAa;AAAA,IAAA,GAAKD,KAAK;AAAAU,IAAAA,QAAA,EAAA,CACvDH,IAAA,CAACC,gBAAkB,EAAA;AAAAE,MAAAA,QAAA,EAAA,CACjBH,IAAA,CAACC,kBAAoB,EAAA;AAAAE,QAAAA,QAAA,EAAA,CACnBC,GAAA,CAACH,aAAe,EAAA;AAAAE,UAAAA,QAAA,EAAEhB;AAAI,SAAkB,CAAC,EACzCiB,GAAA,CAACH,KAAO,EAAA;AAAAE,UAAAA,QAAA,EAAEf;AAAK,SAAU,CAAC;AAAA,OACN,CAAC,EACvBgB,GAAA,CAACH,KAAO,EAAA;AAAAE,QAAAA,QAAA,EAAEd;AAAK,OAAU,CAAC;KACR,CAAC,EACpBC,SAAS,IAAIC,OAAO,IACnBS,IAAA,CAACC,IAAM,EAAA;AACLV,MAAAA,OAAO,EAAEO,eAAgB;AACzBO,MAAAA,YAAY,EAAEA,MAAMT,gBAAgB,CAAC,IAAI,CAAE;AAC3CU,MAAAA,YAAY,EAAEA,MAAMV,gBAAgB,CAAC,KAAK,CAAE;AAAAO,MAAAA,QAAA,EAAA,CAE5CC,GAAA,CAACH,UAAY,EAAA;AAACM,QAAAA,UAAU,EAAEZ,aAAc;AAAAQ,QAAAA,QAAA,EAAEb;AAAS,OAAe,CAAC,EACnEc,GAAA,CAACH,eAAiB,EAAA;AAACM,QAAAA,UAAU,EAAEZ;AAAc,OAAE,CAAC;AAAA,KAC1C,CACT;AAAA,GACU,CAAC;AAElB,CAAC;;;;"}
@@ -8,106 +8,58 @@ const shouldForwardProp = prop => {
8
8
  };
9
9
  const Container = styled.div.withConfig({
10
10
  shouldForwardProp
11
- }).attrs(applyDefaultTheme)`
12
- font-family: ${props => props.theme.primaryFontFamily};
13
- font-size: 1rem;
14
- font-weight: 500;
15
- ${props => props.theme.themeProp('background', props.theme.getColor('gray-800'), props.theme.getColor('gray-50'))};
16
- height: ${props => props.height ? `${props.height}px` : '50px'};
17
- border-radius: 3px;
18
- display: flex;
19
- flex-direction: row;
20
- align-items: center;
21
- padding: 5px 0;
22
- `;
11
+ }).attrs(applyDefaultTheme).withConfig({
12
+ displayName: "InfoCardstyled__Container",
13
+ componentId: "sc-gnifwb-0"
14
+ })(["font-family:", ";font-size:1rem;font-weight:500;", ";height:", ";border-radius:3px;display:flex;flex-direction:row;align-items:center;padding:5px 0;"], props => props.theme.primaryFontFamily, props => props.theme.themeProp('background', props.theme.getColor('gray-800'), props.theme.getColor('gray-50')), props => props.height ? `${props.height}px` : '50px');
23
15
  const MetricsContainer = styled.div.withConfig({
24
16
  shouldForwardProp
25
- }).attrs(applyDefaultTheme)`
26
- display: flex;
27
- flex-direction: column;
28
- justify-content: center;
29
- align-items: flex-start;
30
- width: 70%;
31
- gap: 5px;
32
- padding-left: 15px;
33
- `;
17
+ }).attrs(applyDefaultTheme).withConfig({
18
+ displayName: "InfoCardstyled__MetricsContainer",
19
+ componentId: "sc-gnifwb-1"
20
+ })(["display:flex;flex-direction:column;justify-content:center;align-items:flex-start;width:70%;gap:5px;padding-left:15px;"]);
34
21
  const IconTotalContainer = styled.div.withConfig({
35
22
  shouldForwardProp
36
- }).attrs(applyDefaultTheme)`
37
- display: flex;
38
- justify-content: center;
39
- align-items: center;
40
- gap: 10px;
41
- `;
23
+ }).attrs(applyDefaultTheme).withConfig({
24
+ displayName: "InfoCardstyled__IconTotalContainer",
25
+ componentId: "sc-gnifwb-2"
26
+ })(["display:flex;justify-content:center;align-items:center;gap:10px;"]);
42
27
  const Total = styled.div.withConfig({
43
28
  shouldForwardProp
44
- }).attrs(applyDefaultTheme)`
45
- font-size: 1.22rem;
46
- font-weight: 700;
47
- ${props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))};
48
- `;
29
+ }).attrs(applyDefaultTheme).withConfig({
30
+ displayName: "InfoCardstyled__Total",
31
+ componentId: "sc-gnifwb-3"
32
+ })(["font-size:1.22rem;font-weight:700;", ";"], props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900')));
49
33
  const Label = styled.div.withConfig({
50
34
  shouldForwardProp
51
- }).attrs(applyDefaultTheme)`
52
- font-size: 0.875rem;
53
- font-weight: 400;
54
- opacity: 0.8;
55
- ${props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-500'))};
56
- `;
35
+ }).attrs(applyDefaultTheme).withConfig({
36
+ displayName: "InfoCardstyled__Label",
37
+ componentId: "sc-gnifwb-4"
38
+ })(["font-size:0.875rem;font-weight:400;opacity:0.8;", ";"], props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-500')));
57
39
  const IconContainer = styled.div.withConfig({
58
40
  shouldForwardProp
59
- }).attrs(applyDefaultTheme)`
60
- display: flex;
61
- justify-content: center;
62
- align-items: center;
63
- width: 18px;
64
- margin-top: -0.05rem;
65
- `;
41
+ }).attrs(applyDefaultTheme).withConfig({
42
+ displayName: "InfoCardstyled__IconContainer",
43
+ componentId: "sc-gnifwb-5"
44
+ })(["display:flex;justify-content:center;align-items:center;width:18px;margin-top:-0.05rem;"]);
66
45
  const Link = styled.div.withConfig({
67
46
  shouldForwardProp
68
- }).attrs(applyDefaultTheme)`
69
- font-size: 0.875rem;
70
- font-weight: 400;
71
- width: 30%;
72
- opacity: 0.7;
73
- display: flex;
74
- align-items: center;
75
- justify-content: flex-end;
76
- margin-right: 20px;
77
- cursor: pointer;
78
- height: 100%;
79
- gap: 10px;
80
- svg {
81
- transition: transform 0.2s ease-in-out;
82
- }
83
- &:hover svg {
84
- transform: translateX(2px);
85
- }
86
- `;
47
+ }).attrs(applyDefaultTheme).withConfig({
48
+ displayName: "InfoCardstyled__Link",
49
+ componentId: "sc-gnifwb-6"
50
+ })(["font-size:0.875rem;font-weight:400;width:30%;opacity:0.7;display:flex;align-items:center;justify-content:flex-end;margin-right:20px;cursor:pointer;height:100%;gap:10px;svg{transition:transform 0.2s ease-in-out;}&:hover svg{transform:translateX(2px);}"]);
87
51
  const ButtonLink = styled.div.withConfig({
88
52
  shouldForwardProp
89
- }).attrs(applyDefaultTheme)`
90
- font-size: 0.875rem;
91
- font-weight: 500;
92
- height: 100%;
93
- display: flex;
94
- align-items: center;
95
- white-space: nowrap;
96
- opacity: ${props => props.$isHovered ? 1 : 0.8};
97
- transition: color 0.2s ease-in-out;
98
- ${props => props.$isHovered ? props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('black')) : props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))};
99
- `;
53
+ }).attrs(applyDefaultTheme).withConfig({
54
+ displayName: "InfoCardstyled__ButtonLink",
55
+ componentId: "sc-gnifwb-7"
56
+ })(["font-size:0.875rem;font-weight:500;height:100%;display:flex;align-items:center;white-space:nowrap;opacity:", ";transition:color 0.2s ease-in-out;", ";"], props => props.$isHovered ? 1 : 0.8, props => props.$isHovered ? props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('black')) : props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900')));
100
57
  const StyledArrowIcon = styled(SvgArrowForward).withConfig({
101
58
  shouldForwardProp
102
- }).attrs(applyDefaultTheme)`
103
- height: 15px;
104
- margin-right: 10px;
105
- opacity: ${props => props.$isHovered ? 1 : 0.8};
106
- transition: transform 0.2s ease-in-out, fill 0.2s ease-in-out;
107
- transform: ${props => props.$isHovered ? 'translateX(2px)' : 'translateX(0)'};
108
-
109
- ${props => props.$isHovered ? props.theme.themeProp('fill', props.theme.getColor('white'), props.theme.getColor('black')) : props.theme.themeProp('fill', props.theme.getColor('white'), props.theme.getColor('black'))};
110
- `;
59
+ }).attrs(applyDefaultTheme).withConfig({
60
+ displayName: "InfoCardstyled__StyledArrowIcon",
61
+ componentId: "sc-gnifwb-8"
62
+ })(["height:15px;margin-right:10px;opacity:", ";transition:transform 0.2s ease-in-out,fill 0.2s ease-in-out;transform:", ";", ";"], props => props.$isHovered ? 1 : 0.8, props => props.$isHovered ? 'translateX(2px)' : 'translateX(0)', props => props.$isHovered ? props.theme.themeProp('fill', props.theme.getColor('white'), props.theme.getColor('black')) : props.theme.themeProp('fill', props.theme.getColor('white'), props.theme.getColor('black')));
111
63
 
112
64
  export { ButtonLink, Container, IconContainer, IconTotalContainer, Label, Link, MetricsContainer, StyledArrowIcon, Total };
113
65
  //# sourceMappingURL=InfoCard.styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InfoCard.styled.js","sources":["../../../src/components/widgets/InfoCard/InfoCard.styled.js"],"sourcesContent":["import styled from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\nimport { ArrowForwardIcon } from '../../../icons';\n\nconst shouldForwardProp = prop => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const Container = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-family: ${props => props.theme.primaryFontFamily};\n font-size: 1rem;\n font-weight: 500;\n ${props =>\n props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-800'),\n props.theme.getColor('gray-50')\n )};\n height: ${props => (props.height ? `${props.height}px` : '50px')};\n border-radius: 3px;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 5px 0;\n`;\n\nexport const MetricsContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n width: 70%;\n gap: 5px;\n padding-left: 15px;\n`;\n\nexport const IconTotalContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 10px;\n`;\nexport const Total = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-size: 1.22rem;\n font-weight: 700;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )};\n`;\n\nexport const Label = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-size: 0.875rem;\n font-weight: 400;\n opacity: 0.8;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-500')\n )};\n`;\nexport const IconContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n justify-content: center;\n align-items: center;\n width: 18px;\n margin-top: -0.05rem;\n`;\n\nexport const Link = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-size: 0.875rem;\n font-weight: 400;\n width: 30%;\n opacity: 0.7;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-right: 20px;\n cursor: pointer;\n height: 100%;\n gap: 10px;\n svg {\n transition: transform 0.2s ease-in-out;\n }\n &:hover svg {\n transform: translateX(2px);\n }\n`;\n\nexport const ButtonLink = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-size: 0.875rem;\n font-weight: 500;\n height: 100%;\n display: flex;\n align-items: center;\n white-space: nowrap;\n opacity: ${props => (props.$isHovered ? 1 : 0.8)};\n transition: color 0.2s ease-in-out;\n ${props =>\n props.$isHovered\n ? props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('black'))\n : props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )};\n`;\n\nexport const StyledArrowIcon = styled(ArrowForwardIcon)\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n height: 15px;\n margin-right: 10px;\n opacity: ${props => (props.$isHovered ? 1 : 0.8)};\n transition: transform 0.2s ease-in-out, fill 0.2s ease-in-out;\n transform: ${props => (props.$isHovered ? 'translateX(2px)' : 'translateX(0)')};\n\n ${props =>\n props.$isHovered\n ? props.theme.themeProp('fill', props.theme.getColor('white'), props.theme.getColor('black'))\n : props.theme.themeProp(\n 'fill',\n props.theme.getColor('white'),\n props.theme.getColor('black')\n )};\n`;\n"],"names":["shouldForwardProp","prop","startsWith","Container","styled","div","withConfig","attrs","applyDefaultTheme","props","theme","primaryFontFamily","themeProp","getColor","height","MetricsContainer","IconTotalContainer","Total","Label","IconContainer","Link","ButtonLink","$isHovered","StyledArrowIcon","ArrowForwardIcon"],"mappings":";;;;;AAIA,MAAMA,iBAAiB,GAAGC,IAAI,IAAI;EAChC,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,CAAA;AAClD,CAAC,CAAA;AAEM,MAAMC,SAAS,GAAGC,MAAM,CAACC,GAAG,CAChCC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B,eAAA,EAAiBC,KAAK,IAAIA,KAAK,CAACC,KAAK,CAACC,iBAAiB,CAAA;AACvD;AACA;AACA,EAAIF,EAAAA,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,CAACG,QAAQ,CAAC,UAAU,CACjC,CAAC,CAAA;AACT,EAAC;AAEM,MAAMU,eAAe,GAAGnB,MAAM,CAACoB,eAAgB,CAAC,CACpDlB,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA,WAAaC,EAAAA,KAAK,IAAKA,KAAK,CAACa,UAAU,GAAG,CAAC,GAAG,GAAI,CAAA;AAClD;AACA,aAAeb,EAAAA,KAAK,IAAKA,KAAK,CAACa,UAAU,GAAG,iBAAiB,GAAG,eAAgB,CAAA;AAChF;AACA,EAAIb,EAAAA,KAAK,IACLA,KAAK,CAACa,UAAU,GACZb,KAAK,CAACC,KAAK,CAACE,SAAS,CAAC,MAAM,EAAEH,KAAK,CAACC,KAAK,CAACG,QAAQ,CAAC,OAAO,CAAC,EAAEJ,KAAK,CAACC,KAAK,CAACG,QAAQ,CAAC,OAAO,CAAC,CAAC,GAC3FJ,KAAK,CAACC,KAAK,CAACE,SAAS,CACnB,MAAM,EACNH,KAAK,CAACC,KAAK,CAACG,QAAQ,CAAC,OAAO,CAAC,EAC7BJ,KAAK,CAACC,KAAK,CAACG,QAAQ,CAAC,OAAO,CAC9B,CAAC,CAAA;AACT;;;;"}
1
+ {"version":3,"file":"InfoCard.styled.js","sources":["../../../src/components/widgets/InfoCard/InfoCard.styled.ts"],"sourcesContent":["/*\n * $-transient-prop pattern: rules in\n * `src/components/layout/SectionSeparator/SectionSeparator.styled.ts`, derivation and\n * measurements in `scripts/TS-MIGRATION-PLAYBOOK.md` §J.\n */\nimport styled from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\nimport { ArrowForwardIcon } from '../../../icons';\n\n/**\n * `height` — `PropTypes.number`, px, interpolated as `${props.height}px` with a `50px`\n * fallback. `number` and not `number | string`: a string here would already render\n * `height: 60pxpx`.\n *\n * NO `$`, AND THAT IS A DEFECT THAT IS ALREADY IN THE RENDER BASELINE. `height` is not a\n * member of `HTMLAttributes<HTMLDivElement>` (which is why the read needs this\n * declaration at all) but React DOES recognise it and renders it, so `widgets/InfoCard`\n * in `scripts/r19-harness/baseline.json` opens with `<div height=\"60\" class=\"…\">`.\n * Renaming it `$height` removes that attribute and therefore MOVES the baseline — C10\n * work, §E.4.\n */\nexport interface InfoCardContainerStyleProps {\n height?: number;\n}\n\n/**\n * `$isHovered` — the `Link`'s hover state, held in `InfoCard.tsx`'s `useState`, so\n * genuinely `boolean` and not derived from any prop.\n *\n * NOT COVERABLE BY THE RENDER GATE, and the fixture says so: it comes from `useState`, so\n * it is `false` in every static render whatever props are passed. Both of its hosts\n * therefore have rule blocks the baseline can never exercise — which is exactly why the\n * type matters here more than it would on a prop a fixture pins.\n *\n * Hosts: `ButtonLink` and `StyledArrowIcon`.\n */\ninterface InfoCardHoverStyleProps {\n $isHovered?: boolean;\n}\n\n/*\n * Single-argument, and it stays that way — peer floor `styled-components: >=5.1.0`, and\n * the two majors disagree on the second parameter. §J.4. `prop` needs the annotation\n * because `withConfig` takes this by reference, so it gets no contextual typing.\n */\nconst shouldForwardProp = (prop: string): boolean => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const Container = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<InfoCardContainerStyleProps>(applyDefaultTheme)`\n font-family: ${props => props.theme.primaryFontFamily};\n font-size: 1rem;\n font-weight: 500;\n ${props =>\n props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-800'),\n props.theme.getColor('gray-50')\n )};\n height: ${props => (props.height ? `${props.height}px` : '50px')};\n border-radius: 3px;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 5px 0;\n`;\n\nexport const MetricsContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n width: 70%;\n gap: 5px;\n padding-left: 15px;\n`;\n\nexport const IconTotalContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 10px;\n`;\nexport const Total = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-size: 1.22rem;\n font-weight: 700;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )};\n`;\n\nexport const Label = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-size: 0.875rem;\n font-weight: 400;\n opacity: 0.8;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-500')\n )};\n`;\nexport const IconContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n justify-content: center;\n align-items: center;\n width: 18px;\n margin-top: -0.05rem;\n`;\n\nexport const Link = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-size: 0.875rem;\n font-weight: 400;\n width: 30%;\n opacity: 0.7;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-right: 20px;\n cursor: pointer;\n height: 100%;\n gap: 10px;\n svg {\n transition: transform 0.2s ease-in-out;\n }\n &:hover svg {\n transform: translateX(2px);\n }\n`;\n\nexport const ButtonLink = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<InfoCardHoverStyleProps>(applyDefaultTheme)`\n font-size: 0.875rem;\n font-weight: 500;\n height: 100%;\n display: flex;\n align-items: center;\n white-space: nowrap;\n opacity: ${props => (props.$isHovered ? 1 : 0.8)};\n transition: color 0.2s ease-in-out;\n ${props =>\n props.$isHovered\n ? props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('black'))\n : props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )};\n`;\n\nexport const StyledArrowIcon = styled(ArrowForwardIcon)\n .withConfig({\n shouldForwardProp\n })\n .attrs<InfoCardHoverStyleProps>(applyDefaultTheme)`\n height: 15px;\n margin-right: 10px;\n opacity: ${props => (props.$isHovered ? 1 : 0.8)};\n transition: transform 0.2s ease-in-out, fill 0.2s ease-in-out;\n transform: ${props => (props.$isHovered ? 'translateX(2px)' : 'translateX(0)')};\n\n ${props =>\n props.$isHovered\n ? props.theme.themeProp('fill', props.theme.getColor('white'), props.theme.getColor('black'))\n : props.theme.themeProp(\n 'fill',\n props.theme.getColor('white'),\n props.theme.getColor('black')\n )};\n`;\n"],"names":["shouldForwardProp","prop","startsWith","Container","styled","div","withConfig","attrs","applyDefaultTheme","displayName","componentId","props","theme","primaryFontFamily","themeProp","getColor","height","MetricsContainer","IconTotalContainer","Total","Label","IconContainer","Link","ButtonLink","$isHovered","StyledArrowIcon","ArrowForwardIcon"],"mappings":";;;;;AA6CA,MAAMA,iBAAiB,GAAIC,IAAY,IAAc;EACnD,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC;AAClD,CAAC;AAEM,MAAMC,SAAS,GAAGC,MAAM,CAACC,GAAG,CAChCC,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAA8BC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,2BAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,cAAA,EAAA,kCAAA,EAAA,UAAA,EAAA,sFAAA,CAAA,EACvCC,KAAK,IAAIA,KAAK,CAACC,KAAK,CAACC,iBAAiB,EAGnDF,KAAK,IACLA,KAAK,CAACC,KAAK,CAACE,SAAS,CACnB,YAAY,EACZH,KAAK,CAACC,KAAK,CAACG,QAAQ,CAAC,UAAU,CAAC,EAChCJ,KAAK,CAACC,KAAK,CAACG,QAAQ,CAAC,SAAS,CAChC,CAAC,EACOJ,KAAK,IAAKA,KAAK,CAACK,MAAM,GAAG,CAAA,EAAGL,KAAK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,KAAK,CAACG,QAAQ,CAAC,UAAU,CAAC,EAChCJ,KAAK,CAACC,KAAK,CAACG,QAAQ,CAAC,UAAU,CACjC,CAAC;AAGF,MAAMU,eAAe,GAAGrB,MAAM,CAACsB,eAAgB,CAAC,CACpDpB,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAA0BC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,iCAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,wCAAA,EAAA,yEAAA,EAAA,GAAA,EAAA,GAAA,CAAA,EAGvCC,KAAK,IAAKA,KAAK,CAACa,UAAU,GAAG,CAAC,GAAG,GAAI,EAEnCb,KAAK,IAAKA,KAAK,CAACa,UAAU,GAAG,iBAAiB,GAAG,eAAgB,EAE5Eb,KAAK,IACLA,KAAK,CAACa,UAAU,GACZb,KAAK,CAACC,KAAK,CAACE,SAAS,CAAC,MAAM,EAAEH,KAAK,CAACC,KAAK,CAACG,QAAQ,CAAC,OAAO,CAAC,EAAEJ,KAAK,CAACC,KAAK,CAACG,QAAQ,CAAC,OAAO,CAAC,CAAC,GAC3FJ,KAAK,CAACC,KAAK,CAACE,SAAS,CACnB,MAAM,EACNH,KAAK,CAACC,KAAK,CAACG,QAAQ,CAAC,OAAO,CAAC,EAC7BJ,KAAK,CAACC,KAAK,CAACG,QAAQ,CAAC,OAAO,CAC9B,CAAC;;;;"}
@@ -1,8 +1,7 @@
1
- import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import React__default from 'react';
3
- import PropTypes from 'prop-types';
4
2
  import SeverityBadge from '../../data/SeverityBadge/SeverityBadge.js';
5
3
  import { InstructionText, Card, ThumbnailWrapper, ThumbnailImage, ContentWrapper } from './InstructionSeverityDisplay.styled.js';
4
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
6
5
 
7
6
  const defaultLabels = {
8
7
  1: 'Info',
@@ -33,45 +32,40 @@ const InstructionSeverityDisplay = React__default.forwardRef(function Instructio
33
32
  const effectiveSeverity = severity ?? 1;
34
33
  const displayLabel = severityLabel || labels && labels[effectiveSeverity] || defaultLabels[effectiveSeverity];
35
34
  const hasThumbnail = thumbnail !== undefined;
36
- const content = React__default.createElement(React__default.Fragment, null, React__default.createElement(SeverityBadge, {
37
- severity: severity,
38
- label: displayLabel,
39
- icon: icon,
40
- fontSize: badgeFontSize ? parseFloat(badgeFontSize) : undefined
41
- }), React__default.createElement(InstructionText, {
42
- $fontSize: detailsFontSize,
43
- $maxLines: maxLines
44
- }, maxLines ? React__default.createElement("span", {
45
- title: instructionText
46
- }, instructionText) : instructionText));
47
- return React__default.createElement(Card, _extends({
35
+ const content = jsxs(Fragment, {
36
+ children: [jsx(SeverityBadge, {
37
+ severity: severity,
38
+ label: displayLabel,
39
+ icon: icon,
40
+ fontSize: badgeFontSize ? parseFloat(badgeFontSize) : undefined
41
+ }), jsx(InstructionText, {
42
+ $fontSize: detailsFontSize,
43
+ $maxLines: maxLines,
44
+ children: maxLines ? jsx("span", {
45
+ title: instructionText,
46
+ children: instructionText
47
+ }) : instructionText
48
+ })]
49
+ });
50
+ return jsxs(Card, {
48
51
  ref: forwardedRef,
49
52
  $severity: severity,
50
53
  $showCard: showCard,
51
54
  $padding: padding,
52
55
  $bgLight: bgLight,
53
56
  $bgDark: bgDark,
54
- $hasThumbnail: hasThumbnail
55
- }, props), hasThumbnail && React__default.createElement(ThumbnailWrapper, null, thumbnail && React__default.createElement(ThumbnailImage, {
56
- src: thumbnail,
57
- alt: ""
58
- })), hasThumbnail ? React__default.createElement(ContentWrapper, null, content) : content);
57
+ $hasThumbnail: hasThumbnail,
58
+ ...props,
59
+ children: [hasThumbnail && jsx(ThumbnailWrapper, {
60
+ children: thumbnail && jsx(ThumbnailImage, {
61
+ src: thumbnail,
62
+ alt: ""
63
+ })
64
+ }), hasThumbnail ? jsx(ContentWrapper, {
65
+ children: content
66
+ }) : content]
67
+ });
59
68
  });
60
- InstructionSeverityDisplay.propTypes = process.env.NODE_ENV !== "production" ? {
61
- severity: PropTypes.oneOf([1, 2, 3, 4, 5]),
62
- instructionText: PropTypes.string,
63
- severityLabel: PropTypes.string,
64
- labels: PropTypes.objectOf(PropTypes.string),
65
- icon: PropTypes.element,
66
- showCard: PropTypes.bool,
67
- padding: PropTypes.string,
68
- badgeFontSize: PropTypes.string,
69
- detailsFontSize: PropTypes.string,
70
- bgLight: PropTypes.string,
71
- bgDark: PropTypes.string,
72
- maxLines: PropTypes.number,
73
- thumbnail: PropTypes.string
74
- } : {};
75
69
 
76
70
  export { InstructionSeverityDisplay as default };
77
71
  //# sourceMappingURL=InstructionSeverityDisplay.js.map