@ai-matrx/records-ui 0.115.73 → 0.115.74

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.js CHANGED
@@ -28409,7 +28409,7 @@ import {
28409
28409
  Checkbox as Checkbox11,
28410
28410
  ConfirmDialog as ConfirmDialog6,
28411
28411
  Input as Input4,
28412
- Select as Select11,
28412
+ Select as Select12,
28413
28413
  SelectContent as SelectContent11,
28414
28414
  SelectItem as SelectItem11,
28415
28415
  SelectTrigger as SelectTrigger11,
@@ -29171,6 +29171,7 @@ import {
29171
29171
  bookingPath
29172
29172
  } from "@ai-matrx/records";
29173
29173
  import { BasicInput as BasicInput17, BasicTextarea as BasicTextarea7, Button as Button54, Checkbox as Checkbox10, Label as Label18, Skeleton as Skeleton8, cn as cn44 } from "@ai-matrx/design-system";
29174
+ import { Select as Select11 } from "@ai-matrx/design-system/controls";
29174
29175
 
29175
29176
  // src/publicQuestions.ts
29176
29177
  var CANNOT_ASK = {
@@ -29473,39 +29474,39 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, startNew, classN
29473
29474
  /* @__PURE__ */ jsxs83("label", { className: "flex flex-col gap-1", children: [
29474
29475
  /* @__PURE__ */ jsx94(Label18, { className: "text-xs font-medium", children: "How long one appointment is" }),
29475
29476
  /* @__PURE__ */ jsx94(
29476
- "select",
29477
+ Select11,
29477
29478
  {
29478
- className: "h-9 rounded border bg-background px-2 text-sm",
29479
- value: minutes,
29480
- onChange: (e) => setMinutes(Number(e.target.value)),
29481
- children: LENGTHS.map((n) => /* @__PURE__ */ jsxs83("option", { value: n, children: [
29482
- n,
29483
- " minutes"
29484
- ] }, n))
29479
+ "aria-label": "How long one appointment is",
29480
+ value: String(minutes),
29481
+ onValueChange: (v) => setMinutes(Number(v)),
29482
+ options: LENGTHS.map((n) => ({ value: String(n), label: `${n} minutes` }))
29485
29483
  }
29486
29484
  )
29487
29485
  ] }),
29488
29486
  /* @__PURE__ */ jsxs83("label", { className: "flex flex-col gap-1", children: [
29489
29487
  /* @__PURE__ */ jsx94(Label18, { className: "text-xs font-medium", children: "Gap kept after each one" }),
29490
29488
  /* @__PURE__ */ jsx94(
29491
- "select",
29489
+ Select11,
29492
29490
  {
29493
- className: "h-9 rounded border bg-background px-2 text-sm",
29494
- value: buffer,
29495
- onChange: (e) => setBuffer(Number(e.target.value)),
29496
- children: [0, 5, 10, 15, 30].map((n) => /* @__PURE__ */ jsx94("option", { value: n, children: n === 0 ? "No gap \u2014 back to back" : `${n} minutes` }, n))
29491
+ "aria-label": "Gap kept after each one",
29492
+ value: String(buffer),
29493
+ onValueChange: (v) => setBuffer(Number(v)),
29494
+ options: [0, 5, 10, 15, 30].map((n) => ({ value: String(n), label: n === 0 ? "No gap \u2014 back to back" : `${n} minutes` }))
29497
29495
  }
29498
29496
  )
29499
29497
  ] }),
29500
29498
  /* @__PURE__ */ jsxs83("label", { className: "flex flex-col gap-1", children: [
29501
29499
  /* @__PURE__ */ jsx94(Label18, { className: "text-xs font-medium", children: "Earliest somebody may book" }),
29502
29500
  /* @__PURE__ */ jsx94(
29503
- "select",
29501
+ Select11,
29504
29502
  {
29505
- className: "h-9 rounded border bg-background px-2 text-sm",
29506
- value: lead,
29507
- onChange: (e) => setLead(Number(e.target.value)),
29508
- children: [0, 60, 120, 240, 1440].map((n) => /* @__PURE__ */ jsx94("option", { value: n, children: n === 0 ? "Right away" : n === 1440 ? "A day from now" : `${formatDurationMinutes(n, { style: "long" })} from now` }, n))
29503
+ "aria-label": "Earliest somebody may book",
29504
+ value: String(lead),
29505
+ onValueChange: (v) => setLead(Number(v)),
29506
+ options: [0, 60, 120, 240, 1440].map((n) => ({
29507
+ value: String(n),
29508
+ label: n === 0 ? "Right away" : n === 1440 ? "A day from now" : `${formatDurationMinutes(n, { style: "long" })} from now`
29509
+ }))
29509
29510
  }
29510
29511
  )
29511
29512
  ] }),
@@ -29524,15 +29525,12 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, startNew, classN
29524
29525
  /* @__PURE__ */ jsxs83("label", { className: "flex flex-col gap-1", children: [
29525
29526
  /* @__PURE__ */ jsx94(Label18, { className: "text-xs font-medium", children: "How far ahead the page offers" }),
29526
29527
  /* @__PURE__ */ jsx94(
29527
- "select",
29528
+ Select11,
29528
29529
  {
29529
- className: "h-9 rounded border bg-background px-2 text-sm",
29530
- value: days,
29531
- onChange: (e) => setDays(Number(e.target.value)),
29532
- children: [7, 14, 30, 60, 90].map((n) => /* @__PURE__ */ jsxs83("option", { value: n, children: [
29533
- n,
29534
- " days"
29535
- ] }, n))
29530
+ "aria-label": "How far ahead the page offers",
29531
+ value: String(days),
29532
+ onValueChange: (v) => setDays(Number(v)),
29533
+ options: [7, 14, 30, 60, 90].map((n) => ({ value: String(n), label: `${n} days` }))
29536
29534
  }
29537
29535
  )
29538
29536
  ] }),
@@ -30777,7 +30775,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, ma
30777
30775
  const busy = phase === "making" || phase === "writing";
30778
30776
  return /* @__PURE__ */ jsxs89("div", { className: cn48("flex min-w-0 flex-col gap-3 text-sm", className), "data-save-to-table": "", children: [
30779
30777
  /* @__PURE__ */ jsxs89("div", { className: "flex flex-wrap items-center gap-2", children: [
30780
- shapes.length > 1 ? /* @__PURE__ */ jsxs89(Select11, { value: String(which), onValueChange: (v) => chooseShape(Number(v)), disabled: busy || phase === "done", children: [
30778
+ shapes.length > 1 ? /* @__PURE__ */ jsxs89(Select12, { value: String(which), onValueChange: (v) => chooseShape(Number(v)), disabled: busy || phase === "done", children: [
30781
30779
  /* @__PURE__ */ jsx100(SelectTrigger11, { size: "sm", "aria-label": "Which of these to save", className: "min-w-[16rem]", children: /* @__PURE__ */ jsx100(SelectValue11, {}) }),
30782
30780
  /* @__PURE__ */ jsx100(SelectContent11, { children: shapes.map((s, i) => /* @__PURE__ */ jsxs89(SelectItem11, { value: String(i), children: [
30783
30781
  s.name ? `${s.name} \u2014 ` : "",
@@ -30788,7 +30786,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, ma
30788
30786
  shape.said
30789
30787
  ] }),
30790
30788
  shape.splits.length > 0 ? /* @__PURE__ */ jsxs89(
30791
- Select11,
30789
+ Select12,
30792
30790
  {
30793
30791
  value: split || "__one__",
30794
30792
  onValueChange: (v) => {
@@ -30902,7 +30900,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, ma
30902
30900
  }
30903
30901
  ),
30904
30902
  /* @__PURE__ */ jsxs89(
30905
- Select11,
30903
+ Select12,
30906
30904
  {
30907
30905
  value: c.guess.type,
30908
30906
  disabled: busy || !c.use,
@@ -30942,7 +30940,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, ma
30942
30940
  /* @__PURE__ */ jsx100("span", { className: "text-xs text-muted-foreground", children: "Nothing is made until you press it." })
30943
30941
  ] })
30944
30942
  ] }) : /* @__PURE__ */ jsxs89("div", { className: "flex flex-col gap-2", "data-save-to-table-existing": "", children: [
30945
- tables.loading || levels.loading ? /* @__PURE__ */ jsx100("p", { className: "text-muted-foreground", children: "Reading your tables\u2026" }) : tables.error ? /* @__PURE__ */ jsx100(RefusalNotice, { error: tables.error }) : writable.length === 0 ? /* @__PURE__ */ jsx100("p", { className: "text-muted-foreground", children: "There is no table in this organization you can add rows to. Make a new one instead." }) : /* @__PURE__ */ jsxs89(Select11, { value: tableId, onValueChange: setTableId, disabled: busy, children: [
30943
+ tables.loading || levels.loading ? /* @__PURE__ */ jsx100("p", { className: "text-muted-foreground", children: "Reading your tables\u2026" }) : tables.error ? /* @__PURE__ */ jsx100(RefusalNotice, { error: tables.error }) : writable.length === 0 ? /* @__PURE__ */ jsx100("p", { className: "text-muted-foreground", children: "There is no table in this organization you can add rows to. Make a new one instead." }) : /* @__PURE__ */ jsxs89(Select12, { value: tableId, onValueChange: setTableId, disabled: busy, children: [
30946
30944
  /* @__PURE__ */ jsx100(SelectTrigger11, { size: "sm", "aria-label": "Which table to add the rows to", className: "min-w-[16rem]", children: /* @__PURE__ */ jsx100(SelectValue11, { placeholder: "Choose a table" }) }),
30947
30945
  /* @__PURE__ */ jsx100(SelectContent11, { children: writable.map((t) => /* @__PURE__ */ jsx100(SelectItem11, { value: t.id, children: t.name }, t.id)) })
30948
30946
  ] }),
@@ -31023,6 +31021,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, ma
31023
31021
  import { useCallback as useCallback34, useEffect as useEffect64, useMemo as useMemo46, useState as useState81 } from "react";
31024
31022
  import { useFields as useFields16, useRecordsClient as useRecordsClient54, useTable as useTable14 } from "@ai-matrx/records/react";
31025
31023
  import { BasicInput as BasicInput18, BasicTextarea as BasicTextarea8, Button as Button61, Separator as Separator7, Skeleton as Skeleton11, cn as cn49 } from "@ai-matrx/design-system";
31024
+ import { Select as Select13 } from "@ai-matrx/design-system/controls";
31026
31025
  import { jsx as jsx101, jsxs as jsxs90 } from "react/jsx-runtime";
31027
31026
  var NO_RULES_YET = "Nothing has to be true to get here yet.";
31028
31027
  var NEEDS_A_SENTENCE = "Write the sentence somebody reads when this stops them, the way you would say it out loud.";
@@ -31153,16 +31152,15 @@ function StageRulesSection({ tableId, stage, className }) {
31153
31152
  /* @__PURE__ */ jsxs90("div", { className: "flex items-center gap-2", children: [
31154
31153
  /* @__PURE__ */ jsx101("span", { className: "font-medium", children: "Rules for entering" }),
31155
31154
  /* @__PURE__ */ jsx101(
31156
- "select",
31155
+ Select13,
31157
31156
  {
31158
31157
  "aria-label": "Stage",
31159
- className: "h-7 rounded border bg-background px-1 text-xs",
31160
31158
  value: stageKey ?? "",
31161
- onChange: (e) => {
31162
- setChosen(e.target.value);
31159
+ onValueChange: (v) => {
31160
+ setChosen(v);
31163
31161
  setDraft(null);
31164
31162
  },
31165
- children: stages.filter((s) => !s.retired).map((s) => /* @__PURE__ */ jsx101("option", { value: s.key, children: s.label }, s.key))
31163
+ options: stages.filter((s) => !s.retired).map((s) => ({ value: s.key, label: s.label }))
31166
31164
  }
31167
31165
  ),
31168
31166
  /* @__PURE__ */ jsx101("span", { className: "text-muted-foreground", children: gates.length }),
@@ -31230,13 +31228,12 @@ function StageRulesSection({ tableId, stage, className }) {
31230
31228
  /* @__PURE__ */ jsxs90("div", { className: "flex flex-wrap items-center gap-1", children: [
31231
31229
  /* @__PURE__ */ jsx101("span", { className: "text-muted-foreground", children: "and when it does not" }),
31232
31230
  /* @__PURE__ */ jsx101(
31233
- "select",
31231
+ Select13,
31234
31232
  {
31235
31233
  "aria-label": "What happens",
31236
- className: "h-8 rounded border bg-background px-1 text-xs",
31237
31234
  value: draft.on_fail ?? "refuse",
31238
- onChange: (e) => setDraft({ ...draft, on_fail: e.target.value }),
31239
- children: ON_FAIL.map((o) => /* @__PURE__ */ jsx101("option", { value: o.value, children: o.label }, o.value))
31235
+ onValueChange: (on_fail) => setDraft({ ...draft, on_fail }),
31236
+ options: ON_FAIL.map((o) => ({ value: o.value, label: o.label }))
31240
31237
  }
31241
31238
  ),
31242
31239
  /* @__PURE__ */ jsx101("span", { className: "text-muted-foreground", children: ON_FAIL.find((o) => o.value === (draft.on_fail ?? "refuse"))?.note })
@@ -31756,7 +31753,7 @@ import {
31756
31753
  import { useRecordsClient as useRecordsClient59, useTable as useTable15 } from "@ai-matrx/records/react";
31757
31754
  import {
31758
31755
  Button as Button65,
31759
- Select as Select12,
31756
+ Select as Select14,
31760
31757
  SelectContent as SelectContent12,
31761
31758
  SelectItem as SelectItem12,
31762
31759
  SelectTrigger as SelectTrigger12,
@@ -31788,7 +31785,7 @@ function ShownToSelect({
31788
31785
  onChange,
31789
31786
  testId
31790
31787
  }) {
31791
- return /* @__PURE__ */ jsxs95(Select12, { value, onValueChange: (next) => isShownTo(next) ? onChange(next) : void 0, children: [
31788
+ return /* @__PURE__ */ jsxs95(Select14, { value, onValueChange: (next) => isShownTo(next) ? onChange(next) : void 0, children: [
31792
31789
  /* @__PURE__ */ jsx106(SelectTrigger12, { size: "sm", "aria-label": label, className: "h-7 min-w-[8rem] text-xs", "data-testid": testId, children: /* @__PURE__ */ jsx106(SelectValue12, {}) }),
31793
31790
  /* @__PURE__ */ jsx106(SelectContent12, { children: allowed.map((word) => /* @__PURE__ */ jsx106(SelectItem12, { value: word, children: SHOWN_TO_LABEL[word] }, word)) })
31794
31791
  ] });
@@ -33223,7 +33220,7 @@ function lookAfterReset(look) {
33223
33220
  import { useEffect as useEffect87, useMemo as useMemo62, useState as useState106 } from "react";
33224
33221
  import { mayDrag as mayDrag4, useFields as useFields21, useRecordPage as useRecordPage2, useRecordsClient as useRecordsClient71, useTable as useTable21 } from "@ai-matrx/records/react";
33225
33222
  import { isButtonField as isButtonField5, newerKindOf as newerKindOf7, stableFilterKey as stableFilterKey4 } from "@ai-matrx/records";
33226
- import { Button as Button77, Select as Select17, SelectContent as SelectContent17, SelectItem as SelectItem17, SelectTrigger as SelectTrigger17, SelectValue as SelectValue17, cn as cn62 } from "@ai-matrx/design-system";
33223
+ import { Button as Button77, Select as Select19, SelectContent as SelectContent17, SelectItem as SelectItem17, SelectTrigger as SelectTrigger17, SelectValue as SelectValue17, cn as cn62 } from "@ai-matrx/design-system";
33227
33224
  import {
33228
33225
  CHOICE_CHIP_CLASS as CHOICE_CHIP_CLASS5,
33229
33226
  EMPTY_TABLE_STYLE as EMPTY_TABLE_STYLE2,
@@ -34234,7 +34231,7 @@ function CardFieldsInline({ row, fields }) {
34234
34231
  // src/CalendarView.tsx
34235
34232
  import { useEffect as useEffect79, useMemo as useMemo56, useRef as useRef47, useState as useState98 } from "react";
34236
34233
  import { mayDrag as mayDrag2 } from "@ai-matrx/records/react";
34237
- import { Button as Button74, Select as Select13, SelectContent as SelectContent13, SelectItem as SelectItem13, SelectTrigger as SelectTrigger13, SelectValue as SelectValue13, cn as cn57 } from "@ai-matrx/design-system";
34234
+ import { Button as Button74, Select as Select15, SelectContent as SelectContent13, SelectItem as SelectItem13, SelectTrigger as SelectTrigger13, SelectValue as SelectValue13, cn as cn57 } from "@ai-matrx/design-system";
34238
34235
  import { CHOICE_CHIP_CLASS as CHOICE_CHIP_CLASS3 } from "@ai-matrx/design-system/data-table";
34239
34236
 
34240
34237
  // src/weekStart.ts
@@ -34916,7 +34913,7 @@ function CalendarView({
34916
34913
  };
34917
34914
  const picker = (label, value, candidates, onPick, kept, unusual) => /* @__PURE__ */ jsxs108("div", { className: "flex items-center gap-1.5 whitespace-nowrap text-xs", "data-calendar-setting": label, children: [
34918
34915
  /* @__PURE__ */ jsx119("span", { className: "text-muted-foreground", children: label }),
34919
- /* @__PURE__ */ jsxs108(Select13, { value: value ?? NONE, onValueChange: (v) => onPick(v === NONE ? null : v), children: [
34916
+ /* @__PURE__ */ jsxs108(Select15, { value: value ?? NONE, onValueChange: (v) => onPick(v === NONE ? null : v), children: [
34920
34917
  /* @__PURE__ */ jsx119(SelectTrigger13, { size: "sm", className: "h-7 min-w-24 text-xs", "aria-label": `${label} column`, ...kept ? {} : { title: "Kept for this visit only" }, children: /* @__PURE__ */ jsx119(SelectValue13, { placeholder: "Choose" }) }),
34921
34918
  /* @__PURE__ */ jsxs108(SelectContent13, { children: [
34922
34919
  /* @__PURE__ */ jsx119(SelectItem13, { value: NONE, children: "None" }),
@@ -35296,7 +35293,7 @@ function weekHeading(first) {
35296
35293
  // src/TimelineView.tsx
35297
35294
  import { useEffect as useEffect80, useMemo as useMemo57, useRef as useRef48, useState as useState99 } from "react";
35298
35295
  import { mayDrag as mayDrag3 } from "@ai-matrx/records/react";
35299
- import { DropdownMenu as DropdownMenu8, DropdownMenuCheckboxItem as DropdownMenuCheckboxItem2, DropdownMenuContent as DropdownMenuContent8, DropdownMenuItem as DropdownMenuItem7, DropdownMenuRadioGroup as DropdownMenuRadioGroup2, DropdownMenuRadioItem as DropdownMenuRadioItem2, DropdownMenuSeparator as DropdownMenuSeparator4, DropdownMenuSub as DropdownMenuSub2, DropdownMenuSubContent as DropdownMenuSubContent2, DropdownMenuSubTrigger as DropdownMenuSubTrigger2, DropdownMenuTrigger as DropdownMenuTrigger8, Button as Button75, Select as Select14, SelectContent as SelectContent14, SelectItem as SelectItem14, SelectTrigger as SelectTrigger14, SelectValue as SelectValue14, cn as cn58 } from "@ai-matrx/design-system";
35296
+ import { DropdownMenu as DropdownMenu8, DropdownMenuCheckboxItem as DropdownMenuCheckboxItem2, DropdownMenuContent as DropdownMenuContent8, DropdownMenuItem as DropdownMenuItem7, DropdownMenuRadioGroup as DropdownMenuRadioGroup2, DropdownMenuRadioItem as DropdownMenuRadioItem2, DropdownMenuSeparator as DropdownMenuSeparator4, DropdownMenuSub as DropdownMenuSub2, DropdownMenuSubContent as DropdownMenuSubContent2, DropdownMenuSubTrigger as DropdownMenuSubTrigger2, DropdownMenuTrigger as DropdownMenuTrigger8, Button as Button75, Select as Select16, SelectContent as SelectContent14, SelectItem as SelectItem14, SelectTrigger as SelectTrigger14, SelectValue as SelectValue14, cn as cn58 } from "@ai-matrx/design-system";
35300
35297
  import { CHOICE_CHIP_CLASS as CHOICE_CHIP_CLASS4 } from "@ai-matrx/design-system/data-table";
35301
35298
  import { useOptionalRecordsClient as useOptionalRecordsClient15 } from "@ai-matrx/records/react";
35302
35299
 
@@ -36135,7 +36132,7 @@ function TimelineView({
36135
36132
  };
36136
36133
  const picker = (label, value, options, onPick, opts) => /* @__PURE__ */ jsxs109("div", { className: "flex items-center gap-1.5 whitespace-nowrap text-xs", "data-timeline-setting": label, children: [
36137
36134
  /* @__PURE__ */ jsx120("span", { className: "text-muted-foreground", children: label }),
36138
- /* @__PURE__ */ jsxs109(Select14, { value: value ?? NONE2, onValueChange: (v) => onPick(v === NONE2 ? null : v), children: [
36135
+ /* @__PURE__ */ jsxs109(Select16, { value: value ?? NONE2, onValueChange: (v) => onPick(v === NONE2 ? null : v), children: [
36139
36136
  /* @__PURE__ */ jsx120(SelectTrigger14, { size: "sm", className: "h-7 min-w-24 text-xs", "aria-label": `${label} column`, ...opts?.kept === false ? { title: "Kept for this visit only" } : {}, children: /* @__PURE__ */ jsx120(SelectValue14, { placeholder: "Choose" }) }),
36140
36137
  /* @__PURE__ */ jsxs109(SelectContent14, { children: [
36141
36138
  opts?.none !== false ? /* @__PURE__ */ jsx120(SelectItem14, { value: NONE2, children: "None" }) : null,
@@ -36797,7 +36794,7 @@ function BoardOptions({
36797
36794
 
36798
36795
  // src/ListView.tsx
36799
36796
  import { useMemo as useMemo58 } from "react";
36800
- import { Select as Select15, SelectContent as SelectContent15, SelectItem as SelectItem15, SelectTrigger as SelectTrigger15, SelectValue as SelectValue15, cn as cn59 } from "@ai-matrx/design-system";
36797
+ import { Select as Select17, SelectContent as SelectContent15, SelectItem as SelectItem15, SelectTrigger as SelectTrigger15, SelectValue as SelectValue15, cn as cn59 } from "@ai-matrx/design-system";
36801
36798
  import { resolveRowColor as resolveRowColor3, ROW_TINT_CLASS as ROW_TINT_CLASS2 } from "@ai-matrx/design-system/data-table";
36802
36799
  import { jsx as jsx124, jsxs as jsxs112 } from "react/jsx-runtime";
36803
36800
  var LIST_DEFAULT_FIELDS = 4;
@@ -36856,7 +36853,7 @@ function ListView({
36856
36853
  onGroupingChange ? /* @__PURE__ */ jsxs112("div", { className: "ml-auto flex items-center gap-1.5", "data-records-list-group": "", children: [
36857
36854
  /* @__PURE__ */ jsx124("span", { className: "text-muted-foreground", children: "Group by" }),
36858
36855
  /* @__PURE__ */ jsxs112(
36859
- Select15,
36856
+ Select17,
36860
36857
  {
36861
36858
  value: groupKey ?? NO_GROUP,
36862
36859
  onValueChange: (next) => onGroupingChange(next === NO_GROUP ? void 0 : { ...grouping ?? {}, field: next, collapsed: [] }),
@@ -36980,7 +36977,7 @@ function ListRow({
36980
36977
  import { useEffect as useEffect86, useMemo as useMemo61, useState as useState105 } from "react";
36981
36978
  import { useRecordsClient as useRecordsClient70 } from "@ai-matrx/records/react";
36982
36979
  import { fieldKindFor as fieldKindFor2, measureKey as measureKey4 } from "@ai-matrx/records";
36983
- import { Select as Select16, SelectContent as SelectContent16, SelectItem as SelectItem16, SelectTrigger as SelectTrigger16, SelectValue as SelectValue16 } from "@ai-matrx/design-system";
36980
+ import { Select as Select18, SelectContent as SelectContent16, SelectItem as SelectItem16, SelectTrigger as SelectTrigger16, SelectValue as SelectValue16 } from "@ai-matrx/design-system";
36984
36981
 
36985
36982
  // src/ChartBlock.tsx
36986
36983
  import { useMemo as useMemo60 } from "react";
@@ -37990,22 +37987,22 @@ function ChartLayout({ view, fields, filter, onChange, remembered }) {
37990
37987
  return /* @__PURE__ */ jsxs115("div", { className: "flex min-h-0 flex-col gap-2", "data-records-chart-layout": "", "data-records-chart-measure": pickMeasure, children: [
37991
37988
  /* @__PURE__ */ jsxs115("div", { className: "flex flex-wrap items-center gap-2 text-xs", children: [
37992
37989
  /* @__PURE__ */ jsx127("span", { className: "text-muted-foreground", children: "Group by" }),
37993
- /* @__PURE__ */ jsxs115(Select16, { value: (view.groupField === void 0 ? defaultChartGroup(fields) : view.groupField) ?? "__none", onValueChange: (next) => onChange({ groupField: next === "__none" ? null : next }), children: [
37990
+ /* @__PURE__ */ jsxs115(Select18, { value: (view.groupField === void 0 ? defaultChartGroup(fields) : view.groupField) ?? "__none", onValueChange: (next) => onChange({ groupField: next === "__none" ? null : next }), children: [
37994
37991
  /* @__PURE__ */ jsx127(SelectTrigger16, { size: "sm", className: "h-7 w-auto min-w-[8rem] text-xs", "aria-label": "Chart group by", children: /* @__PURE__ */ jsx127(SelectValue16, {}) }),
37995
37992
  /* @__PURE__ */ jsxs115(SelectContent16, { children: [
37996
37993
  /* @__PURE__ */ jsx127(SelectItem16, { value: "__none", children: "Everything together" }),
37997
37994
  groupable.map((f) => /* @__PURE__ */ jsx127(SelectItem16, { value: f.key, children: fieldName(f) }, f.key))
37998
37995
  ] })
37999
37996
  ] }),
38000
- /* @__PURE__ */ jsxs115(Select16, { value: q.kind, onValueChange: (next) => onChange({ chartKind: next }), children: [
37997
+ /* @__PURE__ */ jsxs115(Select18, { value: q.kind, onValueChange: (next) => onChange({ chartKind: next }), children: [
38001
37998
  /* @__PURE__ */ jsx127(SelectTrigger16, { size: "sm", className: "h-7 w-auto min-w-[6rem] text-xs", "aria-label": "Chart shape", children: /* @__PURE__ */ jsx127(SelectValue16, {}) }),
38002
37999
  /* @__PURE__ */ jsx127(SelectContent16, { children: Object.keys(KIND_LABEL).map((k) => /* @__PURE__ */ jsx127(SelectItem16, { value: k, children: KIND_LABEL[k] }, k)) })
38003
38000
  ] }),
38004
- /* @__PURE__ */ jsxs115(Select16, { value: isChartMeasure(view.chartMeasure) ? view.chartMeasure : "count", onValueChange: (next) => onChange({ chartMeasure: next }), children: [
38001
+ /* @__PURE__ */ jsxs115(Select18, { value: isChartMeasure(view.chartMeasure) ? view.chartMeasure : "count", onValueChange: (next) => onChange({ chartMeasure: next }), children: [
38005
38002
  /* @__PURE__ */ jsx127(SelectTrigger16, { size: "sm", className: "h-7 w-auto min-w-[6rem] text-xs", "aria-label": "Chart measure", children: /* @__PURE__ */ jsx127(SelectValue16, {}) }),
38006
38003
  /* @__PURE__ */ jsx127(SelectContent16, { children: Object.keys(MEASURE_LABEL2).map((m) => /* @__PURE__ */ jsx127(SelectItem16, { value: m, children: MEASURE_LABEL2[m] }, m)) })
38007
38004
  ] }),
38008
- view.chartMeasure === "sum" || view.chartMeasure === "avg" ? /* @__PURE__ */ jsxs115(Select16, { value: view.measure ?? "", onValueChange: (next) => onChange({ measure: next === "" ? null : next }), children: [
38005
+ view.chartMeasure === "sum" || view.chartMeasure === "avg" ? /* @__PURE__ */ jsxs115(Select18, { value: view.measure ?? "", onValueChange: (next) => onChange({ measure: next === "" ? null : next }), children: [
38009
38006
  /* @__PURE__ */ jsx127(SelectTrigger16, { size: "sm", className: "h-7 w-auto min-w-[8rem] text-xs", "aria-label": "Chart measured field", children: /* @__PURE__ */ jsx127(SelectValue16, { placeholder: "Of which field" }) }),
38010
38007
  /* @__PURE__ */ jsx127(SelectContent16, { children: numeric.map((f) => /* @__PURE__ */ jsx127(SelectItem16, { value: f.key, children: fieldName(f) }, f.key)) })
38011
38008
  ] }) : null,
@@ -38703,7 +38700,7 @@ function FieldPicker({
38703
38700
  const options = unusual ? [...offerable, unusual] : offerable;
38704
38701
  return /* @__PURE__ */ jsxs116("div", { className: "flex items-center gap-1.5 text-xs", "data-records-view-field": layout, children: [
38705
38702
  /* @__PURE__ */ jsx128("span", { className: "text-muted-foreground", id: `view-field-${layout}-label`, children: label }),
38706
- options.length === 1 && chosen === options[0].key ? /* @__PURE__ */ jsx128("span", { className: "font-medium", "data-records-view-field-only": "", children: fieldName(options[0]) }) : /* @__PURE__ */ jsxs116(Select17, { value: chosen ?? "", onValueChange: (next) => onPick(next === "" ? null : next), children: [
38703
+ options.length === 1 && chosen === options[0].key ? /* @__PURE__ */ jsx128("span", { className: "font-medium", "data-records-view-field-only": "", children: fieldName(options[0]) }) : /* @__PURE__ */ jsxs116(Select19, { value: chosen ?? "", onValueChange: (next) => onPick(next === "" ? null : next), children: [
38707
38704
  /* @__PURE__ */ jsx128(
38708
38705
  SelectTrigger17,
38709
38706
  {
@@ -40261,6 +40258,7 @@ import { formatAbsoluteDate, formatDurationMs } from "@ai-matrx/kit/format";
40261
40258
  import { useCallback as useCallback44, useEffect as useEffect92, useMemo as useMemo63, useState as useState111 } from "react";
40262
40259
  import { useRecordsClient as useRecordsClient76, useTable as useTable24 } from "@ai-matrx/records/react";
40263
40260
  import { Badge as Badge17, BasicInput as BasicInput22, BasicTextarea as BasicTextarea9, Button as Button82, Skeleton as Skeleton19, cn as cn67 } from "@ai-matrx/design-system";
40261
+ import { Select as Select20 } from "@ai-matrx/design-system/controls";
40264
40262
  import { humanizeIdentifier as humanizeIdentifier15 } from "@ai-matrx/kit/text-case";
40265
40263
  import { Fragment as Fragment50, jsx as jsx133, jsxs as jsxs121 } from "react/jsx-runtime";
40266
40264
  var DUE_WORD = DUE_STATE_LABEL;
@@ -40412,16 +40410,13 @@ function ChecklistRunner({
40412
40410
  active.overdue > 0 ? ` \xB7 ${active.overdue} overdue` : ""
40413
40411
  ] }) : null,
40414
40412
  runs && runs.length > 1 ? /* @__PURE__ */ jsx133(
40415
- "select",
40413
+ Select20,
40416
40414
  {
40417
40415
  "aria-label": "Checklist run",
40418
- className: "ml-auto h-7 rounded border bg-background px-1 text-xs",
40416
+ className: "ml-auto",
40419
40417
  value: activeId ?? "",
40420
- onChange: (e) => setActiveId(e.target.value),
40421
- children: runs.map((r) => /* @__PURE__ */ jsxs121("option", { value: r.run_id, children: [
40422
- r.name,
40423
- r.about ? ` \u2014 ${r.about}` : ""
40424
- ] }, r.run_id))
40418
+ onValueChange: (v) => setActiveId(v),
40419
+ options: runs.map((r) => ({ value: r.run_id, label: `${r.name}${r.about ? ` \u2014 ${r.about}` : ""}` }))
40425
40420
  }
40426
40421
  ) : null
40427
40422
  ] }),
@@ -40504,19 +40499,18 @@ function StepRow({
40504
40499
  ] }),
40505
40500
  unassigned && onAssign && members && members.length > 0 ? /* @__PURE__ */ jsxs121("label", { className: "mt-1 flex items-center gap-1.5 pl-7 text-[11px] text-muted-foreground", children: [
40506
40501
  "Give it to",
40507
- /* @__PURE__ */ jsxs121(
40508
- "select",
40502
+ /* @__PURE__ */ jsx133(
40503
+ Select20,
40509
40504
  {
40510
- className: "h-7 rounded border bg-background px-1 text-xs text-foreground",
40511
40505
  "aria-label": `Give ${step2.title} to`,
40512
40506
  value: "",
40513
40507
  disabled: busy,
40514
- onChange: (e) => {
40515
- if (e.target.value) onAssign(e.target.value);
40508
+ onValueChange: (v) => {
40509
+ if (v) onAssign(v);
40516
40510
  },
40517
- children: [
40518
- /* @__PURE__ */ jsx133("option", { value: "", children: "Choose a person" }),
40519
- members.map((m) => /* @__PURE__ */ jsx133("option", { value: m.userId, children: m.name || m.email || "A member" }, m.userId))
40511
+ options: [
40512
+ { value: "", label: "Choose a person" },
40513
+ ...members.map((m) => ({ value: m.userId, label: m.name || m.email || "A member" }))
40520
40514
  ]
40521
40515
  }
40522
40516
  )
@@ -40994,13 +40988,12 @@ function ChecklistTemplateEditor({
40994
40988
  }
40995
40989
  ),
40996
40990
  /* @__PURE__ */ jsx133(
40997
- "select",
40991
+ Select20,
40998
40992
  {
40999
40993
  "aria-label": `Step ${index + 1} asks for`,
41000
- className: "h-7 rounded border bg-background px-1 text-xs",
41001
40994
  value: row.requires,
41002
- onChange: (e) => change(index, { requires: e.target.value }),
41003
- children: REQUIRES_KINDS.map((kind) => /* @__PURE__ */ jsx133("option", { value: kind, children: kind === "none" ? "just a tick" : REQUIRES_WORD[kind] ?? kind }, kind))
40995
+ onValueChange: (v) => change(index, { requires: v }),
40996
+ options: REQUIRES_KINDS.map((kind) => ({ value: kind, label: kind === "none" ? "just a tick" : REQUIRES_WORD[kind] ?? kind }))
41004
40997
  }
41005
40998
  ),
41006
40999
  row.requires === "answer" || row.requires === "record_field" ? /* @__PURE__ */ jsx133(
@@ -43199,6 +43192,7 @@ function FormResultsPanel({ form, className }) {
43199
43192
  import { useCallback as useCallback50, useEffect as useEffect100, useMemo as useMemo68, useRef as useRef57, useState as useState119 } from "react";
43200
43193
  import { useRecordsClient as useRecordsClient83, useTables as useTables4 } from "@ai-matrx/records/react";
43201
43194
  import { BasicInput as BasicInput23, Button as Button90, Checkbox as Checkbox14, Label as Label20, Separator as Separator10, Skeleton as Skeleton26, cn as cn75 } from "@ai-matrx/design-system";
43195
+ import { Select as Select21 } from "@ai-matrx/design-system/controls";
43202
43196
  import { Fragment as Fragment55, jsx as jsx141, jsxs as jsxs129 } from "react/jsx-runtime";
43203
43197
  var RESTATING_REPLACES = "Saving replaces what this portal shows: a table you untick stops being visible to every client the moment you save. Who is invited is not touched.";
43204
43198
  function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
@@ -43405,15 +43399,15 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
43405
43399
  ] }),
43406
43400
  /* @__PURE__ */ jsxs129("label", { className: "flex flex-col gap-1", children: [
43407
43401
  /* @__PURE__ */ jsx141(Label20, { className: "text-xs font-medium", children: "Which table holds your clients" }),
43408
- /* @__PURE__ */ jsxs129(
43409
- "select",
43402
+ /* @__PURE__ */ jsx141(
43403
+ Select21,
43410
43404
  {
43411
- className: "h-9 rounded border bg-background px-2 text-sm",
43405
+ "aria-label": "Which table holds your clients",
43412
43406
  value: clientTableId ?? "",
43413
- onChange: (e) => setClientTableId(e.target.value || null),
43414
- children: [
43415
- /* @__PURE__ */ jsx141("option", { value: "", children: "Pick the table whose records are the people signing in" }),
43416
- all.map((t) => /* @__PURE__ */ jsx141("option", { value: t.id, children: t.name }, t.id))
43407
+ onValueChange: (v) => setClientTableId(v || null),
43408
+ options: [
43409
+ { value: "", label: "Pick the table whose records are the people signing in" },
43410
+ ...all.map((t) => ({ value: t.id, label: t.name }))
43417
43411
  ]
43418
43412
  }
43419
43413
  ),
@@ -43458,15 +43452,15 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
43458
43452
  ) : /* @__PURE__ */ jsxs129("div", { className: "mt-2 flex flex-col gap-2", children: [
43459
43453
  /* @__PURE__ */ jsxs129("label", { className: "flex flex-col gap-1", children: [
43460
43454
  /* @__PURE__ */ jsx141(Label20, { className: "text-xs font-medium", children: "Which field says whose row it is" }),
43461
- /* @__PURE__ */ jsxs129(
43462
- "select",
43455
+ /* @__PURE__ */ jsx141(
43456
+ Select21,
43463
43457
  {
43464
- className: "h-8 rounded border bg-background px-2 text-sm",
43458
+ "aria-label": "Which field says whose row it is",
43465
43459
  value: exposure?.namesVia ?? "",
43466
- onChange: (e) => patch(t.id, { namesVia: e.target.value }),
43467
- children: [
43468
- /* @__PURE__ */ jsx141("option", { value: "", children: "Pick the field that names the client" }),
43469
- ties.map((f) => /* @__PURE__ */ jsx141("option", { value: f.key, children: fieldName(f) }, f.key))
43460
+ onValueChange: (v) => patch(t.id, { namesVia: v }),
43461
+ options: [
43462
+ { value: "", label: "Pick the field that names the client" },
43463
+ ...ties.map((f) => ({ value: f.key, label: fieldName(f) }))
43470
43464
  ]
43471
43465
  }
43472
43466
  )
@@ -44699,6 +44693,7 @@ import { useCallback as useCallback52, useEffect as useEffect103, useMemo as use
44699
44693
  import { useRecordsClient as useRecordsClient86, useTable as useTable28 } from "@ai-matrx/records/react";
44700
44694
  import { hasQuietHours } from "@ai-matrx/records";
44701
44695
  import { BasicInput as BasicInput26, Button as Button93, Checkbox as Checkbox15, Label as Label21, Separator as Separator12, Skeleton as Skeleton28, cn as cn80 } from "@ai-matrx/design-system";
44696
+ import { Select as Select22 } from "@ai-matrx/design-system/controls";
44702
44697
 
44703
44698
  // src/scheduleWords.ts
44704
44699
  var DAYS3 = {
@@ -44902,15 +44897,15 @@ function DigestScheduler({
44902
44897
  ] }),
44903
44898
  savedViewId ? null : /* @__PURE__ */ jsxs134("label", { className: "flex flex-col gap-1", children: [
44904
44899
  /* @__PURE__ */ jsx146(Label21, { className: "text-xs font-medium", children: "What it summarises" }),
44905
- /* @__PURE__ */ jsxs134(
44906
- "select",
44900
+ /* @__PURE__ */ jsx146(
44901
+ Select22,
44907
44902
  {
44908
- className: "h-9 rounded border bg-background px-2 text-sm",
44903
+ "aria-label": "What it summarises",
44909
44904
  value: viewId,
44910
- onChange: (e) => setViewId(e.target.value),
44911
- children: [
44912
- /* @__PURE__ */ jsx146("option", { value: "new", children: subjectName?.trim() ? `What I am looking at now (${subjectName.trim()})` : "What I am looking at now" }),
44913
- (views ?? []).map((v) => /* @__PURE__ */ jsx146("option", { value: v.view_id, children: v.name }, v.view_id))
44905
+ onValueChange: setViewId,
44906
+ options: [
44907
+ { value: "new", label: subjectName?.trim() ? `What I am looking at now (${subjectName.trim()})` : "What I am looking at now" },
44908
+ ...(views ?? []).map((v) => ({ value: v.view_id, label: v.name }))
44914
44909
  ]
44915
44910
  }
44916
44911
  ),
@@ -44920,24 +44915,27 @@ function DigestScheduler({
44920
44915
  /* @__PURE__ */ jsxs134("label", { className: "flex flex-col gap-1", children: [
44921
44916
  /* @__PURE__ */ jsx146(Label21, { className: "text-xs font-medium", children: "How often" }),
44922
44917
  /* @__PURE__ */ jsx146(
44923
- "select",
44918
+ Select22,
44924
44919
  {
44925
- className: "h-9 rounded border bg-background px-2 text-sm",
44920
+ "aria-label": "How often",
44926
44921
  value: cadence,
44927
- onChange: (e) => setCadence(e.target.value),
44928
- children: (cadences.length > 0 ? cadences : ["hourly", "daily", "weekly"]).map((c) => /* @__PURE__ */ jsx146("option", { value: c, children: CADENCE_WORDS[c] ?? c }, c))
44922
+ onValueChange: (c) => setCadence(c),
44923
+ options: (cadences.length > 0 ? cadences : ["hourly", "daily", "weekly"]).map((c) => ({
44924
+ value: c,
44925
+ label: CADENCE_WORDS[c] ?? c
44926
+ }))
44929
44927
  }
44930
44928
  )
44931
44929
  ] }),
44932
44930
  cadence === "weekly" ? /* @__PURE__ */ jsxs134("label", { className: "flex flex-col gap-1", children: [
44933
44931
  /* @__PURE__ */ jsx146(Label21, { className: "text-xs font-medium", children: "Which day" }),
44934
44932
  /* @__PURE__ */ jsx146(
44935
- "select",
44933
+ Select22,
44936
44934
  {
44937
- className: "h-9 rounded border bg-background px-2 text-sm",
44935
+ "aria-label": "Which day",
44938
44936
  value: weekday,
44939
- onChange: (e) => setWeekday(e.target.value),
44940
- children: WEEKDAYS.map((d) => /* @__PURE__ */ jsx146("option", { value: d, children: d[0].toUpperCase() + d.slice(1) }, d))
44937
+ onValueChange: setWeekday,
44938
+ options: WEEKDAYS.map((d) => ({ value: d, label: d[0].toUpperCase() + d.slice(1) }))
44941
44939
  }
44942
44940
  )
44943
44941
  ] }) : null,
@@ -44961,12 +44959,12 @@ function DigestScheduler({
44961
44959
  /* @__PURE__ */ jsxs134("label", { className: "flex flex-col gap-1", children: [
44962
44960
  /* @__PURE__ */ jsx146(Label21, { className: "text-xs font-medium", children: "Where it arrives" }),
44963
44961
  /* @__PURE__ */ jsx146(
44964
- "select",
44962
+ Select22,
44965
44963
  {
44966
- className: "h-9 rounded border bg-background px-2 text-sm",
44964
+ "aria-label": "Where it arrives",
44967
44965
  value: channel,
44968
- onChange: (e) => setChannel(e.target.value),
44969
- children: Object.entries(CHANNEL_WORDS).map(([key, words2]) => /* @__PURE__ */ jsx146("option", { value: key, children: words2 }, key))
44966
+ onValueChange: setChannel,
44967
+ options: Object.entries(CHANNEL_WORDS).map(([key, words2]) => ({ value: key, label: words2 }))
44970
44968
  }
44971
44969
  )
44972
44970
  ] })
@@ -45498,6 +45496,7 @@ function SubscriptionsPanel({ tableId, activeRuleId, className }) {
45498
45496
  // src/FormBuilder.tsx
45499
45497
  import { copyText as copyText8 } from "@ai-matrx/kit/clipboard";
45500
45498
  import { ErrorBox as ErrorBox7 } from "@ai-matrx/design-system";
45499
+ import { Select as Select23 } from "@ai-matrx/design-system/controls";
45501
45500
  import { useCallback as useCallback56, useEffect as useEffect107, useMemo as useMemo73, useRef as useRef59, useState as useState127 } from "react";
45502
45501
  import { DndContext as DndContext2, KeyboardSensor, PointerSensor as PointerSensor2, closestCenter as closestCenter2, useSensor as useSensor2, useSensors as useSensors2 } from "@dnd-kit/core";
45503
45502
  import { SortableContext as SortableContext2, arrayMove, sortableKeyboardCoordinates, useSortable as useSortable2, verticalListSortingStrategy as verticalListSortingStrategy2 } from "@dnd-kit/sortable";
@@ -46970,12 +46969,15 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, startWithOne,
46970
46969
  /* @__PURE__ */ jsxs139("label", { className: "flex flex-col gap-1", children: [
46971
46970
  /* @__PURE__ */ jsx151(Label25, { className: "text-xs font-medium", children: "Flow" }),
46972
46971
  /* @__PURE__ */ jsx151(
46973
- "select",
46972
+ Select23,
46974
46973
  {
46975
- className: "h-9 rounded border bg-background px-2 text-sm",
46974
+ "aria-label": "Flow",
46976
46975
  value: draft.flow ?? "one-at-a-time",
46977
- onChange: (e) => patch({ flow: e.target.value }),
46978
- children: FORM_FLOWS.map((flow) => /* @__PURE__ */ jsx151("option", { value: flow, children: flow === "one-at-a-time" ? "One question at a time" : "All on one page" }, flow))
46976
+ onValueChange: (flow) => patch({ flow }),
46977
+ options: FORM_FLOWS.map((flow) => ({
46978
+ value: flow,
46979
+ label: flow === "one-at-a-time" ? "One question at a time" : "All on one page"
46980
+ }))
46979
46981
  }
46980
46982
  )
46981
46983
  ] }),
@@ -47921,6 +47923,7 @@ import { useCallback as useCallback60, useEffect as useEffect111, useState as us
47921
47923
  import { useRecordsClient as useRecordsClient93, useTable as useTable33 } from "@ai-matrx/records/react";
47922
47924
  import { hasQuietHours as hasQuietHours3 } from "@ai-matrx/records";
47923
47925
  import { Button as Button102, Skeleton as Skeleton36, cn as cn88 } from "@ai-matrx/design-system";
47926
+ import { Select as Select24 } from "@ai-matrx/design-system/controls";
47924
47927
  import { jsx as jsx155, jsxs as jsxs143 } from "react/jsx-runtime";
47925
47928
  var CADENCE_WORDS2 = SUBSCRIPTION_CADENCE_LABEL;
47926
47929
  var CHANNEL_WORDS3 = SUBSCRIPTION_CHANNEL_LABEL;
@@ -47934,6 +47937,9 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
47934
47937
  const [views, setViews] = useState131(null);
47935
47938
  const [error, setError] = useState131(null);
47936
47939
  const [busy, setBusy] = useState131(false);
47940
+ const [pickView, setPickView] = useState131("");
47941
+ const [pickCadence, setPickCadence] = useState131("");
47942
+ const [pickChannel, setPickChannel] = useState131("in_app");
47937
47943
  const [stopping, setStopping] = useState131(null);
47938
47944
  const load = useCallback60(async () => {
47939
47945
  const [held, offered] = await Promise.all([
@@ -48131,9 +48137,36 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
48131
48137
  if (view) void subscribe(view, name, cadence, channel, schedule, quiet2);
48132
48138
  },
48133
48139
  children: [
48134
- /* @__PURE__ */ jsx155("select", { name: "view", "aria-label": "View to be told about", className: "h-7 rounded border bg-background px-1 text-xs", children: views.map((view) => /* @__PURE__ */ jsx155("option", { value: view.id, children: view.name }, view.id)) }),
48135
- /* @__PURE__ */ jsx155("select", { name: "cadence", "aria-label": "How often", className: "h-7 rounded border bg-background px-1 text-xs", children: (cadences.length > 0 ? cadences : ["instant"]).map((cadence) => /* @__PURE__ */ jsx155("option", { value: cadence, children: CADENCE_WORDS2[cadence] ?? cadence }, cadence)) }),
48136
- /* @__PURE__ */ jsx155("select", { name: "channel", "aria-label": "Where it arrives", className: "h-7 rounded border bg-background px-1 text-xs", children: ["in_app", "email", "sms"].map((channel) => /* @__PURE__ */ jsx155("option", { value: channel, children: CHANNEL_WORDS3[channel] }, channel)) }),
48140
+ /* @__PURE__ */ jsx155("input", { type: "hidden", name: "view", value: pickView || (views[0]?.id ?? "") }),
48141
+ /* @__PURE__ */ jsx155(
48142
+ Select24,
48143
+ {
48144
+ "aria-label": "View to be told about",
48145
+ value: pickView || (views[0]?.id ?? ""),
48146
+ onValueChange: setPickView,
48147
+ options: views.map((view) => ({ value: view.id, label: view.name }))
48148
+ }
48149
+ ),
48150
+ /* @__PURE__ */ jsx155("input", { type: "hidden", name: "cadence", value: pickCadence || (cadences.length > 0 ? cadences : ["instant"])[0] }),
48151
+ /* @__PURE__ */ jsx155(
48152
+ Select24,
48153
+ {
48154
+ "aria-label": "How often",
48155
+ value: pickCadence || (cadences.length > 0 ? cadences : ["instant"])[0],
48156
+ onValueChange: setPickCadence,
48157
+ options: (cadences.length > 0 ? cadences : ["instant"]).map((cadence) => ({ value: cadence, label: CADENCE_WORDS2[cadence] ?? cadence }))
48158
+ }
48159
+ ),
48160
+ /* @__PURE__ */ jsx155("input", { type: "hidden", name: "channel", value: pickChannel }),
48161
+ /* @__PURE__ */ jsx155(
48162
+ Select24,
48163
+ {
48164
+ "aria-label": "Where it arrives",
48165
+ value: pickChannel,
48166
+ onValueChange: setPickChannel,
48167
+ options: ["in_app", "email", "sms"].map((channel) => ({ value: channel, label: CHANNEL_WORDS3[channel] ?? channel }))
48168
+ }
48169
+ ),
48137
48170
  /* @__PURE__ */ jsx155(
48138
48171
  "input",
48139
48172
  {
@@ -48180,7 +48213,7 @@ import {
48180
48213
  Popover as Popover17,
48181
48214
  PopoverContent as PopoverContent17,
48182
48215
  PopoverTrigger as PopoverTrigger17,
48183
- Select as Select19,
48216
+ Select as Select27,
48184
48217
  SelectContent as SelectContent19,
48185
48218
  SelectItem as SelectItem19,
48186
48219
  SelectTrigger as SelectTrigger19,
@@ -48206,6 +48239,7 @@ import {
48206
48239
  } from "@dnd-kit/sortable";
48207
48240
  import { CSS as CSS4 } from "@dnd-kit/utilities";
48208
48241
  import { cn as cn89 } from "@ai-matrx/design-system";
48242
+ import { Select as Select25 } from "@ai-matrx/design-system/controls";
48209
48243
 
48210
48244
  // src/dashboardLayout.ts
48211
48245
  var SPAN_CHOICES = [
@@ -48323,13 +48357,13 @@ function GridCell2({
48323
48357
  }
48324
48358
  ),
48325
48359
  /* @__PURE__ */ jsx156(
48326
- "select",
48360
+ Select25,
48327
48361
  {
48328
48362
  "aria-label": `Width of ${item.title}`,
48329
- className: "ml-auto h-7 rounded border bg-background px-1 text-xs",
48330
- value: snapSpan(item.span),
48331
- onChange: (e) => onSpan(index, Number(e.target.value)),
48332
- children: SPAN_CHOICES.map((choice) => /* @__PURE__ */ jsx156("option", { value: choice.span, children: choice.label }, choice.span))
48363
+ className: "ml-auto",
48364
+ value: String(snapSpan(item.span)),
48365
+ onValueChange: (v) => onSpan(index, Number(v)),
48366
+ options: SPAN_CHOICES.map((choice) => ({ value: String(choice.span), label: choice.label }))
48333
48367
  }
48334
48368
  )
48335
48369
  ] }) : null,
@@ -48344,7 +48378,7 @@ import { useMemo as useMemo74, useState as useState132 } from "react";
48344
48378
  import { useFields as useFields31, useRecordsClient as useRecordsClient94 } from "@ai-matrx/records/react";
48345
48379
  import {
48346
48380
  Button as Button103,
48347
- Select as Select18,
48381
+ Select as Select26,
48348
48382
  SelectContent as SelectContent18,
48349
48383
  SelectItem as SelectItem18,
48350
48384
  SelectTrigger as SelectTrigger18,
@@ -48424,7 +48458,7 @@ function AddChart({ subject, onAdd, onClose }) {
48424
48458
  return /* @__PURE__ */ jsxs145("div", { className: "flex flex-col gap-2 rounded border p-2 text-xs", role: "group", "aria-label": "Add chart", children: [
48425
48459
  /* @__PURE__ */ jsxs145("div", { className: "flex flex-wrap items-center gap-1", children: [
48426
48460
  /* @__PURE__ */ jsx157("div", { className: "min-w-[12rem]", children: /* @__PURE__ */ jsx157(TablePicker, { dataSource: client.config.dataSource, value: tableId, onChange: pickTable }) }),
48427
- /* @__PURE__ */ jsxs145(Select18, { value: measureKey5, onValueChange: setMeasureKey, children: [
48461
+ /* @__PURE__ */ jsxs145(Select26, { value: measureKey5, onValueChange: setMeasureKey, children: [
48428
48462
  /* @__PURE__ */ jsx157(SelectTrigger18, { size: "sm", "aria-label": "What the chart counts", className: "h-7 min-w-[8rem] text-xs", children: /* @__PURE__ */ jsx157(SelectValue18, {}) }),
48429
48463
  /* @__PURE__ */ jsxs145(SelectContent18, { children: [
48430
48464
  /* @__PURE__ */ jsx157(SelectItem18, { value: "count", children: "How many" }),
@@ -48438,7 +48472,7 @@ function AddChart({ subject, onAdd, onClose }) {
48438
48472
  ] }, `avg:${f.key}`))
48439
48473
  ] })
48440
48474
  ] }),
48441
- /* @__PURE__ */ jsxs145(Select18, { value: splitKey, onValueChange: setSplitKey, children: [
48475
+ /* @__PURE__ */ jsxs145(Select26, { value: splitKey, onValueChange: setSplitKey, children: [
48442
48476
  /* @__PURE__ */ jsx157(SelectTrigger18, { size: "sm", "aria-label": "How the chart splits", className: "h-7 min-w-[8rem] text-xs", children: /* @__PURE__ */ jsx157(SelectValue18, {}) }),
48443
48477
  /* @__PURE__ */ jsxs145(SelectContent18, { children: [
48444
48478
  /* @__PURE__ */ jsx157(SelectItem18, { value: "none", children: "No split" }),
@@ -48455,7 +48489,7 @@ function AddChart({ subject, onAdd, onClose }) {
48455
48489
  )
48456
48490
  ] })
48457
48491
  ] }),
48458
- /* @__PURE__ */ jsxs145(Select18, { value: kind, onValueChange: (v) => setKind(v), children: [
48492
+ /* @__PURE__ */ jsxs145(Select26, { value: kind, onValueChange: (v) => setKind(v), children: [
48459
48493
  /* @__PURE__ */ jsx157(SelectTrigger18, { size: "sm", "aria-label": "Chart shape", className: "h-7 min-w-[7rem] text-xs", children: /* @__PURE__ */ jsx157(SelectValue18, {}) }),
48460
48494
  /* @__PURE__ */ jsxs145(SelectContent18, { children: [
48461
48495
  /* @__PURE__ */ jsx157(SelectItem18, { value: "auto", children: CHART_KIND_LABEL[shape] }),
@@ -48471,6 +48505,9 @@ function AddChart({ subject, onAdd, onClose }) {
48471
48505
  ] });
48472
48506
  }
48473
48507
 
48508
+ // src/DashboardCanvas.tsx
48509
+ import { Select as ControlSelect } from "@ai-matrx/design-system/controls";
48510
+
48474
48511
  // src/pages.ts
48475
48512
  import { isRuleFilter as isRuleFilter3 } from "@ai-matrx/records";
48476
48513
  var PAGE_BLOCK_KINDS = ["list", "record", "button", "form", "filter", "chart", "heading", "text", "applet"];
@@ -48749,7 +48786,7 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, createOnMount, on
48749
48786
  ) : null,
48750
48787
  board ? /* @__PURE__ */ jsxs146("span", { className: "ml-auto flex items-center gap-1", children: [
48751
48788
  (board.blocks ?? []).some((b) => !!b.bucket) ? /* @__PURE__ */ jsxs146(
48752
- Select19,
48789
+ Select27,
48753
48790
  {
48754
48791
  value: grain ?? "saved",
48755
48792
  onValueChange: (v) => setGrain(v === "saved" ? null : v),
@@ -48913,13 +48950,12 @@ function BlockSettings({
48913
48950
  const fields = own3.data ?? [];
48914
48951
  return /* @__PURE__ */ jsxs146("div", { className: "flex flex-col items-stretch gap-1.5 text-xs", children: [
48915
48952
  /* @__PURE__ */ jsx158(
48916
- "select",
48953
+ ControlSelect,
48917
48954
  {
48918
48955
  "aria-label": `Shape of ${title}`,
48919
- className: "h-7 rounded border bg-background px-1 text-xs",
48920
48956
  value: spec.kind,
48921
- onChange: (e) => onChange({ ...spec, kind: e.target.value }),
48922
- children: CHART_KINDS.map((kind) => /* @__PURE__ */ jsx158("option", { value: kind, children: CHART_KIND_LABEL[kind] }, kind))
48957
+ onValueChange: (kind) => onChange({ ...spec, kind }),
48958
+ options: CHART_KINDS.map((kind) => ({ value: kind, label: CHART_KIND_LABEL[kind] }))
48923
48959
  }
48924
48960
  ),
48925
48961
  (spec.groupBy ?? []).length > 0 ? /* @__PURE__ */ jsx158(
@@ -48966,7 +49002,7 @@ function GroupingPicker({
48966
49002
  const known = choices.some((c) => c.field.key === current);
48967
49003
  return /* @__PURE__ */ jsxs146(Fragment61, { children: [
48968
49004
  /* @__PURE__ */ jsx158("label", { className: "text-muted-foreground", htmlFor: `block-group-${block.title}`, children: "Group by" }),
48969
- /* @__PURE__ */ jsxs146(Select19, { value: known ? current : "", onValueChange: onPick, children: [
49005
+ /* @__PURE__ */ jsxs146(Select27, { value: known ? current : "", onValueChange: onPick, children: [
48970
49006
  /* @__PURE__ */ jsx158(
48971
49007
  SelectTrigger19,
48972
49008
  {
@@ -49063,7 +49099,7 @@ function CompareControl({
49063
49099
  );
49064
49100
  return /* @__PURE__ */ jsxs146(Fragment61, { children: [
49065
49101
  /* @__PURE__ */ jsxs146(
49066
- Select19,
49102
+ Select27,
49067
49103
  {
49068
49104
  value: current ?? "none",
49069
49105
  onValueChange: (v) => {
@@ -49086,7 +49122,7 @@ function CompareControl({
49086
49122
  }
49087
49123
  ),
49088
49124
  current && !explicitWindow ? /* @__PURE__ */ jsxs146(
49089
- Select19,
49125
+ Select27,
49090
49126
  {
49091
49127
  value: period,
49092
49128
  onValueChange: (v) => onChange({ ...block.compare ?? { against: current, key }, period: v }),
@@ -49125,7 +49161,7 @@ function TargetControl({
49125
49161
  }
49126
49162
  return /* @__PURE__ */ jsxs146(Fragment61, { children: [
49127
49163
  /* @__PURE__ */ jsxs146(
49128
- Select19,
49164
+ Select27,
49129
49165
  {
49130
49166
  value: mode,
49131
49167
  onValueChange: (v) => {
@@ -49159,7 +49195,7 @@ function TargetControl({
49159
49195
  }
49160
49196
  ) : null,
49161
49197
  mode === "field" ? /* @__PURE__ */ jsxs146(
49162
- Select19,
49198
+ Select27,
49163
49199
  {
49164
49200
  value: block.target && "field" in block.target && block.target.field ? block.target.field : "",
49165
49201
  onValueChange: (key) => {
@@ -52464,7 +52500,7 @@ import {
52464
52500
  DialogContent as DialogContent18,
52465
52501
  DialogHeader as DialogHeader18,
52466
52502
  DialogTitle as DialogTitle18,
52467
- Select as Select20,
52503
+ Select as Select28,
52468
52504
  SelectContent as SelectContent20,
52469
52505
  SelectItem as SelectItem20,
52470
52506
  SelectTrigger as SelectTrigger20,
@@ -52501,7 +52537,7 @@ function BreakDownDialog({
52501
52537
  const key = picked ?? held?.field ?? dimensions[0]?.key ?? "";
52502
52538
  return /* @__PURE__ */ jsx170(Dialog18, { open, onOpenChange, children: /* @__PURE__ */ jsxs158(DialogContent18, { "data-break-down": "", className: "max-w-sm", children: [
52503
52539
  /* @__PURE__ */ jsx170(DialogHeader18, { children: /* @__PURE__ */ jsx170(DialogTitle18, { children: "Break down by" }) }),
52504
- /* @__PURE__ */ jsxs158(Select20, { value: key, onValueChange: setPicked, children: [
52540
+ /* @__PURE__ */ jsxs158(Select28, { value: key, onValueChange: setPicked, children: [
52505
52541
  /* @__PURE__ */ jsx170(SelectTrigger20, { "aria-label": "Column to break down by", "data-break-down-select": "", children: /* @__PURE__ */ jsx170(SelectValue20, { placeholder: def ? NO_DIMENSION_REASON : "Reading this table\u2026" }) }),
52506
52542
  /* @__PURE__ */ jsx170(SelectContent20, { children: dimensions.map((d) => /* @__PURE__ */ jsx170(SelectItem20, { value: d.key, children: d.label }, d.key)) })
52507
52543
  ] }),