@xwadex/fesd-next 0.3.4-7.21 → 0.3.4-7.23
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/components/content-builders/article4/article4cora/article4cora-roots.d.ts +4 -0
- package/dist/components/content-builders/article4/article4cora/article4cora-roots.js +79 -0
- package/dist/components/content-builders/article4/article4cora/media-base/index.d.ts +2 -0
- package/dist/components/content-builders/article4/article4cora/media-base/index.js +2 -0
- package/dist/components/content-builders/article4/article4cora/media-base/media-base-root.d.ts +15 -0
- package/dist/components/content-builders/article4/article4cora/media-base/media-base-root.js +52 -0
- package/dist/components/content-builders/article4/article4cora/media-cover/index.d.ts +2 -0
- package/dist/components/content-builders/article4/article4cora/media-cover/index.js +2 -0
- package/dist/components/content-builders/article4/article4cora/media-cover/media-cover-root.d.ts +15 -0
- package/dist/components/content-builders/article4/article4cora/media-cover/media-cover-root.js +23 -0
- package/dist/components/content-builders/article4/article4cora/media-embla/index.d.ts +2 -0
- package/dist/components/content-builders/article4/article4cora/media-embla/index.js +2 -0
- package/dist/components/content-builders/article4/article4cora/media-embla/media-embla-root.d.ts +25 -0
- package/dist/components/content-builders/article4/article4cora/media-embla/media-embla-root.js +107 -0
- package/dist/components/content-builders/article4/baseBlock.d.ts +17 -0
- package/dist/components/content-builders/article4/baseBlock.js +115 -0
- package/dist/components/content-builders/article4/commonComponents.d.ts +53 -0
- package/dist/components/content-builders/article4/commonComponents.js +81 -0
- package/dist/components/content-builders/article4/config.d.ts +4 -0
- package/dist/components/content-builders/article4/config.js +6 -0
- package/dist/components/content-builders/article4/index.d.ts +12 -0
- package/dist/components/content-builders/article4/index.js +12 -0
- package/dist/components/content-builders/article4/type10Block.d.ts +14 -0
- package/dist/components/content-builders/article4/type10Block.js +24 -0
- package/dist/components/content-builders/article4/type1Block.d.ts +9 -0
- package/dist/components/content-builders/article4/type1Block.js +12 -0
- package/dist/components/content-builders/article4/type2Block.d.ts +9 -0
- package/dist/components/content-builders/article4/type2Block.js +17 -0
- package/dist/components/content-builders/article4/type3Block.d.ts +8 -0
- package/dist/components/content-builders/article4/type3Block.js +12 -0
- package/dist/components/content-builders/article4/type4Block.d.ts +27 -0
- package/dist/components/content-builders/article4/type4Block.js +53 -0
- package/dist/components/content-builders/article4/type5Block.d.ts +24 -0
- package/dist/components/content-builders/article4/type5Block.js +43 -0
- package/dist/components/content-builders/article4/type6Block.d.ts +24 -0
- package/dist/components/content-builders/article4/type6Block.js +43 -0
- package/dist/components/content-builders/article4/type7Block.d.ts +12 -0
- package/dist/components/content-builders/article4/type7Block.js +19 -0
- package/dist/components/content-builders/article4/type8Block.d.ts +11 -0
- package/dist/components/content-builders/article4/type8Block.js +14 -0
- package/dist/components/content-builders/article4/type9Block.d.ts +11 -0
- package/dist/components/content-builders/article4/type9Block.js +19 -0
- package/dist/components/content-builders/blocks/base-block.d.ts +12 -0
- package/dist/components/content-builders/blocks/base-block.js +91 -0
- package/dist/components/content-builders/blocks/headers-block.d.ts +20 -0
- package/dist/components/content-builders/blocks/headers-block.js +49 -0
- package/dist/components/content-builders/blocks/index.d.ts +4 -0
- package/dist/components/content-builders/blocks/index.js +4 -0
- package/dist/components/content-builders/blocks/media-content.d.ts +7 -0
- package/dist/components/content-builders/blocks/media-content.js +23 -0
- package/dist/components/content-builders/blocks/root-header.d.ts +11 -0
- package/dist/components/content-builders/blocks/root-header.js +14 -0
- package/dist/components/content-builders/blocks/roots.d.ts +8 -0
- package/dist/components/content-builders/blocks/roots.js +23 -0
- package/dist/components/content-builders/blocks/text-content.d.ts +20 -0
- package/dist/components/content-builders/blocks/text-content.js +190 -0
- package/dist/components/content-builders/content-builder-actionbar.d.ts +1 -0
- package/dist/components/content-builders/content-builder-actionbar.js +64 -0
- package/dist/components/content-builders/content-builder-blocks-dialogs.d.ts +4 -0
- package/dist/components/content-builders/content-builder-blocks-dialogs.js +45 -0
- package/dist/components/content-builders/content-builder-blocks.d.ts +15 -0
- package/dist/components/content-builders/content-builder-blocks.js +40 -0
- package/dist/components/content-builders/content-builder-builder.d.ts +13 -0
- package/dist/components/content-builders/content-builder-builder.js +17 -0
- package/dist/components/content-builders/content-builder-configs.d.ts +203 -0
- package/dist/components/content-builders/content-builder-configs.js +125 -0
- package/dist/components/content-builders/content-builder-context.d.ts +24 -0
- package/dist/components/content-builders/content-builder-context.js +47 -0
- package/dist/components/content-builders/content-builder-fields.d.ts +1 -0
- package/dist/components/content-builders/content-builder-fields.js +5 -0
- package/dist/components/content-builders/content-builder-functionbar.d.ts +1 -0
- package/dist/components/content-builders/content-builder-functionbar.js +37 -0
- package/dist/components/content-builders/content-builder-helpers.d.ts +9 -0
- package/dist/components/content-builders/content-builder-helpers.js +43 -0
- package/dist/components/content-builders/content-builder-hooks.d.ts +39 -0
- package/dist/components/content-builders/content-builder-hooks.js +129 -0
- package/dist/components/content-builders/content-builder-iframe.d.ts +5 -0
- package/dist/components/content-builders/content-builder-iframe.js +15 -0
- package/dist/components/content-builders/content-builder-overlay.d.ts +1 -0
- package/dist/components/content-builders/content-builder-overlay.js +22 -0
- package/dist/components/content-builders/content-builder-panels.d.ts +10 -0
- package/dist/components/content-builders/content-builder-panels.js +165 -0
- package/dist/components/content-builders/content-builder-preview.d.ts +4 -0
- package/dist/components/content-builders/content-builder-preview.js +22 -0
- package/dist/components/content-builders/content-builder-pucks-context.d.ts +13 -0
- package/dist/components/content-builders/content-builder-pucks-context.js +17 -0
- package/dist/components/content-builders/content-builder-pucks-hooks.d.ts +17 -0
- package/dist/components/content-builders/content-builder-pucks-hooks.js +119 -0
- package/dist/components/content-builders/content-builder-render.d.ts +6 -0
- package/dist/components/content-builders/content-builder-render.js +6 -0
- package/dist/components/content-builders/content-builder.d.ts +7 -0
- package/dist/components/content-builders/content-builder.js +24 -0
- package/dist/components/content-builders/fields/fields-tabs.d.ts +5 -0
- package/dist/components/content-builders/fields/fields-tabs.js +9 -0
- package/dist/components/content-builders/index.d.ts +5 -0
- package/dist/components/content-builders/index.js +5 -0
- package/dist/components/content-builders/initial-datas.d.ts +56 -0
- package/dist/components/content-builders/initial-datas.js +818 -0
- package/dist/components/emblas/embla-container.d.ts +8 -0
- package/dist/components/emblas/embla-container.js +13 -0
- package/dist/components/emblas/embla-context.d.ts +21 -0
- package/dist/components/emblas/embla-context.js +13 -0
- package/dist/components/emblas/embla.d.ts +20 -0
- package/dist/components/emblas/embla.js +125 -0
- package/dist/components/emblas/emblas-pagination.d.ts +11 -0
- package/dist/components/emblas/emblas-pagination.js +90 -0
- package/dist/components/emblas/index.d.ts +4 -0
- package/dist/components/emblas/index.js +4 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./baseBlock";
|
|
2
|
+
export * from "./commonComponents";
|
|
3
|
+
export { default as Type1Block } from "./type1Block";
|
|
4
|
+
export { default as Type2Block } from "./type2Block";
|
|
5
|
+
export { default as Type3Block } from "./type3Block";
|
|
6
|
+
export { default as Type4Block } from "./type4Block";
|
|
7
|
+
export { default as Type5Block } from "./type5Block";
|
|
8
|
+
export { default as Type6Block } from "./type6Block";
|
|
9
|
+
export { default as Type7Block } from "./type7Block";
|
|
10
|
+
export { default as Type8Block } from "./type8Block";
|
|
11
|
+
export { default as Type9Block } from "./type9Block";
|
|
12
|
+
export { default as Type10Block } from "./type10Block";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./baseBlock";
|
|
2
|
+
export * from "./commonComponents";
|
|
3
|
+
export { default as Type1Block } from "./type1Block";
|
|
4
|
+
export { default as Type2Block } from "./type2Block";
|
|
5
|
+
export { default as Type3Block } from "./type3Block";
|
|
6
|
+
export { default as Type4Block } from "./type4Block";
|
|
7
|
+
export { default as Type5Block } from "./type5Block";
|
|
8
|
+
export { default as Type6Block } from "./type6Block";
|
|
9
|
+
export { default as Type7Block } from "./type7Block";
|
|
10
|
+
export { default as Type8Block } from "./type8Block";
|
|
11
|
+
export { default as Type9Block } from "./type9Block";
|
|
12
|
+
export { default as Type10Block } from "./type10Block";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type ContentBlockData = {
|
|
2
|
+
imgPC?: string;
|
|
3
|
+
imgMB?: string;
|
|
4
|
+
option?: {
|
|
5
|
+
size?: 'S' | 'M' | 'L';
|
|
6
|
+
align?: 'start' | 'center' | 'end';
|
|
7
|
+
isSlice?: boolean;
|
|
8
|
+
boxColor?: string;
|
|
9
|
+
bgColor?: string;
|
|
10
|
+
rwdReverse?: 'normal' | 'reverse';
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare const Type10Block: React.FC<ContentBlockData>;
|
|
14
|
+
export default Type10Block;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../shadcns/index.js";
|
|
3
|
+
import { RenderImage, RenderText } from "./commonComponents";
|
|
4
|
+
export const Type10Block = (props) => {
|
|
5
|
+
const { imgPC, imgMB, option, } = props;
|
|
6
|
+
const { size = "M", align = "center", isSlice = false, bgColor = "rgba(122, 140, 125, 0.7)", boxColor, rwdReverse = "normal", } = option || {};
|
|
7
|
+
const boxSize = {
|
|
8
|
+
S: "@4xl:w-[50%]",
|
|
9
|
+
M: "@4xl:w-[75%]",
|
|
10
|
+
L: "@4xl:w-[90%]",
|
|
11
|
+
};
|
|
12
|
+
const justifyMap = {
|
|
13
|
+
start: "justify-start",
|
|
14
|
+
center: "justify-center",
|
|
15
|
+
end: "justify-end",
|
|
16
|
+
};
|
|
17
|
+
const isRWDReverse = rwdReverse === 'reverse';
|
|
18
|
+
return (_jsx(_Fragment, { children: _jsx("div", { "data-component": "Type10Block", className: cn("@container", "w-full", "max-w-full"), children: _jsxs("div", { "data-component": "article-item-inner", className: cn("relative", "w-9/10", "max-w-[1200px]", "mx-auto", "flex", "gap-5", "overflow-hidden", "p-5", align && justifyMap[align], isSlice && "@4xl:p-0", !isSlice && "@4xl:py-15 @4xl:px-10"), children: [_jsx("div", { "data-component": "article-bgWrapper", className: cn("absolute", "top-0", "left-0", "w-full", "h-full", "bg-(--BG-color)"), style: { "--BG-color": bgColor }, children: (imgPC || imgMB) &&
|
|
19
|
+
_jsxs("picture", { children: [imgPC && _jsx("source", { media: "(min-width: 1025px)", srcSet: imgPC }), _jsx("img", { className: cn("w-full", "h-full", "object-cover", "block"), src: imgMB, alt: '' })] }) }), _jsxs("div", { className: cn("relative", "z-1",
|
|
20
|
+
// "space-y-5",
|
|
21
|
+
"grid", "grid-rows-[auto_auto]", "gap-5", "bg-(--box-color)", boxColor && "@4xl:p-10 p-5", size && boxSize[size]), style: { "--box-color": boxColor }, children: [_jsx("div", { className: cn("w-full", "@4xl:order-1", isRWDReverse && "order-2"), children: _jsx(RenderImage, {}) }), _jsx("div", { className: cn("w-full", "@4xl:order-2", isRWDReverse && "order-1"), children: _jsx(RenderText, {}) })] })] }) }) }));
|
|
22
|
+
};
|
|
23
|
+
Type10Block.displayName = "Type10Block";
|
|
24
|
+
export default Type10Block;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../shadcns/index.js";
|
|
3
|
+
import { RenderImage, RenderText } from "./commonComponents";
|
|
4
|
+
export const Type1Block = (props) => {
|
|
5
|
+
const { option } = props;
|
|
6
|
+
const { direction = "top", rwdReverse = "normal", } = option || {};
|
|
7
|
+
const isReverse = direction === 'bottom';
|
|
8
|
+
const isRWDReverse = rwdReverse === 'reverse';
|
|
9
|
+
return (_jsx(_Fragment, { children: _jsx("div", { "data-component": "Type1Block", className: cn("@container", "w-full", "max-w-full"), children: _jsx("div", { "data-component": "article-item-inner", className: cn("w-9/10", "max-w-[1200px]", "mx-auto"), children: _jsxs("div", { className: cn("grid", "grid-rows-[auto_auto]", "gap-5"), children: [_jsx("div", { className: cn("w-full", isReverse ? "@4xl:order-2" : "@4xl:order-1", (isReverse !== isRWDReverse) && "order-2"), children: _jsx(RenderImage, {}) }), _jsx("div", { className: cn("w-full", isReverse ? "@4xl:order-1" : "@4xl:order-2", (isReverse !== isRWDReverse) && "order-1"), children: _jsx(RenderText, {}) })] }) }) }) }));
|
|
10
|
+
};
|
|
11
|
+
Type1Block.displayName = "Type1Block";
|
|
12
|
+
export default Type1Block;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../shadcns/index.js";
|
|
3
|
+
import { RenderImage, RenderText } from "./commonComponents";
|
|
4
|
+
export const Type2Block = (props) => {
|
|
5
|
+
const { option } = props;
|
|
6
|
+
const { direction = "left", rwdReverse = "normal", wordAlign = "start", } = option || {};
|
|
7
|
+
const isReverse = direction === 'right';
|
|
8
|
+
const isRWDReverse = rwdReverse === 'reverse';
|
|
9
|
+
const alignMap = {
|
|
10
|
+
start: "items-start",
|
|
11
|
+
center: "items-center",
|
|
12
|
+
end: "items-end",
|
|
13
|
+
};
|
|
14
|
+
return (_jsx(_Fragment, { children: _jsx("div", { "data-component": "Type2Block", className: cn("@container", "w-full", "max-w-full"), children: _jsx("div", { "data-component": "article-item-inner", className: cn("w-9/10", "max-w-[1200px]", "mx-auto"), children: _jsxs("div", { className: cn("grid", "grid-cols-1", "@4xl:grid-cols-2", "gap-x-[50px]", "gap-y-5", wordAlign && alignMap[wordAlign]), children: [_jsx("div", { className: cn("w-full", isReverse ? "@4xl:order-2" : "@4xl:order-1", (isReverse !== isRWDReverse) && "order-2"), children: _jsx(RenderImage, {}) }), _jsx("div", { className: cn("w-full", isReverse ? "@4xl:order-1" : "@4xl:order-2", (isReverse !== isRWDReverse) && "order-1"), children: _jsx(RenderText, {}) })] }) }) }) }));
|
|
15
|
+
};
|
|
16
|
+
Type2Block.displayName = "Type2Block";
|
|
17
|
+
export default Type2Block;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../shadcns/index.js";
|
|
3
|
+
import { RenderImage, RenderText } from "./commonComponents";
|
|
4
|
+
export const Type3Block = (props) => {
|
|
5
|
+
const { option } = props;
|
|
6
|
+
const { direction = "left", rwdReverse = "normal", } = option || {};
|
|
7
|
+
const isReverse = direction === 'right';
|
|
8
|
+
const isRWDReverse = rwdReverse === 'reverse';
|
|
9
|
+
return (_jsx(_Fragment, { children: _jsx("div", { "data-component": "Type3Block", className: cn("@container", "w-full", "max-w-full"), children: _jsx("div", { "data-component": "article-item-inner", className: cn("w-9/10", "max-w-[1200px]", "mx-auto"), children: _jsxs("div", { className: cn("@4xl:after:block", "@4xl:after:clear-both", "@4xl:block", "grid", "gap-5"), children: [_jsx("div", { className: cn("w-full", "@4xl:w-1/2", "@4xl:mb-5", isReverse ? "@4xl:float-right" : "@4xl:float-left", isReverse ? "@4xl:ml-10" : "@4xl:mr-10", (isReverse !== isRWDReverse) && "order-2"), children: _jsx(RenderImage, {}) }), _jsx("div", { className: cn("w-full", (isReverse !== isRWDReverse) && "order-1"), children: _jsx(RenderText, { paragraph: "tests the player's ability to manage. You can freely design the structure of the museum, from the planning of the exhibition hall to the location of the gift shop, laying different floors for each room, setting windows, and of course matching Create a first class museum on the wallpaper. What would the museum in your imagination look like? It's a good idea to build your favorite museum in Mondo Museum, whether it's to be displayed in a sub-category, or to show it all at once and make a sensation in the world. The museum simulator Mondo Museum is a game that tests the player's ability to manage. You can freely design the structure of the museum, from the planning of the exhibition hall to the location of the gift shop, laying different floors for each room, setting windows, and of course matching Create a first class museum on the wallpaper.What would the museum in your imagination look like? It's a good idea to build your favorite museum in Mondo Museum, whethert tests the player's ability to manage. You can freely design the structure of the museum, from the planning of the exhibition hall to the location of the gift shop, laying different floors for each room, setting windows, and of course matching Create a first class museum on the wallpaper. What would the museum in your imagination look like? It's a good idea to build your favorite museum in Mondo Museum, whether it's to be displayed in a sub-category, or to show it all at once and make a sensation in the world. The museum simulator Mondo Museum is a game that tests the player's ability to manage. You can freely design the structure of the museum, from the planning of the exhibition hall to the location of the gift shop, laying different floors for each room, setting windows, and of course matching Create a first class museum on the wallpaper.What would the museum in your imagination look like? It's a good idea to build your favorite museum in Mondo Museum, whether it's to be displayed in a sub-category, or to show it all at once and make a sensation in the world. The museum simulator Mondo Museum is a game that tests the player's ability to manage. You can freely design the structure of the museum, from the planning of the exhibition hall to the location of the gift shop, laying different floors for each room, setting windows, and of course matching Create a first class museum on the wallpaper. What would the museum in your imagination look like? It's a good idea to build your favorite museum in Mondo Museum, whether it's to be displayed in a sub-category, or to show it all at once and make a sensation in the world. The museum simulator Mondo Museum is a game that tests the player's ability to manage. You can freely design the structure of the museum, from the planning of the exhibition hall to the location of the gift shop, laying different floors for each room, setting windows, and of course matching Create a first class museum on the wallpaper. What would the museum in your imagination" }) })] }) }) }) }));
|
|
10
|
+
};
|
|
11
|
+
Type3Block.displayName = "Type3Block";
|
|
12
|
+
export default Type3Block;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ButtonItem } from "./commonComponents";
|
|
2
|
+
type HeadingData = {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleTag?: any;
|
|
5
|
+
titleColor?: string;
|
|
6
|
+
titleAlign?: "left" | "center" | "right";
|
|
7
|
+
};
|
|
8
|
+
type ContentData = {
|
|
9
|
+
subTitle?: string;
|
|
10
|
+
paragraph?: string;
|
|
11
|
+
subTitleAlign?: "left" | "center" | "right";
|
|
12
|
+
paragraphAlign?: "left" | "center" | "right";
|
|
13
|
+
buttonAlign?: "left" | "center" | "right";
|
|
14
|
+
buttonData?: ButtonItem[];
|
|
15
|
+
subTitleColor?: string;
|
|
16
|
+
paragraphColor?: string;
|
|
17
|
+
direction?: 'left' | 'right';
|
|
18
|
+
};
|
|
19
|
+
type ContentBlockData = {
|
|
20
|
+
option?: {
|
|
21
|
+
rwdReverse?: 'normal' | 'reverse';
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const Type4Block: React.FC<ContentBlockData>;
|
|
25
|
+
export declare const RenderHeading: React.FC<HeadingData>;
|
|
26
|
+
export declare const RenderText: React.FC<ContentData>;
|
|
27
|
+
export default Type4Block;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../shadcns/index.js";
|
|
3
|
+
import { RenderImage, RenderBtn } from "./commonComponents";
|
|
4
|
+
export const Type4Block = (props) => {
|
|
5
|
+
const { option } = props;
|
|
6
|
+
const { rwdReverse = "normal", } = option || {};
|
|
7
|
+
const isRWDReverse = rwdReverse === 'reverse';
|
|
8
|
+
return (_jsx(_Fragment, { children: _jsx("div", { "data-component": "Type4Block", className: cn("@container", "w-full", "max-w-full"), children: _jsxs("div", { "data-component": "article-item-inner", className: cn("w-9/10", "max-w-[1200px]", "mx-auto",
|
|
9
|
+
// "space-y-5",
|
|
10
|
+
"grid", "grid-rows-[auto_auto]", "gap-5"), children: [_jsx("div", { className: cn("w-full", "order-0"), children: _jsx(RenderHeading, {}) }), _jsx("div", { className: cn("w-full", "@4xl:order-1", isRWDReverse && "order-2"), children: _jsx(RenderImage, {}) }), _jsx("div", { className: cn("w-full", "@4xl:order-2", isRWDReverse && "order-1"), children: _jsx(RenderText, {}) })] }) }) }));
|
|
11
|
+
};
|
|
12
|
+
export const RenderHeading = (props) => {
|
|
13
|
+
const { title = '標題', titleTag: TitleComponent = "h2", titleColor, titleAlign = "left", } = props;
|
|
14
|
+
const alignMap = {
|
|
15
|
+
left: "text-left",
|
|
16
|
+
center: "text-center",
|
|
17
|
+
right: "text-right",
|
|
18
|
+
};
|
|
19
|
+
return (_jsx(_Fragment, { children: _jsx("div", { className: cn("w-full"), style: {
|
|
20
|
+
"--title-color": titleColor,
|
|
21
|
+
}, children: title &&
|
|
22
|
+
_jsx(TitleComponent, { "data-component": "article-item-title", className: cn("text-xl", "font-bold", "@4xl:text-3xl", "text-(--title-color)", titleAlign && alignMap[titleAlign]), children: title }) }) }));
|
|
23
|
+
};
|
|
24
|
+
export const RenderText = (props) => {
|
|
25
|
+
const { subTitle = '副標題', paragraph = '內文', subTitleAlign = "left", paragraphAlign = "left", buttonAlign = "left", buttonData = [
|
|
26
|
+
{
|
|
27
|
+
buttonText: '按鈕',
|
|
28
|
+
buttonLink: 'javascript:;',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
buttonText: '按鈕',
|
|
32
|
+
buttonLink: 'javascript:;',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
buttonText: '按鈕',
|
|
36
|
+
buttonLink: 'javascript:;',
|
|
37
|
+
},
|
|
38
|
+
], subTitleColor, paragraphColor, direction = "right", } = props;
|
|
39
|
+
const isReverse = direction === 'right';
|
|
40
|
+
const alignMap = {
|
|
41
|
+
left: "text-left",
|
|
42
|
+
center: "text-center",
|
|
43
|
+
right: "text-right",
|
|
44
|
+
};
|
|
45
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { "data-component": "article-text-content", className: cn("w-full", "gap-x-6", "gap-y-2", "grid", "grid-cols-1", "@4xl:grid-cols-4"), style: {
|
|
46
|
+
"--subTitle-color": subTitleColor,
|
|
47
|
+
"--paragraph-color": paragraphColor,
|
|
48
|
+
}, children: [_jsx("div", { className: cn("w-full", "@4xl:col-span-1", isReverse && "@4xl:order-2"), children: subTitle &&
|
|
49
|
+
_jsx("p", { "data-component": "article-item-subtitle", className: cn("text-m", "@4xl:text-xl", "text-gray-600", "text-(--subTitle-color)", subTitleAlign && alignMap[subTitleAlign]), children: subTitle }) }), _jsxs("div", { className: cn("space-y-2", "w-full", "@4xl:col-span-3", isReverse && "@4xl:order-1"), children: [paragraph &&
|
|
50
|
+
_jsx("p", { "data-component": "article-item-paragraph", className: cn("text-sm", "text-gray-700", "text-(--paragraph-color)", paragraphAlign && alignMap[paragraphAlign]), children: paragraph }), buttonData && _jsx(RenderBtn, { buttonData: buttonData, buttonAlign: buttonAlign })] })] }) }));
|
|
51
|
+
};
|
|
52
|
+
Type4Block.displayName = "Type4Block";
|
|
53
|
+
export default Type4Block;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ButtonItem } from "./commonComponents";
|
|
2
|
+
type ContentData = {
|
|
3
|
+
title?: string;
|
|
4
|
+
subTitle?: string;
|
|
5
|
+
paragraph?: string;
|
|
6
|
+
titleAlign?: "left" | "center" | "right";
|
|
7
|
+
subTitleAlign?: "left" | "center" | "right";
|
|
8
|
+
paragraphAlign?: "left" | "center" | "right";
|
|
9
|
+
buttonAlign?: "left" | "center" | "right";
|
|
10
|
+
buttonData?: ButtonItem[];
|
|
11
|
+
titleTag?: any;
|
|
12
|
+
titleColor?: string;
|
|
13
|
+
subTitleColor?: string;
|
|
14
|
+
paragraphColor?: string;
|
|
15
|
+
direction?: 'left' | 'right';
|
|
16
|
+
};
|
|
17
|
+
type ContentBlockData = {
|
|
18
|
+
option?: {
|
|
19
|
+
rwdReverse?: 'normal' | 'reverse';
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare const Type5Block: React.FC<ContentBlockData>;
|
|
23
|
+
export declare const RenderText: React.FC<ContentData>;
|
|
24
|
+
export default Type5Block;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../shadcns/index.js";
|
|
3
|
+
import { RenderImage, RenderBtn } from "./commonComponents";
|
|
4
|
+
export const Type5Block = (props) => {
|
|
5
|
+
const { option } = props;
|
|
6
|
+
const { rwdReverse = "normal", } = option || {};
|
|
7
|
+
const isRWDReverse = rwdReverse === 'reverse';
|
|
8
|
+
return (_jsx(_Fragment, { children: _jsx("div", { "data-component": "Type5Block", className: cn("@container", "w-full", "max-w-full"), children: _jsxs("div", { "data-component": "article-item-inner", className: cn("w-9/10", "max-w-[1200px]", "mx-auto",
|
|
9
|
+
// "space-y-5",
|
|
10
|
+
"grid", "grid-rows-[auto_auto]", "gap-5"), children: [_jsx("div", { className: cn("w-full", "@4xl:order-1", isRWDReverse && "order-2"), children: _jsx(RenderImage, {}) }), _jsx("div", { className: cn("w-full", "@4xl:order-2", isRWDReverse && "order-1"), children: _jsx(RenderText, {}) })] }) }) }));
|
|
11
|
+
};
|
|
12
|
+
export const RenderText = (props) => {
|
|
13
|
+
const { title = '標題', subTitle = '副標題', paragraph = '內文', titleAlign = "left", subTitleAlign = "left", paragraphAlign = "left", buttonAlign = "left", buttonData = [
|
|
14
|
+
{
|
|
15
|
+
buttonText: '按鈕',
|
|
16
|
+
buttonLink: 'javascript:;',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
buttonText: '按鈕',
|
|
20
|
+
buttonLink: 'javascript:;',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
buttonText: '按鈕',
|
|
24
|
+
buttonLink: 'javascript:;',
|
|
25
|
+
},
|
|
26
|
+
], titleTag: TitleComponent = "h2", titleColor, subTitleColor, paragraphColor, direction = "left", } = props;
|
|
27
|
+
const isReverse = direction === 'right';
|
|
28
|
+
const alignMap = {
|
|
29
|
+
left: "text-left",
|
|
30
|
+
center: "text-center",
|
|
31
|
+
right: "text-right",
|
|
32
|
+
};
|
|
33
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { "data-component": "article-text-content", className: cn("w-full", "gap-x-6", "gap-y-5", "grid", "grid-cols-1", "@4xl:grid-cols-4"), style: {
|
|
34
|
+
"--title-color": titleColor,
|
|
35
|
+
"--subTitle-color": subTitleColor,
|
|
36
|
+
"--paragraph-color": paragraphColor,
|
|
37
|
+
}, children: [_jsx("div", { className: cn("w-full", "@4xl:col-span-1", isReverse && "@4xl:order-2"), children: title &&
|
|
38
|
+
_jsx(TitleComponent, { "data-component": "article-item-title", className: cn("text-xl", "font-bold", "@4xl:text-3xl", "text-(--title-color)", titleAlign && alignMap[titleAlign]), children: title }) }), _jsxs("div", { className: cn("w-full", "@4xl:col-span-3", isReverse && "@4xl:order-1"), children: [_jsxs("div", { className: cn("space-y-5"), children: [subTitle &&
|
|
39
|
+
_jsx("p", { "data-component": "article-item-subtitle", className: cn("text-m", "@4xl:text-xl", "text-gray-600", "text-(--subTitle-color)", subTitleAlign && alignMap[subTitleAlign]), children: subTitle }), paragraph &&
|
|
40
|
+
_jsx("p", { "data-component": "article-item-paragraph", className: cn("text-sm", "text-gray-700", "text-(--paragraph-color)", paragraphAlign && alignMap[paragraphAlign]), children: paragraph })] }), buttonData && _jsx(RenderBtn, { buttonData: buttonData, buttonAlign: buttonAlign })] })] }) }));
|
|
41
|
+
};
|
|
42
|
+
Type5Block.displayName = "Type5Block";
|
|
43
|
+
export default Type5Block;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ButtonItem } from "./commonComponents";
|
|
2
|
+
type ContentData = {
|
|
3
|
+
title?: string;
|
|
4
|
+
subTitle?: string;
|
|
5
|
+
paragraph?: string;
|
|
6
|
+
titleAlign?: "left" | "center" | "right";
|
|
7
|
+
subTitleAlign?: "left" | "center" | "right";
|
|
8
|
+
paragraphAlign?: "left" | "center" | "right";
|
|
9
|
+
buttonAlign?: "left" | "center" | "right";
|
|
10
|
+
buttonData?: ButtonItem[];
|
|
11
|
+
titleTag?: any;
|
|
12
|
+
titleColor?: string;
|
|
13
|
+
subTitleColor?: string;
|
|
14
|
+
paragraphColor?: string;
|
|
15
|
+
direction?: 'left' | 'right';
|
|
16
|
+
};
|
|
17
|
+
type ContentBlockData = {
|
|
18
|
+
option?: {
|
|
19
|
+
rwdReverse?: 'normal' | 'reverse';
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare const Type6Block: React.FC<ContentBlockData>;
|
|
23
|
+
export declare const RenderText: React.FC<ContentData>;
|
|
24
|
+
export default Type6Block;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../shadcns/index.js";
|
|
3
|
+
import { RenderImage, RenderBtn } from "./commonComponents";
|
|
4
|
+
export const Type6Block = (props) => {
|
|
5
|
+
const { option } = props;
|
|
6
|
+
const { rwdReverse = "normal", } = option || {};
|
|
7
|
+
const isRWDReverse = rwdReverse === 'reverse';
|
|
8
|
+
return (_jsx(_Fragment, { children: _jsx("div", { "data-component": "Type6Block", className: cn("@container", "w-full", "max-w-full"), children: _jsxs("div", { "data-component": "article-item-inner", className: cn("w-9/10", "max-w-[1200px]", "mx-auto",
|
|
9
|
+
// "space-y-5",
|
|
10
|
+
"grid", "grid-rows-[auto_auto]", "gap-5"), children: [_jsx("div", { className: cn("w-full", "@4xl:order-1", isRWDReverse && "order-2"), children: _jsx(RenderText, {}) }), _jsx("div", { className: cn("w-full", "@4xl:order-2", isRWDReverse && "order-1"), children: _jsx(RenderImage, {}) })] }) }) }));
|
|
11
|
+
};
|
|
12
|
+
export const RenderText = (props) => {
|
|
13
|
+
const { title = '標題', subTitle = '副標題', paragraph = '內文', titleAlign = "left", subTitleAlign = "left", paragraphAlign = "left", buttonAlign = "left", buttonData = [
|
|
14
|
+
{
|
|
15
|
+
buttonText: '按鈕',
|
|
16
|
+
buttonLink: 'javascript:;',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
buttonText: '按鈕',
|
|
20
|
+
buttonLink: 'javascript:;',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
buttonText: '按鈕',
|
|
24
|
+
buttonLink: 'javascript:;',
|
|
25
|
+
},
|
|
26
|
+
], titleTag: TitleComponent = "h2", titleColor, subTitleColor, paragraphColor, direction = "left", } = props;
|
|
27
|
+
const isReverse = direction === 'right';
|
|
28
|
+
const alignMap = {
|
|
29
|
+
left: "text-left",
|
|
30
|
+
center: "text-center",
|
|
31
|
+
right: "text-right",
|
|
32
|
+
};
|
|
33
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { "data-component": "article-text-content", className: cn("w-full", "gap-x-6", "gap-y-5", "grid", "grid-cols-1", "@4xl:grid-cols-4"), style: {
|
|
34
|
+
"--title-color": titleColor,
|
|
35
|
+
"--subTitle-color": subTitleColor,
|
|
36
|
+
"--paragraph-color": paragraphColor,
|
|
37
|
+
}, children: [_jsx("div", { className: cn("w-full", "@4xl:col-span-1", isReverse && "@4xl:order-2"), children: title &&
|
|
38
|
+
_jsx(TitleComponent, { "data-component": "article-text-title", className: cn("text-xl", "font-bold", "@4xl:text-3xl", "text-(--title-color)", titleAlign && alignMap[titleAlign]), children: title }) }), _jsxs("div", { className: cn("w-full", "@4xl:col-span-3", isReverse && "@4xl:order-1"), children: [_jsxs("div", { className: cn("space-y-5"), children: [subTitle &&
|
|
39
|
+
_jsx("p", { "data-component": "article-text-subtitle", className: cn("text-m", "@4xl:text-xl", "text-gray-600", "text-(--subTitle-color)", subTitleAlign && alignMap[subTitleAlign]), children: subTitle }), paragraph &&
|
|
40
|
+
_jsx("p", { "data-component": "article-text-paragraph", className: cn("text-sm", "text-gray-700", "text-(--paragraph-color)", paragraphAlign && alignMap[paragraphAlign]), children: paragraph })] }), buttonData && _jsx(RenderBtn, { buttonData: buttonData, buttonAlign: buttonAlign })] })] }) }));
|
|
41
|
+
};
|
|
42
|
+
Type6Block.displayName = "Type6Block";
|
|
43
|
+
export default Type6Block;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type ContentBlockData = {
|
|
2
|
+
quote?: string;
|
|
3
|
+
paragraph?: string;
|
|
4
|
+
option?: {
|
|
5
|
+
quoteAlign?: 'left' | 'center' | 'right';
|
|
6
|
+
paragraphAlign?: 'left' | 'center' | 'right';
|
|
7
|
+
quoteColor?: string;
|
|
8
|
+
paragraphColor?: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const Type7Block: React.FC<ContentBlockData>;
|
|
12
|
+
export default Type7Block;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../shadcns/index.js";
|
|
3
|
+
export const Type7Block = (props) => {
|
|
4
|
+
const { quote = '引言', paragraph = '內文', option } = props;
|
|
5
|
+
const { quoteColor, paragraphColor, quoteAlign = 'left', paragraphAlign = 'left', } = option || {};
|
|
6
|
+
const alignMap = {
|
|
7
|
+
left: "text-left",
|
|
8
|
+
center: "text-center",
|
|
9
|
+
right: "text-right",
|
|
10
|
+
};
|
|
11
|
+
return (_jsx(_Fragment, { children: _jsx("div", { "data-component": "Type7Block", className: cn("@container", "w-full", "max-w-full"), children: _jsxs("div", { "data-component": "article-item-inner", className: cn("w-9/10", "max-w-[1200px]", "mx-auto", "space-y-5"), style: {
|
|
12
|
+
"--quote-color": quoteColor,
|
|
13
|
+
"--paragraph-color": paragraphColor,
|
|
14
|
+
}, children: [quote &&
|
|
15
|
+
_jsx("q", { className: cn('block', "text-xl", "@md:text-3xl", "font-semibold", "tracking-[0.8px]", "text-(--quote-color)", quoteAlign && alignMap[quoteAlign]), children: quote }), paragraph &&
|
|
16
|
+
_jsx("p", { className: cn("text-sm", "text-gray-700", "text-(--paragraph-color)", paragraphAlign && alignMap[paragraphAlign]), children: paragraph })] }) }) }));
|
|
17
|
+
};
|
|
18
|
+
Type7Block.displayName = "Type7Block";
|
|
19
|
+
export default Type7Block;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type ContentBlockData = {
|
|
2
|
+
className?: string;
|
|
3
|
+
option?: {
|
|
4
|
+
direction?: 'top' | 'bottom';
|
|
5
|
+
rwdReverse?: 'normal' | 'reverse';
|
|
6
|
+
isSlice?: boolean;
|
|
7
|
+
fullBGColor?: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const Type8Block: React.FC<ContentBlockData>;
|
|
11
|
+
export default Type8Block;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../shadcns/index.js";
|
|
3
|
+
import { RenderImage, RenderText } from "./commonComponents";
|
|
4
|
+
export const Type8Block = (props) => {
|
|
5
|
+
const { option } = props;
|
|
6
|
+
const { direction = "top", rwdReverse = "normal", isSlice = false, fullBGColor } = option || {};
|
|
7
|
+
const isReverse = direction === 'bottom';
|
|
8
|
+
const isRWDReverse = rwdReverse === 'reverse';
|
|
9
|
+
return (_jsx(_Fragment, { children: _jsx("div", { "data-component": "Type8Block", className: cn("@container", "w-full", "max-w-full", "py-15", "bg-(--fullBG-color)", isSlice && "mb-0"), style: {
|
|
10
|
+
"--fullBG-color": fullBGColor,
|
|
11
|
+
}, children: _jsx("div", { "data-component": "article-item-inner", className: cn("w-9/10", "max-w-[1200px]", "mx-auto"), children: _jsxs("div", { className: cn("grid", "grid-rows-[auto_auto]", "gap-5"), children: [_jsx("div", { className: cn("w-full", isReverse ? "@4xl:order-2" : "@4xl:order-1", (isReverse !== isRWDReverse) && "order-2"), children: _jsx(RenderImage, {}) }), _jsx("div", { className: cn("w-full", isReverse ? "@4xl:order-1" : "@4xl:order-2", (isReverse !== isRWDReverse) && "order-1"), children: _jsx(RenderText, {}) })] }) }) }) }));
|
|
12
|
+
};
|
|
13
|
+
Type8Block.displayName = "Type8Block";
|
|
14
|
+
export default Type8Block;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type ContentBlockData = {
|
|
2
|
+
option?: {
|
|
3
|
+
direction?: 'right' | 'left';
|
|
4
|
+
rwdReverse?: 'normal' | 'reverse';
|
|
5
|
+
wordAlign?: 'start' | 'center' | 'end';
|
|
6
|
+
isSlice?: boolean;
|
|
7
|
+
fullBGColor?: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const Type9Block: React.FC<ContentBlockData>;
|
|
11
|
+
export default Type9Block;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../shadcns/index.js";
|
|
3
|
+
import { RenderImage, RenderText } from "./commonComponents";
|
|
4
|
+
export const Type9Block = (props) => {
|
|
5
|
+
const { option } = props;
|
|
6
|
+
const { direction = "left", rwdReverse = "normal", wordAlign = "start", isSlice = false, fullBGColor } = option || {};
|
|
7
|
+
const isReverse = direction === "right";
|
|
8
|
+
const isRWDReverse = rwdReverse === "reverse";
|
|
9
|
+
const alignMap = {
|
|
10
|
+
start: "items-start",
|
|
11
|
+
center: "items-center",
|
|
12
|
+
end: "items-end",
|
|
13
|
+
};
|
|
14
|
+
return (_jsx(_Fragment, { children: _jsx("div", { "data-component": "Type9Block", className: cn("@container", "w-full", "max-w-full", "py-15", "bg-(--fullBG-color)", isSlice && "mb-0"), style: {
|
|
15
|
+
"--fullBG-color": fullBGColor,
|
|
16
|
+
}, children: _jsx("div", { "data-component": "article-item-inner", className: cn("w-9/10", "max-w-[1200px]", "mx-auto"), children: _jsxs("div", { className: cn("grid", "grid-cols-1", "@4xl:grid-cols-2", "gap-x-[50px]", "gap-y-5", wordAlign && alignMap[wordAlign]), children: [_jsx("div", { className: cn("w-full", isReverse ? "@4xl:order-2" : "@4xl:order-1", (isReverse !== isRWDReverse) && "order-2"), children: _jsx(RenderImage, {}) }), _jsx("div", { className: cn("w-full", isReverse ? "@4xl:order-1" : "@4xl:order-2", (isReverse !== isRWDReverse) && "order-1"), children: _jsx(RenderText, {}) })] }) }) }) }));
|
|
17
|
+
};
|
|
18
|
+
Type9Block.displayName = "Type9Block";
|
|
19
|
+
export default Type9Block;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PuckComponent, ComponentConfig, Slot } from "@puckeditor/core";
|
|
2
|
+
export interface Props {
|
|
3
|
+
textAlign?: "left" | "right";
|
|
4
|
+
textAlign2?: "top";
|
|
5
|
+
backgroundImage?: string;
|
|
6
|
+
blockview?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
slotTextBlock?: Slot;
|
|
9
|
+
slotMediaBlock?: Slot;
|
|
10
|
+
}
|
|
11
|
+
export declare const BaseBlock: PuckComponent<Props>;
|
|
12
|
+
export declare const BaseBlockConfigs: ComponentConfig;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MediaContentConfigs } from "./media-content";
|
|
3
|
+
import { TextContentConfigs } from "./text-content";
|
|
4
|
+
import { BuilderBlocksComponent } from "../content-builder-blocks";
|
|
5
|
+
import { cn } from "../../../shadcns/index.js";
|
|
6
|
+
export const BaseBlock = ({ textAlign = "left", textAlign2 = "top", slotTextBlock: SlotTextBlock, slotMediaBlock: SlotMediaBlock, className, puck, ...props }) => {
|
|
7
|
+
return (_jsx(BuilderBlocksComponent, { name: "BaseBlock", puck: puck, children: _jsxs("div", { "data-component": "base-block", className: cn("grid items-center justify-center overflow-hidden", "grid-cols-[1fr_1fr]",
|
|
8
|
+
// "p-10",
|
|
9
|
+
className), ...props, children: [textAlign == "left" && _jsxs(_Fragment, { children: [SlotTextBlock && _jsx("div", { children: _jsx(SlotTextBlock, {}) }), SlotMediaBlock && _jsx("div", { children: _jsx(SlotMediaBlock, {}) })] }), textAlign == "right" && _jsxs(_Fragment, { children: [SlotMediaBlock && _jsx("div", { children: _jsx(SlotMediaBlock, {}) }), SlotTextBlock && _jsx("div", { children: _jsx(SlotTextBlock, {}) })] })] }) }));
|
|
10
|
+
};
|
|
11
|
+
export const BaseBlockConfigs = {
|
|
12
|
+
label: "Base Block",
|
|
13
|
+
permissions: {
|
|
14
|
+
// delete: false,
|
|
15
|
+
// drag: false,
|
|
16
|
+
// insert: false
|
|
17
|
+
},
|
|
18
|
+
fields: {
|
|
19
|
+
textAlign: {
|
|
20
|
+
label: "Content Position",
|
|
21
|
+
type: "radio",
|
|
22
|
+
options: [
|
|
23
|
+
{ label: "Left", value: "left" },
|
|
24
|
+
{ label: "Right", value: "right" },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
textAlign2: {
|
|
28
|
+
label: "Content Vertical",
|
|
29
|
+
type: "radio",
|
|
30
|
+
options: [
|
|
31
|
+
{ label: "Top", value: "top" },
|
|
32
|
+
{ label: "Middle", value: "middle" },
|
|
33
|
+
{ label: "Bottom", value: "bottom" },
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
backgroundImage: {
|
|
37
|
+
label: "Background Setting",
|
|
38
|
+
type: "object",
|
|
39
|
+
objectFields: {
|
|
40
|
+
isImage: {
|
|
41
|
+
label: "Use Image",
|
|
42
|
+
type: "radio",
|
|
43
|
+
options: [
|
|
44
|
+
{ label: "Yes", value: "yes" },
|
|
45
|
+
{ label: "No", value: "no" },
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
imageAddress: {
|
|
49
|
+
label: "Image Address",
|
|
50
|
+
type: "text"
|
|
51
|
+
},
|
|
52
|
+
color: {
|
|
53
|
+
label: "Color",
|
|
54
|
+
type: "text"
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
slotTextBlock: { type: "slot", allow: ["TextContent"] },
|
|
59
|
+
slotMediaBlock: { type: "slot", allow: ["MediaContent"] },
|
|
60
|
+
},
|
|
61
|
+
// resolvePermissions: async (data, {permissions}) => {
|
|
62
|
+
// console.log("BaseBlock resolvePermissions", data.props);
|
|
63
|
+
// // if (data.props?.lockDelete) {
|
|
64
|
+
// // return {
|
|
65
|
+
// // ...permissions,
|
|
66
|
+
// // delete: false,
|
|
67
|
+
// // // 建議順便鎖,避免用拖拉/複製繞過「必須至少一個」
|
|
68
|
+
// // drag: false,
|
|
69
|
+
// // duplicate: false,
|
|
70
|
+
// // };
|
|
71
|
+
// // }
|
|
72
|
+
// return permissions;
|
|
73
|
+
// },
|
|
74
|
+
defaultProps: {
|
|
75
|
+
textAlign: "left",
|
|
76
|
+
textAlign2: "top",
|
|
77
|
+
backgroundImage: "no",
|
|
78
|
+
slotTextBlock: [{
|
|
79
|
+
type: "TextContent",
|
|
80
|
+
props: { ...TextContentConfigs.defaultProps, requiredInSlot: true, }
|
|
81
|
+
}],
|
|
82
|
+
slotMediaBlock: [{
|
|
83
|
+
type: "MediaContent",
|
|
84
|
+
props: { ...MediaContentConfigs.defaultProps }
|
|
85
|
+
}],
|
|
86
|
+
configs: {
|
|
87
|
+
className: ""
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
render: BaseBlock
|
|
91
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentConfig, PuckComponent } from "@puckeditor/core";
|
|
2
|
+
export interface Button {
|
|
3
|
+
label?: string;
|
|
4
|
+
link?: string;
|
|
5
|
+
linkBlank?: boolean;
|
|
6
|
+
labelColor?: string;
|
|
7
|
+
bgColor?: string;
|
|
8
|
+
borderColor?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TextContentProps {
|
|
11
|
+
title?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
subTitle?: string;
|
|
14
|
+
buttons?: Button[];
|
|
15
|
+
imgs?: string;
|
|
16
|
+
options?: any;
|
|
17
|
+
titleOptions?: any;
|
|
18
|
+
}
|
|
19
|
+
export declare const HeaderBlock: PuckComponent<any>;
|
|
20
|
+
export declare const HeaderBlockConfigs: ComponentConfig;
|