@clicktap/ui 0.14.16 → 0.14.17
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.
- package/components/ContextMenu/ContextMenu.d.ts +1 -1
- package/components/ContextMenu/ContextMenu.js +1 -1
- package/components/ContextMenu/ContextMenu.tsx +1 -0
- package/components/Dialog/Dialog.d.ts +1 -1
- package/components/Dialog/Dialog.js +1 -1
- package/components/Dialog/Dialog.tsx +1 -0
- package/components/Drawer/Drawer.d.ts +1 -1
- package/components/Drawer/Drawer.js +1 -1
- package/components/Drawer/Drawer.tsx +1 -0
- package/components/ModalOverlay/ModalOverlay.js +1 -1
- package/components/ModalOverlay/ModalOverlay.tsx +1 -0
- package/components/ToggleButton/ToggleButton.stories.tsx +5 -5
- package/package.json +1 -1
- package/components/Tabs/Tabs.context.d.ts +0 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PopoverProps } from './ContextMenu.types';
|
|
2
|
-
export declare function ContextMenu({ children, key, onAction, setAnimation, animation, className, classNames, ...props }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function ContextMenu({ children, key, onAction, setAnimation, animation, className, classNames, onAnimationStart, ...props }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ContextMenu;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{Popover as x,Menu as h}from"react-aria-components";import{forwardRef as c}from"react";import{motion as _}from"framer-motion";import{cn as m}from"../../utils/cn.js";const b=c(({style:o,...
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{Popover as x,Menu as h}from"react-aria-components";import{forwardRef as c}from"react";import{motion as _}from"framer-motion";import{cn as m}from"../../utils/cn.js";const b=c(({style:o,...n},r)=>{const e=typeof o=="function"?o(n):o;return t(x,{...n,ref:r,style:e})}),l=_.create(b);function A({children:o,key:n,onAction:r,setAnimation:e,animation:d="hidden",className:a,classNames:i,onAnimationStart:y,...u}){return t(l,{className:m("px-0 py-1.5","shadow-[0_10px_15px_-3px_rgba(0,0,0,0.1),0_4px_6px_-4px_rgba(0,0,0,0.1)]","rounded-md","w-56","bg-white","border border-solid border-slate-300",a),isExiting:d==="hidden",onAnimationComplete:f=>{e(p=>f==="hidden"&&p==="hidden"?"unmounted":p)},variants:{hidden:{opacity:0,y:-10},visible:{opacity:1,y:0}},initial:"hidden",animate:d,...u,children:t(h,{className:m("outline-none",i==null?void 0:i.menu),onAction:r,children:o})},n)}export{A as ContextMenu,A as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DialogProps } from './Dialog.types';
|
|
2
|
-
export declare function Dialog({ className, children, animationVariants, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function Dialog({ className, children, animationVariants, onAnimationStart, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Dialog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{forwardRef as i}from"react";import{Dialog as s}from"react-aria-components";import{motion as l}from"framer-motion";import{cn as m}from"../../utils/cn.js";const f=i(({style:a,animationVariants:
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{forwardRef as i}from"react";import{Dialog as s}from"react-aria-components";import{motion as l}from"framer-motion";import{cn as m}from"../../utils/cn.js";const f=i(({style:a,animationVariants:r,...t},n)=>{const o=typeof a=="function"?a(t):a;return e(s,{...t,ref:n,style:o})}),c=l.create(f);function x({className:a,children:r,animationVariants:t,onAnimationStart:n,...o}){return e(c,{className:m("p-8 outline-0 max-w-max w-screen absolute top-2/4 left-2/4","shadow-[0_8px_24px_rgba(0,0,0,0.1)] rounded-lg bg-white border border-solid border-slate-400","transform -translate-x-1/2 -translate-y-1/2",a),...o,variants:t||{hidden:{transform:"translate(-50%, -50%) scale(0.8)",transition:{ease:"backIn"}},visible:{transform:"translate(-50%, -50%) scale(1)",transition:{ease:"backOut"}}},children:r})}export{x as Dialog,x as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DrawerProps } from './Drawer.types';
|
|
2
|
-
export declare function Drawer({ direction, children, className, animationVariants, ...props }: DrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function Drawer({ direction, children, className, animationVariants, onAnimationStart, ...props }: DrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Drawer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{forwardRef as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{forwardRef as n}from"react";import{Dialog as d}from"react-aria-components";import{motion as m}from"framer-motion";import{cn as b}from"../../utils/cn.js";const h={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=n(({style:t,size:r="20rem",...e},a)=>{const o=typeof t=="function"?t(e):{...t,"--drawer-size":`${r}`};return i(d,{...e,ref:a,style:o})}),p=m.create(l);function v({direction:t="right",children:r,className:e,animationVariants:a,onAnimationStart:o,...s}){return i(p,{className:b("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)]",e),"data-direction":t,variants:a||h[t],...s,children:r})}export{v as Drawer,v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{forwardRef as u,useId as v}from"react";import{ModalOverlay as h}from"react-aria-components";import{motion as y,AnimatePresence as b}from"framer-motion";import{useDialogTrigger as x}from"../DialogTrigger/DialogTrigger.js";import{cn as M}from"../../utils/cn.js";const O=u(({style:i,...t},e)=>n(h,{...t,ref:e,style:i})),g=y.create(O);function a({animate:i,animation:t,setAnimation:e,className:o,animationVariants:d,onAnimationStart:k,children:l,...m}){const s=v(),{key:c,...f}=m;return n(g,{isExiting:t==="hidden",onAnimationComplete:p=>{e(r=>p==="hidden"&&r==="hidden"?"unmounted":r)},variants:d||{hidden:{opacity:0,backdropFilter:"blur(0px)",transition:{delay:.08}},visible:{opacity:1,backdropFilter:"blur(8px)"}},initial:"hidden",animate:i,exit:"hidden",className:M("bg-black/30","fixed top-0 left-0","z-50","w-screen h-[var(--visual-viewport-height)]",o),...f,children:l},c||s)}function z(i){const{isOpen:t}=i,{animation:e,setAnimation:o}=x();return t!==void 0?n(b,{children:t&&n(a,{...i,animate:"visible",animation:e,setAnimation:o})}):n(a,{...i,animate:e,animation:e,setAnimation:o})}export{z as ModalOverlay,z as default};
|
|
@@ -37,10 +37,10 @@ export const Example: Story = {
|
|
|
37
37
|
autoFocus: {
|
|
38
38
|
control: 'boolean',
|
|
39
39
|
},
|
|
40
|
-
type: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
40
|
+
// type: {
|
|
41
|
+
// options: ['button', 'submit', 'reset'],
|
|
42
|
+
// control: { type: 'radio' },
|
|
43
|
+
// },
|
|
44
44
|
excludeFromTabOrder: {
|
|
45
45
|
control: 'boolean',
|
|
46
46
|
},
|
|
@@ -73,7 +73,7 @@ export const Example: Story = {
|
|
|
73
73
|
autoFocus: false,
|
|
74
74
|
defaultSelected: false,
|
|
75
75
|
excludeFromTabOrder: false,
|
|
76
|
-
type: 'button',
|
|
76
|
+
// type: 'button',
|
|
77
77
|
children: 'Press me',
|
|
78
78
|
onPress: action('onPress'),
|
|
79
79
|
onPressStart: action('onPressStart'),
|
package/package.json
CHANGED