@gearbox-protocol/ui-kit 4.0.0-next.2 → 4.0.0-next.21
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/token-select-panel.cjs +1 -1
- package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -1
- package/dist/cjs/components/base/chart-with-side-card/chart-with-side-card.cjs +1 -1
- package/dist/cjs/components/base/detailed-page-title/detailed-page-title.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/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-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/manage-pane.cjs +1 -1
- 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/pool-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/position-assets/constants.cjs +1 -0
- package/dist/cjs/components/base/position-assets/index.cjs +1 -0
- package/dist/cjs/components/base/position-assets/position-assets.cjs +1 -0
- package/dist/cjs/components/base/review-button/constants.cjs +1 -1
- package/dist/cjs/components/base/review-button/review-button.cjs +1 -1
- package/dist/cjs/components/base/stat-badge/constants.cjs +1 -1
- package/dist/cjs/components/base/stat-badge/stat-badge.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/constants.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
- 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 -1
- package/dist/cjs/components/base/title-meta/title-meta.cjs +1 -1
- package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
- 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/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/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/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/dialog/transactionConfirmShellTypes.cjs +1 -0
- 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/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/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/app-footer/app-footer.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/sdk-status-pill/constants.cjs +1 -0
- package/dist/cjs/components/sdk-status-pill/index.cjs +1 -0
- package/dist/cjs/components/sdk-status-pill/sdk-status-pill.cjs +1 -0
- package/dist/cjs/components/sdk-status-pill/sdk-status.cjs +1 -0
- 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-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/token-select-panel.js +33 -37
- package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +32 -25
- package/dist/esm/components/base/chart-with-side-card/chart-with-side-card.js +6 -6
- package/dist/esm/components/base/detailed-page-title/detailed-page-title.js +26 -27
- package/dist/esm/components/base/health-factor-block/health-factor-block.js +25 -25
- package/dist/esm/components/base/history-chart/history-chart.js +82 -41
- package/dist/esm/components/base/index.js +156 -141
- package/dist/esm/components/base/info-list/index.js +5 -4
- package/dist/esm/components/base/info-list/info-list.js +52 -27
- package/dist/esm/components/base/leverage-input/leverage-input.js +18 -20
- 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-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/manage-pane.js +154 -113
- package/dist/esm/components/base/page-title/index.js +5 -4
- package/dist/esm/components/base/page-title/page-title.js +31 -23
- package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +23 -30
- package/dist/esm/components/base/position-assets/constants.js +8 -0
- package/dist/esm/components/base/position-assets/index.js +6 -0
- package/dist/esm/components/base/position-assets/position-assets.js +96 -0
- package/dist/esm/components/base/review-button/constants.js +3 -2
- package/dist/esm/components/base/review-button/review-button.js +35 -22
- package/dist/esm/components/base/stat-badge/constants.js +1 -0
- package/dist/esm/components/base/stat-badge/stat-badge.js +91 -47
- package/dist/esm/components/base/strategy-apy-breakdown-card/constants.js +8 -3
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +191 -29
- package/dist/esm/components/base/tabber/tabber.js +67 -64
- 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 +1 -0
- package/dist/esm/components/base/title-meta/title-meta.js +53 -33
- package/dist/esm/components/base/token-amount/token-amount.js +17 -16
- 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/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 +58 -32
- 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/checkbox/checkbox-labeled.js +25 -20
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +25 -20
- 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/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 -30
- 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 -26
- 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/dialog/transactionConfirmShellTypes.js +1 -0
- 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 +88 -82
- package/dist/esm/components/detailed-page-title/detailed-page-title-explorer-dropdown.js +50 -41
- 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 +72 -88
- package/dist/esm/components/graph/graph.js +459 -458
- package/dist/esm/components/hf-indicator/hf-indicator.js +59 -0
- package/dist/esm/components/hf-indicator/index.js +4 -0
- package/dist/esm/components/index.js +739 -695
- 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/app-footer/app-footer.js +20 -23
- 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/sdk-status-pill/constants.js +8 -0
- package/dist/esm/components/sdk-status-pill/index.js +8 -0
- package/dist/esm/components/sdk-status-pill/sdk-status-pill.js +59 -0
- package/dist/esm/components/sdk-status-pill/sdk-status.js +6 -0
- package/dist/esm/components/trading-view/trading-view.js +193 -155
- package/dist/esm/components/with-copy/with-copy.js +25 -20
- package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +114 -171
- package/dist/esm/configs/tailwind-preset.js +13 -1
- package/dist/esm/hooks/index.js +20 -18
- package/dist/esm/hooks/use-observed-width-key.js +24 -0
- package/dist/esm/index.js +896 -842
- package/dist/esm/locale/en.json.js +28 -25
- 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 +3 -2
- package/dist/types/components/base/amount-input/token-select-panel.d.ts +4 -3
- package/dist/types/components/base/borrow-rate-block/borrow-rate-block.d.ts +10 -5
- package/dist/types/components/base/detailed-page-title/detailed-page-title.d.ts +1 -3
- 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 +32 -8
- package/dist/types/components/base/index.d.ts +2 -0
- package/dist/types/components/base/info-list/info-list.d.ts +7 -0
- package/dist/types/components/base/leverage-input/leverage-input.d.ts +1 -1
- 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/liquidation-params-table.d.ts +2 -2
- 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 +3 -1
- package/dist/types/components/base/page-title/page-title.d.ts +12 -6
- package/dist/types/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.d.ts +4 -5
- package/dist/types/components/base/position-assets/constants.d.ts +5 -0
- package/dist/types/components/base/position-assets/index.d.ts +2 -0
- package/dist/types/components/base/position-assets/position-assets.d.ts +55 -0
- package/dist/types/components/base/review-button/constants.d.ts +1 -0
- package/dist/types/components/base/review-button/review-button.d.ts +17 -3
- package/dist/types/components/base/stat-badge/constants.d.ts +1 -0
- package/dist/types/components/base/stat-badge/stat-badge.d.ts +11 -1
- package/dist/types/components/base/strategy-apy-breakdown-card/constants.d.ts +6 -1
- package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +43 -4
- package/dist/types/components/base/tabber/tabber.d.ts +2 -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 +1 -0
- package/dist/types/components/base/title-meta/title-meta.d.ts +9 -1
- package/dist/types/components/base/token-amount/token-amount.d.ts +8 -2
- 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 +1 -1
- package/dist/types/components/base/values/scalars.d.ts +30 -2
- 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/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 -20
- 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/compound-apy/compound-apy.d.ts +12 -2
- 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/hf-indicator/hf-indicator.d.ts +17 -0
- package/dist/types/components/hf-indicator/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +6 -1
- 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/layout/app-footer/app-footer.d.ts +9 -15
- 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/sdk-status-pill/constants.d.ts +5 -0
- package/dist/types/components/sdk-status-pill/index.d.ts +3 -0
- package/dist/types/components/sdk-status-pill/sdk-status-pill.d.ts +27 -0
- package/dist/types/components/sdk-status-pill/sdk-status.d.ts +11 -0
- package/dist/types/components/trading-view/trading-view.d.ts +14 -7
- package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +8 -10
- package/dist/types/configs/tailwind-preset.d.ts +12 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/use-observed-width-key.d.ts +8 -0
- package/dist/types/index.d.ts +7 -3
- package/dist/types/locale/en.json.d.ts +28 -23
- package/dist/types/types/index.d.ts +0 -1
- 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 +6 -6
- package/src/styles/base.css +30 -0
- package/src/styles/theme.css +16 -0
- package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +0 -1
- package/dist/cjs/components/block-sync-pill/block-sync-status.cjs +0 -1
- package/dist/cjs/components/block-sync-pill/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/esm/components/block-sync-pill/block-sync-pill.js +0 -206
- package/dist/esm/components/block-sync-pill/block-sync-status.js +0 -12
- package/dist/esm/components/block-sync-pill/index.js +0 -4
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +0 -176
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.js +0 -54
- package/dist/types/components/block-sync-pill/block-sync-pill.d.ts +0 -35
- package/dist/types/components/block-sync-pill/block-sync-status.d.ts +0 -29
- package/dist/types/components/block-sync-pill/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/types/footer.d.ts +0 -51
- /package/dist/cjs/{types/footer.cjs → components/base-table/types.cjs} +0 -0
- /package/dist/esm/{types/footer.js → components/base-table/types.js} +0 -0
|
@@ -1,61 +1,87 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { formatUnits as u } from "viem";
|
|
3
|
+
import { CompoundAPY as p } from "../../compound-apy/compound-apy.js";
|
|
4
|
+
import { SimpleTooltip as a } from "../../tooltip/simple-tooltip.js";
|
|
5
|
+
import "../../tooltip/tooltip.js";
|
|
3
6
|
import "react";
|
|
4
7
|
import "@gearbox-protocol/sdk";
|
|
5
8
|
import { cn as c } from "../../../utils/cn.js";
|
|
6
9
|
import "sonner";
|
|
7
|
-
import {
|
|
10
|
+
import { formatAssetAmount as d } from "../../../utils/format-asset-amount.js";
|
|
11
|
+
import { formatLeverage as f } from "../../../utils/format-leverage.js";
|
|
12
|
+
import { formatPercentAmount as h, formatMoney as v } from "../../../utils/format-money.js";
|
|
8
13
|
import "@gearbox-protocol/sdk/common-utils";
|
|
9
14
|
import "luxon";
|
|
10
15
|
import "../../../utils/z-index.js";
|
|
11
16
|
import { ValueTest as i } from "./constants.js";
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */
|
|
17
|
+
const x = "—";
|
|
18
|
+
function n() {
|
|
19
|
+
return /* @__PURE__ */ r("span", { "data-testid": i.placeholder, children: x });
|
|
15
20
|
}
|
|
16
|
-
function
|
|
17
|
-
return
|
|
21
|
+
function l(t) {
|
|
22
|
+
return `${h(t / 100, 2)}%`;
|
|
18
23
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
24
|
+
function H({
|
|
25
|
+
data: t,
|
|
26
|
+
tooltip: e = !0
|
|
27
|
+
}) {
|
|
28
|
+
return t === void 0 ? /* @__PURE__ */ r(n, {}) : typeof t == "number" ? /* @__PURE__ */ r("span", { "data-testid": i.apy, children: l(t) }) : /* @__PURE__ */ r("span", { "data-testid": i.apy, children: /* @__PURE__ */ r(p, { apy: t, tooltip: e }) });
|
|
21
29
|
}
|
|
22
|
-
function
|
|
30
|
+
function N({
|
|
23
31
|
data: t
|
|
24
32
|
}) {
|
|
25
|
-
return t == null ? /* @__PURE__ */
|
|
33
|
+
return t == null ? /* @__PURE__ */ r(n, {}) : /* @__PURE__ */ r("span", { "data-testid": i.usd, children: v(t) });
|
|
26
34
|
}
|
|
27
|
-
function
|
|
35
|
+
function w({
|
|
28
36
|
data: t
|
|
29
37
|
}) {
|
|
30
|
-
return t === void 0 ? /* @__PURE__ */
|
|
38
|
+
return t === void 0 ? /* @__PURE__ */ r(n, {}) : /* @__PURE__ */ r("span", { "data-testid": i.leverage, children: `${f(t)}x` });
|
|
31
39
|
}
|
|
32
|
-
function
|
|
40
|
+
function D({
|
|
33
41
|
data: t
|
|
34
42
|
}) {
|
|
35
|
-
return t === void 0 ? /* @__PURE__ */
|
|
43
|
+
return t === void 0 ? /* @__PURE__ */ r(n, {}) : /* @__PURE__ */ r("span", { "data-testid": i.utilization, children: l(t) });
|
|
36
44
|
}
|
|
37
|
-
function
|
|
45
|
+
function M({
|
|
38
46
|
data: t
|
|
39
47
|
}) {
|
|
40
48
|
if (t === void 0)
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
const
|
|
43
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ r(n, {});
|
|
50
|
+
const e = t < 1e4 ? "text-destructive" : t < 11e3 ? "text-warning" : "text-success";
|
|
51
|
+
return /* @__PURE__ */ r("span", { "data-testid": i.healthFactor, className: c(e), children: (t / 1e4).toFixed(2) });
|
|
44
52
|
}
|
|
45
|
-
function
|
|
53
|
+
function O({
|
|
46
54
|
data: t,
|
|
47
|
-
token:
|
|
55
|
+
token: e,
|
|
56
|
+
showSymbol: s = !0
|
|
48
57
|
}) {
|
|
49
|
-
if (t === void 0 ||
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
-
const
|
|
52
|
-
return
|
|
58
|
+
if (t === void 0 || e === void 0)
|
|
59
|
+
return /* @__PURE__ */ r(n, {});
|
|
60
|
+
const o = u(t, e.decimals);
|
|
61
|
+
return (
|
|
62
|
+
// `title` also keeps the amount where a hover tooltip cannot reach:
|
|
63
|
+
// keyboard, touch, and the browser's own find — and keeps the symbol
|
|
64
|
+
// reachable there even when the row is the one printing it
|
|
65
|
+
/* @__PURE__ */ m("span", { "data-testid": i.tokenBigint, title: `${o} ${e.symbol}`, children: [
|
|
66
|
+
/* @__PURE__ */ r(
|
|
67
|
+
a,
|
|
68
|
+
{
|
|
69
|
+
placement: "top",
|
|
70
|
+
className: "break-all",
|
|
71
|
+
title: /* @__PURE__ */ r("span", { children: d(t, e.decimals) }),
|
|
72
|
+
children: /* @__PURE__ */ r("span", { children: o })
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
s && ` ${e.symbol}`
|
|
76
|
+
] })
|
|
77
|
+
);
|
|
53
78
|
}
|
|
54
79
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
80
|
+
H as ApyValue,
|
|
81
|
+
M as HealthFactorValue,
|
|
82
|
+
w as LeverageValue,
|
|
83
|
+
O as TokenBigint,
|
|
84
|
+
N as UsdValue,
|
|
85
|
+
D as UtilizationValue,
|
|
86
|
+
l as bps
|
|
61
87
|
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import "react-intl";
|
|
3
|
+
import "../buttons/button/button.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "@gearbox-protocol/sdk";
|
|
6
|
+
import { cn as o } from "../../utils/cn.js";
|
|
7
|
+
import "sonner";
|
|
8
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
9
|
+
import "luxon";
|
|
10
|
+
import "../../utils/z-index.js";
|
|
11
|
+
import { GridTableRow as h, GridTableCell as u } from "../table/grid-table.js";
|
|
12
|
+
import "../skeleton/skeleton.js";
|
|
13
|
+
import "../table/table.js";
|
|
14
|
+
import { Typography as G } from "../typography/typography.js";
|
|
15
|
+
import { useIsMedium as k, useIsMobile as z } from "../../hooks/use-media-query.js";
|
|
16
|
+
import { BaseTableLineTest as D } from "./constants.js";
|
|
17
|
+
const O = "min-w-0 max-w-full overflow-hidden", P = o(
|
|
18
|
+
"min-w-0 max-w-full self-stretch items-center overflow-x-clip py-2 pl-4",
|
|
19
|
+
"[&_span.truncate]:whitespace-normal",
|
|
20
|
+
"[&_div.overflow-hidden]:overflow-visible"
|
|
21
|
+
), S = "min-w-0 max-w-full overflow-visible whitespace-nowrap";
|
|
22
|
+
function v({
|
|
23
|
+
label: t,
|
|
24
|
+
children: r
|
|
25
|
+
}) {
|
|
26
|
+
return /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
27
|
+
/* @__PURE__ */ i(
|
|
28
|
+
G,
|
|
29
|
+
{
|
|
30
|
+
as: "span",
|
|
31
|
+
variant: "caption",
|
|
32
|
+
weight: "medium",
|
|
33
|
+
className: "uppercase text-muted-foreground",
|
|
34
|
+
children: t
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ i("div", { className: "min-w-0 text-sm", children: r })
|
|
38
|
+
] });
|
|
39
|
+
}
|
|
40
|
+
function te({
|
|
41
|
+
columns: t,
|
|
42
|
+
cells: r,
|
|
43
|
+
last: x,
|
|
44
|
+
href: b,
|
|
45
|
+
disabled: l = !1,
|
|
46
|
+
disabledStyle: g = !1,
|
|
47
|
+
accentClassName: C,
|
|
48
|
+
onRowClick: n,
|
|
49
|
+
"data-testid": N,
|
|
50
|
+
minHeightClassName: L = "min-h-[66px]"
|
|
51
|
+
}) {
|
|
52
|
+
const _ = k(), y = z(), m = t.filter((e) => e.mobile === "title"), d = m.length > 0 ? m : t.slice(0, 1), T = t.filter((e) => e.mobile === "badge"), B = new Set(d.map((e) => e.id)), p = t.filter(
|
|
53
|
+
(e) => !B.has(e.id) && (e.mobile ?? "stat") === "stat"
|
|
54
|
+
), j = t.filter((e) => e.mobile === "block"), c = {
|
|
55
|
+
last: x,
|
|
56
|
+
href: b,
|
|
57
|
+
noHover: l,
|
|
58
|
+
"data-disabled": l,
|
|
59
|
+
"data-testid": N ?? D.root,
|
|
60
|
+
onRowClick: l ? void 0 : n
|
|
61
|
+
}, f = o(
|
|
62
|
+
n && !l && "cursor-pointer",
|
|
63
|
+
g && "text-secondary-foreground!",
|
|
64
|
+
l && "cursor-not-allowed",
|
|
65
|
+
C
|
|
66
|
+
);
|
|
67
|
+
return y ? /* @__PURE__ */ i(h, { ...c, className: f, children: /* @__PURE__ */ a(
|
|
68
|
+
u,
|
|
69
|
+
{
|
|
70
|
+
span: "full",
|
|
71
|
+
size: "sm",
|
|
72
|
+
className: o(
|
|
73
|
+
"flex min-w-0 max-w-full flex-col items-start gap-3 overflow-x-clip py-3",
|
|
74
|
+
"[&_span.truncate]:whitespace-normal [&_div.overflow-hidden]:overflow-visible"
|
|
75
|
+
),
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
|
|
78
|
+
d.map((e) => /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: r[e.id] }, e.id)),
|
|
79
|
+
T.map((e) => /* @__PURE__ */ i("div", { children: r[e.id] }, e.id))
|
|
80
|
+
] }),
|
|
81
|
+
p.length > 0 && /* @__PURE__ */ i("div", { className: "grid w-full min-w-0 grid-cols-3 gap-x-2 gap-y-3 [&_*]:text-left [&_*]:justify-start", children: p.map((e) => /* @__PURE__ */ i(v, { label: e.title, children: r[e.id] }, e.id)) }),
|
|
82
|
+
j.map((e) => {
|
|
83
|
+
const s = r[e.id];
|
|
84
|
+
return s == null || s === !1 ? null : /* @__PURE__ */ i(v, { label: e.title, children: s }, e.id);
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
) }) : /* @__PURE__ */ i(
|
|
89
|
+
h,
|
|
90
|
+
{
|
|
91
|
+
...c,
|
|
92
|
+
className: o(L, f),
|
|
93
|
+
children: t.map((e, s) => {
|
|
94
|
+
const I = e.justify ?? "start", M = s === 0, w = s === t.length - 1, A = e.mobile === "badge", E = o(
|
|
95
|
+
M ? P : A ? S : O,
|
|
96
|
+
w && "pr-4",
|
|
97
|
+
e.cellClassName
|
|
98
|
+
);
|
|
99
|
+
return /* @__PURE__ */ i(
|
|
100
|
+
u,
|
|
101
|
+
{
|
|
102
|
+
size: "sm",
|
|
103
|
+
textAlign: I === "end" ? "right" : "left",
|
|
104
|
+
gapBefore: w ? _ ? "sm" : "md" : void 0,
|
|
105
|
+
className: E,
|
|
106
|
+
children: r[e.id] ?? /* @__PURE__ */ i("span", { className: "text-secondary-foreground", children: "—" })
|
|
107
|
+
},
|
|
108
|
+
e.id
|
|
109
|
+
);
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
export {
|
|
115
|
+
te as BaseTableLine,
|
|
116
|
+
D as BaseTableLineTest
|
|
117
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsxs as T, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Children as p } from "react";
|
|
3
|
+
import { Guard as x } from "../guard/guard.js";
|
|
4
|
+
import { HeadCell as y } from "../head-cell/head-cell.js";
|
|
5
|
+
import "react-intl";
|
|
6
|
+
import "../buttons/button/button.js";
|
|
7
|
+
import "@gearbox-protocol/sdk";
|
|
8
|
+
import { cn as n } from "../../utils/cn.js";
|
|
9
|
+
import "sonner";
|
|
10
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
11
|
+
import "luxon";
|
|
12
|
+
import "../../utils/z-index.js";
|
|
13
|
+
import { GridTable as C, GridTableHeader as j, GridTableRow as f, GridTableHead as H, GridTableBody as N, GridTableCell as S } from "../table/grid-table.js";
|
|
14
|
+
import "../skeleton/skeleton.js";
|
|
15
|
+
import "../table/table.js";
|
|
16
|
+
import { TableLoaderGuard as v } from "../table/table-loader-guard.js";
|
|
17
|
+
import { useIsMobile as z } from "../../hooks/use-media-query.js";
|
|
18
|
+
import { BaseTableTest as d } from "./constants.js";
|
|
19
|
+
function B({
|
|
20
|
+
message: i,
|
|
21
|
+
testId: o
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ t(f, { noHover: !0, last: !0, children: /* @__PURE__ */ t(
|
|
24
|
+
S,
|
|
25
|
+
{
|
|
26
|
+
span: "full",
|
|
27
|
+
size: "sm",
|
|
28
|
+
textAlign: "center",
|
|
29
|
+
className: "py-8",
|
|
30
|
+
"data-testid": o,
|
|
31
|
+
children: i
|
|
32
|
+
}
|
|
33
|
+
) });
|
|
34
|
+
}
|
|
35
|
+
function X({
|
|
36
|
+
columns: i,
|
|
37
|
+
isLoading: o,
|
|
38
|
+
emptyMessage: c,
|
|
39
|
+
sort: a,
|
|
40
|
+
rowHeight: h = "66px",
|
|
41
|
+
loaderRows: u = 5,
|
|
42
|
+
className: w,
|
|
43
|
+
wrapperClassName: b,
|
|
44
|
+
children: s
|
|
45
|
+
}) {
|
|
46
|
+
const l = z(), g = i.map((e) => e.track).join(" ");
|
|
47
|
+
return /* @__PURE__ */ T(
|
|
48
|
+
C,
|
|
49
|
+
{
|
|
50
|
+
cols: l ? "1fr" : g,
|
|
51
|
+
gap: 0,
|
|
52
|
+
size: "lg",
|
|
53
|
+
className: n("min-w-0 w-full", w),
|
|
54
|
+
wrapperClassName: b,
|
|
55
|
+
"data-testid": d.root,
|
|
56
|
+
children: [
|
|
57
|
+
!l && /* @__PURE__ */ t(j, { "data-testid": d.head, children: /* @__PURE__ */ t(f, { noHover: !0, height: "32px", children: i.map((e) => {
|
|
58
|
+
const m = e.justify ?? "start", r = e.sort, G = r && a ? a.getSortDirection(r.field) : void 0;
|
|
59
|
+
return /* @__PURE__ */ t(
|
|
60
|
+
H,
|
|
61
|
+
{
|
|
62
|
+
justify: m,
|
|
63
|
+
size: "sm",
|
|
64
|
+
className: n(
|
|
65
|
+
"min-w-0 whitespace-nowrap",
|
|
66
|
+
e.headClassName
|
|
67
|
+
),
|
|
68
|
+
children: r && a ? /* @__PURE__ */ t(
|
|
69
|
+
y,
|
|
70
|
+
{
|
|
71
|
+
arrowPosition: m === "end" ? "left" : "right",
|
|
72
|
+
title: e.title,
|
|
73
|
+
sortDirection: G,
|
|
74
|
+
sortField: r.label,
|
|
75
|
+
onSort: () => a.onSort(
|
|
76
|
+
r.field,
|
|
77
|
+
r.defaultDirection
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
) : e.title
|
|
81
|
+
},
|
|
82
|
+
e.id
|
|
83
|
+
);
|
|
84
|
+
}) }) }),
|
|
85
|
+
/* @__PURE__ */ t(
|
|
86
|
+
v,
|
|
87
|
+
{
|
|
88
|
+
showGuard: o,
|
|
89
|
+
rows: u,
|
|
90
|
+
columns: l ? 1 : i.length,
|
|
91
|
+
height: h,
|
|
92
|
+
cellClassName: "min-w-0 px-1 py-2 first:pl-4 last:pr-4",
|
|
93
|
+
children: !o && /* @__PURE__ */ t(
|
|
94
|
+
x,
|
|
95
|
+
{
|
|
96
|
+
showGuard: p.count(s) === 0,
|
|
97
|
+
guard: /* @__PURE__ */ t(B, { message: c, testId: d.empty }),
|
|
98
|
+
children: p.count(s) > 0 && /* @__PURE__ */ t(N, { children: s })
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
export {
|
|
108
|
+
X as BaseTable,
|
|
109
|
+
d as BaseTableTest
|
|
110
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseTable as o } from "./base-table.js";
|
|
2
|
+
import { BaseTableLine as s } from "./base-table-line.js";
|
|
3
|
+
import { BaseTableLineTest as t, BaseTableTest as b } from "./constants.js";
|
|
4
|
+
export {
|
|
5
|
+
o as BaseTable,
|
|
6
|
+
s as BaseTableLine,
|
|
7
|
+
t as BaseTableLineTest,
|
|
8
|
+
b as BaseTableTest
|
|
9
|
+
};
|
|
@@ -19,10 +19,13 @@ import "../buttons/external-button/external-button.js";
|
|
|
19
19
|
import "../buttons/filter-button/filter-button.js";
|
|
20
20
|
import "../buttons/navigation-button/navigation-button.js";
|
|
21
21
|
import "../buttons/tab-button/tab-button.js";
|
|
22
|
+
import "@fortawesome/free-solid-svg-icons";
|
|
23
|
+
import "../icons/fa-icon.js";
|
|
22
24
|
import "../token-icon/token-icon.js";
|
|
23
25
|
import "../tooltip/simple-tooltip.js";
|
|
24
26
|
import "../tooltip/tooltip.js";
|
|
25
27
|
import "../badge/badge.js";
|
|
28
|
+
import "../badge/chip.js";
|
|
26
29
|
import "../base/amount-input/amount-input.js";
|
|
27
30
|
import "../confirm-menu/confirm-menu.js";
|
|
28
31
|
import "react-intl";
|
|
@@ -33,10 +36,10 @@ import "../token-symbol/token-symbol.js";
|
|
|
33
36
|
import "../simple-accordion/simple-accordion.js";
|
|
34
37
|
import "../tip-card/tip-card.js";
|
|
35
38
|
import "../typography/typography.js";
|
|
36
|
-
import "../vertical-indicator/vertical-indicator.js";
|
|
37
39
|
import "../points-icon/points-icon.js";
|
|
38
|
-
import "
|
|
39
|
-
import "../
|
|
40
|
+
import "viem";
|
|
41
|
+
import "../vertical-indicator/vertical-indicator.js";
|
|
42
|
+
import "../base/page-title/page-title.js";
|
|
40
43
|
import "../detailed-page-title/detailed-page-title-copy-button.js";
|
|
41
44
|
import "../detailed-page-title/detailed-page-title-explorer-dropdown.js";
|
|
42
45
|
import "../base/details-view/detail-aside/detail-aside-scope.js";
|
|
@@ -44,6 +47,7 @@ import "../layout/main-aside-layout/main-aside-layout.js";
|
|
|
44
47
|
import "../base/details-view/details-view.js";
|
|
45
48
|
import "../fadeout-loading/fadeout-loading.js";
|
|
46
49
|
import "../health-factor/health-factor.js";
|
|
50
|
+
import "@gearbox-protocol/sdk/model";
|
|
47
51
|
import { Checkbox as g } from "./checkbox.js";
|
|
48
52
|
import "../select/select.js";
|
|
49
53
|
import "../breakpoint-provider.js";
|
|
@@ -56,16 +60,30 @@ import "../slider/slider.js";
|
|
|
56
60
|
import "../slider/slider-context.js";
|
|
57
61
|
import "../text-button/text-button.js";
|
|
58
62
|
import "../with-title/with-title.js";
|
|
59
|
-
import "../status-elements/status-elements.js";
|
|
60
63
|
import "react-router-dom";
|
|
64
|
+
import "../status-elements/status-elements.js";
|
|
61
65
|
import "../client-adapters/styled-dialog-container/styled-dialog-container.js";
|
|
66
|
+
import "../modal/modal.js";
|
|
67
|
+
import "@radix-ui/react-dialog";
|
|
68
|
+
import "../dialog/dialog-container.js";
|
|
69
|
+
import "../dialog/dialog-content.js";
|
|
70
|
+
import "../dialog/dialog-description.js";
|
|
71
|
+
import "../dialog/dialog-footer.js";
|
|
72
|
+
import "../dialog/dialog-header.js";
|
|
73
|
+
import "../dialog/dialog-title.js";
|
|
74
|
+
import "../dialog/dialog-modal-container.js";
|
|
75
|
+
import "../dialog/dialog-overlay.js";
|
|
76
|
+
import "../input/input.js";
|
|
77
|
+
import { Label as k } from "../label/label.js";
|
|
62
78
|
import "../simple-dropdown/simple-dropdown.js";
|
|
63
79
|
import "../simple-dropdown/simple-dropdown-menu-item.js";
|
|
64
|
-
import "../help-tip/help-tip.js";
|
|
65
80
|
import "../base/tabber/tabber.js";
|
|
66
81
|
import "../link/link.js";
|
|
67
82
|
import "../rounded-image/rounded-image.js";
|
|
83
|
+
import "../network-icon/network-indicator.js";
|
|
68
84
|
import "../base-link/base-link.js";
|
|
85
|
+
import "../help-tip/help-tip.js";
|
|
86
|
+
import "../base-table/base-table-line.js";
|
|
69
87
|
import "../navigation-context/navigation-context.js";
|
|
70
88
|
import "../cards/card/card.js";
|
|
71
89
|
import "../checkbox-item/checkbox-item.js";
|
|
@@ -73,21 +91,9 @@ import "../client-adapters/styled-button/styled-button.js";
|
|
|
73
91
|
import "../client-adapters/styled-rounded-image/styled-rounded-image.js";
|
|
74
92
|
import "../composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js";
|
|
75
93
|
import "../composites/tx-preview/confirm/dialog/constants.js";
|
|
76
|
-
import "../
|
|
77
|
-
import "../dialog/dialog-container.js";
|
|
94
|
+
import "../spinner/spinner.js";
|
|
78
95
|
import "../spinner-loader/spinner-loader.js";
|
|
79
96
|
import "../detailed-apy/detailed-apy.js";
|
|
80
|
-
import "@radix-ui/react-dialog";
|
|
81
|
-
import "../dialog/dialog-content.js";
|
|
82
|
-
import "../dialog/dialog-description.js";
|
|
83
|
-
import "../dialog/dialog-footer.js";
|
|
84
|
-
import "../dialog/dialog-header.js";
|
|
85
|
-
import "../dialog/dialog-title.js";
|
|
86
|
-
import "../dialog/dialog-modal-container.js";
|
|
87
|
-
import "../dialog/dialog-overlay.js";
|
|
88
|
-
import "viem";
|
|
89
|
-
import "../input/input.js";
|
|
90
|
-
import { Label as k } from "../label/label.js";
|
|
91
97
|
import "../dropdown-menu/dropdown-menu.js";
|
|
92
98
|
import "../dropdown-menu/dropdown-menu-checkbox-item.js";
|
|
93
99
|
import "../dropdown-menu/dropdown-menu-content.js";
|
|
@@ -122,11 +128,10 @@ import "../legal-agreement/legal-agreement-theme.js";
|
|
|
122
128
|
import "../loader/loader.js";
|
|
123
129
|
import "../loading/loading.js";
|
|
124
130
|
import "../loading-bar/loading-bar.js";
|
|
131
|
+
import "../status-dot/status-dot.js";
|
|
125
132
|
import "../segmented-control/segmented-control.js";
|
|
126
133
|
import "../separate-line/separate-line.js";
|
|
127
|
-
import "../spinner/spinner.js";
|
|
128
134
|
import "../split-list/split-list.js";
|
|
129
|
-
import "../status-dot/status-dot.js";
|
|
130
135
|
import "../textarea/textarea.js";
|
|
131
136
|
import "../theme-provider.js";
|
|
132
137
|
const C = b("", {
|
|
@@ -19,10 +19,13 @@ import "@gearbox-protocol/sdk/common-utils";
|
|
|
19
19
|
import "luxon";
|
|
20
20
|
import "../../../utils/z-index.js";
|
|
21
21
|
import "../../buttons/tab-button/tab-button.js";
|
|
22
|
+
import "@fortawesome/free-solid-svg-icons";
|
|
23
|
+
import "../../icons/fa-icon.js";
|
|
22
24
|
import "../../token-icon/token-icon.js";
|
|
23
25
|
import "../../tooltip/simple-tooltip.js";
|
|
24
26
|
import "../../tooltip/tooltip.js";
|
|
25
27
|
import "../../badge/badge.js";
|
|
28
|
+
import "../../badge/chip.js";
|
|
26
29
|
import "../../base/amount-input/amount-input.js";
|
|
27
30
|
import "../../confirm-menu/confirm-menu.js";
|
|
28
31
|
import "react-intl";
|
|
@@ -33,10 +36,10 @@ import "../../token-symbol/token-symbol.js";
|
|
|
33
36
|
import "../../simple-accordion/simple-accordion.js";
|
|
34
37
|
import "../../tip-card/tip-card.js";
|
|
35
38
|
import "../../typography/typography.js";
|
|
36
|
-
import "../../vertical-indicator/vertical-indicator.js";
|
|
37
39
|
import "../../points-icon/points-icon.js";
|
|
38
|
-
import "
|
|
39
|
-
import "../../
|
|
40
|
+
import "viem";
|
|
41
|
+
import "../../vertical-indicator/vertical-indicator.js";
|
|
42
|
+
import "../../base/page-title/page-title.js";
|
|
40
43
|
import "../../detailed-page-title/detailed-page-title-copy-button.js";
|
|
41
44
|
import "../../detailed-page-title/detailed-page-title-explorer-dropdown.js";
|
|
42
45
|
import "../../base/details-view/detail-aside/detail-aside-scope.js";
|
|
@@ -44,6 +47,7 @@ import "../../layout/main-aside-layout/main-aside-layout.js";
|
|
|
44
47
|
import "../../base/details-view/details-view.js";
|
|
45
48
|
import "../../fadeout-loading/fadeout-loading.js";
|
|
46
49
|
import "../../health-factor/health-factor.js";
|
|
50
|
+
import "@gearbox-protocol/sdk/model";
|
|
47
51
|
import "../../checkbox/checkbox.js";
|
|
48
52
|
import "../../checkbox/checkbox-labeled.js";
|
|
49
53
|
import "../../select/select.js";
|
|
@@ -57,37 +61,39 @@ import "../../slider/slider.js";
|
|
|
57
61
|
import "../../slider/slider-context.js";
|
|
58
62
|
import "../../text-button/text-button.js";
|
|
59
63
|
import "../../with-title/with-title.js";
|
|
60
|
-
import "../../status-elements/status-elements.js";
|
|
61
64
|
import "react-router-dom";
|
|
65
|
+
import "../../status-elements/status-elements.js";
|
|
62
66
|
import "../styled-dialog-container/styled-dialog-container.js";
|
|
67
|
+
import "../../modal/modal.js";
|
|
68
|
+
import "@radix-ui/react-dialog";
|
|
69
|
+
import "../../dialog/dialog-container.js";
|
|
70
|
+
import "../../dialog/dialog-content.js";
|
|
71
|
+
import "../../dialog/dialog-description.js";
|
|
72
|
+
import "../../dialog/dialog-footer.js";
|
|
73
|
+
import "../../dialog/dialog-header.js";
|
|
74
|
+
import "../../dialog/dialog-title.js";
|
|
75
|
+
import "../../dialog/dialog-modal-container.js";
|
|
76
|
+
import "../../dialog/dialog-overlay.js";
|
|
77
|
+
import "../../input/input.js";
|
|
78
|
+
import "../../label/label.js";
|
|
63
79
|
import "../../simple-dropdown/simple-dropdown.js";
|
|
64
80
|
import "../../simple-dropdown/simple-dropdown-menu-item.js";
|
|
65
|
-
import "../../help-tip/help-tip.js";
|
|
66
81
|
import "../../base/tabber/tabber.js";
|
|
67
82
|
import "../../link/link.js";
|
|
68
83
|
import { RoundedImage as d } from "../../rounded-image/rounded-image.js";
|
|
84
|
+
import "../../network-icon/network-indicator.js";
|
|
69
85
|
import "../../base-link/base-link.js";
|
|
86
|
+
import "../../help-tip/help-tip.js";
|
|
87
|
+
import "../../base-table/base-table-line.js";
|
|
70
88
|
import "../../navigation-context/navigation-context.js";
|
|
71
89
|
import "../../cards/card/card.js";
|
|
72
90
|
import "../../checkbox-item/checkbox-item.js";
|
|
73
91
|
import "../styled-button/styled-button.js";
|
|
74
92
|
import "../../composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js";
|
|
75
93
|
import "../../composites/tx-preview/confirm/dialog/constants.js";
|
|
76
|
-
import "../../
|
|
77
|
-
import "../../dialog/dialog-container.js";
|
|
94
|
+
import "../../spinner/spinner.js";
|
|
78
95
|
import "../../spinner-loader/spinner-loader.js";
|
|
79
96
|
import "../../detailed-apy/detailed-apy.js";
|
|
80
|
-
import "@radix-ui/react-dialog";
|
|
81
|
-
import "../../dialog/dialog-content.js";
|
|
82
|
-
import "../../dialog/dialog-description.js";
|
|
83
|
-
import "../../dialog/dialog-footer.js";
|
|
84
|
-
import "../../dialog/dialog-header.js";
|
|
85
|
-
import "../../dialog/dialog-title.js";
|
|
86
|
-
import "../../dialog/dialog-modal-container.js";
|
|
87
|
-
import "../../dialog/dialog-overlay.js";
|
|
88
|
-
import "viem";
|
|
89
|
-
import "../../input/input.js";
|
|
90
|
-
import "../../label/label.js";
|
|
91
97
|
import "../../dropdown-menu/dropdown-menu.js";
|
|
92
98
|
import "../../dropdown-menu/dropdown-menu-checkbox-item.js";
|
|
93
99
|
import "../../dropdown-menu/dropdown-menu-content.js";
|
|
@@ -122,11 +128,10 @@ import "../../legal-agreement/legal-agreement-theme.js";
|
|
|
122
128
|
import "../../loader/loader.js";
|
|
123
129
|
import "../../loading/loading.js";
|
|
124
130
|
import "../../loading-bar/loading-bar.js";
|
|
131
|
+
import "../../status-dot/status-dot.js";
|
|
125
132
|
import "../../segmented-control/segmented-control.js";
|
|
126
133
|
import "../../separate-line/separate-line.js";
|
|
127
|
-
import "../../spinner/spinner.js";
|
|
128
134
|
import "../../split-list/split-list.js";
|
|
129
|
-
import "../../status-dot/status-dot.js";
|
|
130
135
|
import "../../textarea/textarea.js";
|
|
131
136
|
import "../../theme-provider.js";
|
|
132
137
|
const a = e.forwardRef(({ $size: o, $rounded: r, $defaultIcon: m, ...t }, i) => /* @__PURE__ */ p(
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsxs as k, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "@gearbox-protocol/sdk";
|
|
4
|
+
import { cn as d } from "../../utils/cn.js";
|
|
5
|
+
import "sonner";
|
|
6
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
7
|
+
import "luxon";
|
|
8
|
+
import "../../utils/z-index.js";
|
|
9
|
+
import { AllocationWheelTest as p } from "./constants.js";
|
|
10
|
+
const c = [
|
|
11
|
+
"stroke-chart-1",
|
|
12
|
+
"stroke-chart-2",
|
|
13
|
+
"stroke-chart-3",
|
|
14
|
+
"stroke-chart-4",
|
|
15
|
+
"stroke-chart-5",
|
|
16
|
+
"stroke-chart-6",
|
|
17
|
+
"stroke-chart-7",
|
|
18
|
+
"stroke-chart-8",
|
|
19
|
+
"stroke-chart-9",
|
|
20
|
+
"stroke-chart-10",
|
|
21
|
+
"stroke-chart-11",
|
|
22
|
+
"stroke-chart-12"
|
|
23
|
+
], t = 20, o = 3.5, e = (t - o) / 2, i = 2 * Math.PI * e;
|
|
24
|
+
function M({
|
|
25
|
+
share: h,
|
|
26
|
+
colorIndex: l,
|
|
27
|
+
idle: n = !1
|
|
28
|
+
}) {
|
|
29
|
+
const s = Math.min(1, Math.max(0, h)), a = i * s, m = n ? "stroke-muted-foreground" : c[l % c.length];
|
|
30
|
+
return /* @__PURE__ */ k(
|
|
31
|
+
"svg",
|
|
32
|
+
{
|
|
33
|
+
width: t,
|
|
34
|
+
height: t,
|
|
35
|
+
viewBox: `0 0 ${t} ${t}`,
|
|
36
|
+
className: "-rotate-90",
|
|
37
|
+
"data-testid": p.root,
|
|
38
|
+
role: "img",
|
|
39
|
+
"aria-label": "Allocation share",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ r("title", { children: "Allocation share" }),
|
|
42
|
+
/* @__PURE__ */ r(
|
|
43
|
+
"circle",
|
|
44
|
+
{
|
|
45
|
+
cx: t / 2,
|
|
46
|
+
cy: t / 2,
|
|
47
|
+
r: e,
|
|
48
|
+
fill: "none",
|
|
49
|
+
className: "stroke-muted",
|
|
50
|
+
strokeWidth: o
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
s > 0 && /* @__PURE__ */ r(
|
|
54
|
+
"circle",
|
|
55
|
+
{
|
|
56
|
+
cx: t / 2,
|
|
57
|
+
cy: t / 2,
|
|
58
|
+
r: e,
|
|
59
|
+
fill: "none",
|
|
60
|
+
className: d(m),
|
|
61
|
+
strokeWidth: o,
|
|
62
|
+
strokeDasharray: `${a} ${i - a}`
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
M as AllocationWheel
|
|
71
|
+
};
|