@gearbox-protocol/ui-kit 4.0.0-next.1 → 4.0.0-next.10
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/assets-list-cell/assets-list-cell.cjs +1 -1
- package/dist/cjs/components/badge/badge.cjs +1 -1
- package/dist/cjs/components/badge/chip.cjs +1 -0
- package/dist/cjs/components/badge/index.cjs +1 -1
- package/dist/cjs/components/base/amount-input/amount-input.cjs +1 -1
- package/dist/cjs/components/base/amount-input/constants.cjs +1 -1
- package/dist/cjs/components/base/amount-input/index.cjs +1 -1
- package/dist/cjs/components/base/amount-input/token-button.cjs +1 -1
- package/dist/cjs/components/base/amount-input/token-select-panel.cjs +1 -0
- package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -0
- package/dist/cjs/components/base/borrow-rate-block/constants.cjs +1 -0
- package/dist/cjs/components/base/borrow-rate-block/index.cjs +1 -0
- package/dist/cjs/components/base/chart-with-side-card/chart-with-side-card.cjs +1 -0
- package/dist/cjs/components/base/chart-with-side-card/constants.cjs +1 -0
- package/dist/cjs/components/base/chart-with-side-card/index.cjs +1 -0
- package/dist/cjs/components/base/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/base/details-view/details-view.cjs +1 -1
- package/dist/cjs/components/base/health-factor-block/health-factor-block.cjs +1 -1
- package/dist/cjs/components/base/history-chart/history-chart.cjs +1 -1
- package/dist/cjs/components/base/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/constants.cjs +1 -1
- package/dist/cjs/components/base/info-list/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
- package/dist/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
- package/dist/cjs/components/base/leverage-preset-chips/constants.cjs +1 -0
- package/dist/cjs/components/base/leverage-preset-chips/index.cjs +1 -0
- package/dist/cjs/components/base/leverage-preset-chips/leverage-preset-chips.cjs +1 -0
- package/dist/cjs/components/base/liquidation-params-table/constants.cjs +1 -0
- package/dist/cjs/components/base/liquidation-params-table/index.cjs +1 -0
- package/dist/cjs/components/base/liquidation-params-table/liquidation-params-table.cjs +1 -0
- package/dist/cjs/components/base/liquidation-price-block/liquidation-price-block.cjs +1 -1
- package/dist/cjs/components/base/manage-pane/constants.cjs +1 -1
- package/dist/cjs/components/base/manage-pane/index.cjs +1 -1
- package/dist/cjs/components/base/manage-pane/manage-pane.cjs +1 -1
- package/dist/cjs/components/base/more-accordion/constants.cjs +1 -0
- package/dist/cjs/components/base/more-accordion/index.cjs +1 -0
- package/dist/cjs/components/base/more-accordion/more-accordion.cjs +1 -0
- package/dist/cjs/components/base/nested-info-stack/constants.cjs +1 -0
- package/dist/cjs/components/base/nested-info-stack/index.cjs +1 -0
- package/dist/cjs/components/base/nested-info-stack/nested-info-stack.cjs +1 -0
- package/dist/cjs/components/base/page-title/index.cjs +1 -1
- package/dist/cjs/components/base/page-title/page-title.cjs +1 -1
- package/dist/cjs/components/base/pool-apy-breakdown-card/constants.cjs +1 -0
- package/dist/cjs/components/base/pool-apy-breakdown-card/index.cjs +1 -0
- package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -0
- package/dist/cjs/components/base/side-card/constants.cjs +1 -0
- package/dist/cjs/components/base/side-card/index.cjs +1 -0
- package/dist/cjs/components/base/side-card/side-card.cjs +1 -0
- package/dist/cjs/components/base/stat-badge/stat-badge.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/constants.cjs +1 -0
- package/dist/cjs/components/base/strategy-apy-breakdown-card/index.cjs +1 -0
- package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -0
- package/dist/cjs/components/base/tabber/tabber.cjs +1 -1
- package/dist/cjs/components/base/time-to-liquidation-block/time-to-liquidation-block.cjs +1 -1
- package/dist/cjs/components/base/title-meta/constants.cjs +1 -0
- package/dist/cjs/components/base/title-meta/index.cjs +1 -0
- package/dist/cjs/components/base/title-meta/title-meta.cjs +1 -0
- package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
- package/dist/cjs/components/base/token-pair-symbol/constants.cjs +1 -0
- package/dist/cjs/components/base/token-pair-symbol/index.cjs +1 -0
- package/dist/cjs/components/base/token-pair-symbol/token-pair-symbol.cjs +1 -0
- package/dist/cjs/components/base/token-pair-title/constants.cjs +1 -0
- package/dist/cjs/components/base/token-pair-title/index.cjs +1 -0
- package/dist/cjs/components/base/token-pair-title/token-pair-title.cjs +1 -0
- package/dist/cjs/components/base/values/constants.cjs +1 -1
- package/dist/cjs/components/base/values/index.cjs +1 -1
- package/dist/cjs/components/base/values/pnl-value.cjs +1 -1
- package/dist/cjs/components/base/values/points-value.cjs +1 -0
- package/dist/cjs/components/base/values/position-status-badge.cjs +1 -0
- package/dist/cjs/components/base/values/position-type-badge.cjs +1 -1
- package/dist/cjs/components/base/values/scalars.cjs +1 -1
- package/dist/cjs/components/base-table/base-table-line.cjs +1 -0
- package/dist/cjs/components/base-table/base-table.cjs +1 -0
- package/dist/cjs/components/base-table/constants.cjs +1 -0
- package/dist/cjs/components/base-table/index.cjs +1 -0
- package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/collateral-allocation-tooltip/allocation-wheel.cjs +1 -0
- package/dist/cjs/components/collateral-allocation-tooltip/collateral-allocation-tooltip.cjs +1 -0
- package/dist/cjs/components/collateral-allocation-tooltip/constants.cjs +1 -0
- package/dist/cjs/components/collateral-allocation-tooltip/index.cjs +1 -0
- package/dist/cjs/components/composites/index.cjs +1 -1
- package/dist/cjs/components/composites/notification-center/notification-center.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/constants.cjs +1 -0
- package/dist/cjs/components/composites/pool-assets-table/index.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/constants.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/index.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title-explorer-dropdown.cjs +1 -1
- package/dist/cjs/components/explorer-links-dropdown/explorer-links-dropdown.cjs +1 -1
- package/dist/cjs/components/explorer-links-dropdown/index.cjs +1 -1
- package/dist/cjs/components/filter/filter-chip.cjs +1 -1
- package/dist/cjs/components/graph/default-config.cjs +1 -1
- package/dist/cjs/components/graph/formatters.cjs +1 -1
- package/dist/cjs/components/graph/graph-view.cjs +1 -1
- package/dist/cjs/components/graph/graph.cjs +1 -1
- package/dist/cjs/components/hf-indicator/hf-indicator.cjs +1 -0
- package/dist/cjs/components/hf-indicator/index.cjs +1 -0
- package/dist/cjs/components/icons/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/infinite-scroll/index.cjs +1 -0
- package/dist/cjs/components/infinite-scroll/infinite-scroll-wrapper.cjs +1 -0
- package/dist/cjs/components/layout/index.cjs +1 -1
- package/dist/cjs/components/modal/modal.cjs +1 -1
- package/dist/cjs/components/name-cell/index.cjs +1 -0
- package/dist/cjs/components/name-cell/name-cell.cjs +1 -0
- package/dist/cjs/components/network-icon/index.cjs +1 -1
- package/dist/cjs/components/network-icon/network-indicator.cjs +1 -0
- package/dist/cjs/components/table/index.cjs +1 -1
- package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -1
- package/dist/cjs/configs/tailwind-preset.cjs +1 -1
- package/dist/cjs/hooks/index.cjs +1 -1
- package/dist/cjs/hooks/use-debounce-call.cjs +1 -1
- package/dist/cjs/hooks/use-observed-width-key.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/cjs/utils/format-leverage.cjs +1 -0
- package/dist/cjs/utils/format-money.cjs +1 -1
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/leverage-presets.cjs +1 -0
- package/dist/esm/components/assets-list-cell/assets-list-cell.js +161 -159
- package/dist/esm/components/badge/badge.js +14 -8
- package/dist/esm/components/badge/chip.js +47 -0
- package/dist/esm/components/badge/index.js +8 -3
- package/dist/esm/components/base/amount-input/amount-input.js +179 -147
- package/dist/esm/components/base/amount-input/constants.js +2 -0
- package/dist/esm/components/base/amount-input/index.js +5 -3
- package/dist/esm/components/base/amount-input/token-button.js +65 -35
- package/dist/esm/components/base/amount-input/token-select-panel.js +85 -0
- package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +90 -0
- package/dist/esm/components/base/borrow-rate-block/constants.js +8 -0
- package/dist/esm/components/base/borrow-rate-block/index.js +6 -0
- package/dist/esm/components/base/chart-with-side-card/chart-with-side-card.js +36 -0
- package/dist/esm/components/base/chart-with-side-card/constants.js +8 -0
- package/dist/esm/components/base/chart-with-side-card/index.js +6 -0
- package/dist/esm/components/base/detailed-page-title/detailed-page-title.js +26 -27
- package/dist/esm/components/base/details-view/details-view.js +37 -32
- package/dist/esm/components/base/health-factor-block/health-factor-block.js +25 -25
- package/dist/esm/components/base/history-chart/history-chart.js +85 -41
- package/dist/esm/components/base/index.js +175 -116
- package/dist/esm/components/base/info-list/constants.js +1 -0
- package/dist/esm/components/base/info-list/index.js +4 -2
- package/dist/esm/components/base/info-list/info-list.js +66 -21
- package/dist/esm/components/base/leverage-input/leverage-input.js +54 -53
- package/dist/esm/components/base/leverage-preset-chips/constants.js +7 -0
- package/dist/esm/components/base/leverage-preset-chips/index.js +6 -0
- package/dist/esm/components/base/leverage-preset-chips/leverage-preset-chips.js +39 -0
- package/dist/esm/components/base/liquidation-params-table/constants.js +6 -0
- package/dist/esm/components/base/liquidation-params-table/index.js +6 -0
- package/dist/esm/components/base/liquidation-params-table/liquidation-params-table.js +62 -0
- package/dist/esm/components/base/liquidation-price-block/liquidation-price-block.js +33 -28
- package/dist/esm/components/base/manage-pane/constants.js +3 -2
- package/dist/esm/components/base/manage-pane/index.js +7 -6
- package/dist/esm/components/base/manage-pane/manage-pane.js +162 -100
- package/dist/esm/components/base/more-accordion/constants.js +7 -0
- package/dist/esm/components/base/more-accordion/index.js +6 -0
- package/dist/esm/components/base/more-accordion/more-accordion.js +51 -0
- package/dist/esm/components/base/nested-info-stack/constants.js +6 -0
- package/dist/esm/components/base/nested-info-stack/index.js +6 -0
- package/dist/esm/components/base/nested-info-stack/nested-info-stack.js +20 -0
- package/dist/esm/components/base/page-title/index.js +5 -4
- package/dist/esm/components/base/page-title/page-title.js +37 -23
- package/dist/esm/components/base/pool-apy-breakdown-card/constants.js +7 -0
- package/dist/esm/components/base/pool-apy-breakdown-card/index.js +6 -0
- package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +58 -0
- package/dist/esm/components/base/side-card/constants.js +8 -0
- package/dist/esm/components/base/side-card/index.js +6 -0
- package/dist/esm/components/base/side-card/side-card.js +57 -0
- package/dist/esm/components/base/stat-badge/stat-badge.js +18 -9
- package/dist/esm/components/base/strategy-apy-breakdown-card/constants.js +8 -0
- package/dist/esm/components/base/strategy-apy-breakdown-card/index.js +6 -0
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +214 -0
- package/dist/esm/components/base/tabber/tabber.js +83 -75
- package/dist/esm/components/base/time-to-liquidation-block/time-to-liquidation-block.js +31 -31
- package/dist/esm/components/base/title-meta/constants.js +9 -0
- package/dist/esm/components/base/title-meta/index.js +6 -0
- package/dist/esm/components/base/title-meta/title-meta.js +88 -0
- package/dist/esm/components/base/token-amount/token-amount.js +13 -12
- package/dist/esm/components/base/token-pair-symbol/constants.js +6 -0
- package/dist/esm/components/base/token-pair-symbol/index.js +6 -0
- package/dist/esm/components/base/token-pair-symbol/token-pair-symbol.js +33 -0
- package/dist/esm/components/base/token-pair-title/constants.js +6 -0
- package/dist/esm/components/base/token-pair-title/index.js +6 -0
- package/dist/esm/components/base/token-pair-title/token-pair-title.js +20 -0
- package/dist/esm/components/base/values/constants.js +1 -0
- package/dist/esm/components/base/values/index.js +18 -13
- package/dist/esm/components/base/values/pnl-value.js +8 -8
- package/dist/esm/components/base/values/points-value.js +30 -0
- package/dist/esm/components/base/values/position-status-badge.js +26 -0
- package/dist/esm/components/base/values/position-type-badge.js +7 -6
- package/dist/esm/components/base/values/scalars.js +29 -27
- package/dist/esm/components/base-table/base-table-line.js +117 -0
- package/dist/esm/components/base-table/base-table.js +110 -0
- package/dist/esm/components/base-table/constants.js +12 -0
- package/dist/esm/components/base-table/index.js +9 -0
- package/dist/esm/components/block-sync-pill/block-sync-pill.js +37 -43
- package/dist/esm/components/checkbox/checkbox-labeled.js +34 -40
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +33 -39
- package/dist/esm/components/collateral-allocation-tooltip/allocation-wheel.js +71 -0
- package/dist/esm/components/collateral-allocation-tooltip/collateral-allocation-tooltip.js +102 -0
- package/dist/esm/components/collateral-allocation-tooltip/constants.js +12 -0
- package/dist/esm/components/collateral-allocation-tooltip/index.js +9 -0
- package/dist/esm/components/composites/index.js +31 -31
- package/dist/esm/components/composites/notification-center/notification-center.js +1 -1
- package/dist/esm/components/composites/pool-assets-table/constants.js +9 -0
- package/dist/esm/components/composites/pool-assets-table/index.js +8 -6
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +52 -31
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +111 -77
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table.js +44 -27
- package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +50 -39
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.js +114 -59
- package/dist/esm/components/composites/tx-preview/confirm/dialog/constants.js +10 -7
- package/dist/esm/components/composites/tx-preview/confirm/dialog/index.js +8 -10
- package/dist/esm/components/composites/tx-preview/confirm/index.js +24 -26
- package/dist/esm/components/composites/tx-preview/index.js +24 -26
- package/dist/esm/components/compound-apy/compound-apy.js +85 -80
- package/dist/esm/components/detailed-page-title/detailed-page-title-explorer-dropdown.js +50 -41
- package/dist/esm/components/explorer-links-dropdown/explorer-links-dropdown.js +1 -83
- package/dist/esm/components/explorer-links-dropdown/index.js +1 -4
- package/dist/esm/components/filter/filter-chip.js +1 -0
- package/dist/esm/components/graph/default-config.js +20 -18
- package/dist/esm/components/graph/formatters.js +62 -52
- package/dist/esm/components/graph/graph-view.js +85 -101
- package/dist/esm/components/graph/graph.js +492 -490
- package/dist/esm/components/hf-indicator/hf-indicator.js +33 -0
- package/dist/esm/components/hf-indicator/index.js +4 -0
- package/dist/esm/components/icons/index.js +29 -28
- package/dist/esm/components/index.js +737 -712
- package/dist/esm/components/infinite-scroll/index.js +4 -0
- package/dist/esm/components/infinite-scroll/infinite-scroll-wrapper.js +30 -0
- package/dist/esm/components/layout/index.js +14 -33
- package/dist/esm/components/modal/modal.js +1 -1
- package/dist/esm/components/name-cell/index.js +4 -0
- package/dist/esm/components/name-cell/name-cell.js +35 -0
- package/dist/esm/components/network-icon/index.js +4 -2
- package/dist/esm/components/network-icon/network-indicator.js +82 -0
- package/dist/esm/components/table/index.js +38 -52
- package/dist/esm/components/trading-view/trading-view.js +193 -155
- package/dist/esm/components/with-copy/with-copy.js +34 -40
- package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +112 -169
- package/dist/esm/configs/tailwind-preset.js +13 -1
- package/dist/esm/hooks/index.js +32 -55
- package/dist/esm/hooks/use-debounce-call.js +2 -3
- package/dist/esm/hooks/use-observed-width-key.js +24 -0
- package/dist/esm/index.js +909 -900
- package/dist/esm/locale/en.json.js +40 -11
- package/dist/esm/utils/format-leverage.js +6 -0
- package/dist/esm/utils/format-money.js +59 -41
- package/dist/esm/utils/index.js +91 -85
- package/dist/esm/utils/leverage-presets.js +13 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +3 -0
- package/dist/types/components/badge/badge.d.ts +2 -1
- package/dist/types/components/badge/chip.d.ts +22 -0
- package/dist/types/components/badge/index.d.ts +1 -0
- package/dist/types/components/base/amount-input/amount-input.d.ts +13 -2
- package/dist/types/components/base/amount-input/constants.d.ts +2 -0
- package/dist/types/components/base/amount-input/index.d.ts +1 -0
- package/dist/types/components/base/amount-input/token-button.d.ts +14 -2
- package/dist/types/components/base/amount-input/token-select-panel.d.ts +17 -0
- package/dist/types/components/base/borrow-rate-block/borrow-rate-block.d.ts +21 -0
- package/dist/types/components/base/borrow-rate-block/constants.d.ts +5 -0
- package/dist/types/components/base/borrow-rate-block/index.d.ts +2 -0
- package/dist/types/components/base/chart-with-side-card/chart-with-side-card.d.ts +13 -0
- package/dist/types/components/base/chart-with-side-card/constants.d.ts +5 -0
- package/dist/types/components/base/chart-with-side-card/index.d.ts +2 -0
- package/dist/types/components/base/detailed-page-title/detailed-page-title.d.ts +3 -4
- package/dist/types/components/base/health-factor-block/health-factor-block.d.ts +6 -6
- package/dist/types/components/base/history-chart/history-chart.d.ts +20 -3
- package/dist/types/components/base/index.d.ts +12 -0
- package/dist/types/components/base/info-list/constants.d.ts +1 -0
- package/dist/types/components/base/info-list/info-list.d.ts +15 -1
- package/dist/types/components/base/leverage-input/leverage-input.d.ts +2 -2
- package/dist/types/components/base/leverage-preset-chips/constants.d.ts +4 -0
- package/dist/types/components/base/leverage-preset-chips/index.d.ts +2 -0
- package/dist/types/components/base/leverage-preset-chips/leverage-preset-chips.d.ts +13 -0
- package/dist/types/components/base/liquidation-params-table/constants.d.ts +3 -0
- package/dist/types/components/base/liquidation-params-table/index.d.ts +2 -0
- package/dist/types/components/base/liquidation-params-table/liquidation-params-table.d.ts +12 -0
- package/dist/types/components/base/liquidation-price-block/liquidation-price-block.d.ts +6 -4
- package/dist/types/components/base/manage-pane/constants.d.ts +1 -0
- package/dist/types/components/base/manage-pane/manage-pane.d.ts +9 -0
- package/dist/types/components/base/more-accordion/constants.d.ts +4 -0
- package/dist/types/components/base/more-accordion/index.d.ts +2 -0
- package/dist/types/components/base/more-accordion/more-accordion.d.ts +11 -0
- package/dist/types/components/base/nested-info-stack/constants.d.ts +3 -0
- package/dist/types/components/base/nested-info-stack/index.d.ts +2 -0
- package/dist/types/components/base/nested-info-stack/nested-info-stack.d.ts +10 -0
- package/dist/types/components/base/page-title/page-title.d.ts +17 -7
- package/dist/types/components/base/pool-apy-breakdown-card/constants.d.ts +4 -0
- package/dist/types/components/base/pool-apy-breakdown-card/index.d.ts +2 -0
- package/dist/types/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.d.ts +13 -0
- package/dist/types/components/base/side-card/constants.d.ts +5 -0
- package/dist/types/components/base/side-card/index.d.ts +2 -0
- package/dist/types/components/base/side-card/side-card.d.ts +16 -0
- package/dist/types/components/base/strategy-apy-breakdown-card/constants.d.ts +5 -0
- package/dist/types/components/base/strategy-apy-breakdown-card/index.d.ts +2 -0
- package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +17 -0
- package/dist/types/components/base/tabber/tabber.d.ts +11 -2
- package/dist/types/components/base/time-to-liquidation-block/time-to-liquidation-block.d.ts +5 -6
- package/dist/types/components/base/title-meta/constants.d.ts +6 -0
- package/dist/types/components/base/title-meta/index.d.ts +2 -0
- package/dist/types/components/base/title-meta/title-meta.d.ts +23 -0
- package/dist/types/components/base/token-amount/token-amount.d.ts +8 -2
- package/dist/types/components/base/token-pair-symbol/constants.d.ts +3 -0
- package/dist/types/components/base/token-pair-symbol/index.d.ts +2 -0
- package/dist/types/components/base/token-pair-symbol/token-pair-symbol.d.ts +15 -0
- package/dist/types/components/base/token-pair-title/constants.d.ts +3 -0
- package/dist/types/components/base/token-pair-title/index.d.ts +2 -0
- package/dist/types/components/base/token-pair-title/token-pair-title.d.ts +11 -0
- package/dist/types/components/base/values/constants.d.ts +1 -0
- package/dist/types/components/base/values/index.d.ts +3 -1
- package/dist/types/components/base/values/points-value.d.ts +11 -0
- package/dist/types/components/base/values/position-short-label.d.ts +1 -1
- package/dist/types/components/base/values/position-status-badge.d.ts +7 -0
- package/dist/types/components/base/values/position-type-badge.d.ts +2 -2
- package/dist/types/components/base/values/scalars.d.ts +9 -0
- package/dist/types/components/base-link/base-link.d.ts +1 -1
- package/dist/types/components/base-table/base-table-line.d.ts +21 -0
- package/dist/types/components/base-table/base-table.d.ts +19 -0
- package/dist/types/components/base-table/constants.d.ts +8 -0
- package/dist/types/components/base-table/index.d.ts +3 -0
- package/dist/types/components/base-table/types.d.ts +37 -0
- package/dist/types/components/buttons/button/button.d.ts +2 -2
- package/dist/types/components/checkbox/checkbox.d.ts +2 -2
- package/dist/types/components/collateral-allocation-tooltip/allocation-wheel.d.ts +10 -0
- package/dist/types/components/collateral-allocation-tooltip/collateral-allocation-tooltip.d.ts +23 -0
- package/dist/types/components/collateral-allocation-tooltip/constants.d.ts +8 -0
- package/dist/types/components/collateral-allocation-tooltip/index.d.ts +3 -0
- package/dist/types/components/composites/pool-assets-table/constants.d.ts +6 -0
- package/dist/types/components/composites/pool-assets-table/index.d.ts +1 -0
- package/dist/types/components/composites/pool-assets-table/pool-assets-table-head.d.ts +1 -2
- package/dist/types/components/composites/pool-assets-table/pool-assets-table-row.d.ts +8 -8
- package/dist/types/components/composites/pool-assets-table/pool-assets-table.d.ts +7 -17
- package/dist/types/components/composites/pool-assets-table/types.d.ts +4 -12
- package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +47 -14
- package/dist/types/components/composites/tx-preview/confirm/amounts/index.d.ts +1 -1
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.d.ts +23 -19
- package/dist/types/components/composites/tx-preview/confirm/dialog/index.d.ts +2 -2
- package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.d.ts +0 -3
- package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.d.ts +98 -0
- package/dist/types/components/dialog/dialog-container.d.ts +3 -3
- package/dist/types/components/edit-input/edit-input.d.ts +1 -1
- package/dist/types/components/explorer-links-dropdown/explorer-links-dropdown.d.ts +6 -75
- package/dist/types/components/filter/variants.d.ts +1 -1
- package/dist/types/components/graph/formatters.d.ts +6 -1
- package/dist/types/components/graph/graph-view.d.ts +1 -1
- package/dist/types/components/graph/graph.d.ts +4 -0
- package/dist/types/components/health-factor/health-factor.d.ts +2 -1
- package/dist/types/components/hf-indicator/hf-indicator.d.ts +8 -0
- package/dist/types/components/hf-indicator/index.d.ts +1 -0
- package/dist/types/components/icons/index.d.ts +1 -1
- package/dist/types/components/index.d.ts +5 -6
- package/dist/types/components/infinite-scroll/index.d.ts +1 -0
- package/dist/types/components/infinite-scroll/infinite-scroll-wrapper.d.ts +11 -0
- package/dist/types/components/input/input.d.ts +1 -1
- package/dist/types/components/layout/index.d.ts +0 -7
- package/dist/types/components/name-cell/index.d.ts +1 -0
- package/dist/types/components/name-cell/name-cell.d.ts +13 -0
- package/dist/types/components/network-icon/index.d.ts +1 -0
- package/dist/types/components/network-icon/network-indicator.d.ts +23 -0
- package/dist/types/components/skeleton/skeleton.d.ts +2 -2
- package/dist/types/components/status-dot/status-dot.d.ts +1 -1
- package/dist/types/components/table/index.d.ts +0 -5
- package/dist/types/components/text-button/text-button.d.ts +1 -1
- package/dist/types/components/tip-card/tip-card.d.ts +2 -2
- package/dist/types/components/token-symbol/token-symbol.d.ts +1 -1
- package/dist/types/components/trading-view/trading-view.d.ts +10 -3
- package/dist/types/components/vertical-indicator/vertical-indicator.d.ts +2 -2
- package/dist/types/components/with-title/with-title.d.ts +1 -1
- package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +6 -8
- package/dist/types/configs/tailwind-preset.d.ts +12 -0
- package/dist/types/hooks/index.d.ts +1 -1
- package/dist/types/hooks/use-observed-width-key.d.ts +8 -0
- package/dist/types/index.d.ts +6 -7
- package/dist/types/locale/en.json.d.ts +49 -11
- package/dist/types/types/index.d.ts +0 -2
- package/dist/types/utils/format-leverage.d.ts +5 -0
- package/dist/types/utils/format-money.d.ts +11 -5
- package/dist/types/utils/index.d.ts +3 -1
- package/dist/types/utils/leverage-presets.d.ts +7 -0
- package/package.json +3 -15
- package/src/styles/base.css +30 -0
- package/src/styles/theme.css +16 -0
- package/dist/cjs/components/auth/connect-required.cjs +0 -1
- package/dist/cjs/components/auth/index.cjs +0 -1
- package/dist/cjs/components/auth/signin-required.cjs +0 -1
- package/dist/cjs/components/auth/wallet-ui-context.cjs +0 -1
- package/dist/cjs/components/block-sync/block-sync.cjs +0 -1
- package/dist/cjs/components/block-sync/index.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.cjs +0 -1
- package/dist/cjs/components/image/image.cjs +0 -1
- package/dist/cjs/components/image/index.cjs +0 -1
- package/dist/cjs/components/layout/app-logo/app-logo.cjs +0 -1
- package/dist/cjs/components/layout/app-logo/index.cjs +0 -1
- package/dist/cjs/components/layout/block/block.cjs +0 -1
- package/dist/cjs/components/layout/block/index.cjs +0 -1
- package/dist/cjs/components/layout/footer/footer.cjs +0 -1
- package/dist/cjs/components/layout/footer/index.cjs +0 -1
- package/dist/cjs/components/layout/header/header.cjs +0 -1
- package/dist/cjs/components/layout/header/index.cjs +0 -1
- package/dist/cjs/components/layout/legal-disclaimer/index.cjs +0 -1
- package/dist/cjs/components/layout/legal-disclaimer/legal-disclaimer.cjs +0 -1
- package/dist/cjs/components/layout/page-layout/index.cjs +0 -1
- package/dist/cjs/components/layout/page-layout/page-layout.cjs +0 -1
- package/dist/cjs/components/layout/social-icons/index.cjs +0 -1
- package/dist/cjs/components/layout/social-icons/social-icons.cjs +0 -1
- package/dist/cjs/components/navbar/index.cjs +0 -1
- package/dist/cjs/components/navbar/navbar-indicator-context.cjs +0 -1
- package/dist/cjs/components/navbar/navbar-with-overflow.cjs +0 -1
- package/dist/cjs/components/navbar/navbar.cjs +0 -1
- package/dist/cjs/components/navitem/index.cjs +0 -1
- package/dist/cjs/components/navitem/navitem.cjs +0 -1
- package/dist/cjs/components/page-title/index.cjs +0 -1
- package/dist/cjs/components/page-title/page-title.cjs +0 -1
- package/dist/cjs/components/pool-apy-tooltip/apy-tooltip.cjs +0 -1
- package/dist/cjs/components/pool-apy-tooltip/index.cjs +0 -1
- package/dist/cjs/components/table/edit-button.cjs +0 -1
- package/dist/cjs/components/table/editable-grid-table.cjs +0 -1
- package/dist/cjs/components/table/editable-table.cjs +0 -1
- package/dist/cjs/components/table/grid-table-loader.cjs +0 -1
- package/dist/cjs/components/table/updated-value.cjs +0 -1
- package/dist/cjs/hooks/use-liquidation/index.cjs +0 -1
- package/dist/cjs/hooks/use-liquidation/utils.cjs +0 -1
- package/dist/cjs/test-ids/base.cjs +0 -1
- package/dist/cjs/test-ids/index.cjs +0 -1
- package/dist/cjs/types/help.cjs +0 -1
- package/dist/cjs/utils/reactochart-compat.cjs +0 -1
- package/dist/esm/components/auth/connect-required.js +0 -37
- package/dist/esm/components/auth/index.js +0 -9
- package/dist/esm/components/auth/signin-required.js +0 -55
- package/dist/esm/components/auth/wallet-ui-context.js +0 -13
- package/dist/esm/components/block-sync/block-sync.js +0 -208
- package/dist/esm/components/block-sync/index.js +0 -4
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +0 -186
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.js +0 -54
- package/dist/esm/components/image/image.js +0 -32
- package/dist/esm/components/image/index.js +0 -4
- package/dist/esm/components/layout/app-logo/app-logo.js +0 -99
- package/dist/esm/components/layout/app-logo/index.js +0 -5
- package/dist/esm/components/layout/block/block.js +0 -50
- package/dist/esm/components/layout/block/index.js +0 -4
- package/dist/esm/components/layout/footer/footer.js +0 -237
- package/dist/esm/components/layout/footer/index.js +0 -7
- package/dist/esm/components/layout/header/header.js +0 -93
- package/dist/esm/components/layout/header/index.js +0 -5
- package/dist/esm/components/layout/legal-disclaimer/index.js +0 -4
- package/dist/esm/components/layout/legal-disclaimer/legal-disclaimer.js +0 -46
- package/dist/esm/components/layout/page-layout/index.js +0 -4
- package/dist/esm/components/layout/page-layout/page-layout.js +0 -39
- package/dist/esm/components/layout/social-icons/index.js +0 -4
- package/dist/esm/components/layout/social-icons/social-icons.js +0 -61
- package/dist/esm/components/navbar/index.js +0 -11
- package/dist/esm/components/navbar/navbar-indicator-context.js +0 -46
- package/dist/esm/components/navbar/navbar-with-overflow.js +0 -181
- package/dist/esm/components/navbar/navbar.js +0 -99
- package/dist/esm/components/navitem/index.js +0 -5
- package/dist/esm/components/navitem/navitem.js +0 -124
- package/dist/esm/components/page-title/index.js +0 -6
- package/dist/esm/components/page-title/page-title.js +0 -120
- package/dist/esm/components/pool-apy-tooltip/apy-tooltip.js +0 -154
- package/dist/esm/components/pool-apy-tooltip/index.js +0 -4
- package/dist/esm/components/table/edit-button.js +0 -48
- package/dist/esm/components/table/editable-grid-table.js +0 -121
- package/dist/esm/components/table/editable-table.js +0 -108
- package/dist/esm/components/table/grid-table-loader.js +0 -22
- package/dist/esm/components/table/updated-value.js +0 -49
- package/dist/esm/hooks/use-liquidation/index.js +0 -138
- package/dist/esm/hooks/use-liquidation/utils.js +0 -144
- package/dist/esm/test-ids/base.js +0 -44
- package/dist/esm/test-ids/index.js +0 -46
- package/dist/esm/types/help.js +0 -1
- package/dist/esm/utils/reactochart-compat.js +0 -18
- package/dist/types/components/auth/connect-required.d.ts +0 -32
- package/dist/types/components/auth/index.d.ts +0 -3
- package/dist/types/components/auth/signin-required.d.ts +0 -37
- package/dist/types/components/auth/wallet-ui-context.d.ts +0 -36
- package/dist/types/components/block-sync/block-sync.d.ts +0 -8
- package/dist/types/components/block-sync/index.d.ts +0 -1
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.d.ts +0 -17
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.d.ts +0 -16
- package/dist/types/components/image/image.d.ts +0 -35
- package/dist/types/components/image/index.d.ts +0 -1
- package/dist/types/components/layout/app-logo/app-logo.d.ts +0 -26
- package/dist/types/components/layout/app-logo/index.d.ts +0 -1
- package/dist/types/components/layout/block/block.d.ts +0 -23
- package/dist/types/components/layout/block/index.d.ts +0 -1
- package/dist/types/components/layout/footer/footer.d.ts +0 -53
- package/dist/types/components/layout/footer/index.d.ts +0 -1
- package/dist/types/components/layout/header/header.d.ts +0 -123
- package/dist/types/components/layout/header/index.d.ts +0 -1
- package/dist/types/components/layout/legal-disclaimer/index.d.ts +0 -1
- package/dist/types/components/layout/legal-disclaimer/legal-disclaimer.d.ts +0 -32
- package/dist/types/components/layout/page-layout/index.d.ts +0 -1
- package/dist/types/components/layout/page-layout/page-layout.d.ts +0 -41
- package/dist/types/components/layout/social-icons/index.d.ts +0 -1
- package/dist/types/components/layout/social-icons/social-icons.d.ts +0 -7
- package/dist/types/components/navbar/index.d.ts +0 -3
- package/dist/types/components/navbar/navbar-indicator-context.d.ts +0 -13
- package/dist/types/components/navbar/navbar-with-overflow.d.ts +0 -20
- package/dist/types/components/navbar/navbar.d.ts +0 -25
- package/dist/types/components/navitem/index.d.ts +0 -1
- package/dist/types/components/navitem/navitem.d.ts +0 -67
- package/dist/types/components/page-title/index.d.ts +0 -1
- package/dist/types/components/page-title/page-title.d.ts +0 -77
- package/dist/types/components/pool-apy-tooltip/apy-tooltip.d.ts +0 -20
- package/dist/types/components/pool-apy-tooltip/index.d.ts +0 -1
- package/dist/types/components/table/edit-button.d.ts +0 -51
- package/dist/types/components/table/editable-grid-table.d.ts +0 -120
- package/dist/types/components/table/editable-table.d.ts +0 -101
- package/dist/types/components/table/grid-table-loader.d.ts +0 -25
- package/dist/types/components/table/updated-value.d.ts +0 -34
- package/dist/types/hooks/use-liquidation/index.d.ts +0 -53
- package/dist/types/hooks/use-liquidation/types.d.ts +0 -16
- package/dist/types/hooks/use-liquidation/utils.d.ts +0 -71
- package/dist/types/test-ids/base.d.ts +0 -20
- package/dist/types/test-ids/index.d.ts +0 -9
- package/dist/types/types/component-props.d.ts +0 -16
- package/dist/types/types/help.d.ts +0 -4
- package/dist/types/types/reactochart.d.ts +0 -145
- package/dist/types/utils/reactochart-compat.d.ts +0 -12
- /package/dist/cjs/{hooks/use-liquidation → components/base-table}/types.cjs +0 -0
- /package/dist/cjs/{test-ids/notification-center.cjs → components/composites/notification-center/constants.cjs} +0 -0
- /package/dist/cjs/{types/component-props.cjs → components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.cjs} +0 -0
- /package/dist/esm/{hooks/use-liquidation → components/base-table}/types.js +0 -0
- /package/dist/esm/{test-ids/notification-center.js → components/composites/notification-center/constants.js} +0 -0
- /package/dist/esm/{types/component-props.js → components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.js} +0 -0
- /package/dist/types/{test-ids/notification-center.d.ts → components/composites/notification-center/constants.d.ts} +0 -0
package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ApyBreakdown, Bps, Leverage } from '@gearbox-protocol/sdk/model';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { StrategyApyBreakdownCardTest } from './constants';
|
|
4
|
+
export { StrategyApyBreakdownCardTest };
|
|
5
|
+
export interface StrategyApyBreakdownData {
|
|
6
|
+
readonly collateralApy?: ApyBreakdown;
|
|
7
|
+
readonly borrowApy?: Bps;
|
|
8
|
+
readonly additionalBorrowApy?: Bps;
|
|
9
|
+
readonly maxLeverage?: Leverage;
|
|
10
|
+
}
|
|
11
|
+
export interface StrategyApyBreakdownCardProps {
|
|
12
|
+
readonly data: StrategyApyBreakdownData;
|
|
13
|
+
/** Selected leverage from the chart toolbar chips. Falls back to max. */
|
|
14
|
+
readonly leverage?: Leverage;
|
|
15
|
+
}
|
|
16
|
+
/** Net APY formula beside the strategy yield chart. Chart itself is unchanged. */
|
|
17
|
+
export declare function StrategyApyBreakdownCard({ data, leverage: leverageProp, }: StrategyApyBreakdownCardProps): React.ReactElement;
|
|
@@ -9,8 +9,15 @@ export interface TabberSectionProps {
|
|
|
9
9
|
readonly heading?: TitleText;
|
|
10
10
|
readonly actions?: React.ReactNode;
|
|
11
11
|
readonly children?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Render this section above the sticky tab bar (overview badges). The tab
|
|
14
|
+
* still appears in the bar and scroll-spy still tracks the section.
|
|
15
|
+
*/
|
|
16
|
+
readonly beforeBar?: boolean;
|
|
17
|
+
/** Skip the in-section h2 — overview has badges, not a heading. */
|
|
18
|
+
readonly hideHeading?: boolean;
|
|
12
19
|
}
|
|
13
|
-
export declare function TabberSection({ id, title, heading, actions, children, }: TabberSectionProps): React.ReactElement;
|
|
20
|
+
export declare function TabberSection({ id, title, heading, actions, children, hideHeading, }: TabberSectionProps): React.ReactElement;
|
|
14
21
|
export declare namespace TabberSection {
|
|
15
22
|
var displayName: string;
|
|
16
23
|
}
|
|
@@ -19,6 +26,8 @@ export interface TabberProps {
|
|
|
19
26
|
readonly observeKey?: string;
|
|
20
27
|
readonly initialSection?: string;
|
|
21
28
|
readonly testId?: string;
|
|
29
|
+
/** Injected by {@link DetailsViewLeftPane} on narrow screens. */
|
|
30
|
+
readonly mobileManagePane?: React.ReactNode;
|
|
22
31
|
}
|
|
23
|
-
export declare function Tabber({ children, observeKey, initialSection, testId, }: TabberProps): React.ReactElement;
|
|
32
|
+
export declare function Tabber({ children, observeKey, initialSection, testId, mobileManagePane, }: TabberProps): React.ReactElement;
|
|
24
33
|
export declare function isTabber(node: React.ReactNode): boolean;
|
|
@@ -5,12 +5,12 @@ import { TimeToLiquidationBlockTest } from './constants';
|
|
|
5
5
|
export { TimeToLiquidationBlockTest };
|
|
6
6
|
export interface TimeToLiquidationBlockProps {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* (value not available).
|
|
8
|
+
* SDK `timeToLiquidation` in milliseconds; `null` renders "N/A", omit to
|
|
9
|
+
* render "—" (value not available).
|
|
10
10
|
*/
|
|
11
|
-
readonly
|
|
11
|
+
readonly data?: bigint | null;
|
|
12
12
|
/** Time after the operation; renders a from → to transition. */
|
|
13
|
-
readonly
|
|
13
|
+
readonly dataTo?: bigint | null;
|
|
14
14
|
/** Pre-computed zone; if not set, derived from the value. */
|
|
15
15
|
readonly zone?: TTLZones;
|
|
16
16
|
readonly isLoading?: boolean;
|
|
@@ -23,6 +23,5 @@ export interface TimeToLiquidationBlockProps {
|
|
|
23
23
|
/**
|
|
24
24
|
* "Time to liquidation" row of a preview: label + help tip, the remaining
|
|
25
25
|
* time as `Nmo` / `Nd` / `<1d` with a zone dot, optionally from → to.
|
|
26
|
-
* Design only — the reference `TimeToLiquidationBlock` markup on value props.
|
|
27
26
|
*/
|
|
28
|
-
export declare function TimeToLiquidationBlock({
|
|
27
|
+
export declare function TimeToLiquidationBlock({ data, dataTo, zone, isLoading, title, tip, testId, }: TimeToLiquidationBlockProps): React.ReactElement;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Token } from '@gearbox-protocol/sdk/model';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { NetworkIcons } from '../../../utils/network-icons';
|
|
4
|
+
import { TitleMetaTest } from './constants';
|
|
5
|
+
export { TitleMetaTest };
|
|
6
|
+
export interface TitleMetaLink {
|
|
7
|
+
readonly href: string;
|
|
8
|
+
readonly token?: Token;
|
|
9
|
+
readonly label?: string;
|
|
10
|
+
readonly onClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface TitleMetaProps {
|
|
13
|
+
readonly network: NetworkIcons;
|
|
14
|
+
readonly curatorName: string | undefined;
|
|
15
|
+
readonly curatorLink: string | undefined;
|
|
16
|
+
readonly onCuratorLinkClick?: () => void;
|
|
17
|
+
readonly links?: ReadonlyArray<TitleMetaLink>;
|
|
18
|
+
readonly testId?: string;
|
|
19
|
+
readonly networkTestId?: string;
|
|
20
|
+
readonly curatorTestId?: string;
|
|
21
|
+
}
|
|
22
|
+
/** Network + curator row under a detail-page title. */
|
|
23
|
+
export declare function TitleMeta({ network, curatorName, curatorLink, onCuratorLinkClick, links, testId, networkTestId, curatorTestId, }: TitleMetaProps): React.ReactElement;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Amount, Token, TokenAmount as TokenAmountModel } from '@gearbox-protocol/sdk/model';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
+
import { StackAlign } from '../stack';
|
|
3
4
|
import { TokenAmountTest } from './constants';
|
|
4
5
|
export { TokenAmountTest };
|
|
6
|
+
export type TokenAmountAlign = Extract<StackAlign, "start" | "end">;
|
|
5
7
|
/**
|
|
6
8
|
* An amount of a token, with its USD value underneath.
|
|
7
9
|
*
|
|
@@ -10,7 +12,7 @@ export { TokenAmountTest };
|
|
|
10
12
|
* `totalSupply` / `totalBorrow`, implicitly in the market underlying) name their
|
|
11
13
|
* token alongside.
|
|
12
14
|
*/
|
|
13
|
-
|
|
15
|
+
type TokenAmountDataProps = {
|
|
14
16
|
/** `null` means unavailable and renders an em-dash. */
|
|
15
17
|
readonly data: TokenAmountModel | null;
|
|
16
18
|
readonly token?: undefined;
|
|
@@ -18,4 +20,8 @@ export type TokenAmountProps = {
|
|
|
18
20
|
readonly data: Amount | null;
|
|
19
21
|
readonly token: Token;
|
|
20
22
|
};
|
|
21
|
-
export
|
|
23
|
+
export type TokenAmountProps = TokenAmountDataProps & {
|
|
24
|
+
/** Cross-axis alignment of the token line and the USD caption. */
|
|
25
|
+
readonly align?: TokenAmountAlign;
|
|
26
|
+
};
|
|
27
|
+
export declare function TokenAmount({ data, token, align, }: TokenAmountProps): React.ReactElement;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TokenSymbolProps } from '../../token-symbol';
|
|
3
|
+
import { TokenPairSymbolTest } from './constants';
|
|
4
|
+
export { TokenPairSymbolTest };
|
|
5
|
+
export interface TokenPairSymbolProps {
|
|
6
|
+
/** Collateral / strategy token (left). */
|
|
7
|
+
readonly collateral: TokenSymbolProps["token"] | undefined;
|
|
8
|
+
/** Debt / underlying token (right). */
|
|
9
|
+
readonly underlying: TokenSymbolProps["token"] | undefined;
|
|
10
|
+
readonly size?: number;
|
|
11
|
+
readonly offset?: number;
|
|
12
|
+
readonly className?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Two token icons overlapping: collateral in front, underlying behind. */
|
|
15
|
+
export declare function TokenPairSymbol({ collateral, underlying, size, offset, className, }: TokenPairSymbolProps): React.ReactElement | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TokenPairTitleTest } from './constants';
|
|
3
|
+
export { TokenPairTitleTest };
|
|
4
|
+
export interface TokenPairTitleProps {
|
|
5
|
+
/** Collateral / strategy side of the title. */
|
|
6
|
+
readonly name: React.ReactNode;
|
|
7
|
+
/** Debt side symbol; hidden when undefined. */
|
|
8
|
+
readonly debtSymbol?: string;
|
|
9
|
+
}
|
|
10
|
+
/** "Collateral / debt" title: names separated by a muted slash. */
|
|
11
|
+
export declare function TokenPairTitle({ name, debtSymbol, }: TokenPairTitleProps): React.ReactElement;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { ValueTest } from './constants';
|
|
2
2
|
export { PnlValue } from './pnl-value';
|
|
3
|
+
export { PointsValue, type PointsValueProps } from './points-value';
|
|
3
4
|
export { PositionShortLabel, PositionShortLabelTest, } from './position-short-label';
|
|
5
|
+
export { type PositionStatus, PositionStatusBadge, type PositionStatusBadgeProps, } from './position-status-badge';
|
|
4
6
|
export { PositionTypeBadge, type PositionTypeBadgeProps, } from './position-type-badge';
|
|
5
|
-
export { ApyValue, type ApyValueProps, HealthFactorValue, LeverageValue, TokenBigint, UsdValue, UtilizationValue, } from './scalars';
|
|
7
|
+
export { ApyValue, type ApyValueProps, bps, HealthFactorValue, LeverageValue, TokenBigint, UsdValue, UtilizationValue, } from './scalars';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ApyBreakdown } from '@gearbox-protocol/sdk/model';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export interface PointsValueProps {
|
|
4
|
+
/** SDK APY breakdown; `undefined` or no point programs render nothing. */
|
|
5
|
+
readonly data: ApyBreakdown | undefined;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Point programs attached to an APY breakdown: icon + name for each program.
|
|
9
|
+
* Returns `null` when the SDK has none.
|
|
10
|
+
*/
|
|
11
|
+
export declare function PointsValue({ data, }: PointsValueProps): React.ReactElement | null;
|
|
@@ -2,7 +2,7 @@ import { StrategyPosition } from '@gearbox-protocol/sdk/model';
|
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { PositionShortLabelTest } from './constants';
|
|
4
4
|
export { PositionShortLabelTest };
|
|
5
|
-
/** "wstETH / WETH · 2.
|
|
5
|
+
/** "wstETH / WETH · 2.50x" — one open position, in a menu row. */
|
|
6
6
|
export declare function PositionShortLabel({ data, }: {
|
|
7
7
|
readonly data: StrategyPosition;
|
|
8
8
|
}): React.ReactElement;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type PositionStatus = "active" | "repaid";
|
|
3
|
+
export interface PositionStatusBadgeProps {
|
|
4
|
+
readonly data: PositionStatus;
|
|
5
|
+
}
|
|
6
|
+
/** Lifecycle chip of a strategy position: Active or Repaid. */
|
|
7
|
+
export declare function PositionStatusBadge({ data, }: PositionStatusBadgeProps): React.ReactElement;
|
|
@@ -3,9 +3,9 @@ import { default as React } from 'react';
|
|
|
3
3
|
export interface PositionTypeBadgeProps {
|
|
4
4
|
/** The SDK's `Position.kind`. */
|
|
5
5
|
readonly data: PositionKind;
|
|
6
|
-
readonly size?: "table" | "aside";
|
|
6
|
+
readonly size?: "table" | "aside" | "title";
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* Colored kind label of a position row: "
|
|
9
|
+
* Colored kind label of a position row: "LP" / "Strategy" / "Liquidation".
|
|
10
10
|
*/
|
|
11
11
|
export declare function PositionTypeBadge({ data, size, }: PositionTypeBadgeProps): React.ReactElement;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { ApyBreakdown, Bps, Leverage, Token } from '@gearbox-protocol/sdk/model';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Basis points as a percentage (`10000` = 100%); the model's `Bps` is `number`.
|
|
5
|
+
*
|
|
6
|
+
* Self-contained on purpose: `percentageTemplate` (format-money) carries a
|
|
7
|
+
* same-named, oppositely-scaled twin in `templates.tsx` (already-percent
|
|
8
|
+
* input), so a shared bps→percent step here would inherit that ambiguity.
|
|
9
|
+
* `bps` is the one place that owns the conversion.
|
|
10
|
+
*/
|
|
11
|
+
export declare function bps(value: Bps): string;
|
|
3
12
|
export interface ApyValueProps {
|
|
4
13
|
/** A breakdown (tooltip-able) or a bare rate; `undefined` renders a dash. */
|
|
5
14
|
readonly data: ApyBreakdown | Bps | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const linkVariants: (props?: ({
|
|
4
|
-
size?: "default" | "unset" | "
|
|
4
|
+
size?: "default" | "unset" | "sm" | "xs" | null | undefined;
|
|
5
5
|
variant?: "default" | "unset" | "underlined" | null | undefined;
|
|
6
6
|
color?: "main" | "default" | "secondary" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { BaseTableColumn } from './types';
|
|
3
|
+
export { BaseTableLineTest } from './constants';
|
|
4
|
+
export interface BaseTableLineProps<TSort extends string = never> {
|
|
5
|
+
readonly columns: ReadonlyArray<BaseTableColumn<TSort>>;
|
|
6
|
+
readonly cells: Readonly<Record<string, ReactNode>>;
|
|
7
|
+
readonly last: boolean;
|
|
8
|
+
readonly href?: string;
|
|
9
|
+
readonly disabled?: boolean;
|
|
10
|
+
readonly disabledStyle?: boolean;
|
|
11
|
+
/** Extra row className, e.g. RWA accent tint. */
|
|
12
|
+
readonly accentClassName?: string;
|
|
13
|
+
readonly onRowClick?: () => void;
|
|
14
|
+
readonly "data-testid"?: string;
|
|
15
|
+
readonly minHeightClassName?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* One row of {@link BaseTable}: desktop cells from the column model, or a
|
|
19
|
+
* stacked mobile card driven by each column's `mobile` role.
|
|
20
|
+
*/
|
|
21
|
+
export declare function BaseTableLine<TSort extends string = never>({ columns, cells, last, href, disabled, disabledStyle, accentClassName, onRowClick, "data-testid": testId, minHeightClassName, }: BaseTableLineProps<TSort>): React.ReactElement;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { BaseTableColumn, BaseTableSortApi } from './types';
|
|
3
|
+
export { BaseTableTest } from './constants';
|
|
4
|
+
export type { BaseTableColumn, BaseTableSortApi } from './types';
|
|
5
|
+
export interface BaseTableProps<TSort extends string = never> {
|
|
6
|
+
readonly columns: ReadonlyArray<BaseTableColumn<TSort>>;
|
|
7
|
+
readonly isLoading: boolean;
|
|
8
|
+
readonly emptyMessage: ReactNode;
|
|
9
|
+
readonly sort?: BaseTableSortApi<TSort>;
|
|
10
|
+
readonly rowHeight?: string;
|
|
11
|
+
readonly loaderRows?: number;
|
|
12
|
+
readonly className?: string;
|
|
13
|
+
readonly wrapperClassName?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Declarative data table over {@link GridTable}: column model, sort headers,
|
|
17
|
+
* loading skeleton and empty state. Mobile collapses to a single track.
|
|
18
|
+
*/
|
|
19
|
+
export declare function BaseTable<TSort extends string = never>({ columns, isLoading, emptyMessage, sort, rowHeight, loaderRows, className, wrapperClassName, children, }: PropsWithChildren<BaseTableProps<TSort>>): React.ReactElement;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type BaseTableColumnJustify = "start" | "end";
|
|
3
|
+
/**
|
|
4
|
+
* Mobile placement for a column inside {@link BaseTableLine}:
|
|
5
|
+
* - `title` — primary identity block (name / tokens)
|
|
6
|
+
* - `badge` — compact chip next to the title (also unclipped on desktop)
|
|
7
|
+
* - `stat` — labeled metric in the stats grid
|
|
8
|
+
* - `block` — full-width labeled block under the stats
|
|
9
|
+
* - `hidden` — desktop-only
|
|
10
|
+
*/
|
|
11
|
+
type BaseTableColumnMobile = "title" | "badge" | "stat" | "block" | "hidden";
|
|
12
|
+
interface BaseTableColumnSort<TSort extends string = never> {
|
|
13
|
+
readonly field: TSort;
|
|
14
|
+
readonly defaultDirection: "asc" | "desc";
|
|
15
|
+
/** Plain string for HeadCell `sortField` (a11y / tooltip). */
|
|
16
|
+
readonly label: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Column model shared by {@link BaseTable} (tracks + header) and
|
|
20
|
+
* {@link BaseTableLine} (desktop cells + mobile labels).
|
|
21
|
+
*/
|
|
22
|
+
export interface BaseTableColumn<TSort extends string = never> {
|
|
23
|
+
readonly id: string;
|
|
24
|
+
readonly title: ReactNode;
|
|
25
|
+
/** CSS grid track, e.g. `"minmax(320px,3fr)"`. */
|
|
26
|
+
readonly track: string;
|
|
27
|
+
readonly justify?: BaseTableColumnJustify;
|
|
28
|
+
readonly sort?: BaseTableColumnSort<TSort>;
|
|
29
|
+
readonly headClassName?: string;
|
|
30
|
+
readonly cellClassName?: string;
|
|
31
|
+
readonly mobile?: BaseTableColumnMobile;
|
|
32
|
+
}
|
|
33
|
+
export interface BaseTableSortApi<TSort extends string> {
|
|
34
|
+
readonly getSortDirection: (field: TSort) => "asc" | "desc" | undefined;
|
|
35
|
+
readonly onSort: (field: TSort, defaultDirection: "asc" | "desc") => void;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "text" | "default" | "success" | "destructive" | "
|
|
5
|
-
size?: "auto" | "default" | "icon" | "
|
|
4
|
+
variant?: "link" | "text" | "default" | "success" | "destructive" | "blue" | "pink" | "white" | "secondary" | "ghost" | "outline" | "neutral" | "pink-outline" | "blue-outline" | null | undefined;
|
|
5
|
+
size?: "auto" | "default" | "icon" | "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
6
6
|
width?: "compact" | "wide" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
/**
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
declare const checkboxVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "md" | "lg" | null | undefined;
|
|
6
6
|
color?: "primary" | "secondary" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
export type CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> & VariantProps<typeof checkboxVariants>;
|
|
@@ -25,7 +25,7 @@ export type CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimit
|
|
|
25
25
|
* - for toggle switches (use Switch component if available).
|
|
26
26
|
*/
|
|
27
27
|
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
28
|
-
size?: "
|
|
28
|
+
size?: "md" | "lg" | null | undefined;
|
|
29
29
|
color?: "primary" | "secondary" | null | undefined;
|
|
30
30
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
31
31
|
export { Checkbox };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface AllocationWheelProps {
|
|
3
|
+
/** Slice share in 0..1 of the total allocation. */
|
|
4
|
+
readonly share: number;
|
|
5
|
+
/** Palette index for token slices; ignored when {@link idle}. */
|
|
6
|
+
readonly colorIndex: number;
|
|
7
|
+
readonly idle?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** 20px donut showing one slice's share of the total. */
|
|
10
|
+
export declare function AllocationWheel({ share, colorIndex, idle, }: AllocationWheelProps): React.ReactElement;
|
package/dist/types/components/collateral-allocation-tooltip/collateral-allocation-tooltip.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Amount, Token } from '@gearbox-protocol/sdk/model';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export type CollateralAllocationSlice = {
|
|
4
|
+
kind: "token";
|
|
5
|
+
token: Token;
|
|
6
|
+
amount: Amount;
|
|
7
|
+
} | {
|
|
8
|
+
kind: "idle";
|
|
9
|
+
amount: Amount;
|
|
10
|
+
};
|
|
11
|
+
export interface CollateralAllocation {
|
|
12
|
+
slices: ReadonlyArray<CollateralAllocationSlice>;
|
|
13
|
+
}
|
|
14
|
+
export interface CollateralAllocationTooltipProps {
|
|
15
|
+
readonly data: CollateralAllocation;
|
|
16
|
+
readonly children?: React.ReactNode;
|
|
17
|
+
readonly className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Pool collateral mix for Earn table hover — token rows plus an Idle remainder.
|
|
21
|
+
* Slice shares are derived from `amount.valueUsd`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function CollateralAllocationTooltip({ data, children, className, }: CollateralAllocationTooltipProps): React.ReactElement;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { PoolAssetsTableSort } from './types';
|
|
3
|
-
/** Props for {@link PoolAssetsTableHead}. */
|
|
4
3
|
export interface PoolAssetsTableHeadProps {
|
|
5
4
|
readonly sort: PoolAssetsTableSort;
|
|
6
5
|
}
|
|
7
6
|
/**
|
|
8
|
-
* Header row: sortable
|
|
7
|
+
* Header row: sortable Name / Exposure / Cap / Cap utilization.
|
|
9
8
|
*/
|
|
10
9
|
export declare function PoolAssetsTableHead({ sort, }: PoolAssetsTableHeadProps): React.ReactElement;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuotaAsset, Token } from '@gearbox-protocol/sdk/model';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
import { PoolAssetsTableQuotaRow } from './types';
|
|
4
|
-
/** Props for {@link PoolAssetsTableRow}. */
|
|
5
3
|
export interface PoolAssetsTableRowProps {
|
|
6
4
|
readonly poolName: string;
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly underlyingToken: TokenData;
|
|
5
|
+
readonly asset: QuotaAsset;
|
|
6
|
+
readonly underlyingToken: Token;
|
|
10
7
|
readonly last: boolean;
|
|
8
|
+
readonly isCompact: boolean;
|
|
9
|
+
readonly totalUsed: bigint;
|
|
10
|
+
readonly colorIndex: number;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Single data row: token
|
|
13
|
+
* Single data row: token name, exposure (amount + pie), cap, and cap utilization.
|
|
14
14
|
*/
|
|
15
|
-
export declare function PoolAssetsTableRow({ poolName,
|
|
15
|
+
export declare function PoolAssetsTableRow({ poolName, asset, underlyingToken, last, isCompact, totalUsed, colorIndex, }: PoolAssetsTableRowProps): React.ReactElement;
|
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuotaAsset, Token } from '@gearbox-protocol/sdk/model';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { PoolAssetsTableQuotaRow, PoolAssetsTableSort } from './types';
|
|
5
|
-
/**
|
|
6
|
-
* Props for {@link PoolAssetsTable}.
|
|
7
|
-
*/
|
|
3
|
+
import { PoolAssetsTableSort } from './types';
|
|
8
4
|
export interface PoolAssetsTableProps {
|
|
9
|
-
|
|
10
|
-
readonly list: ReadonlyArray<PoolAssetsTableQuotaRow>;
|
|
11
|
-
/** Pool name shown under the asset title. */
|
|
5
|
+
readonly list: ReadonlyArray<QuotaAsset>;
|
|
12
6
|
readonly poolName: string;
|
|
13
7
|
readonly sort: PoolAssetsTableSort;
|
|
14
|
-
|
|
15
|
-
readonly tokensList: Partial<Record<Address, TokenData>>;
|
|
16
|
-
/** Underlying asset used for `TokenTemplate` amounts in the usage column. */
|
|
17
|
-
readonly underlyingToken: TokenData;
|
|
8
|
+
readonly underlyingToken: Token;
|
|
18
9
|
}
|
|
19
10
|
/**
|
|
20
|
-
* Grid table of pool asset quotas:
|
|
21
|
-
*
|
|
22
|
-
* uses the compact `TableLineSm` layout.
|
|
11
|
+
* Grid table of pool asset quotas: exposure, cap, and cap utilization.
|
|
12
|
+
* Collapses into stacked cards below {@link COMPACT_WIDTH_THRESHOLD}.
|
|
23
13
|
*/
|
|
24
|
-
export declare function PoolAssetsTable({ list, poolName, sort,
|
|
14
|
+
export declare function PoolAssetsTable({ list, poolName, sort, underlyingToken, }: PoolAssetsTableProps): React.ReactElement | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuotaAsset } from '@gearbox-protocol/sdk/model';
|
|
2
2
|
import { SortField, SortSetterFunction } from '../../../hooks';
|
|
3
3
|
/** Column identifiers used by the pool assets table header sort controls. */
|
|
4
|
-
export type PoolAssetsSortFields = "name" | "
|
|
4
|
+
export type PoolAssetsSortFields = "name" | "exposure" | "cap" | "capUtilization";
|
|
5
5
|
/**
|
|
6
6
|
* Sort state + setter wired to `HeadCell` / `useSort` (same pattern as `PoolTable`).
|
|
7
7
|
*/
|
|
@@ -13,13 +13,5 @@ export interface PoolAssetsTableSort {
|
|
|
13
13
|
export interface PoolAssetsFilterState {
|
|
14
14
|
readonly sort: PoolAssetsTableSort;
|
|
15
15
|
}
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
* Shape aligns with Gearbox SDK quota / QuotaInfo-style data.
|
|
19
|
-
*/
|
|
20
|
-
export interface PoolAssetsTableQuotaRow {
|
|
21
|
-
readonly token: Address;
|
|
22
|
-
readonly limit: bigint;
|
|
23
|
-
readonly totalQuoted: bigint;
|
|
24
|
-
readonly rate: bigint;
|
|
25
|
-
}
|
|
16
|
+
/** One quota row — the SDK's {@link QuotaAsset}. */
|
|
17
|
+
export type PoolAssetsTableQuotaRow = QuotaAsset;
|