@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
@@ -0,0 +1,134 @@
1
+ import React from 'react';
2
+ type ContextMenuOwnProps = {
3
+ /**
4
+ * An array containing nodes of the `ContextMenuItem` component
5
+ */
6
+ children?: any;
7
+ /**
8
+ * Marks this menu as the sublevel/submenu of another context menu.
9
+ *
10
+ * NOT DECLARED BY THE OLD propTypes, so the codemod could not emit it; the widening
11
+ * pass reported it as a `(dynamic key)` undeclared read but cannot type it, because
12
+ * `S.ContextMenu` is a `styled.div` and `sublevel` is not an HTML attribute. Declared
13
+ * by hand so the documented usage in this file's own JSDoc and in
14
+ * `ContextMenu.stories.tsx:103` keeps compiling.
15
+ *
16
+ * PRE-EXISTING FINDING, DELIBERATELY NOT FIXED HERE: nothing reads it. The component
17
+ * strips it out of the spread —
18
+ * `Object.entries(props).filter(([key]) => key !== 'sublevel')` — so it reaches
19
+ * neither the DOM nor `ContextMenu.styled.ts`, which reads no prop at all. The
20
+ * sublevel placement it appears to request is actually driven by the *`Popover`*'s
21
+ * `contextMenuSublevel`, which the stories set on the same element. So this is a
22
+ * documented public prop that is a no-op. Removing it is an API break and belongs in
23
+ * its own commit with its own decision; keeping the declaration records the API as it
24
+ * is published today rather than as we wish it were.
25
+ */
26
+ sublevel?: boolean;
27
+ };
28
+ /**
29
+ * This component wraps around an array of `ContextMenuItems` to display a context menu.
30
+ *
31
+ * In most use-cases, the `ContextMenu` will be wrapped in a `Popover` to provide the functionality for opening/closing and placing the menu.
32
+ * In such cases, send the `ContextMenu` to the `Popover` as its `content` prop.
33
+ *
34
+ * The context menu and sublevels will automatically adjust their placement in relation to the element that opens it
35
+ * based on available space if the provided placement doesn't work. See the `Popover` documentation for further instructions on placement.
36
+ *
37
+ * ### Import
38
+ *
39
+ * ``` js
40
+ * import { ContextMenu } from '@ntbjs/react-components/widgets'
41
+ * // or
42
+ * import ContextMenu from '@ntbjs/react-components/widgets/ContextMenu'
43
+ * ```
44
+ *
45
+ * ### Usage examples
46
+ * #### Plain context menu
47
+ *
48
+ * ``` js
49
+
50
+ const item1 = <ContextMenuItem title="Download" onClick={onClickEffect} key="item-1" />;
51
+ const item2 = <ContextMenuItem title="Delete" icon={<IconDelete />} onClick={onClickEffect} key="item-2" />;
52
+
53
+ <Popover content={<ContextMenu {...args}>{[item1, itemGroup1, item2]}</ContextMenu>} contextMenu={true}>
54
+ Click here to open
55
+ </Popover>
56
+ ```
57
+ *
58
+ * #### Context menu with grouped items
59
+ * Use the `ContextMenuItemsGroup` component to group menu items together. Grouped items will not show borders
60
+ * between themselves, indicating that their actions are related.
61
+ *
62
+ * ``` js
63
+
64
+ const item1 = <ContextMenuItem title="Download" onClick={onClickEffect} key="item-1" />;
65
+ const item2 = <ContextMenuItem title="Delete" icon={<IconDelete />} onClick={onClickEffect} key="item-2" />;
66
+
67
+ const groupItem1 = <ContextMenuItem title="Edit in Mediebank" icon={<IconDesignServices />} onClick={onClickEffect} key="group-item-1" />:
68
+ const groupItem2 = <ContextMenuItem title="Edit in Photoshop" icon={<IconDesignServices />} onClick={onClickEffect} key="group-item-2" />;
69
+ const groupItem3 = <ContextMenuItem title="Edit in Illustrator" icon={<IconDesignServices />} onClick={onClickEffect} key="group-item-3" />;
70
+
71
+ const itemGroup1 = <ContextMenuItemsGroup key="item-group-1">{[groupItem1, groupItem2, groupItem3]}</ContextMenuItemsGroup>;
72
+
73
+ <Popover content={<ContextMenu {...args}>{[item1, itemGroup1, item2]}</ContextMenu>} contextMenu={true}>
74
+ Click here to open
75
+ </Popover>
76
+ ```
77
+ *
78
+ * #### Context menu with sublevels
79
+ * Wrap a `ContextMenuItem` in a `Popover` and pass it a `ContextMenu` as child to create a sublevel/submenu.
80
+ * A sublevel will by default be placed adjacent and aligned with the `ContextMenuItem` which opens it,
81
+ * and adjust automatically based on available space.
82
+ *
83
+ * Set the `contextMenu` and `contextMenuSublevel` props of the `Popover` containing the sublevel to `true`.
84
+ *
85
+ * Set the `opensSublevel` prop of the `ContextMenuItem` containing the sublevel to `true`.
86
+ *
87
+ * ``` js
88
+
89
+ const item1 = <ContextMenuItem title="Download" onClick={onClickEffect} key="item-1" />;
90
+ const item2 = <ContextMenuItem title="Delete" icon={<IconDelete />} onClick={onClickEffect} hoverBackgroundColors={['#fbeae6', '#fbeae6']} key="item-2" />;
91
+
92
+ const subItem1 = <ContextMenuItem title="Edit in Mediebank" icon={<IconDesignServices />} onClick={onClickEffect} key="sub-item-1" />
93
+ const subItem2 = <ContextMenuItem title="Edit in Photoshop" icon={<IconDesignServices />} onClick={onClickEffect} key="sub-item-2" />
94
+ const subItem3 = <ContextMenuItem title="Edit in Illustrator" icon={<IconDesignServices />} onClick={onClickEffect} key="sub-item-3" />
95
+
96
+ const itemWithSublevel = (
97
+ <Popover
98
+ content={
99
+ <ContextMenu sublevel={true}>
100
+ {[subItem1, subItem2, subItem3, subItem4, subItem5]}
101
+ </ContextMenu>
102
+ }
103
+ contextMenu={true}
104
+ contextMenuSublevel={true}
105
+ key="item-3"
106
+ >
107
+ <ContextMenuItem title="Open level 2" opensSublevel={true} />
108
+ </Popover>
109
+ );
110
+
111
+ <Popover content={<ContextMenu {...args}>{[item1, item2, itemWithSublevel]}</ContextMenu>} contextMenu={true}>
112
+ Click here to open
113
+ </Popover>
114
+ ```
115
+ *
116
+ *
117
+ * #### Context menu from a dropdown button
118
+ * When used with a dropdown button, the `Button` component takes care of wrapping the menu items in a `Popover`.
119
+ * Just pass the array of `ContextMenuItems` directly into the `Button` as its children.
120
+ *
121
+ * ``` js
122
+
123
+ const item1 = <ContextMenuItem title="Edit in Mediebank" icon={<IconDesignServices />} onClick={onClickEffect} key="item-1" />;
124
+ const item2 = <ContextMenuItem title="Edit in Photoshop" icon={<IconDesignServices />} onClick={onClickEffect} key="item-2" />;
125
+ const item3 = <ContextMenuItem title="Edit in Illustrator" icon={<IconDesignServices />} onClick={onClickEffect} key="item-3" />;
126
+
127
+ <Button onClick={onClickEffect} dropdownItems={<ContextMenu {...args}>{[item1, item2, item3, item4, item5]}</ContextMenu>}>
128
+ Button text
129
+ </Button>
130
+ ```
131
+ *
132
+ */
133
+ declare const ContextMenu: React.ForwardRefExoticComponent<Omit<Omit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>, "ref">, keyof ContextMenuOwnProps> & ContextMenuOwnProps & React.RefAttributes<any>>;
134
+ export default ContextMenu;
@@ -0,0 +1 @@
1
+ export declare const ContextMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import * as S from './ContextMenuItem.styled';
3
+ type ContextMenuItemOwnProps = {
4
+ /**
5
+ * Menu item text
6
+ */
7
+ title: string;
8
+ /**
9
+ * Optional icon (left side)
10
+ */
11
+ icon?: React.ReactElement<any>;
12
+ /**
13
+ * Function to trigger when the item is clicked
14
+ */
15
+ onClickEffect?: (...args: any[]) => any;
16
+ /**
17
+ * Whether the `ContextMenuItem` opens another `ContextMenu`
18
+ */
19
+ opensSublevel?: boolean;
20
+ /**
21
+ * Array of custom hover text/icon color in the form of hex-strings (e.g. `'#FFFFFF'`).
22
+ * Must contain two colors, where the first is for dark-mode and the second is for light-mode.
23
+ */
24
+ hoverColors?: string[];
25
+ /**
26
+ * Array of custom hover background colors in the form of hex-strings (e.g. `'#FFFFFF'`).
27
+ * Must contain two colors, where the first is for dark-mode and the second is for light-mode.
28
+ */
29
+ hoverBackgroundColors?: string[];
30
+ };
31
+ /**
32
+ * Single context menu item.
33
+ *
34
+ * See the documentation for `ContextMenu` for usage examples.
35
+ *
36
+ * ### Import
37
+ *
38
+ * ``` js
39
+ * import { ContextMenuItem } from '@ntbjs/react-components/widgets/ContextMenu'
40
+ * // or
41
+ * import ContextMenuItem from '@ntbjs/react-components/widgets/ContextMenu/ContextMenuItem'
42
+ * ```
43
+ */
44
+ declare const ContextMenuItem: React.ForwardRefExoticComponent<Omit<Omit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>, S.ContextMenuItemStyleProps>, never>, "ref">, keyof ContextMenuItemOwnProps> & ContextMenuItemOwnProps & React.RefAttributes<any>>;
45
+ export default ContextMenuItem;
@@ -0,0 +1,26 @@
1
+ import type { ReactElement } from 'react';
2
+ /**
3
+ * `ContextMenuItem`'s props, i.e. what `ContextMenuItem.tsx` passes to
4
+ * `<S.ContextMenuItem>`: `$icon`, `$hoverColors`, `$hoverBackgroundColors` and
5
+ * `$openssublevel`. Value types from that file's propTypes; all optional per §J.5.
6
+ */
7
+ export interface ContextMenuItemStyleProps {
8
+ /** `icon` — `PropTypes.element`, so a React element and not a `ReactNode`. Read only
9
+ * as `!props.$icon`, i.e. for presence. */
10
+ $icon?: ReactElement<any>;
11
+ /** `opensSublevel` — `PropTypes.bool`. Selects the right-hand padding, since a
12
+ * sublevel item has its own chevron in that space. Lower-case by existing convention
13
+ * at both ends; renaming it would be a two-file change for no type benefit. */
14
+ $openssublevel?: boolean;
15
+ /** `hoverColors` — `PropTypes.arrayOf(PropTypes.string)`, documented as exactly
16
+ * `[darkModeColor, lightModeColor]` hex strings. `string[]` and not
17
+ * `[string, string]`: the propTypes say an array of any length, which is why the
18
+ * template guards the array's presence and then `[0]` and `[1]` individually. */
19
+ $hoverColors?: string[];
20
+ /** `hoverBackgroundColors` — same shape as `$hoverColors`. */
21
+ $hoverBackgroundColors?: string[];
22
+ }
23
+ export declare const ContextMenuItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>, ContextMenuItemStyleProps>, never>> & string;
24
+ export declare const IconContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>, never>, never>> & string;
25
+ export declare const SublevelIconContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>, never>, never>> & string;
26
+ export declare const Label: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
@@ -0,0 +1 @@
1
+ export { default } from './ContextMenuItem';
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ type ContextMenuItemsGroupOwnProps = {
3
+ /**
4
+ * Nodes of the `ContextMenuItem` component — one, or an array.
5
+ *
6
+ * DEFECT FIXED, NOT TRANSCRIBED. The propTypes said
7
+ * `children: PropTypes.arrayOf(PropTypes.node)`, and the codemod faithfully rendered
8
+ * that as `React.ReactNode[]` — which REJECTS A SINGLE JSX CHILD, because React does not
9
+ * wrap one child in an array:
10
+ *
11
+ * <ContextMenuItemsGroup><ContextMenuItem title="Edit" /></ContextMenuItemsGroup>
12
+ *
13
+ * gives `children` as one element. On React 16 this was a dev-time propTypes warning
14
+ * only, which is how it survived — the React 16 gate is what surfaced it. Under the
15
+ * generated closed type it became a hard COMPILE error at every such call site, in the
16
+ * consumer as well as here, so faithfully reproducing the propTypes would have shipped a
17
+ * type that forbids the component's most obvious usage.
18
+ *
19
+ * `React.ReactNode` is the accurate type and it still admits the array form, since
20
+ * `ReactNode` includes `Iterable<ReactNode>`. The component only forwards `children` to
21
+ * `S.ContextMenuItemsGroup`, so nothing here depends on it being an array. Zero runtime
22
+ * change: the propTypes this replaces were already deleted by the codemod.
23
+ */
24
+ children?: React.ReactNode;
25
+ };
26
+ /**
27
+ * Simple wrapper for a group of context menu items. These will be displayed without a border between each item.
28
+ *
29
+ * See the documentation for `ContextMenu` for an example.
30
+ *
31
+ * ### Import
32
+ *
33
+ * ``` js
34
+ * import { ContextMenuItemsGroup } from '@ntbjs/react-components/widgets/ContextMenu'
35
+ * // or
36
+ * import ContextMenuItemsGroup from '@ntbjs/react-components/widgets/ContextMenu/ContextMenuItemsGroup'
37
+ * ```
38
+ *
39
+ */
40
+ declare const ContextMenuItemsGroup: React.ForwardRefExoticComponent<Omit<Omit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>, "ref">, "children"> & ContextMenuItemsGroupOwnProps & React.RefAttributes<any>>;
41
+ export default ContextMenuItemsGroup;
@@ -0,0 +1 @@
1
+ export declare const ContextMenuItemsGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
@@ -0,0 +1 @@
1
+ export { default } from './ContextMenuItemsGroup';
@@ -0,0 +1 @@
1
+ export { default } from './ContextMenu';
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import * as S from './InfoCard.styled';
3
+ type InfoCardOwnProps = {
4
+ icon: React.ReactElement<any>;
5
+ total: number;
6
+ label: string;
7
+ linkLabel?: string;
8
+ onClick?: (...args: any[]) => any;
9
+ height?: number;
10
+ };
11
+ /**
12
+ * Info Card
13
+ *
14
+ * ### Import
15
+ *
16
+ * ``` js
17
+ * import { InfoCard } from '@ntbjs/react-components/widgets'
18
+ * // or
19
+ * import InfoCard from '@ntbjs/react-components/widgets/InfoCard'
20
+ * ```
21
+ *
22
+ * ### Props
23
+ * ```
24
+ * Pass `icon={<svg></svg>}` to display an icon.
25
+ * Pass `total={100}` to display number.
26
+ * Pass `label={"this is a label"}` to display a label.
27
+ * Pass `linkLabel={"this is a label"}` to display a link next to the arrow icon.
28
+ * Pass `height={50}` to adjust the card´s height.
29
+ * Pass `onClick={function}` to handle click event.
30
+ * ```
31
+ */
32
+ declare const InfoCard: React.ForwardRefExoticComponent<Omit<Omit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, S.InfoCardContainerStyleProps>, never>, "ref">, keyof InfoCardOwnProps> & InfoCardOwnProps & React.RefAttributes<any>>;
33
+ export default InfoCard;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * `height` — `PropTypes.number`, px, interpolated as `${props.height}px` with a `50px`
3
+ * fallback. `number` and not `number | string`: a string here would already render
4
+ * `height: 60pxpx`.
5
+ *
6
+ * NO `$`, AND THAT IS A DEFECT THAT IS ALREADY IN THE RENDER BASELINE. `height` is not a
7
+ * member of `HTMLAttributes<HTMLDivElement>` (which is why the read needs this
8
+ * declaration at all) but React DOES recognise it and renders it, so `widgets/InfoCard`
9
+ * in `scripts/r19-harness/baseline.json` opens with `<div height="60" class="…">`.
10
+ * Renaming it `$height` removes that attribute and therefore MOVES the baseline — C10
11
+ * work, §E.4.
12
+ */
13
+ export interface InfoCardContainerStyleProps {
14
+ height?: number;
15
+ }
16
+ /**
17
+ * `$isHovered` — the `Link`'s hover state, held in `InfoCard.tsx`'s `useState`, so
18
+ * genuinely `boolean` and not derived from any prop.
19
+ *
20
+ * NOT COVERABLE BY THE RENDER GATE, and the fixture says so: it comes from `useState`, so
21
+ * it is `false` in every static render whatever props are passed. Both of its hosts
22
+ * therefore have rule blocks the baseline can never exercise — which is exactly why the
23
+ * type matters here more than it would on a prop a fixture pins.
24
+ *
25
+ * Hosts: `ButtonLink` and `StyledArrowIcon`.
26
+ */
27
+ interface InfoCardHoverStyleProps {
28
+ $isHovered?: boolean;
29
+ }
30
+ export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, InfoCardContainerStyleProps>, never>> & string;
31
+ export declare const MetricsContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
32
+ export declare const IconTotalContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
33
+ export declare const Total: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
34
+ export declare const Label: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
35
+ export declare const IconContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
36
+ export declare const Link: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
37
+ export declare const ButtonLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, InfoCardHoverStyleProps>, never>> & string;
38
+ export declare const StyledArrowIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").SVGProps<SVGSVGElement> & {
39
+ title?: string;
40
+ }, import("react").SVGProps<SVGSVGElement> & {
41
+ title?: string;
42
+ }>, InfoCardHoverStyleProps>, never>> & string & Omit<import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
43
+ title?: string;
44
+ }>, keyof import("react").Component<any, {}, any>>;
45
+ export {};
@@ -0,0 +1 @@
1
+ export { default } from './InfoCard';
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+ import * as S from './InstructionSeverityDisplay.styled';
3
+ type InstructionSeverityDisplayOwnProps = {
4
+ /** Severity level (1-5). 1=Info, 3=Limited use, 5=Highly restricted. */
5
+ severity?: 1 | 2 | 3 | 4 | 5;
6
+ /** The instruction text to display. Component returns null if empty. */
7
+ instructionText?: string;
8
+ /** Override the default badge label for the severity level. */
9
+ severityLabel?: string;
10
+ /** Map of severity level to translated label string, e.g. { 1: 'Info', 3: 'Begrenset bruk', 5: 'Svært begrenset' }. */
11
+ labels?: {
12
+ [key: string]: string;
13
+ };
14
+ /** Override the default icon element. */
15
+ icon?: React.ReactElement<any>;
16
+ /** Whether to show card styling (border-radius, shadow, border). Defaults to true. */
17
+ showCard?: boolean;
18
+ /** Custom card padding, e.g. "8px 6px" or "20px". Defaults to "14px 10px". */
19
+ padding?: string;
20
+ /** Custom font size for the badge text, e.g. "10px" or "0.75rem". Defaults to "12px". */
21
+ badgeFontSize?: string;
22
+ /** Custom font size for the details/instruction text, e.g. "12px" or "0.875rem". Defaults to "14px". */
23
+ detailsFontSize?: string;
24
+ /** Override card background color in light mode, e.g. "#ffffff" or "transparent". */
25
+ bgLight?: string;
26
+ /** Override card background color in dark mode, e.g. "#1a1a1a" or "transparent". */
27
+ bgDark?: string;
28
+ /** Max number of lines for instruction text before clamping with ellipsis. */
29
+ maxLines?: number;
30
+ /** URL of a thumbnail image to display on the left side of the card. Pass null to show a placeholder. Omit to show no thumbnail. */
31
+ thumbnail?: string;
32
+ };
33
+ /**
34
+ * InstructionSeverityDisplay communicates the usage restrictions or
35
+ * severity levels associated with a specific instruction or asset.
36
+ *
37
+ * ### Import
38
+ *
39
+ * ``` js
40
+ * import { InstructionSeverityDisplay } from '@ntbjs/react-components/widgets'
41
+ * // or
42
+ * import InstructionSeverityDisplay from '@ntbjs/react-components/widgets/InstructionSeverityDisplay'
43
+ * ```
44
+ */
45
+ declare const InstructionSeverityDisplay: React.ForwardRefExoticComponent<Omit<Omit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, S.CardStyleProps>, never>, "ref">, keyof InstructionSeverityDisplayOwnProps> & InstructionSeverityDisplayOwnProps & React.RefAttributes<any>>;
46
+ export default InstructionSeverityDisplay;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Card's props, i.e. what `InstructionSeverityDisplay.tsx` passes to `S.Card`.
3
+ * Value types from that file's propTypes; all optional per §J.5.
4
+ */
5
+ export interface CardStyleProps {
6
+ /** `severity` — `PropTypes.oneOf([1, 2, 3, 4, 5])`. Closed on purpose: the template
7
+ * compares `=== 5`, and a comparison against a value outside the union is TS2367
8
+ * rather than a branch that never fires. */
9
+ $severity?: 1 | 2 | 3 | 4 | 5;
10
+ /** `showCard` — component defaults it to `true`, but see §J.5: a default in the
11
+ * COMPONENT is not a default here, so this stays optional. */
12
+ $showCard?: boolean;
13
+ /** `padding` — a whole CSS padding shorthand, e.g. `'8px 6px'`. `string`, not
14
+ * `number`: the template uses it raw (`padding: ${props.$padding}`) with a
15
+ * `'14px 10px'` fallback, so a number would emit a unitless `padding: 8`. */
16
+ $padding?: string;
17
+ /** `bgLight` — CSS colour applied under `body.light-theme`. */
18
+ $bgLight?: string;
19
+ /** `bgDark` — CSS colour applied under `body.dark-theme`. */
20
+ $bgDark?: string;
21
+ /** Derived in the component as `thumbnail !== undefined`, so genuinely `boolean`
22
+ * and not the `string` the `thumbnail` prop is. */
23
+ $hasThumbnail?: boolean;
24
+ }
25
+ /** InstructionText's props. */
26
+ interface InstructionTextStyleProps {
27
+ /** `detailsFontSize` — a font-size with its unit, e.g. `'12px'`, `'0.875rem'`.
28
+ * `string` for the same reason as `$padding`: it is interpolated raw. */
29
+ $fontSize?: string;
30
+ /** `maxLines` — `PropTypes.number`, the `-webkit-line-clamp` count. Read only
31
+ * behind `props.$maxLines &&`, which is what keeps it valid when
32
+ * `strictNullChecks` is eventually turned on. */
33
+ $maxLines?: number;
34
+ }
35
+ export declare const Card: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, CardStyleProps>, never>> & string;
36
+ export declare const ThumbnailWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
37
+ export declare const ThumbnailImage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
38
+ export declare const ContentWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
39
+ export declare const InstructionText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>>, InstructionTextStyleProps>, never>> & string;
40
+ export {};
@@ -0,0 +1 @@
1
+ export { default } from './InstructionSeverityDisplay';
@@ -0,0 +1,156 @@
1
+ import React from 'react';
2
+ type InstructionsOwnProps = {
3
+ /**
4
+ * Name of the text area (used when sending form data)
5
+ */
6
+ name?: string;
7
+ /**
8
+ * The placeholder of the input. Text to be displayed on the input element when the component is enabled and not focused – e.g. "Search categories..."
9
+ */
10
+ placeholder?: string;
11
+ /**
12
+ * How many rows/lines of text to be displayed by default
13
+ */
14
+ rows?: number | string;
15
+ /**
16
+ * Selected option
17
+ */
18
+ selectedOption?: any;
19
+ /**
20
+ * Function with a `Promise` returning filtered options.
21
+ *
22
+ * See [Asynchronous fetching/filtering with pagination](#asynchronous-fetchingfiltering-with-pagination)
23
+ * for details.
24
+ *
25
+ * **Note:**
26
+ * <br />This will override the `availableOptions` prop if both props are set.
27
+ */
28
+ loadOptions?: (...args: any[]) => any;
29
+ /**
30
+ * Function for custom "Loading..." message while waiting for the first page
31
+ * from `loadOptions` to resolve. Defaults to "Loading..." if no function is provided.
32
+ */
33
+ loadingMessageFunc?: (...args: any[]) => any;
34
+ /**
35
+ /**
36
+ * Whether the components displays an initial custom message.
37
+ */
38
+ clickToAdd?: boolean;
39
+ /**
40
+ * Add initial custom message. i.e: `No instructions (click to add)`.
41
+ */
42
+ customAddMessage?: string;
43
+ /**
44
+ * Whether to auto select the entire value when the input is focused – does also work when the field is in read-only mode
45
+ */
46
+ autoSelect?: boolean;
47
+ /**
48
+ * Whether the instruction is read only
49
+ */
50
+ readOnly?: boolean;
51
+ /**
52
+ * Whether the intruction is disabled
53
+ */
54
+ disabled?: boolean;
55
+ /**
56
+ * Whether the component is hidden or visible.
57
+ */
58
+ hidden?: boolean;
59
+ /**
60
+ * `Array` of `objects` that populate the select menu. This is only needed
61
+ * when asynchronous option fetching with the `loadOptions` prop is not used.
62
+ *
63
+ * **Note:**
64
+ * <br />This will be overridden by the `loadOptions` prop if both props are set.
65
+ */
66
+ availableOptions?: any[];
67
+ /**
68
+ * `LightBackground color
69
+ */
70
+ lightBackground?: boolean;
71
+ /**
72
+ * Displays a light-yellow background to show that instruction value is editable
73
+ */
74
+ edit?: boolean;
75
+ /**
76
+ * Function with a `Promise` returning filtered options.
77
+ *
78
+ * See [Asynchronous fetching/filtering with pagination](#asynchronous-fetchingfiltering-with-pagination)
79
+ * for details.
80
+ *
81
+ * **Note:**
82
+ * <br /> `options`should be passed as an `array`of `objects`
83
+ * <br />This will override the `availableOptions` prop if both props are set.
84
+ */
85
+ options?: any[];
86
+ /**
87
+ * Callback for `onChange`
88
+ */
89
+ subscribeCurrentValue?: (...args: any[]) => any;
90
+ /**
91
+ * Callback for `onChange`
92
+ */
93
+ onChange?: (...args: any[]) => any;
94
+ /**
95
+ * Callback for `onFocus`
96
+ */
97
+ onFocus?: (...args: any[]) => any;
98
+ /**
99
+ * Callback for `onBlur`
100
+ */
101
+ onBlur?: (...args: any[]) => any;
102
+ /**
103
+ * Callback for `onUpdateCallback`: register to AutocompleteSelect label and value
104
+ */
105
+ onUpdateCallback?: (...args: any[]) => any;
106
+ /**
107
+ * Define the type based on error,error-border , warning, loading and success.
108
+ */
109
+ type?: '' | 'error' | 'error-border' | 'warning' | 'instructions-warning' | 'loading' | 'success';
110
+ /**
111
+ * Define the type AutoCompleteSelect based on error,error-border , warning, loading and success.
112
+ */
113
+ selectType?: '' | 'error' | 'warning' | 'instructions-warning' | 'loading' | 'success';
114
+ isExpanded?: (...args: any[]) => any;
115
+ /**
116
+ * Icon element – E.g: `icon={<Spinner />}`
117
+ */
118
+ loadingIcon?: React.ReactElement<any>;
119
+ /**
120
+ * Icon element – E.g: `icon={<Check />}`
121
+ */
122
+ successIcon?: React.ReactElement<any>;
123
+ /**
124
+ * Add padding (small-medium-large)
125
+ */
126
+ padding?: '' | 'small' | 'medium' | 'large';
127
+ };
128
+ /**
129
+ * Instructions that let you display Terms & Conditions
130
+ *
131
+ *
132
+ * ### Import
133
+ *
134
+ * ``` js
135
+ * import { Instructions } from '@ntbjs/react-components/widgets/Instructions'
136
+ * // or
137
+ * import Instructions from '@ntbjs/react-components/widgets/Instructions'
138
+ * ```
139
+ *
140
+ * ### AutocompleteSelect
141
+ * `AutocompleteSelect` is integrated within Instructions in order to implement the Drop-down Menu (check out the `Autocomplete` component documentation).
142
+ *
143
+ *
144
+ * <br /> ## Options `object` format
145
+ * Options are represented by an `Array` of `objects` with the following format:
146
+ *
147
+ * ``` js
148
+ * {
149
+ * value: "Example",
150
+ * label: "Example"
151
+ * }
152
+ * ```
153
+ *
154
+ */
155
+ declare const Instructions: React.ForwardRefExoticComponent<Omit<Omit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>, "ref">, keyof InstructionsOwnProps> & InstructionsOwnProps & React.RefAttributes<any>>;
156
+ export default Instructions;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `TopBarContainer`, the only component in this file that reads a prop.
3
+ */
4
+ interface InstructionsTopBarStyleProps {
5
+ /**
6
+ * `initialHover` — `Instructions.tsx`'s `useState(true)`, so genuinely `boolean` and not
7
+ * derived from any prop. Transient, so it never reaches the DOM.
8
+ *
9
+ * READ, PASSED, AND NEVERTHELESS INERT — recorded, not fixed. The rule it guards is
10
+ * `themeProp('background', '#634E01', getColor('signal-yellow-400'))`, character for
11
+ * character the same declaration as the UNCONDITIONAL one three lines above it. So
12
+ * whichever way `$initialHover` goes, the emitted background is identical and the
13
+ * conditional only ever adds a duplicate of the rule that precedes it.
14
+ *
15
+ * Deleting it is the fix, and it is not a type-only change: removing the block removes a
16
+ * duplicate declaration from the generated CSS and therefore moves the render baseline
17
+ * (§J.8). Whether the intent was a DIFFERENT hover colour is a question for whoever owns
18
+ * the design, not for this commit.
19
+ */
20
+ $initialHover?: boolean;
21
+ }
22
+ export declare const Instructions: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
23
+ export declare const TopBarContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, InstructionsTopBarStyleProps>, never>> & string;
24
+ export declare const SelectContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
25
+ export declare const InstructionsArea: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, never>> & string;
26
+ export {};
@@ -0,0 +1 @@
1
+ export { default } from './Instructions';