@stackshift-ui/text-component 6.0.5 → 6.0.6-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1 @@
1
- import {
2
- TextComponent
3
- } from "./chunk-VO3MEELM.mjs";
4
- export {
5
- TextComponent
6
- };
1
+ import{a}from"./chunk-B6YHA4AD.mjs";export{a as TextComponent};
package/dist/text_a.js CHANGED
@@ -1,112 +1 @@
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
- });
1
+ "use strict";var n=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var a in t)n(e,a,{get:t[a],enumerable:!0})},h=(e,t,a,m)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of u(t))!y.call(e,l)&&l!==a&&n(e,l,{get:()=>t[l],enumerable:!(m=b(t,l))||m.enumerable});return e};var N=e=>h(n({},"__esModule",{value:!0}),e);var k={};f(k,{TextComponent_A:()=>d,default:()=>d});module.exports=N(k);var i=require("@portabletext/react"),x=require("@stackshift-ui/container"),c=require("@stackshift-ui/flex"),g=require("@stackshift-ui/heading"),p=require("@stackshift-ui/section");var o=require("react/jsx-runtime"),s={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 a;return(0,o.jsx)("a",{"aria-label":(a=t.href)!=null?a:"external link",className:"text-primary hover:text-secondary",href:t==null?void 0:t.href,target:"_blank",rel:"noopener noreferrer",children:e})}}};function d({heading:e,firstColumn:t}){return(0,o.jsx)(p.Section,{className:"py-20 bg-background",children:(0,o.jsxs)(x.Container,{maxWidth:1280,children:[e&&(0,o.jsx)(g.Heading,{fontSize:"xl",className:"mb-5 text-center",children:e}),(0,o.jsx)(c.Flex,{wrap:!0,justify:"center",className:"mx-auto",children:t&&(0,o.jsx)("div",{className:"mb-2 text-xs md:mb-0 md:w-1/2 lg:text-base",children:(0,o.jsx)(i.PortableText,{value:t,components:s,onMissingComponent:!1})})})]})})}0&&(module.exports={TextComponent_A});
package/dist/text_a.mjs CHANGED
@@ -1,8 +1 @@
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
- };
1
+ import{a}from"./chunk-3E7L5HFT.mjs";import"./chunk-CBIPJS7L.mjs";export{a as TextComponent_A,a as default};
package/dist/text_b.js CHANGED
@@ -1,119 +1 @@
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
- });
1
+ "use strict";var n=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var l in t)n(e,l,{get:t[l],enumerable:!0})},h=(e,t,l,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of y(t))!u.call(e,r)&&r!==l&&n(e,r,{get:()=>t[r],enumerable:!(i=b(t,r))||i.enumerable});return e};var N=e=>h(n({},"__esModule",{value:!0}),e);var k={};f(k,{TextComponent_B:()=>d,default:()=>d});module.exports=N(k);var m=require("@portabletext/react"),x=require("@stackshift-ui/container"),g=require("@stackshift-ui/flex"),c=require("@stackshift-ui/heading"),p=require("@stackshift-ui/section");var o=require("react/jsx-runtime"),s={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 l;return(0,o.jsx)("o",{"aria-label":(l=t.href)!=null?l:"external link",className:"text-primary hover:text-secondary",href:t==null?void 0:t.href,target:"_blank",rel:"noopener noreferrer",children:e})}}};function d({heading:e,firstColumn:t,secondColumn:l}){return(0,o.jsx)(p.Section,{className:"py-20 bg-background",children:(0,o.jsxs)(x.Container,{maxWidth:1280,children:[e&&(0,o.jsx)(c.Heading,{fontSize:"xl",className:"w-full mb-4 text-center",children:e}),(0,o.jsxs)(g.Flex,{wrap:!0,justify:"center",className:"mx-auto ",children:[t&&(0,o.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,o.jsx)(m.PortableText,{value:t,components:s})}),l&&(0,o.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,o.jsx)(m.PortableText,{value:l,components:s,onMissingComponent:!1})})]})]})})}0&&(module.exports={TextComponent_B});
package/dist/text_b.mjs CHANGED
@@ -1,8 +1 @@
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
- };
1
+ import{a}from"./chunk-O4GIIQJP.mjs";import"./chunk-CBIPJS7L.mjs";export{a as TextComponent_B,a as default};
package/dist/text_c.js CHANGED
@@ -1,135 +1 @@
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
- });
1
+ "use strict";var i=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},h=(e,t,n,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of y(t))!u.call(e,r)&&r!==n&&i(e,r,{get:()=>t[r],enumerable:!(l=b(t,r))||l.enumerable});return e};var N=e=>h(i({},"__esModule",{value:!0}),e);var k={};f(k,{TextComponent_C:()=>d,default:()=>d});module.exports=N(k);var m=require("@portabletext/react"),x=require("@stackshift-ui/container"),g=require("@stackshift-ui/flex"),p=require("@stackshift-ui/heading"),c=require("@stackshift-ui/section");var o=require("react/jsx-runtime"),s={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)("o",{"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})}}};function d({heading:e,firstColumn:t,secondColumn:n,thirdColumn:l}){return(0,o.jsx)(c.Section,{className:"py-20 bg-background",children:(0,o.jsxs)(x.Container,{className:"container px-4 mx-auto",maxWidth:1280,children:[e&&(0,o.jsx)(p.Heading,{fontSize:"xl",className:"w-full mb-5 text-center",children:e}),(0,o.jsxs)(g.Flex,{wrap:!0,justify:"center",className:"mx-auto",children:[t&&(0,o.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,o.jsx)(m.PortableText,{value:t,components:s,onMissingComponent:!1})}),n&&(0,o.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,o.jsx)(m.PortableText,{value:n,components:s,onMissingComponent:!1})}),l&&(0,o.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,o.jsx)(m.PortableText,{value:l,components:s,onMissingComponent:!1})})]})]})})}0&&(module.exports={TextComponent_C});
package/dist/text_c.mjs CHANGED
@@ -1,8 +1 @@
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
- };
1
+ import{a}from"./chunk-5UXS6XWN.mjs";import"./chunk-CBIPJS7L.mjs";export{a as TextComponent_C,a as default};
package/dist/types.js CHANGED
@@ -1,18 +1 @@
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);
1
+ "use strict";var l=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var g=(n,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of s(t))!o.call(n,e)&&e!==r&&l(n,e,{get:()=>t[e],enumerable:!(i=a(t,e))||i.enumerable});return n};var u=n=>g(l({},"__esModule",{value:!0}),n);var c={};module.exports=u(c);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/text-component",
3
3
  "description": "",
4
- "version": "6.0.5",
4
+ "version": "6.0.6-beta.1",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -30,22 +30,22 @@
30
30
  "typescript": "^5.6.2",
31
31
  "vite-tsconfig-paths": "^5.0.1",
32
32
  "vitest": "^2.1.1",
33
- "@stackshift-ui/typescript-config": "6.0.2",
34
- "@stackshift-ui/eslint-config": "6.0.2"
33
+ "@stackshift-ui/eslint-config": "6.0.3-beta.1",
34
+ "@stackshift-ui/typescript-config": "6.0.3-beta.1"
35
35
  },
36
36
  "dependencies": {
37
37
  "@portabletext/react": "^3.1.0",
38
38
  "@portabletext/types": "^2.0.13",
39
- "@stackshift-ui/section": "6.0.3",
40
- "@stackshift-ui/scripts": "6.0.2",
41
- "@stackshift-ui/heading": "6.0.3",
42
- "@stackshift-ui/container": "6.0.3",
43
- "@stackshift-ui/system": "6.0.3",
44
- "@stackshift-ui/flex": "6.0.3"
39
+ "@stackshift-ui/container": "6.0.4-beta.1",
40
+ "@stackshift-ui/scripts": "6.0.3-beta.1",
41
+ "@stackshift-ui/flex": "6.0.4-beta.1",
42
+ "@stackshift-ui/system": "6.0.4-beta.1",
43
+ "@stackshift-ui/heading": "6.0.4-beta.1",
44
+ "@stackshift-ui/section": "6.0.4-beta.1"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@types/react": "16.8 - 19",
48
- "@stackshift-ui/system": ">=0.0.0",
48
+ "@stackshift-ui/system": ">=6.0.4-beta.1",
49
49
  "next": "10 - 14",
50
50
  "react": "16.8 - 19",
51
51
  "react-dom": "16.8 - 19"
@@ -1,64 +0,0 @@
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
- };
@@ -1,35 +0,0 @@
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
- };
@@ -1,26 +0,0 @@
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
- };