@gearbox-protocol/permissionless-ui 1.27.0 → 2.0.0-next.1
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/cjs/components/accordion/accordion.cjs +1 -1
- package/dist/cjs/components/address/address.cjs +1 -1
- package/dist/cjs/components/alert-badge/alert-badge.cjs +1 -1
- package/dist/cjs/components/alert-dialog/alert-dialog.cjs +1 -1
- package/dist/cjs/components/alert-modal/alert-modal.cjs +1 -1
- package/dist/cjs/components/app-bar/app-bar.cjs +1 -1
- package/dist/cjs/components/apy/apy.cjs +1 -1
- package/dist/cjs/components/arc-loader/arc-loader.cjs +1 -1
- package/dist/cjs/components/asset-line/asset-line.cjs +1 -1
- package/dist/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
- package/dist/cjs/components/assets-ratio/assets-ratio.cjs +1 -1
- package/dist/cjs/components/auth/connect-required.cjs +1 -1
- package/dist/cjs/components/auth/signin-required.cjs +1 -1
- package/dist/cjs/components/avatar/avatar.cjs +1 -1
- package/dist/cjs/components/badge/badge.cjs +1 -1
- package/dist/cjs/components/base-link/base-link.cjs +1 -1
- package/dist/cjs/components/block-sync/block-sync.cjs +1 -1
- package/dist/cjs/components/breadcrumbs/breadcrumbs.cjs +1 -1
- package/dist/cjs/components/button-checkbox/button-checkbox.cjs +1 -1
- package/dist/cjs/components/buttons/back-button/back-button.cjs +1 -1
- package/dist/cjs/components/buttons/button/button.cjs +1 -1
- package/dist/cjs/components/buttons/copy-button/copy-button.cjs +1 -1
- package/dist/cjs/components/buttons/external-button/external-button.cjs +1 -1
- package/dist/cjs/components/buttons/navigation-button/navigation-button.cjs +1 -1
- package/dist/cjs/components/buttons/range-buttons/range-buttons.cjs +1 -1
- package/dist/cjs/components/card-grid/card-grid.cjs +1 -1
- package/dist/cjs/components/cards/card/card.cjs +1 -1
- package/dist/cjs/components/cards/expandable-call/expandable-call.cjs +1 -1
- package/dist/cjs/components/cards/expandable-card/expandable-card.cjs +1 -1
- package/dist/cjs/components/carousel/carousel.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox.cjs +1 -1
- package/dist/cjs/components/checkbox-item/checkbox-item.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-button/styled-button.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-dialog-container/styled-dialog-container.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/colored-text/colored-text.cjs +1 -1
- package/dist/cjs/components/complex-input/complex-input.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/confirm-menu/confirm-menu.cjs +1 -1
- package/dist/cjs/components/credit-session-status/credit-session-status.cjs +1 -1
- package/dist/cjs/components/currency-button/currency-button.cjs +1 -1
- package/dist/cjs/components/description/description.cjs +1 -1
- package/dist/cjs/components/detailed-apy/detailed-apy.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title-copy-button.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title-explorer-dropdown.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-container.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-content.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-description.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-footer.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-form.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-header.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-modal-container.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-overlay.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-title.cjs +1 -1
- package/dist/cjs/components/dropdown-label/dropdown-label.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-checkbox-item.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-content.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-item.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-label.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-radio-item.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-separator.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-shortcut.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-sub-content.cjs +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu-sub-trigger.cjs +1 -1
- package/dist/cjs/components/edit-input/edit-input.cjs +1 -1
- package/dist/cjs/components/error-message/error-line-message.cjs +1 -1
- package/dist/cjs/components/error-message/error-message.cjs +1 -1
- package/dist/cjs/components/error-view/error-view.cjs +1 -1
- package/dist/cjs/components/explorer-links-dropdown/explorer-links-dropdown.cjs +1 -1
- package/dist/cjs/components/fadeout-loading/fadeout-loading.cjs +1 -1
- package/dist/cjs/components/filter/filter-block.cjs +1 -1
- package/dist/cjs/components/filter/filter-checkbox-item.cjs +1 -1
- package/dist/cjs/components/filter/filter-chip.cjs +1 -1
- package/dist/cjs/components/filter/filter-chips.cjs +1 -1
- package/dist/cjs/components/filter/filter-dropdown-item.cjs +1 -1
- package/dist/cjs/components/filter/filter-group.cjs +1 -1
- package/dist/cjs/components/filter/filter-label.cjs +1 -1
- package/dist/cjs/components/filter/filter-modal-item.cjs +1 -1
- package/dist/cjs/components/filter/filter-modal.cjs +1 -1
- package/dist/cjs/components/filter/filter-radio-item.cjs +1 -1
- package/dist/cjs/components/filter/filter-separator.cjs +1 -1
- package/dist/cjs/components/formatted-number/formatted-number.cjs +1 -1
- package/dist/cjs/components/grid-td-cell/grid-td-cell.cjs +1 -1
- package/dist/cjs/components/head-cell/head-cell.cjs +1 -1
- package/dist/cjs/components/health-factor/health-factor.cjs +1 -1
- package/dist/cjs/components/help-sections/help-sections.cjs +1 -1
- package/dist/cjs/components/help-tip/help-tip.cjs +1 -1
- package/dist/cjs/components/horizontal-indicator/horizontal-indicator.cjs +1 -1
- package/dist/cjs/components/icon-button/icon-button.cjs +1 -1
- package/dist/cjs/components/icons/fa-icon.cjs +1 -1
- package/dist/cjs/components/input/input.cjs +1 -1
- package/dist/cjs/components/label/label.cjs +1 -1
- package/dist/cjs/components/layout/block/block.cjs +1 -1
- package/dist/cjs/components/link/link.cjs +1 -1
- package/dist/cjs/components/liquidation/liquidation-assets-table/liquidation-assets-table.cjs +1 -1
- package/dist/cjs/components/liquidation/liquidation-graph-tip/liquidation-graph-tip.cjs +1 -1
- package/dist/cjs/components/liquidation-price/liquidation-price.cjs +1 -1
- package/dist/cjs/components/loader/loader.cjs +1 -1
- package/dist/cjs/components/loader-guard/loader-guard.cjs +1 -1
- package/dist/cjs/components/loading-bar/loading-bar.cjs +1 -1
- package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
- package/dist/cjs/components/modal/modal.cjs +1 -1
- package/dist/cjs/components/navbar/navbar-with-overflow.cjs +1 -1
- package/dist/cjs/components/navbar/navbar.cjs +1 -1
- package/dist/cjs/components/navbar-logo/navbar-logo.cjs +1 -1
- package/dist/cjs/components/navitem/navitem.cjs +1 -1
- package/dist/cjs/components/not-found/not-found.cjs +1 -1
- package/dist/cjs/components/options-list/options-list.cjs +1 -1
- package/dist/cjs/components/overflow/overflow.cjs +1 -1
- package/dist/cjs/components/overflow-container/overflow-container.cjs +1 -1
- package/dist/cjs/components/page-title/page-title.cjs +1 -1
- package/dist/cjs/components/percent-indicator/percent-indicator.cjs +1 -1
- package/dist/cjs/components/pool-apy-tooltip/pool-apy-tooltip.cjs +1 -1
- package/dist/cjs/components/pool-indicator-icon/pool-indicator-icon.cjs +1 -1
- package/dist/cjs/components/pool-points-indicator/pool-points-indicator.cjs +1 -1
- package/dist/cjs/components/progress/progress.cjs +1 -1
- package/dist/cjs/components/progress-bar/progress-bar.cjs +1 -1
- package/dist/cjs/components/progress-circle/progress-circle.cjs +1 -1
- package/dist/cjs/components/radio-group/radio-group.cjs +1 -1
- package/dist/cjs/components/rounded-image/rounded-image.cjs +1 -1
- package/dist/cjs/components/row/row.cjs +1 -1
- package/dist/cjs/components/search-bar/search-bar.cjs +1 -1
- package/dist/cjs/components/search-line/search-line.cjs +1 -1
- package/dist/cjs/components/segmented-control/segmented-control.cjs +1 -1
- package/dist/cjs/components/select/select.cjs +1 -1
- package/dist/cjs/components/separate-line/separate-line.cjs +1 -1
- package/dist/cjs/components/separator/separator.cjs +1 -1
- package/dist/cjs/components/short-string/short-string.cjs +1 -1
- package/dist/cjs/components/signatures/confirmation-item.cjs +1 -1
- package/dist/cjs/components/simple-accordion/simple-accordion.cjs +1 -1
- package/dist/cjs/components/simple-dropdown/simple-dropdown-menu-item.cjs +1 -1
- package/dist/cjs/components/simple-dropdown/simple-dropdown.cjs +1 -1
- package/dist/cjs/components/skeleton/skeleton-stack.cjs +1 -1
- package/dist/cjs/components/skeleton/skeleton.cjs +1 -1
- package/dist/cjs/components/slider/slider.cjs +1 -1
- package/dist/cjs/components/slider-token/slider-token.cjs +1 -1
- package/dist/cjs/components/smart-number-input/balance-indicator.cjs +1 -1
- package/dist/cjs/components/smart-number-input/smart-number-input.cjs +1 -1
- package/dist/cjs/components/spinner/spinner.cjs +1 -1
- package/dist/cjs/components/spinner-loader/spinner-loader.cjs +1 -1
- package/dist/cjs/components/split-list/split-list.cjs +1 -1
- package/dist/cjs/components/stat-badge/stat-badge.cjs +1 -1
- package/dist/cjs/components/status-dot/status-dot.cjs +1 -1
- package/dist/cjs/components/status-elements/status-elements.cjs +1 -1
- package/dist/cjs/components/status-triangle/status-triangle.cjs +1 -1
- package/dist/cjs/components/stepper/stepper.cjs +1 -1
- package/dist/cjs/components/styled-dropdown/styled-dropdown.cjs +1 -1
- package/dist/cjs/components/switch/switch.cjs +1 -1
- package/dist/cjs/components/tab-control/tab-control.cjs +1 -1
- package/dist/cjs/components/table/edit-button.cjs +1 -1
- package/dist/cjs/components/table/editable-grid-table.cjs +1 -1
- package/dist/cjs/components/table/editable-table.cjs +1 -1
- package/dist/cjs/components/table/grid-loading-line.cjs +1 -1
- package/dist/cjs/components/table/table-sm.cjs +1 -1
- package/dist/cjs/components/table/table.cjs +1 -1
- package/dist/cjs/components/tabs/tabs.cjs +1 -1
- package/dist/cjs/components/text-button/text-button.cjs +1 -1
- package/dist/cjs/components/textarea/textarea.cjs +1 -1
- package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
- package/dist/cjs/components/tip-card/tip-card.cjs +1 -1
- package/dist/cjs/components/toggle/toggle.cjs +1 -1
- package/dist/cjs/components/token-symbol/token-symbol.cjs +1 -1
- package/dist/cjs/components/token-template/token-template.cjs +1 -1
- package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
- package/dist/cjs/components/tooltip/simple-tooltip.cjs +1 -1
- package/dist/cjs/components/tooltip/tooltip.cjs +1 -1
- package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
- package/dist/cjs/components/typography/typography.cjs +1 -1
- package/dist/cjs/components/vertical-indicator/vertical-indicator.cjs +1 -1
- package/dist/cjs/components/vertical-list/vertical-list.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/components/with-filter-button/with-filter-button.cjs +1 -1
- package/dist/cjs/components/with-title/with-title.cjs +1 -1
- package/dist/cjs/hooks/use-debounce-call.cjs +1 -1
- package/dist/cjs/hooks/use-hf.cjs +1 -1
- package/dist/cjs/hooks/use-liquidation/index.cjs +1 -1
- package/dist/cjs/types/common.cjs +1 -0
- package/dist/cjs/utils/format-money.cjs +1 -1
- package/dist/cjs/utils/templates.cjs +1 -1
- package/dist/esm/components/accordion/accordion.js +8 -7
- package/dist/esm/components/address/address.js +3 -2
- package/dist/esm/components/alert-badge/alert-badge.js +1 -0
- package/dist/esm/components/alert-dialog/alert-dialog.js +8 -7
- package/dist/esm/components/alert-modal/alert-modal.js +1 -0
- package/dist/esm/components/app-bar/app-bar.js +1 -0
- package/dist/esm/components/apy/apy.js +10 -9
- package/dist/esm/components/arc-loader/arc-loader.js +1 -0
- package/dist/esm/components/asset-line/asset-line.js +10 -9
- package/dist/esm/components/assets-list-cell/assets-list-cell.js +3 -2
- package/dist/esm/components/assets-ratio/assets-ratio.js +12 -11
- package/dist/esm/components/auth/connect-required.js +3 -2
- package/dist/esm/components/auth/signin-required.js +12 -11
- package/dist/esm/components/avatar/avatar.js +10 -9
- package/dist/esm/components/badge/badge.js +7 -6
- package/dist/esm/components/base-link/base-link.js +8 -7
- package/dist/esm/components/block-sync/block-sync.js +3 -2
- package/dist/esm/components/breadcrumbs/breadcrumbs.js +3 -2
- package/dist/esm/components/button-checkbox/button-checkbox.js +16 -13
- package/dist/esm/components/buttons/back-button/back-button.js +7 -6
- package/dist/esm/components/buttons/button/button.js +5 -4
- package/dist/esm/components/buttons/copy-button/copy-button.js +8 -7
- package/dist/esm/components/buttons/external-button/external-button.js +8 -7
- package/dist/esm/components/buttons/navigation-button/navigation-button.js +4 -3
- package/dist/esm/components/buttons/range-buttons/range-buttons.js +3 -2
- package/dist/esm/components/card-grid/card-grid.js +5 -4
- package/dist/esm/components/cards/card/card.js +1 -0
- package/dist/esm/components/cards/expandable-call/expandable-call.js +20 -19
- package/dist/esm/components/cards/expandable-card/expandable-card.js +12 -11
- package/dist/esm/components/carousel/carousel.js +15 -14
- package/dist/esm/components/checkbox/checkbox-labeled.js +1 -0
- package/dist/esm/components/checkbox/checkbox.js +1 -0
- package/dist/esm/components/checkbox-item/checkbox-item.js +10 -9
- package/dist/esm/components/client-adapters/styled-button/styled-button.js +5 -4
- package/dist/esm/components/client-adapters/styled-dialog-container/styled-dialog-container.js +1 -0
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +1 -0
- package/dist/esm/components/colored-text/colored-text.js +1 -0
- package/dist/esm/components/complex-input/complex-input.js +3 -2
- package/dist/esm/components/compound-apy/compound-apy.js +3 -2
- package/dist/esm/components/confirm-menu/confirm-menu.js +4 -3
- package/dist/esm/components/credit-session-status/credit-session-status.js +3 -2
- package/dist/esm/components/currency-button/currency-button.js +10 -9
- package/dist/esm/components/description/description.js +1 -0
- package/dist/esm/components/detailed-apy/detailed-apy.js +9 -8
- package/dist/esm/components/detailed-page-title/detailed-page-title-copy-button.js +1 -0
- package/dist/esm/components/detailed-page-title/detailed-page-title-explorer-dropdown.js +1 -0
- package/dist/esm/components/detailed-page-title/detailed-page-title.js +1 -0
- package/dist/esm/components/dialog/dialog-container.js +7 -6
- package/dist/esm/components/dialog/dialog-content.js +1 -0
- package/dist/esm/components/dialog/dialog-description.js +5 -4
- package/dist/esm/components/dialog/dialog-footer.js +1 -0
- package/dist/esm/components/dialog/dialog-form.js +12 -11
- package/dist/esm/components/dialog/dialog-header.js +5 -4
- package/dist/esm/components/dialog/dialog-modal-container.js +1 -0
- package/dist/esm/components/dialog/dialog-overlay.js +4 -3
- package/dist/esm/components/dialog/dialog-title.js +1 -0
- package/dist/esm/components/dropdown-label/dropdown-label.js +7 -6
- package/dist/esm/components/dropdown-menu/dropdown-menu-checkbox-item.js +1 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu-content.js +5 -4
- package/dist/esm/components/dropdown-menu/dropdown-menu-item.js +4 -3
- package/dist/esm/components/dropdown-menu/dropdown-menu-label.js +4 -3
- package/dist/esm/components/dropdown-menu/dropdown-menu-radio-item.js +4 -3
- package/dist/esm/components/dropdown-menu/dropdown-menu-separator.js +8 -7
- package/dist/esm/components/dropdown-menu/dropdown-menu-shortcut.js +1 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu-sub-content.js +1 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu-sub-trigger.js +8 -7
- package/dist/esm/components/edit-input/edit-input.js +7 -6
- package/dist/esm/components/error-message/error-line-message.js +6 -5
- package/dist/esm/components/error-message/error-message.js +3 -2
- package/dist/esm/components/error-view/error-view.js +3 -2
- package/dist/esm/components/explorer-links-dropdown/explorer-links-dropdown.js +3 -2
- package/dist/esm/components/fadeout-loading/fadeout-loading.js +1 -0
- package/dist/esm/components/filter/filter-block.js +1 -0
- package/dist/esm/components/filter/filter-checkbox-item.js +4 -3
- package/dist/esm/components/filter/filter-chip.js +9 -8
- package/dist/esm/components/filter/filter-chips.js +6 -5
- package/dist/esm/components/filter/filter-dropdown-item.js +12 -11
- package/dist/esm/components/filter/filter-group.js +1 -0
- package/dist/esm/components/filter/filter-label.js +1 -0
- package/dist/esm/components/filter/filter-modal-item.js +5 -4
- package/dist/esm/components/filter/filter-modal.js +3 -2
- package/dist/esm/components/filter/filter-radio-item.js +5 -4
- package/dist/esm/components/filter/filter-separator.js +4 -3
- package/dist/esm/components/formatted-number/formatted-number.js +3 -2
- package/dist/esm/components/grid-td-cell/grid-td-cell.js +3 -2
- package/dist/esm/components/head-cell/head-cell.js +13 -12
- package/dist/esm/components/health-factor/health-factor.js +7 -6
- package/dist/esm/components/help-sections/help-sections.js +8 -7
- package/dist/esm/components/help-tip/help-tip.js +5 -4
- package/dist/esm/components/horizontal-indicator/horizontal-indicator.js +3 -2
- package/dist/esm/components/icon-button/icon-button.js +7 -6
- package/dist/esm/components/icons/fa-icon.js +3 -2
- package/dist/esm/components/input/input.js +3 -2
- package/dist/esm/components/label/label.js +1 -0
- package/dist/esm/components/layout/block/block.js +3 -2
- package/dist/esm/components/link/link.js +14 -13
- package/dist/esm/components/liquidation/liquidation-assets-table/liquidation-assets-table.js +6 -5
- package/dist/esm/components/liquidation/liquidation-graph-tip/liquidation-graph-tip.js +18 -17
- package/dist/esm/components/liquidation-price/liquidation-price.js +3 -2
- package/dist/esm/components/loader/loader.js +1 -0
- package/dist/esm/components/loader-guard/loader-guard.js +3 -2
- package/dist/esm/components/loading-bar/loading-bar.js +1 -0
- package/dist/esm/components/markdown-viewer/markdown-viewer.js +3 -2
- package/dist/esm/components/modal/modal.js +8 -7
- package/dist/esm/components/navbar/navbar-with-overflow.js +3 -2
- package/dist/esm/components/navbar/navbar.js +22 -21
- package/dist/esm/components/navbar-logo/navbar-logo.js +3 -2
- package/dist/esm/components/navitem/navitem.js +1 -0
- package/dist/esm/components/not-found/not-found.js +3 -2
- package/dist/esm/components/options-list/options-list.js +5 -4
- package/dist/esm/components/overflow/overflow.js +9 -8
- package/dist/esm/components/overflow-container/overflow-container.js +3 -2
- package/dist/esm/components/page-title/page-title.js +6 -5
- package/dist/esm/components/percent-indicator/percent-indicator.js +3 -2
- package/dist/esm/components/pool-apy-tooltip/pool-apy-tooltip.js +3 -2
- package/dist/esm/components/pool-indicator-icon/pool-indicator-icon.js +6 -5
- package/dist/esm/components/pool-points-indicator/pool-points-indicator.js +3 -2
- package/dist/esm/components/progress/progress.js +6 -5
- package/dist/esm/components/progress-bar/progress-bar.js +17 -16
- package/dist/esm/components/progress-circle/progress-circle.js +11 -10
- package/dist/esm/components/radio-group/radio-group.js +1 -0
- package/dist/esm/components/rounded-image/rounded-image.js +1 -0
- package/dist/esm/components/row/row.js +3 -2
- package/dist/esm/components/search-bar/search-bar.js +5 -4
- package/dist/esm/components/search-line/search-line.js +1 -0
- package/dist/esm/components/segmented-control/segmented-control.js +9 -8
- package/dist/esm/components/select/select.js +4 -3
- package/dist/esm/components/separate-line/separate-line.js +1 -0
- package/dist/esm/components/separator/separator.js +4 -3
- package/dist/esm/components/short-string/short-string.js +4 -3
- package/dist/esm/components/signatures/confirmation-item.js +3 -2
- package/dist/esm/components/simple-accordion/simple-accordion.js +1 -0
- package/dist/esm/components/simple-dropdown/simple-dropdown-menu-item.js +1 -0
- package/dist/esm/components/simple-dropdown/simple-dropdown.js +5 -4
- package/dist/esm/components/skeleton/skeleton-stack.js +7 -6
- package/dist/esm/components/skeleton/skeleton.js +3 -2
- package/dist/esm/components/slider/slider.js +1 -0
- package/dist/esm/components/slider-token/slider-token.js +13 -12
- package/dist/esm/components/smart-number-input/balance-indicator.js +14 -13
- package/dist/esm/components/smart-number-input/smart-number-input.js +1 -0
- package/dist/esm/components/spinner/spinner.js +1 -0
- package/dist/esm/components/spinner-loader/spinner-loader.js +8 -7
- package/dist/esm/components/split-list/split-list.js +5 -4
- package/dist/esm/components/stat-badge/stat-badge.js +10 -9
- package/dist/esm/components/status-dot/status-dot.js +4 -3
- package/dist/esm/components/status-elements/status-elements.js +7 -6
- package/dist/esm/components/status-triangle/status-triangle.js +6 -5
- package/dist/esm/components/stepper/stepper.js +21 -20
- package/dist/esm/components/styled-dropdown/styled-dropdown.js +3 -2
- package/dist/esm/components/switch/switch.js +8 -7
- package/dist/esm/components/tab-control/tab-control.js +37 -36
- package/dist/esm/components/table/edit-button.js +3 -2
- package/dist/esm/components/table/editable-grid-table.js +36 -35
- package/dist/esm/components/table/editable-table.js +17 -16
- package/dist/esm/components/table/grid-loading-line.js +14 -13
- package/dist/esm/components/table/table-sm.js +21 -20
- package/dist/esm/components/table/table.js +1 -0
- package/dist/esm/components/tabs/tabs.js +7 -6
- package/dist/esm/components/text-button/text-button.js +10 -9
- package/dist/esm/components/textarea/textarea.js +1 -0
- package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +1 -0
- package/dist/esm/components/tip-card/tip-card.js +5 -4
- package/dist/esm/components/toggle/toggle.js +1 -0
- package/dist/esm/components/token-symbol/token-symbol.js +5 -4
- package/dist/esm/components/token-template/token-template.js +6 -5
- package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +3 -2
- package/dist/esm/components/tooltip/simple-tooltip.js +1 -0
- package/dist/esm/components/tooltip/tooltip.js +7 -6
- package/dist/esm/components/trading-view/trading-view.js +3 -2
- package/dist/esm/components/typography/typography.js +5 -4
- package/dist/esm/components/vertical-indicator/vertical-indicator.js +1 -0
- package/dist/esm/components/vertical-list/vertical-list.js +9 -8
- package/dist/esm/components/with-copy/with-copy.js +3 -2
- package/dist/esm/components/with-filter-button/with-filter-button.js +1 -0
- package/dist/esm/components/with-title/with-title.js +8 -7
- package/dist/esm/hooks/use-debounce-call.js +6 -5
- package/dist/esm/hooks/use-hf.js +22 -22
- package/dist/esm/hooks/use-liquidation/index.js +66 -65
- package/dist/esm/types/common.js +1 -0
- package/dist/esm/utils/format-money.js +18 -17
- package/dist/esm/utils/templates.js +21 -20
- package/dist/types/components/asset-line/asset-line.d.ts +4 -3
- package/dist/types/components/compound-apy/compound-apy.d.ts +3 -4
- package/dist/types/components/credit-session-status/credit-session-status.d.ts +1 -1
- package/dist/types/components/currency-button/currency-button.d.ts +2 -2
- package/dist/types/components/detailed-apy/detailed-apy.d.ts +5 -5
- package/dist/types/components/detailed-page-title/detailed-page-title.d.ts +2 -2
- package/dist/types/components/liquidation/liquidation-assets-table/liquidation-assets-table.d.ts +2 -2
- package/dist/types/components/liquidation/liquidation-graph/liquidation-graph.d.ts +5 -4
- package/dist/types/components/liquidation/liquidation-graph-tip/liquidation-graph-tip.d.ts +2 -2
- package/dist/types/components/pool-apy-tooltip/pool-apy-tooltip.d.ts +3 -3
- package/dist/types/components/slider-token/slider-token.d.ts +2 -2
- package/dist/types/components/smart-number-input/balance-indicator.d.ts +2 -2
- package/dist/types/components/smart-number-input/smart-number-input.d.ts +2 -10
- package/dist/types/components/token-symbol/token-symbol.d.ts +2 -6
- package/dist/types/components/token-template/token-template.d.ts +2 -2
- package/dist/types/components/tokens-list-cell/tokens-list-cell.d.ts +2 -2
- package/dist/types/hooks/use-hf.d.ts +4 -3
- package/dist/types/hooks/use-liquidation/index.d.ts +9 -8
- package/dist/types/hooks/use-liquidation/types.d.ts +2 -2
- package/dist/types/hooks/use-liquidation/utils.d.ts +11 -10
- package/dist/types/types/common.d.ts +23 -0
- package/dist/types/utils/interface.d.ts +0 -9
- package/dist/types/utils/search-in-token.d.ts +4 -4
- package/dist/types/utils/templates.d.ts +8 -8
- package/package.json +7 -7
package/dist/esm/hooks/use-hf.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useMemo as
|
|
3
|
-
function
|
|
4
|
-
assets:
|
|
1
|
+
import { calcHealthFactor as p } from "@gearbox-protocol/sdk/common-utils";
|
|
2
|
+
import { useMemo as E } from "react";
|
|
3
|
+
function H({
|
|
4
|
+
assets: t,
|
|
5
5
|
quotas: c,
|
|
6
|
-
prices:
|
|
7
|
-
liquidationThresholds:
|
|
8
|
-
underlyingToken:
|
|
9
|
-
debt:
|
|
6
|
+
prices: f,
|
|
7
|
+
liquidationThresholds: n,
|
|
8
|
+
underlyingToken: u,
|
|
9
|
+
debt: e,
|
|
10
10
|
quotasInfo: o,
|
|
11
11
|
allowZeroDebt: m = !1,
|
|
12
|
-
tokensList:
|
|
12
|
+
tokensList: l
|
|
13
13
|
}) {
|
|
14
|
-
return { hf:
|
|
14
|
+
return { hf: E(() => {
|
|
15
15
|
try {
|
|
16
|
-
return
|
|
17
|
-
assets:
|
|
16
|
+
return e === 0n && !m ? 0 : p({
|
|
17
|
+
assets: t,
|
|
18
18
|
quotas: c,
|
|
19
|
-
prices:
|
|
20
|
-
liquidationThresholds:
|
|
21
|
-
underlyingToken:
|
|
22
|
-
debt:
|
|
19
|
+
prices: f,
|
|
20
|
+
liquidationThresholds: n,
|
|
21
|
+
underlyingToken: u,
|
|
22
|
+
debt: e,
|
|
23
23
|
quotasInfo: o,
|
|
24
|
-
tokensList:
|
|
24
|
+
tokensList: l
|
|
25
25
|
});
|
|
26
26
|
} catch (r) {
|
|
27
27
|
return typeof r == "object" && r !== null && "reason" in r && r.reason === "overflow" ? Number.MAX_SAFE_INTEGER : 0;
|
|
28
28
|
}
|
|
29
29
|
}, [
|
|
30
|
-
|
|
30
|
+
t,
|
|
31
31
|
c,
|
|
32
|
+
f,
|
|
32
33
|
n,
|
|
33
34
|
u,
|
|
34
|
-
|
|
35
|
-
t,
|
|
35
|
+
e,
|
|
36
36
|
o,
|
|
37
37
|
m,
|
|
38
|
-
|
|
38
|
+
l
|
|
39
39
|
]) };
|
|
40
40
|
}
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
H as useHF
|
|
43
43
|
};
|
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
import { toBN as v, PRICE_DECIMALS_POW as R
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { toBN as v, PRICE_DECIMALS_POW as R } from "@gearbox-protocol/sdk";
|
|
2
|
+
import { calcHealthFactor as U } from "@gearbox-protocol/sdk/common-utils";
|
|
3
|
+
import { useMemo as G, useState as F, useCallback as Y } from "react";
|
|
4
|
+
import { useFixedAssets as g, usePriceInNumber as S, useAxis as X, DEFAULT_AXIS_MAX as x } from "./utils.js";
|
|
5
|
+
import { CELL_BAD as Z, CELL_CURRENT as $, CELL_GOOD as b, CELL_HOVERED as j, CELL_LIQUIDATION as M, CELL_OK as tt, DEFAULT_AXIS_MIN as et, formatAxisLabel as rt, formatAxisTipLabel as it, formatAxisTipPrice as st, getCellClass as nt, isPointInCell as ct, useIsAxisInRelativeUnits as ot, useLiquidationGraphActivePrice as at, useLiquidationGraphCurrentActiveValue as ut, useWithLiquidationGraphActivePrices as pt } from "./utils.js";
|
|
6
|
+
const L = 35;
|
|
7
|
+
function K({
|
|
7
8
|
xMin: t,
|
|
8
9
|
xMax: e,
|
|
9
10
|
yMin: r,
|
|
10
11
|
yMax: c,
|
|
11
12
|
xLabel: i,
|
|
12
|
-
yLabel:
|
|
13
|
-
assets:
|
|
13
|
+
yLabel: s,
|
|
14
|
+
assets: n,
|
|
14
15
|
quotas: o,
|
|
15
16
|
prices: u,
|
|
16
17
|
liquidationThresholds: a,
|
|
17
|
-
quotasInfo:
|
|
18
|
-
underlyingTokenAddress:
|
|
19
|
-
debt:
|
|
18
|
+
quotasInfo: p,
|
|
19
|
+
underlyingTokenAddress: m,
|
|
20
|
+
debt: A,
|
|
20
21
|
tokensList: l
|
|
21
22
|
}) {
|
|
22
23
|
return G(() => {
|
|
23
|
-
const N = e - t, T = c - r,
|
|
24
|
-
return
|
|
25
|
-
const
|
|
26
|
-
return i && (
|
|
27
|
-
String((
|
|
24
|
+
const N = e - t, T = c - r, P = N / L, d = T / L, f = Array.from(Array(L)), E = { ...u };
|
|
25
|
+
return f.flatMap((B, C) => {
|
|
26
|
+
const _ = t + C * P, I = t + (C + 1) * P;
|
|
27
|
+
return i && (E[i.address] = v(
|
|
28
|
+
String((_ + I) / 2),
|
|
28
29
|
R
|
|
29
|
-
)),
|
|
30
|
-
const O = r + D *
|
|
31
|
-
return
|
|
30
|
+
)), f.map((H, D) => {
|
|
31
|
+
const O = r + D * d, h = r + (D + 1) * d;
|
|
32
|
+
return s && (E[s.address] = v(
|
|
32
33
|
String((O + h) / 2),
|
|
33
34
|
R
|
|
34
35
|
)), {
|
|
35
|
-
x:
|
|
36
|
+
x: _,
|
|
36
37
|
xEnd: I,
|
|
37
38
|
y: O,
|
|
38
39
|
yEnd: h,
|
|
39
|
-
value: U
|
|
40
|
-
assets:
|
|
40
|
+
value: U({
|
|
41
|
+
assets: n,
|
|
41
42
|
quotas: o,
|
|
42
|
-
prices:
|
|
43
|
+
prices: E,
|
|
43
44
|
liquidationThresholds: a,
|
|
44
|
-
underlyingToken:
|
|
45
|
-
debt:
|
|
46
|
-
quotasInfo:
|
|
45
|
+
underlyingToken: m,
|
|
46
|
+
debt: A,
|
|
47
|
+
quotasInfo: p,
|
|
47
48
|
tokensList: l
|
|
48
49
|
})
|
|
49
50
|
};
|
|
@@ -55,83 +56,83 @@ function W({
|
|
|
55
56
|
r,
|
|
56
57
|
c,
|
|
57
58
|
i,
|
|
58
|
-
n,
|
|
59
59
|
s,
|
|
60
|
+
n,
|
|
60
61
|
o,
|
|
61
62
|
u,
|
|
62
63
|
a,
|
|
63
|
-
|
|
64
|
-
E,
|
|
64
|
+
m,
|
|
65
65
|
A,
|
|
66
|
+
p,
|
|
66
67
|
l
|
|
67
68
|
]);
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
-
const [e, r] =
|
|
70
|
+
function Q({ prices: t }) {
|
|
71
|
+
const [e, r] = F({}), c = G(
|
|
71
72
|
() => ({ ...t, ...e }),
|
|
72
73
|
[t, e]
|
|
73
|
-
), i =
|
|
74
|
-
(
|
|
75
|
-
r({ ...e, [
|
|
74
|
+
), i = Y(
|
|
75
|
+
(s, n) => {
|
|
76
|
+
r({ ...e, [n]: s });
|
|
76
77
|
},
|
|
77
78
|
[e]
|
|
78
79
|
);
|
|
79
80
|
return [c, i];
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
+
function w({
|
|
82
83
|
assets: t,
|
|
83
84
|
liquidationThresholds: e,
|
|
84
85
|
quotas: r,
|
|
85
86
|
quotasInfo: c,
|
|
86
87
|
tokensList: i,
|
|
87
|
-
prices:
|
|
88
|
+
prices: s
|
|
88
89
|
}) {
|
|
89
|
-
const [
|
|
90
|
+
const [n] = g({
|
|
90
91
|
assets: t,
|
|
91
92
|
liquidationThresholds: e,
|
|
92
93
|
quotas: r,
|
|
93
94
|
quotasInfo: c
|
|
94
95
|
}), [o, u] = S({
|
|
95
|
-
asset:
|
|
96
|
+
asset: n[0],
|
|
96
97
|
tokensList: i,
|
|
97
|
-
prices:
|
|
98
|
-
}), [a,
|
|
99
|
-
asset:
|
|
98
|
+
prices: s
|
|
99
|
+
}), [a, p] = S({
|
|
100
|
+
asset: n[1],
|
|
100
101
|
tokensList: i,
|
|
101
|
-
prices:
|
|
102
|
-
}),
|
|
102
|
+
prices: s
|
|
103
|
+
}), m = X({ currentPrice: o, token: u }), A = X({ currentPrice: a, token: p });
|
|
103
104
|
return {
|
|
104
|
-
xAxis:
|
|
105
|
-
yAxis:
|
|
105
|
+
xAxis: m,
|
|
106
|
+
yAxis: A,
|
|
106
107
|
currentPoint: [
|
|
107
108
|
o || x / 2,
|
|
108
109
|
a || x / 2
|
|
109
110
|
],
|
|
110
|
-
fixedBalances:
|
|
111
|
+
fixedBalances: n
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
114
|
export {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
Z as CELL_BAD,
|
|
116
|
+
$ as CELL_CURRENT,
|
|
117
|
+
b as CELL_GOOD,
|
|
118
|
+
j as CELL_HOVERED,
|
|
119
|
+
M as CELL_LIQUIDATION,
|
|
120
|
+
tt as CELL_OK,
|
|
120
121
|
x as DEFAULT_AXIS_MAX,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
et as DEFAULT_AXIS_MIN,
|
|
123
|
+
rt as formatAxisLabel,
|
|
124
|
+
it as formatAxisTipLabel,
|
|
125
|
+
st as formatAxisTipPrice,
|
|
125
126
|
nt as getCellClass,
|
|
126
|
-
|
|
127
|
+
ct as isPointInCell,
|
|
127
128
|
X as useAxis,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
129
|
+
Q as useEditPriceManually,
|
|
130
|
+
g as useFixedAssets,
|
|
131
|
+
ot as useIsAxisInRelativeUnits,
|
|
132
|
+
at as useLiquidationGraphActivePrice,
|
|
133
|
+
ut as useLiquidationGraphCurrentActiveValue,
|
|
134
|
+
w as useLiquidationGraphParams,
|
|
135
|
+
K as useLiquidationHeatmap,
|
|
135
136
|
S as usePriceInNumber,
|
|
136
|
-
|
|
137
|
+
pt as useWithLiquidationGraphActivePrices
|
|
137
138
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { formatBN as M, WAD_DECIMALS_POW as $, PERCENTAGE_FACTOR as A } from "@gearbox-protocol/sdk";
|
|
2
|
+
import { BigIntMath as g } from "@gearbox-protocol/sdk/common-utils";
|
|
2
3
|
import "react";
|
|
3
4
|
import { bnToInputView as h } from "./bn-to-input-view.js";
|
|
4
5
|
import "clsx";
|
|
@@ -11,21 +12,21 @@ const _ = 10000000000000000n;
|
|
|
11
12
|
function F(t) {
|
|
12
13
|
return BigInt(t.toFixed(18).replace(".", ""));
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
-
const n = typeof t == "number" && t < 0 || typeof t == "bigint" && t < 0n ? "-" : "", s = typeof t == "number" ? F(Math.abs(t)) :
|
|
15
|
+
function U(t, r) {
|
|
16
|
+
const n = typeof t == "number" && t < 0 || typeof t == "bigint" && t < 0n ? "-" : "", s = typeof t == "number" ? F(Math.abs(t)) : g.abs(t), u = s < _ && s > 0n, f = u ? "0.01" : M(s, $, r), o = `${n}$${f}`;
|
|
16
17
|
return u ? `< ${o}` : o;
|
|
17
18
|
}
|
|
18
19
|
const O = 1e4;
|
|
19
|
-
function
|
|
20
|
+
function l(t, r, i = !0) {
|
|
20
21
|
const n = typeof t == "number" ? t : Number(t);
|
|
21
22
|
return Number.isNaN(n) || n === void 0 || n === null ? "0" : n === 0 ? 0 : i && n > O ? n.toExponential(r) : n.toFixed(r);
|
|
22
23
|
}
|
|
23
|
-
function U(t, r = 2) {
|
|
24
|
-
return `${p(t, r)}%`;
|
|
25
|
-
}
|
|
26
24
|
function V(t, r = 2) {
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
return `${l(t, r)}%`;
|
|
26
|
+
}
|
|
27
|
+
function W(t, r = 2) {
|
|
28
|
+
const i = Number(t) / Number(A);
|
|
29
|
+
return `${l(i, r)}%`;
|
|
29
30
|
}
|
|
30
31
|
const c = {
|
|
31
32
|
minimumFractionDigits: 2,
|
|
@@ -35,7 +36,7 @@ const c = {
|
|
|
35
36
|
minExponentialThreshold: 1e-4,
|
|
36
37
|
maxExponentialThreshold: 1e6,
|
|
37
38
|
locale: "en-US"
|
|
38
|
-
},
|
|
39
|
+
}, X = ({
|
|
39
40
|
amount: t,
|
|
40
41
|
format: r = "full",
|
|
41
42
|
maximumFractionDigits: i = c.maximumFractionDigits,
|
|
@@ -48,8 +49,8 @@ const c = {
|
|
|
48
49
|
}) => {
|
|
49
50
|
const m = typeof t == "bigint" ? Number(h(t, 8)) : t, e = Math.abs(m);
|
|
50
51
|
if (r === "short") {
|
|
51
|
-
const T = m < 0 ? "-" : "", a = (
|
|
52
|
-
const b =
|
|
52
|
+
const T = m < 0 ? "-" : "", a = (p, d) => {
|
|
53
|
+
const b = p >= 100 ? 0 : i, E = p.toFixed(b).replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
|
|
53
54
|
return `${T}${E}${d}`;
|
|
54
55
|
};
|
|
55
56
|
if (e >= 1e9 && e <= o)
|
|
@@ -68,9 +69,9 @@ const c = {
|
|
|
68
69
|
};
|
|
69
70
|
export {
|
|
70
71
|
c as DEFAULT_FORMAT_MONEY_CONSTANTS,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
U as formatMoney,
|
|
73
|
+
X as formatMoneyAmount,
|
|
74
|
+
l as formatPercentAmount,
|
|
75
|
+
V as percentTemplate,
|
|
76
|
+
W as percentageTemplate
|
|
76
77
|
};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import { jsx as f, Fragment as u } from "react/jsx-runtime";
|
|
2
|
-
import { formatBN as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { formatBN as a, toBigInt as g } from "@gearbox-protocol/sdk";
|
|
3
|
+
import { BigIntMath as d } from "@gearbox-protocol/sdk/common-utils";
|
|
4
|
+
import { percentTemplate as p } from "./format-money.js";
|
|
5
|
+
function x(o, t = 2) {
|
|
6
|
+
return /* @__PURE__ */ f(u, { children: p(o, t) });
|
|
6
7
|
}
|
|
7
|
-
function
|
|
8
|
+
function $(o, t, s, e = " ", r) {
|
|
8
9
|
const { decimals: n = 18 } = t || {};
|
|
9
|
-
let i =
|
|
10
|
-
const
|
|
10
|
+
let i = a(o, n, s);
|
|
11
|
+
const m = t?.title || t?.symbol || "undefined";
|
|
11
12
|
if (r !== void 0 && i !== "-") {
|
|
12
|
-
const l = e.length +
|
|
13
|
-
|
|
13
|
+
const l = e.length + m.length, c = r - l;
|
|
14
|
+
c > 0 && i.length > c && (i = i.slice(0, c));
|
|
14
15
|
}
|
|
15
|
-
return i === "-" ? i : `${i}${e}${
|
|
16
|
+
return i === "-" ? i : `${i}${e}${m}`;
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
+
function v(o, t, s = 2) {
|
|
18
19
|
if (o === void 0) return "-";
|
|
19
20
|
const e = o.toFixed(s), r = Math.abs(Number(e)) > 0 ? "" : "< ", n = r ? `${e.slice(0, e.length - 1)}1` : e;
|
|
20
21
|
return `${r}${n} ${t?.title}`;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
const r = g(o || 0), n =
|
|
23
|
+
function k(o, t, s, e) {
|
|
24
|
+
const r = g(o || 0), n = $(
|
|
24
25
|
d.abs(r),
|
|
25
26
|
t,
|
|
26
27
|
s,
|
|
@@ -28,14 +29,14 @@ function v(o, t, s, e) {
|
|
|
28
29
|
);
|
|
29
30
|
return n === "-" ? n : `${r < 0 ? "-" : ""}${n}`;
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
const { decimals: r = 18 } = t || {}, n =
|
|
32
|
+
function P(o, t, s, e = " ") {
|
|
33
|
+
const { decimals: r = 18 } = t || {}, n = a(o, r, s), i = t?.title || t?.symbol || "undefined";
|
|
33
34
|
return n === "-" ? n : `${n}${e}${i}`;
|
|
34
35
|
}
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
k as negativeTokenTemplate,
|
|
38
|
+
x as percentageTemplate,
|
|
39
|
+
$ as tokenTemplate,
|
|
40
|
+
v as tokenTemplateNumber,
|
|
41
|
+
P as tokenTemplateString
|
|
41
42
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { NetworkType
|
|
1
|
+
import { NetworkType } from '@gearbox-protocol/sdk';
|
|
2
|
+
import { TokenMetaInfo } from '../../types/common';
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
type Sizes = "default" | "sm" | "md" | "lg";
|
|
4
5
|
/**
|
|
@@ -16,7 +17,7 @@ export interface AssetLineBaseProps {
|
|
|
16
17
|
* AssetLineProps — props for AssetLine component.
|
|
17
18
|
*/
|
|
18
19
|
export interface AssetLineProps extends AssetLineBaseProps {
|
|
19
|
-
token:
|
|
20
|
+
token: TokenMetaInfo | undefined;
|
|
20
21
|
tokenLabel?: string;
|
|
21
22
|
tokenDescription?: React.ReactNode;
|
|
22
23
|
chainId?: number;
|
|
@@ -42,7 +43,7 @@ export interface AssetLineProps extends AssetLineBaseProps {
|
|
|
42
43
|
* token lists, asset rows, portfolio tables, asset selection lists.
|
|
43
44
|
*
|
|
44
45
|
* Props:
|
|
45
|
-
* - `token` — token data object (
|
|
46
|
+
* - `token` — token data object (TokenMetaInfo).
|
|
46
47
|
* - `tokenLabel` — custom label for token (overrides token.title).
|
|
47
48
|
* - `tokenDescription` — additional description displayed below token symbol.
|
|
48
49
|
* - `chainId` — chain ID for token network.
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { TokenData } from '@gearbox-protocol/sdk';
|
|
2
1
|
import { PoolAPYPointsTip } from '../pool-apy-tooltip';
|
|
3
2
|
import { LocaleKeys } from '../../locale';
|
|
4
|
-
import {
|
|
3
|
+
import { TokenMetaInfo } from '../../types/common';
|
|
5
4
|
/**
|
|
6
5
|
* For GEAR token, use the logo symbol instead of the standard token icon.
|
|
7
6
|
* The standard gear.svg has a white background circle that looks bad on dark themes.
|
|
8
7
|
*/
|
|
9
|
-
export declare function getRewardTokenSymbol(token:
|
|
8
|
+
export declare function getRewardTokenSymbol(token: TokenMetaInfo | undefined, rewardTokenSymbol: string | undefined): (string | {
|
|
10
9
|
icon: string;
|
|
11
10
|
}) | undefined;
|
|
12
11
|
export interface PoolBaseAPY {
|
|
@@ -78,7 +77,7 @@ export interface CompoundAPYProps {
|
|
|
78
77
|
/**
|
|
79
78
|
* Token list for displaying token symbols in tooltips
|
|
80
79
|
*/
|
|
81
|
-
tokensList?: Record<string,
|
|
80
|
+
tokensList?: Record<string, TokenMetaInfo>;
|
|
82
81
|
/**
|
|
83
82
|
* Number of decimal places
|
|
84
83
|
* @default 2
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CreditSessionStatus as CreditSessionStatusType } from '@gearbox-protocol/sdk';
|
|
2
1
|
import type * as React from "react";
|
|
2
|
+
export type CreditSessionStatusType = "active" | "closed" | "repaid" | "liquidated" | "liquidateExpired" | "liquidatePaused";
|
|
3
3
|
export interface CreditSessionStatusProps {
|
|
4
4
|
status: CreditSessionStatusType;
|
|
5
5
|
className?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NetworkType } from '@gearbox-protocol/sdk';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import {
|
|
3
|
+
import { TokenFullData } from '../../types/common';
|
|
4
4
|
import type * as React from "react";
|
|
5
5
|
declare const blockVariants: (props?: ({
|
|
6
6
|
size?: "xs" | "sm" | "md" | null | undefined;
|
|
@@ -11,7 +11,7 @@ export interface CurrencyButtonProps extends VariantProps<typeof blockVariants>
|
|
|
11
11
|
/** Max length for symbol display. @default 13 */
|
|
12
12
|
maxLength?: number;
|
|
13
13
|
/** Token to display. */
|
|
14
|
-
token?:
|
|
14
|
+
token?: Omit<TokenFullData, "address">;
|
|
15
15
|
/** When true, button does not respond to click. */
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
/** Called when button is clicked to open token select. When set and not disabled, block is clickable. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExtraRewardApy, TokenData } from '@gearbox-protocol/sdk';
|
|
2
1
|
import { JSX } from 'react';
|
|
3
2
|
import { Address } from 'viem';
|
|
3
|
+
import { ExtraRewardApyData, TokenMetaInfo } from '../../types/common';
|
|
4
4
|
export type PoolBaseAPY = {
|
|
5
5
|
type: "supplyAPY";
|
|
6
6
|
apy: number;
|
|
@@ -12,12 +12,12 @@ export interface DetailedApyProps {
|
|
|
12
12
|
totalAPY: number;
|
|
13
13
|
totalAPYLoading?: boolean;
|
|
14
14
|
baseAPY: Array<PoolBaseAPY>;
|
|
15
|
-
extraAPY: Array<
|
|
16
|
-
tokensList: Record<Address,
|
|
15
|
+
extraAPY: Array<ExtraRewardApyData>;
|
|
16
|
+
tokensList: Record<Address, TokenMetaInfo> | undefined;
|
|
17
17
|
}
|
|
18
18
|
interface PoolRewardsIconProps {
|
|
19
|
-
reward:
|
|
20
|
-
tokensList: Record<Address,
|
|
19
|
+
reward: ExtraRewardApyData;
|
|
20
|
+
tokensList: Record<Address, TokenMetaInfo> | undefined;
|
|
21
21
|
size?: number;
|
|
22
22
|
margin?: string;
|
|
23
23
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { TokenData } from '@gearbox-protocol/sdk';
|
|
2
1
|
import { ExplorerLink } from '../explorer-links-dropdown';
|
|
2
|
+
import { TokenMetaInfo } from '../../types/common';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
export type { ExplorerLink } from '../explorer-links-dropdown';
|
|
5
5
|
export interface DetailedPageTitleProps {
|
|
6
6
|
/** Main title text or node */
|
|
7
7
|
title: React.ReactNode;
|
|
8
8
|
/** Token data for the icon (symbol used for TokenIcon) */
|
|
9
|
-
token?:
|
|
9
|
+
token?: TokenMetaInfo;
|
|
10
10
|
/** Text to copy when the copy button is clicked; copy button is hidden when omitted */
|
|
11
11
|
toCopy?: string;
|
|
12
12
|
/** Explorer links for the dropdown; dropdown is hidden when empty or omitted */
|
package/dist/types/components/liquidation/liquidation-assets-table/liquidation-assets-table.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { TokenData } from '@gearbox-protocol/sdk';
|
|
2
1
|
import { Address } from 'viem';
|
|
3
2
|
import { UseLiquidationGraphParamsReturnType } from '../../../hooks/use-liquidation';
|
|
3
|
+
import { TokenMetaInfo } from '../../../types/common';
|
|
4
4
|
import type * as React from "react";
|
|
5
5
|
export interface LiquidationModellingAssetsTableProps {
|
|
6
|
-
tokensList: Record<Address,
|
|
6
|
+
tokensList: Record<Address, TokenMetaInfo>;
|
|
7
7
|
graphParams: UseLiquidationGraphParamsReturnType;
|
|
8
8
|
data: Array<{
|
|
9
9
|
token: Address;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { Asset
|
|
1
|
+
import { Asset } from '@gearbox-protocol/sdk';
|
|
2
2
|
import { Address } from 'viem';
|
|
3
3
|
import { UseLiquidationGraphParamsReturnType } from '../../../hooks/use-liquidation';
|
|
4
|
+
import { LiquidationThresholds, QuotasInfoList, TokenFullData } from '../../../types/common';
|
|
4
5
|
import type * as React from "react";
|
|
5
6
|
export interface LiquidationGraphProps {
|
|
6
7
|
graphParams: UseLiquidationGraphParamsReturnType;
|
|
7
8
|
assets: Array<Asset>;
|
|
8
|
-
liquidationThresholds:
|
|
9
|
+
liquidationThresholds: LiquidationThresholds;
|
|
9
10
|
quotas: Record<Address, Asset>;
|
|
10
|
-
quotasInfo:
|
|
11
|
+
quotasInfo: QuotasInfoList;
|
|
11
12
|
underlyingToken: Address;
|
|
12
13
|
debt: bigint;
|
|
13
|
-
tokensList: Record<Address,
|
|
14
|
+
tokensList: Record<Address, TokenFullData>;
|
|
14
15
|
prices: Record<Address, bigint>;
|
|
15
16
|
width?: number;
|
|
16
17
|
height?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TokenData } from '@gearbox-protocol/sdk';
|
|
2
1
|
import { AxisParams } from '../../../hooks/use-liquidation';
|
|
2
|
+
import { TokenFullData } from '../../../types/common';
|
|
3
3
|
import type * as React from "react";
|
|
4
4
|
export interface LiquidationGraphTipProps {
|
|
5
5
|
activePointX: number | undefined;
|
|
@@ -7,7 +7,7 @@ export interface LiquidationGraphTipProps {
|
|
|
7
7
|
xAxis: AxisParams | undefined;
|
|
8
8
|
yAxis: AxisParams | undefined;
|
|
9
9
|
hf: number;
|
|
10
|
-
underlyingToken:
|
|
10
|
+
underlyingToken: TokenFullData | undefined;
|
|
11
11
|
maxLabelLength?: number;
|
|
12
12
|
}
|
|
13
13
|
export declare function LiquidationGraphTip({ activePointX, activePointY, xAxis, yAxis, hf, underlyingToken, maxLabelLength, }: LiquidationGraphTipProps): React.ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExtraRewardApy, TokenData } from '@gearbox-protocol/sdk';
|
|
2
1
|
import { PoolBaseAPY } from '../compound-apy/compound-apy';
|
|
3
2
|
import { LocaleKeys } from '../../locale';
|
|
3
|
+
import { ExtraRewardApyData, TokenMetaInfo } from '../../types/common';
|
|
4
4
|
import type * as React from "react";
|
|
5
5
|
export interface PoolAPYPointsTip {
|
|
6
6
|
reward?: {
|
|
@@ -35,11 +35,11 @@ export interface PoolAPYTooltipProps {
|
|
|
35
35
|
children?: React.ReactNode;
|
|
36
36
|
totalAPY?: number;
|
|
37
37
|
baseAPY?: Array<PoolBaseAPY>;
|
|
38
|
-
extraAPY?: Array<
|
|
38
|
+
extraAPY?: Array<ExtraRewardApyData>;
|
|
39
39
|
points?: Array<PoolAPYPointsTip>;
|
|
40
40
|
apy7DAgo?: APY7DAgoData;
|
|
41
41
|
externalAPY?: ExternalAPYData;
|
|
42
|
-
tokensList?: Record<string,
|
|
42
|
+
tokensList?: Record<string, TokenMetaInfo>;
|
|
43
43
|
className?: string;
|
|
44
44
|
}
|
|
45
45
|
export declare function PoolAPYTooltip({ children, totalAPY, baseAPY, extraAPY, points, apy7DAgo, externalAPY, tokensList, className, }: PoolAPYTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TokenFullData } from '../../types/common';
|
|
2
2
|
export interface SliderTokenProps {
|
|
3
3
|
from: number;
|
|
4
4
|
to: number;
|
|
5
|
-
token:
|
|
5
|
+
token: TokenFullData;
|
|
6
6
|
step: number;
|
|
7
7
|
markerStep: number;
|
|
8
8
|
value: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TokenFullData } from '../../types/common';
|
|
2
2
|
import type * as React from "react";
|
|
3
3
|
/** Size variant matching A (SmartNumberInputSize). */
|
|
4
4
|
export type BalanceIndicatorSize = "sm" | "md";
|
|
@@ -6,7 +6,7 @@ export interface BalanceIndicatorProps {
|
|
|
6
6
|
/** Label before balance (e.g. "Balance"). */
|
|
7
7
|
title?: React.ReactNode;
|
|
8
8
|
/** Token for formatting amount. */
|
|
9
|
-
token:
|
|
9
|
+
token: Omit<TokenFullData, "address"> | undefined;
|
|
10
10
|
/** Max amount to display (formatted via TokenTemplate). */
|
|
11
11
|
maxAmount?: bigint;
|
|
12
12
|
/** When true, balance row is non-interactive. */
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import { NetworkType } from '@gearbox-protocol/sdk';
|
|
2
|
+
import { TokenFullData } from '../../types/common';
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
/** A-matching SmartNumberInput size for layout (styles.tsx). */
|
|
4
5
|
export type SmartNumberInputSize = "sm" | "md";
|
|
5
|
-
/**
|
|
6
|
-
* Token data for legacy API compatibility
|
|
7
|
-
* Uses generic type to accept any TokenData-like object
|
|
8
|
-
*/
|
|
9
|
-
export interface TokenDataLike {
|
|
10
|
-
symbol: string;
|
|
11
|
-
title: string;
|
|
12
|
-
decimals?: number;
|
|
13
|
-
}
|
|
14
6
|
export interface SmartNumberInputProps {
|
|
15
7
|
/** Current amount value as string. */
|
|
16
8
|
amount: string;
|
|
17
9
|
/** Token data (from interface). */
|
|
18
|
-
token:
|
|
10
|
+
token: Omit<TokenFullData, "address"> | undefined;
|
|
19
11
|
/** Label for the input. */
|
|
20
12
|
label?: React.ReactNode;
|
|
21
13
|
/** Max button label (e.g. "Balance"). */
|