@janbox/storefront-builder 2.0.9 → 2.0.11
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/README.md +59 -4
- package/dist/{dataset-DQ21hyBo.js → countdown-timer.node-d0EtGQ4_.js} +2592 -3029
- package/dist/editor/components/color-picker-popover.d.ts +2 -1
- package/dist/editor/constants/index.d.ts +2 -3
- package/dist/editor/hooks/use-editor.d.ts +1 -0
- package/dist/editor/lib/sidebar/theme-action.d.ts +1 -0
- package/dist/editor/toolbars/color-variant/color-variant.d.ts +2 -2
- package/dist/editor/toolbars/index.d.ts +1 -1
- package/dist/editor/toolbars/visibility/index.d.ts +1 -0
- package/dist/editor/toolbars/visibility/visibility.d.ts +1 -0
- package/dist/editor.js +9888 -1241
- package/dist/hooks/use-first-mount-state.d.ts +1 -0
- package/dist/hooks/use-node-props.d.ts +0 -1
- package/dist/hooks/use-update-effect.d.ts +2 -0
- package/dist/index-fErSlbD2.js +206 -0
- package/dist/index-tISPdvwn.js +4 -0
- package/dist/index.js +92 -212
- package/dist/lib/accordion-group/index.d.ts +0 -1
- package/dist/lib/box/README.md +3 -10
- package/dist/lib/box/index.d.ts +0 -1
- package/dist/lib/button/README.md +2 -2
- package/dist/lib/button/index.d.ts +0 -1
- package/dist/lib/cell/index.d.ts +0 -1
- package/dist/lib/container/README.md +86 -0
- package/dist/lib/container/index.d.ts +0 -1
- package/dist/lib/countdown-timer/index.d.ts +0 -1
- package/dist/lib/flex-item/README.md +1 -0
- package/dist/lib/flex-item/index.d.ts +0 -1
- package/dist/lib/flexbox/README.md +0 -6
- package/dist/lib/flexbox/index.d.ts +0 -1
- package/dist/lib/grid/README.md +5 -4
- package/dist/lib/grid/index.d.ts +0 -1
- package/dist/lib/heading/README.md +38 -8
- package/dist/lib/heading/index.d.ts +0 -2
- package/dist/lib/icon/index.d.ts +0 -1
- package/dist/lib/image/index.d.ts +0 -1
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/link/index.d.ts +0 -1
- package/dist/lib/marquee/index.d.ts +0 -1
- package/dist/lib/paragraph/README.md +9 -5
- package/dist/lib/paragraph/index.d.ts +0 -2
- package/dist/lib/paragraph/paragraph.node/types.d.ts +2 -2
- package/dist/lib/swiper/index.d.ts +0 -1
- package/dist/lib/tabs/index.d.ts +0 -1
- package/dist/lib/unordered-list/index.d.ts +0 -1
- package/dist/lib/video/index.d.ts +0 -1
- package/dist/minus-BrRnjbhB.js +4 -0
- package/dist/templates.js +17 -33
- package/dist/{tooltip-Bi1eNiUc.js → tooltip-5WmNiI2z.js} +1 -1
- package/dist/types/index.d.ts +2 -3
- package/package.json +2 -3
- package/dist/countdown-timer.inspector-EFXiJ973.js +0 -8192
- package/dist/editor/toolbars/display-on/display-on.d.ts +0 -5
- package/dist/editor/toolbars/display-on/index.d.ts +0 -1
- package/dist/index-Cx5nImHp.js +0 -4
- package/dist/lib/paragraph/paragraph/paragraph.d.ts +0 -2
- package/dist/lib/paragraph/paragraph/types.d.ts +0 -2
- package/dist/lib/text/README.md +0 -90
- package/dist/lib/text/index.d.ts +0 -1
- package/dist/lib/text/text.inspector/index.d.ts +0 -1
- package/dist/lib/text/text.inspector/text.inspector.d.ts +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useFirstMountState(): boolean;
|
|
@@ -8,7 +8,6 @@ export declare const useNodeProps: <P extends object = object, K = P extends ToR
|
|
|
8
8
|
transform?: (current: P) => P;
|
|
9
9
|
nodeId?: string;
|
|
10
10
|
}) => {
|
|
11
|
-
id: string;
|
|
12
11
|
nodeProps: P;
|
|
13
12
|
setNodeProps: (next: DeepPartial<P> | ((prev: P) => void), setPropOptions?: SetPropOptions) => void;
|
|
14
13
|
setNodeResponsiveProps: (props: DeepPartial<K>, screen: Screen, options?: SetPropOptions) => void;
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { useNode as b, Element as T, Frame as h, Editor as I, DefaultEventHandlers as v } from "@craftjs/core";
|
|
2
|
+
import { isFunction as x, merge as A, set as w, isNil as C, isString as f } from "lodash-es";
|
|
3
|
+
import { useMemo as S, useEffect as E } from "react";
|
|
4
|
+
import { N as l, W as e, g as L, A as y, c as k, b as B, a as F, p as M, T as q, o as G, n as R, q as U, M as H, l as D, m as j, S as O, k as V, r as _, L as $, I as z, V as J, j as W, f as X, B as Y, F as K, h as Q, e as Z, G as ee, i as oe, P as re, d as se, U as ne, R as te, u as ae, y as de, X as ie, Y as g } from "./countdown-timer.node-d0EtGQ4_.js";
|
|
5
|
+
import { getGridProps as ue, getCellProps as ce, getLinkProps as pe, getButtonProps as le, getFlexboxProps as me, getFlexItemProps as Ne, getImageProps as Pe, getMarqueeProps as fe, getTabsProps as ge, getSwiperProps as be, getUnorderedListProps as Ce, getIconProps as Te, getAccordionProps as he, getAccordionGroupProps as Ie, getVideoProps as ve, getBoxProps as xe, getContainerProps as Ae, Primitive as we } from "@janbox/storefront-ui";
|
|
6
|
+
import { flatten as Se } from "flat";
|
|
7
|
+
import { jsx as m } from "@emotion/react/jsx-runtime";
|
|
8
|
+
const o = (n = {}) => {
|
|
9
|
+
const { id: r } = b(), s = n?.nodeId ?? r, { nodeProps: a, actions: i } = l((d) => ({
|
|
10
|
+
nodeProps: d.nodes[s ?? r]?.data.props ?? {}
|
|
11
|
+
})), t = (d, c) => x(d) ? i.setProp(s, d) : i.setProp(s, (p) => {
|
|
12
|
+
if (c?.merge) {
|
|
13
|
+
A(p, d);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const N = Se(d);
|
|
17
|
+
Object.keys(N).forEach((P) => {
|
|
18
|
+
w(p, P, N[P]);
|
|
19
|
+
});
|
|
20
|
+
}), u = (d, c, p) => t(
|
|
21
|
+
c === "xs" ? d : {
|
|
22
|
+
[c]: d
|
|
23
|
+
},
|
|
24
|
+
p
|
|
25
|
+
);
|
|
26
|
+
return {
|
|
27
|
+
nodeProps: n?.transform?.(a) ?? a,
|
|
28
|
+
setNodeProps: t,
|
|
29
|
+
setNodeResponsiveProps: u
|
|
30
|
+
};
|
|
31
|
+
}, Ue = () => o({
|
|
32
|
+
transform: ue
|
|
33
|
+
}), He = () => o({
|
|
34
|
+
transform: ce
|
|
35
|
+
}), De = () => o({
|
|
36
|
+
transform: pe
|
|
37
|
+
}), je = () => o({
|
|
38
|
+
transform: le
|
|
39
|
+
}), Oe = () => o({
|
|
40
|
+
transform: me
|
|
41
|
+
}), Ve = () => o({
|
|
42
|
+
transform: Ne
|
|
43
|
+
}), _e = () => o({
|
|
44
|
+
transform: Pe
|
|
45
|
+
}), $e = () => o({
|
|
46
|
+
transform: fe
|
|
47
|
+
}), ze = (n) => o({
|
|
48
|
+
transform: ge,
|
|
49
|
+
nodeId: n
|
|
50
|
+
}), Je = (n) => o({
|
|
51
|
+
nodeId: n
|
|
52
|
+
}), We = () => o({
|
|
53
|
+
transform: be
|
|
54
|
+
}), Xe = () => o({
|
|
55
|
+
transform: Ce
|
|
56
|
+
}), Ye = () => o({
|
|
57
|
+
transform: Te
|
|
58
|
+
}), Ke = (n) => o({
|
|
59
|
+
transform: he,
|
|
60
|
+
nodeId: n
|
|
61
|
+
}), Qe = () => o({
|
|
62
|
+
transform: Ie
|
|
63
|
+
}), Ze = () => o({
|
|
64
|
+
transform: ve
|
|
65
|
+
}), eo = () => o({
|
|
66
|
+
transform: xe
|
|
67
|
+
}), oo = () => o({
|
|
68
|
+
transform: Ae
|
|
69
|
+
}), ro = () => o(), so = T, no = ({ children: n, data: r }) => {
|
|
70
|
+
const { resolver: s } = l((i) => ({
|
|
71
|
+
resolver: i.options.resolver
|
|
72
|
+
})), a = S(() => {
|
|
73
|
+
if (C(r)) return r;
|
|
74
|
+
const i = f(r) ? JSON.parse(r) : r;
|
|
75
|
+
return Object.entries(i).forEach(([, t]) => {
|
|
76
|
+
const u = f(t.type) ? t.type : t.type.resolvedName;
|
|
77
|
+
s[u] || (console.error(`Unknown node: ${u}`), t.type = {
|
|
78
|
+
resolvedName: e.Unknown
|
|
79
|
+
});
|
|
80
|
+
}), i;
|
|
81
|
+
}, [r, s]);
|
|
82
|
+
return /* @__PURE__ */ m(h, { data: a, children: n });
|
|
83
|
+
}, Ee = {
|
|
84
|
+
// Root
|
|
85
|
+
[e.Root]: te,
|
|
86
|
+
// Unknown
|
|
87
|
+
[e.Unknown]: ne,
|
|
88
|
+
// Button
|
|
89
|
+
[e.Button]: se,
|
|
90
|
+
// Text
|
|
91
|
+
[e.Paragraph]: re,
|
|
92
|
+
[e.Heading]: oe,
|
|
93
|
+
// Layout
|
|
94
|
+
[e.Grid]: ee,
|
|
95
|
+
[e.Cell]: Z,
|
|
96
|
+
[e.Flexbox]: Q,
|
|
97
|
+
[e.FlexItem]: K,
|
|
98
|
+
[e.Box]: Y,
|
|
99
|
+
[e.Container]: X,
|
|
100
|
+
// Media
|
|
101
|
+
[e.Image]: W,
|
|
102
|
+
[e.Video]: J,
|
|
103
|
+
[e.Icon]: z,
|
|
104
|
+
// Navigation
|
|
105
|
+
[e.Link]: $,
|
|
106
|
+
// List
|
|
107
|
+
[e.UnorderedList]: _,
|
|
108
|
+
[e.ListItem]: V,
|
|
109
|
+
// Carousel
|
|
110
|
+
[e.Swiper]: O,
|
|
111
|
+
[e.SwiperSlide]: j,
|
|
112
|
+
[e.Marquee]: D,
|
|
113
|
+
[e.MarqueeItem]: H,
|
|
114
|
+
// Tabs
|
|
115
|
+
[e.Tabs]: U,
|
|
116
|
+
[e.TabList]: R,
|
|
117
|
+
[e.Tab]: G,
|
|
118
|
+
[e.TabContent]: q,
|
|
119
|
+
[e.TabPanel]: M,
|
|
120
|
+
// Accordion
|
|
121
|
+
[e.AccordionGroup]: F,
|
|
122
|
+
[e.Accordion]: B,
|
|
123
|
+
[e.AccordionSummary]: k,
|
|
124
|
+
[e.AccordionContent]: y,
|
|
125
|
+
// Timer
|
|
126
|
+
[e.CountdownTimer]: L
|
|
127
|
+
}, to = ({ resolver: n, children: r, ...s }) => /* @__PURE__ */ m(
|
|
128
|
+
I,
|
|
129
|
+
{
|
|
130
|
+
enabled: !1,
|
|
131
|
+
onRender: Le,
|
|
132
|
+
handlers: (a) => new ye({
|
|
133
|
+
store: a,
|
|
134
|
+
removeHoverOnMouseleave: !0,
|
|
135
|
+
isMultiSelectEnabled: () => !1
|
|
136
|
+
}),
|
|
137
|
+
resolver: { ...Ee, ...n },
|
|
138
|
+
...s,
|
|
139
|
+
children: r
|
|
140
|
+
}
|
|
141
|
+
), Le = ({ render: n }) => {
|
|
142
|
+
const { id: r, hidden: s } = b((t) => ({
|
|
143
|
+
hidden: ae(t).hidden ?? {}
|
|
144
|
+
})), { query: a } = l();
|
|
145
|
+
return E(() => {
|
|
146
|
+
const t = a.node(r).get(), u = de(t);
|
|
147
|
+
if (C(u))
|
|
148
|
+
throw new Error(
|
|
149
|
+
`The node with id "${t.data.displayName}" does not have a resolved ID. Please check your node configuration.`
|
|
150
|
+
);
|
|
151
|
+
}, [r, a]), Object.values(s).some((t) => t === !0) ? /* @__PURE__ */ m(
|
|
152
|
+
we,
|
|
153
|
+
{
|
|
154
|
+
sx: {
|
|
155
|
+
display: s.xs ? "none" : "contents",
|
|
156
|
+
sm: {
|
|
157
|
+
display: s.sm ? "none" : "contents"
|
|
158
|
+
},
|
|
159
|
+
md: {
|
|
160
|
+
display: s.md ? "none" : "contents"
|
|
161
|
+
},
|
|
162
|
+
lg: {
|
|
163
|
+
display: s.lg ? "none" : "contents"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
children: n
|
|
167
|
+
}
|
|
168
|
+
) : n;
|
|
169
|
+
};
|
|
170
|
+
class ye extends v {
|
|
171
|
+
handlers() {
|
|
172
|
+
const r = super.handlers();
|
|
173
|
+
return {
|
|
174
|
+
...r,
|
|
175
|
+
select(s, a) {
|
|
176
|
+
return (s.getAttribute(ie.DATA_NODE_SELECTABLE) ?? g.True) === g.True ? r.select(s, a) : () => {
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
export {
|
|
183
|
+
no as C,
|
|
184
|
+
so as N,
|
|
185
|
+
to as a,
|
|
186
|
+
Qe as b,
|
|
187
|
+
Ke as c,
|
|
188
|
+
eo as d,
|
|
189
|
+
je as e,
|
|
190
|
+
He as f,
|
|
191
|
+
oo as g,
|
|
192
|
+
ro as h,
|
|
193
|
+
Ve as i,
|
|
194
|
+
Oe as j,
|
|
195
|
+
Ue as k,
|
|
196
|
+
Ye as l,
|
|
197
|
+
_e as m,
|
|
198
|
+
De as n,
|
|
199
|
+
$e as o,
|
|
200
|
+
We as p,
|
|
201
|
+
Je as q,
|
|
202
|
+
ze as r,
|
|
203
|
+
Xe as s,
|
|
204
|
+
Ze as t,
|
|
205
|
+
o as u
|
|
206
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,215 +1,95 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useNode as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import "overlayscrollbars-react";
|
|
20
|
-
import "@tanstack/react-virtual";
|
|
21
|
-
import "react-dropzone";
|
|
22
|
-
import "react-datepicker";
|
|
23
|
-
import "react-frame-component";
|
|
24
|
-
import { getTextProps as M, getListItemProps as F, getTabPanelProps as w } from "@janbox/storefront-ui";
|
|
25
|
-
const E = () => i(), se = () => {
|
|
26
|
-
const p = f(), { connectors: c } = L(), u = a(null), {
|
|
27
|
-
id: N,
|
|
28
|
-
nodeProps: { dangerouslySetInnerHTML: t, ...m },
|
|
29
|
-
setNodeProps: l
|
|
30
|
-
} = E(), o = a(t?.__html), { isActive: r } = T((e, g) => ({
|
|
31
|
-
isActive: g.getEvent("selected").contains(N)
|
|
32
|
-
}));
|
|
33
|
-
S(() => {
|
|
34
|
-
r || A(o.current) || (l({
|
|
35
|
-
dangerouslySetInnerHTML: { __html: o.current }
|
|
36
|
-
}), o.current = void 0);
|
|
37
|
-
}, [r]);
|
|
38
|
-
const P = v(({ editor: e }) => {
|
|
39
|
-
o.current = e.getHTML();
|
|
40
|
-
}), { mode: I } = x();
|
|
41
|
-
return /* @__PURE__ */ d(n, { children: [
|
|
42
|
-
r && I === "full" && /* @__PURE__ */ d(n, { children: [
|
|
43
|
-
/* @__PURE__ */ s(b, {}),
|
|
44
|
-
/* @__PURE__ */ s(h, {})
|
|
45
|
-
] }),
|
|
46
|
-
/* @__PURE__ */ s(
|
|
47
|
-
H,
|
|
48
|
-
{
|
|
49
|
-
...m,
|
|
50
|
-
...p,
|
|
51
|
-
ref: (e) => {
|
|
52
|
-
e && c.connect(e);
|
|
53
|
-
},
|
|
54
|
-
children: /* @__PURE__ */ s(
|
|
55
|
-
C,
|
|
56
|
-
{
|
|
57
|
-
ref: u,
|
|
58
|
-
options: {
|
|
59
|
-
content: t?.__html,
|
|
60
|
-
onUpdate: P
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
)
|
|
66
|
-
] });
|
|
67
|
-
}, R = () => i({
|
|
68
|
-
transform: M
|
|
69
|
-
}), re = () => {
|
|
70
|
-
const p = f(), { connectors: c } = L(), u = a(null), {
|
|
71
|
-
id: N,
|
|
72
|
-
nodeProps: { dangerouslySetInnerHTML: t, ...m },
|
|
73
|
-
setNodeProps: l
|
|
74
|
-
} = R(), o = a(t?.__html), { isActive: r } = T((e, g) => ({
|
|
75
|
-
isActive: g.getEvent("selected").contains(N)
|
|
76
|
-
}));
|
|
77
|
-
S(() => {
|
|
78
|
-
r || A(o.current) || (l({
|
|
79
|
-
dangerouslySetInnerHTML: { __html: o.current }
|
|
80
|
-
}), o.current = void 0);
|
|
81
|
-
}, [r]);
|
|
82
|
-
const P = v(({ editor: e }) => {
|
|
83
|
-
o.current = e.getHTML();
|
|
84
|
-
}), { mode: I } = x();
|
|
85
|
-
return /* @__PURE__ */ d(n, { children: [
|
|
86
|
-
r && I === "full" && /* @__PURE__ */ d(n, { children: [
|
|
87
|
-
/* @__PURE__ */ s(b, {}),
|
|
88
|
-
/* @__PURE__ */ s(h, {})
|
|
89
|
-
] }),
|
|
90
|
-
/* @__PURE__ */ s(
|
|
91
|
-
_,
|
|
92
|
-
{
|
|
93
|
-
...m,
|
|
94
|
-
...p,
|
|
95
|
-
ref: (e) => {
|
|
96
|
-
e && c.connect(e);
|
|
97
|
-
},
|
|
98
|
-
children: /* @__PURE__ */ s(
|
|
99
|
-
C,
|
|
100
|
-
{
|
|
101
|
-
ref: u,
|
|
102
|
-
options: {
|
|
103
|
-
content: t?.__html,
|
|
104
|
-
onUpdate: P
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
)
|
|
110
|
-
] });
|
|
111
|
-
}, te = () => i({
|
|
112
|
-
transform: F
|
|
113
|
-
}), ae = () => i({
|
|
114
|
-
transform: w
|
|
1
|
+
import { A as c, a as g, b, c as C, B as x, d as f, C as T, e as I, f as L, g as S, F as A, h as v, G as w, H as R, i as h, I as k, j as q, L as B, k as F, M as G, l as H, P as M, R as U, S as y, m as D, T as V, n as j, o as E, p as z, q as J, U as K, r as O, V as Q, s as W, u as X, v as Y, w as Z, x as _, y as $, z as ee, D as oe, E as se, J as ae, K as re, N as de, O as Ne } from "./countdown-timer.node-d0EtGQ4_.js";
|
|
2
|
+
import { u as e } from "./index-fErSlbD2.js";
|
|
3
|
+
import { C as ne, a as pe, N as ue, b as ie, c as Pe, d as me, e as le, f as ce, g as ge, h as be, i as Ce, j as xe, k as fe, l as Te, m as Ie, n as Le, o as Se, p as Ae, q as ve, r as we, s as Re, t as he } from "./index-fErSlbD2.js";
|
|
4
|
+
import { getTextProps as s, getTabPanelProps as a, getListItemProps as r } from "@janbox/storefront-ui";
|
|
5
|
+
import { useNode as qe } from "@craftjs/core";
|
|
6
|
+
import "lodash-es";
|
|
7
|
+
import "react";
|
|
8
|
+
const p = () => e({
|
|
9
|
+
transform: (o) => s({
|
|
10
|
+
...o,
|
|
11
|
+
as: o.as ?? "div"
|
|
12
|
+
})
|
|
13
|
+
}), u = () => e({
|
|
14
|
+
transform: s
|
|
15
|
+
}), i = () => e({
|
|
16
|
+
transform: a
|
|
17
|
+
}), P = () => e({
|
|
18
|
+
transform: r
|
|
115
19
|
});
|
|
116
20
|
export {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
vo as useButtonNodeProps,
|
|
192
|
-
Ho as useCellNodeProps,
|
|
193
|
-
T as useComposer,
|
|
194
|
-
_o as useContainerNodeProps,
|
|
195
|
-
Mo as useCountdownTimerNodeProps,
|
|
196
|
-
Fo as useFlexItemNodeProps,
|
|
197
|
-
wo as useFlexboxNodeProps,
|
|
198
|
-
Eo as useGridNodeProps,
|
|
199
|
-
R as useHeadingNodeProps,
|
|
200
|
-
Ro as useIconNodeProps,
|
|
201
|
-
yo as useImageNodeProps,
|
|
202
|
-
Bo as useLinkNodeProps,
|
|
203
|
-
te as useListItemNodeProps,
|
|
204
|
-
Go as useMarqueeNodeProps,
|
|
205
|
-
zo as useNode,
|
|
206
|
-
f as useNodeDataAttributes,
|
|
207
|
-
i as useNodeProps,
|
|
208
|
-
E as useParagraphNodeProps,
|
|
209
|
-
Uo as useSwiperNodeProps,
|
|
210
|
-
ko as useTabNodeProps,
|
|
211
|
-
ae as useTabPanelNodeProps,
|
|
212
|
-
Do as useTabsNodeProps,
|
|
213
|
-
qo as useUnorderedListNodeProps,
|
|
214
|
-
Vo as useVideoNodeProps
|
|
21
|
+
c as AccordionContentNode,
|
|
22
|
+
g as AccordionGroupNode,
|
|
23
|
+
b as AccordionNode,
|
|
24
|
+
C as AccordionSummaryNode,
|
|
25
|
+
x as BoxNode,
|
|
26
|
+
f as ButtonNode,
|
|
27
|
+
ne as Canvas,
|
|
28
|
+
T as CanvasPlaceholder,
|
|
29
|
+
I as CellNode,
|
|
30
|
+
pe as Composer,
|
|
31
|
+
L as ContainerNode,
|
|
32
|
+
S as CountdownTimerNode,
|
|
33
|
+
A as FlexItemNode,
|
|
34
|
+
v as FlexboxNode,
|
|
35
|
+
w as GridNode,
|
|
36
|
+
R as Heading,
|
|
37
|
+
h as HeadingNode,
|
|
38
|
+
k as IconNode,
|
|
39
|
+
q as ImageNode,
|
|
40
|
+
B as LinkNode,
|
|
41
|
+
F as ListItemNode,
|
|
42
|
+
G as MarqueeItemNode,
|
|
43
|
+
H as MarqueeNode,
|
|
44
|
+
ue as NodeElement,
|
|
45
|
+
M as ParagraphNode,
|
|
46
|
+
U as RootNode,
|
|
47
|
+
y as SwiperNode,
|
|
48
|
+
D as SwiperSlideNode,
|
|
49
|
+
V as TabContentNode,
|
|
50
|
+
j as TabListNode,
|
|
51
|
+
E as TabNode,
|
|
52
|
+
z as TabPanelNode,
|
|
53
|
+
J as TabsNode,
|
|
54
|
+
K as UnknownNode,
|
|
55
|
+
O as UnorderedListNode,
|
|
56
|
+
Q as VideoNode,
|
|
57
|
+
W as defineNode,
|
|
58
|
+
X as getNodeCustom,
|
|
59
|
+
Y as getNodeDisplayName,
|
|
60
|
+
Z as getNodeInfo,
|
|
61
|
+
_ as getNodeRelated,
|
|
62
|
+
$ as getNodeResolved,
|
|
63
|
+
ee as isNodeSelectable,
|
|
64
|
+
oe as parseNumber,
|
|
65
|
+
se as parseSvgString,
|
|
66
|
+
ae as registerNodeRelated,
|
|
67
|
+
re as toResponsiveCss,
|
|
68
|
+
ie as useAccordionGroupNodeProps,
|
|
69
|
+
Pe as useAccordionNodeProps,
|
|
70
|
+
me as useBoxNodeProps,
|
|
71
|
+
le as useButtonNodeProps,
|
|
72
|
+
ce as useCellNodeProps,
|
|
73
|
+
de as useComposer,
|
|
74
|
+
ge as useContainerNodeProps,
|
|
75
|
+
be as useCountdownTimerNodeProps,
|
|
76
|
+
Ce as useFlexItemNodeProps,
|
|
77
|
+
xe as useFlexboxNodeProps,
|
|
78
|
+
fe as useGridNodeProps,
|
|
79
|
+
u as useHeadingNodeProps,
|
|
80
|
+
Te as useIconNodeProps,
|
|
81
|
+
Ie as useImageNodeProps,
|
|
82
|
+
Le as useLinkNodeProps,
|
|
83
|
+
P as useListItemNodeProps,
|
|
84
|
+
Se as useMarqueeNodeProps,
|
|
85
|
+
qe as useNode,
|
|
86
|
+
Ne as useNodeDataAttributes,
|
|
87
|
+
e as useNodeProps,
|
|
88
|
+
p as useParagraphNodeProps,
|
|
89
|
+
Ae as useSwiperNodeProps,
|
|
90
|
+
ve as useTabNodeProps,
|
|
91
|
+
i as useTabPanelNodeProps,
|
|
92
|
+
we as useTabsNodeProps,
|
|
93
|
+
Re as useUnorderedListNodeProps,
|
|
94
|
+
he as useVideoNodeProps
|
|
215
95
|
};
|
package/dist/lib/box/README.md
CHANGED
|
@@ -8,12 +8,6 @@ Block container đa năng (render ra `div`). Là canvas node — chứa bất k
|
|
|
8
8
|
|
|
9
9
|
## Configurable props
|
|
10
10
|
|
|
11
|
-
### Top-level props
|
|
12
|
-
|
|
13
|
-
| Prop | Type | Description |
|
|
14
|
-
| --- | --- | --- |
|
|
15
|
-
| `container` | `boolean` | Bật max-width container constraint |
|
|
16
|
-
|
|
17
11
|
### `sx` props
|
|
18
12
|
|
|
19
13
|
```ts
|
|
@@ -66,8 +60,8 @@ sx?: {
|
|
|
66
60
|
import { BoxNode } from '@janbox/storefront-builder';
|
|
67
61
|
|
|
68
62
|
// Wrapper đơn giản
|
|
69
|
-
<BoxNode sx={{
|
|
70
|
-
<
|
|
63
|
+
<BoxNode sx={{ paddingTop: 16, paddingRight: 16, paddingBottom: 16, paddingLeft: 16 }}>
|
|
64
|
+
<HeadingNode as="h2">Hello</HeadingNode>
|
|
71
65
|
</BoxNode>
|
|
72
66
|
|
|
73
67
|
// Section có background
|
|
@@ -81,9 +75,8 @@ import { BoxNode } from '@janbox/storefront-builder';
|
|
|
81
75
|
...
|
|
82
76
|
</BoxNode>
|
|
83
77
|
|
|
84
|
-
//
|
|
78
|
+
// Responsive padding
|
|
85
79
|
<BoxNode
|
|
86
|
-
container
|
|
87
80
|
sx={{
|
|
88
81
|
paddingTop: 24,
|
|
89
82
|
paddingBottom: 24,
|
package/dist/lib/box/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ CTA button node dùng component `Button` từ `@janbox/storefront-ui`. Có thể
|
|
|
13
13
|
| Prop | Type | Description |
|
|
14
14
|
| --- | --- | --- |
|
|
15
15
|
| `dangerouslySetInnerHTML.__html` | `string` | Text hiển thị trong button |
|
|
16
|
-
| `color` | `
|
|
16
|
+
| `color` | `ColorScale` | Màu theme của button |
|
|
17
17
|
| `variant` | `ButtonVariant` | Kiểu hiển thị của button |
|
|
18
18
|
| `size` | `ButtonSizeVariant` | Kích thước button |
|
|
19
19
|
| `anchor.to` | `string \| { pathname: string }` | Link destination |
|
|
@@ -21,7 +21,7 @@ CTA button node dùng component `Button` từ `@janbox/storefront-ui`. Có thể
|
|
|
21
21
|
|
|
22
22
|
`size` hỗ trợ responsive: `size="sm"` xs, `md={{ size: 'lg' }}` desktop.
|
|
23
23
|
|
|
24
|
-
**`
|
|
24
|
+
**`ColorScale`:** `'primary' | 'secondary' | 'green' | 'red' | 'orange' | 'blue' | 'neutral' | 'yellow' | 'violet'`
|
|
25
25
|
|
|
26
26
|
**`ButtonVariant`:** `'contained' | 'outlined' | 'text'`
|
|
27
27
|
|
package/dist/lib/cell/index.d.ts
CHANGED