@ntbjs/react-components 2.0.14 → 3.0.0-rc.2

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 (344) hide show
  1. package/README.md +34 -0
  2. package/build/data/Alert/Alert.js +18 -33
  3. package/build/data/Alert/Alert.js.map +1 -1
  4. package/build/data/Alert/Alert.styled.js +9 -47
  5. package/build/data/Alert/Alert.styled.js.map +1 -1
  6. package/build/data/Badge/Badge.js +36 -61
  7. package/build/data/Badge/Badge.js.map +1 -1
  8. package/build/data/Badge/Badge.styled.js +21 -70
  9. package/build/data/Badge/Badge.styled.js.map +1 -1
  10. package/build/data/Popover/Popover.js +125 -71
  11. package/build/data/Popover/Popover.js.map +1 -1
  12. package/build/data/Popover/Popover.styled.js +10 -140
  13. package/build/data/Popover/Popover.styled.js.map +1 -1
  14. package/build/data/SeverityBadge/SeverityBadge.js +13 -22
  15. package/build/data/SeverityBadge/SeverityBadge.js.map +1 -1
  16. package/build/data/SeverityBadge/index.js +2 -0
  17. package/build/data/SeverityBadge/index.js.map +1 -0
  18. package/build/data/Tab/Tab.js +7 -13
  19. package/build/data/Tab/Tab.js.map +1 -1
  20. package/build/data/Tab/Tab.styled.js +4 -7
  21. package/build/data/Tab/Tab.styled.js.map +1 -1
  22. package/build/data/Tabs/Tabs.js +30 -32
  23. package/build/data/Tabs/Tabs.js.map +1 -1
  24. package/build/data/Tabs/Tabs.styled.js +21 -57
  25. package/build/data/Tabs/Tabs.styled.js.map +1 -1
  26. package/build/data/Tooltip/Tooltip.js +102 -33
  27. package/build/data/Tooltip/Tooltip.js.map +1 -1
  28. package/build/data/Tooltip/Tooltip.styled.js +9 -22
  29. package/build/data/Tooltip/Tooltip.styled.js.map +1 -1
  30. package/build/data/VerificationStatusIcon/VerificationStatusIcon.js +16 -23
  31. package/build/data/VerificationStatusIcon/VerificationStatusIcon.js.map +1 -1
  32. package/build/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +13 -31
  33. package/build/data/VerificationStatusIcon/VerificationStatusIcon.styled.js.map +1 -1
  34. package/build/data/VerificationStatusIcon/index.js +2 -0
  35. package/build/data/VerificationStatusIcon/index.js.map +1 -0
  36. package/build/data/_shared/FloatingArrow.styled.js +30 -0
  37. package/build/data/_shared/FloatingArrow.styled.js.map +1 -0
  38. package/build/hooks/useEventListner.js.map +1 -1
  39. package/build/hooks/useFloatingPopover.js +187 -0
  40. package/build/hooks/useFloatingPopover.js.map +1 -0
  41. package/build/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  42. package/build/hooks/useOnClickOutside.js.map +1 -1
  43. package/build/hooks/useTooltipAutoShow.js.map +1 -1
  44. package/build/icons/arrow-back.svg.js +3 -3
  45. package/build/icons/arrow-back.svg.js.map +1 -1
  46. package/build/icons/arrow-forward.svg.js +4 -4
  47. package/build/icons/arrow-forward.svg.js.map +1 -1
  48. package/build/icons/check-rectangle-filled.svg.js +3 -3
  49. package/build/icons/check-rectangle-filled.svg.js.map +1 -1
  50. package/build/icons/close.svg.js +3 -3
  51. package/build/icons/close.svg.js.map +1 -1
  52. package/build/icons/edit-note.svg.js +3 -3
  53. package/build/icons/edit-note.svg.js.map +1 -1
  54. package/build/icons/expand-more.svg.js +3 -3
  55. package/build/icons/expand-more.svg.js.map +1 -1
  56. package/build/icons/headset.svg.js +3 -3
  57. package/build/icons/headset.svg.js.map +1 -1
  58. package/build/icons/layers.svg.js +3 -3
  59. package/build/icons/layers.svg.js.map +1 -1
  60. package/build/icons/link.svg.js +3 -3
  61. package/build/icons/link.svg.js.map +1 -1
  62. package/build/icons/play.svg.js +3 -3
  63. package/build/icons/play.svg.js.map +1 -1
  64. package/build/icons/search.svg.js +3 -3
  65. package/build/icons/search.svg.js.map +1 -1
  66. package/build/icons/star-filled.svg.js +3 -3
  67. package/build/icons/star-filled.svg.js.map +1 -1
  68. package/build/icons/star.svg.js +3 -3
  69. package/build/icons/star.svg.js.map +1 -1
  70. package/build/icons/triangle-right.svg.js +3 -3
  71. package/build/icons/triangle-right.svg.js.map +1 -1
  72. package/build/icons/verification.svg.js +3 -3
  73. package/build/icons/verification.svg.js.map +1 -1
  74. package/build/icons/warning-circle.svg.js +3 -3
  75. package/build/icons/warning-circle.svg.js.map +1 -1
  76. package/build/inputs/ActionButton/ActionButton.js +11 -22
  77. package/build/inputs/ActionButton/ActionButton.js.map +1 -1
  78. package/build/inputs/ActionButton/ActionButton.styled.js +5 -54
  79. package/build/inputs/ActionButton/ActionButton.styled.js.map +1 -1
  80. package/build/inputs/Button/Button.js +125 -121
  81. package/build/inputs/Button/Button.js.map +1 -1
  82. package/build/inputs/Button/Button.styled.js +42 -260
  83. package/build/inputs/Button/Button.styled.js.map +1 -1
  84. package/build/inputs/Checkbox/Checkbox.js +45 -61
  85. package/build/inputs/Checkbox/Checkbox.js.map +1 -1
  86. package/build/inputs/Checkbox/Checkbox.styled.js +24 -153
  87. package/build/inputs/Checkbox/Checkbox.styled.js.map +1 -1
  88. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +106 -111
  89. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js.map +1 -1
  90. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +88 -273
  91. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js.map +1 -1
  92. package/build/inputs/CompactStarRating/CompactStarRating.js +56 -77
  93. package/build/inputs/CompactStarRating/CompactStarRating.js.map +1 -1
  94. package/build/inputs/CompactStarRating/CompactStarRating.styled.js +32 -211
  95. package/build/inputs/CompactStarRating/CompactStarRating.styled.js.map +1 -1
  96. package/build/inputs/CompactTextInput/CompactTextInput.js +86 -105
  97. package/build/inputs/CompactTextInput/CompactTextInput.js.map +1 -1
  98. package/build/inputs/CompactTextInput/CompactTextInput.styled.js +55 -258
  99. package/build/inputs/CompactTextInput/CompactTextInput.styled.js.map +1 -1
  100. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +70 -77
  101. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js.map +1 -1
  102. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +28 -60
  103. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js.map +1 -1
  104. package/build/inputs/MultiLevelCheckbox/types.js +12 -12
  105. package/build/inputs/MultiLevelCheckbox/types.js.map +1 -1
  106. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +69 -73
  107. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js.map +1 -1
  108. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +44 -87
  109. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js.map +1 -1
  110. package/build/inputs/MultiSelect/MultiSelect.js +69 -79
  111. package/build/inputs/MultiSelect/MultiSelect.js.map +1 -1
  112. package/build/inputs/MultiSelect/MultiSelect.styled.js +70 -76
  113. package/build/inputs/MultiSelect/MultiSelect.styled.js.map +1 -1
  114. package/build/inputs/Radio/Radio.js +20 -33
  115. package/build/inputs/Radio/Radio.js.map +1 -1
  116. package/build/inputs/Radio/Radio.styled.js +15 -96
  117. package/build/inputs/Radio/Radio.styled.js.map +1 -1
  118. package/build/inputs/Switch/Switch.js +28 -40
  119. package/build/inputs/Switch/Switch.js.map +1 -1
  120. package/build/inputs/Switch/Switch.styled.js +24 -94
  121. package/build/inputs/Switch/Switch.styled.js.map +1 -1
  122. package/build/inputs/TextArea/TextArea.js +98 -123
  123. package/build/inputs/TextArea/TextArea.js.map +1 -1
  124. package/build/inputs/TextArea/TextArea.styled.js +64 -379
  125. package/build/inputs/TextArea/TextArea.styled.js.map +1 -1
  126. package/build/inputs/TextInput/TextInput.js +59 -79
  127. package/build/inputs/TextInput/TextInput.js.map +1 -1
  128. package/build/inputs/TextInput/TextInput.styled.js +33 -224
  129. package/build/inputs/TextInput/TextInput.styled.js.map +1 -1
  130. package/build/layout/InputGroup/InputGroup.js +6 -9
  131. package/build/layout/InputGroup/InputGroup.js.map +1 -1
  132. package/build/layout/InputGroup/InputGroup.styled.js +4 -3
  133. package/build/layout/InputGroup/InputGroup.styled.js.map +1 -1
  134. package/build/layout/InputGroup/index.js +2 -0
  135. package/build/layout/InputGroup/index.js.map +1 -0
  136. package/build/layout/SectionSeparator/SectionSeparator.js +5 -9
  137. package/build/layout/SectionSeparator/SectionSeparator.js.map +1 -1
  138. package/build/layout/SectionSeparator/SectionSeparator.styled.js +4 -8
  139. package/build/layout/SectionSeparator/SectionSeparator.styled.js.map +1 -1
  140. package/build/styles/utils/colors-export.d.ts +54 -0
  141. package/build/styles/utils/colors-export.js.map +1 -1
  142. package/build/utils/dateTime.js.map +1 -1
  143. package/build/utils/defaultTheme.js +14 -28
  144. package/build/utils/defaultTheme.js.map +1 -1
  145. package/build/utils/getElementRef.js +14 -0
  146. package/build/utils/getElementRef.js.map +1 -0
  147. package/build/utils/parseTrigger.js +16 -0
  148. package/build/utils/parseTrigger.js.map +1 -0
  149. package/build/widgets/AssetAction/AssetAction.js +26 -33
  150. package/build/widgets/AssetAction/AssetAction.js.map +1 -1
  151. package/build/widgets/AssetAction/AssetAction.styled.js +20 -34
  152. package/build/widgets/AssetAction/AssetAction.styled.js.map +1 -1
  153. package/build/widgets/AssetActionsBase/AssetActionsBase.js +8 -13
  154. package/build/widgets/AssetActionsBase/AssetActionsBase.js.map +1 -1
  155. package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js +4 -9
  156. package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js.map +1 -1
  157. package/build/widgets/AssetGallery/AssetGallery.js +15 -40
  158. package/build/widgets/AssetGallery/AssetGallery.js.map +1 -1
  159. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +55 -70
  160. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js.map +1 -1
  161. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +12 -24
  162. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js.map +1 -1
  163. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +146 -122
  164. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js.map +1 -1
  165. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +99 -286
  166. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js.map +1 -1
  167. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +170 -125
  168. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js.map +1 -1
  169. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +135 -364
  170. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js.map +1 -1
  171. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +20 -21
  172. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js.map +1 -1
  173. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +20 -71
  174. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js.map +1 -1
  175. package/build/widgets/ContextMenu/ContextMenu.js +12 -11
  176. package/build/widgets/ContextMenu/ContextMenu.js.map +1 -1
  177. package/build/widgets/ContextMenu/ContextMenu.styled.js +4 -4
  178. package/build/widgets/ContextMenu/ContextMenu.styled.js.map +1 -1
  179. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +17 -25
  180. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js.map +1 -1
  181. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +16 -71
  182. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js.map +1 -1
  183. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +7 -11
  184. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js.map +1 -1
  185. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +4 -11
  186. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js.map +1 -1
  187. package/build/widgets/InfoCard/InfoCard.js +26 -21
  188. package/build/widgets/InfoCard/InfoCard.js.map +1 -1
  189. package/build/widgets/InfoCard/InfoCard.styled.js +36 -84
  190. package/build/widgets/InfoCard/InfoCard.styled.js.map +1 -1
  191. package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.js +28 -34
  192. package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.js.map +1 -1
  193. package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.js +21 -57
  194. package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.js.map +1 -1
  195. package/build/widgets/InstructionSeverityDisplay/index.js +2 -0
  196. package/build/widgets/InstructionSeverityDisplay/index.js.map +1 -0
  197. package/build/widgets/Instructions/Instructions.js +53 -95
  198. package/build/widgets/Instructions/Instructions.js.map +1 -1
  199. package/build/widgets/Instructions/Instructions.styled.js +27 -26
  200. package/build/widgets/Instructions/Instructions.styled.js.map +1 -1
  201. package/build/widgets/ProgressBar/ProgressBar.js +39 -37
  202. package/build/widgets/ProgressBar/ProgressBar.js.map +1 -1
  203. package/build/widgets/ProgressBar/ProgressBar.styled.js +56 -125
  204. package/build/widgets/ProgressBar/ProgressBar.styled.js.map +1 -1
  205. package/build/widgets/SummaryCard/SummaryCard.js +55 -64
  206. package/build/widgets/SummaryCard/SummaryCard.js.map +1 -1
  207. package/build/widgets/SummaryCard/SummaryCard.styled.js +51 -106
  208. package/build/widgets/SummaryCard/SummaryCard.styled.js.map +1 -1
  209. package/package.json +84 -36
  210. package/styles/utils/colors-export.d.ts +54 -0
  211. package/types/components/data/Alert/Alert.d.ts +76 -0
  212. package/types/components/data/Alert/Alert.styled.d.ts +52 -0
  213. package/types/components/data/Alert/index.d.ts +1 -0
  214. package/types/components/data/Badge/Badge.d.ts +120 -0
  215. package/types/components/data/Badge/Badge.styled.d.ts +33 -0
  216. package/types/components/data/Badge/index.d.ts +1 -0
  217. package/types/components/data/Popover/Popover.d.ts +116 -0
  218. package/types/components/data/Popover/Popover.styled.d.ts +15 -0
  219. package/types/components/data/Popover/index.d.ts +1 -0
  220. package/types/components/data/SeverityBadge/SeverityBadge.d.ts +72 -0
  221. package/types/components/data/SeverityBadge/index.d.ts +1 -0
  222. package/types/components/data/Tab/Tab.d.ts +14 -0
  223. package/types/components/data/Tab/Tab.styled.d.ts +1 -0
  224. package/types/components/data/Tab/index.d.ts +1 -0
  225. package/types/components/data/Tabs/Tabs.d.ts +111 -0
  226. package/types/components/data/Tabs/Tabs.styled.d.ts +26 -0
  227. package/types/components/data/Tabs/index.d.ts +1 -0
  228. package/types/components/data/Tooltip/Tooltip.d.ts +88 -0
  229. package/types/components/data/Tooltip/Tooltip.styled.d.ts +8 -0
  230. package/types/components/data/Tooltip/index.d.ts +1 -0
  231. package/types/components/data/VerificationStatusIcon/VerificationStatusIcon.d.ts +35 -0
  232. package/types/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.d.ts +27 -0
  233. package/types/components/data/VerificationStatusIcon/index.d.ts +1 -0
  234. package/types/components/data/_shared/FloatingArrow.styled.d.ts +29 -0
  235. package/types/components/data/index.d.ts +8 -0
  236. package/types/components/index.d.ts +3 -0
  237. package/types/components/inputs/ActionButton/ActionButton.d.ts +55 -0
  238. package/types/components/inputs/ActionButton/ActionButton.styled.d.ts +16 -0
  239. package/types/components/inputs/ActionButton/index.d.ts +1 -0
  240. package/types/components/inputs/Button/Button.d.ts +82 -0
  241. package/types/components/inputs/Button/Button.styled.d.ts +60 -0
  242. package/types/components/inputs/Button/index.d.ts +1 -0
  243. package/types/components/inputs/Checkbox/Checkbox.d.ts +83 -0
  244. package/types/components/inputs/Checkbox/Checkbox.styled.d.ts +29 -0
  245. package/types/components/inputs/Checkbox/index.d.ts +1 -0
  246. package/types/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.d.ts +242 -0
  247. package/types/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.d.ts +104 -0
  248. package/types/components/inputs/CompactAutocompleteSelect/index.d.ts +1 -0
  249. package/types/components/inputs/CompactStarRating/CompactStarRating.d.ts +96 -0
  250. package/types/components/inputs/CompactStarRating/CompactStarRating.styled.d.ts +34 -0
  251. package/types/components/inputs/CompactStarRating/index.d.ts +1 -0
  252. package/types/components/inputs/CompactTextInput/CompactTextInput.d.ts +116 -0
  253. package/types/components/inputs/CompactTextInput/CompactTextInput.styled.d.ts +42 -0
  254. package/types/components/inputs/CompactTextInput/index.d.ts +1 -0
  255. package/types/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.d.ts +41 -0
  256. package/types/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.d.ts +13 -0
  257. package/types/components/inputs/MultiLevelCheckbox/index.d.ts +2 -0
  258. package/types/components/inputs/MultiLevelCheckbox/types.d.ts +29 -0
  259. package/types/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.d.ts +44 -0
  260. package/types/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.d.ts +11 -0
  261. package/types/components/inputs/MultiLevelCheckboxSelect/index.d.ts +1 -0
  262. package/types/components/inputs/MultiSelect/MultiSelect.d.ts +115 -0
  263. package/types/components/inputs/MultiSelect/MultiSelect.styled.d.ts +34 -0
  264. package/types/components/inputs/MultiSelect/index.d.ts +1 -0
  265. package/types/components/inputs/Radio/Radio.d.ts +65 -0
  266. package/types/components/inputs/Radio/Radio.styled.d.ts +11 -0
  267. package/types/components/inputs/Radio/index.d.ts +1 -0
  268. package/types/components/inputs/Switch/Switch.d.ts +62 -0
  269. package/types/components/inputs/Switch/Switch.styled.d.ts +16 -0
  270. package/types/components/inputs/Switch/index.d.ts +1 -0
  271. package/types/components/inputs/TextArea/TextArea.d.ts +120 -0
  272. package/types/components/inputs/TextArea/TextArea.styled.d.ts +93 -0
  273. package/types/components/inputs/TextArea/index.d.ts +1 -0
  274. package/types/components/inputs/TextInput/TextInput.d.ts +109 -0
  275. package/types/components/inputs/TextInput/TextInput.styled.d.ts +43 -0
  276. package/types/components/inputs/TextInput/index.d.ts +1 -0
  277. package/types/components/inputs/index.d.ts +13 -0
  278. package/types/components/layout/InputGroup/InputGroup.d.ts +31 -0
  279. package/types/components/layout/InputGroup/InputGroup.styled.d.ts +1 -0
  280. package/types/components/layout/InputGroup/index.d.ts +1 -0
  281. package/types/components/layout/SectionSeparator/SectionSeparator.d.ts +28 -0
  282. package/types/components/layout/SectionSeparator/SectionSeparator.styled.d.ts +7 -0
  283. package/types/components/layout/SectionSeparator/index.d.ts +1 -0
  284. package/types/components/layout/index.d.ts +2 -0
  285. package/types/components/widgets/AssetAction/AssetAction.d.ts +16 -0
  286. package/types/components/widgets/AssetAction/AssetAction.styled.d.ts +15 -0
  287. package/types/components/widgets/AssetAction/index.d.ts +1 -0
  288. package/types/components/widgets/AssetActionsBase/AssetActionsBase.d.ts +25 -0
  289. package/types/components/widgets/AssetActionsBase/AssetActionsBase.styled.d.ts +1 -0
  290. package/types/components/widgets/AssetActionsBase/index.d.ts +1 -0
  291. package/types/components/widgets/AssetGallery/AssetGallery.d.ts +170 -0
  292. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.d.ts +76 -0
  293. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.d.ts +3 -0
  294. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.d.ts +3 -0
  295. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.d.ts +52 -0
  296. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.d.ts +2 -0
  297. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.d.ts +49 -0
  298. package/types/components/widgets/AssetGallery/asset.types.d.ts +329 -0
  299. package/types/components/widgets/AssetGallery/index.d.ts +1 -0
  300. package/types/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.d.ts +60 -0
  301. package/types/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.d.ts +21 -0
  302. package/types/components/widgets/AssetPreview/AssetPreviewTopBar/index.d.ts +1 -0
  303. package/types/components/widgets/ContextMenu/ContextMenu.d.ts +118 -0
  304. package/types/components/widgets/ContextMenu/ContextMenu.styled.d.ts +1 -0
  305. package/types/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.d.ts +45 -0
  306. package/types/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.d.ts +18 -0
  307. package/types/components/widgets/ContextMenu/ContextMenuItem/index.d.ts +1 -0
  308. package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.d.ts +23 -0
  309. package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.d.ts +1 -0
  310. package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/index.d.ts +1 -0
  311. package/types/components/widgets/ContextMenu/index.d.ts +1 -0
  312. package/types/components/widgets/InfoCard/InfoCard.d.ts +33 -0
  313. package/types/components/widgets/InfoCard/InfoCard.styled.d.ts +28 -0
  314. package/types/components/widgets/InfoCard/index.d.ts +1 -0
  315. package/types/components/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.d.ts +46 -0
  316. package/types/components/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.d.ts +30 -0
  317. package/types/components/widgets/InstructionSeverityDisplay/index.d.ts +1 -0
  318. package/types/components/widgets/Instructions/Instructions.d.ts +156 -0
  319. package/types/components/widgets/Instructions/Instructions.styled.d.ts +14 -0
  320. package/types/components/widgets/Instructions/index.d.ts +1 -0
  321. package/types/components/widgets/ProgressBar/ProgressBar.d.ts +30 -0
  322. package/types/components/widgets/ProgressBar/ProgressBar.styled.d.ts +41 -0
  323. package/types/components/widgets/ProgressBar/index.d.ts +1 -0
  324. package/types/components/widgets/SummaryCard/SummaryCard.d.ts +83 -0
  325. package/types/components/widgets/SummaryCard/SummaryCard.styled.d.ts +29 -0
  326. package/types/components/widgets/SummaryCard/index.d.ts +1 -0
  327. package/types/components/widgets/index.d.ts +11 -0
  328. package/types/hooks/useElementSize.d.ts +14 -0
  329. package/types/hooks/useEventListner.d.ts +14 -0
  330. package/types/hooks/useFloatingPopover.d.ts +161 -0
  331. package/types/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  332. package/types/hooks/useOnClickOutside.d.ts +13 -0
  333. package/types/hooks/useTooltipAutoShow.d.ts +31 -0
  334. package/types/icons/index.d.ts +41 -0
  335. package/types/ssr/index.d.ts +1 -0
  336. package/types/styles/utils/colors-export.d.ts +54 -0
  337. package/types/utils/dateTime.d.ts +8 -0
  338. package/types/utils/defaultTheme.d.ts +95 -0
  339. package/types/utils/getElementRef.d.ts +2 -0
  340. package/types/utils/parseTrigger.d.ts +22 -0
  341. package/build/_virtual/_rollupPluginBabelHelpers.js +0 -12
  342. package/build/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
  343. package/build/widgets/AssetGallery/asset.propType.js +0 -56
  344. package/build/widgets/AssetGallery/asset.propType.js.map +0 -1
@@ -0,0 +1,120 @@
1
+ import React from 'react';
2
+ import * as S from './Badge.styled';
3
+ type BadgeOwnProps = {
4
+ /**
5
+ * An Icon to show in the badge alongside with a text
6
+ */
7
+ badgeIcon?: React.ReactNode;
8
+ /**
9
+ * Content to be showed in the badge – e.g. number of results.
10
+ * ReactNode, not the union — func is never valid, null was missing.
11
+ */
12
+ badgeContent?: React.ReactNode;
13
+ /**
14
+ * The element(s) for which the badge will be displayed – e.g. an icon or a text.
15
+ */
16
+ children?: React.ReactNode | string;
17
+ /**
18
+ * Whether the badge should be displayed in an elevated position on top of the child element(s) or not.
19
+ */
20
+ elevated?: boolean;
21
+ /**
22
+ * Whether the element is active or not (e.g. the currently selected menu item). This changes the color of the badge.
23
+ */
24
+ active?: boolean;
25
+ /**
26
+ * There is an error present – 'error be prioritized over warnings if both are set to `true`.
27
+ */
28
+ error?: boolean;
29
+ /**
30
+ * There is a warning present.
31
+ */
32
+ warning?: boolean;
33
+ /**
34
+ * Font size for the badge
35
+ */
36
+ fontSize?: number | string;
37
+ /**
38
+ * Font weight for the badge
39
+ */
40
+ fontWeight?: number | string;
41
+ /**
42
+ * Line weight for the badge
43
+ */
44
+ lineHeight?: number | string;
45
+ /**
46
+ * Colors of the font in the manner of [darkThemeColor, lightThemeColor]
47
+ */
48
+ colors?: string[];
49
+ /**
50
+ * Background colors for the badge in the manner of [darkThemeColor, lightThemeColor]
51
+ */
52
+ backgroundColors?: string[];
53
+ /**
54
+ * Top and bottom padding for the badge
55
+ */
56
+ verticalPadding?: number;
57
+ /**
58
+ * Left and right padding for the badge
59
+ */
60
+ horizontalPadding?: number;
61
+ /**
62
+ * Height of the badge
63
+ */
64
+ height?: number;
65
+ /**
66
+ * Minimum height of the badge
67
+ */
68
+ minHeight?: number;
69
+ /**
70
+ * Width of the badge
71
+ */
72
+ width?: number;
73
+ /**
74
+ * Minimum width of the badge
75
+ */
76
+ minWidth?: number;
77
+ /**
78
+ * Border colors in the manner of [darkThemeColor, lightThemeColor]. When provided, a 1px solid border is applied.
79
+ */
80
+ borderColors?: string[];
81
+ };
82
+ /**
83
+ * Badges show a bubble containing a `number` or a `string`. It may be used by itself or with children passed as props
84
+ * (to display a badge on top of an icon, for example, pass the icon as the child).
85
+ *
86
+ * If the badge content is passed as a `float`, it will be rounded up to the nearest `integer`,
87
+ * and if the number is higher than 1 000 or 1 000 000 it will be abbreviated to for example "1.4K" or "1.4M" respectively.
88
+ * If you need to display a `float` instead of a rounded `integer`, pass it as a `string` instead (e.g. "1,4").
89
+ *
90
+ * ### Import
91
+ *
92
+ * ``` js
93
+ * import { Badge } from '@ntbjs/react-components/data'
94
+ * // or
95
+ * import Badge from '@ntbjs/react-components/data/Badge'
96
+ * ```
97
+ * ## Props
98
+ * ```
99
+ * Pass `badgeIcon={<svg></svg>}` to display an icon.
100
+ * Pass a number or string to the badgeContent to display it alongside the icon.
101
+ * Pass `align={"left"}`or `align={"center"}` to align content.
102
+ * Pass `elevated={true}` to display the badge on top of the children
103
+ * Pass `active={true}` to reflect the active status of the badge
104
+ * Pass `error={true}` to reflect the error status of the badge
105
+ * Pass `warning={true}` to reflect the warning status of the badge
106
+ * Pass `fontSize={15}` to set the font size of the badge in pixel
107
+ * Pass `fontWeight={500}` to set the font weight of the badge
108
+ * Pass `lineHeight={12}` to set the line height of the badge in pixel
109
+ * Pass `colors={[#ffffff, #000000]}` to set the font color of the badge
110
+ * Pass `backgroundColors={[#ffffff, #000000]}` to set the background color of the badge
111
+ * Pass `verticalPadding={15}` to set the bottom and top padding of the badge in pixel
112
+ * Pass `horizontalPadding={20}` to set the left and right padding of the badge in pixel
113
+ * Pass `height={24}` to set the height of the badge in pixel
114
+ * Pass `minHeight={24}` to set the minimum height of the badge in pixel
115
+ * Pass `width={50}` to set the width of the badge in pixel
116
+ * Pass `minWidth={32}` to set the minimum width of the badge in pixel
117
+ * ```
118
+ */
119
+ declare const Badge: 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.BadgeStyleProps>, never>, "ref">, keyof BadgeOwnProps> & BadgeOwnProps & React.RefAttributes<any>>;
120
+ export default Badge;
@@ -0,0 +1,33 @@
1
+ export interface BadgeStyleProps {
2
+ $elevated?: boolean;
3
+ $hasChildren?: boolean;
4
+ }
5
+ interface BadgeLabelStyleProps {
6
+ $elevated?: boolean;
7
+ $active?: boolean;
8
+ $error?: boolean;
9
+ $warning?: boolean;
10
+ $lineHeight?: number | string;
11
+ $horizontalPadding?: number;
12
+ $minHeight?: number;
13
+ $minWidth?: number;
14
+ $backgroundColors?: string[];
15
+ $colors?: string[];
16
+ $borderColors?: string[];
17
+ verticalPadding?: number;
18
+ $elevatedverticalPadding?: number;
19
+ elevated?: boolean;
20
+ error?: boolean;
21
+ fontSize?: number | string;
22
+ fontWeight?: number | string;
23
+ height?: number;
24
+ width?: number;
25
+ }
26
+ interface BadgeIconStyleProps {
27
+ $useGutter?: boolean;
28
+ }
29
+ export declare const Badge: 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>>, BadgeStyleProps>, never>> & string;
30
+ export declare const BadgeChildrenContainer: 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;
31
+ export declare const BadgeLabel: 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>>, BadgeLabelStyleProps>, never>> & string;
32
+ export declare const BadgeIcon: 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>>, BadgeIconStyleProps>, never>> & string;
33
+ export {};
@@ -0,0 +1 @@
1
+ export { default } from './Badge';
@@ -0,0 +1,116 @@
1
+ import React from 'react';
2
+ import type { Middleware } from '@floating-ui/react';
3
+ import type { PopoverPlacement } from '../../../hooks/useFloatingPopover';
4
+ export type PopoverAppendTo = 'parent' | Element | ((reference: Element) => Element);
5
+ type PopoverOwnProps = {
6
+ /**
7
+ * The content of the `Popover`.
8
+ */
9
+ content: string | React.ReactElement<any>;
10
+ /**
11
+ * Whether the popover's content is interactive and where it renders (inline by default for interactive popovers).
12
+ */
13
+ interactive?: boolean;
14
+ /**
15
+ * Preferred placement; 12 concrete names need no Popper→Floating UI translation. Three `auto*` values select `autoPlacement()` instead of `flip()`.
16
+ */
17
+ placement?: PopoverPlacement;
18
+ /**
19
+ * Duration in ms of the transition animation.
20
+ */
21
+ duration?: number;
22
+ /**
23
+ * Events that cause the popover to show (space-separated). `''` means no triggers, `undefined` means `'mouseenter focus'`, component defaults to `'click focus'`.
24
+ */
25
+ trigger?: string;
26
+ /**
27
+ * `[skidding, distance]`; distance is the gap between reference and arrow tip (not box), absorbing the old `+15` offset.
28
+ */
29
+ offset?: number[];
30
+ /**
31
+ * Whether the popover has an arrow; also moves the box even when not drawn (existing behaviour, reproduced).
32
+ */
33
+ arrow?: boolean;
34
+ /**
35
+ * Pass a boolean to control visibility; both `true` and `false` disable native triggers. `onClickOutside` still fires in controlled mode.
36
+ */
37
+ visible?: boolean;
38
+ /**
39
+ * @deprecated Accepted and ignored; use `middleware` instead.
40
+ */
41
+ modifiers?: any[];
42
+ /**
43
+ * Extra Floating UI middleware, appended after the built-in chain; one internal caller needed this for width matching.
44
+ */
45
+ middleware?: Middleware[];
46
+ /**
47
+ * Max-width of the popover box, as a CSS length. Defaults to `'none'`, which is what tippy
48
+ * received and wrote inline on every popover in both consumers.
49
+ */
50
+ maxWidth?: string;
51
+ /**
52
+ * Whether the `Popover` contains a context menu.
53
+ * This will remove the default arrow, and apply styling.
54
+ *
55
+ * It also makes a click on a `ContextMenuItem` close the menu — see
56
+ * `handleContextMenuClick`.
57
+ */
58
+ contextMenu?: boolean;
59
+ /**
60
+ * Whether the `Popover` contains a context menu which is the sublevel of another context menu.
61
+ * This will automatically set placement, spacing and trigger events, add a dropdown icon, etc.
62
+ */
63
+ contextMenuSublevel?: boolean;
64
+ /**
65
+ * `z-index` of the positioned element (default: 9999, tippy's default).
66
+ */
67
+ zIndex?: number;
68
+ /**
69
+ * A disabled popover can never open, even under a controlled `visible={true}` — tippy's
70
+ * semantics.
71
+ */
72
+ disabled?: boolean;
73
+ /**
74
+ * Where the popover is rendered (default: inline for interactive popovers, document.body otherwise).
75
+ */
76
+ appendTo?: PopoverAppendTo;
77
+ /** Fired when a press lands outside both the reference and the popover. */
78
+ onClickOutside?: (event?: Event) => void;
79
+ /**
80
+ * Fired when the popover opens. tippy's `onShow`, minus its instance argument.
81
+ */
82
+ onShow?: () => void;
83
+ /**
84
+ * Fired when the popover closes; one internal caller (inputs/Button) depends on it to reset dropdown-is-active class.
85
+ */
86
+ onHide?: () => void;
87
+ /**
88
+ * Content of the `Popover`.
89
+ */
90
+ children: React.ReactNode;
91
+ };
92
+ /**
93
+ * The `Popover` is a transient view that shows on a content screen when a user clicks on a control button or within a defined area.
94
+ * A `Popover` renders a temporary context to get user’s attention and to hide unnecessary interactions.
95
+ *
96
+ * This component is used with the `Button` and `ContextMenu` components to create dropdown menus and context menus.
97
+ * See their documentation for usage examples.
98
+ *
99
+ * ### Import
100
+ *
101
+ * ``` js
102
+ * import { Popover } from '@ntbjs/react-components/data'
103
+ * // or
104
+ * import Popover from '@ntbjs/react-components/data/Popover'
105
+ * ```
106
+ *
107
+ * ### Usage example
108
+ *
109
+ * ``` js
110
+ <Popover content={<img alt="Dummy content" src={dummyImage} />}>
111
+ <ActionButton icon={<DeleteIcon />} onClick={() => {}} />
112
+ </Popover>
113
+ * ```
114
+ */
115
+ declare const Popover: 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 PopoverOwnProps> & PopoverOwnProps & React.RefAttributes<any>>;
116
+ export default Popover;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The popover box — what `.tippy-box` was.
3
+ *
4
+ * `Popover.tsx` puts the transition styles and the `max-width` on this element inline and
5
+ * the POSITION on its parent, matching the split tippy used (animated box inside a
6
+ * Popper-positioned root) and the one `Tooltip` and the three existing Floating UI sites
7
+ * use.
8
+ *
9
+ * `max-height: inherit` is not decorative and neither is the `.tippy-content` chain below
10
+ * it. `size()` writes its cap onto the POSITIONER (`elements.floating`), exactly where
11
+ * `popper-max-size-modifier` + `applyMaxSize` used to write `state.styles.popper.maxHeight`,
12
+ * so the cap has to be inherited down box → `.tippy-content` → its child to reach the
13
+ * element that actually scrolls.
14
+ */
15
+ export declare const Popover: 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 './Popover';
@@ -0,0 +1,72 @@
1
+ import React from 'react';
2
+ type SeverityBadgeOwnProps = {
3
+ /** Severity level (1-5). 1-2 = Info, 3-4 = Limited use, 5 = Highly restricted. */
4
+ severity: 1 | 2 | 3 | 4 | 5;
5
+ /** Badge content — string or JSX node (e.g. label with remove button). */
6
+ label: React.ReactNode;
7
+ /** Override the default information icon. Pass null to suppress. */
8
+ icon?: React.ReactNode;
9
+ /** Font size in pixels. */
10
+ fontSize?: number;
11
+ /** Font weight. */
12
+ fontWeight?: number;
13
+ /** Badge height in pixels. */
14
+ height?: number;
15
+ /** Left and right padding in pixels. */
16
+ horizontalPadding?: number;
17
+ /** Top and bottom padding in pixels. */
18
+ verticalPadding?: number;
19
+ };
20
+ /**
21
+ * A severity-aware badge that maps a severity level (1-5) to the appropriate
22
+ * color scheme and icon. Thin wrapper around Badge.
23
+ *
24
+ * ### Import
25
+ *
26
+ * ```js
27
+ * import { SeverityBadge } from "@ntbjs/react-components/data";
28
+ * // named exports for advanced use
29
+ * ```
30
+ */
31
+ declare const SeverityBadge: React.ForwardRefExoticComponent<Omit<Omit<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>>, import("../Badge/Badge.styled").BadgeStyleProps>, never>, "ref">, keyof {
32
+ badgeIcon?: React.ReactNode;
33
+ badgeContent?: React.ReactNode;
34
+ children?: React.ReactNode | string;
35
+ elevated?: boolean;
36
+ active?: boolean;
37
+ error?: boolean;
38
+ warning?: boolean;
39
+ fontSize?: number | string;
40
+ fontWeight?: number | string;
41
+ lineHeight?: number | string;
42
+ colors?: string[];
43
+ backgroundColors?: string[];
44
+ verticalPadding?: number;
45
+ horizontalPadding?: number;
46
+ height?: number;
47
+ minHeight?: number;
48
+ width?: number;
49
+ minWidth?: number;
50
+ borderColors?: string[];
51
+ }> & {
52
+ badgeIcon?: React.ReactNode;
53
+ badgeContent?: React.ReactNode;
54
+ children?: React.ReactNode | string;
55
+ elevated?: boolean;
56
+ active?: boolean;
57
+ error?: boolean;
58
+ warning?: boolean;
59
+ fontSize?: number | string;
60
+ fontWeight?: number | string;
61
+ lineHeight?: number | string;
62
+ colors?: string[];
63
+ backgroundColors?: string[];
64
+ verticalPadding?: number;
65
+ horizontalPadding?: number;
66
+ height?: number;
67
+ minHeight?: number;
68
+ width?: number;
69
+ minWidth?: number;
70
+ borderColors?: string[];
71
+ } & React.RefAttributes<any>, "ref">, keyof SeverityBadgeOwnProps> & SeverityBadgeOwnProps & React.RefAttributes<any>>;
72
+ export default SeverityBadge;
@@ -0,0 +1 @@
1
+ export { default } from './SeverityBadge';
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ type TabOwnProps = {
3
+ children?: any;
4
+ hidden?: boolean;
5
+ /**
6
+ * The tab's clickable header, conventionally a `Badge`. Not read by Tab itself; Tabs extracts it.
7
+ */
8
+ trigger?: React.ReactElement<any>;
9
+ };
10
+ /**
11
+ * This is a component to help you get started with development.
12
+ */
13
+ declare const Tab: React.ForwardRefExoticComponent<Omit<Omit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>>, never>, never>, "ref">, keyof TabOwnProps> & TabOwnProps & React.RefAttributes<any>>;
14
+ export default Tab;
@@ -0,0 +1 @@
1
+ export declare const Tab: 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<HTMLParagraphElement>, HTMLParagraphElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>>, never>, never>> & string;
@@ -0,0 +1 @@
1
+ export { default } from './Tab';
@@ -0,0 +1,111 @@
1
+ import React from 'react';
2
+ import * as S from './Tabs.styled';
3
+ type TabsOwnProps = {
4
+ children?: any[] | any;
5
+ /**
6
+ * Whether `Tabs` component has a background color
7
+ */
8
+ backgroundColor?: string;
9
+ /**
10
+ * Whether `tabs` will have a predefined min-height.
11
+ */
12
+ defaultMinHeight?: string;
13
+ /**
14
+ * Custom padding.
15
+ */
16
+ customPadding?: string;
17
+ /**
18
+ * Callback for clicked tab
19
+ */
20
+ onTabClick?: (...args: any[]) => any;
21
+ };
22
+ /**
23
+ * Tabs that let you group content
24
+ *
25
+ * ### Import
26
+ *
27
+ * ``` js
28
+ * import { Tabs, Tab } from '@ntbjs/react-components/data'
29
+ * // or
30
+ * import Tabs from '@ntbjs/react-components/data/Tabs'
31
+ * import Tab from '@ntbjs/react-components/data/Tab'
32
+ * ```
33
+ * ### Tab - Tabs - Badge
34
+ * `Tab`, `Tabs` and `Badge` must be used in order to implement the component.
35
+ * ```
36
+ * <Tabs>
37
+ * <Tab trigger={<Badge>Tab title</Badge>}>
38
+ * Tab content
39
+ * </Tab>
40
+ * </Tabs>
41
+ * ```
42
+ * ## Wrapping
43
+ * Content (data displayed inside the `Tab`) is wrapped by `Tab`:
44
+ * ```
45
+ * <Tab>
46
+ * Tab content
47
+ * </Tab>
48
+ * ```
49
+ * ### Badge
50
+ * The tab title is wrapped by `Badge` (which is passed as the trigger prop inside `Tab`):
51
+ *
52
+ *Props that can be passed inside the `Badge` component are: `badgeContent`, `active`, `error`, `warning` (check out the `Badge` component documentation for props options).
53
+ * ```
54
+ * <Tab trigger={<Badge>Tab title</Badge>}>
55
+ * Tab content
56
+ * </Tab>
57
+ * ```
58
+ * All tabs are wrapped by `Tabs`:
59
+ * ```
60
+ * <Tabs>
61
+ * <Tab trigger={<Badge>Tab title 1</Badge>}>Tab content 1</Tab>
62
+ * <Tab trigger={<Badge>Tab title 2</Badge>}>Tab content 2</Tab>
63
+ * <Tab trigger={<Badge>Tab title 3</Badge>}>Tab content 3</Tab>
64
+ * <Tab trigger={<Badge>Tab title 4</Badge>}>Tab content 4</Tab>
65
+ * <Tab trigger={<Badge>Tab title 5</Badge>}>Tab content 5</Tab>
66
+ * </Tabs>
67
+ * ```
68
+ * ## Props
69
+ * A `backgroundColor` prop can be passed as a string to set the `Tabs` component background color.
70
+ * ```
71
+ * <Tabs backgroundColor={'#bfe0d5'}>
72
+ * <Tab trigger={<Badge>Tab title 1</Badge>}>Tab content 1</Tab>
73
+ * <Tab trigger={<Badge>Tab title 2</Badge>}>Tab content 2</Tab>
74
+ * </Tabs>
75
+ * ```
76
+ * ### hidden
77
+ * A single Tab can be hidden by using the `hidden={true||false}` prop (this is useful when the tab has empty content):
78
+ * ```
79
+ * <Tabs>
80
+ * <Tab hidden={true} trigger={<Badge>Tab title 1</Badge>}></Tab>
81
+ * <Tab trigger={<Badge>Tab title 2</Badge>}>Tab content 2</Tab>
82
+ * <Tab hidden={true} trigger={<Badge>Tab title 3</Badge>}></Tab>
83
+ * <Tab trigger={<Badge>Tab title 4</Badge>}>Tab content 4</Tab>
84
+ * <Tab hidden={true} trigger={<Badge>Tab title 5</Badge>}></Tab>
85
+ * </Tabs>
86
+ * ```
87
+ * ### Default minHeight
88
+ * A `defaultMinHeight` prop can be passed to the Tabs component to set a predefined min-height.
89
+ *
90
+ * Pass `defaultMinHeight={'value px'}` on the `Tabs` component to use this feature.
91
+ * ```
92
+ * <Tabs defaultMinHeight={'500px'}>
93
+ * <Tab trigger={<Badge>Tab title 1</Badge>}>Tab content 1</Tab>
94
+ * <Tab trigger={<Badge>Tab title 2</Badge>}>Tab content 2</Tab>
95
+ * </Tabs>
96
+ * ```
97
+ *
98
+ * ### Custom padding
99
+ * A `customPadding` prop can be passed to the Tabs component to set a custom padding on the tabs. The custom padding is applied the the Tabs options,
100
+ * not to the content within the Tabs.
101
+ *
102
+ * Pass `customPadding={'value px'}` on the `Tabs` component to use this feature.
103
+ * ```
104
+ * <Tabs customPadding={'40px'}>
105
+ * <Tab trigger={<Badge>Tab title 1</Badge>}>Tab content 1</Tab>
106
+ * <Tab trigger={<Badge>Tab title 2</Badge>}>Tab content 2</Tab>
107
+ * </Tabs>
108
+ * ```
109
+ */
110
+ declare const Tabs: 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.TabsStyleProps>, never>, "ref">, keyof TabsOwnProps> & TabsOwnProps & React.RefAttributes<any>>;
111
+ export default Tabs;
@@ -0,0 +1,26 @@
1
+ /** Props of the `Tabs` root, i.e. what `Tabs.tsx` passes to `S.Tabs`. */
2
+ export interface TabsStyleProps {
3
+ /** `backgroundColor` — `PropTypes.string`, a CSS colour, interpolated raw. */
4
+ $backgroundColor?: string;
5
+ }
6
+ /**
7
+ * Shared by `TabHeaders` and `TabHeaderBorder`. Defect: `custompadding` has no `$`, leaks to DOM. Typed as `number | string` to match component default of 0.
8
+ */
9
+ interface TabPaddingStyleProps {
10
+ /** `customPadding` — see the interface JSDoc; both the leak and the union are there. */
11
+ custompadding?: number | string;
12
+ }
13
+ /** Props of `TabHeader`, one `<li>` per tab. */
14
+ interface TabHeaderStyleProps {
15
+ /**
16
+ * `tab.key === activeTab`, derived in the component, so genuinely `boolean`. Read both
17
+ * in the `$active &&` block and inside the two `themeProp()` callbacks below.
18
+ */
19
+ $active?: boolean;
20
+ }
21
+ export declare const Tabs: 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>>, TabsStyleProps>, never>> & string;
22
+ export declare const TabHeaders: 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<HTMLUListElement>, HTMLUListElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>>, TabPaddingStyleProps>, never>> & string;
23
+ export declare const TabHeader: 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").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>>, TabHeaderStyleProps>, never>> & string;
24
+ export declare const TabContent: 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 TabHeaderBorder: 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>>, TabPaddingStyleProps>, never>> & string;
26
+ export {};
@@ -0,0 +1 @@
1
+ export { default } from './Tabs';
@@ -0,0 +1,88 @@
1
+ import React from 'react';
2
+ import type { PopoverPlacement, PopperOffset } from '../../../hooks/useFloatingPopover';
3
+ export type TooltipAppendTo = 'parent' | Element | ((reference: Element) => Element);
4
+ type TooltipOwnProps = {
5
+ /**
6
+ * The content of the `Tooltip`.
7
+ *
8
+ * **NB!** If the content is a `string`, it should be wrapped in a tag, e.g.
9
+ * `<span>{content}</span>`. The requirement outlived its original cause — it was a
10
+ * `@tippyjs/react` quirk — but it is kept because consumers have written to it.
11
+ */
12
+ content: string | React.ReactElement<any>;
13
+ /**
14
+ * Determines if the tooltip has interactive content inside of it, so that it can be
15
+ * hovered over and clicked inside without hiding.
16
+ */
17
+ interactive?: boolean;
18
+ /**
19
+ * The preferred placement of the tooltip. Note that the flip middleware can change this
20
+ * to the opposite placement if it has more space.
21
+ */
22
+ placement?: PopoverPlacement;
23
+ /**
24
+ * Duration in ms of the transition animation.
25
+ */
26
+ duration?: number;
27
+ /**
28
+ * Events that cause the tooltip to show (space-separated). Defaults to `'mouseenter focus'`, `''` means no triggers.
29
+ */
30
+ trigger?: 'mouseenter' | 'mouseenter focus' | 'click' | 'focusin' | 'mouseenter click' | '';
31
+ /**
32
+ * Pass a boolean to control visibility; both `true` and `false` disable native triggers. `undefined` leaves uncontrolled.
33
+ */
34
+ visible?: boolean;
35
+ /**
36
+ * Whether the arrow is rendered. Defaults to `true`, which is tippy's default and was
37
+ * therefore already the behaviour; 6 consumer call sites pass `false`.
38
+ */
39
+ arrow?: boolean;
40
+ /**
41
+ * `z-index` of the positioned element (default: 9999, tippy's default).
42
+ */
43
+ zIndex?: number;
44
+ /**
45
+ * Disabled tooltip can never open, even under controlled `visible={true}` (tippy semantics).
46
+ */
47
+ disabled?: boolean;
48
+ /**
49
+ * `[skidding, distance]`, Popper's convention, where `distance` is the gap between the
50
+ * reference and the tooltip BOX. Defaults to tippy's `[0, 10]`.
51
+ */
52
+ offset?: PopperOffset;
53
+ /**
54
+ * Cap on the box's width, in px. Defaults to 350 — tippy's default, and applied to every
55
+ * tooltip today, so it decides where text wraps.
56
+ */
57
+ maxWidth?: number;
58
+ /**
59
+ * Where the tooltip is rendered. Defaults to `document.body`. See `TooltipAppendTo`.
60
+ */
61
+ appendTo?: TooltipAppendTo;
62
+ /** Fired when a press lands outside both the reference and the tooltip. */
63
+ onClickOutside?: (event?: Event) => void;
64
+ /**
65
+ * @deprecated Accepted and IGNORED. This was a Popper `modifiers` array; Floating UI has
66
+ * middleware instead and the two are not translatable prop-for-prop. Kept so that no
67
+ * existing call site throws — plan C6.
68
+ */
69
+ modifiers?: unknown;
70
+ /**
71
+ * @deprecated Accepted and IGNORED, for the same reason as `modifiers`.
72
+ */
73
+ popperOptions?: unknown;
74
+ children?: React.ReactNode;
75
+ };
76
+ /**
77
+ * Tooltips display informative text when users hover over, focus on, or tap an element.
78
+ *
79
+ * ### Import
80
+ *
81
+ * ``` js
82
+ * import { Tooltip } from '@ntbjs/react-components/data'
83
+ * // or
84
+ * import Tooltip from '@ntbjs/react-components/data/Tooltip'
85
+ * ```
86
+ */
87
+ declare const Tooltip: 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 TooltipOwnProps> & TooltipOwnProps & React.RefAttributes<any>>;
88
+ export default Tooltip;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The tooltip box — what `.tippy-box` was.
3
+ *
4
+ * `Tooltip.tsx` puts the transition styles and the `max-width` on this element inline and
5
+ * the POSITION on its parent, matching the split tippy used (animated box inside a
6
+ * Popper-positioned root) and the one the three existing Floating UI sites use.
7
+ */
8
+ export declare const Tooltip: 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 './Tooltip';