quirk-ui 0.1.52 → 0.1.53

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.
Files changed (39) hide show
  1. package/dist/{CategoryFilters-DGVHtkMK.js → CategoryFilters-CIWwf9VY.js} +1 -1
  2. package/dist/{CategoryFilters-dbhgKOVq.cjs → CategoryFilters-CvmFCE3e.cjs} +1 -1
  3. package/dist/core/components/Button/Button.test.cjs +1 -1
  4. package/dist/core/components/Button/Button.test.mjs +1 -1
  5. package/dist/core/components/Button/index.cjs +1 -1
  6. package/dist/core/components/Button/index.mjs +1 -1
  7. package/dist/core/components/Footer/index.cjs +1 -1
  8. package/dist/core/components/Footer/index.mjs +1 -1
  9. package/dist/core/components/NavBar/index.cjs +1 -1
  10. package/dist/core/components/NavBar/index.mjs +1 -1
  11. package/dist/core/components/Table/index.cjs +1 -1
  12. package/dist/core/components/Table/index.mjs +34 -34
  13. package/dist/core.cjs +1 -1
  14. package/dist/core.mjs +1 -1
  15. package/dist/{index-014h0tPD.js → index-CnlJ2RgH.js} +64 -64
  16. package/dist/{index-C-M4OSu5.cjs → index-D0ylyll7.cjs} +7 -7
  17. package/dist/index11.css +1 -1
  18. package/dist/index17.css +1 -1
  19. package/dist/index31.css +1 -1
  20. package/dist/index65.css +1 -1
  21. package/dist/main.cjs +1 -1
  22. package/dist/main.mjs +1 -1
  23. package/dist/next/blocks/DocumentListBlock/CategoryFilters.cjs +1 -1
  24. package/dist/next/blocks/DocumentListBlock/CategoryFilters.mjs +2 -2
  25. package/dist/next/blocks/DocumentListBlock/index.cjs +1 -1
  26. package/dist/next/blocks/DocumentListBlock/index.mjs +2 -2
  27. package/dist/next/blocks/TabsBlock/index.cjs +1 -1
  28. package/dist/next/blocks/TabsBlock/index.mjs +1 -1
  29. package/dist/next/blocks/WasHelpfulBlock/index.cjs +1 -1
  30. package/dist/next/blocks/WasHelpfulBlock/index.mjs +1 -1
  31. package/dist/next/cards/ProductCard/index.cjs +1 -1
  32. package/dist/next/cards/ProductCard/index.mjs +37 -37
  33. package/dist/next/cards/SpotlightCard/index.cjs +1 -1
  34. package/dist/next/cards/SpotlightCard/index.mjs +1 -1
  35. package/dist/next/ui/CallToAction/index.cjs +1 -1
  36. package/dist/next/ui/CallToAction/index.mjs +1 -1
  37. package/dist/next/ui/PortableTextRenderer/index.cjs +1 -1
  38. package/dist/next/ui/PortableTextRenderer/index.mjs +68 -68
  39. package/package.json +1 -1
@@ -1,20 +1,20 @@
1
- import { jsx as n, jsxs as N, Fragment as S } from "react/jsx-runtime";
2
- import z, { useRef as F, useEffect as I, useMemo as W } from "react";
3
- import { PortableText as $ } from "@portabletext/react";
4
- import { AnimatedSpan as C } from "../AnimatedSpan/index.mjs";
1
+ import { jsx as n, jsxs as N, Fragment as y } from "react/jsx-runtime";
2
+ import S, { useRef as z, useEffect as F, useMemo as I } from "react";
3
+ import { PortableText as q } from "@portabletext/react";
4
+ import { AnimatedSpan as W } from "../AnimatedSpan/index.mjs";
5
5
  import '../../../index.css';import '../../../index11.css';/* empty css */
6
6
  import "../../../core/components/Avatar/index.mjs";
7
7
  import "../../../core/components/Checkbox/index.mjs";
8
- import { Text as R } from "../../../core/components/Text/index.mjs";
9
- import { Heading as g } from "../../../core/components/Heading/index.mjs";
8
+ import { Text as B } from "../../../core/components/Text/index.mjs";
9
+ import { Heading as _ } from "../../../core/components/Heading/index.mjs";
10
10
  import "react-dom";
11
- import { Table as j } from "../../../core/components/Table/index.mjs";
11
+ import { Table as C } from "../../../core/components/Table/index.mjs";
12
12
  import "../../../core/components/Tabs/index.mjs";
13
13
  import "../../../core/tokens/theme.mjs";
14
- import H from "next/image";
15
- import { useMediaQuery as U } from "../../hooks/useMediaQuery.mjs";
16
- const q = "_container_xhf90_1", E = "_divider_xhf90_15", b = "_richTextImage_xhf90_33", A = "_richTextLink_xhf90_41", P = "_spacerSmall_xhf90_53", Q = "_spacerMedium_xhf90_58", D = "_spacerLarge_xhf90_63", G = "_codeBlock_xhf90_91", J = "_codeBlockWrapper_xhf90_100", K = "_codeFilename_xhf90_112", i = {
17
- container: q,
14
+ import j from "next/image";
15
+ import { useMediaQuery as H } from "../../hooks/useMediaQuery.mjs";
16
+ const U = "_container_1dlqn_1", E = "_divider_1dlqn_15", b = "_richTextImage_1dlqn_33", A = "_richTextLink_1dlqn_41", P = "_spacerSmall_1dlqn_55", Q = "_spacerMedium_1dlqn_60", D = "_spacerLarge_1dlqn_65", G = "_codeBlock_1dlqn_93", J = "_codeBlockWrapper_1dlqn_102", K = "_codeFilename_1dlqn_114", i = {
17
+ container: U,
18
18
  divider: E,
19
19
  richTextImage: b,
20
20
  richTextLink: A,
@@ -27,13 +27,13 @@ const q = "_container_xhf90_1", E = "_divider_xhf90_15", b = "_richTextImage_xhf
27
27
  };
28
28
  function X(e) {
29
29
  return {
30
- normal: ({ children: r }) => /* @__PURE__ */ n(R, { className: e, children: r }),
31
- h1: ({ children: r }) => /* @__PURE__ */ n(g, { className: e, level: 1, children: r }),
32
- h2: ({ children: r }) => /* @__PURE__ */ n(g, { className: e, level: 2, children: r }),
33
- h3: ({ children: r }) => /* @__PURE__ */ n(g, { className: e, level: 3, children: r }),
34
- h4: ({ children: r }) => /* @__PURE__ */ n(g, { className: e, level: 4, children: r }),
35
- h5: ({ children: r }) => /* @__PURE__ */ n(g, { className: e, level: 5, children: r }),
36
- h6: ({ children: r }) => /* @__PURE__ */ n(g, { className: e, level: 6, children: r }),
30
+ normal: ({ children: r }) => /* @__PURE__ */ n(B, { className: e, children: r }),
31
+ h1: ({ children: r }) => /* @__PURE__ */ n(_, { className: e, level: 1, children: r }),
32
+ h2: ({ children: r }) => /* @__PURE__ */ n(_, { className: e, level: 2, children: r }),
33
+ h3: ({ children: r }) => /* @__PURE__ */ n(_, { className: e, level: 3, children: r }),
34
+ h4: ({ children: r }) => /* @__PURE__ */ n(_, { className: e, level: 4, children: r }),
35
+ h5: ({ children: r }) => /* @__PURE__ */ n(_, { className: e, level: 5, children: r }),
36
+ h6: ({ children: r }) => /* @__PURE__ */ n(_, { className: e, level: 6, children: r }),
37
37
  quote: ({ children: r }) => /* @__PURE__ */ n("blockquote", { className: e, children: r })
38
38
  };
39
39
  }
@@ -47,13 +47,13 @@ const Y = {
47
47
  inlineCode: ({ children: e }) => /* @__PURE__ */ n("code", { children: e }),
48
48
  link: ({ children: e, value: r }) => {
49
49
  var h;
50
- const { linkType: o, internalUrl: a, externalUrl: m, blank: d } = r ?? {};
51
- let l = "#";
52
- return o === "external" && m ? l = m : o === "internal" && ((h = a == null ? void 0 : a.slug) != null && h.current) && (l = `/${a.slug.current}`), /* @__PURE__ */ n(
50
+ const { linkType: o, internalUrl: l, externalUrl: a, blank: p } = r ?? {};
51
+ let m = "#";
52
+ return o === "external" && a ? m = a : o === "internal" && ((h = l == null ? void 0 : l.slug) != null && h.current) && (m = `/${l.slug.current}`), /* @__PURE__ */ n(
53
53
  "a",
54
54
  {
55
- href: l,
56
- target: d ? "_blank" : void 0,
55
+ href: m,
56
+ target: p ? "_blank" : void 0,
57
57
  rel: o === "external" ? "noopener noreferrer" : void 0,
58
58
  className: i.richTextLink,
59
59
  children: e
@@ -69,17 +69,17 @@ function Z({
69
69
  baseClassName: e,
70
70
  previousTextRef: r,
71
71
  textOverride: o,
72
- animateText: a,
73
- isMobile: m
72
+ animateText: l,
73
+ isMobile: a
74
74
  }) {
75
- const d = ({
75
+ const p = ({
76
76
  children: t,
77
77
  value: s
78
78
  }) => {
79
- if (!s) return /* @__PURE__ */ n(S, { children: t });
79
+ if (!s) return /* @__PURE__ */ n(y, { children: t });
80
80
  const { colorClass: c } = s;
81
- return o ? a ? /* @__PURE__ */ n(
82
- C,
81
+ return o ? l ? /* @__PURE__ */ n(
82
+ W,
83
83
  {
84
84
  className: c,
85
85
  text: o,
@@ -87,37 +87,37 @@ function Z({
87
87
  },
88
88
  "animated-span"
89
89
  ) : /* @__PURE__ */ n("span", { className: c, children: o }) : /* @__PURE__ */ n("span", { className: c, children: t });
90
- }, l = ({ children: t = [] }) => {
91
- const s = z.Children.count(t);
90
+ }, m = ({ children: t = [] }) => {
91
+ const s = S.Children.count(t);
92
92
  return /* @__PURE__ */ n(
93
93
  "ul",
94
94
  {
95
- style: { columnCount: m ? 1 : s > 7 ? 2 : 1 },
95
+ style: { columnCount: a ? 1 : s > 7 ? 2 : 1 },
96
96
  className: e,
97
97
  children: t
98
98
  }
99
99
  );
100
100
  };
101
101
  let h;
102
- const L = () => h;
102
+ const $ = () => h;
103
103
  return h = {
104
104
  marks: {
105
105
  ...Y,
106
- coloredText: d
106
+ coloredText: p
107
107
  },
108
108
  block: X(e),
109
109
  list: {
110
- bullet: l
110
+ bullet: m
111
111
  },
112
112
  types: {
113
113
  // ── Inline image ────────────────────────────────────────────────────
114
114
  image: ({ value: t }) => {
115
- var c, _, p, k, T;
115
+ var c, u, d, k, T;
116
116
  if (!(t != null && t.imageUrls)) return null;
117
117
  const s = ((c = t.asset) == null ? void 0 : c.altText) || "Content image";
118
118
  return /* @__PURE__ */ N("figure", { className: `${e ?? ""} ${i.richTextImage}`, children: [
119
119
  /* @__PURE__ */ n(
120
- H,
120
+ j,
121
121
  {
122
122
  src: t.imageUrls.medium,
123
123
  alt: s,
@@ -126,7 +126,7 @@ function Z({
126
126
  style: { maxWidth: "100%", height: "auto" }
127
127
  }
128
128
  ),
129
- (((_ = t.asset) == null ? void 0 : _.title) || ((p = t.asset) == null ? void 0 : p.description)) && /* @__PURE__ */ N("figcaption", { children: [
129
+ (((u = t.asset) == null ? void 0 : u.title) || ((d = t.asset) == null ? void 0 : d.description)) && /* @__PURE__ */ N("figcaption", { children: [
130
130
  ((k = t.asset) == null ? void 0 : k.title) && /* @__PURE__ */ n("strong", { children: t.asset.title }),
131
131
  ((T = t.asset) == null ? void 0 : T.description) && /* @__PURE__ */ n("p", { children: t.asset.description })
132
132
  ] })
@@ -145,38 +145,38 @@ function Z({
145
145
  },
146
146
  // ── Table ────────────────────────────────────────────────────────────
147
147
  table: ({ value: t }) => {
148
- var M, w;
149
- if (!((M = t == null ? void 0 : t.rows) != null && M.length)) return null;
150
- const { hasHeadingRow: s } = t, c = s ? t.rows[0] : null, _ = s ? t.rows.slice(1) : t.rows, p = c || _[0];
151
- if (!((w = p == null ? void 0 : p.cells) != null && w.length)) return null;
152
- const k = p.cells.map((B, f) => {
153
- var u;
148
+ var L, M;
149
+ if (!((L = t == null ? void 0 : t.rows) != null && L.length)) return null;
150
+ const { hasHeadingRow: s } = t, c = s ? t.rows[0] : null, u = s ? t.rows.slice(1) : t.rows, d = c || u[0];
151
+ if (!((M = d == null ? void 0 : d.cells) != null && M.length)) return null;
152
+ const k = d.cells.map((w, f) => {
153
+ var x;
154
154
  return {
155
155
  header: c ? /* @__PURE__ */ n(
156
- $,
156
+ q,
157
157
  {
158
- value: (u = c.cells[f]) == null ? void 0 : u.content,
159
- components: L()
158
+ value: (x = c.cells[f]) == null ? void 0 : x.content,
159
+ components: $()
160
160
  }
161
161
  ) : `Column ${f + 1}`,
162
162
  accessor: `col${f}`,
163
- cellRenderer: (x) => x ? /* @__PURE__ */ n(
164
- $,
163
+ cellRenderer: (g) => g ? /* @__PURE__ */ n(
164
+ q,
165
165
  {
166
- value: x,
167
- components: L()
166
+ value: g,
167
+ components: $()
168
168
  }
169
169
  ) : null
170
170
  };
171
- }), T = _.map((B) => {
172
- var u;
171
+ }), T = u.map((w) => {
172
+ var x;
173
173
  const f = {};
174
- return (u = B.cells) == null || u.forEach((x, y) => {
175
- f[`col${y}`] = x == null ? void 0 : x.content;
174
+ return (x = w.cells) == null || x.forEach((g, R) => {
175
+ f[`col${R}`] = g == null ? void 0 : g.content;
176
176
  }), f;
177
177
  });
178
178
  return /* @__PURE__ */ n(
179
- j,
179
+ C,
180
180
  {
181
181
  hasHeadingRow: s,
182
182
  data: T,
@@ -193,30 +193,30 @@ function Z({
193
193
  }
194
194
  }, h;
195
195
  }
196
- const de = ({
196
+ const pe = ({
197
197
  blocks: e,
198
198
  className: r,
199
199
  textOverride: o,
200
- animateText: a
200
+ animateText: l
201
201
  }) => {
202
- const m = U("(max-width: 767px)"), d = F(o);
203
- I(() => {
204
- d.current = o;
202
+ const a = H("(max-width: 767px)"), p = z(o);
203
+ F(() => {
204
+ p.current = o;
205
205
  }, [o]);
206
- const l = W(
206
+ const m = I(
207
207
  () => Z({
208
208
  baseClassName: r,
209
- previousTextRef: d,
209
+ previousTextRef: p,
210
210
  textOverride: o,
211
- animateText: a,
212
- isMobile: m
211
+ animateText: l,
212
+ isMobile: a
213
213
  }),
214
214
  // previousTextRef intentionally omitted — it's a stable ref object.
215
215
  // eslint-disable-next-line react-hooks/exhaustive-deps
216
- [r, o, a, m]
216
+ [r, o, l, a]
217
217
  );
218
- return e ? typeof e == "string" ? /* @__PURE__ */ n(R, { className: r, children: e }) : /* @__PURE__ */ n("div", { className: `${i.container} portableTextContainer`, children: /* @__PURE__ */ n($, { value: e, components: l }) }) : null;
218
+ return e ? typeof e == "string" ? /* @__PURE__ */ n(B, { className: r, children: e }) : /* @__PURE__ */ n("div", { className: `${i.container} portableTextContainer`, children: /* @__PURE__ */ n(q, { value: e, components: m }) }) : null;
219
219
  };
220
220
  export {
221
- de as RichText
221
+ pe as RichText
222
222
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.1.52",
4
+ "version": "0.1.53",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {