@babylonlabs-io/core-ui 1.38.0 → 1.39.0

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 (445) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +2 -2
  2. package/dist/components/Accordion/components/AccordionDetails.d.ts +1 -1
  3. package/dist/components/Accordion/components/AccordionSummary.d.ts +2 -2
  4. package/dist/components/Accordion/hooks/useHeightObserver.d.ts +1 -1
  5. package/dist/components/Accordion/index.d.ts +3 -4
  6. package/dist/components/AmountItem/AmountItem.d.ts +1 -1
  7. package/dist/components/AmountItem/index.d.ts +1 -1
  8. package/dist/components/Avatar/Avatar.d.ts +1 -2
  9. package/dist/components/Avatar/AvatarGroup.d.ts +2 -3
  10. package/dist/components/Avatar/ValidatorAvatar.d.ts +1 -1
  11. package/dist/components/Avatar/index.d.ts +3 -3
  12. package/dist/components/Badge/Badge.d.ts +1 -2
  13. package/dist/components/Badge/index.d.ts +1 -1
  14. package/dist/components/Button/Button.d.ts +2 -3
  15. package/dist/components/Button/IconButton.d.ts +2 -3
  16. package/dist/components/Button/WalletDisconnectButton.d.ts +2 -2
  17. package/dist/components/Button/index.d.ts +3 -3
  18. package/dist/components/Card/Card.d.ts +3 -4
  19. package/dist/components/Card/index.d.ts +1 -1
  20. package/dist/components/Chip/Chip.d.ts +1 -2
  21. package/dist/components/Chip/index.d.ts +1 -1
  22. package/dist/components/Copy/Copy.d.ts +1 -1
  23. package/dist/components/CounterButton/index.d.ts +1 -1
  24. package/dist/components/Dialog/Dialog.d.ts +1 -1
  25. package/dist/components/Dialog/MobileDialog.d.ts +1 -1
  26. package/dist/components/Dialog/components/Backdrop.d.ts +1 -2
  27. package/dist/components/Dialog/components/DialogBody.d.ts +1 -1
  28. package/dist/components/Dialog/components/DialogFooter.d.ts +1 -1
  29. package/dist/components/Dialog/components/DialogHeader.d.ts +1 -1
  30. package/dist/components/Dialog/index.d.ts +5 -6
  31. package/dist/components/DisplayHash/DisplayHash.d.ts +1 -1
  32. package/dist/components/FeeItem/FeeItem.d.ts +1 -1
  33. package/dist/components/Form/Checkbox.d.ts +2 -2
  34. package/dist/components/Form/FormControl.d.ts +1 -2
  35. package/dist/components/Form/Input.d.ts +2 -3
  36. package/dist/components/Form/Radio.d.ts +2 -2
  37. package/dist/components/Form/Select.d.ts +2 -3
  38. package/dist/components/Form/components/Toggle.d.ts +2 -3
  39. package/dist/components/Form/index.d.ts +5 -5
  40. package/dist/components/Heading/Heading.d.ts +2 -3
  41. package/dist/components/Heading/index.d.ts +1 -1
  42. package/dist/components/Hint/Hint.d.ts +1 -1
  43. package/dist/components/Icons/common/BugReportIcon.d.ts +1 -1
  44. package/dist/components/Icons/common/ChevronLeftIcon.d.ts +1 -1
  45. package/dist/components/Icons/common/CloseIcon.d.ts +1 -1
  46. package/dist/components/Icons/common/CollapseIcon.d.ts +1 -1
  47. package/dist/components/Icons/common/CopyIcon.d.ts +1 -1
  48. package/dist/components/Icons/common/InfoIcon.d.ts +1 -1
  49. package/dist/components/Icons/common/OpenIcon.d.ts +1 -1
  50. package/dist/components/Icons/common/ThemeIcon.d.ts +1 -1
  51. package/dist/components/Icons/common/WarningIcon.d.ts +1 -1
  52. package/dist/components/Icons/index.d.ts +13 -13
  53. package/dist/components/Icons/wallet/BitcoinPublicKeyIcon.d.ts +1 -1
  54. package/dist/components/Icons/wallet/LinkWalletIcon.d.ts +1 -1
  55. package/dist/components/Icons/wallet/UsingInscriptionIcon.d.ts +1 -1
  56. package/dist/components/List/List.d.ts +2 -3
  57. package/dist/components/List/StatItem.d.ts +2 -2
  58. package/dist/components/List/index.d.ts +3 -3
  59. package/dist/components/ListLegacy/ListLegacy.d.ts +2 -3
  60. package/dist/components/ListLegacy/index.d.ts +2 -2
  61. package/dist/components/Loader/Loader.d.ts +0 -1
  62. package/dist/components/Loader/index.d.ts +1 -1
  63. package/dist/components/Menu/Menu.d.ts +2 -2
  64. package/dist/components/Menu/MenuContext.d.ts +1 -1
  65. package/dist/components/Menu/MenuDrawer.d.ts +1 -1
  66. package/dist/components/Menu/MenuItem.d.ts +1 -1
  67. package/dist/components/Menu/SubMenu.d.ts +1 -1
  68. package/dist/components/Menu/SubMenuItem.d.ts +1 -1
  69. package/dist/components/Menu/index.d.ts +6 -6
  70. package/dist/components/Popover/Popover.d.ts +2 -3
  71. package/dist/components/Popover/index.d.ts +1 -1
  72. package/dist/components/Portal/Portal.d.ts +2 -2
  73. package/dist/components/Portal/index.d.ts +1 -1
  74. package/dist/components/Spacer/Spacer.d.ts +1 -1
  75. package/dist/components/SubSection/SubSection.d.ts +1 -2
  76. package/dist/components/SubSection/index.d.ts +1 -1
  77. package/dist/components/Table/Table.d.ts +1 -2
  78. package/dist/components/Table/components/Cell.d.ts +1 -1
  79. package/dist/components/Table/components/Column.d.ts +1 -1
  80. package/dist/components/Table/components/Row.d.ts +1 -1
  81. package/dist/components/Table/index.d.ts +4 -4
  82. package/dist/components/Table/types/index.d.ts +1 -1
  83. package/dist/components/Text/Text.d.ts +2 -3
  84. package/dist/components/Text/index.d.ts +1 -1
  85. package/dist/components/Toggle/Toggle.d.ts +0 -1
  86. package/dist/components/Toggle/index.d.ts +1 -1
  87. package/dist/components/Warning/Warning.d.ts +1 -2
  88. package/dist/components/Warning/index.d.ts +1 -1
  89. package/dist/context/Dialog.context.d.ts +2 -2
  90. package/dist/context/Table.context.d.ts +2 -2
  91. package/dist/elements/FinalityProviderItem/index.d.ts +1 -1
  92. package/dist/elements/FinalityProviderLogo/index.d.ts +1 -1
  93. package/dist/elements/Icons/ChevronRightIcon.d.ts +1 -1
  94. package/dist/elements/Icons/SettingsIcon.d.ts +1 -1
  95. package/dist/elements/ProvidersList/index.d.ts +1 -1
  96. package/dist/elements/Table/Table.d.ts +1 -1
  97. package/dist/elements/Table/index.d.ts +1 -1
  98. package/dist/hooks/useFrozenColumns.d.ts +1 -1
  99. package/dist/hooks/useTableScroll.d.ts +1 -1
  100. package/dist/hooks/useTableSort.d.ts +1 -1
  101. package/dist/index.d.ts +52 -54
  102. package/dist/widgets/form/CheckboxField/CheckboxField.d.ts +1 -1
  103. package/dist/widgets/form/CheckboxField/index.d.ts +1 -1
  104. package/dist/widgets/form/Form/Form.d.ts +3 -3
  105. package/dist/widgets/form/Form/index.d.ts +1 -1
  106. package/dist/widgets/form/HiddenField/HiddenField.d.ts +1 -1
  107. package/dist/widgets/form/HiddenField/index.d.ts +1 -1
  108. package/dist/widgets/form/NumberField/NumberField.d.ts +2 -2
  109. package/dist/widgets/form/NumberField/index.d.ts +1 -1
  110. package/dist/widgets/form/RadioField/RadioField.d.ts +1 -1
  111. package/dist/widgets/form/RadioField/index.d.ts +1 -1
  112. package/dist/widgets/form/SelectField/SelectField.d.ts +3 -3
  113. package/dist/widgets/form/SelectField/index.d.ts +1 -1
  114. package/dist/widgets/form/TextField/TextField.d.ts +2 -2
  115. package/dist/widgets/form/TextField/index.d.ts +1 -1
  116. package/dist/widgets/form/hooks.d.ts +3 -3
  117. package/dist/widgets/sections/ActivityCard/components/ActivityCardActionSection.d.ts +1 -1
  118. package/dist/widgets/sections/ActivityCard/components/ActivityCardDetailsSection.d.ts +1 -1
  119. package/dist/widgets/sections/ActivityCard/index.d.ts +5 -5
  120. package/dist/widgets/sections/AmountSubsection/index.d.ts +1 -1
  121. package/dist/widgets/sections/FeesSection/index.d.ts +6 -6
  122. package/dist/widgets/sections/FinalityProviderSubsection/FinalityProviderSubsection.d.ts +1 -1
  123. package/dist/widgets/sections/FinalityProviderSubsection/index.d.ts +1 -1
  124. package/dist/widgets/sections/PreviewModal/PreviewModal.d.ts +1 -1
  125. package/dist/widgets/sections/PreviewModal/index.d.ts +1 -1
  126. package/dist/widgets/sections/RewardsPreviewModal/RewardsPreviewModal.d.ts +1 -1
  127. package/dist/widgets/sections/RewardsPreviewModal/index.d.ts +1 -1
  128. package/dist/widgets/sections/RewardsSubsection/index.d.ts +1 -1
  129. package/dist/widgets/sections/SettingMenu/SettingMenu.d.ts +3 -3
  130. package/dist/widgets/sections/SettingMenu/components/SettingMenuCustomContent.d.ts +1 -1
  131. package/dist/widgets/sections/SettingMenu/components/SettingMenuDescription.d.ts +1 -1
  132. package/dist/widgets/sections/SettingMenu/components/SettingMenuGroup.d.ts +1 -1
  133. package/dist/widgets/sections/SettingMenu/components/SettingMenuItem.d.ts +1 -1
  134. package/dist/widgets/sections/SettingMenu/components/SettingMenuSubMenu.d.ts +1 -1
  135. package/dist/widgets/sections/SettingMenu/components/SettingMenuTitle.d.ts +1 -1
  136. package/dist/widgets/sections/SettingMenu/components/index.d.ts +12 -12
  137. package/dist/widgets/sections/SettingMenu/index.d.ts +14 -14
  138. package/dist/widgets/sections/TableElement/TableElement.d.ts +1 -1
  139. package/dist/widgets/sections/TableElement/index.d.ts +1 -1
  140. package/dist/widgets/sections/UnbondingModal/index.d.ts +1 -1
  141. package/dist/widgets/sections/ValidatorSelector/ValidatorSelector.d.ts +2 -2
  142. package/dist/widgets/sections/ValidatorSelector/index.d.ts +1 -1
  143. package/dist/widgets/sections/WalletMenu/WalletMenu.d.ts +2 -2
  144. package/dist/widgets/sections/WalletMenu/components/WalletMenuCard.d.ts +1 -1
  145. package/dist/widgets/sections/WalletMenu/components/WalletMenuInfoItem.d.ts +1 -1
  146. package/dist/widgets/sections/WalletMenu/components/WalletMenuSettingItem.d.ts +1 -1
  147. package/dist/widgets/sections/WalletMenu/components/WalletToggle.d.ts +1 -1
  148. package/package.json +6 -6
  149. package/dist/components/Accordion/Accordion.js +0 -25
  150. package/dist/components/Accordion/Accordion.stories.d.ts +0 -6
  151. package/dist/components/Accordion/Accordion.stories.js +0 -16
  152. package/dist/components/Accordion/components/AccordionDetails.js +0 -29
  153. package/dist/components/Accordion/components/AccordionSummary.js +0 -10
  154. package/dist/components/Accordion/hooks/useHeightObserver.js +0 -24
  155. package/dist/components/Accordion/index.js +0 -4
  156. package/dist/components/AmountItem/AmountItem.js +0 -5
  157. package/dist/components/AmountItem/AmountItem.stories.d.ts +0 -6
  158. package/dist/components/AmountItem/AmountItem.stories.js +0 -29
  159. package/dist/components/AmountItem/index.js +0 -1
  160. package/dist/components/Avatar/Avatar.js +0 -6
  161. package/dist/components/Avatar/Avatar.stories.d.ts +0 -7
  162. package/dist/components/Avatar/Avatar.stories.js +0 -18
  163. package/dist/components/Avatar/AvatarGroup.js +0 -15
  164. package/dist/components/Avatar/AvatarGroup.stories.d.ts +0 -6
  165. package/dist/components/Avatar/AvatarGroup.stories.js +0 -21
  166. package/dist/components/Avatar/ValidatorAvatar.js +0 -6
  167. package/dist/components/Avatar/ValidatorAvatar.stories.d.ts +0 -7
  168. package/dist/components/Avatar/ValidatorAvatar.stories.js +0 -21
  169. package/dist/components/Avatar/index.js +0 -3
  170. package/dist/components/Badge/Badge.js +0 -10
  171. package/dist/components/Badge/Badge.stories.d.ts +0 -6
  172. package/dist/components/Badge/Badge.stories.js +0 -14
  173. package/dist/components/Badge/index.js +0 -1
  174. package/dist/components/Button/Button.js +0 -8
  175. package/dist/components/Button/Button.stories.d.ts +0 -6
  176. package/dist/components/Button/Button.stories.js +0 -9
  177. package/dist/components/Button/IconButton.js +0 -7
  178. package/dist/components/Button/IconButton.stories.d.ts +0 -12
  179. package/dist/components/Button/IconButton.stories.js +0 -55
  180. package/dist/components/Button/WalletDisconnectButton.js +0 -8
  181. package/dist/components/Button/index.js +0 -3
  182. package/dist/components/Card/Card.js +0 -6
  183. package/dist/components/Card/Card.stories.d.ts +0 -8
  184. package/dist/components/Card/Card.stories.js +0 -29
  185. package/dist/components/Card/index.js +0 -1
  186. package/dist/components/Chip/Chip.js +0 -6
  187. package/dist/components/Chip/Chip.stories.d.ts +0 -6
  188. package/dist/components/Chip/Chip.stories.js +0 -9
  189. package/dist/components/Chip/index.js +0 -1
  190. package/dist/components/Copy/Copy.js +0 -29
  191. package/dist/components/Copy/index.js +0 -1
  192. package/dist/components/CounterButton/CounterButton.js +0 -8
  193. package/dist/components/CounterButton/CounterButton.stories.d.ts +0 -10
  194. package/dist/components/CounterButton/CounterButton.stories.js +0 -41
  195. package/dist/components/CounterButton/index.js +0 -1
  196. package/dist/components/Dialog/Dialog.js +0 -9
  197. package/dist/components/Dialog/Dialog.stories.d.ts +0 -7
  198. package/dist/components/Dialog/Dialog.stories.js +0 -42
  199. package/dist/components/Dialog/MobileDialog.js +0 -10
  200. package/dist/components/Dialog/MobileDialog.stories.d.ts +0 -6
  201. package/dist/components/Dialog/MobileDialog.stories.js +0 -27
  202. package/dist/components/Dialog/components/Backdrop.js +0 -4
  203. package/dist/components/Dialog/components/DialogBody.js +0 -3
  204. package/dist/components/Dialog/components/DialogFooter.js +0 -3
  205. package/dist/components/Dialog/components/DialogHeader.js +0 -5
  206. package/dist/components/Dialog/index.js +0 -6
  207. package/dist/components/DisplayHash/DisplayHash.js +0 -10
  208. package/dist/components/DisplayHash/index.js +0 -1
  209. package/dist/components/FeeItem/FeeItem.js +0 -6
  210. package/dist/components/FeeItem/FeeItem.stories.d.ts +0 -7
  211. package/dist/components/FeeItem/FeeItem.stories.js +0 -19
  212. package/dist/components/Form/Checkbox.js +0 -10
  213. package/dist/components/Form/Checkbox.stories.d.ts +0 -6
  214. package/dist/components/Form/Checkbox.stories.js +0 -13
  215. package/dist/components/Form/FormControl.js +0 -6
  216. package/dist/components/Form/FormControl.stories.d.ts +0 -8
  217. package/dist/components/Form/FormControl.stories.js +0 -30
  218. package/dist/components/Form/Input.js +0 -8
  219. package/dist/components/Form/Input.stories.d.ts +0 -10
  220. package/dist/components/Form/Input.stories.js +0 -43
  221. package/dist/components/Form/Radio.js +0 -10
  222. package/dist/components/Form/Radio.stories.d.ts +0 -6
  223. package/dist/components/Form/Radio.stories.js +0 -13
  224. package/dist/components/Form/Select.js +0 -47
  225. package/dist/components/Form/Select.stories.d.ts +0 -11
  226. package/dist/components/Form/Select.stories.js +0 -69
  227. package/dist/components/Form/components/Toggle.js +0 -22
  228. package/dist/components/Form/index.js +0 -5
  229. package/dist/components/Heading/Heading.js +0 -9
  230. package/dist/components/Heading/Heading.stories.d.ts +0 -6
  231. package/dist/components/Heading/Heading.stories.js +0 -10
  232. package/dist/components/Heading/index.js +0 -1
  233. package/dist/components/Hint/Hint.js +0 -53
  234. package/dist/components/Hint/Hint.stories.d.ts +0 -12
  235. package/dist/components/Hint/Hint.stories.js +0 -52
  236. package/dist/components/Hint/index.js +0 -1
  237. package/dist/components/Icons/ThemedIcon.js +0 -25
  238. package/dist/components/Icons/common/BugReportIcon.js +0 -7
  239. package/dist/components/Icons/common/ChevronLeftIcon.js +0 -7
  240. package/dist/components/Icons/common/CloseIcon.js +0 -7
  241. package/dist/components/Icons/common/CollapseIcon.js +0 -7
  242. package/dist/components/Icons/common/CopyIcon.js +0 -7
  243. package/dist/components/Icons/common/InfoIcon.js +0 -8
  244. package/dist/components/Icons/common/OpenIcon.js +0 -7
  245. package/dist/components/Icons/common/ThemeIcon.js +0 -7
  246. package/dist/components/Icons/common/WarningIcon.js +0 -8
  247. package/dist/components/Icons/index.js +0 -25
  248. package/dist/components/Icons/wallet/BitcoinPublicKeyIcon.js +0 -8
  249. package/dist/components/Icons/wallet/LinkWalletIcon.js +0 -8
  250. package/dist/components/Icons/wallet/UsingInscriptionIcon.js +0 -8
  251. package/dist/components/List/List.js +0 -16
  252. package/dist/components/List/List.stories.d.ts +0 -12
  253. package/dist/components/List/List.stories.js +0 -81
  254. package/dist/components/List/StatItem.js +0 -24
  255. package/dist/components/List/components/ListItem.js +0 -6
  256. package/dist/components/List/index.js +0 -3
  257. package/dist/components/ListLegacy/ListLegacy.js +0 -16
  258. package/dist/components/ListLegacy/ListLegacy.stories.d.ts +0 -11
  259. package/dist/components/ListLegacy/ListLegacy.stories.js +0 -71
  260. package/dist/components/ListLegacy/components/ListItemLegacy.js +0 -6
  261. package/dist/components/ListLegacy/index.js +0 -2
  262. package/dist/components/Loader/Loader.js +0 -6
  263. package/dist/components/Loader/Loader.stories.d.ts +0 -6
  264. package/dist/components/Loader/Loader.stories.js +0 -11
  265. package/dist/components/Loader/index.js +0 -1
  266. package/dist/components/Menu/Menu.js +0 -29
  267. package/dist/components/Menu/Menu.stories.d.ts +0 -6
  268. package/dist/components/Menu/Menu.stories.js +0 -38
  269. package/dist/components/Menu/MenuContext.js +0 -9
  270. package/dist/components/Menu/MenuDrawer.js +0 -24
  271. package/dist/components/Menu/MenuItem.js +0 -27
  272. package/dist/components/Menu/SubMenu.js +0 -12
  273. package/dist/components/Menu/SubMenuItem.js +0 -6
  274. package/dist/components/Menu/index.js +0 -6
  275. package/dist/components/Popover/Popover.js +0 -16
  276. package/dist/components/Popover/Popover.stories.d.ts +0 -6
  277. package/dist/components/Popover/Popover.stories.js +0 -25
  278. package/dist/components/Popover/index.js +0 -1
  279. package/dist/components/Portal/Portal.js +0 -44
  280. package/dist/components/Portal/index.js +0 -1
  281. package/dist/components/Spacer/Spacer.js +0 -9
  282. package/dist/components/Spacer/index.js +0 -1
  283. package/dist/components/SubSection/SubSection.js +0 -4
  284. package/dist/components/SubSection/SubSection.stories.d.ts +0 -6
  285. package/dist/components/SubSection/SubSection.stories.js +0 -13
  286. package/dist/components/SubSection/index.js +0 -1
  287. package/dist/components/Table/Table.js +0 -43
  288. package/dist/components/Table/Table.stories.d.ts +0 -9
  289. package/dist/components/Table/Table.stories.js +0 -210
  290. package/dist/components/Table/components/Cell.js +0 -8
  291. package/dist/components/Table/components/Column.js +0 -19
  292. package/dist/components/Table/components/Row.js +0 -7
  293. package/dist/components/Table/index.js +0 -4
  294. package/dist/components/Table/types/index.js +0 -1
  295. package/dist/components/Text/Text.js +0 -11
  296. package/dist/components/Text/Text.stories.d.ts +0 -6
  297. package/dist/components/Text/Text.stories.js +0 -10
  298. package/dist/components/Text/index.js +0 -1
  299. package/dist/components/Toggle/Toggle.js +0 -12
  300. package/dist/components/Toggle/Toggle.stories.d.ts +0 -6
  301. package/dist/components/Toggle/Toggle.stories.js +0 -14
  302. package/dist/components/Toggle/index.js +0 -1
  303. package/dist/components/Warning/Warning.js +0 -7
  304. package/dist/components/Warning/Warning.stories.d.ts +0 -9
  305. package/dist/components/Warning/Warning.stories.js +0 -26
  306. package/dist/components/Warning/index.js +0 -1
  307. package/dist/components/index.js +0 -5
  308. package/dist/context/Dialog.context.js +0 -33
  309. package/dist/context/Table.context.js +0 -8
  310. package/dist/elements/FinalityProviderItem/FinalityProviderItem.js +0 -30
  311. package/dist/elements/FinalityProviderItem/FinalityProviderItem.stories.d.ts +0 -12
  312. package/dist/elements/FinalityProviderItem/FinalityProviderItem.stories.js +0 -97
  313. package/dist/elements/FinalityProviderItem/index.js +0 -1
  314. package/dist/elements/FinalityProviderLogo/FinalityProviderLogo.js +0 -24
  315. package/dist/elements/FinalityProviderLogo/FinalityProviderLogo.stories.d.ts +0 -13
  316. package/dist/elements/FinalityProviderLogo/FinalityProviderLogo.stories.js +0 -61
  317. package/dist/elements/FinalityProviderLogo/index.js +0 -1
  318. package/dist/elements/Icons/ChevronRightIcon.js +0 -2
  319. package/dist/elements/Icons/SettingsIcon.js +0 -2
  320. package/dist/elements/Icons/index.js +0 -2
  321. package/dist/elements/ProvidersList/ProvidersList.js +0 -9
  322. package/dist/elements/ProvidersList/ProvidersList.stories.d.ts +0 -10
  323. package/dist/elements/ProvidersList/ProvidersList.stories.js +0 -139
  324. package/dist/elements/ProvidersList/index.js +0 -1
  325. package/dist/elements/Table/Table.js +0 -14
  326. package/dist/elements/Table/Table.stories.d.ts +0 -8
  327. package/dist/elements/Table/Table.stories.js +0 -50
  328. package/dist/elements/Table/index.js +0 -1
  329. package/dist/hooks/index.js +0 -11
  330. package/dist/hooks/useClickOutside.js +0 -17
  331. package/dist/hooks/useControlledState.js +0 -13
  332. package/dist/hooks/useCopy.js +0 -43
  333. package/dist/hooks/useDrawerAnimation.js +0 -42
  334. package/dist/hooks/useFrozenColumns.js +0 -23
  335. package/dist/hooks/useIsMobile.js +0 -33
  336. package/dist/hooks/useMemoizedArray.js +0 -22
  337. package/dist/hooks/useModalManager.js +0 -28
  338. package/dist/hooks/useResizeObserver.js +0 -21
  339. package/dist/hooks/useTableScroll.js +0 -22
  340. package/dist/hooks/useTableSort.js +0 -46
  341. package/dist/index.js +0 -54
  342. package/dist/providers/CoreUIProvider.js +0 -9
  343. package/dist/tsconfig.lib.tsbuildinfo +0 -1
  344. package/dist/utils/constants.js +0 -4
  345. package/dist/utils/css.js +0 -6
  346. package/dist/utils/helpers.js +0 -110
  347. package/dist/utils/trim.js +0 -14
  348. package/dist/widgets/form/CheckboxField/CheckboxField.js +0 -7
  349. package/dist/widgets/form/CheckboxField/CheckboxField.stories.d.ts +0 -6
  350. package/dist/widgets/form/CheckboxField/CheckboxField.stories.js +0 -17
  351. package/dist/widgets/form/CheckboxField/index.js +0 -1
  352. package/dist/widgets/form/Form/Form.js +0 -20
  353. package/dist/widgets/form/Form/Form.stories.d.ts +0 -6
  354. package/dist/widgets/form/Form/Form.stories.js +0 -27
  355. package/dist/widgets/form/Form/index.js +0 -1
  356. package/dist/widgets/form/HiddenField/HiddenField.js +0 -13
  357. package/dist/widgets/form/HiddenField/HiddenField.stories.d.ts +0 -6
  358. package/dist/widgets/form/HiddenField/HiddenField.stories.js +0 -17
  359. package/dist/widgets/form/HiddenField/index.js +0 -1
  360. package/dist/widgets/form/NumberField/NumberField.js +0 -15
  361. package/dist/widgets/form/NumberField/NumberField.stories.d.ts +0 -6
  362. package/dist/widgets/form/NumberField/NumberField.stories.js +0 -31
  363. package/dist/widgets/form/NumberField/index.js +0 -1
  364. package/dist/widgets/form/RadioField/RadioField.js +0 -7
  365. package/dist/widgets/form/RadioField/RadioField.stories.d.ts +0 -6
  366. package/dist/widgets/form/RadioField/RadioField.stories.js +0 -14
  367. package/dist/widgets/form/RadioField/index.js +0 -1
  368. package/dist/widgets/form/SelectField/SelectField.js +0 -13
  369. package/dist/widgets/form/SelectField/SelectField.stories.d.ts +0 -6
  370. package/dist/widgets/form/SelectField/SelectField.stories.js +0 -33
  371. package/dist/widgets/form/SelectField/index.js +0 -1
  372. package/dist/widgets/form/TextField/TextField.js +0 -9
  373. package/dist/widgets/form/TextField/TextField.stories.d.ts +0 -6
  374. package/dist/widgets/form/TextField/TextField.stories.js +0 -28
  375. package/dist/widgets/form/TextField/index.js +0 -1
  376. package/dist/widgets/form/hooks.js +0 -29
  377. package/dist/widgets/form/types.js +0 -1
  378. package/dist/widgets/sections/ActivityCard/ActivityCard.js +0 -8
  379. package/dist/widgets/sections/ActivityCard/ActivityCard.stories.d.ts +0 -14
  380. package/dist/widgets/sections/ActivityCard/ActivityCard.stories.js +0 -265
  381. package/dist/widgets/sections/ActivityCard/components/ActivityCardActionSection.js +0 -5
  382. package/dist/widgets/sections/ActivityCard/components/ActivityCardAmountSection.js +0 -6
  383. package/dist/widgets/sections/ActivityCard/components/ActivityCardDetailsSection.js +0 -19
  384. package/dist/widgets/sections/ActivityCard/components/ActivityListItem.js +0 -5
  385. package/dist/widgets/sections/ActivityCard/index.js +0 -5
  386. package/dist/widgets/sections/AmountSubsection/AmountSubsection.js +0 -53
  387. package/dist/widgets/sections/AmountSubsection/AmountSubsection.stories.d.ts +0 -16
  388. package/dist/widgets/sections/AmountSubsection/AmountSubsection.stories.js +0 -230
  389. package/dist/widgets/sections/AmountSubsection/index.js +0 -1
  390. package/dist/widgets/sections/FeesSection/BBNFeeAmount.js +0 -7
  391. package/dist/widgets/sections/FeesSection/BTCFeeAmount.js +0 -19
  392. package/dist/widgets/sections/FeesSection/BTCFeeRate.js +0 -7
  393. package/dist/widgets/sections/FeesSection/FeesSection.js +0 -10
  394. package/dist/widgets/sections/FeesSection/FeesSection.stories.d.ts +0 -7
  395. package/dist/widgets/sections/FeesSection/FeesSection.stories.js +0 -18
  396. package/dist/widgets/sections/FeesSection/Total.js +0 -20
  397. package/dist/widgets/sections/FeesSection/index.js +0 -6
  398. package/dist/widgets/sections/FinalityProviderSubsection/FinalityProviderSubsection.js +0 -9
  399. package/dist/widgets/sections/FinalityProviderSubsection/FinalityProviderSubsection.stories.d.ts +0 -14
  400. package/dist/widgets/sections/FinalityProviderSubsection/FinalityProviderSubsection.stories.js +0 -212
  401. package/dist/widgets/sections/FinalityProviderSubsection/index.js +0 -1
  402. package/dist/widgets/sections/PreviewModal/PreviewModal.js +0 -48
  403. package/dist/widgets/sections/PreviewModal/PreviewModal.stories.d.ts +0 -8
  404. package/dist/widgets/sections/PreviewModal/PreviewModal.stories.js +0 -115
  405. package/dist/widgets/sections/PreviewModal/index.js +0 -1
  406. package/dist/widgets/sections/RewardsPreviewModal/RewardsPreviewModal.js +0 -15
  407. package/dist/widgets/sections/RewardsPreviewModal/RewardsPreviewModal.stories.d.ts +0 -9
  408. package/dist/widgets/sections/RewardsPreviewModal/RewardsPreviewModal.stories.js +0 -190
  409. package/dist/widgets/sections/RewardsPreviewModal/index.js +0 -1
  410. package/dist/widgets/sections/RewardsSubsection/RewardsSubsection.js +0 -13
  411. package/dist/widgets/sections/RewardsSubsection/RewardsSubsection.stories.d.ts +0 -8
  412. package/dist/widgets/sections/RewardsSubsection/RewardsSubsection.stories.js +0 -96
  413. package/dist/widgets/sections/RewardsSubsection/index.js +0 -1
  414. package/dist/widgets/sections/SettingMenu/SettingMenu.js +0 -18
  415. package/dist/widgets/sections/SettingMenu/SettingMenu.stories.d.ts +0 -6
  416. package/dist/widgets/sections/SettingMenu/SettingMenu.stories.js +0 -49
  417. package/dist/widgets/sections/SettingMenu/components/SettingMenuCustomContent.js +0 -2
  418. package/dist/widgets/sections/SettingMenu/components/SettingMenuDescription.js +0 -4
  419. package/dist/widgets/sections/SettingMenu/components/SettingMenuGroup.js +0 -15
  420. package/dist/widgets/sections/SettingMenu/components/SettingMenuItem.js +0 -13
  421. package/dist/widgets/sections/SettingMenu/components/SettingMenuSubMenu.js +0 -14
  422. package/dist/widgets/sections/SettingMenu/components/SettingMenuTitle.js +0 -4
  423. package/dist/widgets/sections/SettingMenu/components/index.js +0 -6
  424. package/dist/widgets/sections/SettingMenu/index.js +0 -7
  425. package/dist/widgets/sections/TableElement/TableElement.js +0 -6
  426. package/dist/widgets/sections/TableElement/TableElement.stories.d.ts +0 -9
  427. package/dist/widgets/sections/TableElement/TableElement.stories.js +0 -54
  428. package/dist/widgets/sections/TableElement/index.js +0 -1
  429. package/dist/widgets/sections/UnbondingModal/UnbondingModal.js +0 -18
  430. package/dist/widgets/sections/UnbondingModal/UnbondingModal.stories.d.ts +0 -7
  431. package/dist/widgets/sections/UnbondingModal/UnbondingModal.stories.js +0 -81
  432. package/dist/widgets/sections/UnbondingModal/index.js +0 -1
  433. package/dist/widgets/sections/ValidatorSelector/ValidatorSelector.js +0 -34
  434. package/dist/widgets/sections/ValidatorSelector/ValidatorSelector.stories.d.ts +0 -6
  435. package/dist/widgets/sections/ValidatorSelector/ValidatorSelector.stories.js +0 -52
  436. package/dist/widgets/sections/ValidatorSelector/index.js +0 -1
  437. package/dist/widgets/sections/WalletMenu/WalletMenu.js +0 -33
  438. package/dist/widgets/sections/WalletMenu/WalletMenu.stories.d.ts +0 -7
  439. package/dist/widgets/sections/WalletMenu/WalletMenu.stories.js +0 -70
  440. package/dist/widgets/sections/WalletMenu/components/WalletMenuCard.js +0 -32
  441. package/dist/widgets/sections/WalletMenu/components/WalletMenuInfoItem.js +0 -8
  442. package/dist/widgets/sections/WalletMenu/components/WalletMenuSettingItem.js +0 -8
  443. package/dist/widgets/sections/WalletMenu/components/WalletToggle.js +0 -12
  444. package/dist/widgets/sections/WalletMenu/components/index.js +0 -4
  445. package/dist/widgets/sections/WalletMenu/index.js +0 -5
@@ -1,47 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { forwardRef, useCallback, useRef, useMemo, useImperativeHandle, } from "react";
3
- import { twJoin } from "tailwind-merge";
4
- import { RiArrowDownSLine } from "react-icons/ri";
5
- import { Popover } from "@/components/Popover";
6
- import { useControlledState } from "@/hooks/useControlledState";
7
- import "./Select.css";
8
- import { useResizeObserver } from "@/hooks/useResizeObserver";
9
- const defaultOptionRenderer = (option) => option.label;
10
- export const Select = forwardRef(({ disabled, className, value, defaultValue, placeholder = "Select option", open, defaultOpen, options = [], optionClassName, popoverClassName, state = "default", onOpen, onSelect, onClose, renderSelectedOption = defaultOptionRenderer, ...props }, ref) => {
11
- const anchorEl = useRef(null);
12
- useImperativeHandle(ref, () => anchorEl.current, []);
13
- const { width } = useResizeObserver(anchorEl.current);
14
- const getTooltipText = (option) => {
15
- if (!option)
16
- return placeholder || "";
17
- const rendered = renderSelectedOption(option);
18
- if (typeof rendered === "string")
19
- return rendered;
20
- return option.label;
21
- };
22
- const [isOpen, setIsOpen] = useControlledState({
23
- value: open,
24
- defaultValue: defaultOpen,
25
- onStateChange: (open) => void (open ? onOpen?.() : onClose?.()),
26
- });
27
- const [selectedValue, setSelectedValue] = useControlledState({
28
- value,
29
- defaultValue,
30
- onStateChange: onSelect,
31
- });
32
- const selectedOption = useMemo(() => options.find((option) => option.value === selectedValue), [options, selectedValue]);
33
- const handleSelect = useCallback((option) => {
34
- setSelectedValue(option.value);
35
- setIsOpen(false);
36
- }, [setSelectedValue, setIsOpen]);
37
- const handleClose = useCallback(() => {
38
- setIsOpen(false);
39
- }, [setIsOpen]);
40
- const handleClick = useCallback(() => {
41
- if (disabled)
42
- return;
43
- setIsOpen(!isOpen);
44
- }, [isOpen, disabled, setIsOpen]);
45
- return (_jsxs(_Fragment, { children: [_jsxs("div", { ref: anchorEl, className: twJoin("bbn-select", disabled && "bbn-select-disabled", `bbn-select-${state}`, className), onClick: handleClick, tabIndex: disabled ? -1 : 0, ...props, children: [_jsx("div", { className: "bbn-select-text-container", children: _jsx("span", { className: "bbn-select-text", title: getTooltipText(selectedOption), children: selectedOption ? renderSelectedOption(selectedOption) : placeholder }) }), _jsx(RiArrowDownSLine, { className: twJoin("bbn-select-icon", isOpen && "bbn-select-icon-open"), size: 20 })] }), _jsx(Popover, { anchorEl: anchorEl.current, className: twJoin("bbn-select-menu custom-scrollbar", popoverClassName), open: isOpen && !disabled, onClickOutside: handleClose, offset: [0, 4], placement: "bottom-start", style: { width }, children: options.map((option) => (_jsx("div", { className: twJoin("bbn-select-option", selectedOption?.value === option.value && "bbn-select-option-selected", optionClassName), onClick: () => handleSelect(option), children: option.label }, option.value))) })] }));
46
- });
47
- Select.displayName = "Select";
@@ -1,11 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Select } from "./Select";
3
- declare const meta: Meta<typeof Select>;
4
- export default meta;
5
- type Story = StoryObj<typeof meta>;
6
- export declare const Default: Story;
7
- export declare const Controlled: Story;
8
- export declare const Disabled: Story;
9
- export declare const CustomSelectedDisplay: Story;
10
- export declare const ResponsiveTruncation: Story;
11
- export declare const VariousTextLengths: Story;
@@ -1,69 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Select } from "./Select";
3
- import { useState } from "react";
4
- const meta = {
5
- component: Select,
6
- tags: ["autodocs"],
7
- };
8
- export default meta;
9
- const options = [
10
- { value: "active", label: "Active" },
11
- { value: "inactive", label: "Inactive" },
12
- { value: "pending", label: "Pending" },
13
- ];
14
- export const Default = {
15
- args: {
16
- options,
17
- placeholder: "Select status",
18
- onSelect: console.log,
19
- },
20
- };
21
- export const Controlled = {
22
- render: (args) => {
23
- const defaultValue = args.defaultValue ?? "pending";
24
- const [value, setValue] = useState(defaultValue);
25
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(Select, { ...args, value: value, onSelect: (val) => setValue(val) }), _jsxs("p", { children: ["Default value: ", defaultValue] }), _jsxs("p", { children: ["Selected value: ", value] })] }));
26
- },
27
- args: {
28
- defaultValue: "active",
29
- options,
30
- placeholder: "Select status",
31
- onSelect: console.log,
32
- },
33
- };
34
- export const Disabled = {
35
- args: {
36
- options,
37
- placeholder: "Select status",
38
- disabled: true,
39
- },
40
- };
41
- export const CustomSelectedDisplay = {
42
- args: {
43
- options,
44
- placeholder: "Select status",
45
- renderSelectedOption: (option) => `Showing ${option.value}`,
46
- },
47
- };
48
- const finalityProviderOptions = [
49
- { value: "active", label: "Active" },
50
- { value: "inactive", label: "Inactive" },
51
- { value: "allowlisted", label: "Allowlisted" },
52
- { value: "non-allowlisted", label: "Non-allowlisted" },
53
- { value: "slashed", label: "Slashed" },
54
- { value: "jailed", label: "Jailed" },
55
- ];
56
- export const ResponsiveTruncation = {
57
- render: () => (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-sm font-medium mb-2", children: "Wide Container (400px)" }), _jsx("div", { className: "w-96", children: _jsx(Select, { options: finalityProviderOptions, value: "non-allowlisted", renderSelectedOption: (option) => `Showing ${option.label}`, placeholder: "Select Status" }) })] }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm font-medium mb-2", children: "Medium Container (250px)" }), _jsx("div", { style: { width: '250px' }, children: _jsx(Select, { options: finalityProviderOptions, value: "non-allowlisted", renderSelectedOption: (option) => `Showing ${option.label}`, placeholder: "Select Status" }) })] }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm font-medium mb-2", children: "Narrow Container (180px)" }), _jsx("div", { style: { width: '180px' }, children: _jsx(Select, { options: finalityProviderOptions, value: "non-allowlisted", renderSelectedOption: (option) => `Showing ${option.label}`, placeholder: "Select Status" }) })] })] })),
58
- };
59
- export const VariousTextLengths = {
60
- render: () => {
61
- const [selectedValues, setSelectedValues] = useState({
62
- short: "active",
63
- medium: "inactive",
64
- long: "non-allowlisted",
65
- veryLong: "allowlisted"
66
- });
67
- return (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "w-64 space-y-3", children: [_jsxs("div", { children: [_jsx("label", { className: "text-xs text-gray-500 block mb-1", children: "Short text: \"Active\"" }), _jsx(Select, { options: [{ value: "active", label: "Active" }], value: selectedValues.short, onSelect: (val) => setSelectedValues(prev => ({ ...prev, short: val.toString() })), renderSelectedOption: (option) => option.label })] }), _jsxs("div", { children: [_jsx("label", { className: "text-xs text-gray-500 block mb-1", children: "Medium text: \"Showing Inactive\"" }), _jsx(Select, { options: finalityProviderOptions, value: selectedValues.medium, onSelect: (val) => setSelectedValues(prev => ({ ...prev, medium: val.toString() })), renderSelectedOption: (option) => `Showing ${option.label}` })] }), _jsxs("div", { children: [_jsx("label", { className: "text-xs text-gray-500 block mb-1", children: "Long text: \"Showing Non-allowlisted\" (truncates with tooltip)" }), _jsx(Select, { options: finalityProviderOptions, value: selectedValues.long, onSelect: (val) => setSelectedValues(prev => ({ ...prev, long: val.toString() })), renderSelectedOption: (option) => `Showing ${option.label}` })] }), _jsxs("div", { children: [_jsx("label", { className: "text-xs text-gray-500 block mb-1", children: "Very long text with additional context (truncates)" }), _jsx(Select, { options: finalityProviderOptions, value: selectedValues.veryLong, onSelect: (val) => setSelectedValues(prev => ({ ...prev, veryLong: val.toString() })), renderSelectedOption: (option) => `Showing ${option.label} Finality Providers` })] })] }), _jsx("div", { className: "mt-4 text-xs text-gray-500", children: _jsx("p", { children: "Long hover (1-2 seconds) over truncated text shows native browser tooltip with full content" }) })] }));
68
- },
69
- };
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, } from "react";
3
- import { twJoin } from "tailwind-merge";
4
- import "./Toggle.css";
5
- import { Text } from "@/components/Text";
6
- import { useControlledState } from "@/hooks/useControlledState";
7
- export const Toggle = forwardRef(function Toggle({ label, checked, defaultChecked = false, inputProps, orientation = "left", disabled = false, className, inputType, labelClassName, renderIcon, onChange, ...restProps }, ref) {
8
- const [checkedState = false, setCheckedState] = useControlledState({
9
- value: checked,
10
- defaultValue: defaultChecked,
11
- onStateChange: onChange,
12
- });
13
- function handleChange(e) {
14
- setCheckedState(e.currentTarget.checked);
15
- inputProps?.onChange?.(e);
16
- }
17
- const toggle = (_jsxs("span", { className: twJoin("bbn-switcher", disabled && "bbn-switcher-disabled", className), children: [renderIcon(checkedState), _jsx("input", { ref: ref, type: inputType, disabled: disabled, className: "bbn-switcher-input", ...restProps, ...inputProps, checked: checkedState, onChange: handleChange })] }));
18
- if (label) {
19
- return (_jsxs(Text, { as: "label", variant: "body1", className: twJoin("bbn-switcher-label", orientation === "left" ? "bbn-switcher-left" : "bbn-switcher-right", labelClassName), children: [toggle, label] }));
20
- }
21
- return toggle;
22
- });
@@ -1,5 +0,0 @@
1
- export * from "./Checkbox";
2
- export * from "./Radio";
3
- export * from "./Select";
4
- export * from "./Input";
5
- export * from "./FormControl";
@@ -1,9 +0,0 @@
1
- import { createElement, forwardRef } from "react";
2
- import { twJoin } from "tailwind-merge";
3
- import "./Heading.css";
4
- export const Heading = forwardRef(({ variant, as = variant, children, className, ...restProps }, ref) => createElement(as, {
5
- ...restProps,
6
- ref,
7
- className: twJoin(`bbn-${variant}`, className),
8
- }, children));
9
- Heading.displayName = "Heading";
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Heading } from "./Heading";
3
- declare const meta: Meta<typeof Heading>;
4
- export default meta;
5
- type Story = StoryObj<typeof meta>;
6
- export declare const Default: Story;
@@ -1,10 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { Heading } from "./Heading";
3
- const meta = {
4
- component: Heading,
5
- tags: ["autodocs"],
6
- };
7
- export default meta;
8
- export const Default = {
9
- render: (args) => args.variant ? (_jsxs(Heading, { variant: args.variant, ...args, children: ["Heading--", args.variant] })) : (_jsxs("div", { className: "text-accent-primary", children: [_jsx(Heading, { ...args, variant: "h1", children: "Heading--H1" }), _jsx(Heading, { ...args, variant: "h2", children: "Heading--H2" }), _jsx(Heading, { ...args, variant: "h3", children: "Heading--H3" }), _jsx(Heading, { ...args, variant: "h4", children: "Heading--H4" }), _jsx(Heading, { ...args, variant: "h5", children: "Heading--H5" }), _jsx(Heading, { ...args, variant: "h6", children: "Heading--H6" })] })),
10
- };
@@ -1 +0,0 @@
1
- export * from "./Heading";
@@ -1,53 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useId } from "react";
3
- import { InfoIcon } from "../Icons";
4
- import { Tooltip } from "react-tooltip";
5
- import { twJoin } from "tailwind-merge";
6
- const STATUS_COLORS = {
7
- default: "text-accent-primary",
8
- warning: "text-warning-main",
9
- error: "text-error-main",
10
- };
11
- const ICON_COLOR = {
12
- default: "text-secondary-strokeDark",
13
- warning: "text-warning-main",
14
- error: "text-error-main",
15
- };
16
- export function Hint({ children, tooltip, status = "default", attachToChildren = false, icon, className, placement = "top", tooltipVariant = "primary", offset = [8, 8], }) {
17
- const id = useId();
18
- const statusColor = STATUS_COLORS[status];
19
- // Create custom middleware for horizontal offset
20
- const customOffset = {
21
- name: 'customOffset',
22
- fn: ({ x, y, placement }) => {
23
- let nextX = x;
24
- let nextY = y;
25
- // Apply offsets based on placement direction so that positive offsets
26
- // move the tooltip away from the reference element on the main axis
27
- if (placement === 'top') {
28
- nextY = y - offset[1];
29
- }
30
- else if (placement === 'bottom') {
31
- nextY = y + offset[1];
32
- }
33
- else if (placement === 'left') {
34
- nextX = x - offset[0];
35
- }
36
- else if (placement === 'right') {
37
- nextX = x + offset[0];
38
- }
39
- return { x: nextX, y: nextY };
40
- },
41
- };
42
- if (!tooltip) {
43
- // Use an inline wrapper when attaching to children to keep valid inline semantics
44
- if (attachToChildren) {
45
- return (_jsx("span", { className: twJoin("inline-flex items-center gap-1", statusColor, className), children: children }));
46
- }
47
- return (_jsx("div", { className: twJoin("inline-flex items-center gap-1", statusColor, className), children: children }));
48
- }
49
- // Default icon with proper size and color
50
- const defaultIcon = _jsx(InfoIcon, { size: 16, className: ICON_COLOR[status] });
51
- const tooltipIcon = icon || defaultIcon;
52
- return (attachToChildren ? (_jsxs("span", { className: twJoin("inline-flex items-center gap-1", statusColor, className), children: [_jsx("span", { className: "cursor-pointer", "data-tooltip-id": id, "data-tooltip-content": typeof tooltip === "string" ? tooltip : undefined, "data-tooltip-place": placement, "data-tooltip-position-strategy": "fixed", "data-tooltip-wrapper": "span", children: children }), _jsx(Tooltip, { id: id, className: twJoin("react-tooltip", tooltipVariant === "secondary" && "react-tooltip--secondary"), openOnClick: false, clickable: true, place: placement, style: { zIndex: 99999 }, positionStrategy: "fixed", middlewares: [customOffset], offset: 0, children: typeof tooltip !== "string" && tooltip })] })) : (_jsxs("div", { className: twJoin("inline-flex items-center gap-1", statusColor, className), children: [children, _jsx("span", { className: twJoin("cursor-pointer inline-flex items-center", statusColor), "data-tooltip-id": id, "data-tooltip-content": typeof tooltip === "string" ? tooltip : undefined, "data-tooltip-place": placement, "data-tooltip-position-strategy": "fixed", "data-tooltip-wrapper": "span", children: tooltipIcon }), _jsx(Tooltip, { id: id, className: twJoin("react-tooltip", tooltipVariant === "secondary" && "react-tooltip--secondary"), openOnClick: false, clickable: true, place: placement, style: { zIndex: 99999 }, positionStrategy: "fixed", middlewares: [customOffset], offset: 0, children: typeof tooltip !== "string" && tooltip })] })));
53
- }
@@ -1,12 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Hint } from "./Hint";
3
- import "react-tooltip/dist/react-tooltip.css";
4
- declare const meta: Meta<typeof Hint>;
5
- export default meta;
6
- type Story = StoryObj<typeof meta>;
7
- export declare const Default: Story;
8
- export declare const WithSeparateIcon: Story;
9
- export declare const WithCustomIcon: Story;
10
- export declare const ErrorStatus: Story;
11
- export declare const ComplexTooltip: Story;
12
- export declare const LongText: Story;
@@ -1,52 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Hint } from "./Hint";
3
- import { WarningIcon, InfoIcon } from "../Icons";
4
- import "react-tooltip/dist/react-tooltip.css";
5
- const meta = {
6
- title: "Components/Hint",
7
- component: Hint,
8
- tags: ["autodocs"],
9
- };
10
- export default meta;
11
- export const Default = {
12
- args: {
13
- children: "Hover over me for a hint",
14
- tooltip: "This is a helpful hint that provides additional context",
15
- attachToChildren: true,
16
- },
17
- };
18
- export const WithSeparateIcon = {
19
- args: {
20
- children: "Important information",
21
- tooltip: "This shows a separate info icon that you can click for more details",
22
- attachToChildren: false,
23
- },
24
- };
25
- export const WithCustomIcon = {
26
- args: {
27
- children: "Warning message",
28
- tooltip: "This is a warning that requires your attention",
29
- icon: _jsx(WarningIcon, { size: 16, variant: "error" }),
30
- status: "warning",
31
- },
32
- };
33
- export const ErrorStatus = {
34
- args: {
35
- children: "Error occurred",
36
- tooltip: "This is an error message with detailed information about what went wrong",
37
- status: "error",
38
- },
39
- };
40
- export const ComplexTooltip = {
41
- args: {
42
- children: "Complex tooltip example",
43
- tooltip: (_jsxs("div", { className: "space-y-2", children: [_jsx("h4", { className: "font-semibold", children: "Advanced Tooltip" }), _jsx("p", { children: "This tooltip can contain any React content:" }), _jsxs("ul", { className: "list-disc list-inside text-sm", children: [_jsx("li", { children: "Multiple lines of text" }), _jsx("li", { children: "Formatted content" }), _jsx("li", { children: "Even other components" })] })] })),
44
- },
45
- };
46
- export const LongText = {
47
- args: {
48
- children: "Linked Wallet Stakes",
49
- tooltip: "Linked Wallet Stakes show all stakes created with the same Bitcoin wallet, even if different BABY wallets were used. It helps you track and manage them in one place.",
50
- icon: _jsx(InfoIcon, { size: 14, variant: "secondary" }),
51
- },
52
- };
@@ -1 +0,0 @@
1
- export { Hint } from './Hint';
@@ -1,25 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { twJoin } from "tailwind-merge";
3
- export const ThemedIcon = ({ children, className = "", size = 40, variant = "default", background = false, rounded = false, }) => {
4
- const variants = {
5
- default: "text-accent-secondary",
6
- primary: "text-primary-light",
7
- secondary: "text-accent-secondary",
8
- error: "text-error-main",
9
- success: "text-success-main",
10
- "accent-primary": "text-accent-primary",
11
- "accent-secondary": "text-accent-secondary",
12
- };
13
- const backgroundStyles = {
14
- default: "bg-accent-secondary/10",
15
- primary: "bg-primary-light/10 dark:bg-[#47484A]",
16
- secondary: "bg-accent-secondary/10",
17
- error: "bg-error-main/10",
18
- success: "bg-success-main/10",
19
- "accent-primary": "bg-accent-primary/10",
20
- "accent-secondary": "bg-accent-secondary/10",
21
- };
22
- return (_jsx("div", { className: twJoin("flex items-center justify-center", background && backgroundStyles[variant], rounded && "rounded-full", background
23
- ? "[&_svg]:h-4 [&_svg]:w-auto"
24
- : "[&_svg]:w-full [&_svg]:h-full", "[&_svg_path]:fill-current", background && "dark:[&_svg_path]:fill-white", variants[variant], className), style: { width: size, height: size }, children: children }));
25
- };
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { iconColorVariants } from "../index";
3
- import { twJoin } from "tailwind-merge";
4
- export const BugReportIcon = ({ className = "", size = 16, variant = "default", color }) => {
5
- const colorClass = color || iconColorVariants[variant];
6
- return (_jsx("svg", { style: { width: size, height: size }, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: twJoin("transition-opacity duration-200", colorClass, className), children: _jsx("path", { d: "M12.73 0H5.27L0 5.27V12.73L5.27 18H12.73L18 12.73V5.27L12.73 0ZM9 14.3C8.28 14.3 7.7 13.72 7.7 13C7.7 12.28 8.28 11.7 9 11.7C9.72 11.7 10.3 12.28 10.3 13C10.3 13.72 9.72 14.3 9 14.3ZM10 10H8V4H10V10Z", fill: "currentColor" }) }));
7
- };
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { twJoin } from "tailwind-merge";
3
- import { iconColorVariants } from "../index";
4
- export const ChevronLeftIcon = ({ className = "", size = 16, variant = "default", color }) => {
5
- const colorClass = color || iconColorVariants[variant];
6
- return (_jsx("svg", { style: { width: size, height: size }, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: twJoin("transition-opacity duration-200", colorClass, className), children: _jsx("path", { d: "M10 12L6 8L10 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
7
- };
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { iconColorVariants } from "../index";
3
- import { twJoin } from "tailwind-merge";
4
- export const CloseIcon = ({ className = "", size = 14, variant = "default", color }) => {
5
- const colorClass = color || iconColorVariants[variant];
6
- return (_jsx("svg", { style: { width: size, height: size }, viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: twJoin("transition-opacity duration-200", colorClass, className), children: _jsx("path", { d: "M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z", fill: "currentColor" }) }));
7
- };
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { iconColorVariants } from "../index";
3
- import { twJoin } from "tailwind-merge";
4
- export const CollapseIcon = ({ className = "", size = 20, variant = "default", color }) => {
5
- const colorClass = color || iconColorVariants[variant];
6
- return (_jsxs("svg", { style: { width: size, height: size }, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: twJoin("transition-opacity duration-200", colorClass, className), children: [_jsx("rect", { x: "0.5", y: "0.5", width: "19", height: "19", rx: "3.5", stroke: "currentColor" }), _jsx("path", { d: "M14.0832 10.5846H5.9165V9.41797H14.0832V10.5846Z", fill: "currentColor" })] }));
7
- };
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { iconColorVariants } from "../index";
3
- import { twJoin } from "tailwind-merge";
4
- export const CopyIcon = ({ className = "", size = 16, variant = "default", color }) => {
5
- const colorClass = color || iconColorVariants[variant];
6
- return (_jsx("svg", { style: { width: size, height: size * 1.143 }, viewBox: "0 0 14 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: twJoin("transition-opacity duration-200", colorClass, className), children: _jsx("path", { d: "M9.99984 0.666626H1.99984C1.2665 0.666626 0.666504 1.26663 0.666504 1.99996V11.3333H1.99984V1.99996H9.99984V0.666626ZM11.9998 3.33329H4.6665C3.93317 3.33329 3.33317 3.93329 3.33317 4.66663V14C3.33317 14.7333 3.93317 15.3333 4.6665 15.3333H11.9998C12.7332 15.3333 13.3332 14.7333 13.3332 14V4.66663C13.3332 3.93329 12.7332 3.33329 11.9998 3.33329ZM11.9998 14H4.6665V4.66663H11.9998V14Z", fill: "currentColor" }) }));
7
- };
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { iconColorVariants } from "../index";
3
- import { twJoin } from "tailwind-merge";
4
- export const InfoIcon = ({ className = "", size = 14, variant = "default", color }) => {
5
- const colorClass = color || iconColorVariants[variant];
6
- const ASPECT_RATIO = 1; // 14/14 = 1
7
- return (_jsx("svg", { style: { width: size, height: size * ASPECT_RATIO }, viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: twJoin("transition-opacity duration-200", colorClass, className), children: _jsx("path", { d: "M6.33325 3.66634H7.66659V4.99967H6.33325V3.66634ZM6.33325 6.33301H7.66659V10.333H6.33325V6.33301ZM6.99992 0.333008C3.31992 0.333008 0.333252 3.31967 0.333252 6.99967C0.333252 10.6797 3.31992 13.6663 6.99992 13.6663C10.6799 13.6663 13.6666 10.6797 13.6666 6.99967C13.6666 3.31967 10.6799 0.333008 6.99992 0.333008ZM6.99992 12.333C4.05992 12.333 1.66659 9.93967 1.66659 6.99967C1.66659 4.05967 4.05992 1.66634 6.99992 1.66634C9.93992 1.66634 12.3333 4.05967 12.3333 6.99967C12.3333 9.93967 9.93992 12.333 6.99992 12.333Z", fill: "currentColor" }) }));
8
- };
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { iconColorVariants } from "../index";
3
- import { twJoin } from "tailwind-merge";
4
- export const OpenIcon = ({ className = "", size = 20, variant = "default", color }) => {
5
- const colorClass = color || iconColorVariants[variant];
6
- return (_jsxs("svg", { style: { width: size, height: size }, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: twJoin("transition-opacity duration-200", colorClass, className), children: [_jsx("rect", { x: "0.5", y: "0.5", width: "19", height: "19", rx: "3.5", stroke: "currentColor" }), _jsx("path", { d: "M14 10.5714H10.5714V14H9.42857V10.5714H6V9.42857H9.42857V6H10.5714V9.42857H14V10.5714Z", fill: "currentColor" })] }));
7
- };
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { iconColorVariants } from "../index";
3
- import { twJoin } from "tailwind-merge";
4
- export const ThemeIcon = ({ className = "", size = 40, variant = "default", color, }) => {
5
- const colorClass = color || iconColorVariants[variant];
6
- return (_jsxs("svg", { style: { width: size, height: size }, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: twJoin("transition-opacity duration-200", className), children: [_jsx("rect", { width: "40", height: "40", rx: "20", fill: "currentColor", fillOpacity: "0.12" }), _jsx("path", { d: "M20 30C25.52 30 30 25.52 30 20C30 14.48 25.52 10 20 10C14.48 10 10 14.48 10 20C10 25.52 14.48 30 20 30ZM21 12.07C24.94 12.56 28 15.92 28 20C28 24.08 24.95 27.44 21 27.93V12.07Z", fill: "currentColor", className: colorClass })] }));
7
- };
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { iconColorVariants } from "../index";
3
- import { twJoin } from "tailwind-merge";
4
- export const WarningIcon = ({ className = "", size = 22, variant = "default", color }) => {
5
- const colorClass = color || iconColorVariants[variant];
6
- const ASPECT_RATIO = 22 / 20;
7
- return (_jsx("svg", { style: { width: size, height: size * ASPECT_RATIO }, viewBox: "0 0 22 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: twJoin("transition-opacity duration-200", colorClass, className), children: _jsx("path", { d: "M0 19.5H22L11 0.5L0 19.5ZM12 16.5H10V14.5H12V16.5ZM12 12.5H10V8.5H12V12.5Z", fill: "currentColor" }) }));
8
- };
@@ -1,25 +0,0 @@
1
- // Color variants mapping
2
- export const iconColorVariants = {
3
- default: "text-accent-primary",
4
- primary: "text-primary-light",
5
- secondary: "text-accent-secondary",
6
- error: "text-error-main",
7
- success: "text-success-main",
8
- "accent-primary": "text-accent-primary",
9
- "accent-secondary": "text-accent-secondary",
10
- };
11
- export { ThemedIcon } from "./ThemedIcon";
12
- // Wallet icons
13
- export { BitcoinPublicKeyIcon } from "./wallet/BitcoinPublicKeyIcon";
14
- export { LinkWalletIcon } from "./wallet/LinkWalletIcon";
15
- export { UsingInscriptionIcon } from "./wallet/UsingInscriptionIcon";
16
- // Common icons
17
- export { CopyIcon } from "./common/CopyIcon";
18
- export { CloseIcon } from "./common/CloseIcon";
19
- export { WarningIcon } from "./common/WarningIcon";
20
- export { CollapseIcon } from "./common/CollapseIcon";
21
- export { OpenIcon } from "./common/OpenIcon";
22
- export { ChevronLeftIcon } from "./common/ChevronLeftIcon";
23
- export { BugReportIcon } from "./common/BugReportIcon";
24
- export { ThemeIcon } from "./common/ThemeIcon";
25
- export { InfoIcon } from "./common/InfoIcon";
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { iconColorVariants } from "../index";
3
- import { twJoin } from "tailwind-merge";
4
- export const BitcoinPublicKeyIcon = ({ className = "", size = 24, variant = "default", color }) => {
5
- const colorClass = color || iconColorVariants[variant];
6
- const ASPECT_RATIO = 0.545; // 12/22 ≈ 0.545
7
- return (_jsx("svg", { style: { width: size, height: size * ASPECT_RATIO }, viewBox: "0 0 22 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: twJoin("transition-opacity duration-200", colorClass, className), children: _jsx("path", { d: "M20 4H11.65C10.83 1.67 8.61 0 6 0C2.69 0 0 2.69 0 6C0 9.31 2.69 12 6 12C8.61 12 10.83 10.33 11.65 8H12L14 10L16 8L18 10L22 5.96L20 4ZM6 9C4.35 9 3 7.65 3 6C3 4.35 4.35 3 6 3C7.65 3 9 4.35 9 6C9 7.65 7.65 9 6 9Z", fill: "currentColor" }) }));
8
- };
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { iconColorVariants } from "../index";
3
- import { twJoin } from "tailwind-merge";
4
- export const LinkWalletIcon = ({ className = "", size = 24, variant = "default", color }) => {
5
- const colorClass = color || iconColorVariants[variant];
6
- const ASPECT_RATIO = 0.5; // 10/20 = 0.5
7
- return (_jsx("svg", { style: { width: size, height: size * ASPECT_RATIO }, viewBox: "0 0 20 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: twJoin("transition-opacity duration-200", colorClass, className), children: _jsx("path", { d: "M15 0H11V2H15C16.65 2 18 3.35 18 5C18 6.65 16.65 8 15 8H11V10H15C17.76 10 20 7.76 20 5C20 2.24 17.76 0 15 0ZM9 8H5C3.35 8 2 6.65 2 5C2 3.35 3.35 2 5 2H9V0H5C2.24 0 0 2.24 0 5C0 7.76 2.24 10 5 10H9V8ZM6 4H14V6H6V4Z", fill: "currentColor" }) }));
8
- };
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { iconColorVariants } from "../index";
3
- import { twJoin } from "tailwind-merge";
4
- export const UsingInscriptionIcon = ({ className = "", size = 24, variant = "default", color }) => {
5
- const colorClass = color || iconColorVariants[variant];
6
- const ASPECT_RATIO = 1; // 20/20 = 1
7
- return (_jsxs("svg", { style: { width: size, height: size * ASPECT_RATIO }, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: twJoin("transition-opacity duration-200", colorClass, className), children: [_jsx("path", { d: "M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 18C5.58 18 2 14.42 2 10C2 5.58 5.58 2 10 2C14.42 2 18 5.58 18 10C18 14.42 14.42 18 10 18Z", fill: "currentColor" }), _jsx("path", { d: "M10 15C12.7614 15 15 12.7614 15 10C15 7.23858 12.7614 5 10 5C7.23858 5 5 7.23858 5 10C5 12.7614 7.23858 15 10 15Z", fill: "currentColor" })] }));
8
- };
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Children, cloneElement, isValidElement } from "react";
3
- import "./List.css";
4
- import { twMerge } from "tailwind-merge";
5
- const ROW_ORIENTATION = {
6
- adaptive: "adaptive",
7
- horizontal: "vertical",
8
- vertical: "horizontal",
9
- };
10
- export function List({ className, orientation = "vertical", children }) {
11
- return (_jsx("div", { className: twMerge("bbn-list", `bbn-list-${orientation}`, className), children: Children.map(children, (item) => isValidElement(item)
12
- ? cloneElement(item, {
13
- orientation: ROW_ORIENTATION[orientation],
14
- })
15
- : item) }));
16
- }
@@ -1,12 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { List } from "./List";
3
- declare const meta: Meta<typeof List>;
4
- export default meta;
5
- type Story = StoryObj<typeof meta>;
6
- export declare const HorizontalRegular: Story;
7
- export declare const VerticalRegular: Story;
8
- export declare const AdaptiveRegular: Story;
9
- export declare const LongContentHorizontal: Story;
10
- export declare const LongContentVertical: Story;
11
- export declare const SingleItem: Story;
12
- export declare const WithStatItems: Story;
@@ -1,81 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { MdOutlineInfo, MdAccountBalanceWallet, MdTrendingUp } from "react-icons/md";
3
- import { List } from "./List";
4
- import { ListItem } from "./components/ListItem";
5
- import { StatItem } from "./StatItem";
6
- const meta = {
7
- component: List,
8
- tags: ["autodocs"],
9
- argTypes: {
10
- orientation: {
11
- control: { type: "select" },
12
- options: ["horizontal", "vertical", "adaptive"],
13
- },
14
- },
15
- };
16
- export default meta;
17
- const sampleItems = [
18
- _jsx(ListItem, { title: "Bitcoin Balance", value: "100.123456 BTC", suffix: _jsx(MdAccountBalanceWallet, { size: 20 }) }),
19
- _jsx(ListItem, { title: "USD Value", value: "$4,567,890.12", suffix: _jsx(MdTrendingUp, { size: 20 }) }),
20
- _jsx(ListItem, { title: "Status", value: "Active", suffix: _jsx(MdOutlineInfo, { size: 20 }) }),
21
- ];
22
- const longContentItems = [
23
- _jsx(ListItem, { title: "Very Long Bitcoin Wallet Address", value: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh" }),
24
- _jsx(ListItem, { title: "Transaction Hash with Very Long Text", value: "a1b2c3d4e5f6789012345678901234567890abcdef" }),
25
- _jsx(ListItem, { title: "Network Fee Estimation Details", value: "2.5 sats/vB (Medium Priority)", suffix: _jsx(MdOutlineInfo, { size: 20 }) }),
26
- ];
27
- // Regular Design Stories
28
- export const HorizontalRegular = {
29
- name: "Regular Design - Horizontal",
30
- args: {
31
- orientation: "horizontal",
32
- children: sampleItems,
33
- },
34
- };
35
- export const VerticalRegular = {
36
- name: "Regular Design - Vertical",
37
- args: {
38
- orientation: "vertical",
39
- children: sampleItems,
40
- },
41
- };
42
- export const AdaptiveRegular = {
43
- name: "Regular Design - Adaptive",
44
- args: {
45
- orientation: "adaptive",
46
- children: sampleItems,
47
- },
48
- };
49
- // Content Variation Stories
50
- export const LongContentHorizontal = {
51
- name: "Long Content - Horizontal",
52
- args: {
53
- orientation: "horizontal",
54
- children: longContentItems,
55
- },
56
- };
57
- export const LongContentVertical = {
58
- name: "Long Content - Vertical",
59
- args: {
60
- orientation: "vertical",
61
- children: longContentItems,
62
- },
63
- };
64
- export const SingleItem = {
65
- name: "Single Item",
66
- args: {
67
- orientation: "horizontal",
68
- children: [_jsx(ListItem, { title: "Single Entry", value: "Only one item in list", suffix: _jsx(MdOutlineInfo, { size: 20 }) })],
69
- },
70
- };
71
- export const WithStatItems = {
72
- name: "With StatItem examples",
73
- args: {
74
- orientation: "adaptive",
75
- children: [
76
- _jsx(StatItem, { title: "Total BTC TVL", value: "2,345 BTC", tooltip: "Total value locked in BTC" }),
77
- _jsx(StatItem, { title: "BTC Staking APR", value: "3.2%", tooltip: "Estimated APR" }),
78
- _jsx(StatItem, { title: "Finality Providers", value: "24 Active (30 Total)" }),
79
- ],
80
- },
81
- };