@gearbox-protocol/permissionless-ui 1.2.33 → 1.3.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 +134 -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 +3 -4
- package/dist/cjs/components/base-link.js +61 -0
- package/dist/cjs/components/block-sync.js +117 -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/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 +141 -0
- package/dist/cjs/components/graph/graph-view.js +232 -0
- package/dist/cjs/components/graph/graph.js +636 -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 +106 -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/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 +93 -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 +37 -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/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-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/skeleton.js +56 -3
- package/dist/cjs/components/stat-badge.js +189 -0
- package/dist/cjs/components/tab-control.js +253 -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 +68 -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 +49 -0
- package/dist/cjs/hooks/use-debounce.js +67 -0
- package/dist/cjs/hooks/use-filter.js +79 -0
- package/dist/cjs/hooks/use-hf.js +62 -0
- package/dist/cjs/hooks/use-liquidation/index.js +165 -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 +50 -0
- package/dist/cjs/hooks/use-previous.js +35 -0
- package/dist/cjs/index.js +155 -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 +3 -4
- package/dist/esm/components/base-link.js +27 -0
- package/dist/esm/components/block-sync.js +98 -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/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 +117 -0
- package/dist/esm/components/graph/graph-view.js +195 -0
- package/dist/esm/components/graph/graph.js +605 -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 +82 -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/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 +75 -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 +10 -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/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-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/skeleton.js +54 -2
- package/dist/esm/components/stat-badge.js +155 -0
- package/dist/esm/components/tab-control.js +215 -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 +69 -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 +25 -0
- package/dist/esm/hooks/use-debounce.js +42 -0
- package/dist/esm/hooks/use-filter.js +51 -0
- package/dist/esm/hooks/use-hf.js +38 -0
- package/dist/esm/hooks/use-liquidation/index.js +146 -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 +23 -0
- package/dist/esm/hooks/use-previous.js +11 -0
- package/dist/esm/index.js +83 -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 +38 -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 +9 -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/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 +51 -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 +70 -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 +54 -10
- 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,198 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import type { GraphProps } from "./graph";
|
|
4
|
+
declare const graphViewVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "ghost" | "elevated" | "outlined" | null | undefined;
|
|
6
|
+
size?: "full" | "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
7
|
+
padding?: "none" | "default" | "sm" | "lg" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
/**
|
|
10
|
+
* GraphView component props
|
|
11
|
+
*/
|
|
12
|
+
export interface GraphViewProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof graphViewVariants> {
|
|
13
|
+
/**
|
|
14
|
+
* Optional title to display above the graph
|
|
15
|
+
*/
|
|
16
|
+
title?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional description or subtitle
|
|
19
|
+
*/
|
|
20
|
+
description?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Optional toolbar or actions to display in the header
|
|
23
|
+
*/
|
|
24
|
+
toolbar?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Optional loading state
|
|
27
|
+
*/
|
|
28
|
+
loading?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Optional empty state message
|
|
31
|
+
*/
|
|
32
|
+
emptyMessage?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Optional error message
|
|
35
|
+
*/
|
|
36
|
+
error?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* GraphViewWithData props - extends GraphView with actual chart data
|
|
40
|
+
*/
|
|
41
|
+
export interface GraphViewWithDataProps extends Omit<GraphProps, "series">, Pick<GraphViewProps, "title" | "description" | "toolbar" | "emptyMessage" | "error"> {
|
|
42
|
+
/** Series configuration - can be single or multiple series */
|
|
43
|
+
series: GraphProps["series"];
|
|
44
|
+
/** Function to call when series is unselected from legend */
|
|
45
|
+
onUnselectSeries?: GraphProps["onUnselectSeries"];
|
|
46
|
+
loading: boolean;
|
|
47
|
+
containerClassName?: string;
|
|
48
|
+
variant?: GraphViewProps["variant"];
|
|
49
|
+
size?: GraphViewProps["size"];
|
|
50
|
+
padding?: GraphViewProps["padding"];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* GraphView component for displaying graphs, charts, and visualizations
|
|
54
|
+
*
|
|
55
|
+
* This is a container component that provides layout, loading states, and error handling
|
|
56
|
+
* for chart content. Use GraphViewWithData for a complete chart with data integration.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* // Basic usage
|
|
61
|
+
* <GraphView>
|
|
62
|
+
* <YourGraphComponent />
|
|
63
|
+
* </GraphView>
|
|
64
|
+
*
|
|
65
|
+
* // With title and description
|
|
66
|
+
* <GraphView
|
|
67
|
+
* title="Network Activity"
|
|
68
|
+
* description="Last 24 hours"
|
|
69
|
+
* >
|
|
70
|
+
* <NetworkGraph />
|
|
71
|
+
* </GraphView>
|
|
72
|
+
*
|
|
73
|
+
* // With toolbar
|
|
74
|
+
* <GraphView
|
|
75
|
+
* title="Performance Metrics"
|
|
76
|
+
* toolbar={
|
|
77
|
+
* <div className="flex gap-2">
|
|
78
|
+
* <Button size="sm">Refresh</Button>
|
|
79
|
+
* <Button size="sm" variant="outline">Export</Button>
|
|
80
|
+
* </div>
|
|
81
|
+
* }
|
|
82
|
+
* >
|
|
83
|
+
* <PerformanceChart />
|
|
84
|
+
* </GraphView>
|
|
85
|
+
*
|
|
86
|
+
* // Different sizes
|
|
87
|
+
* <GraphView size="lg">
|
|
88
|
+
* <LargeGraph />
|
|
89
|
+
* </GraphView>
|
|
90
|
+
*
|
|
91
|
+
* // Loading state
|
|
92
|
+
* <GraphView loading title="Loading...">
|
|
93
|
+
* <GraphSkeleton />
|
|
94
|
+
* </GraphView>
|
|
95
|
+
*
|
|
96
|
+
* // Empty state
|
|
97
|
+
* <GraphView emptyMessage="No data available">
|
|
98
|
+
* {null}
|
|
99
|
+
* </GraphView>
|
|
100
|
+
*
|
|
101
|
+
* // Error state
|
|
102
|
+
* <GraphView error="Failed to load data">
|
|
103
|
+
* {null}
|
|
104
|
+
* </GraphView>
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
declare const GraphView: React.ForwardRefExoticComponent<GraphViewProps & React.RefAttributes<HTMLDivElement>>;
|
|
108
|
+
/**
|
|
109
|
+
* GraphViewWithData component integrates GraphView container with Graph chart
|
|
110
|
+
*
|
|
111
|
+
* This component combines the container features of GraphView with the charting
|
|
112
|
+
* capabilities of Graph, providing a complete solution for data visualization.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```tsx
|
|
116
|
+
* // Basic usage with single series
|
|
117
|
+
* <GraphViewWithData
|
|
118
|
+
* series={[{ data: chartData, label: "Price" }]}
|
|
119
|
+
* loading={isLoading}
|
|
120
|
+
* graphId="my-chart"
|
|
121
|
+
* title="Price History"
|
|
122
|
+
* description="Last 30 days"
|
|
123
|
+
* yMeasureUnit="$"
|
|
124
|
+
* xMeasureUnit="time"
|
|
125
|
+
* />
|
|
126
|
+
*
|
|
127
|
+
* // Multiple series with legend
|
|
128
|
+
* <GraphViewWithData
|
|
129
|
+
* series={[
|
|
130
|
+
* { data: series1, label: "Series 1" },
|
|
131
|
+
* { data: series2, label: "Series 2" },
|
|
132
|
+
* { data: series3, label: "Series 3" }
|
|
133
|
+
* ]}
|
|
134
|
+
* loading={isLoading}
|
|
135
|
+
* graphId="my-chart"
|
|
136
|
+
* showLegend={true}
|
|
137
|
+
* title="Multiple Metrics"
|
|
138
|
+
* />
|
|
139
|
+
*
|
|
140
|
+
* // With vertical line markers
|
|
141
|
+
* <GraphViewWithData
|
|
142
|
+
* series={[{ data: chartData, label: "Price" }]}
|
|
143
|
+
* loading={false}
|
|
144
|
+
* graphId="my-chart"
|
|
145
|
+
* verticalLineOptions={[
|
|
146
|
+
* {
|
|
147
|
+
* xCoordinate: someTimestamp,
|
|
148
|
+
* options: {
|
|
149
|
+
* labelText: "Important Event",
|
|
150
|
+
* color: "hsl(var(--primary))",
|
|
151
|
+
* }
|
|
152
|
+
* }
|
|
153
|
+
* ]}
|
|
154
|
+
* />
|
|
155
|
+
*
|
|
156
|
+
* // Empty state
|
|
157
|
+
* <GraphViewWithData
|
|
158
|
+
* series={[]}
|
|
159
|
+
* loading={false}
|
|
160
|
+
* graphId="my-chart"
|
|
161
|
+
* emptyMessage="No data available"
|
|
162
|
+
* />
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
export declare function GraphViewWithData({ series, onUnselectSeries, loading, title, description, toolbar, emptyMessage, error, containerClassName, variant, size, padding, ...restProps }: GraphViewWithDataProps): React.ReactElement;
|
|
166
|
+
/**
|
|
167
|
+
* Custom hook to manage graph sizing with an aside element
|
|
168
|
+
*
|
|
169
|
+
* This hook helps calculate the available width for a graph when there's
|
|
170
|
+
* an aside element (like a legend or info panel) next to it.
|
|
171
|
+
*
|
|
172
|
+
* @param gap - The gap in pixels between the graph and aside element
|
|
173
|
+
* @returns Object containing graphWidth, parentRef, and asideRef
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```tsx
|
|
177
|
+
* function MyChart() {
|
|
178
|
+
* const { graphWidth, parentRef, asideRef } = useGraphAside(16);
|
|
179
|
+
*
|
|
180
|
+
* return (
|
|
181
|
+
* <div ref={parentRef} className="flex gap-4">
|
|
182
|
+
* <div style={{ width: graphWidth }}>
|
|
183
|
+
* <GraphViewWithData {...props} />
|
|
184
|
+
* </div>
|
|
185
|
+
* <aside ref={asideRef}>
|
|
186
|
+
* Legend content
|
|
187
|
+
* </aside>
|
|
188
|
+
* </div>
|
|
189
|
+
* );
|
|
190
|
+
* }
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
export declare function useGraphAside(gap?: number): {
|
|
194
|
+
graphWidth: number | null;
|
|
195
|
+
parentRef: React.RefObject<HTMLDivElement | null>;
|
|
196
|
+
asideRef: React.RefObject<HTMLDivElement | null>;
|
|
197
|
+
};
|
|
198
|
+
export { GraphView, graphViewVariants };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ChartOptions, DeepPartial, Time } from "lightweight-charts";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import type { Point, YMeasureUnits } from "./formatters";
|
|
4
|
+
import type { GraphTooltipProps } from "./graph-tooltip";
|
|
5
|
+
export interface SeriesConfig {
|
|
6
|
+
data: Array<Point>;
|
|
7
|
+
label: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
topColor?: string;
|
|
10
|
+
bottomColor?: string;
|
|
11
|
+
yMeasureUnit?: YMeasureUnits;
|
|
12
|
+
}
|
|
13
|
+
type VerticalLineOptions = Partial<{
|
|
14
|
+
color: string;
|
|
15
|
+
labelText: string;
|
|
16
|
+
width: number;
|
|
17
|
+
labelBackgroundColor: string;
|
|
18
|
+
labelTextColor: string;
|
|
19
|
+
showLabel: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const DEFAULT_SERIES_COLORS: {
|
|
22
|
+
line: string;
|
|
23
|
+
top: string;
|
|
24
|
+
bottom: string;
|
|
25
|
+
}[];
|
|
26
|
+
export interface GraphProps {
|
|
27
|
+
/** Series configuration - can be single or multiple series */
|
|
28
|
+
series: Array<SeriesConfig>;
|
|
29
|
+
graphId: string;
|
|
30
|
+
className?: string;
|
|
31
|
+
/** Show legend */
|
|
32
|
+
showLegend?: boolean;
|
|
33
|
+
/** Function to call when series is unselected from legend */
|
|
34
|
+
onUnselectSeries?: (label: string) => void;
|
|
35
|
+
yMeasureUnit?: GraphTooltipProps["yMeasureUnit"];
|
|
36
|
+
xMeasureUnit?: GraphTooltipProps["xMeasureUnit"];
|
|
37
|
+
optionsOverrides?: DeepPartial<ChartOptions>;
|
|
38
|
+
verticalLineOptions?: Array<{
|
|
39
|
+
xCoordinate: Time;
|
|
40
|
+
options?: VerticalLineOptions;
|
|
41
|
+
}>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Graph component that renders a chart using lightweight-charts library
|
|
45
|
+
* with support for area series, custom tooltips, and vertical line annotations
|
|
46
|
+
* Supports single or multiple series with different colors and legends
|
|
47
|
+
*/
|
|
48
|
+
export declare function Graph({ series, graphId, className, showLegend, onUnselectSeries, xMeasureUnit, yMeasureUnit, optionsOverrides, verticalLineOptions, }: GraphProps): React.ReactElement;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./default-config";
|
|
2
|
+
export { getXFormatter, getYFormatter, type Point as GraphPoint, type XMeasureUnits, type YMeasureUnits, } from "./formatters";
|
|
3
|
+
export * from "./graph";
|
|
4
|
+
export * from "./graph-current-value";
|
|
5
|
+
export * from "./graph-tooltip";
|
|
6
|
+
export * from "./graph-view";
|
|
7
|
+
export { VertLine } from "./plugins/vertical-line";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* GuardProps — props for Guard component.
|
|
4
|
+
*/
|
|
5
|
+
export interface GuardProps {
|
|
6
|
+
showGuard: boolean;
|
|
7
|
+
guard: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Guard — conditional rendering wrapper component.
|
|
11
|
+
*
|
|
12
|
+
* @usage
|
|
13
|
+
* Use Guard to conditionally render content based on a boolean condition:
|
|
14
|
+
* loading states, conditional content display, guard clauses, protected content.
|
|
15
|
+
*
|
|
16
|
+
* Props:
|
|
17
|
+
* - `showGuard` — if true, renders guard instead of children (required).
|
|
18
|
+
* - `guard` — content to render when showGuard is true (required).
|
|
19
|
+
* - `children` — content to render when showGuard is false (required).
|
|
20
|
+
*
|
|
21
|
+
* Note: Simple conditional rendering wrapper that helps avoid ternary operators in JSX.
|
|
22
|
+
* When showGuard is true, renders guard; otherwise renders children.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <Guard
|
|
27
|
+
* showGuard={isLoading}
|
|
28
|
+
* guard={<Loader />}
|
|
29
|
+
* >
|
|
30
|
+
* <Content />
|
|
31
|
+
* </Guard>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function Guard({ showGuard, guard, children, }: React.PropsWithChildren<GuardProps>): React.ReactElement;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type HFZones = "good" | "medium" | "bad" | "critical" | "liquidation";
|
|
3
|
+
export declare const GOOD_HF = 15000;
|
|
4
|
+
export declare const BAD_HF = 11000;
|
|
5
|
+
/**
|
|
6
|
+
* Determines the health factor zone based on the value
|
|
7
|
+
* @param hf - Health factor value (in basis points if >= 1000, otherwise as decimal)
|
|
8
|
+
* @returns The health factor zone or undefined
|
|
9
|
+
*/
|
|
10
|
+
export declare const getHFZones: (hf: number | bigint | undefined) => HFZones | undefined;
|
|
11
|
+
export interface HealthFactorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
/**
|
|
13
|
+
* The health factor value
|
|
14
|
+
* Can be provided as:
|
|
15
|
+
* - Decimal value (e.g., 1.5 for 150%)
|
|
16
|
+
* - Basis points (e.g., 15000 for 150%)
|
|
17
|
+
* Values >= 1000 are treated as basis points, < 1000 as decimal
|
|
18
|
+
*/
|
|
19
|
+
value: number | bigint;
|
|
20
|
+
/**
|
|
21
|
+
* Debt amount in base units (bigint)
|
|
22
|
+
* If debt is 0, component will display "N/A"
|
|
23
|
+
*/
|
|
24
|
+
debt?: bigint;
|
|
25
|
+
/**
|
|
26
|
+
* Number of decimal places to show
|
|
27
|
+
* @default 3
|
|
28
|
+
*/
|
|
29
|
+
decimals?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Pre-computed zone (optional). If not provided, will be calculated from value
|
|
32
|
+
*/
|
|
33
|
+
zone?: HFZones | null;
|
|
34
|
+
/**
|
|
35
|
+
* Show color indicator based on health factor zone
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
showColor?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* HealthFactor component for displaying health factor values with zone-based color coding
|
|
42
|
+
*
|
|
43
|
+
* Health factor zones:
|
|
44
|
+
* - good: >= 1.5 (15000 basis points) - Green
|
|
45
|
+
* - medium: 1.1 - 1.5 (11000-15000) - Yellow
|
|
46
|
+
* - bad: 1.05 - 1.1 (10500-11000) - Orange
|
|
47
|
+
* - critical: 1.0 - 1.05 (10000-10500) - Red
|
|
48
|
+
* - liquidation: < 1.0 (< 10000) - Red
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```tsx
|
|
52
|
+
* // Using decimal value
|
|
53
|
+
* <HealthFactor value={1.5} debt={1000000n} /> // Shows "1.500" in green
|
|
54
|
+
* <HealthFactor value={1.2} debt={1000000n} decimals={2} /> // Shows "1.20" in yellow
|
|
55
|
+
*
|
|
56
|
+
* // Using basis points
|
|
57
|
+
* <HealthFactor value={15000} debt={1000000n} /> // Shows "1.500" in green
|
|
58
|
+
*
|
|
59
|
+
* // Zero debt shows N/A
|
|
60
|
+
* <HealthFactor value={1.5} debt={0n} /> // Shows "N/A"
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare function HealthFactor({ value, debt, decimals, zone, showColor, className, ...props }: HealthFactorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { BlockSyncProps } from "../types/footer";
|
|
3
|
+
export interface HelpCenterContainerProps {
|
|
4
|
+
blockSyncProps: BlockSyncProps;
|
|
5
|
+
gapFromFooter: number;
|
|
6
|
+
footerHeight: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* HelpCenterContainer - displays network sync status
|
|
10
|
+
* On desktop: fixed position in bottom-right corner, dynamically adjusts to stay above footer
|
|
11
|
+
* On mobile: static position, rendered inside footer
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <HelpCenterContainer
|
|
16
|
+
* blockSyncProps={blockSyncProps}
|
|
17
|
+
* footerHeight={108}
|
|
18
|
+
* gapFromFooter={8}
|
|
19
|
+
* />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function HelpCenterContainer({ blockSyncProps, footerHeight, gapFromFooter, }: HelpCenterContainerProps): React.ReactElement;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export type MediaWidthClasses = "small" | "medium" | "large" | "xlarge";
|
|
3
|
+
export interface HideOnProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
$breakpoint: MediaWidthClasses;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* HideOn - Hide content on specified breakpoint and above
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <HideOn $breakpoint="small">
|
|
13
|
+
* <div>Hidden on small screens and above</div>
|
|
14
|
+
* </HideOn>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function HideOn({ $breakpoint, children, className, ...props }: HideOnProps): React.ReactElement;
|
|
18
|
+
export interface ShowOnProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
19
|
+
$breakpoint: MediaWidthClasses;
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* ShowOn - Show content on specified breakpoint and above
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <ShowOn $breakpoint="medium">
|
|
28
|
+
* <div>Shown on medium screens and above</div>
|
|
29
|
+
* </ShowOn>
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function ShowOn({ $breakpoint, children, className, ...props }: ShowOnProps): React.ReactElement;
|
|
@@ -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).
|