@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/CHANGELOG.md +12 -0
- package/dist/index.cjs +150 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +150 -46
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +10 -2
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +10 -2
- package/dist/pickers.js.map +1 -1
- package/package.json +2 -2
package/dist/pickers.js
CHANGED
|
@@ -720,6 +720,7 @@ function PickChips({ chips }) {
|
|
|
720
720
|
) });
|
|
721
721
|
}
|
|
722
722
|
function PickOrAdd({
|
|
723
|
+
triggerSize = "field",
|
|
723
724
|
triggerLabel,
|
|
724
725
|
triggerText,
|
|
725
726
|
triggerId,
|
|
@@ -778,7 +779,7 @@ function PickOrAdd({
|
|
|
778
779
|
}
|
|
779
780
|
) : null;
|
|
780
781
|
return /* @__PURE__ */ jsxs3(Popover, { open, onOpenChange, children: [
|
|
781
|
-
anchored ? /* @__PURE__ */ jsx3(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsx3("div", { className: "flex min-h-6 w-full min-w-0 flex-wrap items-center gap-1", "aria-label": triggerLabel, children }) }) : /* @__PURE__ */ jsx3(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx3(Button, { id: triggerId, type: "button", size: "sm", variant: "outline", "aria-label": triggerLabel, children: triggerText }) }),
|
|
782
|
+
anchored ? /* @__PURE__ */ jsx3(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsx3("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__ */ jsx3(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx3(Button, { id: triggerId, type: "button", size: "sm", variant: "outline", className: triggerSize === "field" ? "h-9" : void 0, "aria-label": triggerLabel, children: triggerText }) }),
|
|
782
783
|
/* @__PURE__ */ jsxs3(
|
|
783
784
|
PopoverContent,
|
|
784
785
|
{
|
|
@@ -2272,6 +2273,7 @@ function PickOne({
|
|
|
2272
2273
|
return /* @__PURE__ */ jsx11("span", { className: cn8("inline-flex min-w-0", className), "data-records-pick-one": "search", "data-pick-value": value, ...attrs ?? {}, children: /* @__PURE__ */ jsx11(
|
|
2273
2274
|
PickOrAdd,
|
|
2274
2275
|
{
|
|
2276
|
+
triggerSize: "compact",
|
|
2275
2277
|
triggerLabel: label,
|
|
2276
2278
|
triggerText: current?.label ?? placeholder ?? "",
|
|
2277
2279
|
triggerId: id,
|
|
@@ -3573,7 +3575,7 @@ function TypedWordsControl({ field, value, onChange, disabled, id }) {
|
|
|
3573
3575
|
disabled,
|
|
3574
3576
|
autoComplete: "off",
|
|
3575
3577
|
"aria-invalid": refusal2 ? true : void 0,
|
|
3576
|
-
placeholder: helper
|
|
3578
|
+
placeholder: helper ? typedDatePlaceholder(helper) : void 0,
|
|
3577
3579
|
onChange: (e) => retype(e.target.value),
|
|
3578
3580
|
onBlur: () => {
|
|
3579
3581
|
if (!refusal2) return;
|
|
@@ -3587,6 +3589,12 @@ function TypedWordsControl({ field, value, onChange, disabled, id }) {
|
|
|
3587
3589
|
refusal2 ? /* @__PURE__ */ jsx17("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
|
|
3588
3590
|
] });
|
|
3589
3591
|
}
|
|
3592
|
+
function typedDatePlaceholder(helper) {
|
|
3593
|
+
const time = "h:mm AM";
|
|
3594
|
+
if (helper === "time") return time;
|
|
3595
|
+
const pattern = typedDateText2("2026-11-22").replace("2026", "YYYY").replace("11", "MM").replace("22", "DD");
|
|
3596
|
+
return helper === "datetime" ? `${pattern} ${time}` : pattern;
|
|
3597
|
+
}
|
|
3590
3598
|
function CheckboxControl({ field, value, onChange, disabled, id }) {
|
|
3591
3599
|
const unanswered = value === null || value === void 0;
|
|
3592
3600
|
return /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
|