@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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import ee from "react";
2
- var S = { exports: {} }, R = {};
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 F;
13
- function re() {
14
- if (F) return R;
15
- F = 1;
16
- var s = Symbol.for("react.transitional.element"), i = Symbol.for("react.fragment");
17
- function d(m, o, c) {
18
- var E = null;
19
- if (c !== void 0 && (E = "" + c), o.key !== void 0 && (E = "" + o.key), "key" in o) {
20
- c = {};
21
- for (var b in o)
22
- b !== "key" && (c[b] = o[b]);
23
- } else c = o;
24
- return o = c.ref, {
25
- $$typeof: s,
26
- type: m,
27
- key: E,
28
- ref: o !== void 0 ? o : null,
29
- props: c
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 R.Fragment = i, R.jsx = d, R.jsxs = d, R;
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 D;
45
- function te() {
46
- return D || (D = 1, process.env.NODE_ENV !== "production" && function() {
47
- function s(e) {
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 === Z ? null : e.displayName || e.name || null;
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 z:
55
+ case P:
56
56
  return "Profiler";
57
- case U:
57
+ case C:
58
58
  return "StrictMode";
59
- case J:
59
+ case m:
60
60
  return "Suspense";
61
- case X:
61
+ case N:
62
62
  return "SuspenseList";
63
- case B:
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 W:
70
+ case t:
71
71
  return "Portal";
72
- case q:
72
+ case _:
73
73
  return (e.displayName || "Context") + ".Provider";
74
- case V:
74
+ case $:
75
75
  return (e._context.displayName || "Context") + ".Consumer";
76
- case G:
77
- var r = e.render;
78
- return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
79
- case H:
80
- return r = e.displayName || null, r !== null ? r : s(e.type) || "Memo";
81
- case g:
82
- r = e._payload, e = e._init;
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 s(e(r));
84
+ return f(e(o));
85
85
  } catch {
86
86
  }
87
87
  }
88
88
  return null;
89
89
  }
90
- function i(e) {
90
+ function s(e) {
91
91
  return "" + e;
92
92
  }
93
- function d(e) {
93
+ function v(e) {
94
94
  try {
95
- i(e);
96
- var r = !1;
95
+ s(e);
96
+ var o = !1;
97
97
  } catch {
98
- r = !0;
98
+ o = !0;
99
99
  }
100
- if (r) {
101
- r = console;
102
- var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
103
- return t.call(
104
- r,
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
- n
107
- ), i(e);
106
+ l
107
+ ), s(e);
108
108
  }
109
109
  }
110
- function m(e) {
110
+ function p(e) {
111
111
  if (e === T) return "<>";
112
- if (typeof e == "object" && e !== null && e.$$typeof === g)
112
+ if (typeof e == "object" && e !== null && e.$$typeof === I)
113
113
  return "<...>";
114
114
  try {
115
- var r = s(e);
116
- return r ? "<" + r + ">" : "<...>";
115
+ var o = f(e);
116
+ return o ? "<" + o + ">" : "<...>";
117
117
  } catch {
118
118
  return "<...>";
119
119
  }
120
120
  }
121
- function o() {
122
- var e = p.A;
121
+ function c() {
122
+ var e = B.A;
123
123
  return e === null ? null : e.getOwner();
124
124
  }
125
- function c() {
125
+ function d() {
126
126
  return Error("react-stack-top-frame");
127
127
  }
128
- function E(e) {
129
- if (N.call(e, "key")) {
130
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
131
- if (r && r.isReactWarning) return !1;
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, r) {
136
- function t() {
137
- y || (y = !0, console.error(
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
- r
139
+ o
140
140
  ));
141
141
  }
142
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
143
- get: t,
142
+ n.isReactWarning = !0, Object.defineProperty(e, "key", {
143
+ get: n,
144
144
  configurable: !0
145
145
  });
146
146
  }
147
- function L() {
148
- var e = s(this.type);
149
- return C[e] || (C[e] = !0, console.error(
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 M(e, r, t, n, l, u, O, A) {
154
- return t = u.ref, e = {
155
- $$typeof: h,
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: r,
158
- props: u,
159
- _owner: l
160
- }, (t !== void 0 ? t : null) !== null ? Object.defineProperty(e, "ref", {
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: L
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: O
177
+ value: Y
178
178
  }), Object.defineProperty(e, "_debugTask", {
179
179
  configurable: !1,
180
180
  enumerable: !1,
181
181
  writable: !0,
182
- value: A
182
+ value: M
183
183
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
184
184
  }
185
- function P(e, r, t, n, l, u, O, A) {
186
- var a = r.children;
187
- if (a !== void 0)
188
- if (n)
189
- if (Q(a)) {
190
- for (n = 0; n < a.length; n++)
191
- w(a[n]);
192
- Object.freeze && Object.freeze(a);
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(a);
198
- if (N.call(r, "key")) {
199
- a = s(e);
200
- var f = Object.keys(r).filter(function(K) {
201
- return K !== "key";
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
- n = 0 < f.length ? "{key: someKey, " + f.join(": ..., ") + ": ...}" : "{key: someKey}", $[a + n] || (f = 0 < f.length ? "{" + f.join(": ..., ") + ": ...}" : "{}", console.error(
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
- n,
211
- a,
212
- f,
213
- a
214
- ), $[a + n] = !0);
210
+ l,
211
+ i,
212
+ y,
213
+ i
214
+ ), q[i + l] = !0);
215
215
  }
216
- if (a = null, t !== void 0 && (d(t), a = "" + t), E(r) && (d(r.key), a = "" + r.key), "key" in r) {
217
- t = {};
218
- for (var j in r)
219
- j !== "key" && (t[j] = r[j]);
220
- } else t = r;
221
- return a && b(
222
- t,
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
- ), M(
224
+ ), S(
225
225
  e,
226
- a,
227
- u,
228
- l,
229
- o(),
230
- t,
231
- O,
232
- A
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 === h && e._store && (e._store.validated = 1);
236
+ typeof e == "object" && e !== null && e.$$typeof === A && e._store && (e._store.validated = 1);
237
237
  }
238
- var v = ee, h = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), z = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), q = Symbol.for("react.context"), G = Symbol.for("react.forward_ref"), J = Symbol.for("react.suspense"), X = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), p = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, Q = Array.isArray, k = console.createTask ? console.createTask : function() {
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
- v = {
241
+ h = {
242
242
  "react-stack-bottom-frame": function(e) {
243
243
  return e();
244
244
  }
245
245
  };
246
- var y, C = {}, Y = v["react-stack-bottom-frame"].bind(
247
- v,
248
- c
249
- )(), I = k(m(c)), $ = {};
250
- _.Fragment = T, _.jsx = function(e, r, t, n, l) {
251
- var u = 1e4 > p.recentlyCreatedOwnerStacks++;
252
- return P(
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
- r,
255
- t,
256
- !1,
254
+ o,
257
255
  n,
256
+ !1,
258
257
  l,
259
- u ? Error("react-stack-top-frame") : Y,
260
- u ? k(m(e)) : I
258
+ g,
259
+ x ? Error("react-stack-top-frame") : U,
260
+ x ? D(p(e)) : V
261
261
  );
262
- }, _.jsxs = function(e, r, t, n, l) {
263
- var u = 1e4 > p.recentlyCreatedOwnerStacks++;
264
- return P(
262
+ }, R.jsxs = function(e, o, n, l, g) {
263
+ var x = 1e4 > B.recentlyCreatedOwnerStacks++;
264
+ return k(
265
265
  e,
266
- r,
267
- t,
268
- !0,
266
+ o,
269
267
  n,
268
+ !0,
270
269
  l,
271
- u ? Error("react-stack-top-frame") : Y,
272
- u ? k(m(e)) : I
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" ? S.exports = re() : S.exports = te();
278
- var x = S.exports;
279
- const ae = ({ logo: s, title: i }) => /* @__PURE__ */ x.jsxs("header", { className: "flex items-center justify-between", children: [
280
- s && /* @__PURE__ */ x.jsx("img", { src: s, alt: "Logo", className: "h-8" }),
281
- i && /* @__PURE__ */ x.jsx("h1", { className: "text-xl text-success font-bold", children: i }),
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
- ae as Header
600
+ le as Header
286
601
  };