@gearbox-protocol/ui-kit 4.0.0-next.1 → 4.0.0-next.3
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/base/amount-input/amount-input.cjs +1 -1
- package/dist/cjs/components/base/amount-input/constants.cjs +1 -1
- package/dist/cjs/components/base/amount-input/index.cjs +1 -1
- package/dist/cjs/components/base/amount-input/token-button.cjs +1 -1
- package/dist/cjs/components/base/amount-input/token-select-panel.cjs +1 -0
- package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -0
- package/dist/cjs/components/base/borrow-rate-block/constants.cjs +1 -0
- package/dist/cjs/components/base/borrow-rate-block/index.cjs +1 -0
- package/dist/cjs/components/base/chart-with-side-card/chart-with-side-card.cjs +1 -0
- package/dist/cjs/components/base/chart-with-side-card/constants.cjs +1 -0
- package/dist/cjs/components/base/chart-with-side-card/index.cjs +1 -0
- package/dist/cjs/components/base/details-view/details-view.cjs +1 -1
- package/dist/cjs/components/base/history-chart/history-chart.cjs +1 -1
- package/dist/cjs/components/base/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/constants.cjs +1 -1
- package/dist/cjs/components/base/info-list/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
- package/dist/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
- package/dist/cjs/components/base/liquidation-params-table/constants.cjs +1 -0
- package/dist/cjs/components/base/liquidation-params-table/index.cjs +1 -0
- package/dist/cjs/components/base/liquidation-params-table/liquidation-params-table.cjs +1 -0
- package/dist/cjs/components/base/manage-pane/index.cjs +1 -1
- package/dist/cjs/components/base/manage-pane/manage-pane.cjs +1 -1
- package/dist/cjs/components/base/more-accordion/constants.cjs +1 -0
- package/dist/cjs/components/base/more-accordion/index.cjs +1 -0
- package/dist/cjs/components/base/more-accordion/more-accordion.cjs +1 -0
- package/dist/cjs/components/base/nested-info-stack/constants.cjs +1 -0
- package/dist/cjs/components/base/nested-info-stack/index.cjs +1 -0
- package/dist/cjs/components/base/nested-info-stack/nested-info-stack.cjs +1 -0
- package/dist/cjs/components/base/page-title/page-title.cjs +1 -1
- package/dist/cjs/components/base/pool-apy-breakdown-card/constants.cjs +1 -0
- package/dist/cjs/components/base/pool-apy-breakdown-card/index.cjs +1 -0
- package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -0
- package/dist/cjs/components/base/side-card/constants.cjs +1 -0
- package/dist/cjs/components/base/side-card/index.cjs +1 -0
- package/dist/cjs/components/base/side-card/side-card.cjs +1 -0
- package/dist/cjs/components/base/strategy-apy-breakdown-card/constants.cjs +1 -0
- package/dist/cjs/components/base/strategy-apy-breakdown-card/index.cjs +1 -0
- package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -0
- package/dist/cjs/components/base/tabber/tabber.cjs +1 -1
- package/dist/cjs/components/base/title-meta/constants.cjs +1 -0
- package/dist/cjs/components/base/title-meta/index.cjs +1 -0
- package/dist/cjs/components/base/title-meta/title-meta.cjs +1 -0
- package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
- package/dist/cjs/components/base/token-pair-symbol/constants.cjs +1 -0
- package/dist/cjs/components/base/token-pair-symbol/index.cjs +1 -0
- package/dist/cjs/components/base/token-pair-symbol/token-pair-symbol.cjs +1 -0
- package/dist/cjs/components/base/token-pair-title/constants.cjs +1 -0
- package/dist/cjs/components/base/token-pair-title/index.cjs +1 -0
- package/dist/cjs/components/base/token-pair-title/token-pair-title.cjs +1 -0
- package/dist/cjs/components/base/values/index.cjs +1 -1
- package/dist/cjs/components/base/values/pnl-value.cjs +1 -1
- package/dist/cjs/components/base/values/scalars.cjs +1 -1
- package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/composites/notification-center/notification-center.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/dialog/TransactionConfirmModalView.cjs +1 -1
- package/dist/cjs/components/explorer-links-dropdown/explorer-links-dropdown.cjs +1 -1
- package/dist/cjs/components/explorer-links-dropdown/index.cjs +1 -1
- package/dist/cjs/components/graph/graph-view.cjs +1 -1
- package/dist/cjs/components/graph/graph.cjs +1 -1
- package/dist/cjs/components/icons/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/layout/index.cjs +1 -1
- package/dist/cjs/components/modal/modal.cjs +1 -1
- package/dist/cjs/components/table/index.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/hooks/index.cjs +1 -1
- package/dist/cjs/hooks/use-debounce-call.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/esm/components/base/amount-input/amount-input.js +179 -147
- package/dist/esm/components/base/amount-input/constants.js +2 -0
- package/dist/esm/components/base/amount-input/index.js +5 -3
- package/dist/esm/components/base/amount-input/token-button.js +65 -35
- package/dist/esm/components/base/amount-input/token-select-panel.js +85 -0
- package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +88 -0
- package/dist/esm/components/base/borrow-rate-block/constants.js +8 -0
- package/dist/esm/components/base/borrow-rate-block/index.js +6 -0
- package/dist/esm/components/base/chart-with-side-card/chart-with-side-card.js +36 -0
- package/dist/esm/components/base/chart-with-side-card/constants.js +8 -0
- package/dist/esm/components/base/chart-with-side-card/index.js +6 -0
- package/dist/esm/components/base/details-view/details-view.js +37 -32
- package/dist/esm/components/base/history-chart/history-chart.js +25 -21
- package/dist/esm/components/base/index.js +165 -116
- package/dist/esm/components/base/info-list/constants.js +1 -0
- package/dist/esm/components/base/info-list/index.js +5 -4
- package/dist/esm/components/base/info-list/info-list.js +44 -23
- package/dist/esm/components/base/leverage-input/leverage-input.js +53 -50
- package/dist/esm/components/base/liquidation-params-table/constants.js +6 -0
- package/dist/esm/components/base/liquidation-params-table/index.js +6 -0
- package/dist/esm/components/base/liquidation-params-table/liquidation-params-table.js +62 -0
- package/dist/esm/components/base/manage-pane/index.js +7 -6
- package/dist/esm/components/base/manage-pane/manage-pane.js +88 -67
- package/dist/esm/components/base/more-accordion/constants.js +7 -0
- package/dist/esm/components/base/more-accordion/index.js +6 -0
- package/dist/esm/components/base/more-accordion/more-accordion.js +51 -0
- package/dist/esm/components/base/nested-info-stack/constants.js +6 -0
- package/dist/esm/components/base/nested-info-stack/index.js +6 -0
- package/dist/esm/components/base/nested-info-stack/nested-info-stack.js +20 -0
- package/dist/esm/components/base/page-title/page-title.js +28 -22
- package/dist/esm/components/base/pool-apy-breakdown-card/constants.js +7 -0
- package/dist/esm/components/base/pool-apy-breakdown-card/index.js +6 -0
- package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +65 -0
- package/dist/esm/components/base/side-card/constants.js +8 -0
- package/dist/esm/components/base/side-card/index.js +6 -0
- package/dist/esm/components/base/side-card/side-card.js +57 -0
- package/dist/esm/components/base/strategy-apy-breakdown-card/constants.js +7 -0
- package/dist/esm/components/base/strategy-apy-breakdown-card/index.js +6 -0
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +51 -0
- package/dist/esm/components/base/tabber/tabber.js +83 -75
- package/dist/esm/components/base/title-meta/constants.js +8 -0
- package/dist/esm/components/base/title-meta/index.js +6 -0
- package/dist/esm/components/base/title-meta/title-meta.js +68 -0
- package/dist/esm/components/base/token-amount/token-amount.js +12 -12
- package/dist/esm/components/base/token-pair-symbol/constants.js +6 -0
- package/dist/esm/components/base/token-pair-symbol/index.js +6 -0
- package/dist/esm/components/base/token-pair-symbol/token-pair-symbol.js +33 -0
- package/dist/esm/components/base/token-pair-title/constants.js +6 -0
- package/dist/esm/components/base/token-pair-title/index.js +6 -0
- package/dist/esm/components/base/token-pair-title/token-pair-title.js +20 -0
- package/dist/esm/components/base/values/index.js +8 -7
- package/dist/esm/components/base/values/pnl-value.js +8 -8
- package/dist/esm/components/base/values/scalars.js +27 -26
- package/dist/esm/components/block-sync-pill/block-sync-pill.js +19 -29
- package/dist/esm/components/checkbox/checkbox-labeled.js +16 -26
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +16 -26
- package/dist/esm/components/composites/notification-center/notification-center.js +1 -1
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +2 -3
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +14 -13
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table.js +6 -7
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +25 -35
- package/dist/esm/components/explorer-links-dropdown/explorer-links-dropdown.js +1 -83
- package/dist/esm/components/explorer-links-dropdown/index.js +1 -4
- package/dist/esm/components/graph/graph-view.js +74 -74
- package/dist/esm/components/graph/graph.js +309 -308
- package/dist/esm/components/icons/index.js +29 -28
- package/dist/esm/components/index.js +699 -709
- package/dist/esm/components/layout/index.js +14 -33
- package/dist/esm/components/modal/modal.js +1 -1
- package/dist/esm/components/table/index.js +38 -52
- package/dist/esm/components/with-copy/with-copy.js +16 -26
- package/dist/esm/hooks/index.js +29 -54
- package/dist/esm/hooks/use-debounce-call.js +2 -3
- package/dist/esm/index.js +864 -900
- package/dist/esm/locale/en.json.js +24 -1
- package/dist/globals.css +1 -1
- package/dist/types/components/base/amount-input/amount-input.d.ts +13 -2
- package/dist/types/components/base/amount-input/constants.d.ts +2 -0
- package/dist/types/components/base/amount-input/index.d.ts +1 -0
- package/dist/types/components/base/amount-input/token-button.d.ts +14 -2
- package/dist/types/components/base/amount-input/token-select-panel.d.ts +17 -0
- package/dist/types/components/base/borrow-rate-block/borrow-rate-block.d.ts +21 -0
- package/dist/types/components/base/borrow-rate-block/constants.d.ts +5 -0
- package/dist/types/components/base/borrow-rate-block/index.d.ts +2 -0
- package/dist/types/components/base/chart-with-side-card/chart-with-side-card.d.ts +13 -0
- package/dist/types/components/base/chart-with-side-card/constants.d.ts +5 -0
- package/dist/types/components/base/chart-with-side-card/index.d.ts +2 -0
- package/dist/types/components/base/detailed-page-title/detailed-page-title.d.ts +2 -1
- package/dist/types/components/base/history-chart/history-chart.d.ts +8 -1
- package/dist/types/components/base/index.d.ts +11 -0
- package/dist/types/components/base/info-list/constants.d.ts +1 -0
- package/dist/types/components/base/info-list/info-list.d.ts +8 -1
- package/dist/types/components/base/leverage-input/leverage-input.d.ts +1 -1
- package/dist/types/components/base/liquidation-params-table/constants.d.ts +3 -0
- package/dist/types/components/base/liquidation-params-table/index.d.ts +2 -0
- package/dist/types/components/base/liquidation-params-table/liquidation-params-table.d.ts +12 -0
- package/dist/types/components/base/manage-pane/manage-pane.d.ts +7 -0
- package/dist/types/components/base/more-accordion/constants.d.ts +4 -0
- package/dist/types/components/base/more-accordion/index.d.ts +2 -0
- package/dist/types/components/base/more-accordion/more-accordion.d.ts +11 -0
- package/dist/types/components/base/nested-info-stack/constants.d.ts +3 -0
- package/dist/types/components/base/nested-info-stack/index.d.ts +2 -0
- package/dist/types/components/base/nested-info-stack/nested-info-stack.d.ts +10 -0
- package/dist/types/components/base/page-title/page-title.d.ts +6 -2
- package/dist/types/components/base/pool-apy-breakdown-card/constants.d.ts +4 -0
- package/dist/types/components/base/pool-apy-breakdown-card/index.d.ts +2 -0
- package/dist/types/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.d.ts +14 -0
- package/dist/types/components/base/side-card/constants.d.ts +5 -0
- package/dist/types/components/base/side-card/index.d.ts +2 -0
- package/dist/types/components/base/side-card/side-card.d.ts +16 -0
- package/dist/types/components/base/strategy-apy-breakdown-card/constants.d.ts +4 -0
- package/dist/types/components/base/strategy-apy-breakdown-card/index.d.ts +2 -0
- package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +9 -0
- package/dist/types/components/base/tabber/tabber.d.ts +11 -2
- package/dist/types/components/base/title-meta/constants.d.ts +5 -0
- package/dist/types/components/base/title-meta/index.d.ts +2 -0
- package/dist/types/components/base/title-meta/title-meta.d.ts +15 -0
- package/dist/types/components/base/token-pair-symbol/constants.d.ts +3 -0
- package/dist/types/components/base/token-pair-symbol/index.d.ts +2 -0
- package/dist/types/components/base/token-pair-symbol/token-pair-symbol.d.ts +15 -0
- package/dist/types/components/base/token-pair-title/constants.d.ts +3 -0
- package/dist/types/components/base/token-pair-title/index.d.ts +2 -0
- package/dist/types/components/base/token-pair-title/token-pair-title.d.ts +11 -0
- package/dist/types/components/base/values/index.d.ts +1 -1
- package/dist/types/components/base/values/position-type-badge.d.ts +1 -1
- package/dist/types/components/base/values/scalars.d.ts +9 -0
- package/dist/types/components/base-link/base-link.d.ts +1 -1
- package/dist/types/components/buttons/button/button.d.ts +2 -2
- package/dist/types/components/checkbox/checkbox.d.ts +2 -2
- package/dist/types/components/composites/pool-assets-table/pool-assets-table-row.d.ts +1 -1
- package/dist/types/components/composites/pool-assets-table/pool-assets-table.d.ts +4 -1
- package/dist/types/components/dialog/dialog-container.d.ts +3 -3
- package/dist/types/components/edit-input/edit-input.d.ts +1 -1
- package/dist/types/components/explorer-links-dropdown/explorer-links-dropdown.d.ts +6 -75
- package/dist/types/components/filter/variants.d.ts +1 -1
- package/dist/types/components/graph/graph-view.d.ts +1 -1
- package/dist/types/components/health-factor/health-factor.d.ts +2 -1
- package/dist/types/components/icons/index.d.ts +1 -1
- package/dist/types/components/index.d.ts +0 -6
- package/dist/types/components/input/input.d.ts +1 -1
- package/dist/types/components/layout/index.d.ts +0 -7
- package/dist/types/components/skeleton/skeleton.d.ts +2 -2
- package/dist/types/components/status-dot/status-dot.d.ts +1 -1
- package/dist/types/components/table/index.d.ts +0 -5
- package/dist/types/components/text-button/text-button.d.ts +1 -1
- package/dist/types/components/tip-card/tip-card.d.ts +2 -2
- package/dist/types/components/token-symbol/token-symbol.d.ts +1 -1
- package/dist/types/components/vertical-indicator/vertical-indicator.d.ts +2 -2
- package/dist/types/components/with-title/with-title.d.ts +1 -1
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/index.d.ts +0 -6
- package/dist/types/locale/en.json.d.ts +30 -1
- package/dist/types/types/index.d.ts +0 -2
- package/package.json +3 -15
- package/dist/cjs/components/auth/connect-required.cjs +0 -1
- package/dist/cjs/components/auth/index.cjs +0 -1
- package/dist/cjs/components/auth/signin-required.cjs +0 -1
- package/dist/cjs/components/auth/wallet-ui-context.cjs +0 -1
- package/dist/cjs/components/block-sync/block-sync.cjs +0 -1
- package/dist/cjs/components/block-sync/index.cjs +0 -1
- package/dist/cjs/components/image/image.cjs +0 -1
- package/dist/cjs/components/image/index.cjs +0 -1
- package/dist/cjs/components/layout/app-logo/app-logo.cjs +0 -1
- package/dist/cjs/components/layout/app-logo/index.cjs +0 -1
- package/dist/cjs/components/layout/block/block.cjs +0 -1
- package/dist/cjs/components/layout/block/index.cjs +0 -1
- package/dist/cjs/components/layout/footer/footer.cjs +0 -1
- package/dist/cjs/components/layout/footer/index.cjs +0 -1
- package/dist/cjs/components/layout/header/header.cjs +0 -1
- package/dist/cjs/components/layout/header/index.cjs +0 -1
- package/dist/cjs/components/layout/legal-disclaimer/index.cjs +0 -1
- package/dist/cjs/components/layout/legal-disclaimer/legal-disclaimer.cjs +0 -1
- package/dist/cjs/components/layout/page-layout/index.cjs +0 -1
- package/dist/cjs/components/layout/page-layout/page-layout.cjs +0 -1
- package/dist/cjs/components/layout/social-icons/index.cjs +0 -1
- package/dist/cjs/components/layout/social-icons/social-icons.cjs +0 -1
- package/dist/cjs/components/navbar/index.cjs +0 -1
- package/dist/cjs/components/navbar/navbar-indicator-context.cjs +0 -1
- package/dist/cjs/components/navbar/navbar-with-overflow.cjs +0 -1
- package/dist/cjs/components/navbar/navbar.cjs +0 -1
- package/dist/cjs/components/navitem/index.cjs +0 -1
- package/dist/cjs/components/navitem/navitem.cjs +0 -1
- package/dist/cjs/components/page-title/index.cjs +0 -1
- package/dist/cjs/components/page-title/page-title.cjs +0 -1
- package/dist/cjs/components/pool-apy-tooltip/apy-tooltip.cjs +0 -1
- package/dist/cjs/components/pool-apy-tooltip/index.cjs +0 -1
- package/dist/cjs/components/table/edit-button.cjs +0 -1
- package/dist/cjs/components/table/editable-grid-table.cjs +0 -1
- package/dist/cjs/components/table/editable-table.cjs +0 -1
- package/dist/cjs/components/table/grid-table-loader.cjs +0 -1
- package/dist/cjs/components/table/updated-value.cjs +0 -1
- package/dist/cjs/hooks/use-liquidation/index.cjs +0 -1
- package/dist/cjs/hooks/use-liquidation/types.cjs +0 -1
- package/dist/cjs/hooks/use-liquidation/utils.cjs +0 -1
- package/dist/cjs/test-ids/base.cjs +0 -1
- package/dist/cjs/test-ids/index.cjs +0 -1
- package/dist/cjs/types/component-props.cjs +0 -1
- package/dist/cjs/types/help.cjs +0 -1
- package/dist/cjs/utils/reactochart-compat.cjs +0 -1
- package/dist/esm/components/auth/connect-required.js +0 -37
- package/dist/esm/components/auth/index.js +0 -9
- package/dist/esm/components/auth/signin-required.js +0 -55
- package/dist/esm/components/auth/wallet-ui-context.js +0 -13
- package/dist/esm/components/block-sync/block-sync.js +0 -208
- package/dist/esm/components/block-sync/index.js +0 -4
- package/dist/esm/components/image/image.js +0 -32
- package/dist/esm/components/image/index.js +0 -4
- package/dist/esm/components/layout/app-logo/app-logo.js +0 -99
- package/dist/esm/components/layout/app-logo/index.js +0 -5
- package/dist/esm/components/layout/block/block.js +0 -50
- package/dist/esm/components/layout/block/index.js +0 -4
- package/dist/esm/components/layout/footer/footer.js +0 -237
- package/dist/esm/components/layout/footer/index.js +0 -7
- package/dist/esm/components/layout/header/header.js +0 -93
- package/dist/esm/components/layout/header/index.js +0 -5
- package/dist/esm/components/layout/legal-disclaimer/index.js +0 -4
- package/dist/esm/components/layout/legal-disclaimer/legal-disclaimer.js +0 -46
- package/dist/esm/components/layout/page-layout/index.js +0 -4
- package/dist/esm/components/layout/page-layout/page-layout.js +0 -39
- package/dist/esm/components/layout/social-icons/index.js +0 -4
- package/dist/esm/components/layout/social-icons/social-icons.js +0 -61
- package/dist/esm/components/navbar/index.js +0 -11
- package/dist/esm/components/navbar/navbar-indicator-context.js +0 -46
- package/dist/esm/components/navbar/navbar-with-overflow.js +0 -181
- package/dist/esm/components/navbar/navbar.js +0 -99
- package/dist/esm/components/navitem/index.js +0 -5
- package/dist/esm/components/navitem/navitem.js +0 -124
- package/dist/esm/components/page-title/index.js +0 -6
- package/dist/esm/components/page-title/page-title.js +0 -120
- package/dist/esm/components/pool-apy-tooltip/apy-tooltip.js +0 -154
- package/dist/esm/components/pool-apy-tooltip/index.js +0 -4
- package/dist/esm/components/table/edit-button.js +0 -48
- package/dist/esm/components/table/editable-grid-table.js +0 -121
- package/dist/esm/components/table/editable-table.js +0 -108
- package/dist/esm/components/table/grid-table-loader.js +0 -22
- package/dist/esm/components/table/updated-value.js +0 -49
- package/dist/esm/hooks/use-liquidation/index.js +0 -138
- package/dist/esm/hooks/use-liquidation/types.js +0 -1
- package/dist/esm/hooks/use-liquidation/utils.js +0 -144
- package/dist/esm/test-ids/base.js +0 -44
- package/dist/esm/test-ids/index.js +0 -46
- package/dist/esm/types/component-props.js +0 -1
- package/dist/esm/types/help.js +0 -1
- package/dist/esm/utils/reactochart-compat.js +0 -18
- package/dist/types/components/auth/connect-required.d.ts +0 -32
- package/dist/types/components/auth/index.d.ts +0 -3
- package/dist/types/components/auth/signin-required.d.ts +0 -37
- package/dist/types/components/auth/wallet-ui-context.d.ts +0 -36
- package/dist/types/components/block-sync/block-sync.d.ts +0 -8
- package/dist/types/components/block-sync/index.d.ts +0 -1
- package/dist/types/components/image/image.d.ts +0 -35
- package/dist/types/components/image/index.d.ts +0 -1
- package/dist/types/components/layout/app-logo/app-logo.d.ts +0 -26
- package/dist/types/components/layout/app-logo/index.d.ts +0 -1
- package/dist/types/components/layout/block/block.d.ts +0 -23
- package/dist/types/components/layout/block/index.d.ts +0 -1
- package/dist/types/components/layout/footer/footer.d.ts +0 -53
- package/dist/types/components/layout/footer/index.d.ts +0 -1
- package/dist/types/components/layout/header/header.d.ts +0 -123
- package/dist/types/components/layout/header/index.d.ts +0 -1
- package/dist/types/components/layout/legal-disclaimer/index.d.ts +0 -1
- package/dist/types/components/layout/legal-disclaimer/legal-disclaimer.d.ts +0 -32
- package/dist/types/components/layout/page-layout/index.d.ts +0 -1
- package/dist/types/components/layout/page-layout/page-layout.d.ts +0 -41
- package/dist/types/components/layout/social-icons/index.d.ts +0 -1
- package/dist/types/components/layout/social-icons/social-icons.d.ts +0 -7
- package/dist/types/components/navbar/index.d.ts +0 -3
- package/dist/types/components/navbar/navbar-indicator-context.d.ts +0 -13
- package/dist/types/components/navbar/navbar-with-overflow.d.ts +0 -20
- package/dist/types/components/navbar/navbar.d.ts +0 -25
- package/dist/types/components/navitem/index.d.ts +0 -1
- package/dist/types/components/navitem/navitem.d.ts +0 -67
- package/dist/types/components/page-title/index.d.ts +0 -1
- package/dist/types/components/page-title/page-title.d.ts +0 -77
- package/dist/types/components/pool-apy-tooltip/apy-tooltip.d.ts +0 -20
- package/dist/types/components/pool-apy-tooltip/index.d.ts +0 -1
- package/dist/types/components/table/edit-button.d.ts +0 -51
- package/dist/types/components/table/editable-grid-table.d.ts +0 -120
- package/dist/types/components/table/editable-table.d.ts +0 -101
- package/dist/types/components/table/grid-table-loader.d.ts +0 -25
- package/dist/types/components/table/updated-value.d.ts +0 -34
- package/dist/types/hooks/use-liquidation/index.d.ts +0 -53
- package/dist/types/hooks/use-liquidation/types.d.ts +0 -16
- package/dist/types/hooks/use-liquidation/utils.d.ts +0 -71
- package/dist/types/test-ids/base.d.ts +0 -20
- package/dist/types/test-ids/index.d.ts +0 -9
- package/dist/types/types/component-props.d.ts +0 -16
- package/dist/types/types/help.d.ts +0 -4
- package/dist/types/types/reactochart.d.ts +0 -145
- package/dist/types/utils/reactochart-compat.d.ts +0 -12
- /package/dist/cjs/{test-ids/notification-center.cjs → components/composites/notification-center/constants.cjs} +0 -0
- /package/dist/esm/{test-ids/notification-center.js → components/composites/notification-center/constants.js} +0 -0
- /package/dist/types/{test-ids/notification-center.d.ts → components/composites/notification-center/constants.d.ts} +0 -0
|
@@ -1,118 +1,167 @@
|
|
|
1
|
-
import { AmountInput as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
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 {
|
|
1
|
+
import { AmountInput as r } from "./amount-input/amount-input.js";
|
|
2
|
+
import { TokenSelectPanel as a } from "./amount-input/token-select-panel.js";
|
|
3
|
+
import { BorrowRateBlock as p } from "./borrow-rate-block/borrow-rate-block.js";
|
|
4
|
+
import { BorrowRateBlockTest as f } from "./borrow-rate-block/constants.js";
|
|
5
|
+
import { ChartWithSideCard as x } from "./chart-with-side-card/chart-with-side-card.js";
|
|
6
|
+
import { ChartWithSideCardTest as s } from "./chart-with-side-card/constants.js";
|
|
7
|
+
import { DetailedPageTitle as d } from "./detailed-page-title/detailed-page-title.js";
|
|
8
|
+
import { AsideAlignAnchor as P } from "./details-view/detail-aside/detail-aside-scope.js";
|
|
9
|
+
import { DetailAsideScreenLayout as g } from "./details-view/detail-aside/detail-aside-screen-layout.js";
|
|
10
|
+
import { DetailsView as k, DetailsViewLeftPane as B, DetailsViewManagePane as A } from "./details-view/details-view.js";
|
|
11
|
+
import { HealthFactorBlockTest as L } from "./health-factor-block/constants.js";
|
|
12
|
+
import { HealthFactorBlock as C } from "./health-factor-block/health-factor-block.js";
|
|
13
|
+
import { HistoryChart as w } from "./history-chart/history-chart.js";
|
|
14
|
+
import { InfoLine as h, InfoList as V, InfoSectionTitle as D } from "./info-list/info-list.js";
|
|
15
|
+
import { InfoPortalOut as E, InfoPortalProvider as q } from "./info-portal/info-portal.js";
|
|
16
|
+
import { LeverageInput as _ } from "./leverage-input/leverage-input.js";
|
|
17
|
+
import { LiquidationParamsTableTest as R } from "./liquidation-params-table/constants.js";
|
|
18
|
+
import { LiquidationParamsTable as G } from "./liquidation-params-table/liquidation-params-table.js";
|
|
19
|
+
import { LiquidationPriceBlockTest as O } from "./liquidation-price-block/constants.js";
|
|
20
|
+
import { LiquidationPriceBlock as z } from "./liquidation-price-block/liquidation-price-block.js";
|
|
21
|
+
import { ManagePane as j, ManagePaneActionTab as J, ManagePaneMessage as K, ManagePaneTab as Q, ManagePaneTabDropdown as Y } from "./manage-pane/manage-pane.js";
|
|
22
|
+
import { MoreAccordionTest as $ } from "./more-accordion/constants.js";
|
|
23
|
+
import { MoreAccordion as oe } from "./more-accordion/more-accordion.js";
|
|
24
|
+
import { NestedInfoStackTest as te } from "./nested-info-stack/constants.js";
|
|
25
|
+
import { NestedInfoStack as ie } from "./nested-info-stack/nested-info-stack.js";
|
|
26
|
+
import { PageTitle as me } from "./page-title/page-title.js";
|
|
27
|
+
import { PoolApyBreakdownCardTest as ne } from "./pool-apy-breakdown-card/constants.js";
|
|
28
|
+
import { PoolApyBreakdownCard as Te } from "./pool-apy-breakdown-card/pool-apy-breakdown-card.js";
|
|
29
|
+
import { ReviewButton as le } from "./review-button/review-button.js";
|
|
30
|
+
import { SectionHeading as Se } from "./section-heading/section-heading.js";
|
|
31
|
+
import { SEGMENTED_TABS_INACTIVE_BUTTON_CLASS as ce, SegmentedTabs as ge } from "./segmented-tabs/segmented-tabs.js";
|
|
32
|
+
import { SideCardTest as ke } from "./side-card/constants.js";
|
|
33
|
+
import { SideCard as Ae } from "./side-card/side-card.js";
|
|
34
|
+
import { SPACE_HEIGHT as Le, SPACE_PX as ye } from "./spacing.js";
|
|
35
|
+
import { Stack as Ie } from "./stack/stack.js";
|
|
36
|
+
import { StatBadge as Me, StatBadgeGrid as he } from "./stat-badge/stat-badge.js";
|
|
37
|
+
import { StickyBar as De } from "./sticky-bar/sticky-bar.js";
|
|
38
|
+
import { StrategyApyBreakdownCardTest as Ee } from "./strategy-apy-breakdown-card/constants.js";
|
|
39
|
+
import { StrategyApyBreakdownCard as ve } from "./strategy-apy-breakdown-card/strategy-apy-breakdown-card.js";
|
|
40
|
+
import { Tabber as Ne, TabberSection as Re, isTabber as Fe } from "./tabber/tabber.js";
|
|
41
|
+
import { useDetailScrollSpy as Ue } from "./tabber/use-detail-scroll-spy.js";
|
|
42
|
+
import { useTitleText as We } from "./text/use-title-text.js";
|
|
43
|
+
import { TimeToLiquidationBlockTest as Xe } from "./time-to-liquidation-block/constants.js";
|
|
44
|
+
import { TimeToLiquidationBlock as Je } from "./time-to-liquidation-block/time-to-liquidation-block.js";
|
|
45
|
+
import { TitleMetaTest as Qe } from "./title-meta/constants.js";
|
|
46
|
+
import { TitleMeta as Ze } from "./title-meta/title-meta.js";
|
|
47
|
+
import { TokenAmount as eo } from "./token-amount/token-amount.js";
|
|
48
|
+
import { TokenPairSymbolTest as ro } from "./token-pair-symbol/constants.js";
|
|
49
|
+
import { TokenPairSymbol as ao } from "./token-pair-symbol/token-pair-symbol.js";
|
|
50
|
+
import { TokenPairTitleTest as po } from "./token-pair-title/constants.js";
|
|
51
|
+
import { TokenPairTitle as fo } from "./token-pair-title/token-pair-title.js";
|
|
52
|
+
import { PositionShortLabelTest as xo, ValueTest as To } from "./values/constants.js";
|
|
53
|
+
import { PnlValue as lo } from "./values/pnl-value.js";
|
|
54
|
+
import { PositionShortLabel as Po } from "./values/position-short-label.js";
|
|
55
|
+
import { PositionTypeBadge as go } from "./values/position-type-badge.js";
|
|
56
|
+
import { ApyValue as ko, HealthFactorValue as Bo, LeverageValue as Ao, TokenBigint as bo, UsdValue as Lo, UtilizationValue as yo, bps as Co } from "./values/scalars.js";
|
|
57
|
+
import { AmountInputTest as wo } from "./amount-input/constants.js";
|
|
58
|
+
import { DetailedPageTitleTest as ho } from "./detailed-page-title/constants.js";
|
|
59
|
+
import { DetailsViewTest as Do } from "./details-view/constants.js";
|
|
60
|
+
import { HistoryChartTest as Eo } from "./history-chart/constants.js";
|
|
61
|
+
import { InfoListTest as vo } from "./info-list/constants.js";
|
|
62
|
+
import { LeverageInputTest as No } from "./leverage-input/constants.js";
|
|
63
|
+
import { ManagePaneTest as Fo } from "./manage-pane/constants.js";
|
|
64
|
+
import { PageTitleTest as Uo } from "./page-title/constants.js";
|
|
65
|
+
import { ReviewButtonTest as Wo } from "./review-button/constants.js";
|
|
66
|
+
import { SectionHeadingTest as Xo } from "./section-heading/constants.js";
|
|
67
|
+
import { SegmentedTabsTest as Jo } from "./segmented-tabs/constants.js";
|
|
68
|
+
import { StackTest as Qo } from "./stack/constants.js";
|
|
69
|
+
import { StatBadgeTest as Zo } from "./stat-badge/constants.js";
|
|
70
|
+
import { StickyBarTest as er } from "./sticky-bar/constants.js";
|
|
71
|
+
import { TabberTest as rr } from "./tabber/constants.js";
|
|
72
|
+
import { TokenAmountTest as ar } from "./token-amount/constants.js";
|
|
50
73
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
V as
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
74
|
+
r as AmountInput,
|
|
75
|
+
wo as AmountInputTest,
|
|
76
|
+
ko as ApyValue,
|
|
77
|
+
P as AsideAlignAnchor,
|
|
78
|
+
p as BorrowRateBlock,
|
|
79
|
+
f as BorrowRateBlockTest,
|
|
80
|
+
x as ChartWithSideCard,
|
|
81
|
+
s as ChartWithSideCardTest,
|
|
82
|
+
g as DetailAsideScreenLayout,
|
|
83
|
+
d as DetailedPageTitle,
|
|
84
|
+
ho as DetailedPageTitleTest,
|
|
85
|
+
k as DetailsView,
|
|
86
|
+
B as DetailsViewLeftPane,
|
|
87
|
+
A as DetailsViewManagePane,
|
|
88
|
+
Do as DetailsViewTest,
|
|
89
|
+
C as HealthFactorBlock,
|
|
90
|
+
L as HealthFactorBlockTest,
|
|
91
|
+
Bo as HealthFactorValue,
|
|
92
|
+
w as HistoryChart,
|
|
93
|
+
Eo as HistoryChartTest,
|
|
94
|
+
h as InfoLine,
|
|
95
|
+
V as InfoList,
|
|
96
|
+
vo as InfoListTest,
|
|
97
|
+
E as InfoPortalOut,
|
|
98
|
+
q as InfoPortalProvider,
|
|
99
|
+
D as InfoSectionTitle,
|
|
100
|
+
_ as LeverageInput,
|
|
101
|
+
No as LeverageInputTest,
|
|
102
|
+
Ao as LeverageValue,
|
|
103
|
+
G as LiquidationParamsTable,
|
|
104
|
+
R as LiquidationParamsTableTest,
|
|
105
|
+
z as LiquidationPriceBlock,
|
|
106
|
+
O as LiquidationPriceBlockTest,
|
|
107
|
+
j as ManagePane,
|
|
108
|
+
J as ManagePaneActionTab,
|
|
109
|
+
K as ManagePaneMessage,
|
|
110
|
+
Q as ManagePaneTab,
|
|
111
|
+
Y as ManagePaneTabDropdown,
|
|
112
|
+
Fo as ManagePaneTest,
|
|
113
|
+
oe as MoreAccordion,
|
|
114
|
+
$ as MoreAccordionTest,
|
|
115
|
+
ie as NestedInfoStack,
|
|
116
|
+
te as NestedInfoStackTest,
|
|
117
|
+
me as PageTitle,
|
|
118
|
+
Uo as PageTitleTest,
|
|
119
|
+
lo as PnlValue,
|
|
120
|
+
Te as PoolApyBreakdownCard,
|
|
121
|
+
ne as PoolApyBreakdownCardTest,
|
|
122
|
+
Po as PositionShortLabel,
|
|
123
|
+
xo as PositionShortLabelTest,
|
|
124
|
+
go as PositionTypeBadge,
|
|
125
|
+
le as ReviewButton,
|
|
126
|
+
Wo as ReviewButtonTest,
|
|
127
|
+
ce as SEGMENTED_TABS_INACTIVE_BUTTON_CLASS,
|
|
128
|
+
Le as SPACE_HEIGHT,
|
|
129
|
+
ye as SPACE_PX,
|
|
130
|
+
Se as SectionHeading,
|
|
131
|
+
Xo as SectionHeadingTest,
|
|
132
|
+
ge as SegmentedTabs,
|
|
133
|
+
Jo as SegmentedTabsTest,
|
|
134
|
+
Ae as SideCard,
|
|
135
|
+
ke as SideCardTest,
|
|
136
|
+
Ie as Stack,
|
|
137
|
+
Qo as StackTest,
|
|
138
|
+
Me as StatBadge,
|
|
139
|
+
he as StatBadgeGrid,
|
|
140
|
+
Zo as StatBadgeTest,
|
|
141
|
+
De as StickyBar,
|
|
142
|
+
er as StickyBarTest,
|
|
143
|
+
ve as StrategyApyBreakdownCard,
|
|
144
|
+
Ee as StrategyApyBreakdownCardTest,
|
|
145
|
+
Ne as Tabber,
|
|
146
|
+
Re as TabberSection,
|
|
147
|
+
rr as TabberTest,
|
|
148
|
+
Je as TimeToLiquidationBlock,
|
|
149
|
+
Xe as TimeToLiquidationBlockTest,
|
|
150
|
+
Ze as TitleMeta,
|
|
151
|
+
Qe as TitleMetaTest,
|
|
152
|
+
eo as TokenAmount,
|
|
153
|
+
ar as TokenAmountTest,
|
|
154
|
+
bo as TokenBigint,
|
|
155
|
+
ao as TokenPairSymbol,
|
|
156
|
+
ro as TokenPairSymbolTest,
|
|
157
|
+
fo as TokenPairTitle,
|
|
158
|
+
po as TokenPairTitleTest,
|
|
159
|
+
a as TokenSelectPanel,
|
|
160
|
+
Lo as UsdValue,
|
|
161
|
+
yo as UtilizationValue,
|
|
162
|
+
To as ValueTest,
|
|
163
|
+
Co as bps,
|
|
164
|
+
Fe as isTabber,
|
|
165
|
+
Ue as useDetailScrollSpy,
|
|
166
|
+
We as useTitleText
|
|
118
167
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { InfoLine as
|
|
1
|
+
import { InfoLine as e, InfoList as f, InfoSectionTitle as n } from "./info-list.js";
|
|
2
2
|
import { InfoListTest as r } from "./constants.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
r as InfoListTest
|
|
4
|
+
e as InfoLine,
|
|
5
|
+
f as InfoList,
|
|
6
|
+
r as InfoListTest,
|
|
7
|
+
n as InfoSectionTitle
|
|
7
8
|
};
|
|
@@ -1,36 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Stack as
|
|
3
|
-
import { useTitleText as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Stack as p } from "../stack/stack.js";
|
|
3
|
+
import { useTitleText as r } from "../text/use-title-text.js";
|
|
4
|
+
import { Typography as f } from "../../typography/typography.js";
|
|
5
|
+
import { VerticalIndicator as l } from "../../vertical-indicator/vertical-indicator.js";
|
|
6
|
+
import { InfoListTest as i } from "./constants.js";
|
|
7
|
+
function h({
|
|
7
8
|
children: t
|
|
8
9
|
}) {
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ e(p, { gap: "sm", "data-testid": i.root, children: t });
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
+
function y({
|
|
12
13
|
title: t,
|
|
13
|
-
value:
|
|
14
|
-
tip:
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
value: o,
|
|
15
|
+
tip: n,
|
|
16
|
+
valueDescription: a,
|
|
17
|
+
valueTo: s,
|
|
18
|
+
testId: c
|
|
17
19
|
}) {
|
|
18
|
-
const
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
20
|
+
const m = r();
|
|
21
|
+
return /* @__PURE__ */ e(
|
|
22
|
+
l,
|
|
21
23
|
{
|
|
22
|
-
label:
|
|
23
|
-
tip:
|
|
24
|
-
value:
|
|
25
|
-
valueTo:
|
|
24
|
+
label: m(t),
|
|
25
|
+
tip: n,
|
|
26
|
+
value: o,
|
|
27
|
+
valueTo: s,
|
|
28
|
+
valueDescription: a,
|
|
26
29
|
size: "sm",
|
|
27
30
|
align: "center",
|
|
28
|
-
"data-testid":
|
|
31
|
+
"data-testid": c ?? i.line
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
function L({
|
|
36
|
+
title: t
|
|
37
|
+
}) {
|
|
38
|
+
const o = r();
|
|
39
|
+
return /* @__PURE__ */ e(
|
|
40
|
+
f,
|
|
41
|
+
{
|
|
42
|
+
as: "span",
|
|
43
|
+
color: "secondary",
|
|
44
|
+
weight: "bold",
|
|
45
|
+
variant: "caption",
|
|
46
|
+
className: "tracking-[0.55px] uppercase",
|
|
47
|
+
"data-testid": i.sectionTitle,
|
|
48
|
+
children: o(t)
|
|
29
49
|
}
|
|
30
50
|
);
|
|
31
51
|
}
|
|
32
52
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
53
|
+
y as InfoLine,
|
|
54
|
+
h as InfoList,
|
|
55
|
+
i as InfoListTest,
|
|
56
|
+
L as InfoSectionTitle
|
|
36
57
|
};
|
|
@@ -1,82 +1,85 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Stack as
|
|
4
|
-
import { useTitleText as
|
|
5
|
-
import { EditInput as
|
|
6
|
-
import { Slider as
|
|
1
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { useState as I } from "react";
|
|
3
|
+
import { Stack as x } from "../stack/stack.js";
|
|
4
|
+
import { useTitleText as y } from "../text/use-title-text.js";
|
|
5
|
+
import { EditInput as F } from "../../edit-input/edit-input.js";
|
|
6
|
+
import { Slider as j } from "../../slider/slider.js";
|
|
7
7
|
import "../../slider/slider-context.js";
|
|
8
|
-
import { TextButton as
|
|
9
|
-
import { SimpleTooltip as
|
|
8
|
+
import { TextButton as O } from "../../text-button/text-button.js";
|
|
9
|
+
import { SimpleTooltip as R } from "../../tooltip/simple-tooltip.js";
|
|
10
10
|
import "../../tooltip/tooltip.js";
|
|
11
|
-
import { FormattedMessageTyped as
|
|
12
|
-
import { WithTitle as
|
|
11
|
+
import { useIntlTyped as B, FormattedMessageTyped as T } from "../../typed-intl/index.js";
|
|
12
|
+
import { WithTitle as D } from "../../with-title/with-title.js";
|
|
13
13
|
import { LeverageInputTest as i } from "./constants.js";
|
|
14
|
-
const o = 100,
|
|
15
|
-
function
|
|
14
|
+
const o = 100, P = 10;
|
|
15
|
+
function Z({
|
|
16
16
|
value: r,
|
|
17
17
|
onChange: s,
|
|
18
18
|
max: n,
|
|
19
|
-
min:
|
|
20
|
-
step: w = 0.1,
|
|
19
|
+
min: l = 1,
|
|
21
20
|
title: c,
|
|
22
21
|
hint: d,
|
|
23
22
|
reset: a,
|
|
24
|
-
colorIntervals:
|
|
25
|
-
colorIntervalLabel:
|
|
26
|
-
size:
|
|
23
|
+
colorIntervals: w,
|
|
24
|
+
colorIntervalLabel: N,
|
|
25
|
+
size: S = "sm"
|
|
27
26
|
}) {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
const E = B(), C = y(), p = w ?? [
|
|
28
|
+
{ start: l, end: n, color: "additionalSuccess" }
|
|
29
|
+
], L = N ?? (p.length > 0 ? E.formatMessage({
|
|
30
|
+
messageId: "components.leverageInput.available"
|
|
31
|
+
}) : void 0), [M, u] = I(void 0), [f, g] = I(""), h = M ?? r, v = (e) => {
|
|
32
|
+
s(_(e, l, n)), u(void 0);
|
|
33
|
+
}, k = () => {
|
|
34
|
+
const e = Number.parseFloat(f.replace(",", "."));
|
|
35
|
+
Number.isFinite(e) && v(e);
|
|
36
|
+
}, V = p.map((e) => ({
|
|
34
37
|
...e,
|
|
35
38
|
start: e.start * o,
|
|
36
39
|
end: e.end * o
|
|
37
40
|
}));
|
|
38
41
|
return /* @__PURE__ */ t("div", { "data-testid": i.root, children: /* @__PURE__ */ t(
|
|
39
|
-
|
|
42
|
+
D,
|
|
40
43
|
{
|
|
41
|
-
size:
|
|
42
|
-
title: /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
c !== void 0 ?
|
|
44
|
+
size: S,
|
|
45
|
+
title: /* @__PURE__ */ m(x, { direction: "row", align: "center", justify: "between", gap: "sm", children: [
|
|
46
|
+
/* @__PURE__ */ m("span", { className: "font-normal", children: [
|
|
47
|
+
c !== void 0 ? C(c) : /* @__PURE__ */ t(T, { messageId: "components.leverageInput.label" }),
|
|
45
48
|
d ? /* @__PURE__ */ t("span", { className: "text-muted-foreground ml-1", children: d }) : null
|
|
46
49
|
] }),
|
|
47
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ m(x, { direction: "row", align: "center", gap: "sm", children: [
|
|
48
51
|
/* @__PURE__ */ t("div", { className: "flex w-[90px] flex-row flex-nowrap items-center", children: /* @__PURE__ */ t(
|
|
49
|
-
|
|
52
|
+
F,
|
|
50
53
|
{
|
|
51
|
-
value:
|
|
54
|
+
value: f,
|
|
52
55
|
placeholder: "0",
|
|
53
|
-
label: `×${
|
|
56
|
+
label: `×${b(h)}`,
|
|
54
57
|
textButtonProps: {
|
|
55
58
|
className: "inline-flex items-center whitespace-nowrap"
|
|
56
59
|
},
|
|
57
60
|
"data-testid": i.value,
|
|
58
61
|
onEditModeChange: (e) => {
|
|
59
|
-
e &&
|
|
62
|
+
e && g(b(r));
|
|
60
63
|
},
|
|
61
|
-
onChange: (e) =>
|
|
62
|
-
onSubmit:
|
|
64
|
+
onChange: (e) => g(e.target.value),
|
|
65
|
+
onSubmit: k
|
|
63
66
|
}
|
|
64
67
|
) }),
|
|
65
68
|
a ? /* @__PURE__ */ t(
|
|
66
|
-
|
|
69
|
+
R,
|
|
67
70
|
{
|
|
68
71
|
placement: "top",
|
|
69
72
|
triangle: !1,
|
|
70
73
|
triggerClassName: "inline-flex shrink-0",
|
|
71
74
|
title: /* @__PURE__ */ t(
|
|
72
|
-
|
|
75
|
+
O,
|
|
73
76
|
{
|
|
74
77
|
buttonColor: "secondaryDashed",
|
|
75
78
|
size: "sm",
|
|
76
79
|
className: "max-w-full truncate",
|
|
77
80
|
onClick: a.onClick,
|
|
78
81
|
"data-testid": a.testId ?? i.reset,
|
|
79
|
-
children: /* @__PURE__ */ t(
|
|
82
|
+
children: /* @__PURE__ */ t(T, { messageId: "components.leverageInput.reset" })
|
|
80
83
|
}
|
|
81
84
|
),
|
|
82
85
|
children: a.tooltip
|
|
@@ -85,30 +88,30 @@ function Q({
|
|
|
85
88
|
] })
|
|
86
89
|
] }),
|
|
87
90
|
children: /* @__PURE__ */ t(
|
|
88
|
-
|
|
91
|
+
j,
|
|
89
92
|
{
|
|
90
|
-
from:
|
|
93
|
+
from: l * o,
|
|
91
94
|
to: n * o,
|
|
92
95
|
precision: o,
|
|
93
|
-
value:
|
|
94
|
-
colorIntervals:
|
|
95
|
-
colorIntervalLabel:
|
|
96
|
-
markerStep: n >
|
|
96
|
+
value: h * o,
|
|
97
|
+
colorIntervals: V,
|
|
98
|
+
colorIntervalLabel: L,
|
|
99
|
+
markerStep: n > P ? 200 : 100,
|
|
97
100
|
"data-testid": i.slider,
|
|
98
|
-
onChangeValue: (e) =>
|
|
99
|
-
onSubmitValue: (e) =>
|
|
101
|
+
onChangeValue: (e) => u(e / o),
|
|
102
|
+
onSubmitValue: (e) => v(e / o)
|
|
100
103
|
}
|
|
101
104
|
)
|
|
102
105
|
}
|
|
103
106
|
) });
|
|
104
107
|
}
|
|
105
|
-
function
|
|
108
|
+
function _(r, s, n) {
|
|
106
109
|
return Math.min(Math.max(r, s), n);
|
|
107
110
|
}
|
|
108
|
-
function
|
|
109
|
-
return (Math.round(r * 100) / 100).toFixed(2)
|
|
111
|
+
function b(r) {
|
|
112
|
+
return (Math.round(r * 100) / 100).toFixed(2);
|
|
110
113
|
}
|
|
111
114
|
export {
|
|
112
|
-
|
|
115
|
+
Z as LeverageInput,
|
|
113
116
|
i as LeverageInputTest
|
|
114
117
|
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react-intl";
|
|
3
|
+
import "../../buttons/button/button.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "@gearbox-protocol/sdk";
|
|
6
|
+
import "clsx";
|
|
7
|
+
import "tailwind-merge";
|
|
8
|
+
import "sonner";
|
|
9
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
10
|
+
import "luxon";
|
|
11
|
+
import "../../../utils/z-index.js";
|
|
12
|
+
import "../../table/grid-table.js";
|
|
13
|
+
import "../../skeleton/skeleton.js";
|
|
14
|
+
import { Table as d, TableHeader as c, TableRow as s, TableHead as m, TableBody as p, TableCell as r } from "../../table/table.js";
|
|
15
|
+
import { FormattedMessageTyped as t } from "../../typed-intl/index.js";
|
|
16
|
+
import { LiquidationParamsTableTest as u } from "./constants.js";
|
|
17
|
+
function a(o) {
|
|
18
|
+
return o / 100;
|
|
19
|
+
}
|
|
20
|
+
function z({
|
|
21
|
+
data: o
|
|
22
|
+
}) {
|
|
23
|
+
const n = a(o.liquidationPremium), l = a(o.liquidationFee);
|
|
24
|
+
return /* @__PURE__ */ i(
|
|
25
|
+
d,
|
|
26
|
+
{
|
|
27
|
+
size: "sm",
|
|
28
|
+
className: "min-w-[480px]",
|
|
29
|
+
"data-testid": u.root,
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ e(c, { children: /* @__PURE__ */ i(s, { children: [
|
|
32
|
+
/* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(t, { messageId: "components.liquidationParamsTable.lt" }) }),
|
|
33
|
+
/* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(t, { messageId: "components.liquidationParamsTable.penalty" }) }),
|
|
34
|
+
/* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(t, { messageId: "components.liquidationParamsTable.premium" }) }),
|
|
35
|
+
/* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(t, { messageId: "components.liquidationParamsTable.fee" }) })
|
|
36
|
+
] }) }),
|
|
37
|
+
/* @__PURE__ */ e(p, { children: /* @__PURE__ */ i(s, { children: [
|
|
38
|
+
/* @__PURE__ */ i(r, { className: "font-medium", children: [
|
|
39
|
+
a(o.liquidationThreshold).toFixed(2),
|
|
40
|
+
"%"
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ i(r, { className: "font-medium", children: [
|
|
43
|
+
(n + l).toFixed(2),
|
|
44
|
+
"%"
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ i(r, { className: "font-medium", children: [
|
|
47
|
+
n.toFixed(2),
|
|
48
|
+
"%"
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ i(r, { className: "font-medium", children: [
|
|
51
|
+
l.toFixed(2),
|
|
52
|
+
"%"
|
|
53
|
+
] })
|
|
54
|
+
] }) })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
z as LiquidationParamsTable,
|
|
61
|
+
u as LiquidationParamsTableTest
|
|
62
|
+
};
|