@kelpie/ui 0.18.0 → 0.19.0

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.
Files changed (91) hide show
  1. package/dist/components/AiDrawer.d.ts +13 -0
  2. package/dist/components/AiDrawer.d.ts.map +1 -0
  3. package/dist/components/AiDrawer.js +165 -0
  4. package/dist/components/AiDrawer.js.map +1 -0
  5. package/dist/components/ApiKeysPanel.js +1 -1
  6. package/dist/components/DataTable.js +1 -1
  7. package/dist/components/KanbanBoard.d.ts +5 -1
  8. package/dist/components/KanbanBoard.d.ts.map +1 -1
  9. package/dist/components/KanbanBoard.js +37 -2
  10. package/dist/components/KanbanBoard.js.map +1 -1
  11. package/dist/components/NotesPanel.js +2 -2
  12. package/dist/components/NotesPanel.js.map +1 -1
  13. package/dist/components/PageHeader.js +1 -1
  14. package/dist/components/PageHeader.js.map +1 -1
  15. package/dist/components/PersonIntakePanel.d.ts +21 -0
  16. package/dist/components/PersonIntakePanel.d.ts.map +1 -0
  17. package/dist/components/PersonIntakePanel.js +76 -0
  18. package/dist/components/PersonIntakePanel.js.map +1 -0
  19. package/dist/components/SegmentedControl.js +2 -2
  20. package/dist/components/SegmentedControl.js.map +1 -1
  21. package/dist/components/Shell.d.ts.map +1 -1
  22. package/dist/components/Shell.js +39 -3
  23. package/dist/components/Shell.js.map +1 -1
  24. package/dist/components/WorkspaceSwitcher.d.ts.map +1 -1
  25. package/dist/components/WorkspaceSwitcher.js +10 -2
  26. package/dist/components/WorkspaceSwitcher.js.map +1 -1
  27. package/dist/components/aiDrawerState.d.ts +45 -0
  28. package/dist/components/aiDrawerState.d.ts.map +1 -0
  29. package/dist/components/aiDrawerState.js +14 -0
  30. package/dist/components/aiDrawerState.js.map +1 -0
  31. package/dist/components/personIntakeTask.d.ts +5 -0
  32. package/dist/components/personIntakeTask.d.ts.map +1 -0
  33. package/dist/components/personIntakeTask.js +13 -0
  34. package/dist/components/personIntakeTask.js.map +1 -0
  35. package/dist/index.d.ts +2 -0
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +3 -0
  38. package/dist/index.js.map +1 -1
  39. package/dist/lib/mediaQuery.d.ts +9 -0
  40. package/dist/lib/mediaQuery.d.ts.map +1 -0
  41. package/dist/lib/mediaQuery.js +24 -0
  42. package/dist/lib/mediaQuery.js.map +1 -0
  43. package/dist/modules/PersonIntakeWizard.d.ts +1 -1
  44. package/dist/modules/PersonIntakeWizard.d.ts.map +1 -1
  45. package/dist/modules/PersonIntakeWizard.js +9 -5
  46. package/dist/modules/PersonIntakeWizard.js.map +1 -1
  47. package/dist/pages/FormDetail.d.ts.map +1 -1
  48. package/dist/pages/FormDetail.js +7 -7
  49. package/dist/pages/FormDetail.js.map +1 -1
  50. package/dist/pages/ListDetail.d.ts.map +1 -1
  51. package/dist/pages/ListDetail.js +2 -2
  52. package/dist/pages/ListDetail.js.map +1 -1
  53. package/dist/pages/PeoplePage.d.ts.map +1 -1
  54. package/dist/pages/PeoplePage.js +8 -6
  55. package/dist/pages/PeoplePage.js.map +1 -1
  56. package/dist/pages/RoleDetail.d.ts.map +1 -1
  57. package/dist/pages/RoleDetail.js +3 -3
  58. package/dist/pages/RoleDetail.js.map +1 -1
  59. package/dist/pages/account/ConnectedAppsPage.js +1 -1
  60. package/dist/pages/admin/DataPage.js +2 -2
  61. package/dist/pages/forms/AddFieldMenu.js +2 -2
  62. package/dist/pages/forms/AddFieldMenu.js.map +1 -1
  63. package/dist/pages/handbook/HandbookPage.js +4 -4
  64. package/dist/pages/handbook/HandbookPage.js.map +1 -1
  65. package/dist/registry/contributions.d.ts +8 -3
  66. package/dist/registry/contributions.d.ts.map +1 -1
  67. package/package.json +2 -2
  68. package/src/components/AiDrawer.tsx +272 -0
  69. package/src/components/ApiKeysPanel.tsx +1 -1
  70. package/src/components/DataTable.tsx +1 -1
  71. package/src/components/KanbanBoard.tsx +119 -2
  72. package/src/components/NotesPanel.tsx +7 -4
  73. package/src/components/PageHeader.tsx +1 -1
  74. package/src/components/{PersonIntakeDialog.tsx → PersonIntakePanel.tsx} +17 -50
  75. package/src/components/SegmentedControl.tsx +2 -2
  76. package/src/components/Shell.tsx +98 -12
  77. package/src/components/WorkspaceSwitcher.tsx +13 -2
  78. package/src/components/aiDrawerState.ts +61 -0
  79. package/src/components/personIntakeTask.tsx +14 -0
  80. package/src/index.ts +5 -0
  81. package/src/lib/mediaQuery.ts +32 -0
  82. package/src/modules/PersonIntakeWizard.tsx +10 -5
  83. package/src/pages/FormDetail.tsx +18 -14
  84. package/src/pages/ListDetail.tsx +5 -3
  85. package/src/pages/PeoplePage.tsx +7 -10
  86. package/src/pages/RoleDetail.tsx +10 -5
  87. package/src/pages/account/ConnectedAppsPage.tsx +1 -1
  88. package/src/pages/admin/DataPage.tsx +2 -2
  89. package/src/pages/forms/AddFieldMenu.tsx +2 -2
  90. package/src/pages/handbook/HandbookPage.tsx +5 -5
  91. package/src/registry/contributions.ts +8 -3
@@ -71,9 +71,11 @@ export function RoleDetail(): React.JSX.Element {
71
71
  ← Hiring
72
72
  </Link>
73
73
 
74
- <div className="mb-6 flex flex-wrap items-start justify-between gap-3">
74
+ {/* On a phone the controls go under the heading, so a long role title
75
+ keeps the full width and does not break over several lines. */}
76
+ <div className="mb-6 flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-start sm:justify-between">
75
77
  <RoleHeading role={record} />
76
- <div className="flex shrink-0 flex-wrap items-center gap-3">
78
+ <div className="flex flex-wrap items-center gap-3">
77
79
  <RoleStatusField role={record} />
78
80
  <AgentTasks targetType="role" targetId={record.id} targetLabel={record.title} />
79
81
  <DeleteRecord
@@ -109,7 +111,7 @@ function RoleHeading({ role }: { readonly role: Role }): React.JSX.Element {
109
111
  const { patch, error } = useRolePatch(role)
110
112
 
111
113
  return (
112
- <div className="min-w-0 flex-1">
114
+ <div className="min-w-[12rem] flex-1">
113
115
  {error !== null && (
114
116
  <div className="mb-2">
115
117
  <ErrorPanel error={error} />
@@ -292,10 +294,13 @@ function CandidateRow({
292
294
 
293
295
  return (
294
296
  <li className="border-b border-border px-4 py-3.5 last:border-0">
295
- <div className="flex flex-wrap items-start justify-between gap-3">
297
+ {/* On a phone the controls always take their own line under the name.
298
+ Left to wrap, whether they fit beside it depends on the name length
299
+ and on the stage field, so rows in one list came out different. */}
300
+ <div className="flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-start sm:justify-between sm:gap-3">
296
301
  <Link
297
302
  to={`/people/${candidate.personId}`}
298
- className="text-left text-[13px] font-medium text-ink hover:text-accent"
303
+ className="self-start text-left text-[13px] font-medium text-ink hover:text-accent"
299
304
  >
300
305
  {personName ?? candidate.personId}
301
306
  </Link>
@@ -34,7 +34,7 @@ export function ConnectedAppsPage(): React.JSX.Element {
34
34
  No connected apps. When an MCP client asks you to sign in to Kelpie, it shows up here.
35
35
  </p>
36
36
  ) : (
37
- <div className="overflow-hidden rounded-md border border-border">
37
+ <div className="overflow-x-auto rounded-md border border-border">
38
38
  <table className="w-full text-left text-[13px]">
39
39
  <thead>
40
40
  <tr className="border-b border-border bg-surface text-[11px] font-semibold tracking-wide text-ink-muted uppercase">
@@ -571,7 +571,7 @@ function MappingForm(props: MappingFormProps): ReactNode {
571
571
  : 'A company that is not here yet is left unlinked and reported as a warning.'}
572
572
  </p>
573
573
  ) : null}
574
- <div className="overflow-hidden rounded-md border border-border">
574
+ <div className="overflow-x-auto rounded-md border border-border">
575
575
  <table className="w-full text-left text-[13px]">
576
576
  <thead>
577
577
  <tr className="border-b border-border bg-surface text-[11px] font-semibold tracking-wide text-ink-muted uppercase">
@@ -810,7 +810,7 @@ function DonePanel({ job, object, onAgain }: DonePanelProps): ReactNode {
810
810
  /** The row / field / message table shared by the error and warning lists. */
811
811
  function IssueTable({ rows }: { readonly rows: readonly ImportRowError[] }): ReactNode {
812
812
  return (
813
- <div className="overflow-hidden rounded-md border border-border">
813
+ <div className="overflow-x-auto rounded-md border border-border">
814
814
  <table className="w-full text-left text-[13px]">
815
815
  <thead>
816
816
  <tr className="border-b border-border bg-surface text-[11px] font-semibold tracking-wide text-ink-muted uppercase">
@@ -57,7 +57,7 @@ export function AddFieldMenu({ fields, onAdd }: AddFieldMenuProps): React.JSX.El
57
57
  }
58
58
 
59
59
  return (
60
- <div className="relative" ref={containerRef}>
60
+ <div className="relative shrink-0" ref={containerRef}>
61
61
  <button
62
62
  type="button"
63
63
  onClick={() => {
@@ -65,7 +65,7 @@ export function AddFieldMenu({ fields, onAdd }: AddFieldMenuProps): React.JSX.El
65
65
  }}
66
66
  aria-expanded={open}
67
67
  aria-haspopup="menu"
68
- className="rounded-md bg-accent px-3 py-1.5 text-[12px] font-semibold text-accent-fg transition hover:bg-accent-hover"
68
+ className="whitespace-nowrap rounded-md bg-accent px-3 py-1.5 text-[12px] font-semibold text-accent-fg transition hover:bg-accent-hover"
69
69
  >
70
70
  + Add field
71
71
  </button>
@@ -173,8 +173,8 @@ export function HandbookLayout(): React.JSX.Element {
173
173
  }
174
174
 
175
175
  return (
176
- <div className="animate-fade-in flex min-h-[calc(100vh-8rem)] gap-0 overflow-hidden rounded-md border border-border">
177
- <aside className="flex w-[260px] shrink-0 flex-col border-r border-border bg-surface">
176
+ <div className="animate-fade-in flex min-h-[calc(100vh-8rem)] flex-col gap-0 overflow-hidden rounded-md border border-border lg:flex-row">
177
+ <aside className="flex w-full shrink-0 flex-col border-b border-border bg-surface lg:w-[260px] lg:border-r lg:border-b-0">
178
178
  <div className="flex items-center justify-between gap-2 border-b border-border px-3 py-3">
179
179
  <div>
180
180
  <div className="text-[13px] font-semibold text-ink">Handbook</div>
@@ -191,7 +191,7 @@ export function HandbookLayout(): React.JSX.Element {
191
191
  New
192
192
  </button>
193
193
  </div>
194
- <nav className="flex-1 overflow-y-auto p-2">
194
+ <nav className="max-h-64 flex-1 overflow-y-auto p-2 lg:max-h-none">
195
195
  <DndContext
196
196
  sensors={sensors}
197
197
  collisionDetection={closestCenter}
@@ -404,7 +404,7 @@ function HandbookEditor({
404
404
  return (
405
405
  <div className="flex h-full flex-col">
406
406
  <div className="flex flex-wrap items-start justify-between gap-3 border-b border-border px-5 py-3">
407
- <div className="min-w-0 flex-1">
407
+ <div className="min-w-[12rem] flex-1">
408
408
  {editing ? (
409
409
  <input
410
410
  value={title}
@@ -422,7 +422,7 @@ function HandbookEditor({
422
422
  {authorName === undefined ? '' : ` · ${authorName}`}
423
423
  </div>
424
424
  </div>
425
- <div className="flex shrink-0 flex-wrap items-center gap-2">
425
+ <div className="flex flex-wrap items-center gap-2">
426
426
  {editing ? (
427
427
  <>
428
428
  <button
@@ -140,15 +140,20 @@ export interface AgentRunner {
140
140
  }
141
141
 
142
142
  export interface PersonIntakeWizardProps {
143
- /** Closes the dialog the wizard sits in. */
143
+ /** Ends the intake and closes the AI drawer it sits in. */
144
144
  readonly onClose: () => void
145
+ /**
146
+ * Called when a model request starts or ends, so the drawer's header button
147
+ * can show that the task is working while the drawer is hidden.
148
+ */
149
+ readonly onPendingChange?: (pending: boolean) => void
145
150
  }
146
151
 
147
152
  /**
148
153
  * The model-driven wizard behind People's **Add from notes**.
149
154
  *
150
- * Core owns the button and the dialog, and with no provider (or one that is
151
- * not ready) the dialog offers a copy-prompt for the user's own agent. A
155
+ * Core owns the button and the AI drawer panel, and with no provider (or one
156
+ * that is not ready) the panel offers a copy-prompt for the user's own agent. A
152
157
  * provider replaces that with a wizard that identifies, researches and
153
158
  * creates. `useAvailability` is a hook, with the runner's shape and rules.
154
159
  */