quirk-ui 0.0.382 → 0.0.384

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,6 +1,6 @@
1
1
  import { jsxs as n, jsx as l } from "react/jsx-runtime";
2
2
  import "./chevron-down-DSUzBz9F-BMmG6MOn.js";
3
- import { v as u } from "./index-1yHqBif8-OzZiIWc_.js";
3
+ import { v as u } from "./index-D3QiuZPa-CdCr-7F2.js";
4
4
  import { X as m } from "./x-CnsEH4Ox.js";
5
5
  import './assets/CategoryFilters.css';const f = "_documentList_17zlj_1", H = "_container_17zlj_9", L = "_heading_17zlj_20", S = "_listContainer_17zlj_26", F = "_listWrapper_17zlj_37", b = "_list_17zlj_26", g = "_listHeader_17zlj_58", k = "_listSearch_17zlj_71", v = "_clearSearch_17zlj_98", C = "_listHeaderFilters_17zlj_117", w = "_listResults_17zlj_128", y = "_listSort_17zlj_132", x = "_filterToggle_17zlj_155", N = "_filterHeader_17zlj_170", I = "_loadMore_17zlj_191", M = "_filterList_17zlj_195", R = "_listFilters_17zlj_202", T = "_applyFilters_17zlj_210", W = "_show_17zlj_239", $ = "_hide_17zlj_248", A = "_buttonIsLoading_17zlj_299", s = {
6
6
  documentList: f,
@@ -1,6 +1,6 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { d as i, i as o, r, s as l, g as t } from "../../../vi.ClIskdbk-D39wA6Kr.js";
3
- import { C as a } from "../../../index-NCmfEddi.js";
3
+ import { C as a } from "../../../index-C7H6hWZh.js";
4
4
  import "../../../index-DPGXWTtt.js";
5
5
  i("CallToAction", () => {
6
6
  o("renders as a button when 'as' is set to 'button'", () => {
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { C as c } from "../../../index-NCmfEddi.js";
2
+ import { C as c } from "../../../index-C7H6hWZh.js";
3
3
  import "../../../index-CeBA0PT0.js";
4
4
  import "../../../external-link-BOPobeQJ.js";
5
5
  import "../../../play-DYgKiSaf.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as a, jsxs as r } from "react/jsx-runtime";
2
- import { C as y } from "../../../index-NCmfEddi.js";
2
+ import { C as y } from "../../../index-C7H6hWZh.js";
3
3
  import { ButtonGroup as k } from "../ButtonGroup/index.js";
4
4
  import { a as $, b as F, c as I, d as w, e as A } from "../../../index-CeBA0PT0.js";
5
5
  import { E } from "../../../external-link-BOPobeQJ.js";
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as r, Fragment as ee } from "react/jsx-runtime";
2
2
  import { useState as h, useEffect as T, useRef as R, useCallback as A } from "react";
3
3
  import { s as e, N as Ce } from "../../../NavLink-RkB5XhMV.js";
4
4
  import { Modal as ne } from "../Modal/index.js";
5
- import { a as xe, C as ae } from "../../../index-NCmfEddi.js";
5
+ import { a as xe, C as ae } from "../../../index-C7H6hWZh.js";
6
6
  import { ButtonGroup as le } from "../ButtonGroup/index.js";
7
7
  import { E as F } from "../../../external-link-BOPobeQJ.js";
8
8
  import { X as Me } from "../../../x-CnsEH4Ox.js";
package/dist/core.js CHANGED
@@ -6,7 +6,7 @@ import { Badge as i } from "./core/components/Badge/index.js";
6
6
  import { Box as l } from "./core/components/Box/index.js";
7
7
  import { Breadcrumbs as d } from "./core/components/Breadcrumbs/index.js";
8
8
  import { ButtonGroup as u } from "./core/components/ButtonGroup/index.js";
9
- import { C } from "./index-NCmfEddi.js";
9
+ import { C } from "./index-C7H6hWZh.js";
10
10
  import { Card as T } from "./core/components/Card/index.js";
11
11
  import { Carousel as g } from "./core/components/Carousel/index.js";
12
12
  import { Checkbox as F } from "./core/components/Checkbox/index.js";
@@ -6,7 +6,7 @@ import { P as x } from "./play-DYgKiSaf.js";
6
6
  import { C as $ } from "./chevron-down-DSUzBz9F.js";
7
7
  import { A as L } from "./arrow-right-QEwnX3Sk.js";
8
8
  import { A as M } from "./arrow-left-BIJvHwNQ.js";
9
- import './assets/index-1yHqBif8.css';/**
9
+ import './assets/index-D3QiuZPa.css';/**
10
10
  * @license lucide-react v0.488.0 - ISC
11
11
  *
12
12
  * This source code is licensed under the ISC license.
@@ -1,7 +1,7 @@
1
1
  import { jsx as a, jsxs as k, Fragment as M } from "react/jsx-runtime";
2
2
  import d from "react";
3
3
  import { b as l, e as P } from "./chevron-down-DSUzBz9F-BMmG6MOn.js";
4
- import './assets/index-1yHqBif8.css';var O = {
4
+ import './assets/index-D3QiuZPa.css';var O = {
5
5
  color: void 0,
6
6
  size: void 0,
7
7
  className: void 0,
package/dist/main.js CHANGED
@@ -6,7 +6,7 @@ import { Badge as i } from "./core/components/Badge/index.js";
6
6
  import { Box as l } from "./core/components/Box/index.js";
7
7
  import { Breadcrumbs as B } from "./core/components/Breadcrumbs/index.js";
8
8
  import { ButtonGroup as k } from "./core/components/ButtonGroup/index.js";
9
- import { C as u } from "./index-NCmfEddi.js";
9
+ import { C as u } from "./index-C7H6hWZh.js";
10
10
  import { Card as S } from "./core/components/Card/index.js";
11
11
  import { Carousel as b } from "./core/components/Carousel/index.js";
12
12
  import { Checkbox as A } from "./core/components/Checkbox/index.js";
@@ -1,24 +1,24 @@
1
- import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
- import { useState as z, useEffect as D, useMemo as x } from "react";
1
+ import { jsx as c, jsxs as m } from "react/jsx-runtime";
2
+ import { useState as w, useEffect as z, useMemo as y } from "react";
3
3
  import '../../../assets/colors.css';import '../../../assets/index.css';import '../../../assets/index5.css';/* empty css */
4
- import { Grid as S } from "../../../core/components/Grid/index.js";
4
+ import { Grid as D } from "../../../core/components/Grid/index.js";
5
5
  import "react-dom";
6
6
  import "../../../core/components/Tabs/index.js";
7
7
  /* empty css */
8
- import { RichText as n } from "../../ui/PortableTextRenderer/index.js";
9
- import { CallToActions as V } from "../../ui/CallToActions/index.js";
10
- import { ProductCard as A } from "../../cards/ProductCard/index.js";
11
- import { GridCard as y } from "../../cards/GridCard/index.js";
12
- import { ServiceCard as M } from "../../cards/ServiceCard/index.js";
13
- import { TestimonialCard as j } from "../../cards/TestimonialCard/index.js";
14
- import { ReviewCard as B } from "../../cards/ReviewCard/index.js";
15
- import { useMediaQuery as E } from "../../hooks/useMediaQuery.js";
16
- import { useStyleClasses as I } from "../../hooks/useStyleClasses.js";
17
- const L = "_cardGrid_11um4_1", P = "_container_11um4_7", R = "_heading_11um4_18", O = "_headingHorizontal_11um4_34", Q = "_title_11um4_38", U = "_headingVertical_11um4_47", q = "_description_11um4_58", F = "_disclaimer_11um4_63", J = "_grid_11um4_79", r = {
18
- cardGrid: L,
19
- container: P,
20
- heading: R,
21
- headingHorizontal: O,
8
+ import { RichText as u } from "../../ui/PortableTextRenderer/index.js";
9
+ import { CallToActions as E } from "../../ui/CallToActions/index.js";
10
+ import { ProductCard as S } from "../../cards/ProductCard/index.js";
11
+ import { GridCard as N } from "../../cards/GridCard/index.js";
12
+ import { ServiceCard as A } from "../../cards/ServiceCard/index.js";
13
+ import { TestimonialCard as M } from "../../cards/TestimonialCard/index.js";
14
+ import { ReviewCard as R } from "../../cards/ReviewCard/index.js";
15
+ import { useMediaQuery as j } from "../../hooks/useMediaQuery.js";
16
+ import { useStyleClasses as B } from "../../hooks/useStyleClasses.js";
17
+ const I = "_cardGrid_11um4_1", L = "_container_11um4_7", O = "_heading_11um4_18", P = "_headingHorizontal_11um4_34", Q = "_title_11um4_38", U = "_headingVertical_11um4_47", q = "_description_11um4_58", F = "_disclaimer_11um4_63", J = "_grid_11um4_79", r = {
18
+ cardGrid: I,
19
+ container: L,
20
+ heading: O,
21
+ headingHorizontal: P,
22
22
  title: Q,
23
23
  headingVertical: U,
24
24
  description: q,
@@ -28,61 +28,61 @@ const L = "_cardGrid_11um4_1", P = "_container_11um4_7", R = "_heading_11um4_18"
28
28
  function at({
29
29
  heading: t,
30
30
  grid: s,
31
- textReplaceOnHover: N = !0,
31
+ textReplaceOnHover: p = !0,
32
32
  callToAction: a,
33
33
  styleOptions: C
34
34
  }) {
35
- var k;
36
- const [u, p] = z(null), _ = E("(max-width: 768px)"), f = I(C), T = {
35
+ var v;
36
+ const [n, _] = w(null), f = j("(max-width: 768px)"), i = B(C), H = {
37
37
  horizontal: r.headingHorizontal,
38
38
  vertical: r.headingVertical
39
39
  }[(t == null ? void 0 : t.headingLayout) ?? "vertical"];
40
- function i(o) {
40
+ function k(o) {
41
41
  for (const l of o)
42
42
  if (!(!l.children || !l.markDefs)) {
43
- for (const c of l.children)
44
- if (c != null && c.marks)
45
- for (const b of c.marks) {
46
- const v = l.markDefs.find((w) => w._key === b);
47
- if (v && v._type === "coloredText")
48
- return c.text;
43
+ for (const e of l.children)
44
+ if (e != null && e.marks)
45
+ for (const V of e.marks) {
46
+ const x = l.markDefs.find((b) => b._key === V);
47
+ if (x && x._type === "coloredText")
48
+ return e.text;
49
49
  }
50
50
  }
51
51
  return null;
52
52
  }
53
- D(() => {
54
- t && t.title && p(i(t.title));
53
+ z(() => {
54
+ t && t.title && _(k(t.title));
55
55
  }, [t]);
56
- const $ = x(() => {
57
- if (s != null && s.areas && !_)
56
+ const T = y(() => {
57
+ if (s != null && s.areas && !f)
58
58
  return s == null ? void 0 : s.areas.map((o) => o.trim().split(/\s+/));
59
- }, [s == null ? void 0 : s.areas, _]);
60
- console.log("HEADING", t);
61
- const G = x(
62
- () => /* @__PURE__ */ e(
63
- n,
59
+ }, [s == null ? void 0 : s.areas, f]);
60
+ console.log("HEADING", t), console.log("HOVERED", n);
61
+ const $ = y(
62
+ () => /* @__PURE__ */ c(
63
+ u,
64
64
  {
65
65
  className: r.title,
66
- textOverride: u ?? "",
66
+ textOverride: n ?? "",
67
67
  animateText: (t == null ? void 0 : t.animateText) ?? !1,
68
68
  blocks: t == null ? void 0 : t.title
69
69
  }
70
70
  ),
71
- [t == null ? void 0 : t.title, u, t == null ? void 0 : t.animateText]
72
- ), H = !(t != null && t.title) && !(t != null && t.description);
73
- return /* @__PURE__ */ e(
71
+ [t == null ? void 0 : t.title, n, t == null ? void 0 : t.animateText]
72
+ ), G = !(t != null && t.title) && !(t != null && t.description);
73
+ return /* @__PURE__ */ c(
74
74
  "section",
75
75
  {
76
- className: `${r.cardGrid} ${(s == null ? void 0 : s.className) ?? ""} ${f}`,
76
+ className: `${r.cardGrid} ${(s == null ? void 0 : s.className) ?? ""} ${i}`,
77
77
  children: /* @__PURE__ */ m(
78
78
  "article",
79
79
  {
80
- className: `${r.container} ${f.includes("split") ? "split" : "default"}`,
80
+ className: `${r.container} ${i.includes("split") ? "split" : "default"}`,
81
81
  children: [
82
- !H && /* @__PURE__ */ m("div", { className: `${r.heading} ${T ?? ""}`, children: [
83
- (t == null ? void 0 : t.title) && G,
84
- (t == null ? void 0 : t.description) && /* @__PURE__ */ e(
85
- n,
82
+ !G && /* @__PURE__ */ m("div", { className: `${r.heading} ${H ?? ""}`, children: [
83
+ (t == null ? void 0 : t.title) && $,
84
+ (t == null ? void 0 : t.description) && /* @__PURE__ */ c(
85
+ u,
86
86
  {
87
87
  className: r.description,
88
88
  blocks: t == null ? void 0 : t.description
@@ -94,27 +94,27 @@ function at({
94
94
  {
95
95
  className: `${r.grid} ${s != null && s.className && r[s == null ? void 0 : s.className] ? r[s == null ? void 0 : s.className] : (s == null ? void 0 : s.className) ?? ""}`,
96
96
  children: [
97
- /* @__PURE__ */ e(S, { columns: s == null ? void 0 : s.columns, gap: s == null ? void 0 : s.gap, areas: $, children: (k = s == null ? void 0 : s.items) == null ? void 0 : k.map((o) => {
98
- const l = o.title ? i(o.title) : "", c = {
97
+ /* @__PURE__ */ c(D, { columns: s == null ? void 0 : s.columns, gap: s == null ? void 0 : s.gap, areas: T, children: (v = s == null ? void 0 : s.items) == null ? void 0 : v.map((o) => {
98
+ const l = o.title ? k(o.title) : "", e = {
99
99
  gridArea: o.gridArea,
100
100
  onHover: () => {
101
- N && p(l);
101
+ console.log("HOVER", p), p && _(l);
102
102
  },
103
103
  ...o
104
104
  };
105
105
  switch (o.variant) {
106
106
  case "service":
107
- return /* @__PURE__ */ e(M, { ...c }, o._key);
107
+ return /* @__PURE__ */ c(A, { ...e }, o._key);
108
108
  case "grid":
109
- return /* @__PURE__ */ e(y, { ...c }, o._key);
109
+ return /* @__PURE__ */ c(N, { ...e }, o._key);
110
110
  case "image":
111
- return /* @__PURE__ */ e(y, { ...c }, o._key);
111
+ return /* @__PURE__ */ c(N, { ...e }, o._key);
112
112
  case "product":
113
- return /* @__PURE__ */ e(A, { ...c }, o._key);
113
+ return /* @__PURE__ */ c(S, { ...e }, o._key);
114
114
  case "testimonial":
115
- return /* @__PURE__ */ e(j, { ...c }, o._key);
115
+ return /* @__PURE__ */ c(M, { ...e }, o._key);
116
116
  case "review":
117
- return /* @__PURE__ */ e(B, { ...c }, o._key);
117
+ return /* @__PURE__ */ c(R, { ...e }, o._key);
118
118
  default:
119
119
  return /* @__PURE__ */ m("div", { children: [
120
120
  "Unknown item type: ",
@@ -122,15 +122,15 @@ function at({
122
122
  ] }, o._key);
123
123
  }
124
124
  }) }),
125
- a && /* @__PURE__ */ e(
126
- V,
125
+ a && /* @__PURE__ */ c(
126
+ E,
127
127
  {
128
128
  items: a.items,
129
129
  alignment: a.alignment
130
130
  }
131
131
  ),
132
- /* @__PURE__ */ e("div", { children: (t == null ? void 0 : t.disclaimer) && /* @__PURE__ */ e(
133
- n,
132
+ /* @__PURE__ */ c("div", { children: (t == null ? void 0 : t.disclaimer) && /* @__PURE__ */ c(
133
+ u,
134
134
  {
135
135
  className: r.disclaimer,
136
136
  blocks: t == null ? void 0 : t.disclaimer
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
- import { C as e } from "../../../CategoryFilters-Dks02kbp.js";
2
+ import { C as e } from "../../../CategoryFilters-DFRdVXYQ.js";
3
3
  import "../../../chevron-down-DSUzBz9F-BMmG6MOn.js";
4
- import "../../../index-1yHqBif8-OzZiIWc_.js";
4
+ import "../../../index-D3QiuZPa-CdCr-7F2.js";
5
5
  import "../../../x-CnsEH4Ox.js";
6
6
  export {
7
7
  e as CategoryFilters
@@ -4,14 +4,14 @@ import { RichText as H } from "../../ui/PortableTextRenderer/index.js";
4
4
  import { useStyleClasses as J } from "../../hooks/useStyleClasses.js";
5
5
  import { useLocaleBridge as K } from "../../contexts/LocaleBridge.js";
6
6
  import '../../../assets/colors.css';import '../../../assets/index.css';/* empty css */
7
- import { C as L } from "../../../index-NCmfEddi.js";
7
+ import { C as L } from "../../../index-C7H6hWZh.js";
8
8
  import { Input as Q } from "../../../core/components/Input/index.js";
9
9
  import "react-dom";
10
10
  import { Select as V } from "../../../core/components/Select/index.js";
11
11
  import "../../../core/components/Tabs/index.js";
12
12
  /* empty css */
13
13
  import { BlogArticleCard as Y } from "../../cards/BlogArticleCard/index.js";
14
- import { s, C as F } from "../../../CategoryFilters-Dks02kbp.js";
14
+ import { s, C as F } from "../../../CategoryFilters-DFRdVXYQ.js";
15
15
  import { X as ee } from "../../../x-CnsEH4Ox.js";
16
16
  const te = [
17
17
  { label: "Newest", value: "date-desc" },
@@ -2,7 +2,7 @@ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as X, useEffect as Y } from "react";
3
3
  import { useStyleClasses as Z } from "../../hooks/useStyleClasses.js";
4
4
  import '../../../assets/colors.css';import '../../../assets/index.css';import '../../../assets/index12.css';/* empty css */
5
- import { C as A } from "../../../index-NCmfEddi.js";
5
+ import { C as A } from "../../../index-C7H6hWZh.js";
6
6
  import "react-dom";
7
7
  import { Tabs as f } from "../../../core/components/Tabs/index.js";
8
8
  /* empty css */
@@ -1,7 +1,7 @@
1
1
  import { jsx as t, jsxs as r, Fragment as _ } from "react/jsx-runtime";
2
2
  import { useState as f, useEffect as m } from "react";
3
3
  import "../../../chevron-down-DSUzBz9F-BMmG6MOn.js";
4
- import { v as p } from "../../../index-1yHqBif8-OzZiIWc_.js";
4
+ import { v as p } from "../../../index-D3QiuZPa-CdCr-7F2.js";
5
5
  import '../../../assets/index67.css';const g = "_buttonGroup_15lw8_1", b = "_left_15lw8_16", w = "_center_15lw8_20", y = "_right_15lw8_29", v = "_vertical_15lw8_33", N = "_horizontal_15lw8_37", n = {
6
6
  buttonGroup: g,
7
7
  left: b,
@@ -2,7 +2,7 @@ import { jsxs as y, jsx as n } from "react/jsx-runtime";
2
2
  import v from "next/image";
3
3
  import '../../../assets/colors.css';import '../../../assets/index.css';import '../../../assets/index2.css';/* empty css */
4
4
  import "react";
5
- import { C as O } from "../../../index-NCmfEddi.js";
5
+ import { C as O } from "../../../index-C7H6hWZh.js";
6
6
  import "react-dom";
7
7
  import "../../../core/components/Tabs/index.js";
8
8
  /* empty css */
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import { useState as c, useEffect as b } from "react";
3
3
  import '../../../assets/colors.css';import '../../../assets/index.css';/* empty css */
4
4
  import { ButtonGroup as h } from "../../../core/components/ButtonGroup/index.js";
5
- import { C as l } from "../../../index-NCmfEddi.js";
5
+ import { C as l } from "../../../index-C7H6hWZh.js";
6
6
  import { Modal as p } from "../../../core/components/Modal/index.js";
7
7
  import "../../../core/components/Tabs/index.js";
8
8
  /* empty css */
@@ -1,48 +1,48 @@
1
- import { jsx as e, jsxs as _, Fragment as y } from "react/jsx-runtime";
2
- import N, { useRef as L, useEffect as C, useMemo as I } from "react";
3
- import { PortableText as $ } from "@portabletext/react";
4
- import { AnimatedSpan as z } from "../AnimatedSpan/index.js";
1
+ import { jsx as e, jsxs as _, Fragment as N } from "react/jsx-runtime";
2
+ import y, { useRef as I, useEffect as L, useMemo as E } from "react";
3
+ import { PortableText as C } from "@portabletext/react";
4
+ import { AnimatedSpan as $ } from "../AnimatedSpan/index.js";
5
5
  import '../../../assets/colors.css';import '../../../assets/index.css';import '../../../assets/index15.css';/* empty css */
6
- import { Heading as l } from "../../../core/components/Heading/index.js";
6
+ import { Heading as m } from "../../../core/components/Heading/index.js";
7
7
  import "react-dom";
8
8
  import "../../../core/components/Tabs/index.js";
9
9
  import { Text as k } from "../../../core/components/Text/index.js";
10
10
  /* empty css */
11
- import E from "next/image";
12
- import { useMediaQuery as w } from "../../hooks/useMediaQuery.js";
13
- const M = "_container_1yh99_1", P = "_divider_1yh99_12", b = "_richTextImage_1yh99_26", j = "_richTextLink_1yh99_34", f = {
14
- container: M,
15
- divider: P,
16
- richTextImage: b,
17
- richTextLink: j
18
- }, q = (r) => ({
11
+ import z from "next/image";
12
+ import { useMediaQuery as M } from "../../hooks/useMediaQuery.js";
13
+ const R = "_container_1yh99_1", w = "_divider_1yh99_12", A = "_richTextImage_1yh99_26", P = "_richTextLink_1yh99_34", f = {
14
+ container: R,
15
+ divider: w,
16
+ richTextImage: A,
17
+ richTextLink: P
18
+ }, b = (r) => ({
19
19
  normal: ({ children: n }) => /* @__PURE__ */ e(k, { className: r, children: n }),
20
- h1: ({ children: n }) => /* @__PURE__ */ e(l, { className: r, level: 1, children: n }),
21
- h2: ({ children: n }) => /* @__PURE__ */ e(l, { className: r, level: 2, children: n }),
22
- h3: ({ children: n }) => /* @__PURE__ */ e(l, { className: r, level: 3, children: n }),
23
- h4: ({ children: n }) => /* @__PURE__ */ e(l, { className: r, level: 4, children: n }),
24
- h5: ({ children: n }) => /* @__PURE__ */ e(l, { className: r, level: 5, children: n }),
25
- h6: ({ children: n }) => /* @__PURE__ */ e(l, { className: r, level: 6, children: n }),
20
+ h1: ({ children: n }) => /* @__PURE__ */ e(m, { className: r, level: 1, children: n }),
21
+ h2: ({ children: n }) => /* @__PURE__ */ e(m, { className: r, level: 2, children: n }),
22
+ h3: ({ children: n }) => /* @__PURE__ */ e(m, { className: r, level: 3, children: n }),
23
+ h4: ({ children: n }) => /* @__PURE__ */ e(m, { className: r, level: 4, children: n }),
24
+ h5: ({ children: n }) => /* @__PURE__ */ e(m, { className: r, level: 5, children: n }),
25
+ h6: ({ children: n }) => /* @__PURE__ */ e(m, { className: r, level: 6, children: n }),
26
26
  quote: ({ children: n }) => /* @__PURE__ */ e("blockquote", { className: r, children: n })
27
- }), B = (r, c, n, x, d) => {
28
- const a = q(r);
27
+ }), j = (r, c, n, a, g) => {
28
+ const p = b(r);
29
29
  return {
30
30
  marks: {
31
31
  coloredText: ({
32
32
  children: t,
33
33
  value: o
34
34
  }) => {
35
- if (!o) return /* @__PURE__ */ e(y, { children: t });
36
- const { colorClass: i } = o, s = c == null ? void 0 : c.current;
37
- return x && n ? /* @__PURE__ */ e(
38
- z,
35
+ if (!o) return /* @__PURE__ */ e(N, { children: t });
36
+ const { colorClass: s } = o, i = c == null ? void 0 : c.current;
37
+ return a && n ? (console.log("ANIMATING"), /* @__PURE__ */ e(
38
+ $,
39
39
  {
40
- className: i,
40
+ className: s,
41
41
  text: n,
42
- prevText: s
42
+ prevText: i
43
43
  },
44
44
  "animated-span"
45
- ) : /* @__PURE__ */ e("span", { className: i, children: t });
45
+ )) : /* @__PURE__ */ e("span", { className: s, children: t });
46
46
  },
47
47
  strong: ({ children: t }) => /* @__PURE__ */ e("strong", { children: t }),
48
48
  em: ({ children: t }) => /* @__PURE__ */ e("em", { children: t }),
@@ -51,34 +51,34 @@ const M = "_container_1yh99_1", P = "_divider_1yh99_12", b = "_richTextImage_1yh
51
51
  center: ({ children: t }) => /* @__PURE__ */ e("span", { className: "textCenter", children: t }),
52
52
  right: ({ children: t }) => /* @__PURE__ */ e("span", { className: "textRight", children: t }),
53
53
  link: ({ children: t, value: o }) => {
54
- var h;
55
- const { linkType: i, internalUrl: s, externalUrl: p, blank: g } = o;
56
- let m = "#";
57
- return i === "external" && p ? m = p : i === "internal" && ((h = s == null ? void 0 : s.slug) != null && h.current) && (m = `/${s == null ? void 0 : s.slug.current}`), /* @__PURE__ */ e(
54
+ var d;
55
+ const { linkType: s, internalUrl: i, externalUrl: h, blank: x } = o;
56
+ let l = "#";
57
+ return s === "external" && h ? l = h : s === "internal" && ((d = i == null ? void 0 : i.slug) != null && d.current) && (l = `/${i == null ? void 0 : i.slug.current}`), /* @__PURE__ */ e(
58
58
  "a",
59
59
  {
60
- href: m,
61
- target: g ? "_blank" : void 0,
62
- rel: i === "external" ? "noopener noreferrer" : void 0,
60
+ href: l,
61
+ target: x ? "_blank" : void 0,
62
+ rel: s === "external" ? "noopener noreferrer" : void 0,
63
63
  className: f.richTextLink,
64
64
  children: t
65
65
  }
66
66
  );
67
67
  },
68
68
  textSize: ({ children: t, value: o }) => {
69
- const i = o != null && o.size ? `text-${o.size}` : "";
70
- return /* @__PURE__ */ e("span", { className: i, children: t });
69
+ const s = o != null && o.size ? `text-${o.size}` : "";
70
+ return /* @__PURE__ */ e("span", { className: s, children: t });
71
71
  }
72
72
  },
73
- block: a,
73
+ block: p,
74
74
  list: {
75
75
  bullet: ({ children: t = [] }) => {
76
- const o = N.Children.count(t);
76
+ const o = y.Children.count(t);
77
77
  return /* @__PURE__ */ e(
78
78
  "ul",
79
79
  {
80
80
  style: {
81
- columnCount: d ? 1 : o > 5 ? 2 : 1
81
+ columnCount: g ? 1 : o > 5 ? 2 : 1
82
82
  },
83
83
  className: r,
84
84
  children: t
@@ -88,12 +88,12 @@ const M = "_container_1yh99_1", P = "_divider_1yh99_12", b = "_richTextImage_1yh
88
88
  },
89
89
  types: {
90
90
  image: ({ value: t }) => {
91
- var i, s, p, g, m, u, h;
91
+ var s, i, h, x, l, u, d;
92
92
  if (!(t != null && t.imageUrl)) return null;
93
- const o = ((i = t.asset) == null ? void 0 : i.altText) || "Content image";
93
+ const o = ((s = t.asset) == null ? void 0 : s.altText) || "Content image";
94
94
  return /* @__PURE__ */ _("figure", { className: `${r} ${f.richTextImage}`, children: [
95
95
  /* @__PURE__ */ e(
96
- E,
96
+ z,
97
97
  {
98
98
  src: t.imageUrl,
99
99
  alt: o,
@@ -102,9 +102,9 @@ const M = "_container_1yh99_1", P = "_divider_1yh99_12", b = "_richTextImage_1yh
102
102
  style: { maxWidth: "100%", height: "auto" }
103
103
  }
104
104
  ),
105
- (((s = t.asset) == null ? void 0 : s.title) || ((p = t.asset) == null ? void 0 : p.description)) && /* @__PURE__ */ _("figcaption", { children: [
106
- ((g = t.asset) == null ? void 0 : g.title) && /* @__PURE__ */ e("strong", { children: (m = t.asset) == null ? void 0 : m.title }),
107
- ((u = t.asset) == null ? void 0 : u.description) && /* @__PURE__ */ e("p", { children: (h = t.asset) == null ? void 0 : h.description })
105
+ (((i = t.asset) == null ? void 0 : i.title) || ((h = t.asset) == null ? void 0 : h.description)) && /* @__PURE__ */ _("figcaption", { children: [
106
+ ((x = t.asset) == null ? void 0 : x.title) && /* @__PURE__ */ e("strong", { children: (l = t.asset) == null ? void 0 : l.title }),
107
+ ((u = t.asset) == null ? void 0 : u.description) && /* @__PURE__ */ e("p", { children: (d = t.asset) == null ? void 0 : d.description })
108
108
  ] })
109
109
  ] });
110
110
  },
@@ -115,25 +115,27 @@ const M = "_container_1yh99_1", P = "_divider_1yh99_12", b = "_richTextImage_1yh
115
115
  blocks: r,
116
116
  className: c,
117
117
  textOverride: n,
118
- animateText: x
118
+ animateText: a
119
119
  }) => {
120
- const d = w("(max-width: 767px)"), a = L(n);
121
- C(() => {
122
- a.current = n;
120
+ const g = M("(max-width: 767px)");
121
+ console.log("OVERRIDE", n, a);
122
+ const p = I(n);
123
+ L(() => {
124
+ p.current = n;
123
125
  }, [n]);
124
- const T = I(
125
- () => B(
126
+ const T = E(
127
+ () => j(
126
128
  c,
127
- a,
129
+ p,
128
130
  n,
129
- x,
130
- d
131
+ a,
132
+ g
131
133
  ),
132
- [c, a, n, x, d]
134
+ [c, p, n, a, g]
133
135
  );
134
136
  return r ? typeof r == "string" ? (console.warn(
135
137
  "RichText component received a string. Expected PortableTextBlock[]"
136
- ), /* @__PURE__ */ e(k, { className: c, children: r })) : /* @__PURE__ */ e("div", { className: `${f.container} portableTextContainer`, children: /* @__PURE__ */ e($, { value: r, components: T }) }) : null;
138
+ ), /* @__PURE__ */ e(k, { className: c, children: r })) : /* @__PURE__ */ e("div", { className: `${f.container} portableTextContainer`, children: /* @__PURE__ */ e(C, { value: r, components: T }) }) : null;
137
139
  };
138
140
  export {
139
141
  X as RichText
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.0.382",
4
+ "version": "0.0.384",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {