@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_c.js
CHANGED
|
@@ -1 +1,135 @@
|
|
|
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_c.tsx
|
|
21
|
+
var text_c_exports = {};
|
|
22
|
+
__export(text_c_exports, {
|
|
23
|
+
TextComponent_C: () => TextComponent_C,
|
|
24
|
+
default: () => TextComponent_C
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(text_c_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_c.tsx
|
|
95
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
96
|
+
function TextComponent_C({
|
|
97
|
+
heading,
|
|
98
|
+
firstColumn,
|
|
99
|
+
secondColumn,
|
|
100
|
+
thirdColumn
|
|
101
|
+
}) {
|
|
102
|
+
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, { className: "container px-4 mx-auto", maxWidth: 1280, children: [
|
|
103
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_heading.Heading, { fontSize: "xl", className: "w-full mb-5 text-center", children: heading }),
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_flex.Flex, { wrap: true, justify: "center", className: "mx-auto", children: [
|
|
105
|
+
firstColumn && /* @__PURE__ */ (0, import_jsx_runtime2.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_runtime2.jsx)(
|
|
106
|
+
import_react.PortableText,
|
|
107
|
+
{
|
|
108
|
+
value: firstColumn,
|
|
109
|
+
components: textComponentBlockStyling,
|
|
110
|
+
onMissingComponent: false
|
|
111
|
+
}
|
|
112
|
+
) }),
|
|
113
|
+
secondColumn && /* @__PURE__ */ (0, import_jsx_runtime2.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_runtime2.jsx)(
|
|
114
|
+
import_react.PortableText,
|
|
115
|
+
{
|
|
116
|
+
value: secondColumn,
|
|
117
|
+
components: textComponentBlockStyling,
|
|
118
|
+
onMissingComponent: false
|
|
119
|
+
}
|
|
120
|
+
) }),
|
|
121
|
+
thirdColumn && /* @__PURE__ */ (0, import_jsx_runtime2.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_runtime2.jsx)(
|
|
122
|
+
import_react.PortableText,
|
|
123
|
+
{
|
|
124
|
+
value: thirdColumn,
|
|
125
|
+
components: textComponentBlockStyling,
|
|
126
|
+
onMissingComponent: false
|
|
127
|
+
}
|
|
128
|
+
) })
|
|
129
|
+
] })
|
|
130
|
+
] }) });
|
|
131
|
+
}
|
|
132
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
133
|
+
0 && (module.exports = {
|
|
134
|
+
TextComponent_C
|
|
135
|
+
});
|
package/dist/text_c.mjs
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import {
|
|
2
|
+
TextComponent_C
|
|
3
|
+
} from "./chunk-XK6JAR4U.mjs";
|
|
4
|
+
import "./chunk-D2JQMMRZ.mjs";
|
|
5
|
+
export {
|
|
6
|
+
TextComponent_C,
|
|
7
|
+
TextComponent_C as default
|
|
8
|
+
};
|
package/dist/types.js
CHANGED
|
@@ -1 +1,18 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/types.ts
|
|
17
|
+
var types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(types_exports);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/text-component",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.5",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@portabletext/react": "^3.1.0",
|
|
38
38
|
"@portabletext/types": "^2.0.13",
|
|
39
|
-
"@stackshift-ui/
|
|
40
|
-
"@stackshift-ui/container": "6.0.3",
|
|
41
|
-
"@stackshift-ui/heading": "6.0.3",
|
|
39
|
+
"@stackshift-ui/section": "6.0.3",
|
|
42
40
|
"@stackshift-ui/scripts": "6.0.2",
|
|
41
|
+
"@stackshift-ui/heading": "6.0.3",
|
|
42
|
+
"@stackshift-ui/container": "6.0.3",
|
|
43
43
|
"@stackshift-ui/system": "6.0.3",
|
|
44
|
-
"@stackshift-ui/
|
|
44
|
+
"@stackshift-ui/flex": "6.0.3"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@types/react": "16.8 - 19",
|