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.7

dist/chunk-OWNC5GRC.mjs

2

dist/index.js
"use client"
"use strict";var J=Object.create;var p=Object.defineProperty,K=Object.defineProperties,Q=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyDescriptors,oo=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,eo=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var F=(o,e,t)=>e in o?p(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,d=(o,e)=>{for(var t in e||(e={}))y.call(e,t)&&F(o,t,e[t]);if(c)for(var t of c(e))I.call(e,t)&&F(o,t,e[t]);return o},W=(o,e)=>K(o,j(e));var m=(o,e)=>{var t={};for(var r in o)y.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&&I.call(o,r)&&(t[r]=o[r]);return t};var to=(o,e)=>{for(var t in e)p(o,t,{get:e[t],enumerable:!0})},M=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of oo(e))!y.call(o,l)&&l!==t&&p(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)):{},M(e||!o||!o.__esModule?p(t,"default",{value:o,enumerable:!0}):t,o)),ro=o=>M(p({},"__esModule",{value:!0}),o);var bo={};to(bo,{Modal:()=>no,Tooltip:()=>co});module.exports=ro(bo);var D=b(require("classnames"));var C={button:"s",primary:"o",secondary:"r"};var L=require("react/jsx-runtime"),g=r=>{var l=r,{className:o,variant:e}=l,t=m(l,["className","variant"]);return(0,L.jsx)("button",d({type:"button",className:(0,D.default)(C.button,C[e],o)},t))};var U=b(require("classnames"));var A=b(require("classnames"));var z={text:"i",body:"f",title:"d"};var _=require("react/jsx-runtime"),w=r=>{var l=r,{className:o,variant:e}=l,t=m(l,["className","variant"]);return(0,_.jsx)("p",d({className:(0,A.default)(z.text,z[e],o)},t))};var H=b(require("classnames"));var G={button:"a"};var O=require("react/jsx-runtime"),u=t=>{var r=t,{className:o}=r,e=m(r,["className"]);return(0,O.jsx)("button",d({type:"button",className:(0,H.default)(G.button,o)},e))};var N=require("react/jsx-runtime");function v(o){return(0,N.jsx)("svg",W(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)(w,{variant:"title",children:o.title}),(0,a.jsx)(w,{variant:"body",dangerouslySetInnerHTML:{__html: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 R=require("react/jsx-runtime"),no=o=>(0,R.jsx)(V,{title:o.title,body:o.body,buttons:o.continueText?(0,R.jsx)(g,{variant:"primary",onClick:o.continue,children:o.continueText}):null,overlay:!o.hideOverlay,onClose:o.showCloseButton?o.close:void 0});var x=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,wo=8,po=8,X=o=>{var S,E;let e=(0,x.useRef)(null),t=mo+$,{refs:r,middlewareData:l,placement:h,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:wo}),(0,s.arrow)({element:e,padding:po}),(0,s.offset)(t)]}),q=h.includes("top")?"bottom":h.includes("bottom")?"top":h.includes("left")?"right":"left",B=(S=l.arrow)==null?void 0:S.x,P=(E=l.arrow)==null?void 0:E.y,T={left:B!=null?`${B}px`:"",top:P!=null?`${P}px`:"",right:"",bottom:"",[q]:`${-$}px`};return(0,x.useEffect)(()=>{o.targetElement||console.error("Flows: Cannot render tooltip without target element")},[o.targetElement]),o.targetElement?(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)(w,{variant:"title",children:o.title}),(0,i.jsx)(w,{variant:"body",dangerouslySetInnerHTML:{__html: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:T}),(0,i.jsx)("div",{className:[n.arrow,n["arrow-top"]].join(" "),style:T})]})}):null};var k=require("react/jsx-runtime"),co=o=>(0,k.jsx)(X,{title:o.title,body:o.body,targetElement:o.targetElement,onClose:o.showCloseButton?o.close:void 0,buttons:o.continueText?(0,k.jsx)(g,{variant:"primary",onClick:o.continue,children:o.continueText}):null});
"use strict";var J=Object.create;var p=Object.defineProperty,K=Object.defineProperties,Q=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyDescriptors,oo=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols,eo=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var F=(o,e,t)=>e in o?p(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,d=(o,e)=>{for(var t in e||(e={}))y.call(e,t)&&F(o,t,e[t]);if(w)for(var t of w(e))I.call(e,t)&&F(o,t,e[t]);return o},W=(o,e)=>K(o,j(e));var m=(o,e)=>{var t={};for(var r in o)y.call(o,r)&&e.indexOf(r)<0&&(t[r]=o[r]);if(o!=null&&w)for(var r of w(o))e.indexOf(r)<0&&I.call(o,r)&&(t[r]=o[r]);return t};var to=(o,e)=>{for(var t in e)p(o,t,{get:e[t],enumerable:!0})},M=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of oo(e))!y.call(o,l)&&l!==t&&p(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)):{},M(e||!o||!o.__esModule?p(t,"default",{value:o,enumerable:!0}):t,o)),ro=o=>M(p({},"__esModule",{value:!0}),o);var bo={};to(bo,{Modal:()=>no,Tooltip:()=>wo});module.exports=ro(bo);var D=b(require("classnames"));var C={button:"s",primary:"o",secondary:"r"};var L=require("react/jsx-runtime"),g=r=>{var l=r,{className:o,variant:e}=l,t=m(l,["className","variant"]);return(0,L.jsx)("button",d({type:"button",className:(0,D.default)(C.button,C[e],o)},t))};var U=b(require("classnames"));var A=b(require("classnames"));var z={text:"i",body:"f",title:"d"};var _=require("react/jsx-runtime"),c=r=>{var l=r,{className:o,variant:e}=l,t=m(l,["className","variant"]);return(0,_.jsx)("p",d({className:(0,A.default)(z.text,z[e],o)},t))};var H=b(require("classnames"));var G={button:"a"};var O=require("react/jsx-runtime"),u=t=>{var r=t,{className:o}=r,e=m(r,["className"]);return(0,O.jsx)("button",d({type:"button",className:(0,H.default)(G.button,o)},e))};var N=require("react/jsx-runtime");function v(o){return(0,N.jsx)("svg",W(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)(c,{variant:"title",children:o.title}),(0,a.jsx)(c,{variant:"body",dangerouslySetInnerHTML:{__html: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 R=require("react/jsx-runtime"),no=o=>(0,R.jsx)(V,{title:o.title,body:o.body,buttons:o.continueText?(0,R.jsx)(g,{variant:"primary",onClick:o.continue,children:o.continueText}):null,overlay:!o.hideOverlay,onClose:o.showCloseButton?o.close:void 0});var x=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,co=8,po=8,X=o=>{var S,E;let e=(0,x.useRef)(null),t=mo+$,{refs:r,middlewareData:l,placement:h,x:Y,y:Z}=(0,s.useFloating)({placement:o.placement,elements:{reference:document.querySelector(o.targetElement)},middleware:[(0,s.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,s.shift)({crossAxis:!0,padding:co}),(0,s.arrow)({element:e,padding:po}),(0,s.offset)(t)]}),q=h.includes("top")?"bottom":h.includes("bottom")?"top":h.includes("left")?"right":"left",P=(S=l.arrow)==null?void 0:S.x,B=(E=l.arrow)==null?void 0:E.y,T={left:P!=null?`${P}px`:"",top:B!=null?`${B}px`:"",right:"",bottom:"",[q]:`${-$}px`};return(0,x.useEffect)(()=>{o.targetElement||console.error("Flows: Cannot render tooltip without target element")},[o.targetElement]),o.targetElement?(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)(c,{variant:"title",children:o.title}),(0,i.jsx)(c,{variant:"body",dangerouslySetInnerHTML:{__html: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:T}),(0,i.jsx)("div",{className:[n.arrow,n["arrow-top"]].join(" "),style:T})]})}):null};var k=require("react/jsx-runtime"),wo=o=>(0,k.jsx)(X,{title:o.title,body:o.body,targetElement:o.targetElement,placement:o.placement,onClose:o.showCloseButton?o.close:void 0,buttons:o.continueText?(0,k.jsx)(g,{variant:"primary",onClick:o.continue,children:o.continueText}):null});
import { FC } from 'react';
import { TourComponentProps } from '@flows/react';
import { Placement } from '@floating-ui/react-dom';

@@ -21,2 +22,3 @@ type ModalProps = TourComponentProps<{

targetElement: string;
placement?: Placement;
}>;

@@ -23,0 +25,0 @@ declare const Tooltip: FC<TooltipProps>;

"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,N=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var S=(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={}))N.call(t,e)&&S(o,e,t[e]);if(w)for(var e of w(t))I.call(t,e)&&S(o,e,t[e]);return o},M=(o,t)=>K(o,j(t));var u=(o,t)=>{var e={};for(var r in o)N.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&&I.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))!N.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 po={};eo(po,{Modal:()=>so,Tooltip:()=>vo});module.exports=ro(po);var H=g(require("classnames"));var L=g(require("classnames"));var T={text:"R",body:"W",title:"j"};var A=require("react/jsx-runtime"),v=r=>{var a=r,{className:o,variant:t}=a,e=u(a,["className","variant"]);return(0,A.jsx)("p",d({className:(0,L.default)(T.text,T[t],o)},e))};var W=g(require("classnames"));var _={button:"c"};var G=require("react/jsx-runtime"),y=e=>{var r=e,{className:o}=r,t=u(r,["className"]);return(0,G.jsx)("button",d({type:"button",className:(0,W.default)(_.button,o)},t))};var k=require("react/jsx-runtime");function h(o){return(0,k.jsx)("svg",M(d({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},o),{children:(0,k.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=o=>(0,i.jsxs)(i.Fragment,{children:[o.overlay?(0,i.jsx)("div",{className:(0,H.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)(v,{variant:"title",children:o.title}),(0,i.jsx)(v,{variant:"body",dangerouslySetInnerHTML:{__html: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 P={button:"A",primary:"z",secondary:"y"};var $=require("react/jsx-runtime"),p=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)(P.button,P[t],o)},e))};var f=require("react/jsx-runtime"),so=o=>(0,f.jsx)(O,{title:o.title,body:o.body,overlay:!o.hideOverlay,buttons:(0,f.jsxs)(f.Fragment,{children:[o.previous&&o.previousText?(0,f.jsx)(p,{variant:"secondary",onClick:o.previous,children:o.previousText}):null,o.continueText?(0,f.jsx)(p,{variant:"primary",onClick:o.continue,children:o.continueText}):null]}),onClose:o.showCloseButton?o.cancel:void 0});var x=require("react"),l=require("@floating-ui/react-dom");var s={root:"C",tooltip:"k",arrow:"D","arrow-bottom":"E","arrow-top":"F",footer:"G",close:"H"};var n=require("react/jsx-runtime"),mo=4,X=6,co=8,uo=8,Y=o=>{var E,F;let t=(0,x.useRef)(null),e=mo+X,{refs:r,middlewareData:a,placement:C,x:Z,y:q}=(0,l.useFloating)({elements:{reference:document.querySelector(o.targetElement)},middleware:[(0,l.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,l.shift)({crossAxis:!0,padding:co}),(0,l.arrow)({element:t,padding:uo}),(0,l.offset)(e)]}),J=C.includes("top")?"bottom":C.includes("bottom")?"top":C.includes("left")?"right":"left",B=(E=a.arrow)==null?void 0:E.x,R=(F=a.arrow)==null?void 0:F.y,z={left:B!=null?`${B}px`:"",top:R!=null?`${R}px`:"",right:"",bottom:"",[J]:`${-X}px`};return(0,x.useEffect)(()=>{o.targetElement||console.error("Flows: Cannot render tooltip without target element")},[o.targetElement]),o.targetElement?(0,n.jsx)("div",{className:s.root,children:(0,n.jsxs)("div",{className:s.tooltip,ref:r.setFloating,style:{left:Z,top:q},children:[(0,n.jsx)(v,{variant:"title",children:o.title}),(0,n.jsx)(v,{variant:"body",dangerouslySetInnerHTML:{__html:o.body}}),(0,n.jsx)("div",{className:s.footer,children:o.buttons}),o.onClose?(0,n.jsx)(y,{className:s.close,onClick:o.onClose,children:(0,n.jsx)(h,{})}):null,(0,n.jsx)("div",{className:[s.arrow,s["arrow-bottom"]].join(" "),ref:t,style:z}),(0,n.jsx)("div",{className:[s.arrow,s["arrow-top"]].join(" "),style:z})]})}):null};var m=require("react/jsx-runtime"),vo=o=>(0,m.jsx)(Y,{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)(p,{variant:"secondary",onClick:o.previous,children:o.previousText}):null,o.continueText?(0,m.jsx)(p,{variant:"primary",onClick:o.continue,children:o.continueText}):null]})});
"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,N=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var S=(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={}))N.call(t,e)&&S(o,e,t[e]);if(w)for(var e of w(t))I.call(t,e)&&S(o,e,t[e]);return o},M=(o,t)=>K(o,j(t));var u=(o,t)=>{var e={};for(var r in o)N.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&&I.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))!N.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 H=g(require("classnames"));var L=g(require("classnames"));var T={text:"R",body:"W",title:"j"};var A=require("react/jsx-runtime"),p=r=>{var a=r,{className:o,variant:t}=a,e=u(a,["className","variant"]);return(0,A.jsx)("p",d({className:(0,L.default)(T.text,T[t],o)},e))};var W=g(require("classnames"));var _={button:"c"};var G=require("react/jsx-runtime"),y=e=>{var r=e,{className:o}=r,t=u(r,["className"]);return(0,G.jsx)("button",d({type:"button",className:(0,W.default)(_.button,o)},t))};var P=require("react/jsx-runtime");function h(o){return(0,P.jsx)("svg",M(d({height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},o),{children:(0,P.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=o=>(0,i.jsxs)(i.Fragment,{children:[o.overlay?(0,i.jsx)("div",{className:(0,H.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",dangerouslySetInnerHTML:{__html: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=u(a,["className","variant"]);return(0,$.jsx)("button",d({type:"button",className:(0,V.default)(k.button,k[t],o)},e))};var m=require("react/jsx-runtime"),so=o=>(0,m.jsx)(O,{title:o.title,body:o.body,overlay:!o.hideOverlay,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]}),onClose:o.showCloseButton?o.cancel:void 0});var x=require("react"),l=require("@floating-ui/react-dom");var s={root:"C",tooltip:"k",arrow:"D","arrow-bottom":"E","arrow-top":"F",footer:"G",close:"H"};var n=require("react/jsx-runtime"),fo=4,X=6,co=8,uo=8,Y=o=>{var E,F;let t=(0,x.useRef)(null),e=fo+X,{refs:r,middlewareData:a,placement:C,x:Z,y:q}=(0,l.useFloating)({placement:o.placement,elements:{reference:document.querySelector(o.targetElement)},middleware:[(0,l.flip)({fallbackPlacements:["top","bottom","left","right"]}),(0,l.shift)({crossAxis:!0,padding:co}),(0,l.arrow)({element:t,padding:uo}),(0,l.offset)(e)]}),J=C.includes("top")?"bottom":C.includes("bottom")?"top":C.includes("left")?"right":"left",B=(E=a.arrow)==null?void 0:E.x,R=(F=a.arrow)==null?void 0:F.y,z={left:B!=null?`${B}px`:"",top:R!=null?`${R}px`:"",right:"",bottom:"",[J]:`${-X}px`};return(0,x.useEffect)(()=>{o.targetElement||console.error("Flows: Cannot render tooltip without target element")},[o.targetElement]),o.targetElement?(0,n.jsx)("div",{className:s.root,children:(0,n.jsxs)("div",{className:s.tooltip,ref:r.setFloating,style:{left:Z,top:q},children:[(0,n.jsx)(p,{variant:"title",children:o.title}),(0,n.jsx)(p,{variant:"body",dangerouslySetInnerHTML:{__html:o.body}}),(0,n.jsx)("div",{className:s.footer,children:o.buttons}),o.onClose?(0,n.jsx)(y,{className:s.close,onClick:o.onClose,children:(0,n.jsx)(h,{})}):null,(0,n.jsx)("div",{className:[s.arrow,s["arrow-bottom"]].join(" "),ref:t,style:z}),(0,n.jsx)("div",{className:[s.arrow,s["arrow-top"]].join(" "),style:z})]})}):null};var f=require("react/jsx-runtime"),po=o=>(0,f.jsx)(Y,{title:o.title,body:o.body,targetElement:o.targetElement,placement:o.placement,onClose:o.showCloseButton?o.cancel:void 0,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]})});
{
"name": "@flows/react-components",
"version": "0.0.2-canary.6",
"version": "0.0.2-canary.7",
"description": "",

@@ -19,3 +19,3 @@ "license": "MIT",

"typescript": "^5.6.3",
"@flows/react": "0.0.2-canary.6"
"@flows/react": "0.0.2-canary.7"
},

@@ -22,0 +22,0 @@ "peerDependencies": {

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