@yuva-devlab/ui 2.2.1 → 3.0.0
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/README.md +2 -3
- package/dist/components/table/table.css +29 -7
- package/dist/components.css +29 -7
- package/dist/index.cjs +27 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -5
- package/dist/index.d.ts +19 -5
- package/dist/index.js +27 -4
- package/dist/index.js.map +1 -1
- package/dist/styles/components.css +29 -7
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1186,6 +1186,8 @@ interface DataTableProps<T> {
|
|
|
1186
1186
|
emptyState?: React$1.ReactNode;
|
|
1187
1187
|
/** Callback fired when clicking a table row */
|
|
1188
1188
|
onRowClick?: (row: T) => void;
|
|
1189
|
+
/** Whether to highlight table rows on hover using the active brand theme color. Defaults to false (or true if onRowClick provided) */
|
|
1190
|
+
hoverable?: boolean;
|
|
1189
1191
|
/** Additional CSS class names */
|
|
1190
1192
|
className?: string;
|
|
1191
1193
|
}
|
|
@@ -1194,7 +1196,7 @@ interface DataTableProps<T> {
|
|
|
1194
1196
|
* Generic enterprise data table with integrated sorting, client/server pagination,
|
|
1195
1197
|
* custom column renderers, and zero-config empty states.
|
|
1196
1198
|
*/
|
|
1197
|
-
declare function DataTable<T extends Record<string, unknown>>({ data, columns, rowKey, pagination, loading, emptyState, onRowClick, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1199
|
+
declare function DataTable<T extends Record<string, unknown>>({ data, columns, rowKey, pagination, loading, emptyState, onRowClick, hoverable, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1198
1200
|
|
|
1199
1201
|
interface DatePickerProps {
|
|
1200
1202
|
/**
|
|
@@ -2691,14 +2693,21 @@ type SwitchProps = React$1.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root
|
|
|
2691
2693
|
*/
|
|
2692
2694
|
declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2693
2695
|
|
|
2694
|
-
|
|
2696
|
+
interface TableProps extends React$1.HTMLAttributes<HTMLTableElement> {
|
|
2697
|
+
/**
|
|
2698
|
+
* Whether to highlight rows on hover using the active theme color.
|
|
2699
|
+
* When enabled, applies `.dl-table--hoverable`.
|
|
2700
|
+
* @default false
|
|
2701
|
+
*/
|
|
2702
|
+
readonly hoverable?: boolean;
|
|
2703
|
+
}
|
|
2695
2704
|
/**
|
|
2696
2705
|
* Responsive table container with pure scoped CSS styling.
|
|
2697
2706
|
* Automatically wraps in a scrollable horizontal container (`dl-table-wrapper`).
|
|
2698
2707
|
*
|
|
2699
2708
|
* @example
|
|
2700
2709
|
* ```tsx
|
|
2701
|
-
* <Table>
|
|
2710
|
+
* <Table hoverable>
|
|
2702
2711
|
* <TableHeader>
|
|
2703
2712
|
* <TableRow>
|
|
2704
2713
|
* <TableHead>Invoice</TableHead>
|
|
@@ -2732,7 +2741,12 @@ type TableFooterProps = React$1.HTMLAttributes<HTMLTableSectionElement>;
|
|
|
2732
2741
|
* Footer section of a `Table` (`<tfoot>`) for totals or summaries.
|
|
2733
2742
|
*/
|
|
2734
2743
|
declare const TableFooter: React$1.ForwardRefExoticComponent<TableFooterProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
2735
|
-
|
|
2744
|
+
interface TableRowProps extends React$1.HTMLAttributes<HTMLTableRowElement> {
|
|
2745
|
+
/**
|
|
2746
|
+
* Whether to highlight this row on hover using the active brand theme color.
|
|
2747
|
+
*/
|
|
2748
|
+
readonly hoverable?: boolean;
|
|
2749
|
+
}
|
|
2736
2750
|
/**
|
|
2737
2751
|
* Interactive row within a `Table` (`<tr>`).
|
|
2738
2752
|
*/
|
|
@@ -3977,7 +3991,7 @@ interface ContainerProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
3977
3991
|
declare const Container: React$1.ForwardRefExoticComponent<ContainerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3978
3992
|
|
|
3979
3993
|
interface LegalFooterProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
3980
|
-
/** Optional application name (e.g., "FinAI", "DevLab Portal", "OrchestrAI", "
|
|
3994
|
+
/** Optional application name (e.g., "FinAI", "DevLab Portal", "OrchestrAI", "KnowledgeAI", "DevLab Logs") */
|
|
3981
3995
|
readonly appName?: string;
|
|
3982
3996
|
/** Optional semver or build tag (e.g., "v1.0.0") */
|
|
3983
3997
|
readonly version?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1186,6 +1186,8 @@ interface DataTableProps<T> {
|
|
|
1186
1186
|
emptyState?: React$1.ReactNode;
|
|
1187
1187
|
/** Callback fired when clicking a table row */
|
|
1188
1188
|
onRowClick?: (row: T) => void;
|
|
1189
|
+
/** Whether to highlight table rows on hover using the active brand theme color. Defaults to false (or true if onRowClick provided) */
|
|
1190
|
+
hoverable?: boolean;
|
|
1189
1191
|
/** Additional CSS class names */
|
|
1190
1192
|
className?: string;
|
|
1191
1193
|
}
|
|
@@ -1194,7 +1196,7 @@ interface DataTableProps<T> {
|
|
|
1194
1196
|
* Generic enterprise data table with integrated sorting, client/server pagination,
|
|
1195
1197
|
* custom column renderers, and zero-config empty states.
|
|
1196
1198
|
*/
|
|
1197
|
-
declare function DataTable<T extends Record<string, unknown>>({ data, columns, rowKey, pagination, loading, emptyState, onRowClick, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1199
|
+
declare function DataTable<T extends Record<string, unknown>>({ data, columns, rowKey, pagination, loading, emptyState, onRowClick, hoverable, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1198
1200
|
|
|
1199
1201
|
interface DatePickerProps {
|
|
1200
1202
|
/**
|
|
@@ -2691,14 +2693,21 @@ type SwitchProps = React$1.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root
|
|
|
2691
2693
|
*/
|
|
2692
2694
|
declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2693
2695
|
|
|
2694
|
-
|
|
2696
|
+
interface TableProps extends React$1.HTMLAttributes<HTMLTableElement> {
|
|
2697
|
+
/**
|
|
2698
|
+
* Whether to highlight rows on hover using the active theme color.
|
|
2699
|
+
* When enabled, applies `.dl-table--hoverable`.
|
|
2700
|
+
* @default false
|
|
2701
|
+
*/
|
|
2702
|
+
readonly hoverable?: boolean;
|
|
2703
|
+
}
|
|
2695
2704
|
/**
|
|
2696
2705
|
* Responsive table container with pure scoped CSS styling.
|
|
2697
2706
|
* Automatically wraps in a scrollable horizontal container (`dl-table-wrapper`).
|
|
2698
2707
|
*
|
|
2699
2708
|
* @example
|
|
2700
2709
|
* ```tsx
|
|
2701
|
-
* <Table>
|
|
2710
|
+
* <Table hoverable>
|
|
2702
2711
|
* <TableHeader>
|
|
2703
2712
|
* <TableRow>
|
|
2704
2713
|
* <TableHead>Invoice</TableHead>
|
|
@@ -2732,7 +2741,12 @@ type TableFooterProps = React$1.HTMLAttributes<HTMLTableSectionElement>;
|
|
|
2732
2741
|
* Footer section of a `Table` (`<tfoot>`) for totals or summaries.
|
|
2733
2742
|
*/
|
|
2734
2743
|
declare const TableFooter: React$1.ForwardRefExoticComponent<TableFooterProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
2735
|
-
|
|
2744
|
+
interface TableRowProps extends React$1.HTMLAttributes<HTMLTableRowElement> {
|
|
2745
|
+
/**
|
|
2746
|
+
* Whether to highlight this row on hover using the active brand theme color.
|
|
2747
|
+
*/
|
|
2748
|
+
readonly hoverable?: boolean;
|
|
2749
|
+
}
|
|
2736
2750
|
/**
|
|
2737
2751
|
* Interactive row within a `Table` (`<tr>`).
|
|
2738
2752
|
*/
|
|
@@ -3977,7 +3991,7 @@ interface ContainerProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
3977
3991
|
declare const Container: React$1.ForwardRefExoticComponent<ContainerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3978
3992
|
|
|
3979
3993
|
interface LegalFooterProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
3980
|
-
/** Optional application name (e.g., "FinAI", "DevLab Portal", "OrchestrAI", "
|
|
3994
|
+
/** Optional application name (e.g., "FinAI", "DevLab Portal", "OrchestrAI", "KnowledgeAI", "DevLab Logs") */
|
|
3981
3995
|
readonly appName?: string;
|
|
3982
3996
|
/** Optional semver or build tag (e.g., "v1.0.0") */
|
|
3983
3997
|
readonly version?: string;
|
package/dist/index.js
CHANGED
|
@@ -1659,7 +1659,18 @@ import { ArrowUpDown, ArrowUp, ArrowDown } from "lucide-react";
|
|
|
1659
1659
|
import * as React26 from "react";
|
|
1660
1660
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1661
1661
|
var Table = React26.forwardRef(
|
|
1662
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx26("div", { className: "dl-table-wrapper", children: /* @__PURE__ */ jsx26(
|
|
1662
|
+
({ className, hoverable = false, ...props }, ref) => /* @__PURE__ */ jsx26("div", { className: "dl-table-wrapper", children: /* @__PURE__ */ jsx26(
|
|
1663
|
+
"table",
|
|
1664
|
+
{
|
|
1665
|
+
ref,
|
|
1666
|
+
className: cn(
|
|
1667
|
+
"dl-table",
|
|
1668
|
+
hoverable && "dl-table--hoverable",
|
|
1669
|
+
className
|
|
1670
|
+
),
|
|
1671
|
+
...props
|
|
1672
|
+
}
|
|
1673
|
+
) })
|
|
1663
1674
|
);
|
|
1664
1675
|
Table.displayName = "Table";
|
|
1665
1676
|
var TableHeader = React26.forwardRef(
|
|
@@ -1675,7 +1686,18 @@ var TableFooter = React26.forwardRef(
|
|
|
1675
1686
|
);
|
|
1676
1687
|
TableFooter.displayName = "TableFooter";
|
|
1677
1688
|
var TableRow = React26.forwardRef(
|
|
1678
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1689
|
+
({ className, hoverable, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1690
|
+
"tr",
|
|
1691
|
+
{
|
|
1692
|
+
ref,
|
|
1693
|
+
className: cn(
|
|
1694
|
+
"dl-table__row",
|
|
1695
|
+
hoverable && "dl-table__row--hoverable",
|
|
1696
|
+
className
|
|
1697
|
+
),
|
|
1698
|
+
...props
|
|
1699
|
+
}
|
|
1700
|
+
)
|
|
1679
1701
|
);
|
|
1680
1702
|
TableRow.displayName = "TableRow";
|
|
1681
1703
|
var TableHead = React26.forwardRef(
|
|
@@ -1891,6 +1913,7 @@ function DataTable({
|
|
|
1891
1913
|
loading = false,
|
|
1892
1914
|
emptyState,
|
|
1893
1915
|
onRowClick,
|
|
1916
|
+
hoverable = false,
|
|
1894
1917
|
className
|
|
1895
1918
|
}) {
|
|
1896
1919
|
const [internalPage, setInternalPage] = React29.useState(1);
|
|
@@ -1956,7 +1979,7 @@ function DataTable({
|
|
|
1956
1979
|
return typeof val === "string" || typeof val === "number" ? val : index;
|
|
1957
1980
|
};
|
|
1958
1981
|
return /* @__PURE__ */ jsxs20("div", { className: cn("dl-data-table-container", className), children: [
|
|
1959
|
-
/* @__PURE__ */ jsx31("div", { className: "dl-data-table-wrapper", children: /* @__PURE__ */ jsxs20(Table, { children: [
|
|
1982
|
+
/* @__PURE__ */ jsx31("div", { className: "dl-data-table-wrapper", children: /* @__PURE__ */ jsxs20(Table, { hoverable: hoverable || Boolean(onRowClick), children: [
|
|
1960
1983
|
/* @__PURE__ */ jsx31(TableHeader, { children: /* @__PURE__ */ jsx31(TableRow, { children: columns.map((col) => {
|
|
1961
1984
|
const isSorted = sortKey === col.key;
|
|
1962
1985
|
return /* @__PURE__ */ jsx31(
|
|
@@ -6690,7 +6713,7 @@ var LegalFooter = React95.forwardRef(
|
|
|
6690
6713
|
className: cn("dl-legal-footer dl-legal-footer--sidebar", className),
|
|
6691
6714
|
...props,
|
|
6692
6715
|
children: [
|
|
6693
|
-
/* @__PURE__ */ jsx101("span", { children: appName ? `${appName} ${version ?? ""}`.trim() : version ?? "
|
|
6716
|
+
/* @__PURE__ */ jsx101("span", { children: appName ? `${appName} ${version ?? ""}`.trim() : version ?? "" }),
|
|
6694
6717
|
/* @__PURE__ */ jsxs64("span", { children: [
|
|
6695
6718
|
"\xA9 ",
|
|
6696
6719
|
currentYear,
|