@algorithm-shift/design-system 1.2.993 → 1.2.995

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
@@ -422,6 +422,7 @@ type PaginationMode = 'client' | 'server';
422
422
  interface CellClickProps {
423
423
  id: string;
424
424
  column: any;
425
+ columnId: string;
425
426
  }
426
427
 
427
428
  interface ExtendedTableProps extends TableProps {
package/dist/index.d.ts CHANGED
@@ -422,6 +422,7 @@ type PaginationMode = 'client' | 'server';
422
422
  interface CellClickProps {
423
423
  id: string;
424
424
  column: any;
425
+ columnId: string;
425
426
  }
426
427
 
427
428
  interface ExtendedTableProps extends TableProps {
package/dist/index.js CHANGED
@@ -861,7 +861,7 @@ function Icon(props) {
861
861
  ...rest
862
862
  } = props;
863
863
  const [dynamicIcon, setDynamicIcon] = (0, import_react8.useState)(icon || null);
864
- async function loadFAIcon(iconName, prefix2 = "fas") {
864
+ async function loadFAIcon(iconName, prefix2) {
865
865
  const pkgMap = {
866
866
  fas: SolidIcons,
867
867
  far: RegularIcons,
@@ -871,7 +871,7 @@ function Icon(props) {
871
871
  return basePackage[iconName] ?? null;
872
872
  }
873
873
  (0, import_react8.useEffect)(() => {
874
- if (icon && iconSet === "fontawesome") {
874
+ if (icon && iconSet === "fontawesome" && prefix) {
875
875
  loadFAIcon(icon, prefix).then((ico) => setDynamicIcon(ico));
876
876
  }
877
877
  }, [iconSet, icon, prefix]);
@@ -2126,7 +2126,8 @@ function LazySelectDropdown({
2126
2126
  errorMessage,
2127
2127
  axiosInstance,
2128
2128
  enableAddNewOption = false,
2129
- enforceStrictQueryParams = false
2129
+ enforceStrictQueryParams = false,
2130
+ ...props
2130
2131
  }) {
2131
2132
  const [isOpen, setIsOpen] = (0, import_react21.useState)(false);
2132
2133
  const [searchTerm, setSearchTerm] = (0, import_react21.useState)("");
@@ -2252,7 +2253,10 @@ function LazySelectDropdown({
2252
2253
  top: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().bottom + window.scrollY : 0,
2253
2254
  left: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().left + window.scrollX : 0
2254
2255
  },
2255
- children: loading && lazyOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "px-3 py-4 text-center text-gray-500 flex items-center justify-center gap-2 text-sm", children: [
2256
+ children: props.loading && !loading ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "px-3 py-4 text-center text-gray-500 flex items-center justify-center gap-2 text-sm", children: [
2257
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "animate-spin w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2258
+ "Loading..."
2259
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children: loading && lazyOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "px-3 py-4 text-center text-gray-500 flex items-center justify-center gap-2 text-sm", children: [
2256
2260
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "animate-spin w-4 h-4 border-2 border-gray-300 border-t-blue-500 rounded-full" }),
2257
2261
  "Loading..."
2258
2262
  ] }) : lazyOptions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
@@ -2290,7 +2294,7 @@ function LazySelectDropdown({
2290
2294
  children: `Add "${searchTerm}"`
2291
2295
  }
2292
2296
  )
2293
- ] })
2297
+ ] }) })
2294
2298
  }
2295
2299
  ) })
2296
2300
  ] });
@@ -4345,8 +4349,8 @@ var Table2 = ({
4345
4349
  onFilterChange: (filters) => onFilterChange?.({ columnKey: filters.columnKey, columnTerm: filters.columnTerm }),
4346
4350
  onGlobalSearch: (term) => onGlobalSearch?.({ searchTerm: term }),
4347
4351
  globalSearch,
4348
- onCellClick: (cell) => {
4349
- onCellClick?.({ id: cell.id, column: cell });
4352
+ onCellClick: (cell, columnId) => {
4353
+ onCellClick?.({ id: cell.id, column: cell, columnId });
4350
4354
  },
4351
4355
  onDeleteRow: (cell) => {
4352
4356
  onDeleteRow?.(cell.id);