@stackshift-ui/text-component 6.0.4 → 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/text_c.js CHANGED
@@ -1 +1,135 @@
1
- "use strict";var i=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var a in t)i(e,a,{get:t[a],enumerable:!0})},h=(e,t,a,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of u(t))!y.call(e,r)&&r!==a&&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:()=>c,default:()=>c});module.exports=N(k);var m=require("@portabletext/react"),x=require("@stackshift-ui/container"),g=require("@stackshift-ui/flex"),d=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-500",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-foreground hover:text-secondary-foreground",href:t==null?void 0:t.href,target:"_blank",rel:"noopener noreferrer",children:e})}}};function c({heading:e,firstColumn:t,secondColumn:a,thirdColumn:l}){return(0,o.jsx)(p.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)(d.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})}),a&&(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:a,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});
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{a}from"./chunk-QQ2Z767L.mjs";import"./chunk-QLY5WTLK.mjs";export{a as TextComponent_C,a as default};
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";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);
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",
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/section": "6.0.3",
39
40
  "@stackshift-ui/scripts": "6.0.2",
40
41
  "@stackshift-ui/heading": "6.0.3",
41
- "@stackshift-ui/flex": "6.0.3",
42
42
  "@stackshift-ui/container": "6.0.3",
43
43
  "@stackshift-ui/system": "6.0.3",
44
- "@stackshift-ui/section": "6.0.3"
44
+ "@stackshift-ui/flex": "6.0.3"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@types/react": "16.8 - 19",
@@ -16,7 +16,7 @@ export const textComponentBlockStyling: MyPortableTextComponents = {
16
16
  return <h4 className="mb-6 text-xl leading-loose text-gray-900">{children}</h4>;
17
17
  },
18
18
  normal: ({ children }) => {
19
- return <p className="mb-5 leading-relaxed text-justify text-gray-500">{children}</p>;
19
+ return <p className="mb-5 leading-relaxed text-justify text-gray-900">{children}</p>;
20
20
  },
21
21
  blockquote: ({ children }) => {
22
22
  return (
@@ -52,7 +52,7 @@ export const textComponentBlockStyling: MyPortableTextComponents = {
52
52
  link: ({ children, value }) => (
53
53
  <a
54
54
  aria-label={value.href ?? "external link"}
55
- className="text-primary-foreground hover:text-secondary-foreground"
55
+ className="text-primary hover:text-secondary"
56
56
  href={value?.href}
57
57
  target="_blank"
58
58
  rel="noopener noreferrer">
File without changes