@vpdev2/metakyc-sdk 1.0.29 → 1.0.31

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 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(
@@ -2700,7 +2701,26 @@ const ar = ({
2700
2701
  {
2701
2702
  type: "button",
2702
2703
  onClick: (m) => h(p, m),
2703
- className: "hover:text-blue-600 dark:hover:text-blue-200 text-base leading-none -mr-0.5",
2704
+ className: "metakyc-multiselect-chip-remove",
2705
+ style: {
2706
+ background: "transparent",
2707
+ border: "none",
2708
+ padding: "0 0 0 2px",
2709
+ margin: 0,
2710
+ cursor: "pointer",
2711
+ fontSize: "14px",
2712
+ lineHeight: 1,
2713
+ fontWeight: "bold",
2714
+ display: "inline-flex",
2715
+ alignItems: "center",
2716
+ boxShadow: "none",
2717
+ transform: "none",
2718
+ minWidth: 0,
2719
+ width: "auto",
2720
+ height: "auto",
2721
+ letterSpacing: "normal",
2722
+ textTransform: "none"
2723
+ },
2704
2724
  children: "×"
2705
2725
  }
2706
2726
  )
@@ -2708,63 +2728,72 @@ const ar = ({
2708
2728
  },
2709
2729
  p
2710
2730
  )) }),
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 ? "▲" : "▼" })
2731
+ /* @__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
2732
  ]
2713
2733
  }
2714
2734
  ),
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(
2717
- "input",
2718
- {
2719
- type: "text",
2720
- value: u,
2721
- onChange: (p) => y(p.target.value),
2722
- placeholder: "Search...",
2723
- autoFocus: !0,
2724
- 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
- }
2727
- ) }),
2728
- /* @__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(
2729
- "li",
2730
- {
2731
- onClick: () => v(p.value),
2732
- className: G(
2733
- "flex items-center gap-2 px-3 py-2 text-sm cursor-pointer",
2734
- "hover:bg-gray-50 dark:hover:bg-gray-700",
2735
- e.includes(p.value) && "bg-blue-50 dark:bg-blue-900/20"
2736
- ),
2737
- children: [
2738
- /* @__PURE__ */ n(
2739
- "input",
2740
- {
2741
- type: "checkbox",
2742
- checked: e.includes(p.value),
2743
- readOnly: !0,
2744
- className: "rounded border-gray-300 text-blue-600 pointer-events-none"
2745
- }
2746
- ),
2747
- /* @__PURE__ */ n("span", { className: "text-gray-900 dark:text-gray-100", children: p.label })
2748
- ]
2749
- },
2750
- p.value
2751
- )) }),
2752
- e.length > 0 && /* @__PURE__ */ n("div", { className: "p-2 border-t border-gray-100 dark:border-gray-700", children: /* @__PURE__ */ o(
2753
- "button",
2754
- {
2755
- type: "button",
2756
- onClick: () => {
2757
- r([]), y("");
2758
- },
2759
- className: "text-xs text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300",
2760
- children: [
2761
- "Clear all (",
2762
- e.length,
2763
- " selected)"
2764
- ]
2765
- }
2766
- ) })
2767
- ] })
2735
+ c && /* @__PURE__ */ o(
2736
+ "div",
2737
+ {
2738
+ className: "metakyc-multiselect-dropdown absolute z-50 w-full mt-1 rounded-lg shadow-lg",
2739
+ style: { background: "inherit", border: "1px solid #d1d5db" },
2740
+ children: [
2741
+ /* @__PURE__ */ n("div", { className: "metakyc-multiselect-search-wrapper p-2", style: { borderBottom: "1px solid #e5e7eb" }, children: /* @__PURE__ */ n(
2742
+ "input",
2743
+ {
2744
+ type: "text",
2745
+ value: u,
2746
+ onChange: (p) => y(p.target.value),
2747
+ placeholder: "Search...",
2748
+ autoFocus: !0,
2749
+ onClick: (p) => p.stopPropagation(),
2750
+ className: "metakyc-multiselect-search w-full px-2 py-1.5 text-sm rounded focus:outline-none focus:ring-1 focus:ring-blue-500",
2751
+ style: { border: "1px solid #d1d5db" }
2752
+ }
2753
+ ) }),
2754
+ /* @__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(
2755
+ "li",
2756
+ {
2757
+ onClick: () => v(p.value),
2758
+ className: G(
2759
+ "metakyc-multiselect-option",
2760
+ "flex items-center gap-2 px-3 py-2 text-sm cursor-pointer",
2761
+ "hover:bg-gray-50 dark:hover:bg-gray-700",
2762
+ e.includes(p.value) && "metakyc-multiselect-option-selected bg-blue-50 dark:bg-blue-900/20"
2763
+ ),
2764
+ children: [
2765
+ /* @__PURE__ */ n(
2766
+ "input",
2767
+ {
2768
+ type: "checkbox",
2769
+ checked: e.includes(p.value),
2770
+ readOnly: !0,
2771
+ className: "rounded border-gray-300 text-blue-600 pointer-events-none"
2772
+ }
2773
+ ),
2774
+ /* @__PURE__ */ n("span", { className: "text-gray-900 dark:text-gray-100", children: p.label })
2775
+ ]
2776
+ },
2777
+ p.value
2778
+ )) }),
2779
+ e.length > 0 && /* @__PURE__ */ n("div", { className: "metakyc-multiselect-clear p-2 border-t border-gray-100 dark:border-gray-700", children: /* @__PURE__ */ o(
2780
+ "button",
2781
+ {
2782
+ type: "button",
2783
+ onClick: () => {
2784
+ r([]), y("");
2785
+ },
2786
+ className: "text-xs text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300",
2787
+ children: [
2788
+ "Clear all (",
2789
+ e.length,
2790
+ " selected)"
2791
+ ]
2792
+ }
2793
+ ) })
2794
+ ]
2795
+ }
2796
+ )
2768
2797
  ] })
2769
2798
  ] });
2770
2799
  }, sr = ({