@blockbite/ui 2.0.2 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AutocompleteDropdown.js +22 -22
- package/dist/Badge.js +1 -1
- package/dist/BitePreview.js +1 -1
- package/dist/Button.d.ts +3 -3
- package/dist/Button.js +5 -5
- package/dist/ButtonToggle.d.ts +6 -6
- package/dist/ButtonToggle.js +10 -10
- package/dist/Chapter.js +7 -7
- package/dist/ChapterDivider.js +1 -1
- package/dist/Checkbox.js +8 -8
- package/dist/DisappearingMessage.js +1 -1
- package/dist/DropdownPicker.js +3 -3
- package/dist/EmptyState.js +1 -1
- package/dist/FloatingPanel.js +1 -1
- package/dist/FocalPointControl.js +7 -7
- package/dist/Icon.js +1 -1
- package/dist/LinkPicker.js +2 -2
- package/dist/MediaPicker.js +1 -1
- package/dist/MetricsControl.d.ts +1 -1
- package/dist/MetricsControl.js +40 -41
- package/dist/Modal.js +1 -1
- package/dist/Notice.d.ts +1 -1
- package/dist/Notice.js +9 -9
- package/dist/PasswordInput.js +1 -1
- package/dist/Popover.js +2 -2
- package/dist/RangeSlider.js +5 -5
- package/dist/ResponsiveImage.js +1 -1
- package/dist/ResponsiveVideo.js +1 -1
- package/dist/ScrollList.d.ts +1 -1
- package/dist/ScrollList.js +5 -5
- package/dist/SectionList.js +25 -25
- package/dist/SelectControlWrapper.js +1 -1
- package/dist/SingleBlockTypeAppender.js +1 -1
- package/dist/SlideIn.js +8 -8
- package/dist/Spinner.js +1 -1
- package/dist/Tabs.js +6 -6
- package/dist/Tag.js +1 -1
- package/dist/TextControl.js +5 -5
- package/dist/TextControlLabel.js +6 -6
- package/dist/ToggleGroup.d.ts +3 -3
- package/dist/ToggleGroup.js +7 -7
- package/dist/ToggleSwitch.js +9 -9
- package/dist/Wrap.js +1 -1
- package/dist/node_modules/{react → .pnpm/react@18.2.0/node_modules/react}/cjs/react-jsx-runtime.development.js +204 -219
- package/dist/node_modules/{react → .pnpm/react@18.2.0/node_modules/react}/cjs/react-jsx-runtime.production.min.js +1 -1
- package/dist/node_modules/{react → .pnpm/react@18.2.0/node_modules/react}/jsx-runtime.js +1 -1
- package/dist/packages/icons/jsx/ChevronDown.js +23 -0
- package/dist/packages/icons/jsx/ColumnSpacing.js +25 -0
- package/dist/packages/icons/jsx/Cross2.js +23 -0
- package/dist/packages/icons/jsx/Desktop.js +25 -0
- package/dist/packages/icons/jsx/Grid.js +25 -0
- package/dist/packages/icons/jsx/Pencil1.js +25 -0
- package/dist/packages/icons/jsx/Percentage.js +28 -0
- package/dist/packages/icons/jsx/Plus.js +23 -0
- package/dist/packages/icons/jsx/Slider.js +25 -0
- package/dist/packages/icons/jsx/Tailwind.js +23 -0
- package/dist/packages/icons/jsx/Trash.js +25 -0
- package/package.json +24 -26
- package/dist/_virtual/ChevronDown.js +0 -4
- package/dist/_virtual/ColumnSpacing.js +0 -4
- package/dist/_virtual/Cross2.js +0 -4
- package/dist/_virtual/Desktop.js +0 -4
- package/dist/_virtual/Grid.js +0 -4
- package/dist/_virtual/Pencil1.js +0 -4
- package/dist/_virtual/Percentage.js +0 -4
- package/dist/_virtual/Plus.js +0 -4
- package/dist/_virtual/Slider.js +0 -4
- package/dist/_virtual/Tailwind.js +0 -4
- package/dist/_virtual/Trash.js +0 -4
- package/dist/_virtual/_commonjsHelpers.js +0 -8
- package/dist/node_modules/@blockbite/icons/dist/ChevronDown.js +0 -63
- package/dist/node_modules/@blockbite/icons/dist/ColumnSpacing.js +0 -65
- package/dist/node_modules/@blockbite/icons/dist/Cross2.js +0 -63
- package/dist/node_modules/@blockbite/icons/dist/Desktop.js +0 -65
- package/dist/node_modules/@blockbite/icons/dist/Grid.js +0 -65
- package/dist/node_modules/@blockbite/icons/dist/Pencil1.js +0 -65
- package/dist/node_modules/@blockbite/icons/dist/Percentage.js +0 -74
- package/dist/node_modules/@blockbite/icons/dist/Plus.js +0 -63
- package/dist/node_modules/@blockbite/icons/dist/Slider.js +0 -65
- package/dist/node_modules/@blockbite/icons/dist/Tailwind.js +0 -63
- package/dist/node_modules/@blockbite/icons/dist/Trash.js +0 -65
- package/dist/node_modules/lodash/_Hash.js +0 -22
- package/dist/node_modules/lodash/_ListCache.js +0 -22
- package/dist/node_modules/lodash/_Map.js +0 -6
- package/dist/node_modules/lodash/_MapCache.js +0 -22
- package/dist/node_modules/lodash/_Symbol.js +0 -5
- package/dist/node_modules/lodash/_arrayMap.js +0 -9
- package/dist/node_modules/lodash/_assocIndexOf.js +0 -12
- package/dist/node_modules/lodash/_baseGetTag.js +0 -11
- package/dist/node_modules/lodash/_baseHas.js +0 -8
- package/dist/node_modules/lodash/_baseIsArguments.js +0 -10
- package/dist/node_modules/lodash/_baseIsNative.js +0 -17
- package/dist/node_modules/lodash/_baseToString.js +0 -19
- package/dist/node_modules/lodash/_castPath.js +0 -12
- package/dist/node_modules/lodash/_coreJsData.js +0 -5
- package/dist/node_modules/lodash/_freeGlobal.js +0 -5
- package/dist/node_modules/lodash/_getMapData.js +0 -10
- package/dist/node_modules/lodash/_getNative.js +0 -11
- package/dist/node_modules/lodash/_getRawTag.js +0 -16
- package/dist/node_modules/lodash/_getValue.js +0 -7
- package/dist/node_modules/lodash/_hasPath.js +0 -21
- package/dist/node_modules/lodash/_hashClear.js +0 -9
- package/dist/node_modules/lodash/_hashDelete.js +0 -8
- package/dist/node_modules/lodash/_hashGet.js +0 -14
- package/dist/node_modules/lodash/_hashHas.js +0 -10
- package/dist/node_modules/lodash/_hashSet.js +0 -10
- package/dist/node_modules/lodash/_isIndex.js +0 -9
- package/dist/node_modules/lodash/_isKey.js +0 -13
- package/dist/node_modules/lodash/_isKeyable.js +0 -8
- package/dist/node_modules/lodash/_isMasked.js +0 -12
- package/dist/node_modules/lodash/_listCacheClear.js +0 -7
- package/dist/node_modules/lodash/_listCacheDelete.js +0 -13
- package/dist/node_modules/lodash/_listCacheGet.js +0 -10
- package/dist/node_modules/lodash/_listCacheHas.js +0 -9
- package/dist/node_modules/lodash/_listCacheSet.js +0 -10
- package/dist/node_modules/lodash/_mapCacheClear.js +0 -15
- package/dist/node_modules/lodash/_mapCacheDelete.js +0 -10
- package/dist/node_modules/lodash/_mapCacheGet.js +0 -9
- package/dist/node_modules/lodash/_mapCacheHas.js +0 -9
- package/dist/node_modules/lodash/_mapCacheSet.js +0 -10
- package/dist/node_modules/lodash/_memoizeCapped.js +0 -12
- package/dist/node_modules/lodash/_nativeCreate.js +0 -5
- package/dist/node_modules/lodash/_objectToString.js +0 -8
- package/dist/node_modules/lodash/_root.js +0 -5
- package/dist/node_modules/lodash/_stringToPath.js +0 -10
- package/dist/node_modules/lodash/_toKey.js +0 -12
- package/dist/node_modules/lodash/_toSource.js +0 -18
- package/dist/node_modules/lodash/eq.js +0 -7
- package/dist/node_modules/lodash/has.js +0 -12
- package/dist/node_modules/lodash/isArguments.js +0 -10
- package/dist/node_modules/lodash/isArray.js +0 -4
- package/dist/node_modules/lodash/isFunction.js +0 -13
- package/dist/node_modules/lodash/isLength.js +0 -8
- package/dist/node_modules/lodash/isObject.js +0 -8
- package/dist/node_modules/lodash/isObjectLike.js +0 -7
- package/dist/node_modules/lodash/isSymbol.js +0 -10
- package/dist/node_modules/lodash/memoize.js +0 -19
- package/dist/node_modules/lodash/toString.js +0 -9
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { j as e } from "./node_modules/react/jsx-runtime.js";
|
|
2
|
-
import v from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
1
|
+
import { j as e } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
+
import v from "./packages/icons/jsx/ChevronDown.js";
|
|
3
|
+
import { Dropdown as f, TextControl as j, Button as h } from "@wordpress/components";
|
|
4
|
+
import { useState as p, useEffect as c } from "@wordpress/element";
|
|
5
|
+
import n from "classnames";
|
|
6
|
+
import { ButtonToggle as w } from "./ButtonToggle.js";
|
|
7
|
+
import { Wrap as x } from "./Wrap.js";
|
|
8
8
|
function T({
|
|
9
9
|
defaultValue: t,
|
|
10
10
|
options: s,
|
|
11
11
|
swatch: l,
|
|
12
12
|
onPressedChange: u
|
|
13
13
|
}) {
|
|
14
|
-
const [o, i] =
|
|
15
|
-
return
|
|
14
|
+
const [o, i] = p(""), [d, m] = p([]);
|
|
15
|
+
return c(() => {
|
|
16
16
|
m(
|
|
17
17
|
s.filter(
|
|
18
18
|
(r) => r.label.toLowerCase().includes(o.toLowerCase())
|
|
19
19
|
)
|
|
20
20
|
);
|
|
21
|
-
}, [o, s]),
|
|
21
|
+
}, [o, s]), c(() => {
|
|
22
22
|
i(""), m(s);
|
|
23
23
|
}, [t, s]), /* @__PURE__ */ e.jsx(
|
|
24
|
-
|
|
24
|
+
f,
|
|
25
25
|
{
|
|
26
26
|
className: "option-panel-dropdown",
|
|
27
27
|
contentClassName: "option-panel-dropdown-content",
|
|
28
28
|
popoverProps: { placement: "bottom-start" },
|
|
29
|
-
renderToggle: ({ isOpen: r, onToggle:
|
|
30
|
-
|
|
29
|
+
renderToggle: ({ isOpen: r, onToggle: a }) => /* @__PURE__ */ e.jsx(x, { important: !0, children: /* @__PURE__ */ e.jsx(
|
|
30
|
+
h,
|
|
31
31
|
{
|
|
32
32
|
variant: "secondary",
|
|
33
33
|
size: "small",
|
|
34
|
-
onClick:
|
|
34
|
+
onClick: a,
|
|
35
35
|
"aria-expanded": r,
|
|
36
36
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 !bg-transparent !p-0 !text-[11px] !text-current", children: [
|
|
37
37
|
l && /* @__PURE__ */ e.jsx(
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
|
-
className:
|
|
40
|
+
className: n(
|
|
41
41
|
`h-3 w-3 rounded-full bg-${t}`
|
|
42
42
|
)
|
|
43
43
|
}
|
|
@@ -47,9 +47,9 @@ function T({
|
|
|
47
47
|
] })
|
|
48
48
|
}
|
|
49
49
|
) }),
|
|
50
|
-
renderContent: () => /* @__PURE__ */ e.jsx(
|
|
50
|
+
renderContent: () => /* @__PURE__ */ e.jsx(x, { important: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "w-52", children: [
|
|
51
51
|
/* @__PURE__ */ e.jsx(
|
|
52
|
-
|
|
52
|
+
j,
|
|
53
53
|
{
|
|
54
54
|
label: "Search options",
|
|
55
55
|
value: o,
|
|
@@ -59,10 +59,10 @@ function T({
|
|
|
59
59
|
),
|
|
60
60
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 gap-1 !bg-transparent !p-0 !pt-2", children: [
|
|
61
61
|
d.length === 0 && /* @__PURE__ */ e.jsx("div", { className: "!text-gray-medium col-span-2 pb-2 text-center !text-[11px]", children: "No options found." }),
|
|
62
|
-
d.map((r,
|
|
63
|
-
|
|
62
|
+
d.map((r, a) => /* @__PURE__ */ e.jsxs(
|
|
63
|
+
w,
|
|
64
64
|
{
|
|
65
|
-
className:
|
|
65
|
+
className: n({
|
|
66
66
|
"bg-primary": r.value
|
|
67
67
|
}),
|
|
68
68
|
size: "small",
|
|
@@ -75,7 +75,7 @@ function T({
|
|
|
75
75
|
l && /* @__PURE__ */ e.jsx(
|
|
76
76
|
"div",
|
|
77
77
|
{
|
|
78
|
-
className:
|
|
78
|
+
className: n(
|
|
79
79
|
`mr-3 h-3 w-3 rounded-full bg-${r.value}`
|
|
80
80
|
)
|
|
81
81
|
}
|
|
@@ -83,7 +83,7 @@ function T({
|
|
|
83
83
|
r.label
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
|
-
`ButtonToggle__${r.value}___${
|
|
86
|
+
`ButtonToggle__${r.value}___${a}`
|
|
87
87
|
))
|
|
88
88
|
] })
|
|
89
89
|
] }) })
|
package/dist/Badge.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as m } from "./node_modules/react/jsx-runtime.js";
|
|
1
|
+
import { j as m } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
2
|
import r from "classnames";
|
|
3
3
|
const i = ({ children: e, className: t, onClick: s }) => /* @__PURE__ */ m.jsx(
|
|
4
4
|
"div",
|
package/dist/BitePreview.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r } from "./node_modules/react/jsx-runtime.js";
|
|
1
|
+
import { j as r } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
2
|
import { useRef as h, useState as y, useEffect as E, createPortal as w } from "@wordpress/element";
|
|
3
3
|
const j = ({ htmlContent: i, cssContent: s, frontendAssets: a }) => {
|
|
4
4
|
const l = h(null), [o, p] = y(null);
|
package/dist/Button.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ type ButtonProps = {
|
|
|
2
2
|
children?: React.ReactNode;
|
|
3
3
|
asChild?: boolean;
|
|
4
4
|
className?: string;
|
|
5
|
-
display?:
|
|
5
|
+
display?: 'icon' | 'icon-lg' | 'label' | 'auto' | '' | null;
|
|
6
6
|
onClick?: () => void;
|
|
7
7
|
label?: string;
|
|
8
|
-
size?:
|
|
9
|
-
variant?:
|
|
8
|
+
size?: 'small' | 'default' | 'compact';
|
|
9
|
+
variant?: 'primary' | 'secondary' | 'link' | 'primary' | 'tertiary';
|
|
10
10
|
icon?: any;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
};
|
package/dist/Button.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as r } from "./node_modules/react/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import { Button as f } from "@wordpress/components";
|
|
1
|
+
import { j as r } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { Button as a } from "@wordpress/components";
|
|
4
3
|
import c from "classnames";
|
|
4
|
+
import { Icon as f } from "./Icon.js";
|
|
5
5
|
const h = ({
|
|
6
6
|
children: i,
|
|
7
7
|
size: m = "default",
|
|
@@ -15,7 +15,7 @@ const h = ({
|
|
|
15
15
|
}) => {
|
|
16
16
|
const e = s === "icon" || s === "icon-lg";
|
|
17
17
|
return /* @__PURE__ */ r.jsxs(
|
|
18
|
-
|
|
18
|
+
a,
|
|
19
19
|
{
|
|
20
20
|
size: m,
|
|
21
21
|
variant: o,
|
|
@@ -35,7 +35,7 @@ const h = ({
|
|
|
35
35
|
onClick: l,
|
|
36
36
|
children: [
|
|
37
37
|
n && /* @__PURE__ */ r.jsx(
|
|
38
|
-
|
|
38
|
+
f,
|
|
39
39
|
{
|
|
40
40
|
icon: n,
|
|
41
41
|
className: c({ "h-4 w-4": s === "icon-lg" })
|
package/dist/ButtonToggle.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ type ButtonToggleProps = {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
value: string;
|
|
5
5
|
defaultPressed: string;
|
|
6
|
-
variant?:
|
|
7
|
-
size?:
|
|
6
|
+
variant?: 'primary' | 'secondary';
|
|
7
|
+
size?: 'small' | 'default' | 'compact';
|
|
8
8
|
icon?: any;
|
|
9
|
-
display?:
|
|
9
|
+
display?: 'icon' | 'label' | '' | null;
|
|
10
10
|
onPressedChange: (value: string) => void;
|
|
11
11
|
label?: string;
|
|
12
12
|
};
|
|
@@ -22,10 +22,10 @@ type ButtonToggleGroupProps = {
|
|
|
22
22
|
options: ButtonToggleGroupOptionProp[];
|
|
23
23
|
defaultPressed?: string;
|
|
24
24
|
toggle?: boolean;
|
|
25
|
-
size?:
|
|
25
|
+
size?: 'small' | 'default' | 'compact';
|
|
26
26
|
tabs?: boolean;
|
|
27
|
-
display?:
|
|
28
|
-
variant?:
|
|
27
|
+
display?: 'icon' | 'label' | '' | null;
|
|
28
|
+
variant?: 'primary' | 'secondary';
|
|
29
29
|
stretch?: boolean;
|
|
30
30
|
icon?: any;
|
|
31
31
|
onPressedChange?: (value: string) => void;
|
package/dist/ButtonToggle.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { j as s } from "./node_modules/react/jsx-runtime.js";
|
|
2
|
-
import { Icon as d } from "./Icon.js";
|
|
3
|
-
import { Wrap as N } from "./Wrap.js";
|
|
1
|
+
import { j as s } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
4
2
|
import { Button as k } from "@wordpress/components";
|
|
5
3
|
import { memo as p, useState as g, useEffect as w, useCallback as B } from "@wordpress/element";
|
|
6
|
-
import
|
|
4
|
+
import d from "classnames";
|
|
5
|
+
import { Icon as h } from "./Icon.js";
|
|
6
|
+
import { Wrap as N } from "./Wrap.js";
|
|
7
7
|
const E = p(
|
|
8
8
|
({
|
|
9
9
|
children: u,
|
|
@@ -28,7 +28,7 @@ const E = p(
|
|
|
28
28
|
k,
|
|
29
29
|
{
|
|
30
30
|
"aria-label": l,
|
|
31
|
-
className:
|
|
31
|
+
className: d(c, "blockbite-ui__button--default"),
|
|
32
32
|
value: t,
|
|
33
33
|
size: x,
|
|
34
34
|
label: l,
|
|
@@ -37,7 +37,7 @@ const E = p(
|
|
|
37
37
|
isPressed: r,
|
|
38
38
|
onClick: j,
|
|
39
39
|
children: [
|
|
40
|
-
b && /* @__PURE__ */ s.jsx(
|
|
40
|
+
b && /* @__PURE__ */ s.jsx(h, { icon: b }),
|
|
41
41
|
a !== "icon" ? u : null,
|
|
42
42
|
l && !u && a !== "icon" ? /* @__PURE__ */ s.jsx("span", { children: l }) : null
|
|
43
43
|
]
|
|
@@ -67,14 +67,14 @@ const E = p(
|
|
|
67
67
|
n(f), l?.(f);
|
|
68
68
|
},
|
|
69
69
|
[r, l, t]
|
|
70
|
-
), _ = (e) => o === "icon" && e?.icon ? /* @__PURE__ */ s.jsx(
|
|
71
|
-
e.icon && /* @__PURE__ */ s.jsx(
|
|
70
|
+
), _ = (e) => o === "icon" && e?.icon ? /* @__PURE__ */ s.jsx(h, { icon: e.icon }) : o === "label" ? /* @__PURE__ */ s.jsx("span", { children: e.label }) : /* @__PURE__ */ s.jsxs("span", { className: "flex items-center justify-center gap-1", children: [
|
|
71
|
+
e.icon && /* @__PURE__ */ s.jsx(h, { icon: e.icon }),
|
|
72
72
|
/* @__PURE__ */ s.jsx("span", { children: e.label })
|
|
73
73
|
] });
|
|
74
74
|
return /* @__PURE__ */ s.jsx(
|
|
75
75
|
N,
|
|
76
76
|
{
|
|
77
|
-
className:
|
|
77
|
+
className: d(
|
|
78
78
|
"blockbite-ui__button-group flex flex-wrap gap-1",
|
|
79
79
|
u,
|
|
80
80
|
b ? "blockbite-ui__button-group--tabs" : ""
|
|
@@ -82,7 +82,7 @@ const E = p(
|
|
|
82
82
|
children: i.map((e, f) => /* @__PURE__ */ s.jsxs(
|
|
83
83
|
k,
|
|
84
84
|
{
|
|
85
|
-
className:
|
|
85
|
+
className: d("blockbite-ui__button--default", {
|
|
86
86
|
grow: a,
|
|
87
87
|
"justify-center": a
|
|
88
88
|
}),
|
package/dist/Chapter.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { j as e } from "./node_modules/react/jsx-runtime.js";
|
|
2
|
-
import
|
|
3
|
-
import s from "
|
|
1
|
+
import { j as e } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
+
import r from "classnames";
|
|
3
|
+
import { Wrap as s } from "./Wrap.js";
|
|
4
4
|
const p = ({ children: t, title: m }) => /* @__PURE__ */ e.jsxs(
|
|
5
|
-
|
|
5
|
+
s,
|
|
6
6
|
{
|
|
7
|
-
className:
|
|
7
|
+
className: r(
|
|
8
8
|
"text-gray-medium my-2 flex items-center gap-1 text-[12px] font-medium",
|
|
9
|
-
|
|
9
|
+
r
|
|
10
10
|
),
|
|
11
11
|
children: [
|
|
12
|
-
m && /* @__PURE__ */ e.jsx(
|
|
12
|
+
m && /* @__PURE__ */ e.jsx(s, { className: "font-medium", children: m }),
|
|
13
13
|
t
|
|
14
14
|
]
|
|
15
15
|
}
|
package/dist/ChapterDivider.js
CHANGED
package/dist/Checkbox.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { j as r } from "./node_modules/react/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { j as r } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { CheckboxControl as m } from "@wordpress/components";
|
|
3
|
+
import { useState as i, useEffect as x } from "@wordpress/element";
|
|
4
|
+
import { Wrap as n } from "./Wrap.js";
|
|
5
5
|
const f = ({ label: t, help: s, defaultChecked: e }) => {
|
|
6
|
-
const [c, o] =
|
|
7
|
-
return
|
|
6
|
+
const [c, o] = i(e);
|
|
7
|
+
return x(() => {
|
|
8
8
|
o(e);
|
|
9
|
-
}, [e]), /* @__PURE__ */ r.jsx(
|
|
10
|
-
|
|
9
|
+
}, [e]), /* @__PURE__ */ r.jsx(n, { className: "blockbite-ui__checkbox mx-1 flex items-center gap-2", children: /* @__PURE__ */ r.jsx(
|
|
10
|
+
m,
|
|
11
11
|
{
|
|
12
12
|
label: t,
|
|
13
13
|
help: s,
|
package/dist/DropdownPicker.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { j as o } from "./node_modules/react/jsx-runtime.js";
|
|
2
|
-
import p from "./
|
|
3
|
-
import { Icon as n } from "./Icon.js";
|
|
1
|
+
import { j as o } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
+
import p from "./packages/icons/jsx/ChevronDown.js";
|
|
4
3
|
import { DropdownMenu as b } from "@wordpress/components";
|
|
5
4
|
import { useState as f, useEffect as v } from "@wordpress/element";
|
|
6
5
|
import x from "classnames";
|
|
6
|
+
import { Icon as n } from "./Icon.js";
|
|
7
7
|
const O = ({
|
|
8
8
|
label: s,
|
|
9
9
|
className: m,
|
package/dist/EmptyState.js
CHANGED
package/dist/FloatingPanel.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { j as i } from "./node_modules/react/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { j as i } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { FocalPointPicker as p } from "@wordpress/components";
|
|
3
|
+
import { useState as x, useEffect as s } from "@wordpress/element";
|
|
4
|
+
import { Wrap as m } from "./Wrap.js";
|
|
5
5
|
const d = ({
|
|
6
6
|
defaultValue: e,
|
|
7
7
|
onValueChange: a,
|
|
8
8
|
url: c
|
|
9
9
|
}) => {
|
|
10
|
-
const [t, r] =
|
|
10
|
+
const [t, r] = x({
|
|
11
11
|
x: 0.5,
|
|
12
12
|
y: 0.5
|
|
13
13
|
});
|
|
@@ -25,8 +25,8 @@ const d = ({
|
|
|
25
25
|
y: n
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
}, [e]), /* @__PURE__ */ i.jsx(
|
|
29
|
-
|
|
28
|
+
}, [e]), /* @__PURE__ */ i.jsx(m, { className: "relative flex flex-col", children: /* @__PURE__ */ i.jsx(
|
|
29
|
+
p,
|
|
30
30
|
{
|
|
31
31
|
url: c,
|
|
32
32
|
value: t,
|
package/dist/Icon.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as s } from "./node_modules/react/jsx-runtime.js";
|
|
1
|
+
import { j as s } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
2
|
import { Wrap as o } from "./Wrap.js";
|
|
3
3
|
const e = ({ icon: r, className: i = "" }) => r ? /* @__PURE__ */ s.jsxs(o, { className: "blockbite--icon", children: [
|
|
4
4
|
/* @__PURE__ */ s.jsx(r, { className: i }),
|
package/dist/LinkPicker.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { j as e } from "./node_modules/react/jsx-runtime.js";
|
|
2
|
-
import { Wrap as k } from "./Wrap.js";
|
|
1
|
+
import { j as e } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
3
2
|
import b from "@wordpress/api-fetch";
|
|
4
3
|
import { TextControl as h } from "@wordpress/components";
|
|
5
4
|
import { useState as c, useEffect as a } from "@wordpress/element";
|
|
6
5
|
import { __ as p } from "@wordpress/i18n";
|
|
6
|
+
import { Wrap as k } from "./Wrap.js";
|
|
7
7
|
function g(s) {
|
|
8
8
|
const [t, r] = c(""), [i, n] = c([]), [o, u] = c({
|
|
9
9
|
url: "",
|
package/dist/MediaPicker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as l } from "./node_modules/react/jsx-runtime.js";
|
|
1
|
+
import { j as l } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
2
|
import { MediaUploadCheck as a, MediaUpload as m } from "@wordpress/block-editor";
|
|
3
3
|
import { PanelRow as b, Button as n } from "@wordpress/components";
|
|
4
4
|
import { useState as j, useEffect as x } from "@wordpress/element";
|
package/dist/MetricsControl.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type MetricsControlProps = {
|
|
2
2
|
defaultUnit: string;
|
|
3
3
|
defaultValue: string;
|
|
4
|
-
units?: string[] |
|
|
4
|
+
units?: string[] | 'native' | 'percent' | 'grid' | 'arbitrary' | 'fluid' | 'screen' | 'all';
|
|
5
5
|
inputClassName?: string;
|
|
6
6
|
onValueChange: (value: string) => void;
|
|
7
7
|
onUnitChange: (unit: string) => void;
|
package/dist/MetricsControl.js
CHANGED
|
@@ -1,77 +1,76 @@
|
|
|
1
|
-
import { j as e } from "./node_modules/react/jsx-runtime.js";
|
|
2
|
-
import
|
|
1
|
+
import { j as e } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { useState as a, useEffect as d } from "@wordpress/element";
|
|
3
|
+
import h from "./ButtonToggle.js";
|
|
3
4
|
import { DropdownPicker as C } from "./DropdownPicker.js";
|
|
4
5
|
import { Popover as P } from "./Popover.js";
|
|
5
6
|
import w from "./RangeSlider.js";
|
|
6
|
-
import { TextControl as
|
|
7
|
-
import { Wrap as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
import D from "./node_modules/lodash/has.js";
|
|
16
|
-
const X = ({
|
|
7
|
+
import { TextControl as N } from "./TextControl.js";
|
|
8
|
+
import { Wrap as k } from "./Wrap.js";
|
|
9
|
+
import O from "./packages/icons/jsx/ColumnSpacing.js";
|
|
10
|
+
import T from "./packages/icons/jsx/Desktop.js";
|
|
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 = ({
|
|
17
16
|
defaultUnit: l,
|
|
18
17
|
defaultValue: n,
|
|
19
|
-
onValueChange:
|
|
18
|
+
onValueChange: t,
|
|
20
19
|
onUnitChange: g,
|
|
21
20
|
inputClassName: j = "w-[75px]"
|
|
22
21
|
}) => {
|
|
23
|
-
const [
|
|
22
|
+
const [m, c] = a(!1), [v, b] = a([]), [s, f] = a(l), [o, i] = a(""), [x, y] = a(n);
|
|
24
23
|
d(() => {
|
|
25
24
|
l && f(l), n && i(n.toString());
|
|
26
25
|
}, [l, n]), d(() => {
|
|
27
|
-
!
|
|
28
|
-
}, [
|
|
26
|
+
!m && s === "arbitrary" && y(o);
|
|
27
|
+
}, [m]);
|
|
29
28
|
const u = (r) => {
|
|
30
|
-
if (r !== "arbitrary" &&
|
|
29
|
+
if (r !== "arbitrary" && bb?.codex?.units?.spacing?.[r]) {
|
|
31
30
|
const p = bb.codex.units.spacing[r];
|
|
32
31
|
b(
|
|
33
32
|
Array.isArray(p) ? p : Object.keys(p)
|
|
34
33
|
);
|
|
35
34
|
} else
|
|
36
35
|
b([]);
|
|
37
|
-
|
|
38
|
-
},
|
|
36
|
+
c(!0);
|
|
37
|
+
}, S = [
|
|
39
38
|
{
|
|
40
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
39
|
+
icon: /* @__PURE__ */ e.jsx(D, {}),
|
|
41
40
|
label: "Tailwind CSS Units",
|
|
42
41
|
value: "native"
|
|
43
42
|
},
|
|
44
|
-
{ icon: /* @__PURE__ */ e.jsx(
|
|
45
|
-
{ icon: /* @__PURE__ */ e.jsx(
|
|
46
|
-
{ icon: /* @__PURE__ */ e.jsx(
|
|
47
|
-
{ icon: /* @__PURE__ */ e.jsx(
|
|
48
|
-
{ icon: /* @__PURE__ */ e.jsx(
|
|
43
|
+
{ icon: /* @__PURE__ */ e.jsx(G, {}), label: "Percentage Units", value: "percent" },
|
|
44
|
+
{ icon: /* @__PURE__ */ e.jsx(R, {}), label: "Grid Units", value: "grid" },
|
|
45
|
+
{ icon: /* @__PURE__ */ e.jsx(T, {}), label: "Screen Units", value: "screen" },
|
|
46
|
+
{ icon: /* @__PURE__ */ e.jsx(A, {}), label: "Pixel Units", value: "arbitrary" },
|
|
47
|
+
{ icon: /* @__PURE__ */ e.jsx(O, {}), label: "Fluid Units", value: "fluid" }
|
|
49
48
|
];
|
|
50
|
-
return /* @__PURE__ */ e.jsx(
|
|
51
|
-
|
|
49
|
+
return /* @__PURE__ */ e.jsx(k, { className: "relative flex flex-col items-baseline", children: /* @__PURE__ */ e.jsxs(
|
|
50
|
+
N,
|
|
52
51
|
{
|
|
53
52
|
inputClassName: j,
|
|
54
53
|
defaultValue: (
|
|
55
54
|
// Remove the "b_" prefix for grid units
|
|
56
|
-
s === "grid" ?
|
|
55
|
+
s === "grid" ? o.replace("b_", "") : o
|
|
57
56
|
),
|
|
58
57
|
onClick: () => s !== "arbitrary" && u(s),
|
|
59
58
|
onChange: (r) => {
|
|
60
|
-
i(r),
|
|
59
|
+
i(r), t(r);
|
|
61
60
|
},
|
|
62
61
|
readOnly: s !== "arbitrary",
|
|
63
62
|
children: [
|
|
64
63
|
/* @__PURE__ */ e.jsx(
|
|
65
64
|
P,
|
|
66
65
|
{
|
|
67
|
-
visible:
|
|
66
|
+
visible: m,
|
|
68
67
|
position: "bottom left",
|
|
69
68
|
className: "w-[300px] bg-white shadow-sm",
|
|
70
|
-
onVisibleChange:
|
|
69
|
+
onVisibleChange: c,
|
|
71
70
|
children: s === "arbitrary" ? /* @__PURE__ */ e.jsx(
|
|
72
71
|
w,
|
|
73
72
|
{
|
|
74
|
-
defaultValue:
|
|
73
|
+
defaultValue: o,
|
|
75
74
|
label: "Pixel Value",
|
|
76
75
|
min: 0,
|
|
77
76
|
max: 100,
|
|
@@ -80,24 +79,24 @@ const X = ({
|
|
|
80
79
|
allowReset: !0,
|
|
81
80
|
resetFallbackValue: isNaN(x.toString()) ? 0 : Number(x) / 16,
|
|
82
81
|
onValueChange: (r) => {
|
|
83
|
-
i(r),
|
|
82
|
+
i(r), t(r);
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
85
|
) : /* @__PURE__ */ e.jsx(
|
|
87
|
-
|
|
86
|
+
h,
|
|
88
87
|
{
|
|
89
88
|
className: "mt-4",
|
|
90
89
|
options: v.map((r) => ({
|
|
91
90
|
value: r,
|
|
92
91
|
label: s === "grid" ? r.toString().replace("b_", "") : r,
|
|
93
92
|
onClick: () => {
|
|
94
|
-
i(r),
|
|
93
|
+
i(r), t(r);
|
|
95
94
|
}
|
|
96
95
|
})),
|
|
97
96
|
size: "small",
|
|
98
|
-
defaultPressed:
|
|
97
|
+
defaultPressed: o?.toString() || "",
|
|
99
98
|
onPressedChange: (r) => {
|
|
100
|
-
i(r),
|
|
99
|
+
i(r), t(r);
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
102
|
)
|
|
@@ -108,9 +107,9 @@ const X = ({
|
|
|
108
107
|
{
|
|
109
108
|
className: "h-[32px]",
|
|
110
109
|
defaultValue: s,
|
|
111
|
-
options:
|
|
110
|
+
options: S,
|
|
112
111
|
onPressedChange: (r) => {
|
|
113
|
-
r === "reset" ? (i(""),
|
|
112
|
+
r === "reset" ? (i(""), t(""), c(!1)) : (f(r), g(r), u(r));
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
115
|
)
|
|
@@ -119,5 +118,5 @@ const X = ({
|
|
|
119
118
|
) });
|
|
120
119
|
};
|
|
121
120
|
export {
|
|
122
|
-
|
|
121
|
+
L as default
|
|
123
122
|
};
|
package/dist/Modal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r } from "./node_modules/react/jsx-runtime.js";
|
|
1
|
+
import { j as r } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
2
|
import { createContext as j, useContext 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";
|
package/dist/Notice.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type NoticeProps = {
|
|
2
2
|
children: React.ReactNode;
|
|
3
3
|
className?: string;
|
|
4
|
-
status?:
|
|
4
|
+
status?: 'success' | 'error' | 'warning' | 'info';
|
|
5
5
|
};
|
|
6
6
|
export declare const Notice: ({ children, status, className, }: NoticeProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
package/dist/Notice.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { j as s } from "./node_modules/react/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import p from "
|
|
1
|
+
import { j as s } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { Notice as c } from "@wordpress/components";
|
|
3
|
+
import { useState as i } from "@wordpress/element";
|
|
4
|
+
import a from "classnames";
|
|
5
|
+
import { Wrap as p } from "./Wrap.js";
|
|
6
6
|
const x = ({
|
|
7
7
|
children: e,
|
|
8
8
|
status: t = "success",
|
|
9
9
|
className: r
|
|
10
10
|
}) => {
|
|
11
|
-
const [m, o] =
|
|
12
|
-
return /* @__PURE__ */ s.jsx(
|
|
13
|
-
|
|
11
|
+
const [m, o] = i(!0);
|
|
12
|
+
return /* @__PURE__ */ s.jsx(p, { onClick: () => o(!1), children: m && /* @__PURE__ */ s.jsx(
|
|
13
|
+
c,
|
|
14
14
|
{
|
|
15
15
|
status: t,
|
|
16
|
-
className:
|
|
16
|
+
className: a(r),
|
|
17
17
|
onRemove: () => o(!1),
|
|
18
18
|
children: e
|
|
19
19
|
}
|
package/dist/PasswordInput.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as s } from "./node_modules/react/jsx-runtime.js";
|
|
1
|
+
import { j as s } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
2
|
import { __experimentalInputControl as p, __experimentalInputControlSuffixWrapper as a, Button as i } from "@wordpress/components";
|
|
3
3
|
import { useState as m } from "@wordpress/element";
|
|
4
4
|
import { SVG as x, Path as c } from "@wordpress/primitives";
|
package/dist/Popover.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as s } from "./node_modules/react/jsx-runtime.js";
|
|
2
|
-
import p from "./
|
|
1
|
+
import { j as s } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
|
|
2
|
+
import p from "./packages/icons/jsx/Cross2.js";
|
|
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 = ({
|