quirk-ui 0.1.144 → 0.1.145

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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index6.css');const e=require("react/jsx-runtime"),k=require("../../hooks/useStyleClasses.cjs"),H=require("../../../core/context/ThemeContext.cjs"),W=require("../../hooks/useMediaQuery.cjs"),u=require("../../utils/mediaUtils.cjs"),z="_content_1mhfh_1",$="_container_1mhfh_7",L="_eyebrow_1mhfh_34",B="_metrics_1mhfh_38",C="_metric_1mhfh_38",q="_metricValue_1mhfh_54",M="_disclaimer_1mhfh_75",U="_layoutHImageRight_1mhfh_80",D="_heading_1mhfh_84",E="_media_1mhfh_89",Q="_noImage_1mhfh_99",Y="_layoutHImageLeft_1mhfh_103",F="_layoutVImageTop_1mhfh_122",G="_layoutVImageBottom_1mhfh_135",O="_text_1mhfh_154",P="_title_1mhfh_159",J="_cta_1mhfh_178",K="_headingHorizontal_1mhfh_186",X="_titleWrapper_1mhfh_195",Z="_headingVertical_1mhfh_216",A="_videoWrapper_1mhfh_237",R="_layoutSplitText_1mhfh_329",T="_additionalContent_1mhfh_344",t={content:z,container:$,eyebrow:L,metrics:B,metric:C,metricValue:q,disclaimer:M,layoutHImageRight:U,heading:D,media:E,noImage:Q,layoutHImageLeft:Y,layoutVImageTop:F,layoutVImageBottom:G,text:O,title:P,cta:J,headingHorizontal:K,titleWrapper:X,headingVertical:Z,videoWrapper:A,layoutSplitText:R,additionalContent:T},tt={"no-image":t.noImage,"split-text":t.layoutSplitText,"horizontal-image-right":t.layoutHImageRight,"horizontal-image-left":t.layoutHImageLeft,"vertical-image-top":t.layoutVImageTop,"vertical-image-bottom":t.layoutVImageBottom},st={horizontal:t.headingHorizontal,vertical:t.headingVertical};function et(s,i,n){const o=s.includes("vimeo.com"),m=s.includes("youtube.com")||s.includes("youtu.be");return o||m?e.jsx("div",{style:{maxWidth:n??"unset",flex:.65},children:e.jsx("div",{className:t.videoWrapper,children:e.jsx("iframe",{src:o?`${s}?autoplay=0&muted=0&loop=0`:`${s}?autoplay=0&mute=0&loop=0`,allow:"autoplay; fullscreen",allowFullScreen:!0})})}):e.jsx("div",{style:{maxWidth:n??"unset",width:"100%",flex:.65},children:e.jsx("div",{className:t.videoWrapper,children:e.jsx("video",{src:s,controls:!0,poster:i})})})}function ot({metrics:s,renderRichText:i}){return e.jsx("div",{className:t.metrics,children:s.map(n=>e.jsxs("div",{className:t.metric,children:[e.jsx("div",{className:t.metricValue,children:n.metricValue}),n.metricDescription&&(i==null?void 0:i({blocks:n.metricDescription}))]},n._key))})}function at({layout:s,heading:i,additionalContent:n,image:o,video:m,metrics:h,callToAction:l,disclaimer:p,styleOptions:c,id:N,renderImage:g,renderRichText:a,renderCallToAction:r}){var b;const{mode:d}=H.useTheme(),V=k.useStyleClasses(c),j=W.useMediaQuery("(max-width: 768px)")??!1,_=u.resolveImageUrl(o,d),f=u.resolveAltText(o,d),y=u.resolveImageStyle(o,j),x=tt[(s==null?void 0:s.orientation)??"horizontal-image-right"],w=st[i.headingLayout??"horizontal"],S={"--container-max-width":(c==null?void 0:c.maxWidth)??"unset","--gap":s==null?void 0:s.gap,"--max-width":(o==null?void 0:o.sizing)==="inset"?o==null?void 0:o.maxWidth:"unset"},I=(s==null?void 0:s.orientation)==="split-text",v=!I&&(s==null?void 0:s.orientation)!=="no-image";return e.jsx("section",{id:N,className:`${V} ${t.content}`,children:e.jsxs("article",{className:`${t.container} ${x}`,style:S,children:[e.jsxs("div",{className:`${t.heading} ${w}`,children:[e.jsxs("div",{className:t.titleWrapper,children:[i.eyebrow&&(a==null?void 0:a({blocks:i.eyebrow,className:t.eyebrow})),i.title&&(a==null?void 0:a({blocks:i.title,className:t.title}))]}),i.description||(b=l==null?void 0:l.items)!=null&&b.length?e.jsxs("div",{className:t.text,children:[i.description&&(a==null?void 0:a({blocks:i.description})),h&&h.length>0&&e.jsx(ot,{metrics:h,renderRichText:a}),l&&(r==null?void 0:r({items:l.items,alignment:l.alignment,spacing:l.spacing,mobileOrientation:l.mobileOrientation,className:t.cta})),p&&(a==null?void 0:a({blocks:p,className:t.disclaimer}))]}):null]}),I&&n&&e.jsx("div",{className:t.additionalContent,children:a==null?void 0:a({blocks:n})}),v&&m?et(m,_,o==null?void 0:o.maxWidth):v&&o&&_?e.jsx("div",{className:t.media,children:g?g({src:_,alt:f,width:600,height:400,priority:!0,style:y}):e.jsx("img",{src:_,alt:f,width:600,height:400,style:{width:"100%",height:"auto",...y}})}):null]})})}exports.ContentBlock=at;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index6.css');const e=require("react/jsx-runtime"),k=require("../../hooks/useStyleClasses.cjs"),H=require("../../../core/context/ThemeContext.cjs"),W=require("../../hooks/useMediaQuery.cjs"),u=require("../../utils/mediaUtils.cjs"),z="_content_1mhfh_1",$="_container_1mhfh_7",L="_eyebrow_1mhfh_34",B="_metrics_1mhfh_38",C="_metric_1mhfh_38",q="_metricValue_1mhfh_54",M="_disclaimer_1mhfh_75",U="_layoutHImageRight_1mhfh_80",D="_heading_1mhfh_84",E="_media_1mhfh_89",Q="_noImage_1mhfh_99",Y="_layoutHImageLeft_1mhfh_103",F="_layoutVImageTop_1mhfh_122",G="_layoutVImageBottom_1mhfh_135",O="_text_1mhfh_154",P="_title_1mhfh_159",J="_cta_1mhfh_178",K="_headingHorizontal_1mhfh_186",X="_titleWrapper_1mhfh_195",Z="_headingVertical_1mhfh_216",A="_videoWrapper_1mhfh_237",R="_layoutSplitText_1mhfh_329",T="_additionalContent_1mhfh_344",t={content:z,container:$,eyebrow:L,metrics:B,metric:C,metricValue:q,disclaimer:M,layoutHImageRight:U,heading:D,media:E,noImage:Q,layoutHImageLeft:Y,layoutVImageTop:F,layoutVImageBottom:G,text:O,title:P,cta:J,headingHorizontal:K,titleWrapper:X,headingVertical:Z,videoWrapper:A,layoutSplitText:R,additionalContent:T},tt={"no-image":t.noImage,"split-text":t.layoutSplitText,"horizontal-image-right":t.layoutHImageRight,"horizontal-image-left":t.layoutHImageLeft,"vertical-image-top":t.layoutVImageTop,"vertical-image-bottom":t.layoutVImageBottom},st={horizontal:t.headingHorizontal,vertical:t.headingVertical};function et(s,o,l){const a=s.includes("vimeo.com"),m=s.includes("youtube.com")||s.includes("youtu.be");return a||m?e.jsx("div",{style:{maxWidth:l??"unset",flex:.65},children:e.jsx("div",{className:t.videoWrapper,children:e.jsx("iframe",{src:a?`${s}?autoplay=0&muted=0&loop=0`:`${s}?autoplay=0&mute=0&loop=0`,allow:"autoplay; fullscreen",allowFullScreen:!0})})}):e.jsx("div",{style:{maxWidth:l??"unset",width:"100%",flex:.65},children:e.jsx("div",{className:t.videoWrapper,children:e.jsx("video",{src:s,controls:!0,poster:o})})})}function ot({metrics:s,renderRichText:o}){return e.jsx("div",{className:t.metrics,children:s.map(l=>e.jsxs("div",{className:t.metric,children:[e.jsx("div",{className:t.metricValue,children:l.metricValue}),l.metricDescription&&(o==null?void 0:o({blocks:l.metricDescription}))]},l._key))})}function at({layout:s,heading:o,additionalContent:l,image:a,video:m,metrics:h,callToAction:n,disclaimer:p,styleOptions:c,id:N,renderImage:f,renderRichText:i,renderCallToAction:r}){var v;const{mode:g}=H.useTheme(),V=k.useStyleClasses(c),j=W.useMediaQuery("(max-width: 768px)")??!1,_=u.resolveImageUrl(a,g),d=u.resolveAltText(a,g),y=u.resolveImageStyle(a,j),w=tt[(s==null?void 0:s.orientation)??"horizontal-image-right"],x=st[o.headingLayout??"horizontal"],S={"--container-max-width":(c==null?void 0:c.maxWidth)??"unset","--gap":s==null?void 0:s.gap,"--max-width":(a==null?void 0:a.sizing)==="inset"?a==null?void 0:a.maxWidth:"unset"},I=(s==null?void 0:s.orientation)==="split-text",b=!I&&(s==null?void 0:s.orientation)!=="no-image";return e.jsx("section",{id:N,className:`${V} ${t.content}`,children:e.jsxs("article",{className:`${t.container} ${w}`,style:S,children:[e.jsxs("div",{className:`${t.heading} ${x}`,children:[(o.title||o.eyebrow)&&e.jsxs("div",{className:t.titleWrapper,children:[o.eyebrow&&(i==null?void 0:i({blocks:o.eyebrow,className:t.eyebrow})),o.title&&(i==null?void 0:i({blocks:o.title,className:t.title}))]}),o.description||(v=n==null?void 0:n.items)!=null&&v.length?e.jsxs("div",{className:t.text,children:[o.description&&(i==null?void 0:i({blocks:o.description})),h&&h.length>0&&e.jsx(ot,{metrics:h,renderRichText:i}),n&&(r==null?void 0:r({items:n.items,alignment:n.alignment,spacing:n.spacing,mobileOrientation:n.mobileOrientation,className:t.cta})),p&&(i==null?void 0:i({blocks:p,className:t.disclaimer}))]}):null]}),I&&l&&e.jsx("div",{className:t.additionalContent,children:i==null?void 0:i({blocks:l})}),b&&m?et(m,_,a==null?void 0:a.maxWidth):b&&a&&_?e.jsx("div",{className:t.media,children:f?f({src:_,alt:d,width:600,height:400,priority:!0,style:y}):e.jsx("img",{src:_,alt:d,width:600,height:400,style:{width:"100%",height:"auto",...y}})}):null]})})}exports.ContentBlock=at;
@@ -3,7 +3,7 @@ import { useStyleClasses as k } from "../../hooks/useStyleClasses.mjs";
3
3
  import { useTheme as z } from "../../../core/context/ThemeContext.mjs";
4
4
  import { useMediaQuery as L } from "../../hooks/useMediaQuery.mjs";
5
5
  import { resolveImageUrl as $, resolveAltText as B, resolveImageStyle as C } from "../../utils/mediaUtils.mjs";
6
- import '../../../index6.css';const M = "_content_1mhfh_1", D = "_container_1mhfh_7", U = "_eyebrow_1mhfh_34", j = "_metrics_1mhfh_38", E = "_metric_1mhfh_38", Y = "_metricValue_1mhfh_54", F = "_disclaimer_1mhfh_75", G = "_layoutHImageRight_1mhfh_80", Q = "_heading_1mhfh_84", q = "_media_1mhfh_89", J = "_noImage_1mhfh_99", K = "_layoutHImageLeft_1mhfh_103", O = "_layoutVImageTop_1mhfh_122", P = "_layoutVImageBottom_1mhfh_135", X = "_text_1mhfh_154", Z = "_title_1mhfh_159", x = "_cta_1mhfh_178", A = "_headingHorizontal_1mhfh_186", R = "_titleWrapper_1mhfh_195", T = "_headingVertical_1mhfh_216", tt = "_videoWrapper_1mhfh_237", ot = "_layoutSplitText_1mhfh_329", at = "_additionalContent_1mhfh_344", t = {
6
+ import '../../../index6.css';const M = "_content_1mhfh_1", D = "_container_1mhfh_7", U = "_eyebrow_1mhfh_34", j = "_metrics_1mhfh_38", E = "_metric_1mhfh_38", Y = "_metricValue_1mhfh_54", F = "_disclaimer_1mhfh_75", G = "_layoutHImageRight_1mhfh_80", Q = "_heading_1mhfh_84", q = "_media_1mhfh_89", J = "_noImage_1mhfh_99", K = "_layoutHImageLeft_1mhfh_103", O = "_layoutVImageTop_1mhfh_122", P = "_layoutVImageBottom_1mhfh_135", X = "_text_1mhfh_154", Z = "_title_1mhfh_159", x = "_cta_1mhfh_178", A = "_headingHorizontal_1mhfh_186", R = "_titleWrapper_1mhfh_195", T = "_headingVertical_1mhfh_216", tt = "_videoWrapper_1mhfh_237", ot = "_layoutSplitText_1mhfh_329", st = "_additionalContent_1mhfh_344", t = {
7
7
  content: M,
8
8
  container: D,
9
9
  eyebrow: U,
@@ -26,8 +26,8 @@ import '../../../index6.css';const M = "_content_1mhfh_1", D = "_container_1mhfh
26
26
  headingVertical: T,
27
27
  videoWrapper: tt,
28
28
  layoutSplitText: ot,
29
- additionalContent: at
30
- }, st = {
29
+ additionalContent: st
30
+ }, at = {
31
31
  "no-image": t.noImage,
32
32
  "split-text": t.layoutSplitText,
33
33
  "horizontal-image-right": t.layoutHImageRight,
@@ -38,88 +38,88 @@ import '../../../index6.css';const M = "_content_1mhfh_1", D = "_container_1mhfh
38
38
  horizontal: t.headingHorizontal,
39
39
  vertical: t.headingVertical
40
40
  };
41
- function it(o, e, m) {
41
+ function it(o, s, l) {
42
42
  const a = o.includes("vimeo.com"), c = o.includes("youtube.com") || o.includes("youtu.be");
43
- return a || c ? /* @__PURE__ */ i("div", { style: { maxWidth: m ?? "unset", flex: 0.65 }, children: /* @__PURE__ */ i("div", { className: t.videoWrapper, children: /* @__PURE__ */ i(
43
+ return a || c ? /* @__PURE__ */ i("div", { style: { maxWidth: l ?? "unset", flex: 0.65 }, children: /* @__PURE__ */ i("div", { className: t.videoWrapper, children: /* @__PURE__ */ i(
44
44
  "iframe",
45
45
  {
46
46
  src: a ? `${o}?autoplay=0&muted=0&loop=0` : `${o}?autoplay=0&mute=0&loop=0`,
47
47
  allow: "autoplay; fullscreen",
48
48
  allowFullScreen: !0
49
49
  }
50
- ) }) }) : /* @__PURE__ */ i("div", { style: { maxWidth: m ?? "unset", width: "100%", flex: 0.65 }, children: /* @__PURE__ */ i("div", { className: t.videoWrapper, children: /* @__PURE__ */ i("video", { src: o, controls: !0, poster: e }) }) });
50
+ ) }) }) : /* @__PURE__ */ i("div", { style: { maxWidth: l ?? "unset", width: "100%", flex: 0.65 }, children: /* @__PURE__ */ i("div", { className: t.videoWrapper, children: /* @__PURE__ */ i("video", { src: o, controls: !0, poster: s }) }) });
51
51
  }
52
- function mt({
52
+ function lt({
53
53
  metrics: o,
54
- renderRichText: e
54
+ renderRichText: s
55
55
  }) {
56
- return /* @__PURE__ */ i("div", { className: t.metrics, children: o.map((m) => /* @__PURE__ */ n("div", { className: t.metric, children: [
57
- /* @__PURE__ */ i("div", { className: t.metricValue, children: m.metricValue }),
58
- m.metricDescription && (e == null ? void 0 : e({ blocks: m.metricDescription }))
59
- ] }, m._key)) });
56
+ return /* @__PURE__ */ i("div", { className: t.metrics, children: o.map((l) => /* @__PURE__ */ n("div", { className: t.metric, children: [
57
+ /* @__PURE__ */ i("div", { className: t.metricValue, children: l.metricValue }),
58
+ l.metricDescription && (s == null ? void 0 : s({ blocks: l.metricDescription }))
59
+ ] }, l._key)) });
60
60
  }
61
61
  function rt({
62
62
  layout: o,
63
- heading: e,
64
- additionalContent: m,
63
+ heading: s,
64
+ additionalContent: l,
65
65
  image: a,
66
66
  video: c,
67
67
  metrics: r,
68
- callToAction: l,
68
+ callToAction: m,
69
69
  disclaimer: u,
70
70
  styleOptions: _,
71
- id: V,
71
+ id: N,
72
72
  renderImage: f,
73
- renderRichText: s,
73
+ renderRichText: e,
74
74
  renderCallToAction: p
75
75
  }) {
76
- var N;
77
- const { mode: g } = z(), b = k(_), w = L("(max-width: 768px)") ?? !1, h = $(a, g), d = B(a, g), I = C(a, w), H = st[(o == null ? void 0 : o.orientation) ?? "horizontal-image-right"], S = et[e.headingLayout ?? "horizontal"], W = {
76
+ var b;
77
+ const { mode: g } = z(), V = k(_), w = L("(max-width: 768px)") ?? !1, h = $(a, g), d = B(a, g), I = C(a, w), H = at[(o == null ? void 0 : o.orientation) ?? "horizontal-image-right"], S = et[s.headingLayout ?? "horizontal"], W = {
78
78
  "--container-max-width": (_ == null ? void 0 : _.maxWidth) ?? "unset",
79
79
  "--gap": o == null ? void 0 : o.gap,
80
80
  "--max-width": (a == null ? void 0 : a.sizing) === "inset" ? a == null ? void 0 : a.maxWidth : "unset"
81
- }, v = (o == null ? void 0 : o.orientation) === "split-text", y = !v && (o == null ? void 0 : o.orientation) !== "no-image";
82
- return /* @__PURE__ */ i("section", { id: V, className: `${b} ${t.content}`, children: /* @__PURE__ */ n(
81
+ }, y = (o == null ? void 0 : o.orientation) === "split-text", v = !y && (o == null ? void 0 : o.orientation) !== "no-image";
82
+ return /* @__PURE__ */ i("section", { id: N, className: `${V} ${t.content}`, children: /* @__PURE__ */ n(
83
83
  "article",
84
84
  {
85
85
  className: `${t.container} ${H}`,
86
86
  style: W,
87
87
  children: [
88
88
  /* @__PURE__ */ n("div", { className: `${t.heading} ${S}`, children: [
89
- /* @__PURE__ */ n("div", { className: t.titleWrapper, children: [
90
- e.eyebrow && (s == null ? void 0 : s({
91
- blocks: e.eyebrow,
89
+ (s.title || s.eyebrow) && /* @__PURE__ */ n("div", { className: t.titleWrapper, children: [
90
+ s.eyebrow && (e == null ? void 0 : e({
91
+ blocks: s.eyebrow,
92
92
  className: t.eyebrow
93
93
  })),
94
- e.title && (s == null ? void 0 : s({
95
- blocks: e.title,
94
+ s.title && (e == null ? void 0 : e({
95
+ blocks: s.title,
96
96
  className: t.title
97
97
  }))
98
98
  ] }),
99
- e.description || (N = l == null ? void 0 : l.items) != null && N.length ? /* @__PURE__ */ n("div", { className: t.text, children: [
100
- e.description && (s == null ? void 0 : s({ blocks: e.description })),
99
+ s.description || (b = m == null ? void 0 : m.items) != null && b.length ? /* @__PURE__ */ n("div", { className: t.text, children: [
100
+ s.description && (e == null ? void 0 : e({ blocks: s.description })),
101
101
  r && r.length > 0 && /* @__PURE__ */ i(
102
- mt,
102
+ lt,
103
103
  {
104
104
  metrics: r,
105
- renderRichText: s
105
+ renderRichText: e
106
106
  }
107
107
  ),
108
- l && (p == null ? void 0 : p({
109
- items: l.items,
110
- alignment: l.alignment,
111
- spacing: l.spacing,
112
- mobileOrientation: l.mobileOrientation,
108
+ m && (p == null ? void 0 : p({
109
+ items: m.items,
110
+ alignment: m.alignment,
111
+ spacing: m.spacing,
112
+ mobileOrientation: m.mobileOrientation,
113
113
  className: t.cta
114
114
  })),
115
- u && (s == null ? void 0 : s({
115
+ u && (e == null ? void 0 : e({
116
116
  blocks: u,
117
117
  className: t.disclaimer
118
118
  }))
119
119
  ] }) : null
120
120
  ] }),
121
- v && m && /* @__PURE__ */ i("div", { className: t.additionalContent, children: s == null ? void 0 : s({ blocks: m }) }),
122
- y && c ? it(c, h, a == null ? void 0 : a.maxWidth) : y && a && h ? /* @__PURE__ */ i("div", { className: t.media, children: f ? f({
121
+ y && l && /* @__PURE__ */ i("div", { className: t.additionalContent, children: e == null ? void 0 : e({ blocks: l }) }),
122
+ v && c ? it(c, h, a == null ? void 0 : a.maxWidth) : v && a && h ? /* @__PURE__ */ i("div", { className: t.media, children: f ? f({
123
123
  src: h,
124
124
  alt: d,
125
125
  width: 600,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.1.144",
4
+ "version": "0.1.145",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {