@postxl/ui-components 1.4.0 → 1.4.2

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
@@ -5927,12 +5927,15 @@ function DataGridViewMenu({ table, savedViews, activeViewId, currentUserId, isAd
5927
5927
  })
5928
5928
  ]
5929
5929
  }, view.id);
5930
- return /* @__PURE__ */ jsxs(Button, {
5931
- variant: "ghost",
5932
- size: "max",
5933
- className: cn("text-start gap-1 px-2 h-6 rounded-sm cursor-pointer group hover:bg-accent", isActive && "bg-accent/50"),
5934
- onClick: () => onApplyView?.(view.id),
5930
+ return /* @__PURE__ */ jsxs("div", {
5931
+ className: cn("relative flex items-center text-start gap-1 px-2 h-6 rounded-sm cursor-pointer group hover:bg-accent", isActive && "bg-accent/50"),
5935
5932
  children: [
5933
+ /* @__PURE__ */ jsx("button", {
5934
+ type: "button",
5935
+ className: "absolute inset-0 hover:cursor-pointer",
5936
+ onClick: () => onApplyView?.(view.id),
5937
+ "aria-label": `Apply view "${view.name}"`
5938
+ }),
5936
5939
  view.isGlobal ? /* @__PURE__ */ jsx(GlobeIcon, { className: cn("size-3.5 shrink-0", isActive ? "text-primary" : "text-muted-foreground") }) : /* @__PURE__ */ jsx(BookmarkIcon, { className: cn("size-3.5 shrink-0", isActive ? "text-primary" : "text-muted-foreground") }),
5937
5940
  /* @__PURE__ */ jsx("span", {
5938
5941
  className: "text-sm truncate flex-1",
@@ -5940,7 +5943,7 @@ function DataGridViewMenu({ table, savedViews, activeViewId, currentUserId, isAd
5940
5943
  }),
5941
5944
  isActive ? /* @__PURE__ */ jsx(CheckIcon$1, { className: "group-hover:hidden size-3.5 text-primary shrink-0" }) : null,
5942
5945
  canEdit && /* @__PURE__ */ jsxs("div", {
5943
- className: "hidden group-hover:flex items-center shrink-0",
5946
+ className: "relative z-10 hidden group-hover:flex items-center shrink-0",
5944
5947
  children: [
5945
5948
  onUpdateView && /* @__PURE__ */ jsx(TooltipProvider, {
5946
5949
  delayDuration: 300,
@@ -5949,8 +5952,7 @@ function DataGridViewMenu({ table, savedViews, activeViewId, currentUserId, isAd
5949
5952
  children: /* @__PURE__ */ jsx(Button, {
5950
5953
  variant: "ghost",
5951
5954
  size: "iconXs",
5952
- onClick: (e) => {
5953
- e.stopPropagation();
5955
+ onClick: () => {
5954
5956
  resetAllStates();
5955
5957
  setUpdatingViewId(view.id);
5956
5958
  },
@@ -5968,8 +5970,7 @@ function DataGridViewMenu({ table, savedViews, activeViewId, currentUserId, isAd
5968
5970
  children: /* @__PURE__ */ jsx(Button, {
5969
5971
  variant: "ghost",
5970
5972
  size: "iconXs",
5971
- onClick: (e) => {
5972
- e.stopPropagation();
5973
+ onClick: () => {
5973
5974
  resetAllStates();
5974
5975
  setRenamingViewId(view.id);
5975
5976
  setRenameValue(view.name);
@@ -5989,8 +5990,7 @@ function DataGridViewMenu({ table, savedViews, activeViewId, currentUserId, isAd
5989
5990
  variant: "ghost",
5990
5991
  size: "iconXs",
5991
5992
  className: "text-destructive hover:text-destructive",
5992
- onClick: (e) => {
5993
- e.stopPropagation();
5993
+ onClick: () => {
5994
5994
  resetAllStates();
5995
5995
  setDeletingViewId(view.id);
5996
5996
  },
@@ -8667,15 +8667,26 @@ const Modal = ({ title = "", subtitle, isOpen, showCloseButton = true, setIsOpen
8667
8667
  __e2e_test_id__,
8668
8668
  onInteractOutside: preventClickOutsideToDismiss ? (e) => e.preventDefault() : void 0,
8669
8669
  onEscapeKeyDown: preventClickOutsideToDismiss ? (e) => e.preventDefault() : void 0,
8670
+ "aria-describedby": subtitle ? void 0 : "modal-content",
8670
8671
  children: [
8671
8672
  /* @__PURE__ */ jsxs(DialogHeader, {
8672
8673
  className: cn("flex flex-row flex-shrink-0 items-center gap-2 p-3 min-h-10 border-b-1 border-(--discreet-border)", showCloseButton ? "pr-12" : "", subtitle ? "pb-0" : ""),
8673
8674
  children: [/* @__PURE__ */ jsxs("div", {
8674
8675
  className: "overflow-hidden",
8675
- children: [title && /* @__PURE__ */ jsx(DialogTitle, {
8676
- className: "text-xl overflow-hidden text-ellipsis whitespace-nowrap",
8677
- children: title
8678
- }), subtitle]
8676
+ children: [
8677
+ title && /* @__PURE__ */ jsx(DialogTitle, {
8678
+ className: "text-xl overflow-hidden text-ellipsis whitespace-nowrap",
8679
+ children: title
8680
+ }),
8681
+ subtitle && /* @__PURE__ */ jsx(DialogDescription, {
8682
+ asChild: true,
8683
+ children: subtitle
8684
+ }),
8685
+ !subtitle && /* @__PURE__ */ jsx(DialogDescription, {
8686
+ className: "sr-only",
8687
+ children: "Modal content"
8688
+ })
8689
+ ]
8679
8690
  }), controls.length > 0 && /* @__PURE__ */ jsx("div", {
8680
8691
  className: "flex flex-grow justify-end items-baseline gap-2 whitespace-nowrap flex-1",
8681
8692
  children: controls
@@ -8683,6 +8694,7 @@ const Modal = ({ title = "", subtitle, isOpen, showCloseButton = true, setIsOpen
8683
8694
  }),
8684
8695
  /* @__PURE__ */ jsx("div", {
8685
8696
  className: "max-h-full h-full overflow-auto flex-grow",
8697
+ id: "modal-content",
8686
8698
  children
8687
8699
  }),
8688
8700
  footer && /* @__PURE__ */ jsx(DialogFooter, {