@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,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { Button } from "./Button";
|
|
4
|
-
import { twJoin } from "tailwind-merge";
|
|
5
|
-
export const WalletDisconnectButton = forwardRef(({ className, ...props }, ref) => {
|
|
6
|
-
return (_jsx(Button, { ...props, ref: ref, variant: "contained", className: twJoin("!bg-error-main text-white font-medium !text-sm hover:!bg-error-main/90 transition-colors", className) }));
|
|
7
|
-
});
|
|
8
|
-
WalletDisconnectButton.displayName = "WalletDisconnectButton";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { Card } from "./Card";
|
|
3
|
-
declare const meta: Meta<typeof Card>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const WithThemeColors: Story;
|
|
8
|
-
export declare const WithExplicitDarkClasses: Story;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Card } from "./Card";
|
|
3
|
-
const meta = {
|
|
4
|
-
component: Card,
|
|
5
|
-
tags: ["autodocs"],
|
|
6
|
-
parameters: {
|
|
7
|
-
docs: {
|
|
8
|
-
description: {
|
|
9
|
-
component: "A card component that automatically adapts to light and dark themes using the theme colors defined in the Tailwind configuration.",
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
export default meta;
|
|
15
|
-
export const Default = {
|
|
16
|
-
args: {
|
|
17
|
-
children: (_jsxs("div", { children: [_jsx("h3", { className: "text-primary-main font-semibold mb-2", children: "Card Title" }), _jsx("p", { className: "text-accent-primary", children: "This card automatically changes appearance when switching between light and dark modes using the theme colors." }), _jsx("div", { className: "mt-4 p-3 bg-primary-main text-primary-contrast rounded", children: "Theme-aware content" })] })),
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
export const WithThemeColors = {
|
|
21
|
-
args: {
|
|
22
|
-
children: (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("h4", { className: "text-accent-primary font-medium mb-2", children: "Primary Colors" }), _jsxs("div", { className: "flex gap-2 flex-wrap", children: [_jsx("div", { className: "w-8 h-8 bg-primary-main rounded" }), _jsx("div", { className: "w-8 h-8 bg-primary-light rounded" }), _jsx("div", { className: "w-8 h-8 bg-primary-dark rounded" })] })] }), _jsxs("div", { children: [_jsx("h4", { className: "text-accent-primary font-medium mb-2", children: "Secondary Colors" }), _jsxs("div", { className: "flex gap-2 flex-wrap", children: [_jsx("div", { className: "w-8 h-8 bg-secondary-main rounded" }), _jsx("div", { className: "w-8 h-8 bg-secondary-strokeLight rounded border" }), _jsx("div", { className: "w-8 h-8 bg-secondary-highlight rounded" })] })] }), _jsxs("div", { children: [_jsx("h4", { className: "text-accent-primary font-medium mb-2", children: "Surface Colors" }), _jsx("div", { className: "flex gap-2 flex-wrap", children: _jsx("div", { className: "w-16 h-8 bg-surface rounded border border-secondary-strokeLight" }) })] })] })),
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
export const WithExplicitDarkClasses = {
|
|
26
|
-
args: {
|
|
27
|
-
children: (_jsxs("div", { children: [_jsx("h3", { className: "text-primary-main dark:text-white font-semibold mb-2", children: "Explicit Dark Mode Classes" }), _jsx("p", { className: "text-accent-primary dark:text-accent-secondary", children: "This demonstrates using explicit dark: prefix classes alongside theme colors." }), _jsx("div", { className: "mt-4 p-3 bg-primary-main dark:bg-primary-dark text-primary-contrast rounded", children: "Content with explicit dark mode overrides" })] })),
|
|
28
|
-
},
|
|
29
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Card } from "./Card";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Chip";
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useId } from 'react';
|
|
3
|
-
import { useCopy } from '../../hooks/useCopy';
|
|
4
|
-
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
export const Copy = ({ children, value, className, onCopy, isCopied: externalIsCopied, copiedText: externalCopiedText, timeout = 2000, }) => {
|
|
6
|
-
const uniqueId = useId();
|
|
7
|
-
const hookOptions = {
|
|
8
|
-
copiedText: externalCopiedText,
|
|
9
|
-
timeout,
|
|
10
|
-
};
|
|
11
|
-
const { isCopied: hookIsCopied, copiedText: hookCopiedText, copyToClipboard, } = useCopy(hookOptions);
|
|
12
|
-
const isExternallyControlled = externalIsCopied !== undefined;
|
|
13
|
-
const isCopied = isExternallyControlled
|
|
14
|
-
? externalIsCopied
|
|
15
|
-
: hookIsCopied(uniqueId);
|
|
16
|
-
const copiedText = isExternallyControlled
|
|
17
|
-
? externalCopiedText || 'Copied ✓'
|
|
18
|
-
: hookCopiedText(uniqueId);
|
|
19
|
-
const handleClick = (e) => {
|
|
20
|
-
e.stopPropagation();
|
|
21
|
-
if (isExternallyControlled && onCopy) {
|
|
22
|
-
onCopy(value);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
copyToClipboard(uniqueId, value);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
return (_jsx("div", { className: twMerge('inline-flex items-center cursor-pointer hover:opacity-100 transition-opacity duration-200', className), onClick: handleClick, children: _jsxs("div", { className: 'relative', children: [_jsx("div", { className: twMerge('transition-opacity duration-300 ease-in-out', isCopied && 'opacity-0'), children: children }), isCopied && (_jsx("div", { className: twMerge('absolute inset-0 flex items-center transition-opacity duration-300 ease-in-out text-green-600', 'opacity-100'), children: copiedText }))] }) }));
|
|
29
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Copy } from './Copy';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { AiOutlinePlus } from "react-icons/ai";
|
|
3
|
-
import { twJoin } from "tailwind-merge";
|
|
4
|
-
export function CounterButton({ counter, max, onAdd, alwaysShowCounter = false }) {
|
|
5
|
-
const isClickable = counter < max;
|
|
6
|
-
const showsCounter = (0 < counter) || (alwaysShowCounter && counter === 0);
|
|
7
|
-
return (_jsxs("div", { className: twJoin("bg-primary-highlight flex overflow-hidden rounded-md border border-accent-primary w-fit", isClickable && "cursor-pointer", !showsCounter && !isClickable && "hidden", !showsCounter && "w-10"), onClick: isClickable ? onAdd : undefined, children: [isClickable && (_jsx("div", { className: "flex h-10 w-10 items-center justify-center", children: _jsx(AiOutlinePlus, { size: 20 }) })), showsCounter && (_jsxs("div", { className: twJoin("flex h-10 items-center px-2 text-sm sm:px-4 sm:text-base", isClickable && "border-l border-accent-primary"), children: [counter, "/", max] }))] }));
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { CounterButton } from "./CounterButton";
|
|
3
|
-
declare const meta: Meta<typeof CounterButton>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const WithCounter: Story;
|
|
8
|
-
export declare const AlmostAtMax: Story;
|
|
9
|
-
export declare const AtMaxCapacity: Story;
|
|
10
|
-
export declare const AlwaysShowCounter: Story;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { fn } from "@storybook/test";
|
|
2
|
-
import { CounterButton } from "./CounterButton";
|
|
3
|
-
const meta = {
|
|
4
|
-
component: CounterButton,
|
|
5
|
-
tags: ["autodocs"],
|
|
6
|
-
args: {
|
|
7
|
-
onAdd: fn(),
|
|
8
|
-
},
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
export const Default = {
|
|
12
|
-
args: {
|
|
13
|
-
counter: 0,
|
|
14
|
-
max: 5,
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
export const WithCounter = {
|
|
18
|
-
args: {
|
|
19
|
-
counter: 2,
|
|
20
|
-
max: 5,
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
export const AlmostAtMax = {
|
|
24
|
-
args: {
|
|
25
|
-
counter: 4,
|
|
26
|
-
max: 5,
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
export const AtMaxCapacity = {
|
|
30
|
-
args: {
|
|
31
|
-
counter: 1,
|
|
32
|
-
max: 1,
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
export const AlwaysShowCounter = {
|
|
36
|
-
args: {
|
|
37
|
-
counter: 0,
|
|
38
|
-
max: 3,
|
|
39
|
-
alwaysShowCounter: true,
|
|
40
|
-
},
|
|
41
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CounterButton } from "./CounterButton";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { twJoin } from "tailwind-merge";
|
|
3
|
-
import { Portal } from "@/components/Portal";
|
|
4
|
-
import { useModalManager } from "@/hooks/useModalManager";
|
|
5
|
-
import { Backdrop } from "./components/Backdrop";
|
|
6
|
-
export const Dialog = ({ children, open = false, className, onClose, hasBackdrop = true, backdropClassName, dialogClassName, ...restProps }) => {
|
|
7
|
-
const { mounted, unmount } = useModalManager({ open });
|
|
8
|
-
return (_jsxs(Portal, { mounted: mounted, children: [_jsx("div", { ...restProps, className: twJoin("bbn-dialog-wrapper", className), children: _jsx("div", { className: twJoin("bbn-dialog", open ? "animate-modal-in" : "animate-modal-out", dialogClassName), onAnimationEnd: unmount, children: children }) }), hasBackdrop && _jsx(Backdrop, { className: backdropClassName, open: open, onClick: onClose })] }));
|
|
9
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { Dialog } from "./index";
|
|
3
|
-
declare const meta: Meta<typeof Dialog>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const NoBackdrop: Story;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { Dialog, DialogFooter, DialogBody, DialogHeader } from "./index";
|
|
4
|
-
import { ScrollLocker } from "@/context/Dialog.context";
|
|
5
|
-
import { Button } from "@/components/Button";
|
|
6
|
-
import { Checkbox } from "@/components/Form";
|
|
7
|
-
import { Text } from "@/components/Text";
|
|
8
|
-
import { Heading } from "@/index";
|
|
9
|
-
import { WarningIcon } from "@/components/Icons";
|
|
10
|
-
const meta = {
|
|
11
|
-
component: Dialog,
|
|
12
|
-
tags: ["autodocs"],
|
|
13
|
-
};
|
|
14
|
-
export default meta;
|
|
15
|
-
export const Default = {
|
|
16
|
-
args: {},
|
|
17
|
-
render: (props) => {
|
|
18
|
-
const [visible, setVisibility] = useState(false);
|
|
19
|
-
return (_jsxs(ScrollLocker, { children: [_jsx(Button, { onClick: () => {
|
|
20
|
-
setVisibility(true);
|
|
21
|
-
}, children: "Push me softly" }), _jsxs(Dialog, { ...props, open: visible, onClose: () => {
|
|
22
|
-
setVisibility(false);
|
|
23
|
-
}, children: [_jsx(DialogHeader, { title: "Bitcoin Inscriptions", className: "text-accent-primary", onClose: () => {
|
|
24
|
-
setVisibility(false);
|
|
25
|
-
}, children: _jsx(Text, { children: "Subtitle" }) }), _jsxs(DialogBody, { className: "pb-8 pt-4 text-accent-primary", children: [_jsx(Text, { className: "mb-6", variant: "body1", children: "This staking interface attempts to detect bitcoin ordinals, NFTs, Ruins, and other inscriptions (\u201CInscriptions\u201D) within the Unspent Transaction Outputs (\u201CUTXOs\u201D) in your wallet. If you stake bitcoin with Inscriptions, those UTXOs may be spent on staking, unbonding, or withdrawal fees, which will cause you to lose those Inscriptions permanently. This interface will not detect all Inscriptions." }), _jsx(Text, { variant: "body1", children: "Chose one: (you can change this later)" }), _jsx(Checkbox, { checked: true, labelClassName: "mt-6", label: "Don't show again" })] }), _jsx(DialogFooter, { children: _jsx(Button, { fluid: true, variant: "outlined", onClick: () => {
|
|
26
|
-
setVisibility(false);
|
|
27
|
-
}, children: "Close" }) })] })] }));
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
export const NoBackdrop = {
|
|
31
|
-
args: {
|
|
32
|
-
hasBackdrop: false,
|
|
33
|
-
},
|
|
34
|
-
render: (props) => {
|
|
35
|
-
const [visible, setVisibility] = useState(false);
|
|
36
|
-
return (_jsxs(ScrollLocker, { children: [_jsx(Button, { onClick: () => {
|
|
37
|
-
setVisibility(true);
|
|
38
|
-
}, children: "Push me softly" }), _jsxs(Dialog, { ...props, open: visible, hasBackdrop: false, children: [_jsxs(DialogBody, { className: "flex flex-col items-center pb-8 pt-4 text-primary-dark", children: [_jsx(WarningIcon, { size: 88, variant: "default" }), _jsx(Heading, { variant: "h5", className: "mt-4", children: "Unbonding Error" }), _jsx(Text, { variant: "body1", className: "mt-2 text-center", children: "Your request to unbond failed due to: Failed to sign PSBT for the unbonding transaction" })] }), _jsx(DialogFooter, { children: _jsx(Button, { fluid: true, variant: "outlined", onClick: () => {
|
|
39
|
-
setVisibility(false);
|
|
40
|
-
}, children: "Done" }) })] })] }));
|
|
41
|
-
},
|
|
42
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { twJoin } from "tailwind-merge";
|
|
3
|
-
import { Portal } from "@/components/Portal";
|
|
4
|
-
import { useModalManager } from "@/hooks/useModalManager";
|
|
5
|
-
import { Backdrop } from "./components/Backdrop";
|
|
6
|
-
import { CloseIcon } from "@/components/Icons";
|
|
7
|
-
export const MobileDialog = ({ children, open = false, className, onClose, ...restProps }) => {
|
|
8
|
-
const { mounted, unmount } = useModalManager({ open });
|
|
9
|
-
return (_jsxs(Portal, { mounted: mounted, children: [_jsxs("div", { ...restProps, className: twJoin("bbn-dialog-mobile", open ? "animate-mobile-modal-in" : "animate-mobile-modal-out", className), onAnimationEnd: unmount, children: [onClose && (_jsx("button", { onClick: onClose, className: "absolute top-4 left-4 z-10 p-1.5 rounded-full bg-surface-tertiary hover:bg-surface-quaternary transition-colors", "aria-label": "Close", children: _jsx(CloseIcon, { size: 14, variant: "accent-primary" }) })), children] }), _jsx(Backdrop, { open: open, onClick: onClose })] }));
|
|
10
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { MobileDialog, DialogFooter, DialogBody, DialogHeader } from "./index";
|
|
4
|
-
import { ScrollLocker } from "@/context/Dialog.context";
|
|
5
|
-
import { Button } from "@/components/Button";
|
|
6
|
-
import { Checkbox } from "@/components/Form";
|
|
7
|
-
import { Text } from "@/components/Text";
|
|
8
|
-
const meta = {
|
|
9
|
-
component: MobileDialog,
|
|
10
|
-
tags: ["autodocs"],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
export const Default = {
|
|
14
|
-
args: {},
|
|
15
|
-
render: (props) => {
|
|
16
|
-
const [visible, setVisibility] = useState(false);
|
|
17
|
-
return (_jsxs(ScrollLocker, { children: [_jsx(Button, { onClick: () => {
|
|
18
|
-
setVisibility(true);
|
|
19
|
-
}, children: "Push me softly" }), _jsxs(MobileDialog, { ...props, open: visible, onClose: () => {
|
|
20
|
-
setVisibility(false);
|
|
21
|
-
}, children: [_jsx(DialogHeader, { title: "Bitcoin Inscriptions", className: "text-accent-primary", onClose: () => {
|
|
22
|
-
setVisibility(false);
|
|
23
|
-
}, children: _jsx(Text, { children: "Subtitle" }) }), _jsxs(DialogBody, { className: "pb-8 pt-4 text-accent-primary", children: [_jsx(Text, { className: "mb-6", variant: "body1", children: "This staking interface attempts to detect bitcoin ordinals, NFTs, Ruins, and other inscriptions (\u201CInscriptions\u201D) within the Unspent Transaction Outputs (\u201CUTXOs\u201D) in your wallet. If you stake bitcoin with Inscriptions, those UTXOs may be spent on staking, unbonding, or withdrawal fees, which will cause you to lose those Inscriptions permanently. This interface will not detect all Inscriptions." }), _jsx(Text, { variant: "body1", children: "Chose one: (you can change this later)" }), _jsx(Checkbox, { checked: true, labelClassName: "mt-6", label: "Don't show again" })] }), _jsx(DialogFooter, { children: _jsx(Button, { fluid: true, variant: "outlined", onClick: () => {
|
|
24
|
-
setVisibility(false);
|
|
25
|
-
}, children: "Close" }) })] })] }));
|
|
26
|
-
},
|
|
27
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { twJoin } from "tailwind-merge";
|
|
3
|
-
import "./Backdrop.css";
|
|
4
|
-
export const Backdrop = ({ open = false, ...props }) => (_jsx("div", { ...props, className: twJoin("bbn-backdrop", open ? "animate-backdrop-in" : "animate-backdrop-out", props.className) }));
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { twJoin } from "tailwind-merge";
|
|
3
|
-
import { Heading } from "@/components/Heading";
|
|
4
|
-
import { IconButton } from "@/components/Button";
|
|
5
|
-
export const DialogHeader = ({ className, children, title, onClose }) => (_jsxs("div", { className: twJoin("bbn-dialog-header", className), children: [_jsxs("div", { className: "bbn-dialog-title", children: [_jsx(Heading, { variant: "h5", children: title }), Boolean(onClose) && (_jsx(IconButton, { className: "shrink-0", onClick: onClose, children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z", fill: "currentColor" }) }) }))] }), children] }));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from '../Text';
|
|
3
|
-
import { trim } from '../../utils/trim';
|
|
4
|
-
import { twJoin } from 'tailwind-merge';
|
|
5
|
-
export const DisplayHash = ({ value, symbols = 8, size = 'body2', className, }) => {
|
|
6
|
-
if (!value) {
|
|
7
|
-
return null;
|
|
8
|
-
}
|
|
9
|
-
return (_jsx(Text, { variant: size, className: twJoin('text-accent-primary', className), children: _jsx("span", { children: trim(value, symbols) ?? value }) }));
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DisplayHash } from './DisplayHash';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from "../Text";
|
|
3
|
-
import { twMerge } from "tailwind-merge";
|
|
4
|
-
export function FeeItem({ title, children, className, hint }) {
|
|
5
|
-
return (_jsxs("div", { className: twMerge("flex flex-row items-center justify-between text-accent-primary", hint && "items-start", className), children: [_jsx(Text, { as: "div", variant: "body1", children: title }), hint ? (_jsxs("div", { className: "flex flex-col items-end", children: [_jsx(Text, { as: "div", className: "flex items-center gap-2", children: children }), _jsx(Text, { as: "div", variant: "body2", className: "text-accent-secondary", children: hint })] })) : (_jsx(Text, { as: "div", className: "flex items-center gap-2", children: children }))] }));
|
|
6
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { FeeItem } from "./FeeItem";
|
|
3
|
-
declare const meta: Meta<typeof FeeItem>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof FeeItem>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const WithHint: Story;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { FeeItem } from "./FeeItem";
|
|
2
|
-
const meta = {
|
|
3
|
-
component: FeeItem,
|
|
4
|
-
tags: ["autodocs"],
|
|
5
|
-
};
|
|
6
|
-
export default meta;
|
|
7
|
-
export const Default = {
|
|
8
|
-
args: {
|
|
9
|
-
title: "Network Fee",
|
|
10
|
-
children: "0.0001 BTC",
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
export const WithHint = {
|
|
14
|
-
args: {
|
|
15
|
-
title: "Network Fee",
|
|
16
|
-
children: "0.0001 BTC",
|
|
17
|
-
hint: "Fast",
|
|
18
|
-
},
|
|
19
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { Toggle } from "./components/Toggle";
|
|
4
|
-
const ICONS = {
|
|
5
|
-
false: (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M19 5V19H5V5H19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3Z", fill: "currentColor" }) })),
|
|
6
|
-
true: (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M19 3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.89 21 5 21H19C20.11 21 21 20.1 21 19V5C21 3.9 20.11 3 19 3ZM10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z", fill: "currentColor" }) })),
|
|
7
|
-
};
|
|
8
|
-
export const Checkbox = forwardRef(function Checkbox(props, ref) {
|
|
9
|
-
return _jsx(Toggle, { ref: ref, ...props, inputType: "checkbox", renderIcon: (checked) => ICONS[checked.toString()] });
|
|
10
|
-
});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { twJoin } from "tailwind-merge";
|
|
3
|
-
import "./FormControl.css";
|
|
4
|
-
export function FormControl({ children, label, hint, state = "default", className }) {
|
|
5
|
-
return (_jsxs("div", { className: twJoin("bbn-form-control", className), children: [label ? (_jsxs("label", { className: "bbn-form-control-label", children: [_jsx("div", { className: "bbn-form-control-title", children: label }), children] })) : (children), hint && _jsx("div", { className: twJoin("bbn-form-control-hint", `bbn-form-control-hint-${state}`), children: hint })] }));
|
|
6
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { FormControl } from "./FormControl";
|
|
3
|
-
declare const meta: Meta<typeof FormControl>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof FormControl>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const WithoutLabel: Story;
|
|
8
|
-
export declare const WithError: Story;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FormControl } from "./FormControl";
|
|
3
|
-
import { Input } from "./Input";
|
|
4
|
-
const meta = {
|
|
5
|
-
component: FormControl,
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
export const Default = {
|
|
10
|
-
args: {
|
|
11
|
-
label: "Label",
|
|
12
|
-
children: _jsx(Input, { defaultValue: "Hello" }),
|
|
13
|
-
hint: "Some random hint",
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
export const WithoutLabel = {
|
|
17
|
-
args: {
|
|
18
|
-
children: _jsx(Input, { defaultValue: "Hello Error", state: "error" }),
|
|
19
|
-
hint: "Some random error",
|
|
20
|
-
state: "error",
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
export const WithError = {
|
|
24
|
-
args: {
|
|
25
|
-
label: "Label",
|
|
26
|
-
children: _jsx(Input, { defaultValue: "Hello Error", state: "error" }),
|
|
27
|
-
hint: "Some random error",
|
|
28
|
-
state: "error",
|
|
29
|
-
},
|
|
30
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { twJoin } from "tailwind-merge";
|
|
4
|
-
import "./Input.css";
|
|
5
|
-
export const Input = forwardRef(({ className, prefix, suffix, disabled = false, state = "default", ...props }, ref) => {
|
|
6
|
-
return (_jsxs("div", { className: twJoin("bbn-input", `bbn-input-${state}`, disabled && "bbn-input-disabled", suffix && "bbn-input-has-suffix"), children: [prefix && _jsx("div", { className: "bbn-input-prefix", children: prefix }), _jsx("input", { ref: ref, className: twJoin("bbn-input-field", className), disabled: disabled, ...props }), suffix && _jsx("div", { className: "bbn-input-suffix", children: suffix })] }));
|
|
7
|
-
});
|
|
8
|
-
Input.displayName = "Input";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { Input } from "./Input";
|
|
3
|
-
declare const meta: Meta<typeof Input>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Input>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Disabled: Story;
|
|
8
|
-
export declare const WithSuffix: Story;
|
|
9
|
-
export declare const WithPrefix: Story;
|
|
10
|
-
export declare const LoadingWithInteraction: Story;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { RiSearchLine } from "react-icons/ri";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { Loader } from "@/components/Loader";
|
|
5
|
-
import { Input } from "./Input";
|
|
6
|
-
const meta = {
|
|
7
|
-
component: Input,
|
|
8
|
-
tags: ["autodocs"],
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
export const Default = {
|
|
12
|
-
args: {
|
|
13
|
-
placeholder: "Default input",
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
export const Disabled = {
|
|
17
|
-
args: {
|
|
18
|
-
placeholder: "Disabled input",
|
|
19
|
-
disabled: true,
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
export const WithSuffix = {
|
|
23
|
-
args: {
|
|
24
|
-
placeholder: "Search...",
|
|
25
|
-
suffix: _jsx(RiSearchLine, { size: 20 }),
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
export const WithPrefix = {
|
|
29
|
-
args: {
|
|
30
|
-
placeholder: "Amount",
|
|
31
|
-
prefix: "$",
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
export const LoadingWithInteraction = {
|
|
35
|
-
render: () => {
|
|
36
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
37
|
-
const handleSearch = () => {
|
|
38
|
-
setIsLoading(true);
|
|
39
|
-
setTimeout(() => setIsLoading(false), 2000);
|
|
40
|
-
};
|
|
41
|
-
return (_jsx(Input, { placeholder: "Click search to see loading", suffix: _jsx("button", { onClick: handleSearch, disabled: isLoading, className: "size-5", children: isLoading ? _jsx(Loader, { size: 20 }) : _jsx(RiSearchLine, { size: 20 }) }), disabled: isLoading }));
|
|
42
|
-
},
|
|
43
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { Toggle } from "./components/Toggle";
|
|
4
|
-
const ICONS = {
|
|
5
|
-
true: (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C14.76 17 17 14.76 17 12C17 9.24 14.76 7 12 7ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z", fill: "currentColor" }) })),
|
|
6
|
-
false: (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: _jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z", fill: "currentColor" }) })),
|
|
7
|
-
};
|
|
8
|
-
export const Radio = forwardRef(function Radio(props, ref) {
|
|
9
|
-
return _jsx(Toggle, { ref: ref, ...props, inputType: "radio", renderIcon: (selected) => ICONS[selected.toString()] });
|
|
10
|
-
});
|