@radix-ui/themes
Version:
[](https://radix-ui.com/themes)
3 lines (2 loc) • 2.67 kB
JavaScript
;var W=Object.create;var n=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var M=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},d=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of B(t))!S.call(e,l)&&l!==r&&n(e,l,{get:()=>t[l],enumerable:!(a=O(t,l))||a.enumerable});return e};var p=(e,t,r)=>(r=e!=null?W(H(e)):{},d(t||!e||!e.__esModule?n(r,"default",{value:e,enumerable:!0}):r,e)),j=e=>d(n({},"__esModule",{value:!0}),e);var z={};M(z,{Action:()=>f,Cancel:()=>C,Content:()=>A,Description:()=>c,Root:()=>m,Title:()=>P,Trigger:()=>D});module.exports=j(z);var o=p(require("react")),y=p(require("classnames")),i=p(require("@radix-ui/react-alert-dialog")),v=require("./alert-dialog.props.js"),T=require("./heading.js"),R=require("./text.js"),h=require("./theme.js"),g=require("../helpers/extract-props.js"),s=require("../helpers/require-react-element.js");const m=e=>o.createElement(i.Root,{...e});m.displayName="AlertDialog.Root";const D=o.forwardRef(({children:e,...t},r)=>o.createElement(i.Trigger,{...t,ref:r,asChild:!0},(0,s.requireReactElement)(e)));D.displayName="AlertDialog.Trigger";const A=o.forwardRef(({align:e,...t},r)=>{const{align:a,...l}=v.alertDialogContentPropDefs,{className:E}=(0,g.extractProps)({align:e},{align:a}),{className:N,forceMount:u,container:x,...w}=(0,g.extractProps)(t,l);return o.createElement(i.Portal,{container:x,forceMount:u},o.createElement(h.Theme,{asChild:!0},o.createElement(i.Overlay,{className:"rt-BaseDialogOverlay rt-AlertDialogOverlay"},o.createElement("div",{className:"rt-BaseDialogScroll rt-AlertDialogScroll"},o.createElement("div",{className:`rt-BaseDialogScrollPadding rt-AlertDialogScrollPadding ${E}`},o.createElement(i.Content,{...w,ref:r,className:(0,y.default)("rt-BaseDialogContent","rt-AlertDialogContent",N)}))))))});A.displayName="AlertDialog.Content";const P=o.forwardRef((e,t)=>o.createElement(i.Title,{asChild:!0},o.createElement(T.Heading,{size:"5",mb:"3",trim:"start",...e,asChild:!1,ref:t})));P.displayName="AlertDialog.Title";const c=o.forwardRef((e,t)=>o.createElement(i.Description,{asChild:!0},o.createElement(R.Text,{as:"p",size:"3",...e,asChild:!1,ref:t})));c.displayName="AlertDialog.Description";const f=o.forwardRef(({children:e,...t},r)=>o.createElement(i.Action,{...t,ref:r,asChild:!0},(0,s.requireReactElement)(e)));f.displayName="AlertDialog.Action";const C=o.forwardRef(({children:e,...t},r)=>o.createElement(i.Cancel,{...t,ref:r,asChild:!0},(0,s.requireReactElement)(e)));C.displayName="AlertDialog.Cancel";
//# sourceMappingURL=alert-dialog.js.map