@ai-matrx/records-ui 0.116.96 → 0.116.97

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
@@ -560,31 +560,31 @@ function RefusalNotice({
560
560
  const plain = refusalTimedOut(error) ? { ...said2, sentence: import_design_system4.TIMED_OUT_SENTENCE, storeSaid: true } : said2;
561
561
  const doors = onKeepEditing || onDiscard || onRetry ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-wrap items-center gap-1 pt-0.5", "data-refusal-doors": "", children: [
562
562
  onRetry ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
563
- "button",
563
+ import_controls.Button,
564
564
  {
565
565
  type: "button",
566
+ variant: "outline",
566
567
  "data-refusal-retry": "",
567
- className: "rounded border px-2 py-0.5 text-xs hover:bg-muted",
568
568
  onClick: onRetry,
569
569
  children: "Try again"
570
570
  }
571
571
  ) : null,
572
572
  onKeepEditing ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
573
- "button",
573
+ import_controls.Button,
574
574
  {
575
575
  type: "button",
576
+ variant: "outline",
576
577
  "data-refusal-keep-editing": "",
577
- className: "rounded border px-2 py-0.5 text-xs hover:bg-muted",
578
578
  onClick: onKeepEditing,
579
579
  children: "Keep editing"
580
580
  }
581
581
  ) : null,
582
582
  onDiscard ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
583
- "button",
583
+ import_controls.Button,
584
584
  {
585
585
  type: "button",
586
+ variant: "outline",
586
587
  "data-refusal-discard": "",
587
- className: "rounded border px-2 py-0.5 text-xs hover:bg-muted",
588
588
  onClick: onDiscard,
589
589
  children: "Discard"
590
590
  }
@@ -632,16 +632,17 @@ function RefusalLine({
632
632
  ...plain.forEngineers ? { "data-for-engineers": plain.forEngineers } : {}
633
633
  }
634
634
  ),
635
- timedOut && onRetry ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", "data-refusal-retry": "", className: "rounded border px-2 py-0.5 text-xs hover:bg-muted", onClick: onRetry, children: "Try again" }) : null
635
+ timedOut && onRetry ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls.Button, { type: "button", variant: "outline", "data-refusal-retry": "", onClick: onRetry, children: "Try again" }) : null
636
636
  ] });
637
637
  }
638
- var import_core, import_design_system4, import_jsx_runtime4;
638
+ var import_core, import_design_system4, import_controls, import_jsx_runtime4;
639
639
  var init_Refusal = __esm({
640
640
  "src/Refusal.tsx"() {
641
641
  "use strict";
642
642
  "use client";
643
643
  import_core = require("@ai-matrx/records/core");
644
644
  import_design_system4 = require("@ai-matrx/design-system");
645
+ import_controls = require("@ai-matrx/design-system/controls");
645
646
  init_ArchivedOrganizationNotice();
646
647
  init_plainWords();
647
648
  init_refusalSaid();
@@ -975,19 +976,20 @@ function PersonChip({ name, onRemove, onOpen, className }) {
975
976
  className: (0, import_design_system7.cn)("inline-flex min-w-0 max-w-full items-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-[11px] text-foreground", className),
976
977
  children: [
977
978
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PersonAvatar, { name }),
978
- onOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", onClick: onOpen, "data-records-person-open": "", className: "min-w-0 truncate hover:underline", children: name }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "min-w-0 truncate", children: name }),
979
- onRemove ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", onClick: onRemove, "aria-label": `Remove ${name}`, className: "shrink-0 opacity-60 hover:opacity-100", children: "\xD7" }) : null
979
+ onOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_controls2.Button, { type: "button", variant: "link", onClick: onOpen, "data-records-person-open": "", className: "min-w-0 truncate", children: name }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "min-w-0 truncate", children: name }),
980
+ onRemove ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_controls2.Button, { type: "button", variant: "quiet", removes: true, onClick: onRemove, "aria-label": `Remove ${name}`, className: "shrink-0 opacity-60 hover:opacity-100", children: "\xD7" }) : null
980
981
  ]
981
982
  }
982
983
  );
983
984
  }
984
- var import_design_system7, import_format, import_jsx_runtime7, PERSON_INITIALS;
985
+ var import_design_system7, import_format, import_controls2, import_jsx_runtime7, PERSON_INITIALS;
985
986
  var init_personChip = __esm({
986
987
  "src/personChip.tsx"() {
987
988
  "use strict";
988
989
  "use client";
989
990
  import_design_system7 = require("@ai-matrx/design-system");
990
991
  import_format = require("@ai-matrx/kit/format");
992
+ import_controls2 = require("@ai-matrx/design-system/controls");
991
993
  import_jsx_runtime7 = require("react/jsx-runtime");
992
994
  PERSON_INITIALS = { splitHandles: true, dropHonorifics: true };
993
995
  }
@@ -7191,6 +7193,7 @@ function encodeAt(canvas, type, maxWidth, quality) {
7191
7193
  var import_react25 = require("react");
7192
7194
  var import_icons = require("@ai-matrx/design-system/icons");
7193
7195
  var import_design_system17 = require("@ai-matrx/design-system");
7196
+ var import_controls3 = require("@ai-matrx/design-system/controls");
7194
7197
  var import_field_formats5 = require("@ai-matrx/design-system/field-formats");
7195
7198
  var import_jsx_runtime18 = require("react/jsx-runtime");
7196
7199
  var TYPE_SAMPLE = "The quick brown fox jumps over the lazy dog";
@@ -7597,9 +7600,9 @@ function ShadowLayersEditor({
7597
7600
  k
7598
7601
  )),
7599
7602
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "col-span-3", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ColorWell, { id: i === 0 ? id : `${id}-${i}`, label: `${label} layer ${i + 1} color`, value: layer.color, disabled, onChange: (c) => c && set(i, { color: c }) }) }),
7600
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "flex items-center justify-end", children: layers.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", disabled, className: "text-xs text-muted-foreground hover:text-foreground", onClick: () => onChange(layers.filter((_, j) => j !== i)), children: "Remove" }) : null })
7603
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "flex items-center justify-end", children: layers.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_controls3.Button, { type: "button", variant: "quiet", removes: true, disabled, onClick: () => onChange(layers.filter((_, j) => j !== i)), children: "Remove" }) : null })
7601
7604
  ] }, i)),
7602
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", disabled, className: "self-start text-xs text-muted-foreground hover:text-foreground", onClick: () => onChange([...layers, NEW_LAYER]), children: "+ Layer" })
7605
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_controls3.Button, { type: "button", variant: "quiet", className: "self-start text-muted-foreground", disabled, onClick: () => onChange([...layers, NEW_LAYER]), children: "+ Layer" })
7603
7606
  ] });
7604
7607
  }
7605
7608
  function ShadowEditor({ value, onChange, disabled, id, label }) {
@@ -7614,18 +7617,18 @@ function ShadowEditor({ value, onChange, disabled, id, label }) {
7614
7617
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "flex w-full flex-col gap-2", children: [
7615
7618
  /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "flex items-center gap-1", role: "tablist", "aria-label": `${label} theme`, children: [
7616
7619
  ["light", "dark"].map((t) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
7617
- "button",
7620
+ import_controls3.Button,
7618
7621
  {
7619
7622
  type: "button",
7623
+ variant: "quiet",
7620
7624
  role: "tab",
7621
7625
  "aria-selected": theme === t,
7622
- className: (0, import_design_system17.cn)("rounded-md px-2 py-0.5 text-xs", theme === t ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground"),
7623
7626
  onClick: () => setTheme(t),
7624
7627
  children: t === "light" ? "Light" : "Dark"
7625
7628
  },
7626
7629
  t
7627
7630
  )),
7628
- theme === "dark" && own3 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", className: "ml-auto text-xs text-muted-foreground hover:text-foreground", onClick: () => write({ light: pair.light, dark: null }), children: "Same as light" }) : null
7631
+ theme === "dark" && own3 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_controls3.Button, { type: "button", variant: "link", className: "ml-auto text-muted-foreground", onClick: () => write({ light: pair.light, dark: null }), children: "Same as light" }) : null
7629
7632
  ] }),
7630
7633
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
7631
7634
  ShadowLayersEditor,
@@ -7742,6 +7745,7 @@ var DESIGN_LOOK_IDS = DESIGN_LOOKS.map((look) => look.id);
7742
7745
  // src/looks/htmlLook.tsx
7743
7746
  var import_react27 = require("react");
7744
7747
  var import_design_system18 = require("@ai-matrx/design-system");
7748
+ var import_controls4 = require("@ai-matrx/design-system/controls");
7745
7749
 
7746
7750
  // src/looks/htmlFrame.tsx
7747
7751
  var import_react26 = require("react");
@@ -7941,13 +7945,15 @@ function HtmlSampleEditor({ value, onChange, disabled, id, label }) {
7941
7945
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "group relative min-w-0", "data-records-look": "html_sample", children: [
7942
7946
  stored.trim() ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(HtmlSampleFrame, { html: stored, title: label }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "block py-1 text-sm text-muted-foreground", children: "No sample" }),
7943
7947
  disabled ? null : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
7944
- "button",
7948
+ import_controls4.Button,
7945
7949
  {
7946
7950
  type: "button",
7951
+ variant: "quiet",
7952
+ className: "absolute right-0 top-0 font-mono opacity-0 shadow-sm transition-opacity focus-visible:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100",
7947
7953
  id,
7948
7954
  "aria-label": `Edit ${label} HTML`,
7949
7955
  onClick: () => setEditing(true),
7950
- className: "absolute right-0 top-0 inline-flex h-6 items-center rounded-md border border-border bg-card px-2 font-mono text-[11px] text-muted-foreground opacity-0 shadow-sm transition-opacity hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring group-focus-within:opacity-100 group-hover:opacity-100",
7956
+ "data-edit-html": "",
7951
7957
  children: "</>"
7952
7958
  }
7953
7959
  )
@@ -8732,6 +8738,7 @@ init_host();
8732
8738
  var import_react37 = require("react");
8733
8739
  var import_react38 = require("@ai-matrx/records/react");
8734
8740
  var import_design_system25 = require("@ai-matrx/design-system");
8741
+ var import_controls5 = require("@ai-matrx/design-system/controls");
8735
8742
  init_host();
8736
8743
  init_names();
8737
8744
  init_FilePicker();
@@ -8821,11 +8828,13 @@ function AttachmentChip({ id, onRemove, onPreview }) {
8821
8828
  }
8822
8829
  ),
8823
8830
  onRemove ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
8824
- "button",
8831
+ import_controls5.Button,
8825
8832
  {
8826
8833
  type: "button",
8834
+ variant: "quiet",
8835
+ removes: true,
8827
8836
  "aria-label": `Remove ${words}`,
8828
- className: "absolute -right-1 -top-1 rounded-full border bg-background px-1 text-[10px] leading-4 text-muted-foreground hover:text-foreground",
8837
+ className: "absolute -right-1 -top-1",
8829
8838
  onClick: (event) => {
8830
8839
  event.stopPropagation();
8831
8840
  onRemove();
@@ -8852,10 +8861,11 @@ function AttachmentChip({ id, onRemove, onPreview }) {
8852
8861
  } : {},
8853
8862
  children: [
8854
8863
  onPreview ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
8855
- "button",
8864
+ import_controls5.Button,
8856
8865
  {
8857
8866
  type: "button",
8858
- className: "truncate underline-offset-2 hover:underline",
8867
+ variant: "link",
8868
+ className: "truncate",
8859
8869
  "data-records-file-preview": id,
8860
8870
  onClick: (event) => {
8861
8871
  event.stopPropagation();
@@ -8877,11 +8887,13 @@ function AttachmentChip({ id, onRemove, onPreview }) {
8877
8887
  }
8878
8888
  ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "truncate", children: words }),
8879
8889
  onRemove ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
8880
- "button",
8890
+ import_controls5.Button,
8881
8891
  {
8882
8892
  type: "button",
8893
+ variant: "quiet",
8894
+ removes: true,
8883
8895
  "aria-label": `Remove ${words}`,
8884
- className: "shrink-0 rounded px-0.5 text-muted-foreground hover:text-foreground",
8896
+ className: "shrink-0",
8885
8897
  onClick: (event) => {
8886
8898
  event.stopPropagation();
8887
8899
  onRemove();
@@ -9266,7 +9278,7 @@ var import_outbound_react6 = require("@ai-matrx/kit/outbound-react");
9266
9278
  // src/structuredValue.tsx
9267
9279
  var import_react52 = require("react");
9268
9280
  var import_design_system31 = require("@ai-matrx/design-system");
9269
- var import_controls = require("@ai-matrx/design-system/controls");
9281
+ var import_controls6 = require("@ai-matrx/design-system/controls");
9270
9282
  var import_react53 = require("@ai-matrx/alchemy/react");
9271
9283
  var import_outbound_react5 = require("@ai-matrx/kit/outbound-react");
9272
9284
  var import_text_case6 = require("@ai-matrx/kit/text-case");
@@ -9493,10 +9505,10 @@ function Shape({ data, depth = 0 }) {
9493
9505
  function Row({ label, keyName, value, depth, gutter }) {
9494
9506
  const s = kindValueOf(value) ? null : structuredOf(value);
9495
9507
  if (!s) {
9496
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_controls.PropertyRow, { label, gutter: gutter ?? false, value: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Nested, { value, keyName }) });
9508
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_controls6.PropertyRow, { label, gutter: gutter ?? false, value: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Nested, { value, keyName }) });
9497
9509
  }
9498
9510
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9499
- import_controls.PropertyRow,
9511
+ import_controls6.PropertyRow,
9500
9512
  {
9501
9513
  label,
9502
9514
  value: structuredSummary(s.data),
@@ -9569,10 +9581,11 @@ function StructuredCell({ structured, label }) {
9569
9581
  const picture = isPlainObject2(first) ? Object.entries(first).find(([k, v]) => isImageUrl(v, k))?.[1] : void 0;
9570
9582
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_design_system31.Popover, { children: [
9571
9583
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_design_system31.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
9572
- "button",
9584
+ import_controls6.Button,
9573
9585
  {
9574
9586
  type: "button",
9575
- className: "flex h-[1.5em] min-w-0 max-w-full items-center gap-1.5 text-left text-sm hover:underline",
9587
+ variant: "quiet",
9588
+ className: "min-w-0 max-w-full text-left",
9576
9589
  "data-records-structured-cell": "",
9577
9590
  onClick: stop,
9578
9591
  onDoubleClick: stop,