@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/index.cjs CHANGED
@@ -898,7 +898,7 @@ function carriesTimeOfDay(field2, value) {
898
898
  function timeOfDayWords(value) {
899
899
  if (!hasTimePart(value)) return null;
900
900
  const at = value instanceof Date ? value : new Date(value);
901
- return Number.isNaN(at.getTime()) ? null : at.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit", ...(0, import_field_formats3.momentZoneOptions)(at) });
901
+ return Number.isNaN(at.getTime()) ? null : at.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit", ...(0, import_field_formats2.momentZoneOptions)(at) });
902
902
  }
903
903
  function hasTimePart(value) {
904
904
  if (value instanceof Date || typeof value === "number") return true;
@@ -921,7 +921,7 @@ function dateFormatFor(field2, value) {
921
921
  function dateText(field2, value) {
922
922
  const format = dateFormatFor(field2, value) ?? (isDateLike(value) ? { id: hasTimePart(value) ? "datetime" : "date" } : void 0);
923
923
  if (!format) return null;
924
- const result = (0, import_field_formats2.formatFieldValue)(value, format);
924
+ const result = (0, import_field_formats.formatFieldValue)(value, format);
925
925
  return result.ok && !result.empty ? result.text : null;
926
926
  }
927
927
  function isDateLike(value) {
@@ -965,12 +965,12 @@ function addDays(day2, n) {
965
965
  function daysBetween(from, to) {
966
966
  return Math.round((dayAt(to).getTime() - dayAt(from).getTime()) / 864e5);
967
967
  }
968
- var import_field_formats2, import_field_formats3, BARE_CALENDAR_DATE;
968
+ var import_field_formats, import_field_formats2, BARE_CALENDAR_DATE;
969
969
  var init_dates = __esm({
970
970
  "src/dates.ts"() {
971
971
  "use strict";
972
+ import_field_formats = require("@ai-matrx/design-system/field-formats");
972
973
  import_field_formats2 = require("@ai-matrx/design-system/field-formats");
973
- import_field_formats3 = require("@ai-matrx/design-system/field-formats");
974
974
  init_personZone();
975
975
  BARE_CALENDAR_DATE = /^(\d{4})-(\d{2})-(\d{2})(?:[T ]00:00(?::00(?:\.0+)?)?)?$/;
976
976
  }
@@ -1100,31 +1100,31 @@ function RefusalNotice({
1100
1100
  const plain3 = refusalTimedOut(error) ? { ...said2, sentence: import_design_system6.TIMED_OUT_SENTENCE, storeSaid: true } : said2;
1101
1101
  const doors = onKeepEditing || onDiscard || onRetry ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-wrap items-center gap-1 pt-0.5", "data-refusal-doors": "", children: [
1102
1102
  onRetry ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1103
- "button",
1103
+ import_controls3.Button,
1104
1104
  {
1105
1105
  type: "button",
1106
+ variant: "outline",
1106
1107
  "data-refusal-retry": "",
1107
- className: "rounded border px-2 py-0.5 text-xs hover:bg-muted",
1108
1108
  onClick: onRetry,
1109
1109
  children: "Try again"
1110
1110
  }
1111
1111
  ) : null,
1112
1112
  onKeepEditing ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1113
- "button",
1113
+ import_controls3.Button,
1114
1114
  {
1115
1115
  type: "button",
1116
+ variant: "outline",
1116
1117
  "data-refusal-keep-editing": "",
1117
- className: "rounded border px-2 py-0.5 text-xs hover:bg-muted",
1118
1118
  onClick: onKeepEditing,
1119
1119
  children: "Keep editing"
1120
1120
  }
1121
1121
  ) : null,
1122
1122
  onDiscard ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1123
- "button",
1123
+ import_controls3.Button,
1124
1124
  {
1125
1125
  type: "button",
1126
+ variant: "outline",
1126
1127
  "data-refusal-discard": "",
1127
- className: "rounded border px-2 py-0.5 text-xs hover:bg-muted",
1128
1128
  onClick: onDiscard,
1129
1129
  children: "Discard"
1130
1130
  }
@@ -1172,16 +1172,17 @@ function RefusalLine({
1172
1172
  ...plain3.forEngineers ? { "data-for-engineers": plain3.forEngineers } : {}
1173
1173
  }
1174
1174
  ),
1175
- timedOut && onRetry ? /* @__PURE__ */ (0, import_jsx_runtime11.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
1175
+ timedOut && onRetry ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_controls3.Button, { type: "button", variant: "outline", "data-refusal-retry": "", onClick: onRetry, children: "Try again" }) : null
1176
1176
  ] });
1177
1177
  }
1178
- var import_core3, import_design_system6, import_jsx_runtime11;
1178
+ var import_core3, import_design_system6, import_controls3, import_jsx_runtime11;
1179
1179
  var init_Refusal = __esm({
1180
1180
  "src/Refusal.tsx"() {
1181
1181
  "use strict";
1182
1182
  "use client";
1183
1183
  import_core3 = require("@ai-matrx/records/core");
1184
1184
  import_design_system6 = require("@ai-matrx/design-system");
1185
+ import_controls3 = require("@ai-matrx/design-system/controls");
1185
1186
  init_ArchivedOrganizationNotice();
1186
1187
  init_plainWords();
1187
1188
  init_refusalSaid();
@@ -1213,19 +1214,20 @@ function PersonChip({ name, onRemove, onOpen, className }) {
1213
1214
  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),
1214
1215
  children: [
1215
1216
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PersonAvatar, { name }),
1216
- onOpen ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", onClick: onOpen, "data-records-person-open": "", className: "min-w-0 truncate hover:underline", children: name }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "min-w-0 truncate", children: name }),
1217
- onRemove ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", onClick: onRemove, "aria-label": `Remove ${name}`, className: "shrink-0 opacity-60 hover:opacity-100", children: "\xD7" }) : null
1217
+ onOpen ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_controls4.Button, { type: "button", variant: "link", onClick: onOpen, "data-records-person-open": "", className: "min-w-0 truncate", children: name }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "min-w-0 truncate", children: name }),
1218
+ onRemove ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_controls4.Button, { type: "button", variant: "quiet", removes: true, onClick: onRemove, "aria-label": `Remove ${name}`, className: "shrink-0 opacity-60 hover:opacity-100", children: "\xD7" }) : null
1218
1219
  ]
1219
1220
  }
1220
1221
  );
1221
1222
  }
1222
- var import_design_system7, import_format, import_jsx_runtime12, PERSON_INITIALS;
1223
+ var import_design_system7, import_format, import_controls4, import_jsx_runtime12, PERSON_INITIALS;
1223
1224
  var init_personChip = __esm({
1224
1225
  "src/personChip.tsx"() {
1225
1226
  "use strict";
1226
1227
  "use client";
1227
1228
  import_design_system7 = require("@ai-matrx/design-system");
1228
1229
  import_format = require("@ai-matrx/kit/format");
1230
+ import_controls4 = require("@ai-matrx/design-system/controls");
1229
1231
  import_jsx_runtime12 = require("react/jsx-runtime");
1230
1232
  PERSON_INITIALS = { splitHandles: true, dropHonorifics: true };
1231
1233
  }
@@ -5537,7 +5539,7 @@ function NewTableStart({
5537
5539
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "h-px flex-1 bg-border" })
5538
5540
  ] }),
5539
5541
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5540
- import_controls.Tile,
5542
+ import_controls6.Tile,
5541
5543
  {
5542
5544
  "data-new-table-import": "",
5543
5545
  onClick: () => fileInput.current?.click(),
@@ -5723,7 +5725,7 @@ function ChoiceCard({
5723
5725
  onClick,
5724
5726
  ...rest
5725
5727
  }) {
5726
- return href ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_controls.Tile, { asChild: true, icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { d: icon }), title, line: words2, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("a", { href }) }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_controls.Tile, { icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { d: icon }), title, line: words2, onClick, ...rest });
5728
+ return href ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_controls6.Tile, { asChild: true, icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { d: icon }), title, line: words2, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("a", { href }) }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_controls6.Tile, { icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { d: icon }), title, line: words2, onClick, ...rest });
5727
5729
  }
5728
5730
  function Icon({ d }) {
5729
5731
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { d }) });
@@ -5767,7 +5769,7 @@ function NewTableColumns({
5767
5769
  )) }) : null
5768
5770
  ] });
5769
5771
  }
5770
- var import_react59, import_react60, import_design_system33, import_controls, import_jsx_runtime40, NEW_TABLE2, PREVIEW_ROWS, ICON;
5772
+ var import_react59, import_react60, import_design_system33, import_controls6, import_jsx_runtime40, NEW_TABLE2, PREVIEW_ROWS, ICON;
5771
5773
  var init_NewTableStart = __esm({
5772
5774
  "src/NewTableStart.tsx"() {
5773
5775
  "use strict";
@@ -5775,7 +5777,7 @@ var init_NewTableStart = __esm({
5775
5777
  import_react59 = require("react");
5776
5778
  import_react60 = require("@ai-matrx/records/react");
5777
5779
  import_design_system33 = require("@ai-matrx/design-system");
5778
- import_controls = require("@ai-matrx/design-system/controls");
5780
+ import_controls6 = require("@ai-matrx/design-system/controls");
5779
5781
  init_newTableColumns();
5780
5782
  init_Refusal();
5781
5783
  init_refusals();
@@ -6231,7 +6233,7 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, startNew, classN
6231
6233
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("label", { className: "flex flex-col gap-1", children: [
6232
6234
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_design_system36.Label, { className: "text-xs font-medium", children: "How long one appointment is" }),
6233
6235
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6234
- import_controls2.Select,
6236
+ import_controls7.Select,
6235
6237
  {
6236
6238
  "aria-label": "How long one appointment is",
6237
6239
  value: String(minutes),
@@ -6243,7 +6245,7 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, startNew, classN
6243
6245
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("label", { className: "flex flex-col gap-1", children: [
6244
6246
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_design_system36.Label, { className: "text-xs font-medium", children: "Gap kept after each one" }),
6245
6247
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6246
- import_controls2.Select,
6248
+ import_controls7.Select,
6247
6249
  {
6248
6250
  "aria-label": "Gap kept after each one",
6249
6251
  value: String(buffer),
@@ -6255,7 +6257,7 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, startNew, classN
6255
6257
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("label", { className: "flex flex-col gap-1", children: [
6256
6258
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_design_system36.Label, { className: "text-xs font-medium", children: "Earliest somebody may book" }),
6257
6259
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6258
- import_controls2.Select,
6260
+ import_controls7.Select,
6259
6261
  {
6260
6262
  "aria-label": "Earliest somebody may book",
6261
6263
  value: String(lead),
@@ -6282,7 +6284,7 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, startNew, classN
6282
6284
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("label", { className: "flex flex-col gap-1", children: [
6283
6285
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_design_system36.Label, { className: "text-xs font-medium", children: "How far ahead the page offers" }),
6284
6286
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6285
- import_controls2.Select,
6287
+ import_controls7.Select,
6286
6288
  {
6287
6289
  "aria-label": "How far ahead the page offers",
6288
6290
  value: String(days),
@@ -6348,7 +6350,7 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, startNew, classN
6348
6350
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("label", { className: "flex flex-col gap-1", children: [
6349
6351
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_design_system36.Label, { className: "text-xs font-medium", children: "Video" }),
6350
6352
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6351
- import_controls2.Select,
6353
+ import_controls7.Select,
6352
6354
  {
6353
6355
  "aria-label": "Video",
6354
6356
  value: video,
@@ -6607,7 +6609,7 @@ function asksWhoTheyAre(askable) {
6607
6609
  return kind2 === "email" || kind2 === "phone";
6608
6610
  });
6609
6611
  }
6610
- var import_clipboard, import_design_system35, import_react62, import_react63, import_format3, import_records20, import_design_system36, import_controls2, import_jsx_runtime42, STORE_ANSWERS_THESE, DAYS, LENGTHS, WORKING_WEEK;
6612
+ var import_clipboard, import_design_system35, import_react62, import_react63, import_format3, import_records20, import_design_system36, import_controls7, import_jsx_runtime42, STORE_ANSWERS_THESE, DAYS, LENGTHS, WORKING_WEEK;
6611
6613
  var init_BookingBuilder = __esm({
6612
6614
  "src/BookingBuilder.tsx"() {
6613
6615
  "use strict";
@@ -6619,7 +6621,7 @@ var init_BookingBuilder = __esm({
6619
6621
  import_format3 = require("@ai-matrx/kit/format");
6620
6622
  import_records20 = require("@ai-matrx/records");
6621
6623
  import_design_system36 = require("@ai-matrx/design-system");
6622
- import_controls2 = require("@ai-matrx/design-system/controls");
6624
+ import_controls7 = require("@ai-matrx/design-system/controls");
6623
6625
  init_bookingMessages();
6624
6626
  init_publicQuestions();
6625
6627
  init_Refusal();
@@ -9814,11 +9816,15 @@ function encodeAt(canvas, type, maxWidth, quality) {
9814
9816
  return out.toDataURL(type, quality);
9815
9817
  }
9816
9818
 
9819
+ // src/labels.tsx
9820
+ init_dates();
9821
+
9817
9822
  // src/looks/designLooks.tsx
9818
9823
  var import_react7 = require("react");
9819
9824
  var import_icons = require("@ai-matrx/design-system/icons");
9820
9825
  var import_design_system2 = require("@ai-matrx/design-system");
9821
- var import_field_formats = require("@ai-matrx/design-system/field-formats");
9826
+ var import_controls = require("@ai-matrx/design-system/controls");
9827
+ var import_field_formats3 = require("@ai-matrx/design-system/field-formats");
9822
9828
  var import_jsx_runtime3 = require("react/jsx-runtime");
9823
9829
  var TYPE_SAMPLE = "The quick brown fox jumps over the lazy dog";
9824
9830
  var HEX_6 = /^#[0-9a-f]{6}$/i;
@@ -9845,17 +9851,17 @@ function colorPairContrast(pair, format, context) {
9845
9851
  if (!ground) return {};
9846
9852
  const out = {};
9847
9853
  if (ground.light) {
9848
- const r = (0, import_field_formats.contrastRatio)(pair.light, ground.light);
9854
+ const r = (0, import_field_formats3.contrastRatio)(pair.light, ground.light);
9849
9855
  if (r !== null) out.light = r;
9850
9856
  }
9851
9857
  if (ground.dark) {
9852
- const r = (0, import_field_formats.contrastRatio)(pair.dark ?? pair.light, ground.dark);
9858
+ const r = (0, import_field_formats3.contrastRatio)(pair.dark ?? pair.light, ground.dark);
9853
9859
  if (r !== null) out.dark = r;
9854
9860
  }
9855
9861
  return out;
9856
9862
  }
9857
9863
  function ContrastMark({ ratio, min }) {
9858
- const level = (0, import_field_formats.contrastLevel)(ratio, min);
9864
+ const level = (0, import_field_formats3.contrastLevel)(ratio, min);
9859
9865
  const said2 = `${ratio}:1`;
9860
9866
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
9861
9867
  "span",
@@ -9871,7 +9877,7 @@ function ContrastMark({ ratio, min }) {
9871
9877
  );
9872
9878
  }
9873
9879
  function ColorPairView({ value, format }) {
9874
- const pair = (0, import_field_formats.readColorPair)(value);
9880
+ const pair = (0, import_field_formats3.readColorPair)(value);
9875
9881
  if (!pair) return null;
9876
9882
  const contrast = colorPairContrast(pair, format);
9877
9883
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { "data-records-look": "color_pair", className: "inline-flex min-w-0 items-center gap-3", children: [
@@ -9940,7 +9946,7 @@ function ColorWell({
9940
9946
  ] });
9941
9947
  }
9942
9948
  function ColorPairEditor({ value, onChange, disabled, id, label }) {
9943
- const pair = (0, import_field_formats.readColorPair)(value) ?? { light: "" };
9949
+ const pair = (0, import_field_formats3.readColorPair)(value) ?? { light: "" };
9944
9950
  const write = (next) => onChange(next.light ? JSON.stringify(next) : null);
9945
9951
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "grid grid-cols-[auto_1fr] items-center gap-x-2 gap-y-1.5", children: [
9946
9952
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-xs text-muted-foreground", children: "Light" }),
@@ -9970,7 +9976,7 @@ function ColorPairEditor({ value, onChange, disabled, id, label }) {
9970
9976
  ] });
9971
9977
  }
9972
9978
  function ColorPairPreview({ value }) {
9973
- const pair = (0, import_field_formats.readColorPair)(value);
9979
+ const pair = (0, import_field_formats3.readColorPair)(value);
9974
9980
  if (!pair) return null;
9975
9981
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "grid h-24 w-full grid-cols-2 overflow-hidden rounded-lg border border-border", children: [
9976
9982
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex items-end p-2", style: { backgroundColor: pair.light }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "rounded bg-background px-1.5 py-0.5 text-xs text-foreground", children: "Light" }) }),
@@ -9978,16 +9984,16 @@ function ColorPairPreview({ value }) {
9978
9984
  ] });
9979
9985
  }
9980
9986
  function colorPairChecks(value, format, context) {
9981
- const pair = (0, import_field_formats.readColorPair)(value);
9987
+ const pair = (0, import_field_formats3.readColorPair)(value);
9982
9988
  if (!pair) return [];
9983
9989
  const contrast = colorPairContrast(pair, format, context);
9984
9990
  const ground = colorPairGround(format, context)?.label ?? "its background";
9985
9991
  const out = [];
9986
9992
  for (const part of ["light", "dark"]) {
9987
9993
  const ratio = contrast[part];
9988
- if (ratio === void 0 || (0, import_field_formats.contrastLevel)(ratio, pair.min) === "pass") continue;
9994
+ if (ratio === void 0 || (0, import_field_formats3.contrastLevel)(ratio, pair.min) === "pass") continue;
9989
9995
  const color = part === "light" ? pair.light : pair.dark ?? pair.light;
9990
- const need = pair.min ?? import_field_formats.TEXT_CONTRAST;
9996
+ const need = pair.min ?? import_field_formats3.TEXT_CONTRAST;
9991
9997
  out.push({
9992
9998
  part,
9993
9999
  message: `hard to read on ${ground}`,
@@ -10115,16 +10121,16 @@ function MeasurePreview({ value, format }) {
10115
10121
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: dotted, "data-records-measure-preview": "size", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "h-3 rounded-full bg-primary", style: { width: Math.max(2, clamped) } }) });
10116
10122
  }
10117
10123
  function TypeStyleView({ value }) {
10118
- const style = (0, import_field_formats.readTypeStyle)(value);
10124
+ const style = (0, import_field_formats3.readTypeStyle)(value);
10119
10125
  if (!style) return null;
10120
10126
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { "data-records-look": "type_style", className: "flex min-w-0 flex-col items-start gap-1", children: [
10121
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "block max-w-full truncate text-foreground", style: (0, import_field_formats.typeStyleCss)(style), children: TYPE_SAMPLE }),
10122
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "rounded-md border border-border bg-muted px-1.5 py-0.5 text-xs text-muted-foreground", children: (0, import_field_formats.typeStyleText)(style) })
10127
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "block max-w-full truncate text-foreground", style: (0, import_field_formats3.typeStyleCss)(style), children: TYPE_SAMPLE }),
10128
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "rounded-md border border-border bg-muted px-1.5 py-0.5 text-xs text-muted-foreground", children: (0, import_field_formats3.typeStyleText)(style) })
10123
10129
  ] });
10124
10130
  }
10125
10131
  var FIELD = "grid grid-cols-[6rem_1fr] items-center gap-2";
10126
10132
  function TypeStyleEditor({ value, onChange, disabled, id, label }) {
10127
- const style = (0, import_field_formats.readTypeStyle)(value) ?? { font: "", weight: 400, size: 13, lineHeight: 20, letterSpacing: 0 };
10133
+ const style = (0, import_field_formats3.readTypeStyle)(value) ?? { font: "", weight: 400, size: 13, lineHeight: 20, letterSpacing: 0 };
10128
10134
  const write = (next) => {
10129
10135
  const merged = { ...style };
10130
10136
  for (const [k, v] of Object.entries(next)) {
@@ -10150,7 +10156,7 @@ function TypeStyleEditor({ value, onChange, disabled, id, label }) {
10150
10156
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "grid grid-cols-[1fr_6rem] gap-2", children: [
10151
10157
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system2.Select, { value: String(clampWeight(style.weight)), disabled: disabled ?? false, onValueChange: (v) => write({ weight: clampWeight(Number(v)) }), children: [
10152
10158
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectTrigger, { "aria-label": `${label} weight`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectValue, {}) }),
10153
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectContent, { children: import_field_formats.TYPE_WEIGHTS.map((w) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectItem, { value: String(w.value), children: w.label }, w.value)) })
10159
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectContent, { children: import_field_formats3.TYPE_WEIGHTS.map((w) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectItem, { value: String(w.value), children: w.label }, w.value)) })
10154
10160
  ] }),
10155
10161
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(UnitInput, { label: `${label} size`, unit: "px", value: style.size, disabled, onChange: (n) => n !== null && write({ size: clampSize(n) }) })
10156
10162
  ] })
@@ -10174,8 +10180,8 @@ function UnitInput({
10174
10180
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(NumberBox, { label, unit, value, disabled, onChange });
10175
10181
  }
10176
10182
  function TypeStylePreview({ value }) {
10177
- const style = (0, import_field_formats.readTypeStyle)(value);
10178
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex h-28 w-full items-center justify-center overflow-hidden rounded-lg border border-border bg-muted px-4", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "truncate text-foreground", style: style ? (0, import_field_formats.typeStyleCss)(style) : void 0, children: style ? TYPE_SAMPLE : "Aa" }) });
10183
+ const style = (0, import_field_formats3.readTypeStyle)(value);
10184
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex h-28 w-full items-center justify-center overflow-hidden rounded-lg border border-border bg-muted px-4", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "truncate text-foreground", style: style ? (0, import_field_formats3.typeStyleCss)(style) : void 0, children: style ? TYPE_SAMPLE : "Aa" }) });
10179
10185
  }
10180
10186
  var THEME_GROUNDS = { light: { ground: "#f4f4f5", card: "#ffffff" }, dark: { ground: "#0b0c0e", card: "#18191c" } };
10181
10187
  function ShadowSwatch({ layers, theme, size = "sm" }) {
@@ -10187,13 +10193,13 @@ function ShadowSwatch({ layers, theme, size = "sm" }) {
10187
10193
  "data-records-shadow-swatch": theme,
10188
10194
  className: (0, import_design_system2.cn)("flex shrink-0 items-center justify-center rounded-md", size === "lg" ? "h-24 w-full" : "h-7 w-11"),
10189
10195
  style: { backgroundColor: g.ground },
10190
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_design_system2.cn)("rounded", size === "lg" ? "h-12 w-20" : "h-3.5 w-6"), style: { backgroundColor: g.card, boxShadow: (0, import_field_formats.shadowCss)(layers) } })
10196
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_design_system2.cn)("rounded", size === "lg" ? "h-12 w-20" : "h-3.5 w-6"), style: { backgroundColor: g.card, boxShadow: (0, import_field_formats3.shadowCss)(layers) } })
10191
10197
  }
10192
10198
  );
10193
10199
  }
10194
- var layersWords = import_field_formats.shadowWords;
10200
+ var layersWords = import_field_formats3.shadowWords;
10195
10201
  function ShadowView({ value }) {
10196
- const pair = (0, import_field_formats.readShadowPair)(value);
10202
+ const pair = (0, import_field_formats3.readShadowPair)(value);
10197
10203
  if (!pair) return null;
10198
10204
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { "data-records-look": "shadow", className: "inline-flex min-w-0 items-center gap-2", children: [
10199
10205
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShadowSwatch, { layers: pair.light, theme: "light" }),
@@ -10224,13 +10230,13 @@ function ShadowLayersEditor({
10224
10230
  k
10225
10231
  )),
10226
10232
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "col-span-3", children: /* @__PURE__ */ (0, import_jsx_runtime3.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 }) }) }),
10227
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex items-center justify-end", children: layers.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", disabled, className: "text-xs text-muted-foreground hover:text-foreground", onClick: () => onChange(layers.filter((_, j) => j !== i)), children: "Remove" }) : null })
10233
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex items-center justify-end", children: layers.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_controls.Button, { type: "button", variant: "quiet", removes: true, disabled, onClick: () => onChange(layers.filter((_, j) => j !== i)), children: "Remove" }) : null })
10228
10234
  ] }, i)),
10229
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", disabled, className: "self-start text-xs text-muted-foreground hover:text-foreground", onClick: () => onChange([...layers, NEW_LAYER]), children: "+ Layer" })
10235
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_controls.Button, { type: "button", variant: "quiet", className: "self-start text-muted-foreground", disabled, onClick: () => onChange([...layers, NEW_LAYER]), children: "+ Layer" })
10230
10236
  ] });
10231
10237
  }
10232
10238
  function ShadowEditor({ value, onChange, disabled, id, label }) {
10233
- const pair = (0, import_field_formats.readShadowPair)(value) ?? { light: [NEW_LAYER], dark: [NEW_LAYER] };
10239
+ const pair = (0, import_field_formats3.readShadowPair)(value) ?? { light: [NEW_LAYER], dark: [NEW_LAYER] };
10234
10240
  const own3 = (() => {
10235
10241
  const raw = typeof value === "string" && value.trim().startsWith("{") ? value : null;
10236
10242
  return raw !== null && raw.includes('"dark"');
@@ -10241,18 +10247,18 @@ function ShadowEditor({ value, onChange, disabled, id, label }) {
10241
10247
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "flex w-full flex-col gap-2", children: [
10242
10248
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "flex items-center gap-1", role: "tablist", "aria-label": `${label} theme`, children: [
10243
10249
  ["light", "dark"].map((t) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10244
- "button",
10250
+ import_controls.Button,
10245
10251
  {
10246
10252
  type: "button",
10253
+ variant: "quiet",
10247
10254
  role: "tab",
10248
10255
  "aria-selected": theme === t,
10249
- className: (0, import_design_system2.cn)("rounded-md px-2 py-0.5 text-xs", theme === t ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground"),
10250
10256
  onClick: () => setTheme(t),
10251
10257
  children: t === "light" ? "Light" : "Dark"
10252
10258
  },
10253
10259
  t
10254
10260
  )),
10255
- theme === "dark" && own3 ? /* @__PURE__ */ (0, import_jsx_runtime3.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
10261
+ theme === "dark" && own3 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_controls.Button, { type: "button", variant: "link", className: "ml-auto text-muted-foreground", onClick: () => write({ light: pair.light, dark: null }), children: "Same as light" }) : null
10256
10262
  ] }),
10257
10263
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10258
10264
  ShadowLayersEditor,
@@ -10267,7 +10273,7 @@ function ShadowEditor({ value, onChange, disabled, id, label }) {
10267
10273
  ] });
10268
10274
  }
10269
10275
  function ShadowPreview({ value }) {
10270
- const pair = (0, import_field_formats.readShadowPair)(value) ?? { light: [NEW_LAYER], dark: [NEW_LAYER] };
10276
+ const pair = (0, import_field_formats3.readShadowPair)(value) ?? { light: [NEW_LAYER], dark: [NEW_LAYER] };
10271
10277
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "grid w-full grid-cols-2 gap-2", children: [
10272
10278
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShadowSwatch, { layers: pair.light, theme: "light", size: "lg" }),
10273
10279
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShadowSwatch, { layers: pair.dark, theme: "dark", size: "lg" })
@@ -10278,7 +10284,7 @@ function OpacitySwatch({ opacity, size = "sm" }) {
10278
10284
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "aria-hidden": true, className: (0, import_design_system2.cn)("relative inline-block shrink-0 overflow-hidden rounded border border-border", size === "lg" ? "h-24 w-full" : "h-5 w-5"), style: { background: CHECKER }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "absolute inset-0 bg-foreground", style: { opacity } }) });
10279
10285
  }
10280
10286
  function OpacityView({ value }) {
10281
- const o = (0, import_field_formats.readOpacity)(value);
10287
+ const o = (0, import_field_formats3.readOpacity)(value);
10282
10288
  if (o === null) return null;
10283
10289
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { "data-records-look": "opacity", className: "inline-flex items-center gap-2 tabular-nums", children: [
10284
10290
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OpacitySwatch, { opacity: o }),
@@ -10287,7 +10293,7 @@ function OpacityView({ value }) {
10287
10293
  ] });
10288
10294
  }
10289
10295
  function OpacityEditor({ value, onChange, disabled, id, label }) {
10290
- const o = (0, import_field_formats.readOpacity)(value);
10296
+ const o = (0, import_field_formats3.readOpacity)(value);
10291
10297
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "flex items-center gap-2", children: [
10292
10298
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(NumberBox, { id, label, value: o, unit: "", disabled, className: "w-full max-w-28", onChange: (n) => onChange(n === null ? null : Math.min(1, Math.max(0, n))) }),
10293
10299
  o !== null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OpacitySwatch, { opacity: o }) : null,
@@ -10298,7 +10304,7 @@ function OpacityEditor({ value, onChange, disabled, id, label }) {
10298
10304
  ] });
10299
10305
  }
10300
10306
  function OpacityPreview({ value }) {
10301
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OpacitySwatch, { opacity: (0, import_field_formats.readOpacity)(value) ?? 0.5, size: "lg" });
10307
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OpacitySwatch, { opacity: (0, import_field_formats3.readOpacity)(value) ?? 0.5, size: "lg" });
10302
10308
  }
10303
10309
  function MotionTrack({ motion, size = "sm" }) {
10304
10310
  const id = `m${Math.round(motion.duration)}-${motion.easing.replace(/[^a-z0-9]/gi, "")}`;
@@ -10320,27 +10326,27 @@ function MotionTrack({ motion, size = "sm" }) {
10320
10326
  ] });
10321
10327
  }
10322
10328
  function MotionView({ value }) {
10323
- const m = (0, import_field_formats.readMotion)(value);
10329
+ const m = (0, import_field_formats3.readMotion)(value);
10324
10330
  if (!m) return null;
10325
10331
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { "data-records-look": "motion", className: "inline-flex items-center gap-2", children: [
10326
10332
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MotionTrack, { motion: m }),
10327
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "tabular-nums", children: (0, import_field_formats.motionText)(m) })
10333
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "tabular-nums", children: (0, import_field_formats3.motionText)(m) })
10328
10334
  ] });
10329
10335
  }
10330
10336
  function MotionEditor({ value, onChange, disabled, id, label }) {
10331
- const m = (0, import_field_formats.readMotion)(value) ?? { duration: 200, easing: "ease-out" };
10337
+ const m = (0, import_field_formats3.readMotion)(value) ?? { duration: 200, easing: "ease-out" };
10332
10338
  const write = (next) => onChange(JSON.stringify({ ...m, ...next }));
10333
10339
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "flex flex-wrap items-center gap-2", children: [
10334
10340
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(NumberBox, { id, label: `${label} duration`, value: m.duration, unit: "ms", disabled, className: "w-24", onChange: (n) => n !== null && n >= 0 && write({ duration: n }) }),
10335
10341
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_design_system2.Select, { value: m.easing, disabled: disabled ?? false, onValueChange: (v) => write({ easing: v }), children: [
10336
10342
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectTrigger, { "aria-label": `${label} easing`, className: "h-7 w-36 text-xs", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectValue, {}) }),
10337
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectContent, { children: import_field_formats.MOTION_EASINGS.map((e) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectItem, { value: e.value, children: e.label }, e.value)) })
10343
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectContent, { children: import_field_formats3.MOTION_EASINGS.map((e) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_design_system2.SelectItem, { value: e.value, children: e.label }, e.value)) })
10338
10344
  ] }),
10339
10345
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MotionTrack, { motion: m })
10340
10346
  ] });
10341
10347
  }
10342
10348
  function MotionPreview({ value }) {
10343
- const m = (0, import_field_formats.readMotion)(value) ?? { duration: 200, easing: "ease-out" };
10349
+ const m = (0, import_field_formats3.readMotion)(value) ?? { duration: 200, easing: "ease-out" };
10344
10350
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex h-24 w-full items-center rounded-lg border border-border bg-muted px-4", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MotionTrack, { motion: m, size: "lg" }) });
10345
10351
  }
10346
10352
  var DESIGN_LOOKS = [
@@ -10369,6 +10375,7 @@ var DESIGN_LOOK_IDS = DESIGN_LOOKS.map((look) => look.id);
10369
10375
  // src/looks/htmlLook.tsx
10370
10376
  var import_react9 = require("react");
10371
10377
  var import_design_system3 = require("@ai-matrx/design-system");
10378
+ var import_controls2 = require("@ai-matrx/design-system/controls");
10372
10379
 
10373
10380
  // src/looks/htmlFrame.tsx
10374
10381
  var import_react8 = require("react");
@@ -10571,13 +10578,15 @@ function HtmlSampleEditor({ value, onChange, disabled, id, label }) {
10571
10578
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "group relative min-w-0", "data-records-look": "html_sample", children: [
10572
10579
  stored.trim() ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HtmlSampleFrame, { html: stored, title: label }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "block py-1 text-sm text-muted-foreground", children: "No sample" }),
10573
10580
  disabled ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10574
- "button",
10581
+ import_controls2.Button,
10575
10582
  {
10576
10583
  type: "button",
10584
+ variant: "quiet",
10585
+ 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",
10577
10586
  id,
10578
10587
  "aria-label": `Edit ${label} HTML`,
10579
10588
  onClick: () => setEditing(true),
10580
- 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",
10589
+ "data-edit-html": "",
10581
10590
  children: "</>"
10582
10591
  }
10583
10592
  )
@@ -11206,7 +11215,7 @@ function isId(value) {
11206
11215
  return typeof value === "string" && (0, import_uuid2.isUuidShape)(value);
11207
11216
  }
11208
11217
  function copiesAsWords(field2) {
11209
- return pointsAtRecords(field2) || isSignatureField(field2) || (0, import_records2.autonumberPrefixOf)(field2) !== "";
11218
+ return pointsAtRecords(field2) || isSignatureField(field2) || (0, import_records2.autonumberPrefixOf)(field2) !== "" || isDateField(field2);
11210
11219
  }
11211
11220
  function pointsAtRecords(field2) {
11212
11221
  return field2.type === "list" || field2.type === "relation";
@@ -11214,6 +11223,8 @@ function pointsAtRecords(field2) {
11214
11223
  function shownValue(field2, value, labels) {
11215
11224
  if (isSignatureField(field2)) return signatureWords(value);
11216
11225
  if ((0, import_records2.autonumberPrefixOf)(field2)) return (0, import_records2.autonumberWords)(field2, value) ?? value;
11226
+ const dateWords2 = isDateField(field2) ? dateText(field2, value) : null;
11227
+ if (dateWords2 !== null) return dateWords2;
11217
11228
  const newerWords = value === null || value === void 0 ? null : (0, import_records3.newerKindExportWords)(field2, value);
11218
11229
  if (newerWords !== null) return newerWords;
11219
11230
  const look = value === null || value === void 0 ? void 0 : registeredLook(shownAsOf(field2));
@@ -15283,6 +15294,7 @@ init_host();
15283
15294
  var import_react49 = require("react");
15284
15295
  var import_react50 = require("@ai-matrx/records/react");
15285
15296
  var import_design_system28 = require("@ai-matrx/design-system");
15297
+ var import_controls5 = require("@ai-matrx/design-system/controls");
15286
15298
  init_host();
15287
15299
  init_names();
15288
15300
  init_FilePicker();
@@ -15372,11 +15384,13 @@ function AttachmentChip({ id, onRemove, onPreview }) {
15372
15384
  }
15373
15385
  ),
15374
15386
  onRemove ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15375
- "button",
15387
+ import_controls5.Button,
15376
15388
  {
15377
15389
  type: "button",
15390
+ variant: "quiet",
15391
+ removes: true,
15378
15392
  "aria-label": `Remove ${words2}`,
15379
- className: "absolute -right-1 -top-1 rounded-full border bg-background px-1 text-[10px] leading-4 text-muted-foreground hover:text-foreground",
15393
+ className: "absolute -right-1 -top-1",
15380
15394
  onClick: (event) => {
15381
15395
  event.stopPropagation();
15382
15396
  onRemove();
@@ -15403,10 +15417,11 @@ function AttachmentChip({ id, onRemove, onPreview }) {
15403
15417
  } : {},
15404
15418
  children: [
15405
15419
  onPreview ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15406
- "button",
15420
+ import_controls5.Button,
15407
15421
  {
15408
15422
  type: "button",
15409
- className: "truncate underline-offset-2 hover:underline",
15423
+ variant: "link",
15424
+ className: "truncate",
15410
15425
  "data-records-file-preview": id,
15411
15426
  onClick: (event) => {
15412
15427
  event.stopPropagation();
@@ -15428,11 +15443,13 @@ function AttachmentChip({ id, onRemove, onPreview }) {
15428
15443
  }
15429
15444
  ) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "truncate", children: words2 }),
15430
15445
  onRemove ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
15431
- "button",
15446
+ import_controls5.Button,
15432
15447
  {
15433
15448
  type: "button",
15449
+ variant: "quiet",
15450
+ removes: true,
15434
15451
  "aria-label": `Remove ${words2}`,
15435
- className: "shrink-0 rounded px-0.5 text-muted-foreground hover:text-foreground",
15452
+ className: "shrink-0",
15436
15453
  onClick: (event) => {
15437
15454
  event.stopPropagation();
15438
15455
  onRemove();
@@ -16211,7 +16228,7 @@ var import_outbound_react6 = require("@ai-matrx/kit/outbound-react");
16211
16228
  // src/structuredValue.tsx
16212
16229
  var import_react74 = require("react");
16213
16230
  var import_design_system44 = require("@ai-matrx/design-system");
16214
- var import_controls3 = require("@ai-matrx/design-system/controls");
16231
+ var import_controls8 = require("@ai-matrx/design-system/controls");
16215
16232
  var import_react75 = require("@ai-matrx/alchemy/react");
16216
16233
  var import_outbound_react5 = require("@ai-matrx/kit/outbound-react");
16217
16234
  var import_text_case6 = require("@ai-matrx/kit/text-case");
@@ -16438,10 +16455,10 @@ function Shape({ data, depth = 0 }) {
16438
16455
  function Row({ label, keyName, value, depth, gutter }) {
16439
16456
  const s = kindValueOf(value) ? null : structuredOf(value);
16440
16457
  if (!s) {
16441
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_controls3.PropertyRow, { label, gutter: gutter ?? false, value: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Nested, { value, keyName }) });
16458
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_controls8.PropertyRow, { label, gutter: gutter ?? false, value: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Nested, { value, keyName }) });
16442
16459
  }
16443
16460
  return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
16444
- import_controls3.PropertyRow,
16461
+ import_controls8.PropertyRow,
16445
16462
  {
16446
16463
  label,
16447
16464
  value: structuredSummary(s.data),
@@ -16514,10 +16531,11 @@ function StructuredCell({ structured, label }) {
16514
16531
  const picture = isPlainObject2(first) ? Object.entries(first).find(([k, v]) => isImageUrl(v, k))?.[1] : void 0;
16515
16532
  return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system44.Popover, { children: [
16516
16533
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system44.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
16517
- "button",
16534
+ import_controls8.Button,
16518
16535
  {
16519
16536
  type: "button",
16520
- className: "flex h-[1.5em] min-w-0 max-w-full items-center gap-1.5 text-left text-sm hover:underline",
16537
+ variant: "quiet",
16538
+ className: "min-w-0 max-w-full text-left",
16521
16539
  "data-records-structured-cell": "",
16522
16540
  onClick: stop,
16523
16541
  onDoubleClick: stop,
@@ -32898,7 +32916,7 @@ var import_react172 = require("react");
32898
32916
  var import_records47 = require("@ai-matrx/records");
32899
32917
  var import_react173 = require("@ai-matrx/records/react");
32900
32918
  var import_design_system93 = require("@ai-matrx/design-system");
32901
- var import_controls4 = require("@ai-matrx/design-system/controls");
32919
+ var import_controls9 = require("@ai-matrx/design-system/controls");
32902
32920
  var import_text_case14 = require("@ai-matrx/kit/text-case");
32903
32921
  init_Refusal();
32904
32922
  init_names();
@@ -32941,7 +32959,7 @@ function AsOfControl({ value, onChange, className }) {
32941
32959
  }
32942
32960
  return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: (0, import_design_system93.cn)("flex h-6 items-center gap-1", className), "data-records-as-of": "", children: [
32943
32961
  /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
32944
- import_controls4.Field,
32962
+ import_controls9.Field,
32945
32963
  {
32946
32964
  type: "text",
32947
32965
  inputMode: "numeric",
@@ -32971,7 +32989,7 @@ function AsOfControl({ value, onChange, className }) {
32971
32989
  }
32972
32990
  ),
32973
32991
  /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { role: "group", "aria-label": "Clock", className: "flex overflow-hidden rounded border text-[11px]", children: ["recorded", "world"].map((which) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
32974
- import_controls4.Button,
32992
+ import_controls9.Button,
32975
32993
  {
32976
32994
  variant: clock === which ? "primary" : "quiet",
32977
32995
  pressed: clock === which,
@@ -37826,7 +37844,7 @@ var import_react205 = require("react");
37826
37844
  var import_records54 = require("@ai-matrx/records");
37827
37845
  var import_react206 = require("@ai-matrx/records/react");
37828
37846
  var import_design_system105 = require("@ai-matrx/design-system");
37829
- var import_controls5 = require("@ai-matrx/design-system/controls");
37847
+ var import_controls10 = require("@ai-matrx/design-system/controls");
37830
37848
  var import_icons3 = require("@ai-matrx/design-system/icons");
37831
37849
  init_Refusal();
37832
37850
  var import_jsx_runtime125 = require("react/jsx-runtime");
@@ -37887,9 +37905,9 @@ function ValuePeriods({
37887
37905
  /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {})
37888
37906
  ] }),
37889
37907
  rows === null ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_design_system105.Skeleton, { shape: "line", width: "full" }) : rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "grid grid-cols-[1fr_1fr_1fr_1rem] items-center gap-1", "data-records-value-period": i, children: [
37890
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_controls5.DateField, { value: row.from, onValueChange: (v) => change(i, { from: v }), emptyLabel: "Always", "aria-label": "From", disabled: !canWrite }),
37891
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_controls5.DateField, { value: row.to, onValueChange: (v) => change(i, { to: v }), emptyLabel: "Still true", "aria-label": "Until", disabled: !canWrite }),
37892
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_controls5.Field, { "aria-label": "Value", value: row.value, disabled: !canWrite, onChange: (e) => change(i, { value: e.target.value }) }),
37908
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_controls10.DateField, { value: row.from, onValueChange: (v) => change(i, { from: v }), emptyLabel: "Always", "aria-label": "From", disabled: !canWrite }),
37909
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_controls10.DateField, { value: row.to, onValueChange: (v) => change(i, { to: v }), emptyLabel: "Still true", "aria-label": "Until", disabled: !canWrite }),
37910
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_controls10.Field, { "aria-label": "Value", value: row.value, disabled: !canWrite, onChange: (e) => change(i, { value: e.target.value }) }),
37893
37911
  canWrite ? (
37894
37912
  // ui-exception: a 16px remove mark inside a dense row
37895
37913
  /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("button", { type: "button", "aria-label": "Remove this period", className: "text-muted-foreground hover:text-foreground", onClick: () => setRows((now) => (now ?? []).filter((_, j) => j !== i)), children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_icons3.XIcon, { className: "h-3 w-3" }) })
@@ -37898,8 +37916,8 @@ function ValuePeriods({
37898
37916
  rows !== null && rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "text-muted-foreground", children: "No dates yet" }) : null,
37899
37917
  refusal3 ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(RefusalNotice, { error: refusal3 }) : null,
37900
37918
  canWrite ? /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex items-center gap-2 pt-1", children: [
37901
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_controls5.Button, { variant: "quiet", disabled: rows === null, onClick: () => setRows((now) => [...now ?? [], { from: null, to: null, value: "" }]), children: "Add a period" }),
37902
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_controls5.Button, { variant: "primary", className: "ml-auto", disabled: rows === null || saving, onClick: () => void save(), children: saving ? "Saving\u2026" : "Save" })
37919
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_controls10.Button, { variant: "quiet", disabled: rows === null, onClick: () => setRows((now) => [...now ?? [], { from: null, to: null, value: "" }]), children: "Add a period" }),
37920
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_controls10.Button, { variant: "primary", className: "ml-auto", disabled: rows === null || saving, onClick: () => void save(), children: saving ? "Saving\u2026" : "Save" })
37903
37921
  ] }) : null
37904
37922
  ] })
37905
37923
  ] });
@@ -39468,7 +39486,7 @@ function FieldValueHistory({
39468
39486
  var import_react223 = require("react");
39469
39487
  var import_react224 = require("@ai-matrx/records/react");
39470
39488
  var import_design_system115 = require("@ai-matrx/design-system");
39471
- var import_controls6 = require("@ai-matrx/design-system/controls");
39489
+ var import_controls11 = require("@ai-matrx/design-system/controls");
39472
39490
  init_Refusal();
39473
39491
  init_BuiltOnArchive();
39474
39492
  init_host();
@@ -39629,7 +39647,7 @@ function ChecklistRunner({
39629
39647
  active.overdue > 0 ? ` \xB7 ${active.overdue} overdue` : ""
39630
39648
  ] }) : null,
39631
39649
  runs && runs.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
39632
- import_controls6.Select,
39650
+ import_controls11.Select,
39633
39651
  {
39634
39652
  "aria-label": "Checklist run",
39635
39653
  className: "ml-auto",
@@ -39719,7 +39737,7 @@ function StepRow({
39719
39737
  unassigned && onAssign && members && members.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("label", { className: "mt-1 flex items-center gap-1.5 pl-7 text-[11px] text-muted-foreground", children: [
39720
39738
  "Give it to",
39721
39739
  /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
39722
- import_controls6.Select,
39740
+ import_controls11.Select,
39723
39741
  {
39724
39742
  "aria-label": `Give ${step2.title} to`,
39725
39743
  value: "",
@@ -40207,7 +40225,7 @@ function ChecklistTemplateEditor({
40207
40225
  }
40208
40226
  ),
40209
40227
  /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
40210
- import_controls6.Select,
40228
+ import_controls11.Select,
40211
40229
  {
40212
40230
  "aria-label": `Step ${index + 1} needs`,
40213
40231
  value: row.requires,
@@ -41334,7 +41352,7 @@ init_tableShape();
41334
41352
  var import_react241 = require("react");
41335
41353
  var import_react242 = require("@ai-matrx/records/react");
41336
41354
  var import_design_system122 = require("@ai-matrx/design-system");
41337
- var import_controls7 = require("@ai-matrx/design-system/controls");
41355
+ var import_controls12 = require("@ai-matrx/design-system/controls");
41338
41356
  init_Refusal();
41339
41357
  init_host();
41340
41358
  init_names();
@@ -41469,7 +41487,7 @@ function StageRulesSection({ tableId, stage, className }) {
41469
41487
  /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center gap-2", children: [
41470
41488
  /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { className: "font-medium", children: "Rules for entering" }),
41471
41489
  /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41472
- import_controls7.Select,
41490
+ import_controls12.Select,
41473
41491
  {
41474
41492
  "aria-label": "Stage",
41475
41493
  value: stageKey ?? "",
@@ -41545,7 +41563,7 @@ function StageRulesSection({ tableId, stage, className }) {
41545
41563
  /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex flex-wrap items-center gap-1", children: [
41546
41564
  /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { className: "text-muted-foreground", children: "and when it does not" }),
41547
41565
  /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
41548
- import_controls7.Select,
41566
+ import_controls12.Select,
41549
41567
  {
41550
41568
  "aria-label": "What happens",
41551
41569
  value: draft.on_fail ?? "refuse",
@@ -42163,7 +42181,7 @@ function TableAccessLevel({ tableId, fields }) {
42163
42181
  // src/TableHistoryRetention.tsx
42164
42182
  var import_react255 = require("react");
42165
42183
  var import_react256 = require("@ai-matrx/records/react");
42166
- var import_controls8 = require("@ai-matrx/design-system/controls");
42184
+ var import_controls13 = require("@ai-matrx/design-system/controls");
42167
42185
  init_Refusal();
42168
42186
  var import_jsx_runtime149 = require("react/jsx-runtime");
42169
42187
  function TableHistoryRetention({ tableId }) {
@@ -42205,7 +42223,7 @@ function TableHistoryRetention({ tableId }) {
42205
42223
  /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", { className: "flex items-center gap-2", children: [
42206
42224
  /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", { className: "font-medium", title: "Value history older than this may be cleared; the Migration log is always kept", children: "Keep value history for" }),
42207
42225
  /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
42208
- import_controls8.Field,
42226
+ import_controls13.Field,
42209
42227
  {
42210
42228
  "aria-label": "Days of value history",
42211
42229
  inputMode: "numeric",
@@ -42217,7 +42235,7 @@ function TableHistoryRetention({ tableId }) {
42217
42235
  }
42218
42236
  ),
42219
42237
  /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", { children: "days" }),
42220
- /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_controls8.Button, { variant: "outline", className: "ml-auto", disabled: !changed2 || saving, onClick: () => void save(), children: saving ? "Saving\u2026" : "Save" })
42238
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_controls13.Button, { variant: "outline", className: "ml-auto", disabled: !changed2 || saving, onClick: () => void save(), children: saving ? "Saving\u2026" : "Save" })
42221
42239
  ] }),
42222
42240
  /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", { className: "text-muted-foreground", "data-records-history-floor": "", children: held ? `At least ${held.floor_days} days in this organization` : "\xA0" }),
42223
42241
  refusal3 ? /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(RefusalNotice, { error: refusal3 }) : null
@@ -43975,6 +43993,7 @@ function structuredWordsFor(field2, value) {
43975
43993
  var import_react273 = require("react");
43976
43994
  var import_react274 = require("@ai-matrx/records/react");
43977
43995
  var import_design_system133 = require("@ai-matrx/design-system");
43996
+ var import_controls14 = require("@ai-matrx/design-system/controls");
43978
43997
  var import_data_table19 = require("@ai-matrx/design-system/data-table");
43979
43998
 
43980
43999
  // src/weekStart.ts
@@ -44935,7 +44954,7 @@ function MonthWeek({
44935
44954
  children: everything.length <= 3 ? everything.map((p) => /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("span", { "aria-hidden": "true", "data-calendar-dot": "", className: (0, import_design_system133.cn)("h-1.5 w-1.5 rounded-full border", dotClass(p.row)) }, p.row.id)) : /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("span", { className: "rounded-full bg-muted px-1 text-[10px] tabular-nums leading-4", "data-calendar-count": "", children: everything.length })
44936
44955
  }
44937
44956
  ) : null : /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("ul", { className: "flex flex-col gap-0.5", children: shown5.map((p) => card(p, `${p.row.id}:${d}`)) }),
44938
- more > 0 && !tight ? /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)("button", { type: "button", className: "self-start px-1 text-xs text-muted-foreground hover:text-foreground", "data-calendar-more": d, onClick: () => onOpenDay(d), children: [
44957
+ more > 0 && !tight ? /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(import_controls14.Button, { type: "button", variant: "link", className: "self-start text-muted-foreground", "data-calendar-more": d, onClick: () => onOpenDay(d), children: [
44939
44958
  "+",
44940
44959
  more,
44941
44960
  " more"
@@ -45049,6 +45068,7 @@ function weekHeading(first) {
45049
45068
  var import_react275 = require("react");
45050
45069
  var import_react276 = require("@ai-matrx/records/react");
45051
45070
  var import_design_system134 = require("@ai-matrx/design-system");
45071
+ var import_controls15 = require("@ai-matrx/design-system/controls");
45052
45072
  var import_data_table20 = require("@ai-matrx/design-system/data-table");
45053
45073
  init_dates();
45054
45074
  init_names();
@@ -46133,7 +46153,7 @@ function TimelineView({
46133
46153
  const at = shown5(b.p);
46134
46154
  const slip = slipDays(baselineOf(b.p.row)?.last ?? null, at.last);
46135
46155
  return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { "data-timeline-list-row": b.p.row.id, className: "flex items-center gap-1 px-1.5 text-xs", style: { height: ROW_PX }, children: [
46136
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("button", { type: "button", className: "min-w-0 flex-1 truncate text-left hover:underline", onClick: () => onOpenRecord?.(b.p.row.id), children: titleOf(b.p.row) }),
46156
+ /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_controls15.Button, { type: "button", variant: "link", className: "min-w-0 flex-1 truncate text-left", onClick: () => onOpenRecord?.(b.p.row.id), children: titleOf(b.p.row) }),
46137
46157
  /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("span", { className: (0, import_design_system134.cn)(listDayW, "shrink-0 whitespace-nowrap tabular-nums text-muted-foreground"), children: taskListDay(at.first, listYear) }),
46138
46158
  /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("span", { className: (0, import_design_system134.cn)(listDayW, "shrink-0 whitespace-nowrap tabular-nums text-muted-foreground"), children: taskListDay(at.last, listYear) }),
46139
46159
  /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("span", { className: "w-14 shrink-0 whitespace-nowrap text-right tabular-nums", title: slip !== null ? slipWords(slip) : void 0, children: [
@@ -46578,6 +46598,7 @@ function BoardOptions({
46578
46598
 
46579
46599
  // src/clickableSurface.tsx
46580
46600
  var import_design_system137 = require("@ai-matrx/design-system");
46601
+ var import_controls16 = require("@ai-matrx/design-system/controls");
46581
46602
  var import_jsx_runtime162 = require("react/jsx-runtime");
46582
46603
  var OWN_CONTROL = "button, a[href], [role='button'], input, select, textarea, label";
46583
46604
  function ClickableSurface({
@@ -46597,9 +46618,11 @@ function ClickableSurface({
46597
46618
  };
46598
46619
  return /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)("div", { className: (0, import_design_system137.cn)("relative", className), title, onClick, ...data, children: [
46599
46620
  /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
46600
- "button",
46621
+ import_controls16.Tile,
46601
46622
  {
46602
46623
  type: "button",
46624
+ variant: "quiet",
46625
+ title: "",
46603
46626
  "aria-label": label,
46604
46627
  "data-records-surface-open": "",
46605
46628
  className: "absolute inset-0 z-0 h-full w-full cursor-pointer rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -46873,8 +46896,10 @@ var import_react290 = require("react");
46873
46896
  var import_react291 = require("@ai-matrx/records/react");
46874
46897
  var import_records62 = require("@ai-matrx/records");
46875
46898
  var import_design_system141 = require("@ai-matrx/design-system");
46899
+ var import_controls18 = require("@ai-matrx/design-system/controls");
46876
46900
 
46877
46901
  // src/ChartBlock.tsx
46902
+ var import_controls17 = require("@ai-matrx/design-system/controls");
46878
46903
  var import_react289 = require("react");
46879
46904
  var import_recharts = require("recharts");
46880
46905
  var import_records61 = require("@ai-matrx/records");
@@ -47938,7 +47963,7 @@ function Drawing({
47938
47963
  /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("span", { className: "tabular-nums", "data-records-donut-value": "", children: pretty2(value) }),
47939
47964
  /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("span", { className: "min-w-10 shrink-0 whitespace-nowrap text-right tabular-nums text-muted-foreground", "data-records-donut-share": "", children: `${share}%` })
47940
47965
  ] });
47941
- return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("li", { className: "min-w-0 text-xs", children: onDrill ? /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("button", { type: "button", className: "flex w-full min-w-0 items-center gap-2 rounded px-1 py-0.5 text-left hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", onClick: () => onDrill(point), children: row }) : /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("span", { className: "flex w-full min-w-0 items-center gap-2 px-1 py-0.5", children: row }) }, `${at}:${point.label}`);
47966
+ return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("li", { className: "min-w-0 text-xs", children: onDrill ? /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(import_controls17.Tile, { type: "button", dense: true, variant: "quiet", title: /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("span", { className: "flex min-w-0 items-center gap-2", children: row }), className: "w-full", onClick: () => onDrill(point) }) : /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("span", { className: "flex w-full min-w-0 items-center gap-2 px-1 py-0.5", children: row }) }, `${at}:${point.label}`);
47942
47967
  }) }) : null
47943
47968
  ] });
47944
47969
  }
@@ -48341,11 +48366,11 @@ function ChartLayout({ view, fields, filter, onChange, remembered }) {
48341
48366
  /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(import_design_system141.SelectContent, { children: numeric.map((f) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(import_design_system141.SelectItem, { value: f.key, children: fieldName(f) }, f.key)) })
48342
48367
  ] }) : null,
48343
48368
  /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)("label", { className: "flex items-center gap-1 text-muted-foreground", children: [
48344
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("input", { type: "checkbox", checked: dataLabels, onChange: (e) => setLook({ chartLabels: e.target.checked ? true : void 0 }), "aria-label": "Chart data labels" }),
48369
+ /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(import_controls18.Switch, { checked: dataLabels, onCheckedChange: (checked) => setLook({ chartLabels: checked ? true : void 0 }), "aria-label": "Chart data labels" }),
48345
48370
  "Data labels"
48346
48371
  ] }),
48347
48372
  /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)("label", { className: "flex items-center gap-1 text-muted-foreground", children: [
48348
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("input", { type: "checkbox", checked: legend, onChange: (e) => setLook({ chartLegend: e.target.checked ? void 0 : false }), "aria-label": "Chart legend" }),
48373
+ /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(import_controls18.Switch, { checked: legend, onCheckedChange: (checked) => setLook({ chartLegend: checked ? void 0 : false }), "aria-label": "Chart legend" }),
48349
48374
  "Legend"
48350
48375
  ] }),
48351
48376
  remembered ? null : /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("span", { className: "text-muted-foreground", children: "Kept for this visit only \u2014 this screen has nowhere to save it onto the view." })
@@ -48361,6 +48386,7 @@ var import_react293 = require("@ai-matrx/records/react");
48361
48386
  var import_records63 = require("@ai-matrx/records");
48362
48387
  var import_design_system142 = require("@ai-matrx/design-system");
48363
48388
  var import_skeleton2 = require("@ai-matrx/design-system/skeleton");
48389
+ var import_controls19 = require("@ai-matrx/design-system/controls");
48364
48390
  init_host();
48365
48391
  init_names();
48366
48392
  init_Refusal();
@@ -48452,14 +48478,16 @@ function PivotLayout({ view, fields, filter, onChange, remembered }) {
48452
48478
  const text = show(c);
48453
48479
  const body = /* @__PURE__ */ (0, import_jsx_runtime167.jsx)("span", { className: (0, import_design_system142.cn)("block truncate", bold && "font-semibold"), children: text });
48454
48480
  return opens && text !== "" ? /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
48455
- "button",
48481
+ import_controls19.Tile,
48456
48482
  {
48457
48483
  type: "button",
48484
+ dense: true,
48485
+ variant: "quiet",
48486
+ title: body,
48458
48487
  "aria-label": `${label}: ${text}. Open these records`,
48459
- className: "block w-full px-2 py-1 text-right hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
48488
+ className: "w-full justify-end text-right",
48460
48489
  "data-records-pivot-open": "",
48461
- onClick: () => opens(rowValue, colValue, words2),
48462
- children: body
48490
+ onClick: () => opens(rowValue, colValue, words2)
48463
48491
  }
48464
48492
  ) : /* @__PURE__ */ (0, import_jsx_runtime167.jsx)("span", { className: "block px-2 py-1 text-right", children: body });
48465
48493
  };
@@ -48554,6 +48582,7 @@ init_names();
48554
48582
  // src/OrgChartLayout.tsx
48555
48583
  var import_react294 = require("react");
48556
48584
  var import_design_system143 = require("@ai-matrx/design-system");
48585
+ var import_controls20 = require("@ai-matrx/design-system/controls");
48557
48586
  init_names();
48558
48587
 
48559
48588
  // src/orgTree.ts
@@ -48849,24 +48878,25 @@ function OrgChartLayout({ view, fields, rows, titleKey, openRecordId, onOpenReco
48849
48878
  const node = forest.byId.get(b.id);
48850
48879
  const shut = collapsed.has(node.id);
48851
48880
  return /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)("div", { className: "absolute", style: { left: b.x, top: b.y, width: ORG_CARD_W, height: ORG_CARD_H }, "data-records-org-node": node.id, children: [
48852
- /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(
48853
- "button",
48881
+ /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
48882
+ import_controls20.Tile,
48854
48883
  {
48855
48884
  type: "button",
48856
- onClick: () => onOpenRecord?.(node.id),
48857
- className: (0, import_design_system143.cn)(
48858
- "flex h-full w-full flex-col justify-center gap-0.5 overflow-hidden rounded-md border bg-card px-2.5 text-left shadow-sm hover:bg-accent",
48859
- openRecordId === node.id ? "border-primary ring-1 ring-primary" : "border-border"
48860
- ),
48861
- "data-records-org-card": "",
48862
- children: [
48885
+ layout: "stack",
48886
+ variant: "outline",
48887
+ wrapTitle: true,
48888
+ title: /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(import_jsx_runtime168.Fragment, { children: [
48863
48889
  /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("span", { className: "truncate text-sm font-medium", children: rowName(node.row, titleField?.key ?? titleKey) }),
48864
48890
  lines.map((field2) => {
48865
48891
  const value = (node.row.document ?? {})[field2.key];
48866
48892
  if (isEmptyOnCard(value)) return null;
48867
48893
  return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)("span", { className: "flex h-4 min-w-0 items-center overflow-hidden whitespace-nowrap text-xs text-muted-foreground", "data-records-org-line": field2.key, children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(RecordValue, { inCell: true, field: field2, value, document: node.row.document, recordId: node.row.id, withheld: withheldNoticeOf(node.row.hidden, field2.key) }) }, field2.key);
48868
48894
  })
48869
- ]
48895
+ ] }),
48896
+ ...openRecordId === node.id ? { selected: true } : {},
48897
+ onClick: () => onOpenRecord?.(node.id),
48898
+ className: "h-full w-full",
48899
+ "data-records-org-card": ""
48870
48900
  }
48871
48901
  ),
48872
48902
  node.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
@@ -50960,7 +50990,7 @@ var import_design_system198 = require("@ai-matrx/design-system");
50960
50990
  var import_react305 = require("react");
50961
50991
  var import_react306 = require("@ai-matrx/records/react");
50962
50992
  var import_design_system149 = require("@ai-matrx/design-system");
50963
- var import_controls9 = require("@ai-matrx/design-system/controls");
50993
+ var import_controls21 = require("@ai-matrx/design-system/controls");
50964
50994
  var import_core23 = require("@dnd-kit/core");
50965
50995
  var import_sortable = require("@dnd-kit/sortable");
50966
50996
  var import_utilities = require("@dnd-kit/utilities");
@@ -51390,7 +51420,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
51390
51420
  }
51391
51421
  ) : /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", { className: "group flex min-h-7 items-center gap-1 px-2 text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: [
51392
51422
  /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(
51393
- import_controls9.Button,
51423
+ import_controls21.Button,
51394
51424
  {
51395
51425
  variant: "quiet",
51396
51426
  className: "min-w-0 flex-1 justify-start gap-1 px-0",
@@ -51405,12 +51435,12 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
51405
51435
  }
51406
51436
  ),
51407
51437
  rights.admin ? /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_jsx_runtime174.Fragment, { children: [
51408
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_controls9.Button, { variant: "quiet", className: "shrink-0 normal-case", "data-view-section-rename": "", onClick: () => setRenamingSection({ from: group.name, draft: group.name }), children: "Rename" }),
51409
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_controls9.Button, { variant: "danger", className: "shrink-0 normal-case", "data-view-section-delete": "", title: "The views stay; they leave the section", onClick: () => void renameSection(group.name, null), children: "Delete" })
51438
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_controls21.Button, { variant: "quiet", className: "shrink-0 normal-case", "data-view-section-rename": "", onClick: () => setRenamingSection({ from: group.name, draft: group.name }), children: "Rename" }),
51439
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_controls21.Button, { variant: "danger", className: "shrink-0 normal-case", "data-view-section-delete": "", title: "The views stay; they leave the section", onClick: () => void renameSection(group.name, null), children: "Delete" })
51410
51440
  ] }) : null
51411
51441
  ] }) : null,
51412
51442
  group.name !== null && shut.includes(group.name) && !group.views.some((v) => v.id === active) ? null : group.views.map((view) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(SortableRow, { id: view.id, disabled: !(rights.admin || view.personal) || view.presentation?.locked === true, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
51413
- import_controls9.Tile,
51443
+ import_controls21.Tile,
51414
51444
  {
51415
51445
  variant: "quiet",
51416
51446
  selected: view.id === active,
@@ -51457,7 +51487,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
51457
51487
  /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_design_system149.Button, { size: "sm", type: "submit", className: "h-7", children: "Save" })
51458
51488
  ] }),
51459
51489
  rights.admin ? /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("label", { className: "flex items-center gap-1.5 text-[11px] text-muted-foreground", children: [
51460
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_controls9.Switch, { checked: namingPersonal, onCheckedChange: setNamingPersonal, "data-view-new-personal": "" }),
51490
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_controls21.Switch, { checked: namingPersonal, onCheckedChange: setNamingPersonal, "data-view-new-personal": "" }),
51461
51491
  "Personal (only you see it)"
51462
51492
  ] }) : null
51463
51493
  ]
@@ -51469,7 +51499,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
51469
51499
  current.name,
51470
51500
  "\u201D from"
51471
51501
  ] }),
51472
- (views ?? []).filter((other) => other.id !== current.id).map((other) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_controls9.Tile, { variant: "quiet", title: other.name, "data-view-copy-from": other.id, onClick: () => void copySettingsFrom(other, current) }, other.id)),
51502
+ (views ?? []).filter((other) => other.id !== current.id).map((other) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_controls21.Tile, { variant: "quiet", title: other.name, "data-view-copy-from": other.id, onClick: () => void copySettingsFrom(other, current) }, other.id)),
51473
51503
  /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_design_system149.Button, { size: "sm", variant: "ghost", className: "h-7 justify-start px-2 text-xs", onClick: () => setCopying(false), children: "Cancel" })
51474
51504
  ] }) : movingTo !== null ? /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", { className: "flex flex-col gap-0.5", "data-view-move-to-section": "", children: [
51475
51505
  /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("span", { className: "px-2 text-[11px] text-muted-foreground", children: [
@@ -51477,8 +51507,8 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
51477
51507
  current.name,
51478
51508
  "\u201D to"
51479
51509
  ] }),
51480
- (0, import_views2.sectionNames)(views).map((name) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_controls9.Tile, { variant: "quiet", disabled: current.section === name, title: name, onClick: () => void moveToSection(current, name) }, name)),
51481
- current.section ? /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_controls9.Tile, { variant: "quiet", "data-view-section-none": "", title: "No section", onClick: () => void moveToSection(current, null) }) : null,
51510
+ (0, import_views2.sectionNames)(views).map((name) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_controls21.Tile, { variant: "quiet", disabled: current.section === name, title: name, onClick: () => void moveToSection(current, name) }, name)),
51511
+ current.section ? /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_controls21.Tile, { variant: "quiet", "data-view-section-none": "", title: "No section", onClick: () => void moveToSection(current, null) }) : null,
51482
51512
  /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(
51483
51513
  "form",
51484
51514
  {
@@ -51540,7 +51570,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
51540
51570
  return /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_jsx_runtime174.Fragment, { children: [
51541
51571
  reasons.map((reason) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("p", { className: "truncate px-2 py-1 text-xs text-muted-foreground", "data-view-actions-reason": "", title: reason, children: reason }, reason)),
51542
51572
  actions.map((action3) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
51543
- import_controls9.Tile,
51573
+ import_controls21.Tile,
51544
51574
  {
51545
51575
  variant: "quiet",
51546
51576
  ...action3.destructive ? { danger: true } : {},
@@ -52661,7 +52691,7 @@ function FormResultsPanel({ form, className }) {
52661
52691
  var import_react314 = require("react");
52662
52692
  var import_react315 = require("@ai-matrx/records/react");
52663
52693
  var import_design_system153 = require("@ai-matrx/design-system");
52664
- var import_controls10 = require("@ai-matrx/design-system/controls");
52694
+ var import_controls22 = require("@ai-matrx/design-system/controls");
52665
52695
  init_Refusal();
52666
52696
  init_names();
52667
52697
  init_parity();
@@ -52888,7 +52918,7 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
52888
52918
  /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)("label", { className: "flex flex-col gap-1", children: [
52889
52919
  /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(import_design_system153.Label, { className: "text-xs font-medium", children: "Which table holds your clients" }),
52890
52920
  /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
52891
- import_controls10.Select,
52921
+ import_controls22.Select,
52892
52922
  {
52893
52923
  "aria-label": "Which table holds your clients",
52894
52924
  value: clientTableId ?? "",
@@ -52941,7 +52971,7 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
52941
52971
  /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)("label", { className: "flex flex-col gap-1", children: [
52942
52972
  /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(import_design_system153.Label, { className: "text-xs font-medium", children: "Which field says whose row it is" }),
52943
52973
  /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
52944
- import_controls10.Select,
52974
+ import_controls22.Select,
52945
52975
  {
52946
52976
  "aria-label": "Which field says whose row it is",
52947
52977
  value: exposure?.namesVia ?? "",
@@ -54181,7 +54211,7 @@ var import_react320 = require("react");
54181
54211
  var import_react321 = require("@ai-matrx/records/react");
54182
54212
  var import_records68 = require("@ai-matrx/records");
54183
54213
  var import_design_system158 = require("@ai-matrx/design-system");
54184
- var import_controls11 = require("@ai-matrx/design-system/controls");
54214
+ var import_controls23 = require("@ai-matrx/design-system/controls");
54185
54215
  init_Refusal();
54186
54216
  init_refusals();
54187
54217
  init_host();
@@ -54392,7 +54422,7 @@ function DigestScheduler({
54392
54422
  savedViewId ? null : /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)("label", { className: "flex flex-col gap-1", children: [
54393
54423
  /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(import_design_system158.Label, { className: "text-xs font-medium", children: "What it summarizes" }),
54394
54424
  /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
54395
- import_controls11.Select,
54425
+ import_controls23.Select,
54396
54426
  {
54397
54427
  "aria-label": "What it summarizes",
54398
54428
  value: viewId,
@@ -54409,7 +54439,7 @@ function DigestScheduler({
54409
54439
  /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)("label", { className: "flex flex-col gap-1", children: [
54410
54440
  /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(import_design_system158.Label, { className: "text-xs font-medium", children: "How often" }),
54411
54441
  /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
54412
- import_controls11.Select,
54442
+ import_controls23.Select,
54413
54443
  {
54414
54444
  "aria-label": "How often",
54415
54445
  value: cadence,
@@ -54424,7 +54454,7 @@ function DigestScheduler({
54424
54454
  cadence === "weekly" ? /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)("label", { className: "flex flex-col gap-1", children: [
54425
54455
  /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(import_design_system158.Label, { className: "text-xs font-medium", children: "Which day" }),
54426
54456
  /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
54427
- import_controls11.Select,
54457
+ import_controls23.Select,
54428
54458
  {
54429
54459
  "aria-label": "Which day",
54430
54460
  value: weekday,
@@ -54453,7 +54483,7 @@ function DigestScheduler({
54453
54483
  /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)("label", { className: "flex flex-col gap-1", children: [
54454
54484
  /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(import_design_system158.Label, { className: "text-xs font-medium", children: "Where it arrives" }),
54455
54485
  /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
54456
- import_controls11.Select,
54486
+ import_controls23.Select,
54457
54487
  {
54458
54488
  "aria-label": "Where it arrives",
54459
54489
  value: channel,
@@ -55001,7 +55031,7 @@ init_BuildOrAsk();
55001
55031
  var import_clipboard10 = require("@ai-matrx/kit/clipboard");
55002
55032
  var import_drafts = require("@ai-matrx/kit/drafts");
55003
55033
  var import_design_system164 = require("@ai-matrx/design-system");
55004
- var import_controls12 = require("@ai-matrx/design-system/controls");
55034
+ var import_controls25 = require("@ai-matrx/design-system/controls");
55005
55035
  var import_react331 = require("react");
55006
55036
  var import_core24 = require("@dnd-kit/core");
55007
55037
  var import_sortable2 = require("@dnd-kit/sortable");
@@ -55968,6 +55998,7 @@ var import_react329 = require("react");
55968
55998
  var import_react330 = require("@ai-matrx/records/react");
55969
55999
  var import_forms3 = require("@ai-matrx/records/forms");
55970
56000
  var import_design_system163 = require("@ai-matrx/design-system");
56001
+ var import_controls24 = require("@ai-matrx/design-system/controls");
55971
56002
  init_PickOne();
55972
56003
  init_Refusal();
55973
56004
  init_names();
@@ -56050,7 +56081,7 @@ function FormAnswerExtras({
56050
56081
  hasPassword && typing === null ? /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)("span", { className: "text-muted-foreground", "data-records-form-password-set": "", children: [
56051
56082
  "Password on \xB7",
56052
56083
  " ",
56053
- /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("button", { type: "button", className: "underline", onClick: () => setTyping(""), children: "Change" })
56084
+ /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(import_controls24.Button, { type: "button", variant: "link", onClick: () => setTyping(""), children: "Change" })
56054
56085
  ] }) : null
56055
56086
  ] }),
56056
56087
  typing !== null ? /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(
@@ -56120,13 +56151,14 @@ function FormLanguagesEditor({
56120
56151
  /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
56121
56152
  /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("span", { className: "font-medium", children: "Languages" }),
56122
56153
  languages.map((l) => /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)("span", { className: "inline-flex items-center gap-1 rounded border px-1.5 py-0.5", "data-records-form-language": l.code, children: [
56123
- /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("button", { type: "button", onClick: () => setOpen(open === l.code ? null : l.code), "aria-expanded": open === l.code, children: (0, import_forms3.formLanguageName)(l) }),
56154
+ /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(import_controls24.Button, { type: "button", variant: "quiet", pressed: open === l.code, onClick: () => setOpen(open === l.code ? null : l.code), "aria-expanded": open === l.code, children: (0, import_forms3.formLanguageName)(l) }),
56124
56155
  /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
56125
- "button",
56156
+ import_controls24.Button,
56126
56157
  {
56127
56158
  type: "button",
56159
+ variant: "quiet",
56160
+ removes: true,
56128
56161
  "aria-label": `Remove ${(0, import_forms3.formLanguageName)(l)}`,
56129
- className: "text-muted-foreground",
56130
56162
  onClick: () => onChange(languages.filter((x) => x.code !== l.code)),
56131
56163
  children: "\xD7"
56132
56164
  }
@@ -56764,7 +56796,7 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, startWithOne,
56764
56796
  /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)("label", { className: "flex flex-col gap-1", children: [
56765
56797
  /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(import_design_system165.Label, { className: "text-xs font-medium", children: "Flow" }),
56766
56798
  /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
56767
- import_controls12.Select,
56799
+ import_controls25.Select,
56768
56800
  {
56769
56801
  "aria-label": "Flow",
56770
56802
  value: draft.flow ?? "one-at-a-time",
@@ -57544,7 +57576,7 @@ var import_react338 = require("react");
57544
57576
  var import_react339 = require("@ai-matrx/records/react");
57545
57577
  var import_records71 = require("@ai-matrx/records");
57546
57578
  var import_design_system168 = require("@ai-matrx/design-system");
57547
- var import_controls13 = require("@ai-matrx/design-system/controls");
57579
+ var import_controls26 = require("@ai-matrx/design-system/controls");
57548
57580
  init_Refusal();
57549
57581
  init_host();
57550
57582
  init_enumLabels();
@@ -57763,7 +57795,7 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
57763
57795
  children: [
57764
57796
  /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("input", { type: "hidden", name: "view", value: pickView || (views[0]?.id ?? "") }),
57765
57797
  /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
57766
- import_controls13.Select,
57798
+ import_controls26.Select,
57767
57799
  {
57768
57800
  "aria-label": "View to be told about",
57769
57801
  value: pickView || (views[0]?.id ?? ""),
@@ -57773,7 +57805,7 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
57773
57805
  ),
57774
57806
  /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("input", { type: "hidden", name: "cadence", value: pickCadence || (cadences.length > 0 ? cadences : ["instant"])[0] }),
57775
57807
  /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
57776
- import_controls13.Select,
57808
+ import_controls26.Select,
57777
57809
  {
57778
57810
  "aria-label": "How often",
57779
57811
  value: pickCadence || (cadences.length > 0 ? cadences : ["instant"])[0],
@@ -57783,7 +57815,7 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
57783
57815
  ),
57784
57816
  /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("input", { type: "hidden", name: "channel", value: pickChannel }),
57785
57817
  /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
57786
- import_controls13.Select,
57818
+ import_controls26.Select,
57787
57819
  {
57788
57820
  "aria-label": "Where it arrives",
57789
57821
  value: pickChannel,
@@ -57838,7 +57870,7 @@ init_host();
57838
57870
 
57839
57871
  // src/BlockGrid.tsx
57840
57872
  var import_design_system169 = require("@ai-matrx/design-system");
57841
- var import_controls14 = require("@ai-matrx/design-system/controls");
57873
+ var import_controls27 = require("@ai-matrx/design-system/controls");
57842
57874
 
57843
57875
  // src/dashboardLayout.ts
57844
57876
  var SPAN_CHOICES = [
@@ -57924,24 +57956,25 @@ function BlockGrid({ items, arranging, onArrange }) {
57924
57956
  children: [
57925
57957
  arranging ? /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)("div", { className: "flex items-center gap-1 px-1 pt-1 text-xs", children: [
57926
57958
  /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
57927
- "button",
57959
+ import_controls27.Button,
57928
57960
  {
57929
57961
  type: "button",
57930
- "data-grid-drag-handle": "",
57931
- "aria-label": `Move ${item.title}`,
57932
- className: "flex h-7 w-7 touch-none items-center justify-center rounded text-muted-foreground hover:bg-muted",
57933
- children: /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: "h-4 w-4 fill-current", children: [
57962
+ variant: "quiet",
57963
+ icon: /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: "fill-current", children: [
57934
57964
  /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("circle", { cx: "5.5", cy: "3.5", r: "1.25" }),
57935
57965
  /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("circle", { cx: "10.5", cy: "3.5", r: "1.25" }),
57936
57966
  /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("circle", { cx: "5.5", cy: "8", r: "1.25" }),
57937
57967
  /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("circle", { cx: "10.5", cy: "8", r: "1.25" }),
57938
57968
  /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("circle", { cx: "5.5", cy: "12.5", r: "1.25" }),
57939
57969
  /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("circle", { cx: "10.5", cy: "12.5", r: "1.25" })
57940
- ] })
57970
+ ] }),
57971
+ "data-grid-drag-handle": "",
57972
+ "aria-label": `Move ${item.title}`,
57973
+ className: "touch-none"
57941
57974
  }
57942
57975
  ),
57943
57976
  /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
57944
- import_controls14.Select,
57977
+ import_controls27.Select,
57945
57978
  {
57946
57979
  "aria-label": `Width of ${item.title}`,
57947
57980
  className: "ml-auto",
@@ -58095,7 +58128,7 @@ function AddChart({ subject, onAdd, onClose }) {
58095
58128
  }
58096
58129
 
58097
58130
  // src/DashboardCanvas.tsx
58098
- var import_controls15 = require("@ai-matrx/design-system/controls");
58131
+ var import_controls28 = require("@ai-matrx/design-system/controls");
58099
58132
 
58100
58133
  // src/pages.ts
58101
58134
  var import_views8 = require("@ai-matrx/records/views");
@@ -58759,7 +58792,7 @@ function BlockSettings({
58759
58792
  const fields = own3.data ?? [];
58760
58793
  return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)("div", { className: "flex flex-col items-stretch gap-1.5 text-xs", children: [
58761
58794
  /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
58762
- import_controls15.Select,
58795
+ import_controls28.Select,
58763
58796
  {
58764
58797
  "aria-label": `Shape of ${title}`,
58765
58798
  value: spec.kind,
@@ -60025,6 +60058,7 @@ var import_core25 = require("@ai-matrx/records/core");
60025
60058
  var import_download3 = require("@ai-matrx/kit/download");
60026
60059
  var import_format17 = require("@ai-matrx/kit/format");
60027
60060
  var import_design_system174 = require("@ai-matrx/design-system");
60061
+ var import_controls29 = require("@ai-matrx/design-system/controls");
60028
60062
  init_plainWords();
60029
60063
  init_parity();
60030
60064
  var import_forms5 = require("@ai-matrx/records/forms");
@@ -60668,17 +60702,20 @@ function DoorLayoutView({ block, door }) {
60668
60702
  const key = raw === null || raw === void 0 || raw === "" ? "" : String(raw).slice(0, block.layout === "kanban" ? void 0 : 10);
60669
60703
  groups.set(key, [...groups.get(key) ?? [], row]);
60670
60704
  }
60671
- const card = (row) => /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
60672
- "button",
60705
+ const card = (row) => /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
60706
+ import_controls29.Tile,
60673
60707
  {
60674
60708
  type: "button",
60675
- onClick: () => setOpen(row.id),
60676
- className: "flex w-full min-w-0 flex-col gap-1 rounded-md border bg-card p-2 text-left",
60677
- "data-records-page-card": row.id,
60678
- children: [
60709
+ layout: "stack",
60710
+ variant: "outline",
60711
+ wrapTitle: true,
60712
+ title: /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(import_jsx_runtime198.Fragment, { children: [
60679
60713
  block.image_field && typeof (row.document ?? {})[block.image_field] === "string" ? /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("img", { src: (row.document ?? {})[block.image_field], alt: "", className: "h-28 w-full rounded object-cover" }) : null,
60680
60714
  columns.map((f) => /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("span", { className: (0, import_design_system174.cn)("min-w-0 truncate", f.key === title?.key ? "text-sm font-medium" : "text-xs"), children: /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(RecordValue, { field: f, value: (row.document ?? {})[f.key], document: row.document, withheld: row.hidden?.[f.key] ?? null, recordId: row.id, inCell: true }) }, f.key))
60681
- ]
60715
+ ] }),
60716
+ onClick: () => setOpen(row.id),
60717
+ className: "w-full min-w-0",
60718
+ "data-records-page-card": row.id
60682
60719
  },
60683
60720
  row.id
60684
60721
  );
@@ -66511,7 +66548,7 @@ var import_react392 = require("@ai-matrx/records/react");
66511
66548
  var import_design_system197 = require("@ai-matrx/design-system");
66512
66549
  var import_icons5 = require("@ai-matrx/design-system/icons");
66513
66550
  var import_field_formats24 = require("@ai-matrx/design-system/field-formats");
66514
- var import_controls16 = require("@ai-matrx/design-system/controls");
66551
+ var import_controls30 = require("@ai-matrx/design-system/controls");
66515
66552
  init_names();
66516
66553
  init_plainWords();
66517
66554
 
@@ -66912,7 +66949,7 @@ function ChecksLine({ checks, onFix }) {
66912
66949
  if (checks.length === 0) return null;
66913
66950
  return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("span", { className: "mt-1 flex flex-col items-start gap-1", children: checks.map((check, i) => /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)("span", { className: "flex flex-col items-start gap-1", children: [
66914
66951
  /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("span", { className: "text-xs text-warning-ink", children: check.message }),
66915
- check.fix && onFix ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_controls16.Button, { type: "button", variant: "outline", onClick: () => onFix(check), children: check.fix.label }) : null
66952
+ check.fix && onFix ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_controls30.Button, { type: "button", variant: "outline", onClick: () => onFix(check), children: check.fix.label }) : null
66916
66953
  ] }, i)) });
66917
66954
  }
66918
66955
  function ValueCell({
@@ -66977,7 +67014,7 @@ function ValueCell({
66977
67014
  return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)("div", { className: stacked ? "flex min-w-0 items-center gap-2" : "min-w-0 px-3", children: [
66978
67015
  stacked ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("span", { className: "w-9 shrink-0 text-xs text-muted-foreground", children: part === "light" ? "Light" : "Dark" }) : null,
66979
67016
  editable ? /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(import_design_system197.Popover, { children: [
66980
- /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_design_system197.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("button", { type: "button", "aria-label": `${fieldName(field2)} ${part}`, className: "block w-full min-w-0 rounded-md px-1 py-0.5 text-left hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: inner2 }) }),
67017
+ /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_design_system197.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_controls30.Tile, { type: "button", dense: true, variant: "quiet", title: words2, icon: layers ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(ShadowSwatch, { layers, theme: part }) : void 0, "aria-label": `${fieldName(field2)} ${part}`, className: "w-full min-w-0" }) }),
66981
67018
  /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_design_system197.PopoverContent, { align: "start", className: "w-80", children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
66982
67019
  ShadowLayersEditor,
66983
67020
  {
@@ -66998,7 +67035,7 @@ function ValueCell({
66998
67035
  const view = /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(RecordValue, { field: field2, value, withheld: null });
66999
67036
  return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)("div", { className: "min-w-0", children: [
67000
67037
  editable && Editor ? /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(import_design_system197.Popover, { children: [
67001
- /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_design_system197.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("button", { type: "button", className: "block w-full min-w-0 rounded-md px-1 py-0.5 text-left hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: value === null || value === void 0 || value === "" ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("span", { className: "text-muted-foreground", children: "Set" }) : view }) }),
67038
+ /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_design_system197.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_controls30.Tile, { type: "button", dense: true, variant: "quiet", title: value === null || value === void 0 || value === "" ? "Set" : view, className: "w-full min-w-0" }) }),
67002
67039
  /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(import_design_system197.PopoverContent, { align: "start", className: "w-80", children: [
67003
67040
  Preview2 ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("div", { className: "mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(Preview2, { value, format }) }) : null,
67004
67041
  Editor ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(Editor, { value, format, onChange: change, id, label: fieldName(field2) }) : null
@@ -67074,7 +67111,7 @@ function groundOf(row, rows, keys) {
67074
67111
  function RowComments({ tableId, row, count, onClosed }) {
67075
67112
  return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(import_design_system197.Popover, { onOpenChange: (open) => !open && onClosed(), children: [
67076
67113
  /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_design_system197.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
67077
- import_controls16.Button,
67114
+ import_controls30.Button,
67078
67115
  {
67079
67116
  type: "button",
67080
67117
  variant: "quiet",
@@ -67094,7 +67131,7 @@ function NoteButton({ row, noteField, editable, save }) {
67094
67131
  const has = text.trim() !== "";
67095
67132
  return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(import_design_system197.Popover, { children: [
67096
67133
  /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_design_system197.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
67097
- import_controls16.Button,
67134
+ import_controls30.Button,
67098
67135
  {
67099
67136
  type: "button",
67100
67137
  variant: "quiet",
@@ -67215,8 +67252,8 @@ function AddDialog({
67215
67252
  /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_design_system197.BasicTextarea, { id: "section-add-note", rows: 2, placeholder: name.trim() ? `When should ${name.trim()} be used?` : "When should it be used?", value: note, onChange: (e) => setNote(e.target.value) })
67216
67253
  ] }) : null,
67217
67254
  /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)("div", { className: "flex justify-end gap-2 pt-1", children: [
67218
- /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_controls16.Button, { type: "button", variant: "quiet", onClick: () => onOpenChange(false), children: "Cancel" }),
67219
- /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_controls16.Button, { type: "submit", variant: "primary", disabled: !ready, children: "Add" })
67255
+ /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_controls30.Button, { type: "button", variant: "quiet", onClick: () => onOpenChange(false), children: "Cancel" }),
67256
+ /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_controls30.Button, { type: "submit", variant: "primary", disabled: !ready, children: "Add" })
67220
67257
  ] })
67221
67258
  ]
67222
67259
  }
@@ -67298,12 +67335,12 @@ function TableSectionCard(props) {
67298
67335
  /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("h2", { className: "type-heading truncate text-foreground", children: title || "\xA0" }),
67299
67336
  props.description ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("p", { className: "mt-1 max-w-prose text-sm text-muted-foreground", children: props.description }) : null
67300
67337
  ] }),
67301
- mayWrite && nameField ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_controls16.Button, { type: "button", variant: "outline", icon: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_icons5.PlusIcon, {}), onClick: () => setAdding(groups[groups.length - 1]?.key ?? UNGROUPED2), children: "Add" }) : null
67338
+ mayWrite && nameField ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_controls30.Button, { type: "button", variant: "outline", icon: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_icons5.PlusIcon, {}), onClick: () => setAdding(groups[groups.length - 1]?.key ?? UNGROUPED2), children: "Add" }) : null
67302
67339
  ] }),
67303
67340
  refused ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("p", { className: "px-5 pb-5 text-sm text-muted-foreground sm:px-6", children: refusalSentence(refused) }) : !fieldsRead.data || page.loading && rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("div", { className: "flex flex-col gap-1.5 px-5 pb-5 sm:px-6", "aria-busy": "true", children: [0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("div", { className: "h-9 rounded-md bg-muted" }, i)) }) : rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(SectionEmpty, { empty: props.empty }) : /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("div", { className: (0, import_design_system197.cn)("-mb-px", !narrow && "overflow-x-auto"), children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)("div", { "data-records-section-group": group.key, className: "", children: [
67304
67341
  cols.group ? /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)("div", { className: "flex items-center justify-between border-y border-border px-5 py-1 sm:px-6", children: [
67305
67342
  /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("span", { className: "text-xs font-semibold text-foreground", children: group.key || "No group" }),
67306
- mayWrite ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_controls16.Button, { type: "button", variant: "quiet", icon: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_icons5.PlusIcon, {}), "aria-label": `Add to ${group.key || "no group"}`, onClick: () => setAdding(group.key) }) : null
67343
+ mayWrite ? /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_controls30.Button, { type: "button", variant: "quiet", icon: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(import_icons5.PlusIcon, {}), "aria-label": `Add to ${group.key || "no group"}`, onClick: () => setAdding(group.key) }) : null
67307
67344
  ] }) : null,
67308
67345
  /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)("div", { role: "table", "aria-label": group.key || title, className: narrow ? "" : "min-w-[36rem]", children: [
67309
67346
  /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)("div", { role: "row", style: gridStyle, className: (0, import_design_system197.cn)("grid border-b border-border text-xs text-muted-foreground", narrow && "hidden"), children: [