@clicktap/ui 0.12.18 → 0.12.19

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 e,jsxs as f,Fragment as O}from"react/jsx-runtime";import{Popover as I,ComboBox as P,Label as S,Input as j,Button as A,Text as D,FieldError as E,ListBox as F}from"react-aria-components";import{forwardRef as M,useState as h}from"react";import{motion as T}from"framer-motion";import{c as d}from"../../assets/cn-CytzSlOG.js";import{Pulse as R}from"../Loader/Pulse.js";const U=M((o,i)=>e(I,{...o,ref:i})),W=T.create(U);function q({buttonIcon:o,...i}){return o?typeof o=="function"?o(i):o:e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:d("transition-all ease-in-out duration-200",i.isOpen?"rotate-180":"rotate-0"),children:e("path",{d:"M6 9L12 15L18 9",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:d(["stroke-slate-900",i.isDisabled&&"stroke-slate-400",i.isInvalid&&"stroke-red-500"])})})}function V({label:o,description:i,errorMessage:p,children:v,placeholder:g,key:w,isLoading:n,slots:r,popoverPortalContainer:_,popoverOffset:c,selectedKey:k,className:y,classNames:t,...l}){const[a,u]=h("unmounted"),[x,B]=h(!1);return e(P,{onOpenChange:()=>{u(a==="visible"?"hidden":"visible"),B(!x)},isDisabled:l.isDisabled||n,"data-has-value":!!k,...l,className:d("flex flex-col","w-full",y),children:C=>f(O,{children:[e(S,{className:d("flex","text-xs text-slate-500",t==null?void 0:t.label),children:o}),f("div",{className:d("flex","relative","w-full",t==null?void 0:t.comboBoxContainer),children:[e(j,{placeholder:g,className:d("border border-solid border-slate-300","text-sm text-slate-900","py-0 px-2","h-10 w-full","m-0","rounded-md","bg-white","transition-all ease-in-out duration-200","data-[hovered]:border-slate-400","data-[focused]:border-slate-400 data-[focused]:outline data-[focused]:outline-2 data-[focused]:outline-slate-200"," data-[disabled]:bg-slate-100 data-[disabled]:border-slate-300",n?"data-[disabled]:text-slate-900":"data-[disabled]:text-slate-500","data-[invalid]:border-red-500 data-[invalid]:bg-red-100 data-[invalid]:text-red-600","data-[invalid]:data-[hovered]:border-red-600","data-[invalid]:data-[focused]:border-red-600 data-[invalid]:data-[focused]:outline data-[invalid]:data-[focused]:outline-2 data-[invalid]:data-[focused]:outline-red-200","data-[invalid]:placeholder:text-slate-400",t==null?void 0:t.input)}),n?e("div",{className:d("absolute top-2 right-2","block",t==null?void 0:t.loader),children:(r==null?void 0:r.loadingIcon)||e(R,{})}):e(A,{className:d("absolute top-2 right-0","block","border-none","bg-none",t==null?void 0:t.arrowButton),children:e(q,{buttonIcon:r==null?void 0:r.buttonIcon,...C})})]}),i&&e(D,{slot:"description",className:d("flex","text-xs","text-slate-500",t==null?void 0:t.description),children:i}),e(E,{className:d("flex","text-xs","text-red-500",t==null?void 0:t.errorMessage),children:p}),e(W,{isOpen:x,isExiting:a==="hidden",offset:c,UNSTABLE_portalContainer:_,onAnimationComplete:L=>{u(b=>L==="hidden"&&b==="hidden"?"unmounted":b)},variants:{hidden:{opacity:0,y:-10},visible:{opacity:1,y:0}},initial:"hidden",animate:a,className:d("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-[var(--trigger-width)]","bg-white","border border-solid border-slate-300",t==null?void 0:t.listContainer),children:e(F,{className:d("max-h-80","overflow-y-scroll",t==null?void 0:t.list),children:v})},w)]})})}export{V as Select,V as default};
1
+ import{jsx as e,jsxs as h,Fragment as O}from"react/jsx-runtime";import{Popover as I,ComboBox as P,Label as S,Input as j,Button as A,Text as D,FieldError as E,ListBox as F}from"react-aria-components";import{forwardRef as M,useState as p}from"react";import{motion as T}from"framer-motion";import{c as d}from"../../assets/cn-CytzSlOG.js";import{Pulse as R}from"../Loader/Pulse.js";const U=M((o,i)=>e(I,{...o,ref:i})),W=T.create(U);function q({buttonIcon:o,...i}){return o?typeof o=="function"?o(i):o:e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:d("transition-all ease-in-out duration-200",i.isOpen?"rotate-180":"rotate-0"),children:e("path",{d:"M6 9L12 15L18 9",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:d(["stroke-slate-900",i.isDisabled&&"stroke-slate-400",i.isInvalid&&"stroke-red-500"])})})}function X({label:o,description:i,errorMessage:v,children:g,placeholder:w,key:_,isLoading:n,slots:r,popoverPortalContainer:k,popoverOffset:B,selectedKey:l,className:C,classNames:t,...u}){const[a,x]=p("unmounted"),[b,c]=p(!1);return e(P,{onOpenChange:()=>{x(a==="visible"?"hidden":"visible"),c(!b)},isDisabled:u.isDisabled||n,"data-has-value":!!l,selectedKey:l,...u,className:d("flex flex-col","w-full",C),children:y=>h(O,{children:[e(S,{className:d("flex","text-xs text-slate-500",t==null?void 0:t.label),children:o}),h("div",{className:d("flex","relative","w-full",t==null?void 0:t.comboBoxContainer),children:[e(j,{placeholder:w,className:d("border border-solid border-slate-300","text-sm text-slate-900","py-0 px-2","h-10 w-full","m-0","rounded-md","bg-white","transition-all ease-in-out duration-200","data-[hovered]:border-slate-400","data-[focused]:border-slate-400 data-[focused]:outline data-[focused]:outline-2 data-[focused]:outline-slate-200"," data-[disabled]:bg-slate-100 data-[disabled]:border-slate-300",n?"data-[disabled]:text-slate-900":"data-[disabled]:text-slate-500","data-[invalid]:border-red-500 data-[invalid]:bg-red-100 data-[invalid]:text-red-600","data-[invalid]:data-[hovered]:border-red-600","data-[invalid]:data-[focused]:border-red-600 data-[invalid]:data-[focused]:outline data-[invalid]:data-[focused]:outline-2 data-[invalid]:data-[focused]:outline-red-200","data-[invalid]:placeholder:text-slate-400",t==null?void 0:t.input)}),n?e("div",{className:d("absolute top-2 right-2","block",t==null?void 0:t.loader),children:(r==null?void 0:r.loadingIcon)||e(R,{})}):e(A,{className:d("absolute top-2 right-0","block","border-none","bg-none",t==null?void 0:t.arrowButton),children:e(q,{buttonIcon:r==null?void 0:r.buttonIcon,...y})})]}),i&&e(D,{slot:"description",className:d("flex","text-xs","text-slate-500",t==null?void 0:t.description),children:i}),e(E,{className:d("flex","text-xs","text-red-500",t==null?void 0:t.errorMessage),children:v}),e(W,{isOpen:b,isExiting:a==="hidden",offset:B,UNSTABLE_portalContainer:k,onAnimationComplete:L=>{x(f=>L==="hidden"&&f==="hidden"?"unmounted":f)},variants:{hidden:{opacity:0,y:-10},visible:{opacity:1,y:0}},initial:"hidden",animate:a,className:d("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-[var(--trigger-width)]","bg-white","border border-solid border-slate-300",t==null?void 0:t.listContainer),children:e(F,{className:d("max-h-80","overflow-y-scroll",t==null?void 0:t.list),children:g})},_)]})})}export{X as Select,X as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clicktap/ui",
3
- "version": "0.12.18",
3
+ "version": "0.12.19",
4
4
  "private": false,
5
5
  "author": "Clicktap",
6
6
  "description": "A library of React UI components and low-level hooks.",