@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,28 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export interface PercentIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* The percentage value (already in percent form, e.g., 75 for 75%)
|
|
5
|
+
*/
|
|
6
|
+
percent: number;
|
|
7
|
+
/**
|
|
8
|
+
* Number of decimal places to show
|
|
9
|
+
* @default 2
|
|
10
|
+
*/
|
|
11
|
+
decimals?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Show color indicator based on percentage
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
showColor?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* PercentIndicator component for displaying percentage values with optional color coding
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <PercentIndicator percent={75} /> // Shows "75.00%"
|
|
24
|
+
* <PercentIndicator percent={50} decimals={1} /> // Shows "50.0%"
|
|
25
|
+
* <PercentIndicator percent={95} showColor={false} /> // No color coding
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function PercentIndicator({ percent, decimals, showColor, className, ...props }: PercentIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
export type PoolPointsColor = "primary" | "secondary" | "green" | "blue" | "yellow";
|
|
3
|
+
export interface PoolPointsIndicatorProps {
|
|
4
|
+
/**
|
|
5
|
+
* Size of the token icon in pixels
|
|
6
|
+
* @default 24
|
|
7
|
+
*/
|
|
8
|
+
size?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Color of the border and indicator
|
|
11
|
+
* @default "primary"
|
|
12
|
+
*/
|
|
13
|
+
color?: PoolPointsColor;
|
|
14
|
+
/**
|
|
15
|
+
* Custom className
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* PoolPointsIndicator component - wrapper that adds a circular border and indicator
|
|
21
|
+
* around a TokenIcon (or any children) to show pool points
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* // Basic usage with TokenIcon
|
|
26
|
+
* <PoolPointsIndicator size={24}>
|
|
27
|
+
* <TokenIcon symbol="ETH" size={24} />
|
|
28
|
+
* </PoolPointsIndicator>
|
|
29
|
+
*
|
|
30
|
+
* // With custom color
|
|
31
|
+
* <PoolPointsIndicator size={24} color="green">
|
|
32
|
+
* <TokenIcon symbol="USDC" size={24} />
|
|
33
|
+
* </PoolPointsIndicator>
|
|
34
|
+
*
|
|
35
|
+
* // Secondary color
|
|
36
|
+
* <PoolPointsIndicator size={32} color="secondary">
|
|
37
|
+
* <TokenIcon symbol="DAI" size={32} />
|
|
38
|
+
* </PoolPointsIndicator>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function PoolPointsIndicator({ size, color, className, children, }: PropsWithChildren<PoolPointsIndicatorProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const searchLineVariants: (props?: ({
|
|
4
|
+
size?: "full" | "default" | "sm" | "lg" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare const searchLineInputVariants: (props?: ({
|
|
7
|
+
active?: boolean | null | undefined;
|
|
8
|
+
theme?: "dark" | "light" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
export interface SearchLineState {
|
|
11
|
+
value: string;
|
|
12
|
+
handleInput: (ev: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
+
handleSubmit: (ev: {
|
|
14
|
+
preventDefault: () => void;
|
|
15
|
+
}) => void;
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface SearchLineProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSubmit">, VariantProps<typeof searchLineVariants> {
|
|
19
|
+
/**
|
|
20
|
+
* Search state object containing value, handlers, and loading state
|
|
21
|
+
*/
|
|
22
|
+
searchState: SearchLineState;
|
|
23
|
+
/**
|
|
24
|
+
* Placeholder text for the search input
|
|
25
|
+
*/
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Theme variant
|
|
29
|
+
*/
|
|
30
|
+
theme?: "light" | "dark";
|
|
31
|
+
/**
|
|
32
|
+
* Whether to show the search icon on the left
|
|
33
|
+
*/
|
|
34
|
+
showSearchIcon?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Custom icon to show when active (default: ArrowRight)
|
|
37
|
+
*/
|
|
38
|
+
customIcon?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Callback when the search is submitted
|
|
41
|
+
*/
|
|
42
|
+
onSubmit?: (value: string) => void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* SearchLine component with animated states and submit functionality
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* // Basic usage with search state
|
|
50
|
+
* const [value, setValue] = useState("");
|
|
51
|
+
* const searchState = {
|
|
52
|
+
* value,
|
|
53
|
+
* handleInput: (e) => setValue(e.target.value),
|
|
54
|
+
* handleSubmit: (e) => {
|
|
55
|
+
* e.preventDefault();
|
|
56
|
+
* console.log("Search:", value);
|
|
57
|
+
* },
|
|
58
|
+
* loading: false,
|
|
59
|
+
* };
|
|
60
|
+
*
|
|
61
|
+
* <SearchLine searchState={searchState} placeholder="Search..." />
|
|
62
|
+
*
|
|
63
|
+
* // With loading state
|
|
64
|
+
* <SearchLine
|
|
65
|
+
* searchState={{ ...searchState, loading: true }}
|
|
66
|
+
* theme="dark"
|
|
67
|
+
* />
|
|
68
|
+
*
|
|
69
|
+
* // Full width
|
|
70
|
+
* <SearchLine
|
|
71
|
+
* searchState={searchState}
|
|
72
|
+
* size="full"
|
|
73
|
+
* showSearchIcon
|
|
74
|
+
* />
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export declare const SearchLine: React.ForwardRefExoticComponent<SearchLineProps & React.RefAttributes<HTMLDivElement>>;
|
|
78
|
+
/**
|
|
79
|
+
* Props for WithSearchLine component
|
|
80
|
+
*/
|
|
81
|
+
export interface WithSearchLineProps {
|
|
82
|
+
/**
|
|
83
|
+
* Search state object
|
|
84
|
+
*/
|
|
85
|
+
searchState: SearchLineState;
|
|
86
|
+
/**
|
|
87
|
+
* Placeholder text for the search input
|
|
88
|
+
*/
|
|
89
|
+
placeholder?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Theme variant
|
|
92
|
+
*/
|
|
93
|
+
theme?: "light" | "dark";
|
|
94
|
+
/**
|
|
95
|
+
* Content to display alongside the search line
|
|
96
|
+
*/
|
|
97
|
+
children: React.ReactNode;
|
|
98
|
+
/**
|
|
99
|
+
* Additional class name for the container
|
|
100
|
+
*/
|
|
101
|
+
className?: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* WithSearchLine component that combines content with a search line
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```tsx
|
|
108
|
+
* <WithSearchLine
|
|
109
|
+
* searchState={searchState}
|
|
110
|
+
* placeholder="Search items..."
|
|
111
|
+
* >
|
|
112
|
+
* <h2>Items List</h2>
|
|
113
|
+
* </WithSearchLine>
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
export declare const WithSearchLine: React.ForwardRefExoticComponent<WithSearchLineProps & React.RefAttributes<HTMLDivElement>>;
|
|
117
|
+
export { searchLineVariants, searchLineInputVariants };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
/**
|
|
4
5
|
* Select — dropdown select component and its subcomponents.
|
|
@@ -29,11 +30,17 @@ import * as React from "react";
|
|
|
29
30
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
30
31
|
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
32
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
32
|
-
declare const
|
|
33
|
+
declare const selectTriggerVariants: (props?: ({
|
|
34
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
35
|
+
variant?: "default" | "error" | "success" | null | undefined;
|
|
36
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
37
|
+
interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, VariantProps<typeof selectTriggerVariants> {
|
|
38
|
+
}
|
|
39
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
33
40
|
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
34
41
|
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
35
42
|
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
36
43
|
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
37
44
|
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
38
45
|
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
46
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, selectTriggerVariants, };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* ShortStringProps — props for ShortString component.
|
|
4
|
+
*/
|
|
5
|
+
export interface ShortStringProps {
|
|
6
|
+
children: string;
|
|
7
|
+
maxLength?: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
showTooltip?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* ShortString — component for truncating text with tooltip showing full content.
|
|
13
|
+
*
|
|
14
|
+
* @usage
|
|
15
|
+
* Use ShortString to display long text in limited space:
|
|
16
|
+
* long addresses, file names, descriptions, text overflow handling.
|
|
17
|
+
*
|
|
18
|
+
* Props:
|
|
19
|
+
* - `children` — text content to display (required).
|
|
20
|
+
* - `maxLength` — maximum character length before truncation (if not provided, uses CSS text-overflow).
|
|
21
|
+
* - `className` — additional CSS classes for styling.
|
|
22
|
+
* - `showTooltip` — whether to show tooltip with full text on hover (defaults to true).
|
|
23
|
+
*
|
|
24
|
+
* Note: If maxLength is not provided, uses CSS text-overflow with ellipsis.
|
|
25
|
+
* If maxLength is provided, truncates text with JavaScript and adds "..." suffix.
|
|
26
|
+
* Tooltip shows full text content on hover when enabled.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <ShortString maxLength={20}>
|
|
31
|
+
* This is a very long string that will be truncated
|
|
32
|
+
* </ShortString>
|
|
33
|
+
*
|
|
34
|
+
* <ShortString>
|
|
35
|
+
* This will be truncated with CSS text-overflow
|
|
36
|
+
* </ShortString>
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function ShortString({ children, maxLength, className, showTooltip, }: ShortStringProps): React.ReactElement;
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
declare const skeletonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "lighter" | "darker" | null | undefined;
|
|
5
|
+
speed?: "default" | "slow" | "fast" | null | undefined;
|
|
6
|
+
width?: "full" | "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | "3/4" | "1/2" | "1/3" | "1/4" | null | undefined;
|
|
7
|
+
height?: "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
1
9
|
/**
|
|
2
|
-
*
|
|
10
|
+
* SkeletonProps — props for Skeleton component.
|
|
11
|
+
*/
|
|
12
|
+
interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof skeletonVariants> {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Skeleton — loading placeholder component with pulse animation.
|
|
3
16
|
*
|
|
4
17
|
* @usage
|
|
5
18
|
* Use Skeleton to display loading placeholders:
|
|
6
19
|
* content loading states, data fetching indicators, placeholder animations.
|
|
7
20
|
*
|
|
8
21
|
* Props:
|
|
22
|
+
* - `variant` — visual variant: "default", "lighter", "darker" (defaults to "default").
|
|
23
|
+
* - `speed` — animation speed: "slow", "default", "fast" (defaults to "default").
|
|
24
|
+
* - `width` — width preset: "full", "3/4", "1/2", "1/3", "1/4", "xs", "sm", "md", "lg", "xl", "2xl" (defaults to "full").
|
|
25
|
+
* - `height` — height preset: "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl" (defaults to "md").
|
|
9
26
|
* - All standard HTML div props are supported (className, style, etc.).
|
|
10
27
|
*
|
|
11
28
|
* Note: Uses pulse animation and muted background color.
|
|
@@ -15,6 +32,14 @@
|
|
|
15
32
|
* Do NOT use Skeleton:
|
|
16
33
|
* - for error states (use appropriate error components).
|
|
17
34
|
* - for empty states (use appropriate empty state components).
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <Skeleton />
|
|
39
|
+
* <Skeleton width="1/2" height="sm" />
|
|
40
|
+
* <Skeleton variant="lighter" width="md" height="lg" />
|
|
41
|
+
* <Skeleton speed="fast" width="sm" height="xl" className="rounded-full" />
|
|
42
|
+
* ```
|
|
18
43
|
*/
|
|
19
|
-
declare function Skeleton({ className, ...props }:
|
|
20
|
-
export { Skeleton };
|
|
44
|
+
declare function Skeleton({ className, variant, speed, width, height, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export { Skeleton, skeletonVariants };
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const statBadgeVariants: (props?: ({
|
|
4
|
+
variant?: "primary" | "filled" | "elevated" | "outlined" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare const statBadgeTitleVariants: (props?: ({
|
|
8
|
+
size?: "default" | "sm" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
declare const statBadgeContentVariants: (props?: ({
|
|
11
|
+
size?: "default" | "sm" | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
+
export interface DeltaProps {
|
|
14
|
+
/**
|
|
15
|
+
* Label to show before the delta value
|
|
16
|
+
*/
|
|
17
|
+
label?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Delta value (percentage or number)
|
|
20
|
+
*/
|
|
21
|
+
value: number;
|
|
22
|
+
/**
|
|
23
|
+
* Tooltip content for the delta
|
|
24
|
+
*/
|
|
25
|
+
tooltip?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Custom icon for positive delta
|
|
28
|
+
*/
|
|
29
|
+
positiveIcon?: React.ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Custom icon for negative delta
|
|
32
|
+
*/
|
|
33
|
+
negativeIcon?: React.ReactNode;
|
|
34
|
+
}
|
|
35
|
+
export interface StatBadgeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof statBadgeVariants> {
|
|
36
|
+
/**
|
|
37
|
+
* Title/label of the stat
|
|
38
|
+
*/
|
|
39
|
+
title: React.ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Main value to display
|
|
42
|
+
*/
|
|
43
|
+
value: React.ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Optional description for the value
|
|
46
|
+
*/
|
|
47
|
+
valueDescription?: React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Optional delta configuration
|
|
50
|
+
*/
|
|
51
|
+
delta?: DeltaProps;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* StatBadge component for displaying statistics and metrics with optional delta indicators
|
|
55
|
+
*
|
|
56
|
+
* **Note:** If using delta tooltips, wrap your app with `<TooltipProvider>` from the tooltip component.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* // Basic usage
|
|
61
|
+
* <StatBadge
|
|
62
|
+
* title="Total Value"
|
|
63
|
+
* value="$1,234.56"
|
|
64
|
+
* />
|
|
65
|
+
*
|
|
66
|
+
* // With description
|
|
67
|
+
* <StatBadge
|
|
68
|
+
* title="APY"
|
|
69
|
+
* value="12.5"
|
|
70
|
+
* valueDescription="%"
|
|
71
|
+
* />
|
|
72
|
+
*
|
|
73
|
+
* // With delta (positive change)
|
|
74
|
+
* <StatBadge
|
|
75
|
+
* title="Revenue"
|
|
76
|
+
* value="$10,000"
|
|
77
|
+
* delta={{
|
|
78
|
+
* label: "+15.5%",
|
|
79
|
+
* value: 15.5,
|
|
80
|
+
* }}
|
|
81
|
+
* />
|
|
82
|
+
*
|
|
83
|
+
* // With delta and tooltip (requires TooltipProvider)
|
|
84
|
+
* <TooltipProvider>
|
|
85
|
+
* <StatBadge
|
|
86
|
+
* title="Revenue"
|
|
87
|
+
* value="$10,000"
|
|
88
|
+
* delta={{
|
|
89
|
+
* label: "+15.5%",
|
|
90
|
+
* value: 15.5,
|
|
91
|
+
* tooltip: "15.5% increase from last month"
|
|
92
|
+
* }}
|
|
93
|
+
* />
|
|
94
|
+
* </TooltipProvider>
|
|
95
|
+
*
|
|
96
|
+
* // Small size with outlined variant
|
|
97
|
+
* <StatBadge
|
|
98
|
+
* title="Users"
|
|
99
|
+
* value="1,234"
|
|
100
|
+
* size="sm"
|
|
101
|
+
* variant="outlined"
|
|
102
|
+
* />
|
|
103
|
+
*
|
|
104
|
+
* // Primary variant
|
|
105
|
+
* <StatBadge
|
|
106
|
+
* title="Active Sessions"
|
|
107
|
+
* value="42"
|
|
108
|
+
* variant="primary"
|
|
109
|
+
* />
|
|
110
|
+
*
|
|
111
|
+
* // Negative delta
|
|
112
|
+
* <StatBadge
|
|
113
|
+
* title="Errors"
|
|
114
|
+
* value="12"
|
|
115
|
+
* delta={{
|
|
116
|
+
* label: "-25%",
|
|
117
|
+
* value: -25,
|
|
118
|
+
* }}
|
|
119
|
+
* />
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
export declare const StatBadge: React.ForwardRefExoticComponent<StatBadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
123
|
+
declare const statBadgeGridVariants: (props?: ({
|
|
124
|
+
cols?: 2 | 1 | 3 | 5 | 4 | 6 | null | undefined;
|
|
125
|
+
gap?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
126
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
127
|
+
export interface StatBadgeGridProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof statBadgeGridVariants> {
|
|
128
|
+
/**
|
|
129
|
+
* Number of columns in the grid (responsive breakpoints applied automatically)
|
|
130
|
+
*/
|
|
131
|
+
cols?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
132
|
+
/**
|
|
133
|
+
* Gap size between grid items
|
|
134
|
+
*/
|
|
135
|
+
gap?: "sm" | "default" | "lg" | "xl";
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* StatBadgeGrid component for displaying multiple stat badges in a responsive grid layout
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```tsx
|
|
142
|
+
* // Default 4 columns (1 on mobile, 2 on tablet, 3 on desktop, 4 on xl)
|
|
143
|
+
* <StatBadgeGrid>
|
|
144
|
+
* <StatBadge title="Total Value" value="$1,234.56" />
|
|
145
|
+
* <StatBadge title="APY" value="12.5%" />
|
|
146
|
+
* <StatBadge title="Users" value="1,234" />
|
|
147
|
+
* </StatBadgeGrid>
|
|
148
|
+
*
|
|
149
|
+
* // 3 columns layout
|
|
150
|
+
* <StatBadgeGrid cols={3}>
|
|
151
|
+
* <StatBadge title="Revenue" value="$10,000" />
|
|
152
|
+
* <StatBadge title="Users" value="1,234" />
|
|
153
|
+
* <StatBadge title="Sessions" value="42" />
|
|
154
|
+
* </StatBadgeGrid>
|
|
155
|
+
*
|
|
156
|
+
* // 2 columns with large gap
|
|
157
|
+
* <StatBadgeGrid cols={2} gap="lg">
|
|
158
|
+
* <StatBadge title="Active" value="123" />
|
|
159
|
+
* <StatBadge title="Inactive" value="45" />
|
|
160
|
+
* </StatBadgeGrid>
|
|
161
|
+
*
|
|
162
|
+
* // Single column
|
|
163
|
+
* <StatBadgeGrid cols={1}>
|
|
164
|
+
* <StatBadge title="Total" value="$1,000" />
|
|
165
|
+
* </StatBadgeGrid>
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
export declare const StatBadgeGrid: React.ForwardRefExoticComponent<StatBadgeGridProps & React.RefAttributes<HTMLDivElement>>;
|
|
169
|
+
export { statBadgeVariants, statBadgeTitleVariants, statBadgeContentVariants, statBadgeGridVariants, };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface TabControl<T extends string> {
|
|
2
|
+
item: React.ReactNode;
|
|
3
|
+
id: T;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface TabControlProps<T extends string> {
|
|
7
|
+
tabs: Array<TabControl<T>>;
|
|
8
|
+
state: UseTabControlReturnType<T>;
|
|
9
|
+
showBorder?: boolean;
|
|
10
|
+
variant?: "equal" | "auto";
|
|
11
|
+
tabItemWrapPadding?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function TabControl<T extends string>({ tabs, state: controlState, variant, showBorder, tabItemWrapPadding, }: TabControlProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
interface TabItemProps {
|
|
15
|
+
icon?: React.ReactNode;
|
|
16
|
+
label: React.ReactNode;
|
|
17
|
+
amount?: number;
|
|
18
|
+
selected: boolean;
|
|
19
|
+
textSize?: "default" | "unset";
|
|
20
|
+
}
|
|
21
|
+
export declare function TabItem({ icon, label, selected, textSize, amount, }: TabItemProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
interface UseTabControlReturnType<T extends string> {
|
|
23
|
+
id: T;
|
|
24
|
+
index: number;
|
|
25
|
+
handleTabChange: (id: T, index: number) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare function useTabControl<T extends string>(initialId: T, initialIndex?: number): UseTabControlReturnType<T>;
|
|
28
|
+
export interface LocationHashItem<T extends string> {
|
|
29
|
+
id: T;
|
|
30
|
+
}
|
|
31
|
+
type UsePathTabsReturnType<T extends string> = Partial<Omit<UseTabControlReturnType<T>, "handleTabChange">> & Pick<UseTabControlReturnType<T>, "handleTabChange">;
|
|
32
|
+
export declare function useHashTabs<T extends string>(tabs: Array<LocationHashItem<T>>): UsePathTabsReturnType<T>;
|
|
33
|
+
interface UseSectionTabProps<T extends string> {
|
|
34
|
+
defaultTabs: Array<TabControl<T>>;
|
|
35
|
+
pathRoot: string;
|
|
36
|
+
selectedSection: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function useSectionTab<T extends string>({ defaultTabs, pathRoot, selectedSection, }: UseSectionTabProps<T>): UsePathTabsReturnType<T>;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* GridTableCellAssetProps — props for GridTableCellAsset component.
|
|
4
|
+
*/
|
|
5
|
+
interface GridTableCellAssetProps {
|
|
6
|
+
assetAddress: Address;
|
|
7
|
+
symbol: string;
|
|
8
|
+
comment?: string;
|
|
9
|
+
explorerUrl?: string;
|
|
10
|
+
iconSymbol?: string;
|
|
11
|
+
span?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "full" | "auto";
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* GridTableCellAsset — grid table cell component for displaying asset information.
|
|
15
|
+
*
|
|
16
|
+
* @usage
|
|
17
|
+
* Use GridTableCellAsset to display asset data in grid table cells:
|
|
18
|
+
* token symbols, asset addresses with icons, explorer links.
|
|
19
|
+
*
|
|
20
|
+
* Props:
|
|
21
|
+
* - `assetAddress` — asset contract address (required).
|
|
22
|
+
* - `symbol` — asset symbol/ticker (required).
|
|
23
|
+
* - `comment` — optional comment displayed next to symbol.
|
|
24
|
+
* - `explorerUrl` — optional explorer URL for external link button.
|
|
25
|
+
* - `iconSymbol` — optional symbol for icon extraction (used when icon doesn't match symbol, e.g., pool tokens).
|
|
26
|
+
* - `span` — number of columns to span (defaults to 1).
|
|
27
|
+
*
|
|
28
|
+
* Note: Displays token icon, symbol, optional comment, and optional explorer link in a grid cell.
|
|
29
|
+
*/
|
|
30
|
+
export declare function GridTableCellAsset({ assetAddress, symbol, iconSymbol, comment, explorerUrl, span, }: GridTableCellAssetProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* GridTableCellUpdatableProps — props for GridTableCellUpdatable component.
|
|
33
|
+
*/
|
|
34
|
+
export interface GridTableCellUpdatableProps {
|
|
35
|
+
oldValue?: string;
|
|
36
|
+
newValue: string;
|
|
37
|
+
onEdit?: () => void;
|
|
38
|
+
isEditable?: boolean;
|
|
39
|
+
className?: string;
|
|
40
|
+
customButton?: React.ReactNode;
|
|
41
|
+
align?: "left" | "right" | "center";
|
|
42
|
+
postfix?: string;
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
nowrap?: boolean;
|
|
45
|
+
span?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "full" | "auto";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* GridTableCellUpdatable — grid table cell component for displaying editable values with old/new value comparison.
|
|
49
|
+
*
|
|
50
|
+
* @usage
|
|
51
|
+
* Use GridTableCellUpdatable to display values that can be edited in grid table cells:
|
|
52
|
+
* editable parameters, configurable settings, updatable data with change indication.
|
|
53
|
+
*
|
|
54
|
+
* Props:
|
|
55
|
+
* - `oldValue` — previous value displayed with strikethrough when different from newValue.
|
|
56
|
+
* - `newValue` — current/new value to display (required).
|
|
57
|
+
* - `onEdit` — callback function executed when edit button is clicked.
|
|
58
|
+
* - `isEditable` — if false, edit button is not shown (defaults to true).
|
|
59
|
+
* - `className` — additional CSS classes for styling.
|
|
60
|
+
* - `customButton` — custom React node to replace default edit button.
|
|
61
|
+
* - `align` — text alignment: "left", "right", or "center" (defaults to "right").
|
|
62
|
+
* - `postfix` — optional text displayed after the value.
|
|
63
|
+
* - `disabled` — if true, edit button is disabled.
|
|
64
|
+
* - `nowrap` — if true, prevents text wrapping.
|
|
65
|
+
* - `span` — number of columns to span (defaults to 1).
|
|
66
|
+
*
|
|
67
|
+
* Note: Uses UpdatedValue component internally to display old/new values with edit functionality.
|
|
68
|
+
*/
|
|
69
|
+
export declare function GridTableCellUpdatable({ oldValue, newValue, onEdit, isEditable, className, align, customButton, postfix, disabled, nowrap, span, }: GridTableCellUpdatableProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
/**
|
|
71
|
+
* GridTableEditableAction — action button configuration for GridTableEditable.
|
|
72
|
+
*/
|
|
73
|
+
export interface GridTableEditableAction {
|
|
74
|
+
text: string;
|
|
75
|
+
onClick: () => void;
|
|
76
|
+
loadingText?: string;
|
|
77
|
+
isLoading?: boolean;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* GridTableEditableProps — props for GridTableEditable component.
|
|
81
|
+
*/
|
|
82
|
+
interface GridTableEditableProps {
|
|
83
|
+
title: string;
|
|
84
|
+
onNew?: () => void;
|
|
85
|
+
newButtonText?: string;
|
|
86
|
+
isLoading?: boolean;
|
|
87
|
+
buttonLoadingText?: string;
|
|
88
|
+
actions?: GridTableEditableAction[];
|
|
89
|
+
children: React.ReactNode;
|
|
90
|
+
disabled?: boolean;
|
|
91
|
+
skipSignIn?: boolean;
|
|
92
|
+
cols?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* GridTableEditable — grid table component with header, action buttons, and editable content.
|
|
96
|
+
*
|
|
97
|
+
* @usage
|
|
98
|
+
* Use GridTableEditable to create grid tables with editable content and action buttons:
|
|
99
|
+
* data management tables, configuration tables, editable parameter lists with grid layout.
|
|
100
|
+
*
|
|
101
|
+
* Props:
|
|
102
|
+
* - `title` — table title displayed in header (required).
|
|
103
|
+
* - `onNew` — callback function for "New" button action.
|
|
104
|
+
* - `newButtonText` — text for "New" button (defaults to "New").
|
|
105
|
+
* - `isLoading` — if true, "New" button shows loading state.
|
|
106
|
+
* - `buttonLoadingText` — text shown in "New" button when loading (defaults to "Adding...").
|
|
107
|
+
* - `actions` — array of additional action buttons (GridTableEditableAction[]).
|
|
108
|
+
* - `children` — table content (GridTable rows/cells) (required).
|
|
109
|
+
* - `disabled` — if true, all action buttons are disabled (defaults to false).
|
|
110
|
+
* - `skipSignIn` — if true, skips sign-in requirement for actions (defaults to true).
|
|
111
|
+
* - `cols` — number of columns (1-12) or custom CSS grid template (defaults to 12).
|
|
112
|
+
*
|
|
113
|
+
* Note: Action buttons are wrapped in SignInRequired component and use TabButton for styling. Table is wrapped in rounded border container.
|
|
114
|
+
*
|
|
115
|
+
* Do NOT use GridTableEditable:
|
|
116
|
+
* - for read-only tables without editing capabilities (use regular GridTable component).
|
|
117
|
+
* - when you don't need action buttons or title (use regular GridTable component).
|
|
118
|
+
*/
|
|
119
|
+
export declare function GridTableEditable({ title, onNew, newButtonText, buttonLoadingText, isLoading, actions, children, disabled, skipSignIn, cols, }: GridTableEditableProps): import("react/jsx-runtime").JSX.Element;
|
|
120
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* GridErrorLineProps — props for GridErrorLine component.
|
|
4
|
+
*/
|
|
5
|
+
export interface GridErrorLineProps {
|
|
6
|
+
err: Error;
|
|
7
|
+
btnTitle?: React.ReactNode;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* Whether this is the last row (no bottom border)
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
last?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Row height
|
|
16
|
+
* @default "75px"
|
|
17
|
+
*/
|
|
18
|
+
height?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* GridErrorLine — error message display component for grid tables.
|
|
22
|
+
*
|
|
23
|
+
* @usage
|
|
24
|
+
* Use GridErrorLine to display error messages in grid table rows:
|
|
25
|
+
* error states, failed data loading, table error handling with retry button.
|
|
26
|
+
*
|
|
27
|
+
* Props:
|
|
28
|
+
* - `err` — Error object to display (required).
|
|
29
|
+
* - `btnTitle` — text for action button.
|
|
30
|
+
* - `onClick` — callback function for button action.
|
|
31
|
+
* - `last` — whether this is the last row, affects border (defaults to true).
|
|
32
|
+
* - `height` — row height (defaults to "75px").
|
|
33
|
+
*
|
|
34
|
+
* Note: Displays centered error message with optional action button. Uses FormattedMessage for internationalization.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <GridTable cols={12}>
|
|
39
|
+
* <GridTableBody>
|
|
40
|
+
* <GridErrorLine
|
|
41
|
+
* err={new Error("Something went wrong")}
|
|
42
|
+
* btnTitle="Reload"
|
|
43
|
+
* onClick={() => window.location.reload()}
|
|
44
|
+
* />
|
|
45
|
+
* </GridTableBody>
|
|
46
|
+
* </GridTable>
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function GridErrorLine({ err, btnTitle, onClick, last, height, }: GridErrorLineProps): React.ReactElement;
|