@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.
Files changed (138) hide show
  1. package/dist/AutocompleteDropdown.js +22 -22
  2. package/dist/Badge.js +1 -1
  3. package/dist/BitePreview.js +1 -1
  4. package/dist/Button.d.ts +3 -3
  5. package/dist/Button.js +5 -5
  6. package/dist/ButtonToggle.d.ts +6 -6
  7. package/dist/ButtonToggle.js +10 -10
  8. package/dist/Chapter.js +7 -7
  9. package/dist/ChapterDivider.js +1 -1
  10. package/dist/Checkbox.js +8 -8
  11. package/dist/DisappearingMessage.js +1 -1
  12. package/dist/DropdownPicker.js +3 -3
  13. package/dist/EmptyState.js +1 -1
  14. package/dist/FloatingPanel.js +1 -1
  15. package/dist/FocalPointControl.js +7 -7
  16. package/dist/Icon.js +1 -1
  17. package/dist/LinkPicker.js +2 -2
  18. package/dist/MediaPicker.js +1 -1
  19. package/dist/MetricsControl.d.ts +1 -1
  20. package/dist/MetricsControl.js +40 -41
  21. package/dist/Modal.js +1 -1
  22. package/dist/Notice.d.ts +1 -1
  23. package/dist/Notice.js +9 -9
  24. package/dist/PasswordInput.js +1 -1
  25. package/dist/Popover.js +2 -2
  26. package/dist/RangeSlider.js +5 -5
  27. package/dist/ResponsiveImage.js +1 -1
  28. package/dist/ResponsiveVideo.js +1 -1
  29. package/dist/ScrollList.d.ts +1 -1
  30. package/dist/ScrollList.js +5 -5
  31. package/dist/SectionList.js +25 -25
  32. package/dist/SelectControlWrapper.js +1 -1
  33. package/dist/SingleBlockTypeAppender.js +1 -1
  34. package/dist/SlideIn.js +8 -8
  35. package/dist/Spinner.js +1 -1
  36. package/dist/Tabs.js +6 -6
  37. package/dist/Tag.js +1 -1
  38. package/dist/TextControl.js +5 -5
  39. package/dist/TextControlLabel.js +6 -6
  40. package/dist/ToggleGroup.d.ts +3 -3
  41. package/dist/ToggleGroup.js +7 -7
  42. package/dist/ToggleSwitch.js +9 -9
  43. package/dist/Wrap.js +1 -1
  44. package/dist/node_modules/{react → .pnpm/react@18.2.0/node_modules/react}/cjs/react-jsx-runtime.development.js +204 -219
  45. package/dist/node_modules/{react → .pnpm/react@18.2.0/node_modules/react}/cjs/react-jsx-runtime.production.min.js +1 -1
  46. package/dist/node_modules/{react → .pnpm/react@18.2.0/node_modules/react}/jsx-runtime.js +1 -1
  47. package/dist/packages/icons/jsx/ChevronDown.js +23 -0
  48. package/dist/packages/icons/jsx/ColumnSpacing.js +25 -0
  49. package/dist/packages/icons/jsx/Cross2.js +23 -0
  50. package/dist/packages/icons/jsx/Desktop.js +25 -0
  51. package/dist/packages/icons/jsx/Grid.js +25 -0
  52. package/dist/packages/icons/jsx/Pencil1.js +25 -0
  53. package/dist/packages/icons/jsx/Percentage.js +28 -0
  54. package/dist/packages/icons/jsx/Plus.js +23 -0
  55. package/dist/packages/icons/jsx/Slider.js +25 -0
  56. package/dist/packages/icons/jsx/Tailwind.js +23 -0
  57. package/dist/packages/icons/jsx/Trash.js +25 -0
  58. package/package.json +24 -26
  59. package/dist/_virtual/ChevronDown.js +0 -4
  60. package/dist/_virtual/ColumnSpacing.js +0 -4
  61. package/dist/_virtual/Cross2.js +0 -4
  62. package/dist/_virtual/Desktop.js +0 -4
  63. package/dist/_virtual/Grid.js +0 -4
  64. package/dist/_virtual/Pencil1.js +0 -4
  65. package/dist/_virtual/Percentage.js +0 -4
  66. package/dist/_virtual/Plus.js +0 -4
  67. package/dist/_virtual/Slider.js +0 -4
  68. package/dist/_virtual/Tailwind.js +0 -4
  69. package/dist/_virtual/Trash.js +0 -4
  70. package/dist/_virtual/_commonjsHelpers.js +0 -8
  71. package/dist/node_modules/@blockbite/icons/dist/ChevronDown.js +0 -63
  72. package/dist/node_modules/@blockbite/icons/dist/ColumnSpacing.js +0 -65
  73. package/dist/node_modules/@blockbite/icons/dist/Cross2.js +0 -63
  74. package/dist/node_modules/@blockbite/icons/dist/Desktop.js +0 -65
  75. package/dist/node_modules/@blockbite/icons/dist/Grid.js +0 -65
  76. package/dist/node_modules/@blockbite/icons/dist/Pencil1.js +0 -65
  77. package/dist/node_modules/@blockbite/icons/dist/Percentage.js +0 -74
  78. package/dist/node_modules/@blockbite/icons/dist/Plus.js +0 -63
  79. package/dist/node_modules/@blockbite/icons/dist/Slider.js +0 -65
  80. package/dist/node_modules/@blockbite/icons/dist/Tailwind.js +0 -63
  81. package/dist/node_modules/@blockbite/icons/dist/Trash.js +0 -65
  82. package/dist/node_modules/lodash/_Hash.js +0 -22
  83. package/dist/node_modules/lodash/_ListCache.js +0 -22
  84. package/dist/node_modules/lodash/_Map.js +0 -6
  85. package/dist/node_modules/lodash/_MapCache.js +0 -22
  86. package/dist/node_modules/lodash/_Symbol.js +0 -5
  87. package/dist/node_modules/lodash/_arrayMap.js +0 -9
  88. package/dist/node_modules/lodash/_assocIndexOf.js +0 -12
  89. package/dist/node_modules/lodash/_baseGetTag.js +0 -11
  90. package/dist/node_modules/lodash/_baseHas.js +0 -8
  91. package/dist/node_modules/lodash/_baseIsArguments.js +0 -10
  92. package/dist/node_modules/lodash/_baseIsNative.js +0 -17
  93. package/dist/node_modules/lodash/_baseToString.js +0 -19
  94. package/dist/node_modules/lodash/_castPath.js +0 -12
  95. package/dist/node_modules/lodash/_coreJsData.js +0 -5
  96. package/dist/node_modules/lodash/_freeGlobal.js +0 -5
  97. package/dist/node_modules/lodash/_getMapData.js +0 -10
  98. package/dist/node_modules/lodash/_getNative.js +0 -11
  99. package/dist/node_modules/lodash/_getRawTag.js +0 -16
  100. package/dist/node_modules/lodash/_getValue.js +0 -7
  101. package/dist/node_modules/lodash/_hasPath.js +0 -21
  102. package/dist/node_modules/lodash/_hashClear.js +0 -9
  103. package/dist/node_modules/lodash/_hashDelete.js +0 -8
  104. package/dist/node_modules/lodash/_hashGet.js +0 -14
  105. package/dist/node_modules/lodash/_hashHas.js +0 -10
  106. package/dist/node_modules/lodash/_hashSet.js +0 -10
  107. package/dist/node_modules/lodash/_isIndex.js +0 -9
  108. package/dist/node_modules/lodash/_isKey.js +0 -13
  109. package/dist/node_modules/lodash/_isKeyable.js +0 -8
  110. package/dist/node_modules/lodash/_isMasked.js +0 -12
  111. package/dist/node_modules/lodash/_listCacheClear.js +0 -7
  112. package/dist/node_modules/lodash/_listCacheDelete.js +0 -13
  113. package/dist/node_modules/lodash/_listCacheGet.js +0 -10
  114. package/dist/node_modules/lodash/_listCacheHas.js +0 -9
  115. package/dist/node_modules/lodash/_listCacheSet.js +0 -10
  116. package/dist/node_modules/lodash/_mapCacheClear.js +0 -15
  117. package/dist/node_modules/lodash/_mapCacheDelete.js +0 -10
  118. package/dist/node_modules/lodash/_mapCacheGet.js +0 -9
  119. package/dist/node_modules/lodash/_mapCacheHas.js +0 -9
  120. package/dist/node_modules/lodash/_mapCacheSet.js +0 -10
  121. package/dist/node_modules/lodash/_memoizeCapped.js +0 -12
  122. package/dist/node_modules/lodash/_nativeCreate.js +0 -5
  123. package/dist/node_modules/lodash/_objectToString.js +0 -8
  124. package/dist/node_modules/lodash/_root.js +0 -5
  125. package/dist/node_modules/lodash/_stringToPath.js +0 -10
  126. package/dist/node_modules/lodash/_toKey.js +0 -12
  127. package/dist/node_modules/lodash/_toSource.js +0 -18
  128. package/dist/node_modules/lodash/eq.js +0 -7
  129. package/dist/node_modules/lodash/has.js +0 -12
  130. package/dist/node_modules/lodash/isArguments.js +0 -10
  131. package/dist/node_modules/lodash/isArray.js +0 -4
  132. package/dist/node_modules/lodash/isFunction.js +0 -13
  133. package/dist/node_modules/lodash/isLength.js +0 -8
  134. package/dist/node_modules/lodash/isObject.js +0 -8
  135. package/dist/node_modules/lodash/isObjectLike.js +0 -7
  136. package/dist/node_modules/lodash/isSymbol.js +0 -10
  137. package/dist/node_modules/lodash/memoize.js +0 -19
  138. 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 "./node_modules/@blockbite/icons/dist/ChevronDown.js";
3
- import { ButtonToggle as f } from "./ButtonToggle.js";
4
- import { Wrap as p } from "./Wrap.js";
5
- import { Dropdown as j, TextControl as h, Button as w } from "@wordpress/components";
6
- import { useState as c, useEffect as x } from "@wordpress/element";
7
- import a from "classnames";
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] = c(""), [d, m] = c([]);
15
- return x(() => {
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]), x(() => {
21
+ }, [o, s]), c(() => {
22
22
  i(""), m(s);
23
23
  }, [t, s]), /* @__PURE__ */ e.jsx(
24
- j,
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: n }) => /* @__PURE__ */ e.jsx(p, { important: !0, children: /* @__PURE__ */ e.jsx(
30
- w,
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: n,
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: a(
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(p, { important: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "w-52", children: [
50
+ renderContent: () => /* @__PURE__ */ e.jsx(x, { important: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "w-52", children: [
51
51
  /* @__PURE__ */ e.jsx(
52
- h,
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, n) => /* @__PURE__ */ e.jsxs(
63
- f,
62
+ d.map((r, a) => /* @__PURE__ */ e.jsxs(
63
+ w,
64
64
  {
65
- className: a({
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: a(
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}___${n}`
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",
@@ -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?: "icon" | "icon-lg" | "label" | "auto" | "" | null;
5
+ display?: 'icon' | 'icon-lg' | 'label' | 'auto' | '' | null;
6
6
  onClick?: () => void;
7
7
  label?: string;
8
- size?: "small" | "default" | "compact";
9
- variant?: "primary" | "secondary" | "link" | "primary" | "tertiary";
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 { Icon as a } from "./Icon.js";
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
- f,
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
- a,
38
+ f,
39
39
  {
40
40
  icon: n,
41
41
  className: c({ "h-4 w-4": s === "icon-lg" })
@@ -3,10 +3,10 @@ type ButtonToggleProps = {
3
3
  className?: string;
4
4
  value: string;
5
5
  defaultPressed: string;
6
- variant?: "primary" | "secondary";
7
- size?: "small" | "default" | "compact";
6
+ variant?: 'primary' | 'secondary';
7
+ size?: 'small' | 'default' | 'compact';
8
8
  icon?: any;
9
- display?: "icon" | "label" | "" | null;
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?: "small" | "default" | "compact";
25
+ size?: 'small' | 'default' | 'compact';
26
26
  tabs?: boolean;
27
- display?: "icon" | "label" | "" | null;
28
- variant?: "primary" | "secondary";
27
+ display?: 'icon' | 'label' | '' | null;
28
+ variant?: 'primary' | 'secondary';
29
29
  stretch?: boolean;
30
30
  icon?: any;
31
31
  onPressedChange?: (value: string) => void;
@@ -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 h from "classnames";
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: h(c, "blockbite-ui__button--default"),
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(d, { icon: b }),
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(d, { 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(d, { icon: e.icon }),
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: h(
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: h("blockbite-ui__button--default", {
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 { Wrap as r } from "./Wrap.js";
3
- import s from "classnames";
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
- r,
5
+ s,
6
6
  {
7
- className: s(
7
+ className: r(
8
8
  "text-gray-medium my-2 flex items-center gap-1 text-[12px] font-medium",
9
- s
9
+ r
10
10
  ),
11
11
  children: [
12
- m && /* @__PURE__ */ e.jsx(r, { className: "font-medium", children: m }),
12
+ m && /* @__PURE__ */ e.jsx(s, { className: "font-medium", children: m }),
13
13
  t
14
14
  ]
15
15
  }
@@ -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 m from "classnames";
3
3
  const i = ({
4
4
  id: l = "",
package/dist/Checkbox.js CHANGED
@@ -1,13 +1,13 @@
1
- import { j as r } from "./node_modules/react/jsx-runtime.js";
2
- import { Wrap as m } from "./Wrap.js";
3
- import { CheckboxControl as i } from "@wordpress/components";
4
- import { useState as x, useEffect as n } from "@wordpress/element";
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] = x(e);
7
- return n(() => {
6
+ const [c, o] = i(e);
7
+ return x(() => {
8
8
  o(e);
9
- }, [e]), /* @__PURE__ */ r.jsx(m, { className: "blockbite-ui__checkbox mx-1 flex items-center gap-2", children: /* @__PURE__ */ r.jsx(
10
- i,
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,
@@ -1,4 +1,4 @@
1
- import { j as n } from "./node_modules/react/jsx-runtime.js";
1
+ import { j as n } from "./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js";
2
2
  import { useState as l, useRef as i, useEffect as o } from "@wordpress/element";
3
3
  const p = ({
4
4
  duration: t,
@@ -1,9 +1,9 @@
1
- import { j as o } from "./node_modules/react/jsx-runtime.js";
2
- import p from "./node_modules/@blockbite/icons/dist/ChevronDown.js";
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,
@@ -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
  function n({
3
3
  icon: t,
4
4
  title: a,
@@ -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 { useRef as x, useState as o, useEffect as g } from "@wordpress/element";
3
3
  function w({
4
4
  children: d
@@ -1,13 +1,13 @@
1
- import { j as i } from "./node_modules/react/jsx-runtime.js";
2
- import { Wrap as p } from "./Wrap.js";
3
- import { FocalPointPicker as x } from "@wordpress/components";
4
- import { useState as m, useEffect as s } from "@wordpress/element";
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] = m({
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(p, { className: "relative flex flex-col", children: /* @__PURE__ */ i.jsx(
29
- x,
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 }),
@@ -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: "",
@@ -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";
@@ -1,7 +1,7 @@
1
1
  type MetricsControlProps = {
2
2
  defaultUnit: string;
3
3
  defaultValue: string;
4
- units?: string[] | "native" | "percent" | "grid" | "arbitrary" | "fluid" | "screen" | "all";
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;
@@ -1,77 +1,76 @@
1
- import { j as e } from "./node_modules/react/jsx-runtime.js";
2
- import S from "./ButtonToggle.js";
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 I } from "./TextControl.js";
7
- import { Wrap as N } from "./Wrap.js";
8
- import { useState as a, useEffect as d } from "@wordpress/element";
9
- import k from "./node_modules/@blockbite/icons/dist/ColumnSpacing.js";
10
- import O from "./node_modules/@blockbite/icons/dist/Desktop.js";
11
- import T from "./node_modules/@blockbite/icons/dist/Grid.js";
12
- import R from "./node_modules/@blockbite/icons/dist/Percentage.js";
13
- import G from "./node_modules/@blockbite/icons/dist/Slider.js";
14
- import A from "./node_modules/@blockbite/icons/dist/Tailwind.js";
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: o,
18
+ onValueChange: t,
20
19
  onUnitChange: g,
21
20
  inputClassName: j = "w-[75px]"
22
21
  }) => {
23
- const [c, m] = a(!1), [v, b] = a([]), [s, f] = a(l), [t, i] = a(""), [x, h] = a(n);
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
- !c && s === "arbitrary" && h(t);
28
- }, [c]);
26
+ !m && s === "arbitrary" && y(o);
27
+ }, [m]);
29
28
  const u = (r) => {
30
- if (r !== "arbitrary" && D(bb.codex.units.spacing, r)) {
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
- m(!0);
38
- }, y = [
36
+ c(!0);
37
+ }, S = [
39
38
  {
40
- icon: /* @__PURE__ */ e.jsx(A, {}),
39
+ icon: /* @__PURE__ */ e.jsx(D, {}),
41
40
  label: "Tailwind CSS Units",
42
41
  value: "native"
43
42
  },
44
- { icon: /* @__PURE__ */ e.jsx(R, {}), label: "Percentage Units", value: "percent" },
45
- { icon: /* @__PURE__ */ e.jsx(T, {}), label: "Grid Units", value: "grid" },
46
- { icon: /* @__PURE__ */ e.jsx(O, {}), label: "Screen Units", value: "screen" },
47
- { icon: /* @__PURE__ */ e.jsx(G, {}), label: "Pixel Units", value: "arbitrary" },
48
- { icon: /* @__PURE__ */ e.jsx(k, {}), label: "Fluid Units", value: "fluid" }
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(N, { className: "relative flex flex-col items-baseline", children: /* @__PURE__ */ e.jsxs(
51
- I,
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" ? t.replace("b_", "") : t
55
+ s === "grid" ? o.replace("b_", "") : o
57
56
  ),
58
57
  onClick: () => s !== "arbitrary" && u(s),
59
58
  onChange: (r) => {
60
- i(r), o(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: c,
66
+ visible: m,
68
67
  position: "bottom left",
69
68
  className: "w-[300px] bg-white shadow-sm",
70
- onVisibleChange: m,
69
+ onVisibleChange: c,
71
70
  children: s === "arbitrary" ? /* @__PURE__ */ e.jsx(
72
71
  w,
73
72
  {
74
- defaultValue: t,
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), o(r);
82
+ i(r), t(r);
84
83
  }
85
84
  }
86
85
  ) : /* @__PURE__ */ e.jsx(
87
- S,
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), o(r);
93
+ i(r), t(r);
95
94
  }
96
95
  })),
97
96
  size: "small",
98
- defaultPressed: t?.toString() || "",
97
+ defaultPressed: o?.toString() || "",
99
98
  onPressedChange: (r) => {
100
- i(r), o(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: y,
110
+ options: S,
112
111
  onPressedChange: (r) => {
113
- r === "reset" ? (i(""), o(""), m(!1)) : (f(r), g(r), u(r));
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
- X as default
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?: "success" | "error" | "warning" | "info";
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 { Wrap as c } from "./Wrap.js";
3
- import { Notice as i } from "@wordpress/components";
4
- import { useState as a } from "@wordpress/element";
5
- import p from "classnames";
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] = a(!0);
12
- return /* @__PURE__ */ s.jsx(c, { onClick: () => o(!1), children: m && /* @__PURE__ */ s.jsx(
13
- i,
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: p(r),
16
+ className: a(r),
17
17
  onRemove: () => o(!1),
18
18
  children: e
19
19
  }
@@ -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 "./node_modules/@blockbite/icons/dist/Cross2.js";
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 = ({