New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@flows/react-components

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flows/react-components - npm Package Compare versions

Comparing version

to
0.0.2-canary.5

2

dist/index.js
"use client"
"use strict";var J=Object.create;var w=Object.defineProperty,K=Object.defineProperties,Q=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyDescriptors,oo=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,eo=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var F=(o,e,t)=>e in o?w(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,d=(o,e)=>{for(var t in e||(e={}))h.call(e,t)&&F(o,t,e[t]);if(c)for(var t of c(e))W.call(e,t)&&F(o,t,e[t]);return o},E=(o,e)=>K(o,j(e));var m=(o,e)=>{var t={};for(var r in o)h.call(o,r)&&e.indexOf(r)<0&&(t[r]=o[r]);if(o!=null&&c)for(var r of c(o))e.indexOf(r)<0&&W.call(o,r)&&(t[r]=o[r]);return t};var to=(o,e)=>{for(var t in e)w(o,t,{get:e[t],enumerable:!0})},I=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of oo(e))!h.call(o,l)&&l!==t&&w(o,l,{get:()=>e[l],enumerable:!(r=Q(e,l))||r.enumerable});return o};var b=(o,e,t)=>(t=o!=null?J(eo(o)):{},I(e||!o||!o.__esModule?w(t,"default",{value:o,enumerable:!0}):t,o)),ro=o=>I(w({},"__esModule",{value:!0}),o);var bo={};to(bo,{Modal:()=>no,Tooltip:()=>co});module.exports=ro(bo);var D=b(require("classnames"));var y={button:"s",primary:"o",secondary:"r"};var M=require("react/jsx-runtime"),g=r=>{var l=r,{className:o,variant:e}=l,t=m(l,["className","variant"]);return(0,M.jsx)("button",d({type:"button",className:(0,D.default)(y.button,y[e],o)},t))};var U=b(require("classnames"));var A=b(require("classnames"));var C={text:"i",body:"f",title:"d"};var G=require("react/jsx-runtime"),p=r=>{var l=r,{className:o,variant:e}=l,t=m(l,["className","variant"]);return(0,G.jsx)("p",d({className:(0,A.default)(C.text,C[e],o)},t))};var L=b(require("classnames"));var O={button:"a"};var _=require("react/jsx-runtime"),v=t=>{var r=t,{className:o}=r,e=m(r,["className"]);return(0,_.jsx)("button",d({type:"button",className:(0,L.default)(O.button,o)},e))};var N=require("react/jsx-runtime");function u(o){return(0,N.jsx)("svg",E(d({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},o),{children:(0,N.jsx)("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})}))}var f={overlay:"t",wrapper:"n",modal:"w",footer:"b",close:"p"};var a=require("react/jsx-runtime"),V=o=>(0,a.jsxs)(a.Fragment,{children:[o.overlay?(0,a.jsx)("div",{className:(0,U.default)(f.overlay,o.onClose&&f.clickable),onClick:o.onClose,"aria-hidden":"true"}):null,(0,a.jsx)("div",{className:f.wrapper,children:(0,a.jsxs)("div",{className:f.modal,children:[(0,a.jsx)(p,{variant:"title",children:o.title}),(0,a.jsx)(p,{variant:"body",children:o.body}),(0,a.jsx)("div",{className:f.footer,children:o.buttons}),o.onClose?(0,a.jsx)(v,{className:f.close,onClick:o.onClose,children:(0,a.jsx)(u,{})}):null]})})]});var z=require("react/jsx-runtime"),no=o=>(0,z.jsx)(V,{title:o.title,body:o.body,buttons:(0,z.jsx)(g,{variant:"primary",onClick:o.continue,children:o.continueText}),overlay:!o.hideOverlay,onClose:o.showCloseButton?o.close:void 0});var H=require("react"),i=require("@floating-ui/react-dom");var n={root:"g",tooltip:"l",arrow:"v","arrow-bottom":"m","arrow-top":"x",footer:"u",close:"h"};var s=require("react/jsx-runtime"),mo=4,$=6,po=8,wo=8,X=o=>{var T,S;let e=(0,H.useRef)(null),t=mo+$,{refs:r,middlewareData:l,placement:x,x:Y,y:Z}=(0,i.useFloating)({elements:{reference:document.querySelector(o.targetElement)},middleware:[(0,i.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,i.shift)({crossAxis:!0,padding:po}),(0,i.arrow)({element:e,padding:wo}),(0,i.offset)(t)]}),q=x.includes("top")?"bottom":x.includes("bottom")?"top":x.includes("left")?"right":"left",k=(T=l.arrow)==null?void 0:T.x,B=(S=l.arrow)==null?void 0:S.y,P={left:k!=null?`${k}px`:"",top:B!=null?`${B}px`:"",right:"",bottom:"",[q]:`${-$}px`};return(0,s.jsx)("div",{className:n.root,children:(0,s.jsxs)("div",{className:n.tooltip,ref:r.setFloating,style:{left:Y,top:Z},children:[(0,s.jsx)(p,{variant:"title",children:o.title}),(0,s.jsx)(p,{variant:"body",children:o.body}),(0,s.jsx)("div",{className:n.footer,children:o.buttons}),o.onClose?(0,s.jsx)(v,{className:n.close,onClick:o.onClose,children:(0,s.jsx)(u,{})}):null,(0,s.jsx)("div",{className:[n.arrow,n["arrow-bottom"]].join(" "),ref:e,style:P}),(0,s.jsx)("div",{className:[n.arrow,n["arrow-top"]].join(" "),style:P})]})})};var R=require("react/jsx-runtime"),co=o=>(0,R.jsx)(X,{title:o.title,body:o.body,targetElement:o.targetElement,onClose:o.showCloseButton?o.close:void 0,buttons:(0,R.jsx)(g,{variant:"primary",onClick:o.continue,children:o.continueText})});
"use strict";var J=Object.create;var w=Object.defineProperty,K=Object.defineProperties,Q=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyDescriptors,oo=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,eo=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var F=(o,e,t)=>e in o?w(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,d=(o,e)=>{for(var t in e||(e={}))h.call(e,t)&&F(o,t,e[t]);if(c)for(var t of c(e))W.call(e,t)&&F(o,t,e[t]);return o},E=(o,e)=>K(o,j(e));var m=(o,e)=>{var t={};for(var r in o)h.call(o,r)&&e.indexOf(r)<0&&(t[r]=o[r]);if(o!=null&&c)for(var r of c(o))e.indexOf(r)<0&&W.call(o,r)&&(t[r]=o[r]);return t};var to=(o,e)=>{for(var t in e)w(o,t,{get:e[t],enumerable:!0})},I=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of oo(e))!h.call(o,l)&&l!==t&&w(o,l,{get:()=>e[l],enumerable:!(r=Q(e,l))||r.enumerable});return o};var b=(o,e,t)=>(t=o!=null?J(eo(o)):{},I(e||!o||!o.__esModule?w(t,"default",{value:o,enumerable:!0}):t,o)),ro=o=>I(w({},"__esModule",{value:!0}),o);var bo={};to(bo,{Modal:()=>no,Tooltip:()=>co});module.exports=ro(bo);var D=b(require("classnames"));var y={button:"s",primary:"o",secondary:"r"};var M=require("react/jsx-runtime"),g=r=>{var l=r,{className:o,variant:e}=l,t=m(l,["className","variant"]);return(0,M.jsx)("button",d({type:"button",className:(0,D.default)(y.button,y[e],o)},t))};var U=b(require("classnames"));var A=b(require("classnames"));var C={text:"i",body:"f",title:"d"};var G=require("react/jsx-runtime"),p=r=>{var l=r,{className:o,variant:e}=l,t=m(l,["className","variant"]);return(0,G.jsx)("p",d({className:(0,A.default)(C.text,C[e],o)},t))};var L=b(require("classnames"));var O={button:"a"};var _=require("react/jsx-runtime"),u=t=>{var r=t,{className:o}=r,e=m(r,["className"]);return(0,_.jsx)("button",d({type:"button",className:(0,L.default)(O.button,o)},e))};var N=require("react/jsx-runtime");function v(o){return(0,N.jsx)("svg",E(d({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},o),{children:(0,N.jsx)("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})}))}var f={overlay:"t",wrapper:"n",modal:"w",footer:"b",close:"p"};var a=require("react/jsx-runtime"),V=o=>(0,a.jsxs)(a.Fragment,{children:[o.overlay?(0,a.jsx)("div",{className:(0,U.default)(f.overlay,o.onClose&&f.clickable),onClick:o.onClose,"aria-hidden":"true"}):null,(0,a.jsx)("div",{className:f.wrapper,children:(0,a.jsxs)("div",{className:f.modal,children:[(0,a.jsx)(p,{variant:"title",children:o.title}),(0,a.jsx)(p,{variant:"body",children:o.body}),(0,a.jsx)("div",{className:f.footer,children:o.buttons}),o.onClose?(0,a.jsx)(u,{className:f.close,onClick:o.onClose,children:(0,a.jsx)(v,{})}):null]})})]});var z=require("react/jsx-runtime"),no=o=>(0,z.jsx)(V,{title:o.title,body:o.body,buttons:o.continueText?(0,z.jsx)(g,{variant:"primary",onClick:o.continue,children:o.continueText}):null,overlay:!o.hideOverlay,onClose:o.showCloseButton?o.close:void 0});var H=require("react"),s=require("@floating-ui/react-dom");var n={root:"g",tooltip:"l",arrow:"v","arrow-bottom":"m","arrow-top":"x",footer:"u",close:"h"};var i=require("react/jsx-runtime"),mo=4,$=6,po=8,wo=8,X=o=>{var T,S;let e=(0,H.useRef)(null),t=mo+$,{refs:r,middlewareData:l,placement:x,x:Y,y:Z}=(0,s.useFloating)({elements:{reference:document.querySelector(o.targetElement)},middleware:[(0,s.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,s.shift)({crossAxis:!0,padding:po}),(0,s.arrow)({element:e,padding:wo}),(0,s.offset)(t)]}),q=x.includes("top")?"bottom":x.includes("bottom")?"top":x.includes("left")?"right":"left",k=(T=l.arrow)==null?void 0:T.x,B=(S=l.arrow)==null?void 0:S.y,P={left:k!=null?`${k}px`:"",top:B!=null?`${B}px`:"",right:"",bottom:"",[q]:`${-$}px`};return(0,i.jsx)("div",{className:n.root,children:(0,i.jsxs)("div",{className:n.tooltip,ref:r.setFloating,style:{left:Y,top:Z},children:[(0,i.jsx)(p,{variant:"title",children:o.title}),(0,i.jsx)(p,{variant:"body",children:o.body}),(0,i.jsx)("div",{className:n.footer,children:o.buttons}),o.onClose?(0,i.jsx)(u,{className:n.close,onClick:o.onClose,children:(0,i.jsx)(v,{})}):null,(0,i.jsx)("div",{className:[n.arrow,n["arrow-bottom"]].join(" "),ref:e,style:P}),(0,i.jsx)("div",{className:[n.arrow,n["arrow-top"]].join(" "),style:P})]})})};var R=require("react/jsx-runtime"),co=o=>(0,R.jsx)(X,{title:o.title,body:o.body,targetElement:o.targetElement,onClose:o.showCloseButton?o.close:void 0,buttons:o.continueText?(0,R.jsx)(g,{variant:"primary",onClick:o.continue,children:o.continueText}):null});

@@ -7,4 +7,4 @@ import { FC } from 'react';

body: string;
continueText: string;
previousText: string;
continueText?: string;
previousText?: string;
showCloseButton: boolean;

@@ -18,4 +18,4 @@ hideOverlay: boolean;

body: string;
continueText: string;
previousText: string;
continueText?: string;
previousText?: string;
showCloseButton: boolean;

@@ -22,0 +22,0 @@ targetElement: string;

"use client"
"use strict";var U=Object.create;var b=Object.defineProperty,K=Object.defineProperties,Q=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyDescriptors,oo=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols,to=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var E=(o,t,e)=>t in o?b(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,d=(o,t)=>{for(var e in t||(t={}))C.call(t,e)&&E(o,e,t[e]);if(w)for(var e of w(t))S.call(t,e)&&E(o,e,t[e]);return o},I=(o,t)=>K(o,j(t));var p=(o,t)=>{var e={};for(var r in o)C.call(o,r)&&t.indexOf(r)<0&&(e[r]=o[r]);if(o!=null&&w)for(var r of w(o))t.indexOf(r)<0&&S.call(o,r)&&(e[r]=o[r]);return e};var eo=(o,t)=>{for(var e in t)b(o,e,{get:t[e],enumerable:!0})},D=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of oo(t))!C.call(o,a)&&a!==e&&b(o,a,{get:()=>t[a],enumerable:!(r=Q(t,a))||r.enumerable});return o};var g=(o,t,e)=>(e=o!=null?U(to(o)):{},D(t||!o||!o.__esModule?b(e,"default",{value:o,enumerable:!0}):e,o)),ro=o=>D(b({},"__esModule",{value:!0}),o);var vo={};eo(vo,{Modal:()=>so,Tooltip:()=>uo});module.exports=ro(vo);var O=g(require("classnames"));var A=g(require("classnames"));var N={text:"R",body:"W",title:"j"};var M=require("react/jsx-runtime"),u=r=>{var a=r,{className:o,variant:t}=a,e=p(a,["className","variant"]);return(0,M.jsx)("p",d({className:(0,A.default)(N.text,N[t],o)},e))};var G=g(require("classnames"));var W={button:"c"};var L=require("react/jsx-runtime"),y=e=>{var r=e,{className:o}=r,t=p(r,["className"]);return(0,L.jsx)("button",d({type:"button",className:(0,G.default)(W.button,o)},t))};var T=require("react/jsx-runtime");function h(o){return(0,T.jsx)("svg",I(d({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},o),{children:(0,T.jsx)("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})}))}var c={overlay:"I",wrapper:"B",modal:"P",footer:"S",close:"q"};var i=require("react/jsx-runtime"),_=o=>(0,i.jsxs)(i.Fragment,{children:[o.overlay?(0,i.jsx)("div",{className:(0,O.default)(c.overlay,o.onClose&&c.clickable),onClick:o.onClose,"aria-hidden":"true"}):null,(0,i.jsx)("div",{className:c.wrapper,children:(0,i.jsxs)("div",{className:c.modal,children:[(0,i.jsx)(u,{variant:"title",children:o.title}),(0,i.jsx)(u,{variant:"body",children:o.body}),(0,i.jsx)("div",{className:c.footer,children:o.buttons}),o.onClose?(0,i.jsx)(y,{className:c.close,onClick:o.onClose,children:(0,i.jsx)(h,{})}):null]})})]});var V=g(require("classnames"));var k={button:"A",primary:"z",secondary:"y"};var $=require("react/jsx-runtime"),v=r=>{var a=r,{className:o,variant:t}=a,e=p(a,["className","variant"]);return(0,$.jsx)("button",d({type:"button",className:(0,V.default)(k.button,k[t],o)},e))};var f=require("react/jsx-runtime"),so=o=>(0,f.jsx)(_,{title:o.title,body:o.body,overlay:!o.hideOverlay,buttons:(0,f.jsxs)(f.Fragment,{children:[o.previous?(0,f.jsx)(v,{variant:"secondary",onClick:o.previous,children:o.previousText}):null,(0,f.jsx)(v,{variant:"primary",onClick:o.continue,children:o.continueText})]}),onClose:o.showCloseButton?o.cancel:void 0});var Y=require("react"),n=require("@floating-ui/react-dom");var s={root:"C",tooltip:"k",arrow:"D","arrow-bottom":"E","arrow-top":"F",footer:"G",close:"H"};var l=require("react/jsx-runtime"),mo=4,X=6,co=8,po=8,Z=o=>{var z,F;let t=(0,Y.useRef)(null),e=mo+X,{refs:r,middlewareData:a,placement:x,x:q,y:H}=(0,n.useFloating)({elements:{reference:document.querySelector(o.targetElement)},middleware:[(0,n.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,n.shift)({crossAxis:!0,padding:co}),(0,n.arrow)({element:t,padding:po}),(0,n.offset)(e)]}),J=x.includes("top")?"bottom":x.includes("bottom")?"top":x.includes("left")?"right":"left",R=(z=a.arrow)==null?void 0:z.x,B=(F=a.arrow)==null?void 0:F.y,P={left:R!=null?`${R}px`:"",top:B!=null?`${B}px`:"",right:"",bottom:"",[J]:`${-X}px`};return(0,l.jsx)("div",{className:s.root,children:(0,l.jsxs)("div",{className:s.tooltip,ref:r.setFloating,style:{left:q,top:H},children:[(0,l.jsx)(u,{variant:"title",children:o.title}),(0,l.jsx)(u,{variant:"body",children:o.body}),(0,l.jsx)("div",{className:s.footer,children:o.buttons}),o.onClose?(0,l.jsx)(y,{className:s.close,onClick:o.onClose,children:(0,l.jsx)(h,{})}):null,(0,l.jsx)("div",{className:[s.arrow,s["arrow-bottom"]].join(" "),ref:t,style:P}),(0,l.jsx)("div",{className:[s.arrow,s["arrow-top"]].join(" "),style:P})]})})};var m=require("react/jsx-runtime"),uo=o=>(0,m.jsx)(Z,{title:o.title,body:o.body,targetElement:o.targetElement,onClose:o.showCloseButton?o.cancel:void 0,buttons:(0,m.jsxs)(m.Fragment,{children:[o.previous?(0,m.jsx)(v,{variant:"secondary",onClick:o.previous,children:o.previousText}):null,(0,m.jsx)(v,{variant:"primary",onClick:o.continue,children:o.continueText})]})});
"use strict";var U=Object.create;var b=Object.defineProperty,K=Object.defineProperties,Q=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyDescriptors,oo=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols,to=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var E=(o,t,e)=>t in o?b(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,d=(o,t)=>{for(var e in t||(t={}))C.call(t,e)&&E(o,e,t[e]);if(w)for(var e of w(t))S.call(t,e)&&E(o,e,t[e]);return o},I=(o,t)=>K(o,j(t));var u=(o,t)=>{var e={};for(var r in o)C.call(o,r)&&t.indexOf(r)<0&&(e[r]=o[r]);if(o!=null&&w)for(var r of w(o))t.indexOf(r)<0&&S.call(o,r)&&(e[r]=o[r]);return e};var eo=(o,t)=>{for(var e in t)b(o,e,{get:t[e],enumerable:!0})},D=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of oo(t))!C.call(o,a)&&a!==e&&b(o,a,{get:()=>t[a],enumerable:!(r=Q(t,a))||r.enumerable});return o};var g=(o,t,e)=>(e=o!=null?U(to(o)):{},D(t||!o||!o.__esModule?b(e,"default",{value:o,enumerable:!0}):e,o)),ro=o=>D(b({},"__esModule",{value:!0}),o);var vo={};eo(vo,{Modal:()=>so,Tooltip:()=>po});module.exports=ro(vo);var O=g(require("classnames"));var A=g(require("classnames"));var N={text:"R",body:"W",title:"j"};var M=require("react/jsx-runtime"),p=r=>{var a=r,{className:o,variant:t}=a,e=u(a,["className","variant"]);return(0,M.jsx)("p",d({className:(0,A.default)(N.text,N[t],o)},e))};var G=g(require("classnames"));var W={button:"c"};var L=require("react/jsx-runtime"),y=e=>{var r=e,{className:o}=r,t=u(r,["className"]);return(0,L.jsx)("button",d({type:"button",className:(0,G.default)(W.button,o)},t))};var T=require("react/jsx-runtime");function x(o){return(0,T.jsx)("svg",I(d({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},o),{children:(0,T.jsx)("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})}))}var c={overlay:"I",wrapper:"B",modal:"P",footer:"S",close:"q"};var i=require("react/jsx-runtime"),_=o=>(0,i.jsxs)(i.Fragment,{children:[o.overlay?(0,i.jsx)("div",{className:(0,O.default)(c.overlay,o.onClose&&c.clickable),onClick:o.onClose,"aria-hidden":"true"}):null,(0,i.jsx)("div",{className:c.wrapper,children:(0,i.jsxs)("div",{className:c.modal,children:[(0,i.jsx)(p,{variant:"title",children:o.title}),(0,i.jsx)(p,{variant:"body",children:o.body}),(0,i.jsx)("div",{className:c.footer,children:o.buttons}),o.onClose?(0,i.jsx)(y,{className:c.close,onClick:o.onClose,children:(0,i.jsx)(x,{})}):null]})})]});var V=g(require("classnames"));var k={button:"A",primary:"z",secondary:"y"};var $=require("react/jsx-runtime"),v=r=>{var a=r,{className:o,variant:t}=a,e=u(a,["className","variant"]);return(0,$.jsx)("button",d({type:"button",className:(0,V.default)(k.button,k[t],o)},e))};var f=require("react/jsx-runtime"),so=o=>(0,f.jsx)(_,{title:o.title,body:o.body,overlay:!o.hideOverlay,buttons:(0,f.jsxs)(f.Fragment,{children:[o.previous&&o.previousText?(0,f.jsx)(v,{variant:"secondary",onClick:o.previous,children:o.previousText}):null,o.continueText?(0,f.jsx)(v,{variant:"primary",onClick:o.continue,children:o.continueText}):null]}),onClose:o.showCloseButton?o.cancel:void 0});var Y=require("react"),n=require("@floating-ui/react-dom");var s={root:"C",tooltip:"k",arrow:"D","arrow-bottom":"E","arrow-top":"F",footer:"G",close:"H"};var l=require("react/jsx-runtime"),mo=4,X=6,co=8,uo=8,Z=o=>{var z,F;let t=(0,Y.useRef)(null),e=mo+X,{refs:r,middlewareData:a,placement:h,x:q,y:H}=(0,n.useFloating)({elements:{reference:document.querySelector(o.targetElement)},middleware:[(0,n.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,n.shift)({crossAxis:!0,padding:co}),(0,n.arrow)({element:t,padding:uo}),(0,n.offset)(e)]}),J=h.includes("top")?"bottom":h.includes("bottom")?"top":h.includes("left")?"right":"left",R=(z=a.arrow)==null?void 0:z.x,B=(F=a.arrow)==null?void 0:F.y,P={left:R!=null?`${R}px`:"",top:B!=null?`${B}px`:"",right:"",bottom:"",[J]:`${-X}px`};return(0,l.jsx)("div",{className:s.root,children:(0,l.jsxs)("div",{className:s.tooltip,ref:r.setFloating,style:{left:q,top:H},children:[(0,l.jsx)(p,{variant:"title",children:o.title}),(0,l.jsx)(p,{variant:"body",children:o.body}),(0,l.jsx)("div",{className:s.footer,children:o.buttons}),o.onClose?(0,l.jsx)(y,{className:s.close,onClick:o.onClose,children:(0,l.jsx)(x,{})}):null,(0,l.jsx)("div",{className:[s.arrow,s["arrow-bottom"]].join(" "),ref:t,style:P}),(0,l.jsx)("div",{className:[s.arrow,s["arrow-top"]].join(" "),style:P})]})})};var m=require("react/jsx-runtime"),po=o=>(0,m.jsx)(Z,{title:o.title,body:o.body,targetElement:o.targetElement,onClose:o.showCloseButton?o.cancel:void 0,buttons:(0,m.jsxs)(m.Fragment,{children:[o.previous&&o.previousText?(0,m.jsx)(v,{variant:"secondary",onClick:o.previous,children:o.previousText}):null,o.continueText?(0,m.jsx)(v,{variant:"primary",onClick:o.continue,children:o.continueText}):null]})});
{
"name": "@flows/react-components",
"version": "0.0.2-canary.4",
"version": "0.0.2-canary.5",
"description": "",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet