quirk-ui 0.0.326 → 0.0.327

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,7 +1,7 @@
1
1
  import { jsx as e, jsxs as o, Fragment as p } from "react/jsx-runtime";
2
2
  import { useState as I, useRef as z, useEffect as P } from "react";
3
3
  import { useHeroContext as F } from "./HeroContext.js";
4
- import { R as n, I as R } from "../../../index-Dc6Lwt_I.js";
4
+ import { R as u, I as R } from "../../../index-Dc6Lwt_I.js";
5
5
  import { CallToActions as b } from "../../ui/CallToActions/index.js";
6
6
  import { usePrefersReducedMotion as j } from "../../hooks/usePrefersReducedMotion.js";
7
7
  import { c as E } from "../../../createLucideIcon-C8GTh_Qx.js";
@@ -39,12 +39,12 @@ function ne({
39
39
  heading: s,
40
40
  image: r,
41
41
  video: t,
42
- callToAction: u,
42
+ callToAction: i,
43
43
  pageData: c,
44
44
  styleOptions: f
45
45
  }) {
46
46
  var $, B;
47
- console.log("HERO", r);
47
+ console.log("HERO", r), console.log("CTA", i);
48
48
  const a = j(), [v, w] = I(!a), { setIsFullbleedHeroAtTop: N } = F(), m = z(null), d = (f == null ? void 0 : f.layout) ?? "default", _ = {
49
49
  default: l.default,
50
50
  split: l.split,
@@ -52,14 +52,14 @@ function ne({
52
52
  blog: l.blog
53
53
  }[d], k = ($ = c == null ? void 0 : c.categories) != null && $.length ? c == null ? void 0 : c.categories[0] : null, y = (B = c == null ? void 0 : c.categories) != null && B.length ? c == null ? void 0 : c.categories[1] : null;
54
54
  P(() => {
55
- const i = () => {
55
+ const n = () => {
56
56
  N(window.scrollY === 0);
57
57
  };
58
58
  if (d === "full-bleed" && typeof window < "u")
59
- return N(!0), window.addEventListener("scroll", i), () => window.removeEventListener("scroll", i);
59
+ return N(!0), window.addEventListener("scroll", n), () => window.removeEventListener("scroll", n);
60
60
  }, [d]), P(() => {
61
- const i = m.current;
62
- i && (a ? i.pause() : i.play());
61
+ const n = m.current;
62
+ n && (a ? n.pause() : n.play());
63
63
  }, [a]);
64
64
  const x = () => /* @__PURE__ */ e(
65
65
  "button",
@@ -67,33 +67,33 @@ function ne({
67
67
  title: `${v ? "Pause the video" : "Play the video"}`,
68
68
  className: l.videoControl,
69
69
  onClick: () => {
70
- const i = m.current;
71
- i && (i.paused ? (i.play().catch(() => {
72
- }), w(!0)) : (i.pause(), w(!1)));
70
+ const n = m.current;
71
+ n && (n.paused ? (n.play().catch(() => {
72
+ }), w(!0)) : (n.pause(), w(!1)));
73
73
  },
74
74
  children: v ? /* @__PURE__ */ e(S, { size: 18 }) : /* @__PURE__ */ e(H, { size: 18 })
75
75
  }
76
76
  );
77
- function C(i) {
78
- const h = i.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);
77
+ function C(n) {
78
+ const h = n.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);
79
79
  return (h == null ? void 0 : h[1]) || "";
80
80
  }
81
81
  if (d === "split")
82
82
  return /* @__PURE__ */ e("section", { className: `${l.hero} ${l.split}`, children: /* @__PURE__ */ e("article", { className: l.container, children: /* @__PURE__ */ o("div", { className: l.text, children: [
83
83
  /* @__PURE__ */ o("div", { children: [
84
- s.eyebrow && /* @__PURE__ */ e(n, { className: l.eyebrow, blocks: s.eyebrow }),
85
- /* @__PURE__ */ e(n, { blocks: s.title })
84
+ s.eyebrow && /* @__PURE__ */ e(u, { className: l.eyebrow, blocks: s.eyebrow }),
85
+ /* @__PURE__ */ e(u, { blocks: s.title })
86
86
  ] }),
87
- s.description && /* @__PURE__ */ e(n, { blocks: s.description }),
88
- u && /* @__PURE__ */ e(
87
+ s.description && /* @__PURE__ */ e(u, { blocks: s.description }),
88
+ i && /* @__PURE__ */ e(
89
89
  b,
90
90
  {
91
- items: u.items,
92
- alignment: u.alignment
91
+ items: i.items,
92
+ alignment: i.alignment
93
93
  }
94
94
  ),
95
95
  s.disclaimer && /* @__PURE__ */ e(
96
- n,
96
+ u,
97
97
  {
98
98
  className: l.disclaimer,
99
99
  blocks: s.disclaimer
@@ -103,15 +103,15 @@ function ne({
103
103
  if (d === "default")
104
104
  return /* @__PURE__ */ e("section", { className: `${l.hero} ${_}`, children: /* @__PURE__ */ e("article", { className: l.container, children: /* @__PURE__ */ o("div", { className: l.text, children: [
105
105
  /* @__PURE__ */ o("div", { children: [
106
- s.eyebrow && /* @__PURE__ */ e(n, { className: l.eyebrow, blocks: s.eyebrow }),
107
- /* @__PURE__ */ e(n, { blocks: s.title })
106
+ s.eyebrow && /* @__PURE__ */ e(u, { className: l.eyebrow, blocks: s.eyebrow }),
107
+ /* @__PURE__ */ e(u, { blocks: s.title })
108
108
  ] }),
109
- s.description && /* @__PURE__ */ e(n, { blocks: s.description }),
110
- u && /* @__PURE__ */ e(
109
+ s.description && /* @__PURE__ */ e(u, { blocks: s.description }),
110
+ i && /* @__PURE__ */ e(
111
111
  b,
112
112
  {
113
- items: u.items,
114
- alignment: u.alignment
113
+ items: i.items,
114
+ alignment: i.alignment
115
115
  }
116
116
  )
117
117
  ] }) }) });
@@ -157,20 +157,20 @@ function ne({
157
157
  /* @__PURE__ */ e("div", { className: l.overlay, children: /* @__PURE__ */ o("div", { className: l.text, children: [
158
158
  /* @__PURE__ */ o("div", { children: [
159
159
  s.eyebrow && /* @__PURE__ */ e(
160
- n,
160
+ u,
161
161
  {
162
162
  className: l.eyebrow,
163
163
  blocks: s.eyebrow
164
164
  }
165
165
  ),
166
- /* @__PURE__ */ e(n, { blocks: s.title })
166
+ /* @__PURE__ */ e(u, { blocks: s.title })
167
167
  ] }),
168
- s.description && /* @__PURE__ */ e(n, { blocks: s.description }),
169
- u && /* @__PURE__ */ e(
168
+ s.description && /* @__PURE__ */ e(u, { blocks: s.description }),
169
+ i && /* @__PURE__ */ e(
170
170
  b,
171
171
  {
172
- items: u.items,
173
- alignment: u.alignment
172
+ items: i.items,
173
+ alignment: i.alignment
174
174
  }
175
175
  )
176
176
  ] }) })
@@ -217,7 +217,7 @@ function ne({
217
217
  /* @__PURE__ */ e("div", { className: l.overlay, children: /* @__PURE__ */ o("div", { className: l.text, children: [
218
218
  /* @__PURE__ */ o("div", { children: [
219
219
  s.eyebrow && /* @__PURE__ */ e(
220
- n,
220
+ u,
221
221
  {
222
222
  className: l.eyebrow,
223
223
  blocks: s.eyebrow
@@ -236,14 +236,14 @@ function ne({
236
236
  "min read"
237
237
  ] }) })
238
238
  ] }),
239
- /* @__PURE__ */ e(n, { blocks: s.title })
239
+ /* @__PURE__ */ e(u, { blocks: s.title })
240
240
  ] }),
241
- s.description && /* @__PURE__ */ e(n, { blocks: s.description }),
242
- u && /* @__PURE__ */ e(
241
+ s.description && /* @__PURE__ */ e(u, { blocks: s.description }),
242
+ i && /* @__PURE__ */ e(
243
243
  b,
244
244
  {
245
- items: u.items,
246
- alignment: u.alignment
245
+ items: i.items,
246
+ alignment: i.alignment
247
247
  }
248
248
  )
249
249
  ] }) })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.0.326",
4
+ "version": "0.0.327",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {