@neuctra/ui 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/basic/Accordation.d.ts +27 -18
- package/dist/components/basic/Alert.d.ts +15 -2
- package/dist/components/basic/Avatar.d.ts +5 -3
- package/dist/components/basic/Badge.d.ts +3 -3
- package/dist/components/basic/Button.d.ts +15 -17
- package/dist/components/basic/Card.d.ts +7 -49
- package/dist/components/basic/CheckRadioInput.d.ts +3 -1
- package/dist/components/basic/Container.d.ts +28 -26
- package/dist/components/basic/Drawer.d.ts +20 -11
- package/dist/components/basic/Flexbox.d.ts +18 -10
- package/dist/components/basic/GridView.d.ts +7 -5
- package/dist/components/basic/Image.d.ts +31 -6
- package/dist/components/basic/Input.d.ts +18 -10
- package/dist/components/basic/List.d.ts +11 -3
- package/dist/components/basic/Modal.d.ts +15 -2
- package/dist/components/basic/Section.d.ts +36 -0
- package/dist/components/basic/Stack.d.ts +27 -0
- package/dist/components/basic/Table.d.ts +18 -54
- package/dist/components/basic/Tabs.d.ts +28 -28
- package/dist/components/basic/Text.d.ts +19 -32
- package/dist/index.cjs.js +68 -178
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +17 -18
- package/dist/index.es.js +3542 -4766
- package/dist/index.es.js.map +1 -0
- package/dist/src/components/avatar/AvatarGroup.js +9 -0
- package/dist/src/components/avatar/AvatarWithStatus.js +18 -0
- package/dist/src/components/basic/Accordation.js +74 -0
- package/dist/src/components/basic/Alert.js +126 -0
- package/dist/src/components/basic/AudioGallery.js +425 -0
- package/dist/src/components/basic/AudioPlayer.js +116 -0
- package/dist/src/components/basic/Avatar.js +181 -0
- package/dist/src/components/basic/Badge.js +66 -0
- package/dist/src/components/basic/Button.js +101 -0
- package/dist/src/components/basic/Card.js +45 -0
- package/dist/src/components/basic/CheckRadioInput.js +83 -0
- package/dist/src/components/basic/Container.js +45 -0
- package/dist/src/components/basic/Drawer.js +94 -0
- package/dist/src/components/basic/DropDown.js +316 -0
- package/dist/src/components/basic/Flexbox.js +67 -0
- package/dist/src/components/basic/GridView.js +51 -0
- package/dist/src/components/basic/Image.js +95 -0
- package/dist/src/components/basic/Input.js +123 -0
- package/dist/src/components/basic/List.js +71 -0
- package/dist/src/components/basic/Modal.js +88 -0
- package/dist/src/components/basic/Section.js +100 -0
- package/dist/src/components/basic/Stack.js +75 -0
- package/dist/src/components/basic/Table.js +32 -0
- package/dist/src/components/basic/Tabs.js +149 -0
- package/dist/src/components/basic/Text.js +117 -0
- package/dist/src/index.js +44 -0
- package/dist/types/src/components/basic/Accordation.d.ts +44 -0
- package/dist/types/{components → src/components}/basic/Alert.d.ts +15 -2
- package/dist/types/{components → src/components}/basic/Avatar.d.ts +5 -3
- package/dist/types/{components → src/components}/basic/Badge.d.ts +3 -3
- package/dist/types/src/components/basic/Button.d.ts +26 -0
- package/dist/types/src/components/basic/Card.d.ts +28 -0
- package/dist/types/{components → src/components}/basic/CheckRadioInput.d.ts +3 -1
- package/dist/types/src/components/basic/Container.d.ts +32 -0
- package/dist/types/src/components/basic/Drawer.d.ts +33 -0
- package/dist/types/src/components/basic/Flexbox.d.ts +25 -0
- package/dist/types/{components → src/components}/basic/GridView.d.ts +7 -5
- package/dist/types/src/components/basic/Image.d.ts +58 -0
- package/dist/types/{components → src/components}/basic/Input.d.ts +18 -10
- package/dist/types/{components → src/components}/basic/List.d.ts +11 -3
- package/dist/types/src/components/basic/Modal.d.ts +24 -0
- package/dist/types/src/components/basic/Section.d.ts +36 -0
- package/dist/types/src/components/basic/Stack.d.ts +27 -0
- package/dist/types/src/components/basic/Table.d.ts +23 -0
- package/dist/types/src/components/basic/Tabs.d.ts +47 -0
- package/dist/types/src/components/basic/Text.d.ts +26 -0
- package/dist/types/{index.d.ts → src/index.d.ts} +17 -18
- package/dist/types/vite.config.d.ts +2 -0
- package/dist/ui.css +1 -1
- package/dist/vite.config.js +34 -0
- package/package.json +2 -1
- package/dist/components/basic/ImageGallery.d.ts +0 -21
- package/dist/components/basic/VideoGallery.d.ts +0 -136
- package/dist/components/basic/VideoPlayer.d.ts +0 -36
- package/dist/types/components/basic/Accordation.d.ts +0 -35
- package/dist/types/components/basic/Button.d.ts +0 -28
- package/dist/types/components/basic/Card.d.ts +0 -70
- package/dist/types/components/basic/Container.d.ts +0 -30
- package/dist/types/components/basic/Drawer.d.ts +0 -24
- package/dist/types/components/basic/Flexbox.d.ts +0 -17
- package/dist/types/components/basic/Image.d.ts +0 -33
- package/dist/types/components/basic/ImageGallery.d.ts +0 -21
- package/dist/types/components/basic/Modal.d.ts +0 -11
- package/dist/types/components/basic/Table.d.ts +0 -59
- package/dist/types/components/basic/Tabs.d.ts +0 -47
- package/dist/types/components/basic/Text.d.ts +0 -39
- package/dist/types/components/basic/VideoGallery.d.ts +0 -136
- package/dist/types/components/basic/VideoPlayer.d.ts +0 -36
- /package/dist/types/{components → src/components}/avatar/AvatarGroup.d.ts +0 -0
- /package/dist/types/{components → src/components}/avatar/AvatarWithStatus.d.ts +0 -0
- /package/dist/types/{components → src/components}/basic/AudioGallery.d.ts +0 -0
- /package/dist/types/{components → src/components}/basic/AudioPlayer.d.ts +0 -0
- /package/dist/types/{components → src/components}/basic/DropDown.d.ts +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react");var ke={exports:{}},ye={};/**
|
|
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
|
|
9
|
+
*/var We;function at(){if(We)return ye;We=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(s,c,a){var u=null;if(a!==void 0&&(u=""+a),c.key!==void 0&&(u=""+c.key),"key"in c){a={};for(var d in c)d!=="key"&&(a[d]=c[d])}else a=c;return c=a.ref,{$$typeof:t,type:s,key:u,ref:c!==void 0?c:null,props:a}}return ye.Fragment=r,ye.jsx=n,ye.jsxs=n,ye}var be={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,268 +14,132 @@
|
|
|
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
|
|
17
|
+
*/var Fe;function it(){return Fe||(Fe=1,process.env.NODE_ENV!=="production"&&(function(){function t(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===D?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case h:return"Fragment";case l:return"Profiler";case w:return"StrictMode";case M:return"Suspense";case _:return"SuspenseList";case L:return"Activity"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case m:return"Portal";case $:return o.displayName||"Context";case k:return(o._context.displayName||"Context")+".Consumer";case j:var T=o.render;return o=o.displayName,o||(o=T.displayName||T.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case R:return T=o.displayName||null,T!==null?T:t(o.type)||"Memo";case O:T=o._payload,o=o._init;try{return t(o(T))}catch{}}return null}function r(o){return""+o}function n(o){try{r(o);var T=!1}catch{T=!0}if(T){T=console;var W=T.error,F=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return W.call(T,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",F),r(o)}}function s(o){if(o===h)return"<>";if(typeof o=="object"&&o!==null&&o.$$typeof===O)return"<...>";try{var T=t(o);return T?"<"+T+">":"<...>"}catch{return"<...>"}}function c(){var o=C.A;return o===null?null:o.getOwner()}function a(){return Error("react-stack-top-frame")}function u(o){if(P.call(o,"key")){var T=Object.getOwnPropertyDescriptor(o,"key").get;if(T&&T.isReactWarning)return!1}return o.key!==void 0}function d(o,T){function W(){S||(S=!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)",T))}W.isReactWarning=!0,Object.defineProperty(o,"key",{get:W,configurable:!0})}function g(){var o=t(this.type);return H[o]||(H[o]=!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.")),o=this.props.ref,o!==void 0?o:null}function y(o,T,W,F,ee,ie){var B=W.ref;return o={$$typeof:x,type:o,key:T,props:W,_owner:F},(B!==void 0?B:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:g}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ie}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function v(o,T,W,F,ee,ie){var B=T.children;if(B!==void 0)if(F)if(Y(B)){for(F=0;F<B.length;F++)f(B[F]);Object.freeze&&Object.freeze(B)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(B);if(P.call(T,"key")){B=t(o);var G=Object.keys(T).filter(function(I){return I!=="key"});F=0<G.length?"{key: someKey, "+G.join(": ..., ")+": ...}":"{key: someKey}",ae[B+F]||(G=0<G.length?"{"+G.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} />`,
|
|
23
|
-
@keyframes spin {
|
|
24
|
-
to { transform: rotate(360deg); }
|
|
25
|
-
}
|
|
26
|
-
`})]})};/**
|
|
27
|
-
* @license lucide-react v0.536.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const Tt=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rt=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,a,i)=>i?i.toUpperCase():a.toLowerCase()),et=t=>{const r=Rt(t);return r.charAt(0).toUpperCase()+r.slice(1)},ot=(...t)=>t.filter((r,a,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===a).join(" ").trim(),$t=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
|
|
32
|
-
* @license lucide-react v0.536.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/var zt={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"};/**
|
|
22
|
+
<%s key={someKey} {...props} />`,F,B,G,B),ae[B+F]=!0)}if(B=null,W!==void 0&&(n(W),B=""+W),u(T)&&(n(T.key),B=""+T.key),"key"in T){W={};for(var J in T)J!=="key"&&(W[J]=T[J])}else W=T;return B&&d(W,typeof o=="function"?o.displayName||o.name||"Unknown":o),y(o,B,W,c(),ee,ie)}function f(o){p(o)?o._store&&(o._store.validated=1):typeof o=="object"&&o!==null&&o.$$typeof===O&&(o._payload.status==="fulfilled"?p(o._payload.value)&&o._payload.value._store&&(o._payload.value._store.validated=1):o._store&&(o._store.validated=1))}function p(o){return typeof o=="object"&&o!==null&&o.$$typeof===x}var b=i,x=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),$=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),C=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.prototype.hasOwnProperty,Y=Array.isArray,z=console.createTask?console.createTask:function(){return null};b={react_stack_bottom_frame:function(o){return o()}};var S,H={},V=b.react_stack_bottom_frame.bind(b,a)(),U=z(s(a)),ae={};be.Fragment=h,be.jsx=function(o,T,W){var F=1e4>C.recentlyCreatedOwnerStacks++;return v(o,T,W,!1,F?Error("react-stack-top-frame"):V,F?z(s(o)):U)},be.jsxs=function(o,T,W){var F=1e4>C.recentlyCreatedOwnerStacks++;return v(o,T,W,!0,F?Error("react-stack-top-frame"):V,F?z(s(o)):U)}})()),be}var Ye;function lt(){return Ye||(Ye=1,process.env.NODE_ENV==="production"?ke.exports=at():ke.exports=it()),ke.exports}var e=lt();/**
|
|
37
23
|
* @license lucide-react v0.536.0 - ISC
|
|
38
24
|
*
|
|
39
25
|
* This source code is licensed under the ISC license.
|
|
40
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const
|
|
27
|
+
*/const ct=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),dt=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,n,s)=>s?s.toUpperCase():n.toLowerCase()),De=t=>{const r=dt(t);return r.charAt(0).toUpperCase()+r.slice(1)},Ve=(...t)=>t.filter((r,n,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===n).join(" ").trim(),ut=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
|
|
42
28
|
* @license lucide-react v0.536.0 - ISC
|
|
43
29
|
*
|
|
44
30
|
* This source code is licensed under the ISC license.
|
|
45
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/
|
|
32
|
+
*/var ft={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"};/**
|
|
47
33
|
* @license lucide-react v0.536.0 - ISC
|
|
48
34
|
*
|
|
49
35
|
* This source code is licensed under the ISC license.
|
|
50
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const
|
|
37
|
+
*/const pt=i.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:c="",children:a,iconNode:u,...d},g)=>i.createElement("svg",{ref:g,...ft,width:r,height:r,stroke:t,strokeWidth:s?Number(n)*24/Number(r):n,className:Ve("lucide",c),...!a&&!ut(d)&&{"aria-hidden":"true"},...d},[...u.map(([y,v])=>i.createElement(y,v)),...Array.isArray(a)?a:[a]]));/**
|
|
52
38
|
* @license lucide-react v0.536.0 - ISC
|
|
53
39
|
*
|
|
54
40
|
* This source code is licensed under the ISC license.
|
|
55
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const
|
|
42
|
+
*/const q=(t,r)=>{const n=i.forwardRef(({className:s,...c},a)=>i.createElement(pt,{ref:a,iconNode:r,className:Ve(`lucide-${ct(De(t))}`,`lucide-${t}`,s),...c}));return n.displayName=De(t),n};/**
|
|
57
43
|
* @license lucide-react v0.536.0 - ISC
|
|
58
44
|
*
|
|
59
45
|
* This source code is licensed under the ISC license.
|
|
60
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const
|
|
47
|
+
*/const xt=[["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"}]],ht=q("circle-alert",xt);/**
|
|
62
48
|
* @license lucide-react v0.536.0 - ISC
|
|
63
49
|
*
|
|
64
50
|
* This source code is licensed under the ISC license.
|
|
65
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const
|
|
52
|
+
*/const mt=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],gt=q("circle-check-big",mt);/**
|
|
67
53
|
* @license lucide-react v0.536.0 - ISC
|
|
68
54
|
*
|
|
69
55
|
* This source code is licensed under the ISC license.
|
|
70
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const
|
|
57
|
+
*/const yt=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],bt=q("eye-off",yt);/**
|
|
72
58
|
* @license lucide-react v0.536.0 - ISC
|
|
73
59
|
*
|
|
74
60
|
* This source code is licensed under the ISC license.
|
|
75
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const
|
|
62
|
+
*/const vt=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],wt=q("eye",vt);/**
|
|
77
63
|
* @license lucide-react v0.536.0 - ISC
|
|
78
64
|
*
|
|
79
65
|
* This source code is licensed under the ISC license.
|
|
80
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const
|
|
67
|
+
*/const jt=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],kt=q("heart",jt);/**
|
|
82
68
|
* @license lucide-react v0.536.0 - ISC
|
|
83
69
|
*
|
|
84
70
|
* This source code is licensed under the ISC license.
|
|
85
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
72
|
+
*/const St=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Tt=q("info",St);/**
|
|
87
73
|
* @license lucide-react v0.536.0 - ISC
|
|
88
74
|
*
|
|
89
75
|
* This source code is licensed under the ISC license.
|
|
90
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
77
|
+
*/const $t=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],Rt=q("maximize",$t);/**
|
|
92
78
|
* @license lucide-react v0.536.0 - ISC
|
|
93
79
|
*
|
|
94
80
|
* This source code is licensed under the ISC license.
|
|
95
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
82
|
+
*/const Et=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],Mt=q("minimize",Et);/**
|
|
97
83
|
* @license lucide-react v0.536.0 - ISC
|
|
98
84
|
*
|
|
99
85
|
* This source code is licensed under the ISC license.
|
|
100
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
87
|
+
*/const _t=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],Be=q("music",_t);/**
|
|
102
88
|
* @license lucide-react v0.536.0 - ISC
|
|
103
89
|
*
|
|
104
90
|
* This source code is licensed under the ISC license.
|
|
105
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
92
|
+
*/const It=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Re=q("pause",It);/**
|
|
107
93
|
* @license lucide-react v0.536.0 - ISC
|
|
108
94
|
*
|
|
109
95
|
* This source code is licensed under the ISC license.
|
|
110
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
97
|
+
*/const zt=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Ee=q("play",zt);/**
|
|
112
98
|
* @license lucide-react v0.536.0 - ISC
|
|
113
99
|
*
|
|
114
100
|
* This source code is licensed under the ISC license.
|
|
115
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
102
|
+
*/const At=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Ue=q("rotate-ccw",At);/**
|
|
117
103
|
* @license lucide-react v0.536.0 - ISC
|
|
118
104
|
*
|
|
119
105
|
* This source code is licensed under the ISC license.
|
|
120
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const
|
|
107
|
+
*/const Lt=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],Ct=q("shuffle",Lt);/**
|
|
122
108
|
* @license lucide-react v0.536.0 - ISC
|
|
123
109
|
*
|
|
124
110
|
* This source code is licensed under the ISC license.
|
|
125
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
112
|
+
*/const Nt=[["path",{d:"M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z",key:"15892j"}],["path",{d:"M3 20V4",key:"1ptbpl"}]],Me=q("skip-back",Nt);/**
|
|
127
113
|
* @license lucide-react v0.536.0 - ISC
|
|
128
114
|
*
|
|
129
115
|
* This source code is licensed under the ISC license.
|
|
130
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const
|
|
117
|
+
*/const Pt=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],_e=q("skip-forward",Pt);/**
|
|
132
118
|
* @license lucide-react v0.536.0 - ISC
|
|
133
119
|
*
|
|
134
120
|
* This source code is licensed under the ISC license.
|
|
135
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const
|
|
122
|
+
*/const Ot=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Wt=q("triangle-alert",Ot);/**
|
|
137
123
|
* @license lucide-react v0.536.0 - ISC
|
|
138
124
|
*
|
|
139
125
|
* This source code is licensed under the ISC license.
|
|
140
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const
|
|
127
|
+
*/const Ft=[["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"}]],Yt=q("user",Ft);/**
|
|
142
128
|
* @license lucide-react v0.536.0 - ISC
|
|
143
129
|
*
|
|
144
130
|
* This source code is licensed under the ISC license.
|
|
145
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
132
|
+
*/const Dt=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],qe=q("volume-2",Dt);/**
|
|
147
133
|
* @license lucide-react v0.536.0 - ISC
|
|
148
134
|
*
|
|
149
135
|
* This source code is licensed under the ISC license.
|
|
150
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const
|
|
137
|
+
*/const Bt=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],Xe=q("volume-x",Bt);/**
|
|
152
138
|
* @license lucide-react v0.536.0 - ISC
|
|
153
139
|
*
|
|
154
140
|
* This source code is licensed under the ISC license.
|
|
155
141
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const dr=[["path",{d:"M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z",key:"15892j"}],["path",{d:"M3 20V4",key:"1ptbpl"}]],Oe=te("skip-back",dr);/**
|
|
157
|
-
* @license lucide-react v0.536.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const ur=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],Fe=te("skip-forward",ur);/**
|
|
162
|
-
* @license lucide-react v0.536.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const pr=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],fr=te("triangle-alert",pr);/**
|
|
167
|
-
* @license lucide-react v0.536.0 - ISC
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the ISC license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const xr=[["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"}]],hr=te("user",xr);/**
|
|
172
|
-
* @license lucide-react v0.536.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const gr=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}]],br=te("volume-1",gr);/**
|
|
177
|
-
* @license lucide-react v0.536.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const yr=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],Ge=te("volume-2",yr);/**
|
|
182
|
-
* @license lucide-react v0.536.0 - ISC
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the ISC license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const mr=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],We=te("volume-x",mr);/**
|
|
187
|
-
* @license lucide-react v0.536.0 - ISC
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const vr=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],De=te("x",vr),wr=s.forwardRef(({type:t="text",placeholder:r="",label:a,value:i,defaultValue:c,onChange:n,name:l="",disabled:d=!1,readOnly:S=!1,required:j=!1,error:v,success:f=!1,autoFocus:b=!1,iconLeft:x,iconRight:w,borderColor:m="#ccc",focusBorderColor:C="#2563eb",hoverBorderColor:g="#4b5563",backgroundColor:y="#ffffff",textColor:E="#111827",errorColor:T="#dc2626",successColor:_="#16a34a",labelColor:A="#374151",size:R="md",radius:M="6px",fontSize:X="14px",rows:F=4,cols:Y,maxLength:$,resize:N=!0,showCharacterCount:J=!0,className:k,style:h},I)=>{const V=s.useRef(null),[U,o]=s.useState(c||""),[z,L]=s.useState(!1);s.useImperativeHandle(I,()=>V.current);const q=u=>{$&&u.target.value.length>$||(o(u.target.value),n&&n(l,u.target.value))},K=()=>{switch(R){case"sm":return"6px 12px";case"lg":return"12px 20px";default:return"10px 16px"}},D=()=>{switch(R){case"sm":return"13px";case"lg":return"16px";default:return X}},G=v?T:f?_:m,ne={width:"100%",padding:K(),paddingLeft:x?"40px":K().split(" ")[1],paddingRight:w||t==="password"?"40px":K().split(" ")[1],border:`1px solid ${G}`,borderRadius:M,backgroundColor:y,color:E,fontSize:D(),outline:"none",resize:t==="textarea"&&!N?"none":void 0,...h};return e.jsxs("div",{style:{width:"100%",fontFamily:"sans-serif"},className:k,children:[a&&e.jsxs("label",{htmlFor:l,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:A},children:[a," ",j&&e.jsx("span",{style:{color:T},children:"*"})]}),e.jsxs("div",{style:{position:"relative",width:"100%"},children:[x&&e.jsx("span",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"#6b7280"},children:x}),t==="textarea"?e.jsx("textarea",{ref:V,name:l,value:i??U,onChange:q,placeholder:r,rows:F,cols:Y,maxLength:$,disabled:d,readOnly:S,autoFocus:b,style:ne,onFocus:u=>{u.currentTarget.style.borderColor=C},onBlur:u=>{u.currentTarget.style.borderColor=G},onMouseEnter:u=>{u.currentTarget.style.borderColor=g},onMouseLeave:u=>{u.currentTarget.style.borderColor=G}}):e.jsx("input",{ref:V,id:l,name:l,type:t==="password"?z?"text":"password":t,value:i??U,onChange:q,placeholder:r,disabled:d,readOnly:S,autoFocus:b,style:ne,onFocus:u=>{u.currentTarget.style.borderColor=C},onBlur:u=>{u.currentTarget.style.borderColor=G},onMouseEnter:u=>{u.currentTarget.style.borderColor=g},onMouseLeave:u=>{u.currentTarget.style.borderColor=G}}),t==="password"&&e.jsx("button",{type:"button",onClick:()=>L(!z),style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:"#6b7280",cursor:"pointer",padding:0},children:z?e.jsx(Wt,{size:18}):e.jsx(Yt,{size:18})}),w&&t!=="password"&&e.jsx("span",{style:{position:"absolute",right:"12px",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"#6b7280"},children:w})]}),t==="textarea"&&J&&$&&e.jsxs("div",{style:{textAlign:"right",fontSize:"12px",color:"#6b7280",marginTop:"4px"},children:[(i??U).length,"/",$]}),v&&e.jsx("p",{style:{color:T,fontSize:"12px",marginTop:"4px",lineHeight:"1.3"},children:v})]})}),jr=({title:t,titleIcon:r,items:a,type:i="unordered",bulletColor:c="#2563eb",textColor:n="#111827",backgroundColor:l="#fff",borderColor:d="#e5e7eb",fontSize:S="15px",fontWeight:j=500,borderRadius:v="12px",padding:f="16px",spacing:b="12px",className:x,style:w})=>{const m=i==="ordered",C=i==="inline",g={backgroundColor:l,borderColor:d,color:n,borderWidth:d?"1px":"0px",borderStyle:"solid",borderRadius:v,padding:f,...w},y=C?{display:"flex",gap:b,paddingLeft:0,listStyleType:"none",margin:0}:{listStyleType:m?"decimal":"none",paddingLeft:m?"20px":"0",margin:0},E=m?"ol":"ul";return e.jsxs("div",{className:x,style:g,children:[t&&e.jsxs("div",{style:{display:"flex",alignItems:"center",fontSize:"17px",fontWeight:600,marginBottom:"10px",gap:"8px"},children:[r&&e.jsx("span",{style:{fontSize:"18px"},children:r}),e.jsx("span",{children:t})]}),e.jsx(E,{style:y,children:a.map((T,_)=>e.jsx(dt,{...T,bulletColor:c,textColor:n,fontSize:S,fontWeight:j,spacing:b,isInline:C},_))})]})},dt=({text:t,icon:r,onClick:a,subItems:i,bulletColor:c,textColor:n,fontSize:l,fontWeight:d,spacing:S,isInline:j})=>{const v={display:"flex",flexDirection:"column",gap:"6px",marginBottom:j?"0":S},f={display:"flex",alignItems:"center",gap:"8px",fontSize:l,fontWeight:d,color:n,cursor:a?"pointer":"default"},b={width:"8px",height:"8px",backgroundColor:c,borderRadius:"50%",flexShrink:0},x={listStyleType:"disc",paddingLeft:"20px",margin:0};return e.jsxs("li",{style:v,children:[e.jsxs("div",{style:f,onClick:a,children:[r?e.jsx("span",{style:{fontSize:"16px",color:n},children:r}):!j&&e.jsx("span",{style:b}),e.jsx("span",{children:t})]}),i&&i.length>0&&e.jsx("ul",{style:x,children:i.map((w,m)=>e.jsx(dt,{...w,bulletColor:c,textColor:n,fontSize:l,fontWeight:d,spacing:S,isInline:!1},m))})]})},Je=({tabs:t,defaultActive:r=0,tabPosition:a,activeTabClassName:i="",inactiveTabClassName:c="",tabContainerClassName:n="",contentContainerClassName:l="",className:d="",activeTabStyle:S,inactiveTabStyle:j,tabContainerStyle:v,contentContainerStyle:f,style:b,tabsWidth:x="240px",tabGap:w=8,tabPadding:m="12px 16px",tabBorderRadius:C=8,primaryColor:g="#2563eb",textColor:y="#374151",backgroundColor:E="#ffffff",hoverTextColor:T="#1e40af",disabledColor:_="#d1d5db",responsiveBreakpoint:A=768,showDrawerLabel:R="Select Tab",drawerIcon:M="☰",transitionDuration:X=200,onTabChange:F,role:Y="tablist",ariaOrientation:$="horizontal"})=>{const[N,J]=s.useState(r),[k,h]=s.useState(null),[I,V]=s.useState(!1),[U,o]=s.useState(!1);s.useEffect(()=>{if(typeof window>"u")return;const W=()=>{V(window.innerWidth<=A)};return W(),window.addEventListener("resize",W),()=>window.removeEventListener("resize",W)},[A]),s.useEffect(()=>{r>=0&&r<t.length&&J(r)},[r,t.length]);const z=W=>{t[W].disabled||(J(W),F?.(W))},L=a==="left"||a==="right",K={display:"flex",flexDirection:I?"column":L?a==="left"?"row":"row-reverse":"column",width:"100%",height:"100%",backgroundColor:E,...b},D={width:I?"100%":L?x:"100%",display:"flex",flexDirection:I||L?"column":"row",gap:w,padding:I?"0":"8px",boxSizing:"border-box",overflowX:I?"hidden":"visible",...v},G={flexGrow:1,padding:I?"16px":"24px",background:"#f9fafb",boxSizing:"border-box",minWidth:0,width:I?"100%":L?`calc(100% - ${x})`:"100%",...f},ne={cursor:"pointer",display:"flex",alignItems:"center",gap:8,padding:m,borderRadius:C,border:"none",backgroundColor:"transparent",fontWeight:500,transition:`all ${X}ms ease`,width:I||L?"100%":"auto",marginBottom:I||L?w:0,marginRight:!L&&!I?w:0,justifyContent:"flex-start",textAlign:"left",fontSize:I?"14px":"inherit"},u={backgroundColor:g,color:"#fff",fontWeight:600,boxShadow:`0 2px 10px ${g}33`,...S},O={backgroundColor:"transparent",color:y,...j},p={backgroundColor:`${g}11`,color:T},B={cursor:"not-allowed",color:_,opacity:.7},Q={...ne,...u,justifyContent:"space-between",width:"100%",marginBottom:w,fontSize:"16px"};return e.jsxs("div",{className:`react-tabs ${d}`,style:K,role:Y,"aria-orientation":I||L?"vertical":$,children:[e.jsx("style",{children:`
|
|
192
|
-
.react-tabs {
|
|
193
|
-
--primary-color: ${g};
|
|
194
|
-
--text-color: ${y};
|
|
195
|
-
--bg-color: ${E};
|
|
196
|
-
--hover-color: ${T};
|
|
197
|
-
--disabled-color: ${_};
|
|
198
|
-
--transition-duration: ${X}ms;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.react-tabs__mobile-drawer {
|
|
202
|
-
display: flex;
|
|
203
|
-
flex-direction: column;
|
|
204
|
-
gap: ${w}px;
|
|
205
|
-
width: 100%;
|
|
206
|
-
animation: react-tabs-slideDown ${X}ms ease-out;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
@keyframes react-tabs-slideDown {
|
|
210
|
-
from { opacity: 0; transform: translateY(-10px); }
|
|
211
|
-
to { opacity: 1; transform: translateY(0); }
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.react-tabs [role="tab"][aria-selected="true"] {
|
|
215
|
-
background-color: var(--primary-color);
|
|
216
|
-
color: white;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.react-tabs [role="tabpanel"] {
|
|
220
|
-
outline: none;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
@media (max-width: ${A}px) {
|
|
224
|
-
.react-tabs__drawer-button {
|
|
225
|
-
width: 100%;
|
|
226
|
-
display: flex;
|
|
227
|
-
justify-content: space-between;
|
|
228
|
-
align-items: center;
|
|
229
|
-
padding: ${m};
|
|
230
|
-
border-radius: ${C}px;
|
|
231
|
-
margin-bottom: ${w}px;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.react-tabs__nav {
|
|
235
|
-
padding: 0;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.react-tabs__content {
|
|
239
|
-
padding: 16px;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
`}),I?e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>o(!U),style:Q,className:"react-tabs__drawer-button","aria-expanded":U,"aria-controls":"mobile-tabs-drawer","aria-haspopup":"true",children:[e.jsx("span",{children:R}),e.jsx("span",{children:M})]}),U&&e.jsx("div",{id:"mobile-tabs-drawer",className:"react-tabs__mobile-drawer",role:"menu",children:t.map((W,Z)=>{const re=Z===N,ie=k===Z,se=W.disabled;return e.jsxs("button",{onClick:()=>{z(Z),o(!1)},onMouseEnter:()=>!se&&h(Z),onMouseLeave:()=>h(null),className:re?i:c,style:{...ne,...re?u:O,...ie&&!re&&!se?p:{},...se?B:{}},role:"menuitemradio","aria-checked":re,"aria-disabled":se,"aria-label":W.ariaLabel||(typeof W.label=="string"?W.label:`Tab ${Z+1}`),disabled:se,children:[W.icon&&e.jsx("span",{"aria-hidden":"true",children:W.icon}),e.jsx("span",{children:W.label})]},Z)})})]}):e.jsx("nav",{className:`react-tabs__nav ${n}`,style:D,role:Y,"aria-label":"Tabs Navigation",children:t.map((W,Z)=>{const re=Z===N,ie=k===Z,se=W.disabled;return e.jsxs("button",{onClick:()=>z(Z),onMouseEnter:()=>!se&&h(Z),onMouseLeave:()=>h(null),className:re?i:c,style:{...ne,...re?u:O,...ie&&!re&&!se?p:{},...se?B:{}},role:"tab","aria-selected":re,"aria-disabled":se,"aria-controls":`tabpanel-${Z}`,id:`tab-${Z}`,tabIndex:re?0:-1,disabled:se,children:[W.icon&&e.jsx("span",{"aria-hidden":"true",children:W.icon}),e.jsx("span",{children:W.label})]},Z)})}),e.jsx("section",{className:`react-tabs__content ${l}`,style:G,role:"tabpanel",id:`tabpanel-${N}`,"aria-labelledby":`tab-${N}`,tabIndex:0,children:t[N]?.content})]})},ut=t=>e.jsx(Je,{...t,tabPosition:"left",ariaOrientation:"vertical"}),pt=t=>e.jsx(Je,{...t,tabPosition:"top"}),ft=t=>e.jsx(Je,{...t,tabPosition:"right",ariaOrientation:"vertical"}),kr={Left:ut,Top:pt,Right:ft},Sr=({src:t,poster:r,title:a,autoPlay:i=!1,loop:c=!1,muted:n=!1,width:l="100%",height:d="400px",borderRadius:S="16px",theme:j="dark",primaryColor:v="#3b82f6",className:f,showProgress:b=!0,showVolumeSlider:x=!0,showSettings:w=!0,showDownload:m=!0,showShare:C=!0,showPiP:g=!0,showSubtitles:y=!1,showPlaybackSpeed:E=!0,showQuality:T=!0,previewThumbnails:_=!1,customControls:A=!0,hideControlsDelay:R=3e3,seekStep:M=10,volumeStep:X=.1,onPlay:F,onPause:Y,onEnded:$,onTimeUpdate:N,onVolumeChange:J})=>{const k=s.useRef(null),h=s.useRef(null),I=s.useRef(null),V=s.useRef(0),[U,o]=s.useState(i),[z,L]=s.useState(0),[q,K]=s.useState(0),[D,G]=s.useState(n?0:.8),[ne,u]=s.useState(n),[O,p]=s.useState(!1),[B,Q]=s.useState(!1),[W,Z]=s.useState(c),[re,ie]=s.useState(1),[se,ce]=s.useState("auto"),[fe,xe]=s.useState(!0),[he,ye]=s.useState(!1),[pe,ge]=s.useState(!1),[we,je]=s.useState(!1),[de,Te]=s.useState(0),[Re,$e]=s.useState(!1),[Ye,ke]=s.useState(0),ee={dark:{background:"linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%)",controlsBg:"rgba(0, 0, 0, 0.8)",text:"#ffffff",textSecondary:"#a3a3a3",border:"rgba(255, 255, 255, 0.1)",hover:"rgba(255, 255, 255, 0.1)"},light:{background:"linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%)",controlsBg:"rgba(255, 255, 255, 0.95)",text:"#212529",textSecondary:"#6c757d",border:"rgba(0, 0, 0, 0.1)",hover:"rgba(0, 0, 0, 0.05)"},glass:{background:"rgba(255, 255, 255, 0.1)",controlsBg:"rgba(255, 255, 255, 0.1)",text:"#ffffff",textSecondary:"#a3a3a3",border:"rgba(255, 255, 255, 0.2)",hover:"rgba(255, 255, 255, 0.2)"},neon:{background:"linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 100%)",controlsBg:"rgba(139, 69, 19, 0.8)",text:"#00ffff",textSecondary:"#ff00ff",border:"rgba(0, 255, 255, 0.3)",hover:"rgba(255, 0, 255, 0.2)"}}[j],Me=s.useCallback(()=>{typeof window>"u"||(V.current&&clearTimeout(V.current),V.current=window.setTimeout(()=>{U&&xe(!1)},R))},[U,R]),Ie=s.useCallback(()=>{xe(!0),Me()},[Me]);s.useEffect(()=>{k.current&&(k.current.volume=D,k.current.loop=W,k.current.muted=ne,k.current.playbackRate=re)},[D,W,ne,re]),s.useEffect(()=>{U?Me():(V.current&&clearTimeout(V.current),xe(!0))},[U,Me]);const Ce=()=>{k.current&&(U?(k.current.pause(),o(!1),Y?.()):(k.current.play().catch(console.error),o(!0),F?.()))},Pe=()=>{if(!k.current)return;const P=k.current.currentTime,le=k.current.duration;L(P),K(le),N?.(P)},H=P=>{if(!k.current||!I.current)return;const le=I.current.getBoundingClientRect(),Se=(P.clientX-le.left)/le.width*q;k.current.currentTime=Se,L(Se)},oe=P=>{if(!I.current)return;const le=I.current.getBoundingClientRect(),Se=(P.clientX-le.left)/le.width*q;Te(Se),ke(P.clientX-le.left),$e(!0)},ue=P=>{k.current&&(k.current.currentTime=Math.min(Math.max(0,k.current.currentTime+P),q))},be=P=>{const le=Math.min(Math.max(P,0),1);G(le),u(le===0),J?.(le)},me=async()=>{if(h.current)try{O?document.exitFullscreen&&await document.exitFullscreen():h.current.requestFullscreen&&await h.current.requestFullscreen(),p(!O)}catch(P){console.error("Fullscreen error:",P)}},Ae=async()=>{if(k.current)try{B?document.exitPictureInPicture&&await document.exitPictureInPicture():k.current.requestPictureInPicture&&await k.current.requestPictureInPicture(),Q(!B)}catch(P){console.error("Picture-in-Picture error:",P)}},He=()=>{const P=document.createElement("a");P.href=t,P.download=a||"video",P.click()},yt=async()=>{if(!(typeof window>"u")&&navigator)try{const P=window.location.href;navigator.share?await navigator.share({title:a||"Video",url:P}):navigator.clipboard?(await navigator.clipboard.writeText(P),console.log("URL copied to clipboard!")):console.warn("Share API and Clipboard API not supported in this browser.")}catch(P){console.error("Share error:",P)}},Xe=P=>{if(!P||isNaN(P))return"0:00";const le=Math.floor(P/3600),ze=Math.floor(P%3600/60),Se=Math.floor(P%60);return le>0?`${le}:${ze.toString().padStart(2,"0")}:${Se.toString().padStart(2,"0")}`:`${ze}:${Se.toString().padStart(2,"0")}`},mt=()=>ne||D===0?e.jsx(We,{size:18}):D<.3?e.jsx(We,{size:18}):D<.7?e.jsx(br,{size:18}):e.jsx(Ge,{size:18});return s.useEffect(()=>()=>{V.current&&clearTimeout(V.current)},[]),e.jsxs("div",{ref:h,className:f,style:{position:"relative",width:l,height:d,background:ee.background,borderRadius:S,overflow:"hidden",boxShadow:j==="glass"?"inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 32px rgba(0, 0, 0, 0.3)":"0 10px 30px rgba(0, 0, 0, 0.3)",backdropFilter:j==="glass"?"blur(16px)":"none",userSelect:"none",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},onMouseMove:Ie,onMouseLeave:()=>xe(!1),children:[e.jsx("video",{ref:k,src:t,poster:r,autoPlay:i,loop:c,muted:n,controls:!1,onClick:Ce,onTimeUpdate:Pe,onLoadedMetadata:Pe,onWaiting:()=>je(!0),onCanPlay:()=>je(!1),onEnded:()=>{o(!1),$?.()},style:{width:"100%",height:"100%",objectFit:"cover",backgroundColor:"#000"}}),we&&e.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:ee.text,animation:"spin 1s linear infinite"},children:e.jsx(Gt,{size:48})}),!U&&!we&&e.jsx("button",{onClick:Ce,style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",background:`${v}CC`,borderRadius:"50%",border:"none",padding:"24px",cursor:"pointer",color:"#fff",backdropFilter:"blur(10px)",transition:"all 0.3s ease",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.3)"},onMouseEnter:P=>{P.currentTarget.style.transform="translate(-50%, -50%) scale(1.1)",P.currentTarget.style.background=v},onMouseLeave:P=>{P.currentTarget.style.transform="translate(-50%, -50%) scale(1)",P.currentTarget.style.background=`${v}CC`},children:e.jsx(Le,{size:32})}),a&&fe&&e.jsx("div",{style:{position:"absolute",top:"16px",left:"16px",right:"16px",color:ee.text,fontSize:"18px",fontWeight:"600",textShadow:"0 2px 4px rgba(0, 0, 0, 0.8)",opacity:fe?1:0,transition:"opacity 0.3s ease"},children:a}),A&&e.jsxs("div",{style:{position:"absolute",bottom:0,left:0,right:0,background:ee.controlsBg,backdropFilter:"blur(10px)",color:ee.text,padding:"16px",transform:fe?"translateY(0)":"translateY(100%)",transition:"transform 0.3s ease"},children:[b&&e.jsxs("div",{style:{marginBottom:"12px",position:"relative"},children:[e.jsx("div",{ref:I,onClick:H,onMouseMove:oe,onMouseLeave:()=>$e(!1),style:{height:"6px",background:"rgba(255, 255, 255, 0.2)",borderRadius:"3px",cursor:"pointer",position:"relative",overflow:"visible"},children:e.jsx("div",{style:{width:`${z/q*100||0}%`,height:"100%",background:v,borderRadius:"3px",position:"relative"},children:e.jsx("div",{style:{position:"absolute",right:"-6px",top:"50%",width:"12px",height:"12px",background:v,borderRadius:"50%",transform:"translateY(-50%)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.3)"}})})}),Re&&_&&e.jsx("div",{style:{position:"absolute",bottom:"12px",left:`${Ye}px`,transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.9)",color:"#fff",padding:"4px 8px",borderRadius:"4px",fontSize:"12px",whiteSpace:"nowrap"},children:Xe(de)})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"12px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("button",{onClick:()=>ue(-M),style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(Oe,{size:20})}),e.jsx("button",{onClick:Ce,style:{background:v,borderRadius:"50%",padding:"12px",color:"#fff",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},children:U?e.jsx(Be,{size:20}):e.jsx(Le,{size:20})}),e.jsx("button",{onClick:()=>ue(M),style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(Fe,{size:20})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},children:[e.jsx("button",{onClick:()=>u(!ne),onMouseEnter:()=>x&&ge(!0),style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(mt,{})}),x&&e.jsx("div",{onMouseEnter:()=>ge(!0),onMouseLeave:()=>ge(!1),style:{position:pe?"relative":"absolute",left:pe?"0":"40px",bottom:pe?"0":"40px",width:pe?"80px":"30px",height:pe?"6px":"80px",background:"rgba(255, 255, 255, 0.2)",borderRadius:"3px",cursor:"pointer",opacity:pe?1:0,transition:"all 0.3s ease"},onClick:P=>{const le=P.currentTarget.getBoundingClientRect(),ze=(P.clientX-le.left)/le.width;be(ze)},children:e.jsx("div",{style:{width:`${D*100}%`,height:"100%",background:v,borderRadius:"3px"}})})]}),e.jsxs("div",{style:{fontSize:"14px",color:ee.textSecondary,minWidth:"100px"},children:[Xe(z)," / ",Xe(q)]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[y&&e.jsx("button",{style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(Ct,{size:18})}),w&&e.jsx("button",{onClick:()=>ye(!he),style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(or,{size:18})}),m&&e.jsx("button",{onClick:He,style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(Ot,{size:18})}),C&&e.jsx("button",{onClick:yt,style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(ar,{size:18})}),g&&e.jsx("button",{onClick:Ae,style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(tr,{size:18})}),e.jsx("button",{onClick:()=>Z(!W),style:{background:"none",border:"none",color:W?v:ee.text,cursor:"pointer",padding:"8px"},children:e.jsx(qe,{size:18})}),e.jsx("button",{onClick:me,style:{background:"none",border:"none",color:ee.text,cursor:"pointer",padding:"8px"},children:O?e.jsx(ct,{size:18}):e.jsx(lt,{size:18})})]})]})]}),he&&e.jsxs("div",{style:{position:"absolute",bottom:"80px",right:"16px",background:ee.controlsBg,backdropFilter:"blur(10px)",borderRadius:"12px",padding:"16px",minWidth:"200px",color:ee.text,border:`1px solid ${ee.border}`,opacity:he?1:0,transform:he?"translateY(0)":"translateY(10px)",transition:"all 0.3s ease"},children:[E&&e.jsxs("div",{style:{marginBottom:"12px"},children:[e.jsx("div",{style:{fontSize:"14px",marginBottom:"8px",color:ee.textSecondary},children:"Playback Speed"}),e.jsx("div",{style:{display:"flex",gap:"4px",flexWrap:"wrap"},children:[.25,.5,.75,1,1.25,1.5,1.75,2].map(P=>e.jsxs("button",{onClick:()=>ie(P),style:{background:re===P?v:"transparent",border:`1px solid ${ee.border}`,borderRadius:"6px",padding:"4px 8px",color:ee.text,cursor:"pointer",fontSize:"12px"},children:[P,"x"]},P))})]}),T&&e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"14px",marginBottom:"8px",color:ee.textSecondary},children:"Quality"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:["auto","1080p","720p","480p","360p"].map(P=>e.jsx("button",{onClick:()=>ce(P),style:{background:se===P?v:"transparent",border:"none",borderRadius:"6px",padding:"8px",color:ee.text,cursor:"pointer",fontSize:"12px",textAlign:"left"},children:P},P))})]})]}),e.jsx("style",{children:`
|
|
243
|
-
@keyframes spin {
|
|
244
|
-
from { transform: rotate(0deg); }
|
|
245
|
-
to { transform: rotate(360deg); }
|
|
246
|
-
}
|
|
247
|
-
`})]})},Tr=({src:t,thumbnail:r,autoPlay:a=!1,loop:i=!1,backgroundColor:c="#000000",primaryColor:n="#10b981",secondaryColor:l="#ffffff",borderRadius:d="12px",padding:S="16px",width:j="100%",className:v})=>{const f=s.useRef(null),b=s.useRef(null),[x,w]=s.useState(a),[m,C]=s.useState(0),[g,y]=s.useState(0),[E,T]=s.useState(.5),[_,A]=s.useState(!1),[R,M]=s.useState(i);s.useEffect(()=>{f.current&&(f.current.volume=E)},[E]),s.useEffect(()=>{f.current&&(f.current.loop=R)},[R]);const X=()=>{f.current&&(x?f.current.pause():f.current.play(),w(!x))},F=()=>{f.current&&(C(f.current.currentTime),y(f.current.duration))},Y=k=>{if(!f.current||!k.currentTarget)return;const h=k.currentTarget.getBoundingClientRect(),V=(k.clientX-h.left)/h.width*g;f.current.currentTime=V,C(V)},$=k=>{f.current&&(f.current.currentTime+=k)},N=()=>{b.current&&(_?document.exitFullscreen?.():b.current.requestFullscreen?.(),A(!_))},J=k=>{const h=Math.floor(k/60),I=Math.floor(k%60);return`${h}:${I<10?"0":""}${I}`};return e.jsxs("div",{ref:b,className:v,style:{position:"relative",width:j,backgroundColor:c,borderRadius:d,color:l,boxShadow:"0 4px 12px rgba(0,0,0,0.3)",overflow:"hidden",padding:S,boxSizing:"border-box",maxWidth:"100%"},children:[e.jsx("audio",{ref:f,src:t,autoPlay:a,loop:i,onTimeUpdate:F,onLoadedMetadata:F}),r&&e.jsx("img",{src:r,alt:"Audio Thumbnail",style:{width:"100%",objectFit:"cover",borderRadius:d,marginBottom:"16px",maxHeight:"150px"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"10px",flexShrink:0,marginTop:"10px"},children:[e.jsx("button",{onClick:()=>$(-10),"aria-label":"Skip Back 10s",children:e.jsx(Oe,{size:20})}),e.jsx("button",{onClick:X,style:{background:n,borderRadius:"9999px",padding:"10px",color:"#fff",border:"none",cursor:"pointer"},"aria-label":x?"Pause":"Play",children:x?e.jsx(Be,{size:20}):e.jsx(Le,{size:20})}),e.jsx("button",{onClick:()=>$(10),"aria-label":"Skip Forward 10s",children:e.jsx(Fe,{size:20})})]}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:"12px",width:"100%"},children:[e.jsxs("div",{style:{flexShrink:0,minWidth:"60px",textAlign:"center"},children:[e.jsx("span",{style:{fontSize:"14px",marginRight:"4px"},children:J(m)}),e.jsxs("span",{style:{fontSize:"14px",color:"#aaa"},children:["/ ",J(g)]})]}),e.jsx("div",{onClick:Y,style:{flex:1,height:"8px",background:"#444",borderRadius:"4px",cursor:"pointer",position:"relative",minWidth:"100px"},children:e.jsx("div",{style:{width:`${m/g*100||0}%`,height:"100%",background:n,borderRadius:"4px"}})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",flexShrink:0},children:[e.jsx("button",{onClick:()=>M(!R),"aria-label":"Toggle Loop",children:e.jsx(qe,{size:18,color:R?n:void 0})}),e.jsx("button",{onClick:()=>T(E>0?0:.5),"aria-label":"Toggle Mute",children:E>0?e.jsx(Ge,{size:18}):e.jsx(We,{size:18})}),e.jsx("button",{onClick:N,"aria-label":"Toggle Fullscreen",children:_?e.jsx(ct,{size:18}):e.jsx(lt,{size:18})})]})]})]})};function ae(t,r,a){return t==null?a:typeof t!="object"?t:t[r]??a}const rt=t=>t<768?"sm":t<1024?"md":"lg",Rr=({display:t={sm:"block",md:"flex",lg:"grid"},flexDirection:r={sm:"column",md:"row",lg:"row"},justifyContent:a={sm:"flex-start",md:"center",lg:"space-between"},alignItems:i={sm:"stretch",md:"center",lg:"center"},gridTemplateColumns:c={sm:"1fr",md:"1fr 1fr",lg:"1fr 1fr 1fr"},gridTemplateRows:n={sm:"auto",md:"auto",lg:"auto"},gap:l={sm:"10px",md:"20px",lg:"30px"},rowGap:d,columnGap:S,width:j={sm:"100%",md:"90%",lg:"80%"},maxWidth:v={sm:"100%",md:"800px",lg:"1200px"},height:f={sm:"auto",md:"auto",lg:"auto"},padding:b={sm:"10px",md:"20px",lg:"40px"},margin:x={sm:"0 auto",md:"0 auto",lg:"0 auto"},textAlign:w={sm:"left",md:"center",lg:"center"},backgroundColor:m="#fff",border:C={sm:"none",md:"1px solid #ddd",lg:"2px solid #ccc"},borderRadius:g={sm:"0",md:"8px",lg:"12px"},boxShadow:y={sm:"none",md:"0 4px 6px rgba(0,0,0,0.1)",lg:"0 6px 10px rgba(0,0,0,0.15)"},overflow:E={sm:"visible",md:"hidden",lg:"auto"},children:T,className:_,style:A})=>{const[R,M]=s.useState("lg");s.useEffect(()=>{M(rt(window.innerWidth));const F=()=>M(rt(window.innerWidth));return window.addEventListener("resize",F),()=>window.removeEventListener("resize",F)},[]);const X=s.useMemo(()=>{const F=ae(t,R,"block"),Y=ae(r,R,void 0),$=ae(a,R,void 0),N=ae(i,R,void 0),J=ae(c,R,void 0),k=ae(n,R,void 0),h=ae(l,R,void 0),I=ae(d,R,void 0),V=ae(S,R,void 0),U=ae(j,R,"100%"),o=ae(v,R,void 0),z=ae(f,R,void 0),L=ae(b,R,void 0),q=ae(x,R,void 0),K=ae(w,R,void 0),D=ae(C,R,void 0),G=ae(g,R,void 0),ne=ae(y,R,void 0),u=ae(E,R,void 0);return{display:F,...Y&&{flexDirection:Y},...$&&{justifyContent:$},...N&&{alignItems:N},...J&&{gridTemplateColumns:J},...k&&{gridTemplateRows:k},...h&&{gap:h},...I&&{rowGap:I},...V&&{columnGap:V},width:U,...o&&{maxWidth:o},...z&&{height:z},...L&&{padding:L},...q&&{margin:q},...K&&{textAlign:K},backgroundColor:m,...D&&{border:D},...G&&{borderRadius:G},...ne&&{boxShadow:ne},...u&&{overflow:u},boxSizing:"border-box",...A}},[R,t,r,a,i,c,n,l,d,S,j,v,f,b,x,w,m,C,g,y,E,A]);return e.jsx("div",{className:_,style:X,children:T})},$r=({items:t,allowMultiple:r=!1,defaultOpenIndex:a=[],borderColor:i="#d1d5db",backgroundColor:c="#ffffff",textColor:n="#111827",hoverBgColor:l="#f3f4f6",hoverTextColor:d="#111827",paddingVertical:S="16px",paddingHorizontal:j="16px",margin:v="12px 0",iconOpen:f="−",iconClose:b="+",transitionDuration:x="300ms",borderRadius:w="8px",shadow:m="0 2px 8px rgba(0, 0, 0, 0.05)",contentPadding:C="16px",fontSize:g="16px",fontWeight:y="600",iconSize:E="18px",contentFontSize:T="14px",contentFontWeight:_="400",contentBackgroundColor:A="#ffffff",contentTextColor:R="#111827",className:M,style:X})=>{const[F,Y]=s.useState(a),$=s.useRef([]),N=s.useRef([]);s.useEffect(()=>{$.current.forEach((k,h)=>{k&&(k.style.maxHeight=F.includes(h)?`${k.scrollHeight}px`:"0px")})},[F]);const J=k=>{Y(h=>r?h.includes(k)?h.filter(I=>I!==k):[...h,k]:h.includes(k)?[]:[k])};return e.jsx("div",{className:M,style:{width:"100%",...X},children:t.map((k,h)=>e.jsxs("div",{style:{border:`1px solid ${i}`,borderRadius:w,margin:v,boxShadow:m,overflow:"hidden",transition:`all ${x} ease`},children:[e.jsxs("button",{ref:I=>{N.current[h]=I},onClick:()=>J(h),style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:c,color:n,padding:`${S} ${j}`,fontWeight:y,fontSize:g,cursor:"pointer",outline:"none",border:"none",transition:`all ${x}`},onMouseEnter:I=>{I.currentTarget.style.backgroundColor=l,I.currentTarget.style.color=d},onMouseLeave:I=>{I.currentTarget.style.backgroundColor=c,I.currentTarget.style.color=n},children:[e.jsx("span",{children:k.title}),e.jsx("span",{style:{fontSize:E},children:F.includes(h)?f:b})]}),e.jsx("div",{ref:I=>{$.current[h]=I},style:{overflow:"hidden",maxHeight:F.includes(h)?`${$.current[h]?.scrollHeight}px`:"0px",transition:`max-height ${x} ease-in-out`},children:e.jsx("div",{style:{borderTop:`1px solid ${i}`,backgroundColor:A,color:R,padding:C,fontSize:T,fontWeight:_},children:k.content})})]},h))})},zr=({type:t,name:r,options:a,selectedValues:i,onChange:c,disabled:n=!1,readOnly:l=!1,required:d=!1,error:S,className:j="",customIcon:v,style:f,labelStyle:b,iconSize:x=20,iconCheckedBgColor:w="#2563eb",iconUncheckedBorderColor:m="#9ca3af",textColor:C="#374151",errorStyle:g})=>{const y=t==="checkbox",E=T=>{if(c)if(y){const _=Array.isArray(i)?i.includes(T)?i.filter(A=>A!==T):[...i,T]:[T];c(_)}else c(T)};return e.jsxs("div",{className:j,style:{display:"flex",flexDirection:"column",gap:8,...f},role:t,"aria-disabled":n,children:[a.map(T=>{const _=y?Array.isArray(i)&&i.includes(T.value):i===T.value;return e.jsxs("label",{style:{display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",opacity:n?.6:1,gap:8,userSelect:"none",...b},children:[e.jsx("input",{type:t,name:r,value:T.value,checked:_,disabled:n||l,required:d,onChange:()=>E(T.value),style:{display:"none"}}),v?v(_):e.jsxs("span",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:x,height:x,borderRadius:y?4:"50%",border:`2px solid ${_?w:m}`,backgroundColor:_?w:"transparent",transition:"all 0.2s ease",flexShrink:0},children:[_&&!y&&e.jsx("span",{style:{width:x/2,height:x/2,borderRadius:"50%",backgroundColor:"white"}}),_&&y&&e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",style:{width:x*.6,height:x*.6},children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})]}),e.jsx("span",{style:{color:C,fontSize:14},children:T.label})]},T.value)}),S&&e.jsx("p",{role:"alert",style:{color:"#dc2626",fontSize:12,marginTop:4,...g},children:S})]})},Mr=({label:t="Open Drawer",icon:r,iconPosition:a="left",onClick:i,style:c={}})=>e.jsxs("button",{onClick:i,style:{padding:"10px 16px",backgroundColor:"#2563eb",color:"#fff",border:"none",borderRadius:"6px",cursor:"pointer",display:"inline-flex",alignItems:"center",fontSize:"14px",gap:"8px",...c},children:[r&&a==="left"&&r,t,r&&a==="right"&&r]}),Ir=({open:t,onClose:r,position:a="right",width:i="300px",height:c="300px",backgroundColor:n="#fff",transitionDuration:l=300,style:d={},children:S,showCloseButton:j=!0,closeButtonStyle:v={}})=>{const[f,b]=s.useState(t);s.useEffect(()=>{t?b(!0):setTimeout(()=>b(!1),l)},[t,l]);const x=s.useMemo(()=>{if(t)return"translate(0, 0)";switch(a){case"left":return"translateX(-100%)";case"right":return"translateX(100%)";case"top":return"translateY(-100%)";case"bottom":return"translateY(100%)";default:return"translate(0, 0)"}},[t,a]),w={position:"fixed",zIndex:1e3,backgroundColor:n,transition:`transform ${l}ms ease, opacity ${l}ms ease`,transform:x,opacity:t?1:0,...d,...a==="left"||a==="right"?{top:0,[a]:0,width:i,height:"100%"}:{left:0,[a]:0,height:c,width:"100%"}},m={position:"fixed",display:f?"block":"none",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:999,transition:`opacity ${l}ms ease`,opacity:t?1:0,pointerEvents:t?"auto":"none"},C={position:"absolute",top:"10px",right:"10px",fontSize:"20px",background:"none",border:"none",cursor:"pointer",color:"#000"};return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:m,onClick:r}),e.jsxs("div",{style:{...w,display:"block",visibility:f?"visible":"hidden",pointerEvents:t?"auto":"none"},children:[j&&e.jsx("button",{onClick:r,style:{...C,...v},children:e.jsx(De,{size:20,color:"rgba(255, 0, 0, 1)"})}),S]})]})},Cr=({options:t,value:r,defaultValue:a,onChange:i,placeholder:c="Select an option",disabled:n=!1,searchable:l=!1,multiSelect:d=!1,clearable:S=!1,virtualized:j=!1,optionHeight:v=36,visibleOptions:f=5,width:b="100%",height:x="auto",borderColor:w="#d1d5db",focusBorderColor:m="#2563eb",errorBorderColor:C="#dc2626",backgroundColor:g="#ffffff",textColor:y="#111827",placeholderColor:E="#9ca3af",hoverColor:T="#f3f4f6",selectedColor:_="#eff6ff",disabledColor:A="#f3f4f6",padding:R="0.5rem 0.75rem",margin:M="0",borderRadius:X="0.375rem",boxShadow:F="0 1px 2px 0 rgba(0, 0, 0, 0.05)",optionPadding:Y="0.5rem 0.75rem",optionGap:$="0.5rem",transitionDuration:N="200ms",dropdownMaxHeight:J="300px",dropdownMinWidth:k="100%",className:h="",dropdownClassName:I="",optionClassName:V="",inputClassName:U="",style:o,dropdownStyle:z,optionStyle:L,inputStyle:q,iconPrefix:K,iconSuffix:D,clearIcon:G="×",dropdownIcon:ne="▼",checkIcon:u="✓",ariaLabel:O,ariaLabelledby:p,ariaDescribedby:B,onFocus:Q,onBlur:W,onOpen:Z,onClose:re})=>{const[ie,se]=s.useState([]),[ce,fe]=s.useState(!1),[xe,he]=s.useState(""),[ye,pe]=s.useState(null),ge=s.useRef(null),we=s.useRef(null),je=s.useRef([]);s.useEffect(()=>{se(r?d?r.split(","):[r]:a?d?a.split(","):[a]:[])},[r,a,d]);const de=l?t.filter(H=>H.label.toLowerCase().includes(xe.toLowerCase())):t;s.useEffect(()=>{const H=oe=>{ge.current&&!ge.current.contains(oe.target)&&(fe(!1),re?.())};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[re]),s.useEffect(()=>{const H=oe=>{if(ce)switch(oe.key){case"ArrowDown":oe.preventDefault(),pe(ue=>{const be=ue===null?0:Math.min(ue+1,de.length-1);return Te(be),be});break;case"ArrowUp":oe.preventDefault(),pe(ue=>{const be=ue===null?0:Math.max(ue-1,0);return Te(be),be});break;case"Enter":oe.preventDefault(),ye!==null&&Re(de[ye].value);break;case"Escape":oe.preventDefault(),fe(!1),re?.();break;case"Tab":fe(!1),re?.();break}};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[ce,ye,de]);const Te=s.useCallback(H=>{je.current[H]?.scrollIntoView({block:"nearest",behavior:"smooth"})},[]),Re=H=>{let oe;d?oe=ie.includes(H)?ie.filter(ue=>ue!==H):[...ie,H]:(oe=[H],fe(!1),re?.()),se(oe),i?.(d?oe.join(","):H)},$e=H=>{H.stopPropagation(),se([]),i?.(""),he("")},Ye=()=>{if(n)return;const H=!ce;fe(H),H?(Z?.(),l&&setTimeout(()=>we.current?.focus(),0)):re?.()},ke=t.find(H=>H.value===ie[0]),Ve=t.filter(H=>ie.includes(H.value)),[ee,Me]=s.useState(0),Ie=Math.min(f,de.length),Ce=Math.min(ee+Ie,de.length),Pe=j?de.slice(ee,Ce):de;return e.jsxs("div",{ref:ge,className:`dropdown-container ${h}`,style:{position:"relative",width:b,margin:M,fontFamily:"'Inter', sans-serif",...o},children:[e.jsx("style",{children:`
|
|
248
|
-
.dropdown-container {
|
|
249
|
-
--border-color: ${w};
|
|
250
|
-
--focus-border-color: ${m};
|
|
251
|
-
--error-border-color: ${C};
|
|
252
|
-
--bg-color: ${g};
|
|
253
|
-
--text-color: ${y};
|
|
254
|
-
--placeholder-color: ${E};
|
|
255
|
-
--hover-color: ${T};
|
|
256
|
-
--selected-color: ${_};
|
|
257
|
-
--disabled-color: ${A};
|
|
258
|
-
--transition-duration: ${N};
|
|
259
|
-
}
|
|
260
|
-
`}),e.jsxs("div",{role:"button",onClick:Ye,"aria-disabled":n,"aria-haspopup":"listbox","aria-expanded":ce,"aria-label":O,"aria-labelledby":p,"aria-describedby":B,className:`dropdown-control ${U}`,style:{width:"100%",minHeight:x,padding:R,backgroundColor:n?A:g,color:y,borderWidth:"1px",borderStyle:"solid",borderColor:ce?m:w,borderRadius:X,boxShadow:F,display:"flex",alignItems:"center",justifyContent:"space-between",cursor:n?"not-allowed":"pointer",opacity:n?.7:1,transition:`all ${N} ease-in-out`,textAlign:"left",...q,...ce&&{boxShadow:`0 0 0 1px ${m}`}},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:$,flex:1,overflow:"hidden"},children:[K&&e.jsx("span",{className:"dropdown-icon-prefix",style:{flexShrink:0},children:K}),d?e.jsx("div",{style:{display:"flex",gap:"0.25rem",flexWrap:"wrap",flex:1,overflow:"hidden"},children:Ve.length>0?Ve.map(H=>e.jsxs("span",{style:{backgroundColor:_,padding:"0.25rem 0.5rem",borderRadius:"0.25rem",fontSize:"0.875rem",display:"flex",alignItems:"center",gap:"0.25rem",flexShrink:0},children:[H.icon&&e.jsx("span",{style:{flexShrink:0},children:H.icon}),e.jsx("span",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:H.label})]},H.value)):e.jsx("span",{style:{color:E},children:c})}):e.jsxs("span",{style:{color:ke?y:E,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:$},children:[ke?.icon&&e.jsx("span",{style:{flexShrink:0},children:ke.icon}),ke?ke.label:c]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginLeft:"0.5rem",flexShrink:0},children:[S&&ie.length>0&&e.jsx("span",{onClick:$e,style:{cursor:n?"not-allowed":"pointer",fontSize:"1rem",color:y,opacity:.7,display:"flex",alignItems:"center",justifyContent:"center"},"aria-label":"Clear selection",children:G}),e.jsx("span",{style:{transition:`transform ${N}`,transform:ce?"rotate(180deg)":"rotate(0deg)",fontSize:"0.75rem",color:y,opacity:.7},children:ne})]})]}),ce&&e.jsxs("div",{className:`dropdown-menu ${I}`,style:{position:"absolute",top:"100%",left:0,zIndex:1e3,width:"100%",minWidth:k,maxHeight:J,overflowY:"auto",backgroundColor:g,border:`1px solid ${w}`,borderRadius:X,boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",marginTop:"0.25rem",transition:`opacity ${N}, transform ${N}`,opacity:0,transform:"translateY(-0.5rem)",animation:`dropdownFadeIn ${N} ease-out forwards`,...z},role:"listbox","aria-multiselectable":d,children:[l&&e.jsx("div",{style:{padding:"0.5rem",borderBottom:`1px solid ${w}`},children:e.jsx("input",{ref:we,type:"text",value:xe,onChange:H=>he(H.target.value),placeholder:"Search...",style:{width:"100%",padding:"0.5rem 0.75rem",borderWidth:"1px",borderStyle:"solid",color:y,borderColor:ce?m:w,borderRadius:"0.25rem",outline:"none",transition:`border-color ${N}`,...ce&&{boxShadow:`0 0 0 1px ${m}`}},onFocus:Q,onBlur:W})}),e.jsx("ul",{style:{margin:0,padding:"0.25rem 0",listStyle:"none"},children:de.length>0?Pe.map((H,oe)=>{const ue=ie.includes(H.value),be=ye===(j?ee+oe:oe),me=H.disabled;return e.jsxs("li",{ref:Ae=>{if(Ae){const He=j?ee+oe:oe;je.current[He]=Ae}},onClick:()=>!me&&Re(H.value),onMouseEnter:()=>!me&&pe(j?ee+oe:oe),className:`dropdown-option ${V} ${me?"disabled":""}`,style:{padding:Y,cursor:me?"not-allowed":"pointer",backgroundColor:ue?_:be?T:g,color:me?A:y,display:"flex",alignItems:"center",gap:$,transition:`background-color ${N}`,...L},role:"option","aria-selected":ue,"aria-disabled":me,children:[d&&e.jsx("span",{style:{flexShrink:0},children:ue?u:"○"}),H.icon&&e.jsx("span",{style:{flexShrink:0},children:H.icon}),e.jsx("span",{style:{flex:1},children:H.label})]},H.value)}):e.jsx("li",{style:{padding:Y,color:E,textAlign:"center"},children:"No options found"})}),j&&de.length>Ie&&e.jsx("div",{style:{height:`${(de.length-Ie)*v}px`}})]}),e.jsx("style",{children:`
|
|
261
|
-
@keyframes dropdownFadeIn {
|
|
262
|
-
to {
|
|
263
|
-
opacity: 1;
|
|
264
|
-
transform: translateY(0);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
`})]})},Er=({columns:t,data:r,className:a="",pagination:i=!0,rowsPerPage:c=5,colors:n={headerBg:"#3b82f6",headerText:"#ffffff",rowBg:"#ffffff",rowText:"#000000",borderColor:"#d1d5db",hoverBg:"#e5e7eb",paginationBg:"#d1d5db",paginationText:"#000000",evenRowBg:"#f9fafb",selectedRowBg:"#e0f2fe"},borderRadius:l={table:"8px",header:"8px",pagination:"6px"},sortable:d=!0,defaultSort:S,bodyAlign:j="left",headerAlign:v="left",rowSelection:f={enabled:!1},emptyState:b=e.jsx("div",{style:{padding:"20px",textAlign:"center"},children:"No data available"}),onRowClick:x,rowClassName:w,cellPadding:m="12px",headerCellPadding:C="12px",stickyHeader:g=!1,maxHeight:y,scrollShadow:E=!1})=>{const[T,_]=s.useState(S?.column||null),[A,R]=s.useState(S?.direction||"asc"),[M,X]=s.useState(1),[F,Y]=s.useState(null),[$,N]=s.useState([]),J=(u,O)=>{!d||!O||(T===u?R(A==="asc"?"desc":"asc"):(_(u),R("asc")),X(1))},k=u=>{const O=$.some(B=>B.id===u.id);let p;O?p=$.filter(B=>B.id!==u.id):p=[...$,u],N(p),f.onSelect?.(p)},h=()=>{$.length===V.length?(N([]),f.onSelect?.([])):(N([...V]),f.onSelect?.([...V]))},I=s.useMemo(()=>T?[...r].sort((u,O)=>{const p=u[T],B=O[T];if(p==null&&B==null)return 0;if(p==null)return A==="asc"?-1:1;if(B==null)return A==="asc"?1:-1;if(typeof p=="number"&&typeof B=="number")return A==="asc"?p-B:B-p;if(p instanceof Date&&B instanceof Date)return A==="asc"?p.getTime()-B.getTime():B.getTime()-p.getTime();const Q=String(p).toLowerCase(),W=String(B).toLowerCase();return Q===W?0:A==="asc"?Q>W?1:-1:Q<W?1:-1}):[...r],[r,T,A]),V=i?I.slice((M-1)*c,M*c):I,U=Math.ceil(r.length/c),o=u=>$.some(O=>O.id===u.id),z=e.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 576 512",height:"15px",width:"15px",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-224 0z"})}),L=e.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 576 512",height:"15px",width:"15px",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0c17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32z"})}),q=e.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 320 512",height:"15px",width:"15px",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:"M182.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L128 109.3l0 293.5L86.6 361.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 402.7l0-293.5 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96z"})}),K=e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("path",{d:"M9 12l2 2 4-4"})]}),D=e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("line",{x1:"8",y1:"12",x2:"16",y2:"12"})]}),G=$.length===V.length&&V.length>0,ne=$.length>0&&!G;return e.jsxs("div",{style:{overflowX:"auto",width:"100%",maxHeight:y,position:"relative",boxShadow:E?"0 2px 4px rgba(0,0,0,0.1)":"none"},className:a,children:[e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",border:`1px solid ${n.borderColor}`,tableLayout:"auto",minWidth:"400px",borderRadius:l.table,borderSpacing:0,overflow:"hidden"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[f.enabled&&e.jsx("th",{style:{width:f.selectionColumnWidth||"40px",padding:C,backgroundColor:n.headerBg,color:n.headerText,border:`1px solid ${n.borderColor}`,position:g?"sticky":void 0,top:g?0:void 0,zIndex:g?1:void 0},children:e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:h,children:ne?D:G?K:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"})})})}),t.map(({key:u,label:O,sortable:p,icon:B,width:Q,align:W,headerClassName:Z},re)=>e.jsx("th",{onClick:()=>J(u,p),style:{width:Q,padding:C,border:`1px solid ${n.borderColor}`,cursor:d&&p?"pointer":"default",backgroundColor:n.headerBg,color:n.headerText,userSelect:"none",borderTopLeftRadius:re===0&&!f.enabled?l.header:void 0,borderTopRightRadius:re===t.length-1?l.header:void 0,textAlign:W||v,whiteSpace:"nowrap",position:g?"sticky":void 0,top:g?0:void 0,zIndex:g?1:void 0},className:Z,"aria-sort":T===u?A==="asc"?"ascending":"descending":void 0,role:d&&p?"button":void 0,tabIndex:d&&p?0:void 0,onKeyDown:ie=>{d&&p&&(ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),J(u,p))},children:e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"6px",justifyContent:W==="right"?"flex-end":W==="center"?"center":"flex-start"},children:[B&&e.jsx("span",{children:B}),e.jsx("span",{children:O}),d&&p&&(T===u?A==="asc"?z:L:q)]})},u))]})}),e.jsx("tbody",{children:V.length>0?V.map((u,O)=>{const p=o(u),B=O%2===0;return e.jsxs("tr",{style:{backgroundColor:p?n.selectedRowBg:B&&n.evenRowBg||n.rowBg,color:n.rowText,transition:"background-color 0.2s ease-in-out",cursor:x?"pointer":"default"},onMouseEnter:()=>Y(O),onMouseLeave:()=>Y(null),onClick:()=>x?.(u,O),className:w?.(u,O),children:[f.enabled&&e.jsx("td",{style:{padding:m,border:`1px solid ${n.borderColor}`,textAlign:"center"},onClick:Q=>{Q.stopPropagation(),k(u)},children:p?K:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"})})}),t.map(({key:Q,align:W,render:Z,cellClassName:re})=>e.jsx("td",{style:{padding:m,border:`1px solid ${n.borderColor}`,whiteSpace:"nowrap",textAlign:W||j},className:re,children:Z?Z(u[Q],u):u[Q]},Q))]},O)}):e.jsx("tr",{children:e.jsx("td",{colSpan:t.length+(f.enabled?1:0),style:{padding:"20px",textAlign:"center",border:`1px solid ${n.borderColor}`},children:b})})})]}),i&&U>1&&e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"12px",padding:"8px",userSelect:"none"},children:[e.jsxs("button",{style:{display:"flex",alignItems:"center",gap:4,padding:"6px 12px",backgroundColor:n.paginationBg,color:n.paginationText,borderRadius:l.pagination,border:"none",opacity:M===1?.5:1,cursor:M===1?"not-allowed":"pointer",fontSize:"0.875rem"},disabled:M===1,onClick:()=>X(u=>Math.max(u-1,1)),"aria-label":"Previous page",type:"button",children:[e.jsx(it,{size:16}),"Prev"]}),e.jsx("div",{style:{display:"flex",gap:"4px"},children:Array.from({length:Math.min(5,U)},(u,O)=>{let p;return U<=5||M<=3?p=O+1:M>=U-2?p=U-4+O:p=M-2+O,e.jsx("button",{style:{padding:"6px 12px",backgroundColor:M===p?n.headerBg:n.paginationBg,color:M===p?n.headerText:n.paginationText,borderRadius:l.pagination,border:"none",cursor:"pointer",fontSize:"0.875rem",minWidth:"36px"},onClick:()=>X(p),"aria-label":`Page ${p}`,type:"button",children:p},p)})}),e.jsxs("button",{style:{display:"flex",alignItems:"center",gap:4,padding:"6px 12px",backgroundColor:n.paginationBg,color:n.paginationText,borderRadius:l.pagination,border:"none",opacity:M===U?.5:1,cursor:M===U?"not-allowed":"pointer",fontSize:"0.875rem"},disabled:M===U,onClick:()=>X(u=>Math.min(u+1,U)),"aria-label":"Next page",type:"button",children:["Next",e.jsx(at,{size:16})]})]})]})},_r=(t,r)=>{const{as:a,children:i,className:c="",style:n={},background:l="#fff",backgroundImage:d,backgroundSize:S="cover",backgroundPosition:j="center",backgroundRepeat:v="no-repeat",backgroundGradient:f,backgroundBlendMode:b,textColor:x="#000",hoverStyles:w={},activeStyles:m={},borderRadius:C=12,border:g="none",borderTop:y,borderRight:E,borderBottom:T,borderLeft:_,boxShadow:A="0 4px 12px rgba(0,0,0,0.1)",hoverShadow:R,transition:M="all 0.2s ease",padding:X,paddingX:F,paddingY:Y,margin:$,marginX:N,marginY:J,width:k,minWidth:h,maxWidth:I="100%",height:V,minHeight:U,maxHeight:o,display:z="flex",flexDirection:L="column",justifyContent:q="flex-start",alignItems:K="stretch",alignContent:D,flexWrap:G,flex:ne,gap:u=16,position:O,top:p,right:B,bottom:Q,left:W,zIndex:Z,overflow:re,overflowX:ie,overflowY:se,cursor:ce,pointerEvents:fe,userSelect:xe,transform:he,transformOrigin:ye,backdropFilter:pe,filter:ge,opacity:we,visibility:je,...de}=t,Te=a||"div",Re={background:f?`${f}${l?`, ${l}`:""}`:l,color:x,...d?{backgroundImage:`url(${d})`,backgroundSize:S,backgroundPosition:j,backgroundRepeat:v}:{},backgroundBlendMode:b,borderRadius:C,boxShadow:A,transition:M,...X?{padding:X}:{paddingTop:Y,paddingBottom:Y,paddingLeft:F,paddingRight:F},...$?{margin:$}:{marginTop:J,marginBottom:J,marginLeft:N,marginRight:N},width:k,minWidth:h,maxWidth:I,height:V,minHeight:U,maxHeight:o,display:z,flexDirection:L,justifyContent:q,alignItems:K,alignContent:D,flexWrap:G,flex:ne,gap:u,position:O,top:p,right:B,bottom:Q,left:W,zIndex:Z,overflow:re,overflowX:ie,overflowY:se,cursor:ce,pointerEvents:fe,userSelect:xe,transform:he,transformOrigin:ye,backdropFilter:pe,filter:ge,opacity:we,visibility:je,border:g,...y&&{borderTop:y},...E&&{borderRight:E},...T&&{borderBottom:T},..._&&{borderLeft:_},boxSizing:"border-box"},$e={"--hover-shadow":R,"--hover-styles":JSON.stringify(w),"--active-styles":JSON.stringify(m)};return e.jsx(Te,{ref:r,className:`card ${c}`,style:{...Re,...$e,...n},...de,children:i})},Lr=s.forwardRef(_r),Pr=Object.assign(Lr,{displayName:"Card"}),nt=t=>t<768?"sm":t<1024?"md":"lg",Ar=({columns:t={sm:1,md:2,lg:3},gap:r="16px",padding:a="20px",alignItems:i="stretch",justifyItems:c="stretch",backgroundColor:n="transparent",width:l="100%",maxWidth:d="100%",height:S="auto",children:j,style:v})=>{const[f,b]=s.useState("lg");s.useEffect(()=>{b(nt(window.innerWidth));const m=()=>b(nt(window.innerWidth));return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]);const x=s.useMemo(()=>typeof t=="number"?t:t[f]??1,[t,f]),w=s.useMemo(()=>({display:"grid",gridTemplateColumns:`repeat(${x}, 1fr)`,gap:r,padding:a,alignItems:i,justifyItems:c,backgroundColor:n,width:l,maxWidth:d,height:S,boxSizing:"border-box",...v}),[x,r,a,i,c,n,l,d,S,v]);return e.jsx("div",{style:w,children:j})},st=t=>t<768?"sm":t<1024?"md":"lg",Nr=({direction:t="row",align:r="center",justify:a="space-between",gap:i=16,padding:c=20,backgroundColor:n="transparent",width:l="100%",maxWidth:d="100%",height:S="auto",style:j,children:v})=>{const[f,b]=s.useState("lg");s.useEffect(()=>{b(st(window.innerWidth));const m=()=>b(st(window.innerWidth));return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]);const x=s.useMemo(()=>typeof t=="string"?t:t[f]??"row",[t,f]),w=s.useMemo(()=>({display:"flex",flexDirection:x,alignItems:r,justifyContent:a,gap:typeof i=="number"?`${i}px`:i,padding:typeof c=="number"?`${c}px`:c,backgroundColor:n,width:l,maxWidth:d,height:S,boxSizing:"border-box",...j}),[x,r,a,i,c,n,l,d,S,j]);return e.jsx("div",{style:w,children:v})},Br={success:{bg:"#ecfdf5",border:"#34d399",iconColor:"#059669",Icon:e.jsx(Nt,{size:20})},error:{bg:"#fef2f2",border:"#f87171",iconColor:"#dc2626",Icon:e.jsx(Pt,{size:20})},warning:{bg:"#fffbeb",border:"#facc15",iconColor:"#d97706",Icon:e.jsx(fr,{size:20})},info:{bg:"#eff6ff",border:"#3b82f6",iconColor:"#2563eb",Icon:e.jsx(Ut,{size:20})}},Or=t=>{const r={position:"fixed",zIndex:9999};switch(t){case"top-left":return{...r,top:"20px",left:"20px"};case"top-center":return{...r,top:"20px",left:"50%",transform:"translateX(-50%)"};case"top-right":return{...r,top:"20px",right:"20px"};case"bottom-left":return{...r,bottom:"20px",left:"20px"};case"bottom-center":return{...r,bottom:"20px",left:"50%",transform:"translateX(-50%)"};case"bottom-right":default:return{...r,bottom:"20px",right:"20px"}}},Fr=({title:t="",description:r="",type:a="info",dismissible:i=!0,onClose:c,duration:n,icon:l,actionButton:d,position:S="top-right",className:j,style:v})=>{const[f,b]=s.useState(!0);if(s.useEffect(()=>{if(n){const y=setTimeout(()=>{b(!1),c?.()},n);return()=>clearTimeout(y)}},[n,c]),!f)return null;const{bg:x,border:w,iconColor:m,Icon:C}=Br[a],g=Or(S);return e.jsxs("div",{className:j,style:{...g,display:"flex",gap:"12px",padding:"16px",backgroundColor:x,borderLeft:`4px solid ${w}`,borderRadius:"8px",color:"#111827",alignItems:"flex-start",boxShadow:"0 4px 12px rgba(0,0,0,0.08)",transition:"all 0.3s ease",animation:"slideIn 0.3s ease",maxWidth:"600px",width:"calc(100% - 40px)",...v},children:[e.jsx("div",{style:{color:m,marginTop:"3px"},children:l||C}),e.jsxs("div",{style:{flex:1},children:[t&&e.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:t}),r&&e.jsx("div",{style:{fontSize:"14px",color:"#374151"},children:r}),d&&e.jsx("div",{style:{marginTop:"10px"},children:d})]}),i&&e.jsx("button",{onClick:()=>{b(!1),c?.()},style:{background:"transparent",border:"none",color:"#6b7280",cursor:"pointer",marginLeft:"8px"},children:e.jsx(De,{size:16})}),e.jsx("style",{children:`
|
|
268
|
-
@keyframes slideIn {
|
|
269
|
-
from { opacity: 0; transform: translateY(-10px); }
|
|
270
|
-
to { opacity: 1; transform: translateY(0); }
|
|
271
|
-
}
|
|
272
|
-
`})]})},Wr=({text:t,color:r="#2563eb",textColor:a="#fff",borderColor:i="#2563eb",icon:c,iconPosition:n="left",rounded:l=!1,borderRadius:d,borderWidth:S="0",fontSize:j="14px",fontWeight:v=500,horizontalPadding:f="10px",verticalPadding:b="6px",margin:x="0",shadow:w="0 1px 4px rgba(0, 0, 0, 0.1)",notificationDot:m=!1,dotColor:C="#ef4444",count:g,pulse:y=!1,style:E,onClick:T})=>{const _={display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:r,border:`${S} solid ${i}`,borderRadius:d||(l?"9999px":"6px"),padding:`${b} ${f}`,fontSize:j,fontWeight:v,margin:x,boxShadow:w,position:"relative",cursor:T?"pointer":"default",...E},A={color:a,display:"inline"},R={display:"flex",alignItems:"center",color:a},M={...R,marginRight:t?"6px":"0px"},X={...R,marginLeft:t?"6px":"0px"},F={position:"absolute",top:"-6px",right:"-6px",backgroundColor:"#ef4444",color:"#fff",borderRadius:"50%",minWidth:"20px",height:"20px",fontSize:"12px",padding:"0 6px",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,zIndex:1},Y={position:"absolute",top:"-4px",right:"-4px",height:"8px",width:"8px",backgroundColor:C,borderRadius:"50%",zIndex:1,animation:y?"pulseAnim 1.2s infinite":void 0};return e.jsxs("span",{style:_,onClick:T,children:[m&&e.jsx("span",{style:Y}),typeof g<"u"&&e.jsx("span",{style:F,children:g}),c&&n==="left"&&e.jsx("span",{style:M,children:c}),t&&e.jsx("span",{style:A,children:t}),c&&n==="right"&&e.jsx("span",{style:X,children:c}),e.jsx("style",{children:`
|
|
273
|
-
@keyframes pulseAnim {
|
|
274
|
-
0% { transform: scale(1); opacity: 1; }
|
|
275
|
-
50% { transform: scale(1.5); opacity: 0.5; }
|
|
276
|
-
100% { transform: scale(1); opacity: 1; }
|
|
277
|
-
}
|
|
278
|
-
`})]})},Dr=({isOpen:t,onClose:r,children:a,overlayStyle:i,modalStyle:c,closeButtonStyle:n})=>t?e.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.6)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3,...i},onClick:r,children:e.jsxs("div",{style:{position:"relative",backgroundColor:"#fff",borderRadius:12,width:"90vw",maxWidth:700,maxHeight:"90vh",overflowY:"auto",padding:24,boxShadow:"0 10px 40px rgba(0,0,0,0.25)",...c},onClick:l=>l.stopPropagation(),children:[e.jsx("button",{onClick:r,"aria-label":"Close modal",style:{position:"absolute",top:16,right:16,background:"transparent",border:"none",cursor:"pointer",padding:4,color:"#444",transition:"color 0.2s ease",...n},onMouseEnter:l=>l.currentTarget.style.color="#000",onMouseLeave:l=>l.currentTarget.style.color="#444",children:e.jsx(De,{size:24})}),a]})}):null,xt={xs:24,sm:32,md:40,lg:48,xl:56,"2xl":64},Yr={xs:6,sm:8,md:10,lg:12,xl:14,"2xl":16},ht={xs:10,sm:12,md:14,lg:16,xl:18,"2xl":20},gt=t=>{switch(t){case"square":return"0px";case"rounded":return"8px";case"circular":default:return"50%"}},Vr=(t,r)=>{switch(t){case"top-left":return{top:1,left:1};case"top-right":return{top:1,right:1};case"bottom-left":return{bottom:1,left:1};case"bottom-right":default:return{bottom:1,right:1}}},Hr=(t,r)=>{switch(t){case"tight":return-(r*.5);case"loose":return-(r*.15);case"normal":default:return-(r*.35)}},bt=({src:t,alt:r="User Avatar",size:a="md",variant:i="circular",isOnline:c=!1,isOffline:n=!1,className:l="",style:d,statusClassName:S="",statusStyle:j,statusPosition:v="bottom-right",fallback:f,ring:b=!1,ringColor:x="#3b82f6",onClick:w})=>{const[m,C]=s.useState(!1),[g,y]=s.useState(!1),E=xt[a],T=Yr[a],_=ht[a],A=gt(i),R=f||r.split(" ").map(N=>N[0]).join("").toUpperCase().slice(0,2);let M="",X="";c?(M="#10b981",X="Online"):n&&(M="#6b7280",X="Offline");const F=c||n,Y=t&&!m,$=!!w;return e.jsxs("div",{style:{position:"relative",width:E,height:E,borderRadius:A,overflow:"visible",display:"inline-block",flexShrink:0,cursor:$?"pointer":"default",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",transform:g&&$?"scale(1.05)":"scale(1)",boxShadow:b?`0 0 0 3px ${x}20, 0 0 0 1px ${x}`:g&&$?"0 8px 25px -8px rgba(0, 0, 0, 0.3)":"0 1px 3px rgba(0, 0, 0, 0.1)",...d},className:l,"aria-label":r,role:$?"button":"img",tabIndex:$?0:-1,onClick:w,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onKeyDown:N=>{$&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),w?.())},children:[Y?e.jsx("div",{style:{borderRadius:A,overflow:"hidden",width:"100%",height:"100%"},children:e.jsx("img",{src:t,alt:r,width:E,height:E,loading:"lazy",onError:()=>C(!0),style:{width:"100%",height:"100%",objectFit:"cover",objectPosition:"center",display:"block",transition:"opacity 0.2s ease-in-out"}})}):e.jsx("div",{style:{width:"100%",height:"100%",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",fontSize:_,fontWeight:"600",borderRadius:A,position:"relative"},children:R?e.jsx("span",{style:{userSelect:"none"},children:R}):e.jsx(hr,{size:E*.5,strokeWidth:1.5})}),F&&e.jsx("div",{className:S,style:{position:"absolute",width:T,height:T,borderRadius:"50%",backgroundColor:M,border:"2px solid white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.12)",...Vr(v),...j},"aria-label":X,title:X})]})},Xr=({avatars:t,max:r=4,size:a="md",className:i="",style:c,spacing:n="normal",direction:l="left"})=>{const d=xt[a],S=ht[a],j=t.slice(0,r),v=t.length-r,f=Hr(n,d);return e.jsxs("div",{style:{display:"flex",alignItems:"center",flexDirection:l==="right"?"row-reverse":"row",...c},className:i,"aria-label":`Avatar group with ${t.length} members`,role:"group",children:[j.map((b,x)=>{const w=l==="left"?x===0:x===j.length-1,m=l==="left"?j.length-x:x+1;return e.jsx("div",{style:{marginLeft:l==="left"&&!w?f:0,marginRight:l==="right"&&!w?f:0,position:"relative",zIndex:m,transition:"transform 0.2s cubic-bezier(0.4, 0, 0.2, 1)"},className:"group-hover:translate-x-1",onMouseEnter:C=>{const g=C.currentTarget;g.style.transform=`translateY(-2px) ${l==="right"?"translateX(4px)":"translateX(-4px)"}`,g.style.zIndex="100"},onMouseLeave:C=>{const g=C.currentTarget;g.style.transform="translateY(0) translateX(0)",g.style.zIndex=m.toString()},children:e.jsx("div",{style:{border:"3px solid white",borderRadius:gt(b.variant||"circular"),boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},children:e.jsx(bt,{...b,size:a,style:{boxShadow:"none"}})})},x)}),v>0&&e.jsxs("div",{style:{marginLeft:l==="left"?f:0,marginRight:l==="right"?f:0,width:d,height:d,borderRadius:"50%",background:"linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%)",color:"#374151",fontSize:S*.9,fontWeight:"600",display:"flex",justifyContent:"center",alignItems:"center",border:"3px solid white",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",userSelect:"none",cursor:"default",flexShrink:0,position:"relative",zIndex:0,transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)"},"aria-label":`${v} more members`,title:`${v} more members`,onMouseEnter:b=>{const x=b.currentTarget;x.style.transform="translateY(-2px) scale(1.05)",x.style.background="linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%)"},onMouseLeave:b=>{const x=b.currentTarget;x.style.transform="translateY(0) scale(1)",x.style.background="linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%)"},children:["+",v]})]})},Ur=[{src:"https://www.soundjay.com/misc/sounds/bell-ringing-05.wav",title:"Morning Bell",artist:"Nature Sounds",duration:"0:15",thumbnail:"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"},{src:"https://www.soundjay.com/buttons/sounds/button-4.wav",title:"Digital Click",artist:"Tech Audio",duration:"0:05",thumbnail:"https://images.unsplash.com/photo-1514525253161-7a46d19cd819?w=300&h=300&fit=crop"},{src:"https://www.soundjay.com/buttons/sounds/button-10.wav",title:"Soft Chime",artist:"Ambient Studio",duration:"0:08",thumbnail:"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"}];function qr({tracks:t=Ur,className:r="",galleryTitle:a="Audio Gallery",primaryColor:i="#8b5cf6",backgroundColor:c="#0f0f23",textColor:n="#e4e4e7",secondaryColor:l="#1a1a2e",border:d=0,borderColor:S,maxWidth:j=420,autoplay:v=!1,loop:f=!1}){const[b,x]=s.useState(null),[w,m]=s.useState(!1),[C,g]=s.useState(0),[y,E]=s.useState(0),[T,_]=s.useState(.7),[A,R]=s.useState(!1),[M,X]=s.useState(f),[F,Y]=s.useState(!1),[$,N]=s.useState(!1),[J,k]=s.useState(!1),h=s.useRef(null),I=s.useRef(null),V=s.useRef(null);s.useEffect(()=>{h.current&&(h.current.volume=T)},[T]),s.useEffect(()=>{h.current&&(h.current.loop=M)},[M]),s.useEffect(()=>{b===null&&h.current&&(h.current.pause(),m(!1),g(0),E(0))},[b]);const U=p=>{if(b===p){if(!h.current)return;h.current.paused?(h.current.play().catch(()=>{}),m(!0)):(h.current.pause(),m(!1))}else x(p),setTimeout(()=>{h.current&&(h.current.play().catch(()=>{}),m(!0))},100)},o=()=>{h.current&&(g(h.current.currentTime),h.current.duration&&E(h.current.duration))},z=p=>{if(!h.current||!y)return;const B=p.currentTarget.getBoundingClientRect(),Z=(p.clientX-B.left)/B.width*y;h.current.currentTime=Z,g(Z)},L=p=>{const B=p.currentTarget.getBoundingClientRect(),W=(p.clientX-B.left)/B.width,Z=Math.max(0,Math.min(1,W));_(Z)},q=p=>{if(h.current&&y){let B=h.current.currentTime+p;B=Math.min(Math.max(B,0),y),h.current.currentTime=B,g(B)}},K=()=>{if(b===null)return;let p;F?p=Math.floor(Math.random()*t.length):p=(b+1)%t.length,U(p)},D=()=>{if(b===null)return;let p;F?p=Math.floor(Math.random()*t.length):p=(b-1+t.length)%t.length,U(p)},G=()=>{_(p=>p>0?0:.7)},ne=()=>{k(!0),V.current&&clearTimeout(V.current),V.current=setTimeout(()=>{k(!1)},3e3)},u=p=>{if(isNaN(p))return"0:00";const B=Math.floor(p/60),Q=Math.floor(p%60);return`${B}:${Q<10?"0":""}${Q}`},O=b!==null?t[b]:null;return e.jsxs("div",{className:r,style:{maxWidth:`${j}px`,margin:"20px auto",background:`linear-gradient(145deg, ${c}, ${l})`,color:n,borderRadius:"24px",padding:"24px 16px",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",userSelect:"none",backdropFilter:"blur(20px)",border:`${d}px solid ${S}40`},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:`linear-gradient(135deg, ${i}, ${l})`,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(tt,{size:20,color:"white"})}),e.jsxs("div",{children:[e.jsx("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:"700",color:i},children:a}),e.jsxs("p",{style:{margin:0,fontSize:"0.875rem",opacity:.7},children:[t.length," tracks"]})]})]}),e.jsx("button",{onClick:()=>Y(!F),style:{background:F?i:"transparent",border:"none",borderRadius:"12px",padding:"8px",cursor:"pointer",transition:"all 0.3s ease",opacity:F?1:.6},"aria-label":"Toggle Shuffle",children:e.jsx(cr,{size:18,color:F?"white":n})})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginBottom:"20px",maxHeight:"240px",overflowY:"auto",paddingRight:"4px"},children:t.map((p,B)=>{const Q=b===B,W=Q&&w;return e.jsxs("div",{onClick:()=>U(B),style:{display:"flex",alignItems:"center",padding:"12px 16px",borderRadius:"16px",background:Q?`linear-gradient(135deg, ${i}20, ${i}10)`:"rgba(255,255,255,0.05)",border:Q?`1px solid ${i}40`:"1px solid transparent",cursor:"pointer",transition:"all 0.3s ease",backdropFilter:Q?"blur(20px)":"none"},children:[e.jsxs("div",{style:{width:"48px",height:"48px",borderRadius:"12px",background:p.thumbnail?`url(${p.thumbnail}) center/cover`:i,display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",position:"relative",overflow:"hidden"},children:[!p.thumbnail&&e.jsx(tt,{size:20,color:"white"}),W&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"rgba(0,0,0,0.6)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("div",{style:{width:"16px",height:"16px",display:"flex",gap:"2px",alignItems:"end",justifyContent:"center"},children:[0,1,2].map(Z=>e.jsx("div",{style:{width:"3px",background:"white",borderRadius:"2px",animation:`equalizer 1s ease-in-out infinite ${Z*.2}s`,height:"12px"}},Z))})})]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:"600",fontSize:"0.95rem",color:Q?i:n,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:p.title}),p.artist&&e.jsx("div",{style:{fontSize:"0.8rem",opacity:.7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:p.artist})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[p.duration&&e.jsx("span",{style:{fontSize:"0.8rem",opacity:.6},children:p.duration}),e.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"8px",background:Q?i:"rgba(255,255,255,0.1)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease"},children:W?e.jsx(Be,{size:16,color:"white"}):e.jsx(Le,{size:16,color:"white"})})]})]},B)})}),O&&e.jsxs("div",{ref:I,style:{background:`linear-gradient(135deg, ${l}, ${c})`,borderRadius:"20px",padding:"20px",border:`1px solid ${i}40`,backdropFilter:"blur(20px)",position:"relative",overflow:"hidden"},children:[O.thumbnail&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url(${O.thumbnail})`,backgroundSize:"cover",backgroundPosition:"center",filter:"blur(60px) opacity(0.1)",transform:"scale(1.1)"}}),e.jsxs("div",{style:{position:"relative",zIndex:1},children:[e.jsxs("div",{style:{textAlign:"center",marginBottom:"20px"},children:[e.jsx("h3",{style:{margin:"0 0 4px 0",fontSize:"1.1rem",fontWeight:"700",color:i},children:O.title}),O.artist&&e.jsx("p",{style:{margin:0,opacity:.7,fontSize:"0.9rem"},children:O.artist})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"20px",marginBottom:"20px"},children:[e.jsx("button",{onClick:D,style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":"Previous Track",children:e.jsx(Oe,{size:20})}),e.jsxs("button",{onClick:()=>q(-10),style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":"Skip back 10 seconds",children:[e.jsx(Oe,{size:16}),e.jsx("span",{style:{fontSize:"0.7rem",marginLeft:"2px"},children:"10"})]}),e.jsx("button",{onClick:()=>{h.current&&(w?(h.current.pause(),m(!1)):(h.current.play().catch(()=>{}),m(!0)))},style:{...ve("#fff",i),width:"60px",height:"60px",borderRadius:"50%",boxShadow:`0 8px 25px ${i}40`},"aria-label":w?"Pause":"Play",children:w?e.jsx(Be,{size:24}):e.jsx(Le,{size:24})}),e.jsxs("button",{onClick:()=>q(10),style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":"Skip forward 10 seconds",children:[e.jsx("span",{style:{fontSize:"0.7rem",marginRight:"2px"},children:"10"}),e.jsx(Fe,{size:16})]}),e.jsx("button",{onClick:K,style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":"Next Track",children:e.jsx(Fe,{size:20})})]}),e.jsxs("div",{style:{marginBottom:"16px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px",fontSize:"0.8rem",opacity:.7},children:[e.jsx("span",{children:u(C)}),e.jsx("span",{children:u(y)})]}),e.jsx("div",{onClick:z,style:{height:"6px",background:"rgba(255,255,255,0.2)",borderRadius:"3px",cursor:"pointer",position:"relative",overflow:"hidden"},children:e.jsx("div",{style:{width:`${C/y*100||0}%`,height:"100%",background:`linear-gradient(90deg, ${i}, #ec4899)`,borderRadius:"3px",position:"relative"},children:e.jsx("div",{style:{position:"absolute",right:"-6px",top:"50%",transform:"translateY(-50%)",width:"12px",height:"12px",background:i,borderRadius:"50%",boxShadow:`0 2px 8px ${i}60`}})})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{onClick:()=>N(!$),style:ve($?"#ec4899":n,"rgba(255,255,255,0.1)"),"aria-label":"Like",children:e.jsx(Ht,{size:16,fill:$?"#ec4899":"none"})}),e.jsx("button",{onClick:()=>X(!M),style:ve(M?i:n,"rgba(255,255,255,0.1)"),"aria-label":"Toggle Loop",children:e.jsx(qe,{size:16})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},children:[J&&e.jsx("div",{onClick:L,style:{width:"80px",height:"4px",background:"rgba(255,255,255,0.2)",borderRadius:"2px",cursor:"pointer",position:"relative"},children:e.jsx("div",{style:{width:`${T*100}%`,height:"100%",background:i,borderRadius:"2px"}})}),e.jsx("button",{onClick:G,onMouseEnter:ne,style:ve(n,"rgba(255,255,255,0.1)"),"aria-label":T>0?"Mute":"Unmute",children:T>0?e.jsx(Ge,{size:16}):e.jsx(We,{size:16})})]})]})]}),e.jsx("audio",{ref:h,src:O.src,autoPlay:v,loop:M,onTimeUpdate:o,onEnded:()=>{m(!1),M||K()},onLoadedMetadata:o,preload:"metadata",style:{display:"none"}})]}),e.jsx("style",{children:`
|
|
142
|
+
*/const Ht=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ie=q("x",Ht),Vt={success:{bg:"#ecfdf5",border:"#34d399",iconColor:"#059669",Icon:e.jsx(gt,{size:20})},error:{bg:"#fef2f2",border:"#f87171",iconColor:"#dc2626",Icon:e.jsx(ht,{size:20})},warning:{bg:"#fffbeb",border:"#facc15",iconColor:"#d97706",Icon:e.jsx(Wt,{size:20})},info:{bg:"#eff6ff",border:"#3b82f6",iconColor:"#2563eb",Icon:e.jsx(Tt,{size:20})}},Ut=t=>{const r={position:"fixed",zIndex:9999,pointerEvents:"auto"};switch(t){case"top-left":return{...r,top:"1.25rem",left:"1.25rem"};case"top-center":return{...r,top:"1.25rem",left:"50%",transform:"translateX(-50%)"};case"top-right":return{...r,top:"1.25rem",right:"1.25rem"};case"bottom-left":return{...r,bottom:"1.25rem",left:"1.25rem"};case"bottom-center":return{...r,bottom:"1.25rem",left:"50%",transform:"translateX(-50%)"};case"bottom-right":default:return{...r,bottom:"1.25rem",right:"1.25rem"}}},Ge=({title:t,description:r,type:n="info",dismissible:s=!0,duration:c,onClose:a,icon:u,actionButton:d,position:g="top-right",backgroundColor:y,borderColor:v,textColor:f="#111827",borderRadius:p="0.75rem",shadow:b="0 4px 14px rgba(0,0,0,0.1)",padding:x="1rem",fontSize:m="0.95rem",fontWeight:h=500,descriptionColor:w="#374151",animationDuration:l="300ms",maxWidth:k="480px",className:$="",style:j})=>{const[M,_]=i.useState(!0);i.useEffect(()=>{if(c){const Y=setTimeout(()=>{_(!1),a?.()},c);return()=>clearTimeout(Y)}},[c,a]);const{bg:R,border:O,iconColor:L,Icon:D}=Vt[n],C=Ut(g),P=i.useMemo(()=>({...C,display:"flex",alignItems:"flex-start",gap:"0.75rem",backgroundColor:y??R,borderLeft:`4px solid ${v??O}`,borderRadius:p,color:f,boxShadow:b,padding:x,maxWidth:k,width:"calc(100% - 2.5rem)",opacity:M?1:0,transform:M?(g.includes("bottom"),"translateY(0)"):g.includes("bottom")?"translateY(20px)":"translateY(-20px)",transition:`opacity ${l} ease, transform ${l} ease`,...j}),[M,R,O,v,p,g,b,x,f,k,y,l,j]);return M?e.jsxs("div",{className:$,style:P,role:"alert",children:[e.jsx("div",{style:{color:L,marginTop:"2px"},children:u||D}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[t&&e.jsx("div",{style:{fontWeight:600,fontSize:m,marginBottom:"4px"},children:t}),r&&e.jsx("div",{style:{fontSize:"0.875rem",color:w,lineHeight:1.4},children:r}),d&&e.jsx("div",{style:{marginTop:"8px"},children:d})]}),s&&e.jsx("button",{onClick:()=>{_(!1),a?.()},style:{background:"transparent",border:"none",color:"#6b7280",cursor:"pointer",marginLeft:"8px",padding:0,lineHeight:0},"aria-label":"Close alert",children:e.jsx(Ie,{size:16})})]}):null};Ge.displayName="Alert";const Je=i.memo(({items:t,allowMultiple:r=!1,defaultOpen:n=[],borderColor:s="#e5e7eb",backgroundColor:c="#fff",textColor:a="#111827",hoverBgColor:u="#f9fafb",hoverTextColor:d="#111827",contentBgColor:g="#fff",contentTextColor:y="#374151",paddingY:v="1rem",paddingX:f="1rem",marginY:p="0.75rem",borderRadius:b="0.5rem",contentPadding:x="1rem",fontSize:m="1rem",fontWeight:h=600,contentFontSize:w="0.95rem",contentFontWeight:l=400,iconOpen:k="−",iconClose:$="+",iconSize:j="1.25rem",transitionDuration:M="300ms",shadow:_="0 1px 4px rgba(0,0,0,0.08)",className:R="",style:O})=>{const[L,D]=i.useState(n),C=i.useRef([]);i.useEffect(()=>{C.current.forEach((Y,z)=>{Y&&(Y.style.maxHeight=L.includes(z)?`${Y.scrollHeight}px`:"0px")})},[L]);const P=Y=>{D(z=>r?z.includes(Y)?z.filter(S=>S!==Y):[...z,Y]:z.includes(Y)?[]:[Y])};return e.jsx("div",{className:R,style:{width:"100%",...O},children:t.map((Y,z)=>{const S=L.includes(z);return e.jsxs("div",{style:{border:`1px solid ${s}`,borderRadius:b,margin:`${p} 0`,boxShadow:_,overflow:"hidden",transition:`all ${M} ease`},children:[e.jsxs("button",{onClick:()=>P(z),style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:c,color:a,padding:`${v} ${f}`,fontWeight:h,fontSize:m,cursor:"pointer",border:"none",outline:"none",transition:`all ${M}`},onMouseEnter:H=>{H.currentTarget.style.backgroundColor=u,H.currentTarget.style.color=d},onMouseLeave:H=>{H.currentTarget.style.backgroundColor=c,H.currentTarget.style.color=a},children:[e.jsx("span",{children:Y.title}),e.jsx("span",{style:{fontSize:j},children:S?k:$})]}),e.jsx("div",{ref:H=>{C.current[z]=H},style:{overflow:"hidden",maxHeight:S?`${C.current[z]?.scrollHeight}px`:"0px",transition:`max-height ${M} ease-in-out`},children:e.jsx("div",{style:{borderTop:`1px solid ${s}`,backgroundColor:g,color:y,padding:x,fontSize:w,fontWeight:l},children:Y.content})})]},z)})})});Je.displayName="Accordion";const Ke={xs:24,sm:32,md:40,lg:48,xl:56,"2xl":64},Ze={xs:10,sm:12,md:14,lg:16,xl:18,"2xl":20},qt={xs:6,sm:8,md:10,lg:12,xl:14,"2xl":16},Xt=t=>{switch(t){case"square":return"0px";case"rounded":return"8px";default:return"50%"}},Gt=(t,r)=>{switch(t){case"top-left":return{top:2,left:2};case"top-right":return{top:2,right:2};case"bottom-left":return{bottom:2,left:2};default:return{bottom:2,right:2}}},Jt=(t,r)=>{switch(t){case"tight":return-(r*.5);case"loose":return-(r*.15);default:return-(r*.35)}},Qe=({src:t,alt:r="User avatar",size:n="md",variant:s="circular",isOnline:c=!1,isOffline:a=!1,className:u="",style:d,statusClassName:g="",statusStyle:y,statusPosition:v="bottom-right",fallback:f,ring:p=!1,ringColor:b="#3b82f6",onClick:x})=>{const[m,h]=i.useState(!1),[w,l]=i.useState(!1),k=n==="responsive",$=k?void 0:Ke[n],j=k?"clamp(10px, 2vw, 16px)":Ze[n],M=k?10:qt[n],_=Xt(s),R=f||r.split(" ").map(P=>P[0]).join("").toUpperCase().slice(0,2),O=c?"#10b981":a?"#6b7280":"",L=c?"Online":a?"Offline":"",D=t&&!m,C=!!x;return e.jsxs("div",{className:u,role:C?"button":"img",tabIndex:C?0:-1,"aria-label":r,onClick:x,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onKeyDown:P=>{C&&(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),x?.())},style:{position:"relative",width:k?"100%":$,height:k?"100%":$,borderRadius:_,overflow:"visible",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:C?"pointer":"default",transition:"all 0.25s cubic-bezier(0.4, 0, 0.2, 1)",transform:w&&C?"scale(1.05)":"scale(1)",boxShadow:p?`0 0 0 3px ${b}22, 0 0 0 1px ${b}`:w&&C?"0 6px 16px rgba(0, 0, 0, 0.15)":"0 1px 3px rgba(0, 0, 0, 0.1)",...d},children:[D?e.jsx("img",{src:t,alt:r,onError:()=>h(!0),loading:"lazy",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:_,transition:"opacity 0.3s ease-in-out"}}):e.jsx("div",{style:{width:"100%",height:"100%",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",color:"#fff",fontSize:j,fontWeight:600,borderRadius:_,display:"flex",alignItems:"center",justifyContent:"center"},children:R||e.jsx(Yt,{size:$?$*.5:20})}),(c||a)&&e.jsx("div",{className:g,"aria-label":L,title:L,style:{position:"absolute",width:M,height:M,borderRadius:"50%",backgroundColor:O,border:"2px solid white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.12)",...Gt(v),...y}})]})},Kt=({avatars:t,max:r=4,size:n="md",className:s="",style:c,spacing:a="normal",direction:u="left"})=>{const d=n==="responsive",g=d?40:Ke[n],y=d?"clamp(10px, 2vw, 14px)":Ze[n],v=Jt(a,g),f=t.slice(0,r),p=t.length-r;return e.jsxs("div",{className:s,style:{display:"flex",alignItems:"center",flexDirection:u==="right"?"row-reverse":"row",flexWrap:"wrap",...c},role:"group","aria-label":`Avatar group with ${t.length} members`,children:[f.map((b,x)=>{const m=u==="left"?x===0:x===f.length-1,h=u==="left"?f.length-x:x+1;return e.jsx("div",{style:{marginLeft:u==="left"&&!m?v:0,marginRight:u==="right"&&!m?v:0,zIndex:h,position:"relative",transition:"transform 0.25s cubic-bezier(0.4, 0, 0.2, 1)"},onMouseEnter:w=>{w.currentTarget.style.transform="translateY(-3px) scale(1.05)",w.currentTarget.style.zIndex="100"},onMouseLeave:w=>{w.currentTarget.style.transform="translateY(0) scale(1)",w.currentTarget.style.zIndex=h.toString()},children:e.jsx(Qe,{...b,size:n})},x)}),p>0&&e.jsxs("div",{style:{marginLeft:u==="left"?v:0,marginRight:u==="right"?v:0,width:g,height:g,borderRadius:"50%",background:"linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%)",color:"#374151",fontSize:y,fontWeight:600,display:"flex",justifyContent:"center",alignItems:"center",border:"3px solid white",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",userSelect:"none"},title:`${p} more members`,children:["+",p]})]})},Zt=({src:t,thumbnail:r,autoPlay:n=!1,loop:s=!1,backgroundColor:c="#000000",primaryColor:a="#10b981",secondaryColor:u="#ffffff",borderRadius:d="12px",padding:g="16px",width:y="100%",className:v})=>{const f=i.useRef(null),p=i.useRef(null),[b,x]=i.useState(n),[m,h]=i.useState(0),[w,l]=i.useState(0),[k,$]=i.useState(.5),[j,M]=i.useState(!1),[_,R]=i.useState(s);i.useEffect(()=>{f.current&&(f.current.volume=k)},[k]),i.useEffect(()=>{f.current&&(f.current.loop=_)},[_]);const O=()=>{f.current&&(b?f.current.pause():f.current.play(),x(!b))},L=()=>{f.current&&(h(f.current.currentTime),l(f.current.duration))},D=z=>{if(!f.current||!z.currentTarget)return;const S=z.currentTarget.getBoundingClientRect(),V=(z.clientX-S.left)/S.width*w;f.current.currentTime=V,h(V)},C=z=>{f.current&&(f.current.currentTime+=z)},P=()=>{p.current&&(j?document.exitFullscreen?.():p.current.requestFullscreen?.(),M(!j))},Y=z=>{const S=Math.floor(z/60),H=Math.floor(z%60);return`${S}:${H<10?"0":""}${H}`};return e.jsxs("div",{ref:p,className:v,style:{position:"relative",width:y,backgroundColor:c,borderRadius:d,color:u,boxShadow:"0 4px 12px rgba(0,0,0,0.3)",overflow:"hidden",padding:g,boxSizing:"border-box",maxWidth:"100%"},children:[e.jsx("audio",{ref:f,src:t,autoPlay:n,loop:s,onTimeUpdate:L,onLoadedMetadata:L}),r&&e.jsx("img",{src:r,alt:"Audio Thumbnail",style:{width:"100%",objectFit:"cover",borderRadius:d,marginBottom:"16px",maxHeight:"150px"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"10px",flexShrink:0,marginTop:"10px"},children:[e.jsx("button",{onClick:()=>C(-10),"aria-label":"Skip Back 10s",children:e.jsx(Me,{size:20})}),e.jsx("button",{onClick:O,style:{background:a,borderRadius:"9999px",padding:"10px",color:"#fff",border:"none",cursor:"pointer"},"aria-label":b?"Pause":"Play",children:b?e.jsx(Re,{size:20}):e.jsx(Ee,{size:20})}),e.jsx("button",{onClick:()=>C(10),"aria-label":"Skip Forward 10s",children:e.jsx(_e,{size:20})})]}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:"12px",width:"100%"},children:[e.jsxs("div",{style:{flexShrink:0,minWidth:"60px",textAlign:"center"},children:[e.jsx("span",{style:{fontSize:"14px",marginRight:"4px"},children:Y(m)}),e.jsxs("span",{style:{fontSize:"14px",color:"#aaa"},children:["/ ",Y(w)]})]}),e.jsx("div",{onClick:D,style:{flex:1,height:"8px",background:"#444",borderRadius:"4px",cursor:"pointer",position:"relative",minWidth:"100px"},children:e.jsx("div",{style:{width:`${m/w*100||0}%`,height:"100%",background:a,borderRadius:"4px"}})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",flexShrink:0},children:[e.jsx("button",{onClick:()=>R(!_),"aria-label":"Toggle Loop",children:e.jsx(Ue,{size:18,color:_?a:void 0})}),e.jsx("button",{onClick:()=>$(k>0?0:.5),"aria-label":"Toggle Mute",children:k>0?e.jsx(qe,{size:18}):e.jsx(Xe,{size:18})}),e.jsx("button",{onClick:P,"aria-label":"Toggle Fullscreen",children:j?e.jsx(Mt,{size:18}):e.jsx(Rt,{size:18})})]})]})]})},Qt=[{src:"https://www.soundjay.com/misc/sounds/bell-ringing-05.wav",title:"Morning Bell",artist:"Nature Sounds",duration:"0:15",thumbnail:"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"},{src:"https://www.soundjay.com/buttons/sounds/button-4.wav",title:"Digital Click",artist:"Tech Audio",duration:"0:05",thumbnail:"https://images.unsplash.com/photo-1514525253161-7a46d19cd819?w=300&h=300&fit=crop"},{src:"https://www.soundjay.com/buttons/sounds/button-10.wav",title:"Soft Chime",artist:"Ambient Studio",duration:"0:08",thumbnail:"https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=300&h=300&fit=crop"}];function er({tracks:t=Qt,className:r="",galleryTitle:n="Audio Gallery",primaryColor:s="#8b5cf6",backgroundColor:c="#0f0f23",textColor:a="#e4e4e7",secondaryColor:u="#1a1a2e",border:d=0,borderColor:g,maxWidth:y=420,autoplay:v=!1,loop:f=!1}){const[p,b]=i.useState(null),[x,m]=i.useState(!1),[h,w]=i.useState(0),[l,k]=i.useState(0),[$,j]=i.useState(.7),[M,_]=i.useState(!1),[R,O]=i.useState(f),[L,D]=i.useState(!1),[C,P]=i.useState(!1),[Y,z]=i.useState(!1),S=i.useRef(null),H=i.useRef(null),V=i.useRef(null);i.useEffect(()=>{S.current&&(S.current.volume=$)},[$]),i.useEffect(()=>{S.current&&(S.current.loop=R)},[R]),i.useEffect(()=>{p===null&&S.current&&(S.current.pause(),m(!1),w(0),k(0))},[p]);const U=I=>{if(p===I){if(!S.current)return;S.current.paused?(S.current.play().catch(()=>{}),m(!0)):(S.current.pause(),m(!1))}else b(I),setTimeout(()=>{S.current&&(S.current.play().catch(()=>{}),m(!0))},100)},ae=()=>{S.current&&(w(S.current.currentTime),S.current.duration&&k(S.current.duration))},o=I=>{if(!S.current||!l)return;const E=I.currentTarget.getBoundingClientRect(),Z=(I.clientX-E.left)/E.width*l;S.current.currentTime=Z,w(Z)},T=I=>{const E=I.currentTarget.getBoundingClientRect(),K=(I.clientX-E.left)/E.width,Z=Math.max(0,Math.min(1,K));j(Z)},W=I=>{if(S.current&&l){let E=S.current.currentTime+I;E=Math.min(Math.max(E,0),l),S.current.currentTime=E,w(E)}},F=()=>{if(p===null)return;let I;L?I=Math.floor(Math.random()*t.length):I=(p+1)%t.length,U(I)},ee=()=>{if(p===null)return;let I;L?I=Math.floor(Math.random()*t.length):I=(p-1+t.length)%t.length,U(I)},ie=()=>{j(I=>I>0?0:.7)},B=()=>{z(!0),V.current&&clearTimeout(V.current),V.current=setTimeout(()=>{z(!1)},3e3)},G=I=>{if(isNaN(I))return"0:00";const E=Math.floor(I/60),N=Math.floor(I%60);return`${E}:${N<10?"0":""}${N}`},J=p!==null?t[p]:null;return e.jsxs("div",{className:r,style:{maxWidth:`${y}px`,margin:"20px auto",background:`linear-gradient(145deg, ${c}, ${u})`,color:a,borderRadius:"24px",padding:"24px 16px",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",userSelect:"none",backdropFilter:"blur(20px)",border:`${d}px solid ${g}40`},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:`linear-gradient(135deg, ${s}, ${u})`,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(Be,{size:20,color:"white"})}),e.jsxs("div",{children:[e.jsx("h2",{style:{margin:0,fontSize:"1.25rem",fontWeight:"700",color:s},children:n}),e.jsxs("p",{style:{margin:0,fontSize:"0.875rem",opacity:.7},children:[t.length," tracks"]})]})]}),e.jsx("button",{onClick:()=>D(!L),style:{background:L?s:"transparent",border:"none",borderRadius:"12px",padding:"8px",cursor:"pointer",transition:"all 0.3s ease",opacity:L?1:.6},"aria-label":"Toggle Shuffle",children:e.jsx(Ct,{size:18,color:L?"white":a})})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginBottom:"20px",maxHeight:"240px",overflowY:"auto",paddingRight:"4px"},children:t.map((I,E)=>{const N=p===E,K=N&&x;return e.jsxs("div",{onClick:()=>U(E),style:{display:"flex",alignItems:"center",padding:"12px 16px",borderRadius:"16px",background:N?`linear-gradient(135deg, ${s}20, ${s}10)`:"rgba(255,255,255,0.05)",border:N?`1px solid ${s}40`:"1px solid transparent",cursor:"pointer",transition:"all 0.3s ease",backdropFilter:N?"blur(20px)":"none"},children:[e.jsxs("div",{style:{width:"48px",height:"48px",borderRadius:"12px",background:I.thumbnail?`url(${I.thumbnail}) center/cover`:s,display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",position:"relative",overflow:"hidden"},children:[!I.thumbnail&&e.jsx(Be,{size:20,color:"white"}),K&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"rgba(0,0,0,0.6)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("div",{style:{width:"16px",height:"16px",display:"flex",gap:"2px",alignItems:"end",justifyContent:"center"},children:[0,1,2].map(Z=>e.jsx("div",{style:{width:"3px",background:"white",borderRadius:"2px",animation:`equalizer 1s ease-in-out infinite ${Z*.2}s`,height:"12px"}},Z))})})]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:"600",fontSize:"0.95rem",color:N?s:a,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:I.title}),I.artist&&e.jsx("div",{style:{fontSize:"0.8rem",opacity:.7,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:I.artist})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[I.duration&&e.jsx("span",{style:{fontSize:"0.8rem",opacity:.6},children:I.duration}),e.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"8px",background:N?s:"rgba(255,255,255,0.1)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease"},children:K?e.jsx(Re,{size:16,color:"white"}):e.jsx(Ee,{size:16,color:"white"})})]})]},E)})}),J&&e.jsxs("div",{ref:H,style:{background:`linear-gradient(135deg, ${u}, ${c})`,borderRadius:"20px",padding:"20px",border:`1px solid ${s}40`,backdropFilter:"blur(20px)",position:"relative",overflow:"hidden"},children:[J.thumbnail&&e.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url(${J.thumbnail})`,backgroundSize:"cover",backgroundPosition:"center",filter:"blur(60px) opacity(0.1)",transform:"scale(1.1)"}}),e.jsxs("div",{style:{position:"relative",zIndex:1},children:[e.jsxs("div",{style:{textAlign:"center",marginBottom:"20px"},children:[e.jsx("h3",{style:{margin:"0 0 4px 0",fontSize:"1.1rem",fontWeight:"700",color:s},children:J.title}),J.artist&&e.jsx("p",{style:{margin:0,opacity:.7,fontSize:"0.9rem"},children:J.artist})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"20px",marginBottom:"20px"},children:[e.jsx("button",{onClick:ee,style:pe(a,"rgba(255,255,255,0.1)"),"aria-label":"Previous Track",children:e.jsx(Me,{size:20})}),e.jsxs("button",{onClick:()=>W(-10),style:pe(a,"rgba(255,255,255,0.1)"),"aria-label":"Skip back 10 seconds",children:[e.jsx(Me,{size:16}),e.jsx("span",{style:{fontSize:"0.7rem",marginLeft:"2px"},children:"10"})]}),e.jsx("button",{onClick:()=>{S.current&&(x?(S.current.pause(),m(!1)):(S.current.play().catch(()=>{}),m(!0)))},style:{...pe("#fff",s),width:"60px",height:"60px",borderRadius:"50%",boxShadow:`0 8px 25px ${s}40`},"aria-label":x?"Pause":"Play",children:x?e.jsx(Re,{size:24}):e.jsx(Ee,{size:24})}),e.jsxs("button",{onClick:()=>W(10),style:pe(a,"rgba(255,255,255,0.1)"),"aria-label":"Skip forward 10 seconds",children:[e.jsx("span",{style:{fontSize:"0.7rem",marginRight:"2px"},children:"10"}),e.jsx(_e,{size:16})]}),e.jsx("button",{onClick:F,style:pe(a,"rgba(255,255,255,0.1)"),"aria-label":"Next Track",children:e.jsx(_e,{size:20})})]}),e.jsxs("div",{style:{marginBottom:"16px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px",fontSize:"0.8rem",opacity:.7},children:[e.jsx("span",{children:G(h)}),e.jsx("span",{children:G(l)})]}),e.jsx("div",{onClick:o,style:{height:"6px",background:"rgba(255,255,255,0.2)",borderRadius:"3px",cursor:"pointer",position:"relative",overflow:"hidden"},children:e.jsx("div",{style:{width:`${h/l*100||0}%`,height:"100%",background:`linear-gradient(90deg, ${s}, #ec4899)`,borderRadius:"3px",position:"relative"},children:e.jsx("div",{style:{position:"absolute",right:"-6px",top:"50%",transform:"translateY(-50%)",width:"12px",height:"12px",background:s,borderRadius:"50%",boxShadow:`0 2px 8px ${s}60`}})})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{onClick:()=>P(!C),style:pe(C?"#ec4899":a,"rgba(255,255,255,0.1)"),"aria-label":"Like",children:e.jsx(kt,{size:16,fill:C?"#ec4899":"none"})}),e.jsx("button",{onClick:()=>O(!R),style:pe(R?s:a,"rgba(255,255,255,0.1)"),"aria-label":"Toggle Loop",children:e.jsx(Ue,{size:16})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},children:[Y&&e.jsx("div",{onClick:T,style:{width:"80px",height:"4px",background:"rgba(255,255,255,0.2)",borderRadius:"2px",cursor:"pointer",position:"relative"},children:e.jsx("div",{style:{width:`${$*100}%`,height:"100%",background:s,borderRadius:"2px"}})}),e.jsx("button",{onClick:ie,onMouseEnter:B,style:pe(a,"rgba(255,255,255,0.1)"),"aria-label":$>0?"Mute":"Unmute",children:$>0?e.jsx(qe,{size:16}):e.jsx(Xe,{size:16})})]})]})]}),e.jsx("audio",{ref:S,src:J.src,autoPlay:v,loop:R,onTimeUpdate:ae,onEnded:()=>{m(!1),R||F()},onLoadedMetadata:ae,preload:"metadata",style:{display:"none"}})]}),e.jsx("style",{children:`
|
|
279
143
|
@keyframes equalizer {
|
|
280
144
|
0%, 100% { height: 4px; }
|
|
281
145
|
50% { height: 12px; }
|
|
@@ -292,24 +156,50 @@ React keys must be passed directly to JSX without using spread:
|
|
|
292
156
|
}
|
|
293
157
|
|
|
294
158
|
div::-webkit-scrollbar-thumb {
|
|
295
|
-
background: ${
|
|
159
|
+
background: ${s};
|
|
296
160
|
border-radius: 2px;
|
|
297
161
|
}
|
|
298
162
|
|
|
299
163
|
div::-webkit-scrollbar-thumb:hover {
|
|
300
|
-
background: ${
|
|
164
|
+
background: ${s}dd;
|
|
301
165
|
}
|
|
302
|
-
`})]})}function
|
|
303
|
-
@keyframes
|
|
304
|
-
|
|
305
|
-
|
|
166
|
+
`})]})}function pe(t,r){return{border:"none",backgroundColor:r,color:t,cursor:"pointer",padding:"10px",borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease",backdropFilter:"blur(10px)"}}const tr=i.memo(({text:t,color:r="#2563eb",textColor:n="#fff",borderColor:s="#2563eb",borderWidth:c="0",icon:a,iconPosition:u="left",rounded:d=!1,borderRadius:g,fontSize:y="13px",fontWeight:v=500,horizontalPadding:f="10px",verticalPadding:p="4px",margin:b="0",shadow:x="0 1px 3px rgba(0,0,0,0.1)",notificationDot:m=!1,dotColor:h="#ef4444",count:w,pulse:l=!1,style:k,className:$="",onClick:j})=>{const M={display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:r,color:n,border:`${c} solid ${s}`,borderRadius:g||(d?"9999px":"6px"),padding:`${p} ${f}`,fontSize:y,fontWeight:v,margin:b,boxShadow:x,position:"relative",cursor:j?"pointer":"default",userSelect:"none",lineHeight:1,transition:"all 0.2s ease",...k},_={position:"absolute",top:"-4px",right:"-4px",height:"8px",width:"8px",backgroundColor:h,borderRadius:"50%",animation:l?"pulseAnim 1.2s infinite":void 0},R={position:"absolute",top:"-8px",right:"-8px",backgroundColor:h,color:"#fff",borderRadius:"50%",minWidth:"18px",height:"18px",fontSize:"11px",padding:"0 5px",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1},O={display:"flex",alignItems:"center",margin:a&&t?u==="left"?"0 6px 0 0":"0 0 0 6px":0};return e.jsxs("span",{style:M,className:$,onClick:j,children:[m&&e.jsx("span",{style:_}),typeof w<"u"&&e.jsx("span",{style:R,children:w}),a&&u==="left"&&e.jsx("span",{style:O,children:a}),t&&e.jsx("span",{children:t}),a&&u==="right"&&e.jsx("span",{style:O,children:a}),e.jsx("style",{children:`
|
|
167
|
+
@keyframes pulseAnim {
|
|
168
|
+
0% { transform: scale(1); opacity: 1; }
|
|
169
|
+
50% { transform: scale(1.5); opacity: 0.5; }
|
|
170
|
+
100% { transform: scale(1); opacity: 1; }
|
|
306
171
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
@keyframes fadeIn {
|
|
312
|
-
|
|
313
|
-
|
|
172
|
+
`})]})}),rr={light:{default:"#111",primary:"#2563eb",success:"#16a34a",danger:"#dc2626",white:"#ffffff",muted:"#6b7280",border:"#d1d5db",hover:"#1d4ed8",text:"#ffffff"},dark:{default:"#f8fafc",primary:"#60a5fa",success:"#22c55e",danger:"#f87171",white:"#ffffff",muted:"#9ca3af",border:"#374151",hover:"#3b82f6",text:"#000000"}};function ve(t,r){return!t.startsWith("#")||t.length!==7?t:"#"+t.replace(/^#/,"").replace(/../g,n=>("0"+Math.min(255,Math.max(0,parseInt(n,16)+r)).toString(16)).slice(-2))}const nr=({children:t,type:r="button",onClick:n,iconBefore:s,iconAfter:c,className:a="",style:u,fullWidth:d=!1,disabled:g=!1,loading:y=!1,loadingText:v="Loading...",darkMode:f=!1,baseColor:p,size:b="md",rounded:x=!0,showBorder:m=!1})=>{const[h,w]=i.useState(!1),l=i.useMemo(()=>{if(!p)return rr[f?"dark":"light"];const M={primary:p,hover:ve(p,-40),text:"#ffffff",border:ve(p,-60)},_={primary:ve(p,60),hover:ve(p,80),text:"#000000",border:ve(p,40)};return f?_:M},[p,f]),$={sm:{px:16,py:6,font:"0.85rem"},md:{px:24,py:10,font:"1rem"},lg:{px:32,py:14,font:"1.125rem"}}[b],j={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"8px",padding:`${$.py}px ${$.px}px`,fontSize:$.font,fontWeight:500,borderRadius:x?8:3,border:m?`1px solid ${l.border}`:"none",width:d?"100%":"auto",backgroundColor:h&&!g?l.hover:l.primary,color:l.text,cursor:g?"not-allowed":"pointer",opacity:g?.6:1,transition:"all 0.25s ease-in-out",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.15)",...u};return e.jsxs("button",{type:r,className:a,style:j,onClick:!g&&!y?n:void 0,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),disabled:g,children:[y?e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{width:"16px",height:"16px",border:"2px solid currentColor",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}),e.jsx("span",{children:v})]}):e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{children:s}),e.jsx("span",{children:t}),c&&e.jsx("span",{children:c})]}),e.jsx("style",{children:`
|
|
173
|
+
@keyframes spin {
|
|
174
|
+
to { transform: rotate(360deg); }
|
|
175
|
+
}
|
|
176
|
+
`})]})},sr=({as:t,children:r,className:n="",variant:s="elevated",background:c="#fff",textColor:a="#000",borderRadius:u=12,border:d,boxShadow:g,hoverShadow:y,padding:v=16,margin:f,width:p,height:b,style:x={},hoverStyle:m={},onClick:h,...w},l)=>{const k=t||"div",$={elevated:{boxShadow:g||"0 4px 12px rgba(0,0,0,0.08)",border:d||"none"},outline:{border:d||"1px solid rgba(0,0,0,0.1)",boxShadow:"none"},flat:{border:"none",boxShadow:"none"}},j={background:c,color:a,borderRadius:u,padding:v,margin:f,width:p,height:b,transition:"all 0.25s ease",cursor:h?"pointer":void 0,boxSizing:"border-box",...$[s],...x};return e.jsx(k,{ref:l,className:`ui-card ${n}`,style:j,onClick:h,onMouseEnter:M=>{Object.assign(M.currentTarget.style,y?{boxShadow:y}:m)},onMouseLeave:M=>{Object.assign(M.currentTarget.style,{...$[s],...x})},...w,children:r})},or=i.forwardRef(sr),ar=Object.assign(or,{displayName:"Card"}),ir=({type:t="checkbox",name:r,options:n,selectedValues:s,onChange:c,disabled:a=!1,readOnly:u=!1,required:d=!1,error:g,className:y="",customIcon:v,style:f,labelStyle:p,iconSize:b=20,iconCheckedBgColor:x="#2563eb",iconUncheckedBorderColor:m="#9ca3af",switchBgColor:h="#d1d5db",textColor:w="#374151",errorStyle:l})=>{const k=t==="checkbox",$=t==="radio",j=t==="switch",M=_=>{if(c)if(k){const R=Array.isArray(s)?s.includes(_)?s.filter(O=>O!==_):[...s,_]:[_];c(R)}else c(_)};return e.jsxs("div",{className:y,style:{display:"flex",flexDirection:"column",gap:8,...f},role:t,"aria-disabled":a,children:[n.map(_=>{const R=k?Array.isArray(s)&&s.includes(_.value):s===_.value;return e.jsxs("label",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,gap:8,userSelect:"none",...p},children:[e.jsx("span",{style:{color:w,fontSize:14},children:_.label}),e.jsx("input",{type:j?"checkbox":t,name:r,value:_.value,checked:R,disabled:a||u,required:d,onChange:()=>M(_.value),style:{display:"none"}}),j?e.jsx("span",{style:{position:"relative",width:b*2,height:b*1.1,borderRadius:9999,backgroundColor:R?x:h,transition:"background 0.2s ease",flexShrink:0},children:e.jsx("span",{style:{position:"absolute",top:2,left:R?b:2,width:b-4,height:b-4,borderRadius:"50%",backgroundColor:"#fff",transition:"left 0.2s ease"}})}):v?v(R):e.jsxs("span",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:b,height:b,borderRadius:k?4:"50%",border:`2px solid ${R?x:m}`,backgroundColor:R?x:"transparent",transition:"all 0.2s ease",flexShrink:0},children:[R&&$&&e.jsx("span",{style:{width:b/2,height:b/2,borderRadius:"50%",backgroundColor:"white"}}),R&&k&&e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",style:{width:b*.6,height:b*.6},children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})]})]},_.value)}),g&&e.jsx("p",{role:"alert",style:{color:"#dc2626",fontSize:12,marginTop:4,...l},children:g})]})},lr={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px",full:"100%"},cr=({size:t="lg",padding:r=0,margin:n="0 auto",backgroundColor:s="transparent",center:c=!0,width:a,height:u="auto",borderRadius:d=0,style:g,className:y="",children:v})=>{const f=i.useMemo(()=>{const p=typeof r=="number"?`${r}px`:r,b=c&&n==="0 auto"?"0 auto":n,x=typeof d=="number"?`${d}px`:d;return{maxWidth:a??lr[t],margin:b,padding:p,backgroundColor:s,height:u,borderRadius:x,boxSizing:"border-box",width:a??"100%",...g}},[t,r,n,s,a,u,d,c,g]);return e.jsx("div",{className:y,style:f,children:v})},dr=t=>t<768?"sm":t<1024?"md":"lg",ne=(t,r,n)=>t==null?n:typeof t!="object"?t:t[r]??n,ur=({direction:t={sm:"column",md:"row",lg:"row"},align:r="center",justify:n="space-between",wrap:s="wrap",gap:c=16,padding:a,margin:u,backgroundColor:d="transparent",width:g="100%",maxWidth:y="100%",height:v="auto",borderRadius:f,border:p,boxShadow:b,overflow:x,children:m,style:h,className:w})=>{const[l,k]=i.useState("lg");i.useEffect(()=>{const j=()=>k(dr(window.innerWidth));return j(),window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[]);const $=i.useMemo(()=>{const j=M=>typeof M=="number"?`${M}px`:M;return{display:"flex",flexDirection:ne(t,l,"row"),alignItems:ne(r,l,"center"),justifyContent:ne(n,l,"flex-start"),flexWrap:ne(s,l,"wrap"),gap:j(ne(c,l,void 0)),padding:j(ne(a,l,void 0)),margin:j(ne(u,l,void 0)),backgroundColor:ne(d,l,void 0),width:ne(g,l,"100%"),maxWidth:ne(y,l,void 0),height:ne(v,l,void 0),borderRadius:ne(f,l,void 0),border:ne(p,l,void 0),boxShadow:ne(b,l,void 0),overflow:ne(x,l,void 0),boxSizing:"border-box",...h}},[t,r,n,s,c,a,u,d,g,y,v,f,p,b,x,l,h]);return e.jsx("div",{className:w,style:$,children:m})},fr=t=>t<768?"sm":t<1024?"md":"lg",se=(t,r,n)=>t==null?n:typeof t!="object"?t:t[r]??n,ze=({direction:t={sm:"vertical",md:"horizontal",lg:"horizontal"},gap:r=12,align:n="center",justify:s="flex-start",wrap:c="nowrap",padding:a,margin:u,width:d="100%",maxWidth:g,height:y="auto",backgroundColor:v="transparent",borderRadius:f,border:p,boxShadow:b,overflow:x,className:m,style:h,children:w})=>{const[l,k]=i.useState("lg");i.useEffect(()=>{const j=()=>k(fr(window.innerWidth));return j(),window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[]);const $=i.useMemo(()=>{const j=R=>typeof R=="number"?`${R}px`:R;return{display:"flex",flexDirection:se(t,l,"vertical")==="vertical"?"column":"row",alignItems:se(n,l,"center"),justifyContent:se(s,l,"flex-start"),flexWrap:se(c,l,"nowrap"),gap:j(se(r,l,12)),padding:j(se(a,l,void 0)),margin:j(se(u,l,void 0)),width:se(d,l,"100%"),maxWidth:se(g,l,void 0),height:se(y,l,void 0),backgroundColor:se(v,l,void 0),borderRadius:se(f,l,void 0),border:se(p,l,void 0),boxShadow:se(b,l,void 0),overflow:se(x,l,void 0),boxSizing:"border-box",...h}},[t,r,n,s,c,a,u,d,g,y,v,f,p,b,x,h,l]);return e.jsx("div",{className:m,style:$,children:w})},pr=t=>e.jsx(ze,{direction:"horizontal",...t}),xr=t=>e.jsx(ze,{direction:"vertical",...t}),He=t=>t<768?"sm":t<1024?"md":"lg",hr=({columns:t={sm:1,md:2,lg:3},gap:r=16,padding:n=0,alignItems:s="stretch",justifyItems:c="stretch",backgroundColor:a="transparent",width:u="100%",maxWidth:d="100%",height:g="auto",margin:y=0,style:v,className:f="",children:p})=>{const[b,x]=i.useState("lg");i.useEffect(()=>{x(He(window.innerWidth));const w=()=>x(He(window.innerWidth));return window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[]);const m=i.useMemo(()=>typeof t=="number"?t:t[b]??1,[t,b]),h=i.useMemo(()=>({display:"grid",gridTemplateColumns:`repeat(${m}, 1fr)`,gap:typeof r=="number"?`${r}px`:r,padding:typeof n=="number"?`${n}px`:n,margin:typeof y=="number"?`${y}px`:y,alignItems:s,justifyItems:c,backgroundColor:a,width:u,maxWidth:d,height:g,boxSizing:"border-box",...v}),[m,r,n,y,s,c,a,u,d,g,v]);return e.jsx("div",{style:h,className:f,children:p})},mr=({label:t="Open Drawer",icon:r,iconPosition:n="left",onClick:s,color:c="#2563eb",textColor:a="#fff",borderRadius:u="6px",padding:d="10px 16px",fontSize:g="14px",gap:y="8px",style:v,className:f=""})=>e.jsxs("button",{onClick:s,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:c,color:a,border:"none",borderRadius:u,padding:d,fontSize:g,gap:y,cursor:"pointer",fontWeight:500,transition:"all 0.2s ease",boxShadow:"0 1px 3px rgba(0,0,0,0.1)",...v},className:f,children:[r&&n==="left"&&r,t,r&&n==="right"&&r]}),gr=({open:t,onClose:r,position:n="right",width:s="320px",height:c="320px",backgroundColor:a="#fff",backdropColor:u="rgba(0,0,0,0.5)",transitionDuration:d=300,style:g,className:y="",children:v,showCloseButton:f=!0,closeIconColor:p="#000",closeButtonStyle:b})=>{const[x,m]=i.useState(t);i.useEffect(()=>{t?m(!0):setTimeout(()=>m(!1),d)},[t,d]);const h=i.useMemo(()=>{if(t)return"translate(0, 0)";switch(n){case"left":return"translateX(-100%)";case"right":return"translateX(100%)";case"top":return"translateY(-100%)";case"bottom":return"translateY(100%)";default:return"translate(0, 0)"}},[t,n]),w={position:"fixed",backgroundColor:a,transition:`transform ${d}ms ease, opacity ${d}ms ease`,transform:h,opacity:t?1:0,zIndex:1001,...g,...n==="left"||n==="right"?{top:0,bottom:0,[n]:0,width:s,height:"100%"}:{left:0,right:0,[n]:0,height:c,width:"100%"}},l={position:"fixed",inset:0,backgroundColor:u,opacity:t?1:0,transition:`opacity ${d}ms ease`,zIndex:1e3,display:x?"block":"none",pointerEvents:t?"auto":"none"},k={position:"absolute",top:"12px",right:"12px",background:"none",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease, opacity 0.2s ease"};return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:l,onClick:r}),e.jsxs("div",{style:{...w,display:"flex",flexDirection:"column",visibility:x?"visible":"hidden",pointerEvents:t?"auto":"none",boxShadow:"0 0 20px rgba(0,0,0,0.15)"},className:y,children:[f&&e.jsx("button",{onClick:r,style:{...k,...b},"aria-label":"Close drawer",children:e.jsx(Ie,{size:22,color:p})}),e.jsx("div",{style:{flex:1,overflowY:"auto",padding:"16px",scrollbarWidth:"thin"},children:v})]})]})},yr=({options:t,value:r,defaultValue:n,onChange:s,placeholder:c="Select an option",disabled:a=!1,searchable:u=!1,multiSelect:d=!1,clearable:g=!1,virtualized:y=!1,optionHeight:v=36,visibleOptions:f=5,width:p="100%",height:b="auto",borderColor:x="#d1d5db",focusBorderColor:m="#2563eb",errorBorderColor:h="#dc2626",backgroundColor:w="#ffffff",textColor:l="#111827",placeholderColor:k="#9ca3af",hoverColor:$="#f3f4f6",selectedColor:j="#eff6ff",disabledColor:M="#f3f4f6",padding:_="0.5rem 0.75rem",margin:R="0",borderRadius:O="0.375rem",boxShadow:L="0 1px 2px 0 rgba(0, 0, 0, 0.05)",optionPadding:D="0.5rem 0.75rem",optionGap:C="0.5rem",transitionDuration:P="200ms",dropdownMaxHeight:Y="300px",dropdownMinWidth:z="100%",className:S="",dropdownClassName:H="",optionClassName:V="",inputClassName:U="",style:ae,dropdownStyle:o,optionStyle:T,inputStyle:W,iconPrefix:F,iconSuffix:ee,clearIcon:ie="×",dropdownIcon:B="▼",checkIcon:G="✓",ariaLabel:J,ariaLabelledby:I,ariaDescribedby:E,onFocus:N,onBlur:K,onOpen:Z,onClose:Q})=>{const[oe,de]=i.useState([]),[te,ue]=i.useState(!1),[re,fe]=i.useState(""),[je,Se]=i.useState(null),Te=i.useRef(null),Ae=i.useRef(null),Le=i.useRef([]);i.useEffect(()=>{de(r?d?r.split(","):[r]:n?d?n.split(","):[n]:[])},[r,n,d]);const ce=u?t.filter(A=>A.label.toLowerCase().includes(re.toLowerCase())):t;i.useEffect(()=>{const A=X=>{Te.current&&!Te.current.contains(X.target)&&(ue(!1),Q?.())};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[Q]),i.useEffect(()=>{const A=X=>{if(te)switch(X.key){case"ArrowDown":X.preventDefault(),Se(le=>{const xe=le===null?0:Math.min(le+1,ce.length-1);return Ce(xe),xe});break;case"ArrowUp":X.preventDefault(),Se(le=>{const xe=le===null?0:Math.max(le-1,0);return Ce(xe),xe});break;case"Enter":X.preventDefault(),je!==null&&Ne(ce[je].value);break;case"Escape":X.preventDefault(),ue(!1),Q?.();break;case"Tab":ue(!1),Q?.();break}};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[te,je,ce]);const Ce=i.useCallback(A=>{Le.current[A]?.scrollIntoView({block:"nearest",behavior:"smooth"})},[]),Ne=A=>{let X;d?X=oe.includes(A)?oe.filter(le=>le!==A):[...oe,A]:(X=[A],ue(!1),Q?.()),de(X),s?.(d?X.join(","):A)},tt=A=>{A.stopPropagation(),de([]),s?.(""),fe("")},rt=()=>{if(a)return;const A=!te;ue(A),A?(Z?.(),u&&setTimeout(()=>Ae.current?.focus(),0)):Q?.()},me=t.find(A=>A.value===oe[0]),Pe=t.filter(A=>oe.includes(A.value)),[ge,zr]=i.useState(0),$e=Math.min(f,ce.length),nt=Math.min(ge+$e,ce.length),st=y?ce.slice(ge,nt):ce;return e.jsxs("div",{ref:Te,className:`dropdown-container ${S}`,style:{position:"relative",width:p,margin:R,fontFamily:"'Inter', sans-serif",...ae},children:[e.jsx("style",{children:`
|
|
177
|
+
.dropdown-container {
|
|
178
|
+
--border-color: ${x};
|
|
179
|
+
--focus-border-color: ${m};
|
|
180
|
+
--error-border-color: ${h};
|
|
181
|
+
--bg-color: ${w};
|
|
182
|
+
--text-color: ${l};
|
|
183
|
+
--placeholder-color: ${k};
|
|
184
|
+
--hover-color: ${$};
|
|
185
|
+
--selected-color: ${j};
|
|
186
|
+
--disabled-color: ${M};
|
|
187
|
+
--transition-duration: ${P};
|
|
188
|
+
}
|
|
189
|
+
`}),e.jsxs("div",{role:"button",onClick:rt,"aria-disabled":a,"aria-haspopup":"listbox","aria-expanded":te,"aria-label":J,"aria-labelledby":I,"aria-describedby":E,className:`dropdown-control ${U}`,style:{width:"100%",minHeight:b,padding:_,backgroundColor:a?M:w,color:l,borderWidth:"1px",borderStyle:"solid",borderColor:te?m:x,borderRadius:O,boxShadow:L,display:"flex",alignItems:"center",justifyContent:"space-between",cursor:a?"not-allowed":"pointer",opacity:a?.7:1,transition:`all ${P} ease-in-out`,textAlign:"left",...W,...te&&{boxShadow:`0 0 0 1px ${m}`}},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:C,flex:1,overflow:"hidden"},children:[F&&e.jsx("span",{className:"dropdown-icon-prefix",style:{flexShrink:0},children:F}),d?e.jsx("div",{style:{display:"flex",gap:"0.25rem",flexWrap:"wrap",flex:1,overflow:"hidden"},children:Pe.length>0?Pe.map(A=>e.jsxs("span",{style:{backgroundColor:j,padding:"0.25rem 0.5rem",borderRadius:"0.25rem",fontSize:"0.875rem",display:"flex",alignItems:"center",gap:"0.25rem",flexShrink:0},children:[A.icon&&e.jsx("span",{style:{flexShrink:0},children:A.icon}),e.jsx("span",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:A.label})]},A.value)):e.jsx("span",{style:{color:k},children:c})}):e.jsxs("span",{style:{color:me?l:k,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:C},children:[me?.icon&&e.jsx("span",{style:{flexShrink:0},children:me.icon}),me?me.label:c]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginLeft:"0.5rem",flexShrink:0},children:[g&&oe.length>0&&e.jsx("span",{onClick:tt,style:{cursor:a?"not-allowed":"pointer",fontSize:"1rem",color:l,opacity:.7,display:"flex",alignItems:"center",justifyContent:"center"},"aria-label":"Clear selection",children:ie}),e.jsx("span",{style:{transition:`transform ${P}`,transform:te?"rotate(180deg)":"rotate(0deg)",fontSize:"0.75rem",color:l,opacity:.7},children:B})]})]}),te&&e.jsxs("div",{className:`dropdown-menu ${H}`,style:{position:"absolute",top:"100%",left:0,zIndex:1e3,width:"100%",minWidth:z,maxHeight:Y,overflowY:"auto",backgroundColor:w,border:`1px solid ${x}`,borderRadius:O,boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",marginTop:"0.25rem",transition:`opacity ${P}, transform ${P}`,opacity:0,transform:"translateY(-0.5rem)",animation:`dropdownFadeIn ${P} ease-out forwards`,...o},role:"listbox","aria-multiselectable":d,children:[u&&e.jsx("div",{style:{padding:"0.5rem",borderBottom:`1px solid ${x}`},children:e.jsx("input",{ref:Ae,type:"text",value:re,onChange:A=>fe(A.target.value),placeholder:"Search...",style:{width:"100%",padding:"0.5rem 0.75rem",borderWidth:"1px",borderStyle:"solid",color:l,borderColor:te?m:x,borderRadius:"0.25rem",outline:"none",transition:`border-color ${P}`,...te&&{boxShadow:`0 0 0 1px ${m}`}},onFocus:N,onBlur:K})}),e.jsx("ul",{style:{margin:0,padding:"0.25rem 0",listStyle:"none"},children:ce.length>0?st.map((A,X)=>{const le=oe.includes(A.value),xe=je===(y?ge+X:X),he=A.disabled;return e.jsxs("li",{ref:Oe=>{if(Oe){const ot=y?ge+X:X;Le.current[ot]=Oe}},onClick:()=>!he&&Ne(A.value),onMouseEnter:()=>!he&&Se(y?ge+X:X),className:`dropdown-option ${V} ${he?"disabled":""}`,style:{padding:D,cursor:he?"not-allowed":"pointer",backgroundColor:le?j:xe?$:w,color:he?M:l,display:"flex",alignItems:"center",gap:C,transition:`background-color ${P}`,...T},role:"option","aria-selected":le,"aria-disabled":he,children:[d&&e.jsx("span",{style:{flexShrink:0},children:le?G:"○"}),A.icon&&e.jsx("span",{style:{flexShrink:0},children:A.icon}),e.jsx("span",{style:{flex:1},children:A.label})]},A.value)}):e.jsx("li",{style:{padding:D,color:k,textAlign:"center"},children:"No options found"})}),y&&ce.length>$e&&e.jsx("div",{style:{height:`${(ce.length-$e)*v}px`}})]}),e.jsx("style",{children:`
|
|
190
|
+
@keyframes dropdownFadeIn {
|
|
191
|
+
to {
|
|
192
|
+
opacity: 1;
|
|
193
|
+
transform: translateY(0);
|
|
314
194
|
}
|
|
315
|
-
|
|
195
|
+
}
|
|
196
|
+
`})]})},br=i.forwardRef((t,r)=>{const{type:n="text",label:s,placeholder:c="",name:a="",value:u,defaultValue:d,onChange:g,disabled:y=!1,readOnly:v=!1,required:f=!1,error:p,success:b=!1,autoFocus:x=!1,iconLeft:m,iconRight:h,labelColor:w="#374151",placeholderColor:l="#9ca3af",backgroundColor:k="#ffffff",textColor:$="#111827",borderColor:j="#d1d5db",hoverBorderColor:M="#9ca3af",focusBorderColor:_="#2563eb",errorColor:R="#dc2626",successColor:O="#16a34a",iconColor:L="#6b7280",shadow:D="0 1px 2px rgba(0,0,0,0.05)",size:C="md",fontSize:P="14px",fontFamily:Y="Inter, system-ui, sans-serif",radius:z="8px",rows:S=4,cols:H,maxLength:V,resize:U=!0,showCharacterCount:ae=!0,paddingX:o,paddingY:T,className:W,style:F}=t,ee=i.useRef(null),[ie,B]=i.useState(d||""),[G,J]=i.useState(!1);i.useImperativeHandle(r,()=>ee.current);const I=re=>{const fe=re.target.value;V&&fe.length>V||(B(fe),g&&g(a,fe))},E=u!==void 0?u:ie,N=p?R:b?O:j,K={sm:{paddingY:"6px",paddingX:"10px",font:"13px"},md:{paddingY:"10px",paddingX:"14px",font:"14px"},lg:{paddingY:"14px",paddingX:"18px",font:"16px"}}[C],Z=o||K.paddingX,Q=T||K.paddingY,oe={width:"100%",border:`1px solid ${N}`,borderRadius:z,backgroundColor:k,color:$,fontFamily:Y,fontSize:P,padding:`${Q} ${Z}`,paddingLeft:m?"40px":Z,paddingRight:h||n==="password"?"40px":Z,outline:"none",transition:"border-color 0.25s ease, box-shadow 0.25s ease",resize:n==="textarea"&&!U?"none":void 0,boxShadow:D,...F},de={"::placeholder":{color:l,opacity:1}},te=(re,fe)=>{re&&(re.style.borderColor=fe)},ue={onFocus:re=>te(re.currentTarget,_),onBlur:re=>te(re.currentTarget,N),onMouseEnter:re=>te(re.currentTarget,M),onMouseLeave:re=>te(re.currentTarget,N)};return e.jsxs("div",{className:W,style:{width:"100%",display:"flex",flexDirection:"column",fontFamily:Y},children:[s&&e.jsxs("label",{htmlFor:a,style:{marginBottom:6,color:w,fontWeight:500,fontSize:"14px"},children:[s,f&&e.jsx("span",{style:{color:R},children:" *"})]}),e.jsxs("div",{style:{position:"relative",width:"100%"},children:[m&&e.jsx("span",{style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",color:L,pointerEvents:"none"},children:m}),n==="textarea"?e.jsx("textarea",{ref:ee,name:a,value:E,placeholder:c,disabled:y,readOnly:v,rows:S,cols:H,maxLength:V,autoFocus:x,style:{...oe,...de},onChange:I,...ue}):e.jsx("input",{ref:ee,id:a,type:n==="password"?G?"text":"password":n,name:a,value:E,placeholder:c,disabled:y,readOnly:v,autoFocus:x,style:{...oe,...de},onChange:I,...ue}),n==="password"&&e.jsx("button",{type:"button",onClick:()=>J(!G),style:{position:"absolute",right:10,top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",color:L,padding:0},children:G?e.jsx(bt,{size:18}):e.jsx(wt,{size:18})}),h&&n!=="password"&&e.jsx("span",{style:{position:"absolute",right:12,top:"50%",transform:"translateY(-50%)",color:L,pointerEvents:"none"},children:h})]}),n==="textarea"&&ae&&V&&e.jsxs("div",{style:{textAlign:"right",fontSize:"12px",color:"#6b7280",marginTop:4},children:[E.length,"/",V]}),p&&e.jsx("div",{style:{color:R,fontSize:"12px",marginTop:4},children:p})]})}),vr=({src:t,alt:r="Image",title:n,width:s="100%",height:c="auto",borderRadius:a="8px",borderColor:u="transparent",borderStyle:d="solid",borderWidth:g="0px",shadow:y=!1,boxShadow:v,opacity:f=1,objectFit:p="cover",overlayText:b,overlayColor:x="rgba(0,0,0,0.5)",svgIcon:m,responsive:h=!1,padding:w,margin:l,lazyLoad:k=!0,hoverOpacity:$,hoverShadow:j=!1,hoverScale:M=1,hoverRotate:_=0,transitionDuration:R="0.3s",overflow:O="hidden",className:L,style:D,onClick:C,onLoad:P,onError:Y})=>{const z=i.useMemo(()=>({width:h?"100%":s,height:h?"auto":c,borderRadius:a,border:`${g} ${d} ${u}`,objectFit:p,opacity:f,boxShadow:y?v||"0 4px 12px rgba(0,0,0,0.15)":"none",transition:`all ${R} ease`,display:"block"}),[h,s,c,a,u,d,g,p,f,y,v,R]),S=i.useCallback(U=>{U.currentTarget.style.opacity=$!==void 0?$.toString():"1",U.currentTarget.style.boxShadow=j?"0 8px 20px rgba(0,0,0,0.3)":z.boxShadow||"none",U.currentTarget.style.transform=`scale(${M}) rotate(${_}deg)`},[$,j,M,_,z.boxShadow]),H=i.useCallback(U=>{U.currentTarget.style.opacity=z.opacity?.toString()||"1",U.currentTarget.style.boxShadow=z.boxShadow||"none",U.currentTarget.style.transform="scale(1) rotate(0deg)"},[z]),V=i.useMemo(()=>{switch(O){case"x":return{overflowX:"hidden"};case"y":return{overflowY:"hidden"};default:return{overflow:O}}},[O]);return e.jsxs("div",{className:L,role:"img","aria-label":r,title:n||r,onClick:C,style:{width:h?"100%":s,height:h?"auto":c,padding:w,margin:l,position:"relative",cursor:C?"pointer":"default",display:"inline-block",transition:`all ${R} ease`,...V,...D},children:[m?e.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:m}):e.jsx("img",{src:t,alt:r,title:n||r,loading:k?"lazy":"eager",style:z,onClick:C,onMouseEnter:S,onMouseLeave:H,onLoad:P,onError:Y,decoding:"async",fetchPriority:"high"}),b&&e.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:x,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",fontSize:"1.1rem",textAlign:"center",padding:"1rem",boxSizing:"border-box"},children:b})]})},et=({text:t,icon:r,onClick:n,subItems:s,bulletColor:c="#2563eb",textColor:a="#111827",fontSize:u="15px",fontWeight:d=500,spacing:g="12px",isInline:y=!1})=>{const v={display:"flex",flexDirection:"column",gap:"6px",marginBottom:y?"0":g},f={display:"flex",alignItems:"center",gap:"8px",fontSize:u,fontWeight:d,color:a,cursor:n?"pointer":"default",transition:"color 0.2s ease, transform 0.2s ease"},p={width:"8px",height:"8px",backgroundColor:c,borderRadius:"50%",flexShrink:0},b={listStyleType:"disc",paddingLeft:"20px",margin:0};return e.jsxs("li",{style:v,children:[e.jsxs("div",{style:f,onClick:n,onMouseEnter:x=>x.currentTarget.style.color=c,onMouseLeave:x=>x.currentTarget.style.color=a,children:[r?e.jsx("span",{style:{fontSize:"16px",color:a},children:r}):!y&&e.jsx("span",{style:p}),e.jsx("span",{children:t})]}),s&&s.length>0&&e.jsx("ul",{style:b,children:s.map((x,m)=>e.jsx(et,{...x,bulletColor:c,textColor:a,fontSize:u,fontWeight:d,spacing:g,isInline:!1},m))})]})},wr=({title:t,titleIcon:r,items:n,type:s="unordered",bulletColor:c="#2563eb",textColor:a="#111827",backgroundColor:u="#fff",borderColor:d="#e5e7eb",fontSize:g="15px",fontWeight:y=500,borderRadius:v="12px",padding:f="16px",spacing:p="12px",className:b,style:x})=>{const m=s==="ordered",h=s==="inline",w={backgroundColor:u,borderColor:d,color:a,borderWidth:d?"1px":"0px",borderStyle:"solid",borderRadius:v,padding:f,...x},l=h?{display:"flex",gap:p,paddingLeft:0,listStyleType:"none",margin:0}:{listStyleType:m?"decimal":"none",paddingLeft:m?"20px":"0",margin:0},k=m?"ol":"ul";return e.jsxs("div",{className:b,style:w,children:[t&&e.jsxs("div",{style:{display:"flex",alignItems:"center",fontSize:"17px",fontWeight:600,marginBottom:"10px",gap:"8px"},children:[r&&e.jsx("span",{style:{fontSize:"18px"},children:r}),e.jsx("span",{children:t})]}),e.jsx(k,{style:l,children:n.map(($,j)=>e.jsx(et,{...$,bulletColor:c,textColor:a,fontSize:g,fontWeight:y,spacing:p,isInline:h},j))})]})},jr=({isOpen:t,onClose:r,children:n,ariaLabel:s,title:c,overlayStyle:a,modalStyle:u,closeButtonStyle:d,disableOverlayClose:g=!1,transitionDuration:y=200,className:v})=>{const f=i.useRef(null);i.useEffect(()=>{const h=w=>{w.key==="Escape"&&r()};return t&&document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,r]),i.useEffect(()=>{if(t){const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[t]);const p=i.useCallback(()=>{g||r()},[g,r]);if(!t)return null;const b={position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.6)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3,opacity:t?1:0,transition:`opacity ${y}ms ease`,...a},x={position:"relative",backgroundColor:"#fff",borderRadius:12,width:"90vw",maxWidth:700,maxHeight:"90vh",overflowY:"auto",padding:24,boxShadow:"0 10px 40px rgba(0,0,0,0.25)",transform:t?"scale(1)":"scale(0.95)",transition:`transform ${y}ms ease, opacity ${y}ms ease`,...u},m={position:"absolute",top:16,right:16,background:"transparent",border:"none",cursor:"pointer",padding:4,color:"#444",transition:"color 0.2s ease, transform 0.2s ease",...d};return e.jsx("div",{role:"dialog","aria-modal":"true","aria-label":s||c||"Modal",style:b,onClick:p,className:v,children:e.jsxs("div",{ref:f,style:x,onClick:h=>h.stopPropagation(),children:[e.jsx("button",{onClick:r,"aria-label":"Close modal",style:m,onMouseEnter:h=>{h.currentTarget.style.color="#000",h.currentTarget.style.transform="scale(1.1)"},onMouseLeave:h=>{h.currentTarget.style.color="#444",h.currentTarget.style.transform="scale(1)"},children:e.jsx(Ie,{size:24})}),c&&e.jsx("h2",{style:{fontSize:"1.25rem",fontWeight:600,marginBottom:"1rem"},children:c}),n]})})},kr=({children:t,style:r,className:n})=>e.jsx("table",{className:n,style:{width:"100%",borderCollapse:"collapse",borderSpacing:0,...r},children:t}),Sr=({children:t,style:r,className:n})=>e.jsx("thead",{className:n,style:{backgroundColor:"#f9fafb",borderBottom:"2px solid #e5e7eb",...r},children:t}),Tr=({children:t,style:r,className:n})=>e.jsx("tbody",{className:n,style:r,children:t}),$r=({children:t,style:r,className:n})=>e.jsx("tr",{className:n,style:{borderBottom:"1px solid #e5e7eb",transition:"background 0.2s ease",...r},children:t}),Rr=({children:t,style:r,className:n})=>e.jsx("th",{className:n,style:{textAlign:"left",padding:"12px 16px",fontWeight:600,fontSize:"0.875rem",color:"#374151",...r},children:t}),Er=({children:t,style:r,className:n})=>e.jsx("td",{className:n,style:{padding:"12px 16px",fontSize:"0.875rem",color:"#4b5563",...r},children:t}),Mr=({tabs:t,defaultActive:r=0,position:n="top",variant:s="solid",fullWidth:c=!1,gap:a=8,radius:u=8,padding:d="12px 18px",transitionDuration:g=200,elevation:y=1,bordered:v=!1,primaryColor:f="#2563eb",backgroundColor:p="transparent",textColor:b="#374151",hoverColor:x="#1d4ed8",activeColor:m="#ffffff",borderColor:h="#e5e7eb",disabledColor:w="#9ca3af",responsiveBreakpoint:l=768,showDrawerLabel:k="Select Tab",drawerIcon:$="☰",onTabChange:j,className:M="",style:_,tabClassName:R="",contentClassName:O="",activeTabStyle:L,inactiveTabStyle:D,contentStyle:C})=>{const[P,Y]=i.useState(r),[z,S]=i.useState(null),[H,V]=i.useState(!1),[U,ae]=i.useState(!1),o=i.useRef(null);i.useEffect(()=>{const E=()=>V(window.innerWidth<=l);return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[l]);const T=E=>{t[E].disabled||(Y(E),j?.(E),H&&ae(!1))},W=(E,N)=>{E.key==="ArrowRight"||E.key==="ArrowDown"?(E.preventDefault(),T((N+1)%t.length)):(E.key==="ArrowLeft"||E.key==="ArrowUp")&&(E.preventDefault(),T((N-1+t.length)%t.length))},F={padding:d,borderRadius:u,cursor:"pointer",display:"flex",alignItems:"center",gap:8,justifyContent:"center",fontWeight:500,transition:`all ${g}ms ease`,background:"transparent",border:s==="outline"?`1px solid ${h}`:"none",borderBottom:s==="underline"?"2px solid transparent":void 0,color:b,width:c?"100%":"auto",userSelect:"none"},ee={background:s==="solid"?f:"transparent",color:m,borderBottom:s==="underline"?`2px solid ${f}`:void 0,boxShadow:y>0?`0 ${y}px ${y*4}px ${f}33`:void 0,...L},ie={...s==="outline"?{borderColor:h}:s==="underline"?{borderBottomColor:"transparent"}:{},...D},B={color:x,background:s==="solid"?`${f}11`:s==="outline"?`${f}11`:"transparent"},G={color:w,cursor:"not-allowed",opacity:.6},J={flexGrow:1,borderTop:v&&n==="top"?`1px solid ${h}`:void 0,borderLeft:v&&n==="left"?`1px solid ${h}`:void 0,borderRight:v&&n==="right"?`1px solid ${h}`:void 0,borderRadius:u,...C},I=n==="left"||n==="right";return e.jsxs("div",{ref:o,className:`modern-tabs ${M}`,style:{display:"flex",flexDirection:I?n==="right"?"row-reverse":"row":"column",background:p,border:v?`1px solid ${h}`:void 0,borderRadius:u,overflow:"hidden",..._},children:[e.jsx("style",{children:`
|
|
197
|
+
@keyframes tab-fade {
|
|
198
|
+
from { opacity: 0; transform: translateY(5px); }
|
|
199
|
+
to { opacity: 1; transform: translateY(0); }
|
|
200
|
+
}
|
|
201
|
+
.modern-tabs__content {
|
|
202
|
+
animation: tab-fade ${g}ms ease;
|
|
203
|
+
}
|
|
204
|
+
`}),H?e.jsxs("div",{style:{width:"100%",padding:8},children:[e.jsxs("button",{onClick:()=>ae(!U),style:{...F,...ee,justifyContent:"space-between",width:"100%",fontSize:16},children:[k,e.jsx("span",{children:$})]}),U&&e.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:8,gap:a},children:t.map((E,N)=>{const K=N===P,Z=z===N,Q=E.disabled;return e.jsxs("button",{disabled:Q,onClick:()=>T(N),onKeyDown:oe=>W(oe,N),onMouseEnter:()=>S(N),onMouseLeave:()=>S(null),className:R,style:{...F,...K?ee:ie,...Z&&!K&&!Q?B:{},...Q?G:{}},children:[E.icon&&e.jsx("span",{children:E.icon}),E.label]},N)})})]}):e.jsx("div",{style:{display:"flex",flexDirection:I?"column":"row",gap:a,padding:8,minWidth:I?200:void 0},children:t.map((E,N)=>{const K=N===P,Z=z===N,Q=E.disabled;return e.jsxs("button",{disabled:Q,onClick:()=>T(N),onKeyDown:oe=>W(oe,N),onMouseEnter:()=>S(N),onMouseLeave:()=>S(null),className:R,style:{...F,...K?ee:ie,...Z&&!K&&!Q?B:{},...Q?G:{}},role:"tab","aria-selected":K,children:[E.icon&&e.jsx("span",{children:E.icon}),E.label]},N)})}),e.jsx("div",{className:`modern-tabs__content ${O}`,style:J,role:"tabpanel",children:t[P]?.content})]})};function we(t,r){return"#"+t.replace(/^#/,"").replace(/../g,n=>("0"+Math.min(255,Math.max(0,parseInt(n,16)+r)).toString(16)).slice(-2))}const _r={light:{default:"#111",primary:"#2563eb",secondary:"#64748b",success:"#16a34a",danger:"#dc2626",white:"#ffffff",muted:"#6b7280"},dark:{default:"#f8fafc",primary:"#60a5fa",secondary:"#94a3b8",success:"#22c55e",danger:"#f87171",white:"#ffffff",muted:"#9ca3af"}};function Ir({as:t,children:r,color:n="default",size:s="md",weight:c="normal",align:a="left",transform:u="none",italic:d=!1,underline:g=!1,strikethrough:y=!1,truncate:v=!1,selectable:f=!0,hoverable:p=!1,onClick:b,darkMode:x=!1,baseColor:m,className:h="",style:w={},...l}){const k=t||"p",$=i.useMemo(()=>{if(!m)return _r[x?"dark":"light"];const L={default:"#111",primary:m,secondary:we(m,-50),success:we(m,-30),danger:"#dc2626",white:"#ffffff",muted:"#6b7280"},D={default:"#f8fafc",primary:we(m,80),secondary:we(m,120),success:we(m,100),danger:"#f87171",white:"#ffffff",muted:"#9ca3af"};return x?D:L},[m,x]),j={xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.25rem",xl:"1.5rem","2xl":"2rem"},M={color:$[n]||n,fontSize:j[s]||s,fontWeight:c,textAlign:a,textTransform:u,fontStyle:d?"italic":"normal",textDecoration:g?"underline":y?"line-through":"none",userSelect:f?"text":"none",overflow:v?"hidden":void 0,whiteSpace:v?"nowrap":void 0,textOverflow:v?"ellipsis":void 0,cursor:b?"pointer":"default",transition:"all 0.25s ease-in-out",...w},O={className:h,style:M,onClick:b,onMouseEnter:L=>{if(!p)return;const D=L.currentTarget;D instanceof HTMLElement&&(D.style.opacity="0.8")},onMouseLeave:L=>{if(!p)return;const D=L.currentTarget;D instanceof HTMLElement&&(D.style.opacity="1")},...l};return i.createElement(k,O,r)}exports.Accordion=Je;exports.Alert=Ge;exports.AudioGallery=er;exports.AudioPlayer=Zt;exports.Avatar=Qe;exports.AvatarGroup=Kt;exports.Badge=tr;exports.Button=nr;exports.Card=ar;exports.CheckRadio=ir;exports.Container=cr;exports.Drawer=gr;exports.DrawerButton=mr;exports.Dropdown=yr;exports.Flexbox=ur;exports.GridView=hr;exports.HStack=pr;exports.Image=vr;exports.Input=br;exports.List=wr;exports.Modal=jr;exports.Stack=ze;exports.TBody=Tr;exports.TD=Er;exports.TH=Rr;exports.THead=Sr;exports.TRow=$r;exports.Table=kr;exports.Tabs=Mr;exports.Text=Ir;exports.VStack=xr;
|
|
205
|
+
//# sourceMappingURL=index.cjs.js.map
|