@classic-homes/theme-react 0.3.0 → 0.3.1

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/index.js CHANGED
@@ -1722,6 +1722,7 @@ function StudioCanvasItem({
1722
1722
  }) {
1723
1723
  const studio = useStudio();
1724
1724
  const ref = React19.useRef(null);
1725
+ const inQuickAction = (target) => !!target?.closest?.("[data-studio-quick-action]");
1725
1726
  const select = (reveal) => {
1726
1727
  if (!selected) onSelect?.();
1727
1728
  if (reveal) studio?.revealInspector();
@@ -1748,8 +1749,10 @@ function StudioCanvasItem({
1748
1749
  invalid && "-outline-offset-2 outline-dashed outline-2 outline-warning/70",
1749
1750
  className
1750
1751
  ),
1751
- onClickCapture: (e) => select(!e.target.closest?.("[data-studio-quick-action]")),
1752
- onFocus: () => select(false),
1752
+ onClickCapture: (e) => select(!inQuickAction(e.target)),
1753
+ onFocus: (e) => {
1754
+ if (!inQuickAction(e.target)) select(false);
1755
+ },
1753
1756
  children: [
1754
1757
  !selected && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1755
1758
  "button",
package/dist/index.mjs CHANGED
@@ -1613,6 +1613,7 @@ function StudioCanvasItem({
1613
1613
  }) {
1614
1614
  const studio = useStudio();
1615
1615
  const ref = React19.useRef(null);
1616
+ const inQuickAction = (target) => !!target?.closest?.("[data-studio-quick-action]");
1616
1617
  const select = (reveal) => {
1617
1618
  if (!selected) onSelect?.();
1618
1619
  if (reveal) studio?.revealInspector();
@@ -1639,8 +1640,10 @@ function StudioCanvasItem({
1639
1640
  invalid && "-outline-offset-2 outline-dashed outline-2 outline-warning/70",
1640
1641
  className
1641
1642
  ),
1642
- onClickCapture: (e) => select(!e.target.closest?.("[data-studio-quick-action]")),
1643
- onFocus: () => select(false),
1643
+ onClickCapture: (e) => select(!inQuickAction(e.target)),
1644
+ onFocus: (e) => {
1645
+ if (!inQuickAction(e.target)) select(false);
1646
+ },
1644
1647
  children: [
1645
1648
  !selected && /* @__PURE__ */ jsxs12(
1646
1649
  "button",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classic-homes/theme-react",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "React components for the Classic theme system",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",