@gearbox-protocol/ui-kit 4.0.0-next.50 → 4.0.0-next.52

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.
Files changed (105) hide show
  1. package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -1
  2. package/dist/cjs/components/base/detailed-page-title/copy-button.cjs +1 -0
  3. package/dist/cjs/components/base/detailed-page-title/detailed-page-title.cjs +1 -1
  4. package/dist/cjs/components/base/index.cjs +1 -1
  5. package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
  6. package/dist/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
  7. package/dist/cjs/components/base/manage-pane/manage-pane.cjs +1 -1
  8. package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
  9. package/dist/cjs/components/base/position-assets/position-assets.cjs +1 -1
  10. package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
  11. package/dist/cjs/components/base/tabber/tabber.cjs +1 -1
  12. package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
  13. package/dist/cjs/components/base/values/index.cjs +1 -1
  14. package/dist/cjs/components/base-table/base-table-line.cjs +1 -1
  15. package/dist/cjs/components/base-table/base-table.cjs +1 -1
  16. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  17. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
  18. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  19. package/dist/cjs/components/detailed-page-title/index.cjs +1 -1
  20. package/dist/cjs/components/index.cjs +1 -1
  21. package/dist/cjs/components/loading/loading.cjs +1 -1
  22. package/dist/cjs/components/sdk-status-pill/sdk-status-pill.cjs +1 -1
  23. package/dist/cjs/components/table/index.cjs +1 -1
  24. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  25. package/dist/cjs/index.cjs +1 -1
  26. package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +2 -3
  27. package/dist/esm/components/{detailed-page-title/detailed-page-title-copy-button.js → base/detailed-page-title/copy-button.js} +8 -8
  28. package/dist/esm/components/base/detailed-page-title/detailed-page-title.js +6 -6
  29. package/dist/esm/components/base/index.js +144 -153
  30. package/dist/esm/components/base/info-list/info-list.js +51 -25
  31. package/dist/esm/components/base/leverage-input/leverage-input.js +65 -47
  32. package/dist/esm/components/base/manage-pane/manage-pane.js +83 -73
  33. package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +1 -1
  34. package/dist/esm/components/base/position-assets/position-assets.js +2 -3
  35. package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +1 -1
  36. package/dist/esm/components/base/tabber/tabber.js +51 -39
  37. package/dist/esm/components/base/token-amount/token-amount.js +1 -1
  38. package/dist/esm/components/base/values/index.js +17 -19
  39. package/dist/esm/components/base-table/base-table-line.js +1 -1
  40. package/dist/esm/components/base-table/base-table.js +60 -55
  41. package/dist/esm/components/checkbox/checkbox-labeled.js +17 -20
  42. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +2 -3
  43. package/dist/esm/components/compound-apy/compound-apy.js +2 -3
  44. package/dist/esm/components/detailed-page-title/index.js +2 -4
  45. package/dist/esm/components/index.js +581 -603
  46. package/dist/esm/components/loading/loading.js +22 -15
  47. package/dist/esm/components/sdk-status-pill/sdk-status-pill.js +19 -14
  48. package/dist/esm/components/table/index.js +16 -20
  49. package/dist/esm/components/with-copy/with-copy.js +19 -22
  50. package/dist/esm/index.js +712 -734
  51. package/dist/globals.css +1 -1
  52. package/dist/types/components/base/index.d.ts +0 -2
  53. package/dist/types/components/base/info-list/info-list.d.ts +3 -14
  54. package/dist/types/components/base/leverage-input/leverage-input.d.ts +2 -2
  55. package/dist/types/components/base/values/index.d.ts +0 -1
  56. package/dist/types/components/detailed-page-title/index.d.ts +0 -1
  57. package/dist/types/components/index.d.ts +0 -3
  58. package/dist/types/components/spinner-loader/spinner-loader.d.ts +1 -1
  59. package/dist/types/components/table/index.d.ts +0 -2
  60. package/dist/types/index.d.ts +0 -3
  61. package/package.json +1 -1
  62. package/dist/cjs/components/base/info-portal/index.cjs +0 -1
  63. package/dist/cjs/components/base/info-portal/info-portal.cjs +0 -1
  64. package/dist/cjs/components/base/sticky-bar/constants.cjs +0 -1
  65. package/dist/cjs/components/base/sticky-bar/index.cjs +0 -1
  66. package/dist/cjs/components/base/sticky-bar/sticky-bar.cjs +0 -1
  67. package/dist/cjs/components/base/values/points-value.cjs +0 -1
  68. package/dist/cjs/components/detailed-page-title/detailed-page-title-copy-button.cjs +0 -1
  69. package/dist/cjs/components/loading-bar/index.cjs +0 -1
  70. package/dist/cjs/components/loading-bar/loading-bar.cjs +0 -1
  71. package/dist/cjs/components/status-dot/index.cjs +0 -1
  72. package/dist/cjs/components/status-dot/status-dot.cjs +0 -1
  73. package/dist/cjs/components/table/table-loader-guard.cjs +0 -1
  74. package/dist/cjs/components/table/table-loader.cjs +0 -1
  75. package/dist/cjs/components/with-title/index.cjs +0 -1
  76. package/dist/cjs/components/with-title/with-title.cjs +0 -1
  77. package/dist/esm/components/base/info-portal/index.js +0 -5
  78. package/dist/esm/components/base/info-portal/info-portal.js +0 -20
  79. package/dist/esm/components/base/sticky-bar/constants.js +0 -6
  80. package/dist/esm/components/base/sticky-bar/index.js +0 -6
  81. package/dist/esm/components/base/sticky-bar/sticky-bar.js +0 -28
  82. package/dist/esm/components/base/values/points-value.js +0 -30
  83. package/dist/esm/components/loading-bar/index.js +0 -4
  84. package/dist/esm/components/loading-bar/loading-bar.js +0 -27
  85. package/dist/esm/components/status-dot/index.js +0 -5
  86. package/dist/esm/components/status-dot/status-dot.js +0 -49
  87. package/dist/esm/components/table/table-loader-guard.js +0 -31
  88. package/dist/esm/components/table/table-loader.js +0 -25
  89. package/dist/esm/components/with-title/index.js +0 -4
  90. package/dist/esm/components/with-title/with-title.js +0 -43
  91. package/dist/types/components/base/info-portal/index.d.ts +0 -1
  92. package/dist/types/components/base/info-portal/info-portal.d.ts +0 -8
  93. package/dist/types/components/base/sticky-bar/constants.d.ts +0 -3
  94. package/dist/types/components/base/sticky-bar/index.d.ts +0 -1
  95. package/dist/types/components/base/sticky-bar/sticky-bar.d.ts +0 -9
  96. package/dist/types/components/base/values/points-value.d.ts +0 -11
  97. package/dist/types/components/loading-bar/index.d.ts +0 -1
  98. package/dist/types/components/loading-bar/loading-bar.d.ts +0 -25
  99. package/dist/types/components/status-dot/index.d.ts +0 -1
  100. package/dist/types/components/status-dot/status-dot.d.ts +0 -47
  101. package/dist/types/components/table/table-loader-guard.d.ts +0 -45
  102. package/dist/types/components/table/table-loader.d.ts +0 -50
  103. package/dist/types/components/with-title/index.d.ts +0 -1
  104. package/dist/types/components/with-title/with-title.d.ts +0 -31
  105. /package/dist/types/components/{detailed-page-title/detailed-page-title-copy-button.d.ts → base/detailed-page-title/copy-button.d.ts} +0 -0
@@ -6,7 +6,6 @@ export * from './details-view';
6
6
  export * from './health-factor-block';
7
7
  export * from './history-chart';
8
8
  export * from './info-list';
9
- export * from './info-portal';
10
9
  export * from './leverage-input';
11
10
  export * from './leverage-preset-chips';
12
11
  export * from './liquidation-params-table';
@@ -23,7 +22,6 @@ export * from './segmented-tabs';
23
22
  export * from './spacing';
24
23
  export * from './stack';
25
24
  export * from './stat-badge';
26
- export * from './sticky-bar';
27
25
  export * from './strategy-apy-breakdown-card';
28
26
  export * from './tabber';
29
27
  export * from './text';
@@ -9,22 +9,11 @@ export declare function InfoList({ children, }: {
9
9
  readonly children: React.ReactNode;
10
10
  }): React.ReactElement;
11
11
  export interface InfoLineProps extends Omit<VerticalIndicatorProps, "label" | "title"> {
12
- /**
13
- * Left-hand label: a locale key, or a node when the text is composed.
14
- * Shadows the native `title` attribute on purpose — a row's label is not a
15
- * browser tooltip, and `tip` is what puts one behind the help icon.
16
- */
17
12
  readonly title: TitleText;
13
+ readonly "data-testid"?: string;
18
14
  }
19
- /**
20
- * One row of the list the reference `VerticalIndicator` markup.
21
- *
22
- * Everything `VerticalIndicator` takes passes straight through; this only
23
- * fixes the defaults the list depends on. They sit before the spread, so a
24
- * caller overrides any of them — `data-testid` included, which is how a row
25
- * that a test needs to single out names itself.
26
- */
27
- export declare function InfoLine({ title, ...rest }: InfoLineProps): React.ReactElement;
15
+ /** One row of the list — the reference `VerticalIndicator` markup. */
16
+ export declare function InfoLine({ title, size, align, "data-testid": testId, ...rest }: InfoLineProps): React.ReactElement;
28
17
  export interface PointsInfoLineProps {
29
18
  readonly data: ApyBreakdown | undefined;
30
19
  readonly title?: TitleText;
@@ -1,7 +1,6 @@
1
1
  import { Leverage } from '@gearbox-protocol/sdk/model';
2
2
  import { default as React } from 'react';
3
3
  import { TitleText } from '../text';
4
- import { WithTitleProps } from '../../with-title';
5
4
  import { ColorInterval } from '../../../utils/ranges';
6
5
  import { LeverageInputTest } from './constants';
7
6
  export { LeverageInputTest };
@@ -33,8 +32,9 @@ export interface LeverageInputProps {
33
32
  readonly colorIntervals?: ReadonlyArray<ColorInterval>;
34
33
  /** Label of the highlighted interval range under the slider. */
35
34
  readonly colorIntervalLabel?: string;
36
- readonly size?: WithTitleProps["size"];
35
+ readonly size?: TitleSize;
37
36
  }
37
+ type TitleSize = "sm" | "default" | "md" | "lg";
38
38
  /**
39
39
  * Target leverage of a position, bounded by what the strategy allows.
40
40
  * Title row carries an inline-editable value (`N.NNx`) and an optional reset;
@@ -1,7 +1,6 @@
1
1
  export * from './constants';
2
2
  export * from './no-value';
3
3
  export * from './pnl-value';
4
- export * from './points-value';
5
4
  export * from './position-short-label';
6
5
  export * from './position-status-badge';
7
6
  export * from './position-type-badge';
@@ -1,2 +1 @@
1
- export * from './detailed-page-title-copy-button';
2
1
  export * from './detailed-page-title-explorer-dropdown';
@@ -42,7 +42,6 @@ export * from './legal-agreement';
42
42
  export * from './link';
43
43
  export * from './loader';
44
44
  export * from './loading';
45
- export * from './loading-bar';
46
45
  export * from './modal';
47
46
  export * from './name-cell';
48
47
  export * from './navbar-logo';
@@ -66,7 +65,6 @@ export * from './slider';
66
65
  export * from './spinner';
67
66
  export * from './spinner-loader';
68
67
  export * from './split-list';
69
- export * from './status-dot';
70
68
  export * from './status-elements';
71
69
  export * from './tab-control';
72
70
  export * from './table';
@@ -85,5 +83,4 @@ export * from './typography';
85
83
  export * from './vertical-indicator';
86
84
  export * from './vspace';
87
85
  export * from './with-copy';
88
- export * from './with-title';
89
86
  export * from './yield-breakdown-tooltip';
@@ -12,7 +12,7 @@ export interface SpinnerLoaderProps extends React.HTMLAttributes<HTMLSpanElement
12
12
  * Matches interface (A): gray track, darker bottom segment, configurable size/margin/speed/border width.
13
13
  *
14
14
  * @usage
15
- * Use for: loading states where a simple rotating circle is needed (e.g. LoadingBar, dialogs).
15
+ * Use for: loading states where a simple rotating circle is needed (e.g. Loading, dialogs).
16
16
  *
17
17
  * @example
18
18
  * ```tsx
@@ -2,6 +2,4 @@ export * from './grid-error-line';
2
2
  export * from './grid-loading-line';
3
3
  export * from './grid-table';
4
4
  export * from './table';
5
- export * from './table-loader';
6
- export * from './table-loader-guard';
7
5
  export * from './table-sm';
@@ -44,7 +44,6 @@ export * from './components/legal-agreement';
44
44
  export * from './components/link';
45
45
  export * from './components/loader';
46
46
  export * from './components/loading';
47
- export * from './components/loading-bar';
48
47
  export * from './components/modal';
49
48
  export * from './components/name-cell';
50
49
  export * from './components/navbar-logo';
@@ -69,7 +68,6 @@ export * from './components/slider';
69
68
  export * from './components/spinner';
70
69
  export * from './components/spinner-loader';
71
70
  export * from './components/split-list';
72
- export * from './components/status-dot';
73
71
  export * from './components/status-elements';
74
72
  export * from './components/tab-control';
75
73
  export * from './components/table';
@@ -88,7 +86,6 @@ export * from './components/typography';
88
86
  export * from './components/vertical-indicator';
89
87
  export * from './components/vspace';
90
88
  export * from './components/with-copy';
91
- export * from './components/with-title';
92
89
  export * from './components/yield-breakdown-tooltip';
93
90
  export * from './hooks';
94
91
  export * from './locale';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/ui-kit",
3
- "version": "4.0.0-next.50",
3
+ "version": "4.0.0-next.52",
4
4
  "description": "Internal UI components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./info-portal.cjs");exports.InfoPortalOut=o.InfoPortalOut;exports.InfoPortalProvider=o.InfoPortalProvider;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),e=require("react"),r=e.createContext({current:null});function u({children:t}){const n=e.useRef(null);return o.jsx(r.Provider,{value:n,children:t})}function c(){return e.useContext(r)}function l(){const t=c();return o.jsx("div",{ref:t})}exports.InfoPortalOut=l;exports.InfoPortalProvider=u;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class t{static root="sticky-bar-root"}exports.StickyBarTest=t;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./sticky-bar.cjs"),e=require("./constants.cjs");exports.StickyBar=t.StickyBar;exports.StickyBarTest=e.StickyBarTest;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime");require("@gearbox-protocol/sdk/onchain");const i=require("../../../utils/cn.cjs");require("luxon");require("../../../utils/z-index.cjs");const t=require("./constants.cjs");function a({children:r,className:e,testId:s=t.StickyBarTest.root}){return c.jsx("div",{className:i.cn("sticky top-0 z-20 -mx-1 px-1 pt-3 sm:pt-4","bg-background/75 backdrop-blur-md backdrop-saturate-150",e),"data-testid":s,children:r})}exports.StickyBarTest=t.StickyBarTest;exports.StickyBar=a;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("../../points-icon/points-icon.cjs"),o=require("../../../utils/apy-breakdown.cjs"),a=require("./constants.cjs");function l({data:s}){if(!s)return null;const t=o.pointProgramsOf(s);return t.length===0?null:n.jsx("span",{className:"inline-flex flex-wrap items-center gap-1.5","data-testid":a.ValueTest.points,children:t.map(e=>n.jsxs("span",{className:"inline-flex items-center gap-1",children:[n.jsx(i.PointsIcon,{reward:{name:e.name,type:e.id},size:16}),n.jsx("span",{children:e.name})]},e.id))})}exports.PointsValue=l;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),y=require("@fortawesome/free-solid-svg-icons"),g=require("@gearbox-protocol/static"),j=require("react"),x=require("../icon-button/icon-button.cjs"),q=require("../icons/fa-icon.cjs"),_=require("../tooltip/simple-tooltip.cjs");require("../tooltip/tooltip.cjs");const b=require("../typed-intl/index.cjs"),T=require("../../hooks/use-media-query.cjs");require("@gearbox-protocol/sdk/onchain");const c=require("../../utils/cn.cjs");require("luxon");require("../../utils/z-index.cjs");function C(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>o[n]})}}return e.default=o,Object.freeze(e)}const a=C(j),u=a.forwardRef(function({toCopy:e,className:n},i){const p=T.useIsMobile(),[s,l]=a.useState(!1),r=a.useRef(null),d=p?32:40,f=async()=>{if(e)try{await navigator.clipboard.writeText(e),r.current&&clearTimeout(r.current),l(!0),r.current=setTimeout(()=>{l(!1)},1500)}catch(m){console.error("Failed to copy:",m)}};return e?t.jsx(_.SimpleTooltip,{title:t.jsxs(x.IconButton,{ref:i,buttonType:"outlined",size:d,onClick:f,title:s?"Copied!":void 0,className:c.cn("relative",n),children:[t.jsx("span",{className:c.cn("absolute inset-0 flex items-center justify-center transition-all duration-200",s?"opacity-100 scale-100 text-success":"opacity-0 scale-50 text-foreground"),children:t.jsx(q.FaIcon,{icon:y.faCheck,className:"size-4"})}),t.jsx("span",{className:c.cn("flex items-center justify-center transition-all duration-200 text-foreground",s?"opacity-0 scale-50":"opacity-100 scale-100"),children:t.jsx(g.IconCopy,{size:15})})]}),placement:"top",children:t.jsx(b.FormattedMessageTyped,{messageId:"components.openCopyButtons.copy"})}):null});u.displayName="DetailedPageTitleCopyButton";exports.DetailedPageTitleCopyButton=u;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./loading-bar.cjs");exports.LoadingBar=o.LoadingBar;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),s=require("class-variance-authority"),i=require("react"),l=require("../modal/modal.cjs"),d=require("../spinner-loader/spinner-loader.cjs");require("@gearbox-protocol/sdk/onchain");const u=require("../../utils/cn.cjs");require("luxon");require("../../utils/z-index.cjs");function m(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const x=m(i),f=s.cva(["w-[250px] min-h-[120px] p-[16px] flex flex-col justify-center items-center text-center","bg-gray-10 rounded-md"].join(" ")),o=x.forwardRef(({message:e,subMessage:r,show:t=!0,className:a},c)=>n.jsx(l.Modal,{show:t,xsCentered:!0,zIndexLayer:"LOADING",children:n.jsxs("div",{ref:c,className:u.cn(f(),a),children:[n.jsx("div",{className:"mb-5",children:n.jsx(d.SpinnerLoader,{})}),n.jsxs("div",{className:"flex w-full flex-col gap-0",children:[n.jsx("span",{className:"text-sm text-foreground",children:e}),r!=null&&r!==""&&n.jsx("span",{className:"text-sm text-secondary-foreground",children:r})]})]})}));o.displayName="LoadingBar";exports.LoadingBar=o;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./status-dot.cjs");exports.StatusDot=t.StatusDot;exports.statusDotVariants=t.statusDotVariants;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),o=require("class-variance-authority"),l=require("react");require("@gearbox-protocol/sdk/onchain");const d=require("../../utils/cn.cjs");require("luxon");require("../../utils/z-index.cjs");function f(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const g=f(l),s=o.cva("rounded-full shrink-0",{variants:{variant:{default:"bg-muted-foreground",success:"bg-success",warning:"bg-warning",alert:"bg-destructive",primary:"bg-primary",secondary:"bg-secondary",muted:"bg-muted"},size:{xs:"h-1.5 w-1.5",sm:"h-2 w-2",default:"h-2.5 w-2.5",lg:"h-3 w-3",xl:"h-4 w-4"}},defaultVariants:{variant:"default",size:"sm"}}),n=g.forwardRef(({className:e,variant:r,size:t,pulse:a,...u},i)=>c.jsx("div",{ref:i,className:d.cn(s({variant:r,size:t}),a&&"animate-pulse",e),...u}));n.displayName="StatusDot";exports.StatusDot=n;exports.statusDotVariants=s;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),d=require("../guard/guard.cjs"),s=require("./table-loader.cjs");function c({showGuard:e,children:a,height:t="70px",columns:o=6,rows:u=5,...n}){return r.jsx(d.Guard,{showGuard:e,guard:e&&r.jsx(s.TableLoader,{height:t,columns:o,rows:u,...n}),children:a})}exports.TableLoaderGuard=c;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),d=require("./grid-loading-line.cjs"),c=require("./grid-table.cjs");function s({height:t="70px",columns:i=6,rows:e=5,cellClassName:o,className:a,...l}){return n.jsx(c.GridTableBody,{className:a,...l,children:Array.from({length:e},(u,r)=>n.jsx(d.GridLoadingLine,{height:t,columns:i,cellClassName:o,last:r===e-1},`${r}-${e}`))})}exports.TableLoader=s;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./with-title.cjs");exports.WithTitle=t.WithTitle;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("class-variance-authority");require("@gearbox-protocol/sdk/onchain");const i=require("../../utils/cn.cjs");require("luxon");require("../../utils/z-index.cjs");const n=l.cva("",{variants:{size:{sm:"text-[14px] mb-[14px]",default:"text-body mb-[18px]",md:"text-lg mb-[22px]",lg:"text-[21px] mb-[22px]"}},defaultVariants:{size:"default"}});function u({title:r,children:t,size:s="default",className:a}){return e.jsxs("div",{className:i.cn("flex flex-col"),children:[e.jsx("div",{className:i.cn("text-foreground font-medium",n({size:s}),a),children:r}),t!==void 0&&e.jsx("div",{children:t})]})}exports.WithTitle=u;
@@ -1,5 +0,0 @@
1
- import { InfoPortalOut as t, InfoPortalProvider as f } from "./info-portal.js";
2
- export {
3
- t as InfoPortalOut,
4
- f as InfoPortalProvider
5
- };
@@ -1,20 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { createContext as e, useRef as u, useContext as c } from "react";
3
- const r = e({
4
- current: null
5
- });
6
- function s({ children: t }) {
7
- const n = u(null);
8
- return /* @__PURE__ */ o(r.Provider, { value: n, children: t });
9
- }
10
- function f() {
11
- return c(r);
12
- }
13
- function a() {
14
- const t = f();
15
- return /* @__PURE__ */ o("div", { ref: t });
16
- }
17
- export {
18
- a as InfoPortalOut,
19
- s as InfoPortalProvider
20
- };
@@ -1,6 +0,0 @@
1
- class o {
2
- static root = "sticky-bar-root";
3
- }
4
- export {
5
- o as StickyBarTest
6
- };
@@ -1,6 +0,0 @@
1
- import { StickyBar as o } from "./sticky-bar.js";
2
- import { StickyBarTest as a } from "./constants.js";
3
- export {
4
- o as StickyBar,
5
- a as StickyBarTest
6
- };
@@ -1,28 +0,0 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import "@gearbox-protocol/sdk/onchain";
3
- import { cn as p } from "../../../utils/cn.js";
4
- import "luxon";
5
- import "../../../utils/z-index.js";
6
- import { StickyBarTest as i } from "./constants.js";
7
- function b({
8
- children: t,
9
- className: r,
10
- testId: o = i.root
11
- }) {
12
- return /* @__PURE__ */ m(
13
- "div",
14
- {
15
- className: p(
16
- "sticky top-0 z-20 -mx-1 px-1 pt-3 sm:pt-4",
17
- "bg-background/75 backdrop-blur-md backdrop-saturate-150",
18
- r
19
- ),
20
- "data-testid": o,
21
- children: t
22
- }
23
- );
24
- }
25
- export {
26
- b as StickyBar,
27
- i as StickyBarTest
28
- };
@@ -1,30 +0,0 @@
1
- import { jsx as n, jsxs as s } from "react/jsx-runtime";
2
- import { PointsIcon as r } from "../../points-icon/points-icon.js";
3
- import { pointProgramsOf as l } from "../../../utils/apy-breakdown.js";
4
- import { ValueTest as a } from "./constants.js";
5
- function c({
6
- data: i
7
- }) {
8
- if (!i) return null;
9
- const t = l(i);
10
- return t.length === 0 ? null : /* @__PURE__ */ n(
11
- "span",
12
- {
13
- className: "inline-flex flex-wrap items-center gap-1.5",
14
- "data-testid": a.points,
15
- children: t.map((e) => /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1", children: [
16
- /* @__PURE__ */ n(
17
- r,
18
- {
19
- reward: { name: e.name, type: e.id },
20
- size: 16
21
- }
22
- ),
23
- /* @__PURE__ */ n("span", { children: e.name })
24
- ] }, e.id))
25
- }
26
- );
27
- }
28
- export {
29
- c as PointsValue
30
- };
@@ -1,4 +0,0 @@
1
- import { LoadingBar as a } from "./loading-bar.js";
2
- export {
3
- a as LoadingBar
4
- };
@@ -1,27 +0,0 @@
1
- import { jsx as r, jsxs as o } from "react/jsx-runtime";
2
- import { cva as m } from "class-variance-authority";
3
- import * as d from "react";
4
- import { Modal as l } from "../modal/modal.js";
5
- import { SpinnerLoader as c } from "../spinner-loader/spinner-loader.js";
6
- import "@gearbox-protocol/sdk/onchain";
7
- import { cn as s } from "../../utils/cn.js";
8
- import "luxon";
9
- import "../../utils/z-index.js";
10
- const p = m(
11
- [
12
- "w-[250px] min-h-[120px] p-[16px] flex flex-col justify-center items-center text-center",
13
- "bg-gray-10 rounded-md"
14
- ].join(" ")
15
- ), x = d.forwardRef(
16
- ({ message: t, subMessage: e, show: n = !0, className: a }, i) => /* @__PURE__ */ r(l, { show: n, xsCentered: !0, zIndexLayer: "LOADING", children: /* @__PURE__ */ o("div", { ref: i, className: s(p(), a), children: [
17
- /* @__PURE__ */ r("div", { className: "mb-5", children: /* @__PURE__ */ r(c, {}) }),
18
- /* @__PURE__ */ o("div", { className: "flex w-full flex-col gap-0", children: [
19
- /* @__PURE__ */ r("span", { className: "text-sm text-foreground", children: t }),
20
- e != null && e !== "" && /* @__PURE__ */ r("span", { className: "text-sm text-secondary-foreground", children: e })
21
- ] })
22
- ] }) })
23
- );
24
- x.displayName = "LoadingBar";
25
- export {
26
- x as LoadingBar
27
- };
@@ -1,5 +0,0 @@
1
- import { StatusDot as o, statusDotVariants as s } from "./status-dot.js";
2
- export {
3
- o as StatusDot,
4
- s as statusDotVariants
5
- };
@@ -1,49 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { cva as m } from "class-variance-authority";
3
- import * as n from "react";
4
- import "@gearbox-protocol/sdk/onchain";
5
- import { cn as u } from "../../utils/cn.js";
6
- import "luxon";
7
- import "../../utils/z-index.js";
8
- const d = m("rounded-full shrink-0", {
9
- variants: {
10
- variant: {
11
- default: "bg-muted-foreground",
12
- success: "bg-success",
13
- warning: "bg-warning",
14
- alert: "bg-destructive",
15
- primary: "bg-primary",
16
- secondary: "bg-secondary",
17
- muted: "bg-muted"
18
- },
19
- size: {
20
- xs: "h-1.5 w-1.5",
21
- sm: "h-2 w-2",
22
- default: "h-2.5 w-2.5",
23
- lg: "h-3 w-3",
24
- xl: "h-4 w-4"
25
- }
26
- },
27
- defaultVariants: {
28
- variant: "default",
29
- size: "sm"
30
- }
31
- }), c = n.forwardRef(
32
- ({ className: t, variant: r, size: a, pulse: s, ...e }, i) => /* @__PURE__ */ o(
33
- "div",
34
- {
35
- ref: i,
36
- className: u(
37
- d({ variant: r, size: a }),
38
- s && "animate-pulse",
39
- t
40
- ),
41
- ...e
42
- }
43
- )
44
- );
45
- c.displayName = "StatusDot";
46
- export {
47
- c as StatusDot,
48
- d as statusDotVariants
49
- };
@@ -1,31 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { Guard as d } from "../guard/guard.js";
3
- import { TableLoader as f } from "./table-loader.js";
4
- function x({
5
- showGuard: r,
6
- children: a,
7
- height: e = "70px",
8
- columns: m = 6,
9
- rows: t = 5,
10
- ...p
11
- }) {
12
- return /* @__PURE__ */ o(
13
- d,
14
- {
15
- showGuard: r,
16
- guard: r && /* @__PURE__ */ o(
17
- f,
18
- {
19
- height: e,
20
- columns: m,
21
- rows: t,
22
- ...p
23
- }
24
- ),
25
- children: a
26
- }
27
- );
28
- }
29
- export {
30
- x as TableLoaderGuard
31
- };
@@ -1,25 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { GridLoadingLine as d } from "./grid-loading-line.js";
3
- import { GridTableBody as f } from "./grid-table.js";
4
- function c({
5
- height: t = "70px",
6
- columns: e = 6,
7
- rows: r = 5,
8
- cellClassName: m,
9
- className: a,
10
- ...n
11
- }) {
12
- return /* @__PURE__ */ i(f, { className: a, ...n, children: Array.from({ length: r }, (l, o) => /* @__PURE__ */ i(
13
- d,
14
- {
15
- height: t,
16
- columns: e,
17
- cellClassName: m,
18
- last: o === r - 1
19
- },
20
- `${o}-${r}`
21
- )) });
22
- }
23
- export {
24
- c as TableLoader
25
- };
@@ -1,4 +0,0 @@
1
- import { WithTitle as i } from "./with-title.js";
2
- export {
3
- i as WithTitle
4
- };
@@ -1,43 +0,0 @@
1
- import { jsxs as x, jsx as e } from "react/jsx-runtime";
2
- import { cva as a } from "class-variance-authority";
3
- import "@gearbox-protocol/sdk/onchain";
4
- import { cn as i } from "../../utils/cn.js";
5
- import "luxon";
6
- import "../../utils/z-index.js";
7
- const l = a("", {
8
- variants: {
9
- size: {
10
- sm: "text-[14px] mb-[14px]",
11
- default: "text-body mb-[18px]",
12
- md: "text-lg mb-[22px]",
13
- lg: "text-[21px] mb-[22px]"
14
- }
15
- },
16
- defaultVariants: {
17
- size: "default"
18
- }
19
- });
20
- function u({
21
- title: m,
22
- children: t,
23
- size: o = "default",
24
- className: r
25
- }) {
26
- return /* @__PURE__ */ x("div", { className: i("flex flex-col"), children: [
27
- /* @__PURE__ */ e(
28
- "div",
29
- {
30
- className: i(
31
- "text-foreground font-medium",
32
- l({ size: o }),
33
- r
34
- ),
35
- children: m
36
- }
37
- ),
38
- t !== void 0 && /* @__PURE__ */ e("div", { children: t })
39
- ] });
40
- }
41
- export {
42
- u as WithTitle
43
- };
@@ -1 +0,0 @@
1
- export * from './info-portal';
@@ -1,8 +0,0 @@
1
- import { default as React, PropsWithChildren } from 'react';
2
- /**
3
- * Lets a deeply nested child render information into a slot reserved higher up
4
- * (e.g. a dialog's projection into the manage pane's card top).
5
- */
6
- export declare function InfoPortalProvider({ children }: PropsWithChildren<object>): React.JSX.Element;
7
- /** The slot inside the pane card where portal content appears. */
8
- export declare function InfoPortalOut(): React.ReactElement;
@@ -1,3 +0,0 @@
1
- export declare class StickyBarTest {
2
- static root: string;
3
- }
@@ -1 +0,0 @@
1
- export * from './sticky-bar';
@@ -1,9 +0,0 @@
1
- import { default as React } from 'react';
2
- import { StickyBarTest } from './constants';
3
- export { StickyBarTest };
4
- export interface StickyBarProps {
5
- readonly children: React.ReactNode;
6
- readonly className?: string;
7
- readonly testId?: string;
8
- }
9
- export declare function StickyBar({ children, className, testId, }: StickyBarProps): React.ReactElement;
@@ -1,11 +0,0 @@
1
- import { ApyBreakdown } from '@gearbox-protocol/sdk/model';
2
- import { default as React } from 'react';
3
- export interface PointsValueProps {
4
- /** SDK APY breakdown; `undefined` or no point programs render nothing. */
5
- readonly data: ApyBreakdown | undefined;
6
- }
7
- /**
8
- * Point programs attached to an APY breakdown: icon + name for each program.
9
- * Returns `null` when the SDK has none.
10
- */
11
- export declare function PointsValue({ data, }: PointsValueProps): React.ReactElement | null;
@@ -1 +0,0 @@
1
- export * from './loading-bar';
@@ -1,25 +0,0 @@
1
- import * as React from "react";
2
- export interface LoadingBarProps {
3
- /** Main message (e.g. "Loading 45%"). */
4
- message: string;
5
- /** Optional secondary line (e.g. "Please wait"). */
6
- subMessage?: string;
7
- /** Whether the modal is shown. @default true */
8
- show?: boolean;
9
- /** Additional class for the inner container. */
10
- className?: string;
11
- }
12
- /**
13
- * LoadingBar — modal with spinner, title and optional description.
14
- * Matches A (interface LoadingBar): centered modal, 250px container, SpinnerLoader, LoadingTitle, LoadingDescription.
15
- *
16
- * @usage
17
- * Use for blocking loading states (e.g. while data is being fetched).
18
- *
19
- * @example
20
- * ```tsx
21
- * <LoadingBar message="Loading 50%" subMessage="Please wait" />
22
- * ```
23
- */
24
- declare const LoadingBar: React.ForwardRefExoticComponent<LoadingBarProps & React.RefAttributes<HTMLDivElement>>;
25
- export { LoadingBar };
@@ -1 +0,0 @@
1
- export * from './status-dot';