UNPKG

alterui

Version:

Hi there! I'm Lakshya Rohilla, a BCA student and this is my side project. I would love if you use it and give me feedback on what I should improve in this project.

2 lines 22.3 kB
/*! For license information please see index.js.LICENSE.txt */ !function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("react"));else if("function"==typeof define&&define.amd)define(["react"],r);else{var t="object"==typeof exports?r(require("react")):r(e.react);for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(this,(e=>(()=>{var r={21:(e,r,t)=>{"use strict";t.d(r,{default:()=>n}),t(155);var o=t(848);const n=function(e){var r=e.orientation,t=void 0===r?"horizontal":r,n=e.color,i=void 0===n?"gray-300":n,a=e.dashed,l=void 0!==a&&a,c=e.className,s=void 0===c?"":c,d="horizontal"===t?"w-full h-px ".concat(l?"border-dashed":"border-solid"):"h-full w-px ".concat(l?"border-dashed":"border-solid");return(0,o.jsx)("div",{className:"".concat(d," border-").concat(i," ").concat(s)})}},31:(e,r,t)=>{"use strict";t.d(r,{default:()=>n}),t(155);var o=t(848);const n=function(e){var r=e.children,t=e.variant,n=void 0===t?"gray":t,i=e.size,a=void 0===i?"md":i,l=e.rounded,c=void 0===l?"md":l,s=e.className,d=["inline-flex font-medium",{success:"bg-green-500 text-white",warning:"bg-yellow-500 text-white",danger:"bg-red-500 text-white",info:"bg-blue-500 text-white",gray:"bg-gray-500 text-white"}[n],{sm:"px-2 py-0.5 text-xs",md:"px-3 py-1 text-sm",lg:"px-4 py-1.5 text-base"}[a],{none:"rounded-none",md:"rounded-md",full:"rounded-full"}[c],void 0===s?"":s].filter(Boolean).join(" ");return(0,o.jsx)("span",{className:d,children:r})}},48:(e,r,t)=>{"use strict";t.d(r,{default:()=>n}),t(155);var o=t(848);const n=function(e){var r=e.isOn,t=e.onToggle,n=e.disabled,i=void 0!==n&&n,a=e.className,l=void 0===a?"":a;return(0,o.jsx)("button",{onClick:t,disabled:i,className:"relative w-12 h-6 rounded-full transition duration-300 ease-in-out \n ".concat(r?"bg-blue-500":"bg-gray-400"," \n ").concat(i?"opacity-50 cursor-not-allowed":""," \n ").concat(l),children:(0,o.jsx)("div",{className:"absolute top-1 left-1 bg-white w-4 h-4 rounded-full shadow-md transition-transform duration-300 ease-in-out\n ".concat(r?"transform translate-x-6":"")})})}},155:r=>{"use strict";r.exports=e},204:(e,r,t)=>{"use strict";t.d(r,{default:()=>a});var o=t(155),n=t(848);function i(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=Array(r);t<r;t++)o[t]=e[t];return o}const a=function(e){var r,t,a=e.children,l=e.variant,c=void 0===l?"info":l,s=e.dismissible,d=void 0!==s&&s,u=e.className,f=void 0===u?"":u,b=(r=(0,o.useState)(!0),t=2,function(e){if(Array.isArray(e))return e}(r)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,n,i,a,l=[],c=!0,s=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;c=!1}else for(;!(c=(o=i.call(t)).done)&&(l.push(o.value),l.length!==r);c=!0);}catch(e){s=!0,n=e}finally{try{if(!c&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(s)throw n}}return l}}(r,t)||function(e,r){if(e){if("string"==typeof e)return i(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?i(e,r):void 0}}(r,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),g=b[0],p=b[1];return g?(0,n.jsxs)("div",{className:"flex items-center p-4 border-l-4 rounded-md ".concat({success:"bg-green-100 border-green-500 text-green-700",warning:"bg-yellow-100 border-yellow-500 text-yellow-700",danger:"bg-red-100 border-red-500 text-red-700",info:"bg-blue-100 border-blue-500 text-blue-700"}[c]," ").concat(f),children:[(0,n.jsx)("span",{className:"mr-3",children:{success:"✔️",warning:"⚠️",danger:"❌",info:"ℹ️"}[c]}),(0,n.jsx)("div",{className:"flex-1",children:a}),d&&(0,n.jsx)("button",{onClick:function(){return p(!1)},className:"ml-4 text-lg font-bold focus:outline-none",children:"✖"})]}):null}},306:(e,r,t)=>{"use strict";t.d(r,{default:()=>n}),t(155);var o=t(848);const n=function(e){var r=e.columns,t=void 0===r?[]:r,n=e.data,i=void 0===n?[]:n,a=e.variant,l=void 0===a?"default":a,c=e.onRowClick,s=e.className,d=void 0===s?"":s;return(0,o.jsx)("div",{className:"overflow-x-auto",children:(0,o.jsxs)("table",{className:"min-w-full bg-white rounded-lg ".concat({default:"border border-gray-200",striped:"border border-gray-200 odd:bg-gray-50",bordered:"border border-gray-300 divide-y divide-gray-300",hover:"border border-gray-200 hover:bg-gray-100"}[l]," ").concat(d),children:[(0,o.jsx)("thead",{className:"bg-gray-100",children:(0,o.jsx)("tr",{children:t.map((function(e,r){return(0,o.jsx)("th",{className:"py-2 px-4 text-left font-semibold text-gray-700",children:e.header},r)}))})}),(0,o.jsx)("tbody",{children:i.map((function(e,r){return(0,o.jsx)("tr",{className:"border-b hover:bg-gray-50 transition",onClick:function(){return c&&c(e)},children:t.map((function(r,t){return(0,o.jsx)("td",{className:"py-2 px-4 text-gray-700",children:e[r.key]},t)}))},r)}))})]})})}},336:(e,r,t)=>{"use strict";t.d(r,{default:()=>s}),t(155);var o=t(848);function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var i=["children","variant","size","disabled","gradient","rounded","onClick","className"];function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function l(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?a(Object(t),!0).forEach((function(r){c(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e,r,t){return(r=function(e){var r=function(e){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!=n(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(r)?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const s=function(e){var r=e.children,t=e.variant,n=void 0===t?"primary":t,a=e.size,c=void 0===a?"md":a,s=e.disabled,d=void 0!==s&&s,u=e.gradient,f=void 0!==u&&u,b=e.rounded,g=void 0===b||b,p=e.onClick,y=e.className,m=void 0===y?"":y,v=function(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==r.indexOf(o))continue;t[o]=e[o]}return t}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],-1===r.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}(e,i),h=["font-medium transition-all focus:outline-none",f?{primary:"bg-gradient-to-r from-blue-500 via-blue-600 to-blue-700 hover:bg-gradient-to-br focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800",secondary:"bg-gradient-to-r from-gray-400 via-gray-500 to-gray-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-gray-300 dark:focus:ring-gray-800",success:"bg-gradient-to-r from-green-400 via-green-500 to-green-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-green-300 dark:focus:ring-green-800",danger:"bg-gradient-to-r from-red-400 via-red-500 to-red-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-red-300 dark:focus:ring-red-800",cyan:"bg-gradient-to-r from-cyan-400 via-cyan-500 to-cyan-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-cyan-300 dark:focus:ring-cyan-800",teal:"bg-gradient-to-r from-teal-400 via-teal-500 to-teal-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-teal-300 dark:focus:ring-teal-800",lime:"bg-gradient-to-r from-lime-300 via-lime-400 to-lime-500 hover:bg-gradient-to-br focus:ring-4 focus:ring-lime-300 dark:focus:ring-lime-800 text-gray-900",pink:"bg-gradient-to-r from-pink-400 via-pink-500 to-pink-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-pink-300 dark:focus:ring-pink-800",purple:"bg-gradient-to-r from-purple-500 via-purple-600 to-purple-700 hover:bg-gradient-to-br focus:ring-4 focus:ring-purple-300 dark:focus:ring-purple-800"}[n]:{primary:"bg-blue-700 hover:bg-blue-800 text-white",secondary:"bg-gray-600 hover:bg-gray-700 text-white",success:"bg-green-700 hover:bg-green-800 text-white",danger:"bg-red-700 hover:bg-red-800 text-white",cyan:"bg-cyan-600 hover:bg-cyan-700 text-white",teal:"bg-teal-600 hover:bg-teal-700 text-white",lime:"bg-lime-500 hover:bg-lime-600 text-gray-900",pink:"bg-pink-700 hover:bg-pink-800 text-white",purple:"bg-purple-700 hover:bg-purple-800 text-white"}[n],{sm:"py-1.5 px-3 text-sm",md:"py-2.5 px-5 text-base",lg:"py-3.5 px-7 text-lg"}[c],d?"opacity-50 cursor-not-allowed":"cursor-pointer",!0===g?"rounded-lg":g?"rounded-".concat(g):"",m].filter(Boolean).join(" ");return(0,o.jsx)("button",l(l({className:h,disabled:d,onClick:d?void 0:p},v),{},{children:r}))}},453:(e,r,t)=>{"use strict";t.d(r,{default:()=>n}),t(155);var o=t(848);const n=function(e){var r=e.size,t=void 0===r?"md":r,n=e.color,i=void 0===n?"primary":n,a=e.speed,l=void 0===a?"animate-spin":a,c=e.className,s=["inline-block rounded-full border-solid",{sm:"w-4 h-4 border-2",md:"w-6 h-6 border-4",lg:"w-10 h-10 border-4"}[t],{primary:"border-blue-500 border-t-transparent",secondary:"border-gray-500 border-t-transparent",success:"border-green-500 border-t-transparent",danger:"border-red-500 border-t-transparent",warning:"border-yellow-500 border-t-transparent"}[i],l,void 0===c?"":c].filter(Boolean).join(" ");return(0,o.jsx)("div",{className:s,role:"status","aria-label":"Loading..."})}},503:(e,r,t)=>{"use strict";t.r(r)},586:(e,r,t)=>{"use strict";t.d(r,{default:()=>c}),t(155);var o=t(848);function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var i=["placeholder","rows","size","variant","fullWidth","disabled","readOnly","className"];function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function l(e,r,t){return(r=function(e){var r=function(e){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!=n(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(r)?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const c=function(e){var r=e.placeholder,t=void 0===r?"Enter text...":r,n=e.rows,c=void 0===n?3:n,s=e.size,d=void 0===s?"md":s,u=e.variant,f=void 0===u?"default":u,b=e.fullWidth,g=void 0!==b&&b,p=e.disabled,y=void 0!==p&&p,m=e.readOnly,v=void 0!==m&&m,h=e.className,x=void 0===h?"":h,j=function(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==r.indexOf(o))continue;t[o]=e[o]}return t}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],-1===r.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}(e,i),w=["border rounded-md outline-none focus:ring-2 transition-all",{sm:"text-sm p-2",md:"text-base p-3",lg:"text-lg p-4"}[d],{default:"border-gray-300 focus:ring-blue-500",success:"border-green-500 focus:ring-green-500",error:"border-red-500 focus:ring-red-500",warning:"border-yellow-500 focus:ring-yellow-500"}[f],g?"w-full":"",y?"opacity-50 cursor-not-allowed":v?"opacity-75":"",x].filter(Boolean).join(" ");return(0,o.jsx)("textarea",function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?a(Object(t),!0).forEach((function(r){l(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}({placeholder:t,rows:c,className:w,disabled:y,readOnly:v},j))}},650:(e,r,t)=>{"use strict";t.d(r,{default:()=>s}),t(155);var o=t(848);function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var i=["image","title","description","footer","variant","className"];function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function l(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?a(Object(t),!0).forEach((function(r){c(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e,r,t){return(r=function(e){var r=function(e){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!=n(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(r)?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const s=function(e){var r=e.image,t=e.title,n=e.description,a=e.footer,c=e.variant,s=void 0===c?"default":c,d=e.className,u=void 0===d?"":d,f=function(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==r.indexOf(o))continue;t[o]=e[o]}return t}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],-1===r.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}(e,i);return(0,o.jsxs)("div",l(l({className:"rounded-lg p-4 ".concat({default:"bg-white shadow-md border border-gray-200",outlined:"border border-gray-300 bg-white",elevated:"bg-white shadow-lg",dark:"bg-gray-800 text-white border border-gray-700"}[s]," ").concat(u)},f),{},{children:[r&&(0,o.jsx)("img",{src:r,alt:t,className:"w-full h-40 object-cover rounded-md mb-3"}),t&&(0,o.jsx)("h2",{className:"text-lg font-semibold mb-2",children:t}),n&&(0,o.jsx)("p",{className:"text-gray-600 dark:text-gray-300",children:n}),a&&(0,o.jsx)("div",{className:"mt-3",children:a})]}))}},671:(e,r,t)=>{"use strict";t.d(r,{default:()=>n}),t(155);var o=t(848);const n=function(e){var r=e.label,t=e.checked,n=e.onChange,i=e.disabled,a=void 0!==i&&i,l=e.className,c=void 0===l?"":l;return(0,o.jsxs)("label",{className:"flex items-center space-x-2 cursor-pointer ".concat(c),children:[(0,o.jsx)("input",{type:"checkbox",checked:t,onChange:n,disabled:a,className:"peer hidden"}),(0,o.jsx)("div",{className:"w-5 h-5 border-2 border-gray-400 rounded-sm flex items-center justify-center \n ".concat(t?"bg-blue-500 border-blue-500":""," \n ").concat(a?"opacity-50 cursor-not-allowed":""),children:t&&(0,o.jsx)("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})})}),(0,o.jsx)("span",{className:"text-gray-700 ".concat(a?"line-through":""),children:r})]})}},698:(e,r)=>{"use strict";var t=Symbol.for("react.transitional.element");function o(e,r,o){var n=null;if(void 0!==o&&(n=""+o),void 0!==r.key&&(n=""+r.key),"key"in r)for(var i in o={},r)"key"!==i&&(o[i]=r[i]);else o=r;return r=o.ref,{$$typeof:t,type:e,key:n,ref:void 0!==r?r:null,props:o}}Symbol.for("react.fragment"),r.jsx=o,r.jsxs=o},776:(e,r,t)=>{t(503),e.exports.Button=t(336).default,e.exports.Badge=t(31).default,e.exports.Loader=t(453).default,e.exports.Alert=t(204).default,e.exports.Input=t(958).default,e.exports.Modal=t(793).default,e.exports.Card=t(650).default,e.exports.Table=t(306).default,e.exports.TextArea=t(586).default,e.exports.Footer=t(845).default,e.exports.CheckBox=t(671).default,e.exports.SwitchButton=t(48).default,e.exports.Divider=t(21).default},793:(e,r,t)=>{"use strict";t.d(r,{default:()=>n}),t(155);var o=t(848);const n=function(e){var r=e.isOpen,t=e.onClose,n=e.title,i=void 0===n?"Modal Title":n,a=e.children,l=e.showCloseButton,c=void 0===l||l,s=e.size,d=void 0===s?"md":s,u=e.className,f=void 0===u?"":u;return r?(0,o.jsx)("div",{className:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50",children:(0,o.jsxs)("div",{className:"bg-white rounded-lg shadow-lg p-5 ".concat({sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl"}[d]," w-full ").concat(f),children:[(0,o.jsxs)("div",{className:"flex justify-between items-center border-b pb-3",children:[(0,o.jsx)("h2",{className:"text-lg font-semibold",children:i}),c&&(0,o.jsx)("button",{onClick:t,className:"text-gray-500 hover:text-gray-800",children:"✖"})]}),(0,o.jsx)("div",{className:"py-4",children:a}),(0,o.jsx)("div",{className:"flex justify-end space-x-3 border-t pt-3",children:(0,o.jsx)("button",{onClick:t,className:"px-4 py-2 text-gray-700 bg-gray-200 rounded hover:bg-gray-300",children:"Close"})})]})}):null}},845:(e,r,t)=>{"use strict";t.d(r,{default:()=>n}),t(155);var o=t(848);const n=function(e){var r=e.brandName,t=void 0===r?"AlterUI":r,n=e.links,i=void 0===n?[]:n,a=e.socialMedia,l=void 0===a?[]:a,c=e.darkMode,s=void 0!==c&&c,d=e.className,u=void 0===d?"":d;return(0,o.jsx)("footer",{className:"w-full p-4 ".concat(s?"bg-gray-900 text-white":"bg-gray-100 text-gray-700"," ").concat(u),children:(0,o.jsxs)("div",{className:"max-w-7xl mx-auto flex flex-col md:flex-row justify-between items-center",children:[(0,o.jsxs)("div",{className:"text-lg font-semibold",children:[t," © ",(new Date).getFullYear()]}),i.length>0&&(0,o.jsx)("div",{className:"flex space-x-4 mt-3 md:mt-0",children:i.map((function(e,r){return(0,o.jsx)("a",{href:e.href,className:"hover:text-blue-500 transition",children:e.label},r)}))}),l.length>0&&(0,o.jsx)("div",{className:"flex space-x-3 mt-3 md:mt-0",children:l.map((function(e,r){return(0,o.jsx)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"hover:text-blue-500 transition",children:e.icon},r)}))})]})})}},848:(e,r,t)=>{"use strict";e.exports=t(698)},958:(e,r,t)=>{"use strict";t.d(r,{default:()=>s}),t(155);var o=t(848);function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var i=["type","placeholder","size","variant","fullWidth","disabled","readOnly","leftIcon","rightIcon","className"];function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function l(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?a(Object(t),!0).forEach((function(r){c(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e,r,t){return(r=function(e){var r=function(e){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!=n(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(r)?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const s=function(e){var r=e.type,t=void 0===r?"text":r,n=e.placeholder,a=void 0===n?"":n,c=e.size,s=void 0===c?"md":c,d=e.variant,u=void 0===d?"default":d,f=e.fullWidth,b=void 0!==f&&f,g=e.disabled,p=void 0!==g&&g,y=e.readOnly,m=void 0!==y&&y,v=e.leftIcon,h=e.rightIcon,x=e.className,j=void 0===x?"":x,w=function(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==r.indexOf(o))continue;t[o]=e[o]}return t}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],-1===r.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}(e,i),O=["border rounded-md outline-none focus:ring-2 transition-all",{sm:"py-1 px-2 text-sm",md:"py-2 px-3 text-base",lg:"py-3 px-4 text-lg"}[s],{default:"border-gray-300 focus:ring-blue-500",success:"border-green-500 focus:ring-green-500",error:"border-red-500 focus:ring-red-500",warning:"border-yellow-500 focus:ring-yellow-500"}[u],b?"w-full":"",p?"opacity-50 cursor-not-allowed":m?"opacity-75":"","flex items-center",j].filter(Boolean).join(" ");return(0,o.jsxs)("div",{className:"relative flex items-center",children:[v&&(0,o.jsx)("span",{className:"absolute left-3",children:v}),(0,o.jsx)("input",l({type:t,placeholder:a,className:"".concat(O," ").concat(v?"pl-8":""," ").concat(h?"pr-8":""),disabled:p,readOnly:m},w)),h&&(0,o.jsx)("span",{className:"absolute right-3",children:h})]})}}},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={exports:{}};return r[e](i,i.exports,o),i.exports}return o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o(776)})()));