@stackshift-ui/text-component 6.0.4-beta.5 → 6.0.5

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.
@@ -0,0 +1,64 @@
1
+ // src/helper/index.tsx
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ var textComponentBlockStyling = {
4
+ block: {
5
+ h1: ({ children }) => {
6
+ return /* @__PURE__ */ jsx("h1", { className: "mb-6 leading-loose text-gray-900 text-7xl", children });
7
+ },
8
+ h2: ({ children }) => {
9
+ return /* @__PURE__ */ jsx("h2", { className: "mb-6 text-5xl leading-loose text-gray-900", children });
10
+ },
11
+ h3: ({ children }) => {
12
+ return /* @__PURE__ */ jsx("h3", { className: "mb-6 text-3xl leading-loose text-gray-900", children });
13
+ },
14
+ h4: ({ children }) => {
15
+ return /* @__PURE__ */ jsx("h4", { className: "mb-6 text-xl leading-loose text-gray-900", children });
16
+ },
17
+ normal: ({ children }) => {
18
+ return /* @__PURE__ */ jsx("p", { className: "mb-5 leading-relaxed text-justify text-gray-900", children });
19
+ },
20
+ blockquote: ({ children }) => {
21
+ return /* @__PURE__ */ jsxs("blockquote", { className: "mb-6 italic leading-loose text-gray-500 px-14", children: [
22
+ "- ",
23
+ children
24
+ ] });
25
+ }
26
+ },
27
+ code: ({ value }) => {
28
+ return /* @__PURE__ */ jsx("pre", { "data-language": value.language, children: /* @__PURE__ */ jsx("code", { children: value.code }) });
29
+ },
30
+ list: {
31
+ bullet: ({ children }) => {
32
+ return /* @__PURE__ */ jsx("ul", { className: "pl-10 mb-6 leading-loose text-gray-900 list-disc", children });
33
+ },
34
+ number: ({ children }) => {
35
+ return /* @__PURE__ */ jsx("ol", { className: "mb-6 leading-loose text-gray-900 list-decimal", children });
36
+ }
37
+ },
38
+ listItem: {
39
+ bullet: ({ children }) => /* @__PURE__ */ jsx("li", { className: "mb-6 leading-loose text-gray-900", children })
40
+ },
41
+ marks: {
42
+ strong: ({ children }) => /* @__PURE__ */ jsx("strong", { children }),
43
+ em: ({ children }) => /* @__PURE__ */ jsx("em", { children }),
44
+ code: ({ children }) => /* @__PURE__ */ jsx("code", { children }),
45
+ link: ({ children, value }) => {
46
+ var _a;
47
+ return /* @__PURE__ */ jsx(
48
+ "a",
49
+ {
50
+ "aria-label": (_a = value.href) != null ? _a : "external link",
51
+ className: "text-primary hover:text-secondary",
52
+ href: value == null ? void 0 : value.href,
53
+ target: "_blank",
54
+ rel: "noopener noreferrer",
55
+ children
56
+ }
57
+ );
58
+ }
59
+ }
60
+ };
61
+
62
+ export {
63
+ textComponentBlockStyling
64
+ };
@@ -0,0 +1,35 @@
1
+ import {
2
+ textComponentBlockStyling
3
+ } from "./chunk-D2JQMMRZ.mjs";
4
+
5
+ // src/text_b.tsx
6
+ import { PortableText } from "@portabletext/react";
7
+ import { Container } from "@stackshift-ui/container";
8
+ import { Flex } from "@stackshift-ui/flex";
9
+ import { Heading } from "@stackshift-ui/heading";
10
+ import { Section } from "@stackshift-ui/section";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ function TextComponent_B({
13
+ heading,
14
+ firstColumn,
15
+ secondColumn
16
+ }) {
17
+ return /* @__PURE__ */ jsx(Section, { className: "py-20 bg-background", children: /* @__PURE__ */ jsxs(Container, { maxWidth: 1280, children: [
18
+ heading && /* @__PURE__ */ jsx(Heading, { fontSize: "xl", className: "w-full mb-4 text-center", children: heading }),
19
+ /* @__PURE__ */ jsxs(Flex, { wrap: true, justify: "center", className: "mx-auto ", children: [
20
+ firstColumn && /* @__PURE__ */ jsx("div", { className: "px-5 mb-3 text-xs leading-relaxed text-justify text-gray-500 lg:mb-6 lg:w-1/2 lg:text-base", children: /* @__PURE__ */ jsx(PortableText, { value: firstColumn, components: textComponentBlockStyling }) }),
21
+ secondColumn && /* @__PURE__ */ jsx("div", { className: "px-5 mb-6 text-xs leading-relaxed text-justify text-gray-500 md:mb-0 lg:w-1/2 lg:text-base", children: /* @__PURE__ */ jsx(
22
+ PortableText,
23
+ {
24
+ value: secondColumn,
25
+ components: textComponentBlockStyling,
26
+ onMissingComponent: false
27
+ }
28
+ ) })
29
+ ] })
30
+ ] }) });
31
+ }
32
+
33
+ export {
34
+ TextComponent_B
35
+ };
@@ -0,0 +1,26 @@
1
+ // src/text-component.tsx
2
+ import { lazy } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ var Variants = {
5
+ variant_a: lazy(() => import("./text_a.mjs")),
6
+ variant_b: lazy(() => import("./text_b.mjs")),
7
+ variant_c: lazy(() => import("./text_c.mjs"))
8
+ };
9
+ var displayName = "TextComponent";
10
+ var TextComponent = ({ data }) => {
11
+ var _a, _b, _c, _d, _e, _f, _g, _h;
12
+ const variant = data == null ? void 0 : data.variant;
13
+ const Variant = variant && Variants[variant];
14
+ const props = {
15
+ heading: (_b = (_a = data == null ? void 0 : data.variants) == null ? void 0 : _a.title) != null ? _b : void 0,
16
+ firstColumn: (_d = (_c = data == null ? void 0 : data.variants) == null ? void 0 : _c.firstColumn) != null ? _d : void 0,
17
+ secondColumn: (_f = (_e = data == null ? void 0 : data.variants) == null ? void 0 : _e.secondColumn) != null ? _f : void 0,
18
+ thirdColumn: (_h = (_g = data == null ? void 0 : data.variants) == null ? void 0 : _g.thirdColumn) != null ? _h : void 0
19
+ };
20
+ return Variant ? /* @__PURE__ */ jsx(Variant, { ...props }) : null;
21
+ };
22
+ TextComponent.displayName = displayName;
23
+
24
+ export {
25
+ TextComponent
26
+ };
@@ -0,0 +1,51 @@
1
+ import {
2
+ textComponentBlockStyling
3
+ } from "./chunk-D2JQMMRZ.mjs";
4
+
5
+ // src/text_c.tsx
6
+ import { PortableText } from "@portabletext/react";
7
+ import { Container } from "@stackshift-ui/container";
8
+ import { Flex } from "@stackshift-ui/flex";
9
+ import { Heading } from "@stackshift-ui/heading";
10
+ import { Section } from "@stackshift-ui/section";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ function TextComponent_C({
13
+ heading,
14
+ firstColumn,
15
+ secondColumn,
16
+ thirdColumn
17
+ }) {
18
+ return /* @__PURE__ */ jsx(Section, { className: "py-20 bg-background", children: /* @__PURE__ */ jsxs(Container, { className: "container px-4 mx-auto", maxWidth: 1280, children: [
19
+ heading && /* @__PURE__ */ jsx(Heading, { fontSize: "xl", className: "w-full mb-5 text-center", children: heading }),
20
+ /* @__PURE__ */ jsxs(Flex, { wrap: true, justify: "center", className: "mx-auto", children: [
21
+ firstColumn && /* @__PURE__ */ jsx("div", { className: "px-3 mb-6 text-xs leading-relaxed text-justify text-gray-500 md:mb-0 lg:w-1/3 lg:text-base", children: /* @__PURE__ */ jsx(
22
+ PortableText,
23
+ {
24
+ value: firstColumn,
25
+ components: textComponentBlockStyling,
26
+ onMissingComponent: false
27
+ }
28
+ ) }),
29
+ secondColumn && /* @__PURE__ */ jsx("div", { className: "px-3 mb-6 text-xs leading-relaxed text-justify text-gray-500 md:mb-0 lg:w-1/3 lg:text-base", children: /* @__PURE__ */ jsx(
30
+ PortableText,
31
+ {
32
+ value: secondColumn,
33
+ components: textComponentBlockStyling,
34
+ onMissingComponent: false
35
+ }
36
+ ) }),
37
+ thirdColumn && /* @__PURE__ */ jsx("div", { className: "px-3 mb-6 text-xs leading-relaxed text-justify text-gray-500 md:mb-0 lg:w-1/3 lg:text-base", children: /* @__PURE__ */ jsx(
38
+ PortableText,
39
+ {
40
+ value: thirdColumn,
41
+ components: textComponentBlockStyling,
42
+ onMissingComponent: false
43
+ }
44
+ ) })
45
+ ] })
46
+ ] }) });
47
+ }
48
+
49
+ export {
50
+ TextComponent_C
51
+ };
@@ -0,0 +1,28 @@
1
+ import {
2
+ textComponentBlockStyling
3
+ } from "./chunk-D2JQMMRZ.mjs";
4
+
5
+ // src/text_a.tsx
6
+ import { PortableText } from "@portabletext/react";
7
+ import { Container } from "@stackshift-ui/container";
8
+ import { Flex } from "@stackshift-ui/flex";
9
+ import { Heading } from "@stackshift-ui/heading";
10
+ import { Section } from "@stackshift-ui/section";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ function TextComponent_A({ heading, firstColumn }) {
13
+ return /* @__PURE__ */ jsx(Section, { className: "py-20 bg-background", children: /* @__PURE__ */ jsxs(Container, { maxWidth: 1280, children: [
14
+ heading && /* @__PURE__ */ jsx(Heading, { fontSize: "xl", className: "mb-5 text-center", children: heading }),
15
+ /* @__PURE__ */ jsx(Flex, { wrap: true, justify: "center", className: "mx-auto", children: firstColumn && /* @__PURE__ */ jsx("div", { className: "mb-2 text-xs md:mb-0 md:w-1/2 lg:text-base", children: /* @__PURE__ */ jsx(
16
+ PortableText,
17
+ {
18
+ value: firstColumn,
19
+ components: textComponentBlockStyling,
20
+ onMissingComponent: false
21
+ }
22
+ ) }) })
23
+ ] }) });
24
+ }
25
+
26
+ export {
27
+ TextComponent_A
28
+ };
@@ -1 +1,88 @@
1
- "use strict";var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var c=(e,l)=>{for(var r in l)o(e,r,{get:l[r],enumerable:!0})},x=(e,l,r,s)=>{if(l&&typeof l=="object"||typeof l=="function")for(let a of m(l))!g.call(e,a)&&a!==r&&o(e,a,{get:()=>l[a],enumerable:!(s=n(l,a))||s.enumerable});return e};var i=e=>x(o({},"__esModule",{value:!0}),e);var b={};c(b,{textComponentBlockStyling:()=>d});module.exports=i(b);var t=require("react/jsx-runtime"),d={block:{h1:({children:e})=>(0,t.jsx)("h1",{className:"mb-6 leading-loose text-gray-900 text-7xl",children:e}),h2:({children:e})=>(0,t.jsx)("h2",{className:"mb-6 text-5xl leading-loose text-gray-900",children:e}),h3:({children:e})=>(0,t.jsx)("h3",{className:"mb-6 text-3xl leading-loose text-gray-900",children:e}),h4:({children:e})=>(0,t.jsx)("h4",{className:"mb-6 text-xl leading-loose text-gray-900",children:e}),normal:({children:e})=>(0,t.jsx)("p",{className:"mb-5 leading-relaxed text-justify text-gray-900",children:e}),blockquote:({children:e})=>(0,t.jsxs)("blockquote",{className:"mb-6 italic leading-loose text-gray-500 px-14",children:["- ",e]})},code:({value:e})=>(0,t.jsx)("pre",{"data-language":e.language,children:(0,t.jsx)("code",{children:e.code})}),list:{bullet:({children:e})=>(0,t.jsx)("ul",{className:"pl-10 mb-6 leading-loose text-gray-900 list-disc",children:e}),number:({children:e})=>(0,t.jsx)("ol",{className:"mb-6 leading-loose text-gray-900 list-decimal",children:e})},listItem:{bullet:({children:e})=>(0,t.jsx)("li",{className:"mb-6 leading-loose text-gray-900",children:e})},marks:{strong:({children:e})=>(0,t.jsx)("strong",{children:e}),em:({children:e})=>(0,t.jsx)("em",{children:e}),code:({children:e})=>(0,t.jsx)("code",{children:e}),link:({children:e,value:l})=>{var r;return(0,t.jsx)("a",{"aria-label":(r=l.href)!=null?r:"external link",className:"text-primary hover:text-secondary",href:l==null?void 0:l.href,target:"_blank",rel:"noopener noreferrer",children:e})}}};0&&(module.exports={textComponentBlockStyling});
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/helper/index.tsx
21
+ var helper_exports = {};
22
+ __export(helper_exports, {
23
+ textComponentBlockStyling: () => textComponentBlockStyling
24
+ });
25
+ module.exports = __toCommonJS(helper_exports);
26
+ var import_jsx_runtime = require("react/jsx-runtime");
27
+ var textComponentBlockStyling = {
28
+ block: {
29
+ h1: ({ children }) => {
30
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "mb-6 leading-loose text-gray-900 text-7xl", children });
31
+ },
32
+ h2: ({ children }) => {
33
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "mb-6 text-5xl leading-loose text-gray-900", children });
34
+ },
35
+ h3: ({ children }) => {
36
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "mb-6 text-3xl leading-loose text-gray-900", children });
37
+ },
38
+ h4: ({ children }) => {
39
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { className: "mb-6 text-xl leading-loose text-gray-900", children });
40
+ },
41
+ normal: ({ children }) => {
42
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mb-5 leading-relaxed text-justify text-gray-900", children });
43
+ },
44
+ blockquote: ({ children }) => {
45
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("blockquote", { className: "mb-6 italic leading-loose text-gray-500 px-14", children: [
46
+ "- ",
47
+ children
48
+ ] });
49
+ }
50
+ },
51
+ code: ({ value }) => {
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { "data-language": value.language, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children: value.code }) });
53
+ },
54
+ list: {
55
+ bullet: ({ children }) => {
56
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { className: "pl-10 mb-6 leading-loose text-gray-900 list-disc", children });
57
+ },
58
+ number: ({ children }) => {
59
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", { className: "mb-6 leading-loose text-gray-900 list-decimal", children });
60
+ }
61
+ },
62
+ listItem: {
63
+ bullet: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { className: "mb-6 leading-loose text-gray-900", children })
64
+ },
65
+ marks: {
66
+ strong: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children }),
67
+ em: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("em", { children }),
68
+ code: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children }),
69
+ link: ({ children, value }) => {
70
+ var _a;
71
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
72
+ "a",
73
+ {
74
+ "aria-label": (_a = value.href) != null ? _a : "external link",
75
+ className: "text-primary hover:text-secondary",
76
+ href: value == null ? void 0 : value.href,
77
+ target: "_blank",
78
+ rel: "noopener noreferrer",
79
+ children
80
+ }
81
+ );
82
+ }
83
+ }
84
+ };
85
+ // Annotate the CommonJS export names for ESM import in node:
86
+ 0 && (module.exports = {
87
+ textComponentBlockStyling
88
+ });
@@ -1 +1,6 @@
1
- import{a}from"../chunk-CBIPJS7L.mjs";export{a as textComponentBlockStyling};
1
+ import {
2
+ textComponentBlockStyling
3
+ } from "../chunk-D2JQMMRZ.mjs";
4
+ export {
5
+ textComponentBlockStyling
6
+ };
package/dist/index.js CHANGED
@@ -1,2 +1,263 @@
1
+ "use strict";
1
2
  "use client";
2
- "use strict";var b=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var X=Object.prototype.hasOwnProperty;var x=(e,t)=>()=>(e&&(t=e(e=0)),t);var p=(e,t)=>{for(var n in t)b(e,n,{get:t[n],enumerable:!0})},Y=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let m of U(t))!X.call(e,m)&&m!==n&&b(e,m,{get:()=>t[m],enumerable:!(a=Q(t,m))||a.enumerable});return e};var Z=e=>Y(b({},"__esModule",{value:!0}),e);var o,i,g=x(()=>{"use strict";o=require("react/jsx-runtime"),i={block:{h1:({children:e})=>(0,o.jsx)("h1",{className:"mb-6 leading-loose text-gray-900 text-7xl",children:e}),h2:({children:e})=>(0,o.jsx)("h2",{className:"mb-6 text-5xl leading-loose text-gray-900",children:e}),h3:({children:e})=>(0,o.jsx)("h3",{className:"mb-6 text-3xl leading-loose text-gray-900",children:e}),h4:({children:e})=>(0,o.jsx)("h4",{className:"mb-6 text-xl leading-loose text-gray-900",children:e}),normal:({children:e})=>(0,o.jsx)("p",{className:"mb-5 leading-relaxed text-justify text-gray-900",children:e}),blockquote:({children:e})=>(0,o.jsxs)("blockquote",{className:"mb-6 italic leading-loose text-gray-500 px-14",children:["- ",e]})},code:({value:e})=>(0,o.jsx)("pre",{"data-language":e.language,children:(0,o.jsx)("code",{children:e.code})}),list:{bullet:({children:e})=>(0,o.jsx)("ul",{className:"pl-10 mb-6 leading-loose text-gray-900 list-disc",children:e}),number:({children:e})=>(0,o.jsx)("ol",{className:"mb-6 leading-loose text-gray-900 list-decimal",children:e})},listItem:{bullet:({children:e})=>(0,o.jsx)("li",{className:"mb-6 leading-loose text-gray-900",children:e})},marks:{strong:({children:e})=>(0,o.jsx)("strong",{children:e}),em:({children:e})=>(0,o.jsx)("em",{children:e}),code:({children:e})=>(0,o.jsx)("code",{children:e}),link:({children:e,value:t})=>{var n;return(0,o.jsx)("a",{"aria-label":(n=t.href)!=null?n:"external link",className:"text-primary hover:text-secondary",href:t==null?void 0:t.href,target:"_blank",rel:"noopener noreferrer",children:e})}}}});var z={};p(z,{TextComponent_A:()=>d,default:()=>d});function d({heading:e,firstColumn:t}){return(0,s.jsx)(j.Section,{className:"py-20 bg-background",children:(0,s.jsxs)(_.Container,{maxWidth:1280,children:[e&&(0,s.jsx)(D.Heading,{fontSize:"xl",className:"mb-5 text-center",children:e}),(0,s.jsx)(H.Flex,{wrap:!0,justify:"center",className:"mx-auto",children:t&&(0,s.jsx)("div",{className:"mb-2 text-xs md:mb-0 md:w-1/2 lg:text-base",children:(0,s.jsx)(M.PortableText,{value:t,components:i,onMissingComponent:!1})})})]})})}var M,_,H,D,j,s,u=x(()=>{"use strict";M=require("@portabletext/react"),_=require("@stackshift-ui/container"),H=require("@stackshift-ui/flex"),D=require("@stackshift-ui/heading"),j=require("@stackshift-ui/section");g();s=require("react/jsx-runtime")});var I={};p(I,{TextComponent_B:()=>C,default:()=>C});function C({heading:e,firstColumn:t,secondColumn:n}){return(0,l.jsx)(j.Section,{className:"py-20 bg-background",children:(0,l.jsxs)(_.Container,{maxWidth:1280,children:[e&&(0,l.jsx)(D.Heading,{fontSize:"xl",className:"w-full mb-4 text-center",children:e}),(0,l.jsxs)(H.Flex,{wrap:!0,justify:"center",className:"mx-auto ",children:[t&&(0,l.jsx)("div",{className:"px-5 mb-3 text-xs leading-relaxed text-justify text-gray-500 lg:mb-6 lg:w-1/2 lg:text-base",children:(0,l.jsx)(y.PortableText,{value:t,components:i})}),n&&(0,l.jsx)("div",{className:"px-5 mb-6 text-xs leading-relaxed text-justify text-gray-500 md:mb-0 lg:w-1/2 lg:text-base",children:(0,l.jsx)(y.PortableText,{value:n,components:i,onMissingComponent:!1})})]})]})})}var y,_,H,D,j,l,N=x(()=>{"use strict";y=require("@portabletext/react");g();l=require("react/jsx-runtime")});var K={};p(K,{TextComponent_C:()=>h,default:()=>h});function h({heading:e,firstColumn:t,secondColumn:n,thirdColumn:a}){return(0,r.jsx)(j.Section,{className:"py-20 bg-background",children:(0,r.jsxs)(_.Container,{className:"container px-4 mx-auto",maxWidth:1280,children:[e&&(0,r.jsx)(D.Heading,{fontSize:"xl",className:"w-full mb-5 text-center",children:e}),(0,r.jsxs)(H.Flex,{wrap:!0,justify:"center",className:"mx-auto",children:[t&&(0,r.jsx)("div",{className:"px-3 mb-6 text-xs leading-relaxed text-justify text-gray-500 md:mb-0 lg:w-1/3 lg:text-base",children:(0,r.jsx)(c.PortableText,{value:t,components:i,onMissingComponent:!1})}),n&&(0,r.jsx)("div",{className:"px-3 mb-6 text-xs leading-relaxed text-justify text-gray-500 md:mb-0 lg:w-1/3 lg:text-base",children:(0,r.jsx)(c.PortableText,{value:n,components:i,onMissingComponent:!1})}),a&&(0,r.jsx)("div",{className:"px-3 mb-6 text-xs leading-relaxed text-justify text-gray-500 md:mb-0 lg:w-1/3 lg:text-base",children:(0,r.jsx)(c.PortableText,{value:a,components:i,onMissingComponent:!1})})]})]})})}var c,_,H,D,j,r,k=x(()=>{"use strict";c=require("@portabletext/react");g();r=require("react/jsx-runtime")});var te={};p(te,{TextComponent:()=>L,TextComponent_A:()=>d,TextComponent_B:()=>C,TextComponent_C:()=>h});module.exports=Z(te);var f=require("react"),O=require("react/jsx-runtime"),$={variant_a:(0,f.lazy)(()=>Promise.resolve().then(()=>(u(),z))),variant_b:(0,f.lazy)(()=>Promise.resolve().then(()=>(N(),I))),variant_c:(0,f.lazy)(()=>Promise.resolve().then(()=>(k(),K)))},ee="TextComponent",L=({data:e})=>{var m,v,w,T,P,S,B,F;let t=e==null?void 0:e.variant,n=t&&$[t],a={heading:(v=(m=e==null?void 0:e.variants)==null?void 0:m.title)!=null?v:void 0,firstColumn:(T=(w=e==null?void 0:e.variants)==null?void 0:w.firstColumn)!=null?T:void 0,secondColumn:(S=(P=e==null?void 0:e.variants)==null?void 0:P.secondColumn)!=null?S:void 0,thirdColumn:(F=(B=e==null?void 0:e.variants)==null?void 0:B.thirdColumn)!=null?F:void 0};return n?(0,O.jsx)(n,{...a}):null};L.displayName=ee;u();N();k();0&&(module.exports={TextComponent,TextComponent_A,TextComponent_B,TextComponent_C});
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __esm = (fn, res) => function __init() {
8
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
+ };
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+
24
+ // src/helper/index.tsx
25
+ var import_jsx_runtime, textComponentBlockStyling;
26
+ var init_helper = __esm({
27
+ "src/helper/index.tsx"() {
28
+ "use strict";
29
+ import_jsx_runtime = require("react/jsx-runtime");
30
+ textComponentBlockStyling = {
31
+ block: {
32
+ h1: ({ children }) => {
33
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "mb-6 leading-loose text-gray-900 text-7xl", children });
34
+ },
35
+ h2: ({ children }) => {
36
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "mb-6 text-5xl leading-loose text-gray-900", children });
37
+ },
38
+ h3: ({ children }) => {
39
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "mb-6 text-3xl leading-loose text-gray-900", children });
40
+ },
41
+ h4: ({ children }) => {
42
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { className: "mb-6 text-xl leading-loose text-gray-900", children });
43
+ },
44
+ normal: ({ children }) => {
45
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mb-5 leading-relaxed text-justify text-gray-900", children });
46
+ },
47
+ blockquote: ({ children }) => {
48
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("blockquote", { className: "mb-6 italic leading-loose text-gray-500 px-14", children: [
49
+ "- ",
50
+ children
51
+ ] });
52
+ }
53
+ },
54
+ code: ({ value }) => {
55
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { "data-language": value.language, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children: value.code }) });
56
+ },
57
+ list: {
58
+ bullet: ({ children }) => {
59
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { className: "pl-10 mb-6 leading-loose text-gray-900 list-disc", children });
60
+ },
61
+ number: ({ children }) => {
62
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", { className: "mb-6 leading-loose text-gray-900 list-decimal", children });
63
+ }
64
+ },
65
+ listItem: {
66
+ bullet: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { className: "mb-6 leading-loose text-gray-900", children })
67
+ },
68
+ marks: {
69
+ strong: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children }),
70
+ em: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("em", { children }),
71
+ code: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children }),
72
+ link: ({ children, value }) => {
73
+ var _a;
74
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
75
+ "a",
76
+ {
77
+ "aria-label": (_a = value.href) != null ? _a : "external link",
78
+ className: "text-primary hover:text-secondary",
79
+ href: value == null ? void 0 : value.href,
80
+ target: "_blank",
81
+ rel: "noopener noreferrer",
82
+ children
83
+ }
84
+ );
85
+ }
86
+ }
87
+ };
88
+ }
89
+ });
90
+
91
+ // src/text_a.tsx
92
+ var text_a_exports = {};
93
+ __export(text_a_exports, {
94
+ TextComponent_A: () => TextComponent_A,
95
+ default: () => TextComponent_A
96
+ });
97
+ function TextComponent_A({ heading, firstColumn }) {
98
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_section.Section, { className: "py-20 bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_container.Container, { maxWidth: 1280, children: [
99
+ heading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_heading.Heading, { fontSize: "xl", className: "mb-5 text-center", children: heading }),
100
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_flex.Flex, { wrap: true, justify: "center", className: "mx-auto", children: firstColumn && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "mb-2 text-xs md:mb-0 md:w-1/2 lg:text-base", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
101
+ import_react.PortableText,
102
+ {
103
+ value: firstColumn,
104
+ components: textComponentBlockStyling,
105
+ onMissingComponent: false
106
+ }
107
+ ) }) })
108
+ ] }) });
109
+ }
110
+ var import_react, import_container, import_flex, import_heading, import_section, import_jsx_runtime2;
111
+ var init_text_a = __esm({
112
+ "src/text_a.tsx"() {
113
+ "use strict";
114
+ import_react = require("@portabletext/react");
115
+ import_container = require("@stackshift-ui/container");
116
+ import_flex = require("@stackshift-ui/flex");
117
+ import_heading = require("@stackshift-ui/heading");
118
+ import_section = require("@stackshift-ui/section");
119
+ init_helper();
120
+ import_jsx_runtime2 = require("react/jsx-runtime");
121
+ }
122
+ });
123
+
124
+ // src/text_b.tsx
125
+ var text_b_exports = {};
126
+ __export(text_b_exports, {
127
+ TextComponent_B: () => TextComponent_B,
128
+ default: () => TextComponent_B
129
+ });
130
+ function TextComponent_B({
131
+ heading,
132
+ firstColumn,
133
+ secondColumn
134
+ }) {
135
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_section2.Section, { className: "py-20 bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_container2.Container, { maxWidth: 1280, children: [
136
+ heading && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_heading2.Heading, { fontSize: "xl", className: "w-full mb-4 text-center", children: heading }),
137
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_flex2.Flex, { wrap: true, justify: "center", className: "mx-auto ", children: [
138
+ firstColumn && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "px-5 mb-3 text-xs leading-relaxed text-justify text-gray-500 lg:mb-6 lg:w-1/2 lg:text-base", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react2.PortableText, { value: firstColumn, components: textComponentBlockStyling }) }),
139
+ secondColumn && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "px-5 mb-6 text-xs leading-relaxed text-justify text-gray-500 md:mb-0 lg:w-1/2 lg:text-base", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
140
+ import_react2.PortableText,
141
+ {
142
+ value: secondColumn,
143
+ components: textComponentBlockStyling,
144
+ onMissingComponent: false
145
+ }
146
+ ) })
147
+ ] })
148
+ ] }) });
149
+ }
150
+ var import_react2, import_container2, import_flex2, import_heading2, import_section2, import_jsx_runtime3;
151
+ var init_text_b = __esm({
152
+ "src/text_b.tsx"() {
153
+ "use strict";
154
+ import_react2 = require("@portabletext/react");
155
+ import_container2 = require("@stackshift-ui/container");
156
+ import_flex2 = require("@stackshift-ui/flex");
157
+ import_heading2 = require("@stackshift-ui/heading");
158
+ import_section2 = require("@stackshift-ui/section");
159
+ init_helper();
160
+ import_jsx_runtime3 = require("react/jsx-runtime");
161
+ }
162
+ });
163
+
164
+ // src/text_c.tsx
165
+ var text_c_exports = {};
166
+ __export(text_c_exports, {
167
+ TextComponent_C: () => TextComponent_C,
168
+ default: () => TextComponent_C
169
+ });
170
+ function TextComponent_C({
171
+ heading,
172
+ firstColumn,
173
+ secondColumn,
174
+ thirdColumn
175
+ }) {
176
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_section3.Section, { className: "py-20 bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_container3.Container, { className: "container px-4 mx-auto", maxWidth: 1280, children: [
177
+ heading && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_heading3.Heading, { fontSize: "xl", className: "w-full mb-5 text-center", children: heading }),
178
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_flex3.Flex, { wrap: true, justify: "center", className: "mx-auto", children: [
179
+ firstColumn && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "px-3 mb-6 text-xs leading-relaxed text-justify text-gray-500 md:mb-0 lg:w-1/3 lg:text-base", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
180
+ import_react3.PortableText,
181
+ {
182
+ value: firstColumn,
183
+ components: textComponentBlockStyling,
184
+ onMissingComponent: false
185
+ }
186
+ ) }),
187
+ secondColumn && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "px-3 mb-6 text-xs leading-relaxed text-justify text-gray-500 md:mb-0 lg:w-1/3 lg:text-base", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
188
+ import_react3.PortableText,
189
+ {
190
+ value: secondColumn,
191
+ components: textComponentBlockStyling,
192
+ onMissingComponent: false
193
+ }
194
+ ) }),
195
+ thirdColumn && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "px-3 mb-6 text-xs leading-relaxed text-justify text-gray-500 md:mb-0 lg:w-1/3 lg:text-base", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
196
+ import_react3.PortableText,
197
+ {
198
+ value: thirdColumn,
199
+ components: textComponentBlockStyling,
200
+ onMissingComponent: false
201
+ }
202
+ ) })
203
+ ] })
204
+ ] }) });
205
+ }
206
+ var import_react3, import_container3, import_flex3, import_heading3, import_section3, import_jsx_runtime4;
207
+ var init_text_c = __esm({
208
+ "src/text_c.tsx"() {
209
+ "use strict";
210
+ import_react3 = require("@portabletext/react");
211
+ import_container3 = require("@stackshift-ui/container");
212
+ import_flex3 = require("@stackshift-ui/flex");
213
+ import_heading3 = require("@stackshift-ui/heading");
214
+ import_section3 = require("@stackshift-ui/section");
215
+ init_helper();
216
+ import_jsx_runtime4 = require("react/jsx-runtime");
217
+ }
218
+ });
219
+
220
+ // src/index.ts
221
+ var src_exports = {};
222
+ __export(src_exports, {
223
+ TextComponent: () => TextComponent,
224
+ TextComponent_A: () => TextComponent_A,
225
+ TextComponent_B: () => TextComponent_B,
226
+ TextComponent_C: () => TextComponent_C
227
+ });
228
+ module.exports = __toCommonJS(src_exports);
229
+
230
+ // src/text-component.tsx
231
+ var import_react4 = require("react");
232
+ var import_jsx_runtime5 = require("react/jsx-runtime");
233
+ var Variants = {
234
+ variant_a: (0, import_react4.lazy)(() => Promise.resolve().then(() => (init_text_a(), text_a_exports))),
235
+ variant_b: (0, import_react4.lazy)(() => Promise.resolve().then(() => (init_text_b(), text_b_exports))),
236
+ variant_c: (0, import_react4.lazy)(() => Promise.resolve().then(() => (init_text_c(), text_c_exports)))
237
+ };
238
+ var displayName = "TextComponent";
239
+ var TextComponent = ({ data }) => {
240
+ var _a, _b, _c, _d, _e, _f, _g, _h;
241
+ const variant = data == null ? void 0 : data.variant;
242
+ const Variant = variant && Variants[variant];
243
+ const props = {
244
+ heading: (_b = (_a = data == null ? void 0 : data.variants) == null ? void 0 : _a.title) != null ? _b : void 0,
245
+ firstColumn: (_d = (_c = data == null ? void 0 : data.variants) == null ? void 0 : _c.firstColumn) != null ? _d : void 0,
246
+ secondColumn: (_f = (_e = data == null ? void 0 : data.variants) == null ? void 0 : _e.secondColumn) != null ? _f : void 0,
247
+ thirdColumn: (_h = (_g = data == null ? void 0 : data.variants) == null ? void 0 : _g.thirdColumn) != null ? _h : void 0
248
+ };
249
+ return Variant ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Variant, { ...props }) : null;
250
+ };
251
+ TextComponent.displayName = displayName;
252
+
253
+ // src/index.ts
254
+ init_text_a();
255
+ init_text_b();
256
+ init_text_c();
257
+ // Annotate the CommonJS export names for ESM import in node:
258
+ 0 && (module.exports = {
259
+ TextComponent,
260
+ TextComponent_A,
261
+ TextComponent_B,
262
+ TextComponent_C
263
+ });
package/dist/index.mjs CHANGED
@@ -1,2 +1,21 @@
1
1
  "use client";
2
- "use strict";import{a as t}from"./chunk-B6YHA4AD.mjs";import{a as o}from"./chunk-3E7L5HFT.mjs";import{a as r}from"./chunk-O4GIIQJP.mjs";import{a as e}from"./chunk-5UXS6XWN.mjs";import"./chunk-CBIPJS7L.mjs";export{t as TextComponent,o as TextComponent_A,r as TextComponent_B,e as TextComponent_C};
2
+ "use strict";
3
+ import {
4
+ TextComponent
5
+ } from "./chunk-VO3MEELM.mjs";
6
+ import {
7
+ TextComponent_A
8
+ } from "./chunk-YDPBE4DN.mjs";
9
+ import {
10
+ TextComponent_B
11
+ } from "./chunk-ML53FG6K.mjs";
12
+ import {
13
+ TextComponent_C
14
+ } from "./chunk-XK6JAR4U.mjs";
15
+ import "./chunk-D2JQMMRZ.mjs";
16
+ export {
17
+ TextComponent,
18
+ TextComponent_A,
19
+ TextComponent_B,
20
+ TextComponent_C
21
+ };