@gearbox-protocol/permissionless-ui 1.2.33 → 1.4.0
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/README.md +120 -1
- package/dist/cjs/components/asset-line.js +117 -0
- package/dist/cjs/components/assets-list-cell.js +73 -0
- package/dist/cjs/components/assets-ratio.js +98 -0
- package/dist/cjs/components/auth/siwe-provider.js +4 -4
- package/dist/cjs/components/base-link.js +61 -0
- package/dist/cjs/components/block-sync.js +118 -0
- package/dist/cjs/components/breadcrumbs.js +77 -0
- package/dist/cjs/components/buttons/back-button.js +37 -19
- package/dist/cjs/components/buttons/button.js +4 -4
- package/dist/cjs/components/buttons/filter-button.js +68 -0
- package/dist/cjs/components/buttons/index.js +4 -0
- package/dist/cjs/components/buttons/navigation-button.js +2 -2
- package/dist/cjs/components/buttons/range-buttons.js +63 -0
- package/dist/cjs/components/card-grid.js +127 -0
- package/dist/cjs/components/card.js +176 -0
- package/dist/cjs/components/checkbox-item.js +82 -0
- package/dist/cjs/components/compound-apy.js +232 -0
- package/dist/cjs/components/credit-session-status.js +67 -0
- package/dist/cjs/components/description.js +48 -0
- package/dist/cjs/components/detailed-page-title.js +96 -0
- package/dist/cjs/components/dialog/dialog-container.js +75 -0
- package/dist/cjs/components/dialog/dialog-content.js +66 -0
- package/dist/cjs/components/dialog/dialog-description.js +50 -0
- package/dist/cjs/components/dialog/dialog-footer.js +53 -0
- package/dist/cjs/components/dialog/dialog-header.js +53 -0
- package/dist/cjs/components/dialog/dialog-overlay.js +53 -0
- package/dist/cjs/components/dialog/dialog-title.js +50 -0
- package/dist/cjs/components/dialog/dialog.js +45 -0
- package/dist/cjs/components/dialog/index.js +36 -0
- package/dist/cjs/components/dropdown-menu/dropdown-menu-checkbox-item.js +63 -0
- package/dist/cjs/components/dropdown-menu/dropdown-menu-content.js +55 -0
- package/dist/cjs/components/dropdown-menu/dropdown-menu-item.js +54 -0
- package/dist/cjs/components/dropdown-menu/dropdown-menu-label.js +54 -0
- package/dist/cjs/components/dropdown-menu/dropdown-menu-radio-item.js +58 -0
- package/dist/cjs/components/dropdown-menu/dropdown-menu-separator.js +50 -0
- package/dist/cjs/components/dropdown-menu/dropdown-menu-shortcut.js +52 -0
- package/dist/cjs/components/dropdown-menu/dropdown-menu-sub-content.js +53 -0
- package/dist/cjs/components/dropdown-menu/dropdown-menu-sub-trigger.js +59 -0
- package/dist/cjs/components/dropdown-menu/dropdown-menu.js +54 -0
- package/dist/cjs/components/dropdown-menu/index.js +40 -0
- package/dist/cjs/components/error-message.js +70 -0
- package/dist/cjs/components/filter/filter-block.js +52 -0
- package/dist/cjs/components/filter/filter-checkbox-item.js +59 -0
- package/dist/cjs/components/filter/filter-chip.js +74 -0
- package/dist/cjs/components/filter/filter-chips.js +84 -0
- package/dist/cjs/components/filter/filter-dropdown-item.js +54 -0
- package/dist/cjs/components/filter/filter-group.js +43 -0
- package/dist/cjs/components/filter/filter-label.js +54 -0
- package/dist/cjs/components/filter/filter-modal-item.js +55 -0
- package/dist/cjs/components/filter/filter-modal.js +242 -0
- package/dist/cjs/components/filter/filter-radio-item.js +58 -0
- package/dist/cjs/components/filter/filter-separator.js +50 -0
- package/dist/cjs/components/filter/index.js +44 -0
- package/dist/cjs/components/filter/interface.js +16 -0
- package/dist/cjs/components/filter/variants.js +41 -0
- package/dist/cjs/components/form/form-field.js +67 -0
- package/dist/cjs/components/{editable-table → form}/index.js +4 -8
- package/dist/cjs/components/graph/default-config.js +158 -0
- package/dist/cjs/components/graph/formatters.js +175 -0
- package/dist/cjs/components/graph/graph-current-value.js +54 -0
- package/dist/cjs/components/graph/graph-tooltip.js +142 -0
- package/dist/cjs/components/graph/graph-view.js +233 -0
- package/dist/cjs/components/graph/graph.js +637 -0
- package/dist/cjs/components/graph/index.js +44 -0
- package/dist/cjs/components/graph/plugins/vertical-line.js +127 -0
- package/dist/cjs/components/guard.js +34 -0
- package/dist/cjs/components/health-factor.js +100 -0
- package/dist/cjs/components/help-center-container.js +107 -0
- package/dist/cjs/components/hide-on.js +66 -0
- package/dist/cjs/components/horizontal-indicator.js +63 -0
- package/dist/cjs/components/image.js +56 -0
- package/dist/cjs/components/index.js +93 -9
- package/dist/cjs/components/input.js +43 -21
- package/dist/cjs/components/label.js +29 -5
- package/dist/cjs/components/layout/app-logo.js +7 -17
- package/dist/cjs/components/layout/col.js +192 -0
- package/dist/cjs/components/layout/container.js +75 -0
- package/dist/cjs/components/layout/footer.js +137 -52
- package/dist/cjs/components/layout/grid.js +217 -0
- package/dist/cjs/components/layout/header.js +75 -13
- package/dist/cjs/components/layout/index.js +8 -0
- package/dist/cjs/components/layout/layout.js +65 -0
- package/dist/cjs/components/layout/legal-disclaimer.js +4 -14
- package/dist/cjs/components/liquidation/index.js +28 -0
- package/dist/cjs/components/liquidation/liquidation-assets-table.js +95 -0
- package/dist/cjs/components/liquidation/liquidation-graph-legend.js +41 -0
- package/dist/cjs/components/liquidation/liquidation-graph-tip.js +93 -0
- package/dist/cjs/components/liquidation/liquidation-graph.js +214 -0
- package/dist/cjs/components/loader-guard.js +47 -0
- package/dist/cjs/components/loading-guard.js +55 -0
- package/dist/cjs/components/markdown-viewer.js +4 -2
- package/dist/cjs/components/navbar-indicator-context.js +94 -0
- package/dist/cjs/components/navbar.js +131 -0
- package/dist/cjs/components/navitem.js +148 -0
- package/dist/cjs/components/next/back-button.js +43 -0
- package/dist/cjs/components/next/index.js +40 -0
- package/dist/cjs/components/next/siwe-provider.js +35 -0
- package/dist/cjs/components/next/token-icon.js +43 -0
- package/dist/cjs/components/next/web3-providers.js +116 -0
- package/dist/cjs/components/not-found.js +58 -0
- package/dist/cjs/components/options-list.js +88 -0
- package/dist/cjs/components/page-title.js +116 -0
- package/dist/cjs/components/percent-indicator.js +56 -0
- package/dist/cjs/components/pool-points-indicator.js +107 -0
- package/dist/cjs/components/search-bar.js +1 -0
- package/dist/cjs/components/search-line.js +225 -0
- package/dist/cjs/components/select.js +30 -9
- package/dist/cjs/components/short-string.js +58 -0
- package/dist/cjs/components/signatures/vertical-timeline.js +1 -0
- package/dist/cjs/components/skeleton.js +56 -3
- package/dist/cjs/components/stat-badge.js +189 -0
- package/dist/cjs/components/tab-control.js +254 -0
- package/dist/cjs/components/table/editable-grid-table.js +131 -0
- package/dist/cjs/components/{editable-table → table}/editable-table.js +1 -1
- package/dist/cjs/components/table/grid-error-line.js +60 -0
- package/dist/cjs/components/table/grid-loading-line.js +64 -0
- package/dist/cjs/components/table/grid-table-loader.js +56 -0
- package/dist/cjs/components/table/grid-table.js +203 -0
- package/dist/cjs/components/table/index.js +46 -0
- package/dist/cjs/components/table/sortable-head-cell.js +48 -0
- package/dist/cjs/components/table/table-loader-guard.js +55 -0
- package/dist/cjs/components/table/table-loader.js +46 -0
- package/dist/cjs/components/table/table-sm.js +93 -0
- package/dist/cjs/components/{table.js → table/table.js} +78 -22
- package/dist/cjs/components/textarea.js +27 -7
- package/dist/cjs/components/theme-provider.js +127 -0
- package/dist/cjs/components/theme-toggle.js +85 -0
- package/dist/cjs/components/token-icon.js +69 -20
- package/dist/cjs/components/token-symbol.js +84 -0
- package/dist/cjs/components/tooltip.js +1 -1
- package/dist/cjs/components/typed-intl/index.js +57 -0
- package/dist/cjs/components/vspace.js +31 -0
- package/dist/cjs/components/with-filter-button.js +84 -0
- package/dist/cjs/configs/design-tokens.js +109 -0
- package/dist/cjs/configs/index.js +48 -0
- package/dist/cjs/configs/tailwind-preset.js +162 -0
- package/dist/cjs/configs/tailwind.config.js +20 -67
- package/dist/cjs/configs/variants.js +58 -0
- package/dist/cjs/hooks/index.js +34 -0
- package/dist/cjs/hooks/use-controllable-state.js +50 -0
- package/dist/cjs/hooks/use-debounce.js +68 -0
- package/dist/cjs/hooks/use-filter.js +80 -0
- package/dist/cjs/hooks/use-hf.js +62 -0
- package/dist/cjs/hooks/use-liquidation/index.js +204 -0
- package/dist/cjs/hooks/use-liquidation/types.js +16 -0
- package/dist/cjs/hooks/use-liquidation/utils.js +253 -0
- package/dist/cjs/hooks/use-media-query.js +51 -0
- package/dist/cjs/hooks/use-previous.js +36 -0
- package/dist/cjs/index.js +157 -3
- package/dist/cjs/types/component-props.js +16 -0
- package/dist/cjs/types/filter.js +16 -0
- package/dist/cjs/types/footer.js +16 -0
- package/dist/cjs/types/graph.js +16 -0
- package/dist/cjs/types/help.js +16 -0
- package/dist/cjs/types/index.js +16 -0
- package/dist/cjs/types/range-item.js +16 -0
- package/dist/cjs/utils/a11y.js +39 -0
- package/dist/cjs/utils/bn-to-input-view.js +60 -0
- package/dist/cjs/utils/colors.js +96 -0
- package/dist/cjs/utils/format-asset-amount.js +43 -0
- package/dist/cjs/utils/format-money.js +68 -0
- package/dist/cjs/utils/index.js +29 -2
- package/dist/cjs/utils/interface.js +16 -0
- package/dist/cjs/utils/react.js +105 -0
- package/dist/cjs/utils/short-sha.js +28 -0
- package/dist/cjs/utils/sort.js +16 -0
- package/dist/cjs/utils/templates.js +50 -0
- package/dist/esm/components/asset-line.js +83 -0
- package/dist/esm/components/assets-list-cell.js +39 -0
- package/dist/esm/components/assets-ratio.js +64 -0
- package/dist/esm/components/auth/siwe-provider.js +4 -4
- package/dist/esm/components/base-link.js +27 -0
- package/dist/esm/components/block-sync.js +99 -0
- package/dist/esm/components/breadcrumbs.js +43 -0
- package/dist/esm/components/buttons/back-button.js +35 -8
- package/dist/esm/components/buttons/button.js +4 -4
- package/dist/esm/components/buttons/filter-button.js +34 -0
- package/dist/esm/components/buttons/index.js +2 -0
- package/dist/esm/components/buttons/navigation-button.js +2 -2
- package/dist/esm/components/buttons/range-buttons.js +29 -0
- package/dist/esm/components/card-grid.js +92 -0
- package/dist/esm/components/card.js +133 -0
- package/dist/esm/components/checkbox-item.js +48 -0
- package/dist/esm/components/compound-apy.js +203 -0
- package/dist/esm/components/credit-session-status.js +33 -0
- package/dist/esm/components/description.js +14 -0
- package/dist/esm/components/detailed-page-title.js +67 -0
- package/dist/esm/components/dialog/dialog-container.js +41 -0
- package/dist/esm/components/dialog/dialog-content.js +32 -0
- package/dist/esm/components/dialog/dialog-description.js +16 -0
- package/dist/esm/components/dialog/dialog-footer.js +19 -0
- package/dist/esm/components/dialog/dialog-header.js +19 -0
- package/dist/esm/components/dialog/dialog-overlay.js +19 -0
- package/dist/esm/components/dialog/dialog-title.js +16 -0
- package/dist/esm/components/dialog/dialog.js +9 -0
- package/dist/esm/components/dialog/index.js +8 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu-checkbox-item.js +29 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu-content.js +21 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu-item.js +20 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu-label.js +20 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu-radio-item.js +24 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu-separator.js +16 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu-shortcut.js +18 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu-sub-content.js +19 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu-sub-trigger.js +25 -0
- package/dist/esm/components/dropdown-menu/dropdown-menu.js +15 -0
- package/dist/esm/components/dropdown-menu/index.js +10 -0
- package/dist/esm/components/error-message.js +36 -0
- package/dist/esm/components/filter/filter-block.js +18 -0
- package/dist/esm/components/filter/filter-checkbox-item.js +25 -0
- package/dist/esm/components/filter/filter-chip.js +40 -0
- package/dist/esm/components/filter/filter-chips.js +50 -0
- package/dist/esm/components/filter/filter-dropdown-item.js +20 -0
- package/dist/esm/components/filter/filter-group.js +9 -0
- package/dist/esm/components/filter/filter-label.js +20 -0
- package/dist/esm/components/filter/filter-modal-item.js +21 -0
- package/dist/esm/components/filter/filter-modal.js +214 -0
- package/dist/esm/components/filter/filter-radio-item.js +24 -0
- package/dist/esm/components/filter/filter-separator.js +16 -0
- package/dist/esm/components/filter/index.js +12 -0
- package/dist/esm/components/filter/interface.js +0 -0
- package/dist/esm/components/filter/variants.js +17 -0
- package/dist/esm/components/form/form-field.js +43 -0
- package/dist/esm/components/form/index.js +1 -0
- package/dist/esm/components/graph/default-config.js +129 -0
- package/dist/esm/components/graph/formatters.js +150 -0
- package/dist/esm/components/graph/graph-current-value.js +30 -0
- package/dist/esm/components/graph/graph-tooltip.js +118 -0
- package/dist/esm/components/graph/graph-view.js +196 -0
- package/dist/esm/components/graph/graph.js +606 -0
- package/dist/esm/components/graph/index.js +15 -0
- package/dist/esm/components/graph/plugins/vertical-line.js +103 -0
- package/dist/esm/components/guard.js +10 -0
- package/dist/esm/components/health-factor.js +63 -0
- package/dist/esm/components/help-center-container.js +83 -0
- package/dist/esm/components/hide-on.js +41 -0
- package/dist/esm/components/horizontal-indicator.js +34 -0
- package/dist/esm/components/image.js +32 -0
- package/dist/esm/components/index.js +46 -4
- package/dist/esm/components/input.js +41 -20
- package/dist/esm/components/label.js +27 -4
- package/dist/esm/components/layout/app-logo.js +5 -5
- package/dist/esm/components/layout/col.js +158 -0
- package/dist/esm/components/layout/container.js +41 -0
- package/dist/esm/components/layout/footer.js +134 -52
- package/dist/esm/components/layout/grid.js +183 -0
- package/dist/esm/components/layout/header.js +65 -13
- package/dist/esm/components/layout/index.js +4 -0
- package/dist/esm/components/layout/layout.js +31 -0
- package/dist/esm/components/layout/legal-disclaimer.js +4 -4
- package/dist/esm/components/liquidation/index.js +4 -0
- package/dist/esm/components/liquidation/liquidation-assets-table.js +71 -0
- package/dist/esm/components/liquidation/liquidation-graph-legend.js +17 -0
- package/dist/esm/components/liquidation/liquidation-graph-tip.js +72 -0
- package/dist/esm/components/liquidation/liquidation-graph.js +191 -0
- package/dist/esm/components/loader-guard.js +23 -0
- package/dist/esm/components/loading-guard.js +31 -0
- package/dist/esm/components/markdown-viewer.js +4 -2
- package/dist/esm/components/navbar-indicator-context.js +76 -0
- package/dist/esm/components/navbar.js +98 -0
- package/dist/esm/components/navitem.js +113 -0
- package/dist/esm/components/next/back-button.js +11 -0
- package/dist/esm/components/next/index.js +12 -0
- package/dist/esm/components/next/siwe-provider.js +11 -0
- package/dist/esm/components/next/token-icon.js +11 -0
- package/dist/esm/components/next/web3-providers.js +92 -0
- package/dist/esm/components/not-found.js +24 -0
- package/dist/esm/components/options-list.js +53 -0
- package/dist/esm/components/page-title.js +80 -0
- package/dist/esm/components/percent-indicator.js +22 -0
- package/dist/esm/components/pool-points-indicator.js +73 -0
- package/dist/esm/components/search-bar.js +1 -0
- package/dist/esm/components/search-line.js +188 -0
- package/dist/esm/components/select.js +28 -8
- package/dist/esm/components/short-string.js +39 -0
- package/dist/esm/components/signatures/vertical-timeline.js +1 -0
- package/dist/esm/components/skeleton.js +54 -2
- package/dist/esm/components/stat-badge.js +155 -0
- package/dist/esm/components/tab-control.js +216 -0
- package/dist/esm/components/table/editable-grid-table.js +105 -0
- package/dist/esm/components/{editable-table → table}/editable-table.js +1 -1
- package/dist/esm/components/table/grid-error-line.js +36 -0
- package/dist/esm/components/table/grid-loading-line.js +30 -0
- package/dist/esm/components/table/grid-table-loader.js +22 -0
- package/dist/esm/components/table/grid-table.js +159 -0
- package/dist/esm/components/table/index.js +13 -0
- package/dist/esm/components/table/sortable-head-cell.js +24 -0
- package/dist/esm/components/table/table-loader-guard.js +31 -0
- package/dist/esm/components/table/table-loader.js +22 -0
- package/dist/esm/components/table/table-sm.js +58 -0
- package/dist/esm/components/{table.js → table/table.js} +74 -21
- package/dist/esm/components/textarea.js +25 -6
- package/dist/esm/components/theme-provider.js +108 -0
- package/dist/esm/components/theme-toggle.js +61 -0
- package/dist/esm/components/token-icon.js +70 -11
- package/dist/esm/components/token-symbol.js +50 -0
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/typed-intl/index.js +32 -0
- package/dist/esm/components/vspace.js +7 -0
- package/dist/esm/components/with-filter-button.js +50 -0
- package/dist/esm/configs/design-tokens.js +85 -0
- package/dist/esm/configs/index.js +9 -0
- package/dist/esm/configs/tailwind-preset.js +128 -0
- package/dist/esm/configs/tailwind.config.js +16 -57
- package/dist/esm/configs/variants.js +31 -0
- package/dist/esm/hooks/index.js +7 -0
- package/dist/esm/hooks/use-controllable-state.js +26 -0
- package/dist/esm/hooks/use-debounce.js +43 -0
- package/dist/esm/hooks/use-filter.js +52 -0
- package/dist/esm/hooks/use-hf.js +38 -0
- package/dist/esm/hooks/use-liquidation/index.js +188 -0
- package/dist/esm/hooks/use-liquidation/types.js +0 -0
- package/dist/esm/hooks/use-liquidation/utils.js +215 -0
- package/dist/esm/hooks/use-media-query.js +24 -0
- package/dist/esm/hooks/use-previous.js +12 -0
- package/dist/esm/index.js +84 -1
- package/dist/esm/types/component-props.js +0 -0
- package/dist/esm/types/filter.js +0 -0
- package/dist/esm/types/footer.js +0 -0
- package/dist/esm/types/graph.js +0 -0
- package/dist/esm/types/help.js +0 -0
- package/dist/esm/types/index.js +0 -0
- package/dist/esm/types/range-item.js +0 -0
- package/dist/esm/utils/a11y.js +14 -0
- package/dist/esm/utils/bn-to-input-view.js +36 -0
- package/dist/esm/utils/colors.js +69 -0
- package/dist/esm/utils/format-asset-amount.js +19 -0
- package/dist/esm/utils/format-money.js +40 -0
- package/dist/esm/utils/index.js +21 -1
- package/dist/esm/utils/interface.js +0 -0
- package/dist/esm/utils/react.js +70 -0
- package/dist/esm/utils/short-sha.js +4 -0
- package/dist/esm/utils/sort.js +0 -0
- package/dist/esm/utils/templates.js +24 -0
- package/dist/globals.css +230 -52
- package/dist/grid-safelist.css +264 -0
- package/dist/types/components/asset-line.d.ts +59 -0
- package/dist/types/components/assets-list-cell.d.ts +48 -0
- package/dist/types/components/assets-ratio.d.ts +9 -0
- package/dist/types/components/auth/signin-required.d.ts +1 -1
- package/dist/types/components/auth/siwe-provider.d.ts +2 -1
- package/dist/types/components/badge.d.ts +1 -1
- package/dist/types/components/base-link.d.ts +58 -0
- package/dist/types/components/block-sync.d.ts +8 -0
- package/dist/types/components/breadcrumbs.d.ts +24 -0
- package/dist/types/components/buttons/back-button.d.ts +15 -20
- package/dist/types/components/buttons/button.d.ts +37 -3
- package/dist/types/components/buttons/filter-button.d.ts +52 -0
- package/dist/types/components/buttons/index.d.ts +2 -0
- package/dist/types/components/buttons/range-buttons.d.ts +49 -0
- package/dist/types/components/card-grid.d.ts +25 -0
- package/dist/types/components/card.d.ts +116 -0
- package/dist/types/components/cards/card.d.ts +2 -2
- package/dist/types/components/checkbox-item.d.ts +56 -0
- package/dist/types/components/compound-apy.d.ts +80 -0
- package/dist/types/components/credit-session-status.d.ts +7 -0
- package/dist/types/components/description.d.ts +26 -0
- package/dist/types/components/detailed-page-title.d.ts +31 -0
- package/dist/types/components/dialog/dialog-container.d.ts +12 -0
- package/dist/types/components/dialog/dialog-content.d.ts +4 -0
- package/dist/types/components/dialog/dialog-description.d.ts +4 -0
- package/dist/types/components/dialog/dialog-footer.d.ts +6 -0
- package/dist/types/components/dialog/dialog-header.d.ts +6 -0
- package/dist/types/components/dialog/dialog-overlay.d.ts +4 -0
- package/dist/types/components/dialog/dialog-title.d.ts +4 -0
- package/dist/types/components/dialog/dialog.d.ts +5 -0
- package/dist/types/components/dialog/index.d.ts +8 -0
- package/dist/types/components/dropdown-menu/dropdown-menu-checkbox-item.d.ts +22 -0
- package/dist/types/components/dropdown-menu/dropdown-menu-content.d.ts +4 -0
- package/dist/types/components/dropdown-menu/dropdown-menu-item.d.ts +6 -0
- package/dist/types/components/dropdown-menu/dropdown-menu-label.d.ts +6 -0
- package/dist/types/components/dropdown-menu/dropdown-menu-radio-item.d.ts +4 -0
- package/dist/types/components/dropdown-menu/dropdown-menu-separator.d.ts +4 -0
- package/dist/types/components/dropdown-menu/dropdown-menu-shortcut.d.ts +6 -0
- package/dist/types/components/dropdown-menu/dropdown-menu-sub-content.d.ts +4 -0
- package/dist/types/components/dropdown-menu/dropdown-menu-sub-trigger.d.ts +6 -0
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +8 -0
- package/dist/types/components/dropdown-menu/index.d.ts +10 -0
- package/dist/types/components/error-message.d.ts +21 -0
- package/dist/types/components/filter/filter-block.d.ts +17 -0
- package/dist/types/components/filter/filter-checkbox-item.d.ts +23 -0
- package/dist/types/components/filter/filter-chip.d.ts +34 -0
- package/dist/types/components/filter/filter-chips.d.ts +42 -0
- package/dist/types/components/filter/filter-dropdown-item.d.ts +24 -0
- package/dist/types/components/filter/filter-group.d.ts +22 -0
- package/dist/types/components/filter/filter-label.d.ts +21 -0
- package/dist/types/components/filter/filter-modal-item.d.ts +31 -0
- package/dist/types/components/filter/filter-modal.d.ts +123 -0
- package/dist/types/components/filter/filter-radio-item.d.ts +19 -0
- package/dist/types/components/filter/filter-separator.d.ts +22 -0
- package/dist/types/components/filter/index.d.ts +109 -0
- package/dist/types/components/filter/interface.d.ts +24 -0
- package/dist/types/components/filter/variants.d.ts +3 -0
- package/dist/types/components/form/form-field.d.ts +38 -0
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/graph/default-config.d.ts +20 -0
- package/dist/types/components/graph/formatters.d.ts +16 -0
- package/dist/types/components/graph/graph-current-value.d.ts +13 -0
- package/dist/types/components/graph/graph-tooltip.d.ts +24 -0
- package/dist/types/components/graph/graph-view.d.ts +198 -0
- package/dist/types/components/graph/graph.d.ts +49 -0
- package/dist/types/components/graph/index.d.ts +7 -0
- package/dist/types/components/guard.d.ts +34 -0
- package/dist/types/components/health-factor.d.ts +63 -0
- package/dist/types/components/help-center-container.d.ts +22 -0
- package/dist/types/components/hide-on.d.ts +32 -0
- package/dist/types/components/horizontal-indicator.d.ts +22 -0
- package/dist/types/components/image.d.ts +35 -0
- package/dist/types/components/index.d.ts +44 -1
- package/dist/types/components/input.d.ts +26 -9
- package/dist/types/components/label.d.ts +26 -5
- package/dist/types/components/layout/app-logo.d.ts +1 -0
- package/dist/types/components/layout/col.d.ts +43 -0
- package/dist/types/components/layout/container.d.ts +37 -0
- package/dist/types/components/layout/footer.d.ts +44 -5
- package/dist/types/components/layout/grid.d.ts +48 -0
- package/dist/types/components/layout/header.d.ts +68 -12
- package/dist/types/components/layout/index.d.ts +4 -0
- package/dist/types/components/layout/layout.d.ts +12 -0
- package/dist/types/components/liquidation/index.d.ts +4 -0
- package/dist/types/components/liquidation/liquidation-assets-table.d.ts +14 -0
- package/dist/types/components/liquidation/liquidation-graph-legend.d.ts +2 -0
- package/dist/types/components/liquidation/liquidation-graph-tip.d.ts +13 -0
- package/dist/types/components/liquidation/liquidation-graph.d.ts +19 -0
- package/dist/types/components/loader-guard.d.ts +17 -0
- package/dist/types/components/loading-guard.d.ts +18 -0
- package/dist/types/components/navbar-indicator-context.d.ts +13 -0
- package/dist/types/components/navbar.d.ts +25 -0
- package/dist/types/components/navitem.d.ts +67 -0
- package/dist/types/components/next/back-button.d.ts +3 -0
- package/dist/types/components/next/index.d.ts +10 -0
- package/dist/types/components/next/siwe-provider.d.ts +7 -0
- package/dist/types/components/next/token-icon.d.ts +3 -0
- package/dist/types/components/next/web3-providers.d.ts +29 -0
- package/dist/types/components/not-found.d.ts +18 -0
- package/dist/types/components/options-list.d.ts +15 -0
- package/dist/types/components/page-title.d.ts +69 -0
- package/dist/types/components/percent-indicator.d.ts +28 -0
- package/dist/types/components/pool-points-indicator.d.ts +41 -0
- package/dist/types/components/search-line.d.ts +117 -0
- package/dist/types/components/select.d.ts +9 -2
- package/dist/types/components/short-string.d.ts +39 -0
- package/dist/types/components/skeleton.d.ts +28 -3
- package/dist/types/components/stat-badge.d.ts +169 -0
- package/dist/types/components/tab-control.d.ts +39 -0
- package/dist/types/components/table/editable-grid-table.d.ts +120 -0
- package/dist/types/components/table/grid-error-line.d.ts +49 -0
- package/dist/types/components/table/grid-loading-line.d.ts +36 -0
- package/dist/types/components/table/grid-table-loader.d.ts +25 -0
- package/dist/types/components/table/grid-table.d.ts +158 -0
- package/dist/types/components/table/index.d.ts +13 -0
- package/dist/types/components/table/sortable-head-cell.d.ts +36 -0
- package/dist/types/components/table/table-loader-guard.d.ts +45 -0
- package/dist/types/components/table/table-loader.d.ts +46 -0
- package/dist/types/components/table/table-sm.d.ts +94 -0
- package/dist/types/components/{table.d.ts → table/table.d.ts} +39 -12
- package/dist/types/components/{editable-table → table}/updated-value.d.ts +3 -0
- package/dist/types/components/textarea.d.ts +24 -5
- package/dist/types/components/theme-provider.d.ts +34 -0
- package/dist/types/components/theme-toggle.d.ts +5 -0
- package/dist/types/components/token-icon.d.ts +8 -6
- package/dist/types/components/token-symbol.d.ts +71 -0
- package/dist/types/components/typed-intl/index.d.ts +19 -0
- package/dist/types/components/vspace.d.ts +27 -0
- package/dist/types/components/with-filter-button.d.ts +54 -0
- package/dist/types/configs/design-tokens.d.ts +73 -0
- package/dist/types/configs/index.d.ts +4 -0
- package/dist/types/configs/tailwind-preset.d.ts +126 -0
- package/dist/types/configs/tailwind.config.d.ts +29 -0
- package/dist/types/configs/variants.d.ts +28 -0
- package/dist/types/hooks/index.d.ts +7 -0
- package/dist/types/hooks/use-controllable-state.d.ts +24 -0
- package/dist/types/hooks/use-debounce.d.ts +31 -0
- package/dist/types/hooks/use-filter.d.ts +37 -0
- package/dist/types/hooks/use-hf.d.ts +15 -0
- package/dist/types/hooks/use-liquidation/index.d.ts +52 -0
- package/dist/types/hooks/use-liquidation/types.d.ts +16 -0
- package/dist/types/hooks/use-liquidation/utils.d.ts +66 -0
- package/dist/types/hooks/use-media-query.d.ts +25 -0
- package/dist/types/hooks/use-previous.d.ts +10 -0
- package/dist/types/index.d.ts +71 -2
- package/dist/types/types/component-props.d.ts +16 -0
- package/dist/types/types/filter.d.ts +8 -0
- package/dist/types/types/footer.d.ts +30 -0
- package/dist/types/types/graph.d.ts +22 -0
- package/dist/types/types/help.d.ts +4 -0
- package/dist/types/types/index.d.ts +6 -0
- package/dist/types/types/range-item.d.ts +9 -0
- package/dist/types/utils/a11y.d.ts +24 -0
- package/dist/types/utils/bn-to-input-view.d.ts +17 -0
- package/dist/types/utils/colors.d.ts +29 -0
- package/dist/types/utils/format-asset-amount.d.ts +16 -0
- package/dist/types/utils/format-money.d.ts +64 -0
- package/dist/types/utils/index.d.ts +10 -0
- package/dist/types/utils/interface.d.ts +9 -0
- package/dist/types/utils/react.d.ts +31 -0
- package/dist/types/utils/short-sha.d.ts +9 -0
- package/dist/types/utils/sort.d.ts +5 -0
- package/dist/types/utils/templates.d.ts +61 -0
- package/package.json +66 -28
- package/dist/cjs/components/dialog.js +0 -137
- package/dist/cjs/components/dropdown-menu.js +0 -200
- package/dist/esm/components/dialog.js +0 -97
- package/dist/esm/components/dropdown-menu.js +0 -152
- package/dist/esm/components/editable-table/index.js +0 -3
- package/dist/types/components/dialog.d.ts +0 -38
- package/dist/types/components/dropdown-menu.d.ts +0 -59
- package/dist/types/components/editable-table/index.d.ts +0 -3
- /package/dist/cjs/components/{editable-table → table}/edit-button.js +0 -0
- /package/dist/cjs/components/{editable-table → table}/updated-value.js +0 -0
- /package/dist/esm/components/{editable-table → table}/edit-button.js +0 -0
- /package/dist/esm/components/{editable-table → table}/updated-value.js +0 -0
- /package/dist/types/components/{editable-table → table}/edit-button.d.ts +0 -0
- /package/dist/types/components/{editable-table → table}/editable-table.d.ts +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* HorizontalIndicator - displays a label with an optional tooltip and a value
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <HorizontalIndicator
|
|
8
|
+
* label="Total Value"
|
|
9
|
+
* tip="The total value locked"
|
|
10
|
+
* value="$1,234.56"
|
|
11
|
+
* />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export interface HorizontalIndicatorProps {
|
|
15
|
+
label: React.ReactNode;
|
|
16
|
+
value: React.ReactNode;
|
|
17
|
+
tip?: string;
|
|
18
|
+
valueDescription?: React.ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const HorizontalIndicator: React.ForwardRefExoticComponent<HorizontalIndicatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export { HorizontalIndicator };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image — universal image component that works in any React framework.
|
|
3
|
+
*
|
|
4
|
+
* @usage
|
|
5
|
+
* Use Image for displaying images in a framework-agnostic way:
|
|
6
|
+
* logos, icons, asset images, general images.
|
|
7
|
+
*
|
|
8
|
+
* Props:
|
|
9
|
+
* - `src` — image source URL (required).
|
|
10
|
+
* - `alt` — alternative text for accessibility (required).
|
|
11
|
+
* - `width` — image width in pixels (required).
|
|
12
|
+
* - `height` — image height in pixels (required).
|
|
13
|
+
* - `onError` — callback when image fails to load (optional).
|
|
14
|
+
* - `onLoad` — callback when image successfully loads (optional).
|
|
15
|
+
* - `className` — additional CSS classes (optional).
|
|
16
|
+
* - `loading` — loading behavior: "lazy" | "eager" (defaults to "lazy").
|
|
17
|
+
*
|
|
18
|
+
* Note: Uses native HTML img element with optimized loading attributes.
|
|
19
|
+
* Works in any React framework (CRA, Vite, Next.js, Remix, etc.).
|
|
20
|
+
*
|
|
21
|
+
* Do NOT use Image:
|
|
22
|
+
* - when you need Next.js-specific image optimization (use next/image directly).
|
|
23
|
+
* - for background images (use CSS background-image instead).
|
|
24
|
+
*/
|
|
25
|
+
export interface ImageProps {
|
|
26
|
+
src: string;
|
|
27
|
+
alt: string;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
onError?: () => void;
|
|
31
|
+
onLoad?: () => void;
|
|
32
|
+
className?: string;
|
|
33
|
+
loading?: "lazy" | "eager";
|
|
34
|
+
}
|
|
35
|
+
export declare function Image({ src, alt, width, height, onError, onLoad, className, loading, }: ImageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,22 +1,65 @@
|
|
|
1
1
|
export * from "./alert-dialog";
|
|
2
|
+
export * from "./asset-line";
|
|
3
|
+
export * from "./assets-list-cell";
|
|
4
|
+
export * from "./assets-ratio";
|
|
2
5
|
export * from "./auth";
|
|
3
6
|
export * from "./badge";
|
|
7
|
+
export * from "./base-link";
|
|
8
|
+
export * from "./block-sync";
|
|
9
|
+
export * from "./breadcrumbs";
|
|
4
10
|
export * from "./buttons";
|
|
11
|
+
export * from "./card-grid";
|
|
5
12
|
export * from "./cards";
|
|
6
13
|
export * from "./checkbox";
|
|
14
|
+
export * from "./checkbox-item";
|
|
15
|
+
export type { ExternalAPYData, ExtraRewardApy, PoolBaseAPY, } from "./compound-apy";
|
|
16
|
+
export * from "./compound-apy";
|
|
17
|
+
export * from "./credit-session-status";
|
|
18
|
+
export * from "./description";
|
|
19
|
+
export * from "./detailed-page-title";
|
|
7
20
|
export * from "./dialog";
|
|
8
21
|
export * from "./dropdown-menu";
|
|
9
|
-
export * from "./
|
|
22
|
+
export * from "./error-message";
|
|
23
|
+
export * from "./filter";
|
|
24
|
+
export * from "./form";
|
|
25
|
+
export * from "./graph";
|
|
26
|
+
export * from "./guard";
|
|
27
|
+
export * from "./health-factor";
|
|
28
|
+
export * from "./help-center-container";
|
|
29
|
+
export * from "./hide-on";
|
|
30
|
+
export * from "./horizontal-indicator";
|
|
31
|
+
export * from "./image";
|
|
10
32
|
export * from "./input";
|
|
11
33
|
export * from "./label";
|
|
12
34
|
export * from "./layout";
|
|
35
|
+
export * from "./liquidation";
|
|
36
|
+
export * from "./loader-guard";
|
|
37
|
+
export * from "./loading-guard";
|
|
13
38
|
export * from "./markdown-viewer";
|
|
39
|
+
export * from "./navbar";
|
|
40
|
+
export * from "./navbar-indicator-context";
|
|
41
|
+
export * from "./navitem";
|
|
42
|
+
export * from "./not-found";
|
|
43
|
+
export * from "./options-list";
|
|
44
|
+
export * from "./page-title";
|
|
45
|
+
export * from "./percent-indicator";
|
|
46
|
+
export * from "./pool-points-indicator";
|
|
14
47
|
export * from "./search-bar";
|
|
48
|
+
export * from "./search-line";
|
|
15
49
|
export * from "./select";
|
|
50
|
+
export * from "./short-string";
|
|
16
51
|
export * from "./signatures";
|
|
17
52
|
export * from "./skeleton";
|
|
53
|
+
export * from "./stat-badge";
|
|
54
|
+
export * from "./tab-control";
|
|
18
55
|
export * from "./table";
|
|
19
56
|
export * from "./tabs";
|
|
20
57
|
export * from "./textarea";
|
|
58
|
+
export * from "./theme-provider";
|
|
59
|
+
export * from "./theme-toggle";
|
|
21
60
|
export * from "./token-icon";
|
|
61
|
+
export * from "./token-symbol";
|
|
22
62
|
export * from "./tooltip";
|
|
63
|
+
export * from "./typed-intl";
|
|
64
|
+
export * from "./vspace";
|
|
65
|
+
export * from "./with-filter-button";
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
declare const inputVariants: (props?: ({
|
|
4
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
5
|
+
variant?: "default" | "error" | "success" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
2
7
|
/**
|
|
3
|
-
*
|
|
8
|
+
* InputProps — props for Input component.
|
|
9
|
+
*/
|
|
10
|
+
interface InputProps extends Omit<React.ComponentProps<"input">, "size">, VariantProps<typeof inputVariants> {
|
|
11
|
+
hasError?: boolean;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Input — text input component with size variants and error handling.
|
|
4
16
|
*
|
|
5
17
|
* @usage
|
|
6
18
|
* Use Input for text input fields in forms:
|
|
7
|
-
* text inputs, number inputs, email inputs, password inputs, search inputs
|
|
19
|
+
* text inputs, number inputs, email inputs, password inputs, search inputs.
|
|
8
20
|
*
|
|
9
21
|
* Props:
|
|
22
|
+
* - `size` — input size: "sm", "default", "lg" (defaults to "default").
|
|
23
|
+
* - `variant` — visual variant: "default", "error", "success" (defaults to "default").
|
|
10
24
|
* - `hasError` — if true, displays error styling (red border).
|
|
11
25
|
* - `errorMessage` — error message displayed below input when hasError is true and value is not empty.
|
|
12
26
|
* - All standard HTML input props are supported (type, placeholder, value, onChange, etc.).
|
|
@@ -18,10 +32,13 @@ import * as React from "react";
|
|
|
18
32
|
* Do NOT use Input:
|
|
19
33
|
* - for multi-line text input (use Textarea component).
|
|
20
34
|
* - for file uploads (use appropriate file input components).
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <Input placeholder="Enter text" />
|
|
39
|
+
* <Input size="lg" variant="error" hasError errorMessage="Invalid input" />
|
|
40
|
+
* <Input size="sm" type="email" />
|
|
41
|
+
* ```
|
|
21
42
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
errorMessage?: string;
|
|
25
|
-
}
|
|
26
|
-
export declare function Input({ hasError, errorMessage, value, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export {};
|
|
43
|
+
export declare function Input({ hasError, errorMessage, value, size, variant, className, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export { inputVariants };
|
|
@@ -1,20 +1,41 @@
|
|
|
1
1
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
declare const labelVariants: (props?: ({
|
|
5
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
|
+
variant?: "default" | "muted" | "error" | "success" | null | undefined;
|
|
7
|
+
required?: boolean | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
9
|
/**
|
|
5
|
-
* Label — component for form field labels.
|
|
10
|
+
* Label — component for form field labels with size and variant options.
|
|
6
11
|
*
|
|
7
12
|
* @usage
|
|
8
13
|
* Use Label to label form inputs and controls:
|
|
9
14
|
* input labels, checkbox labels, select labels, form field labels.
|
|
10
15
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
16
|
+
* Props:
|
|
17
|
+
* - `size` — label size: "sm", "default", "lg" (defaults to "default").
|
|
18
|
+
* - `variant` — visual variant: "default", "muted", "error", "success" (defaults to "default").
|
|
19
|
+
* - `required` — if true, displays asterisk (*) after label text.
|
|
20
|
+
* - All standard Radix UI Label props are supported (htmlFor, etc.).
|
|
21
|
+
*
|
|
22
|
+
* Note: Uses white text color and large text size by default. Automatically handles disabled state styling.
|
|
13
23
|
* Prefer using this component instead of @radix-ui/react-label directly.
|
|
14
24
|
*
|
|
15
25
|
* Do NOT use Label:
|
|
16
26
|
* - for non-form text labels (use appropriate text components).
|
|
17
27
|
* - when you need different styling that doesn't match form label semantics.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <Label htmlFor="email">Email</Label>
|
|
32
|
+
* <Label size="sm" variant="muted">Optional field</Label>
|
|
33
|
+
* <Label required>Required field</Label>
|
|
34
|
+
* ```
|
|
18
35
|
*/
|
|
19
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?:
|
|
20
|
-
|
|
36
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: ({
|
|
37
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
38
|
+
variant?: "default" | "muted" | "error" | "success" | null | undefined;
|
|
39
|
+
required?: boolean | null | undefined;
|
|
40
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
41
|
+
export { Label, labelVariants };
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* - `size` — logo size: "default" or "small" (defaults to "default").
|
|
11
11
|
*
|
|
12
12
|
* Note: Uses Gearbox Protocol logo from static CDN. Logo size and text size adjust based on size prop.
|
|
13
|
+
* Works with any React framework (not tied to Next.js).
|
|
13
14
|
*
|
|
14
15
|
* Do NOT use AppLogo:
|
|
15
16
|
* - for custom logos or branding (use Image component with custom logo).
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* ColProps — props for Col component.
|
|
4
|
+
*/
|
|
5
|
+
export interface ColProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
span?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "full" | "auto";
|
|
7
|
+
sm?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "full" | "auto";
|
|
8
|
+
md?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "full" | "auto";
|
|
9
|
+
lg?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "full" | "auto";
|
|
10
|
+
xl?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "full" | "auto";
|
|
11
|
+
start?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | "auto";
|
|
12
|
+
order?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "first" | "last" | "none";
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Col — grid column component for responsive column layouts.
|
|
16
|
+
*
|
|
17
|
+
* @usage
|
|
18
|
+
* Use Col within Grid component to define responsive column spans:
|
|
19
|
+
* responsive columns, grid items, flexible column widths.
|
|
20
|
+
*
|
|
21
|
+
* Props:
|
|
22
|
+
* - `span` — number of columns to span (1-12, "full", or "auto", defaults to 12).
|
|
23
|
+
* - `sm` — column span for small screens (≥640px).
|
|
24
|
+
* - `md` — column span for medium screens (≥768px).
|
|
25
|
+
* - `lg` — column span for large screens (≥1024px).
|
|
26
|
+
* - `xl` — column span for extra large screens (≥1280px).
|
|
27
|
+
* - `start` — starting column position (1-13 or "auto").
|
|
28
|
+
* - `order` — flex order for column reordering (1-12, "first", "last", "none").
|
|
29
|
+
*
|
|
30
|
+
* Note: Works with Tailwind grid system (grid-cols-12).
|
|
31
|
+
* Use within a Grid container with appropriate column configuration.
|
|
32
|
+
* "full" spans all columns, "auto" uses automatic sizing.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <Grid cols={12}>
|
|
37
|
+
* <Col span={6}>Half width</Col>
|
|
38
|
+
* <Col span={6}>Half width</Col>
|
|
39
|
+
* <Col span={12} md={6}>Full on mobile, half on desktop</Col>
|
|
40
|
+
* </Grid>
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const Col: React.ForwardRefExoticComponent<ColProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* ContainerProps — props for Container component.
|
|
4
|
+
*/
|
|
5
|
+
export interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
maxWidth?: "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
7
|
+
padding?: boolean;
|
|
8
|
+
center?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Container — responsive content width container component.
|
|
12
|
+
*
|
|
13
|
+
* @usage
|
|
14
|
+
* Use Container to constrain content width for better readability:
|
|
15
|
+
* page containers, section wrappers, centered content, responsive layouts.
|
|
16
|
+
*
|
|
17
|
+
* Props:
|
|
18
|
+
* - `maxWidth` — maximum width constraint: "sm", "md", "lg", "xl", "2xl", "full" (defaults to "xl").
|
|
19
|
+
* - `padding` — whether to apply horizontal padding (defaults to true).
|
|
20
|
+
* - `center` — whether to center container horizontally (defaults to true).
|
|
21
|
+
*
|
|
22
|
+
* Note: Follows best practices for content readability and layout.
|
|
23
|
+
* Applies responsive padding (px-4 sm:px-6 lg:px-8) when padding is true.
|
|
24
|
+
* Automatically centers content when center is true using mx-auto.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <Container>
|
|
29
|
+
* <h1>Page Content</h1>
|
|
30
|
+
* </Container>
|
|
31
|
+
*
|
|
32
|
+
* <Container maxWidth="lg" padding={false}>
|
|
33
|
+
* <CustomContent />
|
|
34
|
+
* </Container>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,9 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { type LegalReferences } from "./legal-disclaimer";
|
|
3
|
+
export interface FooterProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
logo?: React.ReactNode;
|
|
5
|
+
copyright?: React.ReactNode;
|
|
6
|
+
social?: React.ReactNode;
|
|
7
|
+
version?: string;
|
|
8
|
+
secondaryInfo?: React.ReactNode;
|
|
9
|
+
legalLinks?: React.ReactNode;
|
|
10
|
+
containerClassName?: string;
|
|
11
|
+
mobileExtraContent?: React.ReactNode;
|
|
12
|
+
}
|
|
2
13
|
/**
|
|
3
|
-
* Footer
|
|
14
|
+
* Footer component
|
|
15
|
+
* Two-column layout with logo/copyright on left, social/info on right
|
|
16
|
+
* Responsive design with mobile adaptations
|
|
17
|
+
*/
|
|
18
|
+
export declare const Footer: React.ForwardRefExoticComponent<FooterProps & React.RefAttributes<HTMLElement>>;
|
|
19
|
+
/**
|
|
20
|
+
* FooterLink — link component for footer navigation.
|
|
21
|
+
*/
|
|
22
|
+
interface FooterLinkProps {
|
|
23
|
+
href: string;
|
|
24
|
+
text: string;
|
|
25
|
+
external?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function FooterLink({ href, text, external }: FooterLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
/**
|
|
29
|
+
* FooterLinkSection — section component for grouping footer links.
|
|
30
|
+
*/
|
|
31
|
+
export declare function FooterLinkSection({ title, links, }: {
|
|
32
|
+
title: string;
|
|
33
|
+
links: FooterLinkProps[];
|
|
34
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* GearboxFooter — application footer component with legal links and branding.
|
|
4
37
|
*
|
|
5
38
|
* @usage
|
|
6
|
-
* Use
|
|
39
|
+
* Use GearboxFooter as the main application footer:
|
|
7
40
|
* legal links, documentation links, app branding, legal disclaimer.
|
|
8
41
|
*
|
|
9
42
|
* Props:
|
|
@@ -12,15 +45,21 @@ import { type LegalReferences } from "./legal-disclaimer";
|
|
|
12
45
|
* - `termsOfService` — Terms of Service URL.
|
|
13
46
|
* - `privacyNotice` — Privacy Notice URL.
|
|
14
47
|
* - `riskDisclosure` — Risk Disclosure URL.
|
|
48
|
+
* - `mobileStatusContent` — content to display at the bottom of footer on mobile (e.g., BlockSync).
|
|
15
49
|
*
|
|
16
|
-
* Note:
|
|
50
|
+
* Note: GearboxFooter includes AppLogo, LegalDisclaimer, and predefined link sections for Legal and Developers.
|
|
17
51
|
* Uses responsive grid layout (1 column on mobile, 2 columns on desktop).
|
|
52
|
+
* Built on top of the abstract Footer component.
|
|
18
53
|
*
|
|
19
|
-
* Do NOT use
|
|
54
|
+
* Do NOT use GearboxFooter:
|
|
20
55
|
* - for page-specific footers.
|
|
21
56
|
* - for section footers within content (use appropriate container components).
|
|
57
|
+
* - if you need a custom footer layout (use the abstract Footer component directly).
|
|
22
58
|
*/
|
|
23
|
-
export declare function
|
|
59
|
+
export declare function GearboxFooter({ appName, legalReferences, className, mobileStatusContent, }: {
|
|
24
60
|
appName: string;
|
|
25
61
|
legalReferences: LegalReferences;
|
|
62
|
+
className?: string;
|
|
63
|
+
mobileStatusContent?: React.ReactNode;
|
|
26
64
|
}): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* GridProps — props for Grid component.
|
|
4
|
+
*/
|
|
5
|
+
export interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
cols?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | string;
|
|
7
|
+
sm?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
8
|
+
md?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
9
|
+
lg?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
10
|
+
xl?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
11
|
+
gap?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 16 | 20 | 24;
|
|
12
|
+
gapX?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 16 | 20 | 24;
|
|
13
|
+
gapY?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 16 | 20 | 24;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Grid — responsive grid layout component using CSS Grid.
|
|
17
|
+
*
|
|
18
|
+
* @usage
|
|
19
|
+
* Use Grid to create responsive grid-based layouts:
|
|
20
|
+
* page layouts, card grids, responsive columns, flexible grid structures.
|
|
21
|
+
*
|
|
22
|
+
* Props:
|
|
23
|
+
* - `cols` — number of columns (1-12) or custom CSS grid template string (defaults to 12).
|
|
24
|
+
* - `sm` — number of columns for small screens (≥640px).
|
|
25
|
+
* - `md` — number of columns for medium screens (≥768px).
|
|
26
|
+
* - `lg` — number of columns for large screens (≥1024px).
|
|
27
|
+
* - `xl` — number of columns for extra large screens (≥1280px).
|
|
28
|
+
* - `gap` — gap between grid items in Tailwind spacing units (defaults to 4).
|
|
29
|
+
* - `gapX` — horizontal gap override (overrides gap).
|
|
30
|
+
* - `gapY` — vertical gap override.
|
|
31
|
+
*
|
|
32
|
+
* Note: Works with Col component for flexible column-based layouts.
|
|
33
|
+
* Supports both numeric columns (uses Tailwind grid classes) and custom CSS grid templates.
|
|
34
|
+
* When cols is a string, uses inline style for grid-template-columns.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* // Numeric columns (uses Tailwind classes)
|
|
39
|
+
* <Grid cols={12}>...</Grid>
|
|
40
|
+
*
|
|
41
|
+
* // Custom CSS grid columns
|
|
42
|
+
* <Grid cols="130px 120px 1.5fr repeat(3, 1fr)">...</Grid>
|
|
43
|
+
*
|
|
44
|
+
* // Responsive columns
|
|
45
|
+
* <Grid cols={1} sm={2} md={3} lg={4}>...</Grid>
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,25 +1,81 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface HeaderProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Navigation content (shown on desktop, hidden on mobile unless specified)
|
|
5
|
+
*/
|
|
6
|
+
navigation?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Logo or brand content
|
|
9
|
+
*/
|
|
10
|
+
logo?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Action buttons or elements (e.g., Sign In, Sign Up)
|
|
13
|
+
*/
|
|
14
|
+
actions?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the header should be fixed to the top of the viewport
|
|
17
|
+
*/
|
|
18
|
+
fixed?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the header should stick to the top when scrolling
|
|
21
|
+
*/
|
|
22
|
+
sticky?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Additional className for the inner container
|
|
25
|
+
*/
|
|
26
|
+
containerClassName?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Custom content for mobile menu (optional)
|
|
29
|
+
* If not provided, the desktop navigation will be used
|
|
30
|
+
*/
|
|
31
|
+
mobileMenuContent?: React.ReactNode;
|
|
32
|
+
}
|
|
2
33
|
/**
|
|
3
|
-
* Header
|
|
34
|
+
* Header component with support for navigation, logo, and actions
|
|
35
|
+
* Follows responsive design practices with automatic mobile menu support
|
|
4
36
|
*
|
|
5
37
|
* @usage
|
|
6
38
|
* Use Header as the main application header:
|
|
7
39
|
* top navigation bar, app logo, navigation menu, wallet connection button.
|
|
8
40
|
*
|
|
9
|
-
* Props:
|
|
10
|
-
* - `appName` — application name displayed next to logo (required).
|
|
11
|
-
* - `navigation` — array of NavigationButton props for navigation menu (required).
|
|
12
|
-
* - `connectKitButton` — ConnectKit wallet connection button component (required).
|
|
13
|
-
*
|
|
14
41
|
* Note: Header is sticky at the top with z-50. Navigation is hidden on mobile (md:flex).
|
|
15
42
|
* Uses NavigationButton components for navigation items.
|
|
16
43
|
*
|
|
17
44
|
* Do NOT use Header:
|
|
18
45
|
* - for page-specific headers.
|
|
19
46
|
* - for section headers within content (use CardHeader or h2/h3 elements).
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```tsx
|
|
50
|
+
* <Header
|
|
51
|
+
* logo={<div>MyApp</div>}
|
|
52
|
+
* navigation={
|
|
53
|
+
* <nav className="flex gap-4">
|
|
54
|
+
* <NavItem href="/" active>Home</NavItem>
|
|
55
|
+
* <NavItem href="/about">About</NavItem>
|
|
56
|
+
* </nav>
|
|
57
|
+
* }
|
|
58
|
+
* actions={
|
|
59
|
+
* <>
|
|
60
|
+
* <Button variant="ghost">Sign In</Button>
|
|
61
|
+
* <Button>Sign Up</Button>
|
|
62
|
+
* </>
|
|
63
|
+
* }
|
|
64
|
+
* />
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @example With custom mobile menu
|
|
68
|
+
* ```tsx
|
|
69
|
+
* <Header
|
|
70
|
+
* logo={<div>MyApp</div>}
|
|
71
|
+
* navigation={<DesktopNav />}
|
|
72
|
+
* mobileMenuContent={
|
|
73
|
+
* <nav className="flex flex-col gap-2">
|
|
74
|
+
* <a href="/" className="px-4 py-3">Home</a>
|
|
75
|
+
* <a href="/about" className="px-4 py-3">About</a>
|
|
76
|
+
* </nav>
|
|
77
|
+
* }
|
|
78
|
+
* />
|
|
79
|
+
* ```
|
|
20
80
|
*/
|
|
21
|
-
export declare
|
|
22
|
-
appName: string;
|
|
23
|
-
navigation: NavigationButtonProps[];
|
|
24
|
-
connectKitButton: React.ReactNode;
|
|
25
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
export declare const Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export * from "./app-logo";
|
|
2
|
+
export * from "./col";
|
|
3
|
+
export * from "./container";
|
|
2
4
|
export * from "./footer";
|
|
5
|
+
export * from "./grid";
|
|
3
6
|
export * from "./header";
|
|
7
|
+
export * from "./layout";
|
|
4
8
|
export * from "./legal-disclaimer";
|
|
5
9
|
export * from "./page-layout";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface LayoutProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
header?: React.ReactNode;
|
|
4
|
+
footer?: React.ReactNode;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Layout component with grid-based structure
|
|
9
|
+
* Supports header, footer, and main content areas
|
|
10
|
+
* Fully responsive with mobile-first approach
|
|
11
|
+
*/
|
|
12
|
+
export declare const Layout: React.ForwardRefExoticComponent<LayoutProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TokenData } from "@gearbox-protocol/sdk";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
import type { Address } from "viem";
|
|
4
|
+
import type { UseLiquidationGraphParamsReturnType } from "../../hooks/use-liquidation";
|
|
5
|
+
export interface LiquidationModellingAssetsTableProps {
|
|
6
|
+
tokensList: Record<Address, TokenData>;
|
|
7
|
+
graphParams: UseLiquidationGraphParamsReturnType;
|
|
8
|
+
data: Array<{
|
|
9
|
+
token: Address;
|
|
10
|
+
}>;
|
|
11
|
+
prices: Record<Address, bigint>;
|
|
12
|
+
editedPrices: Record<Address, bigint>;
|
|
13
|
+
}
|
|
14
|
+
export declare function LiquidationModellingAssetsTable({ tokensList, graphParams, data, prices, editedPrices, }: LiquidationModellingAssetsTableProps): React.ReactElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TokenData } from "@gearbox-protocol/sdk";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
import type { AxisParams } from "../../hooks/use-liquidation";
|
|
4
|
+
export interface LiquidationGraphTipProps {
|
|
5
|
+
activePointX: number | undefined;
|
|
6
|
+
activePointY: number | undefined;
|
|
7
|
+
xAxis: AxisParams | undefined;
|
|
8
|
+
yAxis: AxisParams | undefined;
|
|
9
|
+
hf: number;
|
|
10
|
+
underlyingToken: TokenData | undefined;
|
|
11
|
+
maxLabelLength?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function LiquidationGraphTip({ activePointX, activePointY, xAxis, yAxis, hf, underlyingToken, maxLabelLength, }: LiquidationGraphTipProps): React.ReactElement;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Asset, CalcQuotaUpdateProps, TokenData } from "@gearbox-protocol/sdk";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
import type { Address } from "viem";
|
|
4
|
+
import type { UseLiquidationGraphParamsReturnType } from "../../hooks/use-liquidation";
|
|
5
|
+
export interface LiquidationGraphProps {
|
|
6
|
+
graphParams: UseLiquidationGraphParamsReturnType;
|
|
7
|
+
assets: Array<Asset>;
|
|
8
|
+
liquidationThresholds: CalcQuotaUpdateProps["liquidationThresholds"];
|
|
9
|
+
quotas: Record<Address, Asset>;
|
|
10
|
+
quotasInfo: CalcQuotaUpdateProps["quotas"];
|
|
11
|
+
underlyingToken: Address;
|
|
12
|
+
debt: bigint;
|
|
13
|
+
tokensList: Record<Address, TokenData>;
|
|
14
|
+
prices: Record<Address, bigint>;
|
|
15
|
+
width?: number;
|
|
16
|
+
height?: number;
|
|
17
|
+
maxLabelLength?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function LiquidationGraph({ graphParams, assets, liquidationThresholds, quotas, quotasInfo, underlyingToken: underlyingTokenAddress, debt, prices, tokensList, width, height, maxLabelLength, }: LiquidationGraphProps): React.ReactElement;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export interface LoaderGuardProps {
|
|
3
|
+
showGuard: boolean;
|
|
4
|
+
loader?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* LoaderGuard - displays loading state while data is being fetched
|
|
8
|
+
* Uses Guard component internally with a default loader
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <LoaderGuard showGuard={isLoading}>
|
|
13
|
+
* <Content />
|
|
14
|
+
* </LoaderGuard>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function LoaderGuard({ showGuard: show, children, loader, }: React.PropsWithChildren<LoaderGuardProps>): React.ReactElement;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export interface LoadingGuardProps {
|
|
3
|
+
showGuard: boolean;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
fallback?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* LoadingGuard - displays loading state while data is being fetched
|
|
9
|
+
* Shows a loading skeleton or custom fallback when showGuard is true
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <LoadingGuard showGuard={isLoading}>
|
|
14
|
+
* <UserProfile user={user} posts={posts} />
|
|
15
|
+
* </LoadingGuard>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function LoadingGuard({ showGuard, children, fallback, }: LoadingGuardProps): React.ReactElement;
|