sls-ui-library 1.0.0 → 1.0.2

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.
@@ -1,175 +1,146 @@
1
- (function(b,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],F):(b=typeof globalThis<"u"?globalThis:b||self,F(b.SlsUiLibrary={},b.React,b.ReactDOM))})(this,function(b,F,je){"use strict";function ht(r){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const a in r)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(n,a,s.get?s:{enumerable:!0,get:()=>r[a]})}}return n.default=r,Object.freeze(n)}const g=ht(F);var ce={exports:{}},J={};/**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var ke;function bt(){if(ke)return J;ke=1;var r=F,n=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function f(h,c,x){var d,m={},j=null,z=null;x!==void 0&&(j=""+x),c.key!==void 0&&(j=""+c.key),c.ref!==void 0&&(z=c.ref);for(d in c)s.call(c,d)&&!l.hasOwnProperty(d)&&(m[d]=c[d]);if(h&&h.defaultProps)for(d in c=h.defaultProps,c)m[d]===void 0&&(m[d]=c[d]);return{$$typeof:n,type:h,key:j,ref:z,props:m,_owner:i.current}}return J.Fragment=a,J.jsx=f,J.jsxs=f,J}var X={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var we;function pt(){return we||(we=1,process.env.NODE_ENV!=="production"&&function(){var r=F,n=Symbol.for("react.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),z=Symbol.for("react.offscreen"),D=Symbol.iterator,k="@@iterator";function T(t){if(t===null||typeof t!="object")return null;var o=D&&t[D]||t[k];return typeof o=="function"?o:null}var E=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function M(t){{for(var o=arguments.length,u=new Array(o>1?o-1:0),v=1;v<o;v++)u[v-1]=arguments[v];Z("error",t,u)}}function Z(t,o,u){{var v=E.ReactDebugCurrentFrame,R=v.getStackAddendum();R!==""&&(o+="%s",u=u.concat([R]));var S=u.map(function(N){return String(N)});S.unshift("Warning: "+o),Function.prototype.apply.call(console[t],console,S)}}var Q=!1,C=!1,w=!1,Y=!1,yr=!1,Ve;Ve=Symbol.for("react.module.reference");function jr(t){return!!(typeof t=="string"||typeof t=="function"||t===s||t===l||yr||t===i||t===x||t===d||Y||t===z||Q||C||w||typeof t=="object"&&t!==null&&(t.$$typeof===j||t.$$typeof===m||t.$$typeof===f||t.$$typeof===h||t.$$typeof===c||t.$$typeof===Ve||t.getModuleId!==void 0))}function kr(t,o,u){var v=t.displayName;if(v)return v;var R=o.displayName||o.name||"";return R!==""?u+"("+R+")":u}function qe(t){return t.displayName||"Context"}function B(t){if(t==null)return null;if(typeof t.tag=="number"&&M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case s:return"Fragment";case a:return"Portal";case l:return"Profiler";case i:return"StrictMode";case x:return"Suspense";case d:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case h:var o=t;return qe(o)+".Consumer";case f:var u=t;return qe(u._context)+".Provider";case c:return kr(t,t.render,"ForwardRef");case m:var v=t.displayName||null;return v!==null?v:B(t.type)||"Memo";case j:{var R=t,S=R._payload,N=R._init;try{return B(N(S))}catch{return null}}}return null}var q=Object.assign,K=0,Ue,He,Ge,Je,Xe,Ze,Qe;function Ke(){}Ke.__reactDisabledLog=!0;function wr(){{if(K===0){Ue=console.log,He=console.info,Ge=console.warn,Je=console.error,Xe=console.group,Ze=console.groupCollapsed,Qe=console.groupEnd;var t={configurable:!0,enumerable:!0,value:Ke,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}K++}}function Nr(){{if(K--,K===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},t,{value:Ue}),info:q({},t,{value:He}),warn:q({},t,{value:Ge}),error:q({},t,{value:Je}),group:q({},t,{value:Xe}),groupCollapsed:q({},t,{value:Ze}),groupEnd:q({},t,{value:Qe})})}K<0&&M("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var me=E.ReactCurrentDispatcher,xe;function se(t,o,u){{if(xe===void 0)try{throw Error()}catch(R){var v=R.stack.trim().match(/\n( *(at )?)/);xe=v&&v[1]||""}return`
18
- `+xe+t}}var he=!1,ie;{var Cr=typeof WeakMap=="function"?WeakMap:Map;ie=new Cr}function et(t,o){if(!t||he)return"";{var u=ie.get(t);if(u!==void 0)return u}var v;he=!0;var R=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var S;S=me.current,me.current=null,wr();try{if(o){var N=function(){throw Error()};if(Object.defineProperty(N.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(N,[])}catch(A){v=A}Reflect.construct(t,[],N)}else{try{N.call()}catch(A){v=A}t.call(N.prototype)}}else{try{throw Error()}catch(A){v=A}t()}}catch(A){if(A&&v&&typeof A.stack=="string"){for(var y=A.stack.split(`
19
- `),L=v.stack.split(`
20
- `),P=y.length-1,O=L.length-1;P>=1&&O>=0&&y[P]!==L[O];)O--;for(;P>=1&&O>=0;P--,O--)if(y[P]!==L[O]){if(P!==1||O!==1)do if(P--,O--,O<0||y[P]!==L[O]){var $=`
21
- `+y[P].replace(" at new "," at ");return t.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",t.displayName)),typeof t=="function"&&ie.set(t,$),$}while(P>=1&&O>=0);break}}}finally{he=!1,me.current=S,Nr(),Error.prepareStackTrace=R}var G=t?t.displayName||t.name:"",U=G?se(G):"";return typeof t=="function"&&ie.set(t,U),U}function Er(t,o,u){return et(t,!1)}function Rr(t){var o=t.prototype;return!!(o&&o.isReactComponent)}function oe(t,o,u){if(t==null)return"";if(typeof t=="function")return et(t,Rr(t));if(typeof t=="string")return se(t);switch(t){case x:return se("Suspense");case d:return se("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case c:return Er(t.render);case m:return oe(t.type,o,u);case j:{var v=t,R=v._payload,S=v._init;try{return oe(S(R),o,u)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,tt={},rt=E.ReactDebugCurrentFrame;function le(t){if(t){var o=t._owner,u=oe(t.type,t._source,o?o.type:null);rt.setExtraStackFrame(u)}else rt.setExtraStackFrame(null)}function Sr(t,o,u,v,R){{var S=Function.call.bind(ee);for(var N in t)if(S(t,N)){var y=void 0;try{if(typeof t[N]!="function"){var L=Error((v||"React class")+": "+u+" type `"+N+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[N]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw L.name="Invariant Violation",L}y=t[N](o,N,v,u,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(P){y=P}y&&!(y instanceof Error)&&(le(R),M("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",v||"React class",u,N,typeof y),le(null)),y instanceof Error&&!(y.message in tt)&&(tt[y.message]=!0,le(R),M("Failed %s type: %s",u,y.message),le(null))}}}var _r=Array.isArray;function be(t){return _r(t)}function Tr(t){{var o=typeof Symbol=="function"&&Symbol.toStringTag,u=o&&t[Symbol.toStringTag]||t.constructor.name||"Object";return u}}function Mr(t){try{return nt(t),!1}catch{return!0}}function nt(t){return""+t}function at(t){if(Mr(t))return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Tr(t)),nt(t)}var st=E.ReactCurrentOwner,Pr={key:!0,ref:!0,__self:!0,__source:!0},it,ot;function Or(t){if(ee.call(t,"ref")){var o=Object.getOwnPropertyDescriptor(t,"ref").get;if(o&&o.isReactWarning)return!1}return t.ref!==void 0}function Dr(t){if(ee.call(t,"key")){var o=Object.getOwnPropertyDescriptor(t,"key").get;if(o&&o.isReactWarning)return!1}return t.key!==void 0}function zr(t,o){typeof t.ref=="string"&&st.current}function Lr(t,o){{var u=function(){it||(it=!0,M("%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://reactjs.org/link/special-props)",o))};u.isReactWarning=!0,Object.defineProperty(t,"key",{get:u,configurable:!0})}}function Ar(t,o){{var u=function(){ot||(ot=!0,M("%s: `ref` 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://reactjs.org/link/special-props)",o))};u.isReactWarning=!0,Object.defineProperty(t,"ref",{get:u,configurable:!0})}}var Fr=function(t,o,u,v,R,S,N){var y={$$typeof:n,type:t,key:o,ref:u,props:N,_owner:S};return y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(y,"_self",{configurable:!1,enumerable:!1,writable:!1,value:v}),Object.defineProperty(y,"_source",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y};function Ir(t,o,u,v,R){{var S,N={},y=null,L=null;u!==void 0&&(at(u),y=""+u),Dr(o)&&(at(o.key),y=""+o.key),Or(o)&&(L=o.ref,zr(o,R));for(S in o)ee.call(o,S)&&!Pr.hasOwnProperty(S)&&(N[S]=o[S]);if(t&&t.defaultProps){var P=t.defaultProps;for(S in P)N[S]===void 0&&(N[S]=P[S])}if(y||L){var O=typeof t=="function"?t.displayName||t.name||"Unknown":t;y&&Lr(N,O),L&&Ar(N,O)}return Fr(t,y,L,R,v,st.current,N)}}var pe=E.ReactCurrentOwner,lt=E.ReactDebugCurrentFrame;function H(t){if(t){var o=t._owner,u=oe(t.type,t._source,o?o.type:null);lt.setExtraStackFrame(u)}else lt.setExtraStackFrame(null)}var ve;ve=!1;function ge(t){return typeof t=="object"&&t!==null&&t.$$typeof===n}function ct(){{if(pe.current){var t=B(pe.current.type);if(t)return`
22
-
23
- Check the render method of \``+t+"`."}return""}}function $r(t){return""}var dt={};function Yr(t){{var o=ct();if(!o){var u=typeof t=="string"?t:t.displayName||t.name;u&&(o=`
24
-
25
- Check the top-level render call using <`+u+">.")}return o}}function ut(t,o){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var u=Yr(o);if(dt[u])return;dt[u]=!0;var v="";t&&t._owner&&t._owner!==pe.current&&(v=" It was passed a child from "+B(t._owner.type)+"."),H(t),M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',u,v),H(null)}}function ft(t,o){{if(typeof t!="object")return;if(be(t))for(var u=0;u<t.length;u++){var v=t[u];ge(v)&&ut(v,o)}else if(ge(t))t._store&&(t._store.validated=!0);else if(t){var R=T(t);if(typeof R=="function"&&R!==t.entries)for(var S=R.call(t),N;!(N=S.next()).done;)ge(N.value)&&ut(N.value,o)}}}function Br(t){{var o=t.type;if(o==null||typeof o=="string")return;var u;if(typeof o=="function")u=o.propTypes;else if(typeof o=="object"&&(o.$$typeof===c||o.$$typeof===m))u=o.propTypes;else return;if(u){var v=B(o);Sr(u,t.props,"prop",v,t)}else if(o.PropTypes!==void 0&&!ve){ve=!0;var R=B(o);M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R||"Unknown")}typeof o.getDefaultProps=="function"&&!o.getDefaultProps.isReactClassApproved&&M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Wr(t){{for(var o=Object.keys(t.props),u=0;u<o.length;u++){var v=o[u];if(v!=="children"&&v!=="key"){H(t),M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",v),H(null);break}}t.ref!==null&&(H(t),M("Invalid attribute `ref` supplied to `React.Fragment`."),H(null))}}var mt={};function xt(t,o,u,v,R,S){{var N=jr(t);if(!N){var y="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(y+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var L=$r();L?y+=L:y+=ct();var P;t===null?P="null":be(t)?P="array":t!==void 0&&t.$$typeof===n?(P="<"+(B(t.type)||"Unknown")+" />",y=" Did you accidentally export a JSX literal instead of a component?"):P=typeof t,M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",P,y)}var O=Ir(t,o,u,R,S);if(O==null)return O;if(N){var $=o.children;if($!==void 0)if(v)if(be($)){for(var G=0;G<$.length;G++)ft($[G],t);Object.freeze&&Object.freeze($)}else M("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 ft($,t)}if(ee.call(o,"key")){var U=B(t),A=Object.keys(o).filter(function(Jr){return Jr!=="key"}),ye=A.length>0?"{key: someKey, "+A.join(": ..., ")+": ...}":"{key: someKey}";if(!mt[U+ye]){var Gr=A.length>0?"{"+A.join(": ..., ")+": ...}":"{}";M(`A props object containing a "key" prop is being spread into JSX:
26
- let props = %s;
27
- <%s {...props} />
28
- React keys must be passed directly to JSX without using spread:
29
- let props = %s;
30
- <%s key={someKey} {...props} />`,ye,U,Gr,U),mt[U+ye]=!0}}return t===s?Wr(O):Br(O),O}}function Vr(t,o,u){return xt(t,o,u,!0)}function qr(t,o,u){return xt(t,o,u,!1)}var Ur=qr,Hr=Vr;X.Fragment=s,X.jsx=Ur,X.jsxs=Hr}()),X}process.env.NODE_ENV==="production"?ce.exports=bt():ce.exports=pt();var e=ce.exports;function Ne(r){var n,a,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var i=r.length;for(n=0;n<i;n++)r[n]&&(a=Ne(r[n]))&&(s&&(s+=" "),s+=a)}else for(a in r)r[a]&&(s&&(s+=" "),s+=a);return s}function vt(){for(var r,n,a=0,s="",i=arguments.length;a<i;a++)(r=arguments[a])&&(n=Ne(r))&&(s&&(s+=" "),s+=n);return s}function p(...r){return vt(r)}const gt={neutral:"bg-tag text-tag border border-tag-border",online:"bg-status-online-bg text-status-online",warn:"bg-status-warn-bg text-status-warn",offline:"bg-status-offline-bg text-status-offline",live:"bg-live-bg text-live-text",accent:"bg-accent-muted text-accent"};function yt({tone:r="neutral",className:n,children:a,...s}){return e.jsx("span",{className:p("inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-medium",gt[r],n),...s,children:a})}const jt={primary:"bg-accent text-white hover:brightness-110 focus-visible:ring-accent/50",secondary:"bg-accent-muted text-accent hover:brightness-105 focus-visible:ring-accent/40",outline:"border border-card-border text-ink-primary bg-transparent hover:bg-accent-muted focus-visible:ring-accent/30",ghost:"bg-transparent text-ink-primary hover:bg-accent-muted focus-visible:ring-accent/30",danger:"bg-status-offline text-white hover:brightness-110 focus-visible:ring-status-offline/50",add:"bg-status-online text-white hover:brightness-110 focus-visible:ring-status-online/50",cancel:"border border-card-border text-ink-secondary bg-transparent hover:bg-card focus-visible:ring-ink-muted/30"},kt={sm:"h-8 px-3 text-sm gap-1.5",md:"h-10 px-4 text-sm gap-2",lg:"h-12 px-6 text-base gap-2"},I=g.forwardRef(({variant:r="primary",size:n="md",icon:a,trailingIcon:s,loading:i,fullWidth:l,disabled:f,className:h,children:c,...x},d)=>e.jsxs("button",{ref:d,disabled:f||i,className:p("inline-flex items-center justify-center rounded-md font-primary font-medium","transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2","disabled:opacity-50 disabled:cursor-not-allowed",jt[r],kt[n],l&&"w-full",h),...x,children:[i?e.jsx("span",{className:"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}):a&&e.jsx("span",{className:"inline-flex shrink-0",children:a}),c,!i&&s&&e.jsx("span",{className:"inline-flex shrink-0",children:s})]}));I.displayName="Button";const Ce=g.forwardRef(({padded:r=!0,className:n,children:a,...s},i)=>e.jsx("div",{ref:i,className:p("rounded-lg border border-card-border bg-card shadow-md text-ink-primary",r&&"p-4",n),...s,children:a}));Ce.displayName="Card";/**
1
+ (function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h.SlsUiLibrary={},h.jsxRuntime,h.React,h.ReactDOM))})(this,function(h,e,L,$){"use strict";function ce(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(r,a,n.get?n:{enumerable:!0,get:()=>t[a]})}}return r.default=t,Object.freeze(r)}const p=ce(L);function Y(t){var r,a,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(a=Y(t[r]))&&(n&&(n+=" "),n+=a)}else for(a in t)t[a]&&(n&&(n+=" "),n+=a);return n}function oe(){for(var t,r,a=0,n="",s=arguments.length;a<s;a++)(t=arguments[a])&&(r=Y(t))&&(n&&(n+=" "),n+=r);return n}function b(...t){return oe(t)}const ie={neutral:"bg-tag text-tag border border-tag-border",online:"bg-status-online-bg text-status-online",warn:"bg-status-warn-bg text-status-warn",offline:"bg-status-offline-bg text-status-offline",live:"bg-live-bg text-live-text",accent:"bg-accent-muted text-accent"};function de({tone:t="neutral",className:r,children:a,...n}){return e.jsx("span",{className:b("inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-medium",ie[t],r),...n,children:a})}const fe={primary:"bg-accent text-white hover:brightness-110 focus-visible:ring-accent/50",secondary:"bg-accent-muted text-accent hover:brightness-105 focus-visible:ring-accent/40",outline:"border border-card-border text-ink-primary bg-transparent hover:bg-accent-muted focus-visible:ring-accent/30",ghost:"bg-transparent text-ink-primary hover:bg-accent-muted focus-visible:ring-accent/30",danger:"bg-status-offline text-white hover:brightness-110 focus-visible:ring-status-offline/50",add:"bg-status-online text-white hover:brightness-110 focus-visible:ring-status-online/50",cancel:"border border-card-border text-ink-secondary bg-transparent hover:bg-card focus-visible:ring-ink-muted/30"},he={sm:"h-8 px-3 text-sm gap-1.5",md:"h-10 px-4 text-sm gap-2",lg:"h-12 px-6 text-base gap-2"},C=p.forwardRef(({variant:t="primary",size:r="md",icon:a,trailingIcon:n,loading:s,fullWidth:l,disabled:c,className:u,children:i,...d},o)=>e.jsxs("button",{ref:o,disabled:c||s,className:b("inline-flex items-center justify-center rounded-md font-primary font-medium","transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2","disabled:opacity-50 disabled:cursor-not-allowed",fe[t],he[r],l&&"w-full",u),...d,children:[s?e.jsx("span",{className:"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}):a&&e.jsx("span",{className:"inline-flex shrink-0",children:a}),i,!s&&n&&e.jsx("span",{className:"inline-flex shrink-0",children:n})]}));C.displayName="Button";const H=p.forwardRef(({padded:t=!0,className:r,children:a,...n},s)=>e.jsx("div",{ref:s,className:b("rounded-lg border border-card-border bg-card shadow-md text-ink-primary",t&&"p-4",r),...n,children:a}));H.displayName="Card";/**
31
2
  * @license lucide-react v0.400.0 - ISC
32
3
  *
33
4
  * This source code is licensed under the ISC license.
34
5
  * See the LICENSE file in the root directory of this source tree.
35
- */const wt=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ee=(...r)=>r.filter((n,a,s)=>!!n&&s.indexOf(n)===a).join(" ");/**
6
+ */const ue=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),V=(...t)=>t.filter((r,a,n)=>!!r&&n.indexOf(r)===a).join(" ");/**
36
7
  * @license lucide-react v0.400.0 - ISC
37
8
  *
38
9
  * This source code is licensed under the ISC license.
39
10
  * See the LICENSE file in the root directory of this source tree.
40
- */var Nt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
11
+ */var be={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
41
12
  * @license lucide-react v0.400.0 - ISC
42
13
  *
43
14
  * This source code is licensed under the ISC license.
44
15
  * See the LICENSE file in the root directory of this source tree.
45
- */const Ct=F.forwardRef(({color:r="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:i="",children:l,iconNode:f,...h},c)=>F.createElement("svg",{ref:c,...Nt,width:n,height:n,stroke:r,strokeWidth:s?Number(a)*24/Number(n):a,className:Ee("lucide",i),...h},[...f.map(([x,d])=>F.createElement(x,d)),...Array.isArray(l)?l:[l]]));/**
16
+ */const pe=L.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:n,className:s="",children:l,iconNode:c,...u},i)=>L.createElement("svg",{ref:i,...be,width:r,height:r,stroke:t,strokeWidth:n?Number(a)*24/Number(r):a,className:V("lucide",s),...u},[...c.map(([d,o])=>L.createElement(d,o)),...Array.isArray(l)?l:[l]]));/**
46
17
  * @license lucide-react v0.400.0 - ISC
47
18
  *
48
19
  * This source code is licensed under the ISC license.
49
20
  * See the LICENSE file in the root directory of this source tree.
50
- */const _=(r,n)=>{const a=F.forwardRef(({className:s,...i},l)=>F.createElement(Ct,{ref:l,iconNode:n,className:Ee(`lucide-${wt(r)}`,s),...i}));return a.displayName=`${r}`,a};/**
21
+ */const v=(t,r)=>{const a=L.forwardRef(({className:n,...s},l)=>L.createElement(pe,{ref:l,iconNode:r,className:V(`lucide-${ue(t)}`,n),...s}));return a.displayName=`${t}`,a};/**
51
22
  * @license lucide-react v0.400.0 - ISC
52
23
  *
53
24
  * This source code is licensed under the ISC license.
54
25
  * See the LICENSE file in the root directory of this source tree.
55
- */const Et=_("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
26
+ */const xe=v("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
56
27
  * @license lucide-react v0.400.0 - ISC
57
28
  *
58
29
  * This source code is licensed under the ISC license.
59
30
  * See the LICENSE file in the root directory of this source tree.
60
- */const Re=_("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
31
+ */const G=v("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
61
32
  * @license lucide-react v0.400.0 - ISC
62
33
  *
63
34
  * This source code is licensed under the ISC license.
64
35
  * See the LICENSE file in the root directory of this source tree.
65
- */const Rt=_("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
36
+ */const me=v("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
66
37
  * @license lucide-react v0.400.0 - ISC
67
38
  *
68
39
  * This source code is licensed under the ISC license.
69
40
  * See the LICENSE file in the root directory of this source tree.
70
- */const St=_("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
41
+ */const ge=v("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
71
42
  * @license lucide-react v0.400.0 - ISC
72
43
  *
73
44
  * This source code is licensed under the ISC license.
74
45
  * See the LICENSE file in the root directory of this source tree.
75
- */const Se=_("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
46
+ */const W=v("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
76
47
  * @license lucide-react v0.400.0 - ISC
77
48
  *
78
49
  * This source code is licensed under the ISC license.
79
50
  * See the LICENSE file in the root directory of this source tree.
80
- */const _e=_("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
51
+ */const U=v("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
81
52
  * @license lucide-react v0.400.0 - ISC
82
53
  *
83
54
  * This source code is licensed under the ISC license.
84
55
  * See the LICENSE file in the root directory of this source tree.
85
- */const Te=_("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
56
+ */const _=v("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
86
57
  * @license lucide-react v0.400.0 - ISC
87
58
  *
88
59
  * This source code is licensed under the ISC license.
89
60
  * See the LICENSE file in the root directory of this source tree.
90
- */const _t=_("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
61
+ */const ye=v("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
91
62
  * @license lucide-react v0.400.0 - ISC
92
63
  *
93
64
  * This source code is licensed under the ISC license.
94
65
  * See the LICENSE file in the root directory of this source tree.
95
- */const Tt=_("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
66
+ */const ve=v("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
96
67
  * @license lucide-react v0.400.0 - ISC
97
68
  *
98
69
  * This source code is licensed under the ISC license.
99
70
  * See the LICENSE file in the root directory of this source tree.
100
- */const Me=_("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
71
+ */const Q=v("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
101
72
  * @license lucide-react v0.400.0 - ISC
102
73
  *
103
74
  * This source code is licensed under the ISC license.
104
75
  * See the LICENSE file in the root directory of this source tree.
105
- */const Pe=_("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
76
+ */const Z=v("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
106
77
  * @license lucide-react v0.400.0 - ISC
107
78
  *
108
79
  * This source code is licensed under the ISC license.
109
80
  * See the LICENSE file in the root directory of this source tree.
110
- */const Mt=_("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
81
+ */const ke=v("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
111
82
  * @license lucide-react v0.400.0 - ISC
112
83
  *
113
84
  * This source code is licensed under the ISC license.
114
85
  * See the LICENSE file in the root directory of this source tree.
115
- */const Pt=_("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
86
+ */const we=v("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
116
87
  * @license lucide-react v0.400.0 - ISC
117
88
  *
118
89
  * This source code is licensed under the ISC license.
119
90
  * See the LICENSE file in the root directory of this source tree.
120
- */const Ot=_("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
91
+ */const Ne=v("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
121
92
  * @license lucide-react v0.400.0 - ISC
122
93
  *
123
94
  * This source code is licensed under the ISC license.
124
95
  * See the LICENSE file in the root directory of this source tree.
125
- */const Dt=_("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
96
+ */const Ce=v("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
126
97
  * @license lucide-react v0.400.0 - ISC
127
98
  *
128
99
  * This source code is licensed under the ISC license.
129
100
  * See the LICENSE file in the root directory of this source tree.
130
- */const zt=_("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
101
+ */const Me=v("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
131
102
  * @license lucide-react v0.400.0 - ISC
132
103
  *
133
104
  * This source code is licensed under the ISC license.
134
105
  * See the LICENSE file in the root directory of this source tree.
135
- */const Lt=_("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
106
+ */const ze=v("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
136
107
  * @license lucide-react v0.400.0 - ISC
137
108
  *
138
109
  * This source code is licensed under the ISC license.
139
110
  * See the LICENSE file in the root directory of this source tree.
140
- */const At=_("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
111
+ */const Se=v("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
141
112
  * @license lucide-react v0.400.0 - ISC
142
113
  *
143
114
  * This source code is licensed under the ISC license.
144
115
  * See the LICENSE file in the root directory of this source tree.
145
- */const Oe=_("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
116
+ */const J=v("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
146
117
  * @license lucide-react v0.400.0 - ISC
147
118
  *
148
119
  * This source code is licensed under the ISC license.
149
120
  * See the LICENSE file in the root directory of this source tree.
150
- */const Ft=_("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
121
+ */const De=v("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
151
122
  * @license lucide-react v0.400.0 - ISC
152
123
  *
153
124
  * This source code is licensed under the ISC license.
154
125
  * See the LICENSE file in the root directory of this source tree.
155
- */const de=_("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
126
+ */const E=v("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
156
127
  * @license lucide-react v0.400.0 - ISC
157
128
  *
158
129
  * This source code is licensed under the ISC license.
159
130
  * See the LICENSE file in the root directory of this source tree.
160
- */const De=_("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
131
+ */const X=v("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
161
132
  * @license lucide-react v0.400.0 - ISC
162
133
  *
163
134
  * This source code is licensed under the ISC license.
164
135
  * See the LICENSE file in the root directory of this source tree.
165
- */const It=_("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
136
+ */const Le=v("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
166
137
  * @license lucide-react v0.400.0 - ISC
167
138
  *
168
139
  * This source code is licensed under the ISC license.
169
140
  * See the LICENSE file in the root directory of this source tree.
170
- */const $t=_("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
141
+ */const je=v("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
171
142
  * @license lucide-react v0.400.0 - ISC
172
143
  *
173
144
  * This source code is licensed under the ISC license.
174
145
  * See the LICENSE file in the root directory of this source tree.
175
- */const te=_("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),re=g.forwardRef(({label:r,id:n,className:a,checked:s,...i},l)=>{const f=n??g.useId();return e.jsxs("label",{htmlFor:f,className:"inline-flex cursor-pointer items-center gap-2 select-none",children:[e.jsxs("span",{className:"relative inline-flex h-4 w-4 shrink-0 items-center justify-center",children:[e.jsx("input",{ref:l,id:f,type:"checkbox",checked:s,className:"peer sr-only",...i}),e.jsx("span",{className:p("h-4 w-4 rounded border border-card-border bg-input transition-colors","peer-checked:border-accent peer-checked:bg-accent","peer-focus-visible:ring-2 peer-focus-visible:ring-accent/40",a)}),s&&e.jsx(_e,{size:12,strokeWidth:3,className:"pointer-events-none absolute text-white"})]}),r&&e.jsx("span",{className:"text-sm text-ink-primary",children:r})]})});re.displayName="Checkbox";const Yt={idle:"text-icon-idle hover:text-icon-active hover:bg-accent-muted",active:"text-icon-active bg-accent-muted",danger:"text-status-offline hover:bg-status-offline-bg"},Bt={sm:"h-8 w-8",md:"h-10 w-10"},W=g.forwardRef(({icon:r,label:n,variant:a="idle",size:s="md",className:i,...l},f)=>e.jsx("button",{ref:f,"aria-label":n,title:n,className:p("inline-flex items-center justify-center rounded-full transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40","disabled:opacity-40 disabled:cursor-not-allowed",Yt[a],Bt[s],i),...l,children:r}));W.displayName="IconButton";function Wt({columns:r,visible:n,onChange:a,className:s}){const[i,l]=g.useState(!1),f=g.useRef(null);g.useEffect(()=>{function c(x){f.current&&!f.current.contains(x.target)&&l(!1)}return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]);function h(c){a(n.includes(c)?n.filter(x=>x!==c):[...n,c])}return e.jsxs("div",{ref:f,className:p("relative",s),children:[e.jsx(W,{icon:e.jsx(zt,{size:16}),label:"Choose columns",onClick:()=>l(c=>!c),variant:i?"active":"idle"}),i&&e.jsx("div",{className:"absolute right-0 z-20 mt-1 w-52 rounded-md border border-card-border bg-card p-2 shadow-lg",children:r.map(c=>e.jsxs("label",{className:"flex items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-accent-muted",children:[e.jsx(re,{checked:n.includes(c.key),onChange:()=>h(c.key)}),e.jsx("span",{className:"text-ink-primary",children:c.label})]},c.key))})]})}const Vt={sm:"max-w-sm",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl"};function ne({open:r,onClose:n,title:a,footer:s,size:i="md",children:l,className:f}){return g.useEffect(()=>{if(!r)return;function h(c){c.key==="Escape"&&n()}return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r,n]),r?je.createPortal(e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:n,"aria-hidden":!0}),e.jsxs("div",{role:"dialog","aria-modal":"true",className:p("relative z-10 flex max-h-[90vh] w-full flex-col rounded-lg border border-card-border bg-card shadow-xl",Vt[i],f),children:[a&&e.jsxs("div",{className:"flex items-center justify-between border-b border-card-border px-5 py-4",children:[e.jsx("h2",{className:"font-secondary text-base font-semibold text-ink-primary",children:a}),e.jsx("button",{onClick:n,"aria-label":"Close",className:"text-ink-muted hover:text-ink-primary",children:e.jsx(te,{size:18})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:l}),s&&e.jsx("div",{className:"flex items-center justify-end gap-2 border-t border-card-border px-5 py-4",children:s})]})]}),document.body):null}function qt({open:r,title:n,message:a,confirmLabel:s="Ok",cancelLabel:i="Close",tone:l="default",onConfirm:f,onClose:h,loading:c}){return e.jsx(ne,{open:r,onClose:h,title:n,size:"sm",footer:e.jsxs(e.Fragment,{children:[e.jsx(I,{variant:"cancel",onClick:h,children:i}),e.jsx(I,{variant:l==="danger"?"danger":"primary",onClick:f,loading:c,children:s})]}),children:e.jsx("p",{className:"text-sm text-ink-secondary",children:a})})}function ue({fullPage:r,label:n="Loading...",className:a}){const s=e.jsxs("div",{className:p("flex flex-col items-center justify-center gap-3",a),children:[e.jsx("span",{className:"h-10 w-10 animate-spin rounded-full border-4 border-accent-muted border-t-accent"}),n&&e.jsx("span",{className:"text-sm text-ink-secondary",children:n})]});return r?e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-canvas/70 backdrop-blur-sm",children:s}):s}function fe({checked:r,indeterminate:n,onChange:a,label:s="Select row"}){const i=g.useRef(null);return g.useEffect(()=>{i.current&&(i.current.indeterminate=!!n)},[n]),e.jsx(re,{ref:i,checked:r,onChange:l=>a(l.target.checked),"aria-label":s})}function Ut({columns:r,data:n,rowKey:a,loading:s,emptyMessage:i="No records found.",visibleColumns:l,sortKey:f,sortDirection:h,onSortChange:c,selectable:x,selectedKeys:d=[],onSelectedKeysChange:m,onRowClick:j,className:z}){const D=l?r.filter(C=>l.includes(C.key)):r,k=n.map(a),T=x&&n.length>0&&k.every(C=>d.includes(C)),E=x&&k.some(C=>d.includes(C));function M(C){if(!(!C.sortable||!c)){if(f!==C.key)return c(C.key,"asc");if(h==="asc")return c(C.key,"desc");c(C.key,null)}}function Z(){m&&m(T?[]:k)}function Q(C){m&&m(d.includes(C)?d.filter(w=>w!==C):[...d,C])}return e.jsx("div",{className:p("overflow-x-auto rounded-lg border border-card-border bg-card",z),children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-card-border bg-canvas",children:[x&&e.jsx("th",{className:"w-10 px-4 py-3",children:e.jsx(fe,{checked:!!T,indeterminate:!T&&E,onChange:Z,label:"Select all rows"})}),D.map(C=>e.jsx("th",{style:{width:C.width},className:p("px-4 py-3 font-medium text-ink-secondary",C.align==="right"&&"text-right",C.align==="center"&&"text-center"),children:C.sortable?e.jsxs("button",{onClick:()=>M(C),className:"inline-flex items-center gap-1 hover:text-ink-primary",children:[C.header,f===C.key?h==="asc"?e.jsx(Rt,{size:12}):h==="desc"?e.jsx(Et,{size:12}):e.jsx(Re,{size:12,className:"opacity-40"}):e.jsx(Re,{size:12,className:"opacity-40"})]}):C.header},C.key))]})}),e.jsx("tbody",{children:s?e.jsx("tr",{children:e.jsx("td",{colSpan:D.length+(x?1:0),className:"py-10",children:e.jsx(ue,{label:"Loading records..."})})}):n.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:D.length+(x?1:0),className:"py-10 text-center text-ink-muted",children:i})}):n.map(C=>{const w=a(C);return e.jsxs("tr",{onClick:()=>j==null?void 0:j(C),className:p("border-b border-card-border last:border-0 hover:bg-accent-muted/60",j&&"cursor-pointer"),children:[x&&e.jsx("td",{className:"px-4 py-3",onClick:Y=>Y.stopPropagation(),children:e.jsx(fe,{checked:d.includes(w),onChange:()=>Q(w)})}),D.map(Y=>e.jsx("td",{className:p("px-4 py-3 text-ink-primary",Y.align==="right"&&"text-right",Y.align==="center"&&"text-center"),children:Y.render(C)},Y.key))]},w)})})]})})}function ze({children:r,className:n,...a}){return r?e.jsxs("p",{className:p("mt-1 flex items-center gap-1 text-xs text-status-offline",n),...a,children:[e.jsx(Mt,{size:12,className:"shrink-0"}),r]}):null}function V({label:r,htmlFor:n,required:a,error:s,hint:i,className:l,children:f,...h}){return e.jsxs("div",{className:p("flex flex-col",l),...h,children:[r&&e.jsxs("label",{htmlFor:n,className:"mb-1.5 text-sm font-medium text-ink-primary",children:[r,a&&e.jsx("span",{className:"ml-0.5 text-status-offline",children:"*"})]}),f,i&&!s&&e.jsx("p",{className:"mt-1 text-xs text-ink-muted",children:i}),e.jsx(ze,{children:s})]})}function Ht({label:r,required:n,error:a,value:s,onChange:i,min:l,max:f,disabled:h,className:c}){const x=g.useId();return e.jsx(V,{label:r,htmlFor:x,required:n,error:a,className:c,children:e.jsxs("div",{className:"relative",children:[e.jsx(Se,{size:16,className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-ink-muted"}),e.jsx("input",{id:x,type:"date",value:s??"",min:l,max:f,disabled:h,onChange:d=>i(d.target.value),className:p("h-10 w-full rounded-md border bg-input pl-9 pr-3 text-sm text-ink-primary","focus:outline-none focus:ring-2 focus:ring-accent/40 disabled:opacity-50",a?"border-status-offline":"border-card-border")})]})})}const Le=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Gt=["Su","Mo","Tu","We","Th","Fr","Sa"],Jt=["This Financial Year","This Month","Last Month","Next Month","This Quarter","This Year","Last Year","Custom Range"];function ae(r){return r?`${String(r.getDate()).padStart(2,"0")}-${Le[r.getMonth()]}-${r.getFullYear()}`:""}function Xt(r,n=new Date){const a=n.getFullYear(),s=n.getMonth();switch(r){case"This Financial Year":{const i=s>=3?a:a-1;return{from:new Date(i,3,1),to:new Date(i+1,2,31)}}case"This Month":return{from:new Date(a,s,1),to:new Date(a,s+1,0)};case"Last Month":return{from:new Date(a,s-1,1),to:new Date(a,s,0)};case"Next Month":return{from:new Date(a,s+1,1),to:new Date(a,s+2,0)};case"This Quarter":{const i=Math.floor(s/3)*3;return{from:new Date(a,i,1),to:new Date(a,i+3,0)}}case"This Year":return{from:new Date(a,0,1),to:new Date(a,11,31)};case"Last Year":return{from:new Date(a-1,0,1),to:new Date(a-1,11,31)};default:return{from:null,to:null}}}function Ae({year:r,month:n,from:a,to:s,onPick:i}){const f=new Date(r,n,1).getDay(),h=new Date(r,n+1,0).getDate(),c=[];for(let m=0;m<f;m++)c.push(null);for(let m=1;m<=h;m++)c.push(m);function x(m){if(!m||!a||!s)return!1;const j=new Date(r,n,m).getTime();return j>=a.getTime()&&j<=s.getTime()}function d(m){if(!m)return!1;const j=new Date(r,n,m).getTime();return a&&j===a.getTime()||s&&j===s.getTime()}return e.jsxs("div",{children:[e.jsxs("p",{className:"mb-2 text-center text-sm font-semibold text-ink-primary",children:[Le[n]," ",r]}),e.jsxs("div",{className:"grid grid-cols-7 gap-y-1 text-center text-xs",children:[Gt.map(m=>e.jsx("span",{className:"text-ink-muted",children:m},m)),c.map((m,j)=>e.jsx("button",{type:"button",disabled:!m,onClick:()=>m&&i(new Date(r,n,m)),className:p("h-7 w-7 rounded text-ink-primary",!m&&"invisible",m&&x(m)&&"bg-accent-muted",m&&d(m)&&"bg-accent text-white"),children:m},j))]})]})}function Zt({label:r,required:n,error:a,value:s,onChange:i,className:l}){const[f,h]=g.useState(!1),[c,x]=g.useState("Custom Range"),[d,m]=g.useState(s),[j,z]=g.useState(()=>(s.from??new Date).getMonth()),[D,k]=g.useState(()=>(s.from??new Date).getFullYear()),T=g.useRef(null);g.useEffect(()=>{function w(Y){T.current&&!T.current.contains(Y.target)&&h(!1)}return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[]);function E(w){x(w),w!=="Custom Range"&&m(Xt(w))}function M(w){x("Custom Range"),!d.from||d.from&&d.to?m({from:w,to:null}):w.getTime()<d.from.getTime()?m({from:w,to:d.from}):m({...d,to:w})}function Z(){j===0?(z(11),k(w=>w-1)):z(w=>w-1)}function Q(){j===11?(z(0),k(w=>w+1)):z(w=>w+1)}function C(){i(d),h(!1)}return e.jsx(V,{label:r,required:n,error:a,className:l,children:e.jsxs("div",{ref:T,className:"relative",children:[e.jsxs("button",{type:"button",onClick:()=>h(w=>!w),className:p("flex h-10 w-full items-center gap-2 rounded-md border bg-input px-3 text-left text-sm","focus:outline-none focus:ring-2 focus:ring-accent/40",a?"border-status-offline":"border-card-border"),children:[e.jsx(Se,{size:16,className:"shrink-0 text-ink-muted"}),e.jsx("span",{className:s.from?"text-ink-primary":"text-ink-muted",children:s.from&&s.to?`${ae(s.from)} - ${ae(s.to)}`:"Select date range"})]}),f&&e.jsxs("div",{className:"absolute z-20 mt-1 flex w-[560px] max-w-[90vw] overflow-hidden rounded-md border border-card-border bg-card shadow-xl",children:[e.jsx("div",{className:"w-40 shrink-0 border-r border-card-border py-2",children:Jt.map(w=>e.jsx("button",{type:"button",onClick:()=>E(w),className:p("block w-full px-3 py-2 text-left text-sm",c===w?"bg-accent text-white":"text-ink-primary hover:bg-accent-muted"),children:w},w))}),e.jsxs("div",{className:"flex-1 p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx("button",{type:"button",onClick:Z,className:"text-ink-muted hover:text-ink-primary",children:e.jsx(_t,{size:16})}),e.jsx("button",{type:"button",onClick:Q,className:"text-ink-muted hover:text-ink-primary",children:e.jsx(Tt,{size:16})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(Ae,{year:D,month:j,from:d.from,to:d.to,onPick:M}),e.jsx(Ae,{year:j===11?D+1:D,month:j===11?0:j+1,from:d.from,to:d.to,onPick:M})]}),e.jsxs("div",{className:"mt-3 flex items-center justify-between border-t border-card-border pt-3",children:[e.jsx("span",{className:"text-sm text-ink-secondary",children:d.from&&d.to?`${ae(d.from)} - ${ae(d.to)}`:"Select a range"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(I,{variant:"cancel",size:"sm",onClick:()=>h(!1),children:"Cancel"}),e.jsx(I,{variant:"primary",size:"sm",onClick:C,disabled:!d.from||!d.to,children:"Apply"})]})]})]})]})]})})}function Qt({label:r,required:n,error:a,options:s,value:i,onChange:l,placeholder:f="Select...",searchable:h=!0,disabled:c,className:x}){const[d,m]=g.useState(!1),[j,z]=g.useState(""),D=g.useRef(null);g.useEffect(()=>{function E(M){D.current&&!D.current.contains(M.target)&&m(!1)}return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[]);const k=h&&j?s.filter(E=>E.label.toLowerCase().includes(j.toLowerCase())):s,T=s.find(E=>E.value===i);return e.jsx(V,{label:r,required:n,error:a,className:x,children:e.jsxs("div",{ref:D,className:"relative",children:[e.jsxs("button",{type:"button",disabled:c,onClick:()=>m(E=>!E),className:p("flex h-10 w-full items-center justify-between rounded-md border bg-input px-3 text-sm text-left","focus:outline-none focus:ring-2 focus:ring-accent/40 disabled:opacity-50",a?"border-status-offline":"border-card-border",T?"text-ink-primary":"text-ink-muted"),children:[e.jsx("span",{className:"truncate",children:(T==null?void 0:T.label)??f}),e.jsx(Te,{size:16,className:p("shrink-0 text-ink-muted transition-transform",d&&"rotate-180")})]}),d&&e.jsxs("div",{className:"absolute z-20 mt-1 w-full overflow-hidden rounded-md border border-card-border bg-card shadow-lg",children:[h&&e.jsxs("div",{className:"flex items-center gap-2 border-b border-card-border px-3 py-2",children:[e.jsx(de,{size:14,className:"text-ink-muted"}),e.jsx("input",{autoFocus:!0,value:j,onChange:E=>z(E.target.value),placeholder:"Search...",className:"w-full bg-transparent text-sm text-ink-primary placeholder:text-ink-muted focus:outline-none"})]}),e.jsxs("ul",{className:"max-h-56 overflow-y-auto py-1",role:"listbox",children:[k.length===0&&e.jsx("li",{className:"px-3 py-2 text-sm text-ink-muted",children:"No options"}),k.map(E=>e.jsx("li",{children:e.jsxs("button",{type:"button",disabled:E.disabled,onClick:()=>{l(E.value),m(!1),z("")},className:p("flex w-full items-center justify-between px-3 py-2 text-left text-sm hover:bg-accent-muted disabled:opacity-40",E.value===i?"text-accent":"text-ink-primary"),children:[E.label,E.value===i&&e.jsx(_e,{size:14})]})},E.value))]})]})]})})}function Kt({items:r,onChange:n,createItem:a,renderRow:s,addLabel:i="Add row",minRows:l=0,className:f}){function h(x,d){const m=r.slice();m[x]={...m[x],...d},n(m)}function c(x){n(r.filter((d,m)=>m!==x))}return e.jsxs("div",{className:p("flex flex-col gap-2",f),children:[r.map((x,d)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1",children:s(x,d,m=>h(d,m))}),e.jsx(W,{icon:e.jsx(It,{size:16}),label:"Remove row",variant:"danger",size:"sm",disabled:r.length<=l,onClick:()=>c(d)})]},d)),e.jsx(I,{variant:"ghost",size:"sm",icon:e.jsx(Oe,{size:14}),onClick:()=>n([...r,a()]),className:"self-start",children:i})]})}function er({open:r,onSearch:n,onClear:a,children:s,className:i}){return r?e.jsxs("div",{className:p("z-20 w-full max-w-md rounded-lg border border-card-border bg-card p-4 shadow-lg",i),children:[e.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:s}),e.jsxs("div",{className:"mt-4 flex items-center justify-end gap-2 border-t border-card-border pt-3",children:[e.jsx(I,{variant:"cancel",size:"sm",onClick:a,children:"Clear filters"}),e.jsx(I,{variant:"primary",size:"sm",onClick:n,children:"Search"})]})]}):null}const Fe=g.forwardRef(({label:r="Add",className:n,...a},s)=>e.jsx("button",{ref:s,"aria-label":r,title:r,className:p("fixed bottom-6 right-6 z-40 flex h-14 w-14 items-center justify-center rounded-full","bg-accent text-white shadow-lg hover:brightness-110 active:scale-95","transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50",n),...a,children:e.jsx(Oe,{size:24,strokeWidth:2.5})}));Fe.displayName="FloatingAddButton";function tr({open:r,onClose:n,onSubmit:a,title:s,size:i="md",submitLabel:l="Ok",cancelLabel:f="Close",submitting:h,submitDisabled:c,children:x}){return e.jsx(ne,{open:r,onClose:n,title:s,size:i,footer:e.jsxs(e.Fragment,{children:[e.jsx(I,{variant:"cancel",onClick:n,disabled:h,children:f}),e.jsx(I,{variant:"primary",onClick:a,loading:h,disabled:c,children:l})]}),children:e.jsx("form",{onSubmit:d=>{d.preventDefault(),a()},className:"flex flex-col gap-4",children:x})})}const Ie=g.forwardRef(({label:r,required:n,error:a,hint:s,icon:i,id:l,className:f,...h},c)=>{const x=l??g.useId();return e.jsx(V,{label:r,htmlFor:x,required:n,error:a,hint:s,children:e.jsxs("div",{className:"relative",children:[i&&e.jsx("span",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-ink-muted",children:i}),e.jsx("input",{ref:c,id:x,className:p("h-10 w-full rounded-md border bg-input px-3 text-sm text-ink-primary placeholder:text-ink-muted","focus:outline-none focus:ring-2 focus:ring-accent/40",a?"border-status-offline":"border-card-border",i&&"pl-9",f),"aria-invalid":!!a,...h})]})})});Ie.displayName="InputField";function rr({label:r,required:n,error:a,options:s,value:i,onChange:l,placeholder:f="Select...",className:h}){const[c,x]=g.useState(!1),[d,m]=g.useState(""),j=g.useRef(null);g.useEffect(()=>{function k(T){j.current&&!j.current.contains(T.target)&&x(!1)}return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]);const z=d?s.filter(k=>k.label.toLowerCase().includes(d.toLowerCase())):s;function D(k){l(i.includes(k)?i.filter(T=>T!==k):[...i,k])}return e.jsx(V,{label:r,required:n,error:a,className:h,children:e.jsxs("div",{ref:j,className:"relative",children:[e.jsxs("button",{type:"button",onClick:()=>x(k=>!k),className:p("flex min-h-10 w-full flex-wrap items-center gap-1.5 rounded-md border bg-input px-2 py-1.5 text-left","focus:outline-none focus:ring-2 focus:ring-accent/40",a?"border-status-offline":"border-card-border"),children:[i.length===0&&e.jsx("span",{className:"px-1 text-sm text-ink-muted",children:f}),i.map(k=>{const T=s.find(E=>E.value===k);return e.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-tag px-2 py-0.5 text-xs text-tag border border-tag-border",children:[(T==null?void 0:T.label)??k,e.jsx(te,{size:12,className:"cursor-pointer hover:text-status-offline",onClick:E=>{E.stopPropagation(),D(k)}})]},k)}),e.jsx(Te,{size:16,className:p("ml-auto shrink-0 text-ink-muted transition-transform",c&&"rotate-180")})]}),c&&e.jsxs("div",{className:"absolute z-20 mt-1 w-full overflow-hidden rounded-md border border-card-border bg-card shadow-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 border-b border-card-border px-3 py-2",children:[e.jsx(de,{size:14,className:"text-ink-muted"}),e.jsx("input",{autoFocus:!0,value:d,onChange:k=>m(k.target.value),placeholder:"Search...",className:"w-full bg-transparent text-sm text-ink-primary placeholder:text-ink-muted focus:outline-none"})]}),e.jsxs("ul",{className:"max-h-56 overflow-y-auto py-1",role:"listbox",children:[z.length===0&&e.jsx("li",{className:"px-3 py-2 text-sm text-ink-muted",children:"No options"}),z.map(k=>e.jsx("li",{children:e.jsxs("label",{className:"flex w-full cursor-pointer items-center gap-2 px-3 py-2 text-sm hover:bg-accent-muted",children:[e.jsx("input",{type:"checkbox",checked:i.includes(k.value),onChange:()=>D(k.value),className:"h-3.5 w-3.5 rounded border-card-border accent-[var(--accent-primary)]"}),e.jsx("span",{className:"text-ink-primary",children:k.label})]})},k.value))]})]})]})})}function nr({page:r,pageSize:n,total:a,onPageChange:s,className:i}){const l=Math.max(1,Math.ceil(a/n)),f=a===0?0:(r-1)*n+1,h=Math.min(a,r*n);return e.jsxs("nav",{className:p("flex items-center gap-2 text-sm text-ink-secondary",i),"aria-label":"Pagination",children:[e.jsx("button",{onClick:()=>s(Math.max(1,r-1)),disabled:r===1,"aria-label":"Previous page",className:"flex h-7 w-7 items-center justify-center rounded text-ink-secondary hover:bg-accent-muted disabled:opacity-40",children:e.jsx(Me,{size:16})}),e.jsxs("span",{children:[f,"-",h," of ",a]}),e.jsx("button",{onClick:()=>s(Math.min(l,r+1)),disabled:r>=l,"aria-label":"Next page",className:"flex h-7 w-7 items-center justify-center rounded text-ink-secondary hover:bg-accent-muted disabled:opacity-40",children:e.jsx(Pe,{size:16})})]})}function ar({title:r,actions:n,className:a,children:s,...i}){return e.jsxs("div",{className:p("rounded-lg border border-card-border bg-card",a),...i,children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-card-border px-4 py-3",children:[e.jsx("h3",{className:"font-secondary text-sm font-semibold text-ink-primary",children:r}),n&&e.jsx("div",{className:"flex items-center gap-2",children:n})]}),e.jsx("div",{className:"p-4",children:s})]})}const $e=g.forwardRef(({label:r,required:n,error:a,hint:s,id:i,className:l,...f},h)=>{const[c,x]=g.useState(!1),d=i??g.useId();return e.jsx(V,{label:r,htmlFor:d,required:n,error:a,hint:s,children:e.jsxs("div",{className:"relative",children:[e.jsx("input",{ref:h,id:d,type:c?"text":"password",className:p("h-10 w-full rounded-md border bg-input pl-3 pr-10 text-sm text-ink-primary placeholder:text-ink-muted","focus:outline-none focus:ring-2 focus:ring-accent/40",a?"border-status-offline":"border-card-border",l),"aria-invalid":!!a,...f}),e.jsx("button",{type:"button",onClick:()=>x(m=>!m),"aria-label":c?"Hide password":"Show password",className:"absolute right-3 top-1/2 -translate-y-1/2 text-ink-muted hover:text-ink-primary",children:c?e.jsx(Ot,{size:16}):e.jsx(Dt,{size:16})})]})})});$e.displayName="PasswordInput";function sr(r){let n=0;return r.length>=8&&n++,r.length>=12&&n++,/[A-Z]/.test(r)&&/[a-z]/.test(r)&&n++,/\d/.test(r)&&n++,/[^A-Za-z0-9]/.test(r)&&n++,n<=1?{score:n,label:"Weak",tone:"bg-status-offline"}:n<=3?{score:n,label:"Medium",tone:"bg-status-warn"}:{score:n,label:"Strong",tone:"bg-status-online"}}function ir({password:r,className:n}){const{score:a,label:s,tone:i}=sr(r),l=Math.min(a/5*100,100);return r?e.jsxs("div",{className:p("mt-2",n),children:[e.jsx("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-card-border",children:e.jsx("div",{className:p("h-full rounded-full transition-all duration-200",i),style:{width:`${l}%`}})}),e.jsxs("p",{className:"mt-1 text-xs text-ink-secondary",children:["Strength: ",s]})]}):null}const Ye=g.forwardRef(({value:r,onChange:n,onFilterClick:a,placeholder:s="Search Data",className:i,...l},f)=>e.jsxs("div",{className:p("flex h-10 w-full items-center gap-2 rounded-md border border-card-border bg-input px-3","focus-within:ring-2 focus-within:ring-accent/40",i),children:[e.jsx(de,{size:16,className:"shrink-0 text-ink-muted"}),e.jsx("input",{ref:f,value:r,onChange:h=>n(h.target.value),placeholder:s,className:"w-full bg-transparent text-sm text-ink-primary placeholder:text-ink-muted focus:outline-none",...l}),r&&e.jsx("button",{type:"button","aria-label":"Clear search",onClick:()=>n(""),className:"text-ink-muted hover:text-ink-primary",children:e.jsx(te,{size:14})}),a&&e.jsx("button",{type:"button","aria-label":"Filters",onClick:a,className:"text-ink-muted hover:text-accent",children:e.jsx(De,{size:16})})]}));Ye.displayName="SearchBox";function Be({open:r,onClose:n,title:a,width:s="480px",children:i,className:l}){return g.useEffect(()=>{if(!r)return;function f(h){h.key==="Escape"&&n()}return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[r,n]),r?je.createPortal(e.jsxs("div",{className:"fixed inset-0 z-50",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:n,"aria-hidden":!0}),e.jsxs("div",{role:"dialog","aria-modal":"true",style:{width:s},className:p("absolute right-0 top-0 flex h-full max-w-full flex-col border-l border-card-border bg-card shadow-xl",l),children:[a&&e.jsxs("div",{className:"flex items-center justify-between border-b border-card-border px-5 py-4",children:[e.jsx("h2",{className:"font-secondary text-base font-semibold text-ink-primary",children:a}),e.jsx("button",{onClick:n,"aria-label":"Close",className:"text-ink-muted hover:text-ink-primary",children:e.jsx(te,{size:18})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:i})]})]}),document.body):null}function or({start:r,end:n,className:a,...s}){return e.jsxs("div",{className:p("flex flex-wrap items-center justify-between gap-3 py-2",a),...s,children:[e.jsx("div",{className:"flex flex-1 items-center gap-2",children:r}),e.jsx("div",{className:"flex items-center gap-1.5",children:n})]})}function We({items:r,value:n,onChange:a,className:s}){return e.jsx("div",{role:"tablist",className:p("flex items-center gap-1 border-b border-card-border",s),children:r.map(i=>{const l=i.value===n;return e.jsxs("button",{role:"tab","aria-selected":l,onClick:()=>a(i.value),className:p("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors",l?"border-accent text-accent":"border-transparent text-ink-secondary hover:text-ink-primary"),children:[i.icon,i.label]},i.value)})})}function lr({options:r,value:n,onChange:a,className:s}){return e.jsx("div",{className:p("inline-flex overflow-hidden rounded-md border border-card-border",s),role:"tablist",children:r.map((i,l)=>{const f=i.value===n;return e.jsx("button",{type:"button",role:"tab","aria-selected":f,onClick:()=>a(i.value),className:p("h-9 px-4 text-sm font-medium transition-colors",l===0?"border-r border-card-border":"",f?"bg-accent text-white":"bg-input text-ink-secondary hover:bg-accent-muted"),children:i.label},i.value)})})}function cr({logo:r,children:n,className:a}){return e.jsx("div",{className:p("flex min-h-screen items-center justify-center bg-canvas px-4",a),children:e.jsxs("div",{className:"w-full max-w-md",children:[r&&e.jsx("div",{className:"mb-8 flex justify-center",children:r}),e.jsx("div",{className:"rounded-lg border border-card-border bg-card p-8 shadow-lg",children:n})]})})}function dr({className:r,children:n,...a}){return e.jsx("footer",{className:p("border-t border-card-border px-6 py-3 text-xs text-ink-muted",r),...a,children:n??`© ${new Date().getFullYear()} SLS — Software License System`})}function ur({title:r,search:n,profileMenu:a,actions:s,className:i}){return e.jsxs("header",{className:p("flex h-16 items-center justify-between gap-4 border-b border-topbar-border bg-chrome px-6",i),children:[e.jsx("h1",{className:"font-secondary text-lg font-semibold text-ink-onchrome truncate",children:r}),e.jsxs("div",{className:"flex flex-1 items-center justify-end gap-4",children:[n&&e.jsx("div",{className:"w-full max-w-sm",children:n}),s,a]})]})}function fr({sidebar:r,header:n,footer:a,children:s,className:i}){return e.jsxs("div",{className:p("flex h-screen w-full overflow-hidden bg-canvas",i),children:[r,e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[n,e.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:s}),a]})]})}function mr({name:r,role:n,avatarUrl:a,onSignOut:s,actions:i=[],className:l}){const[f,h]=g.useState(!1),c=g.useRef(null);return g.useEffect(()=>{function x(d){c.current&&!c.current.contains(d.target)&&h(!1)}return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]),e.jsxs("div",{ref:c,className:p("relative",l),children:[e.jsx("button",{onClick:()=>h(x=>!x),className:"flex items-center gap-2","aria-label":"Open profile menu",children:a?e.jsx("img",{src:a,alt:"",className:"h-9 w-9 rounded-full object-cover"}):e.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-accent-muted text-accent",children:e.jsx($t,{size:16})})}),f&&e.jsxs("div",{className:"absolute right-0 z-30 mt-2 w-56 rounded-lg border border-card-border bg-card p-4 shadow-lg",children:[e.jsx("p",{className:"font-secondary text-sm font-semibold text-ink-primary",children:r}),e.jsx("p",{className:"text-xs text-ink-muted",children:n}),i.length>0&&e.jsx("div",{className:"mt-3 flex flex-col gap-1 border-t border-card-border pt-3",children:i.map(x=>e.jsxs("button",{onClick:x.onClick,className:"flex items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-ink-primary hover:bg-accent-muted",children:[x.icon,x.label]},x.label))}),e.jsxs("button",{onClick:s,className:"mt-2 flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-status-offline hover:bg-status-offline-bg",children:[e.jsx(Lt,{size:14}),"Sign out"]})]})]})}function xr({items:r,collapsed:n,onCollapsedChange:a,logo:s,className:i}){return e.jsxs("aside",{className:p("flex h-full flex-col border-r border-sidebar-border bg-chrome-deep transition-all duration-200",n?"w-16":"w-56",i),children:[s&&e.jsx("div",{className:"flex h-16 items-center justify-center border-b border-sidebar-border",children:s}),e.jsx("nav",{className:"flex flex-1 flex-col gap-1 p-2",children:r.map(l=>e.jsxs("button",{onClick:l.onClick,title:n?l.label:void 0,className:p("flex items-center gap-3 rounded-md px-3 py-2.5 text-sm font-medium transition-colors",l.active?"border-l-2 bg-nav-active-bg text-ink-onchrome":"text-icon-idle hover:bg-nav-active-bg hover:text-icon-active"),style:l.active?{borderColor:"var(--nav-active-border)"}:void 0,children:[e.jsx("span",{className:"shrink-0",children:l.icon}),!n&&e.jsx("span",{className:"truncate",children:l.label})]},l.key))}),a&&e.jsx("button",{onClick:()=>a(!n),className:"flex items-center justify-center border-t border-sidebar-border py-3 text-icon-idle hover:text-icon-active","aria-label":n?"Expand sidebar":"Collapse sidebar",children:n?e.jsx(Pe,{size:16}):e.jsx(Me,{size:16})})]})}function hr({onOpen:r,className:n}){function a(){if(r)return r();const s=window.open("","_blank");s&&s.document.write("<title>SLS License Agent</title><body style='font-family:sans-serif;padding:40px'><h2>SLS AI License Agent</h2><p>The agent would open here.</p></body>")}return e.jsx("button",{onClick:a,"aria-label":"Open AI license agent",title:"AI License Agent",className:p("fixed bottom-24 right-6 z-40 flex h-14 w-14 items-center justify-center rounded-full","bg-accent-light text-white shadow-lg hover:brightness-110 active:scale-95 transition-all",n),children:e.jsx(St,{size:22})})}function br({title:r,loading:n,onReload:a,onExport:s,onFilter:i,children:l,className:f}){return e.jsxs("div",{className:p("flex flex-col rounded-lg border border-card-border bg-card",f),children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-card-border px-4 py-3",children:[e.jsx("h3",{className:"font-secondary text-sm font-semibold text-ink-primary",children:r}),e.jsxs("div",{className:"flex items-center gap-1",children:[i&&e.jsx(W,{icon:e.jsx(De,{size:14}),label:"Filter",size:"sm",onClick:i}),a&&e.jsx(W,{icon:e.jsx(Ft,{size:14}),label:"Reload",size:"sm",onClick:a}),s&&e.jsx(W,{icon:e.jsx(Pt,{size:14}),label:"Export",size:"sm",onClick:s})]})]}),e.jsx("div",{className:"p-4",children:n?e.jsx(ue,{label:"Loading widget..."}):l})]})}const pr=[{value:"pdf",label:"Invoice PDF"},{value:"excel",label:"Renewal Excel"}];function vr({open:r,onClose:n,customerEmail:a,activeTab:s,onTabChange:i,onSendEmail:l,children:f}){return e.jsx(Be,{open:r,onClose:n,title:"Invoice preview",width:"640px",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(We,{items:pr,value:s,onChange:i}),a&&e.jsxs("div",{className:"flex items-center justify-between rounded-md bg-accent-muted px-3 py-2 text-sm",children:[e.jsxs("span",{className:"flex items-center gap-2 text-ink-secondary",children:[e.jsx(At,{size:14}),a]}),l&&e.jsx(I,{size:"sm",variant:"secondary",onClick:l,children:"Send"})]}),e.jsx("div",{className:"min-h-[60vh]",children:f})]})})}function gr({open:r,onClose:n,title:a="Changes",fields:s}){return e.jsx(ne,{open:r,onClose:n,title:a,size:"md",children:e.jsxs("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[e.jsx("div",{className:"font-medium text-ink-secondary",children:"Field"}),e.jsx("div",{className:"font-medium text-ink-secondary",children:"Previous"}),e.jsx("div",{className:"font-medium text-ink-secondary",children:"Current"}),s.map(i=>e.jsxs(g.Fragment,{children:[e.jsx("div",{className:"text-ink-primary",children:i.label}),e.jsx("div",{className:"rounded bg-status-offline-bg px-2 py-1 text-status-offline",children:i.previous}),e.jsx("div",{className:"rounded bg-status-online-bg px-2 py-1 text-status-online",children:i.current})]},i.label))]})})}b.AuthLayout=cr,b.Badge=yt,b.Button=I,b.Card=Ce,b.ChangesPreviewModal=gr,b.Checkbox=re,b.ColumnFilterDropdown=Wt,b.ConfirmDialog=qt,b.DataTable=Ut,b.DatePicker=Ht,b.DateRangePicker=Zt,b.Dropdown=Qt,b.DynamicRowList=Kt,b.FilterPanel=er,b.FloatingAddButton=Fe,b.Footer=dr,b.FormGroup=V,b.FormModal=tr,b.Header=ur,b.IconButton=W,b.InputField=Ie,b.InvoicePreviewModal=vr,b.LicenseAgentButton=hr,b.Loader=ue,b.MainLayout=fr,b.Modal=ne,b.MultiSelectDropdown=rr,b.Pagination=nr,b.Panel=ar,b.PasswordInput=$e,b.PasswordStrengthMeter=ir,b.ProfileMenu=mr,b.ReportWidget=br,b.RowSelectCheckbox=fe,b.SearchBox=Ye,b.Sidebar=xr,b.SlideOverModal=Be,b.TableToolbar=or,b.Tabs=We,b.ToggleButtonGroup=lr,b.ValidationMessage=ze,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
146
+ */const P=v("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),A=p.forwardRef(({label:t,id:r,className:a,checked:n,...s},l)=>{const c=r??p.useId();return e.jsxs("label",{htmlFor:c,className:"inline-flex cursor-pointer items-center gap-2 select-none",children:[e.jsxs("span",{className:"relative inline-flex h-4 w-4 shrink-0 items-center justify-center",children:[e.jsx("input",{ref:l,id:c,type:"checkbox",checked:n,className:"peer sr-only",...s}),e.jsx("span",{className:b("h-4 w-4 rounded border border-card-border bg-input transition-colors","peer-checked:border-accent peer-checked:bg-accent","peer-focus-visible:ring-2 peer-focus-visible:ring-accent/40",a)}),n&&e.jsx(U,{size:12,strokeWidth:3,className:"pointer-events-none absolute text-white"})]}),t&&e.jsx("span",{className:"text-sm text-ink-primary",children:t})]})});A.displayName="Checkbox";const Pe={idle:"text-icon-idle hover:text-icon-active hover:bg-accent-muted",active:"text-icon-active bg-accent-muted",danger:"text-status-offline hover:bg-status-offline-bg"},Ae={sm:"h-8 w-8",md:"h-10 w-10"},S=p.forwardRef(({icon:t,label:r,variant:a="idle",size:n="md",className:s,...l},c)=>e.jsx("button",{ref:c,"aria-label":r,title:r,className:b("inline-flex items-center justify-center rounded-full transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40","disabled:opacity-40 disabled:cursor-not-allowed",Pe[a],Ae[n],s),...l,children:t}));S.displayName="IconButton";function Te({columns:t,visible:r,onChange:a,className:n}){const[s,l]=p.useState(!1),c=p.useRef(null);p.useEffect(()=>{function i(d){c.current&&!c.current.contains(d.target)&&l(!1)}return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[]);function u(i){a(r.includes(i)?r.filter(d=>d!==i):[...r,i])}return e.jsxs("div",{ref:c,className:b("relative",n),children:[e.jsx(S,{icon:e.jsx(Me,{size:16}),label:"Choose columns",onClick:()=>l(i=>!i),variant:s?"active":"idle"}),s&&e.jsx("div",{className:"absolute right-0 z-20 mt-1 w-52 rounded-md border border-card-border bg-card p-2 shadow-lg",children:t.map(i=>e.jsxs("label",{className:"flex items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-accent-muted",children:[e.jsx(A,{checked:r.includes(i.key),onChange:()=>u(i.key)}),e.jsx("span",{className:"text-ink-primary",children:i.label})]},i.key))})]})}const Fe={sm:"max-w-sm",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl"};function T({open:t,onClose:r,title:a,footer:n,size:s="md",children:l,className:c}){return p.useEffect(()=>{if(!t)return;function u(i){i.key==="Escape"&&r()}return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[t,r]),t?$.createPortal(e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:r,"aria-hidden":!0}),e.jsxs("div",{role:"dialog","aria-modal":"true",className:b("relative z-10 flex max-h-[90vh] w-full flex-col rounded-lg border border-card-border bg-card shadow-xl",Fe[s],c),children:[a&&e.jsxs("div",{className:"flex items-center justify-between border-b border-card-border px-5 py-4",children:[e.jsx("h2",{className:"font-secondary text-base font-semibold text-ink-primary",children:a}),e.jsx("button",{onClick:r,"aria-label":"Close",className:"text-ink-muted hover:text-ink-primary",children:e.jsx(P,{size:18})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:l}),n&&e.jsx("div",{className:"flex items-center justify-end gap-2 border-t border-card-border px-5 py-4",children:n})]})]}),document.body):null}function Ee({open:t,title:r,message:a,confirmLabel:n="Ok",cancelLabel:s="Close",tone:l="default",onConfirm:c,onClose:u,loading:i}){return e.jsx(T,{open:t,onClose:u,title:r,size:"sm",footer:e.jsxs(e.Fragment,{children:[e.jsx(C,{variant:"cancel",onClick:u,children:s}),e.jsx(C,{variant:l==="danger"?"danger":"primary",onClick:c,loading:i,children:n})]}),children:e.jsx("p",{className:"text-sm text-ink-secondary",children:a})})}function O({fullPage:t,label:r="Loading...",className:a}){const n=e.jsxs("div",{className:b("flex flex-col items-center justify-center gap-3",a),children:[e.jsx("span",{className:"h-10 w-10 animate-spin rounded-full border-4 border-accent-muted border-t-accent"}),r&&e.jsx("span",{className:"text-sm text-ink-secondary",children:r})]});return t?e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-canvas/70 backdrop-blur-sm",children:n}):n}function I({checked:t,indeterminate:r,onChange:a,label:n="Select row"}){const s=p.useRef(null);return p.useEffect(()=>{s.current&&(s.current.indeterminate=!!r)},[r]),e.jsx(A,{ref:s,checked:t,onChange:l=>a(l.target.checked),"aria-label":n})}function Oe({columns:t,data:r,rowKey:a,loading:n,emptyMessage:s="No records found.",visibleColumns:l,sortKey:c,sortDirection:u,onSortChange:i,selectable:d,selectedKeys:o=[],onSelectedKeysChange:f,onRowClick:y,className:M}){const N=l?t.filter(g=>l.includes(g.key)):t,x=r.map(a),w=d&&r.length>0&&x.every(g=>o.includes(g)),k=d&&x.some(g=>o.includes(g));function j(g){if(!(!g.sortable||!i)){if(c!==g.key)return i(g.key,"asc");if(u==="asc")return i(g.key,"desc");i(g.key,null)}}function B(){f&&f(w?[]:x)}function q(g){f&&f(o.includes(g)?o.filter(m=>m!==g):[...o,g])}return e.jsx("div",{className:b("overflow-x-auto rounded-lg border border-card-border bg-card",M),children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-card-border bg-canvas",children:[d&&e.jsx("th",{className:"w-10 px-4 py-3",children:e.jsx(I,{checked:!!w,indeterminate:!w&&k,onChange:B,label:"Select all rows"})}),N.map(g=>e.jsx("th",{style:{width:g.width},className:b("px-4 py-3 font-medium text-ink-secondary",g.align==="right"&&"text-right",g.align==="center"&&"text-center"),children:g.sortable?e.jsxs("button",{onClick:()=>j(g),className:"inline-flex items-center gap-1 hover:text-ink-primary",children:[g.header,c===g.key?u==="asc"?e.jsx(me,{size:12}):u==="desc"?e.jsx(xe,{size:12}):e.jsx(G,{size:12,className:"opacity-40"}):e.jsx(G,{size:12,className:"opacity-40"})]}):g.header},g.key))]})}),e.jsx("tbody",{children:n?e.jsx("tr",{children:e.jsx("td",{colSpan:N.length+(d?1:0),className:"py-10",children:e.jsx(O,{label:"Loading records..."})})}):r.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:N.length+(d?1:0),className:"py-10 text-center text-ink-muted",children:s})}):r.map(g=>{const m=a(g);return e.jsxs("tr",{onClick:()=>y==null?void 0:y(g),className:b("border-b border-card-border last:border-0 hover:bg-accent-muted/60",y&&"cursor-pointer"),children:[d&&e.jsx("td",{className:"px-4 py-3",onClick:z=>z.stopPropagation(),children:e.jsx(I,{checked:o.includes(m),onChange:()=>q(m)})}),N.map(z=>e.jsx("td",{className:b("px-4 py-3 text-ink-primary",z.align==="right"&&"text-right",z.align==="center"&&"text-center"),children:z.render(g)},z.key))]},m)})})]})})}function K({children:t,className:r,...a}){return t?e.jsxs("p",{className:b("mt-1 flex items-center gap-1 text-xs text-status-offline",r),...a,children:[e.jsx(ke,{size:12,className:"shrink-0"}),t]}):null}function D({label:t,htmlFor:r,required:a,error:n,hint:s,className:l,children:c,...u}){return e.jsxs("div",{className:b("flex flex-col",l),...u,children:[t&&e.jsxs("label",{htmlFor:r,className:"mb-1.5 text-sm font-medium text-ink-primary",children:[t,a&&e.jsx("span",{className:"ml-0.5 text-status-offline",children:"*"})]}),c,s&&!n&&e.jsx("p",{className:"mt-1 text-xs text-ink-muted",children:s}),e.jsx(K,{children:n})]})}function Ie({label:t,required:r,error:a,value:n,onChange:s,min:l,max:c,disabled:u,className:i}){const d=p.useId();return e.jsx(D,{label:t,htmlFor:d,required:r,error:a,className:i,children:e.jsxs("div",{className:"relative",children:[e.jsx(W,{size:16,className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-ink-muted"}),e.jsx("input",{id:d,type:"date",value:n??"",min:l,max:c,disabled:u,onChange:o=>s(o.target.value),className:b("h-10 w-full rounded-md border bg-input pl-9 pr-3 text-sm text-ink-primary","focus:outline-none focus:ring-2 focus:ring-accent/40 disabled:opacity-50",a?"border-status-offline":"border-card-border")})]})})}const R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Be=["Su","Mo","Tu","We","Th","Fr","Sa"],qe=["This Financial Year","This Month","Last Month","Next Month","This Quarter","This Year","Last Year","Custom Range"];function F(t){return t?`${String(t.getDate()).padStart(2,"0")}-${R[t.getMonth()]}-${t.getFullYear()}`:""}function $e(t,r=new Date){const a=r.getFullYear(),n=r.getMonth();switch(t){case"This Financial Year":{const s=n>=3?a:a-1;return{from:new Date(s,3,1),to:new Date(s+1,2,31)}}case"This Month":return{from:new Date(a,n,1),to:new Date(a,n+1,0)};case"Last Month":return{from:new Date(a,n-1,1),to:new Date(a,n,0)};case"Next Month":return{from:new Date(a,n+1,1),to:new Date(a,n+2,0)};case"This Quarter":{const s=Math.floor(n/3)*3;return{from:new Date(a,s,1),to:new Date(a,s+3,0)}}case"This Year":return{from:new Date(a,0,1),to:new Date(a,11,31)};case"Last Year":return{from:new Date(a-1,0,1),to:new Date(a-1,11,31)};default:return{from:null,to:null}}}function ee({year:t,month:r,from:a,to:n,onPick:s}){const c=new Date(t,r,1).getDay(),u=new Date(t,r+1,0).getDate(),i=[];for(let f=0;f<c;f++)i.push(null);for(let f=1;f<=u;f++)i.push(f);function d(f){if(!f||!a||!n)return!1;const y=new Date(t,r,f).getTime();return y>=a.getTime()&&y<=n.getTime()}function o(f){if(!f)return!1;const y=new Date(t,r,f).getTime();return a&&y===a.getTime()||n&&y===n.getTime()}return e.jsxs("div",{children:[e.jsxs("p",{className:"mb-2 text-center text-sm font-semibold text-ink-primary",children:[R[r]," ",t]}),e.jsxs("div",{className:"grid grid-cols-7 gap-y-1 text-center text-xs",children:[Be.map(f=>e.jsx("span",{className:"text-ink-muted",children:f},f)),i.map((f,y)=>e.jsx("button",{type:"button",disabled:!f,onClick:()=>f&&s(new Date(t,r,f)),className:b("h-7 w-7 rounded text-ink-primary",!f&&"invisible",f&&d(f)&&"bg-accent-muted",f&&o(f)&&"bg-accent text-white"),children:f},y))]})]})}function Ye({label:t,required:r,error:a,value:n,onChange:s,className:l}){const[c,u]=p.useState(!1),[i,d]=p.useState("Custom Range"),[o,f]=p.useState(n),[y,M]=p.useState(()=>(n.from??new Date).getMonth()),[N,x]=p.useState(()=>(n.from??new Date).getFullYear()),w=p.useRef(null);p.useEffect(()=>{function m(z){w.current&&!w.current.contains(z.target)&&u(!1)}return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);function k(m){d(m),m!=="Custom Range"&&f($e(m))}function j(m){d("Custom Range"),!o.from||o.from&&o.to?f({from:m,to:null}):m.getTime()<o.from.getTime()?f({from:m,to:o.from}):f({...o,to:m})}function B(){y===0?(M(11),x(m=>m-1)):M(m=>m-1)}function q(){y===11?(M(0),x(m=>m+1)):M(m=>m+1)}function g(){s(o),u(!1)}return e.jsx(D,{label:t,required:r,error:a,className:l,children:e.jsxs("div",{ref:w,className:"relative",children:[e.jsxs("button",{type:"button",onClick:()=>u(m=>!m),className:b("flex h-10 w-full items-center gap-2 rounded-md border bg-input px-3 text-left text-sm","focus:outline-none focus:ring-2 focus:ring-accent/40",a?"border-status-offline":"border-card-border"),children:[e.jsx(W,{size:16,className:"shrink-0 text-ink-muted"}),e.jsx("span",{className:n.from?"text-ink-primary":"text-ink-muted",children:n.from&&n.to?`${F(n.from)} - ${F(n.to)}`:"Select date range"})]}),c&&e.jsxs("div",{className:"absolute z-20 mt-1 flex w-[560px] max-w-[90vw] overflow-hidden rounded-md border border-card-border bg-card shadow-xl",children:[e.jsx("div",{className:"w-40 shrink-0 border-r border-card-border py-2",children:qe.map(m=>e.jsx("button",{type:"button",onClick:()=>k(m),className:b("block w-full px-3 py-2 text-left text-sm",i===m?"bg-accent text-white":"text-ink-primary hover:bg-accent-muted"),children:m},m))}),e.jsxs("div",{className:"flex-1 p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx("button",{type:"button",onClick:B,className:"text-ink-muted hover:text-ink-primary",children:e.jsx(ye,{size:16})}),e.jsx("button",{type:"button",onClick:q,className:"text-ink-muted hover:text-ink-primary",children:e.jsx(ve,{size:16})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(ee,{year:N,month:y,from:o.from,to:o.to,onPick:j}),e.jsx(ee,{year:y===11?N+1:N,month:y===11?0:y+1,from:o.from,to:o.to,onPick:j})]}),e.jsxs("div",{className:"mt-3 flex items-center justify-between border-t border-card-border pt-3",children:[e.jsx("span",{className:"text-sm text-ink-secondary",children:o.from&&o.to?`${F(o.from)} - ${F(o.to)}`:"Select a range"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(C,{variant:"cancel",size:"sm",onClick:()=>u(!1),children:"Cancel"}),e.jsx(C,{variant:"primary",size:"sm",onClick:g,disabled:!o.from||!o.to,children:"Apply"})]})]})]})]})]})})}function He({label:t,required:r,error:a,options:n,value:s,onChange:l,placeholder:c="Select...",searchable:u=!0,disabled:i,className:d}){const[o,f]=p.useState(!1),[y,M]=p.useState(""),N=p.useRef(null);p.useEffect(()=>{function k(j){N.current&&!N.current.contains(j.target)&&f(!1)}return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]);const x=u&&y?n.filter(k=>k.label.toLowerCase().includes(y.toLowerCase())):n,w=n.find(k=>k.value===s);return e.jsx(D,{label:t,required:r,error:a,className:d,children:e.jsxs("div",{ref:N,className:"relative",children:[e.jsxs("button",{type:"button",disabled:i,onClick:()=>f(k=>!k),className:b("flex h-10 w-full items-center justify-between rounded-md border bg-input px-3 text-sm text-left","focus:outline-none focus:ring-2 focus:ring-accent/40 disabled:opacity-50",a?"border-status-offline":"border-card-border",w?"text-ink-primary":"text-ink-muted"),children:[e.jsx("span",{className:"truncate",children:(w==null?void 0:w.label)??c}),e.jsx(_,{size:16,className:b("shrink-0 text-ink-muted transition-transform",o&&"rotate-180")})]}),o&&e.jsxs("div",{className:"absolute z-20 mt-1 w-full overflow-hidden rounded-md border border-card-border bg-card shadow-lg",children:[u&&e.jsxs("div",{className:"flex items-center gap-2 border-b border-card-border px-3 py-2",children:[e.jsx(E,{size:14,className:"text-ink-muted"}),e.jsx("input",{autoFocus:!0,value:y,onChange:k=>M(k.target.value),placeholder:"Search...",className:"w-full bg-transparent text-sm text-ink-primary placeholder:text-ink-muted focus:outline-none"})]}),e.jsxs("ul",{className:"max-h-56 overflow-y-auto py-1",role:"listbox",children:[x.length===0&&e.jsx("li",{className:"px-3 py-2 text-sm text-ink-muted",children:"No options"}),x.map(k=>e.jsx("li",{children:e.jsxs("button",{type:"button",disabled:k.disabled,onClick:()=>{l(k.value),f(!1),M("")},className:b("flex w-full items-center justify-between px-3 py-2 text-left text-sm hover:bg-accent-muted disabled:opacity-40",k.value===s?"text-accent":"text-ink-primary"),children:[k.label,k.value===s&&e.jsx(U,{size:14})]})},k.value))]})]})]})})}function Ve({items:t,onChange:r,createItem:a,renderRow:n,addLabel:s="Add row",minRows:l=0,className:c}){function u(d,o){const f=t.slice();f[d]={...f[d],...o},r(f)}function i(d){r(t.filter((o,f)=>f!==d))}return e.jsxs("div",{className:b("flex flex-col gap-2",c),children:[t.map((d,o)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1",children:n(d,o,f=>u(o,f))}),e.jsx(S,{icon:e.jsx(Le,{size:16}),label:"Remove row",variant:"danger",size:"sm",disabled:t.length<=l,onClick:()=>i(o)})]},o)),e.jsx(C,{variant:"ghost",size:"sm",icon:e.jsx(J,{size:14}),onClick:()=>r([...t,a()]),className:"self-start",children:s})]})}function Ge({open:t,onSearch:r,onClear:a,children:n,className:s}){return t?e.jsxs("div",{className:b("z-20 w-full max-w-md rounded-lg border border-card-border bg-card p-4 shadow-lg",s),children:[e.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:n}),e.jsxs("div",{className:"mt-4 flex items-center justify-end gap-2 border-t border-card-border pt-3",children:[e.jsx(C,{variant:"cancel",size:"sm",onClick:a,children:"Clear filters"}),e.jsx(C,{variant:"primary",size:"sm",onClick:r,children:"Search"})]})]}):null}const te=p.forwardRef(({label:t="Add",className:r,...a},n)=>e.jsx("button",{ref:n,"aria-label":t,title:t,className:b("fixed bottom-6 right-6 z-40 flex h-14 w-14 items-center justify-center rounded-full","bg-accent text-white shadow-lg hover:brightness-110 active:scale-95","transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50",r),...a,children:e.jsx(J,{size:24,strokeWidth:2.5})}));te.displayName="FloatingAddButton";function We({open:t,onClose:r,onSubmit:a,title:n,size:s="md",submitLabel:l="Ok",cancelLabel:c="Close",submitting:u,submitDisabled:i,children:d}){return e.jsx(T,{open:t,onClose:r,title:n,size:s,footer:e.jsxs(e.Fragment,{children:[e.jsx(C,{variant:"cancel",onClick:r,disabled:u,children:c}),e.jsx(C,{variant:"primary",onClick:a,loading:u,disabled:i,children:l})]}),children:e.jsx("form",{onSubmit:o=>{o.preventDefault(),a()},className:"flex flex-col gap-4",children:d})})}const re=p.forwardRef(({label:t,required:r,error:a,hint:n,icon:s,id:l,className:c,...u},i)=>{const d=l??p.useId();return e.jsx(D,{label:t,htmlFor:d,required:r,error:a,hint:n,children:e.jsxs("div",{className:"relative",children:[s&&e.jsx("span",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-ink-muted",children:s}),e.jsx("input",{ref:i,id:d,className:b("h-10 w-full rounded-md border bg-input px-3 text-sm text-ink-primary placeholder:text-ink-muted","focus:outline-none focus:ring-2 focus:ring-accent/40",a?"border-status-offline":"border-card-border",s&&"pl-9",c),"aria-invalid":!!a,...u})]})})});re.displayName="InputField";function Ue({label:t,required:r,error:a,options:n,value:s,onChange:l,placeholder:c="Select...",className:u}){const[i,d]=p.useState(!1),[o,f]=p.useState(""),y=p.useRef(null);p.useEffect(()=>{function x(w){y.current&&!y.current.contains(w.target)&&d(!1)}return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]);const M=o?n.filter(x=>x.label.toLowerCase().includes(o.toLowerCase())):n;function N(x){l(s.includes(x)?s.filter(w=>w!==x):[...s,x])}return e.jsx(D,{label:t,required:r,error:a,className:u,children:e.jsxs("div",{ref:y,className:"relative",children:[e.jsxs("button",{type:"button",onClick:()=>d(x=>!x),className:b("flex min-h-10 w-full flex-wrap items-center gap-1.5 rounded-md border bg-input px-2 py-1.5 text-left","focus:outline-none focus:ring-2 focus:ring-accent/40",a?"border-status-offline":"border-card-border"),children:[s.length===0&&e.jsx("span",{className:"px-1 text-sm text-ink-muted",children:c}),s.map(x=>{const w=n.find(k=>k.value===x);return e.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-tag px-2 py-0.5 text-xs text-tag border border-tag-border",children:[(w==null?void 0:w.label)??x,e.jsx(P,{size:12,className:"cursor-pointer hover:text-status-offline",onClick:k=>{k.stopPropagation(),N(x)}})]},x)}),e.jsx(_,{size:16,className:b("ml-auto shrink-0 text-ink-muted transition-transform",i&&"rotate-180")})]}),i&&e.jsxs("div",{className:"absolute z-20 mt-1 w-full overflow-hidden rounded-md border border-card-border bg-card shadow-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 border-b border-card-border px-3 py-2",children:[e.jsx(E,{size:14,className:"text-ink-muted"}),e.jsx("input",{autoFocus:!0,value:o,onChange:x=>f(x.target.value),placeholder:"Search...",className:"w-full bg-transparent text-sm text-ink-primary placeholder:text-ink-muted focus:outline-none"})]}),e.jsxs("ul",{className:"max-h-56 overflow-y-auto py-1",role:"listbox",children:[M.length===0&&e.jsx("li",{className:"px-3 py-2 text-sm text-ink-muted",children:"No options"}),M.map(x=>e.jsx("li",{children:e.jsxs("label",{className:"flex w-full cursor-pointer items-center gap-2 px-3 py-2 text-sm hover:bg-accent-muted",children:[e.jsx("input",{type:"checkbox",checked:s.includes(x.value),onChange:()=>N(x.value),className:"h-3.5 w-3.5 rounded border-card-border accent-[var(--accent-primary)]"}),e.jsx("span",{className:"text-ink-primary",children:x.label})]})},x.value))]})]})]})})}function _e({page:t,pageSize:r,total:a,onPageChange:n,className:s}){const l=Math.max(1,Math.ceil(a/r)),c=a===0?0:(t-1)*r+1,u=Math.min(a,t*r);return e.jsxs("nav",{className:b("flex items-center gap-2 text-sm text-ink-secondary",s),"aria-label":"Pagination",children:[e.jsx("button",{onClick:()=>n(Math.max(1,t-1)),disabled:t===1,"aria-label":"Previous page",className:"flex h-7 w-7 items-center justify-center rounded text-ink-secondary hover:bg-accent-muted disabled:opacity-40",children:e.jsx(Q,{size:16})}),e.jsxs("span",{children:[c,"-",u," of ",a]}),e.jsx("button",{onClick:()=>n(Math.min(l,t+1)),disabled:t>=l,"aria-label":"Next page",className:"flex h-7 w-7 items-center justify-center rounded text-ink-secondary hover:bg-accent-muted disabled:opacity-40",children:e.jsx(Z,{size:16})})]})}function Qe({title:t,actions:r,className:a,children:n,...s}){return e.jsxs("div",{className:b("rounded-lg border border-card-border bg-card",a),...s,children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-card-border px-4 py-3",children:[e.jsx("h3",{className:"font-secondary text-sm font-semibold text-ink-primary",children:t}),r&&e.jsx("div",{className:"flex items-center gap-2",children:r})]}),e.jsx("div",{className:"p-4",children:n})]})}const ae=p.forwardRef(({label:t,required:r,error:a,hint:n,id:s,className:l,...c},u)=>{const[i,d]=p.useState(!1),o=s??p.useId();return e.jsx(D,{label:t,htmlFor:o,required:r,error:a,hint:n,children:e.jsxs("div",{className:"relative",children:[e.jsx("input",{ref:u,id:o,type:i?"text":"password",className:b("h-10 w-full rounded-md border bg-input pl-3 pr-10 text-sm text-ink-primary placeholder:text-ink-muted","focus:outline-none focus:ring-2 focus:ring-accent/40",a?"border-status-offline":"border-card-border",l),"aria-invalid":!!a,...c}),e.jsx("button",{type:"button",onClick:()=>d(f=>!f),"aria-label":i?"Hide password":"Show password",className:"absolute right-3 top-1/2 -translate-y-1/2 text-ink-muted hover:text-ink-primary",children:i?e.jsx(Ne,{size:16}):e.jsx(Ce,{size:16})})]})})});ae.displayName="PasswordInput";function Ze(t){let r=0;return t.length>=8&&r++,t.length>=12&&r++,/[A-Z]/.test(t)&&/[a-z]/.test(t)&&r++,/\d/.test(t)&&r++,/[^A-Za-z0-9]/.test(t)&&r++,r<=1?{score:r,label:"Weak",tone:"bg-status-offline"}:r<=3?{score:r,label:"Medium",tone:"bg-status-warn"}:{score:r,label:"Strong",tone:"bg-status-online"}}function Je({password:t,className:r}){const{score:a,label:n,tone:s}=Ze(t),l=Math.min(a/5*100,100);return t?e.jsxs("div",{className:b("mt-2",r),children:[e.jsx("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-card-border",children:e.jsx("div",{className:b("h-full rounded-full transition-all duration-200",s),style:{width:`${l}%`}})}),e.jsxs("p",{className:"mt-1 text-xs text-ink-secondary",children:["Strength: ",n]})]}):null}const ne=p.forwardRef(({value:t,onChange:r,onFilterClick:a,placeholder:n="Search Data",className:s,...l},c)=>e.jsxs("div",{className:b("flex h-10 w-full items-center gap-2 rounded-md border border-card-border bg-input px-3","focus-within:ring-2 focus-within:ring-accent/40",s),children:[e.jsx(E,{size:16,className:"shrink-0 text-ink-muted"}),e.jsx("input",{ref:c,value:t,onChange:u=>r(u.target.value),placeholder:n,className:"w-full bg-transparent text-sm text-ink-primary placeholder:text-ink-muted focus:outline-none",...l}),t&&e.jsx("button",{type:"button","aria-label":"Clear search",onClick:()=>r(""),className:"text-ink-muted hover:text-ink-primary",children:e.jsx(P,{size:14})}),a&&e.jsx("button",{type:"button","aria-label":"Filters",onClick:a,className:"text-ink-muted hover:text-accent",children:e.jsx(X,{size:16})})]}));ne.displayName="SearchBox";function se({open:t,onClose:r,title:a,width:n="480px",children:s,className:l}){return p.useEffect(()=>{if(!t)return;function c(u){u.key==="Escape"&&r()}return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[t,r]),t?$.createPortal(e.jsxs("div",{className:"fixed inset-0 z-50",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:r,"aria-hidden":!0}),e.jsxs("div",{role:"dialog","aria-modal":"true",style:{width:n},className:b("absolute right-0 top-0 flex h-full max-w-full flex-col border-l border-card-border bg-card shadow-xl",l),children:[a&&e.jsxs("div",{className:"flex items-center justify-between border-b border-card-border px-5 py-4",children:[e.jsx("h2",{className:"font-secondary text-base font-semibold text-ink-primary",children:a}),e.jsx("button",{onClick:r,"aria-label":"Close",className:"text-ink-muted hover:text-ink-primary",children:e.jsx(P,{size:18})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:s})]})]}),document.body):null}function Xe({start:t,end:r,className:a,...n}){return e.jsxs("div",{className:b("flex flex-wrap items-center justify-between gap-3 py-2",a),...n,children:[e.jsx("div",{className:"flex flex-1 items-center gap-2",children:t}),e.jsx("div",{className:"flex items-center gap-1.5",children:r})]})}function le({items:t,value:r,onChange:a,className:n}){return e.jsx("div",{role:"tablist",className:b("flex items-center gap-1 border-b border-card-border",n),children:t.map(s=>{const l=s.value===r;return e.jsxs("button",{role:"tab","aria-selected":l,onClick:()=>a(s.value),className:b("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors",l?"border-accent text-accent":"border-transparent text-ink-secondary hover:text-ink-primary"),children:[s.icon,s.label]},s.value)})})}function Ke({options:t,value:r,onChange:a,className:n}){return e.jsx("div",{className:b("inline-flex overflow-hidden rounded-md border border-card-border",n),role:"tablist",children:t.map((s,l)=>{const c=s.value===r;return e.jsx("button",{type:"button",role:"tab","aria-selected":c,onClick:()=>a(s.value),className:b("h-9 px-4 text-sm font-medium transition-colors",l===0?"border-r border-card-border":"",c?"bg-accent text-white":"bg-input text-ink-secondary hover:bg-accent-muted"),children:s.label},s.value)})})}function Re({logo:t,children:r,className:a}){return e.jsx("div",{className:b("flex min-h-screen items-center justify-center bg-canvas px-4",a),children:e.jsxs("div",{className:"w-full max-w-md",children:[t&&e.jsx("div",{className:"mb-8 flex justify-center",children:t}),e.jsx("div",{className:"rounded-lg border border-card-border bg-card p-8 shadow-lg",children:r})]})})}function et({className:t,children:r,...a}){return e.jsx("footer",{className:b("border-t border-card-border px-6 py-3 text-xs text-ink-muted",t),...a,children:r??`© ${new Date().getFullYear()} SLS — Software License System`})}function tt({title:t,search:r,profileMenu:a,actions:n,className:s}){return e.jsxs("header",{className:b("flex h-16 items-center justify-between gap-4 border-b border-topbar-border bg-chrome px-6",s),children:[e.jsx("h1",{className:"font-secondary text-lg font-semibold text-ink-onchrome truncate",children:t}),e.jsxs("div",{className:"flex flex-1 items-center justify-end gap-4",children:[r&&e.jsx("div",{className:"w-full max-w-sm",children:r}),n,a]})]})}function rt({sidebar:t,header:r,footer:a,children:n,className:s}){return e.jsxs("div",{className:b("flex h-screen w-full overflow-hidden bg-canvas",s),children:[t,e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[r,e.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:n}),a]})]})}function at({name:t,role:r,avatarUrl:a,onSignOut:n,actions:s=[],className:l}){const[c,u]=p.useState(!1),i=p.useRef(null);return p.useEffect(()=>{function d(o){i.current&&!i.current.contains(o.target)&&u(!1)}return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),e.jsxs("div",{ref:i,className:b("relative",l),children:[e.jsx("button",{onClick:()=>u(d=>!d),className:"flex items-center gap-2","aria-label":"Open profile menu",children:a?e.jsx("img",{src:a,alt:"",className:"h-9 w-9 rounded-full object-cover"}):e.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-accent-muted text-accent",children:e.jsx(je,{size:16})})}),c&&e.jsxs("div",{className:"absolute right-0 z-30 mt-2 w-56 rounded-lg border border-card-border bg-card p-4 shadow-lg",children:[e.jsx("p",{className:"font-secondary text-sm font-semibold text-ink-primary",children:t}),e.jsx("p",{className:"text-xs text-ink-muted",children:r}),s.length>0&&e.jsx("div",{className:"mt-3 flex flex-col gap-1 border-t border-card-border pt-3",children:s.map(d=>e.jsxs("button",{onClick:d.onClick,className:"flex items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-ink-primary hover:bg-accent-muted",children:[d.icon,d.label]},d.label))}),e.jsxs("button",{onClick:n,className:"mt-2 flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-status-offline hover:bg-status-offline-bg",children:[e.jsx(ze,{size:14}),"Sign out"]})]})]})}function nt({items:t,collapsed:r,onCollapsedChange:a,logo:n,className:s}){return e.jsxs("aside",{className:b("flex h-full flex-col border-r border-sidebar-border bg-chrome-deep transition-all duration-200",r?"w-16":"w-56",s),children:[n&&e.jsx("div",{className:"flex h-16 items-center justify-center border-b border-sidebar-border",children:n}),e.jsx("nav",{className:"flex flex-1 flex-col gap-1 p-2",children:t.map(l=>e.jsxs("button",{onClick:l.onClick,title:r?l.label:void 0,className:b("flex items-center gap-3 rounded-md px-3 py-2.5 text-sm font-medium transition-colors",l.active?"border-l-2 bg-nav-active-bg text-ink-onchrome":"text-icon-idle hover:bg-nav-active-bg hover:text-icon-active"),style:l.active?{borderColor:"var(--nav-active-border)"}:void 0,children:[e.jsx("span",{className:"shrink-0",children:l.icon}),!r&&e.jsx("span",{className:"truncate",children:l.label})]},l.key))}),a&&e.jsx("button",{onClick:()=>a(!r),className:"flex items-center justify-center border-t border-sidebar-border py-3 text-icon-idle hover:text-icon-active","aria-label":r?"Expand sidebar":"Collapse sidebar",children:r?e.jsx(Z,{size:16}):e.jsx(Q,{size:16})})]})}function st({onOpen:t,className:r}){function a(){if(t)return t();const n=window.open("","_blank");n&&n.document.write("<title>SLS License Agent</title><body style='font-family:sans-serif;padding:40px'><h2>SLS AI License Agent</h2><p>The agent would open here.</p></body>")}return e.jsx("button",{onClick:a,"aria-label":"Open AI license agent",title:"AI License Agent",className:b("fixed bottom-24 right-6 z-40 flex h-14 w-14 items-center justify-center rounded-full","bg-accent-light text-white shadow-lg hover:brightness-110 active:scale-95 transition-all",r),children:e.jsx(ge,{size:22})})}function lt({title:t,loading:r,onReload:a,onExport:n,onFilter:s,children:l,className:c}){return e.jsxs("div",{className:b("flex flex-col rounded-lg border border-card-border bg-card",c),children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-card-border px-4 py-3",children:[e.jsx("h3",{className:"font-secondary text-sm font-semibold text-ink-primary",children:t}),e.jsxs("div",{className:"flex items-center gap-1",children:[s&&e.jsx(S,{icon:e.jsx(X,{size:14}),label:"Filter",size:"sm",onClick:s}),a&&e.jsx(S,{icon:e.jsx(De,{size:14}),label:"Reload",size:"sm",onClick:a}),n&&e.jsx(S,{icon:e.jsx(we,{size:14}),label:"Export",size:"sm",onClick:n})]})]}),e.jsx("div",{className:"p-4",children:r?e.jsx(O,{label:"Loading widget..."}):l})]})}const ct=[{value:"pdf",label:"Invoice PDF"},{value:"excel",label:"Renewal Excel"}];function ot({open:t,onClose:r,customerEmail:a,activeTab:n,onTabChange:s,onSendEmail:l,children:c}){return e.jsx(se,{open:t,onClose:r,title:"Invoice preview",width:"640px",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(le,{items:ct,value:n,onChange:s}),a&&e.jsxs("div",{className:"flex items-center justify-between rounded-md bg-accent-muted px-3 py-2 text-sm",children:[e.jsxs("span",{className:"flex items-center gap-2 text-ink-secondary",children:[e.jsx(Se,{size:14}),a]}),l&&e.jsx(C,{size:"sm",variant:"secondary",onClick:l,children:"Send"})]}),e.jsx("div",{className:"min-h-[60vh]",children:c})]})})}function it({open:t,onClose:r,title:a="Changes",fields:n}){return e.jsx(T,{open:t,onClose:r,title:a,size:"md",children:e.jsxs("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[e.jsx("div",{className:"font-medium text-ink-secondary",children:"Field"}),e.jsx("div",{className:"font-medium text-ink-secondary",children:"Previous"}),e.jsx("div",{className:"font-medium text-ink-secondary",children:"Current"}),n.map(s=>e.jsxs(p.Fragment,{children:[e.jsx("div",{className:"text-ink-primary",children:s.label}),e.jsx("div",{className:"rounded bg-status-offline-bg px-2 py-1 text-status-offline",children:s.previous}),e.jsx("div",{className:"rounded bg-status-online-bg px-2 py-1 text-status-online",children:s.current})]},s.label))]})})}h.AuthLayout=Re,h.Badge=de,h.Button=C,h.Card=H,h.ChangesPreviewModal=it,h.Checkbox=A,h.ColumnFilterDropdown=Te,h.ConfirmDialog=Ee,h.DataTable=Oe,h.DatePicker=Ie,h.DateRangePicker=Ye,h.Dropdown=He,h.DynamicRowList=Ve,h.FilterPanel=Ge,h.FloatingAddButton=te,h.Footer=et,h.FormGroup=D,h.FormModal=We,h.Header=tt,h.IconButton=S,h.InputField=re,h.InvoicePreviewModal=ot,h.LicenseAgentButton=st,h.Loader=O,h.MainLayout=rt,h.Modal=T,h.MultiSelectDropdown=Ue,h.Pagination=_e,h.Panel=Qe,h.PasswordInput=ae,h.PasswordStrengthMeter=Je,h.ProfileMenu=at,h.ReportWidget=lt,h.RowSelectCheckbox=I,h.SearchBox=ne,h.Sidebar=nt,h.SlideOverModal=se,h.TableToolbar=Xe,h.Tabs=le,h.ToggleButtonGroup=Ke,h.ValidationMessage=K,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sls-ui-library",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Shared UI components and features for SLS",
5
5
  "type": "module",
6
6
  "main": "dist/sls-ui.umd.js",
@@ -21,7 +21,7 @@
21
21
  "preview": "vite preview"
22
22
  },
23
23
  "peerDependencies": {
24
- "react": "^18.0.0",
25
- "react-dom": "^18.0.0"
24
+ "react": "^18.0.0 || ^19.0.0",
25
+ "react-dom": "^18.0.0 || ^19.0.0"
26
26
  }
27
27
  }