@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,12 +1,12 @@
|
|
|
1
|
-
export { SettingMenuTitle } from
|
|
2
|
-
export { SettingMenuGroup } from
|
|
3
|
-
export { SettingMenuItem } from
|
|
4
|
-
export { SettingMenuSubMenu } from
|
|
5
|
-
export { SettingMenuDescription } from
|
|
6
|
-
export { SettingMenuCustomContent } from
|
|
7
|
-
export type { SettingMenuTitleProps } from
|
|
8
|
-
export type { SettingMenuGroupProps } from
|
|
9
|
-
export type { SettingMenuItemProps } from
|
|
10
|
-
export type { SettingMenuSubMenuProps } from
|
|
11
|
-
export type { SettingMenuDescriptionProps } from
|
|
12
|
-
export type { SettingMenuCustomContentProps } from
|
|
1
|
+
export { SettingMenuTitle } from './SettingMenuTitle';
|
|
2
|
+
export { SettingMenuGroup } from './SettingMenuGroup';
|
|
3
|
+
export { SettingMenuItem } from './SettingMenuItem';
|
|
4
|
+
export { SettingMenuSubMenu } from './SettingMenuSubMenu';
|
|
5
|
+
export { SettingMenuDescription } from './SettingMenuDescription';
|
|
6
|
+
export { SettingMenuCustomContent } from './SettingMenuCustomContent';
|
|
7
|
+
export type { SettingMenuTitleProps } from './SettingMenuTitle';
|
|
8
|
+
export type { SettingMenuGroupProps } from './SettingMenuGroup';
|
|
9
|
+
export type { SettingMenuItemProps } from './SettingMenuItem';
|
|
10
|
+
export type { SettingMenuSubMenuProps } from './SettingMenuSubMenu';
|
|
11
|
+
export type { SettingMenuDescriptionProps } from './SettingMenuDescription';
|
|
12
|
+
export type { SettingMenuCustomContentProps } from './SettingMenuCustomContent';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { SettingMenu } from
|
|
2
|
-
export type { SettingMenuProps } from
|
|
3
|
-
export { SettingMenuTitle } from
|
|
4
|
-
export { SettingMenuGroup } from
|
|
5
|
-
export { SettingMenuItem } from
|
|
6
|
-
export { SettingMenuSubMenu } from
|
|
7
|
-
export { SettingMenuDescription } from
|
|
8
|
-
export { SettingMenuCustomContent } from
|
|
9
|
-
export type { SettingMenuTitleProps } from
|
|
10
|
-
export type { SettingMenuGroupProps } from
|
|
11
|
-
export type { SettingMenuItemProps } from
|
|
12
|
-
export type { SettingMenuSubMenuProps } from
|
|
13
|
-
export type { SettingMenuDescriptionProps } from
|
|
14
|
-
export type { SettingMenuCustomContentProps } from
|
|
1
|
+
export { SettingMenu } from './SettingMenu';
|
|
2
|
+
export type { SettingMenuProps } from './SettingMenu';
|
|
3
|
+
export { SettingMenuTitle } from './components';
|
|
4
|
+
export { SettingMenuGroup } from './components';
|
|
5
|
+
export { SettingMenuItem } from './components';
|
|
6
|
+
export { SettingMenuSubMenu } from './components';
|
|
7
|
+
export { SettingMenuDescription } from './components';
|
|
8
|
+
export { SettingMenuCustomContent } from './components';
|
|
9
|
+
export type { SettingMenuTitleProps } from './components';
|
|
10
|
+
export type { SettingMenuGroupProps } from './components';
|
|
11
|
+
export type { SettingMenuItemProps } from './components';
|
|
12
|
+
export type { SettingMenuSubMenuProps } from './components';
|
|
13
|
+
export type { SettingMenuDescriptionProps } from './components';
|
|
14
|
+
export type { SettingMenuCustomContentProps } from './components';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FinalityProviderItemProps } from
|
|
1
|
+
import { FinalityProviderItemProps } from '../../../elements/FinalityProviderItem/FinalityProviderItem';
|
|
2
2
|
interface TableElementProps {
|
|
3
3
|
providerItemProps: FinalityProviderItemProps;
|
|
4
4
|
attributes: Record<string, React.ReactNode>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TableElement } from
|
|
1
|
+
export { TableElement } from './TableElement';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { UnbondingModal } from
|
|
1
|
+
export { UnbondingModal } from './UnbondingModal';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactNode, PropsWithChildren } from
|
|
1
|
+
import { ColumnProps } from '../../../components/Table/types';
|
|
2
|
+
import { ReactNode, PropsWithChildren } from 'react';
|
|
3
3
|
export interface ValidatorRow {
|
|
4
4
|
id: string | number;
|
|
5
5
|
icon?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ValidatorSelector } from
|
|
1
|
+
export { ValidatorSelector } from './ValidatorSelector';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { WalletBalanceData } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { WalletBalanceData } from './components/WalletMenuCard';
|
|
3
3
|
export type WalletChain = "BTC" | "BBN";
|
|
4
4
|
export interface WalletMenuProps {
|
|
5
5
|
trigger: React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babylonlabs-io/core-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.39.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"dev": "npm run storybook",
|
|
25
|
-
"build": "tsc -b && vite build",
|
|
25
|
+
"build": "tsc -b --noEmit tsconfig.lib.json && vite build",
|
|
26
26
|
"format": "prettier . --write",
|
|
27
27
|
"preview": "vite preview",
|
|
28
28
|
"storybook": "storybook dev -p 6006",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"react": "^18.3.1",
|
|
40
40
|
"react-dom": "^18.3.1",
|
|
41
41
|
"tailwind-merge": "^2.5.4",
|
|
42
|
-
"yup": "^1.
|
|
42
|
+
"yup": "^1.6.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@chromatic-com/storybook": "^3.2.2",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"@types/lodash.throttle": "^4.1.9",
|
|
60
60
|
"@types/react": "^18.3.12",
|
|
61
61
|
"@types/react-dom": "^18.3.1",
|
|
62
|
-
"@vitejs/plugin-react": "^4.
|
|
62
|
+
"@vitejs/plugin-react": "^4.4.1",
|
|
63
63
|
"autoprefixer": "^10.4.20",
|
|
64
64
|
"globals": "^16.3.0",
|
|
65
65
|
"husky": "^9.1.7",
|
|
66
|
-
"lint-staged": "^15.
|
|
66
|
+
"lint-staged": "^15.5.0",
|
|
67
67
|
"lodash.throttle": "^4.1.1",
|
|
68
68
|
"nodemon": "^3.1.0",
|
|
69
69
|
"postcss": "^8.4.47",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"storybook": "^8.4.2",
|
|
75
75
|
"storybook-dark-mode": "^4.0.2",
|
|
76
76
|
"tailwindcss": "^3.4.14",
|
|
77
|
-
"typescript": "^5.8.
|
|
77
|
+
"typescript": "^5.8.3",
|
|
78
78
|
"typescript-eslint": "^8.37.0",
|
|
79
79
|
"vite": "^5.4.10",
|
|
80
80
|
"vite-plugin-dts": "^4.3.0"
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useMemo, createContext } from "react";
|
|
3
|
-
import { twJoin } from "tailwind-merge";
|
|
4
|
-
import { useControlledState } from "@/hooks/useControlledState";
|
|
5
|
-
export const Context = createContext({
|
|
6
|
-
disabled: false,
|
|
7
|
-
expanded: false,
|
|
8
|
-
});
|
|
9
|
-
export function Accordion({ expanded: isExpanded, defaultExpanded, onChange, className, disabled = false, fluid = false, children, }) {
|
|
10
|
-
const [expanded = false, setExpanded] = useControlledState({
|
|
11
|
-
value: isExpanded,
|
|
12
|
-
defaultValue: defaultExpanded,
|
|
13
|
-
onStateChange: onChange,
|
|
14
|
-
});
|
|
15
|
-
const handleToggle = useCallback(() => {
|
|
16
|
-
setExpanded(!expanded);
|
|
17
|
-
}, [setExpanded, expanded]);
|
|
18
|
-
const context = useMemo(() => ({
|
|
19
|
-
defaultExpanded,
|
|
20
|
-
disabled,
|
|
21
|
-
expanded: expanded && !disabled,
|
|
22
|
-
toggle: !disabled ? handleToggle : undefined,
|
|
23
|
-
}), [defaultExpanded, expanded, disabled, handleToggle]);
|
|
24
|
-
return (_jsx(Context.Provider, { value: context, children: _jsx("div", { className: twJoin("bbn-accordion", disabled && "bbn-accordion-disabled", fluid && "bbn-accordion-fluid", className), children: children }) }));
|
|
25
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { AiOutlinePlus, AiOutlineMinus } from "react-icons/ai";
|
|
3
|
-
import { Accordion, AccordionSummary, AccordionDetails } from ".";
|
|
4
|
-
import { Heading } from "../Heading";
|
|
5
|
-
import { Text } from "../Text";
|
|
6
|
-
const meta = {
|
|
7
|
-
component: Accordion,
|
|
8
|
-
tags: ["autodocs"],
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
export const Default = {
|
|
12
|
-
args: {
|
|
13
|
-
className: "b-text-primary",
|
|
14
|
-
},
|
|
15
|
-
render: (props) => (_jsxs(Accordion, { ...props, children: [_jsx(AccordionSummary, { className: "b-p-2", renderIcon: (expanded) => (expanded ? _jsx(AiOutlineMinus, { size: 24 }) : _jsx(AiOutlinePlus, { size: 24 })), children: _jsx(Heading, { variant: "h6", children: "How does Bitcoin Staking work?" }) }), _jsx(AccordionDetails, { className: "b-p-2", unmountOnExit: true, children: _jsx(Text, { children: "I don't know" }) })] })),
|
|
16
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useContext, useEffect, useState } from "react";
|
|
3
|
-
import { twJoin } from "tailwind-merge";
|
|
4
|
-
import { Context } from "../Accordion";
|
|
5
|
-
import { useHeightObserver } from "../hooks/useHeightObserver";
|
|
6
|
-
export function AccordionDetails({ unmountOnExit = false, animationDuration = 200, className, wrapperClassName, children, }) {
|
|
7
|
-
const { expanded } = useContext(Context);
|
|
8
|
-
const [visible, setVisibility] = useState(expanded);
|
|
9
|
-
const mounted = visible || !unmountOnExit;
|
|
10
|
-
const { height, ref: contentRef } = useHeightObserver(mounted);
|
|
11
|
-
useEffect(function changeContentVisibility() {
|
|
12
|
-
if (expanded === visible) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
if (expanded) {
|
|
16
|
-
setVisibility(true);
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const timer = setTimeout(setVisibility, animationDuration, false);
|
|
20
|
-
return () => {
|
|
21
|
-
clearTimeout(timer);
|
|
22
|
-
};
|
|
23
|
-
}, [expanded, visible, animationDuration]);
|
|
24
|
-
return (_jsx("div", { className: twJoin("bbn-accordion-details", wrapperClassName), style: {
|
|
25
|
-
height: expanded ? height : "0px",
|
|
26
|
-
visibility: visible ? "visible" : "hidden",
|
|
27
|
-
transitionDuration: `${animationDuration}ms`,
|
|
28
|
-
}, children: mounted ? (_jsx("div", { ref: contentRef, className: twJoin("bbn-accordion-content", className), children: children })) : null }));
|
|
29
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useContext } from "react";
|
|
3
|
-
import { twJoin } from "tailwind-merge";
|
|
4
|
-
import { IconButton } from "@/components/Button";
|
|
5
|
-
import { Context } from "../Accordion";
|
|
6
|
-
export function AccordionSummary({ className, iconClassName, iconProps, children, renderIcon = () => null, }) {
|
|
7
|
-
const { expanded, toggle } = useContext(Context);
|
|
8
|
-
const icon = renderIcon(expanded);
|
|
9
|
-
return (_jsxs("div", { className: twJoin("bbn-accordion-summary", className), onClick: toggle, children: [children, icon && _jsx(IconButton, { className: twJoin("bbn-accordion-icon", iconClassName), ...iconProps, children: icon })] }));
|
|
10
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { toPixels } from "@/utils/css";
|
|
2
|
-
import { useEffect, useRef, useState } from "react";
|
|
3
|
-
export function useHeightObserver(enabled = true) {
|
|
4
|
-
const [height, setHeight] = useState("0px");
|
|
5
|
-
const [observer, setObserver] = useState();
|
|
6
|
-
const contentRef = useRef(null);
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
const observer = new ResizeObserver((entries) => {
|
|
9
|
-
const [entry] = entries;
|
|
10
|
-
setHeight(toPixels(entry.target.clientHeight) ?? "0px");
|
|
11
|
-
});
|
|
12
|
-
setObserver(observer);
|
|
13
|
-
}, []);
|
|
14
|
-
useEffect(function updateAccordionHeightOnContentChange() {
|
|
15
|
-
const { current: content } = contentRef;
|
|
16
|
-
if (!enabled || !content)
|
|
17
|
-
return;
|
|
18
|
-
observer?.observe(content);
|
|
19
|
-
return () => {
|
|
20
|
-
observer?.unobserve(content);
|
|
21
|
-
};
|
|
22
|
-
}, [enabled, observer]);
|
|
23
|
-
return { height, ref: contentRef };
|
|
24
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
export const AmountItem = ({ amount, currencyIcon, currencyName, placeholder = "Enter Amount", subtitle, displayBalance, balanceDetails, min, step, autoFocus, onChange, onKeyDown, amountUsd, disabled = false, }) => {
|
|
3
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex w-full flex-row content-center items-center justify-between font-normal", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("img", { src: currencyIcon, alt: currencyName, className: "h-10 max-h-[2.5rem] w-10 max-w-[2.5rem]" }), _jsx("div", { className: "text-lg", children: currencyName })] }), _jsx("input", { type: "number", value: amount ?? "", min: min, step: step, onChange: onChange, onKeyDown: onKeyDown, disabled: disabled, placeholder: placeholder, autoFocus: autoFocus, className: "w-2/3 bg-transparent text-right text-lg outline-none appearance-none [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none" })] }), balanceDetails && displayBalance ? (_jsxs("div", { className: "flex w-full flex-row content-center justify-between text-sm", children: [_jsx("span", { className: "cursor-default", children: subtitle }), balanceDetails.displayUSD && balanceDetails.price !== undefined && _jsxs("div", { children: [amountUsd, " USD"] })] })) : null] }));
|
|
4
|
-
};
|
|
5
|
-
export default AmountItem;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { AmountItem } from "./AmountItem";
|
|
2
|
-
const meta = {
|
|
3
|
-
component: AmountItem,
|
|
4
|
-
tags: ["autodocs"],
|
|
5
|
-
};
|
|
6
|
-
export default meta;
|
|
7
|
-
export const Default = {
|
|
8
|
-
args: {
|
|
9
|
-
amount: 0.5,
|
|
10
|
-
currencyIcon: "https://placehold.co/40x40",
|
|
11
|
-
currencyName: "BBN",
|
|
12
|
-
placeholder: "Enter Amount",
|
|
13
|
-
displayBalance: true,
|
|
14
|
-
balanceDetails: {
|
|
15
|
-
balance: 1234.56789,
|
|
16
|
-
symbol: "BBN",
|
|
17
|
-
price: 0.25,
|
|
18
|
-
displayUSD: true,
|
|
19
|
-
decimals: 8,
|
|
20
|
-
},
|
|
21
|
-
min: "0",
|
|
22
|
-
step: "0.00000001",
|
|
23
|
-
autoFocus: false,
|
|
24
|
-
onChange: console.log,
|
|
25
|
-
onKeyDown: console.log,
|
|
26
|
-
amountUsd: "250.00",
|
|
27
|
-
disabled: false,
|
|
28
|
-
},
|
|
29
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { AmountItem } from "./AmountItem";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { twJoin } from "tailwind-merge";
|
|
3
|
-
import "./Avatar.css";
|
|
4
|
-
export function Avatar({ className, style, size = "large", variant = "circular", alt, url, children }) {
|
|
5
|
-
return (_jsx("div", { style: style, className: twJoin("bbn-avatar", `bbn-avatar-${size}`, `bbn-avatar-${variant}`, className), children: url ? _jsx("img", { className: "bbn-avatar-img", src: url, alt: alt }) : children }));
|
|
6
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { Avatar } from "./Avatar";
|
|
3
|
-
declare const meta: Meta<typeof Avatar>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Image: Story;
|
|
7
|
-
export declare const Text: Story;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Avatar } from "./Avatar";
|
|
2
|
-
const meta = {
|
|
3
|
-
component: Avatar,
|
|
4
|
-
tags: ["autodocs"],
|
|
5
|
-
};
|
|
6
|
-
export default meta;
|
|
7
|
-
export const Image = {
|
|
8
|
-
args: {
|
|
9
|
-
alt: "Binance",
|
|
10
|
-
url: "/images/wallets/binance.webp",
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
export const Text = {
|
|
14
|
-
args: {
|
|
15
|
-
className: "bg-surface text-accent-contrast",
|
|
16
|
-
children: "DT",
|
|
17
|
-
},
|
|
18
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Children, cloneElement, isValidElement } from "react";
|
|
3
|
-
import { twJoin, twMerge } from "tailwind-merge";
|
|
4
|
-
import "./AvatarGroup.css";
|
|
5
|
-
import { Avatar } from "./Avatar";
|
|
6
|
-
export const AvatarGroup = ({ max = Infinity, className, children, avatarClassName, variant, ...restProps }) => {
|
|
7
|
-
const count = Children.count(children);
|
|
8
|
-
return (_jsxs("div", { className: twJoin("bbn-avatar-group", className), children: [Children.map(children, (child, index) => isValidElement(child) && index + 1 <= max
|
|
9
|
-
? cloneElement(child, {
|
|
10
|
-
...restProps,
|
|
11
|
-
className: twMerge(avatarClassName, child.props.className),
|
|
12
|
-
variant,
|
|
13
|
-
})
|
|
14
|
-
: null), count > max && (_jsxs(Avatar, { size: restProps.size, variant: variant, className: avatarClassName, children: ["+", count - max] }))] }));
|
|
15
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Avatar } from "./Avatar";
|
|
3
|
-
import { AvatarGroup } from "./AvatarGroup";
|
|
4
|
-
const meta = {
|
|
5
|
-
component: AvatarGroup,
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
export const Default = {
|
|
10
|
-
args: {
|
|
11
|
-
max: 3,
|
|
12
|
-
avatarClassName: "bg-primary-dark text-accent-contrast",
|
|
13
|
-
variant: "circular",
|
|
14
|
-
children: [
|
|
15
|
-
_jsx(Avatar, { alt: "Binance", url: "/images/wallets/binance.webp" }),
|
|
16
|
-
_jsx(Avatar, { className: "border bg-accent-contrast", alt: "Keystone", url: "/images/wallets/keystone.svg" }),
|
|
17
|
-
_jsx(Avatar, { children: "DT" }),
|
|
18
|
-
_jsx(Avatar, { children: "JK" }),
|
|
19
|
-
],
|
|
20
|
-
},
|
|
21
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Avatar } from "./Avatar";
|
|
3
|
-
import { Text } from "../Text";
|
|
4
|
-
export function ValidatorAvatar({ url, name, variant = "rounded", size = "large", ...props }) {
|
|
5
|
-
return (_jsx(Avatar, { ...props, url: url, alt: name, variant: variant, size: size, children: _jsx(Text, { as: "span", className: "inline-flex h-full w-full items-center justify-center bg-secondary-main text-xs text-accent-contrast", children: name?.charAt(0).toUpperCase() || "?" }) }));
|
|
6
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { ValidatorAvatar } from "./ValidatorAvatar";
|
|
3
|
-
declare const meta: Meta<typeof ValidatorAvatar>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Image: Story;
|
|
7
|
-
export declare const Initials: Story;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ValidatorAvatar } from "./ValidatorAvatar";
|
|
2
|
-
const meta = {
|
|
3
|
-
component: ValidatorAvatar,
|
|
4
|
-
tags: ["autodocs"],
|
|
5
|
-
};
|
|
6
|
-
export default meta;
|
|
7
|
-
export const Image = {
|
|
8
|
-
args: {
|
|
9
|
-
name: "Satoshi",
|
|
10
|
-
url: "/images/wallets/binance.webp",
|
|
11
|
-
size: "large",
|
|
12
|
-
variant: "rounded",
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
export const Initials = {
|
|
16
|
-
args: {
|
|
17
|
-
name: "Satoshi",
|
|
18
|
-
size: "large",
|
|
19
|
-
variant: "rounded",
|
|
20
|
-
},
|
|
21
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { twJoin } from "tailwind-merge";
|
|
3
|
-
import "./Badge.css";
|
|
4
|
-
export function Badge({ children, count = 0, max = 99, position = "bottom-right", color = "error", className, badgeClassName, contentClassName, }) {
|
|
5
|
-
const shouldShow = typeof count === "number" ? count > 0 : count != null;
|
|
6
|
-
const displayValue = typeof count === "number" && count > max ? `${max}+` : count;
|
|
7
|
-
const positionClass = `bbn-badge-${position}`;
|
|
8
|
-
const colorClass = `bbn-badge-${color}`;
|
|
9
|
-
return (_jsxs("div", { className: twJoin("bbn-badge", className), children: [children, shouldShow && (_jsx("span", { className: twJoin("bbn-badge-indicator", positionClass, colorClass, badgeClassName), children: _jsx("span", { className: twJoin("bbn-badge-content", contentClassName), children: displayValue }) }))] }));
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Badge } from "./Badge";
|
|
3
|
-
import { Avatar } from "../Avatar/Avatar";
|
|
4
|
-
const meta = {
|
|
5
|
-
component: Badge,
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: "centered",
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
export const WithWhiteBorder = {
|
|
13
|
-
render: () => (_jsx("div", { className: "rounded bg-gray-200 p-8", children: _jsx(Badge, { count: 1, position: "bottom-right", color: "secondary", badgeClassName: "border-2 border-white", children: _jsx(Avatar, { url: "/images/fps/lombard.jpeg", alt: "Lombard", size: "large" }) }) })),
|
|
14
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Badge";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { twJoin } from "tailwind-merge";
|
|
4
|
-
import "./Button.css";
|
|
5
|
-
export const Button = forwardRef(({ variant = "contained", size = "large", color = "primary", fluid = false, className, disabled, ...restProps }, ref) => {
|
|
6
|
-
return (_jsx("button", { ...restProps, disabled: disabled, ref: ref, className: twJoin("bbn-btn", `bbn-btn-${variant}`, `bbn-btn-${color}`, `bbn-btn-${size}`, fluid && "bbn-btn-fluid", className) }));
|
|
7
|
-
});
|
|
8
|
-
Button.displayName = "Button";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { twJoin } from "tailwind-merge";
|
|
4
|
-
import "./IconButton.css";
|
|
5
|
-
export const IconButton = forwardRef(({ variant = "outlined", size = "large", className, ...restProps }, ref) => {
|
|
6
|
-
return (_jsx("button", { ...restProps, ref: ref, className: twJoin("bbn-btn-icon", `bbn-btn-icon-${variant}`, `bbn-btn-icon-${size}`, className) }));
|
|
7
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { IconButton } from "./IconButton";
|
|
3
|
-
declare const meta: Meta<typeof IconButton>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const OutlinedSmall: Story;
|
|
8
|
-
export declare const OutlinedMedium: Story;
|
|
9
|
-
export declare const OutlinedLarge: Story;
|
|
10
|
-
export declare const ContainedSmall: Story;
|
|
11
|
-
export declare const ContainedMedium: Story;
|
|
12
|
-
export declare const ContainedLarge: Story;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { RiCloseLargeLine } from "react-icons/ri";
|
|
3
|
-
import { IconButton } from "./IconButton";
|
|
4
|
-
const meta = {
|
|
5
|
-
component: IconButton,
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
export const Default = {
|
|
10
|
-
args: {
|
|
11
|
-
children: _jsx(RiCloseLargeLine, { size: 24 }),
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
export const OutlinedSmall = {
|
|
15
|
-
args: {
|
|
16
|
-
size: "small",
|
|
17
|
-
variant: "outlined",
|
|
18
|
-
children: _jsx(RiCloseLargeLine, { size: 20 }),
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
export const OutlinedMedium = {
|
|
22
|
-
args: {
|
|
23
|
-
size: "medium",
|
|
24
|
-
variant: "outlined",
|
|
25
|
-
children: _jsx(RiCloseLargeLine, { size: 22 }),
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
export const OutlinedLarge = {
|
|
29
|
-
args: {
|
|
30
|
-
size: "large",
|
|
31
|
-
variant: "outlined",
|
|
32
|
-
children: _jsx(RiCloseLargeLine, { size: 24 }),
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
export const ContainedSmall = {
|
|
36
|
-
args: {
|
|
37
|
-
size: "small",
|
|
38
|
-
variant: "contained",
|
|
39
|
-
children: _jsx(RiCloseLargeLine, { size: 20 }),
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
export const ContainedMedium = {
|
|
43
|
-
args: {
|
|
44
|
-
size: "medium",
|
|
45
|
-
variant: "contained",
|
|
46
|
-
children: _jsx(RiCloseLargeLine, { size: 22 }),
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
export const ContainedLarge = {
|
|
50
|
-
args: {
|
|
51
|
-
size: "large",
|
|
52
|
-
variant: "contained",
|
|
53
|
-
children: _jsx(RiCloseLargeLine, { size: 24 }),
|
|
54
|
-
},
|
|
55
|
-
};
|