the-omelet-ui 1.8.66 → 1.8.67
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 {a as a$1}from'./chunk-THE2HQGT.js';import {a}from'./chunk-6GLPXMGB.js';import {memo,useId}from'react';import {jsx,jsxs}from'react/jsx-runtime';var b=memo(({label:n,name:p,value:c,checked:e=false,disabled:i=false,onChange:f,className:g="",size:v="md",error:a$2=false,radioClassName:d,required:x,description:m,labelClassName:N,descriptionClassName:h})=>{let l=useId(),r={sm:{radio:"w-4 h-4",dot:"w-1.5 h-1.5",label:"text-sm",description:"text-xs"},md:{radio:"w-5 h-5",dot:"w-2.5 h-2.5",label:"text-base",description:"text-sm"},lg:{radio:"w-6 h-6",dot:"w-3 h-3",label:"text-lg",description:"text-base"}}[v];return jsx("div",{className:`inline-flex flex-col ${g}`,children:jsxs("label",{htmlFor:l,className:a("inline-flex items-center gap-2 cursor-pointer",i&&"opacity-50 cursor-not-allowed"),children:[jsxs("div",{className:"relative flex items-start justify-center shrink-0 mt-0.5",children:[jsx("input",{type:"radio",id:l,name:p,value:c,checked:e,disabled:i,onChange:f,className:"sr-only peer"}),jsx("div",{className:a(r.radio,"rounded-full border-2 transition-all duration-200 flex items-center justify-center",a$2&&"border-red-500",!a$2&&e&&!d&&"border-blue-500 bg-blue-500",!a$2&&!e&&"border-gray-300 bg-white",!a$2&&!i&&!e&&"peer-hover:border-blue-400",i&&"bg-gray-100","peer-focus-visible:ring-2 peer-focus-visible:ring-blue-500 peer-focus-visible:ring-offset-2",e&&d),children:e&&jsx("div",{className:a(r.dot,"rounded-full bg-white transition-all duration-200")})})]}),jsxs("div",{className:"flex flex-col",children:[n&&jsx(a$1,{label:n,required:x,id:l,labelClassName:a(r.label,N)}),m&&jsx("p",{className:a(r.description,
|
|
1
|
+
import {a as a$1}from'./chunk-THE2HQGT.js';import {a}from'./chunk-6GLPXMGB.js';import {memo,useId}from'react';import {jsx,jsxs}from'react/jsx-runtime';var b=memo(({label:n,name:p,value:c,checked:e=false,disabled:i=false,onChange:f,className:g="",size:v="md",error:a$2=false,radioClassName:d,required:x,description:m,labelClassName:N,descriptionClassName:h})=>{let l=useId(),r={sm:{radio:"w-4 h-4",dot:"w-1.5 h-1.5",label:"text-sm",description:"text-xs"},md:{radio:"w-5 h-5",dot:"w-2.5 h-2.5",label:"text-base",description:"text-sm"},lg:{radio:"w-6 h-6",dot:"w-3 h-3",label:"text-lg",description:"text-base"}}[v];return jsx("div",{className:`inline-flex flex-col ${g}`,children:jsxs("label",{htmlFor:l,className:a("inline-flex items-center gap-2 cursor-pointer",i&&"opacity-50 cursor-not-allowed"),children:[jsxs("div",{className:"relative flex items-start justify-center shrink-0 mt-0.5",children:[jsx("input",{type:"radio",id:l,name:p,value:c,checked:e,disabled:i,onChange:f,className:"sr-only peer"}),jsx("div",{className:a(r.radio,"rounded-full border-2 transition-all duration-200 flex items-center justify-center",a$2&&"border-red-500",!a$2&&e&&!d&&"border-blue-500 bg-blue-500",!a$2&&!e&&"border-gray-300 bg-white",!a$2&&!i&&!e&&"peer-hover:border-blue-400",i&&"bg-gray-100","peer-focus-visible:ring-2 peer-focus-visible:ring-blue-500 peer-focus-visible:ring-offset-2",e&&d),children:e&&jsx("div",{className:a(r.dot,"rounded-full bg-white transition-all duration-200")})})]}),jsxs("div",{className:"flex flex-col",children:[n&&jsx(a$1,{label:n,required:x,id:l,labelClassName:a(r.label,N)}),m&&jsx("p",{className:a(r.description,"text-gray-500",h),children:m})]})]})})});b.displayName="RadioButton";var I=b;export{I as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as default}from'../chunk-
|
|
1
|
+
export{a as default}from'../chunk-IZYJOUVH.js';import'../chunk-THE2HQGT.js';import'../chunk-6GLPXMGB.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'../chunk-
|
|
1
|
+
import {a as a$1}from'../chunk-IZYJOUVH.js';import {a as a$2}from'../chunk-QRYSV225.js';import {a}from'../chunk-THE2HQGT.js';import'../chunk-6GLPXMGB.js';import {memo,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';function p(...r){return r.filter(Boolean).join(" ")}var u=memo(({name:r,options:m,value:f,onChange:o,size:c="md",direction:g="vertical",error:i,label:l,required:t=false,className:v="",disabled:b=false,radioClassName:R})=>{let x=useCallback(e=>{o&&o(e.target.value);},[o]);return jsxs("div",{className:p("flex flex-col gap-2",v),children:[l&&jsx(a,{label:l,required:t}),jsx("div",{className:p("flex gap-4",g==="vertical"?"flex-col":"flex-row flex-wrap"),role:"radiogroup","aria-label":l,"aria-required":t,children:m.map(e=>jsx(a$1,{name:r,label:e.label,value:e.value,description:e.description,checked:f===e.value,disabled:b||e.disabled,onChange:x,size:c,radioClassName:R,error:!!i},e.value))}),i&&jsx(a$2,{message:i})]})});u.displayName="RadioGroup";var C=u;export{C as default};
|