@codefast/ui 0.0.58 → 0.0.60
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/{chunk-IUT4SHXE.mjs → chunk-5RHKZ6R6.mjs} +2 -2
- package/dist/chunk-5RHKZ6R6.mjs.map +1 -0
- package/dist/{chunk-426OXZ4E.js → chunk-7GYOFJ2E.js} +2 -2
- package/dist/{chunk-426OXZ4E.js.map → chunk-7GYOFJ2E.js.map} +1 -1
- package/dist/{chunk-TVVOS66G.mjs → chunk-FJH7XRCZ.mjs} +2 -2
- package/dist/{chunk-TVVOS66G.mjs.map → chunk-FJH7XRCZ.mjs.map} +1 -1
- package/dist/{chunk-BEBSUUL4.js → chunk-I7YJNEPR.js} +2 -2
- package/dist/{chunk-BEBSUUL4.js.map → chunk-I7YJNEPR.js.map} +1 -1
- package/dist/{chunk-W3VRLCP7.mjs → chunk-PCQFSOYQ.mjs} +1 -1
- package/dist/chunk-PCQFSOYQ.mjs.map +1 -0
- package/dist/{chunk-JI2ITVUE.js → chunk-VVA2EE5V.js} +1 -1
- package/dist/{chunk-JI2ITVUE.js.map → chunk-VVA2EE5V.js.map} +1 -1
- package/dist/plugin/animate.plugin.js +1 -1
- package/dist/plugin/animate.plugin.mjs +1 -1
- package/dist/react/alert-dialog.js +1 -1
- package/dist/react/alert-dialog.mjs +1 -1
- package/dist/react/button.js +1 -1
- package/dist/react/button.mjs +1 -1
- package/dist/react/calendar.js +1 -1
- package/dist/react/calendar.mjs +1 -1
- package/dist/react/carousel.js +1 -1
- package/dist/react/carousel.mjs +1 -1
- package/dist/react/command.js +1 -1
- package/dist/react/command.mjs +1 -1
- package/dist/react/data-table.js +1 -1
- package/dist/react/data-table.mjs +1 -1
- package/dist/react/dialog.js +1 -1
- package/dist/react/dialog.mjs +1 -1
- package/dist/react/pagination.js +1 -1
- package/dist/react/pagination.mjs +1 -1
- package/dist/react/scroll-area.js +1 -1
- package/dist/react/scroll-area.js.map +1 -1
- package/dist/react/scroll-area.mjs +1 -1
- package/dist/react/scroll-area.mjs.map +1 -1
- package/dist/react/sheet.d.mts +13 -11
- package/dist/react/sheet.d.ts +13 -11
- package/dist/react/sheet.js +1 -1
- package/dist/react/sheet.js.map +1 -1
- package/dist/react/sheet.mjs +1 -1
- package/dist/react/sheet.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/tailwind.config.js +1 -1
- package/dist/tailwind.config.mjs +1 -1
- package/package.json +1 -1
- package/plugin/animate.plugin.ts +1 -1
- package/src/react/button.tsx +4 -4
- package/src/react/dialog.tsx +2 -2
- package/src/react/scroll-area.tsx +2 -2
- package/src/react/sheet.tsx +50 -28
- package/dist/chunk-IUT4SHXE.mjs.map +0 -1
- package/dist/chunk-W3VRLCP7.mjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as D,c as f,d as T,g as x,i as w}from"../chunk-ZIB4ZTST.mjs";import{a as c,b as d,h as m,i as r,j as p,l as u,m as g}from"../chunk-BM5KYF6Y.mjs";import{b as o}from"../chunk-
|
|
1
|
+
"use client";import{a as D,c as f,d as T,g as x,i as w}from"../chunk-ZIB4ZTST.mjs";import{a as c,b as d,h as m,i as r,j as p,l as u,m as g}from"../chunk-BM5KYF6Y.mjs";import{b as o}from"../chunk-FJH7XRCZ.mjs";import"../chunk-BNKSZEF2.mjs";import{b as l}from"../chunk-LEUB3C3L.mjs";import{ArrowDownIcon as C,ArrowUpIcon as N,CaretSortIcon as v,ChevronLeftIcon as S,ChevronRightIcon as P,DoubleArrowLeftIcon as b,DoubleArrowRightIcon as M,EyeNoneIcon as I,MixerHorizontalIcon as h}from"@radix-ui/react-icons";import{jsx as e,jsxs as t}from"react/jsx-runtime";function A({table:a}){return t(c,{children:[e(d,{asChild:!0,children:t(o,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[e(h,{className:"mr-2 size-4"}),"View"]})}),t(m,{align:"end",className:"w-36",children:[e(u,{children:"Toggle columns"}),e(g,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>e(p,{className:"capitalize",checked:n.getIsVisible(),onCheckedChange:s=>{n.toggleVisibility(!!s)},children:n.id},n.id))]})]})}function B({table:a,className:n,...s}){return t("div",{className:l("flex items-center justify-between px-2",n),...s,children:[t("div",{className:"text-muted-foreground flex-1 text-sm",children:[a.getFilteredSelectedRowModel().rows.length," of ",a.getFilteredRowModel().rows.length," row(s) selected."]}),t("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[t("div",{className:"flex items-center space-x-2",children:[e("p",{className:"text-sm font-medium",children:"Rows per page"}),t(D,{value:String(a.getState().pagination.pageSize),onValueChange:i=>{a.setPageSize(Number(i))},children:[e(T,{className:"w-18 h-8",children:e(f,{placeholder:a.getState().pagination.pageSize})}),e(x,{side:"top",children:[10,20,30,40,50].map(i=>e(w,{value:String(i),children:i},i))})]})]}),t("div",{className:"flex w-28 items-center justify-center text-sm font-medium",children:["Page ",a.getState().pagination.pageIndex+1," of ",a.getPageCount()]}),t("div",{className:"flex items-center space-x-2",children:[t(o,{variant:"outline",size:"icon-xs",className:"hidden lg:flex",onClick:()=>{a.setPageIndex(0)},disabled:!a.getCanPreviousPage(),children:[e("span",{className:"sr-only",children:"Go to first page"}),e(b,{className:"size-4"})]}),t(o,{variant:"outline",size:"icon-xs",onClick:()=>{a.previousPage()},disabled:!a.getCanPreviousPage(),children:[e("span",{className:"sr-only",children:"Go to previous page"}),e(S,{className:"size-4"})]}),t(o,{variant:"outline",size:"icon-xs",onClick:()=>{a.nextPage()},disabled:!a.getCanNextPage(),children:[e("span",{className:"sr-only",children:"Go to next page"}),e(P,{className:"size-4"})]}),t(o,{variant:"outline",size:"icon-xs",className:"hidden lg:flex",onClick:()=>{a.setPageIndex(a.getPageCount()-1)},disabled:!a.getCanNextPage(),children:[e("span",{className:"sr-only",children:"Go to last page"}),e(M,{className:"size-4"})]})]})]})]})}function L({column:a,title:n,className:s}){return a.getCanSort()?e("div",{className:l("flex items-center space-x-2",s),children:t(c,{children:[e(d,{asChild:!0,children:t(o,{variant:"ghost",size:"xs",className:"data-[state=open]:bg-accent -ml-3",children:[e("span",{children:n}),e(z,{sorted:a.getIsSorted()})]})}),t(m,{align:"start",children:[t(r,{onClick:()=>{a.toggleSorting(!1)},children:[e(N,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Asc"]}),t(r,{onClick:()=>{a.toggleSorting(!0)},children:[e(C,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Desc"]}),e(g,{}),t(r,{onClick:()=>{a.toggleVisibility(!1)},children:[e(I,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Hide"]})]})]})}):e("div",{className:s,children:n})}function z({sorted:a}){switch(a){case"desc":return e(C,{className:"ml-2 size-4"});case"asc":return e(N,{className:"ml-2 size-4"});default:return e(v,{className:"ml-2 size-4"})}}export{L as DataTableColumnHeader,B as DataTablePagination,A as DataTableViewOptions};
|
|
2
2
|
//# sourceMappingURL=data-table.mjs.map
|
package/dist/react/dialog.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunk7GYOFJ2Ejs = require('../chunk-7GYOFJ2E.js');require('../chunk-HQ4AUOQM.js');exports.Dialog = _chunk7GYOFJ2Ejs.a; exports.DialogBody = _chunk7GYOFJ2Ejs.f; exports.DialogClose = _chunk7GYOFJ2Ejs.c; exports.DialogContent = _chunk7GYOFJ2Ejs.d; exports.DialogDescription = _chunk7GYOFJ2Ejs.i; exports.DialogFooter = _chunk7GYOFJ2Ejs.g; exports.DialogHeader = _chunk7GYOFJ2Ejs.e; exports.DialogTitle = _chunk7GYOFJ2Ejs.h; exports.DialogTrigger = _chunk7GYOFJ2Ejs.b;
|
|
2
2
|
//# sourceMappingURL=dialog.js.map
|
package/dist/react/dialog.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a,b,c,d,e,f,g,h,i}from"../chunk-
|
|
1
|
+
"use client";import{a,b,c,d,e,f,g,h,i}from"../chunk-5RHKZ6R6.mjs";import"../chunk-LEUB3C3L.mjs";export{a as Dialog,f as DialogBody,c as DialogClose,d as DialogContent,i as DialogDescription,g as DialogFooter,e as DialogHeader,h as DialogTitle,b as DialogTrigger};
|
|
2
2
|
//# sourceMappingURL=dialog.mjs.map
|
package/dist/react/pagination.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkI7YJNEPRjs = require('../chunk-I7YJNEPR.js');require('../chunk-46W6RAYD.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var o = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');function N({className:n,...t}){return _jsxruntime.jsx.call(void 0, "nav",{role:"navigation","aria-label":"pagination",className:_chunkHQ4AUOQMjs.b.call(void 0, "mx-auto flex w-full justify-center",n),...t})}var u=o.forwardRef(({className:n,...t},i)=>_jsxruntime.jsx.call(void 0, "ul",{ref:i,className:_chunkHQ4AUOQMjs.b.call(void 0, "flex flex-row items-center gap-1",n),...t}));u.displayName="PaginationContent";var f=o.forwardRef((n,t)=>_jsxruntime.jsx.call(void 0, "li",{ref:t,...n}));f.displayName="PaginationItem";function p({className:n,isActive:t,size:i="icon",children:P,...l}){return _jsxruntime.jsx.call(void 0, "a",{"aria-current":t?"page":void 0,className:_chunkI7YJNEPRjs.a.call(void 0, {variant:t?"outline":"ghost",size:i,className:n}),...l,children:P})}function R({className:n,...t}){return _jsxruntime.jsxs.call(void 0, p,{"aria-label":"Go to previous page",size:"default",className:_chunkHQ4AUOQMjs.b.call(void 0, "gap-1 pl-2.5",n),...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.ChevronLeftIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{children:"Previous"})]})}function H({className:n,...t}){return _jsxruntime.jsxs.call(void 0, p,{"aria-label":"Go to next page",size:"default",className:_chunkHQ4AUOQMjs.b.call(void 0, "gap-1 pr-2.5",n),...t,children:[_jsxruntime.jsx.call(void 0, "span",{children:"Next"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"size-4"})]})}function M({className:n,...t}){return _jsxruntime.jsxs.call(void 0, "span",{"aria-hidden":!0,className:_chunkHQ4AUOQMjs.b.call(void 0, "flex size-10 items-center justify-center",n),...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.DotsHorizontalIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"More pages"})]})}exports.Pagination = N; exports.PaginationContent = u; exports.PaginationEllipsis = M; exports.PaginationItem = f; exports.PaginationLink = p; exports.PaginationNext = H; exports.PaginationPrevious = R;
|
|
2
2
|
//# sourceMappingURL=pagination.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"../chunk-
|
|
1
|
+
import{a as r}from"../chunk-FJH7XRCZ.mjs";import"../chunk-BNKSZEF2.mjs";import{b as e}from"../chunk-LEUB3C3L.mjs";import*as o from"react";import{ChevronLeftIcon as g,ChevronRightIcon as m,DotsHorizontalIcon as c}from"@radix-ui/react-icons";import{jsx as a,jsxs as s}from"react/jsx-runtime";function N({className:n,...t}){return a("nav",{role:"navigation","aria-label":"pagination",className:e("mx-auto flex w-full justify-center",n),...t})}var u=o.forwardRef(({className:n,...t},i)=>a("ul",{ref:i,className:e("flex flex-row items-center gap-1",n),...t}));u.displayName="PaginationContent";var f=o.forwardRef((n,t)=>a("li",{ref:t,...n}));f.displayName="PaginationItem";function p({className:n,isActive:t,size:i="icon",children:P,...l}){return a("a",{"aria-current":t?"page":void 0,className:r({variant:t?"outline":"ghost",size:i,className:n}),...l,children:P})}function R({className:n,...t}){return s(p,{"aria-label":"Go to previous page",size:"default",className:e("gap-1 pl-2.5",n),...t,children:[a(g,{className:"size-4"}),a("span",{children:"Previous"})]})}function H({className:n,...t}){return s(p,{"aria-label":"Go to next page",size:"default",className:e("gap-1 pr-2.5",n),...t,children:[a("span",{children:"Next"}),a(m,{className:"size-4"})]})}function M({className:n,...t}){return s("span",{"aria-hidden":!0,className:e("flex size-10 items-center justify-center",n),...t,children:[a(c,{className:"size-4"}),a("span",{className:"sr-only",children:"More pages"})]})}export{N as Pagination,u as PaginationContent,M as PaginationEllipsis,f as PaginationItem,p as PaginationLink,H as PaginationNext,R as PaginationPrevious};
|
|
2
2
|
//# sourceMappingURL=pagination.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var n = _interopRequireWildcard(_react);var _reactscrollarea = require('@radix-ui/react-scroll-area'); var r = _interopRequireWildcard(_reactscrollarea);var _reactcontext = require('@radix-ui/react-context');var _jsxruntime = require('react/jsx-runtime');var p="ScrollArea",[P]=_reactcontext.createContextScope.call(void 0, p),[f,v]=P(p),b= exports.ScrollArea =n.forwardRef(({__scopeScrollArea:l,children:a,className:o,size:t="2",...i},c)=>_jsxruntime.jsx.call(void 0, f,{scope:l,size:t,children:_jsxruntime.jsxs.call(void 0, r.Root,{ref:c,className:_chunkHQ4AUOQMjs.b.call(void 0, "relative overflow-hidden",o),...i,children:[_jsxruntime.jsx.call(void 0, r.Viewport,{className:"size-full rounded-[inherit] [&>*]:
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var n = _interopRequireWildcard(_react);var _reactscrollarea = require('@radix-ui/react-scroll-area'); var r = _interopRequireWildcard(_reactscrollarea);var _reactcontext = require('@radix-ui/react-context');var _jsxruntime = require('react/jsx-runtime');var p="ScrollArea",[P]=_reactcontext.createContextScope.call(void 0, p),[f,v]=P(p),b= exports.ScrollArea =n.forwardRef(({__scopeScrollArea:l,children:a,className:o,size:t="2",...i},c)=>_jsxruntime.jsx.call(void 0, f,{scope:l,size:t,children:_jsxruntime.jsxs.call(void 0, r.Root,{ref:c,className:_chunkHQ4AUOQMjs.b.call(void 0, "relative overflow-hidden",o),...i,children:[_jsxruntime.jsx.call(void 0, r.Viewport,{className:"size-full rounded-[inherit] [&>*]:h-full",children:a}),_jsxruntime.jsx.call(void 0, s,{orientation:"vertical"}),_jsxruntime.jsx.call(void 0, s,{orientation:"horizontal"}),_jsxruntime.jsx.call(void 0, r.Corner,{})]})}));b.displayName=r.Root.displayName;var d=_chunkHQ4AUOQMjs.a.call(void 0, {base:"flex touch-none select-none p-px transition",variants:{orientation:{vertical:"h-full flex-row border-l border-l-transparent",horizontal:"w-full flex-col border-t border-t-transparent"},size:{none:"",1:"",2:"",3:""}},compoundVariants:[{orientation:"vertical",size:"1",className:"w-1.5"},{orientation:"vertical",size:"2",className:"w-2"},{orientation:"vertical",size:"3",className:"w-2.5"},{orientation:"horizontal",size:"1",className:"h-1.5"},{orientation:"horizontal",size:"2",className:"h-2"},{orientation:"horizontal",size:"3",className:"h-2.5"}]}),s= exports.ScrollAreaScrollbar =n.forwardRef(({__scopeScrollArea:l,className:a,orientation:o="vertical",...t},i)=>{let{size:c}=v(p,l);return _jsxruntime.jsx.call(void 0, r.Scrollbar,{ref:i,orientation:o,className:d({orientation:o,size:c,className:a}),...t,children:_jsxruntime.jsx.call(void 0, r.ScrollAreaThumb,{className:"bg-border relative flex-1 rounded-full"})})});s.displayName=r.Scrollbar.displayName;exports.ScrollArea = b; exports.ScrollAreaScrollbar = s;
|
|
2
2
|
//# sourceMappingURL=scroll-area.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/scroll-area.tsx"],"names":["React","ScrollAreaPrimitive","createContextScope","jsx","jsxs","SCROLL_AREA_NAME","createCarouselContext","CarouselProvider","useCarouselContext","ScrollArea","__scopeScrollArea","children","className","size","props","ref","cn","ScrollAreaScrollbar","scrollAreaScrollbarVariants","cva","orientation"],"mappings":"6DAEA,UAAYA,MAAW,QACvB,UAAYC,MAAyB,8BACrC,OAAS,sBAAAC,MAAsC,0BAwBzC,OACE,OAAAC,EADF,QAAAC,MAAA,oBAhBN,IAAMC,EAAmB,aAInB,CAACC,CAAqB,EAAIJ,EAAmBG,CAAgB,EAI7D,CAACE,EAAkBC,CAAkB,EAAIF,EAA8CD,CAAgB,EAKvGI,EAAmB,aACvB,CAAC,CAAE,kBAAAC,EAAmB,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAO,IAAK,GAAGC,CAAM,EAAiCC,IAC/FZ,EAACI,EAAA,CAAiB,MAAOG,EAAmB,KAAMG,EAChD,SAAAT,EAAqB,OAApB,CAAyB,IAAKW,EAAK,UAAWC,EAAG,2BAA4BJ,CAAS,EAAI,GAAGE,EAC5F,UAAAX,EAAqB,WAApB,CAA6B,UAAU
|
|
1
|
+
{"version":3,"sources":["../../src/react/scroll-area.tsx"],"names":["React","ScrollAreaPrimitive","createContextScope","jsx","jsxs","SCROLL_AREA_NAME","createCarouselContext","CarouselProvider","useCarouselContext","ScrollArea","__scopeScrollArea","children","className","size","props","ref","cn","ScrollAreaScrollbar","scrollAreaScrollbarVariants","cva","orientation"],"mappings":"6DAEA,UAAYA,MAAW,QACvB,UAAYC,MAAyB,8BACrC,OAAS,sBAAAC,MAAsC,0BAwBzC,OACE,OAAAC,EADF,QAAAC,MAAA,oBAhBN,IAAMC,EAAmB,aAInB,CAACC,CAAqB,EAAIJ,EAAmBG,CAAgB,EAI7D,CAACE,EAAkBC,CAAkB,EAAIF,EAA8CD,CAAgB,EAKvGI,EAAmB,aACvB,CAAC,CAAE,kBAAAC,EAAmB,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAO,IAAK,GAAGC,CAAM,EAAiCC,IAC/FZ,EAACI,EAAA,CAAiB,MAAOG,EAAmB,KAAMG,EAChD,SAAAT,EAAqB,OAApB,CAAyB,IAAKW,EAAK,UAAWC,EAAG,2BAA4BJ,CAAS,EAAI,GAAGE,EAC5F,UAAAX,EAAqB,WAApB,CAA6B,UAAU,2CACrC,SAAAQ,EACH,EACAR,EAACc,EAAA,CAAoB,YAAY,WAAW,EAC5Cd,EAACc,EAAA,CAAoB,YAAY,aAAa,EAC9Cd,EAAqB,SAApB,EAA2B,GAC9B,EACF,CAEJ,EAEAM,EAAW,YAAkC,OAAK,YAMlD,IAAMS,EAA8BC,EAAI,CACtC,KAAM,8CACN,SAAU,CACR,YAAa,CACX,SAAU,gDACV,WAAY,+CACd,EACA,KAAM,CACJ,KAAM,GACN,EAAK,GACL,EAAK,GACL,EAAK,EACP,CACF,EACA,iBAAkB,CAChB,CAAE,YAAa,WAAY,KAAM,IAAK,UAAW,OAAQ,EACzD,CAAE,YAAa,WAAY,KAAM,IAAK,UAAW,KAAM,EACvD,CAAE,YAAa,WAAY,KAAM,IAAK,UAAW,OAAQ,EACzD,CAAE,YAAa,aAAc,KAAM,IAAK,UAAW,OAAQ,EAC3D,CAAE,YAAa,aAAc,KAAM,IAAK,UAAW,KAAM,EACzD,CAAE,YAAa,aAAc,KAAM,IAAK,UAAW,OAAQ,CAC7D,CACF,CAAC,EAWKF,EAA4B,aAChC,CACE,CAAE,kBAAAP,EAAmB,UAAAE,EAAW,YAAAQ,EAAc,WAAY,GAAGN,CAAM,EACnEC,IACG,CACH,GAAM,CAAE,KAAAF,CAAK,EAAIL,EAAmBH,EAAkBK,CAAiB,EAEvE,OACEP,EAAqB,YAApB,CACC,IAAKY,EACL,YAAaK,EACb,UAAWF,EAA4B,CAAE,YAAAE,EAAa,KAAAP,EAAM,UAAAD,CAAU,CAAC,EACtE,GAAGE,EAEJ,SAAAX,EAAqB,kBAApB,CAAoC,UAAU,yCAAyC,EAC1F,CAEJ,CACF,EAEAc,EAAoB,YAAkC,YAAU","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { type VariantProps } from 'cva';\nimport { cn, cva } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ScrollArea\n * -------------------------------------------------------------------------- */\n\nconst SCROLL_AREA_NAME = 'ScrollArea';\n\ntype ScopedProps<P> = P & { __scopeScrollArea?: Scope };\n\nconst [createCarouselContext] = createContextScope(SCROLL_AREA_NAME);\n\ntype ScrollAreaContextValue = Pick<ScrollAreaScrollbarVariantsProps, 'size'>;\n\nconst [CarouselProvider, useCarouselContext] = createCarouselContext<ScrollAreaContextValue>(SCROLL_AREA_NAME);\n\ntype ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Root>;\ntype ScrollAreaProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & ScrollAreaContextValue;\n\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>(\n ({ __scopeScrollArea, children, className, size = '2', ...props }: ScopedProps<ScrollAreaProps>, ref) => (\n <CarouselProvider scope={__scopeScrollArea} size={size}>\n <ScrollAreaPrimitive.Root ref={ref} className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport className=\"size-full rounded-[inherit] [&>*]:h-full\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollAreaScrollbar orientation=\"vertical\" />\n <ScrollAreaScrollbar orientation=\"horizontal\" />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n </CarouselProvider>\n ),\n);\n\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Variant: ScrollAreaScrollbar\n * -------------------------------------------------------------------------- */\n\nconst scrollAreaScrollbarVariants = cva({\n base: 'flex touch-none select-none p-px transition',\n variants: {\n orientation: {\n vertical: 'h-full flex-row border-l border-l-transparent',\n horizontal: 'w-full flex-col border-t border-t-transparent',\n },\n size: {\n none: '',\n '1': '',\n '2': '',\n '3': '',\n },\n },\n compoundVariants: [\n { orientation: 'vertical', size: '1', className: 'w-1.5' },\n { orientation: 'vertical', size: '2', className: 'w-2' },\n { orientation: 'vertical', size: '3', className: 'w-2.5' },\n { orientation: 'horizontal', size: '1', className: 'h-1.5' },\n { orientation: 'horizontal', size: '2', className: 'h-2' },\n { orientation: 'horizontal', size: '3', className: 'h-2.5' },\n ],\n});\n\ntype ScrollAreaScrollbarVariantsProps = VariantProps<typeof scrollAreaScrollbarVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: ScrollAreaScrollbar\n * -------------------------------------------------------------------------- */\n\ntype ScrollAreaScrollbarElement = React.ElementRef<typeof ScrollAreaPrimitive.Scrollbar>;\ntype ScrollAreaScrollbarProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Scrollbar>;\n\nconst ScrollAreaScrollbar = React.forwardRef<ScrollAreaScrollbarElement, ScrollAreaScrollbarProps>(\n (\n { __scopeScrollArea, className, orientation = 'vertical', ...props }: ScopedProps<ScrollAreaScrollbarProps>,\n ref,\n ) => {\n const { size } = useCarouselContext(SCROLL_AREA_NAME, __scopeScrollArea);\n\n return (\n <ScrollAreaPrimitive.Scrollbar\n ref={ref}\n orientation={orientation}\n className={scrollAreaScrollbarVariants({ orientation, size, className })}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"bg-border relative flex-1 rounded-full\" />\n </ScrollAreaPrimitive.Scrollbar>\n );\n },\n);\n\nScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ScrollArea, ScrollAreaScrollbar, type ScrollAreaProps, type ScrollAreaScrollbarProps };\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as S,b as m}from"../chunk-LEUB3C3L.mjs";import*as n from"react";import*as r from"@radix-ui/react-scroll-area";import{createContextScope as A}from"@radix-ui/react-context";import{jsx as e,jsxs as u}from"react/jsx-runtime";var p="ScrollArea",[P]=A(p),[f,v]=P(p),b=n.forwardRef(({__scopeScrollArea:l,children:a,className:o,size:t="2",...i},c)=>e(f,{scope:l,size:t,children:u(r.Root,{ref:c,className:m("relative overflow-hidden",o),...i,children:[e(r.Viewport,{className:"size-full rounded-[inherit] [&>*]:
|
|
1
|
+
"use client";import{a as S,b as m}from"../chunk-LEUB3C3L.mjs";import*as n from"react";import*as r from"@radix-ui/react-scroll-area";import{createContextScope as A}from"@radix-ui/react-context";import{jsx as e,jsxs as u}from"react/jsx-runtime";var p="ScrollArea",[P]=A(p),[f,v]=P(p),b=n.forwardRef(({__scopeScrollArea:l,children:a,className:o,size:t="2",...i},c)=>e(f,{scope:l,size:t,children:u(r.Root,{ref:c,className:m("relative overflow-hidden",o),...i,children:[e(r.Viewport,{className:"size-full rounded-[inherit] [&>*]:h-full",children:a}),e(s,{orientation:"vertical"}),e(s,{orientation:"horizontal"}),e(r.Corner,{})]})}));b.displayName=r.Root.displayName;var d=S({base:"flex touch-none select-none p-px transition",variants:{orientation:{vertical:"h-full flex-row border-l border-l-transparent",horizontal:"w-full flex-col border-t border-t-transparent"},size:{none:"",1:"",2:"",3:""}},compoundVariants:[{orientation:"vertical",size:"1",className:"w-1.5"},{orientation:"vertical",size:"2",className:"w-2"},{orientation:"vertical",size:"3",className:"w-2.5"},{orientation:"horizontal",size:"1",className:"h-1.5"},{orientation:"horizontal",size:"2",className:"h-2"},{orientation:"horizontal",size:"3",className:"h-2.5"}]}),s=n.forwardRef(({__scopeScrollArea:l,className:a,orientation:o="vertical",...t},i)=>{let{size:c}=v(p,l);return e(r.Scrollbar,{ref:i,orientation:o,className:d({orientation:o,size:c,className:a}),...t,children:e(r.ScrollAreaThumb,{className:"bg-border relative flex-1 rounded-full"})})});s.displayName=r.Scrollbar.displayName;export{b as ScrollArea,s as ScrollAreaScrollbar};
|
|
2
2
|
//# sourceMappingURL=scroll-area.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/scroll-area.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { type VariantProps } from 'cva';\nimport { cn, cva } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ScrollArea\n * -------------------------------------------------------------------------- */\n\nconst SCROLL_AREA_NAME = 'ScrollArea';\n\ntype ScopedProps<P> = P & { __scopeScrollArea?: Scope };\n\nconst [createCarouselContext] = createContextScope(SCROLL_AREA_NAME);\n\ntype ScrollAreaContextValue = Pick<ScrollAreaScrollbarVariantsProps, 'size'>;\n\nconst [CarouselProvider, useCarouselContext] = createCarouselContext<ScrollAreaContextValue>(SCROLL_AREA_NAME);\n\ntype ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Root>;\ntype ScrollAreaProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & ScrollAreaContextValue;\n\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>(\n ({ __scopeScrollArea, children, className, size = '2', ...props }: ScopedProps<ScrollAreaProps>, ref) => (\n <CarouselProvider scope={__scopeScrollArea} size={size}>\n <ScrollAreaPrimitive.Root ref={ref} className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport className=\"size-full rounded-[inherit] [&>*]:
|
|
1
|
+
{"version":3,"sources":["../../src/react/scroll-area.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { type VariantProps } from 'cva';\nimport { cn, cva } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ScrollArea\n * -------------------------------------------------------------------------- */\n\nconst SCROLL_AREA_NAME = 'ScrollArea';\n\ntype ScopedProps<P> = P & { __scopeScrollArea?: Scope };\n\nconst [createCarouselContext] = createContextScope(SCROLL_AREA_NAME);\n\ntype ScrollAreaContextValue = Pick<ScrollAreaScrollbarVariantsProps, 'size'>;\n\nconst [CarouselProvider, useCarouselContext] = createCarouselContext<ScrollAreaContextValue>(SCROLL_AREA_NAME);\n\ntype ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Root>;\ntype ScrollAreaProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & ScrollAreaContextValue;\n\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>(\n ({ __scopeScrollArea, children, className, size = '2', ...props }: ScopedProps<ScrollAreaProps>, ref) => (\n <CarouselProvider scope={__scopeScrollArea} size={size}>\n <ScrollAreaPrimitive.Root ref={ref} className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport className=\"size-full rounded-[inherit] [&>*]:h-full\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollAreaScrollbar orientation=\"vertical\" />\n <ScrollAreaScrollbar orientation=\"horizontal\" />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n </CarouselProvider>\n ),\n);\n\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Variant: ScrollAreaScrollbar\n * -------------------------------------------------------------------------- */\n\nconst scrollAreaScrollbarVariants = cva({\n base: 'flex touch-none select-none p-px transition',\n variants: {\n orientation: {\n vertical: 'h-full flex-row border-l border-l-transparent',\n horizontal: 'w-full flex-col border-t border-t-transparent',\n },\n size: {\n none: '',\n '1': '',\n '2': '',\n '3': '',\n },\n },\n compoundVariants: [\n { orientation: 'vertical', size: '1', className: 'w-1.5' },\n { orientation: 'vertical', size: '2', className: 'w-2' },\n { orientation: 'vertical', size: '3', className: 'w-2.5' },\n { orientation: 'horizontal', size: '1', className: 'h-1.5' },\n { orientation: 'horizontal', size: '2', className: 'h-2' },\n { orientation: 'horizontal', size: '3', className: 'h-2.5' },\n ],\n});\n\ntype ScrollAreaScrollbarVariantsProps = VariantProps<typeof scrollAreaScrollbarVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: ScrollAreaScrollbar\n * -------------------------------------------------------------------------- */\n\ntype ScrollAreaScrollbarElement = React.ElementRef<typeof ScrollAreaPrimitive.Scrollbar>;\ntype ScrollAreaScrollbarProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Scrollbar>;\n\nconst ScrollAreaScrollbar = React.forwardRef<ScrollAreaScrollbarElement, ScrollAreaScrollbarProps>(\n (\n { __scopeScrollArea, className, orientation = 'vertical', ...props }: ScopedProps<ScrollAreaScrollbarProps>,\n ref,\n ) => {\n const { size } = useCarouselContext(SCROLL_AREA_NAME, __scopeScrollArea);\n\n return (\n <ScrollAreaPrimitive.Scrollbar\n ref={ref}\n orientation={orientation}\n className={scrollAreaScrollbarVariants({ orientation, size, className })}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"bg-border relative flex-1 rounded-full\" />\n </ScrollAreaPrimitive.Scrollbar>\n );\n },\n);\n\nScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ScrollArea, ScrollAreaScrollbar, type ScrollAreaProps, type ScrollAreaScrollbarProps };\n"],"mappings":"8DAEA,UAAYA,MAAW,QACvB,UAAYC,MAAyB,8BACrC,OAAS,sBAAAC,MAAsC,0BAwBzC,OACE,OAAAC,EADF,QAAAC,MAAA,oBAhBN,IAAMC,EAAmB,aAInB,CAACC,CAAqB,EAAIC,EAAmBF,CAAgB,EAI7D,CAACG,EAAkBC,CAAkB,EAAIH,EAA8CD,CAAgB,EAKvGK,EAAmB,aACvB,CAAC,CAAE,kBAAAC,EAAmB,SAAAC,EAAU,UAAAC,EAAW,KAAAC,EAAO,IAAK,GAAGC,CAAM,EAAiCC,IAC/Fb,EAACK,EAAA,CAAiB,MAAOG,EAAmB,KAAMG,EAChD,SAAAV,EAAqB,OAApB,CAAyB,IAAKY,EAAK,UAAWC,EAAG,2BAA4BJ,CAAS,EAAI,GAAGE,EAC5F,UAAAZ,EAAqB,WAApB,CAA6B,UAAU,2CACrC,SAAAS,EACH,EACAT,EAACe,EAAA,CAAoB,YAAY,WAAW,EAC5Cf,EAACe,EAAA,CAAoB,YAAY,aAAa,EAC9Cf,EAAqB,SAApB,EAA2B,GAC9B,EACF,CAEJ,EAEAO,EAAW,YAAkC,OAAK,YAMlD,IAAMS,EAA8BC,EAAI,CACtC,KAAM,8CACN,SAAU,CACR,YAAa,CACX,SAAU,gDACV,WAAY,+CACd,EACA,KAAM,CACJ,KAAM,GACN,EAAK,GACL,EAAK,GACL,EAAK,EACP,CACF,EACA,iBAAkB,CAChB,CAAE,YAAa,WAAY,KAAM,IAAK,UAAW,OAAQ,EACzD,CAAE,YAAa,WAAY,KAAM,IAAK,UAAW,KAAM,EACvD,CAAE,YAAa,WAAY,KAAM,IAAK,UAAW,OAAQ,EACzD,CAAE,YAAa,aAAc,KAAM,IAAK,UAAW,OAAQ,EAC3D,CAAE,YAAa,aAAc,KAAM,IAAK,UAAW,KAAM,EACzD,CAAE,YAAa,aAAc,KAAM,IAAK,UAAW,OAAQ,CAC7D,CACF,CAAC,EAWKF,EAA4B,aAChC,CACE,CAAE,kBAAAP,EAAmB,UAAAE,EAAW,YAAAQ,EAAc,WAAY,GAAGN,CAAM,EACnEC,IACG,CACH,GAAM,CAAE,KAAAF,CAAK,EAAIL,EAAmBJ,EAAkBM,CAAiB,EAEvE,OACER,EAAqB,YAApB,CACC,IAAKa,EACL,YAAaK,EACb,UAAWF,EAA4B,CAAE,YAAAE,EAAa,KAAAP,EAAM,UAAAD,CAAU,CAAC,EACtE,GAAGE,EAEJ,SAAAZ,EAAqB,kBAApB,CAAoC,UAAU,yCAAyC,EAC1F,CAEJ,CACF,EAEAe,EAAoB,YAAkC,YAAU","names":["React","ScrollAreaPrimitive","createContextScope","jsx","jsxs","SCROLL_AREA_NAME","createCarouselContext","createContextScope","CarouselProvider","useCarouselContext","ScrollArea","__scopeScrollArea","children","className","size","props","ref","cn","ScrollAreaScrollbar","scrollAreaScrollbarVariants","cva","orientation"]}
|
package/dist/react/sheet.d.mts
CHANGED
|
@@ -2,7 +2,13 @@ import * as React from 'react';
|
|
|
2
2
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
3
|
import { VariantProps } from 'cva';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type SheetProps = React.ComponentProps<typeof DialogPrimitive.Root>;
|
|
6
|
+
declare const Sheet: React.FC<DialogPrimitive.DialogProps>;
|
|
7
|
+
type SheetTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;
|
|
8
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
type SheetCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;
|
|
10
|
+
declare const SheetClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
declare const sheetContentVariants: (props?: ({
|
|
6
12
|
side?: "top" | "right" | "bottom" | "left" | undefined;
|
|
7
13
|
} & ({
|
|
8
14
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
|
|
@@ -59,17 +65,13 @@ declare const sheetVariants: (props?: ({
|
|
|
59
65
|
[x: string]: any;
|
|
60
66
|
} | null | undefined;
|
|
61
67
|
})) | undefined) => string;
|
|
62
|
-
type
|
|
63
|
-
type
|
|
64
|
-
declare const
|
|
65
|
-
type SheetTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;
|
|
66
|
-
declare const SheetTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
67
|
-
type SheetCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;
|
|
68
|
-
declare const SheetClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
69
|
-
type SheetContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & SheetVariantsProps;
|
|
70
|
-
declare const SheetContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & SheetVariantsProps & React.RefAttributes<HTMLDivElement>>;
|
|
68
|
+
type SheetContentVariantsProps = VariantProps<typeof sheetContentVariants>;
|
|
69
|
+
type SheetContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & SheetContentVariantsProps;
|
|
70
|
+
declare const SheetContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & SheetContentVariantsProps & React.RefAttributes<HTMLDivElement>>;
|
|
71
71
|
type SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;
|
|
72
72
|
declare function SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Element;
|
|
73
|
+
type SheetBodyProps = React.HTMLAttributes<HTMLDivElement>;
|
|
74
|
+
declare function SheetBody({ className, ...props }: SheetHeaderProps): React.JSX.Element;
|
|
73
75
|
type SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;
|
|
74
76
|
declare function SheetFooter({ className, ...props }: SheetFooterProps): React.JSX.Element;
|
|
75
77
|
declare namespace SheetFooter {
|
|
@@ -80,4 +82,4 @@ declare const SheetTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.D
|
|
|
80
82
|
type SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
|
81
83
|
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
82
84
|
|
|
83
|
-
export { Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, type SheetProps, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps };
|
|
85
|
+
export { Sheet, SheetBody, type SheetBodyProps, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, type SheetProps, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps };
|
package/dist/react/sheet.d.ts
CHANGED
|
@@ -2,7 +2,13 @@ import * as React from 'react';
|
|
|
2
2
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
3
|
import { VariantProps } from 'cva';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type SheetProps = React.ComponentProps<typeof DialogPrimitive.Root>;
|
|
6
|
+
declare const Sheet: React.FC<DialogPrimitive.DialogProps>;
|
|
7
|
+
type SheetTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;
|
|
8
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
type SheetCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;
|
|
10
|
+
declare const SheetClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
declare const sheetContentVariants: (props?: ({
|
|
6
12
|
side?: "top" | "right" | "bottom" | "left" | undefined;
|
|
7
13
|
} & ({
|
|
8
14
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
|
|
@@ -59,17 +65,13 @@ declare const sheetVariants: (props?: ({
|
|
|
59
65
|
[x: string]: any;
|
|
60
66
|
} | null | undefined;
|
|
61
67
|
})) | undefined) => string;
|
|
62
|
-
type
|
|
63
|
-
type
|
|
64
|
-
declare const
|
|
65
|
-
type SheetTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;
|
|
66
|
-
declare const SheetTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
67
|
-
type SheetCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;
|
|
68
|
-
declare const SheetClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
69
|
-
type SheetContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & SheetVariantsProps;
|
|
70
|
-
declare const SheetContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & SheetVariantsProps & React.RefAttributes<HTMLDivElement>>;
|
|
68
|
+
type SheetContentVariantsProps = VariantProps<typeof sheetContentVariants>;
|
|
69
|
+
type SheetContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & SheetContentVariantsProps;
|
|
70
|
+
declare const SheetContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & SheetContentVariantsProps & React.RefAttributes<HTMLDivElement>>;
|
|
71
71
|
type SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;
|
|
72
72
|
declare function SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Element;
|
|
73
|
+
type SheetBodyProps = React.HTMLAttributes<HTMLDivElement>;
|
|
74
|
+
declare function SheetBody({ className, ...props }: SheetHeaderProps): React.JSX.Element;
|
|
73
75
|
type SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;
|
|
74
76
|
declare function SheetFooter({ className, ...props }: SheetFooterProps): React.JSX.Element;
|
|
75
77
|
declare namespace SheetFooter {
|
|
@@ -80,4 +82,4 @@ declare const SheetTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.D
|
|
|
80
82
|
type SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
|
81
83
|
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
82
84
|
|
|
83
|
-
export { Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, type SheetProps, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps };
|
|
85
|
+
export { Sheet, SheetBody, type SheetBodyProps, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, type SheetProps, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps };
|
package/dist/react/sheet.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var r = _interopRequireWildcard(_react);var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');var d=_chunkHQ4AUOQMjs.a.call(void 0, {base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var r = _interopRequireWildcard(_react);var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');var v=e.Root,R= exports.SheetTrigger =e.Trigger,C= exports.SheetClose =e.Close,d=_chunkHQ4AUOQMjs.a.call(void 0, {base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 flex flex-col overflow-auto shadow-lg",variants:{side:{top:"data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-screen border-b",bottom:"data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-screen border-t",left:"data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),c= exports.SheetContent =r.forwardRef(({children:t,side:o="right",className:s,...m},l)=>_jsxruntime.jsxs.call(void 0, e.Portal,{children:[_jsxruntime.jsx.call(void 0, e.Overlay,{className:"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80"}),_jsxruntime.jsxs.call(void 0, e.Content,{ref:l,className:d({side:o,className:s}),...m,children:[t,_jsxruntime.jsxs.call(void 0, e.Close,{className:"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",children:[_jsxruntime.jsx.call(void 0, _reacticons.Cross2Icon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]})]})]}));c.displayName=e.Content.displayName;function b({className:t,...o}){return _jsxruntime.jsx.call(void 0, "header",{className:_chunkHQ4AUOQMjs.b.call(void 0, "flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left",t),...o})}function g({className:t,...o}){return _jsxruntime.jsx.call(void 0, "main",{className:_chunkHQ4AUOQMjs.b.call(void 0, "px-6 py-2",t),...o})}function S({className:t,...o}){return _jsxruntime.jsx.call(void 0, "footer",{className:_chunkHQ4AUOQMjs.b.call(void 0, "flex shrink-0 flex-col-reverse px-6 pb-6 pt-4 sm:flex-row sm:justify-end sm:space-x-2",t),...o})}S.displayName="SheetFooter";var f=r.forwardRef(({className:t,...o},s)=>_jsxruntime.jsx.call(void 0, e.Title,{ref:s,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-foreground text-lg font-semibold",t),...o}));f.displayName=e.Title.displayName;var P=r.forwardRef(({className:t,...o},s)=>_jsxruntime.jsx.call(void 0, e.Description,{ref:s,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-muted-foreground text-sm",t),...o}));P.displayName=e.Description.displayName;exports.Sheet = v; exports.SheetBody = g; exports.SheetClose = C; exports.SheetContent = c; exports.SheetDescription = P; exports.SheetFooter = S; exports.SheetHeader = b; exports.SheetTitle = f; exports.SheetTrigger = R;
|
|
2
2
|
//# sourceMappingURL=sheet.js.map
|
package/dist/react/sheet.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/sheet.tsx"],"names":["React","SheetPrimitive","Cross2Icon","jsx","jsxs","
|
|
1
|
+
{"version":3,"sources":["../../src/react/sheet.tsx"],"names":["React","SheetPrimitive","Cross2Icon","jsx","jsxs","Sheet","SheetTrigger","SheetClose","sheetContentVariants","cva","SheetContent","children","side","className","props","ref","SheetHeader","cn","SheetBody","SheetFooter","SheetTitle","SheetDescription"],"mappings":"6DAEA,UAAYA,MAAW,QACvB,UAAYC,MAAoB,yBAChC,OAAS,cAAAC,MAAkB,wBA0DrB,cAAAC,EAGE,QAAAC,MAHF,oBAjDN,IAAMC,EAAuB,OAOvBC,EAA8B,UAO9BC,EAA4B,QAM5BC,EAAuBC,EAAI,CAC/B,KAAM,kOACN,SAAU,CACR,KAAM,CACJ,IAAK,iHACL,OACE,0HACF,KAAM,gIACN,MACE,kIACJ,CACF,EACA,gBAAiB,CACf,KAAM,OACR,CACF,CAAC,EAWKC,EAAqB,aACzB,CAAC,CAAE,SAAAC,EAAU,KAAAC,EAAO,QAAS,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAClDX,EAAgB,SAAf,CACC,UAAAD,EAAgB,UAAf,CAAuB,UAAU,wLAAwL,EAC1NC,EAAgB,UAAf,CAAuB,IAAKW,EAAK,UAAWP,EAAqB,CAAE,KAAAI,EAAM,UAAAC,CAAU,CAAC,EAAI,GAAGC,EACzF,UAAAH,EACDP,EAAgB,QAAf,CAAqB,UAAU,yNAC9B,UAAAD,EAACD,EAAA,CAAW,UAAU,SAAS,EAC/BC,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,GACF,CAEJ,EAEAO,EAAa,YAA6B,UAAQ,YAQlD,SAASM,EAAY,CAAE,UAAAH,EAAW,GAAGC,CAAM,EAAwC,CACjF,OACEX,EAAC,UACC,UAAWc,EAAG,yEAA0EJ,CAAS,EAChG,GAAGC,EACN,CAEJ,CAQA,SAASI,EAAU,CAAE,UAAAL,EAAW,GAAGC,CAAM,EAAwC,CAC/E,OAAOX,EAAC,QAAK,UAAWc,EAAG,YAAaJ,CAAS,EAAI,GAAGC,EAAO,CACjE,CAQA,SAASK,EAAY,CAAE,UAAAN,EAAW,GAAGC,CAAM,EAAwC,CACjF,OACEX,EAAC,UACC,UAAWc,EAAG,wFAAyFJ,CAAS,EAC/G,GAAGC,EACN,CAEJ,CAEAK,EAAY,YAAc,cAS1B,IAAMC,EAAmB,aAA+C,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAGC,IAChGZ,EAAgB,QAAf,CAAqB,IAAKY,EAAK,UAAWE,EAAG,wCAAyCJ,CAAS,EAAI,GAAGC,EAAO,CAC/G,EAEDM,EAAW,YAA6B,QAAM,YAS9C,IAAMC,EAAyB,aAC7B,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACxBZ,EAAgB,cAAf,CAA2B,IAAKY,EAAK,UAAWE,EAAG,gCAAiCJ,CAAS,EAAI,GAAGC,EAAO,CAEhH,EAEAO,EAAiB,YAA6B,cAAY","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\nimport { Cross2Icon } from '@radix-ui/react-icons';\nimport { type VariantProps } from 'cva';\nimport { cn, cva } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Sheet\n * -------------------------------------------------------------------------- */\n\ntype SheetProps = React.ComponentProps<typeof SheetPrimitive.Root>;\nconst Sheet = SheetPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTrigger\n * -------------------------------------------------------------------------- */\n\ntype SheetTriggerProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Trigger>;\nconst SheetTrigger = SheetPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetClose\n * -------------------------------------------------------------------------- */\n\ntype SheetCloseProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Close>;\nconst SheetClose = SheetPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Variant: SheetContent\n * -------------------------------------------------------------------------- */\n\nconst sheetContentVariants = cva({\n base: 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 flex flex-col overflow-auto shadow-lg',\n variants: {\n side: {\n top: 'data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-screen border-b',\n bottom:\n 'data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-screen border-t',\n left: 'data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n right:\n 'data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'right',\n },\n});\n\ntype SheetContentVariantsProps = VariantProps<typeof sheetContentVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetContent\n * -------------------------------------------------------------------------- */\n\ntype SheetContentElement = React.ElementRef<typeof SheetPrimitive.Content>;\ntype SheetContentProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> & SheetContentVariantsProps;\n\nconst SheetContent = React.forwardRef<SheetContentElement, SheetContentProps>(\n ({ children, side = 'right', className, ...props }, ref) => (\n <SheetPrimitive.Portal>\n <SheetPrimitive.Overlay className=\"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80\" />\n <SheetPrimitive.Content ref={ref} className={sheetContentVariants({ side, className })} {...props}>\n {children}\n <SheetPrimitive.Close className=\"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n ),\n);\n\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetHeader\n * -------------------------------------------------------------------------- */\n\ntype SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return (\n <header\n className={cn('flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetBody\n * -------------------------------------------------------------------------- */\n\ntype SheetBodyProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetBody({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return <main className={cn('px-6 py-2', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetFooter\n * -------------------------------------------------------------------------- */\n\ntype SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetFooter({ className, ...props }: SheetFooterProps): React.JSX.Element {\n return (\n <footer\n className={cn('flex shrink-0 flex-col-reverse px-6 pb-6 pt-4 sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n );\n}\n\nSheetFooter.displayName = 'SheetFooter';\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTitle\n * -------------------------------------------------------------------------- */\n\ntype SheetTitleElement = React.ElementRef<typeof SheetPrimitive.Title>;\ntype SheetTitleProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>;\n\nconst SheetTitle = React.forwardRef<SheetTitleElement, SheetTitleProps>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title ref={ref} className={cn('text-foreground text-lg font-semibold', className)} {...props} />\n));\n\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetDescription\n * -------------------------------------------------------------------------- */\n\ntype SheetDescriptionElement = React.ElementRef<typeof SheetPrimitive.Description>;\ntype SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>;\n\nconst SheetDescription = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(\n ({ className, ...props }, ref) => (\n <SheetPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\n);\n\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetBody,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n type SheetProps,\n type SheetTriggerProps,\n type SheetCloseProps,\n type SheetContentProps,\n type SheetHeaderProps,\n type SheetBodyProps,\n type SheetFooterProps,\n type SheetTitleProps,\n type SheetDescriptionProps,\n};\n"]}
|
package/dist/react/sheet.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as p,b as
|
|
1
|
+
"use client";import{a as p,b as a}from"../chunk-LEUB3C3L.mjs";import*as r from"react";import*as e from"@radix-ui/react-dialog";import{Cross2Icon as h}from"@radix-ui/react-icons";import{jsx as i,jsxs as n}from"react/jsx-runtime";var v=e.Root,R=e.Trigger,C=e.Close,d=p({base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 flex flex-col overflow-auto shadow-lg",variants:{side:{top:"data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-screen border-b",bottom:"data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-screen border-t",left:"data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),c=r.forwardRef(({children:t,side:o="right",className:s,...m},l)=>n(e.Portal,{children:[i(e.Overlay,{className:"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80"}),n(e.Content,{ref:l,className:d({side:o,className:s}),...m,children:[t,n(e.Close,{className:"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",children:[i(h,{className:"size-4"}),i("span",{className:"sr-only",children:"Close"})]})]})]}));c.displayName=e.Content.displayName;function b({className:t,...o}){return i("header",{className:a("flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left",t),...o})}function g({className:t,...o}){return i("main",{className:a("px-6 py-2",t),...o})}function S({className:t,...o}){return i("footer",{className:a("flex shrink-0 flex-col-reverse px-6 pb-6 pt-4 sm:flex-row sm:justify-end sm:space-x-2",t),...o})}S.displayName="SheetFooter";var f=r.forwardRef(({className:t,...o},s)=>i(e.Title,{ref:s,className:a("text-foreground text-lg font-semibold",t),...o}));f.displayName=e.Title.displayName;var P=r.forwardRef(({className:t,...o},s)=>i(e.Description,{ref:s,className:a("text-muted-foreground text-sm",t),...o}));P.displayName=e.Description.displayName;export{v as Sheet,g as SheetBody,C as SheetClose,c as SheetContent,P as SheetDescription,S as SheetFooter,b as SheetHeader,f as SheetTitle,R as SheetTrigger};
|
|
2
2
|
//# sourceMappingURL=sheet.mjs.map
|
package/dist/react/sheet.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/sheet.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\nimport { Cross2Icon } from '@radix-ui/react-icons';\nimport { type VariantProps } from 'cva';\nimport { cn, cva } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n *
|
|
1
|
+
{"version":3,"sources":["../../src/react/sheet.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\nimport { Cross2Icon } from '@radix-ui/react-icons';\nimport { type VariantProps } from 'cva';\nimport { cn, cva } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Sheet\n * -------------------------------------------------------------------------- */\n\ntype SheetProps = React.ComponentProps<typeof SheetPrimitive.Root>;\nconst Sheet = SheetPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTrigger\n * -------------------------------------------------------------------------- */\n\ntype SheetTriggerProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Trigger>;\nconst SheetTrigger = SheetPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetClose\n * -------------------------------------------------------------------------- */\n\ntype SheetCloseProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Close>;\nconst SheetClose = SheetPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Variant: SheetContent\n * -------------------------------------------------------------------------- */\n\nconst sheetContentVariants = cva({\n base: 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 flex flex-col overflow-auto shadow-lg',\n variants: {\n side: {\n top: 'data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-screen border-b',\n bottom:\n 'data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-screen border-t',\n left: 'data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n right:\n 'data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'right',\n },\n});\n\ntype SheetContentVariantsProps = VariantProps<typeof sheetContentVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetContent\n * -------------------------------------------------------------------------- */\n\ntype SheetContentElement = React.ElementRef<typeof SheetPrimitive.Content>;\ntype SheetContentProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> & SheetContentVariantsProps;\n\nconst SheetContent = React.forwardRef<SheetContentElement, SheetContentProps>(\n ({ children, side = 'right', className, ...props }, ref) => (\n <SheetPrimitive.Portal>\n <SheetPrimitive.Overlay className=\"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80\" />\n <SheetPrimitive.Content ref={ref} className={sheetContentVariants({ side, className })} {...props}>\n {children}\n <SheetPrimitive.Close className=\"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n ),\n);\n\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetHeader\n * -------------------------------------------------------------------------- */\n\ntype SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return (\n <header\n className={cn('flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetBody\n * -------------------------------------------------------------------------- */\n\ntype SheetBodyProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetBody({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return <main className={cn('px-6 py-2', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetFooter\n * -------------------------------------------------------------------------- */\n\ntype SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetFooter({ className, ...props }: SheetFooterProps): React.JSX.Element {\n return (\n <footer\n className={cn('flex shrink-0 flex-col-reverse px-6 pb-6 pt-4 sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n );\n}\n\nSheetFooter.displayName = 'SheetFooter';\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTitle\n * -------------------------------------------------------------------------- */\n\ntype SheetTitleElement = React.ElementRef<typeof SheetPrimitive.Title>;\ntype SheetTitleProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>;\n\nconst SheetTitle = React.forwardRef<SheetTitleElement, SheetTitleProps>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title ref={ref} className={cn('text-foreground text-lg font-semibold', className)} {...props} />\n));\n\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetDescription\n * -------------------------------------------------------------------------- */\n\ntype SheetDescriptionElement = React.ElementRef<typeof SheetPrimitive.Description>;\ntype SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>;\n\nconst SheetDescription = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(\n ({ className, ...props }, ref) => (\n <SheetPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\n);\n\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetBody,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n type SheetProps,\n type SheetTriggerProps,\n type SheetCloseProps,\n type SheetContentProps,\n type SheetHeaderProps,\n type SheetBodyProps,\n type SheetFooterProps,\n type SheetTitleProps,\n type SheetDescriptionProps,\n};\n"],"mappings":"8DAEA,UAAYA,MAAW,QACvB,UAAYC,MAAoB,yBAChC,OAAS,cAAAC,MAAkB,wBA0DrB,cAAAC,EAGE,QAAAC,MAHF,oBAjDN,IAAMC,EAAuB,OAOvBC,EAA8B,UAO9BC,EAA4B,QAM5BC,EAAuBC,EAAI,CAC/B,KAAM,kOACN,SAAU,CACR,KAAM,CACJ,IAAK,iHACL,OACE,0HACF,KAAM,gIACN,MACE,kIACJ,CACF,EACA,gBAAiB,CACf,KAAM,OACR,CACF,CAAC,EAWKC,EAAqB,aACzB,CAAC,CAAE,SAAAC,EAAU,KAAAC,EAAO,QAAS,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAClDX,EAAgB,SAAf,CACC,UAAAD,EAAgB,UAAf,CAAuB,UAAU,wLAAwL,EAC1NC,EAAgB,UAAf,CAAuB,IAAKW,EAAK,UAAWP,EAAqB,CAAE,KAAAI,EAAM,UAAAC,CAAU,CAAC,EAAI,GAAGC,EACzF,UAAAH,EACDP,EAAgB,QAAf,CAAqB,UAAU,yNAC9B,UAAAD,EAACa,EAAA,CAAW,UAAU,SAAS,EAC/Bb,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,GACF,CAEJ,EAEAO,EAAa,YAA6B,UAAQ,YAQlD,SAASO,EAAY,CAAE,UAAAJ,EAAW,GAAGC,CAAM,EAAwC,CACjF,OACEX,EAAC,UACC,UAAWe,EAAG,yEAA0EL,CAAS,EAChG,GAAGC,EACN,CAEJ,CAQA,SAASK,EAAU,CAAE,UAAAN,EAAW,GAAGC,CAAM,EAAwC,CAC/E,OAAOX,EAAC,QAAK,UAAWe,EAAG,YAAaL,CAAS,EAAI,GAAGC,EAAO,CACjE,CAQA,SAASM,EAAY,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAwC,CACjF,OACEX,EAAC,UACC,UAAWe,EAAG,wFAAyFL,CAAS,EAC/G,GAAGC,EACN,CAEJ,CAEAM,EAAY,YAAc,cAS1B,IAAMC,EAAmB,aAA+C,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IAChGZ,EAAgB,QAAf,CAAqB,IAAKY,EAAK,UAAWG,EAAG,wCAAyCL,CAAS,EAAI,GAAGC,EAAO,CAC/G,EAEDO,EAAW,YAA6B,QAAM,YAS9C,IAAMC,EAAyB,aAC7B,CAAC,CAAE,UAAAT,EAAW,GAAGC,CAAM,EAAGC,IACxBZ,EAAgB,cAAf,CAA2B,IAAKY,EAAK,UAAWG,EAAG,gCAAiCL,CAAS,EAAI,GAAGC,EAAO,CAEhH,EAEAQ,EAAiB,YAA6B,cAAY","names":["React","SheetPrimitive","Cross2Icon","jsx","jsxs","Sheet","SheetTrigger","SheetClose","sheetContentVariants","cva","SheetContent","children","side","className","props","ref","Cross2Icon","SheetHeader","cn","SheetBody","SheetFooter","SheetTitle","SheetDescription"]}
|