@sikka/hawa 0.16.11-next → 0.16.12-next
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/index.js +10 -7
- package/dist/index.mjs +8 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5678,13 +5678,16 @@ var TableHeader = React44.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
|
5678
5678
|
});
|
|
5679
5679
|
TableHeader.displayName = "TableHeader";
|
|
5680
5680
|
var TableHead = React44.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
5681
|
-
var className = _param.className, props = _object_without_properties(_param, [
|
|
5682
|
-
"className"
|
|
5681
|
+
var className = _param.className, condensed = _param.condensed, clickable = _param.clickable, dir = _param.dir, props = _object_without_properties(_param, [
|
|
5682
|
+
"className",
|
|
5683
|
+
"condensed",
|
|
5684
|
+
"clickable",
|
|
5685
|
+
"dir"
|
|
5683
5686
|
]);
|
|
5684
5687
|
return React44.createElement("th", _object_spread({
|
|
5685
5688
|
ref: ref,
|
|
5686
|
-
className: cn("hawa-bg-muted/60 dark:hawa-bg-muted/40 hawa-text-start hawa-align-middle hawa-font-medium hawa-text-muted-foreground [&:has([role=checkbox])]:hawa-pr-0 [&:not(:last-child)&:not(:first-child)]:hawa-border-x",
|
|
5687
|
-
|
|
5689
|
+
className: cn("hawa-bg-muted/60 dark:hawa-bg-muted/40 hawa-text-start hawa-align-middle hawa-font-medium hawa-text-muted-foreground [&:has([role=checkbox])]:hawa-pr-0 [&:not(:last-child)&:not(:first-child)]:hawa-border-x", dir === "rtl" ? "[&:not(:last-child)]:hawa-border-l" : "[&:not(:last-child)]:hawa-border-r", condensed ? "hawa-h-8" : "hawa-h-12", clickable ? "hawa-px-1" : "hawa-px-4", //First and last columns
|
|
5690
|
+
clickable ? " [&:not(:last-child)&:not(:first-child)]:hawa-p-1" : "hawa-px-4", //Columns in between
|
|
5688
5691
|
className)
|
|
5689
5692
|
}, props));
|
|
5690
5693
|
});
|
|
@@ -5763,12 +5766,12 @@ var DataTable = function(_param) {
|
|
|
5763
5766
|
"enableGoTo"
|
|
5764
5767
|
]);
|
|
5765
5768
|
var _props_texts, _props_itemsPerPage, _props_texts1, _props_texts2, _table_getRowModel_rows, _props_texts3, _props_texts4, _props_texts5, _props_texts6, _props_texts7, _props_texts8;
|
|
5766
|
-
var _React45_useState = _sliced_to_array(React45.useState([
|
|
5769
|
+
var _React45_useState = _sliced_to_array(React45.useState(props.defaultSort ? [
|
|
5767
5770
|
{
|
|
5768
|
-
id: props.defaultSort
|
|
5771
|
+
id: props.defaultSort,
|
|
5769
5772
|
desc: false
|
|
5770
5773
|
}
|
|
5771
|
-
]), 2), sorting = _React45_useState[0], setSorting = _React45_useState[1];
|
|
5774
|
+
] : []), 2), sorting = _React45_useState[0], setSorting = _React45_useState[1];
|
|
5772
5775
|
var _React45_useState1 = _sliced_to_array(React45.useState([]), 2), columnFilters = _React45_useState1[0], setColumnFilters = _React45_useState1[1];
|
|
5773
5776
|
var _React45_useState2 = _sliced_to_array(React45.useState(""), 2), globalFilter = _React45_useState2[0], setGlobalFilter = _React45_useState2[1];
|
|
5774
5777
|
var _React45_useState3 = _sliced_to_array(React45.useState({}), 2), expanded = _React45_useState3[0], setExpanded = _React45_useState3[1];
|
package/dist/index.mjs
CHANGED
|
@@ -5367,17 +5367,17 @@ var TableHeader = React44.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5367
5367
|
));
|
|
5368
5368
|
TableHeader.displayName = "TableHeader";
|
|
5369
5369
|
var TableHead = React44.forwardRef(
|
|
5370
|
-
({ className, ...props }, ref) => /* @__PURE__ */ React44.createElement(
|
|
5370
|
+
({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */ React44.createElement(
|
|
5371
5371
|
"th",
|
|
5372
5372
|
{
|
|
5373
5373
|
ref,
|
|
5374
5374
|
className: cn(
|
|
5375
5375
|
"hawa-bg-muted/60 dark:hawa-bg-muted/40 hawa-text-start hawa-align-middle hawa-font-medium hawa-text-muted-foreground [&:has([role=checkbox])]:hawa-pr-0 [&:not(:last-child)&:not(:first-child)]:hawa-border-x",
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5376
|
+
dir === "rtl" ? "[&:not(:last-child)]:hawa-border-l" : "[&:not(:last-child)]:hawa-border-r",
|
|
5377
|
+
condensed ? "hawa-h-8" : "hawa-h-12",
|
|
5378
|
+
clickable ? "hawa-px-1" : "hawa-px-4",
|
|
5379
5379
|
//First and last columns
|
|
5380
|
-
|
|
5380
|
+
clickable ? " [&:not(:last-child)&:not(:first-child)]:hawa-p-1" : "hawa-px-4",
|
|
5381
5381
|
//Columns in between
|
|
5382
5382
|
className
|
|
5383
5383
|
),
|
|
@@ -5467,9 +5467,9 @@ var DataTable = ({
|
|
|
5467
5467
|
enableGoTo,
|
|
5468
5468
|
...props
|
|
5469
5469
|
}) => {
|
|
5470
|
-
const [sorting, setSorting] = React45.useState(
|
|
5471
|
-
{ id: props.defaultSort
|
|
5472
|
-
|
|
5470
|
+
const [sorting, setSorting] = React45.useState(
|
|
5471
|
+
props.defaultSort ? [{ id: props.defaultSort, desc: false }] : []
|
|
5472
|
+
);
|
|
5473
5473
|
const [columnFilters, setColumnFilters] = React45.useState(
|
|
5474
5474
|
[]
|
|
5475
5475
|
);
|