primolab-ui-kit 1.1.4
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/README.md +901 -0
- package/dist/index.d.ts +323 -0
- package/dist/primo-ui-kit.js +1633 -0
- package/dist/primo-ui-kit.umd.cjs +88 -0
- package/dist/primolab-ui-kit.css +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
(function(h,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],y):(h=typeof globalThis<"u"?globalThis:h||self,y(h.PrimoUIKit={},h.React))})(this,(function(h,y){"use strict";var J={exports:{}},F={};var Q;function se(){if(Q)return F;Q=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function t(o,s,a){var i=null;if(a!==void 0&&(i=""+a),s.key!==void 0&&(i=""+s.key),"key"in s){a={};for(var d in s)d!=="key"&&(a[d]=s[d])}else a=s;return s=a.ref,{$$typeof:n,type:o,key:i,ref:s!==void 0?s:null,props:a}}return F.Fragment=l,F.jsx=t,F.jsxs=t,F}var U={};var Z;function ae(){return Z||(Z=1,process.env.NODE_ENV!=="production"&&(function(){function n(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===z?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case j:return"Fragment";case _:return"Profiler";case R:return"StrictMode";case I:return"Suspense";case B:return"SuspenseList";case v:return"Activity"}if(typeof r=="object")switch(typeof r.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case $:return"Portal";case L:return r.displayName||"Context";case S:return(r._context.displayName||"Context")+".Consumer";case P:var m=r.render;return r=r.displayName,r||(r=m.displayName||m.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case D:return m=r.displayName||null,m!==null?m:n(r.type)||"Memo";case A:m=r._payload,r=r._init;try{return n(r(m))}catch{}}return null}function l(r){return""+r}function t(r){try{l(r);var m=!1}catch{m=!0}if(m){m=console;var w=m.error,N=typeof Symbol=="function"&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object";return w.call(m,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",N),l(r)}}function o(r){if(r===j)return"<>";if(typeof r=="object"&&r!==null&&r.$$typeof===A)return"<...>";try{var m=n(r);return m?"<"+m+">":"<...>"}catch{return"<...>"}}function s(){var r=O.A;return r===null?null:r.getOwner()}function a(){return Error("react-stack-top-frame")}function i(r){if(M.call(r,"key")){var m=Object.getOwnPropertyDescriptor(r,"key").get;if(m&&m.isReactWarning)return!1}return r.key!==void 0}function d(r,m){function w(){T||(T=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",m))}w.isReactWarning=!0,Object.defineProperty(r,"key",{get:w,configurable:!0})}function c(){var r=n(this.type);return V[r]||(V[r]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),r=this.props.ref,r!==void 0?r:null}function u(r,m,w,N,H,X){var k=w.ref;return r={$$typeof:C,type:r,key:m,props:w,_owner:N},(k!==void 0?k:null)!==null?Object.defineProperty(r,"ref",{enumerable:!1,get:c}):Object.defineProperty(r,"ref",{enumerable:!1,value:null}),r._store={},Object.defineProperty(r._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(r,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:H}),Object.defineProperty(r,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:X}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}function b(r,m,w,N,H,X){var k=m.children;if(k!==void 0)if(N)if(x(k)){for(N=0;N<k.length;N++)p(k[N]);Object.freeze&&Object.freeze(k)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(k);if(M.call(m,"key")){k=n(r);var W=Object.keys(m).filter(function(Ee){return Ee!=="key"});N=0<W.length?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}",te[k+N]||(W=0<W.length?"{"+W.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
|
+
let props = %s;
|
|
3
|
+
<%s {...props} />
|
|
4
|
+
React keys must be passed directly to JSX without using spread:
|
|
5
|
+
let props = %s;
|
|
6
|
+
<%s key={someKey} {...props} />`,N,k,W,k),te[k+N]=!0)}if(k=null,w!==void 0&&(t(w),k=""+w),i(m)&&(t(m.key),k=""+m.key),"key"in m){w={};for(var K in m)K!=="key"&&(w[K]=m[K])}else w=m;return k&&d(w,typeof r=="function"?r.displayName||r.name||"Unknown":r),u(r,k,w,s(),H,X)}function p(r){g(r)?r._store&&(r._store.validated=1):typeof r=="object"&&r!==null&&r.$$typeof===A&&(r._payload.status==="fulfilled"?g(r._payload.value)&&r._payload.value._store&&(r._payload.value._store.validated=1):r._store&&(r._store.validated=1))}function g(r){return typeof r=="object"&&r!==null&&r.$$typeof===C}var f=y,C=Symbol.for("react.transitional.element"),$=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),L=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),z=Symbol.for("react.client.reference"),O=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,x=Array.isArray,E=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(r){return r()}};var T,V={},Y=f.react_stack_bottom_frame.bind(f,a)(),re=E(o(a)),te={};U.Fragment=j,U.jsx=function(r,m,w){var N=1e4>O.recentlyCreatedOwnerStacks++;return b(r,m,w,!1,N?Error("react-stack-top-frame"):Y,N?E(o(r)):re)},U.jsxs=function(r,m,w){var N=1e4>O.recentlyCreatedOwnerStacks++;return b(r,m,w,!0,N?Error("react-stack-top-frame"):Y,N?E(o(r)):re)}})()),U}var q;function ne(){return q||(q=1,process.env.NODE_ENV==="production"?J.exports=se():J.exports=ae()),J.exports}var e=ne();const le=({children:n,variant:l="primary",size:t="md",onClick:o,disabled:s=!1,fullWidth:a=!1,className:i="",...d})=>{const c="rounded-btn transition-all duration-200 font-semibold inline-flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed",u={primary:"bg-primary hover:bg-primary-hover text-white",secondary:"bg-secondary hover:bg-secondary-hover text-white",danger:"bg-danger hover:bg-danger-hover text-white",success:"bg-success hover:brightness-110 text-white",warning:"bg-warning hover:brightness-110 text-white",info:"bg-info hover:brightness-110 text-white",outline:"border-2 border-primary text-primary hover:bg-primary hover:text-white","outline-secondary":"border-2 border-secondary text-secondary hover:bg-secondary hover:text-white","outline-danger":"border-2 border-danger text-danger hover:bg-danger hover:text-white","outline-success":"border-2 border-success text-success hover:bg-success hover:text-white","outline-warning":"border-2 border-warning text-warning hover:bg-warning hover:text-white","outline-info":"border-2 border-info text-info hover:bg-info hover:text-white",ghost:"text-primary hover:bg-primary-light"},b={xs:"px-3 py-1 text-xs",sm:"px-4 py-2 text-sm",md:"px-6 py-2.5 text-base",lg:"px-8 py-3 text-lg"},p=a?"w-full":"",g=`${c} ${u[l]} ${b[t]} ${p} ${i}`;return e.jsx("button",{className:g,onClick:o,disabled:s,...d,children:n})},oe=({isOpen:n,onClose:l,title:t,children:o,size:s="md",showCloseButton:a=!0,closeOnBackdropClick:i=!0,footer:d=null,icon:c=null,subtitle:u=null})=>{if(y.useEffect(()=>{const g=f=>{f.key==="Escape"&&n&&l()};return n&&(document.addEventListener("keydown",g),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",g),document.body.style.overflow="unset"}},[n,l]),!n)return null;const b={sm:"max-w-md",md:"max-w-2xl",lg:"max-w-4xl",xl:"max-w-6xl",full:"max-w-[95vw]"},p=()=>{i&&l()};return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[e.jsx("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:p}),e.jsxs("div",{className:`relative bg-white rounded-modal shadow-card w-full ${b[s]} max-h-[90vh] flex flex-col animate-fadeIn`,onClick:g=>g.stopPropagation(),children:[(t||a)&&e.jsxs("div",{className:"flex items-center justify-between p-6 bg-primary",children:[t&&e.jsx("h2",{className:"text-xl font-semibold text-white",children:t}),a&&e.jsx("button",{onClick:l,className:"ml-auto text-white hover:text-white/80 transition-colors p-1","aria-label":"Close modal",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),c&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-6 px-6",children:[e.jsx("div",{className:"mb-4",children:c}),u&&e.jsx("p",{className:"text-lg font-semibold text-dark",children:u})]}),e.jsx("div",{className:"p-6 overflow-y-auto flex-1",children:o}),d&&e.jsx("div",{className:"p-6 border-t border-grey",children:d})]})]})},ie=({columns:n,data:l,renderRow:t,striped:o=!1,hoverable:s=!0,bordered:a=!1,unwrapped:i=!1,className:d=""})=>e.jsx("div",{className:`overflow-auto max-h-[80vh] ${d}`,children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-grey-lighter sticky top-0 z-20",children:e.jsx("tr",{children:n.map((c,u)=>e.jsx("th",{className:`px-4 py-3 font-semibold text-dark ${c.align==="center"?"text-center":c.align==="right"?"text-right":"text-left"} ${a?"border border-grey":""}`,children:c.header},u))})}),e.jsx("tbody",{children:l.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:n.length,className:"px-4 py-8 text-center text-grey-medium",children:"No data available"})}):i?l.map((c,u)=>t(c,u)):l.map((c,u)=>e.jsx("tr",{className:`
|
|
7
|
+
${a?"border border-grey":"border-b border-grey"}
|
|
8
|
+
${s?"hover:bg-grey-lightest":""}
|
|
9
|
+
${o&&u%2===1?"bg-grey-lightest/50":""}
|
|
10
|
+
transition-colors
|
|
11
|
+
`,children:t(c,u)},c.id||u))})]})}),ce=({type:n="text",label:l,placeholder:t,value:o,onChange:s,error:a,helperText:i,disabled:d=!1,required:c=!1,fullWidth:u=!1,size:b="md",className:p="",...g})=>{const C=`
|
|
12
|
+
w-full rounded-sheet border transition-all duration-200
|
|
13
|
+
focus:outline-none focus:ring-2
|
|
14
|
+
disabled:bg-grey-lighter disabled:cursor-not-allowed
|
|
15
|
+
${a?"border-danger focus:ring-danger/30":"border-grey focus:border-primary focus:ring-primary/30"}
|
|
16
|
+
${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-5 py-3 text-lg"}[b]}
|
|
17
|
+
${p}
|
|
18
|
+
`;return e.jsxs("div",{className:`${u?"w-full":""}`,children:[l&&e.jsxs("label",{className:"block mb-2 font-semibold text-dark text-sm",children:[l,c&&e.jsx("span",{className:"text-danger ml-1",children:"*"})]}),e.jsx("input",{type:n,value:o,onChange:s,placeholder:t,disabled:d,required:c,className:C,...g}),(a||i)&&e.jsx("p",{className:`mt-1 text-sm ${a?"text-danger":"text-grey-medium"}`,children:a||i})]})},de=({label:n,options:l=[],value:t,onChange:o,error:s,helperText:a,disabled:i=!1,required:d=!1,fullWidth:c=!1,placeholder:u="Select an option",size:b="md",className:p="",variant:g="default",getBadgeColor:f,...C})=>{const[$,j]=y.useState(!1),R=y.useRef(null),_={sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-5 py-3 text-lg"};y.useEffect(()=>{const v=z=>{R.current&&!R.current.contains(z.target)&&j(!1)};return $&&document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[$]);const S=v=>{v.disabled||(o({target:{value:v.value}}),j(!1))},L=l.find(v=>v.value===t),P=L?.label||u,I=v=>({success:"bg-success text-white",warning:"bg-warning text-white",danger:"bg-danger text-white",info:"bg-info text-white",primary:"bg-primary text-white"})[v]||"bg-grey-medium text-white",B=f?f(t):null,D=g==="badge",A=`
|
|
19
|
+
w-full rounded-sheet border transition-all duration-200
|
|
20
|
+
focus:outline-none focus:ring-2
|
|
21
|
+
disabled:bg-grey-lighter disabled:cursor-not-allowed
|
|
22
|
+
cursor-pointer
|
|
23
|
+
${D&&B?I(B):"bg-white text-dark"}
|
|
24
|
+
${s?"border-danger focus:ring-danger/30":"border-grey focus:border-primary focus:ring-primary/30"}
|
|
25
|
+
${_[b]}
|
|
26
|
+
${p}
|
|
27
|
+
${i?"opacity-50 cursor-not-allowed":""}
|
|
28
|
+
`;return e.jsxs("div",{className:`${c?"w-full":""} relative`,ref:R,children:[n&&e.jsxs("label",{className:"block mb-2 font-semibold text-dark text-sm",children:[n,d&&e.jsx("span",{className:"text-danger ml-1",children:"*"})]}),e.jsx("div",{className:A,onClick:()=>!i&&j(!$),role:"button",tabIndex:0,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),!i&&j(!$))},children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:`font-semibold ${!L&&"text-grey-medium"}`,children:P}),e.jsx("svg",{className:`w-5 h-5 transition-transform duration-200 ${$?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),$&&!i&&e.jsx("div",{className:"absolute z-[9999] mt-1 w-full bg-white border border-grey rounded-sheet shadow-card max-h-60 overflow-y-auto",children:l.map((v,z)=>{const O=v.value===t,M=f?f(v.value):null;return e.jsx("div",{className:`
|
|
29
|
+
m-1 px-4 py-2 cursor-pointer transition-colors duration-150
|
|
30
|
+
${v.disabled?"opacity-50 cursor-not-allowed":"hover:bg-grey-lighter"}
|
|
31
|
+
${O?"bg-primary/10":""}
|
|
32
|
+
${D&&M?I(M):""}
|
|
33
|
+
`,onClick:()=>S(v),children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsx("span",{className:"font-semibold",children:v.label})})},v.value||z)})}),(s||a)&&e.jsx("p",{className:`mt-1 text-sm ${s?"text-danger":"text-grey-medium"}`,children:s||a})]})},ue=({label:n,options:l=[],value:t,onChange:o,error:s,helperText:a,disabled:i=!1,required:d=!1,fullWidth:c=!1,placeholder:u="Search or select an option",size:b="md",className:p="",searchPlaceholder:g="Type to search...",noResultsText:f="No results found",multiple:C=!1,...$})=>{const[j,R]=y.useState(!1),[_,S]=y.useState(""),L=y.useRef(null),P=y.useRef(null),I={sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-5 py-3 text-lg"};y.useEffect(()=>{const x=E=>{L.current&&!L.current.contains(E.target)&&(R(!1),S(""))};return j&&document.addEventListener("mousedown",x),()=>{document.removeEventListener("mousedown",x)}},[j]),y.useEffect(()=>{j&&P.current&&P.current.focus()},[j]);const B=x=>{if(!x.disabled)if(C){const E=Array.isArray(t)?t:[],V=E.includes(x.value)?E.filter(Y=>Y!==x.value):[...E,x.value];o({target:{value:V}})}else o({target:{value:x.value}}),R(!1),S("")},D=(x,E)=>{if(E.stopPropagation(),C){const V=(Array.isArray(t)?t:[]).filter(Y=>Y!==x);o({target:{value:V}})}},A=l.find(x=>x.value===t),v=C&&Array.isArray(t)?l.filter(x=>t.includes(x.value)):[],z=C?v.length>0?`${v.length} selected`:u:A?.label||u,O=l.filter(x=>x.label.toLowerCase().includes(_.toLowerCase())),M=`
|
|
34
|
+
w-full rounded-sheet border transition-all duration-200
|
|
35
|
+
focus:outline-none focus:ring-2
|
|
36
|
+
disabled:bg-grey-lighter disabled:cursor-not-allowed
|
|
37
|
+
cursor-pointer
|
|
38
|
+
bg-white text-dark
|
|
39
|
+
${s?"border-danger focus:ring-danger/30":"border-grey focus:border-primary focus:ring-primary/30"}
|
|
40
|
+
${I[b]}
|
|
41
|
+
${p}
|
|
42
|
+
${i?"opacity-50 cursor-not-allowed":""}
|
|
43
|
+
`;return e.jsxs("div",{className:`${c?"w-full":""} relative`,ref:L,children:[n&&e.jsxs("label",{className:"block mb-2 font-semibold text-dark text-sm",children:[n,d&&e.jsx("span",{className:"text-danger ml-1",children:"*"})]}),e.jsx("div",{className:M,onClick:()=>!i&&R(!j),role:"button",tabIndex:0,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),!i&&R(!j))},children:e.jsxs("div",{className:"flex justify-between items-center",children:[C&&v.length>0?e.jsx("div",{className:"flex flex-wrap gap-1 flex-1 mr-2",children:v.map(x=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-primary/10 text-primary rounded text-sm font-semibold",children:[x.label,e.jsx("button",{onClick:E=>D(x.value,E),className:"hover:bg-primary/20 rounded-full p-0.5",type:"button",children:e.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},x.value))}):e.jsx("span",{className:`font-semibold ${!A&&!v.length&&"text-grey-medium"}`,children:z}),e.jsx("svg",{className:`w-5 h-5 transition-transform duration-200 flex-shrink-0 ${j?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),j&&!i&&e.jsxs("div",{className:"absolute z-[9999] mt-1 w-full bg-white border border-grey rounded-sheet shadow-card",children:[e.jsx("div",{className:"p-2 border-b border-grey",children:e.jsxs("div",{className:"relative",children:[e.jsx("svg",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-grey-medium",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),e.jsx("input",{ref:P,type:"text",className:"w-full pl-10 pr-4 py-2 border border-grey rounded-sheet focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary",placeholder:g,value:_,onChange:x=>S(x.target.value),onClick:x=>x.stopPropagation()})]})}),e.jsx("div",{className:"max-h-60 overflow-y-auto",children:O.length>0?O.map((x,E)=>{const T=C?Array.isArray(t)&&t.includes(x.value):x.value===t;return e.jsx("div",{className:`
|
|
44
|
+
px-4 py-2 cursor-pointer transition-colors duration-150
|
|
45
|
+
${x.disabled?"opacity-50 cursor-not-allowed":"hover:bg-grey-lighter"}
|
|
46
|
+
${T?"bg-primary/10":""}
|
|
47
|
+
`,onClick:()=>B(x),children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[C&&e.jsx("div",{className:`w-5 h-5 rounded border-2 flex items-center justify-center transition-colors ${T?"bg-primary border-primary":"border-grey"}`,children:T&&e.jsx("svg",{className:"w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),e.jsx("span",{className:"font-semibold",children:x.label})]}),!C&&T&&e.jsx("svg",{className:"w-5 h-5 text-primary",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]})},x.value||E)}):e.jsx("div",{className:"px-4 py-8 text-center text-grey-medium",children:f})})]}),(s||a)&&e.jsx("p",{className:`mt-1 text-sm ${s?"text-danger":"text-grey-medium"}`,children:s||a})]})},me=({label:n,placeholder:l,value:t,onChange:o,error:s,helperText:a,disabled:i=!1,required:d=!1,fullWidth:c=!1,rows:u=4,resize:b=!0,className:p="",...g})=>{const f=`
|
|
48
|
+
w-full rounded-sheet border transition-all duration-200 px-4 py-2
|
|
49
|
+
focus:outline-none focus:ring-2
|
|
50
|
+
disabled:bg-grey-lighter disabled:cursor-not-allowed
|
|
51
|
+
${s?"border-danger focus:ring-danger/30":"border-grey focus:border-primary focus:ring-primary/30"}
|
|
52
|
+
${b?"resize-y":"resize-none"}
|
|
53
|
+
${p}
|
|
54
|
+
`;return e.jsxs("div",{className:`${c?"w-full":""}`,children:[n&&e.jsxs("label",{className:"block mb-2 font-semibold text-dark text-sm",children:[n,d&&e.jsx("span",{className:"text-danger ml-1",children:"*"})]}),e.jsx("textarea",{value:t,onChange:o,placeholder:l,disabled:i,required:d,rows:u,className:f,...g}),(s||a)&&e.jsx("p",{className:`mt-1 text-sm ${s?"text-danger":"text-grey-medium"}`,children:s||a})]})},xe=({children:n,title:l,subtitle:t,footer:o,hoverable:s=!1,clickable:a=!1,onClick:i,className:d="",...c})=>{const u=`
|
|
55
|
+
bg-white rounded-card shadow-card p-6
|
|
56
|
+
${s?"hover:shadow-lg transition-shadow duration-200":""}
|
|
57
|
+
${a?"cursor-pointer hover:shadow-lg transition-shadow duration-200":""}
|
|
58
|
+
${d}
|
|
59
|
+
`;return e.jsxs("div",{className:u,onClick:a?i:void 0,...c,children:[(l||t)&&e.jsxs("div",{className:"mb-4",children:[l&&e.jsx("h3",{className:"text-lg font-semibold text-dark mb-1",children:l}),t&&e.jsx("p",{className:"text-sm text-grey-medium",children:t})]}),e.jsx("div",{children:n}),o&&e.jsx("div",{className:"mt-4 pt-4 border-t border-grey",children:o})]})},fe=({children:n,variant:l="primary",size:t="md",rounded:o=!1,className:s=""})=>{const a={primary:"bg-primary-light text-primary",secondary:"bg-secondary/20 text-secondary",success:"bg-success/20 text-success",danger:"bg-danger-bg text-danger",warning:"bg-warning-bg text-warning",info:"bg-info-bg text-info",grey:"bg-grey text-grey-dark"},i={sm:"px-2 py-0.5 text-xs",md:"px-3 py-1 text-sm",lg:"px-4 py-1.5 text-base"},d=`
|
|
60
|
+
inline-flex items-center justify-center font-semibold
|
|
61
|
+
${o?"rounded-full":"rounded"}
|
|
62
|
+
${a[l]}
|
|
63
|
+
${i[t]}
|
|
64
|
+
${s}
|
|
65
|
+
`;return e.jsx("span",{className:d,children:n})},be=({children:n,variant:l="info",title:t,onClose:o,showIcon:s=!0,className:a=""})=>{const i={success:"bg-success/10 border-success text-success",danger:"bg-danger-bg border-danger text-danger",warning:"bg-warning-bg border-warning text-warning",info:"bg-info-bg border-info text-info"},d={success:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),danger:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),warning:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),info:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})};return e.jsx("div",{className:`rounded border p-4 ${i[l]} ${a}`,role:"alert",children:e.jsxs("div",{className:"flex items-start",children:[s&&e.jsx("div",{className:"flex-shrink-0",children:d[l]}),e.jsxs("div",{className:`flex-1 ${s?"ml-3":""}`,children:[t&&e.jsx("h3",{className:"font-semibold mb-1",children:t}),e.jsx("div",{className:t?"text-sm":"",children:n})]}),o&&e.jsx("button",{onClick:o,className:"ml-3 flex-shrink-0 hover:opacity-70 transition-opacity","aria-label":"Close alert",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})},ge=({children:n,variant:l="info",className:t=""})=>{const o={info:"bg-info-bg border-info text-dark",warning:"bg-warning-bg border-warning text-dark",danger:"bg-danger-bg border-danger text-dark"};return e.jsx("div",{className:`border rounded p-4 ${o[l]} ${t}`,children:n})},G=({size:n="md",color:l="primary",className:t=""})=>{const o={sm:20,md:32,lg:48,xl:64},s={primary:"var(--color-primary)",secondary:"var(--color-secondary)",success:"var(--color-success)",danger:"var(--color-danger)",warning:"var(--color-warning)",info:"var(--color-info)",white:"#ffffff"},a=o[n],i=s[l],d=Math.max(2,a/10),c=(a-d)/2,u=2*Math.PI*c;return e.jsx("div",{className:`inline-block ${t}`,style:{width:a,height:a},role:"status","aria-label":"Loading",children:e.jsxs("svg",{width:a,height:a,viewBox:`0 0 ${a} ${a}`,className:"animate-spin",children:[e.jsx("circle",{cx:a/2,cy:a/2,r:c,fill:"none",stroke:i,strokeWidth:d,strokeLinecap:"round",strokeDasharray:`${u*.25} ${u*.75}`,opacity:"0.3"}),e.jsx("circle",{cx:a/2,cy:a/2,r:c,fill:"none",stroke:i,strokeWidth:d,strokeLinecap:"round",strokeDasharray:`${u*.25} ${u*.75}`,opacity:"0.6",transform:`rotate(120 ${a/2} ${a/2})`}),e.jsx("circle",{cx:a/2,cy:a/2,r:c,fill:"none",stroke:i,strokeWidth:d,strokeLinecap:"round",strokeDasharray:`${u*.25} ${u*.75}`,opacity:"1",transform:`rotate(240 ${a/2} ${a/2})`})]})})},ee=({variant:n="text",width:l,height:t,circle:o=!1,count:s=1,className:a=""})=>{const c=`
|
|
66
|
+
bg-primary-light relative overflow-hidden
|
|
67
|
+
${o?"rounded-full":{text:"h-4 rounded",title:"h-6 rounded",button:"h-10 rounded-btn",card:"h-32 rounded-card",avatar:"w-10 h-10 rounded-full"}[n]}
|
|
68
|
+
${a}
|
|
69
|
+
`,u={width:l||(n==="text"||n==="title"?"100%":void 0),height:t},b={position:"absolute",top:0,left:0,right:0,bottom:0,background:"linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent)"},p=()=>e.jsx("div",{className:c,style:u,children:e.jsx("div",{className:"animate-shimmer",style:b})});return s>1?e.jsx("div",{className:"space-y-2",children:Array.from({length:s}).map((g,f)=>e.jsx("div",{children:p()},f))}):p()},he=({type:n="spinner",variant:l="inline",size:t="md",color:o="primary",text:s,skeletonProps:a={},className:i="",children:d})=>n==="spinner"?l==="overlay"?e.jsx("div",{className:`absolute inset-0 flex items-center justify-center bg-white bg-opacity-75 z-10 ${i}`,children:e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx(G,{size:t,color:o}),s&&e.jsx("span",{className:"text-sm text-grey-medium",children:s})]})}):l==="block"?e.jsx("div",{className:`flex items-center justify-center py-8 ${i}`,children:e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx(G,{size:t,color:o}),s&&e.jsx("span",{className:"text-sm text-grey-medium",children:s})]})}):e.jsxs("div",{className:`inline-flex items-center gap-2 ${i}`,children:[e.jsx(G,{size:t,color:o}),s&&e.jsx("span",{className:"text-sm text-grey-medium",children:s})]}):n==="skeleton"?e.jsx(ee,{...a,className:i}):null,pe=({isOpen:n,onClose:l,onConfirm:t,title:o="NOTE",message:s="",children:a,variant:i="primary",type:d="alert",confirmText:c="Conferma",cancelText:u="Annulla",closeText:b="OK",closeOnBackdropClick:p=!1,closeOnEscape:g=!1})=>{if(y.useEffect(()=>{const _=S=>{S.key==="Escape"&&n&&g&&l?.()};return n&&(document.addEventListener("keydown",_),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",_),document.body.style.overflow="unset"}},[n,l,g]),!n)return null;const f={primary:{header:"bg-primary",button:"bg-primary hover:bg-primary-hover text-white",buttonOutline:"border-2 border-primary text-primary hover:bg-primary-light"},warning:{header:"bg-warning",button:"bg-warning hover:bg-warning text-white",buttonOutline:"border-2 border-warning text-warning hover:bg-warning-light"},info:{header:"bg-info",button:"bg-info hover:bg-info text-white",buttonOutline:"border-2 border-info text-info hover:bg-blue-100"},danger:{header:"bg-danger",button:"bg-danger hover:bg-danger-hover text-white",buttonOutline:"border-2 border-danger text-danger hover:bg-danger-light/30"}},C=()=>{p&&l?.()},$=()=>{t?.()},j=()=>{l?.()},R=()=>{if(d==="alert")return e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{onClick:j,className:`px-6 py-2 rounded-btn font-semibold transition-colors ${f[i].button}`,children:b})});if(d==="confirm"||d==="custom")return e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:j,className:`px-6 py-2 rounded-btn font-semibold transition-colors ${f[i].buttonOutline}`,children:u}),e.jsx("button",{onClick:$,className:`px-6 py-2 rounded-btn font-semibold transition-colors ${f[i].button}`,children:c})]})};return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[e.jsx("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:C}),e.jsxs("div",{className:"relative bg-white rounded-modal shadow-card w-full max-w-md flex flex-col animate-fadeIn",onClick:_=>_.stopPropagation(),children:[e.jsx("div",{className:`flex items-center justify-center p-6 rounded-t-modal ${f[i].header}`,children:e.jsx("h2",{className:"text-xl font-semibold text-white uppercase tracking-wide",children:o})}),e.jsx("div",{className:"p-6 flex-1",children:d==="custom"?a:e.jsx("p",{className:"text-dark text-base",children:s})}),e.jsx("div",{className:"p-6 border-t border-grey",children:R()})]})]})},ve=({children:n,content:l,variant:t="primary",title:o,position:s="top",className:a=""})=>{const[i,d]=y.useState(!1),c={primary:"border-primary bg-white",warning:"border-warning bg-white",danger:"border-danger bg-white"},u={primary:"text-primary",warning:"text-warning",danger:"text-danger"},b={primary:"border-primary",warning:"border-warning",danger:"border-danger"},p={top:"bottom-full left-1/2 -translate-x-1/2 mb-3",bottom:"top-full left-1/2 -translate-x-1/2 mt-3",left:"right-full top-1/2 -translate-y-1/2 mr-3",right:"left-full top-1/2 -translate-y-1/2 ml-3"},g={top:"top-full left-1/2 -translate-x-1/2",bottom:"bottom-full left-1/2 -translate-x-1/2",left:"left-full top-1/2 -translate-y-1/2",right:"right-full top-1/2 -translate-y-1/2"},f={top:"border-l-[8px] border-r-[8px] border-t-[8px] border-l-transparent border-r-transparent",bottom:"border-l-[8px] border-r-[8px] border-b-[8px] border-l-transparent border-r-transparent",left:"border-t-[8px] border-b-[8px] border-l-[8px] border-t-transparent border-b-transparent",right:"border-t-[8px] border-b-[8px] border-r-[8px] border-t-transparent border-b-transparent"};return e.jsxs("div",{className:"relative inline-block",onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:[n,i&&e.jsx("div",{className:`absolute z-50 ${p[s]} pointer-events-none`,role:"tooltip",children:e.jsxs("div",{className:`rounded-sheet border-[3px] p-4 shadow-lg min-w-[200px] max-w-[300px] ${c[t]} ${a} relative`,children:[o&&e.jsx("h3",{className:`text-sm font-semibold mb-2 uppercase tracking-wider ${u[t]}`,children:o}),e.jsx("div",{className:"text-sm text-grey-dark",children:l}),e.jsx("div",{className:`absolute ${g[s]} w-0 h-0 ${f[s]} ${b[t]}`})]})})]})},ye=({children:n,expandedContent:l,defaultExpanded:t=!1,asTableRow:o=!1,className:s="",arrowClassName:a="",contentClassName:i="",onToggle:d})=>{const[c,u]=y.useState(t),b=g=>{g.stopPropagation();const f=!c;u(f),d&&d(f)},p=({className:g=""})=>e.jsx("svg",{className:`w-5 h-5 transition-transform duration-200 ${c?"rotate-90":""} ${g}`,fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})});return o?e.jsxs(y.Fragment,{children:[e.jsxs("tr",{className:`border-b border-grey hover:bg-grey-lightest transition-colors ${s}`,children:[e.jsx("td",{className:"px-4 py-3 w-12",children:e.jsx("button",{onClick:b,className:`text-primary hover:text-primary-hover transition-colors ${a}`,"aria-label":c?"Collapse":"Expand",children:e.jsx(p,{})})}),n]}),c&&e.jsx("tr",{className:"border-b border-grey bg-grey-lightest/50",children:e.jsx("td",{colSpan:"100%",className:`px-4 py-4 ${i}`,children:l})})]}):e.jsxs("div",{className:`border border-grey rounded-card overflow-hidden ${s}`,children:[e.jsxs("div",{className:"flex items-center gap-3 p-4 bg-white hover:bg-grey-lightest transition-colors cursor-pointer",onClick:b,children:[e.jsx("button",{className:`text-primary hover:text-primary-hover transition-colors ${a}`,"aria-label":c?"Collapse":"Expand",children:e.jsx(p,{})}),e.jsx("div",{className:"flex-1",children:n})]}),c&&e.jsx("div",{className:`p-4 bg-grey-lightest/50 border-t border-grey ${i}`,children:l})]})},je=({label:n,checked:l=!1,onChange:t,disabled:o=!1,error:s=!1,helperText:a,required:i=!1,className:d="",...c})=>{const u=b=>{!o&&t&&t(b)};return e.jsxs("div",{className:`${d}`,children:[e.jsxs("label",{className:`flex items-center gap-3 cursor-pointer ${o?"opacity-50 cursor-not-allowed":""}`,children:[e.jsx("div",{className:`w-6 h-6 rounded border flex items-center justify-center transition-colors flex-shrink-0 ${l?"bg-primary border-primary":s?"border-danger":"border-grey"} ${o?"cursor-not-allowed":"cursor-pointer"}`,onClick:b=>{b.stopPropagation(),!o&&t&&t({target:{checked:!l}})},children:l&&e.jsx("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),e.jsx("input",{type:"checkbox",checked:l,onChange:u,disabled:o,className:"sr-only",...c}),n&&e.jsxs("span",{className:"font-semibold text-dark text-base",children:[n,i&&e.jsx("span",{className:"text-danger ml-1",children:"*"})]})]}),(s||a)&&e.jsx("p",{className:`mt-1 text-sm ml-9 ${s?"text-danger":"text-grey-medium"}`,children:s||a})]})},we=({checked:n=!1,onChange:l,disabled:t=!1,label:o,error:s,helperText:a,required:i=!1,className:d="",...c})=>{const u=()=>{!t&&l&&l(!n)};return e.jsxs("div",{className:`inline-flex flex-col ${d}`,children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("button",{type:"button",role:"switch","aria-checked":n,disabled:t,onClick:u,className:`
|
|
70
|
+
relative inline-flex h-8 w-14 items-center rounded-full
|
|
71
|
+
transition-colors duration-200 ease-in-out
|
|
72
|
+
focus:outline-none focus:ring-2 focus:ring-offset-2
|
|
73
|
+
${t?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
74
|
+
${n?"bg-primary focus:ring-primary":"bg-grey-medium focus:ring-grey-medium"}
|
|
75
|
+
${s?"ring-2 ring-danger":""}
|
|
76
|
+
`,...c,children:e.jsx("span",{className:`
|
|
77
|
+
inline-block h-6 w-6 transform rounded-full bg-white
|
|
78
|
+
transition-transform duration-200 ease-in-out
|
|
79
|
+
shadow-md
|
|
80
|
+
${n?"translate-x-7":"translate-x-1"}
|
|
81
|
+
`})}),o&&e.jsxs("label",{className:`ml-3 text-sm font-medium ${t?"text-grey-400":"text-grey-700"}`,children:[o,i&&e.jsx("span",{className:"ml-1 text-danger",children:"*"})]})]}),(a||s)&&e.jsx("p",{className:`mt-1 text-sm ${s?"text-danger":"text-grey-500"}`,children:s||a})]})},Ne=({label:n,value:l,onChange:t,error:o,helperText:s,disabled:a=!1,required:i=!1,fullWidth:d=!1,size:c="md",showTime:u=!1,className:b="",...p})=>{const f=`
|
|
82
|
+
w-full rounded-sheet border transition-all duration-200
|
|
83
|
+
focus:outline-none focus:ring-2
|
|
84
|
+
disabled:bg-grey-lighter disabled:cursor-not-allowed
|
|
85
|
+
${o?"border-danger focus:ring-danger/30":"border-grey focus:border-primary focus:ring-primary/30"}
|
|
86
|
+
${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-5 py-3 text-lg"}[c]}
|
|
87
|
+
${b}
|
|
88
|
+
`;return e.jsxs("div",{className:`${d?"w-full":""}`,children:[n&&e.jsxs("label",{className:"block mb-2 font-semibold text-dark text-sm",children:[n,i&&e.jsx("span",{className:"text-danger ml-1",children:"*"})]}),e.jsx("input",{type:u?"datetime-local":"date",value:l,onChange:t,disabled:a,required:i,className:f,...p}),(o||s)&&e.jsx("p",{className:`mt-1 text-sm ${o?"text-danger":"text-grey-medium"}`,children:o||s})]})},ke=({children:n,variant:l="info",title:t,onClose:o,showIcon:s=!0,className:a="",duration:i=5e3,position:d="top-right",autoClose:c=!0})=>{const[u,b]=y.useState(!0),[p,g]=y.useState(!1);y.useEffect(()=>{if(c&&i>0){const S=setTimeout(()=>{f()},i);return()=>clearTimeout(S)}},[c,i]);const f=()=>{g(!0),setTimeout(()=>{b(!1),o&&o()},300)};if(!u)return null;const C={success:"bg-success-bg border-success text-dark",danger:"bg-danger-bg border-danger text-dark",warning:"bg-warning-bg border-warning text-dark",info:"bg-info-bg border-info text-dark"},$={success:"text-success",danger:"text-danger",warning:"text-warning",info:"text-info"},j={success:e.jsx("svg",{className:`w-5 h-5 ${$.success}`,fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),danger:e.jsx("svg",{className:`w-5 h-5 ${$.danger}`,fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),warning:e.jsx("svg",{className:`w-5 h-5 ${$.warning}`,fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),info:e.jsx("svg",{className:`w-5 h-5 ${$.info}`,fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})},R={"top-right":"top-4 right-4","top-left":"top-4 left-4","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","bottom-center":"bottom-4 left-1/2 -translate-x-1/2"},_=p?"opacity-0 translate-x-4":"opacity-100 translate-x-0";return e.jsx("div",{className:`fixed ${R[d]} z-50 transition-all duration-300 ease-in-out ${_}`,children:e.jsx("div",{className:`rounded border p-4 shadow-lg min-w-[300px] max-w-[500px] ${C[l]} ${a}`,role:"alert",children:e.jsxs("div",{className:"flex items-start",children:[s&&e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:j[l]}),e.jsxs("div",{className:`flex-1 ${s?"ml-3":""}`,children:[t&&e.jsx("h3",{className:"font-semibold mb-1",children:t}),e.jsx("div",{className:t?"text-sm":"",children:n})]}),e.jsx("button",{onClick:f,className:"ml-3 flex-shrink-0 hover:opacity-70 transition-opacity","aria-label":"Close toast",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})})},Ce=({children:n,className:l="",...t})=>{const s=`flex items-center gap-6 border-b border-grey-medium bg-white ${l}`;return e.jsx("nav",{className:s,...t,children:n})},$e=({children:n,active:l=!1,onClick:t,href:o,className:s="",...a})=>{const c=`py-3 px-4 font-medium text-sm cursor-pointer transition-all duration-200 border-b-4 -mb-px ${l?"text-dark border-secondary bg-grey-lightest":"text-text-secondary border-transparent hover:text-dark hover:border-grey-medium hover:bg-grey-lightest"} ${s}`;return o?e.jsx("a",{href:o,className:c,...a,children:n}):e.jsx("div",{className:c,onClick:t,role:"button",tabIndex:0,onKeyPress:u=>{(u.key==="Enter"||u.key===" ")&&t?.(u)},...a,children:n})};h.Accordion=ye,h.Alert=be,h.Badge=fe,h.Bootbox=pe,h.Button=le,h.Card=xe,h.Checkbox=je,h.DateTimePicker=Ne,h.InfoBox=ge,h.Input=ce,h.Loader=he,h.Modal=oe,h.Navbar=Ce,h.NavbarItem=$e,h.Select=de,h.SelectSearchable=ue,h.Skeleton=ee,h.Spinner=G,h.Table=ie,h.TextArea=me,h.Toast=ke,h.Toggle=we,h.Tooltip=ve,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap";@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-100:oklch(93.2% .032 255.585);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-2xl:42rem;--container-4xl:56rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-primary:#a58aba;--color-primary-hover:#725d82;--color-primary-light:#e1d2f2;--color-secondary:#b6c224;--color-secondary-hover:#cbd82c;--color-danger:#dc3545;--color-danger-hover:#e97b86;--color-danger-light:#e97b86;--color-danger-ring:#dc35454d;--color-danger-bg:#f8d7da;--color-warning:#ffc107;--color-warning-light:#ffc1074d;--color-warning-bg:#fff3cd;--color-success:#28a745;--color-success-bg:#d4edda;--color-info:#138496;--color-info-bg:#d1ecf1;--color-dark:#262626;--color-grey-dark:#9d9d9d;--color-grey-medium:#747373;--color-grey:#e9e9e9;--color-grey-lighter:#f6f6f6;--color-grey-lightest:#fafafa;--radius-card:15px;--radius-btn:8px;--radius-sheet:2px;--radius-modal:10px}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.top-full{top:100%}.right-4{right:calc(var(--spacing)*4)}.right-full{right:100%}.bottom-4{bottom:calc(var(--spacing)*4)}.bottom-full{bottom:100%}.left-1\/2{left:50%}.left-3{left:calc(var(--spacing)*3)}.left-4{left:calc(var(--spacing)*4)}.left-full{left:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-1{margin:calc(var(--spacing)*1)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-3{margin-right:calc(var(--spacing)*3)}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-9{margin-left:calc(var(--spacing)*9)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0{height:calc(var(--spacing)*0)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-32{height:calc(var(--spacing)*32)}.h-64{height:calc(var(--spacing)*64)}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-\[80vh\]{max-height:80vh}.max-h-\[90vh\]{max-height:90vh}.w-0{width:calc(var(--spacing)*0)}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\[95vw\]{max-width:95vw}.max-w-\[300px\]{max-width:300px}.max-w-\[500px\]{max-width:500px}.max-w-md{max-width:var(--container-md)}.min-w-\[200px\]{min-width:200px}.min-w-\[300px\]{min-width:300px}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-1{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-7{--tw-translate-x:calc(var(--spacing)*7);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-btn{border-radius:var(--radius-btn)}.rounded-card{border-radius:var(--radius-card)}.rounded-full{border-radius:3.40282e38px}.rounded-modal{border-radius:var(--radius-modal)}.rounded-sheet{border-radius:var(--radius-sheet)}.rounded-t-modal{border-top-left-radius:var(--radius-modal);border-top-right-radius:var(--radius-modal)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\[3px\]{border-style:var(--tw-border-style);border-width:3px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-\[8px\]{border-top-style:var(--tw-border-style);border-top-width:8px}.border-r-\[8px\]{border-right-style:var(--tw-border-style);border-right-width:8px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-4{border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.border-b-\[8px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:8px}.border-l-\[8px\]{border-left-style:var(--tw-border-style);border-left-width:8px}.border-danger{border-color:var(--color-danger)}.border-grey{border-color:var(--color-grey)}.border-grey-medium{border-color:var(--color-grey-medium)}.border-info{border-color:var(--color-info)}.border-primary{border-color:var(--color-primary)}.border-secondary{border-color:var(--color-secondary)}.border-success{border-color:var(--color-success)}.border-transparent{border-color:#0000}.border-warning{border-color:var(--color-warning)}.border-t-transparent{border-top-color:#0000}.border-r-transparent{border-right-color:#0000}.border-b-transparent{border-bottom-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-danger{background-color:var(--color-danger)}.bg-danger-bg{background-color:var(--color-danger-bg)}.bg-grey{background-color:var(--color-grey)}.bg-grey-lighter{background-color:var(--color-grey-lighter)}.bg-grey-lightest{background-color:var(--color-grey-lightest)}.bg-grey-lightest\/50{background-color:#fafafa80}@supports (color:color-mix(in lab,red,red)){.bg-grey-lightest\/50{background-color:color-mix(in oklab,var(--color-grey-lightest)50%,transparent)}}.bg-grey-medium{background-color:var(--color-grey-medium)}.bg-info{background-color:var(--color-info)}.bg-info-bg{background-color:var(--color-info-bg)}.bg-primary{background-color:var(--color-primary)}.bg-primary-light{background-color:var(--color-primary-light)}.bg-primary\/10{background-color:#a58aba1a}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,var(--color-primary)10%,transparent)}}.bg-secondary{background-color:var(--color-secondary)}.bg-secondary\/20{background-color:#b6c22433}@supports (color:color-mix(in lab,red,red)){.bg-secondary\/20{background-color:color-mix(in oklab,var(--color-secondary)20%,transparent)}}.bg-success{background-color:var(--color-success)}.bg-success-bg{background-color:var(--color-success-bg)}.bg-success\/10{background-color:#28a7451a}@supports (color:color-mix(in lab,red,red)){.bg-success\/10{background-color:color-mix(in oklab,var(--color-success)10%,transparent)}}.bg-success\/20{background-color:#28a74533}@supports (color:color-mix(in lab,red,red)){.bg-success\/20{background-color:color-mix(in oklab,var(--color-success)20%,transparent)}}.bg-warning{background-color:var(--color-warning)}.bg-warning-bg{background-color:var(--color-warning-bg)}.bg-white{background-color:var(--color-white)}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-4{padding-right:calc(var(--spacing)*4)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-danger{color:var(--color-danger)}.text-dark{color:var(--color-dark)}.text-grey-dark{color:var(--color-grey-dark)}.text-grey-medium{color:var(--color-grey-medium)}.text-info{color:var(--color-info)}.text-primary{color:var(--color-primary)}.text-secondary{color:var(--color-secondary)}.text-success{color:var(--color-success)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow-card{--tw-shadow:2px 2px 10px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-danger{--tw-ring-color:var(--color-danger)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.outline-danger{outline-color:var(--color-danger)}.outline-info{outline-color:var(--color-info)}.outline-secondary{outline-color:var(--color-secondary)}.outline-success{outline-color:var(--color-success)}.outline-warning{outline-color:var(--color-warning)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media(hover:hover){.hover\:border-grey-medium:hover{border-color:var(--color-grey-medium)}.hover\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\:bg-danger:hover{background-color:var(--color-danger)}.hover\:bg-danger-hover:hover{background-color:var(--color-danger-hover)}.hover\:bg-danger-light\/30:hover{background-color:#e97b864d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-danger-light\/30:hover{background-color:color-mix(in oklab,var(--color-danger-light)30%,transparent)}}.hover\:bg-grey-lighter:hover{background-color:var(--color-grey-lighter)}.hover\:bg-grey-lightest:hover{background-color:var(--color-grey-lightest)}.hover\:bg-info:hover{background-color:var(--color-info)}.hover\:bg-primary:hover{background-color:var(--color-primary)}.hover\:bg-primary-hover:hover{background-color:var(--color-primary-hover)}.hover\:bg-primary-light:hover{background-color:var(--color-primary-light)}.hover\:bg-primary\/20:hover{background-color:#a58aba33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,var(--color-primary)20%,transparent)}}.hover\:bg-secondary:hover{background-color:var(--color-secondary)}.hover\:bg-secondary-hover:hover{background-color:var(--color-secondary-hover)}.hover\:bg-success:hover{background-color:var(--color-success)}.hover\:bg-warning:hover{background-color:var(--color-warning)}.hover\:bg-warning-light:hover{background-color:var(--color-warning-light)}.hover\:text-dark:hover{color:var(--color-dark)}.hover\:text-primary-hover:hover{color:var(--color-primary-hover)}.hover\:text-white:hover{color:var(--color-white)}.hover\:text-white\/80:hover{color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\:text-white\/80:hover{color:color-mix(in oklab,var(--color-white)80%,transparent)}}.hover\:opacity-70:hover{opacity:.7}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.focus\:border-primary:focus{border-color:var(--color-primary)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-danger\/30:focus{--tw-ring-color:#dc35454d}@supports (color:color-mix(in lab,red,red)){.focus\:ring-danger\/30:focus{--tw-ring-color:color-mix(in oklab,var(--color-danger)30%,transparent)}}.focus\:ring-grey-medium:focus{--tw-ring-color:var(--color-grey-medium)}.focus\:ring-primary:focus{--tw-ring-color:var(--color-primary)}.focus\:ring-primary\/30:focus{--tw-ring-color:#a58aba4d}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/30:focus{--tw-ring-color:color-mix(in oklab,var(--color-primary)30%,transparent)}}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-grey-lighter:disabled{background-color:var(--color-grey-lighter)}.disabled\:opacity-50:disabled{opacity:.5}}*{box-sizing:border-box}@keyframes spin{to{transform:rotate(360deg)}}@keyframes fadeIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes pulse{50%{opacity:.5}}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}.animate-spin{animation:1s linear infinite spin}.animate-fadeIn{animation:.2s ease-out fadeIn}.animate-pulse{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse}.animate-shimmer{animation:2s infinite shimmer}.input-error,.select-error,.textarea-error{border-color:var(--color-danger)!important}.input-error:focus,.select-error:focus,.textarea-error:focus{border-color:var(--color-danger)!important;ring-color:var(--color-danger-ring)!important}.error-text{color:var(--color-danger);margin-top:.25rem;font-size:.875rem}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "primolab-ui-kit",
|
|
3
|
+
"version": "1.1.4",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Primo UI Kit - A comprehensive React component library with Tailwind CSS",
|
|
6
|
+
"author": "Primo Team",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"react",
|
|
10
|
+
"components",
|
|
11
|
+
"ui-kit",
|
|
12
|
+
"tailwind",
|
|
13
|
+
"design-system"
|
|
14
|
+
],
|
|
15
|
+
"main": "./dist/primo-ui-kit.umd.cjs",
|
|
16
|
+
"module": "./dist/primo-ui-kit.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/primo-ui-kit.js",
|
|
22
|
+
"require": "./dist/primo-ui-kit.umd.cjs"
|
|
23
|
+
},
|
|
24
|
+
"./styles": "./dist/primo-ui-kit.css"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"dev": "vite",
|
|
31
|
+
"build": "vite build && npm run build:types",
|
|
32
|
+
"build:types": "node scripts/generate-types.js",
|
|
33
|
+
"preview": "vite preview",
|
|
34
|
+
"prepublishOnly": "npm run build"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
38
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@tailwindcss/postcss": "^4.1.16",
|
|
42
|
+
"@types/react": "^19.0.0",
|
|
43
|
+
"@types/react-dom": "^19.0.0",
|
|
44
|
+
"@vitejs/plugin-react": "^5.1.0",
|
|
45
|
+
"autoprefixer": "^10.4.21",
|
|
46
|
+
"postcss": "^8.5.6",
|
|
47
|
+
"react": "^19.2.0",
|
|
48
|
+
"react-dom": "^19.2.0",
|
|
49
|
+
"tailwindcss": "^4.1.16",
|
|
50
|
+
"vite": "^7.1.12"
|
|
51
|
+
}
|
|
52
|
+
}
|