@seekho/ui 0.1.36 → 0.1.38
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 +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1997,7 +1997,7 @@ var Select = ({
|
|
|
1997
1997
|
};
|
|
1998
1998
|
const { py, px, fontSize } = sizeConfig[size];
|
|
1999
1999
|
const borderColor = error ? "#ef4444" : isOpen ? "var(--color-skprimary, #6b31bf)" : "#d1d5db";
|
|
2000
|
-
const
|
|
2000
|
+
const boxShadow = isOpen ? `0 0 0 1px ${error ? "#ef4444" : "var(--color-skprimary, #6b31bf)"}` : "none";
|
|
2001
2001
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `relative w-full ${className}`, ref: triggerRef, children: [
|
|
2002
2002
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2003
2003
|
"button",
|
|
@@ -2006,7 +2006,7 @@ var Select = ({
|
|
|
2006
2006
|
disabled,
|
|
2007
2007
|
onClick: handleOpen,
|
|
2008
2008
|
className: "w-full flex items-center justify-between rounded-md bg-white text-left outline-none disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
2009
|
-
style: { padding: `${py} ${px}`, border:
|
|
2009
|
+
style: { padding: `${py} ${px}`, border: `1px solid ${borderColor}`, boxShadow },
|
|
2010
2010
|
children: [
|
|
2011
2011
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate flex-1 text-gray-800", style: { fontSize }, children: renderValue ? renderValue(selectedOption != null ? selectedOption : null) : selectedOption ? selectedOption.label : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: placeholder }) }),
|
|
2012
2012
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2032,14 +2032,14 @@ var Select = ({
|
|
|
2032
2032
|
{
|
|
2033
2033
|
ref: dropdownRef,
|
|
2034
2034
|
style: dropdownStyle,
|
|
2035
|
+
id: "HideScroll",
|
|
2035
2036
|
className: "bg-white shadow-lg rounded-md border border-gray-200 max-h-60 overflow-y-auto",
|
|
2036
2037
|
children: options.map((opt, i) => {
|
|
2037
2038
|
const optionProps = {
|
|
2038
2039
|
onMouseDown: () => handleSelect(opt),
|
|
2039
|
-
onMouseEnter: () => !opt.disabled && setFocusedIndex(i),
|
|
2040
2040
|
className: [
|
|
2041
2041
|
"px-3 py-2 text-[13px] select-none",
|
|
2042
|
-
opt.disabled ? "text-gray-400 cursor-not-allowed" : focusedIndex === i ? "bg-skprimary/10 text-skprimary cursor-pointer" : "text-gray-700 cursor-pointer",
|
|
2042
|
+
opt.disabled ? "text-gray-400 cursor-not-allowed" : focusedIndex === i ? "bg-skprimary/10 text-skprimary cursor-pointer" : "text-gray-700 hover:bg-gray-100 cursor-pointer",
|
|
2043
2043
|
String(opt.value) === String(value) ? "font-semibold" : ""
|
|
2044
2044
|
].join(" ")
|
|
2045
2045
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1990,7 +1990,7 @@ var Select = ({
|
|
|
1990
1990
|
};
|
|
1991
1991
|
const { py, px, fontSize } = sizeConfig[size];
|
|
1992
1992
|
const borderColor = error ? "#ef4444" : isOpen ? "var(--color-skprimary, #6b31bf)" : "#d1d5db";
|
|
1993
|
-
const
|
|
1993
|
+
const boxShadow = isOpen ? `0 0 0 1px ${error ? "#ef4444" : "var(--color-skprimary, #6b31bf)"}` : "none";
|
|
1994
1994
|
return /* @__PURE__ */ jsxs("div", { className: `relative w-full ${className}`, ref: triggerRef, children: [
|
|
1995
1995
|
/* @__PURE__ */ jsxs(
|
|
1996
1996
|
"button",
|
|
@@ -1999,7 +1999,7 @@ var Select = ({
|
|
|
1999
1999
|
disabled,
|
|
2000
2000
|
onClick: handleOpen,
|
|
2001
2001
|
className: "w-full flex items-center justify-between rounded-md bg-white text-left outline-none disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
2002
|
-
style: { padding: `${py} ${px}`, border:
|
|
2002
|
+
style: { padding: `${py} ${px}`, border: `1px solid ${borderColor}`, boxShadow },
|
|
2003
2003
|
children: [
|
|
2004
2004
|
/* @__PURE__ */ jsx("span", { className: "truncate flex-1 text-gray-800", style: { fontSize }, children: renderValue ? renderValue(selectedOption != null ? selectedOption : null) : selectedOption ? selectedOption.label : /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: placeholder }) }),
|
|
2005
2005
|
/* @__PURE__ */ jsx(
|
|
@@ -2025,14 +2025,14 @@ var Select = ({
|
|
|
2025
2025
|
{
|
|
2026
2026
|
ref: dropdownRef,
|
|
2027
2027
|
style: dropdownStyle,
|
|
2028
|
+
id: "HideScroll",
|
|
2028
2029
|
className: "bg-white shadow-lg rounded-md border border-gray-200 max-h-60 overflow-y-auto",
|
|
2029
2030
|
children: options.map((opt, i) => {
|
|
2030
2031
|
const optionProps = {
|
|
2031
2032
|
onMouseDown: () => handleSelect(opt),
|
|
2032
|
-
onMouseEnter: () => !opt.disabled && setFocusedIndex(i),
|
|
2033
2033
|
className: [
|
|
2034
2034
|
"px-3 py-2 text-[13px] select-none",
|
|
2035
|
-
opt.disabled ? "text-gray-400 cursor-not-allowed" : focusedIndex === i ? "bg-skprimary/10 text-skprimary cursor-pointer" : "text-gray-700 cursor-pointer",
|
|
2035
|
+
opt.disabled ? "text-gray-400 cursor-not-allowed" : focusedIndex === i ? "bg-skprimary/10 text-skprimary cursor-pointer" : "text-gray-700 hover:bg-gray-100 cursor-pointer",
|
|
2036
2036
|
String(opt.value) === String(value) ? "font-semibold" : ""
|
|
2037
2037
|
].join(" ")
|
|
2038
2038
|
};
|