@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,166 +1,181 @@
|
|
|
1
1
|
import { AmountInput as r } from "./amount-input/amount-input.js";
|
|
2
2
|
import { TokenSelectPanel as a } from "./amount-input/token-select-panel.js";
|
|
3
|
-
import { BorrowRateBlock as
|
|
3
|
+
import { BorrowRateBlock as p } from "./borrow-rate-block/borrow-rate-block.js";
|
|
4
4
|
import { BorrowRateBlockTest as f } from "./borrow-rate-block/constants.js";
|
|
5
5
|
import { ChartWithSideCard as x } from "./chart-with-side-card/chart-with-side-card.js";
|
|
6
|
-
import { ChartWithSideCardTest as
|
|
6
|
+
import { ChartWithSideCardTest as T } from "./chart-with-side-card/constants.js";
|
|
7
7
|
import { DetailedPageTitle as d } from "./detailed-page-title/detailed-page-title.js";
|
|
8
|
-
import { AsideAlignAnchor as
|
|
8
|
+
import { AsideAlignAnchor as S } from "./details-view/detail-aside/detail-aside-scope.js";
|
|
9
9
|
import { DetailAsideScreenLayout as g } from "./details-view/detail-aside/detail-aside-screen-layout.js";
|
|
10
10
|
import { DetailsView as k, DetailsViewLeftPane as B, DetailsViewManagePane as A } from "./details-view/details-view.js";
|
|
11
11
|
import { HealthFactorBlockTest as L } from "./health-factor-block/constants.js";
|
|
12
|
-
import { HealthFactorBlock as
|
|
13
|
-
import { HistoryChart as
|
|
14
|
-
import { InfoLine as
|
|
12
|
+
import { HealthFactorBlock as y } from "./health-factor-block/health-factor-block.js";
|
|
13
|
+
import { HistoryChart as h } from "./history-chart/history-chart.js";
|
|
14
|
+
import { InfoLine as M, InfoList as V, InfoSectionTitle as D, PointsInfoLine as H } from "./info-list/info-list.js";
|
|
15
15
|
import { InfoPortalOut as E, InfoPortalProvider as q } from "./info-portal/info-portal.js";
|
|
16
|
-
import { LeverageInput as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
16
|
+
import { LeverageInput as N } from "./leverage-input/leverage-input.js";
|
|
17
|
+
import { LeveragePresetChipsTest as F } from "./leverage-preset-chips/constants.js";
|
|
18
|
+
import { LeveragePresetChips as U } from "./leverage-preset-chips/leverage-preset-chips.js";
|
|
19
|
+
import { LiquidationParamsTableTest as W } from "./liquidation-params-table/constants.js";
|
|
20
|
+
import { LiquidationParamsTable as X } from "./liquidation-params-table/liquidation-params-table.js";
|
|
21
|
+
import { LiquidationPriceBlockTest as J } from "./liquidation-price-block/constants.js";
|
|
22
|
+
import { LiquidationPriceBlock as Q } from "./liquidation-price-block/liquidation-price-block.js";
|
|
23
|
+
import { ManagePane as Z, ManagePaneActionTab as $, ManagePaneMessage as ee, ManagePaneTab as oe, ManagePaneTabDropdown as re } from "./manage-pane/manage-pane.js";
|
|
24
|
+
import { MoreAccordionTest as ae } from "./more-accordion/constants.js";
|
|
25
|
+
import { MoreAccordion as pe } from "./more-accordion/more-accordion.js";
|
|
26
|
+
import { NestedInfoStackTest as fe } from "./nested-info-stack/constants.js";
|
|
27
|
+
import { NestedInfoStack as xe } from "./nested-info-stack/nested-info-stack.js";
|
|
28
|
+
import { PageHeadProvider as Te, PageTitle as le } from "./page-title/page-title.js";
|
|
29
|
+
import { PoolApyBreakdownCardTest as Pe } from "./pool-apy-breakdown-card/constants.js";
|
|
30
|
+
import { PoolApyBreakdownCard as ce } from "./pool-apy-breakdown-card/pool-apy-breakdown-card.js";
|
|
31
|
+
import { PositionAssetsTest as ue } from "./position-assets/constants.js";
|
|
32
|
+
import { PositionAssets as Be } from "./position-assets/position-assets.js";
|
|
33
|
+
import { ReviewButton as be } from "./review-button/review-button.js";
|
|
34
|
+
import { SectionHeading as Ce } from "./section-heading/section-heading.js";
|
|
35
|
+
import { SEGMENTED_TABS_INACTIVE_BUTTON_CLASS as Ie, SegmentedTabs as he } from "./segmented-tabs/segmented-tabs.js";
|
|
36
|
+
import { SideCardTest as Me } from "./side-card/constants.js";
|
|
37
|
+
import { SideCard as De } from "./side-card/side-card.js";
|
|
38
|
+
import { SPACE_HEIGHT as ve, SPACE_PX as Ee } from "./spacing.js";
|
|
39
|
+
import { Stack as _e } from "./stack/stack.js";
|
|
40
|
+
import { StatBadge as Re, StatBadgeGrid as Fe } from "./stat-badge/stat-badge.js";
|
|
41
|
+
import { StickyBar as Ue } from "./sticky-bar/sticky-bar.js";
|
|
42
|
+
import { StrategyApyBreakdownCardTest as We } from "./strategy-apy-breakdown-card/constants.js";
|
|
43
|
+
import { StrategyApyBreakdownCard as Xe } from "./strategy-apy-breakdown-card/strategy-apy-breakdown-card.js";
|
|
44
|
+
import { Tabber as Je, TabberSection as Ke, isTabber as Qe } from "./tabber/tabber.js";
|
|
45
|
+
import { useDetailScrollSpy as Ze } from "./tabber/use-detail-scroll-spy.js";
|
|
46
|
+
import { useTitleText as eo } from "./text/use-title-text.js";
|
|
47
|
+
import { TimeToLiquidationBlockTest as ro } from "./time-to-liquidation-block/constants.js";
|
|
48
|
+
import { TimeToLiquidationBlock as ao } from "./time-to-liquidation-block/time-to-liquidation-block.js";
|
|
49
|
+
import { TitleMetaTest as po } from "./title-meta/constants.js";
|
|
50
|
+
import { TitleMeta as fo } from "./title-meta/title-meta.js";
|
|
51
|
+
import { TokenAmount as xo } from "./token-amount/token-amount.js";
|
|
52
|
+
import { TokenPairSymbolTest as To } from "./token-pair-symbol/constants.js";
|
|
53
|
+
import { TokenPairSymbol as Po } from "./token-pair-symbol/token-pair-symbol.js";
|
|
54
|
+
import { TokenPairTitleTest as co } from "./token-pair-title/constants.js";
|
|
55
|
+
import { TokenPairTitle as uo } from "./token-pair-title/token-pair-title.js";
|
|
56
|
+
import { PositionShortLabelTest as Bo, ValueTest as Ao } from "./values/constants.js";
|
|
57
|
+
import { PnlValue as Lo } from "./values/pnl-value.js";
|
|
58
|
+
import { PointsValue as yo } from "./values/points-value.js";
|
|
59
|
+
import { PositionShortLabel as ho } from "./values/position-short-label.js";
|
|
60
|
+
import { PositionStatusBadge as Mo } from "./values/position-status-badge.js";
|
|
61
|
+
import { PositionTypeBadge as Do } from "./values/position-type-badge.js";
|
|
62
|
+
import { ApyValue as vo, HealthFactorValue as Eo, LeverageValue as qo, TokenBigint as _o, UsdValue as No, UtilizationValue as Ro, bps as Fo } from "./values/scalars.js";
|
|
63
|
+
import { AmountInputTest as Uo } from "./amount-input/constants.js";
|
|
64
|
+
import { DetailedPageTitleTest as Wo } from "./detailed-page-title/constants.js";
|
|
65
|
+
import { DetailsViewTest as Xo } from "./details-view/constants.js";
|
|
66
|
+
import { HistoryChartTest as Jo } from "./history-chart/constants.js";
|
|
67
|
+
import { InfoListTest as Qo } from "./info-list/constants.js";
|
|
68
|
+
import { LeverageInputTest as Zo } from "./leverage-input/constants.js";
|
|
69
|
+
import { ManagePaneTest as er } from "./manage-pane/constants.js";
|
|
70
|
+
import { PageTitleTest as rr } from "./page-title/constants.js";
|
|
71
|
+
import { ReviewButtonTest as ar } from "./review-button/constants.js";
|
|
72
|
+
import { SectionHeadingTest as pr } from "./section-heading/constants.js";
|
|
73
|
+
import { SegmentedTabsTest as fr } from "./segmented-tabs/constants.js";
|
|
74
|
+
import { StackTest as xr } from "./stack/constants.js";
|
|
75
|
+
import { StatBadgeTest as Tr } from "./stat-badge/constants.js";
|
|
76
|
+
import { StickyBarTest as dr } from "./sticky-bar/constants.js";
|
|
77
|
+
import { TabberTest as Sr } from "./tabber/constants.js";
|
|
78
|
+
import { TokenAmountTest as gr } from "./token-amount/constants.js";
|
|
73
79
|
export {
|
|
74
80
|
r as AmountInput,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
Uo as AmountInputTest,
|
|
82
|
+
vo as ApyValue,
|
|
83
|
+
S as AsideAlignAnchor,
|
|
84
|
+
p as BorrowRateBlock,
|
|
79
85
|
f as BorrowRateBlockTest,
|
|
80
86
|
x as ChartWithSideCard,
|
|
81
|
-
|
|
87
|
+
T as ChartWithSideCardTest,
|
|
82
88
|
g as DetailAsideScreenLayout,
|
|
83
89
|
d as DetailedPageTitle,
|
|
84
|
-
|
|
90
|
+
Wo as DetailedPageTitleTest,
|
|
85
91
|
k as DetailsView,
|
|
86
92
|
B as DetailsViewLeftPane,
|
|
87
93
|
A as DetailsViewManagePane,
|
|
88
|
-
|
|
89
|
-
|
|
94
|
+
Xo as DetailsViewTest,
|
|
95
|
+
y as HealthFactorBlock,
|
|
90
96
|
L as HealthFactorBlockTest,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
Eo as HealthFactorValue,
|
|
98
|
+
h as HistoryChart,
|
|
99
|
+
Jo as HistoryChartTest,
|
|
100
|
+
M as InfoLine,
|
|
95
101
|
V as InfoList,
|
|
96
|
-
|
|
102
|
+
Qo as InfoListTest,
|
|
97
103
|
E as InfoPortalOut,
|
|
98
104
|
q as InfoPortalProvider,
|
|
99
105
|
D as InfoSectionTitle,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
J as
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
Re as
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
106
|
+
N as LeverageInput,
|
|
107
|
+
Zo as LeverageInputTest,
|
|
108
|
+
U as LeveragePresetChips,
|
|
109
|
+
F as LeveragePresetChipsTest,
|
|
110
|
+
qo as LeverageValue,
|
|
111
|
+
X as LiquidationParamsTable,
|
|
112
|
+
W as LiquidationParamsTableTest,
|
|
113
|
+
Q as LiquidationPriceBlock,
|
|
114
|
+
J as LiquidationPriceBlockTest,
|
|
115
|
+
Z as ManagePane,
|
|
116
|
+
$ as ManagePaneActionTab,
|
|
117
|
+
ee as ManagePaneMessage,
|
|
118
|
+
oe as ManagePaneTab,
|
|
119
|
+
re as ManagePaneTabDropdown,
|
|
120
|
+
er as ManagePaneTest,
|
|
121
|
+
pe as MoreAccordion,
|
|
122
|
+
ae as MoreAccordionTest,
|
|
123
|
+
xe as NestedInfoStack,
|
|
124
|
+
fe as NestedInfoStackTest,
|
|
125
|
+
Te as PageHeadProvider,
|
|
126
|
+
le as PageTitle,
|
|
127
|
+
rr as PageTitleTest,
|
|
128
|
+
Lo as PnlValue,
|
|
129
|
+
H as PointsInfoLine,
|
|
130
|
+
yo as PointsValue,
|
|
131
|
+
ce as PoolApyBreakdownCard,
|
|
132
|
+
Pe as PoolApyBreakdownCardTest,
|
|
133
|
+
Be as PositionAssets,
|
|
134
|
+
ue as PositionAssetsTest,
|
|
135
|
+
ho as PositionShortLabel,
|
|
136
|
+
Bo as PositionShortLabelTest,
|
|
137
|
+
Mo as PositionStatusBadge,
|
|
138
|
+
Do as PositionTypeBadge,
|
|
139
|
+
be as ReviewButton,
|
|
140
|
+
ar as ReviewButtonTest,
|
|
141
|
+
Ie as SEGMENTED_TABS_INACTIVE_BUTTON_CLASS,
|
|
142
|
+
ve as SPACE_HEIGHT,
|
|
143
|
+
Ee as SPACE_PX,
|
|
144
|
+
Ce as SectionHeading,
|
|
145
|
+
pr as SectionHeadingTest,
|
|
146
|
+
he as SegmentedTabs,
|
|
147
|
+
fr as SegmentedTabsTest,
|
|
148
|
+
De as SideCard,
|
|
149
|
+
Me as SideCardTest,
|
|
150
|
+
_e as Stack,
|
|
151
|
+
xr as StackTest,
|
|
152
|
+
Re as StatBadge,
|
|
153
|
+
Fe as StatBadgeGrid,
|
|
154
|
+
Tr as StatBadgeTest,
|
|
155
|
+
Ue as StickyBar,
|
|
156
|
+
dr as StickyBarTest,
|
|
157
|
+
Xe as StrategyApyBreakdownCard,
|
|
158
|
+
We as StrategyApyBreakdownCardTest,
|
|
159
|
+
Je as Tabber,
|
|
160
|
+
Ke as TabberSection,
|
|
161
|
+
Sr as TabberTest,
|
|
162
|
+
ao as TimeToLiquidationBlock,
|
|
163
|
+
ro as TimeToLiquidationBlockTest,
|
|
164
|
+
fo as TitleMeta,
|
|
165
|
+
po as TitleMetaTest,
|
|
166
|
+
xo as TokenAmount,
|
|
167
|
+
gr as TokenAmountTest,
|
|
168
|
+
_o as TokenBigint,
|
|
169
|
+
Po as TokenPairSymbol,
|
|
170
|
+
To as TokenPairSymbolTest,
|
|
171
|
+
uo as TokenPairTitle,
|
|
172
|
+
co as TokenPairTitleTest,
|
|
159
173
|
a as TokenSelectPanel,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
174
|
+
No as UsdValue,
|
|
175
|
+
Ro as UtilizationValue,
|
|
176
|
+
Ao as ValueTest,
|
|
177
|
+
Fo as bps,
|
|
178
|
+
Qe as isTabber,
|
|
179
|
+
Ze as useDetailScrollSpy,
|
|
180
|
+
eo as useTitleText
|
|
166
181
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { InfoLine as
|
|
1
|
+
import { InfoLine as t, InfoList as e, InfoSectionTitle as f, PointsInfoLine as i } from "./info-list.js";
|
|
2
2
|
import { InfoListTest as r } from "./constants.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
t as InfoLine,
|
|
5
|
+
e as InfoList,
|
|
6
6
|
r as InfoListTest,
|
|
7
|
-
|
|
7
|
+
f as InfoSectionTitle,
|
|
8
|
+
i as PointsInfoLine
|
|
8
9
|
};
|
|
@@ -1,43 +1,61 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Stack as
|
|
3
|
-
import { useTitleText as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Stack as c } from "../stack/stack.js";
|
|
3
|
+
import { useTitleText as n } from "../text/use-title-text.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { pointProgramsOf as f } from "../../../utils/apy-breakdown.js";
|
|
6
|
+
import "@gearbox-protocol/sdk";
|
|
7
|
+
import "clsx";
|
|
8
|
+
import "tailwind-merge";
|
|
9
|
+
import "sonner";
|
|
10
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
11
|
+
import "luxon";
|
|
12
|
+
import "../../../utils/z-index.js";
|
|
13
|
+
import { PointsValue as l } from "../values/points-value.js";
|
|
14
|
+
import "viem";
|
|
15
|
+
import "../../points-icon/points-icon.js";
|
|
16
|
+
import "../../token-icon/token-icon.js";
|
|
17
|
+
import "../../tooltip/simple-tooltip.js";
|
|
18
|
+
import "../../tooltip/tooltip.js";
|
|
19
|
+
import "react-intl";
|
|
20
|
+
import "../../badge/badge.js";
|
|
21
|
+
import "../../badge/chip.js";
|
|
22
|
+
import { Typography as u } from "../../typography/typography.js";
|
|
23
|
+
import { VerticalIndicator as d } from "../../vertical-indicator/vertical-indicator.js";
|
|
6
24
|
import { InfoListTest as i } from "./constants.js";
|
|
7
|
-
function
|
|
25
|
+
function G({
|
|
8
26
|
children: t
|
|
9
27
|
}) {
|
|
10
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ r(c, { gap: "sm", "data-testid": i.root, children: t });
|
|
11
29
|
}
|
|
12
|
-
function
|
|
30
|
+
function g({
|
|
13
31
|
title: t,
|
|
14
32
|
value: o,
|
|
15
|
-
tip:
|
|
16
|
-
valueDescription:
|
|
17
|
-
valueTo:
|
|
18
|
-
testId:
|
|
33
|
+
tip: e,
|
|
34
|
+
valueDescription: m,
|
|
35
|
+
valueTo: p,
|
|
36
|
+
testId: s
|
|
19
37
|
}) {
|
|
20
|
-
const
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
|
|
38
|
+
const a = n();
|
|
39
|
+
return /* @__PURE__ */ r(
|
|
40
|
+
d,
|
|
23
41
|
{
|
|
24
|
-
label:
|
|
25
|
-
tip:
|
|
42
|
+
label: a(t),
|
|
43
|
+
tip: e,
|
|
26
44
|
value: o,
|
|
27
|
-
valueTo:
|
|
28
|
-
valueDescription:
|
|
45
|
+
valueTo: p,
|
|
46
|
+
valueDescription: m,
|
|
29
47
|
size: "sm",
|
|
30
48
|
align: "center",
|
|
31
|
-
"data-testid":
|
|
49
|
+
"data-testid": s ?? i.line
|
|
32
50
|
}
|
|
33
51
|
);
|
|
34
52
|
}
|
|
35
|
-
function
|
|
53
|
+
function H({
|
|
36
54
|
title: t
|
|
37
55
|
}) {
|
|
38
|
-
const o =
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
|
|
56
|
+
const o = n();
|
|
57
|
+
return /* @__PURE__ */ r(
|
|
58
|
+
u,
|
|
41
59
|
{
|
|
42
60
|
as: "span",
|
|
43
61
|
color: "secondary",
|
|
@@ -49,9 +67,16 @@ function L({
|
|
|
49
67
|
}
|
|
50
68
|
);
|
|
51
69
|
}
|
|
70
|
+
function J({
|
|
71
|
+
data: t,
|
|
72
|
+
title: o = "components.yieldBreakdown.points"
|
|
73
|
+
}) {
|
|
74
|
+
return !t || f(t).length === 0 ? null : /* @__PURE__ */ r(g, { title: o, value: /* @__PURE__ */ r(l, { data: t }) });
|
|
75
|
+
}
|
|
52
76
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
77
|
+
g as InfoLine,
|
|
78
|
+
G as InfoList,
|
|
55
79
|
i as InfoListTest,
|
|
56
|
-
|
|
80
|
+
H as InfoSectionTitle,
|
|
81
|
+
J as PointsInfoLine
|
|
57
82
|
};
|
|
@@ -2,20 +2,21 @@ import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as I } from "react";
|
|
3
3
|
import { Stack as x } from "../stack/stack.js";
|
|
4
4
|
import { useTitleText as y } from "../text/use-title-text.js";
|
|
5
|
-
import { EditInput as
|
|
6
|
-
import { Slider as
|
|
5
|
+
import { EditInput as j } from "../../edit-input/edit-input.js";
|
|
6
|
+
import { Slider as F } from "../../slider/slider.js";
|
|
7
7
|
import "../../slider/slider-context.js";
|
|
8
8
|
import { TextButton as O } from "../../text-button/text-button.js";
|
|
9
9
|
import { SimpleTooltip as R } from "../../tooltip/simple-tooltip.js";
|
|
10
10
|
import "../../tooltip/tooltip.js";
|
|
11
11
|
import { useIntlTyped as B, FormattedMessageTyped as T } from "../../typed-intl/index.js";
|
|
12
12
|
import { WithTitle as D } from "../../with-title/with-title.js";
|
|
13
|
+
import { formatLeverage as b } from "../../../utils/format-leverage.js";
|
|
13
14
|
import { LeverageInputTest as i } from "./constants.js";
|
|
14
15
|
const o = 100, P = 10;
|
|
15
|
-
function
|
|
16
|
-
value:
|
|
16
|
+
function ee({
|
|
17
|
+
value: n,
|
|
17
18
|
onChange: s,
|
|
18
|
-
max:
|
|
19
|
+
max: r,
|
|
19
20
|
min: l = 1,
|
|
20
21
|
title: c,
|
|
21
22
|
hint: d,
|
|
@@ -25,11 +26,11 @@ function Z({
|
|
|
25
26
|
size: S = "sm"
|
|
26
27
|
}) {
|
|
27
28
|
const E = B(), C = y(), p = w ?? [
|
|
28
|
-
{ start: l, end:
|
|
29
|
+
{ start: l, end: r, color: "additionalSuccess" }
|
|
29
30
|
], L = N ?? (p.length > 0 ? E.formatMessage({
|
|
30
31
|
messageId: "components.leverageInput.available"
|
|
31
|
-
}) : void 0), [M, u] = I(void 0), [f, g] = I(""), h = M ??
|
|
32
|
-
s(_(e, l,
|
|
32
|
+
}) : void 0), [M, u] = I(void 0), [f, g] = I(""), h = M ?? n, v = (e) => {
|
|
33
|
+
s(_(e, l, r)), u(void 0);
|
|
33
34
|
}, k = () => {
|
|
34
35
|
const e = Number.parseFloat(f.replace(",", "."));
|
|
35
36
|
Number.isFinite(e) && v(e);
|
|
@@ -49,17 +50,17 @@ function Z({
|
|
|
49
50
|
] }),
|
|
50
51
|
/* @__PURE__ */ m(x, { direction: "row", align: "center", gap: "sm", children: [
|
|
51
52
|
/* @__PURE__ */ t("div", { className: "flex w-[90px] flex-row flex-nowrap items-center", children: /* @__PURE__ */ t(
|
|
52
|
-
|
|
53
|
+
j,
|
|
53
54
|
{
|
|
54
55
|
value: f,
|
|
55
56
|
placeholder: "0",
|
|
56
|
-
label:
|
|
57
|
+
label: `${b(h)}x`,
|
|
57
58
|
textButtonProps: {
|
|
58
59
|
className: "inline-flex items-center whitespace-nowrap"
|
|
59
60
|
},
|
|
60
61
|
"data-testid": i.value,
|
|
61
62
|
onEditModeChange: (e) => {
|
|
62
|
-
e && g(b(
|
|
63
|
+
e && g(b(n));
|
|
63
64
|
},
|
|
64
65
|
onChange: (e) => g(e.target.value),
|
|
65
66
|
onSubmit: k
|
|
@@ -88,15 +89,15 @@ function Z({
|
|
|
88
89
|
] })
|
|
89
90
|
] }),
|
|
90
91
|
children: /* @__PURE__ */ t(
|
|
91
|
-
|
|
92
|
+
F,
|
|
92
93
|
{
|
|
93
94
|
from: l * o,
|
|
94
|
-
to:
|
|
95
|
+
to: r * o,
|
|
95
96
|
precision: o,
|
|
96
97
|
value: h * o,
|
|
97
98
|
colorIntervals: V,
|
|
98
99
|
colorIntervalLabel: L,
|
|
99
|
-
markerStep:
|
|
100
|
+
markerStep: r > P ? 200 : 100,
|
|
100
101
|
"data-testid": i.slider,
|
|
101
102
|
onChangeValue: (e) => u(e / o),
|
|
102
103
|
onSubmitValue: (e) => v(e / o)
|
|
@@ -105,13 +106,10 @@ function Z({
|
|
|
105
106
|
}
|
|
106
107
|
) });
|
|
107
108
|
}
|
|
108
|
-
function _(
|
|
109
|
-
return Math.min(Math.max(
|
|
110
|
-
}
|
|
111
|
-
function b(r) {
|
|
112
|
-
return (Math.round(r * 100) / 100).toFixed(2);
|
|
109
|
+
function _(n, s, r) {
|
|
110
|
+
return Math.min(Math.max(n, s), r);
|
|
113
111
|
}
|
|
114
112
|
export {
|
|
115
|
-
|
|
113
|
+
ee as LeverageInput,
|
|
116
114
|
i as LeverageInputTest
|
|
117
115
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsxs as n, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { SegmentedTabs as g } from "../segmented-tabs/segmented-tabs.js";
|
|
3
|
+
import { FormattedMessageTyped as d } from "../../typed-intl/index.js";
|
|
4
|
+
import { formatChipLeverage as l } from "../../../utils/leverage-presets.js";
|
|
5
|
+
import { LeveragePresetChipsTest as s } from "./constants.js";
|
|
6
|
+
function u({
|
|
7
|
+
options: e,
|
|
8
|
+
value: r,
|
|
9
|
+
onChange: a
|
|
10
|
+
}) {
|
|
11
|
+
if (e.length === 0) return null;
|
|
12
|
+
const i = r != null && e.includes(r) ? String(r) : String(e[e.length - 1]);
|
|
13
|
+
return /* @__PURE__ */ n(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: "flex items-center gap-2",
|
|
17
|
+
"data-testid": s.root,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ m("span", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ m(d, { messageId: "components.leveragePresetChips.label" }) }),
|
|
20
|
+
/* @__PURE__ */ m(
|
|
21
|
+
g,
|
|
22
|
+
{
|
|
23
|
+
items: e.map((t) => ({
|
|
24
|
+
id: String(t),
|
|
25
|
+
item: `${l(t)}×`,
|
|
26
|
+
testId: s.chip
|
|
27
|
+
})),
|
|
28
|
+
activeTab: i,
|
|
29
|
+
onTabChange: (t) => a(Number(t))
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
u as LeveragePresetChips,
|
|
38
|
+
s as LeveragePresetChipsTest
|
|
39
|
+
};
|