@sikka/hawa 0.16.11-next → 0.16.13-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 CHANGED
@@ -3499,16 +3499,10 @@ var Label2 = React14.forwardRef(function(_param, ref) /* @__PURE__ */ {
3499
3499
  cx: "12",
3500
3500
  cy: "12",
3501
3501
  r: "10"
3502
- }), /* @__PURE__ */ React14.createElement("line", {
3503
- x1: "12",
3504
- x2: "12",
3505
- y1: "8",
3506
- y2: "12"
3507
- }), /* @__PURE__ */ React14.createElement("line", {
3508
- x1: "12",
3509
- x2: "12.01",
3510
- y1: "16",
3511
- y2: "16"
3502
+ }), /* @__PURE__ */ React14.createElement("path", {
3503
+ d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"
3504
+ }), /* @__PURE__ */ React14.createElement("path", {
3505
+ d: "M12 17h.01"
3512
3506
  }))));
3513
3507
  });
3514
3508
  Label2.displayName = "Label";
@@ -5678,13 +5672,16 @@ var TableHeader = React44.forwardRef(function(_param, ref) /* @__PURE__ */ {
5678
5672
  });
5679
5673
  TableHeader.displayName = "TableHeader";
5680
5674
  var TableHead = React44.forwardRef(function(_param, ref) /* @__PURE__ */ {
5681
- var className = _param.className, props = _object_without_properties(_param, [
5682
- "className"
5675
+ var className = _param.className, condensed = _param.condensed, clickable = _param.clickable, dir = _param.dir, props = _object_without_properties(_param, [
5676
+ "className",
5677
+ "condensed",
5678
+ "clickable",
5679
+ "dir"
5683
5680
  ]);
5684
5681
  return React44.createElement("th", _object_spread({
5685
5682
  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", props.dir === "rtl" ? "[&:not(:last-child)]:hawa-border-l" : "[&:not(:last-child)]:hawa-border-r", props.condensed ? "hawa-h-8" : "hawa-h-12", props.clickable ? "hawa-px-1" : "hawa-px-4", //First and last columns
5687
- props.clickable ? " [&:not(:last-child)&:not(:first-child)]:hawa-p-1" : "hawa-px-4", //Columns in between
5683
+ 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
5684
+ clickable ? " [&:not(:last-child)&:not(:first-child)]:hawa-p-1" : "hawa-px-4", //Columns in between
5688
5685
  className)
5689
5686
  }, props));
5690
5687
  });
@@ -5763,12 +5760,12 @@ var DataTable = function(_param) {
5763
5760
  "enableGoTo"
5764
5761
  ]);
5765
5762
  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([
5763
+ var _React45_useState = _sliced_to_array(React45.useState(props.defaultSort ? [
5767
5764
  {
5768
- id: props.defaultSort || "",
5765
+ id: props.defaultSort,
5769
5766
  desc: false
5770
5767
  }
5771
- ]), 2), sorting = _React45_useState[0], setSorting = _React45_useState[1];
5768
+ ] : []), 2), sorting = _React45_useState[0], setSorting = _React45_useState[1];
5772
5769
  var _React45_useState1 = _sliced_to_array(React45.useState([]), 2), columnFilters = _React45_useState1[0], setColumnFilters = _React45_useState1[1];
5773
5770
  var _React45_useState2 = _sliced_to_array(React45.useState(""), 2), globalFilter = _React45_useState2[0], setGlobalFilter = _React45_useState2[1];
5774
5771
  var _React45_useState3 = _sliced_to_array(React45.useState({}), 2), expanded = _React45_useState3[0], setExpanded = _React45_useState3[1];
package/dist/index.mjs CHANGED
@@ -2731,8 +2731,8 @@ var Label2 = React14.forwardRef(
2731
2731
  strokeLinejoin: "round"
2732
2732
  },
2733
2733
  /* @__PURE__ */ React14.createElement("circle", { cx: "12", cy: "12", r: "10" }),
2734
- /* @__PURE__ */ React14.createElement("line", { x1: "12", x2: "12", y1: "8", y2: "12" }),
2735
- /* @__PURE__ */ React14.createElement("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
2734
+ /* @__PURE__ */ React14.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
2735
+ /* @__PURE__ */ React14.createElement("path", { d: "M12 17h.01" })
2736
2736
  )))
2737
2737
  );
2738
2738
  Label2.displayName = "Label";
@@ -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
- props.dir === "rtl" ? "[&:not(:last-child)]:hawa-border-l" : "[&:not(:last-child)]:hawa-border-r",
5377
- props.condensed ? "hawa-h-8" : "hawa-h-12",
5378
- props.clickable ? "hawa-px-1" : "hawa-px-4",
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
- props.clickable ? " [&:not(:last-child)&:not(:first-child)]:hawa-p-1" : "hawa-px-4",
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 || "", desc: false }
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
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.16.11-next",
3
+ "version": "0.16.13-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {