anysystem-design 0.0.37 → 0.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
1
  import { jsxs as r, jsx as l } from "react/jsx-runtime";
2
2
  import { t as s } from "../../bundle-mjs-D8_OHItV.js";
3
- import { F as m } from "../../index-CBEJ8A3p.js";
3
+ import { F as c } from "../../index-CBEJ8A3p.js";
4
4
  const h = ({
5
5
  label: t,
6
- className: i,
7
- htmlFor: d,
6
+ className: d,
7
+ htmlFor: i,
8
8
  isError: a = !1,
9
9
  errorMessage: o,
10
10
  type: e = "border",
11
- children: c
11
+ children: m
12
12
  }) => /* @__PURE__ */ r("div", { className: "flex flex-col", children: [
13
13
  /* @__PURE__ */ r(
14
14
  "div",
@@ -18,7 +18,8 @@ const h = ({
18
18
  e === "border" && "rounded border border-gray-400",
19
19
  e === "horizontal" ? "flex-row gap-2" : "form-group",
20
20
  a && "error",
21
- i
21
+ "md",
22
+ d
22
23
  ),
23
24
  children: [
24
25
  t && /* @__PURE__ */ l(
@@ -29,16 +30,16 @@ const h = ({
29
30
  e === "horizontal" && "flex items-center justify-center",
30
31
  "mb-1 text-sm font-semibold"
31
32
  ),
32
- htmlFor: d,
33
+ htmlFor: i,
33
34
  children: t
34
35
  }
35
36
  ),
36
- c
37
+ m
37
38
  ]
38
39
  }
39
40
  ),
40
41
  a && o && /* @__PURE__ */ r("span", { className: "flex items-center text-sm text-red-600 gap-1", children: [
41
- /* @__PURE__ */ l("div", { className: "w-4", children: /* @__PURE__ */ l(m, {}) }),
42
+ /* @__PURE__ */ l("div", { className: "w-4", children: /* @__PURE__ */ l(c, {}) }),
42
43
  o
43
44
  ] })
44
45
  ] });
@@ -10,6 +10,9 @@ export type NavItemObject = {
10
10
  };
11
11
  export type NavListProps = {
12
12
  list: NavItemObject[];
13
+ location?: {
14
+ pathname: string;
15
+ };
13
16
  };
14
17
  declare const NavList: React.FC<NavListProps>;
15
18
  export default NavList;
@@ -1,242 +1,172 @@
1
- import { jsx as p, jsxs as k, Fragment as ue } from "react/jsx-runtime";
2
- import { G as ie } from "../../iconBase-Bipuk9tK.js";
3
- import { t as N } from "../../bundle-mjs-D8_OHItV.js";
4
- import * as f from "react";
5
- import E, { createContext as $, useRef as Z, Fragment as ee, useReducer as de, useMemo as S, useId as te, useEffect as re, useContext as R } from "react";
6
- import { $ as pe, a as fe, r as me } from "../../bugs-mljuODtW.js";
7
- import { w as he, e as Ee } from "../../use-resolve-button-type-DbQUT_r1.js";
8
- import { M as G, W as I, y as O, T as ve, o as x, u as T, H as B, I as oe, D as W } from "../../use-sync-refs-TDnk3jQt.js";
9
- import { c as ge, i as P, u as ye, x as xe, j as be, s as De } from "../../open-closed-Btlb-eA5.js";
10
- import { C as Ce } from "../../close-provider-CEutdhG8.js";
11
- import { u as Ne, o as C } from "../../keyboard-DnlWU23I.js";
12
- var J;
13
- let Se = (J = E.startTransition) != null ? J : function(e) {
1
+ import { jsx as p, jsxs as P, Fragment as le } from "react/jsx-runtime";
2
+ import { G as ae } from "../../iconBase-Bipuk9tK.js";
3
+ import { t as x } from "../../bundle-mjs-D8_OHItV.js";
4
+ import { $ as ne, a as oe, r as se } from "../../bugs-mljuODtW.js";
5
+ import h, { createContext as C, useRef as W, Fragment as J, useReducer as ue, useMemo as $, useId as Q, useEffect as X, useContext as I } from "react";
6
+ import { w as ce, e as ie } from "../../use-resolve-button-type-DbQUT_r1.js";
7
+ import { M as U, W as T, y as N, T as de, o as v, u as B, H as F, I as Y, D as V } from "../../use-sync-refs-TDnk3jQt.js";
8
+ import { c as pe, i as D, u as fe, x as me, j as he, s as ge } from "../../open-closed-Btlb-eA5.js";
9
+ import { C as ye } from "../../close-provider-CEutdhG8.js";
10
+ import { u as be, o as k } from "../../keyboard-DnlWU23I.js";
11
+ var q;
12
+ let ve = (q = h.startTransition) != null ? q : function(e) {
14
13
  e();
15
14
  };
16
- var Pe = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Pe || {}), ke = ((e) => (e[e.ToggleDisclosure = 0] = "ToggleDisclosure", e[e.CloseDisclosure = 1] = "CloseDisclosure", e[e.SetButtonId = 2] = "SetButtonId", e[e.SetPanelId = 3] = "SetPanelId", e[e.SetButtonElement = 4] = "SetButtonElement", e[e.SetPanelElement = 5] = "SetPanelElement", e))(ke || {});
17
- let we = { 0: (e) => ({ ...e, disclosureState: T(e.disclosureState, { 0: 1, 1: 0 }) }), 1: (e) => e.disclosureState === 1 ? e : { ...e, disclosureState: 1 }, 2(e, r) {
18
- return e.buttonId === r.buttonId ? e : { ...e, buttonId: r.buttonId };
19
- }, 3(e, r) {
20
- return e.panelId === r.panelId ? e : { ...e, panelId: r.panelId };
21
- }, 4(e, r) {
22
- return e.buttonElement === r.element ? e : { ...e, buttonElement: r.element };
23
- }, 5(e, r) {
24
- return e.panelElement === r.element ? e : { ...e, panelElement: r.element };
25
- } }, M = $(null);
26
- M.displayName = "DisclosureContext";
27
- function _(e) {
28
- let r = R(M);
29
- if (r === null) {
30
- let t = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
31
- throw Error.captureStackTrace && Error.captureStackTrace(t, _), t;
15
+ var Ee = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Ee || {}), Se = ((e) => (e[e.ToggleDisclosure = 0] = "ToggleDisclosure", e[e.CloseDisclosure = 1] = "CloseDisclosure", e[e.SetButtonId = 2] = "SetButtonId", e[e.SetPanelId = 3] = "SetPanelId", e[e.SetButtonElement = 4] = "SetButtonElement", e[e.SetPanelElement = 5] = "SetPanelElement", e))(Se || {});
16
+ let ke = { 0: (e) => ({ ...e, disclosureState: B(e.disclosureState, { 0: 1, 1: 0 }) }), 1: (e) => e.disclosureState === 1 ? e : { ...e, disclosureState: 1 }, 2(e, t) {
17
+ return e.buttonId === t.buttonId ? e : { ...e, buttonId: t.buttonId };
18
+ }, 3(e, t) {
19
+ return e.panelId === t.panelId ? e : { ...e, panelId: t.panelId };
20
+ }, 4(e, t) {
21
+ return e.buttonElement === t.element ? e : { ...e, buttonElement: t.element };
22
+ }, 5(e, t) {
23
+ return e.panelElement === t.element ? e : { ...e, panelElement: t.element };
24
+ } }, R = C(null);
25
+ R.displayName = "DisclosureContext";
26
+ function M(e) {
27
+ let t = I(R);
28
+ if (t === null) {
29
+ let r = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
30
+ throw Error.captureStackTrace && Error.captureStackTrace(r, M), r;
32
31
  }
33
- return r;
32
+ return t;
34
33
  }
35
- let V = $(null);
36
- V.displayName = "DisclosureAPIContext";
37
- function ne(e) {
38
- let r = R(V);
39
- if (r === null) {
40
- let t = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
41
- throw Error.captureStackTrace && Error.captureStackTrace(t, ne), t;
34
+ let O = C(null);
35
+ O.displayName = "DisclosureAPIContext";
36
+ function Z(e) {
37
+ let t = I(O);
38
+ if (t === null) {
39
+ let r = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
40
+ throw Error.captureStackTrace && Error.captureStackTrace(r, Z), r;
42
41
  }
43
- return r;
42
+ return t;
44
43
  }
45
- let F = $(null);
46
- F.displayName = "DisclosurePanelContext";
47
- function $e() {
48
- return R(F);
44
+ let j = C(null);
45
+ j.displayName = "DisclosurePanelContext";
46
+ function xe() {
47
+ return I(j);
49
48
  }
50
- function Re(e, r) {
51
- return T(r.type, we, e, r);
49
+ function $e(e, t) {
50
+ return B(t.type, ke, e, t);
52
51
  }
53
- let Ie = ee;
54
- function Oe(e, r) {
55
- let { defaultOpen: t = !1, ...d } = e, l = Z(null), u = O(r, ve((i) => {
56
- l.current = i;
57
- }, e.as === void 0 || e.as === ee)), n = de(Re, { disclosureState: t ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: o, buttonId: a }, v] = n, s = x((i) => {
58
- v({ type: 1 });
59
- let m = Ne(l);
60
- if (!m || !a) return;
61
- let h = i ? i instanceof HTMLElement ? i : i.current instanceof HTMLElement ? i.current : m.getElementById(a) : m.getElementById(a);
62
- h == null || h.focus();
63
- }), g = S(() => ({ close: s }), [s]), y = S(() => ({ open: o === 0, close: s }), [o, s]), b = { ref: u };
64
- return E.createElement(M.Provider, { value: n }, E.createElement(V.Provider, { value: g }, E.createElement(Ce, { value: s }, E.createElement(ge, { value: T(o, { 0: P.Open, 1: P.Closed }) }, B({ ourProps: b, theirProps: d, slot: y, defaultTag: Ie, name: "Disclosure" })))));
52
+ let De = J;
53
+ function Pe(e, t) {
54
+ let { defaultOpen: r = !1, ...d } = e, o = W(null), c = N(t, de((i) => {
55
+ o.current = i;
56
+ }, e.as === void 0 || e.as === J)), a = ue($e, { disclosureState: r ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: l, buttonId: n }, g] = a, s = v((i) => {
57
+ g({ type: 1 });
58
+ let f = be(o);
59
+ if (!f || !n) return;
60
+ let m = i ? i instanceof HTMLElement ? i : i.current instanceof HTMLElement ? i.current : f.getElementById(n) : f.getElementById(n);
61
+ m == null || m.focus();
62
+ }), y = $(() => ({ close: s }), [s]), b = $(() => ({ open: l === 0, close: s }), [l, s]), E = { ref: c };
63
+ return h.createElement(R.Provider, { value: a }, h.createElement(O.Provider, { value: y }, h.createElement(ye, { value: s }, h.createElement(pe, { value: B(l, { 0: D.Open, 1: D.Closed }) }, F({ ourProps: E, theirProps: d, slot: b, defaultTag: De, name: "Disclosure" })))));
65
64
  }
66
- let Te = "button";
67
- function Be(e, r) {
68
- let t = te(), { id: d = `headlessui-disclosure-button-${t}`, disabled: l = !1, autoFocus: u = !1, ...n } = e, [o, a] = _("Disclosure.Button"), v = $e(), s = v === null ? !1 : v === o.panelId, g = Z(null), y = O(g, r, s ? null : x((c) => a({ type: 4, element: c }))), b = oe();
69
- re(() => {
70
- if (!s) return a({ type: 2, buttonId: d }), () => {
71
- a({ type: 2, buttonId: null });
65
+ let we = "button";
66
+ function Ce(e, t) {
67
+ let r = Q(), { id: d = `headlessui-disclosure-button-${r}`, disabled: o = !1, autoFocus: c = !1, ...a } = e, [l, n] = M("Disclosure.Button"), g = xe(), s = g === null ? !1 : g === l.panelId, y = W(null), b = N(y, t, s ? null : v((u) => n({ type: 4, element: u }))), E = Y();
68
+ X(() => {
69
+ if (!s) return n({ type: 2, buttonId: d }), () => {
70
+ n({ type: 2, buttonId: null });
72
71
  };
73
- }, [d, a, s]);
74
- let i = x((c) => {
75
- var D;
72
+ }, [d, n, s]);
73
+ let i = v((u) => {
74
+ var S;
76
75
  if (s) {
77
- if (o.disclosureState === 1) return;
78
- switch (c.key) {
79
- case C.Space:
80
- case C.Enter:
81
- c.preventDefault(), c.stopPropagation(), a({ type: 0 }), (D = o.buttonElement) == null || D.focus();
76
+ if (l.disclosureState === 1) return;
77
+ switch (u.key) {
78
+ case k.Space:
79
+ case k.Enter:
80
+ u.preventDefault(), u.stopPropagation(), n({ type: 0 }), (S = l.buttonElement) == null || S.focus();
82
81
  break;
83
82
  }
84
- } else switch (c.key) {
85
- case C.Space:
86
- case C.Enter:
87
- c.preventDefault(), c.stopPropagation(), a({ type: 0 });
83
+ } else switch (u.key) {
84
+ case k.Space:
85
+ case k.Enter:
86
+ u.preventDefault(), u.stopPropagation(), n({ type: 0 });
88
87
  break;
89
88
  }
90
- }), m = x((c) => {
91
- switch (c.key) {
92
- case C.Space:
93
- c.preventDefault();
89
+ }), f = v((u) => {
90
+ switch (u.key) {
91
+ case k.Space:
92
+ u.preventDefault();
94
93
  break;
95
94
  }
96
- }), h = x((c) => {
97
- var D;
98
- me(c.currentTarget) || l || (s ? (a({ type: 0 }), (D = o.buttonElement) == null || D.focus()) : a({ type: 0 }));
99
- }), { isFocusVisible: j, focusProps: A } = pe({ autoFocus: u }), { isHovered: H, hoverProps: z } = fe({ isDisabled: l }), { pressed: K, pressProps: U } = he({ disabled: l }), se = S(() => ({ open: o.disclosureState === 0, hover: H, active: K, disabled: l, focus: j, autofocus: u }), [o, H, K, j, l, u]), q = Ee(e, o.buttonElement), ce = s ? W({ ref: y, type: q, disabled: l || void 0, autoFocus: u, onKeyDown: i, onClick: h }, A, z, U) : W({ ref: y, id: d, type: q, "aria-expanded": o.disclosureState === 0, "aria-controls": o.panelElement ? o.panelId : void 0, disabled: l || void 0, autoFocus: u, onKeyDown: i, onKeyUp: m, onClick: h }, A, z, U);
100
- return B({ mergeRefs: b, ourProps: ce, theirProps: n, slot: se, defaultTag: Te, name: "Disclosure.Button" });
95
+ }), m = v((u) => {
96
+ var S;
97
+ se(u.currentTarget) || o || (s ? (n({ type: 0 }), (S = l.buttonElement) == null || S.focus()) : n({ type: 0 }));
98
+ }), { isFocusVisible: H, focusProps: L } = ne({ autoFocus: c }), { isHovered: z, hoverProps: K } = oe({ isDisabled: o }), { pressed: _, pressProps: A } = ce({ disabled: o }), te = $(() => ({ open: l.disclosureState === 0, hover: z, active: _, disabled: o, focus: H, autofocus: c }), [l, z, _, H, o, c]), G = ie(e, l.buttonElement), re = s ? V({ ref: b, type: G, disabled: o || void 0, autoFocus: c, onKeyDown: i, onClick: m }, L, K, A) : V({ ref: b, id: d, type: G, "aria-expanded": l.disclosureState === 0, "aria-controls": l.panelElement ? l.panelId : void 0, disabled: o || void 0, autoFocus: c, onKeyDown: i, onKeyUp: f, onClick: m }, L, K, A);
99
+ return F({ mergeRefs: E, ourProps: re, theirProps: a, slot: te, defaultTag: we, name: "Disclosure.Button" });
101
100
  }
102
- let Me = "div", _e = G.RenderStrategy | G.Static;
103
- function Ve(e, r) {
104
- let t = te(), { id: d = `headlessui-disclosure-panel-${t}`, transition: l = !1, ...u } = e, [n, o] = _("Disclosure.Panel"), { close: a } = ne("Disclosure.Panel"), v = oe(), s = O(r, x((h) => {
105
- Se(() => o({ type: 5, element: h }));
101
+ let Ie = "div", Te = U.RenderStrategy | U.Static;
102
+ function Ne(e, t) {
103
+ let r = Q(), { id: d = `headlessui-disclosure-panel-${r}`, transition: o = !1, ...c } = e, [a, l] = M("Disclosure.Panel"), { close: n } = Z("Disclosure.Panel"), g = Y(), s = N(t, v((m) => {
104
+ ve(() => l({ type: 5, element: m }));
106
105
  }));
107
- re(() => (o({ type: 3, panelId: d }), () => {
108
- o({ type: 3, panelId: null });
109
- }), [d, o]);
110
- let g = ye(), [y, b] = xe(l, n.panelElement, g !== null ? (g & P.Open) === P.Open : n.disclosureState === 0), i = S(() => ({ open: n.disclosureState === 0, close: a }), [n.disclosureState, a]), m = { ref: s, id: d, ...be(b) };
111
- return E.createElement(De, null, E.createElement(F.Provider, { value: n.panelId }, B({ mergeRefs: v, ourProps: m, theirProps: u, slot: i, defaultTag: Me, features: _e, visible: y, name: "Disclosure.Panel" })));
106
+ X(() => (l({ type: 3, panelId: d }), () => {
107
+ l({ type: 3, panelId: null });
108
+ }), [d, l]);
109
+ let y = fe(), [b, E] = me(o, a.panelElement, y !== null ? (y & D.Open) === D.Open : a.disclosureState === 0), i = $(() => ({ open: a.disclosureState === 0, close: n }), [a.disclosureState, n]), f = { ref: s, id: d, ...he(E) };
110
+ return h.createElement(ge, null, h.createElement(j.Provider, { value: a.panelId }, F({ mergeRefs: g, ourProps: f, theirProps: c, slot: i, defaultTag: Ie, features: Te, visible: b, name: "Disclosure.Panel" })));
112
111
  }
113
- let Fe = I(Oe), w = I(Be), ae = I(Ve), Le = Object.assign(Fe, { Button: w, Panel: ae });
114
- /**
115
- * @remix-run/router v1.19.1
116
- *
117
- * Copyright (c) Remix Software Inc.
118
- *
119
- * This source code is licensed under the MIT license found in the
120
- * LICENSE.md file in the root directory of this source tree.
121
- *
122
- * @license MIT
123
- */
124
- var Q;
125
- (function(e) {
126
- e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
127
- })(Q || (Q = {}));
128
- function X(e, r) {
129
- throw new Error(r);
112
+ let Be = T(Pe), w = T(Ce), ee = T(Ne), Fe = Object.assign(Be, { Button: w, Panel: ee });
113
+ function Re(e) {
114
+ return ae({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708" }, child: [] }] })(e);
130
115
  }
131
- var Y;
132
- (function(e) {
133
- e.data = "data", e.deferred = "deferred", e.redirect = "redirect", e.error = "error";
134
- })(Y || (Y = {}));
135
- const le = ["post", "put", "patch", "delete"];
136
- new Set(le);
137
- const je = ["get", ...le];
138
- new Set(je);
139
- /**
140
- * React Router v6.26.1
141
- *
142
- * Copyright (c) Remix Software Inc.
143
- *
144
- * This source code is licensed under the MIT license found in the
145
- * LICENSE.md file in the root directory of this source tree.
146
- *
147
- * @license MIT
148
- */
149
- const Ae = /* @__PURE__ */ f.createContext(null);
150
- process.env.NODE_ENV !== "production" && (Ae.displayName = "DataRouter");
151
- const He = /* @__PURE__ */ f.createContext(null);
152
- process.env.NODE_ENV !== "production" && (He.displayName = "DataRouterState");
153
- const ze = /* @__PURE__ */ f.createContext(null);
154
- process.env.NODE_ENV !== "production" && (ze.displayName = "Await");
155
- const Ke = /* @__PURE__ */ f.createContext(null);
156
- process.env.NODE_ENV !== "production" && (Ke.displayName = "Navigation");
157
- const L = /* @__PURE__ */ f.createContext(null);
158
- process.env.NODE_ENV !== "production" && (L.displayName = "Location");
159
- const Ue = /* @__PURE__ */ f.createContext({
160
- outlet: null,
161
- matches: [],
162
- isDataRoute: !1
163
- });
164
- process.env.NODE_ENV !== "production" && (Ue.displayName = "Route");
165
- const qe = /* @__PURE__ */ f.createContext(null);
166
- process.env.NODE_ENV !== "production" && (qe.displayName = "RouteError");
167
- function Ge() {
168
- return f.useContext(L) != null;
169
- }
170
- function We() {
171
- return Ge() || (process.env.NODE_ENV !== "production" ? X(
172
- !1,
173
- // TODO: This error is probably because they somehow have 2 versions of the
174
- // router loaded. We can help them understand how to avoid that.
175
- "useLocation() may be used only in the context of a <Router> component."
176
- ) : X()), f.useContext(L).location;
177
- }
178
- new Promise(() => {
179
- });
180
- function Je(e) {
181
- return ie({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708" }, child: [] }] })(e);
182
- }
183
- const lt = ({ list: e }) => {
184
- const r = We();
185
- return /* @__PURE__ */ p("nav", { className: "w-full px-4 py-6 bg-white dark:bg-gray-950", children: /* @__PURE__ */ p("ul", { children: e && e.map((t, d) => /* @__PURE__ */ p("li", { children: t != null && t.title ? /* @__PURE__ */ p("div", { className: "px-3 py-2 text-sm font-bold dark:text-white", children: t.label }) : t.list ? /* @__PURE__ */ p(Le, { as: "div", children: ({ open: l }) => {
186
- var u;
187
- return /* @__PURE__ */ k(ue, { children: [
188
- /* @__PURE__ */ k(
189
- w,
190
- {
191
- className: N(
192
- "flex items-center w-full p-3 font-semibold text-left rounded gap-2 hover:bg-primary-50 dark:text-white dark:hover:bg-gray-700"
193
- ),
194
- children: [
195
- t.icon && t.icon({ size: 20 }),
196
- /* @__PURE__ */ p("span", { children: t.label }),
197
- /* @__PURE__ */ p(
198
- Je,
199
- {
200
- className: N(
201
- l ? "text-gray-500 rotate-90" : "text-gray-400",
202
- "w-4 h-4 ml-auto shrink-0"
203
- ),
204
- "aria-hidden": "true"
205
- }
206
- )
207
- ]
208
- }
209
- ),
210
- /* @__PURE__ */ p(ae, { as: "ul", className: "px-2 mt-1", children: (u = t == null ? void 0 : t.list) == null ? void 0 : u.map((n, o) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ p(
211
- w,
212
- {
213
- as: "a",
214
- href: n == null ? void 0 : n.path,
215
- className: N(
216
- "block rounded py-2 pl-9 pr-2 text-gray-700 hover:bg-primary-50 dark:text-white dark:hover:bg-gray-700",
217
- r.pathname === n.path && "bg-primary-50 dark:bg-gray-700"
218
- ),
219
- onClick: n == null ? void 0 : n.onClick,
220
- children: n.label
221
- }
222
- ) }, o)) })
223
- ] });
224
- } }) : /* @__PURE__ */ k(
225
- "a",
226
- {
227
- href: t == null ? void 0 : t.path,
228
- className: N(
229
- "flex w-full items-center justify-start gap-2 rounded p-3 font-semibold hover:bg-primary-50 dark:text-white dark:hover:bg-gray-800 cursor-pointer",
230
- r.pathname === t.path ? "bg-primary-50 dark:bg-gray-800" : ""
231
- ),
232
- onClick: t == null ? void 0 : t.onClick,
233
- children: [
234
- t.icon && t.icon({ size: 20 }),
235
- /* @__PURE__ */ p("span", { children: t.label })
236
- ]
237
- }
238
- ) }, d)) }) });
239
- };
116
+ const Ue = ({ list: e, location: t }) => /* @__PURE__ */ p("nav", { className: "w-full px-4 py-6 bg-white dark:bg-gray-950", children: /* @__PURE__ */ p("ul", { children: e && e.map((r, d) => /* @__PURE__ */ p("li", { children: r != null && r.title ? /* @__PURE__ */ p("div", { className: "px-3 py-2 text-sm font-bold dark:text-white", children: r.label }) : r.list ? /* @__PURE__ */ p(Fe, { as: "div", children: ({ open: o }) => {
117
+ var c;
118
+ return /* @__PURE__ */ P(le, { children: [
119
+ /* @__PURE__ */ P(
120
+ w,
121
+ {
122
+ className: x(
123
+ "flex items-center w-full p-3 font-semibold text-left rounded gap-2 hover:bg-primary-50 dark:text-white dark:hover:bg-gray-700"
124
+ ),
125
+ children: [
126
+ r.icon && r.icon({ size: 20 }),
127
+ /* @__PURE__ */ p("span", { children: r.label }),
128
+ /* @__PURE__ */ p(
129
+ Re,
130
+ {
131
+ className: x(
132
+ o ? "text-gray-500 rotate-90" : "text-gray-400",
133
+ "w-4 h-4 ml-auto shrink-0"
134
+ ),
135
+ "aria-hidden": "true"
136
+ }
137
+ )
138
+ ]
139
+ }
140
+ ),
141
+ /* @__PURE__ */ p(ee, { as: "ul", className: "px-2 mt-1", children: (c = r == null ? void 0 : r.list) == null ? void 0 : c.map((a, l) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ p(
142
+ w,
143
+ {
144
+ as: "a",
145
+ href: a == null ? void 0 : a.path,
146
+ className: x(
147
+ "block rounded py-2 pl-9 pr-2 text-gray-700 hover:bg-primary-50 dark:text-white dark:hover:bg-gray-700",
148
+ (t == null ? void 0 : t.pathname) === a.path && "bg-primary-50 dark:bg-gray-700"
149
+ ),
150
+ onClick: a == null ? void 0 : a.onClick,
151
+ children: a.label
152
+ }
153
+ ) }, l)) })
154
+ ] });
155
+ } }) : /* @__PURE__ */ P(
156
+ "a",
157
+ {
158
+ href: r == null ? void 0 : r.path,
159
+ className: x(
160
+ "flex w-full items-center justify-start gap-2 rounded p-3 font-semibold hover:bg-primary-50 dark:text-white dark:hover:bg-gray-800 cursor-pointer",
161
+ (t == null ? void 0 : t.pathname) === r.path ? "bg-primary-50 dark:bg-gray-800" : ""
162
+ ),
163
+ onClick: r == null ? void 0 : r.onClick,
164
+ children: [
165
+ r.icon && r.icon({ size: 20 }),
166
+ /* @__PURE__ */ p("span", { children: r.label })
167
+ ]
168
+ }
169
+ ) }, d)) }) });
240
170
  export {
241
- lt as default
171
+ Ue as default
242
172
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anysystem-design",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",