-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalert-dialog-stories.a11f5ddb.iframe.bundle.js
1 lines (1 loc) · 18.5 KB
/
alert-dialog-stories.a11f5ddb.iframe.bundle.js
1
"use strict";(self.webpackChunkwww=self.webpackChunkwww||[]).push([[904],{"./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/stories/alert-dialog.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Base:()=>Base,default:()=>alert_dialog_stories});var defineProperty=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),react=__webpack_require__("../../node_modules/react/index.js"),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-context/dist/index.mjs"),react_compose_refs_dist=__webpack_require__("../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs"),react_dialog_dist=__webpack_require__("../../node_modules/@radix-ui/react-dialog/dist/index.mjs"),primitive_dist=__webpack_require__("../../node_modules/@radix-ui/primitive/dist/index.mjs"),react_slot_dist=__webpack_require__("../../node_modules/@radix-ui/react-slot/dist/index.mjs");__webpack_require__("../../node_modules/console-browserify/index.js");const[$905f4ae918aab1aa$var$createAlertDialogContext,$905f4ae918aab1aa$export$b8891880751c2c5b]=(0,dist.b)("AlertDialog",[react_dialog_dist.p8]),$905f4ae918aab1aa$var$useDialogScope=(0,react_dialog_dist.p8)(),$905f4ae918aab1aa$export$de466dd8317b0b75=props=>{const{__scopeAlertDialog,...alertDialogProps}=props,dialogScope=$905f4ae918aab1aa$var$useDialogScope(__scopeAlertDialog);return(0,react.createElement)(react_dialog_dist.fC,(0,esm_extends.Z)({},dialogScope,alertDialogProps,{modal:!0}))},$905f4ae918aab1aa$export$6edd7a623ef0f40b=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeAlertDialog,...triggerProps}=props,dialogScope=$905f4ae918aab1aa$var$useDialogScope(__scopeAlertDialog);return(0,react.createElement)(react_dialog_dist.xz,(0,esm_extends.Z)({},dialogScope,triggerProps,{ref:forwardedRef}))})),$905f4ae918aab1aa$export$660f2bfdb986706c=props=>{const{__scopeAlertDialog,...portalProps}=props,dialogScope=$905f4ae918aab1aa$var$useDialogScope(__scopeAlertDialog);return(0,react.createElement)(react_dialog_dist.h_,(0,esm_extends.Z)({},dialogScope,portalProps))},$905f4ae918aab1aa$export$a707a4895ce23256=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeAlertDialog,...overlayProps}=props,dialogScope=$905f4ae918aab1aa$var$useDialogScope(__scopeAlertDialog);return(0,react.createElement)(react_dialog_dist.aV,(0,esm_extends.Z)({},dialogScope,overlayProps,{ref:forwardedRef}))})),[$905f4ae918aab1aa$var$AlertDialogContentProvider,$905f4ae918aab1aa$var$useAlertDialogContentContext]=$905f4ae918aab1aa$var$createAlertDialogContext("AlertDialogContent"),$905f4ae918aab1aa$export$94e6af45f0af4efd=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeAlertDialog,children,...contentProps}=props,dialogScope=$905f4ae918aab1aa$var$useDialogScope(__scopeAlertDialog),contentRef=(0,react.useRef)(null),composedRefs=(0,react_compose_refs_dist.e)(forwardedRef,contentRef),cancelRef=(0,react.useRef)(null);return(0,react.createElement)(react_dialog_dist.jm,{contentName:"AlertDialogContent",titleName:$905f4ae918aab1aa$var$TITLE_NAME,docsSlug:"alert-dialog"},(0,react.createElement)($905f4ae918aab1aa$var$AlertDialogContentProvider,{scope:__scopeAlertDialog,cancelRef},(0,react.createElement)(react_dialog_dist.VY,(0,esm_extends.Z)({role:"alertdialog"},dialogScope,contentProps,{ref:composedRefs,onOpenAutoFocus:(0,primitive_dist.M)(contentProps.onOpenAutoFocus,(event=>{var _cancelRef$current;event.preventDefault(),null===(_cancelRef$current=cancelRef.current)||void 0===_cancelRef$current||_cancelRef$current.focus({preventScroll:!0})})),onPointerDownOutside:event=>event.preventDefault(),onInteractOutside:event=>event.preventDefault()}),(0,react.createElement)(react_slot_dist.A4,null,children),!1)))})),$905f4ae918aab1aa$var$TITLE_NAME="AlertDialogTitle",$905f4ae918aab1aa$export$225e0da62d314b7=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeAlertDialog,...titleProps}=props,dialogScope=$905f4ae918aab1aa$var$useDialogScope(__scopeAlertDialog);return(0,react.createElement)(react_dialog_dist.Dx,(0,esm_extends.Z)({},dialogScope,titleProps,{ref:forwardedRef}))})),$905f4ae918aab1aa$export$a23b55cde55ad9a5=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeAlertDialog,...descriptionProps}=props,dialogScope=$905f4ae918aab1aa$var$useDialogScope(__scopeAlertDialog);return(0,react.createElement)(react_dialog_dist.dk,(0,esm_extends.Z)({},dialogScope,descriptionProps,{ref:forwardedRef}))})),$905f4ae918aab1aa$export$b454f818c58ee85d=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeAlertDialog,...actionProps}=props,dialogScope=$905f4ae918aab1aa$var$useDialogScope(__scopeAlertDialog);return(0,react.createElement)(react_dialog_dist.x8,(0,esm_extends.Z)({},dialogScope,actionProps,{ref:forwardedRef}))})),$905f4ae918aab1aa$export$2f67a923571aaea0=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeAlertDialog,...cancelProps}=props,{cancelRef}=$905f4ae918aab1aa$var$useAlertDialogContentContext("AlertDialogCancel",__scopeAlertDialog),dialogScope=$905f4ae918aab1aa$var$useDialogScope(__scopeAlertDialog),ref=(0,react_compose_refs_dist.e)(forwardedRef,cancelRef);return(0,react.createElement)(react_dialog_dist.x8,(0,esm_extends.Z)({},dialogScope,cancelProps,{ref}))})),$905f4ae918aab1aa$export$be92b6f5f03c0fe9=$905f4ae918aab1aa$export$de466dd8317b0b75,$905f4ae918aab1aa$export$41fb9f06171c75f4=$905f4ae918aab1aa$export$6edd7a623ef0f40b,$905f4ae918aab1aa$export$602eac185826482c=$905f4ae918aab1aa$export$660f2bfdb986706c,$905f4ae918aab1aa$export$c6fdb837b070b4ff=$905f4ae918aab1aa$export$a707a4895ce23256,$905f4ae918aab1aa$export$7c6e2c02157bb7d2=$905f4ae918aab1aa$export$94e6af45f0af4efd,$905f4ae918aab1aa$export$e19cd5f9376f8cee=$905f4ae918aab1aa$export$b454f818c58ee85d,$905f4ae918aab1aa$export$848c9b7ead0df967=$905f4ae918aab1aa$export$2f67a923571aaea0,$905f4ae918aab1aa$export$f99233281efd08a0=$905f4ae918aab1aa$export$225e0da62d314b7,$905f4ae918aab1aa$export$393edc798c47379d=$905f4ae918aab1aa$export$a23b55cde55ad9a5;var utils=__webpack_require__("./lib/utils.ts"),ui_button=__webpack_require__("./registry/default/ui/button.tsx"),_excluded=["className"],_excluded2=["className","children"],_excluded3=["className"],_excluded4=["className"],_excluded5=["className"],_excluded6=["className"],_excluded7=["className"],_excluded8=["className"],_excluded9=["className"],__jsx=react.createElement,AlertDialog=$905f4ae918aab1aa$export$be92b6f5f03c0fe9,AlertDialogTrigger=$905f4ae918aab1aa$export$41fb9f06171c75f4,AlertDialogPortal=function AlertDialogPortal(_ref){var className=_ref.className,props=(0,objectWithoutProperties.Z)(_ref,_excluded);return __jsx($905f4ae918aab1aa$export$602eac185826482c,(0,esm_extends.Z)({className:(0,utils.cn)(className)},props))};AlertDialogPortal.displayName="AlertDialogPortal",AlertDialogPortal.displayName=$905f4ae918aab1aa$export$602eac185826482c.displayName;var AlertDialogOverlay=react.forwardRef((function(_ref2,ref){var className=_ref2.className,props=(_ref2.children,(0,objectWithoutProperties.Z)(_ref2,_excluded2));return __jsx($905f4ae918aab1aa$export$c6fdb837b070b4ff,(0,esm_extends.Z)({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,{ref}))}));AlertDialogOverlay.displayName=$905f4ae918aab1aa$export$c6fdb837b070b4ff.displayName;var AlertDialogContent=react.forwardRef((function(_ref3,ref){var className=_ref3.className,props=(0,objectWithoutProperties.Z)(_ref3,_excluded3);return __jsx(AlertDialogPortal,null,__jsx(AlertDialogOverlay,null),__jsx($905f4ae918aab1aa$export$7c6e2c02157bb7d2,(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)))}));AlertDialogContent.displayName=$905f4ae918aab1aa$export$7c6e2c02157bb7d2.displayName;var AlertDialogHeader=function AlertDialogHeader(_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-2 text-center sm:text-left",className)},props))};AlertDialogHeader.displayName="AlertDialogHeader",AlertDialogHeader.displayName="AlertDialogHeader";var AlertDialogFooter=function AlertDialogFooter(_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))};AlertDialogFooter.displayName="AlertDialogFooter",AlertDialogFooter.displayName="AlertDialogFooter";var AlertDialogTitle=react.forwardRef((function(_ref6,ref){var className=_ref6.className,props=(0,objectWithoutProperties.Z)(_ref6,_excluded6);return __jsx($905f4ae918aab1aa$export$f99233281efd08a0,(0,esm_extends.Z)({ref,className:(0,utils.cn)("text-lg font-semibold",className)},props))}));AlertDialogTitle.displayName=$905f4ae918aab1aa$export$f99233281efd08a0.displayName;var AlertDialogDescription=react.forwardRef((function(_ref7,ref){var className=_ref7.className,props=(0,objectWithoutProperties.Z)(_ref7,_excluded7);return __jsx($905f4ae918aab1aa$export$393edc798c47379d,(0,esm_extends.Z)({ref,className:(0,utils.cn)("text-sm text-muted-foreground",className)},props))}));AlertDialogDescription.displayName=$905f4ae918aab1aa$export$393edc798c47379d.displayName;var AlertDialogAction=react.forwardRef((function(_ref8,ref){var className=_ref8.className,props=(0,objectWithoutProperties.Z)(_ref8,_excluded8);return __jsx($905f4ae918aab1aa$export$e19cd5f9376f8cee,(0,esm_extends.Z)({ref,className:(0,utils.cn)((0,ui_button.d)(),className)},props))}));AlertDialogAction.displayName=$905f4ae918aab1aa$export$e19cd5f9376f8cee.displayName;var _Base$parameters,_Base$parameters2,AlertDialogCancel=react.forwardRef((function(_ref9,ref){var className=_ref9.className,props=(0,objectWithoutProperties.Z)(_ref9,_excluded9);return __jsx($905f4ae918aab1aa$export$848c9b7ead0df967,(0,esm_extends.Z)({ref,className:(0,utils.cn)((0,ui_button.d)({variant:"outline"}),"mt-2 sm:mt-0",className)},props))}));AlertDialogCancel.displayName=$905f4ae918aab1aa$export$848c9b7ead0df967.displayName,AlertDialogContent.__docgenInfo={description:"",methods:[]},AlertDialogHeader.__docgenInfo={description:"",methods:[],displayName:"AlertDialogHeader"},AlertDialogFooter.__docgenInfo={description:"",methods:[],displayName:"AlertDialogFooter"},AlertDialogTitle.__docgenInfo={description:"",methods:[]},AlertDialogDescription.__docgenInfo={description:"",methods:[]},AlertDialogAction.__docgenInfo={description:"",methods:[]},AlertDialogCancel.__docgenInfo={description:"",methods:[]};try{AlertDialogHeader.displayName="AlertDialogHeader",AlertDialogHeader.__docgenInfo={description:"",displayName:"AlertDialogHeader",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/alert-dialog.tsx#AlertDialogHeader"]={docgenInfo:AlertDialogHeader.__docgenInfo,name:"AlertDialogHeader",path:"registry/default/ui/alert-dialog.tsx#AlertDialogHeader"})}catch(__react_docgen_typescript_loader_error){}var alert_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 alert_dialog_stories={title:"ui/AlertDialog",component:AlertDialog,tags:["autodocs"],argTypes:{}};var Base={render:function render(){return alert_dialog_stories_jsx(AlertDialog,null,alert_dialog_stories_jsx(AlertDialogTrigger,{asChild:!0},alert_dialog_stories_jsx(ui_button.z,{variant:"outline"},"Open")),alert_dialog_stories_jsx(AlertDialogContent,null,alert_dialog_stories_jsx(AlertDialogHeader,null,alert_dialog_stories_jsx(AlertDialogTitle,null,"Are you sure absolutely sure?"),alert_dialog_stories_jsx(AlertDialogDescription,null,"This action cannot be undone. This will permanently delete your account and remove your data from our servers.")),alert_dialog_stories_jsx(AlertDialogFooter,null,alert_dialog_stories_jsx(AlertDialogCancel,null,"Cancel"),alert_dialog_stories_jsx(AlertDialogAction,null,"Continue"))))},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: () => <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant="outline">Open</Button>\n </AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Are you sure absolutely sure?</AlertDialogTitle>\n <AlertDialogDescription>\n This action cannot be undone. This will permanently delete your\n account and remove your data from our servers.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction>Continue</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>,\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)})})}}]);