@algorithm-shift/design-system 1.2.989 → 1.2.991
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 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2061,10 +2061,10 @@ function useLazyDropdown(config) {
|
|
|
2061
2061
|
(0, import_react20.useEffect)(() => {
|
|
2062
2062
|
if (config.initialData?.length) {
|
|
2063
2063
|
allDataRef.current = config.initialData;
|
|
2064
|
-
loadPage(1, "");
|
|
2065
2064
|
}
|
|
2066
2065
|
}, [config.initialData]);
|
|
2067
2066
|
(0, import_react20.useEffect)(() => {
|
|
2067
|
+
if (config.fetchOnMount) loadPage(1, "");
|
|
2068
2068
|
return () => {
|
|
2069
2069
|
if (debounceTimer.current) clearTimeout(debounceTimer.current);
|
|
2070
2070
|
};
|
|
@@ -3704,14 +3704,14 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
|
|
|
3704
3704
|
}
|
|
3705
3705
|
) });
|
|
3706
3706
|
case "icon":
|
|
3707
|
-
const maybeIcon = LucideIcons2[rendererProps?.icon];
|
|
3708
|
-
const IconComponent = typeof maybeIcon === "function" ? maybeIcon : LucideIcons2.Star;
|
|
3709
3707
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3710
|
-
|
|
3708
|
+
Icon,
|
|
3711
3709
|
{
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3710
|
+
iconSet: rendererProps.iconSet,
|
|
3711
|
+
icon: rendererProps.icon,
|
|
3712
|
+
prefix: rendererProps.prefix,
|
|
3713
|
+
iconSize: rendererProps.size,
|
|
3714
|
+
className: rendererProps.className
|
|
3715
3715
|
}
|
|
3716
3716
|
);
|
|
3717
3717
|
case "badge": {
|
|
@@ -3729,8 +3729,8 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
|
|
|
3729
3729
|
}
|
|
3730
3730
|
case "chip": {
|
|
3731
3731
|
const color = rendererProps?.color || "gray";
|
|
3732
|
-
const
|
|
3733
|
-
const
|
|
3732
|
+
const maybeIcon = LucideIcons2[rendererProps?.icon];
|
|
3733
|
+
const IconComponent = typeof maybeIcon === "function" ? maybeIcon : LucideIcons2.Star;
|
|
3734
3734
|
if (!formattedValue) return null;
|
|
3735
3735
|
const textColor = getContrastColor(color);
|
|
3736
3736
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
@@ -3739,7 +3739,7 @@ var cellRendererFactory = (renderer, rendererProps, value, row, customRenderers
|
|
|
3739
3739
|
className: `inline-flex items-center gap-1 px-2 py-1 text-xs rounded-full bg-[${color}]-100 text-[${textColor}]-700`,
|
|
3740
3740
|
style: { backgroundColor: color, color: textColor },
|
|
3741
3741
|
children: [
|
|
3742
|
-
rendererProps?.icon && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children:
|
|
3742
|
+
rendererProps?.icon && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(IconComponent, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(LucideIcons2.Box, { className: "h-4 w-4" }) }),
|
|
3743
3743
|
formattedValue
|
|
3744
3744
|
]
|
|
3745
3745
|
}
|