quirk-ui 0.0.166 → 0.0.167

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.
@@ -15,14 +15,14 @@ const U = [
15
15
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
16
16
  ["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
17
17
  ["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
18
- ], Y = K("menu", U), Z = "_navbar_1auc6_5", ee = "_left_1auc6_18", ne = "_container_1auc6_19", te = "_logo_1auc6_23", oe = "_nav_1auc6_5", se = "_center_1auc6_38", ae = "_hidden_1auc6_44", ie = "_visible_1auc6_51", le = "_right_1auc6_66", ce = "_title_1auc6_72", re = "_sublinks_1auc6_82", ue = "_sublinksInner_1auc6_94", de = "_linkItem_1auc6_108", _e = "_minimal_1auc6_113", me = "_menuToggle_1auc6_117", fe = "_linkWrapper_1auc6_121", he = "_triangle_1auc6_159", ve = "_transparent_1auc6_164", ge = "_sticky_1auc6_216", pe = "_twoColumn_1auc6_245", be = "_utilityMobile_1auc6_292", we = "_utility_1auc6_292", ke = "_navInner_1auc6_320", ye = "_grid_1auc6_329", $e = "_sublinkToggle_1auc6_354", Ne = "_link_1auc6_108", Ce = "_open_1auc6_368", xe = "_show_1auc6_419", Me = "_sublinksColumn_1auc6_467", Le = "_chevron_1auc6_477", Ee = "_parent_1auc6_556", e = {
18
+ ], Y = K("menu", U), Z = "_navbar_1auc6_5", ee = "_left_1auc6_18", ne = "_container_1auc6_19", te = "_logo_1auc6_23", ae = "_nav_1auc6_5", oe = "_center_1auc6_38", se = "_hidden_1auc6_44", ie = "_visible_1auc6_51", le = "_right_1auc6_66", ce = "_title_1auc6_72", re = "_sublinks_1auc6_82", ue = "_sublinksInner_1auc6_94", de = "_linkItem_1auc6_108", _e = "_minimal_1auc6_113", me = "_menuToggle_1auc6_117", fe = "_linkWrapper_1auc6_121", he = "_triangle_1auc6_159", ve = "_transparent_1auc6_164", ge = "_sticky_1auc6_216", pe = "_twoColumn_1auc6_245", be = "_utilityMobile_1auc6_292", we = "_utility_1auc6_292", ke = "_navInner_1auc6_320", ye = "_grid_1auc6_329", $e = "_sublinkToggle_1auc6_354", Ne = "_link_1auc6_108", Ce = "_open_1auc6_368", xe = "_show_1auc6_419", Me = "_sublinksColumn_1auc6_467", Le = "_chevron_1auc6_477", Ee = "_parent_1auc6_556", e = {
19
19
  navbar: Z,
20
20
  left: ee,
21
21
  container: ne,
22
22
  logo: te,
23
- nav: oe,
24
- center: se,
25
- hidden: ae,
23
+ nav: ae,
24
+ center: oe,
25
+ hidden: se,
26
26
  visible: ie,
27
27
  right: le,
28
28
  title: ce,
@@ -70,13 +70,13 @@ function Se({
70
70
  const [l, w] = d(!1), [g, c] = d(null), [D, V] = d(0), [A, G] = d(!1), [P, q] = d(null), p = f(null), r = f(null), k = f(/* @__PURE__ */ new Map()), F = () => {
71
71
  w((t) => !t);
72
72
  }, H = (t) => {
73
- const s = k.current.get(t);
74
- if (s && r.current) {
75
- const o = s.getBoundingClientRect(), a = r.current.getBoundingClientRect(), u = o.left - a.left + o.width / 4;
73
+ const o = k.current.get(t);
74
+ if (o && r.current) {
75
+ const a = o.getBoundingClientRect(), s = r.current.getBoundingClientRect(), u = a.left - s.left + a.width / 4;
76
76
  q(u);
77
77
  }
78
78
  }, y = (t) => {
79
- c((s) => s === t ? null : t);
79
+ c((o) => o === t ? null : t);
80
80
  }, $ = h((t) => {
81
81
  p.current && !p.current.contains(t.target) && c(null);
82
82
  }, []), N = h(() => {
@@ -90,9 +90,9 @@ function Se({
90
90
  }
91
91
  }, []);
92
92
  T(() => {
93
- const t = typeof window < "u", s = typeof document < "u";
94
- return t && (window.addEventListener("resize", C), window.addEventListener("scroll", N)), s && document.addEventListener("click", $), x(), () => {
95
- t && (window.removeEventListener("resize", C), window.removeEventListener("scroll", N)), s && document.removeEventListener("click", $);
93
+ const t = typeof window < "u", o = typeof document < "u";
94
+ return t && (window.addEventListener("resize", C), window.addEventListener("scroll", N)), o && document.addEventListener("click", $), x(), () => {
95
+ t && (window.removeEventListener("resize", C), window.removeEventListener("scroll", N)), o && document.removeEventListener("click", $);
96
96
  };
97
97
  }, []), T(() => {
98
98
  if (typeof document < "u")
@@ -100,30 +100,30 @@ function Se({
100
100
  document.body.style.overflow = "";
101
101
  };
102
102
  }, [l]);
103
- const M = (t, s = "") => t.map((o) => {
103
+ const M = (t, o = "") => t.map((a) => {
104
104
  var E;
105
- const a = `${s}/${o.label}`, _ = g === a, u = (E = o.sublinks) == null ? void 0 : E.length, L = f(null);
106
- return k.current.set(a, L.current), /* @__PURE__ */ m(
105
+ const s = `${o}/${a.label}`, _ = g === s, u = (E = a.sublinks) == null ? void 0 : E.length, L = f(null);
106
+ return k.current.set(s, L.current), /* @__PURE__ */ m(
107
107
  "div",
108
108
  {
109
- className: `${e.linkWrapper} ${s ? "" : e.parent}`,
109
+ className: `${e.linkWrapper} ${o ? "" : e.parent}`,
110
110
  children: [
111
- /* @__PURE__ */ n("div", { className: e.linkItem, children: o.href ? /* @__PURE__ */ n(
111
+ /* @__PURE__ */ n("div", { className: e.linkItem, children: a.href ? /* @__PURE__ */ n(
112
112
  "a",
113
113
  {
114
- href: o.href,
114
+ href: a.href,
115
115
  className: e.link,
116
- target: o.isExternal ? "_blank" : "_self",
117
- rel: o.isExternal ? "noopener noreferrer" : void 0,
116
+ target: a.isExternal ? "_blank" : "_self",
117
+ rel: a.isExternal ? "noopener noreferrer" : void 0,
118
118
  onClick: () => {
119
119
  var R;
120
- c(null), (R = o.onClick) == null || R.call(o);
120
+ c(null), (R = a.onClick) == null || R.call(a);
121
121
  },
122
122
  onMouseEnter: () => {
123
- s || c(null);
123
+ o || c(null);
124
124
  },
125
125
  role: "menuitem",
126
- children: o.label
126
+ children: a.label
127
127
  }
128
128
  ) : /* @__PURE__ */ m(
129
129
  "button",
@@ -132,12 +132,12 @@ function Se({
132
132
  "aria-haspopup": u ? "true" : void 0,
133
133
  "aria-expanded": _,
134
134
  className: `${e.sublinkToggle} ${_ ? e.open : ""}`,
135
- onClick: () => y(a),
135
+ onClick: () => y(s),
136
136
  onMouseEnter: () => {
137
- H(a), c(a);
137
+ H(s), c(s);
138
138
  },
139
139
  children: [
140
- o.label,
140
+ a.label,
141
141
  u && /* @__PURE__ */ n(Q, { size: 18, className: e.chevron })
142
142
  ]
143
143
  }
@@ -146,15 +146,15 @@ function Se({
146
146
  "div",
147
147
  {
148
148
  className: `${e.sublinks} ${_ ? e.show : ""}`,
149
- onMouseLeave: () => y(a),
149
+ onMouseLeave: () => y(s),
150
150
  role: "menu",
151
- "aria-label": `${o.label} submenu`,
152
- children: /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("div", { className: e.sublinksInner, children: /* @__PURE__ */ n("div", { className: e.sublinksColumn, children: M(o.sublinks, a) }) }) })
151
+ "aria-label": `${a.label} submenu`,
152
+ children: /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n("div", { className: e.sublinksInner, children: /* @__PURE__ */ n("div", { className: e.sublinksColumn, children: M(a.sublinks, s) }) }) })
153
153
  }
154
154
  )
155
155
  ]
156
156
  },
157
- a
157
+ s
158
158
  );
159
159
  });
160
160
  return /* @__PURE__ */ n(
@@ -211,7 +211,7 @@ function Se({
211
211
  ] })
212
212
  }
213
213
  ),
214
- i && /* @__PURE__ */ n("nav", { className: e.utility, children: /* @__PURE__ */ n(W, { children: i.map((t, s) => /* @__PURE__ */ n(
214
+ i && /* @__PURE__ */ n("nav", { className: e.utility, children: /* @__PURE__ */ n(W, { children: i.map((t, o) => /* @__PURE__ */ n(
215
215
  I,
216
216
  {
217
217
  as: "a",
@@ -219,7 +219,7 @@ function Se({
219
219
  variant: t.variant,
220
220
  children: t.label
221
221
  },
222
- t._key || s
222
+ t._key || o
223
223
  )) }) }),
224
224
  i && /* @__PURE__ */ n(
225
225
  "nav",
@@ -230,7 +230,7 @@ function Se({
230
230
  {
231
231
  as: "a",
232
232
  href: i[1].href ?? "/",
233
- variant: "secondary",
233
+ variant: "primary",
234
234
  children: i[1].label
235
235
  },
236
236
  i[1]._key
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.0.166",
4
+ "version": "0.0.167",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {