@clasing/ui 0.1.136 → 2.0.0
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/dist/{button--Pnb6F6v.js → button-DU1x2trm.js} +1 -1
- package/dist/{button-CPzha0kl.cjs → button-dueLddAn.cjs} +1 -1
- package/dist/components/alert-dialog.cjs.js +1 -1
- package/dist/components/alert-dialog.es.js +1 -1
- package/dist/components/blocks/interactive-card.cjs.js +1 -1
- package/dist/components/blocks/interactive-card.es.js +1 -1
- package/dist/components/button.cjs.js +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/input.cjs.js +1 -1
- package/dist/components/input.es.js +1 -1
- package/dist/components/phone-input.cjs.js +1 -1
- package/dist/components/phone-input.d.ts +1 -0
- package/dist/components/phone-input.es.js +108 -109
- package/dist/components/tooltip.cjs.js +1 -1
- package/dist/components/tooltip.es.js +1 -1
- package/dist/{input-C1L8iNKq.js → input-BoPcvULq.js} +19 -19
- package/dist/input-eri6Lyeo.cjs +1 -0
- package/dist/{tooltip-VxOmcZ36.cjs → tooltip-BRSR0-4n.cjs} +1 -1
- package/dist/{tooltip-BnIdKYZi.js → tooltip-Bxh10S4Q.js} +11 -11
- package/dist/ui.css +2 -2
- package/package.json +1 -1
- package/dist/input-Dm-TUC5P.cjs +0 -1
|
@@ -4,7 +4,7 @@ import { Slot as M } from "@radix-ui/react-slot";
|
|
|
4
4
|
import { c as w } from "./index-BqtVL8d-.js";
|
|
5
5
|
import x from "react";
|
|
6
6
|
import { I as s } from "./icon-component-CxQsODCa.js";
|
|
7
|
-
import { b as N, T as I, c as C, a as V } from "./tooltip-
|
|
7
|
+
import { b as N, T as I, c as C, a as V } from "./tooltip-Bxh10S4Q.js";
|
|
8
8
|
const k = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] relative flex items-center justify-center outline-1 transition-[color,box-shadow]", T = w(k, {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("./jsx-runtime-BuHQgaKs.cjs"),p=require("./index-DoxiiusW.cjs"),$=require("@radix-ui/react-slot"),w=require("./index-C8P6Mn4U.cjs"),u=require("react"),r=require("./icon-component-D5YssRbR.cjs"),a=require("./tooltip-VxOmcZ36.cjs"),k="focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] relative flex items-center justify-center outline-1 transition-[color,box-shadow]",z=w.cva(k,{variants:{variant:{primary:["bg-primary-600 lg:hover:bg-primary-800 text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],secondary:["bg-black text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 lg:hover:bg-neutral-900 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],inverse:["lg:hover:bg-neutral-000 bg-white text-black outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],outline:["text-primary-600 outline-primary-600 lg:hover:bg-primary-050 bg-white disabled:bg-neutral-100 disabled:text-neutral-700 disabled:outline-transparent disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],ghost:["bg-primary-050 text-primary-600 lg:hover:bg-primary-100 outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],destructive:["bg-error-light text-error-main outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],link:["text-primary-600 lg:hover:bg-primary-050 bg-transparent outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"]},size:{xl:"h-12 gap-2 px-6 py-1 text-base",lg:"h-10 gap-2 px-5 py-1 text-sm",md:"h-8 gap-1.5 px-4 py-1 text-xs",sm:"h-7 gap-1 px-3 py-1 text-xs",xs:"h-6 gap-1 px-3 py-1 text-xs"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},iconPosition:{left:"",right:"",only:"aspect-square"}},compoundVariants:[{iconPosition:"only",variant:"primary",class:"outline-neutral-050 text-primary-600 lg:hover:bg-neutral-000 bg-white"},{iconPosition:"only",variant:"destructive",class:"bg-error-light text-error-main outline-transparent"},{iconPosition:"only",variant:"link",class:"text-primary-600 lg:hover:bg-primary-050 bg-transparent"},{iconPosition:"only",size:"xl",class:"h-12 w-12 p-1.5"},{iconPosition:"only",size:"lg",class:"h-10 w-10 p-1.5"},{iconPosition:"only",size:"md",class:"h-8 w-8 p-1.5"},{iconPosition:"only",size:"sm",class:"h-7 w-7 p-1.5"},{iconPosition:"only",size:"xs",class:"h-6 w-6 p-1.5"},{variant:"link",size:"xl",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"lg",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"md",class:"h-auto gap-1.5 px-3 py-1 text-sm"},{variant:"link",size:"sm",class:"h-auto gap-1 px-3 py-1 text-xs"},{variant:"link",size:"xs",class:"h-auto gap-1 px-3 py-1 text-xs"}],defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full",iconPosition:"left"}}),C=w.cva(`${k} cursor-default`,{variants:{variant:{primary:["bg-primary-800 text-white outline-transparent"],secondary:["bg-neutral-900 text-white outline-transparent"],inverse:["bg-neutral-000 text-black outline-transparent"],ghost:["bg-primary-100 text-primary-600 outline-transparent"],outline:["bg-primary-100 text-primary-600 outline-primary-600"],destructive:["bg-error-light text-error-main outline-transparent"],link:["bg-primary-050 text-primary-600"]},size:{xl:"h-12 gap-2 px-6 text-base",lg:"h-10 gap-2 px-5 text-sm",md:"h-8 gap-1.5 px-4 text-xs",sm:"h-7 gap-1 px-3 text-xs",xs:"h-6 gap-1 px-3 text-xs"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},iconPosition:{left:"",right:"",only:"aspect-square"}},compoundVariants:[{iconPosition:"only",variant:"primary",class:"bg-neutral-000 text-primary-600 outline-neutral-050"},{iconPosition:"only",variant:"destructive",class:"bg-error-light text-error-main outline-transparent"},{iconPosition:"only",variant:"link",class:"bg-primary-050 text-primary-600"},{iconPosition:"only",size:"xl",class:"h-12 w-12 p-3"},{iconPosition:"only",size:"lg",class:"h-10 w-10 p-2"},{iconPosition:"only",size:"md",class:"h-8 w-8 p-1"},{iconPosition:"only",size:"sm",class:"h-7 w-7 p-0.5"},{iconPosition:"only",size:"xs",class:"h-6 w-6 p-0.5"},{variant:"link",size:"xl",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"lg",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"md",class:"h-auto gap-1.5 px-3 py-1 text-sm"},{variant:"link",size:"sm",class:"h-auto gap-1 px-3 py-1 text-xs"},{variant:"link",size:"xs",class:"h-auto gap-1 px-3 py-1 text-xs"}],defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full",iconPosition:"left"}}),N=w.cva(k,{variants:{variant:{primary:["bg-primary-800 text-white outline-transparent"],secondary:["bg-neutral-900 text-white outline-transparent"],inverse:["bg-neutral-000 text-black outline-transparent"],ghost:["bg-primary-100 text-primary-600 outline-transparent"],outline:["bg-primary-100 text-primary-600 outline-primary-600"],destructive:["bg-error-light text-error-main outline-transparent"],link:["bg-primary-050 text-primary-600"]},size:{xl:"h-12 gap-2 px-6 text-base",lg:"h-10 gap-2 px-5 text-sm",md:"h-8 gap-1.5 px-4 text-xs",sm:"h-7 gap-1 px-3 text-xs",xs:"h-6 gap-1 px-3 text-xs"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},iconPosition:{left:"",right:"",only:"aspect-square"}},compoundVariants:[{iconPosition:"only",variant:"primary",class:"bg-neutral-000 text-primary-600 outline-neutral-050"},{iconPosition:"only",variant:"destructive",class:"bg-error-light text-error-main outline-transparent"},{iconPosition:"only",variant:"link",class:"bg-primary-050 text-primary-600"},{iconPosition:"only",size:"xl",class:"h-12 w-12 p-3"},{iconPosition:"only",size:"lg",class:"h-10 w-10 p-2"},{iconPosition:"only",size:"md",class:"h-8 w-8 p-1"},{iconPosition:"only",size:"sm",class:"h-7 w-7 p-0.5"},{iconPosition:"only",size:"xs",class:"h-6 w-6 p-0.5"},{variant:"link",size:"xl",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"lg",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"md",class:"h-auto gap-1.5 px-3 py-1 text-sm"},{variant:"link",size:"sm",class:"h-auto gap-1 px-3 py-1 text-xs"},{variant:"link",size:"xs",class:"h-auto gap-1 px-3 py-1 text-xs"}],defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full",iconPosition:"left"}}),I=u.forwardRef(({className:b,variant:h,size:i,weight:y,rounded:v,children:o,iconName:l,iconText:c,iconPosition:f="left",isLoading:s,isActive:q,disabled:E,tooltip:d,tooltipPlacement:R="top",asChild:j,...S},V)=>{const T=j?$.Slot:"button",n=u.useMemo(()=>!o&&l||f==="only"?"only":f,[o,l,f]),e=u.useMemo(()=>l?typeof l=="string"?{name:l}:l:null,[l]),x=n==="only"?{xl:"min-w-6 h-6",lg:"min-w-6 h-6",md:"min-w-5 h-5",sm:"min-w-4 h-4",xs:"min-w-3.5 h-3.5"}:{xl:"min-w-5 h-5",lg:"min-w-5 h-5",md:"min-w-4 h-4",sm:"min-w-4 h-4",xs:"min-w-3.5 h-3.5"},B=t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:n==="only"?t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:s?t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:"IconLoader2",className:p.cn("animate-spin",x[i||"xl"])}):e&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,stroke:e.stroke,iconText:c,size:24})}):t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("span",{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${s?"visible opacity-100":"invisible opacity-0"}`,children:t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:"IconLoader2",className:p.cn("animate-spin",x[i||"xl"])})}),t.jsxRuntimeExports.jsxs("span",{className:p.cn("flex items-center justify-center gap-2",s?"invisible opacity-0":"visible opacity-100"),children:[e&&n==="left"&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,iconText:c,stroke:e.stroke,className:x[i||"xl"]}),o,e&&n==="right"&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,iconText:c,stroke:e.stroke,className:x[i||"xl"]})]})]})}),F=()=>{if(!j||!u.isValidElement(o)||!e&&n!=="only")return o;const m=o,A=m.props.children;if(n==="only")return u.cloneElement(m,{...m.props,children:s?t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:"IconLoader2",className:p.cn("animate-spin",x[i||"xl"])}):e&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,stroke:e.stroke,iconText:c,size:24})});const P=e&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,iconText:c,stroke:e.stroke,className:x[i||"xl"]}),M=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("span",{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${s?"visible opacity-100":"invisible opacity-0"}`,children:t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:"IconLoader2",className:p.cn("animate-spin",x[i||"xl"])})}),t.jsxRuntimeExports.jsxs("span",{className:p.cn("flex items-center justify-center gap-2",s?"invisible opacity-0":"visible opacity-100"),children:[n==="left"&&P,A,n==="right"&&P]})]});return u.cloneElement(m,{...m.props,children:M})},g=t.jsxRuntimeExports.jsx(T,{ref:V,className:p.cn(s?C({variant:h,weight:y,size:i,rounded:v,iconPosition:n,className:b}):q?N({variant:h,weight:y,size:i,rounded:v,iconPosition:n,className:b}):z({variant:h,weight:y,size:i,rounded:v,iconPosition:n,className:b})),disabled:E||s,...S,children:j?F():B});return d&&(E||s)?t.jsxRuntimeExports.jsx(a.TooltipProvider,{children:t.jsxRuntimeExports.jsxs(a.Tooltip,{children:[t.jsxRuntimeExports.jsx(a.TooltipTrigger,{asChild:n==="only",children:n==="only"?t.jsxRuntimeExports.jsx("div",{className:"inline-block","aria-disabled":"true",children:g}):g}),t.jsxRuntimeExports.jsx(a.TooltipContent,{side:R,className:"text-muted-foreground",children:d})]})}):d?t.jsxRuntimeExports.jsx(a.TooltipProvider,{children:t.jsxRuntimeExports.jsxs(a.Tooltip,{children:[t.jsxRuntimeExports.jsx(a.TooltipTrigger,{asChild:n==="only",children:g}),t.jsxRuntimeExports.jsx(a.TooltipContent,{side:R,className:"text-muted-foreground",children:d})]})}):g});I.displayName="Button";exports.Button=I;exports.buttonActiveStyles=N;exports.buttonLoadingStyles=C;exports.buttonStyles=z;
|
|
1
|
+
"use strict";const t=require("./jsx-runtime-BuHQgaKs.cjs"),p=require("./index-DoxiiusW.cjs"),$=require("@radix-ui/react-slot"),w=require("./index-C8P6Mn4U.cjs"),u=require("react"),r=require("./icon-component-D5YssRbR.cjs"),a=require("./tooltip-BRSR0-4n.cjs"),k="focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] relative flex items-center justify-center outline-1 transition-[color,box-shadow]",z=w.cva(k,{variants:{variant:{primary:["bg-primary-600 lg:hover:bg-primary-800 text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],secondary:["bg-black text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 lg:hover:bg-neutral-900 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],inverse:["lg:hover:bg-neutral-000 bg-white text-black outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],outline:["text-primary-600 outline-primary-600 lg:hover:bg-primary-050 bg-white disabled:bg-neutral-100 disabled:text-neutral-700 disabled:outline-transparent disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],ghost:["bg-primary-050 text-primary-600 lg:hover:bg-primary-100 outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],destructive:["bg-error-light text-error-main outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],link:["text-primary-600 lg:hover:bg-primary-050 bg-transparent outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"]},size:{xl:"h-12 gap-2 px-6 py-1 text-base",lg:"h-10 gap-2 px-5 py-1 text-sm",md:"h-8 gap-1.5 px-4 py-1 text-xs",sm:"h-7 gap-1 px-3 py-1 text-xs",xs:"h-6 gap-1 px-3 py-1 text-xs"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},iconPosition:{left:"",right:"",only:"aspect-square"}},compoundVariants:[{iconPosition:"only",variant:"primary",class:"outline-neutral-050 text-primary-600 lg:hover:bg-neutral-000 bg-white"},{iconPosition:"only",variant:"destructive",class:"bg-error-light text-error-main outline-transparent"},{iconPosition:"only",variant:"link",class:"text-primary-600 lg:hover:bg-primary-050 bg-transparent"},{iconPosition:"only",size:"xl",class:"h-12 w-12 p-1.5"},{iconPosition:"only",size:"lg",class:"h-10 w-10 p-1.5"},{iconPosition:"only",size:"md",class:"h-8 w-8 p-1.5"},{iconPosition:"only",size:"sm",class:"h-7 w-7 p-1.5"},{iconPosition:"only",size:"xs",class:"h-6 w-6 p-1.5"},{variant:"link",size:"xl",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"lg",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"md",class:"h-auto gap-1.5 px-3 py-1 text-sm"},{variant:"link",size:"sm",class:"h-auto gap-1 px-3 py-1 text-xs"},{variant:"link",size:"xs",class:"h-auto gap-1 px-3 py-1 text-xs"}],defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full",iconPosition:"left"}}),C=w.cva(`${k} cursor-default`,{variants:{variant:{primary:["bg-primary-800 text-white outline-transparent"],secondary:["bg-neutral-900 text-white outline-transparent"],inverse:["bg-neutral-000 text-black outline-transparent"],ghost:["bg-primary-100 text-primary-600 outline-transparent"],outline:["bg-primary-100 text-primary-600 outline-primary-600"],destructive:["bg-error-light text-error-main outline-transparent"],link:["bg-primary-050 text-primary-600"]},size:{xl:"h-12 gap-2 px-6 text-base",lg:"h-10 gap-2 px-5 text-sm",md:"h-8 gap-1.5 px-4 text-xs",sm:"h-7 gap-1 px-3 text-xs",xs:"h-6 gap-1 px-3 text-xs"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},iconPosition:{left:"",right:"",only:"aspect-square"}},compoundVariants:[{iconPosition:"only",variant:"primary",class:"bg-neutral-000 text-primary-600 outline-neutral-050"},{iconPosition:"only",variant:"destructive",class:"bg-error-light text-error-main outline-transparent"},{iconPosition:"only",variant:"link",class:"bg-primary-050 text-primary-600"},{iconPosition:"only",size:"xl",class:"h-12 w-12 p-3"},{iconPosition:"only",size:"lg",class:"h-10 w-10 p-2"},{iconPosition:"only",size:"md",class:"h-8 w-8 p-1"},{iconPosition:"only",size:"sm",class:"h-7 w-7 p-0.5"},{iconPosition:"only",size:"xs",class:"h-6 w-6 p-0.5"},{variant:"link",size:"xl",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"lg",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"md",class:"h-auto gap-1.5 px-3 py-1 text-sm"},{variant:"link",size:"sm",class:"h-auto gap-1 px-3 py-1 text-xs"},{variant:"link",size:"xs",class:"h-auto gap-1 px-3 py-1 text-xs"}],defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full",iconPosition:"left"}}),N=w.cva(k,{variants:{variant:{primary:["bg-primary-800 text-white outline-transparent"],secondary:["bg-neutral-900 text-white outline-transparent"],inverse:["bg-neutral-000 text-black outline-transparent"],ghost:["bg-primary-100 text-primary-600 outline-transparent"],outline:["bg-primary-100 text-primary-600 outline-primary-600"],destructive:["bg-error-light text-error-main outline-transparent"],link:["bg-primary-050 text-primary-600"]},size:{xl:"h-12 gap-2 px-6 text-base",lg:"h-10 gap-2 px-5 text-sm",md:"h-8 gap-1.5 px-4 text-xs",sm:"h-7 gap-1 px-3 text-xs",xs:"h-6 gap-1 px-3 text-xs"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},iconPosition:{left:"",right:"",only:"aspect-square"}},compoundVariants:[{iconPosition:"only",variant:"primary",class:"bg-neutral-000 text-primary-600 outline-neutral-050"},{iconPosition:"only",variant:"destructive",class:"bg-error-light text-error-main outline-transparent"},{iconPosition:"only",variant:"link",class:"bg-primary-050 text-primary-600"},{iconPosition:"only",size:"xl",class:"h-12 w-12 p-3"},{iconPosition:"only",size:"lg",class:"h-10 w-10 p-2"},{iconPosition:"only",size:"md",class:"h-8 w-8 p-1"},{iconPosition:"only",size:"sm",class:"h-7 w-7 p-0.5"},{iconPosition:"only",size:"xs",class:"h-6 w-6 p-0.5"},{variant:"link",size:"xl",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"lg",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"md",class:"h-auto gap-1.5 px-3 py-1 text-sm"},{variant:"link",size:"sm",class:"h-auto gap-1 px-3 py-1 text-xs"},{variant:"link",size:"xs",class:"h-auto gap-1 px-3 py-1 text-xs"}],defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full",iconPosition:"left"}}),I=u.forwardRef(({className:b,variant:h,size:i,weight:y,rounded:v,children:o,iconName:l,iconText:c,iconPosition:f="left",isLoading:s,isActive:q,disabled:E,tooltip:d,tooltipPlacement:R="top",asChild:j,...S},V)=>{const T=j?$.Slot:"button",n=u.useMemo(()=>!o&&l||f==="only"?"only":f,[o,l,f]),e=u.useMemo(()=>l?typeof l=="string"?{name:l}:l:null,[l]),x=n==="only"?{xl:"min-w-6 h-6",lg:"min-w-6 h-6",md:"min-w-5 h-5",sm:"min-w-4 h-4",xs:"min-w-3.5 h-3.5"}:{xl:"min-w-5 h-5",lg:"min-w-5 h-5",md:"min-w-4 h-4",sm:"min-w-4 h-4",xs:"min-w-3.5 h-3.5"},B=t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:n==="only"?t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:s?t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:"IconLoader2",className:p.cn("animate-spin",x[i||"xl"])}):e&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,stroke:e.stroke,iconText:c,size:24})}):t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("span",{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${s?"visible opacity-100":"invisible opacity-0"}`,children:t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:"IconLoader2",className:p.cn("animate-spin",x[i||"xl"])})}),t.jsxRuntimeExports.jsxs("span",{className:p.cn("flex items-center justify-center gap-2",s?"invisible opacity-0":"visible opacity-100"),children:[e&&n==="left"&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,iconText:c,stroke:e.stroke,className:x[i||"xl"]}),o,e&&n==="right"&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,iconText:c,stroke:e.stroke,className:x[i||"xl"]})]})]})}),F=()=>{if(!j||!u.isValidElement(o)||!e&&n!=="only")return o;const m=o,A=m.props.children;if(n==="only")return u.cloneElement(m,{...m.props,children:s?t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:"IconLoader2",className:p.cn("animate-spin",x[i||"xl"])}):e&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,stroke:e.stroke,iconText:c,size:24})});const P=e&&t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:e.name,iconText:c,stroke:e.stroke,className:x[i||"xl"]}),M=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("span",{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${s?"visible opacity-100":"invisible opacity-0"}`,children:t.jsxRuntimeExports.jsx(r.IconComponent,{iconName:"IconLoader2",className:p.cn("animate-spin",x[i||"xl"])})}),t.jsxRuntimeExports.jsxs("span",{className:p.cn("flex items-center justify-center gap-2",s?"invisible opacity-0":"visible opacity-100"),children:[n==="left"&&P,A,n==="right"&&P]})]});return u.cloneElement(m,{...m.props,children:M})},g=t.jsxRuntimeExports.jsx(T,{ref:V,className:p.cn(s?C({variant:h,weight:y,size:i,rounded:v,iconPosition:n,className:b}):q?N({variant:h,weight:y,size:i,rounded:v,iconPosition:n,className:b}):z({variant:h,weight:y,size:i,rounded:v,iconPosition:n,className:b})),disabled:E||s,...S,children:j?F():B});return d&&(E||s)?t.jsxRuntimeExports.jsx(a.TooltipProvider,{children:t.jsxRuntimeExports.jsxs(a.Tooltip,{children:[t.jsxRuntimeExports.jsx(a.TooltipTrigger,{asChild:n==="only",children:n==="only"?t.jsxRuntimeExports.jsx("div",{className:"inline-block","aria-disabled":"true",children:g}):g}),t.jsxRuntimeExports.jsx(a.TooltipContent,{side:R,className:"text-muted-foreground",children:d})]})}):d?t.jsxRuntimeExports.jsx(a.TooltipProvider,{children:t.jsxRuntimeExports.jsxs(a.Tooltip,{children:[t.jsxRuntimeExports.jsx(a.TooltipTrigger,{asChild:n==="only",children:g}),t.jsxRuntimeExports.jsx(a.TooltipContent,{side:R,className:"text-muted-foreground",children:d})]})}):g});I.displayName="Button";exports.Button=I;exports.buttonActiveStyles=N;exports.buttonLoadingStyles=C;exports.buttonStyles=z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../jsx-runtime-BuHQgaKs.cjs"),u=require("@radix-ui/react-alert-dialog"),i=require("../button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../jsx-runtime-BuHQgaKs.cjs"),u=require("@radix-ui/react-alert-dialog"),i=require("../button-dueLddAn.cjs"),r=require("../index-DoxiiusW.cjs");function d(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const l in t)if(l!=="default"){const n=Object.getOwnPropertyDescriptor(t,l);Object.defineProperty(e,l,n.get?n:{enumerable:!0,get:()=>t[l]})}}return e.default=t,Object.freeze(e)}const o=d(u);function g({...t}){return a.jsxRuntimeExports.jsx(o.Root,{"data-slot":"alert-dialog",...t})}function x({...t}){return a.jsxRuntimeExports.jsx(o.Trigger,{"data-slot":"alert-dialog-trigger",...t})}function s({...t}){return a.jsxRuntimeExports.jsx(o.Portal,{"data-slot":"alert-dialog-portal",...t})}function c({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Overlay,{"data-slot":"alert-dialog-overlay",className:r.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}function m({className:t,...e}){return a.jsxRuntimeExports.jsxs(s,{children:[a.jsxRuntimeExports.jsx(c,{}),a.jsxRuntimeExports.jsx(o.Content,{"data-slot":"alert-dialog-content",className:r.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...e})]})}function f({className:t,...e}){return a.jsxRuntimeExports.jsx("div",{"data-slot":"alert-dialog-header",className:r.cn("flex flex-col gap-2 text-center sm:text-left",t),...e})}function p({className:t,...e}){return a.jsxRuntimeExports.jsx("div",{"data-slot":"alert-dialog-footer",className:r.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}function j({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Title,{"data-slot":"alert-dialog-title",className:r.cn("text-lg font-semibold",t),...e})}function D({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Description,{"data-slot":"alert-dialog-description",className:r.cn("text-muted-foreground text-sm",t),...e})}function A({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Action,{className:r.cn(i.buttonStyles(),t),...e})}function b({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Cancel,{className:r.cn(i.buttonStyles({variant:"outline"}),t),...e})}exports.AlertDialog=g;exports.AlertDialogAction=A;exports.AlertDialogCancel=b;exports.AlertDialogContent=m;exports.AlertDialogDescription=D;exports.AlertDialogFooter=p;exports.AlertDialogHeader=f;exports.AlertDialogOverlay=c;exports.AlertDialogPortal=s;exports.AlertDialogTitle=j;exports.AlertDialogTrigger=x;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e } from "../jsx-runtime-DywqP_6a.js";
|
|
2
2
|
import * as o from "@radix-ui/react-alert-dialog";
|
|
3
|
-
import { c as r } from "../button
|
|
3
|
+
import { c as r } from "../button-DU1x2trm.js";
|
|
4
4
|
import { c as l } from "../index-CRiPKpXj.js";
|
|
5
5
|
function g({
|
|
6
6
|
...t
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-BuHQgaKs.cjs"),I=require("../../badge-DknEN5GE.cjs"),i=require("../../card-D0D_gMHR.cjs"),j=require("../../icon-component-D5YssRbR.cjs"),u=require("../../tooltip-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../jsx-runtime-BuHQgaKs.cjs"),I=require("../../badge-DknEN5GE.cjs"),i=require("../../card-D0D_gMHR.cjs"),j=require("../../icon-component-D5YssRbR.cjs"),u=require("../../tooltip-BRSR0-4n.cjs"),n=require("../../index-DoxiiusW.cjs"),q=require("../../index-C8P6Mn4U.cjs"),w=require("react"),y=q.cva("focus-visible:border-ring focus-visible:ring-ring/50 transition-[color,box-shadow] focus-visible:ring-[3px]"),g=w.forwardRef(({className:h,isActive:s,title:m,text:d,helperText:p,badgeText:l,disabled:r,badgeVariant:f,badgeSize:R="xs",iconName:o,iconText:a,tooltipIconName:b="IconHelpCircleFilled",tooltipText:t,tooltipTitle:x,tooltipSide:C,tooltipSideOffset:E,tooltipAlign:N,...c},v)=>e.jsxRuntimeExports.jsxs(i.Card,{ref:v,className:n.cn(y({className:h}),{"bg-blue-050 border-blue-950":s,"border-neutral-100 bg-neutral-100":r,"cursor-pointer lg:active:bg-blue-100":c.onClick&&s&&!r,"lg:active:bg-blue-050 cursor-pointer":c.onClick&&!s&&!r}),role:"button",tabIndex:0,...c,children:[l||o||a?e.jsxRuntimeExports.jsxs(i.CardHeader,{className:"flex items-center justify-between gap-2",children:[o||a?e.jsxRuntimeExports.jsx("div",{className:n.cn("rounded-full p-1",{"bg-neutral-000 text-muted-foreground":!s,"bg-white text-blue-800":s,"bg-white text-neutral-700":r}),children:e.jsxRuntimeExports.jsx(j.IconComponent,{iconName:o,iconText:a,size:20})}):null,(l||t)&&e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[l?e.jsxRuntimeExports.jsx(I.Badge,{variant:f,size:R,weight:"semibold",className:n.cn({"opacity-50":r}),children:l}):null,t&&e.jsxRuntimeExports.jsxs(u.Tooltip,{children:[e.jsxRuntimeExports.jsx(u.TooltipTrigger,{children:e.jsxRuntimeExports.jsx(j.IconComponent,{iconName:b??"IconHelpCircleFilled",size:20,className:"z-10 min-h-5 min-w-5"})}),e.jsxRuntimeExports.jsx(u.TooltipContent,{side:C,sideOffset:E,align:N,children:x||t&&e.jsxRuntimeExports.jsxs("div",{className:"text-neutral-1000 flex flex-col gap-1",children:[x&&e.jsxRuntimeExports.jsx("p",{className:"text-paragraph-md font-semibold",children:x}),t&&e.jsxRuntimeExports.jsx("p",{className:"text-paragraph-md",children:t})]})})]})]})]}):null,e.jsxRuntimeExports.jsxs(i.CardContent,{className:"flex flex-col gap-1",children:[m?e.jsxRuntimeExports.jsx("p",{className:n.cn("text-foreground text-label-xl font-semibold",{"text-neutral-700":r}),children:m}):null,d?e.jsxRuntimeExports.jsx("p",{className:n.cn("text-muted-foreground text-paragraph-md",{"text-neutral-700":r}),children:d}):null]}),p?e.jsxRuntimeExports.jsx(i.CardFooter,{children:e.jsxRuntimeExports.jsx("p",{className:n.cn("text-paragraph-sm text-neutral-800",{"text-neutral-700":r}),children:p})}):null]}));g.displayName="InteractiveCard";const z=g;exports.InteractiveCard=z;
|
|
@@ -2,7 +2,7 @@ import { j as e } from "../../jsx-runtime-DywqP_6a.js";
|
|
|
2
2
|
import { B as I } from "../../badge-CJxUpkWv.js";
|
|
3
3
|
import { C as w, e as y, b as z, d as F } from "../../card-9-UcGdV0.js";
|
|
4
4
|
import { I as x } from "../../icon-component-CxQsODCa.js";
|
|
5
|
-
import { T as H, c as k, a as B } from "../../tooltip-
|
|
5
|
+
import { T as H, c as k, a as B } from "../../tooltip-Bxh10S4Q.js";
|
|
6
6
|
import { c as a } from "../../index-CRiPKpXj.js";
|
|
7
7
|
import { c as R } from "../../index-BqtVL8d-.js";
|
|
8
8
|
import { forwardRef as E } from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../button-dueLddAn.cjs");exports.Button=t.Button;exports.buttonActiveStyles=t.buttonActiveStyles;exports.buttonLoadingStyles=t.buttonLoadingStyles;exports.buttonStyles=t.buttonStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../input-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../input-eri6Lyeo.cjs");exports.Input=t.Input;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../jsx-runtime-BuHQgaKs.cjs"),S=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../jsx-runtime-BuHQgaKs.cjs"),p=require("../command-C4Y6Ixrp.cjs"),S=require("../input-eri6Lyeo.cjs"),I=require("../label-U5GnYvFO.cjs"),h=require("../popover-4V87msIT.cjs"),q=require("../scroll-area-hg-bGoRe.cjs"),c=require("../index-DoxiiusW.cjs"),w=require("react"),P=require("react-phone-number-input"),O=require("react-phone-number-input/flags"),_=require("react-phone-number-input/locale/en"),T=require("react-phone-number-input/locale/es"),k=require("react-phone-number-input/locale/fr"),y=require("../icon-component-D5YssRbR.cjs");function C(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>t[s]})}}return n.default=t,Object.freeze(n)}const f=C(w),E=C(P),N=f.forwardRef(({className:t,onChange:n,value:s,size:o="md",rounded:r="default",label:u,helperText:d,locale:x="en",error:l,touched:m,containerClassName:j,...i},b)=>e.jsxRuntimeExports.jsxs("div",{className:c.cn("flex flex-col gap-2",j),children:[u&&e.jsxRuntimeExports.jsx(I.Label,{htmlFor:i.id,className:c.cn("mb-1",{"opacity-50":i.disabled}),children:u}),e.jsxRuntimeExports.jsx(E.default,{ref:b,className:c.cn("flex",t),flagComponent:R,countrySelectComponent:A,inputComponent:v,smartCaret:!1,labels:x==="es"?T:x==="fr"?k:_,value:s||void 0,onChange:a=>n?.(a||""),countrySelectProps:{size:o,rounded:r,error:l,touched:m},numberInputProps:{size:o,rounded:r,error:l,touched:m},...i}),l&&m?e.jsxRuntimeExports.jsx("span",{id:i.id&&`${i.id}-error-text`,"aria-invalid":!0,className:"text-destructive text-label-md -mt-1",children:l}):d?e.jsxRuntimeExports.jsx("span",{id:i.id&&`${i.id}-helper-text`,className:c.cn("text-label-md -mt-1",{"text-muted-foreground":!l&&!m,"text-destructive":l&&m,"text-muted-foreground opacity-50":i.disabled}),children:d}):null]}));N.displayName="PhoneInput";const v=f.forwardRef(({className:t,rounded:n="default",error:s,touched:o,size:r,...u},d)=>{const{"data-country":x,...l}=u;return e.jsxRuntimeExports.jsx(S.Input,{size:r,containerClassName:"w-full",className:c.cn("w-full",{"border-destructive":s&&o,"border-blue-800":o&&!s,"rounded-s-none rounded-e-lg":n!=="full","rounded-s-none rounded-e-full":n==="full","rounded-e-sm":r==="sm","rounded-e-md":r==="md","rounded-e-lg":r==="lg"},t),...l,ref:d})});v.displayName="InputComponent";const A=({disabled:t,value:n,options:s,onChange:o,size:r="md",rounded:u="default",error:d,touched:x})=>{const l=f.useRef(null),[m,j]=f.useState(""),[i,b]=f.useState(!1);return e.jsxRuntimeExports.jsxs(h.Popover,{open:i,modal:!0,onOpenChange:a=>{b(a),a&&j("")},children:[e.jsxRuntimeExports.jsx(h.PopoverTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:c.cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 flex w-fit min-w-0 items-center justify-center border border-r-0 bg-transparent text-base transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-semibold focus-visible:z-1 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",u==="default"?"rounded-e-none":"rounded-s-full rounded-e-none",{"outline-destructive":d&&x,"outline-blue-800":x&&!d,"text-label-md h-8 rounded-s-sm px-2 py-1":r==="sm","text-label-lg h-12 rounded-s-md px-3 py-1":r==="md","text-label-xl h-16 rounded-s-lg px-4 py-2":r==="lg"}),disabled:t,children:[e.jsxRuntimeExports.jsx(R,{country:n,countryName:n,disabled:t}),e.jsxRuntimeExports.jsx(y.IconComponent,{iconName:"IconChevronDown",className:c.cn("-mr-2 size-4 opacity-50",t?"hidden":"opacity-100")})]})}),e.jsxRuntimeExports.jsx(h.PopoverContent,{className:"w-[300px] p-0",children:e.jsxRuntimeExports.jsxs(p.Command,{children:[e.jsxRuntimeExports.jsx(p.CommandInput,{value:m,onValueChange:a=>{j(a),setTimeout(()=>{if(l.current){const g=l.current.querySelector("[data-radix-scroll-area-viewport]");g&&(g.scrollTop=0)}},0)},placeholder:"Search country..."}),e.jsxRuntimeExports.jsx(p.CommandList,{children:e.jsxRuntimeExports.jsxs(q.ScrollArea,{ref:l,className:"h-72",children:[e.jsxRuntimeExports.jsx(p.CommandEmpty,{children:"No country found."}),e.jsxRuntimeExports.jsx(p.CommandGroup,{children:s.map(({value:a,label:g})=>a?e.jsxRuntimeExports.jsx(D,{country:a,countryName:g,selectedCountry:n,onChange:o,onSelectComplete:()=>b(!1)},a):null)})]})})]})})]})},D=({country:t,countryName:n,selectedCountry:s,onChange:o,onSelectComplete:r})=>{const u=()=>{o(t),r()};return e.jsxRuntimeExports.jsxs(p.CommandItem,{className:"gap-2",onSelect:u,children:[e.jsxRuntimeExports.jsx(R,{country:t,countryName:n}),e.jsxRuntimeExports.jsx("span",{className:"flex-1 text-sm",children:n}),e.jsxRuntimeExports.jsx("span",{className:"text-foreground/50 text-sm",children:`+${E.getCountryCallingCode(t)}`}),e.jsxRuntimeExports.jsx(y.IconComponent,{iconName:"IconCheck",className:`ml-auto size-4 ${t===s?"opacity-100":"opacity-0"}`})]})},R=({country:t,countryName:n,disabled:s})=>{const o=O[t];return e.jsxRuntimeExports.jsx("span",{className:c.cn("bg-foreground/20 flex h-4 w-6 overflow-hidden rounded-[4px] [&_svg:not([class*='size-'])]:size-full",{"opacity-50":s}),children:o&&e.jsxRuntimeExports.jsx(o,{title:n})})};exports.PhoneInput=N;
|
|
@@ -9,6 +9,7 @@ type PhoneInputProps = Omit<React.ComponentProps<'input'>, 'onChange' | 'value'
|
|
|
9
9
|
locale?: 'en' | 'es' | 'fr';
|
|
10
10
|
error?: string;
|
|
11
11
|
touched?: boolean;
|
|
12
|
+
containerClassName?: string;
|
|
12
13
|
};
|
|
13
14
|
declare const PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps>;
|
|
14
15
|
export { PhoneInput };
|
|
@@ -1,149 +1,148 @@
|
|
|
1
1
|
import { j as e } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
+
import { C as N, d as v, f as I, b as w, c as S, e as P } from "../command-pED95x7-.js";
|
|
3
|
+
import { I as R } from "../input-BoPcvULq.js";
|
|
4
|
+
import { L as O } from "../label-_kG7WBoJ.js";
|
|
5
|
+
import { P as $, c as E, b as F } from "../popover-CHAUhJda.js";
|
|
6
|
+
import { S as L } from "../scroll-area-DwBiu3Jn.js";
|
|
7
|
+
import { c as m } from "../index-CRiPKpXj.js";
|
|
2
8
|
import * as f from "react";
|
|
3
9
|
import * as j from "react-phone-number-input";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { C as S, d as P, f as R, b as O, c as $, e as E } from "../command-pED95x7-.js";
|
|
9
|
-
import { I as F } from "../input-C1L8iNKq.js";
|
|
10
|
-
import { L } from "../label-_kG7WBoJ.js";
|
|
11
|
-
import { P as V, c as k, b as A } from "../popover-CHAUhJda.js";
|
|
12
|
-
import { S as T } from "../scroll-area-DwBiu3Jn.js";
|
|
13
|
-
import { c as u } from "../index-CRiPKpXj.js";
|
|
10
|
+
import V from "react-phone-number-input/flags";
|
|
11
|
+
import k from "react-phone-number-input/locale/en";
|
|
12
|
+
import A from "react-phone-number-input/locale/es";
|
|
13
|
+
import T from "react-phone-number-input/locale/fr";
|
|
14
14
|
import { I as C } from "../icon-component-CxQsODCa.js";
|
|
15
15
|
const _ = f.forwardRef(
|
|
16
16
|
({
|
|
17
17
|
className: t,
|
|
18
18
|
onChange: n,
|
|
19
|
-
value:
|
|
19
|
+
value: l,
|
|
20
20
|
size: s = "md",
|
|
21
21
|
rounded: o = "default",
|
|
22
|
-
label:
|
|
23
|
-
helperText:
|
|
22
|
+
label: d,
|
|
23
|
+
helperText: c,
|
|
24
24
|
locale: p = "en",
|
|
25
|
-
error:
|
|
26
|
-
touched:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
error: r,
|
|
26
|
+
touched: u,
|
|
27
|
+
containerClassName: x,
|
|
28
|
+
...a
|
|
29
|
+
}, b) => /* @__PURE__ */ e.jsxs("div", { className: m("flex flex-col gap-2", x), children: [
|
|
30
|
+
d && /* @__PURE__ */ e.jsx(
|
|
31
|
+
O,
|
|
31
32
|
{
|
|
32
|
-
htmlFor:
|
|
33
|
-
className:
|
|
34
|
-
"
|
|
33
|
+
htmlFor: a.id,
|
|
34
|
+
className: m("mb-1", {
|
|
35
|
+
"opacity-50": a.disabled
|
|
35
36
|
}),
|
|
36
|
-
children:
|
|
37
|
+
children: d
|
|
37
38
|
}
|
|
38
39
|
),
|
|
39
40
|
/* @__PURE__ */ e.jsx(
|
|
40
41
|
j.default,
|
|
41
42
|
{
|
|
42
|
-
ref:
|
|
43
|
-
className:
|
|
43
|
+
ref: b,
|
|
44
|
+
className: m("flex", t),
|
|
44
45
|
flagComponent: h,
|
|
45
46
|
countrySelectComponent: q,
|
|
46
47
|
inputComponent: y,
|
|
47
48
|
smartCaret: !1,
|
|
48
|
-
labels: p === "es" ?
|
|
49
|
-
value:
|
|
50
|
-
onChange: (
|
|
49
|
+
labels: p === "es" ? A : p === "fr" ? T : k,
|
|
50
|
+
value: l || void 0,
|
|
51
|
+
onChange: (i) => n?.(i || ""),
|
|
51
52
|
countrySelectProps: {
|
|
52
53
|
size: s,
|
|
53
54
|
rounded: o,
|
|
54
|
-
error:
|
|
55
|
-
touched:
|
|
55
|
+
error: r,
|
|
56
|
+
touched: u
|
|
56
57
|
},
|
|
57
58
|
numberInputProps: {
|
|
58
59
|
size: s,
|
|
59
60
|
rounded: o,
|
|
60
|
-
error:
|
|
61
|
-
touched:
|
|
61
|
+
error: r,
|
|
62
|
+
touched: u
|
|
62
63
|
},
|
|
63
|
-
...
|
|
64
|
+
...a
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
|
-
|
|
67
|
+
r && u ? /* @__PURE__ */ e.jsx(
|
|
67
68
|
"span",
|
|
68
69
|
{
|
|
69
|
-
id:
|
|
70
|
+
id: a.id && `${a.id}-error-text`,
|
|
70
71
|
"aria-invalid": !0,
|
|
71
72
|
className: "text-destructive text-label-md -mt-1",
|
|
72
|
-
children:
|
|
73
|
+
children: r
|
|
73
74
|
}
|
|
74
|
-
) :
|
|
75
|
+
) : c ? /* @__PURE__ */ e.jsx(
|
|
75
76
|
"span",
|
|
76
77
|
{
|
|
77
|
-
id:
|
|
78
|
-
className:
|
|
79
|
-
"text-muted-foreground": !
|
|
80
|
-
"text-destructive":
|
|
81
|
-
"text-
|
|
78
|
+
id: a.id && `${a.id}-helper-text`,
|
|
79
|
+
className: m("text-label-md -mt-1", {
|
|
80
|
+
"text-muted-foreground": !r && !u,
|
|
81
|
+
"text-destructive": r && u,
|
|
82
|
+
"text-muted-foreground opacity-50": a.disabled
|
|
82
83
|
}),
|
|
83
|
-
children:
|
|
84
|
+
children: c
|
|
84
85
|
}
|
|
85
86
|
) : null
|
|
86
87
|
] })
|
|
87
88
|
);
|
|
88
89
|
_.displayName = "PhoneInput";
|
|
89
|
-
const y = f.forwardRef(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
);
|
|
90
|
+
const y = f.forwardRef(({ className: t, rounded: n = "default", error: l, touched: s, size: o, ...d }, c) => {
|
|
91
|
+
const { "data-country": p, ...r } = d;
|
|
92
|
+
return /* @__PURE__ */ e.jsx(
|
|
93
|
+
R,
|
|
94
|
+
{
|
|
95
|
+
size: o,
|
|
96
|
+
containerClassName: "w-full",
|
|
97
|
+
className: m(
|
|
98
|
+
"w-full",
|
|
99
|
+
{
|
|
100
|
+
"border-destructive": l && s,
|
|
101
|
+
"border-blue-800": s && !l,
|
|
102
|
+
"rounded-s-none rounded-e-lg": n !== "full",
|
|
103
|
+
"rounded-s-none rounded-e-full": n === "full",
|
|
104
|
+
"rounded-e-sm": o === "sm",
|
|
105
|
+
"rounded-e-md": o === "md",
|
|
106
|
+
"rounded-e-lg": o === "lg"
|
|
107
|
+
},
|
|
108
|
+
t
|
|
109
|
+
),
|
|
110
|
+
...r,
|
|
111
|
+
ref: c
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
});
|
|
116
115
|
y.displayName = "InputComponent";
|
|
117
116
|
const q = ({
|
|
118
117
|
disabled: t,
|
|
119
118
|
value: n,
|
|
120
|
-
options:
|
|
119
|
+
options: l,
|
|
121
120
|
onChange: s,
|
|
122
121
|
size: o = "md",
|
|
123
|
-
rounded:
|
|
124
|
-
error:
|
|
122
|
+
rounded: d = "default",
|
|
123
|
+
error: c,
|
|
125
124
|
touched: p
|
|
126
125
|
}) => {
|
|
127
|
-
const
|
|
126
|
+
const r = f.useRef(null), [u, x] = f.useState(""), [a, b] = f.useState(!1);
|
|
128
127
|
return /* @__PURE__ */ e.jsxs(
|
|
129
|
-
|
|
128
|
+
$,
|
|
130
129
|
{
|
|
131
|
-
open:
|
|
130
|
+
open: a,
|
|
132
131
|
modal: !0,
|
|
133
|
-
onOpenChange: (
|
|
134
|
-
|
|
132
|
+
onOpenChange: (i) => {
|
|
133
|
+
b(i), i && x("");
|
|
135
134
|
},
|
|
136
135
|
children: [
|
|
137
|
-
/* @__PURE__ */ e.jsx(
|
|
136
|
+
/* @__PURE__ */ e.jsx(E, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
138
137
|
"button",
|
|
139
138
|
{
|
|
140
139
|
type: "button",
|
|
141
|
-
className:
|
|
142
|
-
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-fit items-center justify-center
|
|
143
|
-
|
|
140
|
+
className: m(
|
|
141
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 flex w-fit min-w-0 items-center justify-center border border-r-0 bg-transparent text-base transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-semibold focus-visible:z-1 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
142
|
+
d === "default" ? "rounded-e-none" : "rounded-s-full rounded-e-none",
|
|
144
143
|
{
|
|
145
|
-
"outline-destructive":
|
|
146
|
-
"outline-blue-800": p && !
|
|
144
|
+
"outline-destructive": c && p,
|
|
145
|
+
"outline-blue-800": p && !c,
|
|
147
146
|
"text-label-md h-8 rounded-s-sm px-2 py-1": o === "sm",
|
|
148
147
|
"text-label-lg h-12 rounded-s-md px-3 py-1": o === "md",
|
|
149
148
|
"text-label-xl h-16 rounded-s-lg px-4 py-2": o === "lg"
|
|
@@ -163,7 +162,7 @@ const q = ({
|
|
|
163
162
|
C,
|
|
164
163
|
{
|
|
165
164
|
iconName: "IconChevronDown",
|
|
166
|
-
className:
|
|
165
|
+
className: m(
|
|
167
166
|
"-mr-2 size-4 opacity-50",
|
|
168
167
|
t ? "hidden" : "opacity-100"
|
|
169
168
|
)
|
|
@@ -172,37 +171,37 @@ const q = ({
|
|
|
172
171
|
]
|
|
173
172
|
}
|
|
174
173
|
) }),
|
|
175
|
-
/* @__PURE__ */ e.jsx(
|
|
174
|
+
/* @__PURE__ */ e.jsx(F, { className: "w-[300px] p-0", children: /* @__PURE__ */ e.jsxs(N, { children: [
|
|
176
175
|
/* @__PURE__ */ e.jsx(
|
|
177
|
-
|
|
176
|
+
v,
|
|
178
177
|
{
|
|
179
|
-
value:
|
|
180
|
-
onValueChange: (
|
|
181
|
-
|
|
182
|
-
if (
|
|
183
|
-
const
|
|
178
|
+
value: u,
|
|
179
|
+
onValueChange: (i) => {
|
|
180
|
+
x(i), setTimeout(() => {
|
|
181
|
+
if (r.current) {
|
|
182
|
+
const g = r.current.querySelector(
|
|
184
183
|
"[data-radix-scroll-area-viewport]"
|
|
185
184
|
);
|
|
186
|
-
|
|
185
|
+
g && (g.scrollTop = 0);
|
|
187
186
|
}
|
|
188
187
|
}, 0);
|
|
189
188
|
},
|
|
190
189
|
placeholder: "Search country..."
|
|
191
190
|
}
|
|
192
191
|
),
|
|
193
|
-
/* @__PURE__ */ e.jsx(
|
|
194
|
-
/* @__PURE__ */ e.jsx(
|
|
195
|
-
/* @__PURE__ */ e.jsx(
|
|
196
|
-
({ value:
|
|
192
|
+
/* @__PURE__ */ e.jsx(I, { children: /* @__PURE__ */ e.jsxs(L, { ref: r, className: "h-72", children: [
|
|
193
|
+
/* @__PURE__ */ e.jsx(w, { children: "No country found." }),
|
|
194
|
+
/* @__PURE__ */ e.jsx(S, { children: l.map(
|
|
195
|
+
({ value: i, label: g }) => i ? /* @__PURE__ */ e.jsx(
|
|
197
196
|
D,
|
|
198
197
|
{
|
|
199
|
-
country:
|
|
200
|
-
countryName:
|
|
198
|
+
country: i,
|
|
199
|
+
countryName: g,
|
|
201
200
|
selectedCountry: n,
|
|
202
201
|
onChange: s,
|
|
203
|
-
onSelectComplete: () =>
|
|
202
|
+
onSelectComplete: () => b(!1)
|
|
204
203
|
},
|
|
205
|
-
|
|
204
|
+
i
|
|
206
205
|
) : null
|
|
207
206
|
) })
|
|
208
207
|
] }) })
|
|
@@ -213,14 +212,14 @@ const q = ({
|
|
|
213
212
|
}, D = ({
|
|
214
213
|
country: t,
|
|
215
214
|
countryName: n,
|
|
216
|
-
selectedCountry:
|
|
215
|
+
selectedCountry: l,
|
|
217
216
|
onChange: s,
|
|
218
217
|
onSelectComplete: o
|
|
219
218
|
}) => {
|
|
220
|
-
const
|
|
219
|
+
const d = () => {
|
|
221
220
|
s(t), o();
|
|
222
221
|
};
|
|
223
|
-
return /* @__PURE__ */ e.jsxs(
|
|
222
|
+
return /* @__PURE__ */ e.jsxs(P, { className: "gap-2", onSelect: d, children: [
|
|
224
223
|
/* @__PURE__ */ e.jsx(h, { country: t, countryName: n }),
|
|
225
224
|
/* @__PURE__ */ e.jsx("span", { className: "flex-1 text-sm", children: n }),
|
|
226
225
|
/* @__PURE__ */ e.jsx("span", { className: "text-foreground/50 text-sm", children: `+${j.getCountryCallingCode(t)}` }),
|
|
@@ -228,22 +227,22 @@ const q = ({
|
|
|
228
227
|
C,
|
|
229
228
|
{
|
|
230
229
|
iconName: "IconCheck",
|
|
231
|
-
className: `ml-auto size-4 ${t ===
|
|
230
|
+
className: `ml-auto size-4 ${t === l ? "opacity-100" : "opacity-0"}`
|
|
232
231
|
}
|
|
233
232
|
)
|
|
234
233
|
] });
|
|
235
234
|
}, h = ({
|
|
236
235
|
country: t,
|
|
237
236
|
countryName: n,
|
|
238
|
-
disabled:
|
|
237
|
+
disabled: l
|
|
239
238
|
}) => {
|
|
240
|
-
const s =
|
|
239
|
+
const s = V[t];
|
|
241
240
|
return /* @__PURE__ */ e.jsx(
|
|
242
241
|
"span",
|
|
243
242
|
{
|
|
244
|
-
className:
|
|
243
|
+
className: m(
|
|
245
244
|
"bg-foreground/20 flex h-4 w-6 overflow-hidden rounded-[4px] [&_svg:not([class*='size-'])]:size-full",
|
|
246
|
-
{ "opacity-50":
|
|
245
|
+
{ "opacity-50": l }
|
|
247
246
|
),
|
|
248
247
|
children: s && /* @__PURE__ */ e.jsx(s, { title: n })
|
|
249
248
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../tooltip-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../tooltip-BRSR0-4n.cjs");exports.Tooltip=o.Tooltip;exports.TooltipContent=o.TooltipContent;exports.TooltipProvider=o.TooltipProvider;exports.TooltipTrigger=o.TooltipTrigger;
|
|
@@ -2,9 +2,9 @@ import { j as s } from "./jsx-runtime-DywqP_6a.js";
|
|
|
2
2
|
import { L as j } from "./label-_kG7WBoJ.js";
|
|
3
3
|
import { c as r } from "./index-CRiPKpXj.js";
|
|
4
4
|
import { c as N } from "./index-BqtVL8d-.js";
|
|
5
|
-
import * as
|
|
6
|
-
import { I as
|
|
7
|
-
const
|
|
5
|
+
import * as y from "react";
|
|
6
|
+
import { I as d } from "./icon-component-CxQsODCa.js";
|
|
7
|
+
const I = N(
|
|
8
8
|
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 border bg-transparent transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-semibold disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
@@ -37,7 +37,7 @@ function V({
|
|
|
37
37
|
error: t,
|
|
38
38
|
touched: i,
|
|
39
39
|
iconName: f,
|
|
40
|
-
iconPosition:
|
|
40
|
+
iconPosition: n = "left",
|
|
41
41
|
type: l = "text",
|
|
42
42
|
size: g,
|
|
43
43
|
rounded: v,
|
|
@@ -45,7 +45,7 @@ function V({
|
|
|
45
45
|
containerClassName: p,
|
|
46
46
|
...e
|
|
47
47
|
}) {
|
|
48
|
-
const [o, w] =
|
|
48
|
+
const [o, w] = y.useState(!1), a = f ? ((m) => typeof m == "string" ? { name: m } : m)(f) : void 0, c = t && i ? "error" : i && !t && e.value ? "success" : "default", h = () => {
|
|
49
49
|
w(!o);
|
|
50
50
|
};
|
|
51
51
|
return /* @__PURE__ */ s.jsxs("div", { className: r("flex flex-col gap-2", p), children: [
|
|
@@ -53,24 +53,24 @@ function V({
|
|
|
53
53
|
j,
|
|
54
54
|
{
|
|
55
55
|
htmlFor: e.id,
|
|
56
|
-
className: r({
|
|
57
|
-
"
|
|
56
|
+
className: r("mb-1", {
|
|
57
|
+
"opacity-50": e.disabled
|
|
58
58
|
}),
|
|
59
59
|
children: x
|
|
60
60
|
}
|
|
61
61
|
),
|
|
62
62
|
/* @__PURE__ */ s.jsxs("div", { className: "relative w-full", children: [
|
|
63
|
-
a &&
|
|
63
|
+
a && n === "left" && /* @__PURE__ */ s.jsx(
|
|
64
64
|
"span",
|
|
65
65
|
{
|
|
66
66
|
className: r("absolute top-1/2 left-3 -translate-y-1/2", {
|
|
67
67
|
"text-muted-foreground": c === "default",
|
|
68
68
|
"text-destructive": c === "error",
|
|
69
69
|
"text-success-main": c === "success",
|
|
70
|
-
"text-
|
|
70
|
+
"text-muted-foreground opacity-50": e.disabled
|
|
71
71
|
}),
|
|
72
72
|
children: /* @__PURE__ */ s.jsx(
|
|
73
|
-
|
|
73
|
+
d,
|
|
74
74
|
{
|
|
75
75
|
iconName: a.name,
|
|
76
76
|
stroke: a.stroke,
|
|
@@ -88,14 +88,14 @@ function V({
|
|
|
88
88
|
"aria-invalid": !!(t && i),
|
|
89
89
|
"aria-errormessage": e.id && t ? `${e.id}-error-text` : void 0,
|
|
90
90
|
className: r(
|
|
91
|
-
|
|
91
|
+
I({
|
|
92
92
|
size: g,
|
|
93
93
|
rounded: v,
|
|
94
94
|
state: c,
|
|
95
95
|
className: r(
|
|
96
96
|
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
97
|
-
a &&
|
|
98
|
-
a &&
|
|
97
|
+
a && n === "left" ? "pl-10" : "",
|
|
98
|
+
a && n === "right" || l === "password" ? "pr-10" : "",
|
|
99
99
|
l === "color" ? "h-[50px] p-0" : "",
|
|
100
100
|
b
|
|
101
101
|
)
|
|
@@ -113,7 +113,7 @@ function V({
|
|
|
113
113
|
className: "absolute top-1/2 right-3 -translate-y-1/2 rounded-md p-1 hover:bg-neutral-100/50 focus-visible:ring-[1.5px] focus-visible:ring-offset-1 focus-visible:outline-none",
|
|
114
114
|
onClick: h,
|
|
115
115
|
children: /* @__PURE__ */ s.jsx(
|
|
116
|
-
|
|
116
|
+
d,
|
|
117
117
|
{
|
|
118
118
|
iconName: o ? "IconEyeOff" : "IconEye",
|
|
119
119
|
size: 20
|
|
@@ -121,8 +121,8 @@ function V({
|
|
|
121
121
|
)
|
|
122
122
|
}
|
|
123
123
|
),
|
|
124
|
-
a &&
|
|
125
|
-
|
|
124
|
+
a && n === "right" && l !== "password" && /* @__PURE__ */ s.jsx("span", { className: "absolute top-1/2 right-3 -translate-y-1/2", children: /* @__PURE__ */ s.jsx(
|
|
125
|
+
d,
|
|
126
126
|
{
|
|
127
127
|
iconName: a.name,
|
|
128
128
|
stroke: a.stroke,
|
|
@@ -130,7 +130,7 @@ function V({
|
|
|
130
130
|
}
|
|
131
131
|
) }),
|
|
132
132
|
!a && t && i && l !== "password" && /* @__PURE__ */ s.jsx(
|
|
133
|
-
|
|
133
|
+
d,
|
|
134
134
|
{
|
|
135
135
|
iconName: "IconAlertCircleFilled",
|
|
136
136
|
size: 20,
|
|
@@ -138,7 +138,7 @@ function V({
|
|
|
138
138
|
}
|
|
139
139
|
),
|
|
140
140
|
!a && i && !t && e.value && l !== "password" && /* @__PURE__ */ s.jsx(
|
|
141
|
-
|
|
141
|
+
d,
|
|
142
142
|
{
|
|
143
143
|
iconName: "IconCircleCheckFilled",
|
|
144
144
|
size: 20,
|
|
@@ -162,7 +162,7 @@ function V({
|
|
|
162
162
|
"text-muted-foreground": !t && !i,
|
|
163
163
|
"text-destructive": t && i,
|
|
164
164
|
"text-success-main": i && !t && e.value !== void 0,
|
|
165
|
-
"text-
|
|
165
|
+
"text-muted-foreground opacity-50": e.disabled
|
|
166
166
|
}),
|
|
167
167
|
children: u
|
|
168
168
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./jsx-runtime-BuHQgaKs.cjs"),h=require("./label-U5GnYvFO.cjs"),d=require("./index-DoxiiusW.cjs"),y=require("./index-C8P6Mn4U.cjs"),N=require("react"),c=require("./icon-component-D5YssRbR.cjs");function R(l){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const a in l)if(a!=="default"){const t=Object.getOwnPropertyDescriptor(l,a);Object.defineProperty(o,a,t.get?t:{enumerable:!0,get:()=>l[a]})}}return o.default=l,Object.freeze(o)}const E=R(N),I=y.cva("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 border bg-transparent transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-semibold disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"text-label-md h-8 rounded-sm px-2 py-1",md:"text-label-lg h-12 rounded-md px-3 py-1",lg:"text-label-xl h-16 rounded-lg px-4 py-2"},rounded:{default:"",full:"rounded-full"},state:{default:"",error:"border-destructive ring-destructive/20 dark:ring-destructive/40",success:"border-success ring-success/20 dark:ring-success/40"}},defaultVariants:{size:"md",rounded:"default",state:"default"}});function z({className:l,label:o,helperText:a,error:t,touched:i,iconName:b,iconPosition:u="left",type:r="text",size:p,rounded:g,state:k,containerClassName:j,...e}){const[x,v]=E.useState(!1),n=b?(f=>typeof f=="string"?{name:f}:f)(b):void 0,m=t&&i?"error":i&&!t&&e.value?"success":"default",w=()=>{v(!x)};return s.jsxRuntimeExports.jsxs("div",{className:d.cn("flex flex-col gap-2",j),children:[o&&s.jsxRuntimeExports.jsx(h.Label,{htmlFor:e.id,className:d.cn("mb-1",{"opacity-50":e.disabled}),children:o}),s.jsxRuntimeExports.jsxs("div",{className:"relative w-full",children:[n&&u==="left"&&s.jsxRuntimeExports.jsx("span",{className:d.cn("absolute top-1/2 left-3 -translate-y-1/2",{"text-muted-foreground":m==="default","text-destructive":m==="error","text-success-main":m==="success","text-muted-foreground opacity-50":e.disabled}),children:s.jsxRuntimeExports.jsx(c.IconComponent,{iconName:n.name,stroke:n.stroke,size:20})}),s.jsxRuntimeExports.jsx("input",{type:r==="password"?x?"text":"password":r,"data-slot":"input","aria-describedby":e.id&&a?`${e.id}-helper-text`:void 0,"aria-invalid":!!(t&&i),"aria-errormessage":e.id&&t?`${e.id}-error-text`:void 0,className:d.cn(I({size:p,rounded:g,state:m,className:d.cn("focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",n&&u==="left"?"pl-10":"",n&&u==="right"||r==="password"?"pr-10":"",r==="color"?"h-[50px] p-0":"",l)})),...e}),r==="password"&&s.jsxRuntimeExports.jsx("button",{type:"button",tabIndex:-1,"aria-label":x?"Hide password":"Show password",className:"absolute top-1/2 right-3 -translate-y-1/2 rounded-md p-1 hover:bg-neutral-100/50 focus-visible:ring-[1.5px] focus-visible:ring-offset-1 focus-visible:outline-none",onClick:w,children:s.jsxRuntimeExports.jsx(c.IconComponent,{iconName:x?"IconEyeOff":"IconEye",size:20})}),n&&u==="right"&&r!=="password"&&s.jsxRuntimeExports.jsx("span",{className:"absolute top-1/2 right-3 -translate-y-1/2",children:s.jsxRuntimeExports.jsx(c.IconComponent,{iconName:n.name,stroke:n.stroke,size:20})}),!n&&t&&i&&r!=="password"&&s.jsxRuntimeExports.jsx(c.IconComponent,{iconName:"IconAlertCircleFilled",size:20,className:"text-destructive absolute top-1/2 right-3 -translate-y-1/2"}),!n&&i&&!t&&e.value&&r!=="password"&&s.jsxRuntimeExports.jsx(c.IconComponent,{iconName:"IconCircleCheckFilled",size:20,className:"text-success-main absolute top-1/2 right-3 -translate-y-1/2"})]}),t&&i?s.jsxRuntimeExports.jsx("span",{id:e.id&&`${e.id}-error-text`,"aria-invalid":!0,className:"text-destructive text-label-md",children:t}):a?s.jsxRuntimeExports.jsx("span",{id:e.id&&`${e.id}-helper-text`,className:d.cn("text-label-md",{"text-muted-foreground":!t&&!i,"text-destructive":t&&i,"text-success-main":i&&!t&&e.value!==void 0,"text-muted-foreground opacity-50":e.disabled}),children:a}):null]})}exports.Input=z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./jsx-runtime-BuHQgaKs.cjs"),a=require("./index-DoxiiusW.cjs"),l=require("@radix-ui/react-tooltip");function d(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const r=d(l);function s({delayDuration:t=0,...e}){return o.jsxRuntimeExports.jsx(r.Provider,{"data-slot":"tooltip-provider",delayDuration:t,...e})}function
|
|
1
|
+
"use strict";const o=require("./jsx-runtime-BuHQgaKs.cjs"),a=require("./index-DoxiiusW.cjs"),l=require("@radix-ui/react-tooltip");function d(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const r=d(l);function s({delayDuration:t=0,...e}){return o.jsxRuntimeExports.jsx(r.Provider,{"data-slot":"tooltip-provider",delayDuration:t,...e})}function p({...t}){return o.jsxRuntimeExports.jsx(s,{children:o.jsxRuntimeExports.jsx(r.Root,{"data-slot":"tooltip",...t})})}function u({...t}){return o.jsxRuntimeExports.jsx(r.Trigger,{"data-slot":"tooltip-trigger",...t})}function c({className:t,sideOffset:e=0,children:i,...n}){return o.jsxRuntimeExports.jsx(r.Portal,{children:o.jsxRuntimeExports.jsxs(r.Content,{"data-slot":"tooltip-content",sideOffset:e,className:a.cn("text-neutral-1000 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 text-paragraph-sm z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-lg bg-white px-3 py-1.5 text-balance shadow-sm",t),...n,children:[i,o.jsxRuntimeExports.jsx(r.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-white fill-white"})]})})}exports.Tooltip=p;exports.TooltipContent=c;exports.TooltipProvider=s;exports.TooltipTrigger=u;
|
|
@@ -3,53 +3,53 @@ import { c as s } from "./index-CRiPKpXj.js";
|
|
|
3
3
|
import * as i from "@radix-ui/react-tooltip";
|
|
4
4
|
function n({
|
|
5
5
|
delayDuration: t = 0,
|
|
6
|
-
...
|
|
6
|
+
...a
|
|
7
7
|
}) {
|
|
8
8
|
return /* @__PURE__ */ o.jsx(
|
|
9
9
|
i.Provider,
|
|
10
10
|
{
|
|
11
11
|
"data-slot": "tooltip-provider",
|
|
12
12
|
delayDuration: t,
|
|
13
|
-
...
|
|
13
|
+
...a
|
|
14
14
|
}
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function p({
|
|
18
18
|
...t
|
|
19
19
|
}) {
|
|
20
20
|
return /* @__PURE__ */ o.jsx(n, { children: /* @__PURE__ */ o.jsx(i.Root, { "data-slot": "tooltip", ...t }) });
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function m({
|
|
23
23
|
...t
|
|
24
24
|
}) {
|
|
25
25
|
return /* @__PURE__ */ o.jsx(i.Trigger, { "data-slot": "tooltip-trigger", ...t });
|
|
26
26
|
}
|
|
27
27
|
function c({
|
|
28
28
|
className: t,
|
|
29
|
-
sideOffset:
|
|
30
|
-
children:
|
|
29
|
+
sideOffset: a = 0,
|
|
30
|
+
children: e,
|
|
31
31
|
...r
|
|
32
32
|
}) {
|
|
33
33
|
return /* @__PURE__ */ o.jsx(i.Portal, { children: /* @__PURE__ */ o.jsxs(
|
|
34
34
|
i.Content,
|
|
35
35
|
{
|
|
36
36
|
"data-slot": "tooltip-content",
|
|
37
|
-
sideOffset:
|
|
37
|
+
sideOffset: a,
|
|
38
38
|
className: s(
|
|
39
|
-
"text-neutral-1000 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-lg bg-white px-3 py-1.5 text-
|
|
39
|
+
"text-neutral-1000 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 text-paragraph-sm z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-lg bg-white px-3 py-1.5 text-balance shadow-sm",
|
|
40
40
|
t
|
|
41
41
|
),
|
|
42
42
|
...r,
|
|
43
43
|
children: [
|
|
44
|
-
|
|
44
|
+
e,
|
|
45
45
|
/* @__PURE__ */ o.jsx(i.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-white fill-white" })
|
|
46
46
|
]
|
|
47
47
|
}
|
|
48
48
|
) });
|
|
49
49
|
}
|
|
50
50
|
export {
|
|
51
|
-
|
|
51
|
+
p as T,
|
|
52
52
|
c as a,
|
|
53
53
|
n as b,
|
|
54
|
-
|
|
54
|
+
m as c
|
|
55
55
|
};
|
package/dist/ui.css
CHANGED
|
@@ -679,10 +679,10 @@ input[type='color']::-webkit-color-swatch {
|
|
|
679
679
|
}
|
|
680
680
|
|
|
681
681
|
*::-webkit-scrollbar-thumb {
|
|
682
|
-
background-color: var(--color-neutral-
|
|
682
|
+
background-color: var(--color-neutral-100);
|
|
683
683
|
border-radius: 14px;
|
|
684
684
|
}
|
|
685
685
|
|
|
686
686
|
::-webkit-scrollbar-thumb:hover {
|
|
687
|
-
background-color: var(--color-neutral-
|
|
687
|
+
background-color: var(--color-neutral-200);
|
|
688
688
|
}
|
package/package.json
CHANGED
package/dist/input-Dm-TUC5P.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("./jsx-runtime-BuHQgaKs.cjs"),h=require("./label-U5GnYvFO.cjs"),d=require("./index-DoxiiusW.cjs"),N=require("./index-C8P6Mn4U.cjs"),R=require("react"),c=require("./icon-component-D5YssRbR.cjs");function E(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const a in r)if(a!=="default"){const t=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(o,a,t.get?t:{enumerable:!0,get:()=>r[a]})}}return o.default=r,Object.freeze(o)}const I=E(R),y=N.cva("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 border bg-transparent transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-semibold disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"text-label-md h-8 rounded-sm px-2 py-1",md:"text-label-lg h-12 rounded-md px-3 py-1",lg:"text-label-xl h-16 rounded-lg px-4 py-2"},rounded:{default:"",full:"rounded-full"},state:{default:"",error:"border-destructive ring-destructive/20 dark:ring-destructive/40",success:"border-success ring-success/20 dark:ring-success/40"}},defaultVariants:{size:"md",rounded:"default",state:"default"}});function z({className:r,label:o,helperText:a,error:t,touched:i,iconName:b,iconPosition:u="left",type:l="text",size:g,rounded:p,state:k,containerClassName:j,...e}){const[x,v]=I.useState(!1),n=b?(f=>typeof f=="string"?{name:f}:f)(b):void 0,m=t&&i?"error":i&&!t&&e.value?"success":"default",w=()=>{v(!x)};return s.jsxRuntimeExports.jsxs("div",{className:d.cn("flex flex-col gap-2",j),children:[o&&s.jsxRuntimeExports.jsx(h.Label,{htmlFor:e.id,className:d.cn({"text-neutral-700":e.disabled}),children:o}),s.jsxRuntimeExports.jsxs("div",{className:"relative w-full",children:[n&&u==="left"&&s.jsxRuntimeExports.jsx("span",{className:d.cn("absolute top-1/2 left-3 -translate-y-1/2",{"text-muted-foreground":m==="default","text-destructive":m==="error","text-success-main":m==="success","text-neutral-700":e.disabled}),children:s.jsxRuntimeExports.jsx(c.IconComponent,{iconName:n.name,stroke:n.stroke,size:20})}),s.jsxRuntimeExports.jsx("input",{type:l==="password"?x?"text":"password":l,"data-slot":"input","aria-describedby":e.id&&a?`${e.id}-helper-text`:void 0,"aria-invalid":!!(t&&i),"aria-errormessage":e.id&&t?`${e.id}-error-text`:void 0,className:d.cn(y({size:g,rounded:p,state:m,className:d.cn("focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",n&&u==="left"?"pl-10":"",n&&u==="right"||l==="password"?"pr-10":"",l==="color"?"h-[50px] p-0":"",r)})),...e}),l==="password"&&s.jsxRuntimeExports.jsx("button",{type:"button",tabIndex:-1,"aria-label":x?"Hide password":"Show password",className:"absolute top-1/2 right-3 -translate-y-1/2 rounded-md p-1 hover:bg-neutral-100/50 focus-visible:ring-[1.5px] focus-visible:ring-offset-1 focus-visible:outline-none",onClick:w,children:s.jsxRuntimeExports.jsx(c.IconComponent,{iconName:x?"IconEyeOff":"IconEye",size:20})}),n&&u==="right"&&l!=="password"&&s.jsxRuntimeExports.jsx("span",{className:"absolute top-1/2 right-3 -translate-y-1/2",children:s.jsxRuntimeExports.jsx(c.IconComponent,{iconName:n.name,stroke:n.stroke,size:20})}),!n&&t&&i&&l!=="password"&&s.jsxRuntimeExports.jsx(c.IconComponent,{iconName:"IconAlertCircleFilled",size:20,className:"text-destructive absolute top-1/2 right-3 -translate-y-1/2"}),!n&&i&&!t&&e.value&&l!=="password"&&s.jsxRuntimeExports.jsx(c.IconComponent,{iconName:"IconCircleCheckFilled",size:20,className:"text-success-main absolute top-1/2 right-3 -translate-y-1/2"})]}),t&&i?s.jsxRuntimeExports.jsx("span",{id:e.id&&`${e.id}-error-text`,"aria-invalid":!0,className:"text-destructive text-label-md",children:t}):a?s.jsxRuntimeExports.jsx("span",{id:e.id&&`${e.id}-helper-text`,className:d.cn("text-label-md",{"text-muted-foreground":!t&&!i,"text-destructive":t&&i,"text-success-main":i&&!t&&e.value!==void 0,"text-neutral-700":e.disabled}),children:a}):null]})}exports.Input=z;
|