@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.
- package/dist/chunk-D2JQMMRZ.mjs +64 -0
- package/dist/chunk-ML53FG6K.mjs +35 -0
- package/dist/chunk-VO3MEELM.mjs +26 -0
- package/dist/chunk-XK6JAR4U.mjs +51 -0
- package/dist/chunk-YDPBE4DN.mjs +28 -0
- package/dist/helper/index.js +88 -1
- package/dist/helper/index.mjs +6 -1
- package/dist/index.js +262 -1
- package/dist/index.mjs +20 -1
- package/dist/text-component.js +249 -1
- package/dist/text-component.mjs +6 -1
- package/dist/text_a.js +112 -1
- package/dist/text_a.mjs +8 -1
- package/dist/text_b.js +119 -1
- package/dist/text_b.mjs +8 -1
- package/dist/text_c.js +135 -1
- package/dist/text_c.mjs +8 -1
- package/dist/types.js +18 -1
- package/package.json +5 -5
|
@@ -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
|
+
};
|
package/dist/helper/index.js
CHANGED
|
@@ -1 +1,88 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
+
});
|
package/dist/helper/index.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,263 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
"use client";
|
|
2
|
-
|
|
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";
|
|
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
|
+
};
|