@clicktap/ui 0.17.4 → 0.17.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";import{forwardRef as l}from"react";import{Dialog as m}from"react-aria-components";import{motion as p}from"framer-motion";import{cn as u}from"../../utils/cn.js";const b={top:{hidden:{y:"-100%",transition:{ease:"easeIn"}},visible:{y:0,transition:{ease:"easeOut"}}},bottom:{hidden:{y:"100%",transition:{ease:"easeIn"}},visible:{y:0,transition:{ease:"easeOut"}}},right:{hidden:{x:"100%",transition:{ease:"easeIn"}},visible:{x:0,transition:{ease:"easeOut"}}},left:{hidden:{x:"-100%",transition:{ease:"easeIn"}},visible:{x:0,transition:{ease:"easeOut"}}}},f=l(({style:t,size:e="20rem",...r},o)=>{const a=typeof t=="function"?t(r):{...t,"--drawer-size":`${e}`};return n(m,{...r,ref:o,style:a})});let i=null;function w(){return typeof window>"u"?null:(i||(i=p.create(f)),i)}const d=w();function c({direction:t="right",children:e,className:r,animationVariants:o,...a}){const s={className:u("fixed p-8 outline-0 bg-white","border-solid border-slate-200","max-w-full max-h-[var(--visual-viewport-height)]",t==="top"&&"top-0 left-0 right-0 bottom-auto border-b shadow-[0_8px_24px_rgba(0,0,0,0.1)] h-[var(--drawer-size)]",t==="right"&&"top-0 left-auto bottom-0 right-0 border-l shadow-[-8px_0_24px_rgba(0,0,0,0.1)] w-[var(--drawer-size)]",t==="bottom"&&"bottom-0 left-0 right-0 top-auto border-t shadow-[0_-8px_24px_rgba(0,0,0,0.1)] h-[var(--drawer-size)]",t==="left"&&"top-0 bottom-0 left-0 right-auto border-r shadow-[8px_0_24px_rgba(0,0,0,0.1)] w-[var(--drawer-size)]",r),"data-direction":t,...a};return d?n(d,{variants:o||b[t],...s,children:e}):n(f,{...s,children:e})}export{c as Drawer,c as default};
1
+ import{jsx as n}from"react/jsx-runtime";import{forwardRef as f}from"react";import{Dialog as u}from"react-aria-components";import{motion as m}from"framer-motion";import{cn as b}from"../../utils/cn.js";const p={top:{hidden:{y:"-100%",transition:{ease:"easeIn"}},visible:{y:0,transition:{ease:"easeOut"}}},bottom:{hidden:{y:"100%",transition:{ease:"easeIn"}},visible:{y:0,transition:{ease:"easeOut"}}},right:{hidden:{x:"100%",transition:{ease:"easeIn"}},visible:{x:0,transition:{ease:"easeOut"}}},left:{hidden:{x:"-100%",transition:{ease:"easeIn"}},visible:{x:0,transition:{ease:"easeOut"}}}},l=f(({style:t,size:e="20rem",...o},r)=>{const a=typeof t=="function"?t(o):{...t,"--drawer-size":`${e}`};return n(u,{...o,ref:r,style:a})});let i=null;function w(){return typeof window>"u"?null:(i||(i=m.create(l)),i)}const d=w();function c({direction:t="right",children:e,className:o,animationVariants:r,...a}){const s={className:b("fixed p-8 bg-white","outline-none focus:outline-none focus-visible:outline-none","border-solid border-slate-200","max-w-full max-h-[var(--visual-viewport-height)]",t==="top"&&"top-0 left-0 right-0 bottom-auto border-b shadow-[0_8px_24px_rgba(0,0,0,0.1)] h-[var(--drawer-size)]",t==="right"&&"top-0 left-auto bottom-0 right-0 border-l shadow-[-8px_0_24px_rgba(0,0,0,0.1)] w-[var(--drawer-size)]",t==="bottom"&&"bottom-0 left-0 right-0 top-auto border-t shadow-[0_-8px_24px_rgba(0,0,0,0.1)] h-[var(--drawer-size)]",t==="left"&&"top-0 bottom-0 left-0 right-auto border-r shadow-[8px_0_24px_rgba(0,0,0,0.1)] w-[var(--drawer-size)]",o),"data-direction":t,...a};return d?n(d,{variants:r||p[t],...s,children:e}):n(l,{...s,children:e})}export{c as Drawer,c as default};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{Modal as m}from"react-aria-components";import{cn as s}from"../../utils/cn.js";function i({children:o,className:a,...r}){return t(m,{...r,className:s("absolute inset-0",a),children:o})}export{i as Modal,i as default};
1
+ import{jsx as n}from"react/jsx-runtime";import{Modal as r}from"react-aria-components";import{cn as a}from"../../utils/cn.js";function l({children:o,className:t,...e}){return n(r,{...e,className:a("absolute inset-0","pointer-events-none [&>*]:pointer-events-auto",t),children:o})}export{l as Modal,l as default};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{forwardRef as h,useId as b}from"react";import{ModalOverlay as c}from"react-aria-components";import{motion as O,AnimatePresence as g}from"framer-motion";import{useDialogTrigger as x}from"../DialogTrigger/DialogTrigger.js";import{cn as w}from"../../utils/cn.js";const k=h(({style:i,...e},n)=>{const o=typeof i=="function"?i(e):i;return t(c,{...e,ref:n,style:o})});let r=null;function A(){return typeof window>"u"?null:(r||(r=O.create(k)),r)}const m=A();function s({animate:i,animation:e,setAnimation:n,className:o,animationVariants:f,children:a,...u}){const p=b(),{key:v,...y}=u,d={className:w("bg-black/30","fixed top-0 left-0","z-[1000]","w-screen h-[var(--visual-viewport-height)]",o),...y};return m?t(m,{isExiting:e==="hidden",onAnimationComplete:M=>{n(l=>M==="hidden"&&l==="hidden"?"unmounted":l)},variants:f||{hidden:{opacity:0,backdropFilter:"blur(0px)",transition:{delay:.08}},visible:{opacity:1,backdropFilter:"blur(8px)"}},initial:"hidden",animate:i,exit:"hidden",...d,children:a},v||p):t(c,{...d,children:a})}function D(i){const{isOpen:e}=i,{animation:n,setAnimation:o}=x();return e!==void 0?t(g,{children:e&&t(s,{...i,animate:"visible",animation:n,setAnimation:o})}):t(s,{...i,animate:n,animation:n,setAnimation:o})}export{D as ModalOverlay,D as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{forwardRef as h,useId as b}from"react";import{ModalOverlay as f}from"react-aria-components";import{motion as O,AnimatePresence as g}from"framer-motion";import{useDialogTrigger as x}from"../DialogTrigger/DialogTrigger.js";import{cn as w}from"../../utils/cn.js";const k=h(({style:i,children:n,...e},o)=>{const r=typeof i=="function"?i(e):i;return t(f,{...e,ref:o,style:r,children:n})});let a=null;function A(){return typeof window>"u"?null:(a||(a=O.create(k)),a)}const s=A();function c({animate:i,animation:n,setAnimation:e,className:o,animationVariants:r,children:d,...u}){const p=b(),{key:v,...y}=u,l={className:w("bg-black/30","fixed top-0 left-0","z-[1000]","w-screen h-[var(--visual-viewport-height)]",o),...y};return s?t(s,{isExiting:n==="hidden",onAnimationComplete:M=>{e(m=>M==="hidden"&&m==="hidden"?"unmounted":m)},variants:r||{hidden:{opacity:0,backdropFilter:"blur(0px)",transition:{delay:.08}},visible:{opacity:1,backdropFilter:"blur(8px)"}},initial:"hidden",animate:i,exit:"hidden",...l,children:d},v||p):t(f,{...l,children:d})}function D(i){const{isOpen:n}=i,{animation:e,setAnimation:o}=x();return n!==void 0?t(g,{children:n&&t(c,{...i,animate:"visible",animation:e,setAnimation:o})}):t(c,{...i,animate:e,animation:e,setAnimation:o})}export{D as ModalOverlay,D as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clicktap/ui",
3
- "version": "0.17.4",
3
+ "version": "0.17.6",
4
4
  "private": false,
5
5
  "author": "Clicktap",
6
6
  "description": "A library of React UI components and low-level hooks.",