@inf-monkeys-tech/monkeys-design 1.0.108 → 1.0.109

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.
@@ -6638,8 +6638,10 @@ function DataExplorerRecordPicker({
6638
6638
  searchPlaceholder = "Search records",
6639
6639
  emptyState = "No records found",
6640
6640
  loadingState,
6641
+ loadingMoreState,
6641
6642
  errorState,
6642
6643
  loading = false,
6644
+ loadingMore = false,
6643
6645
  disabled = false,
6644
6646
  open,
6645
6647
  defaultOpen = false,
@@ -6751,34 +6753,50 @@ function DataExplorerRecordPicker({
6751
6753
  children: loading ? /* @__PURE__ */ jsxs("div", { ...dataAttributes?.loading, className: cn("flex min-h-16 items-center justify-center gap-2 px-3 py-4 text-sm text-muted-foreground", classNames?.status), children: [
6752
6754
  /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }),
6753
6755
  loadingState ?? "Loading records..."
6754
- ] }) : errorState ? /* @__PURE__ */ jsx("div", { ...dataAttributes?.error, className: cn("px-3 py-4 text-sm text-destructive-text", classNames?.status), children: errorState }) : visibleOptions.length === 0 ? /* @__PURE__ */ jsx("div", { ...dataAttributes?.empty, className: cn("px-3 py-4 text-sm text-muted-foreground", classNames?.status), children: emptyState }) : visibleOptions.map((option) => {
6755
- const selected = selectedSet.has(option.value);
6756
- return /* @__PURE__ */ jsxs(
6757
- "button",
6756
+ ] }) : errorState ? /* @__PURE__ */ jsx("div", { ...dataAttributes?.error, className: cn("px-3 py-4 text-sm text-destructive-text", classNames?.status), children: errorState }) : visibleOptions.length === 0 ? /* @__PURE__ */ jsx("div", { ...dataAttributes?.empty, className: cn("px-3 py-4 text-sm text-muted-foreground", classNames?.status), children: emptyState }) : /* @__PURE__ */ jsxs(Fragment, { children: [
6757
+ visibleOptions.map((option) => {
6758
+ const selected = selectedSet.has(option.value);
6759
+ return /* @__PURE__ */ jsxs(
6760
+ "button",
6761
+ {
6762
+ ...dataAttributes?.option,
6763
+ type: "button",
6764
+ role: "option",
6765
+ "aria-selected": selected,
6766
+ "aria-current": activeValue !== void 0 && option.value === activeValue ? "true" : void 0,
6767
+ disabled: option.disabled,
6768
+ onClick: () => handleOptionClick(option),
6769
+ className: cn(
6770
+ "flex w-full items-start gap-2 rounded-sm px-2.5 py-2 text-left text-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50",
6771
+ selected && "bg-accent/60",
6772
+ classNames?.option
6773
+ ),
6774
+ children: [
6775
+ /* @__PURE__ */ jsx("span", { className: cn("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center", classNames?.optionIndicator), children: selected ? /* @__PURE__ */ jsx(Check, { className: "h-4 w-4", "aria-hidden": "true" }) : null }),
6776
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
6777
+ /* @__PURE__ */ jsx("span", { className: cn("block truncate", classNames?.optionLabel), children: option.label }),
6778
+ option.description ? /* @__PURE__ */ jsx("span", { className: cn("mt-0.5 block truncate text-xs text-muted-foreground", classNames?.optionDescription), children: option.description }) : null
6779
+ ] })
6780
+ ]
6781
+ },
6782
+ option.value
6783
+ );
6784
+ }),
6785
+ loadingMore ? /* @__PURE__ */ jsxs(
6786
+ "div",
6758
6787
  {
6759
- ...dataAttributes?.option,
6760
- type: "button",
6761
- role: "option",
6762
- "aria-selected": selected,
6763
- "aria-current": activeValue !== void 0 && option.value === activeValue ? "true" : void 0,
6764
- disabled: option.disabled,
6765
- onClick: () => handleOptionClick(option),
6788
+ ...dataAttributes?.loadingMore,
6766
6789
  className: cn(
6767
- "flex w-full items-start gap-2 rounded-sm px-2.5 py-2 text-left text-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50",
6768
- selected && "bg-accent/60",
6769
- classNames?.option
6790
+ "flex items-center justify-center gap-2 px-3 py-2 text-xs text-muted-foreground",
6791
+ classNames?.status
6770
6792
  ),
6771
6793
  children: [
6772
- /* @__PURE__ */ jsx("span", { className: cn("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center", classNames?.optionIndicator), children: selected ? /* @__PURE__ */ jsx(Check, { className: "h-4 w-4", "aria-hidden": "true" }) : null }),
6773
- /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
6774
- /* @__PURE__ */ jsx("span", { className: cn("block truncate", classNames?.optionLabel), children: option.label }),
6775
- option.description ? /* @__PURE__ */ jsx("span", { className: cn("mt-0.5 block truncate text-xs text-muted-foreground", classNames?.optionDescription), children: option.description }) : null
6776
- ] })
6794
+ /* @__PURE__ */ jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin", "aria-hidden": "true" }),
6795
+ loadingMoreState ?? "Loading more records..."
6777
6796
  ]
6778
- },
6779
- option.value
6780
- );
6781
- })
6797
+ }
6798
+ ) : null
6799
+ ] })
6782
6800
  }
6783
6801
  )
6784
6802
  ]