@ntbjs/react-components 2.0.14 → 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 -122
  163. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js.map +1 -1
  164. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +99 -286
  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
@@ -1 +1 @@
1
- {"version":3,"file":"AssetGalleryGridCard.styled.js","sources":["../../../../../src/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js"],"sourcesContent":["import { rgba } from 'polished';\nimport styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../../../utils/defaultTheme';\n\nconst darkBorderColor = '#52525B';\nconst darkBgColor = '#27272A';\nconst darkHoverBgColor = '#3F3F46';\nconst lightHoverBgColor = '#E4E4E7';\n\nexport const AssetGalleryWrapper = styled.div.attrs(applyDefaultTheme)`\n width: 100%;\n height: 100%;\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `};\n`;\n\nconst ringState = props => {\n if (props.selected) return props.$customSelectedBorder ? 'custom' : 'selected';\n if (props.$softSelected) return 'soft';\n if (props.completed) return 'completed';\n if (props.$hasError) return 'error';\n return 'idle';\n};\n\nexport const AssetGalleryGridCard = styled.div.attrs(props => ({\n ...applyDefaultTheme(props),\n 'data-ring': ringState(props),\n style: {\n ...(props.style || {}),\n ...(props.$customSelectedBorder && props.selected\n ? {\n '--ring-dark': props.$customSelectedBorder[0],\n '--ring-light': props.$customSelectedBorder[1]\n }\n : {})\n }\n}))`\n display: block;\n position: relative;\n height: 100%;\n margin: 0;\n box-sizing: border-box;\n text-decoration: none;\n cursor: pointer;\n transition: box-shadow 220ms;\n overflow: hidden;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-700')\n )}\n\n ${props =>\n props.disabled &&\n css`\n pointer-events: none;\n opacity: 0.4;\n `};\n\n ${props =>\n props.extendedSelectMode &&\n css`\n cursor: pointer;\n `}\n\n &:hover {\n box-shadow: 0px 3px 6px #00000029;\n }\n\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n box-sizing: border-box;\n z-index: 10;\n border-style: solid;\n border-width: 1px;\n }\n &[data-ring='soft']::after,\n &[data-ring='selected']::after,\n &[data-ring='custom']::after,\n &[data-ring='completed']::after,\n &[data-ring='error']::after {\n border-width: 3px;\n }\n\n ${props => {\n const gray100 = props.theme.getColor('gray-100');\n const gray300 = props.theme.getColor('gray-300');\n const gray700 = props.theme.getColor('gray-700');\n const emerald = props.theme.getColor('emerald-500');\n const red500 = props.theme.getColor('red-500');\n const red600 = props.theme.getColor('red-600');\n return css`\n &[data-ring='idle']::after {\n border-color: ${gray300};\n }\n &[data-ring='soft']::after {\n border-color: ${rgba(gray700, 0.5)};\n }\n &[data-ring='selected']::after {\n border-color: ${darkBorderColor};\n }\n &[data-ring='custom']::after {\n border-color: var(--ring-light);\n }\n &[data-ring='completed']::after {\n border-color: ${rgba(emerald, 0.7)};\n }\n &[data-ring='error']::after {\n border-color: ${rgba(red500, 0.7)};\n }\n\n @media (prefers-color-scheme: dark) {\n &[data-ring='idle']::after {\n border-color: ${darkBorderColor};\n }\n &[data-ring='soft']::after {\n border-color: ${rgba(gray100, 0.5)};\n }\n &[data-ring='selected']::after {\n border-color: ${gray100};\n }\n &[data-ring='custom']::after {\n border-color: var(--ring-dark);\n }\n &[data-ring='completed']::after {\n border-color: ${emerald};\n }\n &[data-ring='error']::after {\n border-color: ${red600};\n }\n }\n body.light-theme &[data-ring='idle']::after {\n border-color: ${gray300};\n }\n body.light-theme &[data-ring='soft']::after {\n border-color: ${rgba(gray700, 0.5)};\n }\n body.light-theme &[data-ring='selected']::after {\n border-color: ${darkBorderColor};\n }\n body.light-theme &[data-ring='custom']::after {\n border-color: var(--ring-light);\n }\n body.light-theme &[data-ring='completed']::after {\n border-color: ${rgba(emerald, 0.7)};\n }\n body.light-theme &[data-ring='error']::after {\n border-color: ${rgba(red500, 0.7)};\n }\n body.dark-theme &[data-ring='idle']::after {\n border-color: ${darkBorderColor};\n }\n body.dark-theme &[data-ring='soft']::after {\n border-color: ${rgba(gray100, 0.5)};\n }\n body.dark-theme &[data-ring='selected']::after {\n border-color: ${gray100};\n }\n body.dark-theme &[data-ring='custom']::after {\n border-color: var(--ring-dark);\n }\n body.dark-theme &[data-ring='completed']::after {\n border-color: ${emerald};\n }\n body.dark-theme &[data-ring='error']::after {\n border-color: ${red600};\n }\n `;\n }};\n`;\n\nexport const ThumbnailSection = styled.div.attrs(applyDefaultTheme)`\n position: relative;\n overflow: hidden;\n transition: background 220ms;\n ${props => props.theme.themeProp('background', darkBgColor, props.theme.getColor('gray-50'))}\n ${AssetGalleryGridCard}:hover & {\n ${props => props.theme.themeProp('background', darkHoverBgColor, lightHoverBgColor, 1)}\n }\n`;\n\n// ── Top bar ──────────────────────────────────────────────────────────────────\n\nexport const HorizontalBar = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px;\n height: 40px;\n box-sizing: border-box;\n flex-shrink: 0;\n position: relative;\n z-index: 2;\n`;\n\nexport const HorizontalBarLeft = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const HorizontalBarRight = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const StatusIconCircle = styled.span.attrs(applyDefaultTheme)`\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n pointer-events: none;\n svg {\n width: 100%;\n height: 100%;\n }\n`;\n\n// ── Thumbnail ─────────────────────────────────────────────────────────────────\n\nexport const ThumbnailRow = styled.div`\n position: relative;\n display: flex;\n width: 100%;\n`;\n\nexport const ThumbnailSpacer = styled.div`\n flex: 1;\n`;\n\nexport const ThumbnailWrapper = styled.div`\n width: max(66%, 268px);\n flex-shrink: 0;\n`;\n\nexport const ThumbnailBox = styled.div.attrs(applyDefaultTheme)`\n position: relative;\n height: 168px;\n\n flex-shrink: 0;\n overflow: hidden;\n\n img,\n video {\n width: 100%;\n height: 100%;\n object-fit: contain;\n display: block;\n }\n\n .audio {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n svg {\n width: 35%;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-400')\n )}\n }\n }\n`;\n\nexport const ThumbnailSelectedOverlay = styled.div.attrs(applyDefaultTheme)`\n position: absolute;\n inset: 0;\n pointer-events: none;\n opacity: ${props => (props.selected ? 0.6 : 0)};\n background-color: #accef7;\n transition: opacity 220ms;\n z-index: 1;\n`;\n\nexport const ThumbnailActions = styled.div`\n flex: 1;\n`;\n\nexport const ActionsContainer = styled.div.attrs(applyDefaultTheme)`\n display: flex;\n align-items: end;\n flex-direction: column;\n gap: 8px;\n opacity: 0;\n transition: opacity 220ms;\n z-index: 1;\n position: absolute;\n right: 8px;\n ${AssetGalleryGridCard}:hover & {\n opacity: 1;\n }\n\n ${AssetGalleryGridCard}:focus-within & {\n opacity: 1;\n }\n`;\n\nexport const Action = styled.div`\n margin: 0;\n\n button {\n box-shadow: 0px 3px 6px #00000033;\n }\n svg {\n width: 16px;\n height: 16px;\n max-height: unset;\n max-width: unset;\n }\n`;\n\nexport const ConsumerOverlay = styled.div`\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 1;\n`;\n\n// ── Card body ─────────────────────────────────────────────────────────────────\n\nexport const CardBody = styled.div.attrs(applyDefaultTheme)`\n display: flex;\n flex-direction: column;\n flex: 1;\n padding: 16px 0px 0px 0px;\n`;\n\nexport const CardTitle = styled.span.attrs(applyDefaultTheme)`\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0px 16px;\n font: normal normal 500 14px/19px Roboto;\n letter-spacing: 0.28px;\n height: 19px;\n box-sizing: border-box;\n\n ${props =>\n props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'))}\n`;\n\nexport const CardDescription = styled.span.attrs(applyDefaultTheme)`\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 6px 16px;\n font: normal normal normal 12px/1.286em Roboto;\n letter-spacing: 0.24px;\n height: 52px;\n box-sizing: border-box;\n overflow-wrap: break-word;\n word-break: break-word;\n\n ${props =>\n props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'))}\n`;\n\nexport const InstructionsWrapper = styled.div.attrs(applyDefaultTheme)`\n min-height: 96px;\n margin-top: 16px;\n box-sizing: border-box;\n flex-shrink: 0;\n transition: background 220ms;\n opacity: 0;\n ${props =>\n props.$hasContent &&\n css`\n opacity: 1;\n border-top: 0.56px solid;\n border-bottom: 0.56px solid;\n ${props.theme.themeProp('border-color', darkBorderColor, props.theme.getColor('gray-300'))}\n `}\n\n ${props =>\n props.$hasContent &&\n css`\n opacity: 1;\n ${props.theme.themeProp('background', darkBgColor, props.theme.getColor('gray-50'))}\n ${AssetGalleryGridCard}:hover & {\n ${props.theme.themeProp('background', darkHoverBgColor, lightHoverBgColor, 1)}\n }\n `}\n`;\n\nexport const CardFooter = styled.div.attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0px 16px;\n min-height: 52px;\n box-sizing: border-box;\n`;\n\nexport const CardFooterLeft = styled.div`\n display: flex;\n align-items: center;\n > * {\n margin-right: 4px;\n }\n`;\n\nexport const CardFooterRight = styled.div`\n display: flex;\n align-items: center;\n > * {\n margin-left: 4px;\n }\n`;\n\nexport const CardDivider = styled.div.attrs(applyDefaultTheme)`\n height: 1px;\n flex-shrink: 0;\n opacity: ${props => (props.invisible ? 0 : 1)};\n ${props => props.theme.themeProp('background', darkBorderColor, props.theme.getColor('gray-300'))}\n`;\n\nexport const CheckboxRow = styled.div`\n display: flex;\n padding: 0px 16px;\n align-items: center;\n height: 56px;\n box-sizing: border-box;\n flex-shrink: 0;\n`;\n\nexport const CheckboxButton = styled.div.attrs(applyDefaultTheme)`\n opacity: 1;\n flex-shrink: 0;\n cursor: pointer;\n transition: opacity 220ms;\n ${props => props.theme.themeProp('color', 'white', 'black')}\n > svg {\n width: 23px;\n height: 100%;\n }\n`;\n"],"names":["darkBorderColor","darkBgColor","darkHoverBgColor","lightHoverBgColor","AssetGalleryWrapper","styled","div","attrs","applyDefaultTheme","props","disabled","css","ringState","selected","$customSelectedBorder","$softSelected","completed","$hasError","AssetGalleryGridCard","style","theme","themeProp","getColor","extendedSelectMode","gray100","gray300","gray700","emerald","red500","red600","rgba","ThumbnailSection","HorizontalBar","HorizontalBarLeft","HorizontalBarRight","StatusIconCircle","span","ThumbnailRow","ThumbnailSpacer","ThumbnailWrapper","ThumbnailBox","ThumbnailSelectedOverlay","ThumbnailActions","ActionsContainer","Action","ConsumerOverlay","CardBody","CardTitle","CardDescription","InstructionsWrapper","$hasContent","CardFooter","CardFooterLeft","CardFooterRight","CardDivider","invisible","CheckboxRow"],"mappings":";;;;AAIA,MAAMA,eAAe,GAAG,SAAS,CAAA;AACjC,MAAMC,WAAW,GAAG,SAAS,CAAA;AAC7B,MAAMC,gBAAgB,GAAG,SAAS,CAAA;AAClC,MAAMC,iBAAiB,GAAG,SAAS,CAAA;AAE5B,MAAMC,mBAAmB,GAAGC,MAAM,CAACC,GAAG,CAACC,KAAK,CAACC,iBAAiB,CAAC,CAAA;AACtE;AACA;AACA,EAAA,EAAIC,KAAK,IACLA,KAAK,CAACC,QAAQ,IACdC,GAAG,CAAA;AACP;AACA,IAAK,CAAA,CAAA;AACL,EAAC;AAED,MAAMC,SAAS,GAAGH,KAAK,IAAI;EACzB,IAAIA,KAAK,CAACI,QAAQ,EAAE,OAAOJ,KAAK,CAACK,qBAAqB,GAAG,QAAQ,GAAG,UAAU,CAAA;AAC9E,EAAA,IAAIL,KAAK,CAACM,aAAa,EAAE,OAAO,MAAM,CAAA;AACtC,EAAA,IAAIN,KAAK,CAACO,SAAS,EAAE,OAAO,WAAW,CAAA;AACvC,EAAA,IAAIP,KAAK,CAACQ,SAAS,EAAE,OAAO,OAAO,CAAA;AACnC,EAAA,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAEM,MAAMC,oBAAoB,GAAGb,MAAM,CAACC,GAAG,CAACC,KAAK,CAACE,KAAK,KAAK;EAC7D,GAAGD,iBAAiB,CAACC,KAAK,CAAC;AAC3B,EAAA,WAAW,EAAEG,SAAS,CAACH,KAAK,CAAC;AAC7BU,EAAAA,KAAK,EAAE;AACL,IAAA,IAAIV,KAAK,CAACU,KAAK,IAAI,EAAE,CAAC;AACtB,IAAA,IAAIV,KAAK,CAACK,qBAAqB,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AO,EAAE,OAAO,CAAC,CAAA;AAC7D;AACA;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"AssetGalleryGridCard.styled.js","sources":["../../../../../src/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.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 * TWO THINGS MAKE THIS FILE DIFFERENT FROM ITS COMPACT SIBLING:\n *\n * 1. `AssetGalleryGridCard` is an `.attrs(props => …)` CALLBACK with no `.withConfig()`\n * at all, so the generic MUST go on `.attrs<P>()`. Measured (§J.2): supplying it on\n * the tagged-template call instead leaves the callback parameter\n * `FastOmit<…, never>`, where the reads inside the callback have no fix but a\n * suppression. Five props are read in there, three of them through `ringState`.\n * 2. `ringState` is a module-scope FUNCTION, not a `css` helper — a fourth kind of\n * props-reading site. Unannotated its parameter is an implicit `any`, and because\n * `noImplicitAny` is off that is SILENT: the file would report zero errors while\n * five prop reads stayed unchecked. It gets an explicit parameter type and a closed\n * return union, which is what ties the six `&[data-ring=…]` selectors below to the\n * six values that can actually be produced.\n */\nimport { rgba } from 'polished';\nimport styled, { css } 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. §J.4. `prop` needs the annotation\n * because `withConfig` takes this by reference, so it gets no contextual typing.\n *\n * NOTE that `AssetGalleryGridCard` itself does NOT use this predicate — it has no\n * `.withConfig()` at all. Its prop filtering is styled-components v6 defaults plus\n * `ComputedRootComponent`'s own `omit` list, which is why the leak analysis on\n * `AssetGalleryGridCardStyleProps` above differs key by key.\n */\nconst shouldForwardProp = (prop: string): boolean => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nconst darkBorderColor = '#52525B';\nconst darkBgColor = '#27272A';\nconst darkHoverBgColor = '#3F3F46';\nconst lightHoverBgColor = '#E4E4E7';\n\nexport const AssetGalleryWrapper = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<Pick<AssetGalleryGridCardStyleProps, 'disabled'>>(applyDefaultTheme)`\n width: 100%;\n height: 100%;\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `};\n`;\n\n/**\n * The six values `ringState` can return, and therefore the six `data-ring` attribute\n * values the selectors below match. Closed on purpose: `&[data-ring='typo']` is not a type\n * error (it is inside a template string) but `ringState` returning one is, so the union is\n * where the two halves are kept honest.\n */\ntype AssetGalleryGridCardRingState = 'custom' | 'selected' | 'soft' | 'completed' | 'error' | 'idle';\n\n/**\n * What `ringState` reads. Also the reason the card root needs a generic at all: three of\n * these five are only ever read HERE, inside the `.attrs()` callback, not in the template.\n */\ninterface AssetGalleryGridCardRingProps {\n /**\n * `selected` — `PropTypes.bool`.\n *\n * NO `$`, AND THAT IS A DEFECT — but NOT a DOM leak. `ComputedRootComponent` spreads it\n * onto a plain `<div>` and React DROPS a boolean `selected` on any element that is not\n * an `<option>`, silently; `selected=` occurs zero times in\n * `scripts/r19-harness/baseline.json`. Prefixing it is still a behaviour change to\n * review on its own (C10, §E.4) — it just would not move the baseline.\n */\n selected?: boolean;\n /**\n * `asset.completed` — `PropTypes.bool`.\n *\n * NO `$`, AND THAT IS A DEFECT — and again not a DOM leak, for a different reason:\n * `ComputedRootComponent` explicitly `omit`s `completed`, and React would drop it\n * anyway (\"Received `true` for a non-boolean attribute `completed`\"). Measured both ways.\n */\n completed?: boolean;\n /** `softSelected` — `PropTypes.bool.isRequired` on the COMPONENT, optional here per §J.5. */\n $softSelected?: boolean;\n /** `asset.hasError` — `PropTypes.bool`. */\n $hasError?: boolean;\n /** `customSelectedBorder` — `PropTypes.arrayOf(PropTypes.string)`, read as\n * `[darkModeColor, lightModeColor]` and written into the `--ring-dark` / `--ring-light`\n * custom properties by the `.attrs()` callback. */\n $customSelectedBorder?: string[];\n}\n\n/**\n * The card root's props: everything `ringState` reads, plus the two the TEMPLATE reads.\n */\ninterface AssetGalleryGridCardStyleProps extends AssetGalleryGridCardRingProps {\n /**\n * `asset.disabled` — `PropTypes.bool`.\n *\n * NO `$`, AND THIS IS THE ONE THAT REALLY REACHES THE DOM. React recognises\n * `disabled` and renders it as a bare boolean attribute even on a `<div>`, so\n * `disabled=\"\"` is on both the wrapper and the card root in\n * `widgets/AssetGalleryGridCard#disabled` in the recorded baseline. Renaming it\n * `$disabled` REMOVES that attribute and therefore MOVES the baseline — C10, §E.4.\n */\n disabled?: boolean;\n /**\n * `extendedSelectMode` — `PropTypes.bool`. Makes the whole card a selectable area.\n *\n * NO `$`, AND THAT IS A DEFECT — not a DOM leak twice over: `ComputedRootComponent`\n * `omit`s it, and React drops an unrecognised camelCase prop whose value is `true`.\n */\n extendedSelectMode?: boolean;\n}\n\nconst ringState = (props: AssetGalleryGridCardRingProps): AssetGalleryGridCardRingState => {\n if (props.selected) return props.$customSelectedBorder ? 'custom' : 'selected';\n if (props.$softSelected) return 'soft';\n if (props.completed) return 'completed';\n if (props.$hasError) return 'error';\n return 'idle';\n};\n\nexport const AssetGalleryGridCard = styled.div.attrs<AssetGalleryGridCardStyleProps>(props => ({\n ...applyDefaultTheme(props),\n 'data-ring': ringState(props),\n style: {\n ...(props.style || {}),\n ...(props.$customSelectedBorder && props.selected\n ? {\n '--ring-dark': props.$customSelectedBorder[0],\n '--ring-light': props.$customSelectedBorder[1]\n }\n : {})\n }\n}))`\n display: block;\n position: relative;\n height: 100%;\n margin: 0;\n box-sizing: border-box;\n text-decoration: none;\n cursor: pointer;\n transition: box-shadow 220ms;\n overflow: hidden;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-700')\n )}\n\n ${props =>\n props.disabled &&\n css`\n pointer-events: none;\n opacity: 0.4;\n `};\n\n ${props =>\n props.extendedSelectMode &&\n css`\n cursor: pointer;\n `}\n\n &:hover {\n box-shadow: 0px 3px 6px #00000029;\n }\n\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n pointer-events: none;\n box-sizing: border-box;\n z-index: 10;\n border-style: solid;\n border-width: 1px;\n }\n &[data-ring='soft']::after,\n &[data-ring='selected']::after,\n &[data-ring='custom']::after,\n &[data-ring='completed']::after,\n &[data-ring='error']::after {\n border-width: 3px;\n }\n\n ${props => {\n const gray100 = props.theme.getColor('gray-100');\n const gray300 = props.theme.getColor('gray-300');\n const gray700 = props.theme.getColor('gray-700');\n const emerald = props.theme.getColor('emerald-500');\n const red500 = props.theme.getColor('red-500');\n const red600 = props.theme.getColor('red-600');\n return css`\n &[data-ring='idle']::after {\n border-color: ${gray300};\n }\n &[data-ring='soft']::after {\n border-color: ${rgba(gray700, 0.5)};\n }\n &[data-ring='selected']::after {\n border-color: ${darkBorderColor};\n }\n &[data-ring='custom']::after {\n border-color: var(--ring-light);\n }\n &[data-ring='completed']::after {\n border-color: ${rgba(emerald, 0.7)};\n }\n &[data-ring='error']::after {\n border-color: ${rgba(red500, 0.7)};\n }\n\n @media (prefers-color-scheme: dark) {\n &[data-ring='idle']::after {\n border-color: ${darkBorderColor};\n }\n &[data-ring='soft']::after {\n border-color: ${rgba(gray100, 0.5)};\n }\n &[data-ring='selected']::after {\n border-color: ${gray100};\n }\n &[data-ring='custom']::after {\n border-color: var(--ring-dark);\n }\n &[data-ring='completed']::after {\n border-color: ${emerald};\n }\n &[data-ring='error']::after {\n border-color: ${red600};\n }\n }\n body.light-theme &[data-ring='idle']::after {\n border-color: ${gray300};\n }\n body.light-theme &[data-ring='soft']::after {\n border-color: ${rgba(gray700, 0.5)};\n }\n body.light-theme &[data-ring='selected']::after {\n border-color: ${darkBorderColor};\n }\n body.light-theme &[data-ring='custom']::after {\n border-color: var(--ring-light);\n }\n body.light-theme &[data-ring='completed']::after {\n border-color: ${rgba(emerald, 0.7)};\n }\n body.light-theme &[data-ring='error']::after {\n border-color: ${rgba(red500, 0.7)};\n }\n body.dark-theme &[data-ring='idle']::after {\n border-color: ${darkBorderColor};\n }\n body.dark-theme &[data-ring='soft']::after {\n border-color: ${rgba(gray100, 0.5)};\n }\n body.dark-theme &[data-ring='selected']::after {\n border-color: ${gray100};\n }\n body.dark-theme &[data-ring='custom']::after {\n border-color: var(--ring-dark);\n }\n body.dark-theme &[data-ring='completed']::after {\n border-color: ${emerald};\n }\n body.dark-theme &[data-ring='error']::after {\n border-color: ${red600};\n }\n `;\n }};\n`;\n\nexport const ThumbnailSection = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: relative;\n overflow: hidden;\n transition: background 220ms;\n ${props => props.theme.themeProp('background', darkBgColor, props.theme.getColor('gray-50'))}\n ${AssetGalleryGridCard}:hover & {\n ${props => props.theme.themeProp('background', darkHoverBgColor, lightHoverBgColor, 1)}\n }\n`;\n\n// ── Top bar ──────────────────────────────────────────────────────────────────\n\nexport const HorizontalBar = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px;\n height: 40px;\n box-sizing: border-box;\n flex-shrink: 0;\n position: relative;\n z-index: 2;\n`;\n\nexport const HorizontalBarLeft = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const HorizontalBarRight = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const StatusIconCircle = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n pointer-events: none;\n svg {\n width: 100%;\n height: 100%;\n }\n`;\n\n// ── Thumbnail ─────────────────────────────────────────────────────────────────\n\nexport const ThumbnailRow = styled.div`\n position: relative;\n display: flex;\n width: 100%;\n`;\n\nexport const ThumbnailSpacer = styled.div`\n flex: 1;\n`;\n\nexport const ThumbnailWrapper = styled.div`\n width: max(66%, 268px);\n flex-shrink: 0;\n`;\n\nexport const ThumbnailBox = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: relative;\n height: 168px;\n\n flex-shrink: 0;\n overflow: hidden;\n\n img,\n video {\n width: 100%;\n height: 100%;\n object-fit: contain;\n display: block;\n }\n\n .audio {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n svg {\n width: 35%;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-400')\n )}\n }\n }\n`;\n\nexport const ThumbnailSelectedOverlay = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<Pick<AssetGalleryGridCardStyleProps, 'selected'>>(applyDefaultTheme)`\n position: absolute;\n inset: 0;\n pointer-events: none;\n opacity: ${props => (props.selected ? 0.6 : 0)};\n background-color: #accef7;\n transition: opacity 220ms;\n z-index: 1;\n`;\n\nexport const ThumbnailActions = styled.div`\n flex: 1;\n`;\n\nexport const ActionsContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: end;\n flex-direction: column;\n gap: 8px;\n opacity: 0;\n transition: opacity 220ms;\n z-index: 1;\n position: absolute;\n right: 8px;\n ${AssetGalleryGridCard}:hover & {\n opacity: 1;\n }\n\n ${AssetGalleryGridCard}:focus-within & {\n opacity: 1;\n }\n`;\n\nexport const Action = styled.div`\n margin: 0;\n\n button {\n box-shadow: 0px 3px 6px #00000033;\n }\n svg {\n width: 16px;\n height: 16px;\n max-height: unset;\n max-width: unset;\n }\n`;\n\nexport const ConsumerOverlay = styled.div`\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 1;\n`;\n\n// ── Card body ─────────────────────────────────────────────────────────────────\n\nexport const CardBody = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n flex-direction: column;\n flex: 1;\n padding: 16px 0px 0px 0px;\n`;\n\nexport const CardTitle = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0px 16px;\n font: normal normal 500 14px/19px Roboto;\n letter-spacing: 0.28px;\n height: 19px;\n box-sizing: border-box;\n\n ${props =>\n props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'))}\n`;\n\nexport const CardDescription = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 6px 16px;\n font: normal normal normal 12px/1.286em Roboto;\n letter-spacing: 0.24px;\n height: 52px;\n box-sizing: border-box;\n overflow-wrap: break-word;\n word-break: break-word;\n\n ${props =>\n props.theme.themeProp('color', props.theme.getColor('white'), props.theme.getColor('gray-700'))}\n`;\n\n/* `$hasContent` — `Boolean(asset.imageRights?.toString().trim())`, so genuinely boolean\n * and not `imageRights`'s `string`. */\nexport const InstructionsWrapper = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<{ $hasContent?: boolean }>(applyDefaultTheme)`\n min-height: 96px;\n margin-top: 16px;\n box-sizing: border-box;\n flex-shrink: 0;\n transition: background 220ms;\n opacity: 0;\n ${props =>\n props.$hasContent &&\n css`\n opacity: 1;\n border-top: 0.56px solid;\n border-bottom: 0.56px solid;\n ${props.theme.themeProp('border-color', darkBorderColor, props.theme.getColor('gray-300'))}\n `}\n\n ${props =>\n props.$hasContent &&\n css`\n opacity: 1;\n ${props.theme.themeProp('background', darkBgColor, props.theme.getColor('gray-50'))}\n ${AssetGalleryGridCard}:hover & {\n ${props.theme.themeProp('background', darkHoverBgColor, lightHoverBgColor, 1)}\n }\n `}\n`;\n\nexport const CardFooter = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0px 16px;\n min-height: 52px;\n box-sizing: border-box;\n`;\n\nexport const CardFooterLeft = styled.div`\n display: flex;\n align-items: center;\n > * {\n margin-right: 4px;\n }\n`;\n\nexport const CardFooterRight = styled.div`\n display: flex;\n align-items: center;\n > * {\n margin-left: 4px;\n }\n`;\n\n/*\n * `invisible` IS READ AND NEVER PASSED — DECLARED, NOT FIXED.\n *\n * `AssetGalleryGridCard.tsx` renders `<S.CardDivider />` twice, both times with no props\n * at all, and nothing else in `src` constructs this component. So `props.invisible` is\n * always `undefined` and the `opacity` below is unconditionally `1` — the invisible\n * divider is an unimplemented state, the same shape of defect as `TextArea.styled.ts`'s\n * `$fadeIn` (playbook §E.3).\n *\n * It also has NO `$`, so if it ever were passed it would additionally be handed to React,\n * which drops a boolean-valued unknown attribute with a warning (\"Received `true` for a\n * non-boolean attribute `invisible`\") — measured. `invisible` occurs zero times in the\n * recorded baseline.\n *\n * Declared `boolean` rather than `undefined` because, unlike a run-together typo, this\n * key has a real intended meaning; wiring it up is a feature, not a rename.\n */\nexport const CardDivider = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<{ invisible?: boolean }>(applyDefaultTheme)`\n height: 1px;\n flex-shrink: 0;\n opacity: ${props => (props.invisible ? 0 : 1)};\n ${props => props.theme.themeProp('background', darkBorderColor, props.theme.getColor('gray-300'))}\n`;\n\nexport const CheckboxRow = styled.div`\n display: flex;\n padding: 0px 16px;\n align-items: center;\n height: 56px;\n box-sizing: border-box;\n flex-shrink: 0;\n`;\n\nexport const CheckboxButton = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 1;\n flex-shrink: 0;\n cursor: pointer;\n transition: opacity 220ms;\n ${props => props.theme.themeProp('color', 'white', 'black')}\n > svg {\n width: 23px;\n height: 100%;\n }\n`;\n"],"names":["shouldForwardProp","prop","startsWith","darkBorderColor","darkBgColor","darkHoverBgColor","lightHoverBgColor","AssetGalleryWrapper","styled","div","withConfig","attrs","applyDefaultTheme","displayName","componentId","props","disabled","css","ringState","selected","$customSelectedBorder","$softSelected","completed","$hasError","AssetGalleryGridCard","style","theme","themeProp","getColor","extendedSelectMode","gray100","gray300","gray700","emerald","red500","red600","rgba","ThumbnailSection","HorizontalBar","HorizontalBarLeft","HorizontalBarRight","StatusIconCircle","span","ThumbnailRow","ThumbnailSpacer","ThumbnailWrapper","ThumbnailBox","ThumbnailSelectedOverlay","ThumbnailActions","ActionsContainer","Action","ConsumerOverlay","CardBody","CardTitle","CardDescription","InstructionsWrapper","$hasContent","CardFooter","CardFooterLeft","CardFooterRight","CardDivider","invisible","CheckboxRow"],"mappings":";;;;AAiCA,MAAMA,iBAAiB,GAAIC,IAAY,IAAc;EACnD,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC;AAClD,CAAC;AAED,MAAMC,eAAe,GAAG,SAAS;AACjC,MAAMC,WAAW,GAAG,SAAS;AAC7B,MAAMC,gBAAgB,GAAG,SAAS;AAClC,MAAMC,iBAAiB,GAAG,SAAS;AAE5B,MAAMC,mBAAmB,GAAGC,MAAM,CAACC,GAAG,CAC1CC,UAAU,CAAC;AACVV,EAAAA;AACF,CAAC,CAAC,CACDW,KAAK,CAAmDC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,iDAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,yBAAA,EAAA,GAAA,CAAA,EAGzEC,KAAK,IACLA,KAAK,CAACC,QAAQ,IACdC,GAAG,yBAEF;AAmEL,MAAMC,SAAS,GAAIH,KAAoC,IAAoC;EACzF,IAAIA,KAAK,CAACI,QAAQ,EAAE,OAAOJ,KAAK,CAACK,qBAAqB,GAAG,QAAQ,GAAG,UAAU;AAC9E,EAAA,IAAIL,KAAK,CAACM,aAAa,EAAE,OAAO,MAAM;AACtC,EAAA,IAAIN,KAAK,CAACO,SAAS,EAAE,OAAO,WAAW;AACvC,EAAA,IAAIP,KAAK,CAACQ,SAAS,EAAE,OAAO,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WAAA,EAAA,yCAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,mGAAA,CAAA;AASPN,MAAM,CAACC,GAAG,CACrCC,UAAU,CAAC;AACVV,EAAAA;AACF,CAAC,CAAC,CACDW,KAAK,CAACC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,4CAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,kEAAA,EAAA,iCAAA,CAAA,EAKvBC,KAAK,IAAIA,KAAK,CAACW,KAAK,CAACC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;;;;"}
@@ -1,9 +1,8 @@
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 { AssetPreviewTopBar as AssetPreviewTopBar$1, BackButtonContainer, BackHoverEffect, LeftText, ButtonsContainer } from './AssetPreviewTopBar.styled.js';
5
3
  import { ReactComponent as SvgArrowBack } from '../../../icons/arrow-back.svg.js';
6
4
  import { ReactComponent as SvgClose } from '../../../icons/close.svg.js';
5
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
7
6
 
8
7
  const AssetPreviewTopBar = React__default.forwardRef(function AssetPreviewTopBar({
9
8
  onBackButtonClick,
@@ -16,29 +15,29 @@ const AssetPreviewTopBar = React__default.forwardRef(function AssetPreviewTopBar
16
15
  disabled,
17
16
  ...props
18
17
  }, forwardedRef) {
19
- return React__default.createElement(AssetPreviewTopBar$1, _extends({
18
+ return jsxs(AssetPreviewTopBar$1, {
20
19
  ref: forwardedRef,
21
20
  $shadow: shadow,
22
21
  $border: border,
23
- disabled: disabled
24
- }, props), React__default.createElement(BackButtonContainer, {
25
- onClick: onBackButtonClick,
26
- disabled: disabled
27
- }, backButtonAsClose ? React__default.createElement(React__default.Fragment, null, React__default.createElement(SvgClose, null), backButtonText) : React__default.createElement(BackHoverEffect, null, React__default.createElement(SvgArrowBack, null), backButtonText)), leftText && React__default.createElement(LeftText, null, leftText), Array.isArray(buttons) && React__default.createElement(ButtonsContainer, null, buttons.map((button, index) => React__default.createElement("span", {
28
- key: 'topBarButton-' + index
29
- }, button))));
22
+ disabled: disabled,
23
+ ...props,
24
+ children: [jsx(BackButtonContainer, {
25
+ onClick: onBackButtonClick,
26
+ disabled: disabled,
27
+ children: backButtonAsClose ? jsxs(Fragment, {
28
+ children: [jsx(SvgClose, {}), backButtonText]
29
+ }) : jsxs(BackHoverEffect, {
30
+ children: [jsx(SvgArrowBack, {}), backButtonText]
31
+ })
32
+ }), leftText && jsx(LeftText, {
33
+ children: leftText
34
+ }), Array.isArray(buttons) && jsx(ButtonsContainer, {
35
+ children: buttons.map((button, index) => jsx("span", {
36
+ children: button
37
+ }, 'topBarButton-' + index))
38
+ })]
39
+ });
30
40
  });
31
- AssetPreviewTopBar.propTypes = process.env.NODE_ENV !== "production" ? {
32
- onBackButtonClick: PropTypes.func.isRequired,
33
- backButtonText: PropTypes.string.isRequired,
34
- disabled: PropTypes.bool,
35
- backButtonAsClose: PropTypes.bool,
36
- leftText: PropTypes.string,
37
- shadow: PropTypes.bool,
38
- border: PropTypes.bool,
39
- buttons: PropTypes.arrayOf(PropTypes.node)
40
- } : {};
41
- AssetPreviewTopBar.defaultProps = {};
42
41
 
43
42
  export { AssetPreviewTopBar as default };
44
43
  //# sourceMappingURL=AssetPreviewTopBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssetPreviewTopBar.js","sources":["../../../../src/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport * as S from './AssetPreviewTopBar.styled';\n\nimport { ReactComponent as IconArrowBack } from '../../../../icons/arrow-back.svg';\nimport { ReactComponent as IconClose } from '../../../../icons/close.svg';\n\n/**\n * Top bar for asset preview.\n *\n * ### Import\n *\n * ``` js\n * import { AssetPreviewTopBar } from '@ntbjs/react-components/widgets'\n * // or\n * import AssetPreviewTopBar from '@ntbjs/react-components/AssetPreview/AssetPreviewTopBar'\n * ```\n * \n * ### Usage example\n * \n * ``` js\nconst button1 = <ActionButton key=\"btn1\"icon={<IconAddCircle />} />;\nconst button2 = <Button key=\"btn2\" secondary={true}>Edit</Button>;\nconst button3 = <Button key=\"btn3\" secondary={true}>Share</Button>;\nconst button4 = <Button key=\"btn4\">Download</Button>;\n\nconst topBar = <AssetPreviewTopBar backButtonText={t{\"Back\"}} onBackButtonClick={() => {}} buttons={[button1, button2, button3, button4]} />;\n * ```\n */\nconst AssetPreviewTopBar = React.forwardRef(function AssetPreviewTopBar(\n {\n onBackButtonClick,\n backButtonText,\n backButtonAsClose,\n leftText,\n buttons,\n shadow,\n border,\n disabled,\n ...props\n },\n forwardedRef\n) {\n return (\n <S.AssetPreviewTopBar\n ref={forwardedRef}\n $shadow={shadow}\n $border={border}\n disabled={disabled}\n {...props}\n >\n <S.BackButtonContainer onClick={onBackButtonClick} disabled={disabled}>\n {backButtonAsClose ? (\n <>\n <IconClose />\n {backButtonText}\n </>\n ) : (\n <S.BackHoverEffect>\n <IconArrowBack />\n {backButtonText}\n </S.BackHoverEffect>\n )}\n </S.BackButtonContainer>\n {leftText && <S.LeftText>{leftText}</S.LeftText>}\n {Array.isArray(buttons) && (\n <S.ButtonsContainer>\n {buttons.map((button, index) => (\n <span key={'topBarButton-' + index}>{button}</span>\n ))}\n </S.ButtonsContainer>\n )}\n </S.AssetPreviewTopBar>\n );\n});\n\nAssetPreviewTopBar.propTypes = {\n /**\n * On-click function for the back button\n */\n onBackButtonClick: PropTypes.func.isRequired,\n\n /**\n * Translatable text for the back button\n */\n backButtonText: PropTypes.string.isRequired,\n\n /**\n * Disable the back button\n */\n disabled: PropTypes.bool,\n\n /**\n * Display the back button as an X instead of an arrow\n */\n backButtonAsClose: PropTypes.bool,\n\n /**\n * Text to be displayed grayed out after the \"Back\" text – e.g. \"Asset selected\" in gallery\n */\n leftText: PropTypes.string,\n\n /**\n * Add a shadow on the bottom border of the top bar – e.g. in gallery view\n */\n shadow: PropTypes.bool,\n /**\n * Add a border on the bottom of the top bar\n */\n border: PropTypes.bool,\n\n /**\n * `Array` of buttons to be placed on the right side of the top bar\n */\n buttons: PropTypes.arrayOf(PropTypes.node)\n};\n\nAssetPreviewTopBar.defaultProps = {};\n\nexport default AssetPreviewTopBar;\n"],"names":["AssetPreviewTopBar","React","forwardRef","onBackButtonClick","backButtonText","backButtonAsClose","leftText","buttons","shadow","border","disabled","props","forwardedRef","createElement","S","_extends","ref","$shadow","$border","onClick","Fragment","IconClose","IconArrowBack","Array","isArray","map","button","index","key","propTypes","process","env","NODE_ENV","PropTypes","func","isRequired","string","bool","arrayOf","node","defaultProps"],"mappings":";;;;;;;AA6BMA,MAAAA,kBAAkB,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,kBAAkBA,CACrE;EACEG,iBAAiB;EACjBC,cAAc;EACdC,iBAAiB;EACjBC,QAAQ;EACRC,OAAO;EACPC,MAAM;EACNC,MAAM;EACNC,QAAQ;EACR,GAAGC,KAAAA;AACL,CAAC,EACDC,YAAY,EACZ;EACA,OACEX,cAAA,CAAAY,aAAA,CAACC,oBAAoB,EAAAC,QAAA,CAAA;AACnBC,IAAAA,GAAG,EAAEJ,YAAa;AAClBK,IAAAA,OAAO,EAAET,MAAO;AAChBU,IAAAA,OAAO,EAAET,MAAO;AAChBC,IAAAA,QAAQ,EAAEA,QAAAA;GACNC,EAAAA,KAAK,GAETV,cAAA,CAAAY,aAAA,CAACC,mBAAqB,EAAA;AAACK,IAAAA,OAAO,EAAEhB,iBAAkB;AAACO,IAAAA,QAAQ,EAAEA,QAAAA;AAAS,GAAA,EACnEL,iBAAiB,GAChBJ,cAAA,CAAAY,aAAA,CAAAZ,cAAA,CAAAmB,QAAA,EAAA,IAAA,EACEnB,cAAA,CAAAY,aAAA,CAACQ,QAAS,EAAA,IAAE,CAAC,EACZjB,cACD,CAAC,GAEHH,cAAA,CAAAY,aAAA,CAACC,eAAiB,EAAA,IAAA,EAChBb,cAAA,CAAAY,aAAA,CAACS,YAAa,MAAE,CAAC,EAChBlB,cACgB,CAEA,CAAC,EACvBE,QAAQ,IAAIL,cAAA,CAAAY,aAAA,CAACC,QAAU,EAAER,IAAAA,EAAAA,QAAqB,CAAC,EAC/CiB,KAAK,CAACC,OAAO,CAACjB,OAAO,CAAC,IACrBN,cAAA,CAAAY,aAAA,CAACC,gBAAkB,QAChBP,OAAO,CAACkB,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK,KACzB1B,cAAA,CAAAY,aAAA,CAAA,MAAA,EAAA;IAAMe,GAAG,EAAE,eAAe,GAAGD,KAAAA;AAAM,GAAA,EAAED,MAAa,CACnD,CACiB,CAEF,CAAC,CAAA;AAE3B,CAAC,EAAC;AAEF1B,kBAAkB,CAAC6B,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,KAAG,YAAA,GAAA;AAI7B7B,EAAAA,iBAAiB,EAAE8B,SAAS,CAACC,IAAI,CAACC,UAAU;AAK5C/B,EAAAA,cAAc,EAAE6B,SAAS,CAACG,MAAM,CAACD,UAAU;EAK3CzB,QAAQ,EAAEuB,SAAS,CAACI,IAAI;EAKxBhC,iBAAiB,EAAE4B,SAAS,CAACI,IAAI;EAKjC/B,QAAQ,EAAE2B,SAAS,CAACG,MAAM;EAK1B5B,MAAM,EAAEyB,SAAS,CAACI,IAAI;EAItB5B,MAAM,EAAEwB,SAAS,CAACI,IAAI;AAKtB9B,EAAAA,OAAO,EAAE0B,SAAS,CAACK,OAAO,CAACL,SAAS,CAACM,IAAI,CAAA;AAC3C,CAAC,GAAA,EAAA,CAAA;AAEDvC,kBAAkB,CAACwC,YAAY,GAAG,EAAE;;;;"}
1
+ {"version":3,"file":"AssetPreviewTopBar.js","sources":["../../../../src/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.tsx"],"sourcesContent":["import React from 'react';\nimport * as S from './AssetPreviewTopBar.styled';\n\nimport { ReactComponent as IconArrowBack } from '../../../../icons/arrow-back.svg';\nimport { ReactComponent as IconClose } from '../../../../icons/close.svg';\n\ntype AssetPreviewTopBarOwnProps = {\n /**\n * On-click function for the back button\n */\n onBackButtonClick: (...args: any[]) => any;\n /**\n * Translatable text for the back button\n */\n backButtonText: string;\n /**\n * Disable the back button\n */\n disabled?: boolean;\n /**\n * Display the back button as an X instead of an arrow\n */\n backButtonAsClose?: boolean;\n /**\n * Text to be displayed grayed out after the \"Back\" text – e.g. \"Asset selected\" in gallery\n */\n leftText?: string;\n /**\n * Add a shadow on the bottom border of the top bar – e.g. in gallery view\n */\n shadow?: boolean;\n /**\n * Add a border on the bottom of the top bar\n */\n border?: boolean;\n /**\n * `Array` of buttons to be placed on the right side of the top bar\n */\n buttons?: React.ReactNode[];\n};\n\n/*\n * NMB-3998 §C.2: `props` is spread onto `S.AssetPreviewTopBar`, 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 AssetPreviewTopBarOwnProps`);\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.AssetPreviewTopBar>,\n keyof AssetPreviewTopBarOwnProps\n> &\n AssetPreviewTopBarOwnProps;\n\n/**\n * Top bar for asset preview.\n *\n * ### Import\n *\n * ``` js\n * import { AssetPreviewTopBar } from '@ntbjs/react-components/widgets'\n * // or\n * import AssetPreviewTopBar from '@ntbjs/react-components/AssetPreview/AssetPreviewTopBar'\n * ```\n * \n * ### Usage example\n * \n * ``` js\nconst button1 = <ActionButton key=\"btn1\"icon={<IconAddCircle />} />;\nconst button2 = <Button key=\"btn2\" secondary={true}>Edit</Button>;\nconst button3 = <Button key=\"btn3\" secondary={true}>Share</Button>;\nconst button4 = <Button key=\"btn4\">Download</Button>;\n\nconst topBar = <AssetPreviewTopBar backButtonText={t{\"Back\"}} onBackButtonClick={() => {}} buttons={[button1, button2, button3, button4]} />;\n * ```\n */\nconst AssetPreviewTopBar = React.forwardRef<any, Props>(function AssetPreviewTopBar(\n {\n onBackButtonClick,\n backButtonText,\n backButtonAsClose,\n leftText,\n buttons,\n shadow,\n border,\n disabled,\n ...props\n },\n forwardedRef\n) {\n return (\n <S.AssetPreviewTopBar\n ref={forwardedRef}\n $shadow={shadow}\n $border={border}\n disabled={disabled}\n {...props}\n >\n <S.BackButtonContainer onClick={onBackButtonClick} disabled={disabled}>\n {backButtonAsClose ? (\n <>\n <IconClose />\n {backButtonText}\n </>\n ) : (\n <S.BackHoverEffect>\n <IconArrowBack />\n {backButtonText}\n </S.BackHoverEffect>\n )}\n </S.BackButtonContainer>\n {leftText && <S.LeftText>{leftText}</S.LeftText>}\n {Array.isArray(buttons) && (\n <S.ButtonsContainer>\n {buttons.map((button, index) => (\n <span key={'topBarButton-' + index}>{button}</span>\n ))}\n </S.ButtonsContainer>\n )}\n </S.AssetPreviewTopBar>\n );\n});\n\nexport default AssetPreviewTopBar;\n"],"names":["AssetPreviewTopBar","React","forwardRef","onBackButtonClick","backButtonText","backButtonAsClose","leftText","buttons","shadow","border","disabled","props","forwardedRef","_jsxs","S","ref","$shadow","$border","children","_jsx","onClick","_Fragment","IconClose","IconArrowBack","Array","isArray","map","button","index"],"mappings":";;;;;;AA4EA,MAAMA,kBAAkB,GAAGC,cAAK,CAACC,UAAU,CAAa,SAASF,kBAAkBA,CACjF;EACEG,iBAAiB;EACjBC,cAAc;EACdC,iBAAiB;EACjBC,QAAQ;EACRC,OAAO;EACPC,MAAM;EACNC,MAAM;EACNC,QAAQ;EACR,GAAGC;AACL,CAAC,EACDC,YAAY,EACZ;AACA,EAAA,OACEC,IAAA,CAACC,oBAAoB,EAAA;AACnBC,IAAAA,GAAG,EAAEH,YAAa;AAClBI,IAAAA,OAAO,EAAER,MAAO;AAChBS,IAAAA,OAAO,EAAER,MAAO;AAChBC,IAAAA,QAAQ,EAAEA,QAAS;AAAA,IAAA,GACfC,KAAK;AAAAO,IAAAA,QAAA,EAAA,CAETC,GAAA,CAACL,mBAAqB,EAAA;AAACM,MAAAA,OAAO,EAAEjB,iBAAkB;AAACO,MAAAA,QAAQ,EAAEA,QAAS;AAAAQ,MAAAA,QAAA,EACnEb,iBAAiB,GAChBQ,IAAA,CAAAQ,QAAA,EAAA;AAAAH,QAAAA,QAAA,GACEC,GAAA,CAACG,QAAS,EAAA,EAAE,CAAC,EACZlB,cAAc;AAAA,OACf,CAAC,GAEHS,IAAA,CAACC,eAAiB,EAAA;AAAAI,QAAAA,QAAA,GAChBC,GAAA,CAACI,YAAa,EAAA,EAAE,CAAC,EAChBnB,cAAc;OACE;KAEA,CAAC,EACvBE,QAAQ,IAAIa,GAAA,CAACL,QAAU,EAAA;AAAAI,MAAAA,QAAA,EAAEZ;AAAQ,KAAa,CAAC,EAC/CkB,KAAK,CAACC,OAAO,CAAClB,OAAO,CAAC,IACrBY,GAAA,CAACL,gBAAkB,EAAA;MAAAI,QAAA,EAChBX,OAAO,CAACmB,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK,KACzBT,GAAA,CAAA,MAAA,EAAA;AAAAD,QAAAA,QAAA,EAAqCS;OAAM,EAAhC,eAAe,GAAGC,KAAqB,CACnD;AAAC,KACgB,CACrB;AAAA,GACmB,CAAC;AAE3B,CAAC;;;;"}
@@ -6,83 +6,32 @@ const shouldForwardProp = prop => {
6
6
  };
7
7
  const AssetPreviewTopBar = styled.div.withConfig({
8
8
  shouldForwardProp
9
- }).attrs(applyDefaultTheme)`
10
- box-sizing: border-box;
11
- align-items: center;
12
- border-bottom: ${props => props.$border ? `1px solid` : `none`};
13
- color: inherit;
14
- display: flex;
15
- font-family: ${props => props.theme.primaryFontFamily};
16
- font-weight: 400;
17
- min-height: 72px;
18
- padding: 0 24px;
19
- width: 100%;
20
-
21
- ${props => props.theme.themeProp('border-color', props.theme.getColor('gray-800'), props.theme.getColor('gray-200'))}
22
-
23
- ${props => props.$shadow && props.theme.themeProp('box-shadow', '0 -2px 12px #505050', '0 -3px 12px #b0b6b9')}
24
-
25
- ${props => props.disabled && css`
26
- cursor: not-allowed;
27
- `}
28
- `;
9
+ }).attrs(applyDefaultTheme).withConfig({
10
+ displayName: "AssetPreviewTopBarstyled__AssetPreviewTopBar",
11
+ componentId: "sc-176gs3e-0"
12
+ })(["box-sizing:border-box;align-items:center;border-bottom:", ";color:inherit;display:flex;font-family:", ";font-weight:400;min-height:72px;padding:0 24px;width:100%;", " ", " ", ""], props => props.$border ? `1px solid` : `none`, props => props.theme.primaryFontFamily, props => props.theme.themeProp('border-color', props.theme.getColor('gray-800'), props.theme.getColor('gray-200')), props => props.$shadow && props.theme.themeProp('box-shadow', '0 -2px 12px #505050', '0 -3px 12px #b0b6b9'), props => props.disabled && css(["cursor:not-allowed;"]));
29
13
  const BackButtonContainer = styled.a.withConfig({
30
14
  shouldForwardProp
31
- }).attrs(applyDefaultTheme)`
32
- align-items: center;
33
- display: flex;
34
- font-size: 1.125rem;
35
- ${props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))};
36
-
37
- ${props => props.disabled && css`
38
- opacity: 0.5;
39
- pointer-events: none;
40
- `}
41
-
42
- &:hover {
43
- cursor: pointer;
44
- }
45
-
46
- > svg {
47
- height: 24px;
48
- margin-right: 16px;
49
- width: 24px;
50
- }
51
- `;
52
- const BackHoverEffect = styled.div`
53
- display: inline-flex;
54
- align-items: center;
55
-
56
- > svg {
57
- height: 24px;
58
- margin-right: 16px;
59
- width: 24px;
60
- transition: transform 0.3s ease-in-out;
61
- }
62
-
63
- &:hover > svg {
64
- transform: translateX(-2px);
65
- }
66
- `;
15
+ }).attrs(applyDefaultTheme).withConfig({
16
+ displayName: "AssetPreviewTopBarstyled__BackButtonContainer",
17
+ componentId: "sc-176gs3e-1"
18
+ })(["align-items:center;display:flex;font-size:1.125rem;", ";", " &:hover{cursor:pointer;}> svg{height:24px;margin-right:16px;width:24px;}"], props => props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900')), props => props.disabled && css(["opacity:0.5;pointer-events:none;"]));
19
+ const BackHoverEffect = styled.div.withConfig({
20
+ displayName: "AssetPreviewTopBarstyled__BackHoverEffect",
21
+ componentId: "sc-176gs3e-2"
22
+ })(["display:inline-flex;align-items:center;> svg{height:24px;margin-right:16px;width:24px;transition:transform 0.3s ease-in-out;}&:hover > svg{transform:translateX(-2px);}"]);
67
23
  const LeftText = styled.span.withConfig({
68
24
  shouldForwardProp
69
- }).attrs(applyDefaultTheme)`
70
- font-size: 1.125rem;
71
- margin-left: 16px;
72
-
73
- ${props => props.theme.themeProp('color', props.theme.getColor('gray-500'), props.theme.getColor('gray-400'))};
74
- `;
25
+ }).attrs(applyDefaultTheme).withConfig({
26
+ displayName: "AssetPreviewTopBarstyled__LeftText",
27
+ componentId: "sc-176gs3e-3"
28
+ })(["font-size:1.125rem;margin-left:16px;", ";"], props => props.theme.themeProp('color', props.theme.getColor('gray-500'), props.theme.getColor('gray-400')));
75
29
  const ButtonsContainer = styled.div.withConfig({
76
30
  shouldForwardProp
77
- }).attrs(applyDefaultTheme)`
78
- align-items: center;
79
- display: flex;
80
- margin-left: auto;
81
-
82
- > span {
83
- margin-left: 16px;
84
- }
85
- `;
31
+ }).attrs(applyDefaultTheme).withConfig({
32
+ displayName: "AssetPreviewTopBarstyled__ButtonsContainer",
33
+ componentId: "sc-176gs3e-4"
34
+ })(["align-items:center;display:flex;margin-left:auto;> span{margin-left:16px;}"]);
86
35
 
87
36
  export { AssetPreviewTopBar, BackButtonContainer, BackHoverEffect, ButtonsContainer, LeftText };
88
37
  //# sourceMappingURL=AssetPreviewTopBar.styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssetPreviewTopBar.styled.js","sources":["../../../../src/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.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 AssetPreviewTopBar = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n box-sizing: border-box;\n align-items: center;\n border-bottom: ${props => (props.$border ? `1px solid` : `none`)};\n color: inherit;\n display: flex;\n font-family: ${props => props.theme.primaryFontFamily};\n font-weight: 400;\n min-height: 72px;\n padding: 0 24px;\n width: 100%;\n\n ${props =>\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-800'),\n props.theme.getColor('gray-200')\n )}\n\n ${props =>\n props.$shadow &&\n props.theme.themeProp('box-shadow', '0 -2px 12px #505050', '0 -3px 12px #b0b6b9')}\n\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `}\n`;\n\nexport const BackButtonContainer = styled.a\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-items: center;\n display: flex;\n font-size: 1.125rem;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )};\n\n ${props =>\n props.disabled &&\n css`\n opacity: 0.5;\n pointer-events: none;\n `}\n\n &:hover {\n cursor: pointer;\n }\n\n > svg {\n height: 24px;\n margin-right: 16px;\n width: 24px;\n }\n`;\n\nexport const BackHoverEffect = styled.div`\n display: inline-flex;\n align-items: center;\n\n > svg {\n height: 24px;\n margin-right: 16px;\n width: 24px;\n transition: transform 0.3s ease-in-out;\n }\n\n &:hover > svg {\n transform: translateX(-2px);\n }\n`;\n\nexport const LeftText = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-size: 1.125rem;\n margin-left: 16px;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-400')\n )};\n`;\n\nexport const ButtonsContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-items: center;\n display: flex;\n margin-left: auto;\n\n > span {\n margin-left: 16px;\n }\n`;\n"],"names":["shouldForwardProp","prop","startsWith","AssetPreviewTopBar","styled","div","withConfig","attrs","applyDefaultTheme","props","$border","theme","primaryFontFamily","themeProp","getColor","$shadow","disabled","css","BackButtonContainer","a","BackHoverEffect","LeftText","span","ButtonsContainer"],"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,kBAAkB,GAAGC,MAAM,CAACC,GAAG,CACzCC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA,iBAAmBC,EAAAA,KAAK,IAAKA,KAAK,CAACC,OAAO,GAAG,CAAA,SAAA,CAAW,GAAG,CAAO,IAAA,CAAA,CAAA;AAClE;AACA;AACA,eAAA,EAAiBD,KAAK,IAAIA,KAAK,CAACE,KAAK,CAACC,iBAAiB,CAAA;AACvD;AACA;AACA;AACA;AACA;AACA,EAAIH,EAAAA,KAAK,IACLA,KAAK,CAACE,KAAK,CAACE,SAAS,CACnB,cAAc,EACdJ,KAAK,CAACE,KAAK,CAACG,QAAQ,CAAC,UAAU,CAAC,EAChCL,KAAK,CAACE,KAAK,CAACG,QAAQ,CAAC,UAAU,CACjC,CAAC,CAAA;AACL;AACA,EAAA,EAAIL,KAAK,IACLA,KAAK,CAACM,OAAO,IACbN,KAAK,CAACE,KAAK,CAACE,SAAS,CAAC,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,CAAC,CAAA;AACrF;AACA,MAAA,EAAQJ,KAAK,IACLA,KAAK,CAACO,QAAQ,IACdC,GAAG,CAAA;AACX;AACA,QAAS,CAAA,CAAA;AACT,EAAC;AAEM,MAAMC,mBAAmB,GAAGd,MAAM,CAACe,CAAC,CACxCb,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA;AACA,EAAIC,EAAAA,KAAK,IACLA,KAAK,CAACE,KAAK,CAACE,SAAS,CACnB,OAAO,EACPJ,KAAK,CAACE,KAAK,CAACG,QAAQ,CAAC,UAAU,CAAC,EAChCL,KAAK,CAACE,KAAK,CAACG,QAAQ,CAAC,UAAU,CACjC,CAAC,CAAA;AACL;AACA,EAAA,EAAIL,KAAK,IACLA,KAAK,CAACO,QAAQ,IACdC,GAAG,CAAA;AACP;AACA;AACA,IAAK,CAAA,CAAA;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AAEYG,MAAAA,eAAe,GAAGhB,MAAM,CAACC,GAAG,CAAA;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;AAEM,MAAMgB,QAAQ,GAAGjB,MAAM,CAACkB,IAAI,CAChChB,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA;AACA,EAAIC,EAAAA,KAAK,IACLA,KAAK,CAACE,KAAK,CAACE,SAAS,CACnB,OAAO,EACPJ,KAAK,CAACE,KAAK,CAACG,QAAQ,CAAC,UAAU,CAAC,EAChCL,KAAK,CAACE,KAAK,CAACG,QAAQ,CAAC,UAAU,CACjC,CAAC,CAAA;AACL,EAAC;AAEM,MAAMS,gBAAgB,GAAGnB,MAAM,CAACC,GAAG,CACvCC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"AssetPreviewTopBar.styled.js","sources":["../../../../src/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.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, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../../utils/defaultTheme';\n\n/**\n * `disabled` — `PropTypes.bool`, greys out the back button.\n *\n * NO `$`, AND THAT IS A DEFECT THAT IS ALREADY IN THE RENDER BASELINE. React recognises\n * `disabled` and renders it as a bare boolean attribute on any element, so\n * `widgets/AssetPreviewTopBar#disabled` in `scripts/r19-harness/baseline.json` records\n * `<div disabled=\"\">` AND `<a disabled=\"\">`. Renaming it `$disabled` removes both\n * attributes and therefore MOVES the baseline — C10 work, §E.4.\n *\n * Note it also has to be DECLARED to be read at all: `disabled` is a member of neither\n * `HTMLAttributes<HTMLDivElement>` nor `AnchorHTMLAttributes<HTMLAnchorElement>`. That is\n * the same asymmetry §J.9 records for `CompactTextInput` — there the identical read on an\n * `<input>` needs no declaration, because `InputHTMLAttributes` really does have it.\n *\n * Hosts: `AssetPreviewTopBar` and `BackButtonContainer`.\n */\ninterface AssetPreviewTopBarDisabledStyleProps {\n disabled?: boolean;\n}\n\n/** The top bar root, i.e. what `AssetPreviewTopBar.tsx` passes to it. */\nexport interface AssetPreviewTopBarStyleProps extends AssetPreviewTopBarDisabledStyleProps {\n /** `border` — `PropTypes.bool`; swaps `border-bottom` between `1px solid` and `none`. */\n $border?: boolean;\n /** `shadow` — `PropTypes.bool`. Read as `props.$shadow && props.theme.themeProp(…)`,\n * which evaluates to `false | RuleSet` — a valid `Interpolation`. A BARE\n * `${props => props.$shadow}` would not be: `Interpolation` accepts `Falsy` but not\n * `true`, so it would be TS2345 even with the prop correctly typed `boolean`. §J.5. */\n $shadow?: 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 AssetPreviewTopBar = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<AssetPreviewTopBarStyleProps>(applyDefaultTheme)`\n box-sizing: border-box;\n align-items: center;\n border-bottom: ${props => (props.$border ? `1px solid` : `none`)};\n color: inherit;\n display: flex;\n font-family: ${props => props.theme.primaryFontFamily};\n font-weight: 400;\n min-height: 72px;\n padding: 0 24px;\n width: 100%;\n\n ${props =>\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-800'),\n props.theme.getColor('gray-200')\n )}\n\n ${props =>\n props.$shadow &&\n props.theme.themeProp('box-shadow', '0 -2px 12px #505050', '0 -3px 12px #b0b6b9')}\n\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `}\n`;\n\nexport const BackButtonContainer = styled.a\n .withConfig({\n shouldForwardProp\n })\n .attrs<AssetPreviewTopBarDisabledStyleProps>(applyDefaultTheme)`\n align-items: center;\n display: flex;\n font-size: 1.125rem;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )};\n\n ${props =>\n props.disabled &&\n css`\n opacity: 0.5;\n pointer-events: none;\n `}\n\n &:hover {\n cursor: pointer;\n }\n\n > svg {\n height: 24px;\n margin-right: 16px;\n width: 24px;\n }\n`;\n\nexport const BackHoverEffect = styled.div`\n display: inline-flex;\n align-items: center;\n\n > svg {\n height: 24px;\n margin-right: 16px;\n width: 24px;\n transition: transform 0.3s ease-in-out;\n }\n\n &:hover > svg {\n transform: translateX(-2px);\n }\n`;\n\nexport const LeftText = styled.span\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-size: 1.125rem;\n margin-left: 16px;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-400')\n )};\n`;\n\nexport const ButtonsContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-items: center;\n display: flex;\n margin-left: auto;\n\n > span {\n margin-left: 16px;\n }\n`;\n"],"names":["shouldForwardProp","prop","startsWith","AssetPreviewTopBar","styled","div","withConfig","attrs","applyDefaultTheme","displayName","componentId","props","$border","theme","primaryFontFamily","themeProp","getColor","$shadow","disabled","css","BackButtonContainer","a","BackHoverEffect","LeftText","span","ButtonsContainer"],"mappings":";;;AA4CA,MAAMA,iBAAiB,GAAIC,IAAY,IAAc;EACnD,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC;AAClD,CAAC;AAEM,MAAMC,kBAAkB,GAAGC,MAAM,CAACC,GAAG,CACzCC,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAA+BC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,8CAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,yDAAA,EAAA,0CAAA,EAAA,6DAAA,EAAA,GAAA,EAAA,GAAA,EAAA,EAAA,CAAA,EAGtCC,KAAK,IAAKA,KAAK,CAACC,OAAO,GAAG,CAAA,SAAA,CAAW,GAAG,CAAA,IAAA,CAAO,EAGjDD,KAAK,IAAIA,KAAK,CAACE,KAAK,CAACC,iBAAiB,EAMnDH,KAAK,IACLA,KAAK,CAACE,KAAK,CAACE,SAAS,CACnB,cAAc,EACdJ,KAAK,CAACE,KAAK,CAACG,QAAQ,CAAC,UAAU,CAAC,EAChCL,KAAK,CAACE,KAAK,CAACG,QAAQ,CAAC,UAAU,CACjC,CAAC,EAEDL,KAAK,IACLA,KAAK,CAACM,OAAO,IACbN,KAAK,CAACE,KAAK,CAACE,SAAS,CAAC,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,CAAC,EAE7EJ,K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AC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,4CAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,4EAAA,CAAA;;;;"}
@@ -1,23 +1,24 @@
1
- import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import React__default from 'react';
3
- import PropTypes from 'prop-types';
2
+ import { useFloatingTree, FloatingTree } from '@floating-ui/react';
4
3
  import { ContextMenu as ContextMenu$1 } from './ContextMenu.styled.js';
4
+ import { jsx } from 'react/jsx-runtime';
5
5
 
6
6
  const ContextMenu = React__default.forwardRef(function ContextMenu({
7
7
  children,
8
8
  ...props
9
9
  }, forwardedRef) {
10
10
  const filteredProps = Object.fromEntries(Object.entries(props).filter(([key]) => key !== 'sublevel'));
11
- return React__default.createElement(ContextMenu$1, _extends({
12
- ref: forwardedRef
13
- }, filteredProps, {
14
- role: "menu"
15
- }), children);
11
+ const hasTree = useFloatingTree() !== null;
12
+ const menu = jsx(ContextMenu$1, {
13
+ ref: forwardedRef,
14
+ ...filteredProps,
15
+ role: "menu",
16
+ children: children
17
+ });
18
+ return hasTree ? menu : jsx(FloatingTree, {
19
+ children: menu
20
+ });
16
21
  });
17
- ContextMenu.propTypes = process.env.NODE_ENV !== "production" ? {
18
- children: PropTypes.any
19
- } : {};
20
- ContextMenu.defaultProps = {};
21
22
 
22
23
  export { ContextMenu as default };
23
24
  //# sourceMappingURL=ContextMenu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.js","sources":["../../../src/components/widgets/ContextMenu/ContextMenu.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport * as S from './ContextMenu.styled';\n\n/**\n * This component wraps around an array of `ContextMenuItems` to display a context menu.\n *\n * In most use-cases, the `ContextMenu` will be wrapped in a `Popover` to provide the functionality for opening/closing and placing the menu.\n * In such cases, send the `ContextMenu` to the `Popover` as its `content` prop.\n *\n * The context menu and sublevels will automatically adjust their placement in relation to the element that opens it\n * based on available space if the provided placement doesn't work. See the `Popover` documentation for further instructions on placement.\n *\n * ### Import\n *\n * ``` js\n * import { ContextMenu } from '@ntbjs/react-components/widgets'\n * // or\n * import ContextMenu from '@ntbjs/react-components/widgets/ContextMenu'\n * ```\n * \n * ### Usage examples \n * #### Plain context menu\n * \n * ``` js\n\nconst item1 = <ContextMenuItem title=\"Download\" onClick={onClickEffect} key=\"item-1\" />;\nconst item2 = <ContextMenuItem title=\"Delete\" icon={<IconDelete />} onClick={onClickEffect} key=\"item-2\" />;\n\n<Popover content={<ContextMenu {...args}>{[item1, itemGroup1, item2]}</ContextMenu>} contextMenu={true}>\n Click here to open\n</Popover>\n```\n * \n * #### Context menu with grouped items\n * Use the `ContextMenuItemsGroup` component to group menu items together. Grouped items will not show borders\n * between themselves, indicating that their actions are related.\n * \n * ``` js\n\nconst item1 = <ContextMenuItem title=\"Download\" onClick={onClickEffect} key=\"item-1\" />;\nconst item2 = <ContextMenuItem title=\"Delete\" icon={<IconDelete />} onClick={onClickEffect} key=\"item-2\" />;\n\nconst groupItem1 = <ContextMenuItem title=\"Edit in Mediebank\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"group-item-1\" />:\nconst groupItem2 = <ContextMenuItem title=\"Edit in Photoshop\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"group-item-2\" />;\nconst groupItem3 = <ContextMenuItem title=\"Edit in Illustrator\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"group-item-3\" />;\n\nconst itemGroup1 = <ContextMenuItemsGroup key=\"item-group-1\">{[groupItem1, groupItem2, groupItem3]}</ContextMenuItemsGroup>;\n\n<Popover content={<ContextMenu {...args}>{[item1, itemGroup1, item2]}</ContextMenu>} contextMenu={true}>\n Click here to open\n</Popover>\n```\n * \n * #### Context menu with sublevels\n * Wrap a `ContextMenuItem` in a `Popover` and pass it a `ContextMenu` as child to create a sublevel/submenu. \n * A sublevel will by default be placed adjacent and aligned with the `ContextMenuItem` which opens it,\n * and adjust automatically based on available space.\n * \n * Set the `contextMenu` and `contextMenuSublevel` props of the `Popover` containing the sublevel to `true`.\n * \n * Set the `opensSublevel` prop of the `ContextMenuItem` containing the sublevel to `true`.\n * \n * ``` js\n\nconst item1 = <ContextMenuItem title=\"Download\" onClick={onClickEffect} key=\"item-1\" />;\nconst item2 = <ContextMenuItem title=\"Delete\" icon={<IconDelete />} onClick={onClickEffect} hoverBackgroundColors={['#fbeae6', '#fbeae6']} key=\"item-2\" />;\n\nconst subItem1 = <ContextMenuItem title=\"Edit in Mediebank\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"sub-item-1\" />\nconst subItem2 = <ContextMenuItem title=\"Edit in Photoshop\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"sub-item-2\" />\nconst subItem3 = <ContextMenuItem title=\"Edit in Illustrator\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"sub-item-3\" />\n\nconst itemWithSublevel = (\n <Popover\n content={\n <ContextMenu sublevel={true}>\n {[subItem1, subItem2, subItem3, subItem4, subItem5]}\n </ContextMenu>\n }\n contextMenu={true}\n contextMenuSublevel={true}\n key=\"item-3\"\n >\n <ContextMenuItem title=\"Open level 2\" opensSublevel={true} />\n </Popover>\n);\n\n<Popover content={<ContextMenu {...args}>{[item1, item2, itemWithSublevel]}</ContextMenu>} contextMenu={true}>\n Click here to open\n</Popover>\n```\n * \n * \n * #### Context menu from a dropdown button\n * When used with a dropdown button, the `Button` component takes care of wrapping the menu items in a `Popover`.\n * Just pass the array of `ContextMenuItems` directly into the `Button` as its children.\n * \n * ``` js\n\nconst item1 = <ContextMenuItem title=\"Edit in Mediebank\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"item-1\" />;\nconst item2 = <ContextMenuItem title=\"Edit in Photoshop\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"item-2\" />;\nconst item3 = <ContextMenuItem title=\"Edit in Illustrator\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"item-3\" />;\n\n<Button onClick={onClickEffect} dropdownItems={<ContextMenu {...args}>{[item1, item2, item3, item4, item5]}</ContextMenu>}>\n Button text\n</Button>\n```\n *\n */\nconst ContextMenu = React.forwardRef(function ContextMenu({ children, ...props }, forwardedRef) {\n const filteredProps = Object.fromEntries(\n Object.entries(props).filter(([key]) => key !== 'sublevel')\n );\n\n return (\n <S.ContextMenu ref={forwardedRef} {...filteredProps} role=\"menu\">\n {children}\n </S.ContextMenu>\n );\n});\n\nContextMenu.propTypes = {\n /**\n * An array containing nodes of the `ContextMenuItem` component\n */\n children: PropTypes.any\n};\n\nContextMenu.defaultProps = {};\n\nexport default ContextMenu;\n"],"names":["ContextMenu","React","forwardRef","children","props","forwardedRef","filteredProps","Object","fromEntries","entries","filter","key","createElement","S","_extends","ref","role","propTypes","process","env","NODE_ENV","PropTypes","any","defaultProps"],"mappings":";;;;;AA6GMA,MAAAA,WAAW,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,WAAWA,CAAC;EAAEG,QAAQ;EAAE,GAAGC,KAAAA;AAAM,CAAC,EAAEC,YAAY,EAAE;EAC9F,MAAMC,aAAa,GAAGC,MAAM,CAACC,WAAW,CACtCD,MAAM,CAACE,OAAO,CAACL,KAAK,CAAC,CAACM,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,KAAKA,GAAG,KAAK,UAAU,CAC5D,CAAC,CAAA;EAED,OACEV,cAAA,CAAAW,aAAA,CAACC,aAAa,EAAAC,QAAA,CAAA;AAACC,IAAAA,GAAG,EAAEV,YAAAA;AAAa,GAAA,EAAKC,aAAa,EAAA;AAAEU,IAAAA,IAAI,EAAC,MAAA;AAAM,GAAA,CAAA,EAC7Db,QACY,CAAC,CAAA;AAEpB,CAAC,EAAC;AAEFH,WAAW,CAACiB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,KAAG,YAAA,GAAA;EAItBjB,QAAQ,EAAEkB,SAAS,CAACC,GAAAA;AACtB,CAAC,GAAA,EAAA,CAAA;AAEDtB,WAAW,CAACuB,YAAY,GAAG,EAAE;;;;"}
1
+ {"version":3,"file":"ContextMenu.js","sources":["../../../src/components/widgets/ContextMenu/ContextMenu.tsx"],"sourcesContent":["import React from 'react';\n\nimport { FloatingTree, useFloatingTree } from '@floating-ui/react';\n\nimport * as S from './ContextMenu.styled';\n\ntype ContextMenuOwnProps = {\n /**\n * An array containing nodes of the `ContextMenuItem` component\n */\n children?: any;\n /**\n * Marks this menu as the sublevel/submenu of another context menu.\n *\n * NOT DECLARED BY THE OLD propTypes, so the codemod could not emit it; the widening\n * pass reported it as a `(dynamic key)` undeclared read but cannot type it, because\n * `S.ContextMenu` is a `styled.div` and `sublevel` is not an HTML attribute. Declared\n * by hand so the documented usage in this file's own JSDoc and in\n * `ContextMenu.stories.tsx:103` keeps compiling.\n *\n * PRE-EXISTING FINDING, DELIBERATELY NOT FIXED HERE: nothing reads it. The component\n * strips it out of the spread —\n * `Object.entries(props).filter(([key]) => key !== 'sublevel')` — so it reaches\n * neither the DOM nor `ContextMenu.styled.ts`, which reads no prop at all. The\n * sublevel placement it appears to request is actually driven by the *`Popover`*'s\n * `contextMenuSublevel`, which the stories set on the same element. So this is a\n * documented public prop that is a no-op. Removing it is an API break and belongs in\n * its own commit with its own decision; keeping the declaration records the API as it\n * is published today rather than as we wish it were.\n */\n sublevel?: boolean;\n};\n\n/*\n * NMB-3998 §C.2: `props` is spread onto `S.ContextMenu`, 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 ContextMenuOwnProps`);\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.ContextMenu>, keyof ContextMenuOwnProps> &\n ContextMenuOwnProps;\n\n/**\n * This component wraps around an array of `ContextMenuItems` to display a context menu.\n *\n * In most use-cases, the `ContextMenu` will be wrapped in a `Popover` to provide the functionality for opening/closing and placing the menu.\n * In such cases, send the `ContextMenu` to the `Popover` as its `content` prop.\n *\n * The context menu and sublevels will automatically adjust their placement in relation to the element that opens it\n * based on available space if the provided placement doesn't work. See the `Popover` documentation for further instructions on placement.\n *\n * ### Import\n *\n * ``` js\n * import { ContextMenu } from '@ntbjs/react-components/widgets'\n * // or\n * import ContextMenu from '@ntbjs/react-components/widgets/ContextMenu'\n * ```\n * \n * ### Usage examples \n * #### Plain context menu\n * \n * ``` js\n\nconst item1 = <ContextMenuItem title=\"Download\" onClick={onClickEffect} key=\"item-1\" />;\nconst item2 = <ContextMenuItem title=\"Delete\" icon={<IconDelete />} onClick={onClickEffect} key=\"item-2\" />;\n\n<Popover content={<ContextMenu {...args}>{[item1, itemGroup1, item2]}</ContextMenu>} contextMenu={true}>\n Click here to open\n</Popover>\n```\n * \n * #### Context menu with grouped items\n * Use the `ContextMenuItemsGroup` component to group menu items together. Grouped items will not show borders\n * between themselves, indicating that their actions are related.\n * \n * ``` js\n\nconst item1 = <ContextMenuItem title=\"Download\" onClick={onClickEffect} key=\"item-1\" />;\nconst item2 = <ContextMenuItem title=\"Delete\" icon={<IconDelete />} onClick={onClickEffect} key=\"item-2\" />;\n\nconst groupItem1 = <ContextMenuItem title=\"Edit in Mediebank\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"group-item-1\" />:\nconst groupItem2 = <ContextMenuItem title=\"Edit in Photoshop\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"group-item-2\" />;\nconst groupItem3 = <ContextMenuItem title=\"Edit in Illustrator\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"group-item-3\" />;\n\nconst itemGroup1 = <ContextMenuItemsGroup key=\"item-group-1\">{[groupItem1, groupItem2, groupItem3]}</ContextMenuItemsGroup>;\n\n<Popover content={<ContextMenu {...args}>{[item1, itemGroup1, item2]}</ContextMenu>} contextMenu={true}>\n Click here to open\n</Popover>\n```\n * \n * #### Context menu with sublevels\n * Wrap a `ContextMenuItem` in a `Popover` and pass it a `ContextMenu` as child to create a sublevel/submenu. \n * A sublevel will by default be placed adjacent and aligned with the `ContextMenuItem` which opens it,\n * and adjust automatically based on available space.\n * \n * Set the `contextMenu` and `contextMenuSublevel` props of the `Popover` containing the sublevel to `true`.\n * \n * Set the `opensSublevel` prop of the `ContextMenuItem` containing the sublevel to `true`.\n * \n * ``` js\n\nconst item1 = <ContextMenuItem title=\"Download\" onClick={onClickEffect} key=\"item-1\" />;\nconst item2 = <ContextMenuItem title=\"Delete\" icon={<IconDelete />} onClick={onClickEffect} hoverBackgroundColors={['#fbeae6', '#fbeae6']} key=\"item-2\" />;\n\nconst subItem1 = <ContextMenuItem title=\"Edit in Mediebank\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"sub-item-1\" />\nconst subItem2 = <ContextMenuItem title=\"Edit in Photoshop\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"sub-item-2\" />\nconst subItem3 = <ContextMenuItem title=\"Edit in Illustrator\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"sub-item-3\" />\n\nconst itemWithSublevel = (\n <Popover\n content={\n <ContextMenu sublevel={true}>\n {[subItem1, subItem2, subItem3, subItem4, subItem5]}\n </ContextMenu>\n }\n contextMenu={true}\n contextMenuSublevel={true}\n key=\"item-3\"\n >\n <ContextMenuItem title=\"Open level 2\" opensSublevel={true} />\n </Popover>\n);\n\n<Popover content={<ContextMenu {...args}>{[item1, item2, itemWithSublevel]}</ContextMenu>} contextMenu={true}>\n Click here to open\n</Popover>\n```\n * \n * \n * #### Context menu from a dropdown button\n * When used with a dropdown button, the `Button` component takes care of wrapping the menu items in a `Popover`.\n * Just pass the array of `ContextMenuItems` directly into the `Button` as its children.\n * \n * ``` js\n\nconst item1 = <ContextMenuItem title=\"Edit in Mediebank\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"item-1\" />;\nconst item2 = <ContextMenuItem title=\"Edit in Photoshop\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"item-2\" />;\nconst item3 = <ContextMenuItem title=\"Edit in Illustrator\" icon={<IconDesignServices />} onClick={onClickEffect} key=\"item-3\" />;\n\n<Button onClick={onClickEffect} dropdownItems={<ContextMenu {...args}>{[item1, item2, item3, item4, item5]}</ContextMenu>}>\n Button text\n</Button>\n```\n *\n */\nconst ContextMenu = React.forwardRef<any, Props>(function ContextMenu(\n { children, ...props },\n forwardedRef\n) {\n const filteredProps = Object.fromEntries(\n Object.entries(props).filter(([key]) => key !== 'sublevel')\n );\n\n /*\n * NMB-3998, plan C5: WHERE THE `FloatingTree` PROVIDER LIVES.\n *\n * C5 settles it as \"at the nesting site, not inside `Popover`\", so that a standalone\n * `Popover` needs no tree — and `useFloatingPopover` renders no provider, which is what\n * makes that possible. This is the nesting site: a submenu is a `Popover` wrapped around a\n * `ContextMenuItem` INSIDE a `ContextMenu` (see this component's own JSDoc, \"Context menu\n * with sublevels\").\n *\n * ONLY THE ROOT MENU CREATES ONE. `useFloatingTree()` returns the nearest provider or\n * `null`, so a submenu's own `ContextMenu` reuses its ancestor's tree instead of starting a\n * second one. Without that check every level would get a private tree, each containing a\n * single node, and `getChildren()` would be empty everywhere — which is to say the check is\n * the entire mechanism, not a micro-optimisation.\n *\n * WHAT IT BUYS, STATED HONESTLY, BECAUSE IT IS LESS THAN C5 ASSUMED:\n *\n * - With THREE or more levels it is load-bearing. `useDismiss` consults\n * `getChildren(tree, nodeId)` and refuses to dismiss a menu whose child is still open, so\n * a press inside a third-level menu no longer closes the second-level menu that owns it.\n * - With TWO levels — every case that exists in this library and in both consumers today —\n * it is INERT, because the second level has no children of its own.\n * - It can NEVER link the outermost `Popover` to its submenus, and no placement inside this\n * component could. This provider is rendered by the menu, which is the `Popover`'s\n * `content`, i.e. BELOW it in the React tree; the outer `Popover`'s `useFloatingTree()`\n * is therefore `null` and it never registers a node. That is a real limit of C5's\n * placement, not an implementation shortcut. The two behaviours that would otherwise have\n * needed it are both delivered another way and both depend on plan C4's INLINE default:\n * * the parent staying open while its submenu is used — the submenu's floating element\n * is a DOM descendant of the parent's, so `useDismiss`'s\n * `isEventTargetWithin(event, elements.floating)` already covers it;\n * * the whole chain closing when a leaf item is clicked — the click bubbles from the\n * submenu into the parent's own delegated handler (`handleContextMenuClick` in\n * `Popover.tsx`, where this is written out).\n * If sublevels are ever portalled, both stop working and the fix is to hoist a\n * `FloatingTree` above the outermost `Popover` — which means either `Popover`\n * self-wrapping when it has no parent node, or a consumer-visible wrapper. That is a\n * decision, and re-opening C5 is the right way to take it.\n *\n * It renders no DOM — `FloatingTree` is a context provider and nothing else — so neither\n * the markup nor the CSS in `baseline.json` moves because of this, and the standalone\n * `Popover` path is untouched.\n */\n const hasTree = useFloatingTree() !== null;\n\n const menu = (\n <S.ContextMenu ref={forwardedRef} {...filteredProps} role=\"menu\">\n {children}\n </S.ContextMenu>\n );\n\n return hasTree ? menu : <FloatingTree>{menu}</FloatingTree>;\n});\n\nexport default ContextMenu;\n"],"names":["ContextMenu","React","forwardRef","children","props","forwardedRef","filteredProps","Object","fromEntries","entries","filter","key","hasTree","useFloatingTree","menu","_jsx","S","ref","role","FloatingTree"],"mappings":";;;;;AAoJA,MAAMA,WAAW,GAAGC,cAAK,CAACC,UAAU,CAAa,SAASF,WAAWA,CACnE;EAAEG,QAAQ;EAAE,GAAGC;AAAM,CAAC,EACtBC,YAAY,EACZ;EACA,MAAMC,aAAa,GAAGC,MAAM,CAACC,WAAW,CACtCD,MAAM,CAACE,OAAO,CAACL,KAAK,CAAC,CAACM,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,KAAKA,GAAG,KAAK,UAAU,CAC5D,CAAC;AA6CD,EAAA,MAAMC,OAAO,GAAGC,eAAe,EAAE,KAAK,IAAI;AAE1C,EAAA,MAAMC,IAAI,GACRC,GAAA,CAACC,aAAa,EAAA;AAACC,IAAAA,GAAG,EAAEZ,YAAa;AAAA,IAAA,GAAKC,aAAa;AAAEY,IAAAA,IAAI,EAAC,MAAM;AAAAf,IAAAA,QAAA,EAC7DA;AAAQ,GACI,CAChB;AAED,EAAA,OAAOS,OAAO,GAAGE,IAAI,GAAGC,GAAA,CAACI,YAAY,EAAA;AAAAhB,IAAAA,QAAA,EAAEW;AAAI,GAAe,CAAC;AAC7D,CAAC;;;;"}
@@ -6,10 +6,10 @@ const shouldForwardProp = prop => {
6
6
  };
7
7
  const ContextMenu = styled.div.withConfig({
8
8
  shouldForwardProp
9
- }).attrs(applyDefaultTheme)`
10
- font-family: ${props => props.theme.primaryFontFamily};
11
- padding: 3px 0;
12
- `;
9
+ }).attrs(applyDefaultTheme).withConfig({
10
+ displayName: "ContextMenustyled__ContextMenu",
11
+ componentId: "sc-11pdycr-0"
12
+ })(["font-family:", ";padding:3px 0;"], props => props.theme.primaryFontFamily);
13
13
 
14
14
  export { ContextMenu };
15
15
  //# sourceMappingURL=ContextMenu.styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.styled.js","sources":["../../../src/components/widgets/ContextMenu/ContextMenu.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 ContextMenu = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-family: ${props => props.theme.primaryFontFamily};\n padding: 3px 0;\n`;\n"],"names":["shouldForwardProp","prop","startsWith","ContextMenu","styled","div","withConfig","attrs","applyDefaultTheme","props","theme","primaryFontFamily"],"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,WAAW,GAAGC,MAAM,CAACC,GAAG,CAClCC,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;;;;"}
1
+ {"version":3,"file":"ContextMenu.styled.js","sources":["../../../src/components/widgets/ContextMenu/ContextMenu.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 ContextMenu = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-family: ${props => props.theme.primaryFontFamily};\n padding: 3px 0;\n`;\n"],"names":["shouldForwardProp","prop","startsWith","ContextMenu","styled","div","withConfig","attrs","applyDefaultTheme","displayName","componentId","props","theme","primaryFontFamily"],"mappings":";;;AAwBA,MAAMA,iBAAiB,GAAIC,IAAY,IAAc;EACnD,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC;AAClD,CAAC;AAEM,MAAMC,WAAW,GAAGC,MAAM,CAACC,GAAG,CAClCC,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,gCAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,cAAA,EAAA,iBAAA,CAAA,EACVC,KAAK,IAAIA,KAAK,CAACC,KAAK,CAACC,iBAAiB;;;;"}
@@ -1,44 +1,36 @@
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 { ContextMenuItem as ContextMenuItem$1, IconContainer, Label, SublevelIconContainer } from './ContextMenuItem.styled.js';
5
3
  import { ReactComponent as SvgTriangleRight } from '../../../icons/triangle-right.svg.js';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
5
 
7
6
  const ContextMenuItem = React__default.forwardRef(function ContextMenuItem({
8
7
  title,
9
- icon,
8
+ icon = undefined,
10
9
  onClickEffect,
11
- opensSublevel,
12
- hoverColors,
13
- hoverBackgroundColors,
10
+ opensSublevel = false,
11
+ hoverColors = undefined,
12
+ hoverBackgroundColors = undefined,
14
13
  ...props
15
14
  }, forwardedRef) {
16
- return React__default.createElement(ContextMenuItem$1, _extends({
15
+ return jsxs(ContextMenuItem$1, {
17
16
  ref: forwardedRef,
18
17
  $icon: icon,
19
18
  onClick: onClickEffect,
20
19
  $hoverColors: hoverColors,
21
20
  $hoverBackgroundColors: hoverBackgroundColors,
22
21
  $openssublevel: opensSublevel,
23
- className: opensSublevel ? 'context-menu-item opens-sublevel' : 'context-menu-item'
24
- }, props, {
25
- role: "menuitem"
26
- }), icon && React__default.createElement(IconContainer, null, icon), React__default.createElement(Label, null, title), opensSublevel && React__default.createElement(SublevelIconContainer, null, React__default.createElement(SvgTriangleRight, null)));
22
+ className: opensSublevel ? 'context-menu-item opens-sublevel' : 'context-menu-item',
23
+ ...props,
24
+ role: "menuitem",
25
+ children: [icon && jsx(IconContainer, {
26
+ children: icon
27
+ }), jsx(Label, {
28
+ children: title
29
+ }), opensSublevel && jsx(SublevelIconContainer, {
30
+ children: jsx(SvgTriangleRight, {})
31
+ })]
32
+ });
27
33
  });
28
- ContextMenuItem.propTypes = process.env.NODE_ENV !== "production" ? {
29
- title: PropTypes.string.isRequired,
30
- icon: PropTypes.element,
31
- onClickEffect: PropTypes.func,
32
- opensSublevel: PropTypes.bool,
33
- hoverColors: PropTypes.arrayOf(PropTypes.string),
34
- hoverBackgroundColors: PropTypes.arrayOf(PropTypes.string)
35
- } : {};
36
- ContextMenuItem.defaultProps = {
37
- icon: undefined,
38
- hoverColors: undefined,
39
- hoverBackgroundColors: undefined,
40
- opensSublevel: false
41
- };
42
34
 
43
35
  export { ContextMenuItem as default };
44
36
  //# sourceMappingURL=ContextMenuItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuItem.js","sources":["../../../../src/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport * as S from './ContextMenuItem.styled';\n\nimport { ReactComponent as TriangleRightIcon } from '../../../../icons/triangle-right.svg';\n\n/**\n * Single context menu item.\n *\n * See the documentation for `ContextMenu` for usage examples.\n *\n * ### Import\n *\n * ``` js\n * import { ContextMenuItem } from '@ntbjs/react-components/widgets/ContextMenu'\n * // or\n * import ContextMenuItem from '@ntbjs/react-components/widgets/ContextMenu/ContextMenuItem'\n * ```\n */\nconst ContextMenuItem = React.forwardRef(function ContextMenuItem(\n { title, icon, onClickEffect, opensSublevel, hoverColors, hoverBackgroundColors, ...props },\n forwardedRef\n) {\n return (\n <S.ContextMenuItem\n ref={forwardedRef}\n $icon={icon}\n onClick={onClickEffect}\n $hoverColors={hoverColors}\n $hoverBackgroundColors={hoverBackgroundColors}\n $openssublevel={opensSublevel}\n className={opensSublevel ? 'context-menu-item opens-sublevel' : 'context-menu-item'}\n {...props}\n role=\"menuitem\"\n >\n {icon && <S.IconContainer>{icon}</S.IconContainer>}\n <S.Label>{title}</S.Label>\n {opensSublevel && (\n <S.SublevelIconContainer>\n <TriangleRightIcon />\n </S.SublevelIconContainer>\n )}\n </S.ContextMenuItem>\n );\n});\n\nContextMenuItem.propTypes = {\n /**\n * Menu item text\n */\n title: PropTypes.string.isRequired,\n\n /**\n * Optional icon (left side)\n */\n icon: PropTypes.element,\n\n /**\n * Function to trigger when the item is clicked\n */\n onClickEffect: PropTypes.func,\n\n /**\n * Whether the `ContextMenuItem` opens another `ContextMenu`\n */\n opensSublevel: PropTypes.bool,\n\n /**\n * Array of custom hover text/icon color in the form of hex-strings (e.g. `'#FFFFFF'`).\n * Must contain two colors, where the first is for dark-mode and the second is for light-mode.\n */\n hoverColors: PropTypes.arrayOf(PropTypes.string),\n\n /**\n * Array of custom hover background colors in the form of hex-strings (e.g. `'#FFFFFF'`).\n * Must contain two colors, where the first is for dark-mode and the second is for light-mode.\n */\n hoverBackgroundColors: PropTypes.arrayOf(PropTypes.string)\n};\n\nContextMenuItem.defaultProps = {\n icon: undefined,\n hoverColors: undefined,\n hoverBackgroundColors: undefined,\n opensSublevel: false\n};\n\nexport default ContextMenuItem;\n"],"names":["ContextMenuItem","React","forwardRef","title","icon","onClickEffect","opensSublevel","hoverColors","hoverBackgroundColors","props","forwardedRef","createElement","S","_extends","ref","$icon","onClick","$hoverColors","$hoverBackgroundColors","$openssublevel","className","role","TriangleRightIcon","propTypes","process","env","NODE_ENV","PropTypes","string","isRequired","element","func","bool","arrayOf","defaultProps","undefined"],"mappings":";;;;;;AAmBMA,MAAAA,eAAe,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,eAAeA,CAC/D;EAAEG,KAAK;EAAEC,IAAI;EAAEC,aAAa;EAAEC,aAAa;EAAEC,WAAW;EAAEC,qBAAqB;EAAE,GAAGC,KAAAA;AAAM,CAAC,EAC3FC,YA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AAA,IAAI,EAAE+B,SAAS;AACf5B,EAAAA,WAAW,EAAE4B,SAAS;AACtB3B,EAAAA,qBAAqB,EAAE2B,SAAS;AAChC7B,EAAAA,aAAa,EAAE,KAAA;AACjB,CAAC;;;;"}
1
+ {"version":3,"file":"ContextMenuItem.js","sources":["../../../../src/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.tsx"],"sourcesContent":["import React from 'react';\nimport * as S from './ContextMenuItem.styled';\n\nimport { ReactComponent as TriangleRightIcon } from '../../../../icons/triangle-right.svg';\n\ntype ContextMenuItemOwnProps = {\n /**\n * Menu item text\n */\n title: string;\n /**\n * Optional icon (left side)\n */\n icon?: React.ReactElement<any>;\n /**\n * Function to trigger when the item is clicked\n */\n onClickEffect?: (...args: any[]) => any;\n /**\n * Whether the `ContextMenuItem` opens another `ContextMenu`\n */\n opensSublevel?: boolean;\n /**\n * Array of custom hover text/icon color in the form of hex-strings (e.g. `'#FFFFFF'`).\n * Must contain two colors, where the first is for dark-mode and the second is for light-mode.\n */\n hoverColors?: string[];\n /**\n * Array of custom hover background colors in the form of hex-strings (e.g. `'#FFFFFF'`).\n * Must contain two colors, where the first is for dark-mode and the second is for light-mode.\n */\n hoverBackgroundColors?: string[];\n};\n\n/*\n * NMB-3998 §C.2: `props` is spread onto `S.ContextMenuItem`, 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 ContextMenuItemOwnProps`);\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.ContextMenuItem>,\n keyof ContextMenuItemOwnProps\n> &\n ContextMenuItemOwnProps;\n\n/**\n * Single context menu item.\n *\n * See the documentation for `ContextMenu` for usage examples.\n *\n * ### Import\n *\n * ``` js\n * import { ContextMenuItem } from '@ntbjs/react-components/widgets/ContextMenu'\n * // or\n * import ContextMenuItem from '@ntbjs/react-components/widgets/ContextMenu/ContextMenuItem'\n * ```\n */\nconst ContextMenuItem = React.forwardRef<any, Props>(function ContextMenuItem(\n {\n title,\n icon = undefined,\n onClickEffect,\n opensSublevel = false,\n hoverColors = undefined,\n hoverBackgroundColors = undefined,\n ...props\n },\n forwardedRef\n) {\n return (\n <S.ContextMenuItem\n ref={forwardedRef}\n $icon={icon}\n onClick={onClickEffect}\n $hoverColors={hoverColors}\n $hoverBackgroundColors={hoverBackgroundColors}\n $openssublevel={opensSublevel}\n className={opensSublevel ? 'context-menu-item opens-sublevel' : 'context-menu-item'}\n {...props}\n role=\"menuitem\"\n >\n {icon && <S.IconContainer>{icon}</S.IconContainer>}\n <S.Label>{title}</S.Label>\n {opensSublevel && (\n <S.SublevelIconContainer>\n <TriangleRightIcon />\n </S.SublevelIconContainer>\n )}\n </S.ContextMenuItem>\n );\n});\n\nexport default ContextMenuItem;\n"],"names":["ContextMenuItem","React","forwardRef","title","icon","undefined","onClickEffect","opensSublevel","hoverColors","hoverBackgroundColors","props","forwardedRef","_jsxs","S","ref","$icon","onClick","$hoverColors","$hoverBackgroundColors","$openssublevel","className","role","children","_jsx","TriangleRightIcon"],"mappings":";;;;;AA4DA,MAAMA,eAAe,GAAGC,cAAK,CAACC,UAAU,CAAa,SAASF,eAAeA,CAC3E;EACEG,KAAK;AACLC,EAAAA,IAAI,GAAGC,SAAS;EAChBC,aAAa;AACbC,EAAAA,aAAa,GAAG,KAAK;AACrBC,EAAAA,WAAW,GAAGH,SAAS;AACvBI,EAAAA,qBAAqB,GAAGJ,SAAS;EACjC,GAAGK;AACL,CAAC,EACDC,YAAY,EACZ;AACA,EAAA,OACEC,IAAA,CAACC,iBAAiB,EAAA;AAChBC,IAAAA,GAAG,EAAEH,YAAa;AAClBI,IAAAA,KAAK,EAAEX,IAAK;AACZY,IAAAA,OAAO,EAAEV,aAAc;AACvBW,IAAAA,YAAY,EAAET,WAAY;AAC1BU,IAAAA,sBAAsB,EAAET,qBAAsB;AAC9CU,IAAAA,cAAc,EAAEZ,aAAc;AAC9Ba,IAAAA,SAAS,EAAEb,aAAa,GAAG,kCAAkC,GAAG,mBAAoB;AAAA,IAAA,GAChFG,KAAK;AACTW,IAAAA,IAAI,EAAC,UAAU;AAAAC,IAAAA,QAAA,GAEdlB,IAAI,IAAImB,GAAA,CAACV,aAAe,EAAA;AAAAS,MAAAA,QAAA,EAAElB;AAAI,KAAkB,CAAC,EAClDmB,GAAA,CAACV,KAAO,EAAA;AAAAS,MAAAA,QAAA,EAAEnB;KAAe,CAAC,EACzBI,aAAa,IACZgB,GAAA,CAACV,qBAAuB,EAAA;AAAAS,MAAAA,QAAA,EACtBC,GAAA,CAACC,gBAAiB,EAAA,EAAE;AAAC,KACE,CAC1B;AAAA,GACgB,CAAC;AAExB,CAAC;;;;"}