@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.
Files changed (53) hide show
  1. package/dist/AutocompleteDropdown.d.ts +1 -1
  2. package/dist/AutocompleteDropdown.js +24 -24
  3. package/dist/BitePreview.d.ts +1 -2
  4. package/dist/BitePreview.js +9 -9
  5. package/dist/ButtonToggle.d.ts +3 -4
  6. package/dist/ButtonToggle.js +13 -14
  7. package/dist/DropdownPicker.js +1 -1
  8. package/dist/EmptyState.d.ts +1 -1
  9. package/dist/EmptyState.js +5 -5
  10. package/dist/FloatingPanel.d.ts +1 -1
  11. package/dist/FloatingPanel.js +12 -12
  12. package/dist/FocalPointControl.d.ts +1 -1
  13. package/dist/FocalPointControl.js +1 -0
  14. package/dist/LinkPicker.d.ts +1 -1
  15. package/dist/LinkPicker.js +16 -16
  16. package/dist/MediaPicker.d.ts +1 -1
  17. package/dist/MediaPicker.js +14 -14
  18. package/dist/MetricsControl.d.ts +1 -1
  19. package/dist/MetricsControl.js +51 -55
  20. package/dist/Modal.d.ts +7 -7
  21. package/dist/Modal.js +3 -3
  22. package/dist/Popover.js +1 -1
  23. package/dist/RangeSlider.d.ts +1 -2
  24. package/dist/RangeSlider.js +26 -26
  25. package/dist/ResponsiveImage.d.ts +1 -1
  26. package/dist/ResponsiveImage.js +6 -6
  27. package/dist/ResponsiveVideo.d.ts +1 -1
  28. package/dist/ResponsiveVideo.js +2 -2
  29. package/dist/SectionList.d.ts +1 -1
  30. package/dist/SectionList.js +18 -18
  31. package/dist/SingleBlockTypeAppender.d.ts +2 -2
  32. package/dist/SingleBlockTypeAppender.js +7 -7
  33. package/dist/Tabs.d.ts +5 -0
  34. package/dist/Tabs.js +22 -17
  35. package/dist/TextControlLabel.js +1 -1
  36. package/dist/ToggleGroup.d.ts +2 -2
  37. package/dist/index.d.ts +48 -0
  38. package/dist/index.js +88 -0
  39. package/package.json +24 -20
  40. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.js +0 -589
  41. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -28
  42. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js +0 -8
  43. package/dist/packages/icons/jsx/ChevronDown.js +0 -23
  44. package/dist/packages/icons/jsx/ColumnSpacing.js +0 -25
  45. package/dist/packages/icons/jsx/Cross2.js +0 -23
  46. package/dist/packages/icons/jsx/Desktop.js +0 -25
  47. package/dist/packages/icons/jsx/Grid.js +0 -25
  48. package/dist/packages/icons/jsx/Pencil1.js +0 -25
  49. package/dist/packages/icons/jsx/Percentage.js +0 -28
  50. package/dist/packages/icons/jsx/Plus.js +0 -23
  51. package/dist/packages/icons/jsx/Slider.js +0 -25
  52. package/dist/packages/icons/jsx/Tailwind.js +0 -23
  53. package/dist/packages/icons/jsx/Trash.js +0 -25
@@ -1,73 +1,68 @@
1
- import { j as e } from "./node_modules/.pnpm/react@18.2.0/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 { useState as a, useEffect as d } from "@wordpress/element";
3
- import h from "./ButtonToggle.js";
4
- import { DropdownPicker as C } from "./DropdownPicker.js";
5
- import { Popover as P } from "./Popover.js";
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 "./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 = ({
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 [m, c] = a(!1), [v, b] = a([]), [s, f] = a(l), [o, i] = a(""), [x, y] = a(n);
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 && f(l), n && i(n.toString());
19
+ l && x(l), n && i(n.toString());
25
20
  }, [l, n]), d(() => {
26
- !m && s === "arbitrary" && y(o);
27
- }, [m]);
28
- const u = (r) => {
29
- if (r !== "arbitrary" && bb?.codex?.units?.spacing?.[r]) {
30
- const p = bb.codex.units.spacing[r];
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
- c(!0);
37
- }, S = [
31
+ m(!0);
32
+ }, y = [
38
33
  {
39
- icon: /* @__PURE__ */ e.jsx(D, {}),
34
+ icon: /* @__PURE__ */ s.jsx(O, {}),
40
35
  label: "Tailwind CSS Units",
41
36
  value: "native"
42
37
  },
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" }
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__ */ e.jsx(k, { className: "relative flex flex-col items-baseline", children: /* @__PURE__ */ e.jsxs(
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
- s === "grid" ? o.replace("b_", "") : o
50
+ r === "grid" ? o.replace("b_", "") : o
56
51
  ),
57
- onClick: () => s !== "arbitrary" && u(s),
58
- onChange: (r) => {
59
- i(r), t(r);
52
+ onClick: () => r !== "arbitrary" && f(r),
53
+ onChange: (e) => {
54
+ i(e), t(e);
60
55
  },
61
- readOnly: s !== "arbitrary",
56
+ readOnly: r !== "arbitrary",
62
57
  children: [
63
- /* @__PURE__ */ e.jsx(
64
- P,
58
+ /* @__PURE__ */ s.jsx(
59
+ C,
65
60
  {
66
- visible: m,
61
+ visible: c,
67
62
  position: "bottom left",
68
63
  className: "w-[300px] bg-white shadow-sm",
69
- onVisibleChange: c,
70
- children: s === "arbitrary" ? /* @__PURE__ */ e.jsx(
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(x.toString()) ? 0 : Number(x) / 16,
81
- onValueChange: (r) => {
82
- i(r), t(r);
75
+ resetFallbackValue: isNaN(u.toString()) ? 0 : Number(u) / 16,
76
+ onValueChange: (e) => {
77
+ i(e), t(e);
83
78
  }
84
79
  }
85
- ) : /* @__PURE__ */ e.jsx(
80
+ ) : /* @__PURE__ */ s.jsx(
86
81
  h,
87
82
  {
88
83
  className: "mt-4",
89
- options: v.map((r) => ({
90
- value: r,
91
- label: s === "grid" ? r.toString().replace("b_", "") : r,
84
+ options: v.map((e) => ({
85
+ value: e,
86
+ label: r === "grid" ? e.toString().replace("b_", "") : e,
92
87
  onClick: () => {
93
- i(r), t(r);
88
+ i(e), t(e);
94
89
  }
95
90
  })),
96
91
  size: "small",
97
92
  defaultPressed: o?.toString() || "",
98
- onPressedChange: (r) => {
99
- i(r), t(r);
93
+ onPressedChange: (e) => {
94
+ i(e), t(e);
100
95
  }
101
96
  }
102
97
  )
103
98
  }
104
99
  ),
105
- /* @__PURE__ */ e.jsx(
106
- C,
100
+ /* @__PURE__ */ s.jsx(
101
+ P,
107
102
  {
108
103
  className: "h-[32px]",
109
- defaultValue: s,
110
- options: S,
111
- onPressedChange: (r) => {
112
- r === "reset" ? (i(""), t(""), c(!1)) : (f(r), g(r), u(r));
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
- L as default
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 { Modal, ModalClose, ModalContent, ModalFooter, ModalHeader, ModalTrigger, };
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 { createContext as j, useContext as b, useState as v, useEffect as u, Children as a, isValidElement as l } from "@wordpress/element";
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 = j(null), d = () => {
6
- const e = b(i);
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 "./packages/icons/jsx/Cross2.js";
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 = ({
@@ -9,5 +9,4 @@ export type RangeControlType = {
9
9
  showTooltip?: boolean;
10
10
  [key: string]: any;
11
11
  };
12
- declare const RangeControl: React.FC<RangeControlType>;
13
- export default RangeControl;
12
+ export declare const RangeSlider: React.FC<RangeControlType>;
@@ -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 r, useEffect as h } from "@wordpress/element";
3
- import { Wrap as j } from "./Wrap.js";
4
- import { RangeControl as C } from "@wordpress/components";
5
- const $ = ({
6
- defaultValue: t,
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: f = 0,
9
- max: p = 2e3,
10
- withInputField: c = !1,
8
+ min: p = 0,
9
+ max: c = 2e3,
10
+ withInputField: f = !1,
11
11
  onValueChange: m,
12
12
  gridMode: n = !1,
13
- showTooltip: u = !1,
13
+ showTooltip: i = !1,
14
14
  ...x
15
15
  }) => {
16
- const [i] = r(0), [s, o] = r(0);
17
- h(() => {
18
- o(Math.round(parseInt(t) / (n ? 16 : 1)));
19
- }, [t]);
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 R = e * (n ? 16 : 1);
22
- m(R.toString());
21
+ const h = e * (n ? 16 : 1);
22
+ m(h.toString());
23
23
  }
24
- return /* @__PURE__ */ a.jsxs(j, { className: "flex min-w-[240px] flex-col", children: [
24
+ return /* @__PURE__ */ a.jsxs(R, { className: "flex min-w-[240px] flex-col", children: [
25
25
  /* @__PURE__ */ a.jsx(
26
- C,
26
+ S,
27
27
  {
28
28
  label: l,
29
- value: s,
30
- min: f,
31
- max: p,
32
- showTooltip: u,
33
- withInputField: c,
29
+ value: t,
30
+ min: p,
31
+ max: c,
32
+ showTooltip: i,
33
+ withInputField: f,
34
34
  onChange: (e) => {
35
- o(e), g(e);
35
+ r(e), g(e);
36
36
  },
37
- resetFallbackValue: i,
37
+ resetFallbackValue: u,
38
38
  ...x
39
39
  }
40
40
  ),
41
41
  /* @__PURE__ */ a.jsxs("span", { children: [
42
- n ? `${s * 16}px` : null,
42
+ n ? `${t * 16}px` : null,
43
43
  " "
44
44
  ] })
45
45
  ] });
46
46
  };
47
47
  export {
48
- $ as default
48
+ b as RangeSlider
49
49
  };
@@ -1 +1 @@
1
- export default function ResponsiveImage(props: any): import("react/jsx-runtime").JSX.Element;
1
+ export declare function ResponsiveImage(props: any): import("react/jsx-runtime").JSX.Element;
@@ -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: t } = r;
4
- if (t === void 0)
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: u, large: o } = t, c = d || m, a = u || m, l = o || m;
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
- c ? /* @__PURE__ */ s.jsx(
8
+ t ? /* @__PURE__ */ s.jsx(
9
9
  "source",
10
10
  {
11
11
  media: "(max-width: 768px)",
12
- srcSet: c,
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 default
36
+ f as ResponsiveImage
37
37
  };
@@ -1 +1 @@
1
- export default function ResponsiveVideo(props: any): import("react/jsx-runtime").JSX.Element;
1
+ export declare function ResponsiveVideo(props: any): import("react/jsx-runtime").JSX.Element;
@@ -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 a(o) {
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
- a as default
19
+ u as ResponsiveVideo
20
20
  };
@@ -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;
@@ -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 "classnames";
6
- import { TextControl as R } from "./TextControl.js";
7
- import k from "./packages/icons/jsx/Plus.js";
8
- import _ from "./packages/icons/jsx/Trash.js";
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: o,
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, d] = w({
18
+ const [i, o] = w({
20
19
  id: "",
21
20
  name: ""
22
21
  }), h = v(null), j = () => {
23
22
  const e = { ...s() };
24
- o([...a, e]);
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
- o(e), m(l), f(e.find((r) => r.id === l)?.code || "");
37
+ d(e), m(l), f(e.find((r) => r.id === l)?.code || "");
39
38
  }, y = (e) => {
40
- o(
39
+ d(
41
40
  (l) => l.map(
42
41
  (r) => r.id === i.id ? { ...r, name: e } : r
43
42
  )
44
- ), d({
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: C(
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
- d({
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
- R,
78
+ _,
80
79
  {
81
80
  className: "absolute left-0 top-0 h-full w-full",
82
81
  defaultValue: i.name,
83
- onChange: (r) => d({
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(k, {}),
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
- E as default
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 default SingleBlockTypeAppender;
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: d, dispatch: k } = wp.data, u = ({
5
- buttonText: e = "Add block"
4
+ const { select: k, dispatch: d } = wp.data, u = ({
5
+ buttonText: c = "Add block"
6
6
  }) => {
7
- const c = () => {
8
- const r = d("core/block-editor").getSelectedBlock(), { clientId: n, innerBlocks: o } = r, t = o[o.length - 1], l = i(
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
- k("core/block-editor").insertBlocks(l, 0, n);
13
+ d("core/block-editor").insertBlocks(l, 0, n);
14
14
  };
15
- return /* @__PURE__ */ s.jsx(a, { variant: "primary", onClick: () => c(), children: e });
15
+ return /* @__PURE__ */ s.jsx(a, { variant: "primary", onClick: () => e(), children: c });
16
16
  };
17
17
  export {
18
- u as default
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 p } from "@wordpress/components";
3
- import { createContext as v, useState as u, useContext as b } from "@wordpress/element";
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 = v(null), S = ({
6
+ const i = u(null), f = ({
7
7
  children: s,
8
8
  defaultValue: a,
9
9
  value: t,
10
10
  onValueChange: e,
11
- ...o
11
+ ...n
12
12
  }) => {
13
- const n = t !== void 0, [c, T] = u(a || ""), x = {
14
- activeTab: n ? t : c,
13
+ const o = t !== void 0, [c, T] = v(a || ""), p = {
14
+ activeTab: o ? t : c,
15
15
  setActiveTab: (l) => {
16
- n || T(l), e && e(l);
16
+ o || T(l), e && e(l);
17
17
  }
18
18
  };
19
- return /* @__PURE__ */ r.jsx(i.Provider, { value: x, children: /* @__PURE__ */ r.jsx(m, { important: !0, className: o.className, children: s }) });
20
- }, W = ({
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 o = b(i), n = e || o?.setActiveTab;
26
+ const n = b(i), o = e || n?.setActiveTab;
27
27
  return /* @__PURE__ */ r.jsx(
28
- p,
28
+ x,
29
29
  {
30
30
  className: d("tabs-list", t),
31
31
  tabs: s,
32
32
  onSelect: (c) => {
33
- n(c);
33
+ o(c);
34
34
  },
35
35
  children: () => a
36
36
  }
37
37
  );
38
- }, E = ({
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 TabsContent,
45
- W as TabsList,
46
- S as TabsWrapper
48
+ E as Tabs,
49
+ C as TabsContent,
50
+ j as TabsList,
51
+ f as TabsWrapper
47
52
  };
@@ -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 "./packages/icons/jsx/Pencil1.js";
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 = ({
@@ -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 { ToggleGroup };
15
+ export declare const ToggleGroup: React.FC<ToggleProps>;
16
+ export {};