-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdialog-stories.ab916fb5.iframe.bundle.js
1 lines (1 loc) · 18.3 KB
/
dialog-stories.ab916fb5.iframe.bundle.js
1
"use strict";(self.webpackChunkwww=self.webpackChunkwww||[]).push([[855],{"./lib/utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{cn:()=>cn});var clsx__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/clsx/dist/clsx.m.js"),tailwind_merge__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/tailwind-merge/dist/lib/tw-merge.mjs");__webpack_require__("../../node_modules/process/browser.js");function cn(){for(var _len=arguments.length,inputs=new Array(_len),_key=0;_key<_len;_key++)inputs[_key]=arguments[_key];return(0,tailwind_merge__WEBPACK_IMPORTED_MODULE_0__.m)((0,clsx__WEBPACK_IMPORTED_MODULE_1__.W)(inputs))}},"./registry/default/ui/button.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{d:()=>buttonVariants,z:()=>Button});var _Users_leah_dev_ui_node_modules_babel_runtime_helpers_esm_extends_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/extends.js"),_Users_leah_dev_ui_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/@radix-ui/react-slot/dist/index.mjs"),class_variance_authority__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/class-variance-authority/dist/index.esm.js"),_lib_utils__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./lib/utils.ts"),_excluded=["className","variant","size","asChild"],__jsx=react__WEBPACK_IMPORTED_MODULE_0__.createElement,buttonVariants=(0,class_variance_authority__WEBPACK_IMPORTED_MODULE_2__.j)("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Button=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((function(_ref,ref){var className=_ref.className,variant=_ref.variant,size=_ref.size,_ref$asChild=_ref.asChild,asChild=void 0!==_ref$asChild&&_ref$asChild,props=(0,_Users_leah_dev_ui_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__.Z)(_ref,_excluded),Comp=asChild?_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_4__.g7:"button";return __jsx(Comp,(0,_Users_leah_dev_ui_node_modules_babel_runtime_helpers_esm_extends_js__WEBPACK_IMPORTED_MODULE_5__.Z)({className:(0,_lib_utils__WEBPACK_IMPORTED_MODULE_1__.cn)(buttonVariants({variant,size,className})),ref},props))}));Button.displayName="Button",Button.__docgenInfo={description:"",methods:[],displayName:"Button",props:{asChild:{defaultValue:{value:"false",computed:!1},required:!1}}};try{Button.displayName="Button",Button.__docgenInfo={description:"",displayName:"Button",props:{asChild:{defaultValue:{value:"false"},description:"",name:"asChild",required:!1,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:'"default" | "sm" | "lg" | "icon" | null'}},variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:'"link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/button.tsx#Button"]={docgenInfo:Button.__docgenInfo,name:"Button",path:"registry/default/ui/button.tsx#Button"})}catch(__react_docgen_typescript_loader_error){}},"./registry/default/ui/input.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{I:()=>Input});var _Users_leah_dev_ui_node_modules_babel_runtime_helpers_esm_extends_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/extends.js"),_Users_leah_dev_ui_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/react/index.js"),_lib_utils__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./lib/utils.ts"),_excluded=["className","type"],__jsx=react__WEBPACK_IMPORTED_MODULE_0__.createElement,Input=react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((function(_ref,ref){var className=_ref.className,type=_ref.type,props=(0,_Users_leah_dev_ui_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_2__.Z)(_ref,_excluded);return __jsx("input",(0,_Users_leah_dev_ui_node_modules_babel_runtime_helpers_esm_extends_js__WEBPACK_IMPORTED_MODULE_3__.Z)({type,className:(0,_lib_utils__WEBPACK_IMPORTED_MODULE_1__.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",className),ref},props))}));Input.displayName="Input",Input.__docgenInfo={description:"",methods:[],displayName:"Input"};try{Input.displayName="Input",Input.__docgenInfo={description:"",displayName:"Input",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/input.tsx#Input"]={docgenInfo:Input.__docgenInfo,name:"Input",path:"registry/default/ui/input.tsx#Input"})}catch(__react_docgen_typescript_loader_error){}},"./registry/default/ui/label.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{_:()=>Label});var esm_extends=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/extends.js"),objectWithoutProperties=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react=__webpack_require__("../../node_modules/react/index.js"),dist=__webpack_require__("../../node_modules/@radix-ui/react-primitive/dist/index.mjs");const $b73a6c6685e72184$export$b04be29aa201d4f5=(0,react.forwardRef)(((props,forwardedRef)=>(0,react.createElement)(dist.WV.label,(0,esm_extends.Z)({},props,{ref:forwardedRef,onMouseDown:event=>{var _props$onMouseDown;null===(_props$onMouseDown=props.onMouseDown)||void 0===_props$onMouseDown||_props$onMouseDown.call(props,event),!event.defaultPrevented&&event.detail>1&&event.preventDefault()}})))),$b73a6c6685e72184$export$be92b6f5f03c0fe9=$b73a6c6685e72184$export$b04be29aa201d4f5;var index_esm=__webpack_require__("../../node_modules/class-variance-authority/dist/index.esm.js"),utils=__webpack_require__("./lib/utils.ts"),_excluded=["className"],__jsx=react.createElement,labelVariants=(0,index_esm.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Label=react.forwardRef((function(_ref,ref){var className=_ref.className,props=(0,objectWithoutProperties.Z)(_ref,_excluded);return __jsx($b73a6c6685e72184$export$be92b6f5f03c0fe9,(0,esm_extends.Z)({ref,className:(0,utils.cn)(labelVariants(),className)},props))}));Label.displayName=$b73a6c6685e72184$export$be92b6f5f03c0fe9.displayName,Label.__docgenInfo={description:"",methods:[]};try{Label.displayName="Label",Label.__docgenInfo={description:"",displayName:"Label",props:{asChild:{defaultValue:null,description:"",name:"asChild",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/label.tsx#Label"]={docgenInfo:Label.__docgenInfo,name:"Label",path:"registry/default/ui/label.tsx#Label"})}catch(__react_docgen_typescript_loader_error){}},"./registry/stories/dialog.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Base:()=>Base,default:()=>dialog_stories});var defineProperty=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),react=__webpack_require__("../../node_modules/react/index.js"),ui_button=__webpack_require__("./registry/default/ui/button.tsx"),esm_extends=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/extends.js"),objectWithoutProperties=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),dist=__webpack_require__("../../node_modules/@radix-ui/react-dialog/dist/index.mjs");const X=(0,__webpack_require__("../../node_modules/lucide-react/dist/esm/createLucideIcon.js").Z)("X",[["line",{x1:"18",x2:"6",y1:"6",y2:"18",key:"15jfxm"}],["line",{x1:"6",x2:"18",y1:"6",y2:"18",key:"d1lma3"}]]);var utils=__webpack_require__("./lib/utils.ts"),_excluded=["className"],_excluded2=["className"],_excluded3=["className","children"],_excluded4=["className"],_excluded5=["className"],_excluded6=["className"],_excluded7=["className"],__jsx=react.createElement,Dialog=dist.fC,DialogTrigger=dist.xz,DialogPortal=function DialogPortal(_ref){var className=_ref.className,props=(0,objectWithoutProperties.Z)(_ref,_excluded);return __jsx(dist.h_,(0,esm_extends.Z)({className:(0,utils.cn)(className)},props))};DialogPortal.displayName="DialogPortal",DialogPortal.displayName=dist.h_.displayName;var DialogOverlay=react.forwardRef((function(_ref2,ref){var className=_ref2.className,props=(0,objectWithoutProperties.Z)(_ref2,_excluded2);return __jsx(dist.aV,(0,esm_extends.Z)({ref,className:(0,utils.cn)("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",className)},props))}));DialogOverlay.displayName=dist.aV.displayName;var DialogContent=react.forwardRef((function(_ref3,ref){var className=_ref3.className,children=_ref3.children,props=(0,objectWithoutProperties.Z)(_ref3,_excluded3);return __jsx(DialogPortal,null,__jsx(DialogOverlay,null),__jsx(dist.VY,(0,esm_extends.Z)({ref,className:(0,utils.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",className)},props),children,__jsx(dist.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},__jsx(X,{className:"h-4 w-4"}),__jsx("span",{className:"sr-only"},"Close"))))}));DialogContent.displayName=dist.VY.displayName;var DialogHeader=function DialogHeader(_ref4){var className=_ref4.className,props=(0,objectWithoutProperties.Z)(_ref4,_excluded4);return __jsx("div",(0,esm_extends.Z)({className:(0,utils.cn)("flex flex-col space-y-1.5 text-center sm:text-left",className)},props))};DialogHeader.displayName="DialogHeader",DialogHeader.displayName="DialogHeader";var DialogFooter=function DialogFooter(_ref5){var className=_ref5.className,props=(0,objectWithoutProperties.Z)(_ref5,_excluded5);return __jsx("div",(0,esm_extends.Z)({className:(0,utils.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",className)},props))};DialogFooter.displayName="DialogFooter",DialogFooter.displayName="DialogFooter";var DialogTitle=react.forwardRef((function(_ref6,ref){var className=_ref6.className,props=(0,objectWithoutProperties.Z)(_ref6,_excluded6);return __jsx(dist.Dx,(0,esm_extends.Z)({ref,className:(0,utils.cn)("text-lg font-semibold leading-none tracking-tight",className)},props))}));DialogTitle.displayName=dist.Dx.displayName;var DialogDescription=react.forwardRef((function(_ref7,ref){var className=_ref7.className,props=(0,objectWithoutProperties.Z)(_ref7,_excluded7);return __jsx(dist.dk,(0,esm_extends.Z)({ref,className:(0,utils.cn)("text-sm text-muted-foreground",className)},props))}));DialogDescription.displayName=dist.dk.displayName,DialogContent.__docgenInfo={description:"",methods:[]},DialogHeader.__docgenInfo={description:"",methods:[],displayName:"DialogHeader"},DialogFooter.__docgenInfo={description:"",methods:[],displayName:"DialogFooter"},DialogTitle.__docgenInfo={description:"",methods:[]},DialogDescription.__docgenInfo={description:"",methods:[]};try{DialogHeader.displayName="DialogHeader",DialogHeader.__docgenInfo={description:"",displayName:"DialogHeader",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/dialog.tsx#DialogHeader"]={docgenInfo:DialogHeader.__docgenInfo,name:"DialogHeader",path:"registry/default/ui/dialog.tsx#DialogHeader"})}catch(__react_docgen_typescript_loader_error){}var _Base$parameters,_Base$parameters2,input=__webpack_require__("./registry/default/ui/input.tsx"),label=__webpack_require__("./registry/default/ui/label.tsx"),dialog_stories_jsx=react.createElement;function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){(0,defineProperty.Z)(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}const dialog_stories={title:"ui/Dialog",component:Dialog,tags:["autodocs"],argTypes:{}};var Base={render:function render(args){return dialog_stories_jsx(Dialog,null,dialog_stories_jsx(DialogTrigger,{asChild:!0},dialog_stories_jsx(ui_button.z,{variant:"outline"},"Edit Profile")),dialog_stories_jsx(DialogContent,{className:"sm:max-w-[425px]"},dialog_stories_jsx(DialogHeader,null,dialog_stories_jsx(DialogTitle,null,"Edit profile"),dialog_stories_jsx(DialogDescription,null,"Make changes to your profile here. Click save when you're done.")),dialog_stories_jsx("div",{className:"grid gap-4 py-4"},dialog_stories_jsx("div",{className:"grid grid-cols-4 items-center gap-4"},dialog_stories_jsx(label._,{htmlFor:"name",className:"text-right"},"Name"),dialog_stories_jsx(input.I,{id:"name",value:"Pedro Duarte",className:"col-span-3"})),dialog_stories_jsx("div",{className:"grid grid-cols-4 items-center gap-4"},dialog_stories_jsx(label._,{htmlFor:"username",className:"text-right"},"Username"),dialog_stories_jsx(input.I,{id:"username",value:"@peduarte",className:"col-span-3"}))),dialog_stories_jsx(DialogFooter,null,dialog_stories_jsx(ui_button.z,{type:"submit"},"Save changes"))))},args:{}};Base.parameters=_objectSpread(_objectSpread({},Base.parameters),{},{docs:_objectSpread(_objectSpread({},null===(_Base$parameters=Base.parameters)||void 0===_Base$parameters?void 0:_Base$parameters.docs),{},{source:_objectSpread({originalSource:'{\n render: args => <Dialog>\n <DialogTrigger asChild>\n <Button variant="outline">Edit Profile</Button>\n </DialogTrigger>\n <DialogContent className="sm:max-w-[425px]">\n <DialogHeader>\n <DialogTitle>Edit profile</DialogTitle>\n <DialogDescription>\n Make changes to your profile here. Click save when you\'re done.\n </DialogDescription>\n </DialogHeader>\n <div className="grid gap-4 py-4">\n <div className="grid grid-cols-4 items-center gap-4">\n <Label htmlFor="name" className="text-right">\n Name\n </Label>\n <Input id="name" value="Pedro Duarte" className="col-span-3" />\n </div>\n <div className="grid grid-cols-4 items-center gap-4">\n <Label htmlFor="username" className="text-right">\n Username\n </Label>\n <Input id="username" value="@peduarte" className="col-span-3" />\n </div>\n </div>\n <DialogFooter>\n <Button type="submit">Save changes</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>,\n args: {}\n}'},null===(_Base$parameters2=Base.parameters)||void 0===_Base$parameters2||null===(_Base$parameters2=_Base$parameters2.docs)||void 0===_Base$parameters2?void 0:_Base$parameters2.source)})})},"../../node_modules/lucide-react/dist/esm/createLucideIcon.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>createLucideIcon});var react=__webpack_require__("../../node_modules/react/index.js"),defaultAttributes={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const createLucideIcon=(iconName,iconNode)=>{const Component=(0,react.forwardRef)((({color="currentColor",size=24,strokeWidth=2,absoluteStrokeWidth,children,...rest},ref)=>{return(0,react.createElement)("svg",{ref,...defaultAttributes,width:size,height:size,stroke:color,strokeWidth:absoluteStrokeWidth?24*Number(strokeWidth)/Number(size):strokeWidth,className:`lucide lucide-${string=iconName,string.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,...rest},[...iconNode.map((([tag,attrs])=>(0,react.createElement)(tag,attrs))),...(Array.isArray(children)?children:[children])||[]]);var string}));return Component.displayName=`${iconName}`,Component}}}]);