acemyjob-ui 2.0.2 → 2.0.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/dist/acemyjob-ui.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(x,
|
|
1
|
+
(function(x,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("@heroicons/react/24/outline"),require("react-dom"),require("@dnd-kit/sortable"),require("@dnd-kit/utilities"),require("@headlessui/react")):typeof define=="function"&&define.amd?define(["exports","react","@heroicons/react/24/outline","react-dom","@dnd-kit/sortable","@dnd-kit/utilities","@headlessui/react"],g):(x=typeof globalThis<"u"?globalThis:x||self,g(x.AceMyJobUI={},x.React,x.HeroiconsOutline,x.ReactDOM,x.DndKitSortable,x.DndKitUtilities,x.HeadlessUI))})(this,function(x,g,E,Fe,ze,Le,q){"use strict";function Ue(r){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const a in r)if(a!=="default"){const t=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(s,a,t.get?t:{enumerable:!0,get:()=>r[a]})}}return s.default=r,Object.freeze(s)}const y=Ue(g),He={required:(r="This field is required")=>({validate:s=>typeof s=="string"?s.trim().length>0:Array.isArray(s)?s.length>0:s!=null,message:r}),email:(r="Please enter a valid email address")=>({validate:s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(s)),message:r}),minLength:(r,s)=>({validate:a=>String(a).length>=r,message:s||`Must be at least ${r} characters`}),maxLength:(r,s)=>({validate:a=>String(a).length<=r,message:s||`Must be no more than ${r} characters`}),pattern:(r,s="Invalid format")=>({validate:a=>r.test(String(a)),message:s}),minValue:(r,s)=>({validate:a=>Number(a)>=r,message:s||`Must be at least ${r}`}),maxValue:(r,s)=>({validate:a=>Number(a)<=r,message:s||`Must be no more than ${r}`}),url:(r="Please enter a valid URL")=>({validate:s=>{try{return new URL(String(s)),!0}catch{return!1}},message:r}),phone:(r="Please enter a valid phone number")=>({validate:s=>{const a=/^[\d\s\-+()]+$/,t=String(s);return a.test(t)&&t.replace(/\D/g,"").length>=10},message:r}),match:(r,s="Fields do not match")=>({validate:a=>a===r,message:s}),custom:(r,s)=>({validate:r,message:s})};function te(r,s){for(const a of s)if(!a.validate(r))return a.message;return null}function W(r,s){const a={};for(const[t,l]of Object.entries(s)){const n=r[t],c=te(n,l);a[t]=c}return a}function ne(r){return Object.values(r).some(s=>s!==null)}function Ye(r){for(const s of Object.values(r))if(s!==null)return s;return null}function qe(r,s){return{...r,[s]:null}}function We(r){const s={};for(const a of Object.keys(r))s[a]=null;return s}function Ge({initialValues:r,validationRules:s={},onSubmit:a}){const[t,l]=g.useState(r),[n,c]=g.useState({}),[o,u]=g.useState({}),[d,m]=g.useState(!1),f=JSON.stringify(t)!==JSON.stringify(r),h=g.useCallback(w=>{const{name:j,value:C,type:D}=w.target;let z=C;if(D==="checkbox"?z=w.target.checked:D==="number"&&(z=C?Number(C):""),l(P=>({...P,[j]:z})),s[j]){const P=W({[j]:z},{[j]:s[j]});c(Z=>({...Z,[j]:P[j]}))}},[s]),b=g.useCallback(w=>{const{name:j}=w.target;u(C=>({...C,[j]:!0}))},[]),p=g.useCallback((w,j)=>{if(l(C=>({...C,[w]:j})),s[w]){const C=W({[w]:j},{[w]:s[w]});c(D=>({...D,[w]:C[w]}))}},[s]),$=g.useCallback((w,j)=>{c(C=>({...C,[w]:j}))},[]),S=g.useCallback(async w=>{w.preventDefault();const j=W(t,s);c(j);const C={};for(const D of Object.keys(t))C[D]=!0;if(u(C),!ne(j)&&a){m(!0);try{await a(t)}catch(D){console.error("Form submission error:",D)}finally{m(!1)}}},[t,s,a]),B=g.useCallback(()=>{l(r),c({}),u({}),m(!1)},[r]),R=g.useCallback(w=>({name:w,value:t[w]||"",onChange:h,onBlur:b}),[t,h,b]),k=g.useCallback(w=>n[w]||null,[n]),M=g.useCallback(w=>o[w]||!1,[o]),F=g.useCallback(w=>t[w]!==r[w],[t,r]);return{values:t,errors:n,touched:o,isSubmitting:d,isDirty:f,handleChange:h,handleBlur:b,setFieldValue:p,setFieldError:$,handleSubmit:S,resetForm:B,getFieldProps:R,getFieldError:k,isFieldTouched:M,isFieldDirty:F}}var G={exports:{}},U={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var le;function
|
|
9
|
+
*/var le;function Ze(){if(le)return U;le=1;var r=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function a(t,l,n){var c=null;if(n!==void 0&&(c=""+n),l.key!==void 0&&(c=""+l.key),"key"in l){n={};for(var o in l)o!=="key"&&(n[o]=l[o])}else n=l;return l=n.ref,{$$typeof:r,type:t,key:c,ref:l!==void 0?l:null,props:n}}return U.Fragment=s,U.jsx=a,U.jsxs=a,U}var H={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var oe;function
|
|
17
|
+
*/var oe;function Je(){return oe||(oe=1,process.env.NODE_ENV!=="production"&&function(){function r(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===z?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case $:return"Fragment";case B:return"Profiler";case S:return"StrictMode";case F:return"Suspense";case w:return"SuspenseList";case D:return"Activity"}if(typeof i=="object")switch(typeof i.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),i.$$typeof){case p:return"Portal";case k:return(i.displayName||"Context")+".Provider";case R:return(i._context.displayName||"Context")+".Consumer";case M:var v=i.render;return i=i.displayName,i||(i=v.displayName||v.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case j:return v=i.displayName||null,v!==null?v:r(i.type)||"Memo";case C:v=i._payload,i=i._init;try{return r(i(v))}catch{}}return null}function s(i){return""+i}function a(i){try{s(i);var v=!1}catch{v=!0}if(v){v=console;var N=v.error,V=typeof Symbol=="function"&&Symbol.toStringTag&&i[Symbol.toStringTag]||i.constructor.name||"Object";return N.call(v,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",V),s(i)}}function t(i){if(i===$)return"<>";if(typeof i=="object"&&i!==null&&i.$$typeof===C)return"<...>";try{var v=r(i);return v?"<"+v+">":"<...>"}catch{return"<...>"}}function l(){var i=P.A;return i===null?null:i.getOwner()}function n(){return Error("react-stack-top-frame")}function c(i){if(Z.call(i,"key")){var v=Object.getOwnPropertyDescriptor(i,"key").get;if(v&&v.isReactWarning)return!1}return i.key!==void 0}function o(i,v){function N(){Oe||(Oe=!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)",v))}N.isReactWarning=!0,Object.defineProperty(i,"key",{get:N,configurable:!0})}function u(){var i=r(this.type);return Ie[i]||(Ie[i]=!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.")),i=this.props.ref,i!==void 0?i:null}function d(i,v,N,V,_,I,re,se){return N=I.ref,i={$$typeof:b,type:i,key:v,props:I,_owner:_},(N!==void 0?N:null)!==null?Object.defineProperty(i,"ref",{enumerable:!1,get:u}):Object.defineProperty(i,"ref",{enumerable:!1,value:null}),i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(i,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(i,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.defineProperty(i,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i}function m(i,v,N,V,_,I,re,se){var T=v.children;if(T!==void 0)if(V)if(Fr(T)){for(V=0;V<T.length;V++)f(T[V]);Object.freeze&&Object.freeze(T)}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 f(T);if(Z.call(v,"key")){T=r(i);var L=Object.keys(v).filter(function(zr){return zr!=="key"});V=0<L.length?"{key: someKey, "+L.join(": ..., ")+": ...}":"{key: someKey}",Pe[T+V]||(L=0<L.length?"{"+L.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,V,T,L,T),Pe[T+V]=!0)}if(T=null,N!==void 0&&(a(N),T=""+N),c(b)&&(a(b.key),T=""+b.key),"key"in b){N={};for(var ae in b)ae!=="key"&&(N[ae]=b[ae])}else N=b;return T&&o(N,typeof i=="function"?i.displayName||i.name||"Unknown":i),d(i,T,O,_,l(),N,re,se)}function g(i){typeof i=="object"&&i!==null&&i.$$typeof===v&&i._store&&(i._store.validated=1)}var f=h,v=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),k=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),z=Symbol.for("react.client.reference"),P=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=Object.prototype.hasOwnProperty,Br=Array.isArray,ee=console.createTask?console.createTask:function(){return null};f={"react-stack-bottom-frame":function(i){return i()}};var Me,Oe={},Ie=f["react-stack-bottom-frame"].bind(f,n)(),_e=ee(t(n)),Pe={};H.Fragment=$,H.jsx=function(i,b,N,V,_){var O=1e4>P.recentlyCreatedOwnerStacks++;return m(i,b,N,!1,V,_,O?Error("react-stack-top-frame"):Ie,O?ee(t(i)):_e)},H.jsxs=function(i,b,N,V,_){var O=1e4>P.recentlyCreatedOwnerStacks++;return m(i,b,N,!0,V,_,O?Error("react-stack-top-frame"):Ie,O?ee(t(i)):_e)}}()),H}var ce;function Je(){return ce||(ce=1,process.env.NODE_ENV==="production"?G.exports=Ge():G.exports=Ze()),G.exports}var e=Je();const ie=r=>r.replace("--color-","bg-"),Xe=({name:r,cssVar:s,value:a})=>{const t=`rgb(${a})`;return e.jsxs("div",{className:"flex flex-col items-center space-y-2 p-3 rounded-lg border border-border-subtle bg-surface hover:bg-surface-variant transition-colors",children:[e.jsx("div",{className:`w-16 h-16 rounded-lg border border-border shadow-sm ${ie(s)}`}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-sm font-medium text-text-primary",children:r}),e.jsx("div",{className:"text-xs text-text-muted font-mono",children:s}),e.jsx("div",{className:"text-xs text-text-secondary",children:t})]})]})},de=({title:r,colors:s})=>e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-text-primary border-b border-border-subtle pb-2",children:r}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 xl:grid-cols-11 gap-4",children:s.map(a=>e.jsx(Xe,{...a},a.name))})]}),ue=()=>{const r=[{title:"Success Colors (Green)",colors:[{name:"50",cssVar:"--color-success-50",value:"240 253 244"},{name:"100",cssVar:"--color-success-100",value:"220 252 231"},{name:"200",cssVar:"--color-success-200",value:"187 247 208"},{name:"300",cssVar:"--color-success-300",value:"134 239 172"},{name:"400",cssVar:"--color-success-400",value:"74 222 128"},{name:"500",cssVar:"--color-success-500",value:"34 197 94"},{name:"600",cssVar:"--color-success-600",value:"22 163 74"},{name:"700",cssVar:"--color-success-700",value:"21 128 61"},{name:"800",cssVar:"--color-success-800",value:"22 101 52"},{name:"900",cssVar:"--color-success-900",value:"20 83 45"},{name:"950",cssVar:"--color-success-950",value:"5 46 22"}]},{title:"Warning Colors (Yellow)",colors:[{name:"50",cssVar:"--color-warning-50",value:"254 252 232"},{name:"100",cssVar:"--color-warning-100",value:"254 249 195"},{name:"200",cssVar:"--color-warning-200",value:"254 240 138"},{name:"300",cssVar:"--color-warning-300",value:"253 224 71"},{name:"400",cssVar:"--color-warning-400",value:"250 204 21"},{name:"500",cssVar:"--color-warning-500",value:"234 179 8"},{name:"600",cssVar:"--color-warning-600",value:"202 138 4"},{name:"700",cssVar:"--color-warning-700",value:"161 98 7"},{name:"800",cssVar:"--color-warning-800",value:"133 77 14"},{name:"900",cssVar:"--color-warning-900",value:"113 63 18"},{name:"950",cssVar:"--color-warning-950",value:"66 32 6"}]},{title:"Error Colors (Red)",colors:[{name:"50",cssVar:"--color-error-50",value:"254 242 242"},{name:"100",cssVar:"--color-error-100",value:"254 226 226"},{name:"200",cssVar:"--color-error-200",value:"254 202 202"},{name:"300",cssVar:"--color-error-300",value:"252 165 165"},{name:"400",cssVar:"--color-error-400",value:"248 113 113"},{name:"500",cssVar:"--color-error-500",value:"239 68 68"},{name:"600",cssVar:"--color-error-600",value:"220 38 38"},{name:"700",cssVar:"--color-error-700",value:"185 28 28"},{name:"800",cssVar:"--color-error-800",value:"153 27 27"},{name:"900",cssVar:"--color-error-900",value:"127 29 29"},{name:"950",cssVar:"--color-error-950",value:"69 10 10"}]}],s=[{title:"Reseda Green",colors:[{name:"DEFAULT",cssVar:"--color-reseda-green",value:"121 125 98"},{name:"100",cssVar:"--color-reseda-green-100",value:"24 25 20"},{name:"200",cssVar:"--color-reseda-green-200",value:"49 50 39"},{name:"300",cssVar:"--color-reseda-green-300",value:"73 75 59"},{name:"400",cssVar:"--color-reseda-green-400",value:"97 101 79"},{name:"500",cssVar:"--color-reseda-green-500",value:"121 125 98"},{name:"600",cssVar:"--color-reseda-green-600",value:"150 154 127"},{name:"700",cssVar:"--color-reseda-green-700",value:"177 180 159"},{name:"800",cssVar:"--color-reseda-green-800",value:"203 205 191"},{name:"900",cssVar:"--color-reseda-green-900",value:"229 230 223"}]},{title:"Moss Green",colors:[{name:"DEFAULT",cssVar:"--color-moss-green",value:"155 155 122"},{name:"100",cssVar:"--color-moss-green-100",value:"31 31 24"},{name:"200",cssVar:"--color-moss-green-200",value:"63 63 47"},{name:"300",cssVar:"--color-moss-green-300",value:"94 94 71"},{name:"400",cssVar:"--color-moss-green-400",value:"126 126 95"},{name:"500",cssVar:"--color-moss-green-500",value:"155 155 122"},{name:"600",cssVar:"--color-moss-green-600",value:"174 174 148"},{name:"700",cssVar:"--color-moss-green-700",value:"194 194 175"},{name:"800",cssVar:"--color-moss-green-800",value:"215 215 202"},{name:"900",cssVar:"--color-moss-green-900",value:"235 235 228"}]},{title:"Khaki",colors:[{name:"DEFAULT",cssVar:"--color-khaki",value:"186 165 135"},{name:"100",cssVar:"--color-khaki-100",value:"41 34 23"},{name:"200",cssVar:"--color-khaki-200",value:"82 67 47"},{name:"300",cssVar:"--color-khaki-300",value:"122 101 70"},{name:"400",cssVar:"--color-khaki-400",value:"163 134 94"},{name:"500",cssVar:"--color-khaki-500",value:"186 165 135"},{name:"600",cssVar:"--color-khaki-600",value:"200 183 159"},{name:"700",cssVar:"--color-khaki-700",value:"214 201 183"},{name:"800",cssVar:"--color-khaki-800",value:"227 219 207"},{name:"900",cssVar:"--color-khaki-900",value:"241 237 231"}]},{title:"Desert Sand",colors:[{name:"DEFAULT",cssVar:"--color-desert-sand",value:"217 174 148"},{name:"100",cssVar:"--color-desert-sand-100",value:"54 33 19"},{name:"200",cssVar:"--color-desert-sand-200",value:"109 65 38"},{name:"300",cssVar:"--color-desert-sand-300",value:"163 98 57"},{name:"400",cssVar:"--color-desert-sand-400",value:"199 135 95"},{name:"500",cssVar:"--color-desert-sand-500",value:"217 174 148"},{name:"600",cssVar:"--color-desert-sand-600",value:"225 191 170"},{name:"700",cssVar:"--color-desert-sand-700",value:"233 207 192"},{name:"800",cssVar:"--color-desert-sand-800",value:"240 223 213"},{name:"900",cssVar:"--color-desert-sand-900",value:"248 239 234"}]},{title:"Peach Yellow",colors:[{name:"DEFAULT",cssVar:"--color-peach-yellow",value:"241 220 167"},{name:"100",cssVar:"--color-peach-yellow-100",value:"71 54 11"},{name:"200",cssVar:"--color-peach-yellow-200",value:"141 107 22"},{name:"300",cssVar:"--color-peach-yellow-300",value:"212 161 33"},{name:"400",cssVar:"--color-peach-yellow-400",value:"230 192 96"},{name:"500",cssVar:"--color-peach-yellow-500",value:"241 220 167"},{name:"600",cssVar:"--color-peach-yellow-600",value:"244 227 184"},{name:"700",cssVar:"--color-peach-yellow-700",value:"247 234 202"},{name:"800",cssVar:"--color-peach-yellow-800",value:"249 241 220"},{name:"900",cssVar:"--color-peach-yellow-900",value:"252 248 237"}]},{title:"Sunglow",colors:[{name:"DEFAULT",cssVar:"--color-sunglow",value:"255 203 105"},{name:"100",cssVar:"--color-sunglow-100",value:"72 47 0"},{name:"200",cssVar:"--color-sunglow-200",value:"145 94 0"},{name:"300",cssVar:"--color-sunglow-300",value:"217 141 0"},{name:"400",cssVar:"--color-sunglow-400",value:"255 178 35"},{name:"500",cssVar:"--color-sunglow-500",value:"255 203 105"},{name:"600",cssVar:"--color-sunglow-600",value:"255 214 137"},{name:"700",cssVar:"--color-sunglow-700",value:"255 224 166"},{name:"800",cssVar:"--color-sunglow-800",value:"255 234 196"},{name:"900",cssVar:"--color-sunglow-900",value:"255 245 225"}]},{title:"Earth Yellow",colors:[{name:"DEFAULT",cssVar:"--color-earth-yellow",value:"232 172 101"},{name:"100",cssVar:"--color-earth-yellow-100",value:"58 36 9"},{name:"200",cssVar:"--color-earth-yellow-200",value:"115 71 17"},{name:"300",cssVar:"--color-earth-yellow-300",value:"173 107 26"},{name:"400",cssVar:"--color-earth-yellow-400",value:"223 142 42"},{name:"500",cssVar:"--color-earth-yellow-500",value:"232 172 101"},{name:"600",cssVar:"--color-earth-yellow-600",value:"236 189 131"},{name:"700",cssVar:"--color-earth-yellow-700",value:"241 205 162"},{name:"800",cssVar:"--color-earth-yellow-800",value:"246 222 193"},{name:"900",cssVar:"--color-earth-yellow-900",value:"250 238 224"}]},{title:"Persian Orange",colors:[{name:"DEFAULT",cssVar:"--color-persian-orange",value:"208 140 96"},{name:"100",cssVar:"--color-persian-orange-100",value:"47 27 14"},{name:"200",cssVar:"--color-persian-orange-200",value:"94 55 28"},{name:"300",cssVar:"--color-persian-orange-300",value:"141 82 42"},{name:"400",cssVar:"--color-persian-orange-400",value:"188 109 56"},{name:"500",cssVar:"--color-persian-orange-500",value:"208 140 96"},{name:"600",cssVar:"--color-persian-orange-600",value:"217 165 129"},{name:"700",cssVar:"--color-persian-orange-700",value:"227 187 161"},{name:"800",cssVar:"--color-persian-orange-800",value:"236 210 192"},{name:"900",cssVar:"--color-persian-orange-900",value:"246 232 224"}]},{title:"Chamoisee",colors:[{name:"DEFAULT",cssVar:"--color-chamoisee",value:"181 132 99"},{name:"100",cssVar:"--color-chamoisee-100",value:"38 26 18"},{name:"200",cssVar:"--color-chamoisee-200",value:"76 52 36"},{name:"300",cssVar:"--color-chamoisee-300",value:"114 78 54"},{name:"400",cssVar:"--color-chamoisee-400",value:"153 104 72"},{name:"500",cssVar:"--color-chamoisee-500",value:"181 132 99"},{name:"600",cssVar:"--color-chamoisee-600",value:"196 157 130"},{name:"700",cssVar:"--color-chamoisee-700",value:"211 181 161"},{name:"800",cssVar:"--color-chamoisee-800",value:"226 206 193"},{name:"900",cssVar:"--color-chamoisee-900",value:"240 230 224"}]},{title:"Beaver",colors:[{name:"DEFAULT",cssVar:"--color-beaver",value:"153 123 102"},{name:"100",cssVar:"--color-beaver-100",value:"31 25 20"},{name:"200",cssVar:"--color-beaver-200",value:"61 49 41"},{name:"300",cssVar:"--color-beaver-300",value:"92 74 61"},{name:"400",cssVar:"--color-beaver-400",value:"122 99 82"},{name:"500",cssVar:"--color-beaver-500",value:"153 123 102"},{name:"600",cssVar:"--color-beaver-600",value:"173 150 133"},{name:"700",cssVar:"--color-beaver-700",value:"194 176 163"},{name:"800",cssVar:"--color-beaver-800",value:"214 202 194"},{name:"900",cssVar:"--color-beaver-900",value:"235 229 224"}]}],a=[{name:"Background",cssVar:"--color-background"},{name:"Surface",cssVar:"--color-surface"},{name:"Surface Variant",cssVar:"--color-surface-variant"},{name:"Text Primary",cssVar:"--color-text-primary"},{name:"Text Secondary",cssVar:"--color-text-secondary"},{name:"Text Muted",cssVar:"--color-text-muted"},{name:"Border",cssVar:"--color-border"},{name:"Border Subtle",cssVar:"--color-border-subtle"}];return e.jsxs("div",{className:"p-8 space-y-8 bg-background min-h-screen",children:[e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx("h1",{className:"text-3xl font-bold text-text-primary",children:"AceMyJob Color Palette"}),e.jsx("p",{className:"text-text-secondary",children:"Your complete design system color reference"})]}),s.map(t=>e.jsx(de,{...t},t.title)),r.map(t=>e.jsx(de,{...t},t.title)),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-text-primary border-b border-border-subtle pb-2",children:"Semantic Colors (Theme-aware)"}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:a.map(t=>e.jsxs("div",{className:"flex flex-col items-center space-y-2 p-3 rounded-lg border border-border-subtle bg-surface hover:bg-surface-variant transition-colors",children:[e.jsx("div",{className:`w-16 h-16 rounded-lg border border-border shadow-sm ${ie(t.cssVar)}`}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-sm font-medium text-text-primary",children:t.name}),e.jsx("div",{className:"text-xs text-text-muted font-mono",children:t.cssVar})]})]},t.name))})]}),e.jsx("div",{className:"text-center pt-8 border-t border-border-subtle",children:e.jsx("p",{className:"text-text-muted text-sm",children:"Toggle between light and dark themes to see how semantic colors adapt"})})]})},me=h.createContext(void 0),xe=({children:r,defaultTheme:s="system",storageKey:a="acemyjob-ui-theme"})=>{const[t,l]=h.useState(s),[n,c]=h.useState("light"),[o,u]=h.useState(!1);h.useEffect(()=>{const m=localStorage.getItem(a);m&&l(m),u(!0)},[a]),h.useEffect(()=>{if(!o)return;const m=window.document.documentElement,g=()=>{let f;t==="system"?f=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":f=t,c(f),m.classList.remove("light","dark"),m.classList.add(f)};if(g(),t==="system"){const f=window.matchMedia("(prefers-color-scheme: dark)"),v=()=>g();return f.addEventListener("change",v),()=>f.removeEventListener("change",v)}},[t,o]);const d={theme:t,setTheme:m=>{localStorage.setItem(a,m),l(m)},resolvedTheme:n};return e.jsx(me.Provider,{value:d,children:r})},he=()=>{const r=h.useContext(me);if(r===void 0)throw new Error("useTheme must be used within a ThemeProvider");return r},fe=()=>{const{theme:r,setTheme:s}=he(),[a,t]=h.useState(!1);if(h.useEffect(()=>{t(!0)},[]),!a)return e.jsxs("button",{className:"flex items-center gap-2 px-3 py-2 text-sm font-medium text-text-secondary hover:text-text-primary bg-surface hover:bg-surface-variant border border-border-subtle rounded-md transition-colors","aria-label":"Loading theme toggle",children:[e.jsx("div",{className:"w-4 h-4 animate-pulse bg-text-muted rounded"}),e.jsx("span",{className:"hidden sm:inline",children:"Loading..."})]});const l=()=>{s(r==="light"?"dark":r==="dark"?"system":"light")},n=()=>{switch(r){case"light":return e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})});case"dark":return e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})});case"system":return e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}},c=()=>{switch(r){case"light":return"Light";case"dark":return"Dark";case"system":return"System"}};return e.jsxs("button",{onClick:l,className:"flex items-center gap-2 px-3 py-2 text-sm font-medium text-text-secondary hover:text-text-primary bg-surface hover:bg-surface-variant border border-border-subtle rounded-md transition-colors","aria-label":`Current theme: ${c()}. Click to cycle themes.`,children:[n(),e.jsx("span",{className:"hidden sm:inline",children:c()})]})},Ke=()=>e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"fixed top-4 right-4 z-10",children:e.jsx(fe,{})}),e.jsx(ue,{})]}),Qe=()=>e.jsx(xe,{defaultTheme:"system",storageKey:"acemyjob-demo-theme",children:e.jsx(Ke,{})});function er({label:r,children:s,helperText:a,errorText:t,required:l=!1,className:n=""}){return e.jsxs("div",{className:`space-y-2 ${n}`,children:[e.jsxs("label",{className:"block text-sm font-medium text-text-primary",children:[r,l&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),s,t&&e.jsx("p",{className:"text-xs text-error-600",children:t}),a&&!t&&e.jsx("p",{className:"text-xs text-text-muted",children:a})]})}const ge=h.forwardRef(({className:r="",leftIcon:s,rightIcon:a,error:t=!1,fullWidth:l=!0,disabled:n,...c},o)=>{const u="px-3 py-2 border rounded-lg transition-colors text-sm",d=t?"border-error-300 focus:ring-2 focus:ring-error-500 focus:border-transparent":"border-border focus:ring-2 focus:ring-reseda-green-500 focus:border-transparent",m=n?"bg-surface-variant text-text-muted cursor-not-allowed":"bg-surface text-text-primary",g=l?"w-full":"",f=s||a?"relative flex items-center":"",v=`${u} ${d} ${m} ${g} ${s?"pl-10":""} ${a?"pr-10":""} ${r}`;return e.jsxs("div",{className:f,children:[s&&e.jsx("div",{className:"absolute left-3 flex items-center pointer-events-none text-text-muted",children:s}),e.jsx("input",{ref:o,className:v,disabled:n,...c}),a&&e.jsx("div",{className:"absolute right-3 flex items-center pointer-events-none text-text-muted",children:a})]})});ge.displayName="Input";const be=h.forwardRef(({options:r,placeholder:s,className:a="",error:t=!1,fullWidth:l=!0,disabled:n,...c},o)=>{const f=`px-3 py-2 border rounded-lg transition-colors text-sm appearance-none ${t?"border-error-300 focus:ring-2 focus:ring-error-500 focus:border-transparent":"border-border focus:ring-2 focus:ring-reseda-green-500 focus:border-transparent"} ${n?"bg-surface-variant text-text-muted cursor-not-allowed":"bg-surface text-text-primary"} ${l?"w-full":""} pr-10 ${a}`;return e.jsxs("div",{className:"relative flex items-center",children:[e.jsxs("select",{ref:o,className:f,disabled:n,...c,children:[s&&e.jsx("option",{value:"",disabled:!0,children:s}),r.map(v=>e.jsx("option",{value:v.value,children:v.label},v.value))]}),e.jsx(S.ChevronDownIcon,{className:"absolute right-3 w-4 h-4 text-text-muted pointer-events-none"})]})});be.displayName="Select";function rr({title:r,titleId:s,...a},t){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},a),r?w.createElement("title",{id:s},r):null,w.createElement("path",{fillRule:"evenodd",d:"M2 6.75A.75.75 0 0 1 2.75 6h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 6.75Zm0 6.5a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"}))}const ve=w.forwardRef(rr);function sr({title:r,titleId:s,...a},t){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},a),r?w.createElement("title",{id:s},r):null,w.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const pe=w.forwardRef(sr);function ar({title:r,titleId:s,...a},t){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},a),r?w.createElement("title",{id:s},r):null,w.createElement("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"}))}const J=w.forwardRef(ar);function je({children:r,variant:s="default",size:a="md",removable:t=!1,onRemove:l,className:n="",style:c,colorClass:o}){const u={default:"bg-surface-variant text-text-secondary",success:"bg-success-50 text-success-700",error:"bg-error-50 text-error-700",warning:"bg-warning-50 text-warning-700",info:"bg-info-50 text-info-700"},d={sm:"px-2 py-0.5 text-xs",md:"px-3 py-1 text-sm",lg:"px-4 py-1.5 text-base"},m=o||u[s];return e.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full ${m} ${d[a]} ${n}`,style:c,children:[r,t&&l&&e.jsx("button",{onClick:l,className:"ml-1 hover:opacity-70","aria-label":"Remove badge",children:e.jsx(J,{className:"w-3 h-3"})})]})}const ye=h.forwardRef(({tags:r,onTagsChange:s,onAddTag:a,onRemoveTag:t,placeholder:l="Add a tag and press Enter",error:n=!1,fullWidth:c=!0,maxTags:o,duplicateCheck:u=!0,disabled:d,className:m="",...g},f)=>{const[v,p]=h.useState(""),$=j=>{j.key==="Enter"&&v.trim()?(j.preventDefault(),E(v.trim())):j.key==="Backspace"&&!v&&r.length>0&&B(r[r.length-1])},E=j=>{if(o&&r.length>=o||u&&r.includes(j))return;const C=[...r,j];s(C),a?.(j),p("")},B=j=>{const C=r.filter(D=>D!==j);s(C),t?.(j)},y=`w-full px-3 py-2 border rounded-lg transition-colors text-sm ${n?"border-error-300 focus:ring-2 focus:ring-error-500 focus:border-transparent":"border-border focus:ring-2 focus:ring-reseda-green-500 focus:border-transparent"} ${d?"bg-surface-variant text-text-muted cursor-not-allowed":"bg-surface text-text-primary"} ${c?"w-full":""} ${m}`;return e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:r.map(j=>e.jsx(je,{removable:!0,onRemove:()=>B(j),variant:"default",children:j},j))}),e.jsx("input",{ref:f,type:"text",className:y,placeholder:l,value:v,onChange:j=>p(j.target.value),onKeyDown:$,disabled:d||(o?r.length>=o:!1),...g}),o&&e.jsxs("p",{className:"text-xs text-text-muted",children:[r.length," / ",o]})]})});ye.displayName="TagInput";const we={variant:{default:"bg-reseda-green-500 text-white hover:bg-reseda-green-600 focus-visible:ring-reseda-green-500",destructive:"bg-error-500 text-white hover:bg-error-600 focus-visible:ring-error-500",outline:"border border-border bg-background hover:bg-surface-variant hover:text-text-primary focus-visible:ring-reseda-green-500",secondary:"bg-khaki-500 text-white hover:bg-khaki-600 focus-visible:ring-khaki-500",ghost:"hover:bg-surface-variant hover:text-text-primary focus-visible:ring-reseda-green-500",link:"text-reseda-green-500 underline-offset-4 hover:underline focus-visible:ring-reseda-green-500",none:""},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",xl:"h-12 rounded-md px-10 text-base",icon:"h-10 w-10"}},tr="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",nr=(...r)=>r.filter(Boolean).join(" "),M=h.forwardRef(({className:r,variant:s="default",size:a="default",fullWidth:t=!1,loading:l=!1,leftIcon:n,rightIcon:c,children:o,disabled:u,...d},m)=>{const g=u||l,f=nr(tr,we.variant[s],we.size[a],t?"w-full":"",r);return e.jsxs("button",{className:f,ref:m,disabled:g,...d,children:[l&&e.jsxs("svg",{className:"mr-2 h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),!l&&n&&e.jsx("span",{className:"mr-2",children:n}),o,!l&&c&&e.jsx("span",{className:"ml-2",children:c})]})});M.displayName="Button";const Ne={provider:{linkedin:"bg-[#0077B5] hover:bg-[#005885] text-white focus-visible:ring-[#0077B5]"},iconPosition:{left:"flex-row",right:"flex-row-reverse",only:"justify-center"}},lr=(...r)=>r.filter(Boolean).join(" "),Ce=h.forwardRef(({className:r,provider:s,iconPosition:a="left",icon:t,showText:l=!0,children:n,size:c="default",fullWidth:o=!0,...u},d)=>{const g=t||{linkedin:e.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})}[s],v=n||(l?{linkedin:"Continue with LinkedIn"}[s]:""),p=lr("relative overflow-hidden transition-all duration-200",Ne.provider[s],Ne.iconPosition[a],r);return e.jsxs(M,{ref:d,variant:"none",className:p,size:c,fullWidth:o,leftIcon:a==="left"?g:void 0,rightIcon:a==="right"?g:void 0,...u,children:[a==="only"&&g,a!=="only"&&v]})});Ce.displayName="SocialButton";function Y({variant:r,title:s,message:a,icon:t,onClose:l,className:n=""}){const o={success:{bg:"bg-success-50",border:"border-success-200",text:"text-success-700",icon:e.jsx(S.CheckCircleIcon,{className:"h-5 w-5"})},error:{bg:"bg-error-50",border:"border-error-200",text:"text-error-700",icon:e.jsx(S.XCircleIcon,{className:"h-5 w-5"})},warning:{bg:"bg-warning-50",border:"border-warning-200",text:"text-warning-700",icon:e.jsx(S.ExclamationCircleIcon,{className:"h-5 w-5"})},info:{bg:"bg-info-50",border:"border-info-200",text:"text-info-700",icon:e.jsx(S.InformationCircleIcon,{className:"h-5 w-5"})}}[r];return e.jsx("div",{className:`${o.bg} border ${o.border} rounded-md p-3 ${n}`,role:"alert",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`flex-shrink-0 ${o.text}`,children:t||o.icon}),e.jsxs("div",{className:"flex-1",children:[s&&e.jsx("p",{className:`text-sm font-medium ${o.text}`,children:s}),e.jsx("p",{className:`text-sm ${o.text}`,children:a})]}),l&&e.jsx("button",{onClick:l,className:`flex-shrink-0 ${o.text} hover:opacity-70`,"aria-label":"Close alert",children:"✕"})]})})}function or({onFileChange:r,onAnalyze:s,uploadedFile:a,fileError:t,onCancelUpload:l,isAnalyzing:n=!1,analyzeError:c,analyzeSuccess:o,accept:u=".pdf,.docx",label:d="Upload File",description:m="PDF, DOCX up to 5MB",analyzeButtonLabel:g="Analyze",disabled:f=!1,showAnalyzeButton:v=!0}){const p=h.useRef(null),[$,E]=h.useState(!1);h.useEffect(()=>{!a&&p.current&&(p.current.value="")},[a]);const B=k=>{k.preventDefault(),k.stopPropagation(),k.type==="dragenter"||k.type==="dragover"?E(!0):k.type==="dragleave"&&E(!1)},R=k=>{if(k.preventDefault(),k.stopPropagation(),E(!1),k.dataTransfer.files&&k.dataTransfer.files[0]){const I={target:{files:k.dataTransfer.files}};r(I)}};return e.jsxs("div",{className:"mt-6 pt-6 border-t border-border",children:[e.jsx("h3",{className:"text-sm font-medium text-text-primary mb-3",children:d}),e.jsxs("label",{className:"block",children:[e.jsx("input",{ref:p,type:"file",accept:u,onChange:r,className:"hidden",id:"file-upload",disabled:f}),e.jsx("div",{onDragEnter:B,onDragLeave:B,onDragOver:B,onDrop:R,className:`border-2 border-dashed rounded-lg p-6 text-center transition cursor-pointer ${$?"border-reseda-green-700 bg-reseda-green-50":"border-border hover:border-reseda-green-700"} ${f?"opacity-50 cursor-not-allowed":""}`,children:a&&!t?e.jsxs("div",{children:[e.jsx("svg",{className:"mx-auto h-12 w-12 text-success-500",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"})}),e.jsx("div",{className:"mt-3",children:e.jsx(Y,{variant:"success",message:"File uploaded successfully"})}),e.jsx("p",{className:"text-sm text-text-secondary mt-2 break-words",children:a.name}),e.jsxs("p",{className:"text-xs text-text-muted mt-1",children:[(a.size/(1024*1024)).toFixed(2),"MB"]}),e.jsx(M,{variant:"link",type:"button",onClick:k=>{k.preventDefault(),l?.()},className:"mt-3 text-error-600 hover:text-error-700 h-auto p-0",children:"✕ Cancel"})]}):e.jsxs("div",{children:[e.jsx("svg",{className:"mx-auto h-12 w-12 text-text-muted",stroke:"currentColor",fill:"none",viewBox:"0 0 48 48",children:e.jsx("path",{d:"M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsxs("p",{className:"mt-2 text-sm text-text-secondary",children:[e.jsx("span",{className:"font-medium text-reseda-green-700",children:"Upload a file"})," ","or drag and drop"]}),e.jsx("p",{className:"text-xs text-text-muted mt-1",children:m})]})})]}),t&&e.jsx("div",{className:"mt-3",children:e.jsx(Y,{variant:"error",message:t})}),c&&e.jsx("div",{className:"mt-3",children:e.jsx(Y,{variant:"error",message:c})}),o&&e.jsx("div",{className:"mt-3",children:e.jsx(Y,{variant:"success",message:o})}),v&&e.jsx(M,{variant:"default",onClick:s,disabled:!a||n||f,loading:n,fullWidth:!0,className:"mt-3",children:g})]})}const ke=h.forwardRef(({className:r="",error:s=!1,fullWidth:a=!0,autoResize:t=!1,maxLength:l,showCharCount:n=!1,disabled:c,value:o,onChange:u,...d},m)=>{const $=`px-3 py-2 border rounded-lg transition-colors text-sm font-normal resize-none ${s?"border-error-300 focus:ring-2 focus:ring-error-500 focus:border-transparent":"border-border focus:ring-2 focus:ring-reseda-green-500 focus:border-transparent"} ${c?"bg-surface-variant text-text-muted cursor-not-allowed":"bg-surface text-text-primary"} ${a?"w-full":""} ${r}`,E=R=>{t&&(R.target.style.height="auto",R.target.style.height=`${R.target.scrollHeight}px`),u?.(R)},B=typeof o=="string"?o.length:0;return e.jsxs("div",{className:"space-y-1",children:[e.jsx("textarea",{ref:m,className:$,disabled:c,value:o,onChange:E,maxLength:l,...d}),n&&l&&e.jsxs("p",{className:"text-xs text-text-muted text-right",children:[B," / ",l]})]})});ke.displayName="Textarea";function cr({options:r,selectedValues:s,onSelectionChange:a,layout:t="vertical",columns:l=2,disabled:n=!1,error:c=!1}){const o=g=>{const f=s.includes(g)?s.filter(v=>v!==g):[...s,g];a(f)},u={vertical:"space-y-3",horizontal:"flex flex-wrap gap-3",grid:`grid grid-cols-${l} gap-3`},d=t==="grid"?"grid gap-3":u[t],m=t==="grid"?`md:grid-cols-${l}`:"";return e.jsx("div",{className:`${d} ${m}`,children:r.map(g=>{const f=s.includes(g.value),p=f?"border-reseda-green-500 bg-reseda-green-50 ring-2 ring-reseda-green-200":`border-${c?"border-error-300":"border-border"} hover:border-border-subtle hover:bg-surface-variant`;return e.jsxs("label",{className:`relative flex items-start p-3 border rounded-lg cursor-pointer transition-all ${p} ${n?"opacity-50 cursor-not-allowed":""}`,children:[e.jsx("input",{type:"checkbox",checked:f,onChange:()=>o(g.value),disabled:n,className:"sr-only"}),g.icon&&e.jsx("div",{className:"mr-3 flex-shrink-0 text-text-secondary",children:g.icon}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-text-primary",children:g.label}),g.description&&e.jsx("div",{className:"text-sm text-text-secondary",children:g.description})]}),f&&e.jsx("div",{className:"text-reseda-green-500 flex-shrink-0",children:e.jsx("svg",{className:"w-5 h-5",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"})})})]},g.value)})})}function ir({options:r,selectedValue:s,onSelectionChange:a,layout:t="vertical",columns:l=2,disabled:n=!1,error:c=!1,name:o="radio-group"}){const d=t==="grid"?`grid gap-3 md:grid-cols-${l}`:{vertical:"space-y-3",horizontal:"flex flex-wrap gap-3",grid:"grid gap-3"}[t];return e.jsx("div",{className:d,children:r.map(m=>{const g=s===m.value,v=g?"border-reseda-green-500 bg-reseda-green-50 ring-2 ring-reseda-green-200":`border-${c?"border-error-300":"border-border"} hover:border-border-subtle hover:bg-surface-variant`;return e.jsxs("label",{className:`relative flex items-start p-3 border rounded-lg cursor-pointer transition-all ${v} ${n?"opacity-50 cursor-not-allowed":""}`,children:[e.jsx("input",{type:"radio",name:o,value:m.value,checked:g,onChange:()=>a(m.value),disabled:n,className:"sr-only"}),m.icon&&e.jsx("div",{className:"mr-3 flex-shrink-0 text-text-secondary",children:m.icon}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-text-primary",children:m.label}),m.description&&e.jsx("div",{className:"text-sm text-text-secondary",children:m.description})]}),g&&e.jsx("div",{className:"text-reseda-green-500 flex-shrink-0",children: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"})})})]},m.value)})})}function dr({stats:r,columns:s=4,className:a=""}){const t={2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"}[s],l={"moss-green":{bg:"bg-moss-green-50",text:"text-reseda-green-700",value:"text-reseda-green-100"},success:{bg:"bg-khaki-50",text:"text-success-600",value:"text-success-900"},warning:{bg:"bg-peach-yellow-50",text:"text-warning-600",value:"text-warning-900"},"earth-yellow":{bg:"bg-sunglow-50",text:"text-earth-yellow-700",value:"text-earth-yellow-100"}};return e.jsx("div",{className:`grid ${t} gap-4 mb-6 bg-surface p-6 rounded-lg ${a}`,children:r.map((n,c)=>{const o=l[n.color||"moss-green"];return e.jsxs("div",{className:`${o.bg} rounded-lg p-4`,children:[n.icon&&e.jsx("div",{className:"mb-2",children:n.icon}),e.jsx("p",{className:`text-sm ${o.text} font-medium`,children:n.label}),e.jsx("p",{className:`text-2xl font-bold ${o.value} mt-1`,children:n.value})]},c)})})}function ur({items:r,allowMultiple:s=!1,defaultOpenId:a,onOpenChange:t,className:l=""}){const[n,c]=h.useState(()=>a?Array.isArray(a)?a:[a]:[]),o=u=>{let d;s?d=n.includes(u)?n.filter(m=>m!==u):[...n,u]:d=n.includes(u)?[]:[u],c(d),t?.(d)};return e.jsx("div",{className:`space-y-2 ${l}`,children:r.map(u=>{const d=n.includes(u.id);return e.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[e.jsxs("button",{onClick:()=>o(u.id),className:"w-full px-4 py-3 flex items-center justify-between hover:bg-surface-variant transition-colors text-left",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[u.icon&&e.jsx("div",{className:"flex-shrink-0 text-text-secondary",children:u.icon}),e.jsx("h3",{className:"font-medium text-text-primary",children:u.title})]}),e.jsx(S.ChevronDownIcon,{className:`w-5 h-5 text-text-secondary transition-transform flex-shrink-0 ${d?"rotate-180":""}`})]}),d&&e.jsx("div",{className:"border-t border-border px-4 py-3 bg-surface-variant text-text-primary",children:u.content})]},u.id)})})}function mr({icon:r,title:s,subtitle:a,metadata:t,isSelected:l=!1,isActive:n=!1,variant:c="default",actions:o,onClick:u,className:d=""}){const m=p=>{const $=p.target;$.tagName==="BUTTON"||$.closest("button")||u?.(p)},f=(()=>{if(n)switch(c){case"success":return"border-2 border-reseda-green-700 bg-success-50";case"warning":return"border-2 border-persian-orange-700 bg-warning-50";case"error":return"border-2 border-error-700 bg-error-50";default:return"border-2 border-reseda-green-700 bg-success-50"}return"border border-border hover:border-border-subtle hover:bg-surface-variant"})(),v=l?"ring-2 ring-reseda-green-700":"";return e.jsx("div",{onClick:m,className:`rounded-lg p-4 cursor-pointer transition ${f} ${v} ${d}`,children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1 flex items-start gap-3",children:[r&&e.jsx("div",{className:"shrink-0",children:r}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-medium text-text-primary",children:s}),a&&e.jsx("p",{className:"text-sm text-text-secondary mt-1",children:a}),t&&e.jsx("div",{className:"mt-2",children:t})]})]}),e.jsx("div",{className:"ml-2 flex items-center gap-1 shrink-0",children:o.map((p,$)=>e.jsx(M,{variant:p.variant||"ghost",size:p.size||"sm",onClick:p.onClick,disabled:p.disabled,loading:p.loading,title:p.label,className:p.className,leftIcon:p.icon&&p.size!=="icon"?p.icon:void 0,children:p.size==="icon"?p.icon:p.label},$))})]})})}function xr({children:r,variant:s="default",isActive:a=!1,onClick:t,className:l=""}){const n="rounded-lg transition-all",c={default:"border border-border p-4",surface:"bg-surface-variant p-4",elevated:"bg-surface shadow-md p-6",interactive:`border-2 p-4 cursor-pointer ${a?"border-success-500 bg-success-50":"border-border bg-surface hover:border-border-subtle"}`};return e.jsx("div",{className:`${n} ${c[s]} ${l}`,onClick:t,role:t?"button":void 0,tabIndex:t?0:void 0,onKeyDown:t?o=>{(o.key==="Enter"||o.key===" ")&&t()}:void 0,children:r})}function hr({title:r,children:s,subtitle:a,spacing:t="normal",className:l=""}){const n={compact:"space-y-3",normal:"space-y-6",spacious:"space-y-8"};return e.jsxs("div",{className:`${n[t]} ${l}`,children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-text-primary",children:r}),a&&e.jsx("p",{className:"text-sm text-text-secondary mt-1",children:a})]}),s]})}function fr({title:r,subtitle:s,metadata:a,sections:t,className:l=""}){return e.jsxs("div",{className:`space-y-6 ${l}`,children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-start justify-between mb-1",children:[e.jsx("h2",{className:"text-xl font-semibold text-text-primary",children:r}),a&&e.jsx("div",{className:"text-sm text-text-secondary",children:a})]}),s&&e.jsx("p",{className:"text-sm text-text-secondary",children:s})]}),t.map((n,c)=>e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-text-primary mb-3",children:n.heading}),n.content]},c))]})}function gr({title:r,description:s,centered:a=!1,titleSize:t="md"}){const l={sm:"text-2xl",md:"text-3xl",lg:"text-4xl"},n=a?"text-center":"",c=a?"max-w-2xl mx-auto":"";return e.jsxs("div",{className:`mb-8 ${n}`,children:[e.jsx("h1",{className:`${l[t]} font-bold text-text-primary`,children:r}),e.jsx("p",{className:`mt-2 text-text-secondary ${c}`,children:s})]})}function br({icon:r,title:s,description:a,isSelected:t=!1,onClick:l,disabled:n=!1,className:c=""}){const o="p-4 border rounded-lg transition-all text-center cursor-pointer",u=t?"border-reseda-green-500 bg-reseda-green-50 ring-2 ring-reseda-green-200":"border-border hover:border-border-subtle hover:bg-surface-variant",d=n?"opacity-50 cursor-not-allowed":"";return e.jsxs("div",{className:`${o} ${u} ${d} ${c}`,onClick:()=>!n&&l?.(),role:"button",tabIndex:n?-1:0,onKeyDown:m=>{!n&&(m.key==="Enter"||m.key===" ")&&l?.()},children:[r&&e.jsx("div",{className:"mb-3 flex justify-center",children:e.jsx("div",{className:"text-text-secondary",children:r})}),e.jsx("h3",{className:"font-medium text-text-primary mb-1",children:s}),a&&e.jsx("p",{className:"text-xs text-text-secondary",children:a}),t&&e.jsx("div",{className:"mt-3 flex justify-center",children:e.jsx("div",{className:"text-reseda-green-500",children:e.jsx("svg",{className:"w-5 h-5",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"})})})})]})}const $e=h.forwardRef(({value:r,onChange:s,min:a=0,max:t=100,step:l=1,showValue:n=!0,showLabels:c=!1,minLabel:o,maxLabel:u,error:d=!1,fullWidth:m=!0,disabled:g,className:f="",...v},p)=>{const k=`w-full h-2 rounded-lg appearance-none cursor-pointer ${d?"bg-error-200 accent-error-500":"bg-border accent-reseda-green-500"} ${g?"opacity-50 cursor-not-allowed":""} ${m?"w-full":""} ${f}`,I=(r-a)/(t-a)*100;return e.jsxs("div",{className:"space-y-2",children:[c&&(o||u)&&e.jsxs("div",{className:"flex justify-between text-xs text-text-muted",children:[o&&e.jsx("span",{children:o}),u&&e.jsx("span",{children:u})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{ref:p,type:"range",min:a,max:t,step:l,value:r,onChange:F=>s(Number(F.target.value)),disabled:g,className:k,...v}),n&&e.jsx("span",{className:"text-sm font-medium text-text-primary min-w-[3rem] text-right",children:r})]}),e.jsx("div",{className:"h-1 bg-border rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-reseda-green-500 transition-all",style:{width:`${I}%`}})})]})});$e.displayName="Slider";function Ve({id:r,index:s,previewText:a,defaultExpanded:t=!1,children:l,tooltipContent:n,onRemove:c,className:o=""}){const[u,d]=h.useState(t),{attributes:m,listeners:g,setNodeRef:f,transform:v,transition:p,isDragging:$}=Fe.useSortable({id:r}),E={transform:ze.CSS.Transform.toString(v),transition:p,opacity:$?.5:1};return e.jsx("div",{ref:f,style:E,className:`border border-border rounded-md bg-surface-variant ${o}`,children:u?e.jsxs("div",{className:"p-3",children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsx("button",{type:"button",...m,...g,className:"h-auto w-auto p-1 cursor-grab active:cursor-grabbing rounded hover:bg-surface-variant inline-flex items-center justify-center","aria-label":"Drag to reorder",children:e.jsx(ve,{className:"w-4 h-4"})}),e.jsxs("span",{className:"text-sm font-medium text-text-secondary flex-1 cursor-pointer select-none",onClick:()=>d(!1),children:["Item ",s+1]}),e.jsx(M,{type:"button",variant:"ghost",size:"icon",onClick:()=>d(!1),className:"h-auto w-auto p-1","aria-label":"Collapse",leftIcon:e.jsx(pe,{className:"w-4 h-4 transition-transform rotate-90"})}),e.jsx(M,{type:"button",variant:"ghost",size:"icon",onClick:c,className:"h-auto w-auto p-1 text-error-600 hover:text-error-800","aria-label":"Remove",leftIcon:e.jsx(J,{className:"w-4 h-4"})})]}),l]}):e.jsxs("div",{className:"relative group",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",children:[e.jsx("button",{type:"button",...m,...g,className:"h-auto w-auto p-1 cursor-grab active:cursor-grabbing flex-shrink-0 rounded hover:bg-surface-variant inline-flex items-center justify-center","aria-label":"Drag to reorder",children:e.jsx(ve,{className:"w-4 h-4"})}),e.jsx("span",{className:"flex-1 text-sm text-text-secondary truncate cursor-pointer select-none",onClick:()=>d(!0),children:a}),e.jsx(M,{type:"button",variant:"ghost",size:"icon",onClick:()=>d(!0),className:"h-auto w-auto p-1 flex-shrink-0","aria-label":"Expand",leftIcon:e.jsx(pe,{className:"w-4 h-4 transition-transform"})}),e.jsx(M,{type:"button",variant:"ghost",size:"icon",onClick:c,className:"h-auto w-auto p-1 text-error-600 hover:text-error-800 flex-shrink-0","aria-label":"Remove",leftIcon:e.jsx(J,{className:"w-4 h-4"})})]}),n&&e.jsx("div",{className:"absolute left-0 top-full mt-1 z-10 w-80 bg-gray-900 text-white text-xs rounded-md p-3 shadow-lg opacity-0 group-hover:opacity-100 pointer-events-none transition-opacity duration-150",children:n})]})})}Ve.displayName="SortableItem";const vr={bg:"bg-indigo-600",activeBg:"bg-indigo-700",text:"text-indigo-200",activeText:"text-white",hoverBg:"hover:bg-indigo-700",hoverText:"hover:text-white"};function A(...r){return r.filter(Boolean).join(" ")}function Te({item:r,colorScheme:s}){const[a,t]=h.useState(r.current||r.children?.some(n=>n.current)),l=r.children&&r.children.length>0;return e.jsxs("li",{children:[e.jsx("div",{children:e.jsxs("a",{href:l?void 0:r.href,onClick:n=>{l&&(n.preventDefault(),t(!a))},className:A(r.current?`${s.activeBg} ${s.activeText}`:`${s.text} ${s.hoverBg} ${s.hoverText}`,"group flex items-center justify-between gap-x-3 rounded-md p-2 text-sm/6 font-semibold",l?"cursor-pointer":""),children:[e.jsxs("div",{className:"flex items-center gap-x-3",children:[e.jsx(r.icon,{"aria-hidden":"true",className:A(r.current?s.activeText:`${s.text} group-${s.hoverText}`,"size-6 shrink-0")}),r.name]}),l&&e.jsx(S.ChevronDownIcon,{className:A("size-5 shrink-0 transition-transform",a?"rotate-180":"",r.current?s.activeText:s.text)})]})}),l&&a&&e.jsx("ul",{className:"mt-1 ml-9 space-y-1",children:r.children.map(n=>e.jsx("li",{children:e.jsxs("a",{href:n.href,className:A(n.current?`${s.activeBg} ${s.activeText}`:`${s.text} ${s.hoverBg} ${s.hoverText}`,"group flex gap-x-3 rounded-md p-2 text-sm/6 font-semibold"),children:[e.jsx(n.icon,{"aria-hidden":"true",className:A(n.current?s.activeText:`${s.text} group-${s.hoverText}`,"size-5 shrink-0")}),n.name]})},n.name))})]})}function pr({company:r,profile:s,navigation:a,colorScheme:t=vr}){const[l,n]=h.useState(!1);return e.jsx(e.Fragment,{children:e.jsxs("div",{children:[e.jsxs(q.Dialog,{open:l,onClose:n,className:"relative z-50 lg:hidden",children:[e.jsx(q.DialogBackdrop,{transition:!0,className:"fixed inset-0 bg-gray-900/80 transition-opacity duration-300 ease-linear data-closed:opacity-0"}),e.jsx("div",{className:"fixed inset-0 flex",children:e.jsxs(q.DialogPanel,{transition:!0,className:"relative mr-16 flex w-full max-w-xs flex-1 transform transition duration-300 ease-in-out data-closed:-translate-x-full",children:[e.jsx(q.TransitionChild,{children:e.jsx("div",{className:"absolute top-0 left-full flex w-16 justify-center pt-5 duration-300 ease-in-out data-closed:opacity-0",children:e.jsxs("button",{type:"button",onClick:()=>n(!1),className:"-m-2.5 p-2.5",children:[e.jsx("span",{className:"sr-only",children:"Close sidebar"}),e.jsx(S.XMarkIcon,{"aria-hidden":"true",className:"size-6 text-white"})]})})}),e.jsxs("div",{className:A("flex grow flex-col gap-y-5 overflow-y-auto px-6 pb-2",t.bg),children:[e.jsx("div",{className:"flex h-16 shrink-0 items-center",children:e.jsx("img",{alt:r.name,src:r.logo,className:"h-8 w-auto"})}),e.jsx("nav",{className:"flex flex-1 flex-col",children:e.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:e.jsx("li",{children:e.jsx("ul",{role:"list",className:"-mx-2 space-y-1",children:a.map(c=>e.jsx(Te,{item:c,colorScheme:t},c.name))})})})})]})]})})]}),e.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:e.jsxs("div",{className:A("flex grow flex-col gap-y-5 overflow-y-auto px-6",t.bg),children:[e.jsx("div",{className:"flex h-16 shrink-0 items-center",children:e.jsx("img",{alt:r.name,src:r.logo,className:"h-8 w-auto"})}),e.jsx("nav",{className:"flex flex-1 flex-col",children:e.jsxs("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:[e.jsx("li",{children:e.jsx("ul",{role:"list",className:"-mx-2 space-y-1",children:a.map(c=>e.jsx(Te,{item:c,colorScheme:t},c.name))})}),e.jsx("li",{className:"-mx-6 mt-auto",children:e.jsxs("a",{href:"#",className:A("flex items-center gap-x-4 px-6 py-3 text-sm/6 font-semibold",t.activeText,t.hoverBg),children:[e.jsx("img",{alt:s.name,src:s.image,className:A("size-8 rounded-full",t.activeBg)}),e.jsx("span",{className:"sr-only",children:"Your profile"}),e.jsx("span",{"aria-hidden":"true",children:s.name})]})})]})})]})}),e.jsxs("div",{className:A("sticky top-0 z-40 flex items-center gap-x-6 px-4 py-4 shadow-xs sm:px-6 lg:hidden",t.bg),children:[e.jsxs("button",{type:"button",onClick:()=>n(!0),className:A("-m-2.5 p-2.5 lg:hidden",t.text),children:[e.jsx("span",{className:"sr-only",children:"Open sidebar"}),e.jsx(S.Bars3Icon,{"aria-hidden":"true",className:"size-6"})]}),e.jsx("div",{className:A("flex-1 text-sm/6 font-semibold",t.activeText),children:"Dashboard"}),e.jsxs("a",{href:"#",children:[e.jsx("span",{className:"sr-only",children:"Your profile"}),e.jsx("img",{alt:s.name,src:s.image,className:A("size-8 rounded-full",t.activeBg)})]})]})]})})}const jr={activeBg:"bg-reseda-green-700",activeText:"text-white",completedBg:"bg-success-500",completedText:"text-white",incompleteBorder:"border-border",incompleteText:"text-text-muted",labelActiveText:"text-reseda-green-800",labelInactiveText:"text-text-muted",connectorBg:"bg-border"};function yr({currentStep:r,steps:s,colorConfig:a}){const t=a||jr;return e.jsx("nav",{className:"mb-10",children:e.jsx("ol",{className:"flex items-center w-full",children:s.map((l,n)=>e.jsxs("li",{className:`flex items-center ${n<s.length-1?"flex-1":""}`,children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:`flex items-center justify-center w-9 h-9 rounded-full text-sm font-semibold shrink-0 ${r===l.number?`${t.activeBg} ${t.activeText}`:r>l.number?`${t.completedBg} ${t.completedText}`:`border-2 ${t.incompleteBorder} ${t.incompleteText}`}`,children:l.number}),e.jsx("span",{className:`ml-3 text-sm font-medium whitespace-nowrap ${r>=l.number?t.labelActiveText:t.labelInactiveText}`,children:l.label})]}),n<s.length-1&&e.jsx("div",{className:`flex-1 h-0.5 mx-4 ${t.connectorBg}`})]},l.number))})})}const wr={activeText:"text-reseda-green-700",activeBorder:"border-reseda-green-700",inactiveText:"text-text-secondary",inactiveHoverText:"hover:text-text-primary",disabledText:"text-text-disabled"};function Nr({tabs:r,activeTab:s,disabled:a=!1,onChange:t,colorConfig:l}){const n=l||wr;return e.jsx("div",{className:"flex border-b border-border mb-6",children:r.map(c=>{const o=s===c.id;return e.jsx(M,{variant:"ghost",onClick:()=>!a&&t(c.id),disabled:a&&!o,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap transition-colors border-b-2 -mb-px ${o?`${n.activeBorder} ${n.activeText}`:a?`border-transparent ${n.disabledText} cursor-not-allowed`:`border-transparent ${n.inactiveText} ${n.inactiveHoverText}`}`,children:c.label},c.id)})})}function Cr({status:r,title:s,message:a,action:t,progress:l,className:n=""}){const o={success:{bg:"bg-success-50",border:"border-success-200",text:"text-success-700",icon:e.jsx(S.CheckCircleIcon,{className:"h-5 w-5"})},error:{bg:"bg-error-50",border:"border-error-200",text:"text-error-700",icon:e.jsx(S.XCircleIcon,{className:"h-5 w-5"})},warning:{bg:"bg-warning-50",border:"border-warning-200",text:"text-warning-700",icon:e.jsx(S.ExclamationCircleIcon,{className:"h-5 w-5"})},info:{bg:"bg-info-50",border:"border-info-200",text:"text-info-700",icon:e.jsx(S.InformationCircleIcon,{className:"h-5 w-5"})},loading:{bg:"bg-blue-50",border:"border-blue-200",text:"text-blue-700",icon:null}}[r];return e.jsx("div",{className:`${o.bg} border ${o.border} rounded-lg p-4 ${n}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[r==="loading"?e.jsxs("svg",{className:"animate-spin h-5 w-5 flex-shrink-0",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):e.jsx("div",{className:`flex-shrink-0 ${o.text}`,children:o.icon}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:`text-sm font-medium ${o.text}`,children:s}),a&&e.jsx("p",{className:`text-xs ${o.text} mt-1`,children:a}),l!==void 0&&e.jsx("div",{className:"mt-2 w-full bg-gray-200 rounded-full h-2",children:e.jsx("div",{className:`h-2 rounded-full transition-all ${o.bg}`,style:{width:`${l}%`}})})]}),t&&e.jsx("button",{onClick:t.onClick,className:`text-sm font-medium ${o.text} hover:opacity-70 flex-shrink-0`,children:t.label})]})})}const X=({role:r,content:s,timestamp:a,className:t=""})=>{const l=r==="user";return e.jsxs("div",{className:`flex gap-3 ${l?"justify-end":"justify-start"} ${t}`,children:[!l&&e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-green-700 flex items-center justify-center text-white text-sm font-semibold",children:"AI"})}),e.jsxs("div",{className:`flex-1 ${l?"max-w-md":""}`,children:[e.jsx("div",{className:`rounded-lg p-3 ${l?"bg-blue-600 text-white rounded-br-none":"bg-gray-100 text-gray-900 rounded-bl-none"}`,children:e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:s})}),a&&e.jsx("p",{className:`text-xs text-gray-400 mt-1 ${l?"text-right":""}`,children:a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),l&&e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-300 flex items-center justify-center text-gray-600 text-sm font-semibold",children:"U"})})]})};X.displayName="ChatMessage";function kr({title:r,titleId:s,...a},t){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},a),r?w.createElement("title",{id:s},r):null,w.createElement("path",{fillRule:"evenodd",d:"M7.5 5.25a3 3 0 0 1 3-3h3a3 3 0 0 1 3 3v.205c.933.085 1.857.197 2.774.334 1.454.218 2.476 1.483 2.476 2.917v3.033c0 1.211-.734 2.352-1.936 2.752A24.726 24.726 0 0 1 12 15.75c-2.73 0-5.357-.442-7.814-1.259-1.202-.4-1.936-1.541-1.936-2.752V8.706c0-1.434 1.022-2.7 2.476-2.917A48.814 48.814 0 0 1 7.5 5.455V5.25Zm7.5 0v.09a49.488 49.488 0 0 0-6 0v-.09a1.5 1.5 0 0 1 1.5-1.5h3a1.5 1.5 0 0 1 1.5 1.5Zm-3 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}),w.createElement("path",{d:"M3 18.4v-2.796a4.3 4.3 0 0 0 .713.31A26.226 26.226 0 0 0 12 17.25c2.892 0 5.68-.468 8.287-1.335.252-.084.49-.189.713-.311V18.4c0 1.452-1.047 2.728-2.523 2.923-2.12.282-4.282.427-6.477.427a49.19 49.19 0 0 1-6.477-.427C4.047 21.128 3 19.852 3 18.4Z"}))}const $r=w.forwardRef(kr);function Vr({title:r,titleId:s,...a},t){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},a),r?w.createElement("title",{id:s},r):null,w.createElement("path",{d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625Z"}),w.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const Tr=w.forwardRef(Vr);function Er({title:r,titleId:s,...a},t){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},a),r?w.createElement("title",{id:s},r):null,w.createElement("path",{d:"M3.478 2.404a.75.75 0 0 0-.926.941l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.404Z"}))}const Sr=w.forwardRef(Er),Ee=({onSend:r,disabled:s=!1,placeholder:a="Ask a question about your resume or the job...",maxLength:t=2e3,className:l=""})=>{const[n,c]=h.useState(""),o=h.useRef(null);h.useEffect(()=>{o.current&&(o.current.style.height="auto",o.current.style.height=`${o.current.scrollHeight}px`)},[n]);const u=()=>{n.trim()&&!s&&(r(n.trim()),c(""))},d=f=>{f.key==="Enter"&&!f.shiftKey?(f.preventDefault(),u()):f.key==="Escape"&&c("")},m=n.length>t,g=n.length>t*.9;return e.jsxs("div",{className:`border-t border-gray-200 bg-white p-4 ${l}`,children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("textarea",{ref:o,value:n,onChange:f=>c(f.target.value),onKeyDown:d,placeholder:a,disabled:s,rows:1,className:"flex-1 resize-none border border-gray-300 rounded-lg p-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:opacity-50 disabled:cursor-not-allowed",style:{maxHeight:"150px"},"aria-label":"Type your message"}),e.jsx("button",{onClick:u,disabled:s||!n.trim()||m,className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors","aria-label":"Send message",children:e.jsx(Sr,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"flex justify-between items-center mt-2",children:[e.jsx("p",{className:"text-xs text-gray-500",children:"Press Enter to send, Shift+Enter for new line"}),g&&e.jsxs("p",{className:`text-xs ${m?"text-red-500":"text-gray-500"}`,children:[n.length,"/",t]})]})]})};Ee.displayName="ChatInput";const K=({message:r="Thinking...",variant:s="dots",className:a=""})=>e.jsxs("div",{className:`flex gap-3 ${a}`,children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-green-700 flex items-center justify-center text-white text-sm font-semibold",children:"AI"})}),e.jsx("div",{className:"flex-1",children:e.jsxs("div",{className:"bg-gray-100 rounded-lg rounded-bl-none p-3 inline-flex items-center gap-2",children:[s==="dots"?e.jsxs("div",{className:"flex gap-1",children:[e.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce"}),e.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.2s"}}),e.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.4s"}})]}):e.jsx("div",{className:"w-4 h-4 border-2 border-gray-300 border-t-gray-600 rounded-full animate-spin"}),e.jsx("span",{className:"text-sm text-gray-600",children:r})]})})]});K.displayName="LoadingIndicator";const Se=({messages:r,isLoading:s=!1,loadingMessage:a="Thinking...",error:t=null,onRetry:l,className:n="",emptyStateMessage:c="Start a conversation"})=>{const o=h.useRef(null),u=h.useRef(null);return h.useEffect(()=>{o.current?.scrollIntoView({behavior:"smooth"})},[r,s]),e.jsxs("div",{ref:u,className:`flex flex-col flex-1 overflow-y-auto bg-white p-4 space-y-4 ${n}`,children:[r.length===0&&!s&&e.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[e.jsx("div",{className:"text-4xl mb-4",children:"💬"}),e.jsx("p",{className:"text-gray-600 font-medium",children:c}),e.jsx("p",{className:"text-gray-400 text-sm mt-2",children:"Ask me anything about your resume or the job requirements!"})]}),r.map((d,m)=>e.jsx(X,{role:d.role,content:d.content,timestamp:d.timestamp},m)),s&&e.jsx(K,{message:a,variant:"dots"}),t&&e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-red-100 flex items-center justify-center",children:e.jsx("span",{className:"text-red-600 text-sm font-semibold",children:"!"})})}),e.jsx("div",{className:"flex-1",children:e.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3",children:[e.jsx("p",{className:"text-sm text-red-800",children:t}),l&&e.jsx("button",{onClick:l,className:"mt-2 text-xs text-red-600 hover:text-red-700 font-medium underline",children:"Try again"})]})})]}),e.jsx("div",{ref:o})]})};Se.displayName="ChatContainer";const Ae=({resumeName:r,jobTitle:s,companyName:a,matchScore:t,onChangeResume:l,onChangeJob:n,className:c=""})=>e.jsx("div",{className:`border-b border-gray-200 bg-gray-50 p-4 ${c}`,children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx(Tr,{className:"w-5 h-5 text-gray-600 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs text-gray-500 font-medium",children:"Resume"}),e.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:r})]})]}),l&&e.jsx("button",{onClick:l,className:"px-3 py-1.5 text-xs font-medium text-blue-600 hover:text-blue-700 hover:bg-blue-50 rounded transition-colors flex-shrink-0","aria-label":"Change resume",children:"Change"})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx($r,{className:"w-5 h-5 text-gray-600 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs text-gray-500 font-medium",children:"Job"}),e.jsxs("div",{className:"truncate",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:s}),a&&e.jsx("p",{className:"text-xs text-gray-500 truncate",children:a})]})]})]}),n&&e.jsx("button",{onClick:n,className:"px-3 py-1.5 text-xs font-medium text-blue-600 hover:text-blue-700 hover:bg-blue-50 rounded transition-colors flex-shrink-0","aria-label":"Change job",children:"Change"})]}),t!==void 0&&e.jsxs("div",{className:"pt-2 border-t border-gray-200",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("p",{className:"text-xs font-medium text-gray-700",children:"Match Score"}),e.jsxs("p",{className:"text-sm font-semibold text-gray-900",children:[t,"%"]})]}),e.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2 overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${t>=90?"bg-green-500":t>=75?"bg-blue-500":t>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${t}%`}})})]})]})});Ae.displayName="AnalysisSummaryBar";const Q={semantic:{none:"bg-error-50 border-error-200 text-error-700",partial:"bg-warning-50 border-warning-200 text-warning-700",full:"bg-success-50 border-success-200 text-success-700"},brand:{none:"bg-persian-orange-900 border-persian-orange-700 text-persian-orange-200",partial:"bg-earth-yellow-900 border-earth-yellow-700 text-earth-yellow-200",full:"bg-moss-green-900 border-reseda-green-700 text-reseda-green-200"},subtle:{none:"bg-surface border-error-300 text-error-700",partial:"bg-surface border-warning-300 text-warning-700",full:"bg-surface border-success-300 text-success-700"}},Ar={semantic:{required:"bg-error-600 text-white",preferred:"bg-reseda-green-600 text-white","nice-to-have":"bg-khaki-500 text-white"},brand:{required:"bg-persian-orange-500 text-white",preferred:"bg-reseda-green-500 text-white","nice-to-have":"bg-beaver-500 text-white"},subtle:{required:"bg-error-100 text-error-800",preferred:"bg-reseda-green-700 text-reseda-green-100","nice-to-have":"bg-khaki-700 text-khaki-100"}},Be=({skills:r,className:s="",colorPreset:a="semantic"})=>{const t=o=>!o.matched||o.match_level==="none"?"✗":o.match_level==="partial"?"~":"✓",l=o=>!o.matched||o.match_level==="none"?Q[a].none:o.match_level==="partial"?Q[a].partial:Q[a].full,n=o=>Ar[a][o],c=(o,u)=>!u||u.length===0?null:e.jsxs("div",{className:"mb-4",children:[e.jsxs("p",{className:"text-xs font-semibold text-text-secondary mb-2",children:[o,":"]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:u.map((d,m)=>e.jsxs("div",{className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border ${l(d)}`,children:[e.jsxs("span",{className:"text-sm font-medium",children:[t(d)," ",d.name]}),e.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${n(d.importance)}`,children:d.importance==="nice-to-have"?"Nice":d.importance})]},m))})]});return e.jsxs("div",{className:s,children:[c("Technical Skills",r.technical||[]),c("Soft Skills",r.soft||[])]})};Be.displayName="SkillTags";const Re=({score:r,showLabel:s=!0,size:a="md",className:t=""})=>{const l=Math.min(Math.max(r,0),100),n=d=>d>=90?"bg-green-500":d>=75?"bg-blue-500":d>=60?"bg-yellow-500":"bg-red-500",c=d=>d>=90?"Excellent match!":d>=75?"Good match":d>=60?"Fair match":"Poor match",o={sm:"h-2",md:"h-4",lg:"h-6"},u={sm:"text-xs",md:"text-sm",lg:"text-base"};return e.jsxs("div",{className:t,children:[s&&e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsx("p",{className:`font-medium text-gray-700 ${u[a]}`,children:"Match Score"}),e.jsxs("p",{className:`font-semibold ${u[a]} ${n(l).replace("bg-","text-")}`,children:[l,"%"]})]}),e.jsx("div",{className:`w-full bg-gray-200 rounded-full overflow-hidden ${o[a]}`,children:e.jsx("div",{className:`${n(l)} ${o[a]} rounded-full transition-all duration-500 ease-out`,style:{width:`${l}%`}})}),s&&e.jsx("p",{className:`text-gray-600 mt-1 ${u[a]}`,children:c(l)})]})};Re.displayName="MatchScoreBar";const De=({responsibilities:r,className:s=""})=>{const a=r.reduce((l,n)=>(l[n.category]||(l[n.category]=[]),l[n.category].push(n),l),{}),t=l=>{switch(l){case"high":return"bg-red-100 text-red-800";case"medium":return"bg-yellow-100 text-yellow-800";case"low":return"bg-gray-100 text-gray-800"}};return e.jsx("div",{className:s,children:Object.entries(a).map(([l,n])=>e.jsxs("div",{className:"mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:l}),n.some(c=>c.importance==="high")&&e.jsx("span",{className:"inline-block w-2 h-2 bg-red-600 rounded-full"}),n.some(c=>c.importance==="medium")&&!n.some(c=>c.importance==="high")&&e.jsx("span",{className:"inline-block w-2 h-2 bg-yellow-600 rounded-full"})]}),e.jsx("ul",{className:"space-y-1.5 ml-2",children:n.map((c,o)=>e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-gray-400 flex-shrink-0",children:"•"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-gray-800",children:c.description}),c.importance!=="low"&&e.jsx("span",{className:`inline-block text-xs px-2 py-0.5 rounded mt-1 ${t(c.importance)}`,children:c.importance==="high"?"High Priority":"Medium Priority"})]})]},o))})]},l))})};De.displayName="ResponsibilitiesList",x.Accordion=ur,x.ActionCard=mr,x.Alert=Y,x.AnalysisSummaryBar=Ae,x.Badge=je,x.Button=M,x.Card=xr,x.ChatContainer=Se,x.ChatInput=Ee,x.ChatMessage=X,x.CheckboxGroup=cr,x.ColorPalette=ue,x.Demo=Qe,x.DetailPanel=fr,x.FileUpload=or,x.FormField=er,x.Input=ge,x.LoadingIndicator=K,x.MatchScoreBar=Re,x.OptionCard=br,x.PageHeader=gr,x.RadioGroup=ir,x.ResponsibilitiesList=De,x.Section=hr,x.Select=be,x.Sidebar=pr,x.SkillTags=Be,x.Slider=$e,x.SocialButton=Ce,x.SortableItem=Ve,x.StatsGrid=dr,x.StatusBanner=Cr,x.Stepper=yr,x.TabBar=Nr,x.TagInput=ye,x.Textarea=ke,x.ThemeProvider=xe,x.ThemeToggle=fe,x.clearAllErrors=qe,x.clearFieldError=Ye,x.getFirstError=He,x.hasErrors=ne,x.useForm=We,x.useTheme=he,x.validateField=te,x.validateForm=W,x.validators=Ue,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
|
|
22
|
+
<%s key={someKey} {...props} />`,V,T,L,T),Pe[T+V]=!0)}if(T=null,N!==void 0&&(a(N),T=""+N),c(v)&&(a(v.key),T=""+v.key),"key"in v){N={};for(var ae in v)ae!=="key"&&(N[ae]=v[ae])}else N=v;return T&&o(N,typeof i=="function"?i.displayName||i.name||"Unknown":i),d(i,T,I,_,l(),N,re,se)}function f(i){typeof i=="object"&&i!==null&&i.$$typeof===b&&i._store&&(i._store.validated=1)}var h=g,b=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),k=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),z=Symbol.for("react.client.reference"),P=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=Object.prototype.hasOwnProperty,Fr=Array.isArray,ee=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(i){return i()}};var Oe,Ie={},Me=h["react-stack-bottom-frame"].bind(h,n)(),_e=ee(t(n)),Pe={};H.Fragment=$,H.jsx=function(i,v,N,V,_){var I=1e4>P.recentlyCreatedOwnerStacks++;return m(i,v,N,!1,V,_,I?Error("react-stack-top-frame"):Me,I?ee(t(i)):_e)},H.jsxs=function(i,v,N,V,_){var I=1e4>P.recentlyCreatedOwnerStacks++;return m(i,v,N,!0,V,_,I?Error("react-stack-top-frame"):Me,I?ee(t(i)):_e)}}()),H}var ce;function Xe(){return ce||(ce=1,process.env.NODE_ENV==="production"?G.exports=Ze():G.exports=Je()),G.exports}var e=Xe();const ie=r=>r.replace("--color-","bg-"),Ke=({name:r,cssVar:s,value:a})=>{const t=`rgb(${a})`;return e.jsxs("div",{className:"flex flex-col items-center space-y-2 p-3 rounded-lg border border-border-subtle bg-surface hover:bg-surface-variant transition-colors",children:[e.jsx("div",{className:`w-16 h-16 rounded-lg border border-border shadow-sm ${ie(s)}`}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-sm font-medium text-text-primary",children:r}),e.jsx("div",{className:"text-xs text-text-muted font-mono",children:s}),e.jsx("div",{className:"text-xs text-text-secondary",children:t})]})]})},de=({title:r,colors:s})=>e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-text-primary border-b border-border-subtle pb-2",children:r}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 xl:grid-cols-11 gap-4",children:s.map(a=>e.jsx(Ke,{...a},a.name))})]}),ue=()=>{const r=[{title:"Success Colors (Green)",colors:[{name:"50",cssVar:"--color-success-50",value:"240 253 244"},{name:"100",cssVar:"--color-success-100",value:"220 252 231"},{name:"200",cssVar:"--color-success-200",value:"187 247 208"},{name:"300",cssVar:"--color-success-300",value:"134 239 172"},{name:"400",cssVar:"--color-success-400",value:"74 222 128"},{name:"500",cssVar:"--color-success-500",value:"34 197 94"},{name:"600",cssVar:"--color-success-600",value:"22 163 74"},{name:"700",cssVar:"--color-success-700",value:"21 128 61"},{name:"800",cssVar:"--color-success-800",value:"22 101 52"},{name:"900",cssVar:"--color-success-900",value:"20 83 45"},{name:"950",cssVar:"--color-success-950",value:"5 46 22"}]},{title:"Warning Colors (Yellow)",colors:[{name:"50",cssVar:"--color-warning-50",value:"254 252 232"},{name:"100",cssVar:"--color-warning-100",value:"254 249 195"},{name:"200",cssVar:"--color-warning-200",value:"254 240 138"},{name:"300",cssVar:"--color-warning-300",value:"253 224 71"},{name:"400",cssVar:"--color-warning-400",value:"250 204 21"},{name:"500",cssVar:"--color-warning-500",value:"234 179 8"},{name:"600",cssVar:"--color-warning-600",value:"202 138 4"},{name:"700",cssVar:"--color-warning-700",value:"161 98 7"},{name:"800",cssVar:"--color-warning-800",value:"133 77 14"},{name:"900",cssVar:"--color-warning-900",value:"113 63 18"},{name:"950",cssVar:"--color-warning-950",value:"66 32 6"}]},{title:"Error Colors (Red)",colors:[{name:"50",cssVar:"--color-error-50",value:"254 242 242"},{name:"100",cssVar:"--color-error-100",value:"254 226 226"},{name:"200",cssVar:"--color-error-200",value:"254 202 202"},{name:"300",cssVar:"--color-error-300",value:"252 165 165"},{name:"400",cssVar:"--color-error-400",value:"248 113 113"},{name:"500",cssVar:"--color-error-500",value:"239 68 68"},{name:"600",cssVar:"--color-error-600",value:"220 38 38"},{name:"700",cssVar:"--color-error-700",value:"185 28 28"},{name:"800",cssVar:"--color-error-800",value:"153 27 27"},{name:"900",cssVar:"--color-error-900",value:"127 29 29"},{name:"950",cssVar:"--color-error-950",value:"69 10 10"}]}],s=[{title:"Reseda Green",colors:[{name:"DEFAULT",cssVar:"--color-reseda-green",value:"121 125 98"},{name:"100",cssVar:"--color-reseda-green-100",value:"24 25 20"},{name:"200",cssVar:"--color-reseda-green-200",value:"49 50 39"},{name:"300",cssVar:"--color-reseda-green-300",value:"73 75 59"},{name:"400",cssVar:"--color-reseda-green-400",value:"97 101 79"},{name:"500",cssVar:"--color-reseda-green-500",value:"121 125 98"},{name:"600",cssVar:"--color-reseda-green-600",value:"150 154 127"},{name:"700",cssVar:"--color-reseda-green-700",value:"177 180 159"},{name:"800",cssVar:"--color-reseda-green-800",value:"203 205 191"},{name:"900",cssVar:"--color-reseda-green-900",value:"229 230 223"}]},{title:"Moss Green",colors:[{name:"DEFAULT",cssVar:"--color-moss-green",value:"155 155 122"},{name:"100",cssVar:"--color-moss-green-100",value:"31 31 24"},{name:"200",cssVar:"--color-moss-green-200",value:"63 63 47"},{name:"300",cssVar:"--color-moss-green-300",value:"94 94 71"},{name:"400",cssVar:"--color-moss-green-400",value:"126 126 95"},{name:"500",cssVar:"--color-moss-green-500",value:"155 155 122"},{name:"600",cssVar:"--color-moss-green-600",value:"174 174 148"},{name:"700",cssVar:"--color-moss-green-700",value:"194 194 175"},{name:"800",cssVar:"--color-moss-green-800",value:"215 215 202"},{name:"900",cssVar:"--color-moss-green-900",value:"235 235 228"}]},{title:"Khaki",colors:[{name:"DEFAULT",cssVar:"--color-khaki",value:"186 165 135"},{name:"100",cssVar:"--color-khaki-100",value:"41 34 23"},{name:"200",cssVar:"--color-khaki-200",value:"82 67 47"},{name:"300",cssVar:"--color-khaki-300",value:"122 101 70"},{name:"400",cssVar:"--color-khaki-400",value:"163 134 94"},{name:"500",cssVar:"--color-khaki-500",value:"186 165 135"},{name:"600",cssVar:"--color-khaki-600",value:"200 183 159"},{name:"700",cssVar:"--color-khaki-700",value:"214 201 183"},{name:"800",cssVar:"--color-khaki-800",value:"227 219 207"},{name:"900",cssVar:"--color-khaki-900",value:"241 237 231"}]},{title:"Desert Sand",colors:[{name:"DEFAULT",cssVar:"--color-desert-sand",value:"217 174 148"},{name:"100",cssVar:"--color-desert-sand-100",value:"54 33 19"},{name:"200",cssVar:"--color-desert-sand-200",value:"109 65 38"},{name:"300",cssVar:"--color-desert-sand-300",value:"163 98 57"},{name:"400",cssVar:"--color-desert-sand-400",value:"199 135 95"},{name:"500",cssVar:"--color-desert-sand-500",value:"217 174 148"},{name:"600",cssVar:"--color-desert-sand-600",value:"225 191 170"},{name:"700",cssVar:"--color-desert-sand-700",value:"233 207 192"},{name:"800",cssVar:"--color-desert-sand-800",value:"240 223 213"},{name:"900",cssVar:"--color-desert-sand-900",value:"248 239 234"}]},{title:"Peach Yellow",colors:[{name:"DEFAULT",cssVar:"--color-peach-yellow",value:"241 220 167"},{name:"100",cssVar:"--color-peach-yellow-100",value:"71 54 11"},{name:"200",cssVar:"--color-peach-yellow-200",value:"141 107 22"},{name:"300",cssVar:"--color-peach-yellow-300",value:"212 161 33"},{name:"400",cssVar:"--color-peach-yellow-400",value:"230 192 96"},{name:"500",cssVar:"--color-peach-yellow-500",value:"241 220 167"},{name:"600",cssVar:"--color-peach-yellow-600",value:"244 227 184"},{name:"700",cssVar:"--color-peach-yellow-700",value:"247 234 202"},{name:"800",cssVar:"--color-peach-yellow-800",value:"249 241 220"},{name:"900",cssVar:"--color-peach-yellow-900",value:"252 248 237"}]},{title:"Sunglow",colors:[{name:"DEFAULT",cssVar:"--color-sunglow",value:"255 203 105"},{name:"100",cssVar:"--color-sunglow-100",value:"72 47 0"},{name:"200",cssVar:"--color-sunglow-200",value:"145 94 0"},{name:"300",cssVar:"--color-sunglow-300",value:"217 141 0"},{name:"400",cssVar:"--color-sunglow-400",value:"255 178 35"},{name:"500",cssVar:"--color-sunglow-500",value:"255 203 105"},{name:"600",cssVar:"--color-sunglow-600",value:"255 214 137"},{name:"700",cssVar:"--color-sunglow-700",value:"255 224 166"},{name:"800",cssVar:"--color-sunglow-800",value:"255 234 196"},{name:"900",cssVar:"--color-sunglow-900",value:"255 245 225"}]},{title:"Earth Yellow",colors:[{name:"DEFAULT",cssVar:"--color-earth-yellow",value:"232 172 101"},{name:"100",cssVar:"--color-earth-yellow-100",value:"58 36 9"},{name:"200",cssVar:"--color-earth-yellow-200",value:"115 71 17"},{name:"300",cssVar:"--color-earth-yellow-300",value:"173 107 26"},{name:"400",cssVar:"--color-earth-yellow-400",value:"223 142 42"},{name:"500",cssVar:"--color-earth-yellow-500",value:"232 172 101"},{name:"600",cssVar:"--color-earth-yellow-600",value:"236 189 131"},{name:"700",cssVar:"--color-earth-yellow-700",value:"241 205 162"},{name:"800",cssVar:"--color-earth-yellow-800",value:"246 222 193"},{name:"900",cssVar:"--color-earth-yellow-900",value:"250 238 224"}]},{title:"Persian Orange",colors:[{name:"DEFAULT",cssVar:"--color-persian-orange",value:"208 140 96"},{name:"100",cssVar:"--color-persian-orange-100",value:"47 27 14"},{name:"200",cssVar:"--color-persian-orange-200",value:"94 55 28"},{name:"300",cssVar:"--color-persian-orange-300",value:"141 82 42"},{name:"400",cssVar:"--color-persian-orange-400",value:"188 109 56"},{name:"500",cssVar:"--color-persian-orange-500",value:"208 140 96"},{name:"600",cssVar:"--color-persian-orange-600",value:"217 165 129"},{name:"700",cssVar:"--color-persian-orange-700",value:"227 187 161"},{name:"800",cssVar:"--color-persian-orange-800",value:"236 210 192"},{name:"900",cssVar:"--color-persian-orange-900",value:"246 232 224"}]},{title:"Chamoisee",colors:[{name:"DEFAULT",cssVar:"--color-chamoisee",value:"181 132 99"},{name:"100",cssVar:"--color-chamoisee-100",value:"38 26 18"},{name:"200",cssVar:"--color-chamoisee-200",value:"76 52 36"},{name:"300",cssVar:"--color-chamoisee-300",value:"114 78 54"},{name:"400",cssVar:"--color-chamoisee-400",value:"153 104 72"},{name:"500",cssVar:"--color-chamoisee-500",value:"181 132 99"},{name:"600",cssVar:"--color-chamoisee-600",value:"196 157 130"},{name:"700",cssVar:"--color-chamoisee-700",value:"211 181 161"},{name:"800",cssVar:"--color-chamoisee-800",value:"226 206 193"},{name:"900",cssVar:"--color-chamoisee-900",value:"240 230 224"}]},{title:"Beaver",colors:[{name:"DEFAULT",cssVar:"--color-beaver",value:"153 123 102"},{name:"100",cssVar:"--color-beaver-100",value:"31 25 20"},{name:"200",cssVar:"--color-beaver-200",value:"61 49 41"},{name:"300",cssVar:"--color-beaver-300",value:"92 74 61"},{name:"400",cssVar:"--color-beaver-400",value:"122 99 82"},{name:"500",cssVar:"--color-beaver-500",value:"153 123 102"},{name:"600",cssVar:"--color-beaver-600",value:"173 150 133"},{name:"700",cssVar:"--color-beaver-700",value:"194 176 163"},{name:"800",cssVar:"--color-beaver-800",value:"214 202 194"},{name:"900",cssVar:"--color-beaver-900",value:"235 229 224"}]}],a=[{name:"Background",cssVar:"--color-background"},{name:"Surface",cssVar:"--color-surface"},{name:"Surface Variant",cssVar:"--color-surface-variant"},{name:"Text Primary",cssVar:"--color-text-primary"},{name:"Text Secondary",cssVar:"--color-text-secondary"},{name:"Text Muted",cssVar:"--color-text-muted"},{name:"Border",cssVar:"--color-border"},{name:"Border Subtle",cssVar:"--color-border-subtle"}];return e.jsxs("div",{className:"p-8 space-y-8 bg-background min-h-screen",children:[e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx("h1",{className:"text-3xl font-bold text-text-primary",children:"AceMyJob Color Palette"}),e.jsx("p",{className:"text-text-secondary",children:"Your complete design system color reference"})]}),s.map(t=>e.jsx(de,{...t},t.title)),r.map(t=>e.jsx(de,{...t},t.title)),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-text-primary border-b border-border-subtle pb-2",children:"Semantic Colors (Theme-aware)"}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:a.map(t=>e.jsxs("div",{className:"flex flex-col items-center space-y-2 p-3 rounded-lg border border-border-subtle bg-surface hover:bg-surface-variant transition-colors",children:[e.jsx("div",{className:`w-16 h-16 rounded-lg border border-border shadow-sm ${ie(t.cssVar)}`}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-sm font-medium text-text-primary",children:t.name}),e.jsx("div",{className:"text-xs text-text-muted font-mono",children:t.cssVar})]})]},t.name))})]}),e.jsx("div",{className:"text-center pt-8 border-t border-border-subtle",children:e.jsx("p",{className:"text-text-muted text-sm",children:"Toggle between light and dark themes to see how semantic colors adapt"})})]})},me=g.createContext(void 0),xe=({children:r,defaultTheme:s="system",storageKey:a="acemyjob-ui-theme"})=>{const[t,l]=g.useState(s),[n,c]=g.useState("light"),[o,u]=g.useState(!1);g.useEffect(()=>{const m=localStorage.getItem(a);m&&l(m),u(!0)},[a]),g.useEffect(()=>{if(!o)return;const m=window.document.documentElement,f=()=>{let h;t==="system"?h=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":h=t,c(h),m.classList.remove("light","dark"),m.classList.add(h)};if(f(),t==="system"){const h=window.matchMedia("(prefers-color-scheme: dark)"),b=()=>f();return h.addEventListener("change",b),()=>h.removeEventListener("change",b)}},[t,o]);const d={theme:t,setTheme:m=>{localStorage.setItem(a,m),l(m)},resolvedTheme:n};return e.jsx(me.Provider,{value:d,children:r})},he=()=>{const r=g.useContext(me);if(r===void 0)throw new Error("useTheme must be used within a ThemeProvider");return r},fe=()=>{const{theme:r,setTheme:s}=he(),[a,t]=g.useState(!1);if(g.useEffect(()=>{t(!0)},[]),!a)return e.jsxs("button",{className:"flex items-center gap-2 px-3 py-2 text-sm font-medium text-text-secondary hover:text-text-primary bg-surface hover:bg-surface-variant border border-border-subtle rounded-md transition-colors","aria-label":"Loading theme toggle",children:[e.jsx("div",{className:"w-4 h-4 animate-pulse bg-text-muted rounded"}),e.jsx("span",{className:"hidden sm:inline",children:"Loading..."})]});const l=()=>{s(r==="light"?"dark":r==="dark"?"system":"light")},n=()=>{switch(r){case"light":return e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})});case"dark":return e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})});case"system":return e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}},c=()=>{switch(r){case"light":return"Light";case"dark":return"Dark";case"system":return"System"}};return e.jsxs("button",{onClick:l,className:"flex items-center gap-2 px-3 py-2 text-sm font-medium text-text-secondary hover:text-text-primary bg-surface hover:bg-surface-variant border border-border-subtle rounded-md transition-colors","aria-label":`Current theme: ${c()}. Click to cycle themes.`,children:[n(),e.jsx("span",{className:"hidden sm:inline",children:c()})]})},Qe=()=>e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"fixed top-4 right-4 z-10",children:e.jsx(fe,{})}),e.jsx(ue,{})]}),er=()=>e.jsx(xe,{defaultTheme:"system",storageKey:"acemyjob-demo-theme",children:e.jsx(Qe,{})});function rr({label:r,children:s,helperText:a,errorText:t,required:l=!1,className:n=""}){return e.jsxs("div",{className:`space-y-2 ${n}`,children:[e.jsxs("label",{className:"block text-sm font-medium text-text-primary",children:[r,l&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),s,t&&e.jsx("p",{className:"text-xs text-error-600",children:t}),a&&!t&&e.jsx("p",{className:"text-xs text-text-muted",children:a})]})}const ge=g.forwardRef(({className:r="",leftIcon:s,rightIcon:a,error:t=!1,fullWidth:l=!0,disabled:n,...c},o)=>{const u="px-3 py-2 border rounded-lg transition-colors text-sm",d=t?"border-error-300 focus:ring-2 focus:ring-error-500 focus:border-transparent":"border-border focus:ring-2 focus:ring-reseda-green-500 focus:border-transparent",m=n?"bg-surface-variant text-text-muted cursor-not-allowed":"bg-surface text-text-primary",f=l?"w-full":"",h=s||a?"relative flex items-center":"",b=`${u} ${d} ${m} ${f} ${s?"pl-10":""} ${a?"pr-10":""} ${r}`;return e.jsxs("div",{className:h,children:[s&&e.jsx("div",{className:"absolute left-3 flex items-center pointer-events-none text-text-muted",children:s}),e.jsx("input",{ref:o,className:b,disabled:n,...c}),a&&e.jsx("div",{className:"absolute right-3 flex items-center pointer-events-none text-text-muted",children:a})]})});ge.displayName="Input";const be=g.forwardRef(({options:r,placeholder:s,className:a="",error:t=!1,fullWidth:l=!0,disabled:n,...c},o)=>{const h=`px-3 py-2 border rounded-lg transition-colors text-sm appearance-none ${t?"border-error-300 focus:ring-2 focus:ring-error-500 focus:border-transparent":"border-border focus:ring-2 focus:ring-reseda-green-500 focus:border-transparent"} ${n?"bg-surface-variant text-text-muted cursor-not-allowed":"bg-surface text-text-primary"} ${l?"w-full":""} pr-10 ${a}`;return e.jsxs("div",{className:"relative flex items-center",children:[e.jsxs("select",{ref:o,className:h,disabled:n,...c,children:[s&&e.jsx("option",{value:"",disabled:!0,children:s}),r.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))]}),e.jsx(E.ChevronDownIcon,{className:"absolute right-3 w-4 h-4 text-text-muted pointer-events-none"})]})});be.displayName="Select";function sr({title:r,titleId:s,...a},t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},a),r?y.createElement("title",{id:s},r):null,y.createElement("path",{fillRule:"evenodd",d:"M2 6.75A.75.75 0 0 1 2.75 6h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 6.75Zm0 6.5a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"}))}const ve=y.forwardRef(sr);function ar({title:r,titleId:s,...a},t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},a),r?y.createElement("title",{id:s},r):null,y.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const pe=y.forwardRef(ar);function tr({title:r,titleId:s,...a},t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},a),r?y.createElement("title",{id:s},r):null,y.createElement("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"}))}const J=y.forwardRef(tr);function je({children:r,variant:s="default",size:a="md",removable:t=!1,onRemove:l,className:n="",style:c,colorClass:o}){const u={default:"bg-surface-variant text-text-secondary",success:"bg-success-50 text-success-700",error:"bg-error-50 text-error-700",warning:"bg-warning-50 text-warning-700",info:"bg-info-50 text-info-700"},d={sm:"px-2 py-0.5 text-xs",md:"px-3 py-1 text-sm",lg:"px-4 py-1.5 text-base"},m=o||u[s];return e.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full ${m} ${d[a]} ${n}`,style:c,children:[r,t&&l&&e.jsx("button",{onClick:l,className:"ml-1 hover:opacity-70","aria-label":"Remove badge",children:e.jsx(J,{className:"w-3 h-3"})})]})}const ye=g.forwardRef(({tags:r,onTagsChange:s,onAddTag:a,onRemoveTag:t,placeholder:l="Add a tag and press Enter",error:n=!1,fullWidth:c=!0,maxTags:o,duplicateCheck:u=!0,disabled:d,className:m="",...f},h)=>{const[b,p]=g.useState(""),$=j=>{j.key==="Enter"&&b.trim()?(j.preventDefault(),S(b.trim())):j.key==="Backspace"&&!b&&r.length>0&&B(r[r.length-1])},S=j=>{if(o&&r.length>=o||u&&r.includes(j))return;const C=[...r,j];s(C),a?.(j),p("")},B=j=>{const C=r.filter(D=>D!==j);s(C),t?.(j)},w=`w-full px-3 py-2 border rounded-lg transition-colors text-sm ${n?"border-error-300 focus:ring-2 focus:ring-error-500 focus:border-transparent":"border-border focus:ring-2 focus:ring-reseda-green-500 focus:border-transparent"} ${d?"bg-surface-variant text-text-muted cursor-not-allowed":"bg-surface text-text-primary"} ${c?"w-full":""} ${m}`;return e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:r.map(j=>e.jsx(je,{removable:!0,onRemove:()=>B(j),variant:"default",children:j},j))}),e.jsx("input",{ref:h,type:"text",className:w,placeholder:l,value:b,onChange:j=>p(j.target.value),onKeyDown:$,disabled:d||(o?r.length>=o:!1),...f}),o&&e.jsxs("p",{className:"text-xs text-text-muted",children:[r.length," / ",o]})]})});ye.displayName="TagInput";const we={variant:{default:"bg-reseda-green-500 text-white hover:bg-reseda-green-600 focus-visible:ring-reseda-green-500",destructive:"bg-error-500 text-white hover:bg-error-600 focus-visible:ring-error-500",outline:"border border-border bg-background hover:bg-surface-variant hover:text-text-primary focus-visible:ring-reseda-green-500",secondary:"bg-khaki-500 text-white hover:bg-khaki-600 focus-visible:ring-khaki-500",ghost:"hover:bg-surface-variant hover:text-text-primary focus-visible:ring-reseda-green-500",link:"text-reseda-green-500 underline-offset-4 hover:underline focus-visible:ring-reseda-green-500",none:""},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",xl:"h-12 rounded-md px-10 text-base",icon:"h-10 w-10"}},nr="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",lr=(...r)=>r.filter(Boolean).join(" "),O=g.forwardRef(({className:r,variant:s="default",size:a="default",fullWidth:t=!1,loading:l=!1,leftIcon:n,rightIcon:c,children:o,disabled:u,...d},m)=>{const f=u||l,h=lr(nr,we.variant[s],we.size[a],t?"w-full":"",r);return e.jsxs("button",{className:h,ref:m,disabled:f,...d,children:[l&&e.jsxs("svg",{className:"mr-2 h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),!l&&n&&e.jsx("span",{className:"mr-2",children:n}),o,!l&&c&&e.jsx("span",{className:"ml-2",children:c})]})});O.displayName="Button";const Ne={provider:{linkedin:"bg-[#0077B5] hover:bg-[#005885] text-white focus-visible:ring-[#0077B5]"},iconPosition:{left:"flex-row",right:"flex-row-reverse",only:"justify-center"}},or=(...r)=>r.filter(Boolean).join(" "),Ce=g.forwardRef(({className:r,provider:s,iconPosition:a="left",icon:t,showText:l=!0,children:n,size:c="default",fullWidth:o=!0,...u},d)=>{const f=t||{linkedin:e.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})}[s],b=n||(l?{linkedin:"Continue with LinkedIn"}[s]:""),p=or("relative overflow-hidden transition-all duration-200",Ne.provider[s],Ne.iconPosition[a],r);return e.jsxs(O,{ref:d,variant:"none",className:p,size:c,fullWidth:o,leftIcon:a==="left"?f:void 0,rightIcon:a==="right"?f:void 0,...u,children:[a==="only"&&f,a!=="only"&&b]})});Ce.displayName="SocialButton";function Y({variant:r,title:s,message:a,icon:t,onClose:l,className:n=""}){const o={success:{bg:"bg-success-50",border:"border-success-200",text:"text-success-700",icon:e.jsx(E.CheckCircleIcon,{className:"h-5 w-5"})},error:{bg:"bg-error-50",border:"border-error-200",text:"text-error-700",icon:e.jsx(E.XCircleIcon,{className:"h-5 w-5"})},warning:{bg:"bg-warning-50",border:"border-warning-200",text:"text-warning-700",icon:e.jsx(E.ExclamationCircleIcon,{className:"h-5 w-5"})},info:{bg:"bg-info-50",border:"border-info-200",text:"text-info-700",icon:e.jsx(E.InformationCircleIcon,{className:"h-5 w-5"})}}[r];return e.jsx("div",{className:`${o.bg} border ${o.border} rounded-md p-3 ${n}`,role:"alert",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`flex-shrink-0 ${o.text}`,children:t||o.icon}),e.jsxs("div",{className:"flex-1",children:[s&&e.jsx("p",{className:`text-sm font-medium ${o.text}`,children:s}),e.jsx("p",{className:`text-sm ${o.text}`,children:a})]}),l&&e.jsx("button",{onClick:l,className:`flex-shrink-0 ${o.text} hover:opacity-70`,"aria-label":"Close alert",children:"✕"})]})})}function cr({onFileChange:r,onAnalyze:s,uploadedFile:a,fileError:t,onCancelUpload:l,isAnalyzing:n=!1,analyzeError:c,analyzeSuccess:o,accept:u=".pdf,.docx",label:d="Upload File",description:m="PDF, DOCX up to 5MB",analyzeButtonLabel:f="Analyze",disabled:h=!1,showAnalyzeButton:b=!0}){const p=g.useRef(null),[$,S]=g.useState(!1);g.useEffect(()=>{!a&&p.current&&(p.current.value="")},[a]);const B=k=>{k.preventDefault(),k.stopPropagation(),k.type==="dragenter"||k.type==="dragover"?S(!0):k.type==="dragleave"&&S(!1)},R=k=>{if(k.preventDefault(),k.stopPropagation(),S(!1),k.dataTransfer.files&&k.dataTransfer.files[0]){const M={target:{files:k.dataTransfer.files}};r(M)}};return e.jsxs("div",{className:"mt-6 pt-6 border-t border-border",children:[e.jsx("h3",{className:"text-sm font-medium text-text-primary mb-3",children:d}),e.jsxs("label",{className:"block",children:[e.jsx("input",{ref:p,type:"file",accept:u,onChange:r,className:"hidden",id:"file-upload",disabled:h}),e.jsx("div",{onDragEnter:B,onDragLeave:B,onDragOver:B,onDrop:R,className:`border-2 border-dashed rounded-lg p-6 text-center transition cursor-pointer ${$?"border-reseda-green-700 bg-reseda-green-50":"border-border hover:border-reseda-green-700"} ${h?"opacity-50 cursor-not-allowed":""}`,children:a&&!t?e.jsxs("div",{children:[e.jsx("svg",{className:"mx-auto h-12 w-12 text-success-500",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"})}),e.jsx("div",{className:"mt-3",children:e.jsx(Y,{variant:"success",message:"File uploaded successfully"})}),e.jsx("p",{className:"text-sm text-text-secondary mt-2 break-words",children:a.name}),e.jsxs("p",{className:"text-xs text-text-muted mt-1",children:[(a.size/(1024*1024)).toFixed(2),"MB"]}),e.jsx(O,{variant:"link",type:"button",onClick:k=>{k.preventDefault(),l?.()},className:"mt-3 text-error-600 hover:text-error-700 h-auto p-0",children:"✕ Cancel"})]}):e.jsxs("div",{children:[e.jsx("svg",{className:"mx-auto h-12 w-12 text-text-muted",stroke:"currentColor",fill:"none",viewBox:"0 0 48 48",children:e.jsx("path",{d:"M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsxs("p",{className:"mt-2 text-sm text-text-secondary",children:[e.jsx("span",{className:"font-medium text-reseda-green-700",children:"Upload a file"})," ","or drag and drop"]}),e.jsx("p",{className:"text-xs text-text-muted mt-1",children:m})]})})]}),t&&e.jsx("div",{className:"mt-3",children:e.jsx(Y,{variant:"error",message:t})}),c&&e.jsx("div",{className:"mt-3",children:e.jsx(Y,{variant:"error",message:c})}),o&&e.jsx("div",{className:"mt-3",children:e.jsx(Y,{variant:"success",message:o})}),b&&e.jsx(O,{variant:"default",onClick:s,disabled:!a||n||h,loading:n,fullWidth:!0,className:"mt-3",children:f})]})}const ke=g.forwardRef(({className:r="",error:s=!1,fullWidth:a=!0,autoResize:t=!1,maxLength:l,showCharCount:n=!1,disabled:c,value:o,onChange:u,...d},m)=>{const $=`px-3 py-2 border rounded-lg transition-colors text-sm font-normal resize-none ${s?"border-error-300 focus:ring-2 focus:ring-error-500 focus:border-transparent":"border-border focus:ring-2 focus:ring-reseda-green-500 focus:border-transparent"} ${c?"bg-surface-variant text-text-muted cursor-not-allowed":"bg-surface text-text-primary"} ${a?"w-full":""} ${r}`,S=R=>{t&&(R.target.style.height="auto",R.target.style.height=`${R.target.scrollHeight}px`),u?.(R)},B=typeof o=="string"?o.length:0;return e.jsxs("div",{className:"space-y-1",children:[e.jsx("textarea",{ref:m,className:$,disabled:c,value:o,onChange:S,maxLength:l,...d}),n&&l&&e.jsxs("p",{className:"text-xs text-text-muted text-right",children:[B," / ",l]})]})});ke.displayName="Textarea";function ir({options:r,selectedValues:s,onSelectionChange:a,layout:t="vertical",columns:l=2,disabled:n=!1,error:c=!1}){const o=f=>{const h=s.includes(f)?s.filter(b=>b!==f):[...s,f];a(h)},u={vertical:"space-y-3",horizontal:"flex flex-wrap gap-3",grid:`grid grid-cols-${l} gap-3`},d=t==="grid"?"grid gap-3":u[t],m=t==="grid"?`md:grid-cols-${l}`:"";return e.jsx("div",{className:`${d} ${m}`,children:r.map(f=>{const h=s.includes(f.value),p=h?"border-reseda-green-500 bg-reseda-green-50 ring-2 ring-reseda-green-200":`border-${c?"border-error-300":"border-border"} hover:border-border-subtle hover:bg-surface-variant`;return e.jsxs("label",{className:`relative flex items-start p-3 border rounded-lg cursor-pointer transition-all ${p} ${n?"opacity-50 cursor-not-allowed":""}`,children:[e.jsx("input",{type:"checkbox",checked:h,onChange:()=>o(f.value),disabled:n,className:"sr-only"}),f.icon&&e.jsx("div",{className:"mr-3 flex-shrink-0 text-text-secondary",children:f.icon}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-text-primary",children:f.label}),f.description&&e.jsx("div",{className:"text-sm text-text-secondary",children:f.description})]}),h&&e.jsx("div",{className:"text-reseda-green-500 flex-shrink-0",children:e.jsx("svg",{className:"w-5 h-5",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"})})})]},f.value)})})}function dr({options:r,selectedValue:s,onSelectionChange:a,layout:t="vertical",columns:l=2,disabled:n=!1,error:c=!1,name:o="radio-group"}){const d=t==="grid"?`grid gap-3 md:grid-cols-${l}`:{vertical:"space-y-3",horizontal:"flex flex-wrap gap-3",grid:"grid gap-3"}[t];return e.jsx("div",{className:d,children:r.map(m=>{const f=s===m.value,b=f?"border-reseda-green-500 bg-reseda-green-50 ring-2 ring-reseda-green-200":`border-${c?"border-error-300":"border-border"} hover:border-border-subtle hover:bg-surface-variant`;return e.jsxs("label",{className:`relative flex items-start p-3 border rounded-lg cursor-pointer transition-all ${b} ${n?"opacity-50 cursor-not-allowed":""}`,children:[e.jsx("input",{type:"radio",name:o,value:m.value,checked:f,onChange:()=>a(m.value),disabled:n,className:"sr-only"}),m.icon&&e.jsx("div",{className:"mr-3 flex-shrink-0 text-text-secondary",children:m.icon}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-text-primary",children:m.label}),m.description&&e.jsx("div",{className:"text-sm text-text-secondary",children:m.description})]}),f&&e.jsx("div",{className:"text-reseda-green-500 flex-shrink-0",children: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"})})})]},m.value)})})}function ur({stats:r,columns:s=4,className:a=""}){const t={2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"}[s],l={"moss-green":{bg:"bg-moss-green-50",text:"text-reseda-green-700",value:"text-reseda-green-100"},success:{bg:"bg-khaki-50",text:"text-success-600",value:"text-success-900"},warning:{bg:"bg-peach-yellow-50",text:"text-warning-600",value:"text-warning-900"},"earth-yellow":{bg:"bg-sunglow-50",text:"text-earth-yellow-700",value:"text-earth-yellow-100"}};return e.jsx("div",{className:`grid ${t} gap-4 mb-6 bg-surface p-6 rounded-lg ${a}`,children:r.map((n,c)=>{const o=l[n.color||"moss-green"];return e.jsxs("div",{className:`${o.bg} rounded-lg p-4`,children:[n.icon&&e.jsx("div",{className:"mb-2",children:n.icon}),e.jsx("p",{className:`text-sm ${o.text} font-medium`,children:n.label}),e.jsx("p",{className:`text-2xl font-bold ${o.value} mt-1`,children:n.value})]},c)})})}function mr({items:r,allowMultiple:s=!1,defaultOpenId:a,onOpenChange:t,className:l=""}){const[n,c]=g.useState(()=>a?Array.isArray(a)?a:[a]:[]),o=u=>{let d;s?d=n.includes(u)?n.filter(m=>m!==u):[...n,u]:d=n.includes(u)?[]:[u],c(d),t?.(d)};return e.jsx("div",{className:`space-y-2 ${l}`,children:r.map(u=>{const d=n.includes(u.id);return e.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[e.jsxs("button",{onClick:()=>o(u.id),className:"w-full px-4 py-3 flex items-center justify-between hover:bg-surface-variant transition-colors text-left",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[u.icon&&e.jsx("div",{className:"flex-shrink-0 text-text-secondary",children:u.icon}),e.jsx("h3",{className:"font-medium text-text-primary",children:u.title})]}),e.jsx(E.ChevronDownIcon,{className:`w-5 h-5 text-text-secondary transition-transform flex-shrink-0 ${d?"rotate-180":""}`})]}),d&&e.jsx("div",{className:"border-t border-border px-4 py-3 bg-surface-variant text-text-primary",children:u.content})]},u.id)})})}function xr({icon:r,title:s,subtitle:a,metadata:t,isSelected:l=!1,isActive:n=!1,variant:c="default",actions:o,onClick:u,className:d=""}){const m=p=>{const $=p.target;$.tagName==="BUTTON"||$.closest("button")||u?.(p)},h=(()=>{if(n)switch(c){case"success":return"border-2 border-reseda-green-700 bg-success-50";case"warning":return"border-2 border-persian-orange-700 bg-warning-50";case"error":return"border-2 border-error-700 bg-error-50";default:return"border-2 border-reseda-green-700 bg-success-50"}return"border border-border hover:border-border-subtle hover:bg-surface-variant"})(),b=l?"ring-2 ring-reseda-green-700":"";return e.jsx("div",{onClick:m,className:`rounded-lg p-4 cursor-pointer transition ${h} ${b} ${d}`,children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1 flex items-start gap-3",children:[r&&e.jsx("div",{className:"shrink-0",children:r}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-medium text-text-primary",children:s}),a&&e.jsx("p",{className:"text-sm text-text-secondary mt-1",children:a}),t&&e.jsx("div",{className:"mt-2",children:t})]})]}),e.jsx("div",{className:"ml-2 flex items-center gap-1 shrink-0",children:o.map((p,$)=>e.jsx(O,{variant:p.variant||"ghost",size:p.size||"sm",onClick:p.onClick,disabled:p.disabled,loading:p.loading,title:p.label,className:p.className,leftIcon:p.icon&&p.size!=="icon"?p.icon:void 0,children:p.size==="icon"?p.icon:p.label},$))})]})})}function hr({children:r,variant:s="default",isActive:a=!1,onClick:t,className:l=""}){const n="rounded-lg transition-all",c={default:"border border-border p-4",surface:"bg-surface-variant p-4",elevated:"bg-surface shadow-md p-6",interactive:`border-2 p-4 cursor-pointer ${a?"border-success-500 bg-success-50":"border-border bg-surface hover:border-border-subtle"}`};return e.jsx("div",{className:`${n} ${c[s]} ${l}`,onClick:t,role:t?"button":void 0,tabIndex:t?0:void 0,onKeyDown:t?o=>{(o.key==="Enter"||o.key===" ")&&t()}:void 0,children:r})}const fr={right:{sm:"w-full sm:w-[360px]",md:"w-full sm:w-[480px]",lg:"w-full sm:w-[640px]",full:"w-full"},left:{sm:"w-full sm:w-[360px]",md:"w-full sm:w-[480px]",lg:"w-full sm:w-[640px]",full:"w-full"},bottom:{sm:"h-[30vh]",md:"h-[50vh]",lg:"h-[70vh]",full:"h-full"}},gr={right:"top-0 right-0 h-full",left:"top-0 left-0 h-full",bottom:"left-0 right-0 bottom-0 w-full"};function br({open:r,onClose:s,title:a,children:t,footer:l,placement:n="right",size:c="md",closeOnOverlayClick:o=!0,closeOnEsc:u=!0,showCloseButton:d=!0,className:m=""}){if(g.useEffect(()=>{if(!r||typeof document>"u")return;const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}},[r]),g.useEffect(()=>{if(!r||!u||typeof window>"u")return;const h=b=>{b.key==="Escape"&&s()};return window.addEventListener("keydown",h),()=>{window.removeEventListener("keydown",h)}},[r,u,s]),!r||typeof document>"u")return null;const f=["fixed z-[60] bg-surface border-border shadow-xl flex flex-col",gr[n],fr[n][c],n==="bottom"?"rounded-t-xl border-t":n==="left"?"border-r":"border-l",m].filter(Boolean).join(" ");return Fe.createPortal(e.jsxs("div",{className:"fixed inset-0 z-50",children:[e.jsx("button",{type:"button","aria-label":"Close drawer overlay",className:"absolute inset-0 bg-black/40",onClick:o?s:void 0}),e.jsxs("section",{role:"dialog","aria-modal":"true",className:f,children:[e.jsxs("header",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:[e.jsx("div",{className:"text-sm font-semibold text-text-primary",children:a}),d?e.jsx("button",{type:"button",onClick:s,className:"rounded-md p-1 text-text-secondary hover:bg-surface-variant hover:text-text-primary","aria-label":"Close drawer",children:e.jsx(E.XMarkIcon,{className:"h-5 w-5"})}):null]}),e.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 text-text-primary",children:t}),l?e.jsx("footer",{className:"border-t border-border px-4 py-3",children:l}):null]})]}),document.body)}function vr({title:r,children:s,subtitle:a,spacing:t="normal",className:l=""}){const n={compact:"space-y-3",normal:"space-y-6",spacious:"space-y-8"};return e.jsxs("div",{className:`${n[t]} ${l}`,children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-text-primary",children:r}),a&&e.jsx("p",{className:"text-sm text-text-secondary mt-1",children:a})]}),s]})}function pr({title:r,subtitle:s,metadata:a,sections:t,className:l=""}){return e.jsxs("div",{className:`space-y-6 ${l}`,children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-start justify-between mb-1",children:[e.jsx("h2",{className:"text-xl font-semibold text-text-primary",children:r}),a&&e.jsx("div",{className:"text-sm text-text-secondary",children:a})]}),s&&e.jsx("p",{className:"text-sm text-text-secondary",children:s})]}),t.map((n,c)=>e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-text-primary mb-3",children:n.heading}),n.content]},c))]})}function jr({title:r,description:s,centered:a=!1,titleSize:t="md"}){const l={sm:"text-2xl",md:"text-3xl",lg:"text-4xl"},n=a?"text-center":"",c=a?"max-w-2xl mx-auto":"";return e.jsxs("div",{className:`mb-8 ${n}`,children:[e.jsx("h1",{className:`${l[t]} font-bold text-text-primary`,children:r}),e.jsx("p",{className:`mt-2 text-text-secondary ${c}`,children:s})]})}function yr({icon:r,title:s,description:a,isSelected:t=!1,onClick:l,disabled:n=!1,className:c=""}){const o="p-4 border rounded-lg transition-all text-center cursor-pointer",u=t?"border-reseda-green-500 bg-reseda-green-50 ring-2 ring-reseda-green-200":"border-border hover:border-border-subtle hover:bg-surface-variant",d=n?"opacity-50 cursor-not-allowed":"";return e.jsxs("div",{className:`${o} ${u} ${d} ${c}`,onClick:()=>!n&&l?.(),role:"button",tabIndex:n?-1:0,onKeyDown:m=>{!n&&(m.key==="Enter"||m.key===" ")&&l?.()},children:[r&&e.jsx("div",{className:"mb-3 flex justify-center",children:e.jsx("div",{className:"text-text-secondary",children:r})}),e.jsx("h3",{className:"font-medium text-text-primary mb-1",children:s}),a&&e.jsx("p",{className:"text-xs text-text-secondary",children:a}),t&&e.jsx("div",{className:"mt-3 flex justify-center",children:e.jsx("div",{className:"text-reseda-green-500",children:e.jsx("svg",{className:"w-5 h-5",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"})})})})]})}const $e=g.forwardRef(({value:r,onChange:s,min:a=0,max:t=100,step:l=1,showValue:n=!0,showLabels:c=!1,minLabel:o,maxLabel:u,error:d=!1,fullWidth:m=!0,disabled:f,className:h="",...b},p)=>{const k=`w-full h-2 rounded-lg appearance-none cursor-pointer ${d?"bg-error-200 accent-error-500":"bg-border accent-reseda-green-500"} ${f?"opacity-50 cursor-not-allowed":""} ${m?"w-full":""} ${h}`,M=(r-a)/(t-a)*100;return e.jsxs("div",{className:"space-y-2",children:[c&&(o||u)&&e.jsxs("div",{className:"flex justify-between text-xs text-text-muted",children:[o&&e.jsx("span",{children:o}),u&&e.jsx("span",{children:u})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{ref:p,type:"range",min:a,max:t,step:l,value:r,onChange:F=>s(Number(F.target.value)),disabled:f,className:k,...b}),n&&e.jsx("span",{className:"text-sm font-medium text-text-primary min-w-[3rem] text-right",children:r})]}),e.jsx("div",{className:"h-1 bg-border rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-reseda-green-500 transition-all",style:{width:`${M}%`}})})]})});$e.displayName="Slider";function wr({title:r,titleId:s,...a},t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},a),r?y.createElement("title",{id:s},r):null,y.createElement("path",{fillRule:"evenodd",d:"M7.5 5.25a3 3 0 0 1 3-3h3a3 3 0 0 1 3 3v.205c.933.085 1.857.197 2.774.334 1.454.218 2.476 1.483 2.476 2.917v3.033c0 1.211-.734 2.352-1.936 2.752A24.726 24.726 0 0 1 12 15.75c-2.73 0-5.357-.442-7.814-1.259-1.202-.4-1.936-1.541-1.936-2.752V8.706c0-1.434 1.022-2.7 2.476-2.917A48.814 48.814 0 0 1 7.5 5.455V5.25Zm7.5 0v.09a49.488 49.488 0 0 0-6 0v-.09a1.5 1.5 0 0 1 1.5-1.5h3a1.5 1.5 0 0 1 1.5 1.5Zm-3 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}),y.createElement("path",{d:"M3 18.4v-2.796a4.3 4.3 0 0 0 .713.31A26.226 26.226 0 0 0 12 17.25c2.892 0 5.68-.468 8.287-1.335.252-.084.49-.189.713-.311V18.4c0 1.452-1.047 2.728-2.523 2.923-2.12.282-4.282.427-6.477.427a49.19 49.19 0 0 1-6.477-.427C4.047 21.128 3 19.852 3 18.4Z"}))}const Nr=y.forwardRef(wr);function Cr({title:r,titleId:s,...a},t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},a),r?y.createElement("title",{id:s},r):null,y.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const kr=y.forwardRef(Cr);function $r({title:r,titleId:s,...a},t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},a),r?y.createElement("title",{id:s},r):null,y.createElement("path",{d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625Z"}),y.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const Vr=y.forwardRef($r);function Tr({title:r,titleId:s,...a},t){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},a),r?y.createElement("title",{id:s},r):null,y.createElement("path",{d:"M3.478 2.404a.75.75 0 0 0-.926.941l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.404Z"}))}const Er=y.forwardRef(Tr),Sr={neutral:{selectedContainer:"border-gray-300 bg-gray-50",selectedIndicator:"text-gray-500",inputAccent:"accent-gray-600"},purple:{selectedContainer:"border-purple-300 bg-purple-50",selectedIndicator:"text-purple-600",inputAccent:"accent-purple-600"},blue:{selectedContainer:"border-blue-300 bg-blue-50",selectedIndicator:"text-blue-600",inputAccent:"accent-blue-600"}};function Ar({id:r,name:s,checked:a,onChange:t,primaryText:l,secondaryText:n,tertiaryText:c,tone:o="neutral",showCheckedIndicator:u=!1,disabled:d=!1,className:m=""}){const f=Sr[o],h=a?f.selectedContainer:"border-gray-200",b=d?"cursor-not-allowed opacity-60":"cursor-pointer hover:bg-gray-50";return e.jsxs("label",{className:`flex items-start gap-2 rounded-md border p-2 transition ${h} ${b} ${m}`,children:[e.jsx("input",{type:"radio",name:s,className:`mt-0.5 ${f.inputAccent}`,checked:a,disabled:d,onChange:()=>t(r)}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block text-sm text-gray-800 break-words",children:l}),n?e.jsx("span",{className:"block text-xs text-gray-500",children:n}):null,c?e.jsx("span",{className:"block text-xs text-gray-400",children:c}):null]}),u&&a?e.jsx(kr,{className:`h-4 w-4 mt-0.5 shrink-0 ${f.selectedIndicator}`}):null]})}function Ve({id:r,index:s,previewText:a,defaultExpanded:t=!1,children:l,tooltipContent:n,onRemove:c,className:o=""}){const[u,d]=g.useState(t),{attributes:m,listeners:f,setNodeRef:h,transform:b,transition:p,isDragging:$}=ze.useSortable({id:r}),S={transform:Le.CSS.Transform.toString(b),transition:p,opacity:$?.5:1};return e.jsx("div",{ref:h,style:S,className:`border border-border rounded-md bg-surface-variant ${o}`,children:u?e.jsxs("div",{className:"p-3",children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsx("button",{type:"button",...m,...f,className:"h-auto w-auto p-1 cursor-grab active:cursor-grabbing rounded hover:bg-surface-variant inline-flex items-center justify-center","aria-label":"Drag to reorder",children:e.jsx(ve,{className:"w-4 h-4"})}),e.jsxs("span",{className:"text-sm font-medium text-text-secondary flex-1 cursor-pointer select-none",onClick:()=>d(!1),children:["Item ",s+1]}),e.jsx(O,{type:"button",variant:"ghost",size:"icon",onClick:()=>d(!1),className:"h-auto w-auto p-1","aria-label":"Collapse",leftIcon:e.jsx(pe,{className:"w-4 h-4 transition-transform rotate-90"})}),e.jsx(O,{type:"button",variant:"ghost",size:"icon",onClick:c,className:"h-auto w-auto p-1 text-error-600 hover:text-error-800","aria-label":"Remove",leftIcon:e.jsx(J,{className:"w-4 h-4"})})]}),l]}):e.jsxs("div",{className:"relative group",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",children:[e.jsx("button",{type:"button",...m,...f,className:"h-auto w-auto p-1 cursor-grab active:cursor-grabbing flex-shrink-0 rounded hover:bg-surface-variant inline-flex items-center justify-center","aria-label":"Drag to reorder",children:e.jsx(ve,{className:"w-4 h-4"})}),e.jsx("span",{className:"flex-1 text-sm text-text-secondary truncate cursor-pointer select-none",onClick:()=>d(!0),children:a}),e.jsx(O,{type:"button",variant:"ghost",size:"icon",onClick:()=>d(!0),className:"h-auto w-auto p-1 flex-shrink-0","aria-label":"Expand",leftIcon:e.jsx(pe,{className:"w-4 h-4 transition-transform"})}),e.jsx(O,{type:"button",variant:"ghost",size:"icon",onClick:c,className:"h-auto w-auto p-1 text-error-600 hover:text-error-800 flex-shrink-0","aria-label":"Remove",leftIcon:e.jsx(J,{className:"w-4 h-4"})})]}),n&&e.jsx("div",{className:"absolute left-0 top-full mt-1 z-10 w-80 bg-gray-900 text-white text-xs rounded-md p-3 shadow-lg opacity-0 group-hover:opacity-100 pointer-events-none transition-opacity duration-150",children:n})]})})}Ve.displayName="SortableItem";const Br={bg:"bg-indigo-600",activeBg:"bg-indigo-700",text:"text-indigo-200",activeText:"text-white",hoverBg:"hover:bg-indigo-700",hoverText:"hover:text-white"};function A(...r){return r.filter(Boolean).join(" ")}function Te({item:r,colorScheme:s}){const[a,t]=g.useState(r.current||r.children?.some(n=>n.current)),l=r.children&&r.children.length>0;return e.jsxs("li",{children:[e.jsx("div",{children:e.jsxs("a",{href:l?void 0:r.href,onClick:n=>{l&&(n.preventDefault(),t(!a))},className:A(r.current?`${s.activeBg} ${s.activeText}`:`${s.text} ${s.hoverBg} ${s.hoverText}`,"group flex items-center justify-between gap-x-3 rounded-md p-2 text-sm/6 font-semibold",l?"cursor-pointer":""),children:[e.jsxs("div",{className:"flex items-center gap-x-3",children:[e.jsx(r.icon,{"aria-hidden":"true",className:A(r.current?s.activeText:`${s.text} group-${s.hoverText}`,"size-6 shrink-0")}),r.name]}),l&&e.jsx(E.ChevronDownIcon,{className:A("size-5 shrink-0 transition-transform",a?"rotate-180":"",r.current?s.activeText:s.text)})]})}),l&&a&&e.jsx("ul",{className:"mt-1 ml-9 space-y-1",children:r.children.map(n=>e.jsx("li",{children:e.jsxs("a",{href:n.href,className:A(n.current?`${s.activeBg} ${s.activeText}`:`${s.text} ${s.hoverBg} ${s.hoverText}`,"group flex gap-x-3 rounded-md p-2 text-sm/6 font-semibold"),children:[e.jsx(n.icon,{"aria-hidden":"true",className:A(n.current?s.activeText:`${s.text} group-${s.hoverText}`,"size-5 shrink-0")}),n.name]})},n.name))})]})}function Rr({company:r,profile:s,navigation:a,colorScheme:t=Br}){const[l,n]=g.useState(!1);return e.jsx(e.Fragment,{children:e.jsxs("div",{children:[e.jsxs(q.Dialog,{open:l,onClose:n,className:"relative z-50 lg:hidden",children:[e.jsx(q.DialogBackdrop,{transition:!0,className:"fixed inset-0 bg-gray-900/80 transition-opacity duration-300 ease-linear data-closed:opacity-0"}),e.jsx("div",{className:"fixed inset-0 flex",children:e.jsxs(q.DialogPanel,{transition:!0,className:"relative mr-16 flex w-full max-w-xs flex-1 transform transition duration-300 ease-in-out data-closed:-translate-x-full",children:[e.jsx(q.TransitionChild,{children:e.jsx("div",{className:"absolute top-0 left-full flex w-16 justify-center pt-5 duration-300 ease-in-out data-closed:opacity-0",children:e.jsxs("button",{type:"button",onClick:()=>n(!1),className:"-m-2.5 p-2.5",children:[e.jsx("span",{className:"sr-only",children:"Close sidebar"}),e.jsx(E.XMarkIcon,{"aria-hidden":"true",className:"size-6 text-white"})]})})}),e.jsxs("div",{className:A("flex grow flex-col gap-y-5 overflow-y-auto px-6 pb-2",t.bg),children:[e.jsx("div",{className:"flex h-16 shrink-0 items-center",children:e.jsx("img",{alt:r.name,src:r.logo,className:"h-8 w-auto"})}),e.jsx("nav",{className:"flex flex-1 flex-col",children:e.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:e.jsx("li",{children:e.jsx("ul",{role:"list",className:"-mx-2 space-y-1",children:a.map(c=>e.jsx(Te,{item:c,colorScheme:t},c.name))})})})})]})]})})]}),e.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:e.jsxs("div",{className:A("flex grow flex-col gap-y-5 overflow-y-auto px-6",t.bg),children:[e.jsx("div",{className:"flex h-16 shrink-0 items-center",children:e.jsx("img",{alt:r.name,src:r.logo,className:"h-8 w-auto"})}),e.jsx("nav",{className:"flex flex-1 flex-col",children:e.jsxs("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:[e.jsx("li",{children:e.jsx("ul",{role:"list",className:"-mx-2 space-y-1",children:a.map(c=>e.jsx(Te,{item:c,colorScheme:t},c.name))})}),e.jsx("li",{className:"-mx-6 mt-auto",children:e.jsxs("a",{href:"#",className:A("flex items-center gap-x-4 px-6 py-3 text-sm/6 font-semibold",t.activeText,t.hoverBg),children:[e.jsx("img",{alt:s.name,src:s.image,className:A("size-8 rounded-full",t.activeBg)}),e.jsx("span",{className:"sr-only",children:"Your profile"}),e.jsx("span",{"aria-hidden":"true",children:s.name})]})})]})})]})}),e.jsxs("div",{className:A("sticky top-0 z-40 flex items-center gap-x-6 px-4 py-4 shadow-xs sm:px-6 lg:hidden",t.bg),children:[e.jsxs("button",{type:"button",onClick:()=>n(!0),className:A("-m-2.5 p-2.5 lg:hidden",t.text),children:[e.jsx("span",{className:"sr-only",children:"Open sidebar"}),e.jsx(E.Bars3Icon,{"aria-hidden":"true",className:"size-6"})]}),e.jsx("div",{className:A("flex-1 text-sm/6 font-semibold",t.activeText),children:"Dashboard"}),e.jsxs("a",{href:"#",children:[e.jsx("span",{className:"sr-only",children:"Your profile"}),e.jsx("img",{alt:s.name,src:s.image,className:A("size-8 rounded-full",t.activeBg)})]})]})]})})}const Dr={activeBg:"bg-reseda-green-700",activeText:"text-white",completedBg:"bg-success-500",completedText:"text-white",incompleteBorder:"border-border",incompleteText:"text-text-muted",labelActiveText:"text-reseda-green-800",labelInactiveText:"text-text-muted",connectorBg:"bg-border"};function Or({currentStep:r,steps:s,colorConfig:a}){const t=a||Dr;return e.jsx("nav",{className:"mb-10",children:e.jsx("ol",{className:"flex items-center w-full",children:s.map((l,n)=>e.jsxs("li",{className:`flex items-center ${n<s.length-1?"flex-1":""}`,children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:`flex items-center justify-center w-9 h-9 rounded-full text-sm font-semibold shrink-0 ${r===l.number?`${t.activeBg} ${t.activeText}`:r>l.number?`${t.completedBg} ${t.completedText}`:`border-2 ${t.incompleteBorder} ${t.incompleteText}`}`,children:l.number}),e.jsx("span",{className:`ml-3 text-sm font-medium whitespace-nowrap ${r>=l.number?t.labelActiveText:t.labelInactiveText}`,children:l.label})]}),n<s.length-1&&e.jsx("div",{className:`flex-1 h-0.5 mx-4 ${t.connectorBg}`})]},l.number))})})}const Ir={activeText:"text-reseda-green-700",activeBorder:"border-reseda-green-700",inactiveText:"text-text-secondary",inactiveHoverText:"hover:text-text-primary",disabledText:"text-text-disabled"};function Mr({tabs:r,activeTab:s,disabled:a=!1,onChange:t,colorConfig:l}){const n=l||Ir;return e.jsx("div",{className:"flex border-b border-border mb-6",children:r.map(c=>{const o=s===c.id;return e.jsx(O,{variant:"ghost",onClick:()=>!a&&t(c.id),disabled:a&&!o,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap transition-colors border-b-2 -mb-px ${o?`${n.activeBorder} ${n.activeText}`:a?`border-transparent ${n.disabledText} cursor-not-allowed`:`border-transparent ${n.inactiveText} ${n.inactiveHoverText}`}`,children:c.label},c.id)})})}function _r({status:r,title:s,message:a,action:t,progress:l,className:n=""}){const o={success:{bg:"bg-success-50",border:"border-success-200",text:"text-success-700",icon:e.jsx(E.CheckCircleIcon,{className:"h-5 w-5"})},error:{bg:"bg-error-50",border:"border-error-200",text:"text-error-700",icon:e.jsx(E.XCircleIcon,{className:"h-5 w-5"})},warning:{bg:"bg-warning-50",border:"border-warning-200",text:"text-warning-700",icon:e.jsx(E.ExclamationCircleIcon,{className:"h-5 w-5"})},info:{bg:"bg-info-50",border:"border-info-200",text:"text-info-700",icon:e.jsx(E.InformationCircleIcon,{className:"h-5 w-5"})},loading:{bg:"bg-blue-50",border:"border-blue-200",text:"text-blue-700",icon:null}}[r];return e.jsx("div",{className:`${o.bg} border ${o.border} rounded-lg p-4 ${n}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[r==="loading"?e.jsxs("svg",{className:"animate-spin h-5 w-5 flex-shrink-0",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):e.jsx("div",{className:`flex-shrink-0 ${o.text}`,children:o.icon}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:`text-sm font-medium ${o.text}`,children:s}),a&&e.jsx("p",{className:`text-xs ${o.text} mt-1`,children:a}),l!==void 0&&e.jsx("div",{className:"mt-2 w-full bg-gray-200 rounded-full h-2",children:e.jsx("div",{className:`h-2 rounded-full transition-all ${o.bg}`,style:{width:`${l}%`}})})]}),t&&e.jsx("button",{onClick:t.onClick,className:`text-sm font-medium ${o.text} hover:opacity-70 flex-shrink-0`,children:t.label})]})})}const X=({role:r,content:s,timestamp:a,className:t=""})=>{const l=r==="user";return e.jsxs("div",{className:`flex gap-3 ${l?"justify-end":"justify-start"} ${t}`,children:[!l&&e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-green-700 flex items-center justify-center text-white text-sm font-semibold",children:"AI"})}),e.jsxs("div",{className:`flex-1 ${l?"max-w-md":""}`,children:[e.jsx("div",{className:`rounded-lg p-3 ${l?"bg-blue-600 text-white rounded-br-none":"bg-gray-100 text-gray-900 rounded-bl-none"}`,children:e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:s})}),a&&e.jsx("p",{className:`text-xs text-gray-400 mt-1 ${l?"text-right":""}`,children:a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),l&&e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-300 flex items-center justify-center text-gray-600 text-sm font-semibold",children:"U"})})]})};X.displayName="ChatMessage";const Ee=({onSend:r,disabled:s=!1,placeholder:a="Ask a question about your resume or the job...",maxLength:t=2e3,className:l=""})=>{const[n,c]=g.useState(""),o=g.useRef(null);g.useEffect(()=>{o.current&&(o.current.style.height="auto",o.current.style.height=`${o.current.scrollHeight}px`)},[n]);const u=()=>{n.trim()&&!s&&(r(n.trim()),c(""))},d=h=>{h.key==="Enter"&&!h.shiftKey?(h.preventDefault(),u()):h.key==="Escape"&&c("")},m=n.length>t,f=n.length>t*.9;return e.jsxs("div",{className:`border-t border-gray-200 bg-white p-4 ${l}`,children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("textarea",{ref:o,value:n,onChange:h=>c(h.target.value),onKeyDown:d,placeholder:a,disabled:s,rows:1,className:"flex-1 resize-none border border-gray-300 rounded-lg p-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:opacity-50 disabled:cursor-not-allowed",style:{maxHeight:"150px"},"aria-label":"Type your message"}),e.jsx("button",{onClick:u,disabled:s||!n.trim()||m,className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors","aria-label":"Send message",children:e.jsx(Er,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"flex justify-between items-center mt-2",children:[e.jsx("p",{className:"text-xs text-gray-500",children:"Press Enter to send, Shift+Enter for new line"}),f&&e.jsxs("p",{className:`text-xs ${m?"text-red-500":"text-gray-500"}`,children:[n.length,"/",t]})]})]})};Ee.displayName="ChatInput";const K=({message:r="Thinking...",variant:s="dots",className:a=""})=>e.jsxs("div",{className:`flex gap-3 ${a}`,children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-green-700 flex items-center justify-center text-white text-sm font-semibold",children:"AI"})}),e.jsx("div",{className:"flex-1",children:e.jsxs("div",{className:"bg-gray-100 rounded-lg rounded-bl-none p-3 inline-flex items-center gap-2",children:[s==="dots"?e.jsxs("div",{className:"flex gap-1",children:[e.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce"}),e.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.2s"}}),e.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.4s"}})]}):e.jsx("div",{className:"w-4 h-4 border-2 border-gray-300 border-t-gray-600 rounded-full animate-spin"}),e.jsx("span",{className:"text-sm text-gray-600",children:r})]})})]});K.displayName="LoadingIndicator";const Se=({messages:r,isLoading:s=!1,loadingMessage:a="Thinking...",error:t=null,onRetry:l,className:n="",emptyStateMessage:c="Start a conversation"})=>{const o=g.useRef(null),u=g.useRef(null);return g.useEffect(()=>{o.current?.scrollIntoView({behavior:"smooth"})},[r,s]),e.jsxs("div",{ref:u,className:`flex flex-col flex-1 overflow-y-auto bg-white p-4 space-y-4 ${n}`,children:[r.length===0&&!s&&e.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[e.jsx("div",{className:"text-4xl mb-4",children:"💬"}),e.jsx("p",{className:"text-gray-600 font-medium",children:c}),e.jsx("p",{className:"text-gray-400 text-sm mt-2",children:"Ask me anything about your resume or the job requirements!"})]}),r.map((d,m)=>e.jsx(X,{role:d.role,content:d.content,timestamp:d.timestamp},m)),s&&e.jsx(K,{message:a,variant:"dots"}),t&&e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-red-100 flex items-center justify-center",children:e.jsx("span",{className:"text-red-600 text-sm font-semibold",children:"!"})})}),e.jsx("div",{className:"flex-1",children:e.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3",children:[e.jsx("p",{className:"text-sm text-red-800",children:t}),l&&e.jsx("button",{onClick:l,className:"mt-2 text-xs text-red-600 hover:text-red-700 font-medium underline",children:"Try again"})]})})]}),e.jsx("div",{ref:o})]})};Se.displayName="ChatContainer";const Ae=({resumeName:r,jobTitle:s,companyName:a,matchScore:t,onChangeResume:l,onChangeJob:n,className:c=""})=>e.jsx("div",{className:`border-b border-gray-200 bg-gray-50 p-4 ${c}`,children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx(Vr,{className:"w-5 h-5 text-gray-600 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs text-gray-500 font-medium",children:"Resume"}),e.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:r})]})]}),l&&e.jsx("button",{onClick:l,className:"px-3 py-1.5 text-xs font-medium text-blue-600 hover:text-blue-700 hover:bg-blue-50 rounded transition-colors flex-shrink-0","aria-label":"Change resume",children:"Change"})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx(Nr,{className:"w-5 h-5 text-gray-600 flex-shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs text-gray-500 font-medium",children:"Job"}),e.jsxs("div",{className:"truncate",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:s}),a&&e.jsx("p",{className:"text-xs text-gray-500 truncate",children:a})]})]})]}),n&&e.jsx("button",{onClick:n,className:"px-3 py-1.5 text-xs font-medium text-blue-600 hover:text-blue-700 hover:bg-blue-50 rounded transition-colors flex-shrink-0","aria-label":"Change job",children:"Change"})]}),t!==void 0&&e.jsxs("div",{className:"pt-2 border-t border-gray-200",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("p",{className:"text-xs font-medium text-gray-700",children:"Match Score"}),e.jsxs("p",{className:"text-sm font-semibold text-gray-900",children:[t,"%"]})]}),e.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2 overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${t>=90?"bg-green-500":t>=75?"bg-blue-500":t>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${t}%`}})})]})]})});Ae.displayName="AnalysisSummaryBar";const Q={semantic:{none:"bg-error-50 border-error-200 text-error-700",partial:"bg-warning-50 border-warning-200 text-warning-700",full:"bg-success-50 border-success-200 text-success-700"},brand:{none:"bg-persian-orange-900 border-persian-orange-700 text-persian-orange-200",partial:"bg-earth-yellow-900 border-earth-yellow-700 text-earth-yellow-200",full:"bg-moss-green-900 border-reseda-green-700 text-reseda-green-200"},subtle:{none:"bg-surface border-error-300 text-error-700",partial:"bg-surface border-warning-300 text-warning-700",full:"bg-surface border-success-300 text-success-700"}},Pr={semantic:{required:"bg-error-600 text-white",preferred:"bg-reseda-green-600 text-white","nice-to-have":"bg-khaki-500 text-white"},brand:{required:"bg-persian-orange-500 text-white",preferred:"bg-reseda-green-500 text-white","nice-to-have":"bg-beaver-500 text-white"},subtle:{required:"bg-error-100 text-error-800",preferred:"bg-reseda-green-700 text-reseda-green-100","nice-to-have":"bg-khaki-700 text-khaki-100"}},Be=({skills:r,className:s="",colorPreset:a="semantic"})=>{const t=o=>!o.matched||o.match_level==="none"?"✗":o.match_level==="partial"?"~":"✓",l=o=>!o.matched||o.match_level==="none"?Q[a].none:o.match_level==="partial"?Q[a].partial:Q[a].full,n=o=>Pr[a][o],c=(o,u)=>!u||u.length===0?null:e.jsxs("div",{className:"mb-4",children:[e.jsxs("p",{className:"text-xs font-semibold text-text-secondary mb-2",children:[o,":"]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:u.map((d,m)=>e.jsxs("div",{className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border ${l(d)}`,children:[e.jsxs("span",{className:"text-sm font-medium",children:[t(d)," ",d.name]}),e.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${n(d.importance)}`,children:d.importance==="nice-to-have"?"Nice":d.importance})]},m))})]});return e.jsxs("div",{className:s,children:[c("Technical Skills",r.technical||[]),c("Soft Skills",r.soft||[])]})};Be.displayName="SkillTags";const Re=({score:r,showLabel:s=!0,size:a="md",className:t=""})=>{const l=Math.min(Math.max(r,0),100),n=d=>d>=90?"bg-green-500":d>=75?"bg-blue-500":d>=60?"bg-yellow-500":"bg-red-500",c=d=>d>=90?"Excellent match!":d>=75?"Good match":d>=60?"Fair match":"Poor match",o={sm:"h-2",md:"h-4",lg:"h-6"},u={sm:"text-xs",md:"text-sm",lg:"text-base"};return e.jsxs("div",{className:t,children:[s&&e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsx("p",{className:`font-medium text-gray-700 ${u[a]}`,children:"Match Score"}),e.jsxs("p",{className:`font-semibold ${u[a]} ${n(l).replace("bg-","text-")}`,children:[l,"%"]})]}),e.jsx("div",{className:`w-full bg-gray-200 rounded-full overflow-hidden ${o[a]}`,children:e.jsx("div",{className:`${n(l)} ${o[a]} rounded-full transition-all duration-500 ease-out`,style:{width:`${l}%`}})}),s&&e.jsx("p",{className:`text-gray-600 mt-1 ${u[a]}`,children:c(l)})]})};Re.displayName="MatchScoreBar";const De=({responsibilities:r,className:s=""})=>{const a=r.reduce((l,n)=>(l[n.category]||(l[n.category]=[]),l[n.category].push(n),l),{}),t=l=>{switch(l){case"high":return"bg-red-100 text-red-800";case"medium":return"bg-yellow-100 text-yellow-800";case"low":return"bg-gray-100 text-gray-800"}};return e.jsx("div",{className:s,children:Object.entries(a).map(([l,n])=>e.jsxs("div",{className:"mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:l}),n.some(c=>c.importance==="high")&&e.jsx("span",{className:"inline-block w-2 h-2 bg-red-600 rounded-full"}),n.some(c=>c.importance==="medium")&&!n.some(c=>c.importance==="high")&&e.jsx("span",{className:"inline-block w-2 h-2 bg-yellow-600 rounded-full"})]}),e.jsx("ul",{className:"space-y-1.5 ml-2",children:n.map((c,o)=>e.jsxs("li",{className:"flex gap-2",children:[e.jsx("span",{className:"text-gray-400 flex-shrink-0",children:"•"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-gray-800",children:c.description}),c.importance!=="low"&&e.jsx("span",{className:`inline-block text-xs px-2 py-0.5 rounded mt-1 ${t(c.importance)}`,children:c.importance==="high"?"High Priority":"Medium Priority"})]})]},o))})]},l))})};De.displayName="ResponsibilitiesList",x.Accordion=mr,x.ActionCard=xr,x.Alert=Y,x.AnalysisSummaryBar=Ae,x.Badge=je,x.Button=O,x.Card=hr,x.ChatContainer=Se,x.ChatInput=Ee,x.ChatMessage=X,x.CheckboxGroup=ir,x.ColorPalette=ue,x.Demo=er,x.DetailPanel=pr,x.Drawer=br,x.FileUpload=cr,x.FormField=rr,x.Input=ge,x.LoadingIndicator=K,x.MatchScoreBar=Re,x.OptionCard=yr,x.PageHeader=jr,x.RadioGroup=dr,x.ResponsibilitiesList=De,x.Section=vr,x.Select=be,x.SelectableRadioOption=Ar,x.Sidebar=Rr,x.SkillTags=Be,x.Slider=$e,x.SocialButton=Ce,x.SortableItem=Ve,x.StatsGrid=ur,x.StatusBanner=_r,x.Stepper=Or,x.TabBar=Mr,x.TagInput=ye,x.Textarea=ke,x.ThemeProvider=xe,x.ThemeToggle=fe,x.clearAllErrors=We,x.clearFieldError=qe,x.getFirstError=Ye,x.hasErrors=ne,x.useForm=Ge,x.useTheme=he,x.validateField=te,x.validateForm=W,x.validators=He,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type DrawerPlacement = 'right' | 'left' | 'bottom';
|
|
3
|
+
export type DrawerSize = 'sm' | 'md' | 'lg' | 'full';
|
|
4
|
+
export interface DrawerProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
footer?: React.ReactNode;
|
|
10
|
+
placement?: DrawerPlacement;
|
|
11
|
+
size?: DrawerSize;
|
|
12
|
+
closeOnOverlayClick?: boolean;
|
|
13
|
+
closeOnEsc?: boolean;
|
|
14
|
+
showCloseButton?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function Drawer({ open, onClose, title, children, footer, placement, size, closeOnOverlayClick, closeOnEsc, showCloseButton, className, }: DrawerProps): React.ReactPortal | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type SelectableRadioOptionTone = 'neutral' | 'purple' | 'blue';
|
|
3
|
+
export interface SelectableRadioOptionProps {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
checked: boolean;
|
|
7
|
+
onChange: (id: string) => void;
|
|
8
|
+
primaryText: React.ReactNode;
|
|
9
|
+
secondaryText?: React.ReactNode;
|
|
10
|
+
tertiaryText?: React.ReactNode;
|
|
11
|
+
tone?: SelectableRadioOptionTone;
|
|
12
|
+
showCheckedIndicator?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function SelectableRadioOption({ id, name, checked, onChange, primaryText, secondaryText, tertiaryText, tone, showCheckedIndicator, disabled, className, }: SelectableRadioOptionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,6 +22,8 @@ export { ActionCard } from './ActionCard';
|
|
|
22
22
|
export type { ActionCardProps, ActionCardAction } from './ActionCard';
|
|
23
23
|
export { Card } from './Card';
|
|
24
24
|
export type { CardProps } from './Card';
|
|
25
|
+
export { Drawer } from './Drawer';
|
|
26
|
+
export type { DrawerProps, DrawerPlacement, DrawerSize } from './Drawer';
|
|
25
27
|
export { Section } from './Section';
|
|
26
28
|
export type { SectionProps } from './Section';
|
|
27
29
|
export { DetailPanel } from './DetailPanel';
|
|
@@ -32,6 +34,8 @@ export { OptionCard } from './OptionCard';
|
|
|
32
34
|
export type { OptionCardProps } from './OptionCard';
|
|
33
35
|
export { Slider } from './Slider';
|
|
34
36
|
export type { SliderProps } from './Slider';
|
|
37
|
+
export { SelectableRadioOption } from './SelectableRadioOption';
|
|
38
|
+
export type { SelectableRadioOptionProps, SelectableRadioOptionTone } from './SelectableRadioOption';
|
|
35
39
|
export { SortableItem } from './SortableItem';
|
|
36
40
|
export type { SortableItemProps } from './SortableItem';
|
|
37
41
|
export { Alert } from './Alert';
|