@mendylanda/ui 0.4.3-dev.69.b44a9721f450 → 0.4.3-dev.70.eaaf58b8af54

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.
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useContext, useId, useLayoutEffect, useMemo } from "react";
4
4
  import * as Dialog from "@radix-ui/react-dialog";
5
- import { Pin, PinOff, X } from "lucide-react";
5
+ import { Pin, X } from "lucide-react";
6
6
  import { Button } from "../customization.js";
7
7
  import { useMendyLocale } from "../locale-context.js";
8
8
  import { cn } from "../utils.js";
@@ -31,14 +31,13 @@ export function SheetClose({ onClick, ...props }) {
31
31
  export function SheetPin({ onClick, ...props }) {
32
32
  const instance = useSheetInstance();
33
33
  const { t } = useMendyLocale();
34
- if (!instance.pinned && !instance.layout?.canPin)
34
+ if (instance.pinned || !instance.layout?.canPin)
35
35
  return null;
36
- return (_jsx(Button, { type: "button", variant: "ghost", size: "icon", ...props, "aria-label": props["aria-label"] ?? t(instance.pinned ? "sheetUnpin" : "sheetPin"), "aria-pressed": instance.pinned, "aria-keyshortcuts": instance.pinned ? undefined : "P", title: props.title ?? (instance.pinned ? t("sheetUnpin") : `${t("sheetPin")} (P)`), onClick: (event) => {
36
+ return (_jsx(Button, { type: "button", variant: "ghost", size: "icon", ...props, "aria-label": props["aria-label"] ?? t("sheetPin"), "aria-keyshortcuts": "P", title: props.title ?? `${t("sheetPin")} (P)`, onClick: (event) => {
37
37
  onClick?.(event);
38
38
  if (!event.defaultPrevented)
39
- instance.setPinned(!instance.pinned);
40
- }, children: props.children ??
41
- (instance.pinned ? _jsx(PinOff, { "aria-hidden": "true" }) : _jsx(Pin, { "aria-hidden": "true" })) }));
39
+ instance.setPinned(true);
40
+ }, children: props.children ?? _jsx(Pin, { "aria-hidden": "true" }) }));
42
41
  }
43
42
  export function SheetHeader({ title, description, actions, controls = true, children, className, ...props }) {
44
43
  const { t } = useMendyLocale();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mendylanda/ui",
3
- "version": "0.4.3-dev.69.b44a9721f450",
3
+ "version": "0.4.3-dev.70.eaaf58b8af54",
4
4
  "description": "Mendy Landa's reusable React components. Tables, filters, and sheets with shared interactions and customizable UI.",
5
5
  "homepage": "https://ui.mendylanda.com",
6
6
  "license": "MIT",
@@ -126,5 +126,5 @@
126
126
  "build": "tsc -p tsconfig.build.json && node scripts/build-css.mjs",
127
127
  "typecheck": "tsc -p tsconfig.build.json --noEmit"
128
128
  },
129
- "gitHead": "b44a9721f450b4f8ce6e0bb3dc7e9e76452d2649"
129
+ "gitHead": "eaaf58b8af54105f1c6de74c527ff896a6af1e7f"
130
130
  }