@stackshift-ui/text-component 7.0.0-beta.0 → 7.0.0-beta.3
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-43JWG5VD.mjs +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/text-component.d.ts +1 -0
- package/dist/text-component.js +1 -1
- package/dist/text-component.mjs +1 -1
- package/package.json +8 -8
- package/src/text-component.tsx +7 -4
- package/dist/chunk-B6YHA4AD.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as f}from"./chunk-3E7L5HFT.mjs";import{a as u}from"./chunk-O4GIIQJP.mjs";import{a as C}from"./chunk-5UXS6XWN.mjs";import{jsx as b}from"react/jsx-runtime";var T={variant_a:f,variant_b:u,variant_c:C},v="TextComponent",P=({data:o})=>{var r,i,t,s,m,l,p,c;let n=o==null?void 0:o.variant,e=n&&T[n],x={heading:(i=(r=o==null?void 0:o.variants)==null?void 0:r.title)!=null?i:void 0,firstColumn:(s=(t=o==null?void 0:o.variants)==null?void 0:t.firstColumn)!=null?s:void 0,secondColumn:(l=(m=o==null?void 0:o.variants)==null?void 0:m.secondColumn)!=null?l:void 0,thirdColumn:(c=(p=o==null?void 0:o.variants)==null?void 0:p.thirdColumn)!=null?c:void 0};return e?b(e,{...x}):null};P.displayName=v;export{P as a};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var f=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var I=(e,t)=>{for(var n in t)f(e,n,{get:t[n],enumerable:!0})},E=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of A(t))!R.call(e,i)&&i!==n&&f(e,i,{get:()=>t[i],enumerable:!(a=W(t,i))||a.enumerable});return e};var G=e=>E(f({},"__esModule",{value:!0}),e);var L={};I(L,{TextComponent:()=>z,TextComponent_A:()=>x,TextComponent_B:()=>p,TextComponent_C:()=>g});module.exports=G(L);var T=require("@portabletext/react"),v=require("@stackshift-ui/container"),w=require("@stackshift-ui/flex"),P=require("@stackshift-ui/heading"),S=require("@stackshift-ui/section");var o=require("react/jsx-runtime"),m={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)("a",{"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 x({heading:e,firstColumn:t}){return(0,o.jsx)(S.Section,{className:"py-20 bg-background",children:(0,o.jsxs)(v.Container,{maxWidth:1280,children:[e&&(0,o.jsx)(P.Heading,{fontSize:"xl",className:"mb-5 text-center",children:e}),(0,o.jsx)(w.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)(T.PortableText,{value:t,components:m,onMissingComponent:!1})})})]})})}function p({heading:e,firstColumn:t,secondColumn:n}){return(0,o.jsx)(S.Section,{className:"py-20 bg-background",children:(0,o.jsxs)(v.Container,{maxWidth:1280,children:[e&&(0,o.jsx)(P.Heading,{fontSize:"xl",className:"w-full mb-4 text-center",children:e}),(0,o.jsxs)(w.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)(T.PortableText,{value:t,components:m})}),n&&(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)(T.PortableText,{value:n,components:m,onMissingComponent:!1})})]})]})})}function g({heading:e,firstColumn:t,secondColumn:n,thirdColumn:a}){return(0,o.jsx)(S.Section,{className:"py-20 bg-background",children:(0,o.jsxs)(v.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)(w.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)(T.PortableText,{value:t,components:m,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)(T.PortableText,{value:n,components:m,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)(T.PortableText,{value:a,components:m,onMissingComponent:!1})})]})]})})}var J={variant_a:x,variant_b:p,variant_c:g},K="TextComponent",z=({data:e})=>{var i,d,u,y,C,N,h,k;let t=e==null?void 0:e.variant,n=t&&J[t],a={heading:(d=(i=e==null?void 0:e.variants)==null?void 0:i.title)!=null?d:void 0,firstColumn:(y=(u=e==null?void 0:e.variants)==null?void 0:u.firstColumn)!=null?y:void 0,secondColumn:(N=(C=e==null?void 0:e.variants)==null?void 0:C.secondColumn)!=null?N:void 0,thirdColumn:(k=(h=e==null?void 0:e.variants)==null?void 0:h.thirdColumn)!=null?k:void 0};return n?(0,o.jsx)(n,{...a}):null};z.displayName=K;0&&(module.exports={TextComponent,TextComponent_A,TextComponent_B,TextComponent_C});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a as t}from"./chunk-
|
|
2
|
+
"use strict";import{a as t}from"./chunk-43JWG5VD.mjs";import{a as o}from"./chunk-3E7L5HFT.mjs";import{a as r}from"./chunk-O4GIIQJP.mjs";import{a as e}from"./chunk-5UXS6XWN.mjs";import"./chunk-CBIPJS7L.mjs";export{t as TextComponent,o as TextComponent_A,r as TextComponent_B,e as TextComponent_C};
|
package/dist/text-component.d.ts
CHANGED
package/dist/text-component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var p=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var I=(e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})},E=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let m of A(t))!R.call(e,m)&&m!==n&&p(e,m,{get:()=>t[m],enumerable:!(a=W(t,m))||a.enumerable});return e};var G=e=>E(p({},"__esModule",{value:!0}),e);var L={};I(L,{TextComponent:()=>z});module.exports=G(L);var T=require("@portabletext/react"),v=require("@stackshift-ui/container"),w=require("@stackshift-ui/flex"),P=require("@stackshift-ui/heading"),S=require("@stackshift-ui/section");var o=require("react/jsx-runtime"),i={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)("a",{"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 g({heading:e,firstColumn:t}){return(0,o.jsx)(S.Section,{className:"py-20 bg-background",children:(0,o.jsxs)(v.Container,{maxWidth:1280,children:[e&&(0,o.jsx)(P.Heading,{fontSize:"xl",className:"mb-5 text-center",children:e}),(0,o.jsx)(w.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)(T.PortableText,{value:t,components:i,onMissingComponent:!1})})})]})})}function f({heading:e,firstColumn:t,secondColumn:n}){return(0,o.jsx)(S.Section,{className:"py-20 bg-background",children:(0,o.jsxs)(v.Container,{maxWidth:1280,children:[e&&(0,o.jsx)(P.Heading,{fontSize:"xl",className:"w-full mb-4 text-center",children:e}),(0,o.jsxs)(w.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)(T.PortableText,{value:t,components:i})}),n&&(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)(T.PortableText,{value:n,components:i,onMissingComponent:!1})})]})]})})}function b({heading:e,firstColumn:t,secondColumn:n,thirdColumn:a}){return(0,o.jsx)(S.Section,{className:"py-20 bg-background",children:(0,o.jsxs)(v.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)(w.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)(T.PortableText,{value:t,components:i,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)(T.PortableText,{value:n,components:i,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)(T.PortableText,{value:a,components:i,onMissingComponent:!1})})]})]})})}var J={variant_a:g,variant_b:f,variant_c:b},K="TextComponent",z=({data:e})=>{var m,d,u,y,C,N,h,k;let t=e==null?void 0:e.variant,n=t&&J[t],a={heading:(d=(m=e==null?void 0:e.variants)==null?void 0:m.title)!=null?d:void 0,firstColumn:(y=(u=e==null?void 0:e.variants)==null?void 0:u.firstColumn)!=null?y:void 0,secondColumn:(N=(C=e==null?void 0:e.variants)==null?void 0:C.secondColumn)!=null?N:void 0,thirdColumn:(k=(h=e==null?void 0:e.variants)==null?void 0:h.thirdColumn)!=null?k:void 0};return n?(0,o.jsx)(n,{...a}):null};z.displayName=K;0&&(module.exports={TextComponent});
|
package/dist/text-component.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-43JWG5VD.mjs";import"./chunk-3E7L5HFT.mjs";import"./chunk-O4GIIQJP.mjs";import"./chunk-5UXS6XWN.mjs";import"./chunk-CBIPJS7L.mjs";export{a as TextComponent};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/text-component",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.3",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@portabletext/react": "^3.1.0",
|
|
38
38
|
"@portabletext/types": "^2.0.13",
|
|
39
|
-
"@stackshift-ui/
|
|
40
|
-
"@stackshift-ui/
|
|
41
|
-
"@stackshift-ui/
|
|
42
|
-
"@stackshift-ui/scripts": "6.1.0-beta.
|
|
43
|
-
"@stackshift-ui/
|
|
44
|
-
"@stackshift-ui/
|
|
39
|
+
"@stackshift-ui/heading": "7.0.0-beta.3",
|
|
40
|
+
"@stackshift-ui/section": "7.0.0-beta.3",
|
|
41
|
+
"@stackshift-ui/container": "7.0.0-beta.3",
|
|
42
|
+
"@stackshift-ui/scripts": "6.1.0-beta.2",
|
|
43
|
+
"@stackshift-ui/system": "6.1.0-beta.3",
|
|
44
|
+
"@stackshift-ui/flex": "7.0.0-beta.3"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@types/react": "16.8 - 19",
|
|
48
|
-
"@stackshift-ui/system": ">=6.1.0-beta.
|
|
48
|
+
"@stackshift-ui/system": ">=6.1.0-beta.3",
|
|
49
49
|
"next": "10 - 14",
|
|
50
50
|
"react": "16.8 - 19",
|
|
51
51
|
"react-dom": "16.8 - 19"
|
package/src/text-component.tsx
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { PortableTextBlock } from "@portabletext/types";
|
|
2
|
-
import
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { SectionsProps } from "./types";
|
|
4
|
+
import TextA from "./text_a";
|
|
5
|
+
import TextB from "./text_b";
|
|
6
|
+
import TextC from "./text_c";
|
|
4
7
|
|
|
5
8
|
const Variants = {
|
|
6
|
-
variant_a:
|
|
7
|
-
variant_b:
|
|
8
|
-
variant_c:
|
|
9
|
+
variant_a: TextA,
|
|
10
|
+
variant_b: TextB,
|
|
11
|
+
variant_c: TextC,
|
|
9
12
|
};
|
|
10
13
|
|
|
11
14
|
export interface TextComponentProps {
|
package/dist/chunk-B6YHA4AD.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{lazy as o}from"react";import{jsx as P}from"react/jsx-runtime";var C={variant_a:o(()=>import("./text_a.mjs")),variant_b:o(()=>import("./text_b.mjs")),variant_c:o(()=>import("./text_c.mjs"))},v="TextComponent",x=({data:n})=>{var i,t,s,l,m,p,c,u;let r=n==null?void 0:n.variant,e=r&&C[r],f={heading:(t=(i=n==null?void 0:n.variants)==null?void 0:i.title)!=null?t:void 0,firstColumn:(l=(s=n==null?void 0:n.variants)==null?void 0:s.firstColumn)!=null?l:void 0,secondColumn:(p=(m=n==null?void 0:n.variants)==null?void 0:m.secondColumn)!=null?p:void 0,thirdColumn:(u=(c=n==null?void 0:n.variants)==null?void 0:c.thirdColumn)!=null?u:void 0};return e?P(e,{...f}):null};x.displayName=v;export{x as a};
|