@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
|
@@ -344,14 +344,15 @@ const Breadcrumb = ({ items, render }) => {
|
|
|
344
344
|
};
|
|
345
345
|
Breadcrumb.displayName = 'Breadcrumb';
|
|
346
346
|
|
|
347
|
-
const BASE_CARD_CLASS = 'bg-white rounded-md dark:bg-gray-
|
|
348
|
-
const Card = forwardRef((props, ref) => {
|
|
347
|
+
const BASE_CARD_CLASS = 'bg-white rounded-md dark:bg-gray-900 block space-y-2';
|
|
348
|
+
const Card = forwardRef(({ as, ...props }, ref) => {
|
|
349
349
|
// Remove Card-only props from rest (avoid leaking to DOM)
|
|
350
|
-
const {
|
|
350
|
+
const { hoverable = false, bordered = true, compact = false, ...rest } = props;
|
|
351
|
+
const Component = as || 'div';
|
|
351
352
|
// Extract className safely from rest
|
|
352
353
|
const { className, ...cleanRest } = rest;
|
|
353
|
-
const classes = buildClassName(BASE_CARD_CLASS,
|
|
354
|
-
return jsx(
|
|
354
|
+
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);
|
|
355
|
+
return jsx(Component, { ref: ref, className: classes, ...cleanRest });
|
|
355
356
|
});
|
|
356
357
|
Card.displayName = 'Card';
|
|
357
358
|
|
|
@@ -456,7 +457,7 @@ const TableHeaderCell = ({ children, align = 'left', className, ...props }) => (
|
|
|
456
457
|
/* ----------------------------------------------
|
|
457
458
|
* Empty Row
|
|
458
459
|
* ---------------------------------------------- */
|
|
459
|
-
const EmptyTableRow = ({ children, colSpan = 1, contentClass, }) => (jsx("tr", { children: jsx("td", { colSpan: colSpan, className: "px-4 py-8", children: jsx("div", { className: buildClassName('p-6 text-center space-y-3 flex flex-col items-center justify-center', contentClass), children: children }) }) }));
|
|
460
|
+
const EmptyTableRow = ({ children, colSpan = 1, contentClass, }) => (jsx("tr", { className: "bg-white dark:bg-gray-900", children: jsx("td", { colSpan: colSpan, className: "px-4 py-8", children: jsx("div", { className: buildClassName('p-6 text-center space-y-3 flex flex-col items-center justify-center', contentClass), children: children }) }) }));
|
|
460
461
|
|
|
461
462
|
const DOTS = '...';
|
|
462
463
|
const usePagination = ({ totalPages, currentPage, siblingCount = 1, // number of pages to show around currentPage
|