dgz-ui 1.2.21 → 1.2.22
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/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/tab/index.es.js +1 -1
- package/dist/tab/index.umd.js +1 -1
- package/dist/{tabs-9ZLcVyAW.js → tabs-DQAuE_IR.js} +11 -10
- package/dist/{tabs-Cjly15tx.cjs → tabs-wEpqtj0K.cjs} +2 -2
- package/dist/types/ui/tab/tabs.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -15,7 +15,7 @@ import { P as pe, b as ge, a as de } from "./popover-HTqpqYpJ.js";
|
|
|
15
15
|
import { S as be, a as me } from "./scroll-area-JqD01-EB.js";
|
|
16
16
|
import { S as Te } from "./separator-Dno6nZNU.js";
|
|
17
17
|
import { S as Se, b as Ce, c as fe, g as xe, e as Ae, d as Pe, f as Me, a as we } from "./sheet-psfPkdYr.js";
|
|
18
|
-
import { T as he, c as Be, a as Ie, b as ve } from "./tabs-
|
|
18
|
+
import { T as he, c as Be, a as Ie, b as ve } from "./tabs-DQAuE_IR.js";
|
|
19
19
|
import { T as Re, b as He, g as Le, f as Ve, c as Ee, d as Ge, a as Ue, e as je } from "./table-BE7fnN23.js";
|
|
20
20
|
import { T as Oe, b as Ne, c as qe, a as ze } from "./tooltip-C35SqwxH.js";
|
|
21
21
|
import { S as Ke } from "./skeleton-BdurNoF7.js";
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./alert-BQbJzCCe.cjs"),r=require("./alert-dialog-DgLvIacr.cjs"),p=require("./avatar-Cazs84bq.cjs"),T=require("./badge-Cz0KSxjv.cjs"),g=require("./breadcrumb-BLYa4J1K.cjs"),S=require("./button-BfuwxVnp.cjs"),u=require("./card-DbDK1DO-.cjs"),i=require("./timepicker-BXcm5Qil.cjs"),t=require("./dialog-T8q3bOve.cjs"),o=require("./dropdown-menu-BvmXUvdj.cjs"),e=require("./radio-group-n04FS_GP.cjs"),m=require("./react-select-DxHKWBxf.cjs"),n=require("./pagination-KmGNDLAJ.cjs"),D=require("./popover-pf70ehGz.cjs"),C=require("./scroll-area-Dqte6XRY.cjs"),A=require("./separator-CQaYTs8a.cjs"),a=require("./sheet-Dma4ptc1.cjs"),d=require("./tabs-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./alert-BQbJzCCe.cjs"),r=require("./alert-dialog-DgLvIacr.cjs"),p=require("./avatar-Cazs84bq.cjs"),T=require("./badge-Cz0KSxjv.cjs"),g=require("./breadcrumb-BLYa4J1K.cjs"),S=require("./button-BfuwxVnp.cjs"),u=require("./card-DbDK1DO-.cjs"),i=require("./timepicker-BXcm5Qil.cjs"),t=require("./dialog-T8q3bOve.cjs"),o=require("./dropdown-menu-BvmXUvdj.cjs"),e=require("./radio-group-n04FS_GP.cjs"),m=require("./react-select-DxHKWBxf.cjs"),n=require("./pagination-KmGNDLAJ.cjs"),D=require("./popover-pf70ehGz.cjs"),C=require("./scroll-area-Dqte6XRY.cjs"),A=require("./separator-CQaYTs8a.cjs"),a=require("./sheet-Dma4ptc1.cjs"),d=require("./tabs-wEpqtj0K.cjs"),l=require("./table-vjx6Xr6c.cjs"),s=require("./tooltip-BDaLgNYx.cjs"),M=require("./skeleton-DzyOK_Gm.cjs"),b=require("./collapsible-DRRR6ZDC.cjs"),w=require("./utils-BeXF6FlA.cjs");exports.Alert=c.Alert;exports.AlertDescription=c.AlertDescription;exports.AlertTitle=c.AlertTitle;exports.alertVariants=c.alertVariants;exports.AlertDialog=r.AlertDialog;exports.AlertDialogAction=r.AlertDialogAction;exports.AlertDialogCancel=r.AlertDialogCancel;exports.AlertDialogContent=r.AlertDialogContent;exports.AlertDialogDescription=r.AlertDialogDescription;exports.AlertDialogFooter=r.AlertDialogFooter;exports.AlertDialogHeader=r.AlertDialogHeader;exports.AlertDialogOverlay=r.AlertDialogOverlay;exports.AlertDialogPortal=r.AlertDialogPortal;exports.AlertDialogTitle=r.AlertDialogTitle;exports.AlertDialogTrigger=r.AlertDialogTrigger;exports.Avatar=p.Avatar;exports.AvatarFallback=p.AvatarFallback;exports.AvatarImage=p.AvatarImage;exports.avatarVariants=p.avatarVariants;exports.Badge=T.Badge;exports.badgeVariants=T.badgeVariants;exports.Breadcrumb=g.Breadcrumb;exports.BreadcrumbEllipsis=g.BreadcrumbEllipsis;exports.BreadcrumbItem=g.BreadcrumbItem;exports.BreadcrumbList=g.BreadcrumbList;exports.BreadcrumbPage=g.BreadcrumbPage;exports.BreadcrumbSeparator=g.BreadcrumbSeparator;exports.Button=S.Button;exports.buttonVariants=S.buttonVariants;exports.Card=u.Card;exports.CardContent=u.CardContent;exports.CardDescription=u.CardDescription;exports.CardFooter=u.CardFooter;exports.CardHeader=u.CardHeader;exports.CardTitle=u.CardTitle;exports.Calendar=i.Calendar;exports.DATE=i.DATE;exports.DatePicker=i.DatePicker;exports.HOUR=i.HOUR;exports.MINUTE=i.MINUTE;exports.TIME=i.TIME;exports.TimePicker=i.TimePicker;exports.Dialog=t.Dialog;exports.DialogClose=t.DialogClose;exports.DialogContent=t.DialogContent;exports.DialogDescription=t.DialogDescription;exports.DialogFooter=t.DialogFooter;exports.DialogHeader=t.DialogHeader;exports.DialogOverlay=t.DialogOverlay;exports.DialogPortal=t.DialogPortal;exports.DialogTitle=t.DialogTitle;exports.DialogTrigger=t.DialogTrigger;exports.DropdownMenu=o.DropdownMenu;exports.DropdownMenuCheckboxItem=o.DropdownMenuCheckboxItem;exports.DropdownMenuContent=o.DropdownMenuContent;exports.DropdownMenuGroup=o.DropdownMenuGroup;exports.DropdownMenuItem=o.DropdownMenuItem;exports.DropdownMenuLabel=o.DropdownMenuLabel;exports.DropdownMenuPortal=o.DropdownMenuPortal;exports.DropdownMenuRadioGroup=o.DropdownMenuRadioGroup;exports.DropdownMenuRadioItem=o.DropdownMenuRadioItem;exports.DropdownMenuSeparator=o.DropdownMenuSeparator;exports.DropdownMenuShortcut=o.DropdownMenuShortcut;exports.DropdownMenuSub=o.DropdownMenuSub;exports.DropdownMenuSubContent=o.DropdownMenuSubContent;exports.DropdownMenuSubTrigger=o.DropdownMenuSubTrigger;exports.DropdownMenuTrigger=o.DropdownMenuTrigger;exports.Checkbox=e.Checkbox;exports.FileUpload=e.FileUpload;exports.Form=e.Form;exports.FormControl=e.FormControl;exports.FormDescription=e.FormDescription;exports.FormField=e.FormField;exports.FormItem=e.FormItem;exports.FormLabel=e.FormLabel;exports.FormMessage=e.FormMessage;exports.Input=e.Input;exports.Label=e.Label;exports.RadioGroup=e.RadioGroup;exports.RadioGroupItem=e.RadioGroupItem;exports.Select=e.Select;exports.SelectContent=e.SelectContent;exports.SelectGroup=e.SelectGroup;exports.SelectItem=e.SelectItem;exports.SelectLabel=e.SelectLabel;exports.SelectScrollDownButton=e.SelectScrollDownButton;exports.SelectScrollUpButton=e.SelectScrollUpButton;exports.SelectSeparator=e.SelectSeparator;exports.SelectTrigger=e.SelectTrigger;exports.SelectValue=e.SelectValue;exports.Switch=e.Switch;exports.Textarea=e.Textarea;exports.inputVariants=e.inputVariants;exports.useFormField=e.useFormField;exports.ReactSelect=m.ReactSelect;exports.Pagination=n.Pagination;exports.PaginationContent=n.PaginationContent;exports.PaginationEllipsis=n.PaginationEllipsis;exports.PaginationItem=n.PaginationItem;exports.PaginationLink=n.PaginationLink;exports.PaginationNext=n.PaginationNext;exports.PaginationPrevious=n.PaginationPrevious;exports.Popover=D.Popover;exports.PopoverContent=D.PopoverContent;exports.PopoverTrigger=D.PopoverTrigger;exports.ScrollArea=C.ScrollArea;exports.ScrollBar=C.ScrollBar;exports.Separator=A.Separator;exports.Sheet=a.Sheet;exports.SheetClose=a.SheetClose;exports.SheetContent=a.SheetContent;exports.SheetDescription=a.SheetDescription;exports.SheetFooter=a.SheetFooter;exports.SheetHeader=a.SheetHeader;exports.SheetTitle=a.SheetTitle;exports.SheetTrigger=a.SheetTrigger;exports.Tabs=d.Tabs;exports.TabsContent=d.TabsContent;exports.TabsList=d.TabsList;exports.TabsTrigger=d.TabsTrigger;exports.Table=l.Table;exports.TableBody=l.TableBody;exports.TableCaption=l.TableCaption;exports.TableCell=l.TableCell;exports.TableFooter=l.TableFooter;exports.TableHead=l.TableHead;exports.TableHeader=l.TableHeader;exports.TableRow=l.TableRow;exports.Tooltip=s.Tooltip;exports.TooltipContent=s.TooltipContent;exports.TooltipProvider=s.TooltipProvider;exports.TooltipTrigger=s.TooltipTrigger;exports.Skeleton=M.Skeleton;exports.Collapsible=b.Collapsible;exports.CollapsibleContent=b.CollapsibleContent;exports.CollapsibleTrigger=b.CollapsibleTrigger;exports.cn=w.cn;
|
package/dist/tab/index.es.js
CHANGED
package/dist/tab/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../tabs-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../tabs-wEpqtj0K.cjs");exports.Tabs=s.Tabs;exports.TabsContent=s.TabsContent;exports.TabsList=s.TabsList;exports.TabsTrigger=s.TabsTrigger;
|
|
@@ -82,7 +82,7 @@ var E = "TabsList", _ = v.forwardRef(
|
|
|
82
82
|
_.displayName = E;
|
|
83
83
|
var A = "TabsTrigger", P = v.forwardRef(
|
|
84
84
|
(t, a) => {
|
|
85
|
-
const { __scopeTabs: n, value: o, disabled: i = !1, ...s } = t, r = C(A, n), u = I(n), m = M(r.baseId, o), d =
|
|
85
|
+
const { __scopeTabs: n, value: o, disabled: i = !1, ...s } = t, r = C(A, n), u = I(n), m = M(r.baseId, o), d = z(r.baseId, o), c = o === r.value;
|
|
86
86
|
return /* @__PURE__ */ e.jsx(
|
|
87
87
|
X,
|
|
88
88
|
{
|
|
@@ -122,7 +122,7 @@ var A = "TabsTrigger", P = v.forwardRef(
|
|
|
122
122
|
P.displayName = A;
|
|
123
123
|
var k = "TabsContent", B = v.forwardRef(
|
|
124
124
|
(t, a) => {
|
|
125
|
-
const { __scopeTabs: n, value: o, forceMount: i, children: s, ...r } = t, u = C(k, n), m = M(u.baseId, o), d =
|
|
125
|
+
const { __scopeTabs: n, value: o, forceMount: i, children: s, ...r } = t, u = C(k, n), m = M(u.baseId, o), d = z(u.baseId, o), c = o === u.value, l = v.useRef(c);
|
|
126
126
|
return v.useEffect(() => {
|
|
127
127
|
const f = requestAnimationFrame(() => l.current = !1);
|
|
128
128
|
return () => cancelAnimationFrame(f);
|
|
@@ -151,10 +151,10 @@ B.displayName = k;
|
|
|
151
151
|
function M(t, a) {
|
|
152
152
|
return `${t}-trigger-${a}`;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function z(t, a) {
|
|
155
155
|
return `${t}-content-${a}`;
|
|
156
156
|
}
|
|
157
|
-
var st = L, T = _,
|
|
157
|
+
var st = L, T = _, F = P, V = B;
|
|
158
158
|
const Nt = st, R = et(
|
|
159
159
|
"inline-flex items-center justify-center gap-1 p-1 text-secondary",
|
|
160
160
|
{
|
|
@@ -262,7 +262,7 @@ const Nt = st, R = et(
|
|
|
262
262
|
r
|
|
263
263
|
),
|
|
264
264
|
"aria-label": "Scroll right",
|
|
265
|
-
children: /* @__PURE__ */ e.jsx(ot, { className: "text-secondary
|
|
265
|
+
children: /* @__PURE__ */ e.jsx(ot, { className: "text-secondary size-4" })
|
|
266
266
|
}
|
|
267
267
|
),
|
|
268
268
|
/* @__PURE__ */ e.jsx("style", { children: `
|
|
@@ -285,20 +285,21 @@ const Nt = st, R = et(
|
|
|
285
285
|
);
|
|
286
286
|
it.displayName = T.displayName;
|
|
287
287
|
const ct = w(({ className: t, ...a }, n) => /* @__PURE__ */ e.jsx(
|
|
288
|
-
|
|
288
|
+
F,
|
|
289
289
|
{
|
|
290
290
|
ref: n,
|
|
291
291
|
className: b(
|
|
292
292
|
"text-body-xs-medium relative box-border inline-flex h-7 flex-1 cursor-pointer items-center justify-center px-3 py-1 whitespace-nowrap transition-all outline-none disabled:pointer-events-none disabled:opacity-50",
|
|
293
293
|
"data-[state=inactive]:hover:!bg-item-tertiary-hover data-[state=inactive]:hover:text-primary",
|
|
294
|
-
"data-[state=active]:text-primary"
|
|
294
|
+
"data-[state=active]:text-primary",
|
|
295
|
+
t
|
|
295
296
|
),
|
|
296
297
|
...a
|
|
297
298
|
}
|
|
298
299
|
));
|
|
299
|
-
ct.displayName =
|
|
300
|
+
ct.displayName = F.displayName;
|
|
300
301
|
const lt = w(({ className: t, ...a }, n) => /* @__PURE__ */ e.jsx(
|
|
301
|
-
|
|
302
|
+
V,
|
|
302
303
|
{
|
|
303
304
|
ref: n,
|
|
304
305
|
className: b(
|
|
@@ -308,7 +309,7 @@ const lt = w(({ className: t, ...a }, n) => /* @__PURE__ */ e.jsx(
|
|
|
308
309
|
...a
|
|
309
310
|
}
|
|
310
311
|
));
|
|
311
|
-
lt.displayName =
|
|
312
|
+
lt.displayName = V.displayName;
|
|
312
313
|
export {
|
|
313
314
|
Nt as T,
|
|
314
315
|
it as a,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";const o=require("./jsx-runtime-DUiatUiq.cjs"),b=require("react"),h=require("./index-Ch6ABCiC.cjs"),J=require("./index-DcWZbXs6.cjs"),y=require("./index-BAtFJJh-.cjs"),j=require("./index-CMmIsz5H.cjs"),Q=require("./index-C3BrtnXJ.cjs"),w=require("./index-C1ZpNc2P.cjs"),U=require("./index-BbFAJcHl.cjs"),N=require("./button-BfuwxVnp.cjs"),x=require("./utils-BeXF6FlA.cjs"),X=require("./chevron-left-BkVeYH8m.cjs"),Y=require("./chevron-right-C4aUapAw.cjs");function Z(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=Z(b);var R="Tabs",[ee,oe]=J.createContextScope(R,[y.createRovingFocusGroupScope]),S=y.createRovingFocusGroupScope(),[te,E]=ee(R),L=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,onValueChange:i,defaultValue:s,orientation:r="horizontal",dir:d,activationMode:v="automatic",...u}=e,c=Q.useDirection(d),[l,f]=w.useControllableState({prop:a,onChange:i,defaultProp:s??"",caller:R});return o.jsxRuntimeExports.jsx(te,{scope:n,baseId:w.useId(),value:l,onValueChange:f,orientation:r,dir:c,activationMode:v,children:o.jsxRuntimeExports.jsx(j.Primitive.div,{dir:c,"data-orientation":r,...u,ref:t})})});L.displayName=R;var I="TabsList",_=m.forwardRef((e,t)=>{const{__scopeTabs:n,loop:a=!0,...i}=e,s=E(I,n),r=S(n);return o.jsxRuntimeExports.jsx(y.Root,{asChild:!0,...r,orientation:s.orientation,dir:s.dir,loop:a,children:o.jsxRuntimeExports.jsx(j.Primitive.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:t})})});_.displayName=I;var P="TabsTrigger",q=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,disabled:i=!1,...s}=e,r=E(P,n),d=S(n),v=k(r.baseId,a),u=M(r.baseId,a),c=a===r.value;return o.jsxRuntimeExports.jsx(y.Item,{asChild:!0,...d,focusable:!i,active:c,children:o.jsxRuntimeExports.jsx(j.Primitive.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:v,...s,ref:t,onMouseDown:h.composeEventHandlers(e.onMouseDown,l=>{!i&&l.button===0&&l.ctrlKey===!1?r.onValueChange(a):l.preventDefault()}),onKeyDown:h.composeEventHandlers(e.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&r.onValueChange(a)}),onFocus:h.composeEventHandlers(e.onFocus,()=>{const l=r.activationMode!=="manual";!c&&!i&&l&&r.onValueChange(a)})})})});q.displayName=P;var $="TabsContent",A=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,forceMount:i,children:s,...r}=e,d=E($,n),v=k(d.baseId,a),u=M(d.baseId,a),c=a===d.value,l=m.useRef(c);return m.useEffect(()=>{const f=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(f)},[]),o.jsxRuntimeExports.jsx(h.Presence,{present:i||c,children:({present:f})=>o.jsxRuntimeExports.jsx(j.Primitive.div,{"data-state":c?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":v,hidden:!f,id:u,tabIndex:0,...r,ref:t,style:{...e.style,animationDuration:l.current?"0s":void 0},children:f&&s})})});A.displayName=$;function k(e,t){return`${e}-trigger-${t}`}function M(e,t){return`${e}-content-${t}`}var ne=L,T=_,
|
|
1
|
+
"use strict";const o=require("./jsx-runtime-DUiatUiq.cjs"),b=require("react"),h=require("./index-Ch6ABCiC.cjs"),J=require("./index-DcWZbXs6.cjs"),y=require("./index-BAtFJJh-.cjs"),j=require("./index-CMmIsz5H.cjs"),Q=require("./index-C3BrtnXJ.cjs"),w=require("./index-C1ZpNc2P.cjs"),U=require("./index-BbFAJcHl.cjs"),N=require("./button-BfuwxVnp.cjs"),x=require("./utils-BeXF6FlA.cjs"),X=require("./chevron-left-BkVeYH8m.cjs"),Y=require("./chevron-right-C4aUapAw.cjs");function Z(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=Z(b);var R="Tabs",[ee,oe]=J.createContextScope(R,[y.createRovingFocusGroupScope]),S=y.createRovingFocusGroupScope(),[te,E]=ee(R),L=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,onValueChange:i,defaultValue:s,orientation:r="horizontal",dir:d,activationMode:v="automatic",...u}=e,c=Q.useDirection(d),[l,f]=w.useControllableState({prop:a,onChange:i,defaultProp:s??"",caller:R});return o.jsxRuntimeExports.jsx(te,{scope:n,baseId:w.useId(),value:l,onValueChange:f,orientation:r,dir:c,activationMode:v,children:o.jsxRuntimeExports.jsx(j.Primitive.div,{dir:c,"data-orientation":r,...u,ref:t})})});L.displayName=R;var I="TabsList",_=m.forwardRef((e,t)=>{const{__scopeTabs:n,loop:a=!0,...i}=e,s=E(I,n),r=S(n);return o.jsxRuntimeExports.jsx(y.Root,{asChild:!0,...r,orientation:s.orientation,dir:s.dir,loop:a,children:o.jsxRuntimeExports.jsx(j.Primitive.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:t})})});_.displayName=I;var P="TabsTrigger",q=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,disabled:i=!1,...s}=e,r=E(P,n),d=S(n),v=k(r.baseId,a),u=M(r.baseId,a),c=a===r.value;return o.jsxRuntimeExports.jsx(y.Item,{asChild:!0,...d,focusable:!i,active:c,children:o.jsxRuntimeExports.jsx(j.Primitive.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:v,...s,ref:t,onMouseDown:h.composeEventHandlers(e.onMouseDown,l=>{!i&&l.button===0&&l.ctrlKey===!1?r.onValueChange(a):l.preventDefault()}),onKeyDown:h.composeEventHandlers(e.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&r.onValueChange(a)}),onFocus:h.composeEventHandlers(e.onFocus,()=>{const l=r.activationMode!=="manual";!c&&!i&&l&&r.onValueChange(a)})})})});q.displayName=P;var $="TabsContent",A=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,forceMount:i,children:s,...r}=e,d=E($,n),v=k(d.baseId,a),u=M(d.baseId,a),c=a===d.value,l=m.useRef(c);return m.useEffect(()=>{const f=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(f)},[]),o.jsxRuntimeExports.jsx(h.Presence,{present:i||c,children:({present:f})=>o.jsxRuntimeExports.jsx(j.Primitive.div,{"data-state":c?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":v,hidden:!f,id:u,tabIndex:0,...r,ref:t,style:{...e.style,animationDuration:l.current?"0s":void 0},children:f&&s})})});A.displayName=$;function k(e,t){return`${e}-trigger-${t}`}function M(e,t){return`${e}-content-${t}`}var ne=L,T=_,z=q,B=A;const ae=ne,C=U.cva("inline-flex items-center justify-center gap-1 p-1 text-secondary",{variants:{type:{default:"",segmented:"bg-item-tertiary [&>button]:data-[state=active]:shadow-sm",line:"[&>button]:data-[state=active]:after:absolute [&>button]:data-[state=active]:after:-bottom-1.5 [&>button]:data-[state=active]:after:content-[''] [&>button]:data-[state=active]:after:w-full [&>button]:data-[state=active]:after:h-0.5 [&>button]:data-[state=active]:after:bg-primary"},variant:{default:"[&>button]:data-[state=active]:bg-background",soft:"[&>button]:data-[state=active]:bg-item-tertiary [&>button]:data-[state=active]:border [&>button]:data-[state=active]:border-alpha-strong"},rounded:{default:"rounded-md [&>button]:rounded-md",pill:"rounded-full [&>button]:rounded-full"}},defaultVariants:{type:"default",variant:"default",rounded:"default"}}),F=b.forwardRef(({className:e,rounded:t,variant:n,type:a,full:i,scrollable:s,scrollButtonClassName:r,...d},v)=>{const u=b.useRef(null),[c,l]=b.useState(!1),[f,G]=b.useState(!1),g=b.useCallback(()=>{if(u.current&&s){const{scrollLeft:p,scrollWidth:K,clientWidth:W}=u.current;l(p>0),G(p<K-W-1)}},[s]);b.useEffect(()=>{if(s){g();const p=()=>g();return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)}},[g,s]);const O=()=>{u.current&&u.current.scrollBy({left:-200,behavior:"smooth"})},H=()=>{u.current&&u.current.scrollBy({left:200,behavior:"smooth"})};return s?o.jsxRuntimeExports.jsxs("div",{className:"relative flex items-center",children:[c&&o.jsxRuntimeExports.jsx(N.Button,{type:"button",size:"icon",variant:"secondary",onClick:O,className:x.cn("absolute left-0 z-10 h-full w-6",r),"aria-label":"Scroll left",children:o.jsxRuntimeExports.jsx(X.ChevronLeft,{className:"text-secondary h-4 w-4"})}),o.jsxRuntimeExports.jsx("div",{ref:u,className:"scrollbar-hide overflow-x-auto scroll-smooth",style:{scrollbarWidth:"none",msOverflowStyle:"none",paddingLeft:c?"32px":"0",paddingRight:f?"32px":"0"},onScroll:g,children:o.jsxRuntimeExports.jsx(T,{ref:v,className:x.cn(i&&"!flex","min-w-max",C({rounded:t,variant:n,type:a,className:e})),...d})}),f&&o.jsxRuntimeExports.jsx(N.Button,{type:"button",size:"icon",variant:"secondary",onClick:H,className:x.cn("absolute right-0 z-10 h-full w-6",r),"aria-label":"Scroll right",children:o.jsxRuntimeExports.jsx(Y.ChevronRight,{className:"text-secondary size-4"})}),o.jsxRuntimeExports.jsx("style",{children:`
|
|
2
2
|
.scrollbar-hide::-webkit-scrollbar {
|
|
3
3
|
display: none;
|
|
4
4
|
}
|
|
5
|
-
`})]}):o.jsxRuntimeExports.jsx(T,{ref:v,className:x.cn(i&&"!flex",C({rounded:t,variant:n,type:a,className:e})),...d})});
|
|
5
|
+
`})]}):o.jsxRuntimeExports.jsx(T,{ref:v,className:x.cn(i&&"!flex",C({rounded:t,variant:n,type:a,className:e})),...d})});F.displayName=T.displayName;const D=b.forwardRef(({className:e,...t},n)=>o.jsxRuntimeExports.jsx(z,{ref:n,className:x.cn("text-body-xs-medium relative box-border inline-flex h-7 flex-1 cursor-pointer items-center justify-center px-3 py-1 whitespace-nowrap transition-all outline-none disabled:pointer-events-none disabled:opacity-50","data-[state=inactive]:hover:!bg-item-tertiary-hover data-[state=inactive]:hover:text-primary","data-[state=active]:text-primary",e),...t}));D.displayName=z.displayName;const V=b.forwardRef(({className:e,...t},n)=>o.jsxRuntimeExports.jsx(B,{ref:n,className:x.cn("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...t}));V.displayName=B.displayName;exports.Tabs=ae;exports.TabsContent=V;exports.TabsList=F;exports.TabsTrigger=D;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../src/ui/tab/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EACL,KAAK,wBAAwB,EAO9B,MAAM,OAAO,CAAC;AAIf,QAAA,MAAM,IAAI,oHAAqB,CAAC;AAEhC,QAAA,MAAM,gBAAgB;;;;8EAwBrB,CAAC;AAEF,MAAM,WAAW,aACf,SAAQ,wBAAwB,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,EACzD,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACvC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,QAAA,MAAM,QAAQ,0GAmIb,CAAC;AAGF,QAAA,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../src/ui/tab/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EACL,KAAK,wBAAwB,EAO9B,MAAM,OAAO,CAAC;AAIf,QAAA,MAAM,IAAI,oHAAqB,CAAC;AAEhC,QAAA,MAAM,gBAAgB;;;;8EAwBrB,CAAC;AAEF,MAAM,WAAW,aACf,SAAQ,wBAAwB,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,EACzD,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACvC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,QAAA,MAAM,QAAQ,0GAmIb,CAAC;AAGF,QAAA,MAAM,WAAW,8LAcf,CAAC;AAGH,QAAA,MAAM,WAAW,wLAYf,CAAC;AAGH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
|