@sustaina/shared-ui 1.7.0 → 1.7.1

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.d.mts CHANGED
@@ -314,6 +314,7 @@ declare function Button({ className, variant, size, active, asChild, ...props }:
314
314
 
315
315
  type Column = {
316
316
  id: string;
317
+ label?: string;
317
318
  };
318
319
  type GridPayload<TColumn extends {
319
320
  id: string;
package/dist/index.d.ts CHANGED
@@ -314,6 +314,7 @@ declare function Button({ className, variant, size, active, asChild, ...props }:
314
314
 
315
315
  type Column = {
316
316
  id: string;
317
+ label?: string;
317
318
  };
318
319
  type GridPayload<TColumn extends {
319
320
  id: string;
package/dist/index.js CHANGED
@@ -1580,10 +1580,13 @@ function SortableRow({
1580
1580
  id: value,
1581
1581
  disabled: name == "columns.0.id"
1582
1582
  });
1583
- const style = {
1584
- transform: utilities.CSS.Transform.toString(transform),
1585
- transition
1586
- };
1583
+ const style = React4__namespace.useMemo(
1584
+ () => ({
1585
+ transform: utilities.CSS.Transform.toString(transform),
1586
+ transition
1587
+ }),
1588
+ [transform, transition]
1589
+ );
1587
1590
  const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
1588
1591
  const currentFormColumns = reactHookForm.useWatch({ control, name: "columns" });
1589
1592
  return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: setNodeRef, style, className: "flex items-center rounded-md bg-white", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -1592,7 +1595,7 @@ function SortableRow({
1592
1595
  control,
1593
1596
  name,
1594
1597
  render: ({ field }) => {
1595
- const options = availableColumns.filter((col) => col.id === field.value || !currentFormColumns?.some((c) => c.id === col.id)).map((col) => ({ id: col.id, label: capitalize(col.id) }));
1598
+ const options = availableColumns.filter((col) => col.id === field.value || !currentFormColumns?.some((c) => c.id === col.id)).map((col) => ({ id: col.id, label: col?.label ? col.label : capitalize(col.id) }));
1596
1599
  return /* @__PURE__ */ jsxRuntime.jsxs(FormItem2, { className: "flex-1", children: [
1597
1600
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1598
1601
  /* @__PURE__ */ jsxRuntime.jsx(