tailwind-ux-kit 1.0.38 → 1.0.39

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.
@@ -80,7 +80,7 @@ const le = J((e, n) => {
80
80
  ref: n,
81
81
  placeholder: v ? " " : w.placeholder,
82
82
  onChange: P,
83
- className: `border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
83
+ className: `border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-900 placeholder-gray-600 border-gray-400
84
84
  ${Z}
85
85
  ${v && l && A[l]}
86
86
  ${U} ${G} ${H} ${a}`
@@ -1,4 +1,4 @@
1
- (function(x,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],o):(x=typeof globalThis<"u"?globalThis:x||self,o(x.TailwindUiKit={},x.jsxRuntime,x.React))})(this,function(x,o,s){"use strict";"use client";const q=s.forwardRef((e,n)=>{const{label:t,id:r,inputSize:l="md",shape:b="rounded",validate:p,onValidatedChange:g,className:i="",icon:f,iconPosition:a="left",floatingLabelStyle:c,onChange:d,isValid:u,isInvalid:h,feedback:y,feedbackType:m="invalid",...v}=e,[L,O]=s.useState("default"),$=w=>{const S=w.target.value,N=(p==null?void 0:p(S))??"default";O(N),g==null||g(w,N),d==null||d(w)},E={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},k={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},I={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},B={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},F=(w,S,N)=>{if(N)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(S)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(w){case"error":return"border-red-500 bg-red-50 focus:ring-red-500";case"warning":return"border-yellow-500 bg-yellow-50 focus:ring-yellow-500";case"success":return"border-green-500 bg-green-50 focus:ring-green-500";default:return"border-gray-300 focus:ring-blue-500"}},Z=E[l]||E.md,G=k[b]||k.flat,H=F(L,u,h),U=a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5",W=f&&(a==="start"||a==="left")?"ps-10":f?"pe-10":"",j=r??`input-${(t==null?void 0:t.toLowerCase().replace(/\s+/g,"-"))||Math.random().toString(36).slice(2)}`,C=!!c;return o.jsxs("div",{className:`w-full relative ${C?"z-0":""}`,children:[!C&&t&&o.jsx("label",{htmlFor:j,className:`block mb-1 font-light text-sm ${u?"text-green-700 dark:text-green-500":h?"text-red-700 dark:text-red-500":"text-gray-700"}`,children:t}),o.jsxs("div",{className:"relative w-full",children:[f&&o.jsx("div",{className:`absolute inset-y-0 flex items-center ${U}`,children:o.jsx("span",{className:"text-gray-500",children:f})}),o.jsx("input",{...v,id:j,ref:n,placeholder:C?" ":v.placeholder,onChange:$,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
1
+ (function(x,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],o):(x=typeof globalThis<"u"?globalThis:x||self,o(x.TailwindUiKit={},x.jsxRuntime,x.React))})(this,function(x,o,s){"use strict";"use client";const q=s.forwardRef((e,n)=>{const{label:t,id:r,inputSize:l="md",shape:b="rounded",validate:p,onValidatedChange:g,className:i="",icon:f,iconPosition:a="left",floatingLabelStyle:c,onChange:d,isValid:u,isInvalid:h,feedback:y,feedbackType:m="invalid",...v}=e,[L,O]=s.useState("default"),$=w=>{const S=w.target.value,N=(p==null?void 0:p(S))??"default";O(N),g==null||g(w,N),d==null||d(w)},E={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},k={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},I={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},B={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},F=(w,S,N)=>{if(N)return"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:ring-red-500 focus:border-red-500";if(S)return"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:ring-green-500 focus:border-green-500";switch(w){case"error":return"border-red-500 bg-red-50 focus:ring-red-500";case"warning":return"border-yellow-500 bg-yellow-50 focus:ring-yellow-500";case"success":return"border-green-500 bg-green-50 focus:ring-green-500";default:return"border-gray-300 focus:ring-blue-500"}},Z=E[l]||E.md,G=k[b]||k.flat,H=F(L,u,h),U=a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5",W=f&&(a==="start"||a==="left")?"ps-10":f?"pe-10":"",j=r??`input-${(t==null?void 0:t.toLowerCase().replace(/\s+/g,"-"))||Math.random().toString(36).slice(2)}`,C=!!c;return o.jsxs("div",{className:`w-full relative ${C?"z-0":""}`,children:[!C&&t&&o.jsx("label",{htmlFor:j,className:`block mb-1 font-light text-sm ${u?"text-green-700 dark:text-green-500":h?"text-red-700 dark:text-red-500":"text-gray-700"}`,children:t}),o.jsxs("div",{className:"relative w-full",children:[f&&o.jsx("div",{className:`absolute inset-y-0 flex items-center ${U}`,children:o.jsx("span",{className:"text-gray-500",children:f})}),o.jsx("input",{...v,id:j,ref:n,placeholder:C?" ":v.placeholder,onChange:$,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-900 placeholder-gray-600 border-gray-400
2
2
  ${Z}
3
3
  ${C&&c&&I[c]}
4
4
  ${W} ${G} ${H} ${i}`}),C&&t&&c&&o.jsx("label",{htmlFor:j,className:`ms-1 ${B[c]} ${i}`,children:t})]}),y&&o.jsx("p",{className:`mt-1 text-xs ${m==="invalid"?"text-red-600 dark:text-red-500":"text-green-600 dark:text-green-500"}`,children:y})]})});q.displayName="Input";const K=s.forwardRef((e,n)=>{const{label:t,id:r,inputSize:l="md",shape:b="rounded",validate:p,onValidatedChange:g,className:i="",icon:f,iconPosition:a="left",floatingLabelStyle:c,onChange:d,isValid:u,isInvalid:h,feedback:y,feedbackType:m="invalid",children:v,...L}=e,[O,$]=s.useState("default"),E=S=>{const N=S.target.value,T=(p==null?void 0:p(N))??"default";$(T),g==null||g(S,T),d==null||d(S)},k={xs:"text-xs px-2 py-1",sm:"text-sm px-3 py-1.5",md:"text-sm px-3 py-3",lg:"text-lg px-5 py-3"},I={flat:"rounded-none",rounded:"rounded-sm",pill:"rounded-full"},B={filled:"rounded-t-lg px-2.5 pb-2.5 pt-5 bg-gray-50 border-b-2",outlined:"rounded-lg px-2.5 pb-2.5 pt-4 bg-transparent border",standard:"px-0 py-2.5 bg-transparent border-0 border-b-2"},F={filled:"absolute duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",outlined:"absolute duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-placeholder-shown:scale-100 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 peer-focus:text-blue-600",standard:"absolute duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 peer-focus:text-blue-600"},Z=(S,N,T)=>{if(T)return"border-red-500 bg-red-50 text-red-900 focus:ring-red-500 focus:border-red-500";if(N)return"border-green-500 bg-green-50 text-green-900 focus:ring-green-500 focus:border-green-500";switch(S){case"error":return"border-red-500 bg-red-50 focus:ring-red-500";case"warning":return"border-yellow-500 bg-yellow-50 focus:ring-yellow-500";case"success":return"border-green-500 bg-green-50 focus:ring-green-500";default:return"border-gray-300 focus:ring-blue-500"}},G=k[l]||k.md,H=I[b]||I.flat,U=Z(O,u,h),W=a==="start"||a==="left"?"left-0 ps-3.5":"right-0 pe-3.5",j=f&&(a==="start"||a==="left")?"ps-10":f?"pe-10":"",C=r??`select-${(t==null?void 0:t.toLowerCase().replace(/\s+/g,"-"))||Math.random().toString(36).slice(2)}`,w=!!c;return o.jsxs("div",{className:`w-full relative ${w?"z-0":""}`,children:[!w&&t&&o.jsx("label",{htmlFor:C,className:`block mb-1 font-light text-sm ${u?"text-green-700":h?"text-red-700":"text-gray-700"}`,children:t}),o.jsxs("div",{className:"relative w-full",children:[f&&o.jsx("div",{className:`absolute inset-y-0 flex items-center ${W}`,children:o.jsx("span",{className:"text-gray-500",children:f})}),o.jsx("select",{...L,id:C,ref:n,onChange:E,className:`border peer w-full block font-normal appearance-none focus:outline-none focus:ring-0 transition text-gray-600 placeholder-[#798ba5] border-gray-400
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind-ux-kit",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "main": "lib/tailwind-ux-kit.es.js",
5
5
  "module": "lib/tailwind-ux-kit.umd.js",
6
6
  "types": "lib/tailwind-ux-kit.es.d.ts",