@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.
- package/dist/components/Accordion/Accordion.d.ts +2 -2
- package/dist/components/Accordion/components/AccordionDetails.d.ts +1 -1
- package/dist/components/Accordion/components/AccordionSummary.d.ts +2 -2
- package/dist/components/Accordion/hooks/useHeightObserver.d.ts +1 -1
- package/dist/components/Accordion/index.d.ts +3 -4
- package/dist/components/AmountItem/AmountItem.d.ts +1 -1
- package/dist/components/AmountItem/index.d.ts +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -2
- package/dist/components/Avatar/AvatarGroup.d.ts +2 -3
- package/dist/components/Avatar/ValidatorAvatar.d.ts +1 -1
- package/dist/components/Avatar/index.d.ts +3 -3
- package/dist/components/Badge/Badge.d.ts +1 -2
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +2 -3
- package/dist/components/Button/IconButton.d.ts +2 -3
- package/dist/components/Button/WalletDisconnectButton.d.ts +2 -2
- package/dist/components/Button/index.d.ts +3 -3
- package/dist/components/Card/Card.d.ts +3 -4
- package/dist/components/Card/index.d.ts +1 -1
- package/dist/components/Chip/Chip.d.ts +1 -2
- package/dist/components/Chip/index.d.ts +1 -1
- package/dist/components/Copy/Copy.d.ts +1 -1
- package/dist/components/CounterButton/index.d.ts +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/MobileDialog.d.ts +1 -1
- package/dist/components/Dialog/components/Backdrop.d.ts +1 -2
- package/dist/components/Dialog/components/DialogBody.d.ts +1 -1
- package/dist/components/Dialog/components/DialogFooter.d.ts +1 -1
- package/dist/components/Dialog/components/DialogHeader.d.ts +1 -1
- package/dist/components/Dialog/index.d.ts +5 -6
- package/dist/components/DisplayHash/DisplayHash.d.ts +1 -1
- package/dist/components/FeeItem/FeeItem.d.ts +1 -1
- package/dist/components/Form/Checkbox.d.ts +2 -2
- package/dist/components/Form/FormControl.d.ts +1 -2
- package/dist/components/Form/Input.d.ts +2 -3
- package/dist/components/Form/Radio.d.ts +2 -2
- package/dist/components/Form/Select.d.ts +2 -3
- package/dist/components/Form/components/Toggle.d.ts +2 -3
- package/dist/components/Form/index.d.ts +5 -5
- package/dist/components/Heading/Heading.d.ts +2 -3
- package/dist/components/Heading/index.d.ts +1 -1
- package/dist/components/Hint/Hint.d.ts +1 -1
- package/dist/components/Icons/common/BugReportIcon.d.ts +1 -1
- package/dist/components/Icons/common/ChevronLeftIcon.d.ts +1 -1
- package/dist/components/Icons/common/CloseIcon.d.ts +1 -1
- package/dist/components/Icons/common/CollapseIcon.d.ts +1 -1
- package/dist/components/Icons/common/CopyIcon.d.ts +1 -1
- package/dist/components/Icons/common/InfoIcon.d.ts +1 -1
- package/dist/components/Icons/common/OpenIcon.d.ts +1 -1
- package/dist/components/Icons/common/ThemeIcon.d.ts +1 -1
- package/dist/components/Icons/common/WarningIcon.d.ts +1 -1
- package/dist/components/Icons/index.d.ts +13 -13
- package/dist/components/Icons/wallet/BitcoinPublicKeyIcon.d.ts +1 -1
- package/dist/components/Icons/wallet/LinkWalletIcon.d.ts +1 -1
- package/dist/components/Icons/wallet/UsingInscriptionIcon.d.ts +1 -1
- package/dist/components/List/List.d.ts +2 -3
- package/dist/components/List/StatItem.d.ts +2 -2
- package/dist/components/List/index.d.ts +3 -3
- package/dist/components/ListLegacy/ListLegacy.d.ts +2 -3
- package/dist/components/ListLegacy/index.d.ts +2 -2
- package/dist/components/Loader/Loader.d.ts +0 -1
- package/dist/components/Loader/index.d.ts +1 -1
- package/dist/components/Menu/Menu.d.ts +2 -2
- package/dist/components/Menu/MenuContext.d.ts +1 -1
- package/dist/components/Menu/MenuDrawer.d.ts +1 -1
- package/dist/components/Menu/MenuItem.d.ts +1 -1
- package/dist/components/Menu/SubMenu.d.ts +1 -1
- package/dist/components/Menu/SubMenuItem.d.ts +1 -1
- package/dist/components/Menu/index.d.ts +6 -6
- package/dist/components/Popover/Popover.d.ts +2 -3
- package/dist/components/Popover/index.d.ts +1 -1
- package/dist/components/Portal/Portal.d.ts +2 -2
- package/dist/components/Portal/index.d.ts +1 -1
- package/dist/components/Spacer/Spacer.d.ts +1 -1
- package/dist/components/SubSection/SubSection.d.ts +1 -2
- package/dist/components/SubSection/index.d.ts +1 -1
- package/dist/components/Table/Table.d.ts +1 -2
- package/dist/components/Table/components/Cell.d.ts +1 -1
- package/dist/components/Table/components/Column.d.ts +1 -1
- package/dist/components/Table/components/Row.d.ts +1 -1
- package/dist/components/Table/index.d.ts +4 -4
- package/dist/components/Table/types/index.d.ts +1 -1
- package/dist/components/Text/Text.d.ts +2 -3
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/components/Toggle/Toggle.d.ts +0 -1
- package/dist/components/Toggle/index.d.ts +1 -1
- package/dist/components/Warning/Warning.d.ts +1 -2
- package/dist/components/Warning/index.d.ts +1 -1
- package/dist/context/Dialog.context.d.ts +2 -2
- package/dist/context/Table.context.d.ts +2 -2
- package/dist/elements/FinalityProviderItem/index.d.ts +1 -1
- package/dist/elements/FinalityProviderLogo/index.d.ts +1 -1
- package/dist/elements/Icons/ChevronRightIcon.d.ts +1 -1
- package/dist/elements/Icons/SettingsIcon.d.ts +1 -1
- package/dist/elements/ProvidersList/index.d.ts +1 -1
- package/dist/elements/Table/Table.d.ts +1 -1
- package/dist/elements/Table/index.d.ts +1 -1
- package/dist/hooks/useFrozenColumns.d.ts +1 -1
- package/dist/hooks/useTableScroll.d.ts +1 -1
- package/dist/hooks/useTableSort.d.ts +1 -1
- package/dist/index.d.ts +52 -54
- package/dist/widgets/form/CheckboxField/CheckboxField.d.ts +1 -1
- package/dist/widgets/form/CheckboxField/index.d.ts +1 -1
- package/dist/widgets/form/Form/Form.d.ts +3 -3
- package/dist/widgets/form/Form/index.d.ts +1 -1
- package/dist/widgets/form/HiddenField/HiddenField.d.ts +1 -1
- package/dist/widgets/form/HiddenField/index.d.ts +1 -1
- package/dist/widgets/form/NumberField/NumberField.d.ts +2 -2
- package/dist/widgets/form/NumberField/index.d.ts +1 -1
- package/dist/widgets/form/RadioField/RadioField.d.ts +1 -1
- package/dist/widgets/form/RadioField/index.d.ts +1 -1
- package/dist/widgets/form/SelectField/SelectField.d.ts +3 -3
- package/dist/widgets/form/SelectField/index.d.ts +1 -1
- package/dist/widgets/form/TextField/TextField.d.ts +2 -2
- package/dist/widgets/form/TextField/index.d.ts +1 -1
- package/dist/widgets/form/hooks.d.ts +3 -3
- package/dist/widgets/sections/ActivityCard/components/ActivityCardActionSection.d.ts +1 -1
- package/dist/widgets/sections/ActivityCard/components/ActivityCardDetailsSection.d.ts +1 -1
- package/dist/widgets/sections/ActivityCard/index.d.ts +5 -5
- package/dist/widgets/sections/AmountSubsection/index.d.ts +1 -1
- package/dist/widgets/sections/FeesSection/index.d.ts +6 -6
- package/dist/widgets/sections/FinalityProviderSubsection/FinalityProviderSubsection.d.ts +1 -1
- package/dist/widgets/sections/FinalityProviderSubsection/index.d.ts +1 -1
- package/dist/widgets/sections/PreviewModal/PreviewModal.d.ts +1 -1
- package/dist/widgets/sections/PreviewModal/index.d.ts +1 -1
- package/dist/widgets/sections/RewardsPreviewModal/RewardsPreviewModal.d.ts +1 -1
- package/dist/widgets/sections/RewardsPreviewModal/index.d.ts +1 -1
- package/dist/widgets/sections/RewardsSubsection/index.d.ts +1 -1
- package/dist/widgets/sections/SettingMenu/SettingMenu.d.ts +3 -3
- package/dist/widgets/sections/SettingMenu/components/SettingMenuCustomContent.d.ts +1 -1
- package/dist/widgets/sections/SettingMenu/components/SettingMenuDescription.d.ts +1 -1
- package/dist/widgets/sections/SettingMenu/components/SettingMenuGroup.d.ts +1 -1
- package/dist/widgets/sections/SettingMenu/components/SettingMenuItem.d.ts +1 -1
- package/dist/widgets/sections/SettingMenu/components/SettingMenuSubMenu.d.ts +1 -1
- package/dist/widgets/sections/SettingMenu/components/SettingMenuTitle.d.ts +1 -1
- package/dist/widgets/sections/SettingMenu/components/index.d.ts +12 -12
- package/dist/widgets/sections/SettingMenu/index.d.ts +14 -14
- package/dist/widgets/sections/TableElement/TableElement.d.ts +1 -1
- package/dist/widgets/sections/TableElement/index.d.ts +1 -1
- package/dist/widgets/sections/UnbondingModal/index.d.ts +1 -1
- package/dist/widgets/sections/ValidatorSelector/ValidatorSelector.d.ts +2 -2
- package/dist/widgets/sections/ValidatorSelector/index.d.ts +1 -1
- package/dist/widgets/sections/WalletMenu/WalletMenu.d.ts +2 -2
- package/dist/widgets/sections/WalletMenu/components/WalletMenuCard.d.ts +1 -1
- package/dist/widgets/sections/WalletMenu/components/WalletMenuInfoItem.d.ts +1 -1
- package/dist/widgets/sections/WalletMenu/components/WalletMenuSettingItem.d.ts +1 -1
- package/dist/widgets/sections/WalletMenu/components/WalletToggle.d.ts +1 -1
- package/package.json +6 -6
- package/dist/components/Accordion/Accordion.js +0 -25
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -6
- package/dist/components/Accordion/Accordion.stories.js +0 -16
- package/dist/components/Accordion/components/AccordionDetails.js +0 -29
- package/dist/components/Accordion/components/AccordionSummary.js +0 -10
- package/dist/components/Accordion/hooks/useHeightObserver.js +0 -24
- package/dist/components/Accordion/index.js +0 -4
- package/dist/components/AmountItem/AmountItem.js +0 -5
- package/dist/components/AmountItem/AmountItem.stories.d.ts +0 -6
- package/dist/components/AmountItem/AmountItem.stories.js +0 -29
- package/dist/components/AmountItem/index.js +0 -1
- package/dist/components/Avatar/Avatar.js +0 -6
- package/dist/components/Avatar/Avatar.stories.d.ts +0 -7
- package/dist/components/Avatar/Avatar.stories.js +0 -18
- package/dist/components/Avatar/AvatarGroup.js +0 -15
- package/dist/components/Avatar/AvatarGroup.stories.d.ts +0 -6
- package/dist/components/Avatar/AvatarGroup.stories.js +0 -21
- package/dist/components/Avatar/ValidatorAvatar.js +0 -6
- package/dist/components/Avatar/ValidatorAvatar.stories.d.ts +0 -7
- package/dist/components/Avatar/ValidatorAvatar.stories.js +0 -21
- package/dist/components/Avatar/index.js +0 -3
- package/dist/components/Badge/Badge.js +0 -10
- package/dist/components/Badge/Badge.stories.d.ts +0 -6
- package/dist/components/Badge/Badge.stories.js +0 -14
- package/dist/components/Badge/index.js +0 -1
- package/dist/components/Button/Button.js +0 -8
- package/dist/components/Button/Button.stories.d.ts +0 -6
- package/dist/components/Button/Button.stories.js +0 -9
- package/dist/components/Button/IconButton.js +0 -7
- package/dist/components/Button/IconButton.stories.d.ts +0 -12
- package/dist/components/Button/IconButton.stories.js +0 -55
- package/dist/components/Button/WalletDisconnectButton.js +0 -8
- package/dist/components/Button/index.js +0 -3
- package/dist/components/Card/Card.js +0 -6
- package/dist/components/Card/Card.stories.d.ts +0 -8
- package/dist/components/Card/Card.stories.js +0 -29
- package/dist/components/Card/index.js +0 -1
- package/dist/components/Chip/Chip.js +0 -6
- package/dist/components/Chip/Chip.stories.d.ts +0 -6
- package/dist/components/Chip/Chip.stories.js +0 -9
- package/dist/components/Chip/index.js +0 -1
- package/dist/components/Copy/Copy.js +0 -29
- package/dist/components/Copy/index.js +0 -1
- package/dist/components/CounterButton/CounterButton.js +0 -8
- package/dist/components/CounterButton/CounterButton.stories.d.ts +0 -10
- package/dist/components/CounterButton/CounterButton.stories.js +0 -41
- package/dist/components/CounterButton/index.js +0 -1
- package/dist/components/Dialog/Dialog.js +0 -9
- package/dist/components/Dialog/Dialog.stories.d.ts +0 -7
- package/dist/components/Dialog/Dialog.stories.js +0 -42
- package/dist/components/Dialog/MobileDialog.js +0 -10
- package/dist/components/Dialog/MobileDialog.stories.d.ts +0 -6
- package/dist/components/Dialog/MobileDialog.stories.js +0 -27
- package/dist/components/Dialog/components/Backdrop.js +0 -4
- package/dist/components/Dialog/components/DialogBody.js +0 -3
- package/dist/components/Dialog/components/DialogFooter.js +0 -3
- package/dist/components/Dialog/components/DialogHeader.js +0 -5
- package/dist/components/Dialog/index.js +0 -6
- package/dist/components/DisplayHash/DisplayHash.js +0 -10
- package/dist/components/DisplayHash/index.js +0 -1
- package/dist/components/FeeItem/FeeItem.js +0 -6
- package/dist/components/FeeItem/FeeItem.stories.d.ts +0 -7
- package/dist/components/FeeItem/FeeItem.stories.js +0 -19
- package/dist/components/Form/Checkbox.js +0 -10
- package/dist/components/Form/Checkbox.stories.d.ts +0 -6
- package/dist/components/Form/Checkbox.stories.js +0 -13
- package/dist/components/Form/FormControl.js +0 -6
- package/dist/components/Form/FormControl.stories.d.ts +0 -8
- package/dist/components/Form/FormControl.stories.js +0 -30
- package/dist/components/Form/Input.js +0 -8
- package/dist/components/Form/Input.stories.d.ts +0 -10
- package/dist/components/Form/Input.stories.js +0 -43
- package/dist/components/Form/Radio.js +0 -10
- package/dist/components/Form/Radio.stories.d.ts +0 -6
- package/dist/components/Form/Radio.stories.js +0 -13
- package/dist/components/Form/Select.js +0 -47
- package/dist/components/Form/Select.stories.d.ts +0 -11
- package/dist/components/Form/Select.stories.js +0 -69
- package/dist/components/Form/components/Toggle.js +0 -22
- package/dist/components/Form/index.js +0 -5
- package/dist/components/Heading/Heading.js +0 -9
- package/dist/components/Heading/Heading.stories.d.ts +0 -6
- package/dist/components/Heading/Heading.stories.js +0 -10
- package/dist/components/Heading/index.js +0 -1
- package/dist/components/Hint/Hint.js +0 -53
- package/dist/components/Hint/Hint.stories.d.ts +0 -12
- package/dist/components/Hint/Hint.stories.js +0 -52
- package/dist/components/Hint/index.js +0 -1
- package/dist/components/Icons/ThemedIcon.js +0 -25
- package/dist/components/Icons/common/BugReportIcon.js +0 -7
- package/dist/components/Icons/common/ChevronLeftIcon.js +0 -7
- package/dist/components/Icons/common/CloseIcon.js +0 -7
- package/dist/components/Icons/common/CollapseIcon.js +0 -7
- package/dist/components/Icons/common/CopyIcon.js +0 -7
- package/dist/components/Icons/common/InfoIcon.js +0 -8
- package/dist/components/Icons/common/OpenIcon.js +0 -7
- package/dist/components/Icons/common/ThemeIcon.js +0 -7
- package/dist/components/Icons/common/WarningIcon.js +0 -8
- package/dist/components/Icons/index.js +0 -25
- package/dist/components/Icons/wallet/BitcoinPublicKeyIcon.js +0 -8
- package/dist/components/Icons/wallet/LinkWalletIcon.js +0 -8
- package/dist/components/Icons/wallet/UsingInscriptionIcon.js +0 -8
- package/dist/components/List/List.js +0 -16
- package/dist/components/List/List.stories.d.ts +0 -12
- package/dist/components/List/List.stories.js +0 -81
- package/dist/components/List/StatItem.js +0 -24
- package/dist/components/List/components/ListItem.js +0 -6
- package/dist/components/List/index.js +0 -3
- package/dist/components/ListLegacy/ListLegacy.js +0 -16
- package/dist/components/ListLegacy/ListLegacy.stories.d.ts +0 -11
- package/dist/components/ListLegacy/ListLegacy.stories.js +0 -71
- package/dist/components/ListLegacy/components/ListItemLegacy.js +0 -6
- package/dist/components/ListLegacy/index.js +0 -2
- package/dist/components/Loader/Loader.js +0 -6
- package/dist/components/Loader/Loader.stories.d.ts +0 -6
- package/dist/components/Loader/Loader.stories.js +0 -11
- package/dist/components/Loader/index.js +0 -1
- package/dist/components/Menu/Menu.js +0 -29
- package/dist/components/Menu/Menu.stories.d.ts +0 -6
- package/dist/components/Menu/Menu.stories.js +0 -38
- package/dist/components/Menu/MenuContext.js +0 -9
- package/dist/components/Menu/MenuDrawer.js +0 -24
- package/dist/components/Menu/MenuItem.js +0 -27
- package/dist/components/Menu/SubMenu.js +0 -12
- package/dist/components/Menu/SubMenuItem.js +0 -6
- package/dist/components/Menu/index.js +0 -6
- package/dist/components/Popover/Popover.js +0 -16
- package/dist/components/Popover/Popover.stories.d.ts +0 -6
- package/dist/components/Popover/Popover.stories.js +0 -25
- package/dist/components/Popover/index.js +0 -1
- package/dist/components/Portal/Portal.js +0 -44
- package/dist/components/Portal/index.js +0 -1
- package/dist/components/Spacer/Spacer.js +0 -9
- package/dist/components/Spacer/index.js +0 -1
- package/dist/components/SubSection/SubSection.js +0 -4
- package/dist/components/SubSection/SubSection.stories.d.ts +0 -6
- package/dist/components/SubSection/SubSection.stories.js +0 -13
- package/dist/components/SubSection/index.js +0 -1
- package/dist/components/Table/Table.js +0 -43
- package/dist/components/Table/Table.stories.d.ts +0 -9
- package/dist/components/Table/Table.stories.js +0 -210
- package/dist/components/Table/components/Cell.js +0 -8
- package/dist/components/Table/components/Column.js +0 -19
- package/dist/components/Table/components/Row.js +0 -7
- package/dist/components/Table/index.js +0 -4
- package/dist/components/Table/types/index.js +0 -1
- package/dist/components/Text/Text.js +0 -11
- package/dist/components/Text/Text.stories.d.ts +0 -6
- package/dist/components/Text/Text.stories.js +0 -10
- package/dist/components/Text/index.js +0 -1
- package/dist/components/Toggle/Toggle.js +0 -12
- package/dist/components/Toggle/Toggle.stories.d.ts +0 -6
- package/dist/components/Toggle/Toggle.stories.js +0 -14
- package/dist/components/Toggle/index.js +0 -1
- package/dist/components/Warning/Warning.js +0 -7
- package/dist/components/Warning/Warning.stories.d.ts +0 -9
- package/dist/components/Warning/Warning.stories.js +0 -26
- package/dist/components/Warning/index.js +0 -1
- package/dist/components/index.js +0 -5
- package/dist/context/Dialog.context.js +0 -33
- package/dist/context/Table.context.js +0 -8
- package/dist/elements/FinalityProviderItem/FinalityProviderItem.js +0 -30
- package/dist/elements/FinalityProviderItem/FinalityProviderItem.stories.d.ts +0 -12
- package/dist/elements/FinalityProviderItem/FinalityProviderItem.stories.js +0 -97
- package/dist/elements/FinalityProviderItem/index.js +0 -1
- package/dist/elements/FinalityProviderLogo/FinalityProviderLogo.js +0 -24
- package/dist/elements/FinalityProviderLogo/FinalityProviderLogo.stories.d.ts +0 -13
- package/dist/elements/FinalityProviderLogo/FinalityProviderLogo.stories.js +0 -61
- package/dist/elements/FinalityProviderLogo/index.js +0 -1
- package/dist/elements/Icons/ChevronRightIcon.js +0 -2
- package/dist/elements/Icons/SettingsIcon.js +0 -2
- package/dist/elements/Icons/index.js +0 -2
- package/dist/elements/ProvidersList/ProvidersList.js +0 -9
- package/dist/elements/ProvidersList/ProvidersList.stories.d.ts +0 -10
- package/dist/elements/ProvidersList/ProvidersList.stories.js +0 -139
- package/dist/elements/ProvidersList/index.js +0 -1
- package/dist/elements/Table/Table.js +0 -14
- package/dist/elements/Table/Table.stories.d.ts +0 -8
- package/dist/elements/Table/Table.stories.js +0 -50
- package/dist/elements/Table/index.js +0 -1
- package/dist/hooks/index.js +0 -11
- package/dist/hooks/useClickOutside.js +0 -17
- package/dist/hooks/useControlledState.js +0 -13
- package/dist/hooks/useCopy.js +0 -43
- package/dist/hooks/useDrawerAnimation.js +0 -42
- package/dist/hooks/useFrozenColumns.js +0 -23
- package/dist/hooks/useIsMobile.js +0 -33
- package/dist/hooks/useMemoizedArray.js +0 -22
- package/dist/hooks/useModalManager.js +0 -28
- package/dist/hooks/useResizeObserver.js +0 -21
- package/dist/hooks/useTableScroll.js +0 -22
- package/dist/hooks/useTableSort.js +0 -46
- package/dist/index.js +0 -54
- package/dist/providers/CoreUIProvider.js +0 -9
- package/dist/tsconfig.lib.tsbuildinfo +0 -1
- package/dist/utils/constants.js +0 -4
- package/dist/utils/css.js +0 -6
- package/dist/utils/helpers.js +0 -110
- package/dist/utils/trim.js +0 -14
- package/dist/widgets/form/CheckboxField/CheckboxField.js +0 -7
- package/dist/widgets/form/CheckboxField/CheckboxField.stories.d.ts +0 -6
- package/dist/widgets/form/CheckboxField/CheckboxField.stories.js +0 -17
- package/dist/widgets/form/CheckboxField/index.js +0 -1
- package/dist/widgets/form/Form/Form.js +0 -20
- package/dist/widgets/form/Form/Form.stories.d.ts +0 -6
- package/dist/widgets/form/Form/Form.stories.js +0 -27
- package/dist/widgets/form/Form/index.js +0 -1
- package/dist/widgets/form/HiddenField/HiddenField.js +0 -13
- package/dist/widgets/form/HiddenField/HiddenField.stories.d.ts +0 -6
- package/dist/widgets/form/HiddenField/HiddenField.stories.js +0 -17
- package/dist/widgets/form/HiddenField/index.js +0 -1
- package/dist/widgets/form/NumberField/NumberField.js +0 -15
- package/dist/widgets/form/NumberField/NumberField.stories.d.ts +0 -6
- package/dist/widgets/form/NumberField/NumberField.stories.js +0 -31
- package/dist/widgets/form/NumberField/index.js +0 -1
- package/dist/widgets/form/RadioField/RadioField.js +0 -7
- package/dist/widgets/form/RadioField/RadioField.stories.d.ts +0 -6
- package/dist/widgets/form/RadioField/RadioField.stories.js +0 -14
- package/dist/widgets/form/RadioField/index.js +0 -1
- package/dist/widgets/form/SelectField/SelectField.js +0 -13
- package/dist/widgets/form/SelectField/SelectField.stories.d.ts +0 -6
- package/dist/widgets/form/SelectField/SelectField.stories.js +0 -33
- package/dist/widgets/form/SelectField/index.js +0 -1
- package/dist/widgets/form/TextField/TextField.js +0 -9
- package/dist/widgets/form/TextField/TextField.stories.d.ts +0 -6
- package/dist/widgets/form/TextField/TextField.stories.js +0 -28
- package/dist/widgets/form/TextField/index.js +0 -1
- package/dist/widgets/form/hooks.js +0 -29
- package/dist/widgets/form/types.js +0 -1
- package/dist/widgets/sections/ActivityCard/ActivityCard.js +0 -8
- package/dist/widgets/sections/ActivityCard/ActivityCard.stories.d.ts +0 -14
- package/dist/widgets/sections/ActivityCard/ActivityCard.stories.js +0 -265
- package/dist/widgets/sections/ActivityCard/components/ActivityCardActionSection.js +0 -5
- package/dist/widgets/sections/ActivityCard/components/ActivityCardAmountSection.js +0 -6
- package/dist/widgets/sections/ActivityCard/components/ActivityCardDetailsSection.js +0 -19
- package/dist/widgets/sections/ActivityCard/components/ActivityListItem.js +0 -5
- package/dist/widgets/sections/ActivityCard/index.js +0 -5
- package/dist/widgets/sections/AmountSubsection/AmountSubsection.js +0 -53
- package/dist/widgets/sections/AmountSubsection/AmountSubsection.stories.d.ts +0 -16
- package/dist/widgets/sections/AmountSubsection/AmountSubsection.stories.js +0 -230
- package/dist/widgets/sections/AmountSubsection/index.js +0 -1
- package/dist/widgets/sections/FeesSection/BBNFeeAmount.js +0 -7
- package/dist/widgets/sections/FeesSection/BTCFeeAmount.js +0 -19
- package/dist/widgets/sections/FeesSection/BTCFeeRate.js +0 -7
- package/dist/widgets/sections/FeesSection/FeesSection.js +0 -10
- package/dist/widgets/sections/FeesSection/FeesSection.stories.d.ts +0 -7
- package/dist/widgets/sections/FeesSection/FeesSection.stories.js +0 -18
- package/dist/widgets/sections/FeesSection/Total.js +0 -20
- package/dist/widgets/sections/FeesSection/index.js +0 -6
- package/dist/widgets/sections/FinalityProviderSubsection/FinalityProviderSubsection.js +0 -9
- package/dist/widgets/sections/FinalityProviderSubsection/FinalityProviderSubsection.stories.d.ts +0 -14
- package/dist/widgets/sections/FinalityProviderSubsection/FinalityProviderSubsection.stories.js +0 -212
- package/dist/widgets/sections/FinalityProviderSubsection/index.js +0 -1
- package/dist/widgets/sections/PreviewModal/PreviewModal.js +0 -48
- package/dist/widgets/sections/PreviewModal/PreviewModal.stories.d.ts +0 -8
- package/dist/widgets/sections/PreviewModal/PreviewModal.stories.js +0 -115
- package/dist/widgets/sections/PreviewModal/index.js +0 -1
- package/dist/widgets/sections/RewardsPreviewModal/RewardsPreviewModal.js +0 -15
- package/dist/widgets/sections/RewardsPreviewModal/RewardsPreviewModal.stories.d.ts +0 -9
- package/dist/widgets/sections/RewardsPreviewModal/RewardsPreviewModal.stories.js +0 -190
- package/dist/widgets/sections/RewardsPreviewModal/index.js +0 -1
- package/dist/widgets/sections/RewardsSubsection/RewardsSubsection.js +0 -13
- package/dist/widgets/sections/RewardsSubsection/RewardsSubsection.stories.d.ts +0 -8
- package/dist/widgets/sections/RewardsSubsection/RewardsSubsection.stories.js +0 -96
- package/dist/widgets/sections/RewardsSubsection/index.js +0 -1
- package/dist/widgets/sections/SettingMenu/SettingMenu.js +0 -18
- package/dist/widgets/sections/SettingMenu/SettingMenu.stories.d.ts +0 -6
- package/dist/widgets/sections/SettingMenu/SettingMenu.stories.js +0 -49
- package/dist/widgets/sections/SettingMenu/components/SettingMenuCustomContent.js +0 -2
- package/dist/widgets/sections/SettingMenu/components/SettingMenuDescription.js +0 -4
- package/dist/widgets/sections/SettingMenu/components/SettingMenuGroup.js +0 -15
- package/dist/widgets/sections/SettingMenu/components/SettingMenuItem.js +0 -13
- package/dist/widgets/sections/SettingMenu/components/SettingMenuSubMenu.js +0 -14
- package/dist/widgets/sections/SettingMenu/components/SettingMenuTitle.js +0 -4
- package/dist/widgets/sections/SettingMenu/components/index.js +0 -6
- package/dist/widgets/sections/SettingMenu/index.js +0 -7
- package/dist/widgets/sections/TableElement/TableElement.js +0 -6
- package/dist/widgets/sections/TableElement/TableElement.stories.d.ts +0 -9
- package/dist/widgets/sections/TableElement/TableElement.stories.js +0 -54
- package/dist/widgets/sections/TableElement/index.js +0 -1
- package/dist/widgets/sections/UnbondingModal/UnbondingModal.js +0 -18
- package/dist/widgets/sections/UnbondingModal/UnbondingModal.stories.d.ts +0 -7
- package/dist/widgets/sections/UnbondingModal/UnbondingModal.stories.js +0 -81
- package/dist/widgets/sections/UnbondingModal/index.js +0 -1
- package/dist/widgets/sections/ValidatorSelector/ValidatorSelector.js +0 -34
- package/dist/widgets/sections/ValidatorSelector/ValidatorSelector.stories.d.ts +0 -6
- package/dist/widgets/sections/ValidatorSelector/ValidatorSelector.stories.js +0 -52
- package/dist/widgets/sections/ValidatorSelector/index.js +0 -1
- package/dist/widgets/sections/WalletMenu/WalletMenu.js +0 -33
- package/dist/widgets/sections/WalletMenu/WalletMenu.stories.d.ts +0 -7
- package/dist/widgets/sections/WalletMenu/WalletMenu.stories.js +0 -70
- package/dist/widgets/sections/WalletMenu/components/WalletMenuCard.js +0 -32
- package/dist/widgets/sections/WalletMenu/components/WalletMenuInfoItem.js +0 -8
- package/dist/widgets/sections/WalletMenu/components/WalletMenuSettingItem.js +0 -8
- package/dist/widgets/sections/WalletMenu/components/WalletToggle.js +0 -12
- package/dist/widgets/sections/WalletMenu/components/index.js +0 -4
- package/dist/widgets/sections/WalletMenu/index.js +0 -5
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ActivityCard } from "./ActivityCard";
|
|
3
|
-
import { WarningIcon } from "../../../components/Icons";
|
|
4
|
-
const meta = {
|
|
5
|
-
component: ActivityCard,
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
export const Basic = {
|
|
10
|
-
args: {
|
|
11
|
-
data: {
|
|
12
|
-
formattedAmount: "1.5 BTC",
|
|
13
|
-
chainName: "Babylon Labs",
|
|
14
|
-
chainIcon: "https://placehold.co/32x32?text=B",
|
|
15
|
-
chainIconAlt: "Babylon Labs",
|
|
16
|
-
details: [
|
|
17
|
-
{ label: "Status", value: "Confirmed" },
|
|
18
|
-
{ label: "Date", value: "Mar 15, 2024" },
|
|
19
|
-
{ label: "Transaction ID", value: "bc1q...xyz789" },
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
export const WithIcon = {
|
|
25
|
-
args: {
|
|
26
|
-
data: {
|
|
27
|
-
formattedAmount: "2.3 BTC",
|
|
28
|
-
icon: "/images/fps/lombard.jpeg",
|
|
29
|
-
iconAlt: "Lombard Protocol",
|
|
30
|
-
chainName: "Babylon Labs",
|
|
31
|
-
chainIcon: "https://placehold.co/32x32?text=B",
|
|
32
|
-
chainIconAlt: "Babylon Labs",
|
|
33
|
-
details: [
|
|
34
|
-
{ label: "Status", value: "Pending" },
|
|
35
|
-
{ label: "Date", value: "Mar 16, 2024" },
|
|
36
|
-
{ label: "Fee", value: "0.0001 BTC" },
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
export const WithPrimaryAction = {
|
|
42
|
-
args: {
|
|
43
|
-
data: {
|
|
44
|
-
formattedAmount: "0.75 BTC",
|
|
45
|
-
icon: "/images/fps/pumpbtc.jpeg",
|
|
46
|
-
iconAlt: "PumpBTC",
|
|
47
|
-
chainName: "Babylon Labs",
|
|
48
|
-
chainIcon: "https://placehold.co/32x32?text=B",
|
|
49
|
-
chainIconAlt: "Babylon Labs",
|
|
50
|
-
details: [
|
|
51
|
-
{ label: "Commission", value: "1%" },
|
|
52
|
-
{ label: "Inception", value: "Mar 16, 2024" },
|
|
53
|
-
{
|
|
54
|
-
label: "Pending",
|
|
55
|
-
value: "7 BABY",
|
|
56
|
-
collapsible: true,
|
|
57
|
-
nestedDetails: [
|
|
58
|
-
{ label: "Pending Stake", value: "10 BABY" },
|
|
59
|
-
{ label: "Pending Unbonding", value: "3 BABY" },
|
|
60
|
-
]
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
primaryAction: {
|
|
64
|
-
label: "Unbond",
|
|
65
|
-
onClick: () => alert("Primary action clicked"),
|
|
66
|
-
variant: "contained",
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
export const WithSecondaryActions = {
|
|
72
|
-
args: {
|
|
73
|
-
data: {
|
|
74
|
-
formattedAmount: "5.0 BTC",
|
|
75
|
-
icon: "/images/fps/solv.jpeg",
|
|
76
|
-
iconAlt: "Solv Protocol",
|
|
77
|
-
chainName: "Babylon Labs",
|
|
78
|
-
chainIcon: "https://placehold.co/32x32?text=B",
|
|
79
|
-
chainIconAlt: "Babylon Labs",
|
|
80
|
-
details: [
|
|
81
|
-
{ label: "Status", value: "Completed" },
|
|
82
|
-
{ label: "Date", value: "Mar 14, 2024" },
|
|
83
|
-
{ label: "Recipient", value: "bc1q...abc123" },
|
|
84
|
-
],
|
|
85
|
-
secondaryActions: [
|
|
86
|
-
{
|
|
87
|
-
label: "Copy Hash",
|
|
88
|
-
onClick: () => alert("Hash copied"),
|
|
89
|
-
variant: "outlined",
|
|
90
|
-
size: "small",
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
label: "Export",
|
|
94
|
-
onClick: () => alert("Export clicked"),
|
|
95
|
-
variant: "outlined",
|
|
96
|
-
size: "small",
|
|
97
|
-
},
|
|
98
|
-
],
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
};
|
|
102
|
-
export const WithOptionalDetails = {
|
|
103
|
-
args: {
|
|
104
|
-
data: {
|
|
105
|
-
formattedAmount: "3.2 BTC",
|
|
106
|
-
icon: "/images/wallets/keystone.svg",
|
|
107
|
-
iconAlt: "Keystone Wallet",
|
|
108
|
-
chainName: "Babylon Labs",
|
|
109
|
-
chainIcon: "https://placehold.co/32x32?text=B",
|
|
110
|
-
chainIconAlt: "Babylon Labs",
|
|
111
|
-
details: [
|
|
112
|
-
{ label: "Status", value: "Confirmed" },
|
|
113
|
-
{ label: "Date", value: "Mar 15, 2024" },
|
|
114
|
-
],
|
|
115
|
-
optionalDetails: [
|
|
116
|
-
{ label: "Network Fee", value: "0.0001 BTC" },
|
|
117
|
-
{ label: "Block Height", value: "834,567" },
|
|
118
|
-
{ label: "Confirmations", value: "6/6" },
|
|
119
|
-
],
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
};
|
|
123
|
-
export const WithListItems = {
|
|
124
|
-
args: {
|
|
125
|
-
data: {
|
|
126
|
-
formattedAmount: "10.5 BTC",
|
|
127
|
-
icon: "/images/wallets/binance.webp",
|
|
128
|
-
iconAlt: "Binance Wallet",
|
|
129
|
-
chainName: "Babylon Labs",
|
|
130
|
-
chainIcon: "https://placehold.co/32x32?text=B",
|
|
131
|
-
chainIconAlt: "Babylon Labs",
|
|
132
|
-
details: [
|
|
133
|
-
{ label: "Status", value: "Completed" },
|
|
134
|
-
{ label: "Date", value: "Mar 13, 2024" },
|
|
135
|
-
],
|
|
136
|
-
listItems: [
|
|
137
|
-
{
|
|
138
|
-
label: "Finality Providers",
|
|
139
|
-
items: [
|
|
140
|
-
{ name: "Lombard Protocol", id: "fp1", icon: "/images/fps/lombard.jpeg" },
|
|
141
|
-
{ name: "PumpBTC", id: "fp2", icon: "/images/fps/pumpbtc.jpeg" },
|
|
142
|
-
{ name: "Solv Protocol", id: "fp3", icon: "/images/fps/solv.jpeg" },
|
|
143
|
-
],
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
label: "Validators",
|
|
147
|
-
items: [
|
|
148
|
-
{ name: "Validator One", id: "val1" },
|
|
149
|
-
{ name: "Validator Two", id: "val2" },
|
|
150
|
-
],
|
|
151
|
-
},
|
|
152
|
-
],
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
};
|
|
156
|
-
export const Complete = {
|
|
157
|
-
args: {
|
|
158
|
-
data: {
|
|
159
|
-
formattedAmount: "7.8 BTC",
|
|
160
|
-
icon: "/images/fps/lombard.jpeg",
|
|
161
|
-
iconAlt: "Lombard Protocol",
|
|
162
|
-
chainName: "Babylon Labs",
|
|
163
|
-
chainIcon: "https://placehold.co/32x32?text=B",
|
|
164
|
-
chainIconAlt: "Babylon Labs",
|
|
165
|
-
details: [
|
|
166
|
-
{ label: "Status", value: "Confirmed" },
|
|
167
|
-
{ label: "Date", value: "Mar 12, 2024" },
|
|
168
|
-
{ label: "Type", value: "Delegation" },
|
|
169
|
-
],
|
|
170
|
-
optionalDetails: [
|
|
171
|
-
{ label: "Network Fee", value: "0.00015 BTC" },
|
|
172
|
-
{ label: "Block Height", value: "834,234" },
|
|
173
|
-
{ label: "Lock Time", value: "1000 blocks" },
|
|
174
|
-
],
|
|
175
|
-
listItems: [
|
|
176
|
-
{
|
|
177
|
-
label: "Finality Providers",
|
|
178
|
-
items: [
|
|
179
|
-
{ name: "Lombard Protocol", id: "bp1", icon: "/images/fps/lombard.jpeg" },
|
|
180
|
-
{ name: "Solv Protocol", id: "bp2", icon: "/images/fps/solv.jpeg" },
|
|
181
|
-
],
|
|
182
|
-
},
|
|
183
|
-
],
|
|
184
|
-
primaryAction: {
|
|
185
|
-
label: "Manage Delegation",
|
|
186
|
-
onClick: () => alert("Manage delegation clicked"),
|
|
187
|
-
variant: "contained",
|
|
188
|
-
fullWidth: true,
|
|
189
|
-
},
|
|
190
|
-
secondaryActions: [
|
|
191
|
-
{
|
|
192
|
-
label: "View on Explorer",
|
|
193
|
-
onClick: () => alert("Explorer opened"),
|
|
194
|
-
variant: "outlined",
|
|
195
|
-
size: "small",
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
label: "Share",
|
|
199
|
-
onClick: () => alert("Share clicked"),
|
|
200
|
-
variant: "outlined",
|
|
201
|
-
size: "small",
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
label: "Export Details",
|
|
205
|
-
onClick: () => alert("Export clicked"),
|
|
206
|
-
variant: "outlined",
|
|
207
|
-
size: "small",
|
|
208
|
-
},
|
|
209
|
-
],
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
};
|
|
213
|
-
export const LargeAmount = {
|
|
214
|
-
args: {
|
|
215
|
-
data: {
|
|
216
|
-
formattedAmount: "1,234.56789 BTC",
|
|
217
|
-
icon: "/images/fps/pumpbtc.jpeg",
|
|
218
|
-
iconAlt: "PumpBTC",
|
|
219
|
-
chainName: "Babylon Labs",
|
|
220
|
-
chainIcon: "https://placehold.co/32x32?text=B",
|
|
221
|
-
chainIconAlt: "Babylon Labs",
|
|
222
|
-
details: [
|
|
223
|
-
{ label: "Status", value: "High Value Transaction" },
|
|
224
|
-
{ label: "Date", value: "Mar 16, 2024" },
|
|
225
|
-
{ label: "USD Value", value: "$87,421,234.56" },
|
|
226
|
-
],
|
|
227
|
-
primaryAction: {
|
|
228
|
-
label: "Confirm Transaction",
|
|
229
|
-
onClick: () => alert("High value transaction confirmed"),
|
|
230
|
-
variant: "contained",
|
|
231
|
-
},
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
};
|
|
235
|
-
export const ErrorState = {
|
|
236
|
-
args: {
|
|
237
|
-
data: {
|
|
238
|
-
formattedAmount: "0.5 BTC",
|
|
239
|
-
icon: _jsx(WarningIcon, { size: 32, variant: "error" }),
|
|
240
|
-
iconAlt: "Warning",
|
|
241
|
-
chainName: "Babylon Labs",
|
|
242
|
-
chainIcon: "https://placehold.co/32x32?text=B",
|
|
243
|
-
chainIconAlt: "Babylon Labs",
|
|
244
|
-
details: [
|
|
245
|
-
{ label: "Status", value: "Failed" },
|
|
246
|
-
{ label: "Date", value: "Mar 16, 2024" },
|
|
247
|
-
{ label: "Error", value: "Insufficient funds" },
|
|
248
|
-
],
|
|
249
|
-
secondaryActions: [
|
|
250
|
-
{
|
|
251
|
-
label: "Cancel",
|
|
252
|
-
onClick: () => alert("Cancel clicked"),
|
|
253
|
-
variant: "outlined",
|
|
254
|
-
size: "small",
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
label: "Retry",
|
|
258
|
-
onClick: () => alert("Retry clicked"),
|
|
259
|
-
variant: "contained",
|
|
260
|
-
size: "small",
|
|
261
|
-
},
|
|
262
|
-
],
|
|
263
|
-
},
|
|
264
|
-
},
|
|
265
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Button } from "../../../../components/Button";
|
|
3
|
-
export function ActivityCardActionSection({ actions, }) {
|
|
4
|
-
return (_jsx("div", { className: "mt-4 sm:mt-6 flex gap-2", children: actions.map((action, index) => (_jsx(Button, { variant: action.variant || "outlined", className: `sm:bbn-btn-medium flex-1 ${action.className || ""}`, onClick: action.onClick, fluid: true, children: action.label }, `${action.label}-${index}`))) }));
|
|
5
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export function ActivityCardAmountSection({ formattedAmount, icon, iconAlt, chainName, chainIcon, chainIconAlt, }) {
|
|
3
|
-
return (_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-2", children: [icon &&
|
|
4
|
-
(typeof icon === "string" ? (_jsx("img", { src: icon, alt: iconAlt || "icon", className: "w-6 h-6 sm:w-8 sm:h-8" })) : (icon)), _jsx("span", { className: "text-base sm:text-lg font-medium text-accent-primary", children: formattedAmount })] }), chainName && (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-base sm:text-lg font-medium text-accent-primary", children: chainName }), chainIcon &&
|
|
5
|
-
(typeof chainIcon === "string" ? (_jsx("img", { src: chainIcon, alt: chainIconAlt || "chain icon", className: "w-6 h-6 sm:w-8 sm:h-8" })) : (chainIcon))] }))] }));
|
|
6
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { ActivityListItem } from "./ActivityListItem";
|
|
4
|
-
import { CollapseIcon, OpenIcon } from "../../../../components/Icons";
|
|
5
|
-
function DetailRow({ label, value, collapsible = false, nestedDetails }) {
|
|
6
|
-
const [isExpanded, setIsExpanded] = useState(false);
|
|
7
|
-
const handleToggle = () => {
|
|
8
|
-
setIsExpanded(!isExpanded);
|
|
9
|
-
};
|
|
10
|
-
if (collapsible) {
|
|
11
|
-
return (_jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-2 min-w-0 overflow-x-auto", children: [_jsxs("div", { className: "flex items-center gap-2 flex-shrink-0", children: [_jsx("span", { className: "text-xs sm:text-sm text-accent-secondary", children: label }), _jsx("button", { onClick: handleToggle, className: "w-5 h-5 flex-shrink-0 hover:opacity-70 transition-opacity", "aria-label": isExpanded ? "Collapse" : "Expand", children: isExpanded ? (_jsx(CollapseIcon, { size: 20, variant: "secondary" })) : (_jsx(OpenIcon, { size: 20, variant: "secondary" })) })] }), _jsx("span", { className: "text-xs sm:text-sm text-accent-primary font-medium text-right min-w-0 overflow-x-auto whitespace-nowrap", children: value })] }), isExpanded && nestedDetails && (_jsx("div", { className: "bg-surface p-3 sm:p-4 rounded space-y-3 sm:space-y-4 overflow-x-auto", children: nestedDetails.map((detail, index) => (_jsx(DetailRow, { label: detail.label, value: detail.value, collapsible: detail.collapsible, nestedDetails: detail.nestedDetails }, index))) }))] }));
|
|
12
|
-
}
|
|
13
|
-
return (_jsxs("div", { className: "flex items-center justify-between gap-2 min-w-0 overflow-x-auto", children: [_jsx("span", { className: "text-xs sm:text-sm text-accent-secondary flex-shrink-0", children: label }), _jsx("span", { className: "text-xs sm:text-sm text-accent-primary font-medium text-right min-w-0 overflow-x-auto whitespace-nowrap", children: value })] }));
|
|
14
|
-
}
|
|
15
|
-
export function ActivityCardDetailsSection({ details, optionalDetails, listItems, }) {
|
|
16
|
-
const hasOptionalDetails = optionalDetails && optionalDetails.length > 0;
|
|
17
|
-
const hasListItems = listItems && listItems.length > 0;
|
|
18
|
-
return (_jsxs("div", { className: "space-y-3 sm:space-y-4 overflow-x-auto", children: [_jsx("div", { className: "space-y-4 sm:space-y-6", children: details.map((detail, detailIndex) => (_jsx(DetailRow, { label: detail.label, value: detail.value, collapsible: detail.collapsible, nestedDetails: detail.nestedDetails }, detailIndex))) }), hasListItems && (_jsx("div", { className: "space-y-3 sm:space-y-4", children: listItems.map((listSection, sectionIndex) => (_jsx("div", { className: "bg-surface p-3 sm:p-4 rounded space-y-3 sm:space-y-4 overflow-x-auto", children: _jsxs("div", { className: "flex justify-between items-start gap-2", children: [_jsx("span", { className: "text-xs sm:text-sm text-accent-secondary", children: listSection.label }), _jsx("div", { className: "flex flex-wrap gap-2", children: listSection.items.map((item, itemIndex) => (_jsx(ActivityListItem, { item: item }, item.id || itemIndex))) })] }) }, sectionIndex))) })), hasOptionalDetails && (_jsx("div", { className: "bg-surface p-3 sm:p-4 rounded space-y-3 sm:space-y-4 overflow-x-auto", children: optionalDetails.map((detail, index) => (_jsx(DetailRow, { label: detail.label, value: detail.value, collapsible: detail.collapsible, nestedDetails: detail.nestedDetails }, index))) }))] }));
|
|
19
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { twMerge } from "tailwind-merge";
|
|
3
|
-
export function ActivityListItem({ item, className }) {
|
|
4
|
-
return (_jsxs("div", { className: twMerge("flex items-center gap-2 min-w-0", className), children: [_jsx("span", { className: "text-xs sm:text-sm text-accent-primary font-medium truncate flex items-center", children: item.name }), item.icon && (_jsx("div", { className: "flex items-center w-4 h-4 flex-shrink-0 justify-center text-xs sm:text-sm", children: typeof item.icon === "string" ? (_jsx("img", { src: item.icon, alt: item.iconAlt || item.name, className: "w-full h-full rounded-full object-cover" })) : (item.icon) }))] }));
|
|
5
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { ActivityCard, } from "./ActivityCard";
|
|
2
|
-
export { ActivityCardActionSection } from "./components/ActivityCardActionSection";
|
|
3
|
-
export { ActivityCardAmountSection } from "./components/ActivityCardAmountSection";
|
|
4
|
-
export { ActivityCardDetailsSection } from "./components/ActivityCardDetailsSection";
|
|
5
|
-
export { ActivityListItem } from "./components/ActivityListItem";
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { HiddenField } from "@/widgets/form/HiddenField";
|
|
3
|
-
import { SubSection } from "@/components/SubSection";
|
|
4
|
-
import { useFormContext, useWatch } from "react-hook-form";
|
|
5
|
-
import { AmountItem } from "../../../components/AmountItem/AmountItem";
|
|
6
|
-
import { calculateTokenValueInCurrency, maxDecimals } from "@/utils/helpers";
|
|
7
|
-
import { BTC_DECIMAL_PLACES } from "@/utils/constants";
|
|
8
|
-
export const AmountSubsection = ({ fieldName, currencyIcon, currencyName, displayBalance, placeholder = "Enter Amount", balanceDetails, prefix, min = "0", step = "any", autoFocus = true, decimals, }) => {
|
|
9
|
-
const amount = useWatch({ name: fieldName, defaultValue: "" });
|
|
10
|
-
const { setValue } = useFormContext();
|
|
11
|
-
const amountValue = parseFloat(amount || "0");
|
|
12
|
-
const amountUsd = calculateTokenValueInCurrency(amountValue, balanceDetails?.price ?? 0, {
|
|
13
|
-
zeroDisplay: "$0.00",
|
|
14
|
-
});
|
|
15
|
-
const handleInputChange = (e) => {
|
|
16
|
-
let value = e.target.value;
|
|
17
|
-
// If decimals is specified, validate and restrict input
|
|
18
|
-
if (decimals !== undefined && decimals >= 0) {
|
|
19
|
-
// Handle multiple decimal points by taking only the first one
|
|
20
|
-
const [integer, decimal] = value.split('.', 2);
|
|
21
|
-
if (decimal !== undefined && decimal.length > decimals) {
|
|
22
|
-
// Truncate decimal part to specified length
|
|
23
|
-
value = integer + '.' + decimal.slice(0, decimals);
|
|
24
|
-
}
|
|
25
|
-
else if (decimal !== undefined) {
|
|
26
|
-
// Ensure we only have one decimal point
|
|
27
|
-
value = integer + '.' + decimal;
|
|
28
|
-
}
|
|
29
|
-
else if (value.includes('.')) {
|
|
30
|
-
// Handle case where there are multiple dots but no decimal part
|
|
31
|
-
value = integer;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
setValue(fieldName, value, {
|
|
35
|
-
shouldValidate: true,
|
|
36
|
-
shouldDirty: true,
|
|
37
|
-
shouldTouch: true,
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
const handleKeyDown = (e) => {
|
|
41
|
-
if (e.key === "ArrowUp" || e.key === "ArrowDown") {
|
|
42
|
-
e.preventDefault();
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
let subtitle;
|
|
46
|
-
if (balanceDetails) {
|
|
47
|
-
subtitle = `${maxDecimals(Number(balanceDetails.balance), balanceDetails.decimals ?? BTC_DECIMAL_PLACES)} ${balanceDetails.symbol}`;
|
|
48
|
-
if (prefix) {
|
|
49
|
-
subtitle = `${prefix}: ${subtitle}`;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return (_jsxs(_Fragment, { children: [_jsx(HiddenField, { name: fieldName, defaultValue: "" }), _jsx(SubSection, { className: "flex w-full flex-col content-center justify-between gap-4", children: _jsx(AmountItem, { amount: amount, currencyIcon: currencyIcon, currencyName: currencyName, placeholder: placeholder, displayBalance: displayBalance, balanceDetails: balanceDetails, min: min, step: step, autoFocus: autoFocus, onChange: handleInputChange, onKeyDown: handleKeyDown, amountUsd: amountUsd, subtitle: subtitle }) })] }));
|
|
53
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { AmountSubsection } from "./AmountSubsection";
|
|
3
|
-
declare const meta: Meta<typeof AmountSubsection>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const WithoutBalance: Story;
|
|
8
|
-
export declare const BitcoinCurrency: Story;
|
|
9
|
-
export declare const LargeBalance: Story;
|
|
10
|
-
export declare const WithoutUSDPrice: Story;
|
|
11
|
-
export declare const ZeroBalance: Story;
|
|
12
|
-
export declare const SmallBalance: Story;
|
|
13
|
-
export declare const NoAutoFocus: Story;
|
|
14
|
-
export declare const CustomMinStep: Story;
|
|
15
|
-
export declare const NoPrefix: Story;
|
|
16
|
-
export declare const RestrictedDecimals: Story;
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as yup from "yup";
|
|
3
|
-
import { AmountSubsection } from "./AmountSubsection";
|
|
4
|
-
import { Form } from "@/widgets/form/Form";
|
|
5
|
-
const meta = {
|
|
6
|
-
component: AmountSubsection,
|
|
7
|
-
tags: ["autodocs"],
|
|
8
|
-
};
|
|
9
|
-
export default meta;
|
|
10
|
-
// Define a simple validation schema for the field used in this story
|
|
11
|
-
const schema = yup
|
|
12
|
-
.object()
|
|
13
|
-
.shape({
|
|
14
|
-
amount: yup.number().required().positive(),
|
|
15
|
-
})
|
|
16
|
-
.required();
|
|
17
|
-
export const Default = {
|
|
18
|
-
args: {
|
|
19
|
-
fieldName: "amount",
|
|
20
|
-
currencyIcon: "https://placehold.co/40x40",
|
|
21
|
-
currencyName: "BBN",
|
|
22
|
-
placeholder: "Enter Amount",
|
|
23
|
-
prefix: "Stakable",
|
|
24
|
-
displayBalance: true,
|
|
25
|
-
balanceDetails: {
|
|
26
|
-
balance: 1234.56789,
|
|
27
|
-
symbol: "BBN",
|
|
28
|
-
price: 0.25,
|
|
29
|
-
displayUSD: true,
|
|
30
|
-
decimals: 8,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
decorators: [
|
|
34
|
-
(Story) => (_jsx(Form, { onChange: console.log, schema: schema, children: _jsx(Story, {}) })),
|
|
35
|
-
],
|
|
36
|
-
};
|
|
37
|
-
export const WithoutBalance = {
|
|
38
|
-
args: {
|
|
39
|
-
fieldName: "amount",
|
|
40
|
-
currencyIcon: "https://placehold.co/40x40",
|
|
41
|
-
currencyName: "BBN",
|
|
42
|
-
placeholder: "Enter staking amount",
|
|
43
|
-
displayBalance: false,
|
|
44
|
-
},
|
|
45
|
-
decorators: [
|
|
46
|
-
(Story) => (_jsx(Form, { onChange: console.log, schema: schema, children: _jsx(Story, {}) })),
|
|
47
|
-
],
|
|
48
|
-
};
|
|
49
|
-
export const BitcoinCurrency = {
|
|
50
|
-
args: {
|
|
51
|
-
fieldName: "amount",
|
|
52
|
-
currencyIcon: "https://placehold.co/40x40/FF9500/FFFFFF?text=₿",
|
|
53
|
-
currencyName: "BTC",
|
|
54
|
-
placeholder: "Enter BTC amount",
|
|
55
|
-
prefix: "Available",
|
|
56
|
-
displayBalance: true,
|
|
57
|
-
balanceDetails: {
|
|
58
|
-
balance: 0.12345678,
|
|
59
|
-
symbol: "BTC",
|
|
60
|
-
price: 65000,
|
|
61
|
-
displayUSD: true,
|
|
62
|
-
decimals: 8,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
decorators: [
|
|
66
|
-
(Story) => (_jsx(Form, { onChange: console.log, schema: schema, children: _jsx(Story, {}) })),
|
|
67
|
-
],
|
|
68
|
-
};
|
|
69
|
-
export const LargeBalance = {
|
|
70
|
-
args: {
|
|
71
|
-
fieldName: "amount",
|
|
72
|
-
currencyIcon: "https://placehold.co/40x40/4CAF50/FFFFFF?text=T",
|
|
73
|
-
currencyName: "USDT",
|
|
74
|
-
placeholder: "Enter USDT amount",
|
|
75
|
-
prefix: "Total",
|
|
76
|
-
displayBalance: true,
|
|
77
|
-
balanceDetails: {
|
|
78
|
-
balance: 1000000.123456,
|
|
79
|
-
symbol: "USDT",
|
|
80
|
-
price: 1.0,
|
|
81
|
-
displayUSD: true,
|
|
82
|
-
decimals: 6,
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
decorators: [
|
|
86
|
-
(Story) => (_jsx(Form, { onChange: console.log, schema: schema, children: _jsx(Story, {}) })),
|
|
87
|
-
],
|
|
88
|
-
};
|
|
89
|
-
export const WithoutUSDPrice = {
|
|
90
|
-
args: {
|
|
91
|
-
fieldName: "amount",
|
|
92
|
-
currencyIcon: "https://placehold.co/40x40/8B5CF6/FFFFFF?text=S",
|
|
93
|
-
currencyName: "SOL",
|
|
94
|
-
placeholder: "Enter amount",
|
|
95
|
-
prefix: "Delegated",
|
|
96
|
-
displayBalance: true,
|
|
97
|
-
balanceDetails: {
|
|
98
|
-
balance: 500.789,
|
|
99
|
-
symbol: "SOL",
|
|
100
|
-
displayUSD: false,
|
|
101
|
-
decimals: 9,
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
decorators: [
|
|
105
|
-
(Story) => (_jsx(Form, { onChange: console.log, schema: schema, children: _jsx(Story, {}) })),
|
|
106
|
-
],
|
|
107
|
-
};
|
|
108
|
-
export const ZeroBalance = {
|
|
109
|
-
args: {
|
|
110
|
-
fieldName: "amount",
|
|
111
|
-
currencyIcon: "https://placehold.co/40x40/E53E3E/FFFFFF?text=X",
|
|
112
|
-
currencyName: "XRP",
|
|
113
|
-
placeholder: "Enter XRP amount",
|
|
114
|
-
prefix: "Available",
|
|
115
|
-
displayBalance: true,
|
|
116
|
-
balanceDetails: {
|
|
117
|
-
balance: 0,
|
|
118
|
-
symbol: "XRP",
|
|
119
|
-
price: 0.5,
|
|
120
|
-
displayUSD: true,
|
|
121
|
-
decimals: 6,
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
decorators: [
|
|
125
|
-
(Story) => (_jsx(Form, { onChange: console.log, schema: schema, children: _jsx(Story, {}) })),
|
|
126
|
-
],
|
|
127
|
-
};
|
|
128
|
-
export const SmallBalance = {
|
|
129
|
-
args: {
|
|
130
|
-
fieldName: "amount",
|
|
131
|
-
currencyIcon: "https://placehold.co/40x40/627EEA/FFFFFF?text=Ξ",
|
|
132
|
-
currencyName: "ETH",
|
|
133
|
-
placeholder: "Enter ETH amount",
|
|
134
|
-
prefix: "Staked",
|
|
135
|
-
displayBalance: true,
|
|
136
|
-
balanceDetails: {
|
|
137
|
-
balance: 0.000123456789,
|
|
138
|
-
symbol: "ETH",
|
|
139
|
-
price: 3500,
|
|
140
|
-
displayUSD: true,
|
|
141
|
-
decimals: 18,
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
decorators: [
|
|
145
|
-
(Story) => (_jsx(Form, { onChange: console.log, schema: schema, children: _jsx(Story, {}) })),
|
|
146
|
-
],
|
|
147
|
-
};
|
|
148
|
-
export const NoAutoFocus = {
|
|
149
|
-
args: {
|
|
150
|
-
fieldName: "amount",
|
|
151
|
-
currencyIcon: "https://placehold.co/40x40",
|
|
152
|
-
currencyName: "BBN",
|
|
153
|
-
placeholder: "Click to enter amount",
|
|
154
|
-
prefix: "Unbonded",
|
|
155
|
-
displayBalance: true,
|
|
156
|
-
autoFocus: false,
|
|
157
|
-
balanceDetails: {
|
|
158
|
-
balance: 999.87654321,
|
|
159
|
-
symbol: "BBN",
|
|
160
|
-
price: 0.15,
|
|
161
|
-
displayUSD: true,
|
|
162
|
-
decimals: 8,
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
decorators: [
|
|
166
|
-
(Story) => (_jsx(Form, { onChange: console.log, schema: schema, children: _jsx(Story, {}) })),
|
|
167
|
-
],
|
|
168
|
-
};
|
|
169
|
-
export const CustomMinStep = {
|
|
170
|
-
args: {
|
|
171
|
-
fieldName: "amount",
|
|
172
|
-
currencyIcon: "https://placehold.co/40x40/F7931A/FFFFFF?text=₿",
|
|
173
|
-
currencyName: "BTC",
|
|
174
|
-
placeholder: "Minimum 0.001 BTC",
|
|
175
|
-
prefix: "Withdrawable",
|
|
176
|
-
displayBalance: true,
|
|
177
|
-
min: "0.001",
|
|
178
|
-
step: "0.001",
|
|
179
|
-
balanceDetails: {
|
|
180
|
-
balance: 2.5,
|
|
181
|
-
symbol: "BTC",
|
|
182
|
-
price: 65000,
|
|
183
|
-
displayUSD: true,
|
|
184
|
-
decimals: 8,
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
decorators: [
|
|
188
|
-
(Story) => (_jsx(Form, { onChange: console.log, schema: schema, children: _jsx(Story, {}) })),
|
|
189
|
-
],
|
|
190
|
-
};
|
|
191
|
-
export const NoPrefix = {
|
|
192
|
-
args: {
|
|
193
|
-
fieldName: "amount",
|
|
194
|
-
currencyIcon: "https://placehold.co/40x40/1DA1F2/FFFFFF?text=D",
|
|
195
|
-
currencyName: "DOGE",
|
|
196
|
-
placeholder: "Much amount, very input",
|
|
197
|
-
displayBalance: true,
|
|
198
|
-
balanceDetails: {
|
|
199
|
-
balance: 42069.42,
|
|
200
|
-
symbol: "DOGE",
|
|
201
|
-
price: 0.08,
|
|
202
|
-
displayUSD: true,
|
|
203
|
-
decimals: 8,
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
decorators: [
|
|
207
|
-
(Story) => (_jsx(Form, { onChange: console.log, schema: schema, children: _jsx(Story, {}) })),
|
|
208
|
-
],
|
|
209
|
-
};
|
|
210
|
-
export const RestrictedDecimals = {
|
|
211
|
-
args: {
|
|
212
|
-
fieldName: "amount",
|
|
213
|
-
currencyIcon: "https://placehold.co/40x40/FF6B6B/FFFFFF?text=₿",
|
|
214
|
-
currencyName: "BTC",
|
|
215
|
-
placeholder: "Enter BTC amount (max 2 decimals)",
|
|
216
|
-
prefix: "Available",
|
|
217
|
-
displayBalance: true,
|
|
218
|
-
decimals: 2, // Restrict to 2 decimal places
|
|
219
|
-
balanceDetails: {
|
|
220
|
-
balance: 1.23456789,
|
|
221
|
-
symbol: "BTC",
|
|
222
|
-
price: 65000,
|
|
223
|
-
displayUSD: true,
|
|
224
|
-
decimals: 8,
|
|
225
|
-
},
|
|
226
|
-
},
|
|
227
|
-
decorators: [
|
|
228
|
-
(Story) => (_jsx(Form, { onChange: console.log, schema: schema, children: _jsx(Story, {}) })),
|
|
229
|
-
],
|
|
230
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { AmountSubsection } from "./AmountSubsection";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { FeeItem } from "../../../components/FeeItem/FeeItem";
|
|
3
|
-
import { BBN_DECIMAL_PLACES } from "../../../utils/constants";
|
|
4
|
-
export function BBNFeeAmount({ amount, coinSymbol, hint, title, className, decimals = BBN_DECIMAL_PLACES }) {
|
|
5
|
-
const formattedAmount = typeof amount === "number" ? amount.toFixed(decimals) : amount;
|
|
6
|
-
return (_jsxs(FeeItem, { title: title ?? `${coinSymbol} Network Fee`, hint: hint, className: className, children: [formattedAmount, " ", coinSymbol] }));
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { FeeItem } from "../../../components/FeeItem/FeeItem";
|
|
3
|
-
import { BTC_DECIMAL_PLACES } from "../../../utils/constants";
|
|
4
|
-
export function BTCFeeAmount({ amount, coinSymbol, hint, title, className, decimals = BTC_DECIMAL_PLACES }) {
|
|
5
|
-
let formattedAmount;
|
|
6
|
-
if (typeof amount === "number") {
|
|
7
|
-
if (amount === 0) {
|
|
8
|
-
formattedAmount = "0";
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
const str = amount.toFixed(decimals);
|
|
12
|
-
formattedAmount = str.replace(/0+$/, "").replace(/\.$/, "");
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
formattedAmount = amount;
|
|
17
|
-
}
|
|
18
|
-
return (_jsxs(FeeItem, { title: title ?? `${coinSymbol} Network Fee`, hint: hint, className: className, children: [formattedAmount, " ", coinSymbol] }));
|
|
19
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FeeItem } from "../../../components/FeeItem/FeeItem";
|
|
3
|
-
import { Button } from "../../../components/Button";
|
|
4
|
-
import { FaPen } from "react-icons/fa6";
|
|
5
|
-
export function BTCFeeRate({ value, onEdit, title = "Network Fee Rate", className }) {
|
|
6
|
-
return (_jsxs(FeeItem, { title: title, className: className, children: [_jsxs("span", { children: [value, " sats/vB"] }), onEdit && (_jsx(Button, { size: "small", variant: "outlined", className: "h-6 w-6 pl-1 text-secondary-strokeDark", onClick: onEdit, children: _jsx(FaPen, { size: 16, className: "text-secondary-strokeDark" }) }))] }));
|
|
7
|
-
}
|