@gearbox-protocol/permissionless-ui 1.22.0-next.104 → 1.22.0-next.105

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),m=require("react");require("@gearbox-protocol/sdk");const f=require("../../utils/cn.cjs");require("sonner");require("luxon");function b(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const i=b(m);function x({className:e,children:r,...t}){const l=i.Children.toArray(r).length,a=i.Children.map(r,(s,c)=>{if(i.isValidElement(s)){const u=c===0,d=c===l-1;return i.cloneElement(s,{first:u,last:d})}return s});return n.jsx("div",{className:f.cn("m-0 p-0 w-full flex flex-wrap",e),...t,children:a})}function p({icon:e,title:r,subTitle:t,onClick:o,endingIcon:l,last:a=!1,className:s}){return n.jsxs("button",{type:"button",onClick:o,className:f.cn("group relative z-0 pt-5 px-4 flex flex-row items-start gap-4 w-full cursor-pointer text-left","before:absolute before:-z-10 before:left-0 before:hidden before:w-full before:inset-y-0 before:content-[''] before:bg-muted/50 before:rounded-lg",!a&&"after:absolute after:bottom-0 after:inset-x-3 after:h-px after:content-[''] after:bg-border","hover:before:block","hover:after:hidden",s),children:[e&&n.jsx("div",{className:"w-6 h-6 text-muted-foreground flex items-center justify-center",children:e}),n.jsx("div",{className:"pb-5 flex-1 flex flex-col gap-2",children:n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"text-base leading-[1.2] font-medium",children:r}),t&&n.jsx("div",{className:"text-sm text-muted-foreground",children:t})]})}),l&&n.jsx("div",{className:"ml-4 text-muted-foreground transition-colors",children:l})]})}exports.OptionsItem=p;exports.OptionsList=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");require("@gearbox-protocol/sdk");const l=require("../../utils/cn.cjs");require("sonner");require("luxon");function a({className:t,children:s,...r}){return e.jsx("div",{className:l.cn("m-0 p-0 w-full flex flex-wrap",t),...r,children:s})}function u({icon:t,title:s,subTitle:r,onClick:i,endingIcon:o,last:n=!1,className:f}){return e.jsxs("button",{type:"button",onClick:i,className:l.cn("group relative z-0 pt-5 px-4 flex flex-row items-start gap-4 w-full cursor-pointer text-left","before:absolute before:-z-10 before:left-0 before:hidden before:w-full before:inset-y-0 before:content-[''] before:bg-muted/50 before:rounded-lg",!n&&"after:absolute after:bottom-0 after:inset-x-3 after:h-px after:content-[''] after:bg-border","hover:before:block","hover:after:hidden",f),children:[t&&e.jsx("div",{className:"w-6 h-6 text-muted-foreground flex items-center justify-center",children:t}),e.jsx("div",{className:"pb-5 flex-1 flex flex-col gap-2",children:e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("div",{className:"text-base leading-[1.2] font-medium",children:s}),r&&e.jsx("div",{className:"text-sm text-muted-foreground",children:r})]})}),o&&e.jsx("div",{className:"ml-4 text-muted-foreground transition-colors",children:o})]})}exports.OptionsItem=u;exports.OptionsList=a;
@@ -1,60 +1,50 @@
1
- import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
- import * as s from "react";
1
+ import { jsx as e, jsxs as f } from "react/jsx-runtime";
2
+ import "react";
3
3
  import "@gearbox-protocol/sdk";
4
- import { cn as d } from "../../utils/cn.js";
4
+ import { cn as a } from "../../utils/cn.js";
5
5
  import "sonner";
6
6
  import "luxon";
7
- function v({
8
- className: r,
7
+ function b({
8
+ className: t,
9
9
  children: o,
10
- ...l
10
+ ...r
11
11
  }) {
12
- const n = s.Children.toArray(o).length, i = s.Children.map(o, (t, f) => {
13
- if (s.isValidElement(t)) {
14
- const m = f === 0, u = f === n - 1;
15
- return s.cloneElement(t, {
16
- first: m,
17
- last: u
18
- });
19
- }
20
- return t;
21
- });
22
- return /* @__PURE__ */ e("div", { className: d("m-0 p-0 w-full flex flex-wrap", r), ...l, children: i });
12
+ return /* @__PURE__ */ e("div", { className: a("m-0 p-0 w-full flex flex-wrap", t), ...r, children: o });
23
13
  }
24
- function N({
25
- icon: r,
14
+ function h({
15
+ icon: t,
26
16
  title: o,
27
- subTitle: l,
28
- onClick: a,
29
- endingIcon: n,
30
- last: i = !1,
31
- className: t
17
+ subTitle: r,
18
+ onClick: i,
19
+ endingIcon: l,
20
+ last: s = !1,
21
+ className: n
32
22
  }) {
33
- return /* @__PURE__ */ c(
23
+ return /* @__PURE__ */ f(
34
24
  "button",
35
25
  {
36
26
  type: "button",
37
- onClick: a,
38
- className: d(
27
+ onClick: i,
28
+ className: a(
39
29
  "group relative z-0 pt-5 px-4 flex flex-row items-start gap-4 w-full cursor-pointer text-left",
40
30
  "before:absolute before:-z-10 before:left-0 before:hidden before:w-full before:inset-y-0 before:content-[''] before:bg-muted/50 before:rounded-lg",
41
- !i && "after:absolute after:bottom-0 after:inset-x-3 after:h-px after:content-[''] after:bg-border",
31
+ !s && "after:absolute after:bottom-0 after:inset-x-3 after:h-px after:content-[''] after:bg-border",
42
32
  "hover:before:block",
43
33
  "hover:after:hidden",
44
- t
34
+ n
45
35
  ),
46
36
  children: [
47
- r && /* @__PURE__ */ e("div", { className: "w-6 h-6 text-muted-foreground flex items-center justify-center", children: r }),
48
- /* @__PURE__ */ e("div", { className: "pb-5 flex-1 flex flex-col gap-2", children: /* @__PURE__ */ c("div", { className: "flex flex-col gap-1.5", children: [
37
+ t && /* @__PURE__ */ e("div", { className: "w-6 h-6 text-muted-foreground flex items-center justify-center", children: t }),
38
+ /* @__PURE__ */ e("div", { className: "pb-5 flex-1 flex flex-col gap-2", children: /* @__PURE__ */ f("div", { className: "flex flex-col gap-1.5", children: [
49
39
  /* @__PURE__ */ e("div", { className: "text-base leading-[1.2] font-medium", children: o }),
50
- l && /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: l })
40
+ r && /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: r })
51
41
  ] }) }),
52
- n && /* @__PURE__ */ e("div", { className: "ml-4 text-muted-foreground transition-colors", children: n })
42
+ l && /* @__PURE__ */ e("div", { className: "ml-4 text-muted-foreground transition-colors", children: l })
53
43
  ]
54
44
  }
55
45
  );
56
46
  }
57
47
  export {
58
- N as OptionsItem,
59
- v as OptionsList
48
+ h as OptionsItem,
49
+ b as OptionsList
60
50
  };
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import type * as React from "react";
2
2
  export interface OptionsListProps extends React.HTMLAttributes<HTMLDivElement> {
3
3
  children: React.ReactNode;
4
4
  }
@@ -9,7 +9,6 @@ export interface OptionsItemProps {
9
9
  subTitle?: string | React.ReactNode;
10
10
  onClick?: () => void;
11
11
  endingIcon?: React.ReactNode;
12
- first?: boolean;
13
12
  last?: boolean;
14
13
  className?: string;
15
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/permissionless-ui",
3
- "version": "1.22.0-next.104",
3
+ "version": "1.22.0-next.105",
4
4
  "description": "Internal UI components",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/index.js",