@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
|
@@ -25,6 +25,7 @@ interface SIWEProviderProps {
|
|
|
25
25
|
apiRoutePrefix: string;
|
|
26
26
|
statement?: string;
|
|
27
27
|
children?: React.ReactNode;
|
|
28
|
+
onRefresh?: () => void;
|
|
28
29
|
}
|
|
29
|
-
export declare function SIWEClientProvider({ apiRoutePrefix, statement, children, ...props }: SIWEProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function SIWEClientProvider({ apiRoutePrefix, statement, children, onRefresh, ...props }: SIWEProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
30
31
|
export {};
|
|
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import type * as React from "react";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
/**
|
|
7
7
|
* Badge — component for displaying labels, tags, or status indicators.
|
|
8
8
|
*
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface BaseLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Renders the link as a child element using Radix Slot
|
|
5
|
+
* Useful for working with routing libraries like Next.js Link or React Router Link
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* // With Next.js Link
|
|
10
|
+
* <BaseLink asChild>
|
|
11
|
+
* <Link href="/path">Link</Link>
|
|
12
|
+
* </BaseLink>
|
|
13
|
+
*
|
|
14
|
+
* // With React Router Link
|
|
15
|
+
* <BaseLink asChild>
|
|
16
|
+
* <Link to="/path">Link</Link>
|
|
17
|
+
* </BaseLink>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
asChild?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Indicates if this is an external link
|
|
23
|
+
* Automatically adds target="_blank" and rel="noopener noreferrer"
|
|
24
|
+
*/
|
|
25
|
+
external?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* BaseLink component for creating links with optional external link handling
|
|
29
|
+
*
|
|
30
|
+
* This component works in both Next.js and non-Next.js projects:
|
|
31
|
+
* - In Next.js: use `asChild` prop to wrap Next.js Link component
|
|
32
|
+
* - In other frameworks: use `href` prop directly or wrap routing library links with `asChild`
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* // Basic usage (works in any React project)
|
|
37
|
+
* <BaseLink href="/dashboard">Dashboard</BaseLink>
|
|
38
|
+
*
|
|
39
|
+
* // External link
|
|
40
|
+
* <BaseLink href="https://example.com" external>Example</BaseLink>
|
|
41
|
+
*
|
|
42
|
+
* // With Next.js Link (recommended for Next.js projects)
|
|
43
|
+
* import NextLink from "next/link";
|
|
44
|
+
*
|
|
45
|
+
* <BaseLink asChild>
|
|
46
|
+
* <NextLink href="/dashboard">Dashboard</NextLink>
|
|
47
|
+
* </BaseLink>
|
|
48
|
+
*
|
|
49
|
+
* // With React Router Link
|
|
50
|
+
* import { Link as RouterLink } from "react-router-dom";
|
|
51
|
+
*
|
|
52
|
+
* <BaseLink asChild>
|
|
53
|
+
* <RouterLink to="/dashboard">Dashboard</RouterLink>
|
|
54
|
+
* </BaseLink>
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
declare const BaseLink: React.ForwardRefExoticComponent<BaseLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
58
|
+
export { BaseLink };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { BlockSyncProps } from "../types/footer";
|
|
3
|
+
/**
|
|
4
|
+
* BlockSync component - displays network synchronization status
|
|
5
|
+
* Shows a colored indicator that reflects the time since last block update
|
|
6
|
+
* On hover, displays detailed information about synced blocks for each chain
|
|
7
|
+
*/
|
|
8
|
+
export declare function BlockSync({ blockByChain, explorerAddresses, networkById, }: BlockSyncProps): React.ReactElement;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export interface BreadCrumb {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
href?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BreadCrumbsProps {
|
|
7
|
+
items: Array<BreadCrumb>;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* BreadCrumbs - navigation breadcrumbs component
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <BreadCrumbs
|
|
16
|
+
* items={[
|
|
17
|
+
* { label: "Home", href: "/" },
|
|
18
|
+
* { label: "Products", href: "/products" },
|
|
19
|
+
* { label: "Details" }
|
|
20
|
+
* ]}
|
|
21
|
+
* />
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function BreadCrumbs({ items, className, }: BreadCrumbsProps): React.ReactElement;
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
declare const backButtonVariants: (props?: ({
|
|
3
|
+
variant?: "default" | "primary" | "ghost" | null | undefined;
|
|
4
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface LinkComponentProps {
|
|
7
|
+
href: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface BackButtonProps extends VariantProps<typeof backButtonVariants> {
|
|
2
13
|
href: string;
|
|
3
14
|
text?: string;
|
|
4
15
|
onClick?: () => void;
|
|
5
16
|
className?: string;
|
|
17
|
+
LinkComponent?: React.ComponentType<LinkComponentProps>;
|
|
6
18
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
* @usage
|
|
11
|
-
* Use BackButton to provide users with a way to return to the previous page or section:
|
|
12
|
-
* breadcrumb navigation, detail pages, multi-step forms, nested views.
|
|
13
|
-
* Mostly used in PageLayout component.
|
|
14
|
-
*
|
|
15
|
-
* Props:
|
|
16
|
-
* - `href` — destination URL for navigation (required).
|
|
17
|
-
* - `text` — custom text label (defaults to "Back" if not provided).
|
|
18
|
-
* - `onClick` — optional callback function executed on click.
|
|
19
|
-
* - `className` — additional CSS classes for styling.
|
|
20
|
-
*
|
|
21
|
-
* Do NOT use BackButton:
|
|
22
|
-
* - for primary navigation menus (use NavigationButton or dedicated navigation components).
|
|
23
|
-
* - for actions that don't navigate to a different page (use regular Button instead).
|
|
24
|
-
*/
|
|
25
|
-
export declare function BackButton({ href, text, onClick, className, }: BackButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function BackButton({ href, text, onClick, className, variant, size, LinkComponent, }: BackButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export { backButtonVariants };
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
5
|
-
size?: "
|
|
6
|
-
} & import("class-variance-authority/
|
|
4
|
+
variant?: "link" | "text" | "default" | "ghost" | "destructive" | "outline" | "secondary" | "pink" | "pink-outline" | "blue" | "blue-outline" | null | undefined;
|
|
5
|
+
size?: "icon" | "default" | "sm" | "lg" | "auto" | "xs" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
/**
|
|
8
|
+
* Button component props
|
|
9
|
+
*/
|
|
7
10
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
11
|
+
/**
|
|
12
|
+
* Renders the button as a child element using Radix Slot
|
|
13
|
+
* Useful for creating link buttons or custom interactive elements
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Button asChild>
|
|
18
|
+
* <Link href="/path">Link Button</Link>
|
|
19
|
+
* </Button>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
8
22
|
asChild?: boolean;
|
|
9
23
|
}
|
|
10
24
|
/**
|
|
@@ -36,6 +50,26 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
36
50
|
* Do NOT use Button:
|
|
37
51
|
* - for passive labels or decorative UI elements.
|
|
38
52
|
* - for elements that don't perform actions (use appropriate semantic elements instead).
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* // Basic usage
|
|
57
|
+
* <Button>Click me</Button>
|
|
58
|
+
*
|
|
59
|
+
* // With variants
|
|
60
|
+
* <Button variant="destructive">Delete</Button>
|
|
61
|
+
* <Button variant="outline" size="sm">Small Button</Button>
|
|
62
|
+
*
|
|
63
|
+
* // As a link
|
|
64
|
+
* <Button asChild>
|
|
65
|
+
* <Link href="/dashboard">Go to Dashboard</Link>
|
|
66
|
+
* </Button>
|
|
67
|
+
*
|
|
68
|
+
* // Icon button
|
|
69
|
+
* <Button size="icon" variant="ghost">
|
|
70
|
+
* <Icon />
|
|
71
|
+
* </Button>
|
|
72
|
+
* ```
|
|
39
73
|
*/
|
|
40
74
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
41
75
|
export { Button, buttonVariants };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type ButtonProps } from "./button";
|
|
3
|
+
/**
|
|
4
|
+
* FilterButtonProps — props for FilterButton component.
|
|
5
|
+
*/
|
|
6
|
+
export interface FilterButtonProps extends ButtonProps {
|
|
7
|
+
/**
|
|
8
|
+
* Custom label for the filter button
|
|
9
|
+
* @default "Filter"
|
|
10
|
+
*/
|
|
11
|
+
label?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether to show the filter icon
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
showIcon?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* FilterButton — button component with filter icon for triggering filter actions.
|
|
20
|
+
*
|
|
21
|
+
* @usage
|
|
22
|
+
* Use FilterButton to trigger filter dialogs or modals:
|
|
23
|
+
* filter triggers, search filters, table filters, list filters.
|
|
24
|
+
*
|
|
25
|
+
* Props:
|
|
26
|
+
* - `label` — custom button text (defaults to "Filter").
|
|
27
|
+
* - `showIcon` — whether to display filter icon (defaults to true).
|
|
28
|
+
* - `variant` — button variant (defaults to "outline").
|
|
29
|
+
* - `size` — button size (defaults to "default").
|
|
30
|
+
* - All standard Button props are supported (onClick, className, etc.).
|
|
31
|
+
*
|
|
32
|
+
* Note: Commonly used with WithFilterButton HOC or FilterModal component.
|
|
33
|
+
* Displays Filter icon from lucide-react by default.
|
|
34
|
+
*
|
|
35
|
+
* Do NOT use FilterButton:
|
|
36
|
+
* - for direct filtering without opening a dialog (use regular Button with filter logic).
|
|
37
|
+
* - when filter icon doesn't make sense visually (use regular Button instead).
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* // Basic usage
|
|
42
|
+
* <FilterButton onClick={() => console.log("Filter clicked")} />
|
|
43
|
+
*
|
|
44
|
+
* // With custom label
|
|
45
|
+
* <FilterButton label="Apply Filters" variant="outline" size="sm" />
|
|
46
|
+
*
|
|
47
|
+
* // Without icon
|
|
48
|
+
* <FilterButton showIcon={false} label="Filters" />
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
declare const FilterButton: React.ForwardRefExoticComponent<FilterButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
52
|
+
export { FilterButton };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* RangeItemProps — props for single range option.
|
|
4
|
+
*/
|
|
5
|
+
export interface RangeItemProps<T> {
|
|
6
|
+
value: T;
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* RangeButtonsProps — props for RangeButtons component.
|
|
11
|
+
*/
|
|
12
|
+
export interface RangeButtonsProps<T> {
|
|
13
|
+
range: T;
|
|
14
|
+
rangeList: Array<RangeItemProps<T>>;
|
|
15
|
+
setRange: (range: T) => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* RangeButtons — button group component for selecting from a list of options.
|
|
20
|
+
*
|
|
21
|
+
* @usage
|
|
22
|
+
* Use RangeButtons to create option selectors:
|
|
23
|
+
* time range selectors, view mode toggles, filter options, segmented controls.
|
|
24
|
+
*
|
|
25
|
+
* Props:
|
|
26
|
+
* - `range` — currently selected value (required).
|
|
27
|
+
* - `rangeList` — array of selectable options with value and label (required).
|
|
28
|
+
* - `setRange` — callback function to change selected value (required).
|
|
29
|
+
* - `className` — additional CSS classes for styling.
|
|
30
|
+
*
|
|
31
|
+
* Note: Displays inline button group with active state highlighting.
|
|
32
|
+
* Supports generic type T for flexible value types.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* const [timeRange, setTimeRange] = useState<"24h" | "7d" | "30d">("24h");
|
|
37
|
+
*
|
|
38
|
+
* <RangeButtons
|
|
39
|
+
* range={timeRange}
|
|
40
|
+
* rangeList={[
|
|
41
|
+
* { value: "24h", label: "24H" },
|
|
42
|
+
* { value: "7d", label: "7D" },
|
|
43
|
+
* { value: "30d", label: "30D" },
|
|
44
|
+
* ]}
|
|
45
|
+
* setRange={setTimeRange}
|
|
46
|
+
* />
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function RangeButtons<T>({ range, rangeList, setRange, className, }: RangeButtonsProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* CardGrid - responsive grid layout for cards
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <CardGrid columns={3} columnsSm={2} gap="lg">
|
|
9
|
+
* <div>Item 1</div>
|
|
10
|
+
* <div>Item 2</div>
|
|
11
|
+
* </CardGrid>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
declare const cardGridVariants: (props?: ({
|
|
15
|
+
columns?: 2 | 1 | 3 | 5 | 4 | 6 | null | undefined;
|
|
16
|
+
columnsLg?: 2 | 1 | 3 | 5 | 4 | 6 | null | undefined;
|
|
17
|
+
columnsMd?: 2 | 1 | 3 | 5 | 4 | 6 | null | undefined;
|
|
18
|
+
columnsSm?: 2 | 1 | 3 | 5 | 4 | 6 | null | undefined;
|
|
19
|
+
gap?: "none" | "sm" | "lg" | "md" | "xl" | null | undefined;
|
|
20
|
+
justifyItemContent?: "end" | "center" | "start" | "stretch" | null | undefined;
|
|
21
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
22
|
+
interface CardGridProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardGridVariants> {
|
|
23
|
+
}
|
|
24
|
+
declare const CardGrid: React.ForwardRefExoticComponent<CardGridProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export { CardGrid, cardGridVariants };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const cardVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "ghost" | "elevated" | "outlined" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
/**
|
|
7
|
+
* CardProps — props for Card component.
|
|
8
|
+
*/
|
|
9
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Card — container component for grouped content.
|
|
13
|
+
*
|
|
14
|
+
* @usage
|
|
15
|
+
* Use Card to group related content:
|
|
16
|
+
* content cards, info panels, feature boxes, grouped sections.
|
|
17
|
+
*
|
|
18
|
+
* Props:
|
|
19
|
+
* - `variant` — visual variant: "default", "elevated", "outlined", "ghost" (defaults to "default").
|
|
20
|
+
*
|
|
21
|
+
* Note: Supports different visual styles via variant prop.
|
|
22
|
+
* Use with CardHeader, CardTitle, CardDescription, CardContent, and CardFooter for structured layout.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <Card>
|
|
27
|
+
* <CardHeader>
|
|
28
|
+
* <CardTitle>Card Title</CardTitle>
|
|
29
|
+
* </CardHeader>
|
|
30
|
+
* <CardContent>Content here</CardContent>
|
|
31
|
+
* </Card>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
declare const cardHeaderVariants: (props?: ({
|
|
36
|
+
padding?: "none" | "default" | "sm" | "lg" | null | undefined;
|
|
37
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
38
|
+
/**
|
|
39
|
+
* CardHeaderProps — props for CardHeader component.
|
|
40
|
+
*/
|
|
41
|
+
interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardHeaderVariants> {
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* CardHeader — header section of a Card.
|
|
45
|
+
*
|
|
46
|
+
* @usage
|
|
47
|
+
* Use CardHeader to wrap card title and description:
|
|
48
|
+
* card headers with title and optional description.
|
|
49
|
+
*
|
|
50
|
+
* Props:
|
|
51
|
+
* - `padding` — padding size: "none", "sm", "default", "lg" (defaults to "default").
|
|
52
|
+
*/
|
|
53
|
+
declare const CardHeader: React.ForwardRefExoticComponent<CardHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
54
|
+
/**
|
|
55
|
+
* CardTitle — title component for Card header.
|
|
56
|
+
*
|
|
57
|
+
* @usage
|
|
58
|
+
* Use CardTitle to display card title:
|
|
59
|
+
* card headlines, card headings.
|
|
60
|
+
*
|
|
61
|
+
* Note: Uses large semibold text (2xl) with tight tracking.
|
|
62
|
+
*/
|
|
63
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
64
|
+
/**
|
|
65
|
+
* CardDescription — description component for Card header.
|
|
66
|
+
*
|
|
67
|
+
* @usage
|
|
68
|
+
* Use CardDescription to display card description or subtitle:
|
|
69
|
+
* card subtitles, card descriptions, additional card information.
|
|
70
|
+
*
|
|
71
|
+
* Note: Uses small muted text color.
|
|
72
|
+
*/
|
|
73
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
74
|
+
declare const cardContentVariants: (props?: ({
|
|
75
|
+
padding?: "none" | "default" | "sm" | "lg" | null | undefined;
|
|
76
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
77
|
+
/**
|
|
78
|
+
* CardContentProps — props for CardContent component.
|
|
79
|
+
*/
|
|
80
|
+
interface CardContentProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardContentVariants> {
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* CardContent — main content section of a Card.
|
|
84
|
+
*
|
|
85
|
+
* @usage
|
|
86
|
+
* Use CardContent to wrap card main content:
|
|
87
|
+
* card body, card main text, card details.
|
|
88
|
+
*
|
|
89
|
+
* Props:
|
|
90
|
+
* - `padding` — padding size: "none", "sm", "default", "lg" (defaults to "default").
|
|
91
|
+
*
|
|
92
|
+
* Note: Padding-top is always 0 to work seamlessly with CardHeader.
|
|
93
|
+
*/
|
|
94
|
+
declare const CardContent: React.ForwardRefExoticComponent<CardContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
95
|
+
declare const cardFooterVariants: (props?: ({
|
|
96
|
+
padding?: "none" | "default" | "sm" | "lg" | null | undefined;
|
|
97
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
98
|
+
/**
|
|
99
|
+
* CardFooterProps — props for CardFooter component.
|
|
100
|
+
*/
|
|
101
|
+
interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardFooterVariants> {
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* CardFooter — footer section of a Card.
|
|
105
|
+
*
|
|
106
|
+
* @usage
|
|
107
|
+
* Use CardFooter to wrap card actions or footer content:
|
|
108
|
+
* action buttons, links, additional information at card bottom.
|
|
109
|
+
*
|
|
110
|
+
* Props:
|
|
111
|
+
* - `padding` — padding size: "none", "sm", "default", "lg" (defaults to "default").
|
|
112
|
+
*
|
|
113
|
+
* Note: Uses flex layout to align items horizontally. Padding-top is always 0 to work seamlessly with CardContent.
|
|
114
|
+
*/
|
|
115
|
+
declare const CardFooter: React.ForwardRefExoticComponent<CardFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
116
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cardVariants, cardHeaderVariants, cardContentVariants, cardFooterVariants, };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const cardVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
5
|
-
} & import("class-variance-authority/
|
|
4
|
+
variant?: "default" | "transparent" | "interactive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface CardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
|
|
7
7
|
asChild?: boolean;
|
|
8
8
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Props for CheckboxItem component
|
|
4
|
+
*/
|
|
5
|
+
export interface CheckboxItemProps {
|
|
6
|
+
/**
|
|
7
|
+
* Whether the checkbox is checked
|
|
8
|
+
*/
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Callback when the checked state changes
|
|
12
|
+
*/
|
|
13
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the item is disabled
|
|
16
|
+
*/
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Optional className
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Children to render
|
|
24
|
+
*/
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Universal CheckboxItem component that works both inside and outside DropdownMenu context
|
|
29
|
+
*
|
|
30
|
+
* This component provides a consistent API and styling for checkbox items.
|
|
31
|
+
* When used inside DropdownMenu, wrap it with DropdownMenuCheckboxItem wrapper.
|
|
32
|
+
* When used standalone (e.g., in Dialog), use this component directly.
|
|
33
|
+
*
|
|
34
|
+
* @example Inside DropdownMenu (via wrapper):
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <DropdownMenu>
|
|
37
|
+
* <DropdownMenuContent>
|
|
38
|
+
* <DropdownMenuCheckboxItem checked={isChecked} onCheckedChange={setChecked}>
|
|
39
|
+
* Option 1
|
|
40
|
+
* </DropdownMenuCheckboxItem>
|
|
41
|
+
* </DropdownMenuContent>
|
|
42
|
+
* </DropdownMenu>
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @example Standalone (in Dialog):
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <Dialog>
|
|
48
|
+
* <DialogContent>
|
|
49
|
+
* <CheckboxItem checked={isChecked} onCheckedChange={setChecked}>
|
|
50
|
+
* Option 1
|
|
51
|
+
* </CheckboxItem>
|
|
52
|
+
* </DialogContent>
|
|
53
|
+
* </Dialog>
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare const CheckboxItem: React.ForwardRefExoticComponent<CheckboxItemProps & React.RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { TokenData } from "@gearbox-protocol/sdk";
|
|
2
|
+
import type { LocaleKeys } from "./typed-intl";
|
|
3
|
+
export interface PoolBaseAPY {
|
|
4
|
+
type: "supplyAPY" | "tokenYield";
|
|
5
|
+
apy: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ExtraRewardApy {
|
|
8
|
+
apy: number;
|
|
9
|
+
rewardToken: string;
|
|
10
|
+
rewardTokenSymbol: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ExternalAPYData {
|
|
13
|
+
/**
|
|
14
|
+
* The total value including external APY
|
|
15
|
+
*/
|
|
16
|
+
totalValue: number;
|
|
17
|
+
/**
|
|
18
|
+
* The external APY value
|
|
19
|
+
*/
|
|
20
|
+
value: number;
|
|
21
|
+
/**
|
|
22
|
+
* Name/label of the external APY source
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
/**
|
|
26
|
+
* Localization key for the external APY tooltip
|
|
27
|
+
* Will be rendered with FormattedMessageTyped with values: { name, value }
|
|
28
|
+
*/
|
|
29
|
+
tooltip?: LocaleKeys;
|
|
30
|
+
}
|
|
31
|
+
export interface CompoundAPYProps {
|
|
32
|
+
/**
|
|
33
|
+
* Total APY value (already in percent form, e.g., 5 for 5%)
|
|
34
|
+
*/
|
|
35
|
+
totalAPY: number;
|
|
36
|
+
/**
|
|
37
|
+
* Base APY array with different types
|
|
38
|
+
*/
|
|
39
|
+
baseAPY: Array<PoolBaseAPY>;
|
|
40
|
+
/**
|
|
41
|
+
* Extra/rewards APY array
|
|
42
|
+
*/
|
|
43
|
+
extraAPY: Array<ExtraRewardApy>;
|
|
44
|
+
/**
|
|
45
|
+
* External APY data (e.g., from external protocols)
|
|
46
|
+
*/
|
|
47
|
+
externalAPY?: ExternalAPYData;
|
|
48
|
+
/**
|
|
49
|
+
* Token list for displaying token symbols in tooltips
|
|
50
|
+
*/
|
|
51
|
+
tokensList?: Record<string, TokenData>;
|
|
52
|
+
/**
|
|
53
|
+
* Number of decimal places
|
|
54
|
+
* @default 2
|
|
55
|
+
*/
|
|
56
|
+
decimals?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Custom className
|
|
59
|
+
*/
|
|
60
|
+
className?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* CompoundAPY component for displaying breakdown of APY with base, extra, and external components
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```tsx
|
|
67
|
+
* <CompoundAPY
|
|
68
|
+
* totalAPY={15}
|
|
69
|
+
* baseAPY={[{ type: "supplyAPY", apy: 10 }]}
|
|
70
|
+
* extraAPY={[{ apy: 3, rewardToken: "0x...", rewardTokenSymbol: "GEAR" }]}
|
|
71
|
+
* externalAPY={{
|
|
72
|
+
* totalValue: 15,
|
|
73
|
+
* value: 2,
|
|
74
|
+
* name: "Curve",
|
|
75
|
+
* tooltip: "External APY from Curve"
|
|
76
|
+
* }}
|
|
77
|
+
* />
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
export declare function CompoundAPY({ totalAPY, baseAPY, extraAPY, externalAPY, tokensList, decimals, className, }: CompoundAPYProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CreditSessionStatus as CreditSessionStatusType } from "@gearbox-protocol/sdk";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
export interface CreditSessionStatusProps {
|
|
4
|
+
status: CreditSessionStatusType;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function CreditSessionStatus({ status, className, }: CreditSessionStatusProps): React.ReactElement;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* DescriptionProps — props for Description component.
|
|
4
|
+
*/
|
|
5
|
+
export interface DescriptionProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Description — component for displaying secondary/muted text.
|
|
9
|
+
*
|
|
10
|
+
* @usage
|
|
11
|
+
* Use Description for secondary information and hints:
|
|
12
|
+
* subtitles, helper text, additional information, muted descriptions.
|
|
13
|
+
*
|
|
14
|
+
* Props:
|
|
15
|
+
* - All standard HTML span props are supported (className, children, etc.).
|
|
16
|
+
*
|
|
17
|
+
* Note: Uses small text size (text-sm) and muted foreground color by default.
|
|
18
|
+
* Rendered as inline span element.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <Description>This is a secondary text</Description>
|
|
23
|
+
* <Description className="text-xs">Small description</Description>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function Description({ className, ...props }: DescriptionProps): import("react/jsx-runtime").JSX.Element;
|