@blockbite/ui 2.0.5 → 2.0.6
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/AutocompleteDropdown.d.ts +1 -1
- package/dist/AutocompleteDropdown.js +24 -24
- package/dist/BitePreview.d.ts +1 -2
- package/dist/BitePreview.js +9 -9
- package/dist/ButtonToggle.d.ts +3 -4
- package/dist/ButtonToggle.js +13 -14
- package/dist/DropdownPicker.js +1 -1
- package/dist/EmptyState.d.ts +1 -1
- package/dist/EmptyState.js +5 -5
- package/dist/FloatingPanel.d.ts +1 -1
- package/dist/FloatingPanel.js +12 -12
- package/dist/FocalPointControl.d.ts +1 -1
- package/dist/FocalPointControl.js +1 -0
- package/dist/LinkPicker.d.ts +1 -1
- package/dist/LinkPicker.js +16 -16
- package/dist/MediaPicker.d.ts +1 -1
- package/dist/MediaPicker.js +14 -14
- package/dist/MetricsControl.d.ts +1 -1
- package/dist/MetricsControl.js +51 -55
- package/dist/Modal.d.ts +7 -7
- package/dist/Modal.js +3 -3
- package/dist/Popover.js +1 -1
- package/dist/RangeSlider.d.ts +1 -2
- package/dist/RangeSlider.js +26 -26
- package/dist/ResponsiveImage.d.ts +1 -1
- package/dist/ResponsiveImage.js +6 -6
- package/dist/ResponsiveVideo.d.ts +1 -1
- package/dist/ResponsiveVideo.js +2 -2
- package/dist/SectionList.d.ts +1 -1
- package/dist/SectionList.js +18 -18
- package/dist/SingleBlockTypeAppender.d.ts +2 -2
- package/dist/SingleBlockTypeAppender.js +7 -7
- package/dist/Tabs.d.ts +5 -0
- package/dist/Tabs.js +22 -17
- package/dist/TextControlLabel.js +1 -1
- package/dist/ToggleGroup.d.ts +2 -2
- package/dist/index.d.ts +48 -0
- package/dist/index.js +88 -0
- package/package.json +24 -20
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.js +0 -589
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -28
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js +0 -8
- package/dist/packages/icons/jsx/ChevronDown.js +0 -23
- package/dist/packages/icons/jsx/ColumnSpacing.js +0 -25
- package/dist/packages/icons/jsx/Cross2.js +0 -23
- package/dist/packages/icons/jsx/Desktop.js +0 -25
- package/dist/packages/icons/jsx/Grid.js +0 -25
- package/dist/packages/icons/jsx/Pencil1.js +0 -25
- package/dist/packages/icons/jsx/Percentage.js +0 -28
- package/dist/packages/icons/jsx/Plus.js +0 -23
- package/dist/packages/icons/jsx/Slider.js +0 -25
- package/dist/packages/icons/jsx/Tailwind.js +0 -23
- package/dist/packages/icons/jsx/Trash.js +0 -25
package/dist/MetricsControl.js
CHANGED
|
@@ -1,73 +1,68 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as s } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
2
|
import { useState as a, useEffect as d } from "@wordpress/element";
|
|
3
|
-
import h from "./ButtonToggle.js";
|
|
4
|
-
import { DropdownPicker as
|
|
5
|
-
import { Popover as
|
|
6
|
-
import w from "./RangeSlider.js";
|
|
3
|
+
import { ButtonToggleGroup as h } from "./ButtonToggle.js";
|
|
4
|
+
import { DropdownPicker as P } from "./DropdownPicker.js";
|
|
5
|
+
import { Popover as C } from "./Popover.js";
|
|
6
|
+
import { RangeSlider as w } from "./RangeSlider.js";
|
|
7
7
|
import { TextControl as N } from "./TextControl.js";
|
|
8
8
|
import { Wrap as k } from "./Wrap.js";
|
|
9
|
-
import O from "
|
|
10
|
-
|
|
11
|
-
import R from "./packages/icons/jsx/Grid.js";
|
|
12
|
-
import G from "./packages/icons/jsx/Percentage.js";
|
|
13
|
-
import A from "./packages/icons/jsx/Slider.js";
|
|
14
|
-
import D from "./packages/icons/jsx/Tailwind.js";
|
|
15
|
-
const L = ({
|
|
9
|
+
import { Tailwind as O, Percentage as T, Grid as R, Desktop as G, Slider as A, ColumnSpacing as D } from "@blockbite/icons";
|
|
10
|
+
const W = ({
|
|
16
11
|
defaultUnit: l,
|
|
17
12
|
defaultValue: n,
|
|
18
13
|
onValueChange: t,
|
|
19
14
|
onUnitChange: g,
|
|
20
15
|
inputClassName: j = "w-[75px]"
|
|
21
16
|
}) => {
|
|
22
|
-
const [
|
|
17
|
+
const [c, m] = a(!1), [v, b] = a([]), [r, x] = a(l), [o, i] = a(""), [u, S] = a(n);
|
|
23
18
|
d(() => {
|
|
24
|
-
l &&
|
|
19
|
+
l && x(l), n && i(n.toString());
|
|
25
20
|
}, [l, n]), d(() => {
|
|
26
|
-
!
|
|
27
|
-
}, [
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
-
const p = bb.codex.units.spacing[
|
|
21
|
+
!c && r === "arbitrary" && S(o);
|
|
22
|
+
}, [c]);
|
|
23
|
+
const f = (e) => {
|
|
24
|
+
if (e !== "arbitrary" && bb?.codex?.units?.spacing?.[e]) {
|
|
25
|
+
const p = bb.codex.units.spacing[e];
|
|
31
26
|
b(
|
|
32
27
|
Array.isArray(p) ? p : Object.keys(p)
|
|
33
28
|
);
|
|
34
29
|
} else
|
|
35
30
|
b([]);
|
|
36
|
-
|
|
37
|
-
},
|
|
31
|
+
m(!0);
|
|
32
|
+
}, y = [
|
|
38
33
|
{
|
|
39
|
-
icon: /* @__PURE__ */
|
|
34
|
+
icon: /* @__PURE__ */ s.jsx(O, {}),
|
|
40
35
|
label: "Tailwind CSS Units",
|
|
41
36
|
value: "native"
|
|
42
37
|
},
|
|
43
|
-
{ icon: /* @__PURE__ */
|
|
44
|
-
{ icon: /* @__PURE__ */
|
|
45
|
-
{ icon: /* @__PURE__ */
|
|
46
|
-
{ icon: /* @__PURE__ */
|
|
47
|
-
{ icon: /* @__PURE__ */
|
|
38
|
+
{ icon: /* @__PURE__ */ s.jsx(T, {}), label: "Percentage Units", value: "percent" },
|
|
39
|
+
{ icon: /* @__PURE__ */ s.jsx(R, {}), label: "Grid Units", value: "grid" },
|
|
40
|
+
{ icon: /* @__PURE__ */ s.jsx(G, {}), label: "Screen Units", value: "screen" },
|
|
41
|
+
{ icon: /* @__PURE__ */ s.jsx(A, {}), label: "Pixel Units", value: "arbitrary" },
|
|
42
|
+
{ icon: /* @__PURE__ */ s.jsx(D, {}), label: "Fluid Units", value: "fluid" }
|
|
48
43
|
];
|
|
49
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ s.jsx(k, { className: "relative flex flex-col items-baseline", children: /* @__PURE__ */ s.jsxs(
|
|
50
45
|
N,
|
|
51
46
|
{
|
|
52
47
|
inputClassName: j,
|
|
53
48
|
defaultValue: (
|
|
54
49
|
// Remove the "b_" prefix for grid units
|
|
55
|
-
|
|
50
|
+
r === "grid" ? o.replace("b_", "") : o
|
|
56
51
|
),
|
|
57
|
-
onClick: () =>
|
|
58
|
-
onChange: (
|
|
59
|
-
i(
|
|
52
|
+
onClick: () => r !== "arbitrary" && f(r),
|
|
53
|
+
onChange: (e) => {
|
|
54
|
+
i(e), t(e);
|
|
60
55
|
},
|
|
61
|
-
readOnly:
|
|
56
|
+
readOnly: r !== "arbitrary",
|
|
62
57
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
|
|
58
|
+
/* @__PURE__ */ s.jsx(
|
|
59
|
+
C,
|
|
65
60
|
{
|
|
66
|
-
visible:
|
|
61
|
+
visible: c,
|
|
67
62
|
position: "bottom left",
|
|
68
63
|
className: "w-[300px] bg-white shadow-sm",
|
|
69
|
-
onVisibleChange:
|
|
70
|
-
children:
|
|
64
|
+
onVisibleChange: m,
|
|
65
|
+
children: r === "arbitrary" ? /* @__PURE__ */ s.jsx(
|
|
71
66
|
w,
|
|
72
67
|
{
|
|
73
68
|
defaultValue: o,
|
|
@@ -77,39 +72,39 @@ const L = ({
|
|
|
77
72
|
gridMode: !0,
|
|
78
73
|
showTooltip: !1,
|
|
79
74
|
allowReset: !0,
|
|
80
|
-
resetFallbackValue: isNaN(
|
|
81
|
-
onValueChange: (
|
|
82
|
-
i(
|
|
75
|
+
resetFallbackValue: isNaN(u.toString()) ? 0 : Number(u) / 16,
|
|
76
|
+
onValueChange: (e) => {
|
|
77
|
+
i(e), t(e);
|
|
83
78
|
}
|
|
84
79
|
}
|
|
85
|
-
) : /* @__PURE__ */
|
|
80
|
+
) : /* @__PURE__ */ s.jsx(
|
|
86
81
|
h,
|
|
87
82
|
{
|
|
88
83
|
className: "mt-4",
|
|
89
|
-
options: v.map((
|
|
90
|
-
value:
|
|
91
|
-
label:
|
|
84
|
+
options: v.map((e) => ({
|
|
85
|
+
value: e,
|
|
86
|
+
label: r === "grid" ? e.toString().replace("b_", "") : e,
|
|
92
87
|
onClick: () => {
|
|
93
|
-
i(
|
|
88
|
+
i(e), t(e);
|
|
94
89
|
}
|
|
95
90
|
})),
|
|
96
91
|
size: "small",
|
|
97
92
|
defaultPressed: o?.toString() || "",
|
|
98
|
-
onPressedChange: (
|
|
99
|
-
i(
|
|
93
|
+
onPressedChange: (e) => {
|
|
94
|
+
i(e), t(e);
|
|
100
95
|
}
|
|
101
96
|
}
|
|
102
97
|
)
|
|
103
98
|
}
|
|
104
99
|
),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
|
|
100
|
+
/* @__PURE__ */ s.jsx(
|
|
101
|
+
P,
|
|
107
102
|
{
|
|
108
103
|
className: "h-[32px]",
|
|
109
|
-
defaultValue:
|
|
110
|
-
options:
|
|
111
|
-
onPressedChange: (
|
|
112
|
-
|
|
104
|
+
defaultValue: r,
|
|
105
|
+
options: y,
|
|
106
|
+
onPressedChange: (e) => {
|
|
107
|
+
e === "reset" ? (i(""), t(""), m(!1)) : (x(e), g(e), f(e));
|
|
113
108
|
}
|
|
114
109
|
}
|
|
115
110
|
)
|
|
@@ -118,5 +113,6 @@ const L = ({
|
|
|
118
113
|
) });
|
|
119
114
|
};
|
|
120
115
|
export {
|
|
121
|
-
|
|
116
|
+
W as MetricsControl,
|
|
117
|
+
W as default
|
|
122
118
|
};
|
package/dist/Modal.d.ts
CHANGED
|
@@ -10,23 +10,23 @@ type ModalProps = {
|
|
|
10
10
|
title: string;
|
|
11
11
|
className?: string;
|
|
12
12
|
};
|
|
13
|
-
declare const Modal: React.FC<ModalProps>;
|
|
14
|
-
declare const ModalHeader: React.FC<{
|
|
13
|
+
export declare const Modal: React.FC<ModalProps>;
|
|
14
|
+
export declare const ModalHeader: React.FC<{
|
|
15
15
|
children: React.ReactNode;
|
|
16
16
|
className?: string;
|
|
17
17
|
}>;
|
|
18
|
-
declare const ModalFooter: React.FC<{
|
|
18
|
+
export declare const ModalFooter: React.FC<{
|
|
19
19
|
children: React.ReactNode;
|
|
20
20
|
className?: string;
|
|
21
21
|
}>;
|
|
22
|
-
declare const ModalContent: React.FC<{
|
|
22
|
+
export declare const ModalContent: React.FC<{
|
|
23
23
|
children: React.ReactNode;
|
|
24
24
|
className?: string;
|
|
25
25
|
}>;
|
|
26
|
-
declare const ModalClose: React.FC<{
|
|
26
|
+
export declare const ModalClose: React.FC<{
|
|
27
27
|
children: React.ReactNode;
|
|
28
28
|
}>;
|
|
29
|
-
declare const ModalTrigger: React.FC<{
|
|
29
|
+
export declare const ModalTrigger: React.FC<{
|
|
30
30
|
children: React.ReactNode;
|
|
31
31
|
}>;
|
|
32
|
-
export {
|
|
32
|
+
export {};
|
package/dist/Modal.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as r } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useContext as j, createContext as b, useState as v, useEffect as u, Children as a, isValidElement as l } from "@wordpress/element";
|
|
3
3
|
import { Modal as C } from "@wordpress/components";
|
|
4
4
|
import n from "classnames";
|
|
5
|
-
const i =
|
|
6
|
-
const e =
|
|
5
|
+
const i = b(null), d = () => {
|
|
6
|
+
const e = j(i);
|
|
7
7
|
if (!e)
|
|
8
8
|
throw new Error("useModalContext must be used within a ModalProvider");
|
|
9
9
|
return e;
|
package/dist/Popover.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as s } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
-
import p from "
|
|
2
|
+
import { Cross2 as p } from "@blockbite/icons";
|
|
3
3
|
import { Popover as f, Button as n } from "@wordpress/components";
|
|
4
4
|
import { useState as d, useEffect as x } from "@wordpress/element";
|
|
5
5
|
const N = ({
|
package/dist/RangeSlider.d.ts
CHANGED
package/dist/RangeSlider.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { j as a } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Wrap as
|
|
4
|
-
import { RangeControl as
|
|
5
|
-
const
|
|
6
|
-
defaultValue:
|
|
2
|
+
import { useState as o, useEffect as j } from "@wordpress/element";
|
|
3
|
+
import { Wrap as R } from "./Wrap.js";
|
|
4
|
+
import { RangeControl as S } from "@wordpress/components";
|
|
5
|
+
const b = ({
|
|
6
|
+
defaultValue: s,
|
|
7
7
|
label: l,
|
|
8
|
-
min:
|
|
9
|
-
max:
|
|
10
|
-
withInputField:
|
|
8
|
+
min: p = 0,
|
|
9
|
+
max: c = 2e3,
|
|
10
|
+
withInputField: f = !1,
|
|
11
11
|
onValueChange: m,
|
|
12
12
|
gridMode: n = !1,
|
|
13
|
-
showTooltip:
|
|
13
|
+
showTooltip: i = !1,
|
|
14
14
|
...x
|
|
15
15
|
}) => {
|
|
16
|
-
const [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, [
|
|
16
|
+
const [u] = o(0), [t, r] = o(0);
|
|
17
|
+
j(() => {
|
|
18
|
+
r(Math.round(parseInt(s) / (n ? 16 : 1)));
|
|
19
|
+
}, [s]);
|
|
20
20
|
function g(e) {
|
|
21
|
-
const
|
|
22
|
-
m(
|
|
21
|
+
const h = e * (n ? 16 : 1);
|
|
22
|
+
m(h.toString());
|
|
23
23
|
}
|
|
24
|
-
return /* @__PURE__ */ a.jsxs(
|
|
24
|
+
return /* @__PURE__ */ a.jsxs(R, { className: "flex min-w-[240px] flex-col", children: [
|
|
25
25
|
/* @__PURE__ */ a.jsx(
|
|
26
|
-
|
|
26
|
+
S,
|
|
27
27
|
{
|
|
28
28
|
label: l,
|
|
29
|
-
value:
|
|
30
|
-
min:
|
|
31
|
-
max:
|
|
32
|
-
showTooltip:
|
|
33
|
-
withInputField:
|
|
29
|
+
value: t,
|
|
30
|
+
min: p,
|
|
31
|
+
max: c,
|
|
32
|
+
showTooltip: i,
|
|
33
|
+
withInputField: f,
|
|
34
34
|
onChange: (e) => {
|
|
35
|
-
|
|
35
|
+
r(e), g(e);
|
|
36
36
|
},
|
|
37
|
-
resetFallbackValue:
|
|
37
|
+
resetFallbackValue: u,
|
|
38
38
|
...x
|
|
39
39
|
}
|
|
40
40
|
),
|
|
41
41
|
/* @__PURE__ */ a.jsxs("span", { children: [
|
|
42
|
-
n ? `${
|
|
42
|
+
n ? `${t * 16}px` : null,
|
|
43
43
|
" "
|
|
44
44
|
] })
|
|
45
45
|
] });
|
|
46
46
|
};
|
|
47
47
|
export {
|
|
48
|
-
|
|
48
|
+
b as RangeSlider
|
|
49
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function ResponsiveImage(props: any): import("react/jsx-runtime").JSX.Element;
|
package/dist/ResponsiveImage.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as s } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
2
|
function f(n) {
|
|
3
|
-
const { media: r, mediaClass: e } = n, { url: m, alt: i, sizes:
|
|
4
|
-
if (
|
|
3
|
+
const { media: r, mediaClass: e } = n, { url: m, alt: i, sizes: c } = r;
|
|
4
|
+
if (c === void 0)
|
|
5
5
|
return /* @__PURE__ */ s.jsx("img", { src: m, alt: i, className: `bf_media ${e}` });
|
|
6
|
-
const { thumbnail: d, medium:
|
|
6
|
+
const { thumbnail: d, medium: o, large: u } = c, t = d || m, a = o || m, l = u || m;
|
|
7
7
|
return /* @__PURE__ */ s.jsxs("picture", { className: "bf_responsive-media", children: [
|
|
8
|
-
|
|
8
|
+
t ? /* @__PURE__ */ s.jsx(
|
|
9
9
|
"source",
|
|
10
10
|
{
|
|
11
11
|
media: "(max-width: 768px)",
|
|
12
|
-
srcSet:
|
|
12
|
+
srcSet: t,
|
|
13
13
|
className: `bf_media ${e}`
|
|
14
14
|
}
|
|
15
15
|
) : null,
|
|
@@ -33,5 +33,5 @@ function f(n) {
|
|
|
33
33
|
] });
|
|
34
34
|
}
|
|
35
35
|
export {
|
|
36
|
-
f as
|
|
36
|
+
f as ResponsiveImage
|
|
37
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function ResponsiveVideo(props: any): import("react/jsx-runtime").JSX.Element;
|
package/dist/ResponsiveVideo.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as e } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
-
function
|
|
2
|
+
function u(o) {
|
|
3
3
|
const { media: s, mediaClass: r } = o, { url: t } = s, n = t;
|
|
4
4
|
return /* @__PURE__ */ e.jsx(
|
|
5
5
|
"video",
|
|
@@ -16,5 +16,5 @@ function a(o) {
|
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
u as ResponsiveVideo
|
|
20
20
|
};
|
package/dist/SectionList.d.ts
CHANGED
|
@@ -15,5 +15,5 @@ type SectionListProps = {
|
|
|
15
15
|
setCode: (code: string) => void;
|
|
16
16
|
addons?: JSX.Element;
|
|
17
17
|
};
|
|
18
|
-
declare const SectionList: ({ sections, setSections, activeSection, setActiveSection, Update, newSection, setCode, addons, }: SectionListProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const SectionList: ({ sections, setSections, activeSection, setActiveSection, Update, newSection, setCode, addons, }: SectionListProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
export default SectionList;
|
package/dist/SectionList.js
CHANGED
|
@@ -2,13 +2,12 @@ import { j as t } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx
|
|
|
2
2
|
import { Button as c } from "@wordpress/components";
|
|
3
3
|
import { useState as w, useRef as v } from "@wordpress/element";
|
|
4
4
|
import { Wrap as u } from "./Wrap.js";
|
|
5
|
-
import C from "
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
const E = ({
|
|
5
|
+
import { Plus as C, Trash as R } from "@blockbite/icons";
|
|
6
|
+
import k from "classnames";
|
|
7
|
+
import { TextControl as _ } from "./TextControl.js";
|
|
8
|
+
const D = ({
|
|
10
9
|
sections: a,
|
|
11
|
-
setSections:
|
|
10
|
+
setSections: d,
|
|
12
11
|
activeSection: n,
|
|
13
12
|
setActiveSection: m,
|
|
14
13
|
Update: x,
|
|
@@ -16,12 +15,12 @@ const E = ({
|
|
|
16
15
|
setCode: f,
|
|
17
16
|
addons: p
|
|
18
17
|
}) => {
|
|
19
|
-
const [i,
|
|
18
|
+
const [i, o] = w({
|
|
20
19
|
id: "",
|
|
21
20
|
name: ""
|
|
22
21
|
}), h = v(null), j = () => {
|
|
23
22
|
const e = { ...s() };
|
|
24
|
-
|
|
23
|
+
d([...a, e]);
|
|
25
24
|
}, b = () => {
|
|
26
25
|
if (!n || a.length === 0) return;
|
|
27
26
|
const e = a.filter(
|
|
@@ -35,13 +34,13 @@ const E = ({
|
|
|
35
34
|
const r = { ...s() };
|
|
36
35
|
e.push(r), l = r.id;
|
|
37
36
|
}
|
|
38
|
-
|
|
37
|
+
d(e), m(l), f(e.find((r) => r.id === l)?.code || "");
|
|
39
38
|
}, y = (e) => {
|
|
40
|
-
|
|
39
|
+
d(
|
|
41
40
|
(l) => l.map(
|
|
42
41
|
(r) => r.id === i.id ? { ...r, name: e } : r
|
|
43
42
|
)
|
|
44
|
-
),
|
|
43
|
+
), o({
|
|
45
44
|
id: "",
|
|
46
45
|
name: ""
|
|
47
46
|
});
|
|
@@ -57,7 +56,7 @@ const E = ({
|
|
|
57
56
|
/* @__PURE__ */ t.jsx(
|
|
58
57
|
"button",
|
|
59
58
|
{
|
|
60
|
-
className:
|
|
59
|
+
className: k(
|
|
61
60
|
"text-gray-medium w-full truncate bg-opacity-50 px-3 py-2 text-left text-sm/6 font-semibold hover:bg-easy hover:text-wordpress",
|
|
62
61
|
{
|
|
63
62
|
"bg-easy": e.id === n
|
|
@@ -67,7 +66,7 @@ const E = ({
|
|
|
67
66
|
m(e.id), x(n, e.id);
|
|
68
67
|
},
|
|
69
68
|
onDoubleClick: () => {
|
|
70
|
-
|
|
69
|
+
o({
|
|
71
70
|
id: e.id,
|
|
72
71
|
name: e.name
|
|
73
72
|
});
|
|
@@ -76,11 +75,11 @@ const E = ({
|
|
|
76
75
|
}
|
|
77
76
|
),
|
|
78
77
|
i.id === e.id && /* @__PURE__ */ t.jsx(
|
|
79
|
-
|
|
78
|
+
_,
|
|
80
79
|
{
|
|
81
80
|
className: "absolute left-0 top-0 h-full w-full",
|
|
82
81
|
defaultValue: i.name,
|
|
83
|
-
onChange: (r) =>
|
|
82
|
+
onChange: (r) => o({
|
|
84
83
|
...i,
|
|
85
84
|
name: r
|
|
86
85
|
}),
|
|
@@ -98,7 +97,7 @@ const E = ({
|
|
|
98
97
|
c,
|
|
99
98
|
{
|
|
100
99
|
onClick: j,
|
|
101
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
100
|
+
icon: /* @__PURE__ */ t.jsx(C, {}),
|
|
102
101
|
variant: "tertiary",
|
|
103
102
|
size: "compact",
|
|
104
103
|
children: "Add"
|
|
@@ -108,7 +107,7 @@ const E = ({
|
|
|
108
107
|
c,
|
|
109
108
|
{
|
|
110
109
|
onClick: b,
|
|
111
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
110
|
+
icon: /* @__PURE__ */ t.jsx(R, {}),
|
|
112
111
|
variant: "tertiary",
|
|
113
112
|
size: "compact",
|
|
114
113
|
children: "Remove"
|
|
@@ -118,5 +117,6 @@ const E = ({
|
|
|
118
117
|
] });
|
|
119
118
|
};
|
|
120
119
|
export {
|
|
121
|
-
|
|
120
|
+
D as SectionList,
|
|
121
|
+
D as default
|
|
122
122
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface SingleBlockTypeAppenderProps {
|
|
2
2
|
buttonText?: string;
|
|
3
3
|
}
|
|
4
|
-
declare const SingleBlockTypeAppender: ({ buttonText, }: SingleBlockTypeAppenderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export
|
|
4
|
+
export declare const SingleBlockTypeAppender: ({ buttonText, }: SingleBlockTypeAppenderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { j as s } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
2
|
import { createBlock as i } from "@wordpress/blocks";
|
|
3
3
|
import { Button as a } from "@wordpress/components";
|
|
4
|
-
const { select:
|
|
5
|
-
buttonText:
|
|
4
|
+
const { select: k, dispatch: d } = wp.data, u = ({
|
|
5
|
+
buttonText: c = "Add block"
|
|
6
6
|
}) => {
|
|
7
|
-
const
|
|
8
|
-
const r =
|
|
7
|
+
const e = () => {
|
|
8
|
+
const r = k("core/block-editor").getSelectedBlock(), { clientId: n, innerBlocks: o } = r, t = o[o.length - 1], l = i(
|
|
9
9
|
t.name,
|
|
10
10
|
t.attributes,
|
|
11
11
|
t.innerBlocks
|
|
12
12
|
);
|
|
13
|
-
|
|
13
|
+
d("core/block-editor").insertBlocks(l, 0, n);
|
|
14
14
|
};
|
|
15
|
-
return /* @__PURE__ */ s.jsx(a, { variant: "primary", onClick: () =>
|
|
15
|
+
return /* @__PURE__ */ s.jsx(a, { variant: "primary", onClick: () => e(), children: c });
|
|
16
16
|
};
|
|
17
17
|
export {
|
|
18
|
-
u as
|
|
18
|
+
u as SingleBlockTypeAppender
|
|
19
19
|
};
|
package/dist/Tabs.d.ts
CHANGED
|
@@ -23,4 +23,9 @@ type TabsContentProps = {
|
|
|
23
23
|
className?: string;
|
|
24
24
|
};
|
|
25
25
|
export declare const TabsContent: ({ value, children, className, }: TabsContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const Tabs: {
|
|
27
|
+
Wrapper: ({ children, defaultValue, value, onValueChange, ...rest }: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
List: ({ options, children, className, onValueChange, }: TabsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
Content: ({ value, children, className, }: TabsContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
};
|
|
26
31
|
export {};
|
package/dist/Tabs.js
CHANGED
|
@@ -1,47 +1,52 @@
|
|
|
1
1
|
import { j as r } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
-
import { TabPanel as
|
|
3
|
-
import {
|
|
2
|
+
import { TabPanel as x } from "@wordpress/components";
|
|
3
|
+
import { useState as v, createContext as u, useContext as b } from "@wordpress/element";
|
|
4
4
|
import d from "classnames";
|
|
5
5
|
import { Wrap as m } from "./Wrap.js";
|
|
6
|
-
const i =
|
|
6
|
+
const i = u(null), f = ({
|
|
7
7
|
children: s,
|
|
8
8
|
defaultValue: a,
|
|
9
9
|
value: t,
|
|
10
10
|
onValueChange: e,
|
|
11
|
-
...
|
|
11
|
+
...n
|
|
12
12
|
}) => {
|
|
13
|
-
const
|
|
14
|
-
activeTab:
|
|
13
|
+
const o = t !== void 0, [c, T] = v(a || ""), p = {
|
|
14
|
+
activeTab: o ? t : c,
|
|
15
15
|
setActiveTab: (l) => {
|
|
16
|
-
|
|
16
|
+
o || T(l), e && e(l);
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
return /* @__PURE__ */ r.jsx(i.Provider, { value:
|
|
20
|
-
},
|
|
19
|
+
return /* @__PURE__ */ r.jsx(i.Provider, { value: p, children: /* @__PURE__ */ r.jsx(m, { important: !0, className: n.className, children: s }) });
|
|
20
|
+
}, j = ({
|
|
21
21
|
options: s,
|
|
22
22
|
children: a,
|
|
23
23
|
className: t,
|
|
24
24
|
onValueChange: e
|
|
25
25
|
}) => {
|
|
26
|
-
const
|
|
26
|
+
const n = b(i), o = e || n?.setActiveTab;
|
|
27
27
|
return /* @__PURE__ */ r.jsx(
|
|
28
|
-
|
|
28
|
+
x,
|
|
29
29
|
{
|
|
30
30
|
className: d("tabs-list", t),
|
|
31
31
|
tabs: s,
|
|
32
32
|
onSelect: (c) => {
|
|
33
|
-
|
|
33
|
+
o(c);
|
|
34
34
|
},
|
|
35
35
|
children: () => a
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
|
-
},
|
|
38
|
+
}, C = ({
|
|
39
39
|
value: s,
|
|
40
40
|
children: a,
|
|
41
41
|
className: t
|
|
42
|
-
}) => b(i)?.activeTab === s ? /* @__PURE__ */ r.jsx(m, { className: t, children: a }) : null
|
|
42
|
+
}) => b(i)?.activeTab === s ? /* @__PURE__ */ r.jsx(m, { className: t, children: a }) : null, E = {
|
|
43
|
+
Wrapper: f,
|
|
44
|
+
List: j,
|
|
45
|
+
Content: C
|
|
46
|
+
};
|
|
43
47
|
export {
|
|
44
|
-
E as
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
E as Tabs,
|
|
49
|
+
C as TabsContent,
|
|
50
|
+
j as TabsList,
|
|
51
|
+
f as TabsWrapper
|
|
47
52
|
};
|
package/dist/TextControlLabel.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as t } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
-
import r from "
|
|
2
|
+
import { Pencil1 as r } from "@blockbite/icons";
|
|
3
3
|
import { TextControl as s } from "@wordpress/components";
|
|
4
4
|
import { Wrap as i } from "./Wrap.js";
|
|
5
5
|
const x = ({
|
package/dist/ToggleGroup.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ type ToggleProps = {
|
|
|
12
12
|
size?: 'small' | 'default' | 'compact';
|
|
13
13
|
onPressedChange: (value: string) => void;
|
|
14
14
|
};
|
|
15
|
-
declare const ToggleGroup: React.FC<ToggleProps>;
|
|
16
|
-
export {
|
|
15
|
+
export declare const ToggleGroup: React.FC<ToggleProps>;
|
|
16
|
+
export {};
|