@algorithm-shift/design-system 1.2.84 → 1.2.85
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 +12 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27951,11 +27951,16 @@ function LazySelectDropdown({
|
|
|
27951
27951
|
}
|
|
27952
27952
|
),
|
|
27953
27953
|
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "mt-1 text-xs text-red-500", children: errorMessage }),
|
|
27954
|
-
isOpen && !disabled && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Portal_default, {
|
|
27954
|
+
isOpen && !disabled && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Portal_default, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
27955
27955
|
"div",
|
|
27956
27956
|
{
|
|
27957
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
27957
27958
|
className: "fixed z-[9999] w-fit mt-1 bg-white border border-gray-300 rounded-lg shadow-lg max-h-60 overflow-y-auto",
|
|
27958
|
-
style: {
|
|
27959
|
+
style: {
|
|
27960
|
+
width: dropdownRef.current?.offsetWidth,
|
|
27961
|
+
top: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().bottom + window.scrollY : 0,
|
|
27962
|
+
left: dropdownRef.current ? dropdownRef.current.getBoundingClientRect().left + window.scrollX : 0
|
|
27963
|
+
},
|
|
27959
27964
|
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: [
|
|
27960
27965
|
/* @__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" }),
|
|
27961
27966
|
"Loading..."
|
|
@@ -27963,7 +27968,9 @@ function LazySelectDropdown({
|
|
|
27963
27968
|
lazyOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
27964
27969
|
"div",
|
|
27965
27970
|
{
|
|
27966
|
-
onClick: () =>
|
|
27971
|
+
onClick: () => {
|
|
27972
|
+
handleSelect(option.value);
|
|
27973
|
+
},
|
|
27967
27974
|
className: `px-3 py-2 hover:bg-blue-50 cursor-pointer text-sm ${option.value === value ? "bg-blue-100" : ""}`,
|
|
27968
27975
|
children: option.label
|
|
27969
27976
|
},
|
|
@@ -28014,6 +28021,8 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
28014
28021
|
LazyDropdown_default,
|
|
28015
28022
|
{
|
|
28016
28023
|
...props,
|
|
28024
|
+
dataKey,
|
|
28025
|
+
dataLabel,
|
|
28017
28026
|
id: props.name || "lazy-select-field",
|
|
28018
28027
|
options: list,
|
|
28019
28028
|
onChange: handleChange,
|