@sigtes/ui 0.0.15 → 0.0.17

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,5 +1,5 @@
1
1
  "use client";
2
- import { j as a } from "./UserProvider-BfG9Ccu3.js";
2
+ import { j as a } from "./UserProvider-ultyW1kJ.js";
3
3
  import "react";
4
4
  import { Slot as d } from "@radix-ui/react-slot";
5
5
  import { cva as u } from "class-variance-authority";
@@ -1 +1 @@
1
- "use client";"use strict";const d=require("./UserProvider-CQZEZTc7.cjs");require("react");const c=require("@radix-ui/react-slot"),g=require("class-variance-authority"),v=require("tailwind-merge"),s=g.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function o(e){var n,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(n=0;n<i;n++)e[n]&&(t=o(e[n]))&&(r&&(r+=" "),r+=t)}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function l(){for(var e,n,t=0,r="",i=arguments.length;t<i;t++)(e=arguments[t])&&(n=o(e))&&(r&&(r+=" "),r+=n);return r}function a(...e){return v.twMerge(l(e))}function f({className:e,variant:n,size:t,asChild:r=!1,...i}){const u=r?c.Slot:"button";return d.jsxRuntimeExports.jsx(u,{"data-slot":"button",className:a(s({variant:n,size:t,className:e})),...i})}exports.Button=f;exports.buttonVariants=s;exports.cn=a;
1
+ "use client";"use strict";const d=require("./UserProvider-Sov75KqP.cjs");require("react");const c=require("@radix-ui/react-slot"),g=require("class-variance-authority"),v=require("tailwind-merge"),s=g.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function o(e){var n,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(n=0;n<i;n++)e[n]&&(t=o(e[n]))&&(r&&(r+=" "),r+=t)}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function l(){for(var e,n,t=0,r="",i=arguments.length;t<i;t++)(e=arguments[t])&&(n=o(e))&&(r&&(r+=" "),r+=n);return r}function a(...e){return v.twMerge(l(e))}function f({className:e,variant:n,size:t,asChild:r=!1,...i}){const u=r?c.Slot:"button";return d.jsxRuntimeExports.jsx(u,{"data-slot":"button",className:a(s({variant:n,size:t,className:e})),...i})}exports.Button=f;exports.buttonVariants=s;exports.cn=a;
@@ -1,4 +1,4 @@
1
- "use client";"use strict";const i=require("react");var w={exports:{}},k={};/**
1
+ "use client";"use strict";const i=require("react");var x={exports:{}},y={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var J;function ae(){if(J)return k;J=1;var f=Symbol.for("react.transitional.element"),d=Symbol.for("react.fragment");function _(v,c,o){var l=null;if(o!==void 0&&(l=""+o),c.key!==void 0&&(l=""+c.key),"key"in c){o={};for(var b in c)b!=="key"&&(o[b]=c[b])}else o=c;return c=o.ref,{$$typeof:f,type:v,key:l,ref:c!==void 0?c:null,props:o}}return k.Fragment=d,k.jsx=_,k.jsxs=_,k}var y={};/**
9
+ */var M;function ae(){if(M)return y;M=1;var f=Symbol.for("react.transitional.element"),m=Symbol.for("react.fragment");function _(v,c,o){var l=null;if(o!==void 0&&(l=""+o),c.key!==void 0&&(l=""+c.key),"key"in c){o={};for(var b in c)b!=="key"&&(o[b]=c[b])}else o=c;return c=o.ref,{$$typeof:f,type:v,key:l,ref:c!==void 0?c:null,props:o}}return y.Fragment=m,y.jsx=_,y.jsxs=_,y}var k={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,9 +14,9 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var W;function se(){return W||(W=1,process.env.NODE_ENV!=="production"&&(function(){function f(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case X:return"Profiler";case G:return"StrictMode";case Q:return"Suspense";case K:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case m:return"Portal";case H:return(e.displayName||"Context")+".Provider";case B:return(e._context.displayName||"Context")+".Consumer";case Z:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return r=e.displayName||null,r!==null?r:f(e.type)||"Memo";case I:r=e._payload,e=e._init;try{return f(e(r))}catch{}}return null}function d(e){return""+e}function _(e){try{d(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,a=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",a),d(e)}}function v(e){if(e===E)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===I)return"<...>";try{var r=f(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function c(){var e=j.A;return e===null?null:e.getOwner()}function o(){return Error("react-stack-top-frame")}function l(e){if(Y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function b(e,r){function t(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function R(){var e=f(this.type);return L[e]||(L[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function A(e,r,t,a,p,u,C,N){return t=u.ref,e={$$typeof:n,type:e,key:r,props:u,_owner:p},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:R}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:C}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function h(e,r,t,a,p,u,C,N){var s=r.children;if(s!==void 0)if(a)if(ne(s)){for(a=0;a<s.length;a++)O(s[a]);Object.freeze&&Object.freeze(s)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else O(s);if(Y.call(r,"key")){s=f(e);var g=Object.keys(r).filter(function(oe){return oe!=="key"});a=0<g.length?"{key: someKey, "+g.join(": ..., ")+": ...}":"{key: someKey}",M[s+a]||(g=0<g.length?"{"+g.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var W;function se(){return W||(W=1,process.env.NODE_ENV!=="production"&&(function(){function f(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case X:return"Profiler";case G:return"StrictMode";case Q:return"Suspense";case K:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case d:return"Portal";case H:return(e.displayName||"Context")+".Provider";case B:return(e._context.displayName||"Context")+".Consumer";case Z:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return r=e.displayName||null,r!==null?r:f(e.type)||"Memo";case U:r=e._payload,e=e._init;try{return f(e(r))}catch{}}return null}function m(e){return""+e}function _(e){try{m(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,a=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",a),m(e)}}function v(e){if(e===E)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===U)return"<...>";try{var r=f(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function c(){var e=j.A;return e===null?null:e.getOwner()}function o(){return Error("react-stack-top-frame")}function l(e){if(Y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function b(e,r){function t(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function R(){var e=f(this.type);return L[e]||(L[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function A(e,r,t,a,p,u,N,C){return t=u.ref,e={$$typeof:n,type:e,key:r,props:u,_owner:p},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:R}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:C}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function O(e,r,t,a,p,u,N,C){var s=r.children;if(s!==void 0)if(a)if(ne(s)){for(a=0;a<s.length;a++)w(s[a]);Object.freeze&&Object.freeze(s)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else w(s);if(Y.call(r,"key")){s=f(e);var T=Object.keys(r).filter(function(oe){return oe!=="key"});a=0<T.length?"{key: someKey, "+T.join(": ..., ")+": ...}":"{key: someKey}",J[s+a]||(T=0<T.length?"{"+T.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,a,s,g,s),M[s+a]=!0)}if(s=null,t!==void 0&&(_(t),s=""+t),l(r)&&(_(r.key),s=""+r.key),"key"in r){t={};for(var U in r)U!=="key"&&(t[U]=r[U])}else t=r;return s&&b(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),A(e,s,u,p,c(),t,C,N)}function O(e){typeof e=="object"&&e!==null&&e.$$typeof===n&&e._store&&(e._store.validated=1)}var T=i,n=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),H=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),te=Symbol.for("react.client.reference"),j=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,ne=Array.isArray,P=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(e){return e()}};var D,L={},F=T.react_stack_bottom_frame.bind(T,o)(),$=P(v(o)),M={};y.Fragment=E,y.jsx=function(e,r,t,a,p){var u=1e4>j.recentlyCreatedOwnerStacks++;return h(e,r,t,!1,a,p,u?Error("react-stack-top-frame"):F,u?P(v(e)):$)},y.jsxs=function(e,r,t,a,p){var u=1e4>j.recentlyCreatedOwnerStacks++;return h(e,r,t,!0,a,p,u?Error("react-stack-top-frame"):F,u?P(v(e)):$)}})()),y}var V;function ce(){return V||(V=1,process.env.NODE_ENV==="production"?w.exports=ae():w.exports=se()),w.exports}var q=ce();const S={id:"",username:"",email:"",created_at:null,updated_at:null,features:[]},x={id:"123456",username:"admin",email:"admin@admin.com",created_at:new Date,updated_at:new Date,features:["features"]},z=i.createContext({user:S,isLoading:!0,fetchUser:async()=>{},logout:async()=>{},login:async()=>!1});function le({children:f,sessionEndPoint:d,userEndPoint:_,useMock:v=!1}){const[c,o]=i.useState(S),[l,b]=i.useState(!0),R=i.useCallback(async()=>{try{const n=await fetch(_),m=await n.json();if(n.status==200){const E=m;o(E),localStorage.setItem("user",JSON.stringify(E))}else o(S),localStorage.removeItem("user")}catch(n){console.log(n)}},[_]);i.useEffect(()=>{const n=localStorage.getItem("user");(async()=>(n&&l&&await R(),b(!1)))()},[R,l]);const A=i.useCallback(async()=>{try{if((await fetch(d,{method:"DELETE",credentials:"include"})).status==200){const m=localStorage.getItem("theme")||"system";localStorage.clear(),localStorage.setItem("theme",m),o(S),b(!1)}}catch(n){console.log(n)}},[d]),h=i.useCallback(async(n,m)=>{try{return(await fetch(d,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:n,password:m})})).status===201?(R(),!0):!1}catch(E){return console.log(E),!1}},[R,d]);i.useEffect(()=>{const n=localStorage.getItem("user");n&&o(JSON.parse(n))},[R]);const O={user:c,isLoading:l,fetchUser:R,logout:A,login:h},T={user:c,isLoading:l,fetchUser:async()=>{o(x),console.log(x)},logout:async()=>{o(S),console.log(S)},login:async(n,m)=>(console.log(n,m),o(x),console.log(x),!0)};return q.jsx(z.Provider,{value:v?T:O,children:f})}function ue(){return i.useContext(z)}exports.UserProvider=le;exports.jsxRuntimeExports=q;exports.useUser=ue;
22
+ <%s key={someKey} {...props} />`,a,s,T,s),J[s+a]=!0)}if(s=null,t!==void 0&&(_(t),s=""+t),l(r)&&(_(r.key),s=""+r.key),"key"in r){t={};for(var I in r)I!=="key"&&(t[I]=r[I])}else t=r;return s&&b(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),A(e,s,u,p,c(),t,N,C)}function w(e){typeof e=="object"&&e!==null&&e.$$typeof===n&&e._store&&(e._store.validated=1)}var g=i,n=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),H=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),te=Symbol.for("react.client.reference"),j=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,ne=Array.isArray,P=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(e){return e()}};var D,L={},F=g.react_stack_bottom_frame.bind(g,o)(),$=P(v(o)),J={};k.Fragment=E,k.jsx=function(e,r,t,a,p){var u=1e4>j.recentlyCreatedOwnerStacks++;return O(e,r,t,!1,a,p,u?Error("react-stack-top-frame"):F,u?P(v(e)):$)},k.jsxs=function(e,r,t,a,p){var u=1e4>j.recentlyCreatedOwnerStacks++;return O(e,r,t,!0,a,p,u?Error("react-stack-top-frame"):F,u?P(v(e)):$)}})()),k}var V;function ce(){return V||(V=1,process.env.NODE_ENV==="production"?x.exports=ae():x.exports=se()),x.exports}var q=ce();const S={id:"",username:"",email:"",created_at:null,updated_at:null,features:[]},h={id:"123456",username:"admin",email:"admin@admin.com",created_at:new Date,updated_at:new Date,features:["features"]},z=i.createContext({user:S,isLoading:!0,fetchUser:async()=>{},logout:async()=>{},login:async()=>!1});function le({children:f,sessionEndPoint:m,userEndPoint:_,useMock:v=!1}){const[c,o]=i.useState(S),[l,b]=i.useState(!0),R=i.useCallback(async()=>{try{const n=await fetch(_),d=await n.json();if(n.status==200){const E=d;o(E),localStorage.setItem("user",JSON.stringify(E))}else o(S),localStorage.removeItem("user")}catch(n){console.log(n)}},[_]);i.useEffect(()=>{const n=localStorage.getItem("user");(async()=>(n&&l&&await R(),b(!1)))()},[R,l]);const A=i.useCallback(async()=>{try{if((await fetch(m,{method:"DELETE",credentials:"include"})).status==200){const d=localStorage.getItem("theme")||"system";localStorage.clear(),localStorage.setItem("theme",d),o(S),b(!1)}}catch(n){console.log(n)}},[m]),O=i.useCallback(async(n,d)=>{try{return(await fetch(m,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:n,password:d})})).status===201?(R(),!0):!1}catch(E){return console.log(E),!1}},[R,m]);i.useEffect(()=>{const n=localStorage.getItem("user");n&&o(JSON.parse(n))},[R]);const w={user:c,isLoading:l,fetchUser:R,logout:A,login:O},g={user:c,isLoading:l,fetchUser:async()=>{o(h),console.log(h)},logout:async()=>{o(S),console.log(S),localStorage.removeItem("user")},login:async(n,d)=>(console.log(n,d),o(h),console.log(h),localStorage.setItem("user",JSON.stringify(h)),!0)};return q.jsx(z.Provider,{value:v?g:w,children:f})}function ue(){return i.useContext(z)}exports.UserProvider=le;exports.jsxRuntimeExports=q;exports.useUser=ue;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import se, { createContext as ce, useState as J, useCallback as U, useEffect as W, useContext as le } from "react";
3
- var O = { exports: {} }, S = {};
2
+ import se, { createContext as ce, useState as M, useCallback as I, useEffect as W, useContext as le } from "react";
3
+ var w = { exports: {} }, S = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.js
@@ -51,7 +51,7 @@ function ie() {
51
51
  return e.$$typeof === ne ? null : e.displayName || e.name || null;
52
52
  if (typeof e == "string") return e;
53
53
  switch (e) {
54
- case m:
54
+ case d:
55
55
  return "Fragment";
56
56
  case B:
57
57
  return "Profiler";
@@ -68,7 +68,7 @@ function ie() {
68
68
  switch (typeof e.tag == "number" && console.error(
69
69
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
70
  ), e.$$typeof) {
71
- case d:
71
+ case m:
72
72
  return "Portal";
73
73
  case Z:
74
74
  return (e.displayName || "Context") + ".Provider";
@@ -79,7 +79,7 @@ function ie() {
79
79
  return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
80
80
  case re:
81
81
  return r = e.displayName || null, r !== null ? r : i(e.type) || "Memo";
82
- case I:
82
+ case U:
83
83
  r = e._payload, e = e._init;
84
84
  try {
85
85
  return i(e(r));
@@ -109,8 +109,8 @@ function ie() {
109
109
  }
110
110
  }
111
111
  function b(e) {
112
- if (e === m) return "<>";
113
- if (typeof e == "object" && e !== null && e.$$typeof === I)
112
+ if (e === d) return "<>";
113
+ if (typeof e == "object" && e !== null && e.$$typeof === U)
114
114
  return "<...>";
115
115
  try {
116
116
  var r = i(e);
@@ -183,25 +183,25 @@ function ie() {
183
183
  value: N
184
184
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
185
185
  }
186
- function h(e, r, t, a, R, u, P, N) {
186
+ function k(e, r, t, a, R, u, P, N) {
187
187
  var s = r.children;
188
188
  if (s !== void 0)
189
189
  if (a)
190
190
  if (oe(s)) {
191
191
  for (a = 0; a < s.length; a++)
192
- k(s[a]);
192
+ O(s[a]);
193
193
  Object.freeze && Object.freeze(s);
194
194
  } else
195
195
  console.error(
196
196
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
197
  );
198
- else k(s);
198
+ else O(s);
199
199
  if (Y.call(r, "key")) {
200
200
  s = i(e);
201
- var T = Object.keys(r).filter(function(ae) {
201
+ var v = Object.keys(r).filter(function(ae) {
202
202
  return ae !== "key";
203
203
  });
204
- a = 0 < T.length ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}", M[s + a] || (T = 0 < T.length ? "{" + T.join(": ..., ") + ": ...}" : "{}", console.error(
204
+ a = 0 < v.length ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}", J[s + a] || (v = 0 < v.length ? "{" + v.join(": ..., ") + ": ...}" : "{}", console.error(
205
205
  `A props object containing a "key" prop is being spread into JSX:
206
206
  let props = %s;
207
207
  <%s {...props} />
@@ -210,9 +210,9 @@ React keys must be passed directly to JSX without using spread:
210
210
  <%s key={someKey} {...props} />`,
211
211
  a,
212
212
  s,
213
- T,
213
+ v,
214
214
  s
215
- ), M[s + a] = !0);
215
+ ), J[s + a] = !0);
216
216
  }
217
217
  if (s = null, t !== void 0 && (E(t), s = "" + t), l(r) && (E(r.key), s = "" + r.key), "key" in r) {
218
218
  t = {};
@@ -233,24 +233,24 @@ React keys must be passed directly to JSX without using spread:
233
233
  N
234
234
  );
235
235
  }
236
- function k(e) {
236
+ function O(e) {
237
237
  typeof e == "object" && e !== null && e.$$typeof === n && e._store && (e._store.validated = 1);
238
238
  }
239
- var v = se, n = Symbol.for("react.transitional.element"), d = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), X = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), H = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), Q = Symbol.for("react.forward_ref"), K = Symbol.for("react.suspense"), ee = Symbol.for("react.suspense_list"), re = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), te = Symbol.for("react.activity"), ne = Symbol.for("react.client.reference"), A = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, oe = Array.isArray, j = console.createTask ? console.createTask : function() {
239
+ var g = se, n = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), X = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), H = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), Q = Symbol.for("react.forward_ref"), K = Symbol.for("react.suspense"), ee = Symbol.for("react.suspense_list"), re = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), te = Symbol.for("react.activity"), ne = Symbol.for("react.client.reference"), A = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, oe = Array.isArray, j = console.createTask ? console.createTask : function() {
240
240
  return null;
241
241
  };
242
- v = {
242
+ g = {
243
243
  react_stack_bottom_frame: function(e) {
244
244
  return e();
245
245
  }
246
246
  };
247
- var D, L = {}, F = v.react_stack_bottom_frame.bind(
248
- v,
247
+ var D, L = {}, F = g.react_stack_bottom_frame.bind(
248
+ g,
249
249
  o
250
- )(), $ = j(b(o)), M = {};
251
- y.Fragment = m, y.jsx = function(e, r, t, a, R) {
250
+ )(), $ = j(b(o)), J = {};
251
+ y.Fragment = d, y.jsx = function(e, r, t, a, R) {
252
252
  var u = 1e4 > A.recentlyCreatedOwnerStacks++;
253
- return h(
253
+ return k(
254
254
  e,
255
255
  r,
256
256
  t,
@@ -262,7 +262,7 @@ React keys must be passed directly to JSX without using spread:
262
262
  );
263
263
  }, y.jsxs = function(e, r, t, a, R) {
264
264
  var u = 1e4 > A.recentlyCreatedOwnerStacks++;
265
- return h(
265
+ return k(
266
266
  e,
267
267
  r,
268
268
  t,
@@ -277,17 +277,17 @@ React keys must be passed directly to JSX without using spread:
277
277
  }
278
278
  var z;
279
279
  function fe() {
280
- return z || (z = 1, process.env.NODE_ENV === "production" ? O.exports = ue() : O.exports = ie()), O.exports;
280
+ return z || (z = 1, process.env.NODE_ENV === "production" ? w.exports = ue() : w.exports = ie()), w.exports;
281
281
  }
282
- var de = fe();
283
- const g = {
282
+ var me = fe();
283
+ const T = {
284
284
  id: "",
285
285
  username: "",
286
286
  email: "",
287
287
  created_at: null,
288
288
  updated_at: null,
289
289
  features: []
290
- }, w = {
290
+ }, h = {
291
291
  id: "123456",
292
292
  username: "admin",
293
293
  email: "admin@admin.com",
@@ -295,7 +295,7 @@ const g = {
295
295
  updated_at: /* @__PURE__ */ new Date(),
296
296
  features: ["features"]
297
297
  }, G = ce({
298
- user: g,
298
+ user: T,
299
299
  isLoading: !0,
300
300
  fetchUser: async () => {
301
301
  },
@@ -309,14 +309,14 @@ function Ee({
309
309
  userEndPoint: E,
310
310
  useMock: b = !1
311
311
  }) {
312
- const [c, o] = J(g), [l, _] = J(!0), p = U(async () => {
312
+ const [c, o] = M(T), [l, _] = M(!0), p = I(async () => {
313
313
  try {
314
- const n = await fetch(E), d = await n.json();
314
+ const n = await fetch(E), m = await n.json();
315
315
  if (n.status == 200) {
316
- const m = d;
317
- o(m), localStorage.setItem("user", JSON.stringify(m));
316
+ const d = m;
317
+ o(d), localStorage.setItem("user", JSON.stringify(d));
318
318
  } else
319
- o(g), localStorage.removeItem("user");
319
+ o(T), localStorage.removeItem("user");
320
320
  } catch (n) {
321
321
  console.log(n);
322
322
  }
@@ -325,20 +325,20 @@ function Ee({
325
325
  const n = localStorage.getItem("user");
326
326
  (async () => (n && l && await p(), _(!1)))();
327
327
  }, [p, l]);
328
- const x = U(async () => {
328
+ const x = I(async () => {
329
329
  try {
330
330
  if ((await fetch(f, {
331
331
  method: "DELETE",
332
332
  credentials: "include"
333
333
  })).status == 200) {
334
- const d = localStorage.getItem("theme") || "system";
335
- localStorage.clear(), localStorage.setItem("theme", d), o(g), _(!1);
334
+ const m = localStorage.getItem("theme") || "system";
335
+ localStorage.clear(), localStorage.setItem("theme", m), o(T), _(!1);
336
336
  }
337
337
  } catch (n) {
338
338
  console.log(n);
339
339
  }
340
- }, [f]), h = U(
341
- async (n, d) => {
340
+ }, [f]), k = I(
341
+ async (n, m) => {
342
342
  try {
343
343
  return (await fetch(f, {
344
344
  method: "POST",
@@ -347,11 +347,11 @@ function Ee({
347
347
  },
348
348
  body: JSON.stringify({
349
349
  email: n,
350
- password: d
350
+ password: m
351
351
  })
352
352
  })).status === 201 ? (p(), !0) : !1;
353
- } catch (m) {
354
- return console.log(m), !1;
353
+ } catch (d) {
354
+ return console.log(d), !1;
355
355
  }
356
356
  },
357
357
  [p, f]
@@ -360,27 +360,27 @@ function Ee({
360
360
  const n = localStorage.getItem("user");
361
361
  n && o(JSON.parse(n));
362
362
  }, [p]);
363
- const k = {
363
+ const O = {
364
364
  user: c,
365
365
  isLoading: l,
366
366
  fetchUser: p,
367
367
  logout: x,
368
- login: h
369
- }, v = {
368
+ login: k
369
+ }, g = {
370
370
  user: c,
371
371
  isLoading: l,
372
372
  fetchUser: async () => {
373
- o(w), console.log(w);
373
+ o(h), console.log(h);
374
374
  },
375
375
  logout: async () => {
376
- o(g), console.log(g);
376
+ o(T), console.log(T), localStorage.removeItem("user");
377
377
  },
378
- login: async (n, d) => (console.log(n, d), o(w), console.log(w), !0)
378
+ login: async (n, m) => (console.log(n, m), o(h), console.log(h), localStorage.setItem("user", JSON.stringify(h)), !0)
379
379
  };
380
- return /* @__PURE__ */ de.jsx(
380
+ return /* @__PURE__ */ me.jsx(
381
381
  G.Provider,
382
382
  {
383
- value: b ? v : k,
383
+ value: b ? g : O,
384
384
  children: i
385
385
  }
386
386
  );
@@ -390,6 +390,6 @@ function _e() {
390
390
  }
391
391
  export {
392
392
  Ee as U,
393
- de as j,
393
+ me as j,
394
394
  _e as u
395
395
  };
@@ -0,0 +1,40 @@
1
+ import * as React from "react";
2
+ import * as RechartsPrimitive from "recharts";
3
+ declare const THEMES: {
4
+ readonly light: "";
5
+ readonly dark: ".dark";
6
+ };
7
+ export type ChartConfig = {
8
+ [k in string]: {
9
+ label?: React.ReactNode;
10
+ icon?: React.ComponentType;
11
+ } & ({
12
+ color?: string;
13
+ theme?: never;
14
+ } | {
15
+ color?: never;
16
+ theme: Record<keyof typeof THEMES, string>;
17
+ });
18
+ };
19
+ export declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<"div"> & {
20
+ config: ChartConfig;
21
+ children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ export declare const ChartStyle: ({ id, config, }: {
24
+ id: string;
25
+ config: ChartConfig;
26
+ }) => import("react/jsx-runtime").JSX.Element | null;
27
+ export declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
28
+ export declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<"div"> & {
29
+ hideLabel?: boolean;
30
+ hideIndicator?: boolean;
31
+ indicator?: "line" | "dot" | "dashed";
32
+ nameKey?: string;
33
+ labelKey?: string;
34
+ }): import("react/jsx-runtime").JSX.Element | null;
35
+ export declare const ChartLegend: typeof RechartsPrimitive.Legend;
36
+ export declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<"div"> & Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
37
+ hideIcon?: boolean;
38
+ nameKey?: string;
39
+ }): import("react/jsx-runtime").JSX.Element | null;
40
+ export {};
@@ -0,0 +1 @@
1
+ export * from './chart';