@ai-matrx/records-ui 0.103.0 → 0.103.2

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/pickers.cjs CHANGED
@@ -722,6 +722,7 @@ function PickChips({ chips }) {
722
722
  ) });
723
723
  }
724
724
  function PickOrAdd({
725
+ triggerSize = "field",
725
726
  triggerLabel,
726
727
  triggerText,
727
728
  triggerId,
@@ -780,7 +781,7 @@ function PickOrAdd({
780
781
  }
781
782
  ) : null;
782
783
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system3.Popover, { open, onOpenChange, children: [
783
- anchored ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system3.PopoverAnchor, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex min-h-6 w-full min-w-0 flex-wrap items-center gap-1", "aria-label": triggerLabel, children }) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system3.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system3.Button, { id: triggerId, type: "button", size: "sm", variant: "outline", "aria-label": triggerLabel, children: triggerText }) }),
784
+ anchored ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system3.PopoverAnchor, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { "data-pick-anchor": "", className: "flex min-h-6 w-full min-w-0 flex-wrap items-center gap-1", "aria-label": triggerLabel, children }) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system3.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system3.Button, { id: triggerId, type: "button", size: "sm", variant: "outline", className: triggerSize === "field" ? "h-9" : void 0, "aria-label": triggerLabel, children: triggerText }) }),
784
785
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
785
786
  import_design_system3.PopoverContent,
786
787
  {
@@ -2274,6 +2275,7 @@ function PickOne({
2274
2275
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: (0, import_design_system9.cn)("inline-flex min-w-0", className), "data-records-pick-one": "search", "data-pick-value": value, ...attrs ?? {}, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2275
2276
  PickOrAdd,
2276
2277
  {
2278
+ triggerSize: "compact",
2277
2279
  triggerLabel: label,
2278
2280
  triggerText: current?.label ?? placeholder ?? "",
2279
2281
  triggerId: id,
@@ -3571,7 +3573,7 @@ function TypedWordsControl({ field, value, onChange, disabled, id }) {
3571
3573
  disabled,
3572
3574
  autoComplete: "off",
3573
3575
  "aria-invalid": refusal2 ? true : void 0,
3574
- placeholder: helper === "time" ? "2:30 PM" : helper === "datetime" ? `${(0, import_records10.typedDateText)("2026-10-03")} 2:30 PM` : helper ? (0, import_records10.typedDateText)("2026-10-03") : void 0,
3576
+ placeholder: helper ? typedDatePlaceholder(helper) : void 0,
3575
3577
  onChange: (e) => retype(e.target.value),
3576
3578
  onBlur: () => {
3577
3579
  if (!refusal2) return;
@@ -3585,6 +3587,12 @@ function TypedWordsControl({ field, value, onChange, disabled, id }) {
3585
3587
  refusal2 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "data-records-typed-refusal": "", "data-records-cell-note": "", role: "status", title: why, className: "text-[11px] leading-snug text-amber-700 dark:text-amber-400", children: refusal2 }) : null
3586
3588
  ] });
3587
3589
  }
3590
+ function typedDatePlaceholder(helper) {
3591
+ const time = "h:mm AM";
3592
+ if (helper === "time") return time;
3593
+ const pattern = (0, import_records10.typedDateText)("2026-11-22").replace("2026", "YYYY").replace("11", "MM").replace("22", "DD");
3594
+ return helper === "datetime" ? `${pattern} ${time}` : pattern;
3595
+ }
3588
3596
  function CheckboxControl({ field, value, onChange, disabled, id }) {
3589
3597
  const unanswered = value === null || value === void 0;
3590
3598
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-2", children: [