quirk-ui 0.0.331 → 0.0.332

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.
@@ -54,7 +54,7 @@ const Te = [
54
54
  center: e.center,
55
55
  right: e.right
56
56
  };
57
- function Ie({
57
+ function Ue({
58
58
  title: se,
59
59
  logo: W,
60
60
  items: B,
@@ -72,7 +72,9 @@ function Ie({
72
72
  }) {
73
73
  const [b, D] = h(!1), [O, m] = h(null), [de, he] = h(0), [be, fe] = h(!1), [me, ue] = h(null), [c, N] = h([]), [g, M] = h(
74
74
  0
75
- ), [pe, G] = h(null), [p, ve] = h(!1), [$, L] = h("forward"), E = () => /* @__PURE__ */ a(
75
+ ), [pe, G] = h(null), [p, ve] = h(!1), [$, L] = h("forward");
76
+ console.log("QUI", f);
77
+ const E = () => /* @__PURE__ */ a(
76
78
  "div",
77
79
  {
78
80
  className: `${e.linkWrapper} ${e.parent} ${e.searchWrapper}`,
@@ -153,11 +155,11 @@ function Ie({
153
155
  }
154
156
  }, we = (n) => {
155
157
  m((l) => l === n ? null : n);
156
- }, q = R((n) => {
158
+ }, I = R((n) => {
157
159
  _.current && !_.current.contains(n.target) && m(null);
158
- }, []), I = R(() => {
159
- U(), typeof window < "u" && window.innerWidth > 768 && (D(!1), m(null), typeof document < "u" && (document.body.style.overflow = ""));
160
160
  }, []), U = R(() => {
161
+ q(), typeof window < "u" && window.innerWidth > 768 && (D(!1), m(null), typeof document < "u" && (document.body.style.overflow = ""));
162
+ }, []), q = R(() => {
161
163
  if (v.current) {
162
164
  const n = v.current.getBoundingClientRect().width;
163
165
  he(n), fe(!0);
@@ -165,8 +167,8 @@ function Ie({
165
167
  }, []);
166
168
  z(() => {
167
169
  const n = typeof window < "u", l = typeof document < "u";
168
- return n && window.addEventListener("resize", I), l && document.addEventListener("click", q), U(), () => {
169
- n && window.removeEventListener("resize", I), l && document.removeEventListener("click", q);
170
+ return n && window.addEventListener("resize", U), l && document.addEventListener("click", I), q(), () => {
171
+ n && window.removeEventListener("resize", U), l && document.removeEventListener("click", I);
170
172
  };
171
173
  }, []), z(() => {
172
174
  if (typeof document < "u")
@@ -175,8 +177,8 @@ function Ie({
175
177
  };
176
178
  }, [b]);
177
179
  const ye = (n) => n.map((l, o) => {
178
- var J, K, Q, Y, Z;
179
- const d = `group-${o}`, y = pe === o, i = (J = l.primaryItems) == null ? void 0 : J[g ?? 0];
180
+ var Q, J, K, Y, Z;
181
+ const d = `group-${o}`, y = pe === o, i = (Q = l.primaryItems) == null ? void 0 : Q[g ?? 0];
180
182
  return /* @__PURE__ */ r(
181
183
  "div",
182
184
  {
@@ -223,7 +225,7 @@ function Ie({
223
225
  className: `${e.sublinksColumn} ${e.primaryColumn}`,
224
226
  children: [
225
227
  /* @__PURE__ */ a("div", { className: e.linkItem }),
226
- (K = l.primaryItems) == null ? void 0 : K.map(
228
+ (J = l.primaryItems) == null ? void 0 : J.map(
227
229
  (t, u) => t.href ? /* @__PURE__ */ r(
228
230
  "a",
229
231
  {
@@ -268,7 +270,7 @@ function Ie({
268
270
  ]
269
271
  }
270
272
  ),
271
- (i == null ? void 0 : i.sublinks) && ((Q = i == null ? void 0 : i.sublinks) == null ? void 0 : Q.length) > 0 && /* @__PURE__ */ r(
273
+ (i == null ? void 0 : i.sublinks) && ((K = i == null ? void 0 : i.sublinks) == null ? void 0 : K.length) > 0 && /* @__PURE__ */ r(
272
274
  "div",
273
275
  {
274
276
  className: `${e.sublinksColumn} ${e.fadeInFromLeft}`,
@@ -581,5 +583,5 @@ function Ie({
581
583
  );
582
584
  }
583
585
  export {
584
- Ie as Navbar
586
+ Ue as Navbar
585
587
  };
@@ -1,24 +1,24 @@
1
- import { jsx as e, jsxs as o, Fragment as v } from "react/jsx-runtime";
2
- import { useState as U, useRef as z, useEffect as F } from "react";
3
- import { useHeroContext as H } from "./HeroContext.js";
4
- import { RichText as u } from "../../ui/PortableTextRenderer/index.js";
1
+ import { jsx as e, jsxs as c, Fragment as v } from "react/jsx-runtime";
2
+ import { useState as U, useRef as z, useEffect as R } from "react";
3
+ import { useHeroContext as S } from "./HeroContext.js";
4
+ import { RichText as n } from "../../ui/PortableTextRenderer/index.js";
5
5
  import { CallToActions as p } from "../../ui/CallToActions/index.js";
6
6
  import N from "next/image";
7
- import { usePrefersReducedMotion as S } from "../../hooks/usePrefersReducedMotion.js";
8
- import { c as T } from "../../../createLucideIcon-C8GTh_Qx.js";
9
- import { P as W } from "../../../index-C4o-N_--.js";
7
+ import { usePrefersReducedMotion as T } from "../../hooks/usePrefersReducedMotion.js";
8
+ import { c as W } from "../../../createLucideIcon-C8GTh_Qx.js";
9
+ import { P as j } from "../../../index-C4o-N_--.js";
10
10
  import '../../../assets/index46.css';/**
11
11
  * @license lucide-react v0.488.0 - ISC
12
12
  *
13
13
  * This source code is licensed under the ISC license.
14
14
  * See the LICENSE file in the root directory of this source tree.
15
15
  */
16
- const j = [
16
+ const H = [
17
17
  ["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
18
18
  ["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
19
- ], E = T("pause", j), L = "_hero_c7i2h_1", V = "_container_c7i2h_7", Y = "_eyebrow_c7i2h_27", M = "_disclaimer_c7i2h_31", q = "_text_c7i2h_36", G = "_articleDetails_c7i2h_43", J = "_articleType_c7i2h_56", K = "_articleCategories_c7i2h_69", Q = "_category_c7i2h_75", X = "_number_c7i2h_90", Z = "_blog_c7i2h_117", O = "_overlay_c7i2h_141", A = "_fullBleed_c7i2h_211", D = "_split_c7i2h_305", g = "_image_c7i2h_310", ee = "_videoControl_c7i2h_333", le = "_videoWrapper_c7i2h_354", re = "_videoBackground_c7i2h_374", se = "_iframe_c7i2h_375", l = {
20
- hero: L,
21
- container: V,
19
+ ], L = W("pause", H), V = "_hero_c7i2h_1", E = "_container_c7i2h_7", Y = "_eyebrow_c7i2h_27", M = "_disclaimer_c7i2h_31", q = "_text_c7i2h_36", G = "_articleDetails_c7i2h_43", J = "_articleType_c7i2h_56", K = "_articleCategories_c7i2h_69", Q = "_category_c7i2h_75", X = "_number_c7i2h_90", Z = "_blog_c7i2h_117", O = "_overlay_c7i2h_141", A = "_fullBleed_c7i2h_211", D = "_split_c7i2h_305", g = "_image_c7i2h_310", ee = "_videoControl_c7i2h_333", le = "_videoWrapper_c7i2h_354", re = "_videoBackground_c7i2h_374", te = "_iframe_c7i2h_375", l = {
20
+ hero: V,
21
+ container: E,
22
22
  eyebrow: Y,
23
23
  disclaimer: M,
24
24
  text: q,
@@ -36,31 +36,30 @@ const j = [
36
36
  videoControl: ee,
37
37
  videoWrapper: le,
38
38
  videoBackground: re,
39
- iframe: se
39
+ iframe: te
40
40
  };
41
41
  function ye({
42
- heading: t,
42
+ heading: s,
43
43
  image: r,
44
- video: s,
45
- callToAction: n,
46
- pageData: c,
44
+ video: t,
45
+ callToAction: u,
46
+ pageData: o,
47
47
  styleOptions: _
48
48
  }) {
49
- var I, R;
50
- console.log("HERO", r), console.log("CTA", n);
51
- const a = S(), [k, x] = U(!a), { setIsFullbleedHeroAtTop: C } = H(), m = z(null), d = (_ == null ? void 0 : _.layout) ?? "default", b = {
49
+ var I, F;
50
+ const a = T(), [k, x] = U(!a), { setIsFullbleedHeroAtTop: C } = S(), m = z(null), d = (_ == null ? void 0 : _.layout) ?? "default", b = {
52
51
  default: l.default,
53
52
  split: l.split,
54
53
  "full-bleed": l.fullBleed,
55
54
  blog: l.blog
56
- }[d], $ = (I = c == null ? void 0 : c.categories) != null && I.length ? c == null ? void 0 : c.categories[0] : null, f = (R = c == null ? void 0 : c.categories) != null && R.length ? c == null ? void 0 : c.categories[1] : null;
57
- F(() => {
55
+ }[d], $ = (I = o == null ? void 0 : o.categories) != null && I.length ? o == null ? void 0 : o.categories[0] : null, f = (F = o == null ? void 0 : o.categories) != null && F.length ? o == null ? void 0 : o.categories[1] : null;
56
+ R(() => {
58
57
  const i = () => {
59
58
  C(window.scrollY === 0);
60
59
  };
61
60
  if (d === "full-bleed" && typeof window < "u")
62
61
  return C(!0), window.addEventListener("scroll", i), () => window.removeEventListener("scroll", i);
63
- }, [d]), F(() => {
62
+ }, [d]), R(() => {
64
63
  const i = m.current;
65
64
  i && (a ? i.pause() : i.play());
66
65
  }, [a]);
@@ -74,27 +73,27 @@ function ye({
74
73
  i && (i.paused ? (i.play().catch(() => {
75
74
  }), x(!0)) : (i.pause(), x(!1)));
76
75
  },
77
- children: k ? /* @__PURE__ */ e(E, { size: 18 }) : /* @__PURE__ */ e(W, { size: 18 })
76
+ children: k ? /* @__PURE__ */ e(L, { size: 18 }) : /* @__PURE__ */ e(j, { size: 18 })
78
77
  }
79
78
  ), B = () => {
80
- if (!s) return null;
81
- const i = s.includes("vimeo.com"), y = s.includes("youtube.com") || s.includes("youtu.be");
79
+ if (!t) return null;
80
+ const i = t.includes("vimeo.com"), y = t.includes("youtube.com") || t.includes("youtu.be");
82
81
  return i || y ? /* @__PURE__ */ e("div", { className: l.videoWrapper, children: /* @__PURE__ */ e(
83
82
  "iframe",
84
83
  {
85
- src: i ? `${s}?autoplay=1&muted=1&loop=1&background=1` : `${s}?autoplay=1&mute=1&loop=1&playlist=${w(
86
- s
84
+ src: i ? `${t}?autoplay=1&muted=1&loop=1&background=1` : `${t}?autoplay=1&mute=1&loop=1&playlist=${w(
85
+ t
87
86
  )}`,
88
87
  allow: "autoplay; fullscreen",
89
88
  allowFullScreen: !0
90
89
  }
91
- ) }) : /* @__PURE__ */ o("div", { className: l.videoWrapper, children: [
90
+ ) }) : /* @__PURE__ */ c("div", { className: l.videoWrapper, children: [
92
91
  /* @__PURE__ */ e(h, {}),
93
92
  /* @__PURE__ */ e(
94
93
  "video",
95
94
  {
96
95
  ref: m,
97
- src: s,
96
+ src: t,
98
97
  autoPlay: !a,
99
98
  loop: !0,
100
99
  muted: !0,
@@ -119,68 +118,68 @@ function ye({
119
118
  }
120
119
  ) }) : null;
121
120
  if (d === "split")
122
- return /* @__PURE__ */ e("section", { className: `${l.hero} ${l.split}`, children: /* @__PURE__ */ o("article", { className: l.container, children: [
123
- /* @__PURE__ */ o("div", { className: l.text, children: [
124
- /* @__PURE__ */ o("div", { children: [
125
- t.eyebrow && /* @__PURE__ */ e(u, { className: l.eyebrow, blocks: t.eyebrow }),
126
- /* @__PURE__ */ e(u, { blocks: t.title })
121
+ return /* @__PURE__ */ e("section", { className: `${l.hero} ${l.split}`, children: /* @__PURE__ */ c("article", { className: l.container, children: [
122
+ /* @__PURE__ */ c("div", { className: l.text, children: [
123
+ /* @__PURE__ */ c("div", { children: [
124
+ s.eyebrow && /* @__PURE__ */ e(n, { className: l.eyebrow, blocks: s.eyebrow }),
125
+ /* @__PURE__ */ e(n, { blocks: s.title })
127
126
  ] }),
128
- t.description && /* @__PURE__ */ e(u, { blocks: t.description }),
129
- n && /* @__PURE__ */ e(
127
+ s.description && /* @__PURE__ */ e(n, { blocks: s.description }),
128
+ u && /* @__PURE__ */ e(
130
129
  p,
131
130
  {
132
- items: n.items,
133
- alignment: n.alignment
131
+ items: u.items,
132
+ alignment: u.alignment
134
133
  }
135
134
  ),
136
- t.disclaimer && /* @__PURE__ */ e(
137
- u,
135
+ s.disclaimer && /* @__PURE__ */ e(
136
+ n,
138
137
  {
139
138
  className: l.disclaimer,
140
- blocks: t.disclaimer
139
+ blocks: s.disclaimer
141
140
  }
142
141
  )
143
142
  ] }),
144
- s ? /* @__PURE__ */ e(B, {}) : /* @__PURE__ */ e(P, {})
143
+ t ? /* @__PURE__ */ e(B, {}) : /* @__PURE__ */ e(P, {})
145
144
  ] }) });
146
145
  if (d === "default")
147
- return /* @__PURE__ */ e("section", { className: `${l.hero} ${b}`, children: /* @__PURE__ */ o("article", { className: l.container, children: [
148
- s ? /* @__PURE__ */ e(B, {}) : /* @__PURE__ */ e(P, {}),
149
- /* @__PURE__ */ o("div", { className: l.text, children: [
150
- /* @__PURE__ */ o("div", { children: [
151
- t.eyebrow && /* @__PURE__ */ e(u, { className: l.eyebrow, blocks: t.eyebrow }),
152
- /* @__PURE__ */ e(u, { blocks: t.title })
146
+ return /* @__PURE__ */ e("section", { className: `${l.hero} ${b}`, children: /* @__PURE__ */ c("article", { className: l.container, children: [
147
+ t ? /* @__PURE__ */ e(B, {}) : /* @__PURE__ */ e(P, {}),
148
+ /* @__PURE__ */ c("div", { className: l.text, children: [
149
+ /* @__PURE__ */ c("div", { children: [
150
+ s.eyebrow && /* @__PURE__ */ e(n, { className: l.eyebrow, blocks: s.eyebrow }),
151
+ /* @__PURE__ */ e(n, { blocks: s.title })
153
152
  ] }),
154
- t.description && /* @__PURE__ */ e(u, { blocks: t.description }),
155
- n && /* @__PURE__ */ e(
153
+ s.description && /* @__PURE__ */ e(n, { blocks: s.description }),
154
+ u && /* @__PURE__ */ e(
156
155
  p,
157
156
  {
158
- items: n.items,
159
- alignment: n.alignment
157
+ items: u.items,
158
+ alignment: u.alignment
160
159
  }
161
160
  )
162
161
  ] })
163
162
  ] }) });
164
163
  if (d === "full-bleed")
165
- return /* @__PURE__ */ e("section", { className: `${l.hero} ${b}`, children: /* @__PURE__ */ o("article", { className: l.container, children: [
166
- s ? s.includes("vimeo.com") || s.includes("youtube.com") || s.includes("youtu.be") ? /* @__PURE__ */ e("div", { className: l.videoBackground, children: /* @__PURE__ */ e(
164
+ return /* @__PURE__ */ e("section", { className: `${l.hero} ${b}`, children: /* @__PURE__ */ c("article", { className: l.container, children: [
165
+ t ? t.includes("vimeo.com") || t.includes("youtube.com") || t.includes("youtu.be") ? /* @__PURE__ */ e("div", { className: l.videoBackground, children: /* @__PURE__ */ e(
167
166
  "iframe",
168
167
  {
169
- src: s.includes("vimeo.com") ? `${s}?autoplay=1&muted=1&loop=1&background=1` : `${s}?autoplay=1&mute=1&loop=1&playlist=${w(
170
- s
168
+ src: t.includes("vimeo.com") ? `${t}?autoplay=1&muted=1&loop=1&background=1` : `${t}?autoplay=1&mute=1&loop=1&playlist=${w(
169
+ t
171
170
  )}`,
172
171
  className: l.iframe,
173
172
  allow: "autoplay; fullscreen",
174
173
  allowFullScreen: !0
175
174
  }
176
- ) }) : /* @__PURE__ */ o(v, { children: [
175
+ ) }) : /* @__PURE__ */ c(v, { children: [
177
176
  /* @__PURE__ */ e(h, {}),
178
177
  /* @__PURE__ */ e(
179
178
  "video",
180
179
  {
181
180
  ref: m,
182
181
  className: l.videoBackground,
183
- src: s,
182
+ src: t,
184
183
  autoPlay: !a,
185
184
  loop: !0,
186
185
  muted: !0,
@@ -200,47 +199,47 @@ function ye({
200
199
  sizes: "(min-width: 500px) 500px, 100vw"
201
200
  }
202
201
  ),
203
- /* @__PURE__ */ e("div", { className: l.overlay, children: /* @__PURE__ */ o("div", { className: l.text, children: [
204
- /* @__PURE__ */ o("div", { children: [
205
- t.eyebrow && /* @__PURE__ */ e(
206
- u,
202
+ /* @__PURE__ */ e("div", { className: l.overlay, children: /* @__PURE__ */ c("div", { className: l.text, children: [
203
+ /* @__PURE__ */ c("div", { children: [
204
+ s.eyebrow && /* @__PURE__ */ e(
205
+ n,
207
206
  {
208
207
  className: l.eyebrow,
209
- blocks: t.eyebrow
208
+ blocks: s.eyebrow
210
209
  }
211
210
  ),
212
- /* @__PURE__ */ e(u, { blocks: t.title })
211
+ /* @__PURE__ */ e(n, { blocks: s.title })
213
212
  ] }),
214
- t.description && /* @__PURE__ */ e(u, { blocks: t.description }),
215
- n && /* @__PURE__ */ e(
213
+ s.description && /* @__PURE__ */ e(n, { blocks: s.description }),
214
+ u && /* @__PURE__ */ e(
216
215
  p,
217
216
  {
218
- items: n.items,
219
- alignment: n.alignment
217
+ items: u.items,
218
+ alignment: u.alignment
220
219
  }
221
220
  )
222
221
  ] }) })
223
222
  ] }) });
224
223
  if (d === "blog")
225
- return /* @__PURE__ */ e("section", { className: `${l.hero} ${b}`, children: /* @__PURE__ */ o("article", { className: l.container, children: [
226
- s ? s.includes("vimeo.com") || s.includes("youtube.com") || s.includes("youtu.be") ? /* @__PURE__ */ e("div", { className: l.videoBackground, children: /* @__PURE__ */ e(
224
+ return /* @__PURE__ */ e("section", { className: `${l.hero} ${b}`, children: /* @__PURE__ */ c("article", { className: l.container, children: [
225
+ t ? t.includes("vimeo.com") || t.includes("youtube.com") || t.includes("youtu.be") ? /* @__PURE__ */ e("div", { className: l.videoBackground, children: /* @__PURE__ */ e(
227
226
  "iframe",
228
227
  {
229
- src: s.includes("vimeo.com") ? `${s}?autoplay=1&muted=1&loop=1&background=1` : `${s}?autoplay=1&mute=1&loop=1&playlist=${w(
230
- s
228
+ src: t.includes("vimeo.com") ? `${t}?autoplay=1&muted=1&loop=1&background=1` : `${t}?autoplay=1&mute=1&loop=1&playlist=${w(
229
+ t
231
230
  )}`,
232
231
  className: l.iframe,
233
232
  allow: "autoplay; fullscreen",
234
233
  allowFullScreen: !0
235
234
  }
236
- ) }) : /* @__PURE__ */ o(v, { children: [
235
+ ) }) : /* @__PURE__ */ c(v, { children: [
237
236
  /* @__PURE__ */ e(h, {}),
238
237
  /* @__PURE__ */ e(
239
238
  "video",
240
239
  {
241
240
  ref: m,
242
241
  className: l.videoBackground,
243
- src: s,
242
+ src: t,
244
243
  autoPlay: !a,
245
244
  loop: !0,
246
245
  muted: !0,
@@ -260,36 +259,36 @@ function ye({
260
259
  sizes: "(min-width: 500px) 500px, 100vw"
261
260
  }
262
261
  ),
263
- /* @__PURE__ */ e("div", { className: l.overlay, children: /* @__PURE__ */ o("div", { className: l.text, children: [
264
- /* @__PURE__ */ o("div", { children: [
265
- t.eyebrow && /* @__PURE__ */ e(
266
- u,
262
+ /* @__PURE__ */ e("div", { className: l.overlay, children: /* @__PURE__ */ c("div", { className: l.text, children: [
263
+ /* @__PURE__ */ c("div", { children: [
264
+ s.eyebrow && /* @__PURE__ */ e(
265
+ n,
267
266
  {
268
267
  className: l.eyebrow,
269
- blocks: t.eyebrow
268
+ blocks: s.eyebrow
270
269
  }
271
270
  ),
272
- c && /* @__PURE__ */ o("div", { className: l.articleDetails, children: [
273
- c.articleType && /* @__PURE__ */ e("div", { className: l.articleType, children: c.articleType }),
274
- /* @__PURE__ */ o("div", { className: l.articleCategories, children: [
271
+ o && /* @__PURE__ */ c("div", { className: l.articleDetails, children: [
272
+ o.articleType && /* @__PURE__ */ e("div", { className: l.articleType, children: o.articleType }),
273
+ /* @__PURE__ */ c("div", { className: l.articleCategories, children: [
275
274
  $ && /* @__PURE__ */ e("span", { className: l.category, children: $.title }),
276
275
  f && f.title.toLowerCase() !== "library" && !f.slug.current.includes(
277
276
  "keywords"
278
277
  ) && /* @__PURE__ */ e("span", { className: l.category, children: f.title })
279
278
  ] }),
280
- c.timeToRead && /* @__PURE__ */ e(v, { children: /* @__PURE__ */ o("span", { children: [
281
- /* @__PURE__ */ e("span", { className: l.number, children: c.timeToRead }),
279
+ o.timeToRead && /* @__PURE__ */ e(v, { children: /* @__PURE__ */ c("span", { children: [
280
+ /* @__PURE__ */ e("span", { className: l.number, children: o.timeToRead }),
282
281
  "min read"
283
282
  ] }) })
284
283
  ] }),
285
- /* @__PURE__ */ e(u, { blocks: t.title })
284
+ /* @__PURE__ */ e(n, { blocks: s.title })
286
285
  ] }),
287
- t.description && /* @__PURE__ */ e(u, { blocks: t.description }),
288
- n && /* @__PURE__ */ e(
286
+ s.description && /* @__PURE__ */ e(n, { blocks: s.description }),
287
+ u && /* @__PURE__ */ e(
289
288
  p,
290
289
  {
291
- items: n.items,
292
- alignment: n.alignment
290
+ items: u.items,
291
+ alignment: u.alignment
293
292
  }
294
293
  )
295
294
  ] }) })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.0.331",
4
+ "version": "0.0.332",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {