@nextlevel_korea/design-system 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +415 -4
- package/dist/components/Header/Header.d.ts +36 -1
- package/dist/components/Header/Header.d.ts.map +1 -1
- package/dist/components/Header/Header.stories.d.ts +2 -0
- package/dist/components/Header/Header.stories.d.ts.map +1 -1
- package/dist/images/prosite-logo.png +0 -0
- package/dist/index.cjs +4 -4
- package/dist/index.css +1 -0
- package/dist/index.js +466 -151
- package/package.json +1 -1
- package/dist/style.css +0 -1
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
var
|
1
|
+
import te, { useState as O, useRef as oe, useEffect as J } from "react";
|
2
|
+
var W = { exports: {} }, E = {};
|
3
3
|
/**
|
4
4
|
* @license React
|
5
5
|
* react-jsx-runtime.production.js
|
@@ -9,29 +9,29 @@ var S = { exports: {} }, R = {};
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
11
11
|
*/
|
12
|
-
var
|
13
|
-
function
|
14
|
-
if (
|
15
|
-
|
16
|
-
var
|
17
|
-
function
|
18
|
-
var
|
19
|
-
if (
|
20
|
-
|
21
|
-
for (var b in
|
22
|
-
b !== "key" && (
|
23
|
-
} else
|
24
|
-
return
|
25
|
-
$$typeof:
|
26
|
-
type:
|
27
|
-
key:
|
28
|
-
ref:
|
29
|
-
props:
|
12
|
+
var X;
|
13
|
+
function ae() {
|
14
|
+
if (X) return E;
|
15
|
+
X = 1;
|
16
|
+
var f = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
17
|
+
function v(p, c, d) {
|
18
|
+
var u = null;
|
19
|
+
if (d !== void 0 && (u = "" + d), c.key !== void 0 && (u = "" + c.key), "key" in c) {
|
20
|
+
d = {};
|
21
|
+
for (var b in c)
|
22
|
+
b !== "key" && (d[b] = c[b]);
|
23
|
+
} else d = c;
|
24
|
+
return c = d.ref, {
|
25
|
+
$$typeof: f,
|
26
|
+
type: p,
|
27
|
+
key: u,
|
28
|
+
ref: c !== void 0 ? c : null,
|
29
|
+
props: d
|
30
30
|
};
|
31
31
|
}
|
32
|
-
return
|
32
|
+
return E.Fragment = s, E.jsx = v, E.jsxs = v, E;
|
33
33
|
}
|
34
|
-
var
|
34
|
+
var R = {};
|
35
35
|
/**
|
36
36
|
* @license React
|
37
37
|
* react-jsx-runtime.development.js
|
@@ -41,125 +41,125 @@ var _ = {};
|
|
41
41
|
* This source code is licensed under the MIT license found in the
|
42
42
|
* LICENSE file in the root directory of this source tree.
|
43
43
|
*/
|
44
|
-
var
|
45
|
-
function
|
46
|
-
return
|
47
|
-
function
|
44
|
+
var L;
|
45
|
+
function ne() {
|
46
|
+
return L || (L = 1, process.env.NODE_ENV !== "production" && function() {
|
47
|
+
function f(e) {
|
48
48
|
if (e == null) return null;
|
49
49
|
if (typeof e == "function")
|
50
|
-
return e.$$typeof ===
|
50
|
+
return e.$$typeof === K ? null : e.displayName || e.name || null;
|
51
51
|
if (typeof e == "string") return e;
|
52
52
|
switch (e) {
|
53
53
|
case T:
|
54
54
|
return "Fragment";
|
55
|
-
case
|
55
|
+
case P:
|
56
56
|
return "Profiler";
|
57
|
-
case
|
57
|
+
case C:
|
58
58
|
return "StrictMode";
|
59
|
-
case
|
59
|
+
case m:
|
60
60
|
return "Suspense";
|
61
|
-
case
|
61
|
+
case N:
|
62
62
|
return "SuspenseList";
|
63
|
-
case
|
63
|
+
case Q:
|
64
64
|
return "Activity";
|
65
65
|
}
|
66
66
|
if (typeof e == "object")
|
67
67
|
switch (typeof e.tag == "number" && console.error(
|
68
68
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
69
69
|
), e.$$typeof) {
|
70
|
-
case
|
70
|
+
case t:
|
71
71
|
return "Portal";
|
72
|
-
case
|
72
|
+
case _:
|
73
73
|
return (e.displayName || "Context") + ".Provider";
|
74
|
-
case
|
74
|
+
case $:
|
75
75
|
return (e._context.displayName || "Context") + ".Consumer";
|
76
|
-
case
|
77
|
-
var
|
78
|
-
return e = e.displayName, e || (e =
|
79
|
-
case
|
80
|
-
return
|
81
|
-
case
|
82
|
-
|
76
|
+
case a:
|
77
|
+
var o = e.render;
|
78
|
+
return e = e.displayName, e || (e = o.displayName || o.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
79
|
+
case Z:
|
80
|
+
return o = e.displayName || null, o !== null ? o : f(e.type) || "Memo";
|
81
|
+
case I:
|
82
|
+
o = e._payload, e = e._init;
|
83
83
|
try {
|
84
|
-
return
|
84
|
+
return f(e(o));
|
85
85
|
} catch {
|
86
86
|
}
|
87
87
|
}
|
88
88
|
return null;
|
89
89
|
}
|
90
|
-
function
|
90
|
+
function s(e) {
|
91
91
|
return "" + e;
|
92
92
|
}
|
93
|
-
function
|
93
|
+
function v(e) {
|
94
94
|
try {
|
95
|
-
|
96
|
-
var
|
95
|
+
s(e);
|
96
|
+
var o = !1;
|
97
97
|
} catch {
|
98
|
-
|
98
|
+
o = !0;
|
99
99
|
}
|
100
|
-
if (
|
101
|
-
|
102
|
-
var
|
103
|
-
return
|
104
|
-
|
100
|
+
if (o) {
|
101
|
+
o = console;
|
102
|
+
var n = o.error, l = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
103
|
+
return n.call(
|
104
|
+
o,
|
105
105
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
106
|
-
|
107
|
-
),
|
106
|
+
l
|
107
|
+
), s(e);
|
108
108
|
}
|
109
109
|
}
|
110
|
-
function
|
110
|
+
function p(e) {
|
111
111
|
if (e === T) return "<>";
|
112
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
112
|
+
if (typeof e == "object" && e !== null && e.$$typeof === I)
|
113
113
|
return "<...>";
|
114
114
|
try {
|
115
|
-
var
|
116
|
-
return
|
115
|
+
var o = f(e);
|
116
|
+
return o ? "<" + o + ">" : "<...>";
|
117
117
|
} catch {
|
118
118
|
return "<...>";
|
119
119
|
}
|
120
120
|
}
|
121
|
-
function
|
122
|
-
var e =
|
121
|
+
function c() {
|
122
|
+
var e = B.A;
|
123
123
|
return e === null ? null : e.getOwner();
|
124
124
|
}
|
125
|
-
function
|
125
|
+
function d() {
|
126
126
|
return Error("react-stack-top-frame");
|
127
127
|
}
|
128
|
-
function
|
129
|
-
if (
|
130
|
-
var
|
131
|
-
if (
|
128
|
+
function u(e) {
|
129
|
+
if (H.call(e, "key")) {
|
130
|
+
var o = Object.getOwnPropertyDescriptor(e, "key").get;
|
131
|
+
if (o && o.isReactWarning) return !1;
|
132
132
|
}
|
133
133
|
return e.key !== void 0;
|
134
134
|
}
|
135
|
-
function b(e,
|
136
|
-
function
|
137
|
-
|
135
|
+
function b(e, o) {
|
136
|
+
function n() {
|
137
|
+
z || (z = !0, console.error(
|
138
138
|
"%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)",
|
139
|
-
|
139
|
+
o
|
140
140
|
));
|
141
141
|
}
|
142
|
-
|
143
|
-
get:
|
142
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
143
|
+
get: n,
|
144
144
|
configurable: !0
|
145
145
|
});
|
146
146
|
}
|
147
|
-
function
|
148
|
-
var e =
|
149
|
-
return
|
147
|
+
function j() {
|
148
|
+
var e = f(this.type);
|
149
|
+
return G[e] || (G[e] = !0, console.error(
|
150
150
|
"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."
|
151
151
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
152
152
|
}
|
153
|
-
function
|
154
|
-
return
|
155
|
-
$$typeof:
|
153
|
+
function S(e, o, n, l, g, x, Y, M) {
|
154
|
+
return n = x.ref, e = {
|
155
|
+
$$typeof: A,
|
156
156
|
type: e,
|
157
|
-
key:
|
158
|
-
props:
|
159
|
-
_owner:
|
160
|
-
}, (
|
157
|
+
key: o,
|
158
|
+
props: x,
|
159
|
+
_owner: g
|
160
|
+
}, (n !== void 0 ? n : null) !== null ? Object.defineProperty(e, "ref", {
|
161
161
|
enumerable: !1,
|
162
|
-
get:
|
162
|
+
get: j
|
163
163
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
164
164
|
configurable: !1,
|
165
165
|
enumerable: !1,
|
@@ -174,113 +174,428 @@ function te() {
|
|
174
174
|
configurable: !1,
|
175
175
|
enumerable: !1,
|
176
176
|
writable: !0,
|
177
|
-
value:
|
177
|
+
value: Y
|
178
178
|
}), Object.defineProperty(e, "_debugTask", {
|
179
179
|
configurable: !1,
|
180
180
|
enumerable: !1,
|
181
181
|
writable: !0,
|
182
|
-
value:
|
182
|
+
value: M
|
183
183
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
184
184
|
}
|
185
|
-
function
|
186
|
-
var
|
187
|
-
if (
|
188
|
-
if (
|
189
|
-
if (
|
190
|
-
for (
|
191
|
-
w(
|
192
|
-
Object.freeze && Object.freeze(
|
185
|
+
function k(e, o, n, l, g, x, Y, M) {
|
186
|
+
var i = o.children;
|
187
|
+
if (i !== void 0)
|
188
|
+
if (l)
|
189
|
+
if (ee(i)) {
|
190
|
+
for (l = 0; l < i.length; l++)
|
191
|
+
w(i[l]);
|
192
|
+
Object.freeze && Object.freeze(i);
|
193
193
|
} else
|
194
194
|
console.error(
|
195
195
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
196
196
|
);
|
197
|
-
else w(
|
198
|
-
if (
|
199
|
-
|
200
|
-
var
|
201
|
-
return
|
197
|
+
else w(i);
|
198
|
+
if (H.call(o, "key")) {
|
199
|
+
i = f(e);
|
200
|
+
var y = Object.keys(o).filter(function(re) {
|
201
|
+
return re !== "key";
|
202
202
|
});
|
203
|
-
|
203
|
+
l = 0 < y.length ? "{key: someKey, " + y.join(": ..., ") + ": ...}" : "{key: someKey}", q[i + l] || (y = 0 < y.length ? "{" + y.join(": ..., ") + ": ...}" : "{}", console.error(
|
204
204
|
`A props object containing a "key" prop is being spread into JSX:
|
205
205
|
let props = %s;
|
206
206
|
<%s {...props} />
|
207
207
|
React keys must be passed directly to JSX without using spread:
|
208
208
|
let props = %s;
|
209
209
|
<%s key={someKey} {...props} />`,
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
),
|
210
|
+
l,
|
211
|
+
i,
|
212
|
+
y,
|
213
|
+
i
|
214
|
+
), q[i + l] = !0);
|
215
215
|
}
|
216
|
-
if (
|
217
|
-
|
218
|
-
for (var
|
219
|
-
|
220
|
-
} else
|
221
|
-
return
|
222
|
-
|
216
|
+
if (i = null, n !== void 0 && (v(n), i = "" + n), u(o) && (v(o.key), i = "" + o.key), "key" in o) {
|
217
|
+
n = {};
|
218
|
+
for (var F in o)
|
219
|
+
F !== "key" && (n[F] = o[F]);
|
220
|
+
} else n = o;
|
221
|
+
return i && b(
|
222
|
+
n,
|
223
223
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
224
|
-
),
|
224
|
+
), S(
|
225
225
|
e,
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
226
|
+
i,
|
227
|
+
x,
|
228
|
+
g,
|
229
|
+
c(),
|
230
|
+
n,
|
231
|
+
Y,
|
232
|
+
M
|
233
233
|
);
|
234
234
|
}
|
235
235
|
function w(e) {
|
236
|
-
typeof e == "object" && e !== null && e.$$typeof ===
|
236
|
+
typeof e == "object" && e !== null && e.$$typeof === A && e._store && (e._store.validated = 1);
|
237
237
|
}
|
238
|
-
var
|
238
|
+
var h = te, A = Symbol.for("react.transitional.element"), t = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), N = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), Q = Symbol.for("react.activity"), K = Symbol.for("react.client.reference"), B = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, H = Object.prototype.hasOwnProperty, ee = Array.isArray, D = console.createTask ? console.createTask : function() {
|
239
239
|
return null;
|
240
240
|
};
|
241
|
-
|
241
|
+
h = {
|
242
242
|
"react-stack-bottom-frame": function(e) {
|
243
243
|
return e();
|
244
244
|
}
|
245
245
|
};
|
246
|
-
var
|
247
|
-
|
248
|
-
|
249
|
-
)(),
|
250
|
-
|
251
|
-
var
|
252
|
-
return
|
246
|
+
var z, G = {}, U = h["react-stack-bottom-frame"].bind(
|
247
|
+
h,
|
248
|
+
d
|
249
|
+
)(), V = D(p(d)), q = {};
|
250
|
+
R.Fragment = T, R.jsx = function(e, o, n, l, g) {
|
251
|
+
var x = 1e4 > B.recentlyCreatedOwnerStacks++;
|
252
|
+
return k(
|
253
253
|
e,
|
254
|
-
|
255
|
-
t,
|
256
|
-
!1,
|
254
|
+
o,
|
257
255
|
n,
|
256
|
+
!1,
|
258
257
|
l,
|
259
|
-
|
260
|
-
|
258
|
+
g,
|
259
|
+
x ? Error("react-stack-top-frame") : U,
|
260
|
+
x ? D(p(e)) : V
|
261
261
|
);
|
262
|
-
},
|
263
|
-
var
|
264
|
-
return
|
262
|
+
}, R.jsxs = function(e, o, n, l, g) {
|
263
|
+
var x = 1e4 > B.recentlyCreatedOwnerStacks++;
|
264
|
+
return k(
|
265
265
|
e,
|
266
|
-
|
267
|
-
t,
|
268
|
-
!0,
|
266
|
+
o,
|
269
267
|
n,
|
268
|
+
!0,
|
270
269
|
l,
|
271
|
-
|
272
|
-
|
270
|
+
g,
|
271
|
+
x ? Error("react-stack-top-frame") : U,
|
272
|
+
x ? D(p(e)) : V
|
273
273
|
);
|
274
274
|
};
|
275
|
-
}()),
|
275
|
+
}()), R;
|
276
276
|
}
|
277
|
-
process.env.NODE_ENV === "production" ?
|
278
|
-
var
|
279
|
-
const
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
277
|
+
process.env.NODE_ENV === "production" ? W.exports = ae() : W.exports = ne();
|
278
|
+
var r = W.exports;
|
279
|
+
const le = ({
|
280
|
+
logo: f,
|
281
|
+
navList: s,
|
282
|
+
colors: v,
|
283
|
+
sidebarPosition: p = "left"
|
284
|
+
}) => {
|
285
|
+
const [c, d] = O(null), [u, b] = O(!1), [j, S] = O(
|
286
|
+
null
|
287
|
+
), [k, w] = O(!1), h = oe(null), t = { ...{
|
288
|
+
headerBg: "bg-white",
|
289
|
+
sidebarBg: "bg-white",
|
290
|
+
sidebarGradientFrom: "from-white",
|
291
|
+
sidebarGradientTo: "to-gray-50",
|
292
|
+
dropdownBg: "bg-white",
|
293
|
+
submenuBg: "bg-gray-50/50",
|
294
|
+
titleText: "bg-gradient-to-r from-primary to-primary-dark bg-clip-text text-transparent",
|
295
|
+
navText: "text-gray-600",
|
296
|
+
navTextHover: "hover:text-primary",
|
297
|
+
sidebarTitleText: "bg-gradient-to-r from-gray-800 to-gray-600 bg-clip-text text-transparent",
|
298
|
+
sidebarNavText: "text-gray-700",
|
299
|
+
sidebarNavTextHover: "hover:text-primary",
|
300
|
+
submenuText: "text-gray-600",
|
301
|
+
submenuTextHover: "hover:text-primary",
|
302
|
+
primary: "bg-primary",
|
303
|
+
primaryDark: "bg-primary-dark",
|
304
|
+
accent: "bg-primary",
|
305
|
+
border: "border-gray-100",
|
306
|
+
dropdownBorder: "border-gray-200",
|
307
|
+
shadow: "shadow-sm",
|
308
|
+
sidebarShadow: "shadow-2xl",
|
309
|
+
overlayBg: "bg-black",
|
310
|
+
overlayOpacity: "bg-opacity-50"
|
311
|
+
}, ...v || {} }, T = (a) => {
|
312
|
+
d(c === a ? null : a);
|
313
|
+
}, C = (a) => {
|
314
|
+
S(j === a ? null : a);
|
315
|
+
}, P = () => {
|
316
|
+
w(!0), b(!u);
|
317
|
+
}, $ = () => {
|
318
|
+
w(!0), b(!1);
|
319
|
+
}, _ = () => {
|
320
|
+
w(!1), b(!1);
|
321
|
+
};
|
322
|
+
return J(() => {
|
323
|
+
const a = (m) => {
|
324
|
+
h.current && !h.current.contains(m.target) && d(null);
|
325
|
+
};
|
326
|
+
return document.addEventListener("mousedown", a), () => {
|
327
|
+
document.removeEventListener("mousedown", a);
|
328
|
+
};
|
329
|
+
}, []), J(() => (u ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset", () => {
|
330
|
+
document.body.style.overflow = "unset";
|
331
|
+
}), [u]), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
332
|
+
/* @__PURE__ */ r.jsx(
|
333
|
+
"header",
|
334
|
+
{
|
335
|
+
className: `w-full ${t.headerBg} ${t.shadow} border-b ${t.border} sticky top-0 z-99`,
|
336
|
+
children: /* @__PURE__ */ r.jsxs("div", { className: "w-full max-w-[1240px] px-5 mx-auto flex items-center justify-between h-14 md:h-16", children: [
|
337
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex items-center space-x-4", children: f && /* @__PURE__ */ r.jsx("a", { href: "/", children: /* @__PURE__ */ r.jsx(
|
338
|
+
"img",
|
339
|
+
{
|
340
|
+
src: f,
|
341
|
+
alt: "Logo",
|
342
|
+
className: "h-7 w-auto object-contain md:h-8 cursor-pointer"
|
343
|
+
}
|
344
|
+
) }) }),
|
345
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center space-x-6", ref: h, children: [
|
346
|
+
/* @__PURE__ */ r.jsx("nav", { className: "hidden md:flex items-center space-x-6", children: s == null ? void 0 : s.map((a) => {
|
347
|
+
var m;
|
348
|
+
return /* @__PURE__ */ r.jsxs("div", { className: "relative", children: [
|
349
|
+
/* @__PURE__ */ r.jsx(
|
350
|
+
"button",
|
351
|
+
{
|
352
|
+
onClick: () => a.sub ? T(a.idx) : void 0,
|
353
|
+
className: `${t.navText} ${t.navTextHover} transition-colors duration-200 font-medium flex items-center`,
|
354
|
+
children: a.sub ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
355
|
+
a.name,
|
356
|
+
/* @__PURE__ */ r.jsx(
|
357
|
+
"svg",
|
358
|
+
{
|
359
|
+
className: "w-4 h-4 ml-1",
|
360
|
+
fill: "none",
|
361
|
+
stroke: "currentColor",
|
362
|
+
viewBox: "0 0 24 24",
|
363
|
+
children: /* @__PURE__ */ r.jsx(
|
364
|
+
"path",
|
365
|
+
{
|
366
|
+
strokeLinecap: "round",
|
367
|
+
strokeLinejoin: "round",
|
368
|
+
strokeWidth: 2,
|
369
|
+
d: "M19 9l-7 7-7-7"
|
370
|
+
}
|
371
|
+
)
|
372
|
+
}
|
373
|
+
)
|
374
|
+
] }) : /* @__PURE__ */ r.jsx("a", { href: a.path, children: a.name })
|
375
|
+
}
|
376
|
+
),
|
377
|
+
/* @__PURE__ */ r.jsxs(
|
378
|
+
"div",
|
379
|
+
{
|
380
|
+
className: `absolute top-[44px] min-w-[100px] w-auto ${t.dropdownBg} border ${t.dropdownBorder} rounded-lg shadow-lg z-50 transition-all duration-300 ease-in-out transform ${a.idx === (s == null ? void 0 : s.length) ? "right-0" : "left-1/2 transform -translate-x-1/2"} ${c === a.idx ? "opacity-100 translate-y-0 pointer-events-auto" : "opacity-0 -translate-y-2 pointer-events-none"}`,
|
381
|
+
children: [
|
382
|
+
/* @__PURE__ */ r.jsx(
|
383
|
+
"div",
|
384
|
+
{
|
385
|
+
className: `absolute -top-2 w-4 h-4 ${t.dropdownBg} border-l border-t ${t.dropdownBorder} transform rotate-45 ${a.idx === (s == null ? void 0 : s.length) ? "right-4" : "left-1/2 -translate-x-1/2"}`
|
386
|
+
}
|
387
|
+
),
|
388
|
+
/* @__PURE__ */ r.jsx("div", { className: "py-2", children: (m = a.sub) == null ? void 0 : m.map((N) => /* @__PURE__ */ r.jsx(
|
389
|
+
"a",
|
390
|
+
{
|
391
|
+
href: N.path,
|
392
|
+
className: `block px-4 py-2 text-sm whitespace-nowrap ${t.submenuText} hover:bg-gray-100 ${t.submenuTextHover} transition-colors duration-200`,
|
393
|
+
onClick: () => d(null),
|
394
|
+
children: N.name
|
395
|
+
},
|
396
|
+
N.idx
|
397
|
+
)) })
|
398
|
+
]
|
399
|
+
}
|
400
|
+
)
|
401
|
+
] }, a.idx);
|
402
|
+
}) }),
|
403
|
+
/* @__PURE__ */ r.jsx(
|
404
|
+
"button",
|
405
|
+
{
|
406
|
+
className: `md:hidden p-2 rounded-lg ${t.navText} hover:bg-gray-100 transition-colors duration-200`,
|
407
|
+
onClick: P,
|
408
|
+
children: /* @__PURE__ */ r.jsx(
|
409
|
+
"svg",
|
410
|
+
{
|
411
|
+
className: "w-6 h-6",
|
412
|
+
fill: "none",
|
413
|
+
stroke: "currentColor",
|
414
|
+
viewBox: "0 0 24 24",
|
415
|
+
children: /* @__PURE__ */ r.jsx(
|
416
|
+
"path",
|
417
|
+
{
|
418
|
+
strokeLinecap: "round",
|
419
|
+
strokeLinejoin: "round",
|
420
|
+
strokeWidth: 2,
|
421
|
+
d: "M4 6h16M4 12h16M4 18h16"
|
422
|
+
}
|
423
|
+
)
|
424
|
+
}
|
425
|
+
)
|
426
|
+
}
|
427
|
+
)
|
428
|
+
] })
|
429
|
+
] })
|
430
|
+
}
|
431
|
+
),
|
432
|
+
/* @__PURE__ */ r.jsx(
|
433
|
+
"div",
|
434
|
+
{
|
435
|
+
className: `fixed inset-0 ${t.overlayBg} z-50 md:hidden ${u ? `${t.overlayOpacity} backdrop-blur-sm` : "bg-opacity-0 backdrop-blur-none pointer-events-none"} ${k ? "transition-all duration-300 ease-in-out" : ""}`,
|
436
|
+
onClick: $
|
437
|
+
}
|
438
|
+
),
|
439
|
+
/* @__PURE__ */ r.jsx(
|
440
|
+
"div",
|
441
|
+
{
|
442
|
+
className: `fixed top-0 ${p === "left" ? "left-0" : "right-0"} h-full w-4/5 xsm:w-80 ${t.sidebarBg} ${t.sidebarShadow} transform z-50 md:hidden ${u ? "translate-x-0" : p === "left" ? "-translate-x-full" : "translate-x-full"} ${k ? "transition-all duration-300 ease-in-out" : ""}`,
|
443
|
+
children: /* @__PURE__ */ r.jsxs(
|
444
|
+
"div",
|
445
|
+
{
|
446
|
+
className: `flex flex-col h-full bg-gradient-to-b ${t.sidebarGradientFrom} ${t.sidebarGradientTo}`,
|
447
|
+
children: [
|
448
|
+
/* @__PURE__ */ r.jsxs(
|
449
|
+
"div",
|
450
|
+
{
|
451
|
+
className: `flex items-center justify-between p-4 border-b ${t.border} ${t.sidebarBg}/80 backdrop-blur-sm`,
|
452
|
+
children: [
|
453
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center space-x-3", children: [
|
454
|
+
/* @__PURE__ */ r.jsx(
|
455
|
+
"div",
|
456
|
+
{
|
457
|
+
className: `w-2 h-8 bg-gradient-to-b ${t.primary} ${t.primaryDark} rounded-full`
|
458
|
+
}
|
459
|
+
),
|
460
|
+
/* @__PURE__ */ r.jsx(
|
461
|
+
"h2",
|
462
|
+
{
|
463
|
+
className: `text-xl font-bold ${t.sidebarTitleText}`,
|
464
|
+
children: "Menu"
|
465
|
+
}
|
466
|
+
)
|
467
|
+
] }),
|
468
|
+
/* @__PURE__ */ r.jsx(
|
469
|
+
"button",
|
470
|
+
{
|
471
|
+
onClick: $,
|
472
|
+
className: "p-2 rounded-full text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-all duration-200",
|
473
|
+
children: /* @__PURE__ */ r.jsx(
|
474
|
+
"svg",
|
475
|
+
{
|
476
|
+
className: "w-5 h-5",
|
477
|
+
fill: "none",
|
478
|
+
stroke: "currentColor",
|
479
|
+
viewBox: "0 0 24 24",
|
480
|
+
children: /* @__PURE__ */ r.jsx(
|
481
|
+
"path",
|
482
|
+
{
|
483
|
+
strokeLinecap: "round",
|
484
|
+
strokeLinejoin: "round",
|
485
|
+
strokeWidth: 2,
|
486
|
+
d: "M6 18L18 6M6 6l12 12"
|
487
|
+
}
|
488
|
+
)
|
489
|
+
}
|
490
|
+
)
|
491
|
+
}
|
492
|
+
)
|
493
|
+
]
|
494
|
+
}
|
495
|
+
),
|
496
|
+
/* @__PURE__ */ r.jsx("nav", { className: "flex-1 overflow-y-auto ", children: /* @__PURE__ */ r.jsx("ul", { className: "", children: s == null ? void 0 : s.map((a) => /* @__PURE__ */ r.jsx("li", { children: a.sub ? /* @__PURE__ */ r.jsxs(
|
497
|
+
"div",
|
498
|
+
{
|
499
|
+
className: `${t.dropdownBg} ${t.shadow} border-b ${t.border} overflow-hidden`,
|
500
|
+
children: [
|
501
|
+
/* @__PURE__ */ r.jsxs(
|
502
|
+
"button",
|
503
|
+
{
|
504
|
+
onClick: () => C(a.idx),
|
505
|
+
className: `w-full flex items-center justify-between p-4 text-left ${t.sidebarNavText} hover:bg-gray-50 transition-all duration-200 group`,
|
506
|
+
children: [
|
507
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center space-x-3", children: [
|
508
|
+
/* @__PURE__ */ r.jsx(
|
509
|
+
"div",
|
510
|
+
{
|
511
|
+
className: `w-1.5 h-1.5 ${t.accent} rounded-full opacity-60 group-hover:opacity-100 transition-opacity duration-200`
|
512
|
+
}
|
513
|
+
),
|
514
|
+
/* @__PURE__ */ r.jsx(
|
515
|
+
"span",
|
516
|
+
{
|
517
|
+
className: `font-semibold text-gray-800 ${t.sidebarNavTextHover} transition-colors duration-200`,
|
518
|
+
children: a.name
|
519
|
+
}
|
520
|
+
)
|
521
|
+
] }),
|
522
|
+
/* @__PURE__ */ r.jsx(
|
523
|
+
"svg",
|
524
|
+
{
|
525
|
+
className: `shrink-0 w-4 h-4 text-gray-400 transition-all duration-200 ${j === a.idx ? "rotate-180 text-primary" : "group-hover:text-gray-600"}`,
|
526
|
+
fill: "none",
|
527
|
+
stroke: "currentColor",
|
528
|
+
viewBox: "0 0 24 24",
|
529
|
+
children: /* @__PURE__ */ r.jsx(
|
530
|
+
"path",
|
531
|
+
{
|
532
|
+
strokeLinecap: "round",
|
533
|
+
strokeLinejoin: "round",
|
534
|
+
strokeWidth: 2,
|
535
|
+
d: "M19 9l-7 7-7-7"
|
536
|
+
}
|
537
|
+
)
|
538
|
+
}
|
539
|
+
)
|
540
|
+
]
|
541
|
+
}
|
542
|
+
),
|
543
|
+
/* @__PURE__ */ r.jsx(
|
544
|
+
"div",
|
545
|
+
{
|
546
|
+
className: `overflow-hidden transition-all duration-300 ease-in-out ${j === a.idx ? "max-h-96 opacity-100" : "max-h-0 opacity-0"}`,
|
547
|
+
children: /* @__PURE__ */ r.jsx(
|
548
|
+
"div",
|
549
|
+
{
|
550
|
+
className: `${t.submenuBg} border-t ${t.border}`,
|
551
|
+
children: /* @__PURE__ */ r.jsx("ul", { className: "py-2", children: a.sub.map((m) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsxs(
|
552
|
+
"a",
|
553
|
+
{
|
554
|
+
href: m.path,
|
555
|
+
className: `px-6 py-3 text-sm ${t.submenuText} hover:bg-white ${t.submenuTextHover} transition-all duration-200 flex items-center space-x-2 group`,
|
556
|
+
onClick: _,
|
557
|
+
children: [
|
558
|
+
/* @__PURE__ */ r.jsx("div", { className: "w-1 h-1 bg-gray-300 rounded-full group-hover:bg-primary transition-colors duration-200" }),
|
559
|
+
/* @__PURE__ */ r.jsx("span", { children: m.name })
|
560
|
+
]
|
561
|
+
}
|
562
|
+
) }, m.idx)) })
|
563
|
+
}
|
564
|
+
)
|
565
|
+
}
|
566
|
+
)
|
567
|
+
]
|
568
|
+
}
|
569
|
+
) : /* @__PURE__ */ r.jsx(
|
570
|
+
"a",
|
571
|
+
{
|
572
|
+
href: a.path,
|
573
|
+
className: `block p-4 ${t.sidebarNavText} hover:bg-white ${t.sidebarNavTextHover} transition-all duration-200 font-semibold ${t.dropdownBg} ${t.shadow} border-b ${t.border} group`,
|
574
|
+
onClick: _,
|
575
|
+
children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center space-x-3", children: [
|
576
|
+
/* @__PURE__ */ r.jsx(
|
577
|
+
"div",
|
578
|
+
{
|
579
|
+
className: `w-1.5 h-1.5 ${t.accent} rounded-full opacity-60 group-hover:opacity-100 transition-opacity duration-200`
|
580
|
+
}
|
581
|
+
),
|
582
|
+
/* @__PURE__ */ r.jsx(
|
583
|
+
"span",
|
584
|
+
{
|
585
|
+
className: `text-gray-800 ${t.sidebarNavTextHover} transition-colors duration-200`,
|
586
|
+
children: a.name
|
587
|
+
}
|
588
|
+
)
|
589
|
+
] })
|
590
|
+
}
|
591
|
+
) }, a.idx)) }) })
|
592
|
+
]
|
593
|
+
}
|
594
|
+
)
|
595
|
+
}
|
596
|
+
)
|
597
|
+
] });
|
598
|
+
};
|
284
599
|
export {
|
285
|
-
|
600
|
+
le as Header
|
286
601
|
};
|