najm-kit 0.0.21 → 0.0.23

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.
Files changed (2) hide show
  1. package/dist/index.mjs +7 -5
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -7337,7 +7337,7 @@ function NFormSectionHeader({
7337
7337
  "div",
7338
7338
  {
7339
7339
  className: cn(
7340
- "w-full flex items-center gap-2 px-2 py-1 rounded-sm mb-3",
7340
+ "w-full flex items-center gap-2 px-2 py-1 rounded-sm",
7341
7341
  color,
7342
7342
  className
7343
7343
  ),
@@ -9411,6 +9411,8 @@ function TableLayout(props) {
9411
9411
  ] });
9412
9412
  }
9413
9413
  function NTable(props) {
9414
+ const recipe = useNajmComponentStyle("table");
9415
+ const recipeBordered = Boolean(recipe?.borderColor || recipe?.borderWidth);
9414
9416
  const availableModes = props.availableModes ?? ["table", "cards", "json"];
9415
9417
  const lastInvalidModeRef = useRef(void 0);
9416
9418
  let mode = props.mode;
@@ -9501,11 +9503,11 @@ function NTable(props) {
9501
9503
  CardComponent: props.renderCard ?? null,
9502
9504
  className: props.className ?? "",
9503
9505
  classNames: props.classNames ?? {},
9504
- bordered: props.bordered,
9506
+ bordered: props.bordered ?? (recipeBordered ? true : void 0),
9505
9507
  headerClassName: props.headerClassName ?? "bg-card",
9506
- headerColor: props.headerColor,
9507
- headerTextColor: props.headerTextColor,
9508
- borderColor: props.borderColor,
9508
+ headerColor: props.headerColor ?? recipe?.headerColor,
9509
+ headerTextColor: props.headerTextColor ?? recipe?.headerTextColor,
9510
+ borderColor: props.borderColor ?? recipe?.borderColor,
9509
9511
  showCheckbox: props.showCheckbox ?? true,
9510
9512
  selectedRowId: props.selectedRowId ?? null,
9511
9513
  headerSlot: props.headerSlot ?? null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "najm-kit",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "type": "module",
5
5
  "description": "Reusable React UI component package for Najm framework",
6
6
  "main": "./dist/index.mjs",