UNPKG

acemyjob-ui

Version:

A React component library for job search and career management applications

23 lines (22 loc) 24.8 kB
(function(d,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("@headlessui/react"),require("@heroicons/react/24/outline")):typeof define=="function"&&define.amd?define(["exports","react","@headlessui/react","@heroicons/react/24/outline"],v):(d=typeof globalThis<"u"?globalThis:d||self,v(d.AceMyJobUI={},d.React,d.HeadlessUI,d.HeroiconsOutline))})(this,function(d,v,k,L){"use strict";var T={exports:{}},j={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var D;function ee(){if(D)return j;D=1;var s=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(o,i,l){var g=null;if(l!==void 0&&(g=""+l),i.key!==void 0&&(g=""+i.key),"key"in i){l={};for(var b in i)b!=="key"&&(l[b]=i[b])}else l=i;return i=l.ref,{$$typeof:s,type:o,key:g,ref:i!==void 0?i:null,props:l}}return j.Fragment=n,j.jsx=t,j.jsxs=t,j}var w={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var M;function re(){return M||(M=1,process.env.NODE_ENV!=="production"&&function(){function s(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case ie:return"Profiler";case te:return"StrictMode";case ve:return"Suspense";case he:return"SuspenseList";case fe:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case ce:return"Portal";case me:return(e.displayName||"Context")+".Provider";case ue:return(e._context.displayName||"Context")+".Consumer";case de:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xe:return a=e.displayName||null,a!==null?a:s(e.type)||"Memo";case H:a=e._payload,e=e._init;try{return s(e(a))}catch{}}return null}function n(e){return""+e}function t(e){try{n(e);var a=!1}catch{a=!0}if(a){a=console;var c=a.error,u=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return c.call(a,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",u),n(e)}}function o(e){if(e===S)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===H)return"<...>";try{var a=s(e);return a?"<"+a+">":"<...>"}catch{return"<...>"}}function i(){var e=_.A;return e===null?null:e.getOwner()}function l(){return Error("react-stack-top-frame")}function g(e){if(X.call(e,"key")){var a=Object.getOwnPropertyDescriptor(e,"key").get;if(a&&a.isReactWarning)return!1}return e.key!==void 0}function b(e,a){function c(){$||($=!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)",a))}c.isReactWarning=!0,Object.defineProperty(e,"key",{get:c,configurable:!0})}function p(){var e=s(this.type);return q[e]||(q[e]=!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.")),e=this.props.ref,e!==void 0?e:null}function E(e,a,c,u,f,x,C,P){return c=x.ref,e={$$typeof:G,type:e,key:a,props:x,_owner:f},(c!==void 0?c:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:p}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:C}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:P}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function h(e,a,c,u,f,x,C,P){var m=a.children;if(m!==void 0)if(u)if(be(m)){for(u=0;u<m.length;u++)y(m[u]);Object.freeze&&Object.freeze(m)}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 y(m);if(X.call(a,"key")){m=s(e);var V=Object.keys(a).filter(function(pe){return pe!=="key"});u=0<V.length?"{key: someKey, "+V.join(": ..., ")+": ...}":"{key: someKey}",K[m+u]||(V=0<V.length?"{"+V.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`,u,m,V,m),K[m+u]=!0)}if(m=null,c!==void 0&&(t(c),m=""+c),g(a)&&(t(a.key),m=""+a.key),"key"in a){c={};for(var O in a)O!=="key"&&(c[O]=a[O])}else c=a;return m&&b(c,typeof e=="function"?e.displayName||e.name||"Unknown":e),E(e,m,x,f,i(),c,C,P)}function y(e){typeof e=="object"&&e!==null&&e.$$typeof===G&&e._store&&(e._store.validated=1)}var R=v,G=Symbol.for("react.transitional.element"),ce=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),ie=Symbol.for("react.profiler"),ue=Symbol.for("react.consumer"),me=Symbol.for("react.context"),de=Symbol.for("react.forward_ref"),ve=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),xe=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),fe=Symbol.for("react.activity"),ge=Symbol.for("react.client.reference"),_=R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=Object.prototype.hasOwnProperty,be=Array.isArray,A=console.createTask?console.createTask:function(){return null};R={"react-stack-bottom-frame":function(e){return e()}};var $,q={},Q=R["react-stack-bottom-frame"].bind(R,l)(),Z=A(o(l)),K={};w.Fragment=S,w.jsx=function(e,a,c,u,f){var x=1e4>_.recentlyCreatedOwnerStacks++;return h(e,a,c,!1,u,f,x?Error("react-stack-top-frame"):Q,x?A(o(e)):Z)},w.jsxs=function(e,a,c,u,f){var x=1e4>_.recentlyCreatedOwnerStacks++;return h(e,a,c,!0,u,f,x?Error("react-stack-top-frame"):Q,x?A(o(e)):Z)}}()),w}var Y;function ae(){return Y||(Y=1,process.env.NODE_ENV==="production"?T.exports=ee():T.exports=re()),T.exports}var r=ae();function N(...s){return s.filter(Boolean).join(" ")}function se({company:s,profile:n,navigation:t}){const[o,i]=v.useState(!1);return r.jsx(r.Fragment,{children:r.jsxs("div",{children:[r.jsxs(k.Dialog,{open:o,onClose:i,className:"relative z-50 lg:hidden",children:[r.jsx(k.DialogBackdrop,{transition:!0,className:"fixed inset-0 bg-gray-900/80 transition-opacity duration-300 ease-linear data-closed:opacity-0"}),r.jsx("div",{className:"fixed inset-0 flex",children:r.jsxs(k.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:[r.jsx(k.TransitionChild,{children:r.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:r.jsxs("button",{type:"button",onClick:()=>i(!1),className:"-m-2.5 p-2.5",children:[r.jsx("span",{className:"sr-only",children:"Close sidebar"}),r.jsx(L.XMarkIcon,{"aria-hidden":"true",className:"size-6 text-white"})]})})}),r.jsxs("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto bg-indigo-600 px-6 pb-2",children:[r.jsx("div",{className:"flex h-16 shrink-0 items-center",children:r.jsx("img",{alt:s.name,src:s.logo,className:"h-8 w-auto"})}),r.jsx("nav",{className:"flex flex-1 flex-col",children:r.jsx("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:r.jsx("li",{children:r.jsx("ul",{role:"list",className:"-mx-2 space-y-1",children:t.map(l=>r.jsx("li",{children:r.jsxs("a",{href:l.href,className:N(l.current?"bg-indigo-700 text-white":"text-indigo-200 hover:bg-indigo-700 hover:text-white","group flex gap-x-3 rounded-md p-2 text-sm/6 font-semibold"),children:[r.jsx(l.icon,{"aria-hidden":"true",className:N(l.current?"text-white":"text-indigo-200 group-hover:text-white","size-6 shrink-0")}),l.name]})},l.name))})})})})]})]})})]}),r.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:r.jsxs("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto bg-indigo-600 px-6",children:[r.jsx("div",{className:"flex h-16 shrink-0 items-center",children:r.jsx("img",{alt:s.name,src:s.logo,className:"h-8 w-auto"})}),r.jsx("nav",{className:"flex flex-1 flex-col",children:r.jsxs("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:[r.jsx("li",{children:r.jsx("ul",{role:"list",className:"-mx-2 space-y-1",children:t.map(l=>r.jsx("li",{children:r.jsxs("a",{href:l.href,className:N(l.current?"bg-indigo-700 text-white":"text-indigo-200 hover:bg-indigo-700 hover:text-white","group flex gap-x-3 rounded-md p-2 text-sm/6 font-semibold"),children:[r.jsx(l.icon,{"aria-hidden":"true",className:N(l.current?"text-white":"text-indigo-200 group-hover:text-white","size-6 shrink-0")}),l.name]})},l.name))})}),r.jsx("li",{className:"-mx-6 mt-auto",children:r.jsxs("a",{href:"#",className:"flex items-center gap-x-4 px-6 py-3 text-sm/6 font-semibold text-white hover:bg-indigo-700",children:[r.jsx("img",{alt:n.name,src:n.image,className:"size-8 rounded-full bg-indigo-700"}),r.jsx("span",{className:"sr-only",children:"Your profile"}),r.jsx("span",{"aria-hidden":"true",children:n.name})]})})]})})]})}),r.jsxs("div",{className:"sticky top-0 z-40 flex items-center gap-x-6 bg-indigo-600 px-4 py-4 shadow-xs sm:px-6 lg:hidden",children:[r.jsxs("button",{type:"button",onClick:()=>i(!0),className:"-m-2.5 p-2.5 text-indigo-200 lg:hidden",children:[r.jsx("span",{className:"sr-only",children:"Open sidebar"}),r.jsx(L.Bars3Icon,{"aria-hidden":"true",className:"size-6"})]}),r.jsx("div",{className:"flex-1 text-sm/6 font-semibold text-white",children:"Dashboard"}),r.jsxs("a",{href:"#",children:[r.jsx("span",{className:"sr-only",children:"Your profile"}),r.jsx("img",{alt:n.name,src:n.image,className:"size-8 rounded-full bg-indigo-700"})]})]})]})})}const F=s=>s.replace("--color-","bg-"),oe=({name:s,cssVar:n,value:t})=>{const o=`rgb(${t})`;return r.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:[r.jsx("div",{className:`w-16 h-16 rounded-lg border border-border shadow-sm ${F(n)}`}),r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"text-sm font-medium text-text-primary",children:s}),r.jsx("div",{className:"text-xs text-text-muted font-mono",children:n}),r.jsx("div",{className:"text-xs text-text-secondary",children:o})]})]})},I=({title:s,colors:n})=>r.jsxs("div",{className:"space-y-4",children:[r.jsx("h3",{className:"text-lg font-semibold text-text-primary border-b border-border-subtle pb-2",children:s}),r.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:n.map(t=>r.jsx(oe,{...t},t.name))})]}),U=()=>{const s=[{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"}]}],n=[{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"}]}],t=[{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 r.jsxs("div",{className:"p-8 space-y-8 bg-background min-h-screen",children:[r.jsxs("div",{className:"text-center space-y-2",children:[r.jsx("h1",{className:"text-3xl font-bold text-text-primary",children:"AceMyJob Color Palette"}),r.jsx("p",{className:"text-text-secondary",children:"Your complete design system color reference"})]}),n.map(o=>r.jsx(I,{...o},o.title)),s.map(o=>r.jsx(I,{...o},o.title)),r.jsxs("div",{className:"space-y-4",children:[r.jsx("h3",{className:"text-lg font-semibold text-text-primary border-b border-border-subtle pb-2",children:"Semantic Colors (Theme-aware)"}),r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:t.map(o=>r.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:[r.jsx("div",{className:`w-16 h-16 rounded-lg border border-border shadow-sm ${F(o.cssVar)}`}),r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"text-sm font-medium text-text-primary",children:o.name}),r.jsx("div",{className:"text-xs text-text-muted font-mono",children:o.cssVar})]})]},o.name))})]}),r.jsx("div",{className:"text-center pt-8 border-t border-border-subtle",children:r.jsx("p",{className:"text-text-muted text-sm",children:"Toggle between light and dark themes to see how semantic colors adapt"})})]})},z=v.createContext(void 0),W=()=>{const s=v.useContext(z);if(s===void 0)throw new Error("useTheme must be used within a ThemeProvider");return s},B=({children:s,defaultTheme:n="system",storageKey:t="acemyjob-ui-theme"})=>{const[o,i]=v.useState(()=>typeof window<"u"&&localStorage.getItem(t)||n),[l,g]=v.useState("light");v.useEffect(()=>{const p=window.document.documentElement,E=()=>{let h;o==="system"?h=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":h=o,g(h),p.classList.remove("light","dark"),p.classList.add(h)};if(E(),o==="system"){const h=window.matchMedia("(prefers-color-scheme: dark)"),y=()=>E();return h.addEventListener("change",y),()=>h.removeEventListener("change",y)}},[o]);const b={theme:o,setTheme:p=>{localStorage.setItem(t,p),i(p)},resolvedTheme:l};return r.jsx(z.Provider,{value:b,children:s})},J=()=>{const{theme:s,setTheme:n}=W(),t=()=>{n(s==="light"?"dark":s==="dark"?"system":"light")},o=()=>{switch(s){case"light":return r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.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 r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.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 r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.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"})})}},i=()=>{switch(s){case"light":return"Light";case"dark":return"Dark";case"system":return"System"}};return r.jsxs("button",{onClick:t,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: ${i()}. Click to cycle themes.`,children:[o(),r.jsx("span",{className:"hidden sm:inline",children:i()})]})},le=()=>r.jsxs("div",{className:"relative",children:[r.jsx("div",{className:"fixed top-4 right-4 z-10",children:r.jsx(J,{})}),r.jsx(U,{})]}),ne=()=>r.jsx(B,{defaultTheme:"system",storageKey:"acemyjob-demo-theme",children:r.jsx(le,{})});d.ColorPalette=U,d.Demo=ne,d.Sidebar=se,d.ThemeProvider=B,d.ThemeToggle=J,d.useTheme=W,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});