@vpdev2/metakyc-sdk 1.0.29 → 1.0.30
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/components/core/MultiSelect.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2671,7 +2671,7 @@ const ar = ({
|
|
|
2671
2671
|
var m;
|
|
2672
2672
|
return ((m = a.find((A) => A.value === p)) == null ? void 0 : m.label) || p;
|
|
2673
2673
|
};
|
|
2674
|
-
return /* @__PURE__ */ o("div", { className: "w-full", ref: f, children: [
|
|
2674
|
+
return /* @__PURE__ */ o("div", { className: "w-full metakyc-multiselect", ref: f, children: [
|
|
2675
2675
|
t && /* @__PURE__ */ o("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
|
|
2676
2676
|
t,
|
|
2677
2677
|
l && /* @__PURE__ */ n("span", { className: "text-red-500 ml-1", children: "*" })
|
|
@@ -2682,6 +2682,7 @@ const ar = ({
|
|
|
2682
2682
|
{
|
|
2683
2683
|
onClick: () => !i && d(!c),
|
|
2684
2684
|
className: G(
|
|
2685
|
+
"metakyc-multiselect-trigger",
|
|
2685
2686
|
"min-h-[42px] w-full px-3 py-2 rounded-lg border text-sm transition-colors",
|
|
2686
2687
|
"bg-white dark:bg-gray-800",
|
|
2687
2688
|
"border-gray-300 dark:border-gray-600",
|
|
@@ -2689,10 +2690,10 @@ const ar = ({
|
|
|
2689
2690
|
i ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
2690
2691
|
),
|
|
2691
2692
|
children: [
|
|
2692
|
-
e.length === 0 ? /* @__PURE__ */ n("span", { className: "text-gray-400 dark:text-gray-500 leading-6", children: s }) : /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1 pr-6", children: e.map((p) => /* @__PURE__ */ o(
|
|
2693
|
+
e.length === 0 ? /* @__PURE__ */ n("span", { className: "metakyc-multiselect-placeholder text-gray-400 dark:text-gray-500 leading-6", children: s }) : /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1 pr-6", children: e.map((p) => /* @__PURE__ */ o(
|
|
2693
2694
|
"span",
|
|
2694
2695
|
{
|
|
2695
|
-
className: "inline-flex items-center gap-1 px-2 py-0.5 rounded bg-blue-100 dark:bg-blue-900/40 text-blue-800 dark:text-blue-300 text-xs font-medium",
|
|
2696
|
+
className: "metakyc-multiselect-chip inline-flex items-center gap-1 px-2 py-0.5 rounded bg-blue-100 dark:bg-blue-900/40 text-blue-800 dark:text-blue-300 text-xs font-medium",
|
|
2696
2697
|
children: [
|
|
2697
2698
|
b(p),
|
|
2698
2699
|
!i && /* @__PURE__ */ n(
|
|
@@ -2708,12 +2709,12 @@ const ar = ({
|
|
|
2708
2709
|
},
|
|
2709
2710
|
p
|
|
2710
2711
|
)) }),
|
|
2711
|
-
/* @__PURE__ */ n("span", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none text-xs", children: c ? "▲" : "▼" })
|
|
2712
|
+
/* @__PURE__ */ n("span", { className: "metakyc-multiselect-arrow absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none text-xs", children: c ? "▲" : "▼" })
|
|
2712
2713
|
]
|
|
2713
2714
|
}
|
|
2714
2715
|
),
|
|
2715
|
-
c && /* @__PURE__ */ o("div", { className: "absolute z-50 w-full mt-1 rounded-lg border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-800 shadow-lg", children: [
|
|
2716
|
-
/* @__PURE__ */ n("div", { className: "p-2 border-b border-gray-100 dark:border-gray-700", children: /* @__PURE__ */ n(
|
|
2716
|
+
c && /* @__PURE__ */ o("div", { className: "metakyc-multiselect-dropdown absolute z-50 w-full mt-1 rounded-lg border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-800 shadow-lg", children: [
|
|
2717
|
+
/* @__PURE__ */ n("div", { className: "metakyc-multiselect-search-wrapper p-2 border-b border-gray-100 dark:border-gray-700", children: /* @__PURE__ */ n(
|
|
2717
2718
|
"input",
|
|
2718
2719
|
{
|
|
2719
2720
|
type: "text",
|
|
@@ -2722,7 +2723,7 @@ const ar = ({
|
|
|
2722
2723
|
placeholder: "Search...",
|
|
2723
2724
|
autoFocus: !0,
|
|
2724
2725
|
onClick: (p) => p.stopPropagation(),
|
|
2725
|
-
className: "w-full px-2 py-1.5 text-sm rounded border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-1 focus:ring-blue-500"
|
|
2726
|
+
className: "metakyc-multiselect-search w-full px-2 py-1.5 text-sm rounded border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-1 focus:ring-blue-500"
|
|
2726
2727
|
}
|
|
2727
2728
|
) }),
|
|
2728
2729
|
/* @__PURE__ */ n("ul", { className: "max-h-48 overflow-y-auto py-1", children: g.length === 0 ? /* @__PURE__ */ n("li", { className: "px-3 py-2 text-sm text-gray-500 dark:text-gray-400", children: "No results" }) : g.map((p) => /* @__PURE__ */ o(
|
|
@@ -2730,9 +2731,10 @@ const ar = ({
|
|
|
2730
2731
|
{
|
|
2731
2732
|
onClick: () => v(p.value),
|
|
2732
2733
|
className: G(
|
|
2734
|
+
"metakyc-multiselect-option",
|
|
2733
2735
|
"flex items-center gap-2 px-3 py-2 text-sm cursor-pointer",
|
|
2734
2736
|
"hover:bg-gray-50 dark:hover:bg-gray-700",
|
|
2735
|
-
e.includes(p.value) && "bg-blue-50 dark:bg-blue-900/20"
|
|
2737
|
+
e.includes(p.value) && "metakyc-multiselect-option-selected bg-blue-50 dark:bg-blue-900/20"
|
|
2736
2738
|
),
|
|
2737
2739
|
children: [
|
|
2738
2740
|
/* @__PURE__ */ n(
|
|
@@ -2749,7 +2751,7 @@ const ar = ({
|
|
|
2749
2751
|
},
|
|
2750
2752
|
p.value
|
|
2751
2753
|
)) }),
|
|
2752
|
-
e.length > 0 && /* @__PURE__ */ n("div", { className: "p-2 border-t border-gray-100 dark:border-gray-700", children: /* @__PURE__ */ o(
|
|
2754
|
+
e.length > 0 && /* @__PURE__ */ n("div", { className: "metakyc-multiselect-clear p-2 border-t border-gray-100 dark:border-gray-700", children: /* @__PURE__ */ o(
|
|
2753
2755
|
"button",
|
|
2754
2756
|
{
|
|
2755
2757
|
type: "button",
|