@lark-apaas/client-toolkit 1.1.17 → 1.1.18

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,11 +1,11 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from "react";
3
3
  import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover.js";
4
4
  import { getCsrfToken } from "../../utils/getCsrfToken.js";
5
5
  import { getAppId } from "../../utils/getAppId.js";
6
6
  import { useIsMobile } from "../../hooks/index.js";
7
7
  import { X } from "lucide-react";
8
- import { Button } from "../ui/button.js";
8
+ import { Sheet, SheetContent, SheetTrigger } from "../ui/drawer.js";
9
9
  const Component = ()=>{
10
10
  const HasClosedKey = `miaoda-creatByMiaoda-has-closed-${getAppId(window.location.pathname)}`;
11
11
  const [visible, setVisible] = useState(!window.localStorage?.getItem(HasClosedKey));
@@ -24,8 +24,127 @@ const Component = ()=>{
24
24
  setIsInternetVisible(data?.data?.is_internet_visible);
25
25
  });
26
26
  }, []);
27
+ useEffect(()=>{
28
+ if (isMobile) {
29
+ const link = document.createElement('link');
30
+ link.rel = 'preload';
31
+ link.as = 'image';
32
+ link.href = 'https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover-mobile.png';
33
+ document.head.appendChild(link);
34
+ }
35
+ }, [
36
+ isMobile
37
+ ]);
27
38
  if ('production' !== process.env.NODE_ENV) return null;
28
- if (isMobile || !visible || !userinfo) return null;
39
+ if (!visible) return null;
40
+ if (isMobile) return /*#__PURE__*/ jsxs(Sheet, {
41
+ open: open,
42
+ onOpenChange: setOpen,
43
+ children: [
44
+ /*#__PURE__*/ jsx(SheetTrigger, {
45
+ asChild: true,
46
+ children: /*#__PURE__*/ jsxs("div", {
47
+ className: "fixed right-3 bottom-20 inline-flex items-center gap-x-1 border-solid border-[#ffffff1a] border px-2.5 py-1.5 bg-[#1f2329e5] backdrop-blur-[5px] shadow-[0px_6px_12px_0px_#41444a0a,0px_8px_24px_8px_#41444a0a] rounded-md text-[#ebebeb)] font-['PingFang_SC'] text-xs leading-[20px] tracking-[0px] z-[10000000]",
48
+ onClick: ()=>{
49
+ setOpen(true);
50
+ },
51
+ children: [
52
+ /*#__PURE__*/ jsx("img", {
53
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodalogo.svg",
54
+ className: "shrink-0 w-[16px] h-[16px]"
55
+ }),
56
+ /*#__PURE__*/ jsx("p", {
57
+ className: "shrink-0 min-w-[28px] m-0! text-[#EBEBEB]",
58
+ children: "妙搭"
59
+ })
60
+ ]
61
+ })
62
+ }),
63
+ /*#__PURE__*/ jsx(SheetContent, {
64
+ side: "bottom",
65
+ className: "z-[10000001] border-none bg-transparent outline-0!",
66
+ children: /*#__PURE__*/ jsxs("div", {
67
+ className: "flex flex-col bg-white overflow-hidden rounded-t-2xl relative",
68
+ children: [
69
+ /*#__PURE__*/ jsx(X, {
70
+ className: "absolute top-2 left-4 size-6 text-[#2B2F36]",
71
+ onClick: ()=>setOpen(false)
72
+ }),
73
+ /*#__PURE__*/ jsx("img", {
74
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover-mobile.png",
75
+ alt: "",
76
+ className: "w-full h-full",
77
+ onClick: ()=>{
78
+ window.open('https://miaoda.feishu.cn/landing', '_blank');
79
+ }
80
+ }),
81
+ /*#__PURE__*/ jsxs("div", {
82
+ className: "flex flex-col w-full justify-center items-end gap-y-4 border-solid border-[#ffffff0d] border px-5 pt-4 pb-12 shadow-(--shadow-2xs,0px_2px_8px_2px_var(--shadow-2xs-1-color,#1f232905),0px_2px_8px_2px_var(--shadow-2xs-1-color,#1f232905),0px_2px_4px_0px_var(--shadow-2xs-1-color,#1f232905)) rounded-t-[12px] text-[#a6a6a6] font-['PingFang_SC'] text-[12px] leading-[20px] tracking-[0px]",
83
+ children: [
84
+ /*#__PURE__*/ jsxs("div", {
85
+ className: "self-stretch shrink-0 flex flex-col items-start gap-y-[4px]",
86
+ children: [
87
+ isInternetVisible && /*#__PURE__*/ jsxs("div", {
88
+ className: "self-stretch shrink-0 flex items-center gap-x-[6px]",
89
+ children: [
90
+ /*#__PURE__*/ jsx("img", {
91
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/icon/icon_company_outlined.svg",
92
+ className: "shrink-0 w-3.5 h-3.5"
93
+ }),
94
+ /*#__PURE__*/ jsxs("p", {
95
+ className: "shrink-0 min-w-[96px] m-0! text-[#646A73] text-sm",
96
+ children: [
97
+ userinfo?.name,
98
+ "运营"
99
+ ]
100
+ })
101
+ ]
102
+ }),
103
+ /*#__PURE__*/ jsxs("div", {
104
+ className: "self-stretch shrink-0 flex items-center gap-x-[6px]",
105
+ children: [
106
+ /*#__PURE__*/ jsx("img", {
107
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/icon/icon_efficiency-ai_outlined.svg",
108
+ className: "shrink-0 w-3.5 h-3.5"
109
+ }),
110
+ /*#__PURE__*/ jsx("p", {
111
+ className: "shrink-0 min-w-[163px] m-0! text-[#646A73] text-sm",
112
+ children: "包含 AI 生成内容,请注意甄别"
113
+ })
114
+ ]
115
+ })
116
+ ]
117
+ }),
118
+ /*#__PURE__*/ jsxs("div", {
119
+ className: "self-stretch shrink-0 flex items-start gap-x-4",
120
+ children: [
121
+ /*#__PURE__*/ jsx("div", {
122
+ className: "flex-1 flex rounded-[99px] items-center justify-center border-[0.5px] border-[#D0D3D6] bg-white text-[#1F2329] cursor-pointer text-lg py-3",
123
+ onClick: (e)=>{
124
+ e.stopPropagation();
125
+ e.preventDefault();
126
+ setOpen(false);
127
+ setTimeout(()=>setVisible(false), 200);
128
+ window.localStorage?.setItem(HasClosedKey, 'true');
129
+ },
130
+ children: "不再展示"
131
+ }),
132
+ /*#__PURE__*/ jsx("div", {
133
+ className: "flex-1 flex rounded-[99px] items-center justify-center border-[0.5px] border-black bg-black text-white cursor-pointer text-lg py-3",
134
+ onClick: ()=>{
135
+ window.open('https://miaoda.feishu.cn/landing', '_blank');
136
+ },
137
+ children: "了解更多"
138
+ })
139
+ ]
140
+ })
141
+ ]
142
+ })
143
+ ]
144
+ })
145
+ })
146
+ ]
147
+ });
29
148
  return /*#__PURE__*/ jsxs(Popover, {
30
149
  open: open,
31
150
  onOpenChange: setOpen,
@@ -33,7 +152,7 @@ const Component = ()=>{
33
152
  /*#__PURE__*/ jsx(PopoverTrigger, {
34
153
  asChild: true,
35
154
  children: /*#__PURE__*/ jsxs("div", {
36
- className: "fixed right-4 bottom-4 inline-flex items-center gap-x-[4px] px-[12px] py-[6px] bg-[#ffffffcc] shadow-[2px_4px_16px_0px_#00000024] rounded-[99px] text-[var(--token-text-title,#1f2329)] font-['PingFang_SC'] text-[14px] leading-[22px] tracking-[0px] cursor-pointer z-[10000000]",
155
+ className: "fixed right-3 bottom-3 inline-flex items-center gap-x-1 border-solid border-[#ffffff1a] border px-2.5 py-1.5 bg-[#1f2329e5] backdrop-blur-[5px] shadow-[0px_6px_12px_0px_#41444a0a,0px_8px_24px_8px_#41444a0a] rounded-md text-[#ebebeb)] font-['PingFang_SC'] text-xs leading-[20px] tracking-[0px] z-[10000000] cursor-pointer",
37
156
  onMouseEnter: ()=>{
38
157
  clearTimeout(timeoutRef.current);
39
158
  setOpen(true);
@@ -44,31 +163,20 @@ const Component = ()=>{
44
163
  children: [
45
164
  /*#__PURE__*/ jsx("img", {
46
165
  src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodalogo.svg",
47
- className: "shrink-0 w-[18px] h-[18px]"
166
+ className: "shrink-0 w-[16px] h-[16px]"
48
167
  }),
49
168
  /*#__PURE__*/ jsx("p", {
50
- className: "shrink-0 min-w-[92px]",
51
- children: "由妙搭 AI 搭建"
52
- }),
53
- /*#__PURE__*/ jsx(Button, {
54
- size: "icon",
55
- variant: "ghost",
56
- className: "cursor-pointer rounded-full w-4 h-4 hover:bg-[#1f232914]",
57
- onClick: (e)=>{
58
- e.stopPropagation();
59
- e.preventDefault();
60
- setVisible(false);
61
- window.localStorage?.setItem(HasClosedKey, 'true');
62
- },
63
- children: /*#__PURE__*/ jsx(X, {
64
- className: "text-[#646A73] !w-[10px] !h-[10px]"
65
- })
169
+ className: "shrink-0 min-w-[60px] m-0! text-[#EBEBEB]",
170
+ children: "由妙搭搭建"
66
171
  })
67
172
  ]
68
173
  })
69
174
  }),
70
- /*#__PURE__*/ jsxs(PopoverContent, {
71
- className: "w-80 border-0 pt-2 bg-white rounded-xl shadow-[0px_10px_36px_10px_rgba(31,35,41,0.04)] shadow-[0px_8px_24px_0px_rgba(31,35,41,0.04)] shadow-[0px_6px_12px_-10px_rgba(31,35,41,0.06)] outline outline-[0.50px] outline-offset-[-0.50px] outline-[#DEE0E3] inline-flex flex-col justify-center items-start overflow-hidden p-0",
175
+ /*#__PURE__*/ jsx(PopoverContent, {
176
+ className: "overflow-hidden p-0 m-0 border-0 rounded-xl!",
177
+ style: {
178
+ boxShadow: '0 6px 12px 0 #41444a0a, 0 8px 24px 0 #41444a0a'
179
+ },
72
180
  side: "top",
73
181
  align: "end",
74
182
  sideOffset: 8,
@@ -79,87 +187,82 @@ const Component = ()=>{
79
187
  onMouseLeave: ()=>{
80
188
  timeoutRef.current = setTimeout(()=>setOpen(false), 100);
81
189
  },
82
- children: [
83
- /*#__PURE__*/ jsxs("div", {
84
- className: "self-stretch px-2 pt-2 pb-1 flex flex-col justify-start items-start gap-1",
85
- children: [
86
- isInternetVisible && /*#__PURE__*/ jsxs(Fragment, {
87
- children: [
88
- /*#__PURE__*/ jsx("div", {
89
- className: "self-stretch h-10 p-3 bg-token-bg-body rounded-lg flex flex-col justify-center items-start gap-2.5",
90
- children: /*#__PURE__*/ jsxs("div", {
91
- className: "self-stretch inline-flex justify-start items-center gap-2",
190
+ children: /*#__PURE__*/ jsxs("div", {
191
+ className: "flex flex-col bg-[#1F2021]",
192
+ children: [
193
+ /*#__PURE__*/ jsx("img", {
194
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover.png",
195
+ alt: "",
196
+ className: "w-72 h-32 cursor-pointer",
197
+ onClick: ()=>{
198
+ window.open('https://miaoda.feishu.cn/landing', '_blank');
199
+ }
200
+ }),
201
+ /*#__PURE__*/ jsxs("div", {
202
+ className: "flex flex-col justify-center items-end gap-y-[12px] border-solid border-[#ffffff0d] border pl-[14px] pr-[15px] pt-[11px] pb-[15px] w-[286px] shadow-(--shadow-2xs,0px_2px_8px_2px_var(--shadow-2xs-1-color,#1f232905),0px_2px_8px_2px_var(--shadow-2xs-1-color,#1f232905),0px_2px_4px_0px_var(--shadow-2xs-1-color,#1f232905)) rounded-t-[12px] text-[#a6a6a6] font-['PingFang_SC'] text-[12px] leading-[20px] tracking-[0px]",
203
+ children: [
204
+ /*#__PURE__*/ jsxs("div", {
205
+ className: "self-stretch shrink-0 flex flex-col items-start gap-y-[4px]",
206
+ children: [
207
+ isInternetVisible && /*#__PURE__*/ jsxs("div", {
208
+ className: "self-stretch shrink-0 flex items-center gap-x-[6px]",
92
209
  children: [
93
- /*#__PURE__*/ jsxs("div", {
94
- className: "flex-1 flex justify-start items-center gap-1",
210
+ /*#__PURE__*/ jsx("img", {
211
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/icon/icon_company_outlined.svg",
212
+ className: "shrink-0 w-[12px] h-[12px]"
213
+ }),
214
+ /*#__PURE__*/ jsxs("p", {
215
+ className: "shrink-0 min-w-[96px] m-0! text-[#a6a6a6]",
95
216
  children: [
96
- /*#__PURE__*/ jsx("img", {
97
- src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/icon_company_outlined.svg",
98
- className: "shrink-0 w-[14px] h-[14px]"
99
- }),
100
- /*#__PURE__*/ jsx("div", {
101
- className: "flex-1 justify-start text-[#2B2F36] text-sm font-normal font-['PingFang_SC'] leading-5",
102
- children: "运营方"
103
- })
217
+ userinfo?.name,
218
+ "运营"
104
219
  ]
220
+ })
221
+ ]
222
+ }),
223
+ /*#__PURE__*/ jsxs("div", {
224
+ className: "self-stretch shrink-0 flex items-center gap-x-[6px]",
225
+ children: [
226
+ /*#__PURE__*/ jsx("img", {
227
+ src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/icon/icon_efficiency-ai_outlined.svg",
228
+ className: "shrink-0 w-[12px] h-[12px]"
105
229
  }),
106
- /*#__PURE__*/ jsx("div", {
107
- className: "flex justify-start items-center gap-1 overflow-hidden",
108
- children: /*#__PURE__*/ jsx("div", {
109
- className: "justify-start text-[#646A73] text-sm font-normal font-['PingFang_SC'] leading-5",
110
- children: userinfo?.name
111
- })
230
+ /*#__PURE__*/ jsx("p", {
231
+ className: "shrink-0 min-w-[163px] m-0! text-[#a6a6a6]",
232
+ children: "包含 AI 生成内容,请注意甄别"
112
233
  })
113
234
  ]
114
235
  })
115
- }),
116
- /*#__PURE__*/ jsx("div", {
117
- className: "self-stretch px-2 flex flex-col justify-start items-start gap-2.5",
118
- children: /*#__PURE__*/ jsx("div", {
119
- className: "self-stretch h-0 outline outline-[0.50px] outline-offset-[-0.25px] outline-[rgba(31,35,41,0.15)]"
236
+ ]
237
+ }),
238
+ /*#__PURE__*/ jsxs("div", {
239
+ className: "self-stretch shrink-0 flex items-start gap-x-[8px]",
240
+ children: [
241
+ /*#__PURE__*/ jsx("div", {
242
+ className: "flex-1 flex rounded-lg h-[34px] items-center justify-center border-[0.5px] bg-transparent border-solid hover:bg-[#ffffff08] text-[#ebebeb99] hover:text-[#ebebebe6] cursor-pointer border-[#ffffff1c]",
243
+ "data-custom-element": "safety-close",
244
+ onClick: (e)=>{
245
+ e.stopPropagation();
246
+ e.preventDefault();
247
+ setVisible(false);
248
+ window.localStorage?.setItem(HasClosedKey, 'true');
249
+ },
250
+ children: "不再展示"
251
+ }),
252
+ /*#__PURE__*/ jsx("div", {
253
+ className: "flex-1 flex rounded-lg items-center justify-center h-[34px] border-[0.5px] border-solid border-[#ffffff1c] hover:border-[#ffffff33] bg-[#ffffff08] hover:bg-[#ffffff14] cursor-pointer text-[#ebebeb]",
254
+ "data-custom-element": "safety-more",
255
+ onClick: ()=>{
256
+ window.open('https://miaoda.feishu.cn/landing', '_blank');
257
+ },
258
+ children: "了解更多"
120
259
  })
121
- })
122
- ]
123
- }),
124
- /*#__PURE__*/ jsx("div", {
125
- className: "self-stretch h-10 p-3 bg-token-bg-body rounded-lg flex flex-col justify-center items-start gap-2.5 hover:bg-[var(--token-fill-hover,rgba(31,35,41,0.08))] cursor-pointer transition-colors",
126
- onClick: ()=>{
127
- window.open('https://miaoda.feishu.cn/', '_blank');
128
- },
129
- children: /*#__PURE__*/ jsx("div", {
130
- className: "self-stretch inline-flex justify-start items-center gap-2",
131
- children: /*#__PURE__*/ jsxs("div", {
132
- className: "flex-1 flex justify-start items-center gap-1",
133
- children: [
134
- /*#__PURE__*/ jsx("img", {
135
- src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/icon_efficiency_outlined.svg",
136
- className: "shrink-0 w-[14px] h-[14px]"
137
- }),
138
- /*#__PURE__*/ jsx("div", {
139
- className: "flex-1 justify-start text-[#2B2F36] text-sm font-normal font-['PingFang_SC'] leading-5",
140
- children: "了解妙搭"
141
- }),
142
- /*#__PURE__*/ jsx("img", {
143
- src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/icon_window-new_outlined.svg",
144
- className: "shrink-0 w-[12px] h-[12px]"
145
- })
146
- ]
147
- })
260
+ ]
148
261
  })
149
- })
150
- ]
151
- }),
152
- /*#__PURE__*/ jsx("div", {
153
- className: "self-stretch h-10 px-5 py-3 bg-[var(--token-bg-content-base,#F8F9FA)] inline-flex justify-start items-center gap-2",
154
- children: /*#__PURE__*/ jsx("div", {
155
- className: "flex-1 flex justify-start items-center gap-2",
156
- children: /*#__PURE__*/ jsx("div", {
157
- className: "justify-start text-[#8F959E] text-xs font-normal font-['PingFang_SC'] leading-5",
158
- children: "包含 AI 生成内容,请注意甄别"
159
- })
262
+ ]
160
263
  })
161
- })
162
- ]
264
+ ]
265
+ })
163
266
  })
164
267
  ]
165
268
  });
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const badgeVariants: (props?: {
4
- variant?: "default" | "destructive" | "outline" | "secondary";
4
+ variant?: "default" | "secondary" | "destructive" | "outline";
5
5
  } & import("class-variance-authority/dist/types").ClassProp) => string;
6
6
  declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
7
  asChild?: boolean;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const buttonVariants: (props?: {
4
- variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost";
4
+ variant?: "default" | "link" | "secondary" | "destructive" | "outline" | "ghost";
5
5
  size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg";
6
6
  } & import("class-variance-authority/dist/types").ClassProp) => string;
7
7
  declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import * as SheetPrimitive from "@radix-ui/react-dialog";
3
+ declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): React.JSX.Element;
4
+ declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): React.JSX.Element;
5
+ declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): React.JSX.Element;
6
+ declare function SheetContent({ className, children, side, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
7
+ side?: "top" | "right" | "bottom" | "left";
8
+ }): React.JSX.Element;
9
+ declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
+ declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+ declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): React.JSX.Element;
12
+ declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): React.JSX.Element;
13
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -0,0 +1,78 @@
1
+ "use client"
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import "react";
4
+ import { Close, Content, Description, Overlay, Portal, Root, Title, Trigger } from "@radix-ui/react-dialog";
5
+ import { clsxWithTw } from "../../utils/utils.js";
6
+ function Sheet({ ...props }) {
7
+ return /*#__PURE__*/ jsx(Root, {
8
+ "data-slot": "sheet",
9
+ ...props
10
+ });
11
+ }
12
+ function SheetTrigger({ ...props }) {
13
+ return /*#__PURE__*/ jsx(Trigger, {
14
+ "data-slot": "sheet-trigger",
15
+ ...props
16
+ });
17
+ }
18
+ function SheetClose({ ...props }) {
19
+ return /*#__PURE__*/ jsx(Close, {
20
+ "data-slot": "sheet-close",
21
+ ...props
22
+ });
23
+ }
24
+ function SheetPortal({ ...props }) {
25
+ return /*#__PURE__*/ jsx(Portal, {
26
+ "data-slot": "sheet-portal",
27
+ ...props
28
+ });
29
+ }
30
+ function SheetOverlay({ className, ...props }) {
31
+ return /*#__PURE__*/ jsx(Overlay, {
32
+ "data-slot": "sheet-overlay",
33
+ className: clsxWithTw("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className),
34
+ ...props
35
+ });
36
+ }
37
+ function SheetContent({ className, children, side = "right", ...props }) {
38
+ return /*#__PURE__*/ jsxs(SheetPortal, {
39
+ children: [
40
+ /*#__PURE__*/ jsx(SheetOverlay, {}),
41
+ /*#__PURE__*/ jsx(Content, {
42
+ "data-slot": "sheet-content",
43
+ className: clsxWithTw("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", "right" === side && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", "left" === side && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", "top" === side && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", "bottom" === side && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", className),
44
+ ...props,
45
+ children: children
46
+ })
47
+ ]
48
+ });
49
+ }
50
+ function SheetHeader({ className, ...props }) {
51
+ return /*#__PURE__*/ jsx("div", {
52
+ "data-slot": "sheet-header",
53
+ className: clsxWithTw("flex flex-col gap-1.5 p-4", className),
54
+ ...props
55
+ });
56
+ }
57
+ function SheetFooter({ className, ...props }) {
58
+ return /*#__PURE__*/ jsx("div", {
59
+ "data-slot": "sheet-footer",
60
+ className: clsxWithTw("mt-auto flex flex-col gap-2 p-4", className),
61
+ ...props
62
+ });
63
+ }
64
+ function SheetTitle({ className, ...props }) {
65
+ return /*#__PURE__*/ jsx(Title, {
66
+ "data-slot": "sheet-title",
67
+ className: clsxWithTw("text-foreground font-semibold", className),
68
+ ...props
69
+ });
70
+ }
71
+ function SheetDescription({ className, ...props }) {
72
+ return /*#__PURE__*/ jsx(Description, {
73
+ "data-slot": "sheet-description",
74
+ className: clsxWithTw("text-muted-foreground text-sm", className),
75
+ ...props
76
+ });
77
+ }
78
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/client-toolkit",
3
- "version": "1.1.17",
3
+ "version": "1.1.18",
4
4
  "types": "./lib/index.d.ts",
5
5
  "main": "./lib/index.js",
6
6
  "files": [
@@ -103,6 +103,7 @@
103
103
  "devDependencies": {
104
104
  "@biomejs/biome": "2.0.6",
105
105
  "@changesets/cli": "^2.29.5",
106
+ "@radix-ui/react-dialog": "^1.1.15",
106
107
  "@rsbuild/core": "~1.4.13",
107
108
  "@rsbuild/plugin-react": "^1.3.4",
108
109
  "@rslib/core": "^0.15.0",