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