@pk-design/react-tailwind 1.1.1 → 1.1.3

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.
@@ -364,14 +364,15 @@ const Breadcrumb = ({ items, render }) => {
364
364
  };
365
365
  Breadcrumb.displayName = 'Breadcrumb';
366
366
 
367
- const BASE_CARD_CLASS = 'bg-white rounded-md dark:bg-gray-800';
368
- const Card = React.forwardRef((props, ref) => {
367
+ const BASE_CARD_CLASS = 'bg-white rounded-md dark:bg-gray-900 block space-y-2';
368
+ const Card = React.forwardRef(({ as, ...props }, ref) => {
369
369
  // Remove Card-only props from rest (avoid leaking to DOM)
370
- const { as: Element = 'div', hoverable = false, bordered = false, noPadding = false, ...rest } = props;
370
+ const { hoverable = false, bordered = true, compact = false, ...rest } = props;
371
+ const Component = as || 'div';
371
372
  // Extract className safely from rest
372
373
  const { className, ...cleanRest } = rest;
373
- const classes = buildClassName(BASE_CARD_CLASS, !noPadding && 'p-2 md:p-4', hoverable && 'shadow hover:shadow-md transition-shadow duration-200', bordered && 'border border-gray-200 dark:border-gray-700', className);
374
- return jsxRuntime.jsx(Element, { ref: ref, className: classes, ...cleanRest });
374
+ const classes = buildClassName(BASE_CARD_CLASS, compact ? 'p-2' : 'p-6', hoverable && 'transition-background duration-200 hover:bg-gray-100 dark:hover:bg-gray-800', bordered && 'border border-gray-200 dark:border-gray-800', className);
375
+ return jsxRuntime.jsx(Component, { ref: ref, className: classes, ...cleanRest });
375
376
  });
376
377
  Card.displayName = 'Card';
377
378
 
@@ -476,7 +477,7 @@ const TableHeaderCell = ({ children, align = 'left', className, ...props }) => (
476
477
  /* ----------------------------------------------
477
478
  * Empty Row
478
479
  * ---------------------------------------------- */
479
- const EmptyTableRow = ({ children, colSpan = 1, contentClass, }) => (jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: colSpan, className: "px-4 py-8", children: jsxRuntime.jsx("div", { className: buildClassName('p-6 text-center space-y-3 flex flex-col items-center justify-center', contentClass), children: children }) }) }));
480
+ const EmptyTableRow = ({ children, colSpan = 1, contentClass, }) => (jsxRuntime.jsx("tr", { className: "bg-white dark:bg-gray-900", children: jsxRuntime.jsx("td", { colSpan: colSpan, className: "px-4 py-8", children: jsxRuntime.jsx("div", { className: buildClassName('p-6 text-center space-y-3 flex flex-col items-center justify-center', contentClass), children: children }) }) }));
480
481
 
481
482
  const DOTS = '...';
482
483
  const usePagination = ({ totalPages, currentPage, siblingCount = 1, // number of pages to show around currentPage