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.
- package/dist/{CategoryFilters-DGVHtkMK.js → CategoryFilters-CIWwf9VY.js} +1 -1
- package/dist/{CategoryFilters-dbhgKOVq.cjs → CategoryFilters-CvmFCE3e.cjs} +1 -1
- package/dist/core/components/Button/Button.test.cjs +1 -1
- package/dist/core/components/Button/Button.test.mjs +1 -1
- package/dist/core/components/Button/index.cjs +1 -1
- package/dist/core/components/Button/index.mjs +1 -1
- package/dist/core/components/Footer/index.cjs +1 -1
- package/dist/core/components/Footer/index.mjs +1 -1
- package/dist/core/components/NavBar/index.cjs +1 -1
- package/dist/core/components/NavBar/index.mjs +1 -1
- package/dist/core/components/Table/index.cjs +1 -1
- package/dist/core/components/Table/index.mjs +34 -34
- package/dist/core.cjs +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{index-014h0tPD.js → index-CnlJ2RgH.js} +64 -64
- package/dist/{index-C-M4OSu5.cjs → index-D0ylyll7.cjs} +7 -7
- package/dist/index11.css +1 -1
- package/dist/index17.css +1 -1
- package/dist/index31.css +1 -1
- package/dist/index65.css +1 -1
- package/dist/main.cjs +1 -1
- package/dist/main.mjs +1 -1
- package/dist/next/blocks/DocumentListBlock/CategoryFilters.cjs +1 -1
- package/dist/next/blocks/DocumentListBlock/CategoryFilters.mjs +2 -2
- package/dist/next/blocks/DocumentListBlock/index.cjs +1 -1
- package/dist/next/blocks/DocumentListBlock/index.mjs +2 -2
- package/dist/next/blocks/TabsBlock/index.cjs +1 -1
- package/dist/next/blocks/TabsBlock/index.mjs +1 -1
- package/dist/next/blocks/WasHelpfulBlock/index.cjs +1 -1
- package/dist/next/blocks/WasHelpfulBlock/index.mjs +1 -1
- package/dist/next/cards/ProductCard/index.cjs +1 -1
- package/dist/next/cards/ProductCard/index.mjs +37 -37
- package/dist/next/cards/SpotlightCard/index.cjs +1 -1
- package/dist/next/cards/SpotlightCard/index.mjs +1 -1
- package/dist/next/ui/CallToAction/index.cjs +1 -1
- package/dist/next/ui/CallToAction/index.mjs +1 -1
- package/dist/next/ui/PortableTextRenderer/index.cjs +1 -1
- package/dist/next/ui/PortableTextRenderer/index.mjs +68 -68
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as n, jsxs as N, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { PortableText as
|
|
4
|
-
import { AnimatedSpan as
|
|
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
|
|
9
|
-
import { Heading as
|
|
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
|
|
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
|
|
15
|
-
import { useMediaQuery as
|
|
16
|
-
const
|
|
17
|
-
container:
|
|
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(
|
|
31
|
-
h1: ({ children: r }) => /* @__PURE__ */ n(
|
|
32
|
-
h2: ({ children: r }) => /* @__PURE__ */ n(
|
|
33
|
-
h3: ({ children: r }) => /* @__PURE__ */ n(
|
|
34
|
-
h4: ({ children: r }) => /* @__PURE__ */ n(
|
|
35
|
-
h5: ({ children: r }) => /* @__PURE__ */ n(
|
|
36
|
-
h6: ({ children: r }) => /* @__PURE__ */ n(
|
|
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:
|
|
51
|
-
let
|
|
52
|
-
return o === "external" &&
|
|
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:
|
|
56
|
-
target:
|
|
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:
|
|
73
|
-
isMobile:
|
|
72
|
+
animateText: l,
|
|
73
|
+
isMobile: a
|
|
74
74
|
}) {
|
|
75
|
-
const
|
|
75
|
+
const p = ({
|
|
76
76
|
children: t,
|
|
77
77
|
value: s
|
|
78
78
|
}) => {
|
|
79
|
-
if (!s) return /* @__PURE__ */ n(
|
|
79
|
+
if (!s) return /* @__PURE__ */ n(y, { children: t });
|
|
80
80
|
const { colorClass: c } = s;
|
|
81
|
-
return o ?
|
|
82
|
-
|
|
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
|
-
},
|
|
91
|
-
const s =
|
|
90
|
+
}, m = ({ children: t = [] }) => {
|
|
91
|
+
const s = S.Children.count(t);
|
|
92
92
|
return /* @__PURE__ */ n(
|
|
93
93
|
"ul",
|
|
94
94
|
{
|
|
95
|
-
style: { columnCount:
|
|
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
|
|
102
|
+
const $ = () => h;
|
|
103
103
|
return h = {
|
|
104
104
|
marks: {
|
|
105
105
|
...Y,
|
|
106
|
-
coloredText:
|
|
106
|
+
coloredText: p
|
|
107
107
|
},
|
|
108
108
|
block: X(e),
|
|
109
109
|
list: {
|
|
110
|
-
bullet:
|
|
110
|
+
bullet: m
|
|
111
111
|
},
|
|
112
112
|
types: {
|
|
113
113
|
// ── Inline image ────────────────────────────────────────────────────
|
|
114
114
|
image: ({ value: t }) => {
|
|
115
|
-
var c,
|
|
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
|
-
|
|
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
|
-
(((
|
|
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
|
|
149
|
-
if (!((
|
|
150
|
-
const { hasHeadingRow: s } = t, c = s ? t.rows[0] : null,
|
|
151
|
-
if (!((
|
|
152
|
-
const k =
|
|
153
|
-
var
|
|
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: (
|
|
159
|
-
components:
|
|
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: (
|
|
164
|
-
|
|
163
|
+
cellRenderer: (g) => g ? /* @__PURE__ */ n(
|
|
164
|
+
q,
|
|
165
165
|
{
|
|
166
|
-
value:
|
|
167
|
-
components:
|
|
166
|
+
value: g,
|
|
167
|
+
components: $()
|
|
168
168
|
}
|
|
169
169
|
) : null
|
|
170
170
|
};
|
|
171
|
-
}), T =
|
|
172
|
-
var
|
|
171
|
+
}), T = u.map((w) => {
|
|
172
|
+
var x;
|
|
173
173
|
const f = {};
|
|
174
|
-
return (
|
|
175
|
-
f[`col${
|
|
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
|
-
|
|
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
|
|
196
|
+
const pe = ({
|
|
197
197
|
blocks: e,
|
|
198
198
|
className: r,
|
|
199
199
|
textOverride: o,
|
|
200
|
-
animateText:
|
|
200
|
+
animateText: l
|
|
201
201
|
}) => {
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
const a = H("(max-width: 767px)"), p = z(o);
|
|
203
|
+
F(() => {
|
|
204
|
+
p.current = o;
|
|
205
205
|
}, [o]);
|
|
206
|
-
const
|
|
206
|
+
const m = I(
|
|
207
207
|
() => Z({
|
|
208
208
|
baseClassName: r,
|
|
209
|
-
previousTextRef:
|
|
209
|
+
previousTextRef: p,
|
|
210
210
|
textOverride: o,
|
|
211
|
-
animateText:
|
|
212
|
-
isMobile:
|
|
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,
|
|
216
|
+
[r, o, l, a]
|
|
217
217
|
);
|
|
218
|
-
return e ? typeof e == "string" ? /* @__PURE__ */ n(
|
|
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
|
-
|
|
221
|
+
pe as RichText
|
|
222
222
|
};
|