@appcorp/shadcn 1.1.18 → 1.1.20

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.
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.EnhancedTableHeaderAction = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
8
  var lucide_react_1 = require("lucide-react");
9
- var button_1 = require("./ui/button");
10
9
  var badge_1 = require("./ui/badge");
10
+ var button_1 = require("./ui/button");
11
+ var utils_1 = require("../lib/utils");
11
12
  var EnhancedTableHeaderAction = function (_a) {
12
13
  var headerActions = _a.headerActions, numberOfFilters = _a.numberOfFilters, onClearFilters = _a.onClearFilters, testIdWrapper = _a.testIdWrapper, testIdActionPrefix = _a.testIdActionPrefix, testIdFilterBadge = _a.testIdFilterBadge, testIdClearFilters = _a.testIdClearFilters;
13
14
  return (react_1.default.createElement(react_1.default.Fragment, null, headerActions.length > 0 && (react_1.default.createElement("div", { className: "flex gap-2", "data-testid": testIdWrapper }, headerActions
@@ -30,12 +31,15 @@ var EnhancedTableHeaderAction = function (_a) {
30
31
  action.handleOnClick();
31
32
  } }, action.label),
32
33
  showFilterIndicators && (react_1.default.createElement(react_1.default.Fragment, null,
33
- react_1.default.createElement(badge_1.Badge, { variant: "secondary", className: "absolute -top-2 -right-2 h-5 w-5 flex items-center justify-center p-0 text-xs rounded-full", "data-testid": testIdFilterBadge }, numberOfFilters),
34
- onClearFilters && (react_1.default.createElement("button", { "data-testid": testIdClearFilters, onClick: function (e) {
35
- e.stopPropagation();
36
- onClearFilters();
37
- }, className: "absolute -top-2 -left-2 h-5 w-5 rounded-full bg-muted hover:bg-muted/80 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors", "aria-label": "Clear all filters" },
38
- react_1.default.createElement(lucide_react_1.X, { className: "h-3 w-3" })))))));
34
+ react_1.default.createElement("div", { className: "absolute -top-2 -left-2 group" },
35
+ react_1.default.createElement(badge_1.Badge, { variant: "secondary", className: (0, utils_1.cn)("h-5 w-5 flex items-center justify-center p-0 text-xs rounded-full transition-all relative", onClearFilters && "cursor-pointer"), "data-testid": testIdFilterBadge, onClick: onClearFilters
36
+ ? function (e) {
37
+ e.stopPropagation();
38
+ onClearFilters();
39
+ }
40
+ : undefined },
41
+ react_1.default.createElement("span", { className: (0, utils_1.cn)("transition-opacity absolute", onClearFilters && "group-hover:opacity-0") }, numberOfFilters),
42
+ onClearFilters && (react_1.default.createElement(lucide_react_1.X, { className: "h-3 w-3 absolute opacity-0 group-hover:opacity-100 transition-opacity", "data-testid": testIdClearFilters }))))))));
39
43
  })))));
40
44
  };
41
45
  exports.EnhancedTableHeaderAction = EnhancedTableHeaderAction;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import * as ResizablePrimitive from "react-resizable-panels";
3
3
  declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => React.JSX.Element;
4
- declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement | HTMLButtonElement | HTMLDivElement | HTMLInputElement | HTMLObjectElement | HTMLStyleElement | HTMLTitleElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLSpanElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
4
+ declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement | HTMLButtonElement | HTMLDivElement | HTMLInputElement | HTMLObjectElement | HTMLStyleElement | HTMLTitleElement | HTMLSpanElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
5
5
  className?: string;
6
6
  collapsedSize?: number | undefined;
7
7
  collapsible?: boolean | undefined;
@@ -36,7 +36,7 @@ var lucide_react_1 = require("lucide-react");
36
36
  // Theme-aware toast styling
37
37
  var THEME_TOAST_STYLES = {
38
38
  light: {
39
- className: "bg-background text-foreground border-border shadow-lg",
39
+ className: "bg-background text-foreground border-border shadow-lg [&_[data-title]]:text-primary [&_[data-title]]:font-semibold [&_[data-icon]]:text-primary/90 [&_[data-description]]:text-primary [&_[data-description]]:opacity-100",
40
40
  style: {
41
41
  backgroundColor: "hsl(var(--background))",
42
42
  color: "hsl(var(--foreground))",
@@ -44,7 +44,7 @@ var THEME_TOAST_STYLES = {
44
44
  },
45
45
  },
46
46
  dark: {
47
- className: "bg-popover text-popover-foreground border-border shadow-lg",
47
+ className: "bg-background text-foreground border-border shadow-lg [&_[data-title]]:text-primary [&_[data-title]]:font-semibold [&_[data-icon]]:text-primary/90 [&_[data-description]]:text-primary [&_[data-description]]:opacity-100",
48
48
  style: {
49
49
  backgroundColor: "hsl(var(--popover))",
50
50
  color: "hsl(var(--popover-foreground))",
@@ -73,7 +73,7 @@ var getToastIcon = function (variant) {
73
73
  // Create icon element helper
74
74
  var createIconElement = function (variant) {
75
75
  var Icon = getToastIcon(variant);
76
- return react_1.default.createElement(Icon, { className: "h-4 w-4" });
76
+ return react_1.default.createElement("span", { "data-icon": true, className: "inline-flex items-center" }, react_1.default.createElement(Icon, { className: "h-4 w-4" }));
77
77
  };
78
78
  // Enhanced theme-aware toast function
79
79
  var generateToast = function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/shadcn",
3
- "version": "1.1.18",
3
+ "version": "1.1.20",
4
4
  "scripts": {
5
5
  "build:next": "next build",
6
6
  "build:storybook": "storybook build -c .storybook -o .out",