@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.
- package/dist/react-tailwind.cjs.js +7 -6
- package/dist/react-tailwind.cjs.js.map +1 -1
- package/dist/react-tailwind.es.js +7 -6
- package/dist/react-tailwind.es.js.map +1 -1
- package/dist/types/components/Button/Button.types.d.ts +1 -5
- package/dist/types/components/Card/Card.d.ts +2 -3
- package/dist/types/components/Card/Card.types.d.ts +57 -9
- package/dist/types/components/RangeInput/index.d.ts +1 -0
- package/dist/types/components/common-type.d.ts +5 -0
- package/package.json +1 -1
|
@@ -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-
|
|
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 {
|
|
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,
|
|
374
|
-
return jsxRuntime.jsx(
|
|
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
|