@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,124 +1,127 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { SectionHeading as
|
|
4
|
-
import { Stack as
|
|
5
|
-
import { StickyBar as
|
|
6
|
-
import { useTitleText as
|
|
7
|
-
import { TabItem as
|
|
1
|
+
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as E, useContext as q, useMemo as d, Children as N, useRef as T, useEffect as D, isValidElement as R } from "react";
|
|
3
|
+
import { SectionHeading as F } from "../section-heading/section-heading.js";
|
|
4
|
+
import { Stack as u } from "../stack/stack.js";
|
|
5
|
+
import { StickyBar as M } from "../sticky-bar/sticky-bar.js";
|
|
6
|
+
import { useTitleText as j } from "../text/use-title-text.js";
|
|
7
|
+
import { TabItem as P, TabControl as V } from "../../tab-control/tab-control.js";
|
|
8
8
|
import { TabberTest as S } from "./constants.js";
|
|
9
|
-
import { useDetailScrollSpy as
|
|
10
|
-
const
|
|
11
|
-
function
|
|
9
|
+
import { useDetailScrollSpy as W } from "./use-detail-scroll-spy.js";
|
|
10
|
+
const k = E({});
|
|
11
|
+
function A({
|
|
12
12
|
id: e,
|
|
13
13
|
title: o,
|
|
14
|
-
heading:
|
|
15
|
-
actions:
|
|
14
|
+
heading: s = o,
|
|
15
|
+
actions: c,
|
|
16
16
|
children: m,
|
|
17
|
-
hideHeading:
|
|
17
|
+
hideHeading: a = !1
|
|
18
18
|
}) {
|
|
19
|
-
const
|
|
19
|
+
const l = q(k), i = j(), n = !a;
|
|
20
20
|
return /* @__PURE__ */ r(
|
|
21
21
|
"section",
|
|
22
22
|
{
|
|
23
|
-
ref:
|
|
23
|
+
ref: l[e],
|
|
24
24
|
className: "scroll-mt-28",
|
|
25
25
|
"data-scroll-section": e,
|
|
26
26
|
"data-testid": S.section,
|
|
27
|
-
children: /* @__PURE__ */ u
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
children: /* @__PURE__ */ p(u, { gap: "md", children: [
|
|
28
|
+
n || c ? /* @__PURE__ */ p("div", { className: "flex items-center justify-between gap-3", children: [
|
|
29
|
+
n ? /* @__PURE__ */ r(F, { children: i(s) }) : /* @__PURE__ */ r("span", {}),
|
|
30
|
+
c
|
|
31
31
|
] }) : null,
|
|
32
32
|
m
|
|
33
33
|
] })
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
A.displayName = "TabberSection";
|
|
38
38
|
function g(e) {
|
|
39
|
-
return
|
|
39
|
+
return R(e) && e.type === A;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function z({
|
|
42
42
|
item: e,
|
|
43
43
|
...o
|
|
44
44
|
}) {
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */ r("div", { className: "min-w-0 basis-0 grow pb-px", children: /* @__PURE__ */ r(
|
|
45
|
+
return /* @__PURE__ */ p("div", { className: "flex items-stretch overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:h-0 [scrollbar-width:none]", children: [
|
|
46
|
+
/* @__PURE__ */ r("div", { className: "min-w-0 basis-0 grow pb-px", children: /* @__PURE__ */ r(V, { ...o, showBorder: !0 }) }),
|
|
47
47
|
e && /* @__PURE__ */ r("div", { className: "w-auto shrink-0 grow-0 basis-auto", children: e })
|
|
48
48
|
] });
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function G({
|
|
51
51
|
children: e,
|
|
52
52
|
observeKey: o,
|
|
53
|
-
initialSection:
|
|
54
|
-
testId:
|
|
53
|
+
initialSection: s,
|
|
54
|
+
testId: c,
|
|
55
55
|
mobileManagePane: m
|
|
56
56
|
}) {
|
|
57
|
-
const
|
|
58
|
-
() =>
|
|
57
|
+
const a = d(
|
|
58
|
+
() => N.toArray(e).filter(g),
|
|
59
59
|
[e]
|
|
60
|
-
),
|
|
60
|
+
), l = d(
|
|
61
|
+
() => a.filter((t) => t.props.beforeBar !== !0),
|
|
62
|
+
[a]
|
|
63
|
+
), i = l.map((t) => t.props.id).join("|"), n = d(
|
|
61
64
|
() => i === "" ? [] : i.split("|"),
|
|
62
65
|
[i]
|
|
63
|
-
),
|
|
66
|
+
), w = T({}), f = d(() => {
|
|
64
67
|
const t = {
|
|
65
|
-
...
|
|
68
|
+
...w.current
|
|
66
69
|
};
|
|
67
|
-
for (const
|
|
68
|
-
t[
|
|
69
|
-
return
|
|
70
|
-
}, [n]),
|
|
71
|
-
|
|
70
|
+
for (const B of n)
|
|
71
|
+
t[B] === void 0 && (t[B] = { current: null });
|
|
72
|
+
return w.current = t, t;
|
|
73
|
+
}, [n]), I = j(), { activeSection: b, scrollToSection: h } = W(
|
|
74
|
+
f,
|
|
72
75
|
n,
|
|
73
76
|
o
|
|
74
|
-
),
|
|
75
|
-
|
|
76
|
-
if (o !==
|
|
77
|
-
const t =
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
), x = T(!1), v = T(o);
|
|
78
|
+
D(() => {
|
|
79
|
+
if (o !== v.current && (v.current = o, x.current = !1), x.current || !o) return;
|
|
80
|
+
const t = s ?? n[0];
|
|
81
|
+
x.current = !0, !(t === void 0 || t === n[0]) && f[t] !== void 0 && requestAnimationFrame(() => {
|
|
82
|
+
h(t);
|
|
80
83
|
});
|
|
81
|
-
}, [o,
|
|
82
|
-
const
|
|
84
|
+
}, [o, s, h, n, f]);
|
|
85
|
+
const H = l.map((t) => ({
|
|
83
86
|
id: t.props.id,
|
|
84
87
|
item: /* @__PURE__ */ r(
|
|
85
|
-
|
|
88
|
+
P,
|
|
86
89
|
{
|
|
87
|
-
selected:
|
|
88
|
-
label:
|
|
90
|
+
selected: b === t.props.id,
|
|
91
|
+
label: I(t.props.title)
|
|
89
92
|
}
|
|
90
93
|
)
|
|
91
|
-
})), C =
|
|
94
|
+
})), C = N.toArray(e), y = C.filter(
|
|
92
95
|
(t) => g(t) && t.props.beforeBar === !0
|
|
93
|
-
),
|
|
96
|
+
), O = C.filter(
|
|
94
97
|
(t) => !(g(t) && t.props.beforeBar === !0)
|
|
95
98
|
);
|
|
96
|
-
return /* @__PURE__ */ r(
|
|
97
|
-
|
|
99
|
+
return /* @__PURE__ */ r(u, { gap: "lg", "data-testid": c ?? S.root, children: /* @__PURE__ */ p(k.Provider, { value: f, children: [
|
|
100
|
+
y.length > 0 ? /* @__PURE__ */ r(u, { gap: "xl", children: y }) : null,
|
|
98
101
|
m,
|
|
99
|
-
/* @__PURE__ */ r(
|
|
100
|
-
|
|
102
|
+
/* @__PURE__ */ r(M, { testId: S.bar, children: /* @__PURE__ */ r(
|
|
103
|
+
z,
|
|
101
104
|
{
|
|
102
105
|
state: {
|
|
103
|
-
id:
|
|
104
|
-
index: n.indexOf(
|
|
106
|
+
id: b,
|
|
107
|
+
index: n.indexOf(b),
|
|
105
108
|
handleTabChange: (t) => {
|
|
106
|
-
|
|
109
|
+
h(t);
|
|
107
110
|
}
|
|
108
111
|
},
|
|
109
|
-
tabs:
|
|
112
|
+
tabs: H,
|
|
110
113
|
item: null
|
|
111
114
|
}
|
|
112
115
|
) }),
|
|
113
|
-
/* @__PURE__ */ r(
|
|
116
|
+
/* @__PURE__ */ r(u, { gap: "xl", children: O })
|
|
114
117
|
] }) });
|
|
115
118
|
}
|
|
116
|
-
function
|
|
117
|
-
return
|
|
119
|
+
function K(e) {
|
|
120
|
+
return R(e) && e.type === G;
|
|
118
121
|
}
|
|
119
122
|
export {
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
G as Tabber,
|
|
124
|
+
A as TabberSection,
|
|
122
125
|
S as TabberTest,
|
|
123
|
-
|
|
126
|
+
K as isTabber
|
|
124
127
|
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { useTitleText as T } from "../text/use-title-text.js";
|
|
3
|
-
import { FadeoutLoading as
|
|
3
|
+
import { FadeoutLoading as l } from "../../fadeout-loading/fadeout-loading.js";
|
|
4
4
|
import { HealthDot as f } from "../../status-elements/status-elements.js";
|
|
5
|
-
import { FormattedMessageTyped as
|
|
5
|
+
import { FormattedMessageTyped as m } from "../../typed-intl/index.js";
|
|
6
6
|
import { VerticalIndicator as h } from "../../vertical-indicator/vertical-indicator.js";
|
|
7
7
|
import { ttlLeft as g, getTTLZones as x } from "../../../utils/ttl.js";
|
|
8
|
-
import { TimeToLiquidationBlockTest as
|
|
8
|
+
import { TimeToLiquidationBlockTest as r } from "./constants.js";
|
|
9
9
|
function j({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
zone:
|
|
13
|
-
isLoading:
|
|
14
|
-
title:
|
|
15
|
-
tip:
|
|
16
|
-
testId:
|
|
10
|
+
data: o,
|
|
11
|
+
dataTo: n,
|
|
12
|
+
zone: a,
|
|
13
|
+
isLoading: e,
|
|
14
|
+
title: i,
|
|
15
|
+
tip: s,
|
|
16
|
+
testId: v
|
|
17
17
|
}) {
|
|
18
|
-
const p = T(),
|
|
18
|
+
const p = T(), d = n !== void 0;
|
|
19
19
|
return /* @__PURE__ */ t(
|
|
20
20
|
h,
|
|
21
21
|
{
|
|
22
22
|
align: "center",
|
|
23
23
|
dimPreviousValue: !1,
|
|
24
|
-
"data-testid":
|
|
25
|
-
label:
|
|
26
|
-
tip:
|
|
27
|
-
value: /* @__PURE__ */ t(
|
|
24
|
+
"data-testid": v ?? r.root,
|
|
25
|
+
label: i !== void 0 ? p(i) : /* @__PURE__ */ t(m, { messageId: "components.timeToLiquidationBlock.label" }),
|
|
26
|
+
tip: s ?? /* @__PURE__ */ t(m, { messageId: "components.timeToLiquidationBlock.tip" }),
|
|
27
|
+
value: /* @__PURE__ */ t(l, { loading: e, children: /* @__PURE__ */ t(
|
|
28
28
|
u,
|
|
29
29
|
{
|
|
30
|
-
|
|
31
|
-
zone:
|
|
32
|
-
testId:
|
|
30
|
+
milliseconds: o,
|
|
31
|
+
zone: d ? void 0 : a,
|
|
32
|
+
testId: r.value
|
|
33
33
|
}
|
|
34
34
|
) }),
|
|
35
|
-
valueTo:
|
|
35
|
+
valueTo: d ? /* @__PURE__ */ t(l, { loading: e, children: /* @__PURE__ */ t(
|
|
36
36
|
u,
|
|
37
37
|
{
|
|
38
|
-
|
|
39
|
-
zone:
|
|
40
|
-
testId:
|
|
38
|
+
milliseconds: n ?? null,
|
|
39
|
+
zone: a,
|
|
40
|
+
testId: r.valueTo
|
|
41
41
|
}
|
|
42
42
|
) }) : void 0
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
function u({
|
|
47
|
-
|
|
48
|
-
zone:
|
|
49
|
-
testId:
|
|
47
|
+
milliseconds: o,
|
|
48
|
+
zone: n,
|
|
49
|
+
testId: a
|
|
50
50
|
}) {
|
|
51
|
-
const
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
|
|
54
|
-
o
|
|
51
|
+
const e = o == null ? void 0 : g(o), i = n ?? (o == null ? void 0 : x(o));
|
|
52
|
+
return /* @__PURE__ */ c("span", { className: "inline-flex items-center", "data-testid": a, children: [
|
|
53
|
+
o === void 0 ? "—" : o === null ? "N/A" : e?.months !== void 0 ? `${e.months}mo` : e?.day !== void 0 ? `${e.day}d` : "<1d",
|
|
54
|
+
o != null && i ? /* @__PURE__ */ t("span", { className: "ml-1.5", children: /* @__PURE__ */ t(f, { zone: i }) }) : null
|
|
55
55
|
] });
|
|
56
56
|
}
|
|
57
57
|
export {
|
|
58
58
|
j as TimeToLiquidationBlock,
|
|
59
|
-
|
|
59
|
+
r as TimeToLiquidationBlockTest
|
|
60
60
|
};
|
|
@@ -1,68 +1,88 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Link as
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Link as l } from "../../link/link.js";
|
|
3
3
|
import { NetworkIcon as g } from "../../network-icon/network-icon.js";
|
|
4
|
-
import
|
|
4
|
+
import "../../network-icon/network-indicator.js";
|
|
5
|
+
import { TokenIcon as h } from "../../token-icon/token-icon.js";
|
|
6
|
+
import { FormattedMessageTyped as u } from "../../typed-intl/index.js";
|
|
5
7
|
import { Typography as r } from "../../typography/typography.js";
|
|
6
|
-
import { Stack as
|
|
7
|
-
import { TitleMetaTest as
|
|
8
|
-
function
|
|
9
|
-
network:
|
|
10
|
-
curatorName:
|
|
11
|
-
curatorLink:
|
|
12
|
-
onCuratorLinkClick:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
import { Stack as n } from "../stack/stack.js";
|
|
9
|
+
import { TitleMetaTest as o } from "./constants.js";
|
|
10
|
+
function I({
|
|
11
|
+
network: m,
|
|
12
|
+
curatorName: s,
|
|
13
|
+
curatorLink: i,
|
|
14
|
+
onCuratorLinkClick: d,
|
|
15
|
+
links: c,
|
|
16
|
+
testId: p = o.root,
|
|
17
|
+
networkTestId: f = o.network,
|
|
18
|
+
curatorTestId: x = o.curator
|
|
16
19
|
}) {
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
|
|
20
|
+
return /* @__PURE__ */ a(
|
|
21
|
+
n,
|
|
19
22
|
{
|
|
20
23
|
direction: "row",
|
|
21
24
|
align: "center",
|
|
22
25
|
gap: "md",
|
|
23
26
|
wrap: !0,
|
|
24
27
|
className: "text-sm text-foreground",
|
|
25
|
-
"data-testid":
|
|
28
|
+
"data-testid": p,
|
|
26
29
|
children: [
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
30
|
+
/* @__PURE__ */ a(
|
|
31
|
+
n,
|
|
29
32
|
{
|
|
30
33
|
direction: "row",
|
|
31
34
|
align: "center",
|
|
32
35
|
gap: "sm",
|
|
33
|
-
"data-testid":
|
|
36
|
+
"data-testid": f,
|
|
34
37
|
children: [
|
|
35
|
-
/* @__PURE__ */ t(g, { network:
|
|
36
|
-
/* @__PURE__ */ t(r, { as: "span", className: "text-sm text-foreground", children:
|
|
38
|
+
/* @__PURE__ */ t(g, { network: m, size: 16 }),
|
|
39
|
+
/* @__PURE__ */ t(r, { as: "span", className: "text-sm text-foreground", children: m })
|
|
37
40
|
]
|
|
38
41
|
}
|
|
39
42
|
),
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
s ? /* @__PURE__ */ t(
|
|
44
|
+
n,
|
|
42
45
|
{
|
|
43
46
|
direction: "row",
|
|
44
47
|
align: "center",
|
|
45
48
|
gap: "sm",
|
|
46
|
-
"data-testid":
|
|
47
|
-
children:
|
|
48
|
-
|
|
49
|
+
"data-testid": x,
|
|
50
|
+
children: i ? /* @__PURE__ */ t(
|
|
51
|
+
l,
|
|
49
52
|
{
|
|
50
53
|
className: "text-sm text-foreground",
|
|
51
|
-
href:
|
|
54
|
+
href: i,
|
|
52
55
|
external: !0,
|
|
53
56
|
target: "_blank",
|
|
54
57
|
size: "sm",
|
|
55
|
-
onClick:
|
|
56
|
-
children:
|
|
58
|
+
onClick: d,
|
|
59
|
+
children: s
|
|
57
60
|
}
|
|
58
|
-
) : /* @__PURE__ */ t(r, { as: "span", className: "text-sm text-foreground", children:
|
|
61
|
+
) : /* @__PURE__ */ t(r, { as: "span", className: "text-sm text-foreground", children: s })
|
|
59
62
|
}
|
|
60
|
-
) : /* @__PURE__ */ t(r, { as: "span", className: "text-sm text-foreground", children: /* @__PURE__ */ t(
|
|
63
|
+
) : /* @__PURE__ */ t(r, { as: "span", className: "text-sm text-foreground", children: /* @__PURE__ */ t(u, { messageId: "components.titleMeta.unknownCurator" }) }),
|
|
64
|
+
c?.map((e) => /* @__PURE__ */ a(
|
|
65
|
+
l,
|
|
66
|
+
{
|
|
67
|
+
className: "inline-flex items-center gap-2 text-sm text-foreground",
|
|
68
|
+
href: e.href,
|
|
69
|
+
external: !0,
|
|
70
|
+
target: "_blank",
|
|
71
|
+
size: "sm",
|
|
72
|
+
onClick: e.onClick,
|
|
73
|
+
"data-testid": o.link,
|
|
74
|
+
children: [
|
|
75
|
+
e.token ? /* @__PURE__ */ t(h, { token: e.token, size: 16, className: "shrink-0" }) : null,
|
|
76
|
+
e.label || e.token?.symbol ? /* @__PURE__ */ t(r, { as: "span", className: "text-sm text-foreground", children: e.label ?? e.token?.symbol }) : null
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
e.href
|
|
80
|
+
))
|
|
61
81
|
]
|
|
62
82
|
}
|
|
63
83
|
);
|
|
64
84
|
}
|
|
65
85
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
86
|
+
I as TitleMeta,
|
|
87
|
+
o as TitleMetaTest
|
|
68
88
|
};
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Stack as
|
|
3
|
-
import { TokenTemplate as
|
|
4
|
-
import { Typography as
|
|
5
|
-
import { formatMoney as
|
|
6
|
-
import { TokenAmountTest as
|
|
7
|
-
function
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { Stack as a } from "../stack/stack.js";
|
|
3
|
+
import { TokenTemplate as i } from "../../token-template/token-template.js";
|
|
4
|
+
import { Typography as l } from "../../typography/typography.js";
|
|
5
|
+
import { formatMoney as p } from "../../../utils/format-money.js";
|
|
6
|
+
import { TokenAmountTest as t } from "./constants.js";
|
|
7
|
+
function v({
|
|
8
8
|
data: o,
|
|
9
|
-
token:
|
|
9
|
+
token: n,
|
|
10
|
+
align: e = "start"
|
|
10
11
|
}) {
|
|
11
12
|
if (o === null)
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ r(
|
|
13
14
|
"span",
|
|
14
15
|
{
|
|
15
16
|
className: "text-secondary-foreground",
|
|
16
|
-
"data-testid":
|
|
17
|
+
"data-testid": t.root,
|
|
17
18
|
children: "—"
|
|
18
19
|
}
|
|
19
20
|
);
|
|
20
|
-
const
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
21
|
+
const m = n ?? o.token;
|
|
22
|
+
return /* @__PURE__ */ s(a, { gap: "xs", align: e, "data-testid": t.root, children: [
|
|
23
|
+
/* @__PURE__ */ r(i, { value: o.value, token: m }),
|
|
24
|
+
/* @__PURE__ */ r(l, { as: "span", variant: "caption", color: "secondary", children: o.valueUsd === null ? "—" : p(o.valueUsd) })
|
|
24
25
|
] });
|
|
25
26
|
}
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
v as TokenAmount,
|
|
29
|
+
t as TokenAmountTest
|
|
29
30
|
};
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import { PositionShortLabelTest as t, ValueTest as
|
|
2
|
-
import { PnlValue as
|
|
1
|
+
import { PositionShortLabelTest as t, ValueTest as r } from "./constants.js";
|
|
2
|
+
import { PnlValue as i } from "./pnl-value.js";
|
|
3
|
+
import { PointsValue as p } from "./points-value.js";
|
|
3
4
|
import { PositionShortLabel as n } from "./position-short-label.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
5
|
+
import { PositionStatusBadge as V } from "./position-status-badge.js";
|
|
6
|
+
import { PositionTypeBadge as m } from "./position-type-badge.js";
|
|
7
|
+
import { ApyValue as P, HealthFactorValue as g, LeverageValue as T, TokenBigint as b, UsdValue as d, UtilizationValue as h, bps as B } from "./scalars.js";
|
|
6
8
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
P as ApyValue,
|
|
10
|
+
g as HealthFactorValue,
|
|
11
|
+
T as LeverageValue,
|
|
12
|
+
i as PnlValue,
|
|
13
|
+
p as PointsValue,
|
|
11
14
|
n as PositionShortLabel,
|
|
12
15
|
t as PositionShortLabelTest,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
V as PositionStatusBadge,
|
|
17
|
+
m as PositionTypeBadge,
|
|
18
|
+
b as TokenBigint,
|
|
19
|
+
d as UsdValue,
|
|
20
|
+
h as UtilizationValue,
|
|
21
|
+
r as ValueTest,
|
|
22
|
+
B as bps
|
|
18
23
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as n, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { PointsIcon as r } from "../../points-icon/points-icon.js";
|
|
3
|
+
import { pointProgramsOf as l } from "../../../utils/apy-breakdown.js";
|
|
4
|
+
import { ValueTest as a } from "./constants.js";
|
|
5
|
+
function c({
|
|
6
|
+
data: i
|
|
7
|
+
}) {
|
|
8
|
+
if (!i) return null;
|
|
9
|
+
const t = l(i);
|
|
10
|
+
return t.length === 0 ? null : /* @__PURE__ */ n(
|
|
11
|
+
"span",
|
|
12
|
+
{
|
|
13
|
+
className: "inline-flex flex-wrap items-center gap-1.5",
|
|
14
|
+
"data-testid": a.points,
|
|
15
|
+
children: t.map((e) => /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1", children: [
|
|
16
|
+
/* @__PURE__ */ n(
|
|
17
|
+
r,
|
|
18
|
+
{
|
|
19
|
+
reward: { name: e.name, type: e.id },
|
|
20
|
+
size: 16
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
/* @__PURE__ */ n("span", { children: e.name })
|
|
24
|
+
] }, e.id))
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
c as PointsValue
|
|
30
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Badge as r } from "../../badge/badge.js";
|
|
3
|
+
import "../../badge/chip.js";
|
|
4
|
+
import { FormattedMessageTyped as o } from "../../typed-intl/index.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import "@gearbox-protocol/sdk";
|
|
7
|
+
import { cn as i } from "../../../utils/cn.js";
|
|
8
|
+
import "sonner";
|
|
9
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
10
|
+
import "luxon";
|
|
11
|
+
import "../../../utils/z-index.js";
|
|
12
|
+
const m = {
|
|
13
|
+
active: "shrink-0 border-transparent bg-emerald-500/15 font-medium text-emerald-400 hover:bg-emerald-500/15",
|
|
14
|
+
repaid: "shrink-0 border-transparent bg-muted font-medium text-muted-foreground hover:bg-muted"
|
|
15
|
+
}, a = {
|
|
16
|
+
active: "components.positionStatusBadge.active",
|
|
17
|
+
repaid: "components.positionStatusBadge.repaid"
|
|
18
|
+
};
|
|
19
|
+
function v({
|
|
20
|
+
data: t
|
|
21
|
+
}) {
|
|
22
|
+
return /* @__PURE__ */ e(r, { variant: "secondary", className: i(m[t]), children: /* @__PURE__ */ e(o, { messageId: a[t] }) });
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
v as PositionStatusBadge
|
|
26
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { Badge as r } from "../../badge/badge.js";
|
|
3
|
-
import
|
|
3
|
+
import "../../badge/chip.js";
|
|
4
|
+
import { FormattedMessageTyped as i } from "../../typed-intl/index.js";
|
|
4
5
|
import "react";
|
|
5
6
|
import "@gearbox-protocol/sdk";
|
|
6
|
-
import { cn as
|
|
7
|
+
import { cn as n } from "../../../utils/cn.js";
|
|
7
8
|
import "sonner";
|
|
8
9
|
import "@gearbox-protocol/sdk/common-utils";
|
|
9
10
|
import "luxon";
|
|
@@ -17,7 +18,7 @@ const p = {
|
|
|
17
18
|
strategy: "components.positionTypeBadge.strategy",
|
|
18
19
|
liquidation: "components.positionTypeBadge.liquidation"
|
|
19
20
|
}, a = "text-[10px] leading-none px-1.5 py-0.5 rounded-md";
|
|
20
|
-
function
|
|
21
|
+
function x({
|
|
21
22
|
data: e,
|
|
22
23
|
size: t = "table"
|
|
23
24
|
}) {
|
|
@@ -25,14 +26,14 @@ function f({
|
|
|
25
26
|
r,
|
|
26
27
|
{
|
|
27
28
|
variant: "secondary",
|
|
28
|
-
className:
|
|
29
|
+
className: n(
|
|
29
30
|
p[e],
|
|
30
31
|
t === "aside" && a
|
|
31
32
|
),
|
|
32
|
-
children: /* @__PURE__ */ o(
|
|
33
|
+
children: /* @__PURE__ */ o(i, { messageId: m[e] })
|
|
33
34
|
}
|
|
34
35
|
);
|
|
35
36
|
}
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
+
x as PositionTypeBadge
|
|
38
39
|
};
|