@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.
package/dist/index.mjs CHANGED
@@ -25452,8 +25452,10 @@ function DataExplorerRecordPicker({
25452
25452
  searchPlaceholder = "Search records",
25453
25453
  emptyState = "No records found",
25454
25454
  loadingState,
25455
+ loadingMoreState,
25455
25456
  errorState,
25456
25457
  loading = false,
25458
+ loadingMore = false,
25457
25459
  disabled = false,
25458
25460
  open,
25459
25461
  defaultOpen = false,
@@ -25565,34 +25567,50 @@ function DataExplorerRecordPicker({
25565
25567
  children: loading ? /* @__PURE__ */ jsxs("div", { ...dataAttributes?.loading, className: cn3("flex min-h-16 items-center justify-center gap-2 px-3 py-4 text-sm text-muted-foreground", classNames?.status), children: [
25566
25568
  /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }),
25567
25569
  loadingState ?? "Loading records..."
25568
- ] }) : errorState ? /* @__PURE__ */ jsx("div", { ...dataAttributes?.error, className: cn3("px-3 py-4 text-sm text-destructive-text", classNames?.status), children: errorState }) : visibleOptions.length === 0 ? /* @__PURE__ */ jsx("div", { ...dataAttributes?.empty, className: cn3("px-3 py-4 text-sm text-muted-foreground", classNames?.status), children: emptyState }) : visibleOptions.map((option) => {
25569
- const selected = selectedSet.has(option.value);
25570
- return /* @__PURE__ */ jsxs(
25571
- "button",
25570
+ ] }) : errorState ? /* @__PURE__ */ jsx("div", { ...dataAttributes?.error, className: cn3("px-3 py-4 text-sm text-destructive-text", classNames?.status), children: errorState }) : visibleOptions.length === 0 ? /* @__PURE__ */ jsx("div", { ...dataAttributes?.empty, className: cn3("px-3 py-4 text-sm text-muted-foreground", classNames?.status), children: emptyState }) : /* @__PURE__ */ jsxs(Fragment, { children: [
25571
+ visibleOptions.map((option) => {
25572
+ const selected = selectedSet.has(option.value);
25573
+ return /* @__PURE__ */ jsxs(
25574
+ "button",
25575
+ {
25576
+ ...dataAttributes?.option,
25577
+ type: "button",
25578
+ role: "option",
25579
+ "aria-selected": selected,
25580
+ "aria-current": activeValue !== void 0 && option.value === activeValue ? "true" : void 0,
25581
+ disabled: option.disabled,
25582
+ onClick: () => handleOptionClick(option),
25583
+ className: cn3(
25584
+ "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",
25585
+ selected && "bg-accent/60",
25586
+ classNames?.option
25587
+ ),
25588
+ children: [
25589
+ /* @__PURE__ */ jsx("span", { className: cn3("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 }),
25590
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
25591
+ /* @__PURE__ */ jsx("span", { className: cn3("block truncate", classNames?.optionLabel), children: option.label }),
25592
+ option.description ? /* @__PURE__ */ jsx("span", { className: cn3("mt-0.5 block truncate text-xs text-muted-foreground", classNames?.optionDescription), children: option.description }) : null
25593
+ ] })
25594
+ ]
25595
+ },
25596
+ option.value
25597
+ );
25598
+ }),
25599
+ loadingMore ? /* @__PURE__ */ jsxs(
25600
+ "div",
25572
25601
  {
25573
- ...dataAttributes?.option,
25574
- type: "button",
25575
- role: "option",
25576
- "aria-selected": selected,
25577
- "aria-current": activeValue !== void 0 && option.value === activeValue ? "true" : void 0,
25578
- disabled: option.disabled,
25579
- onClick: () => handleOptionClick(option),
25602
+ ...dataAttributes?.loadingMore,
25580
25603
  className: cn3(
25581
- "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",
25582
- selected && "bg-accent/60",
25583
- classNames?.option
25604
+ "flex items-center justify-center gap-2 px-3 py-2 text-xs text-muted-foreground",
25605
+ classNames?.status
25584
25606
  ),
25585
25607
  children: [
25586
- /* @__PURE__ */ jsx("span", { className: cn3("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 }),
25587
- /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
25588
- /* @__PURE__ */ jsx("span", { className: cn3("block truncate", classNames?.optionLabel), children: option.label }),
25589
- option.description ? /* @__PURE__ */ jsx("span", { className: cn3("mt-0.5 block truncate text-xs text-muted-foreground", classNames?.optionDescription), children: option.description }) : null
25590
- ] })
25608
+ /* @__PURE__ */ jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin", "aria-hidden": "true" }),
25609
+ loadingMoreState ?? "Loading more records..."
25591
25610
  ]
25592
- },
25593
- option.value
25594
- );
25595
- })
25611
+ }
25612
+ ) : null
25613
+ ] })
25596
25614
  }
25597
25615
  )
25598
25616
  ]