@crewlethq/ui 0.100.1 → 0.101.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 (107) hide show
  1. package/dist/AgentHandoffPanel/index.js +5 -5
  2. package/dist/ArrangeList/index.js +1 -1
  3. package/dist/ArtifactBar/index.js +1 -1
  4. package/dist/ArtifactCard/index.js +2 -2
  5. package/dist/AuthLayout/index.js +1 -1
  6. package/dist/AvatarPicker/index.js +3 -3
  7. package/dist/BriefCard/index.js +1 -1
  8. package/dist/CharacterPicker/index.js +2 -2
  9. package/dist/ChatDay/index.js +1 -1
  10. package/dist/{ChatDay-E3FF5HWF.css → ChatDay-CTX2VI6P.css} +2 -0
  11. package/dist/ChatThread/index.js +1 -1
  12. package/dist/Combobox/index.js +2 -2
  13. package/dist/CommandPalette/index.js +4 -4
  14. package/dist/CommentThread/index.js +6 -6
  15. package/dist/Composer/index.js +2 -2
  16. package/dist/ContrastBadge/index.js +2 -2
  17. package/dist/ContrastHelp/index.js +3 -3
  18. package/dist/DataGrid/DataGrid.d.ts +127 -41
  19. package/dist/DataGrid/index.d.ts +1 -1
  20. package/dist/DataGrid/index.js +7 -5
  21. package/dist/DataGrid/parts.d.ts +163 -0
  22. package/dist/{DataGrid-SAHEL4SN.css → DataGrid-ERDIPEWV.css} +205 -16
  23. package/dist/DataTable/index.js +4 -4
  24. package/dist/DataView/index.js +7 -7
  25. package/dist/DatasetSource/index.js +1 -1
  26. package/dist/DeepWorkCard/index.js +1 -1
  27. package/dist/DocTabsEditor/index.js +2 -2
  28. package/dist/EditingStatus/index.js +2 -2
  29. package/dist/EntityList/index.js +1 -1
  30. package/dist/InlineEditor/index.js +3 -3
  31. package/dist/KeyValueRows/index.js +3 -3
  32. package/dist/ListInput/index.js +4 -4
  33. package/dist/LogoSlot/index.js +3 -3
  34. package/dist/OpenInAppCard/index.js +1 -1
  35. package/dist/OrgTable/OrgTable.d.ts +5 -20
  36. package/dist/OrgTable/index.js +10 -3
  37. package/dist/{OrgTable-XYHEFI5X.css → OrgTable-5NXRECVP.css} +29 -9
  38. package/dist/PrincipalPicker/index.js +3 -3
  39. package/dist/ProposalCard/index.js +3 -3
  40. package/dist/RailList/index.js +4 -3
  41. package/dist/RefusalCard/index.js +1 -1
  42. package/dist/RelatedRow/index.js +3 -2
  43. package/dist/ResultTableCard/index.js +1 -1
  44. package/dist/RichEditor/index.js +1 -1
  45. package/dist/SetupWizard/index.js +2 -2
  46. package/dist/ShareDialog/index.js +3 -3
  47. package/dist/SheetColumnEditor/index.js +5 -5
  48. package/dist/SheetGrid/index.js +3 -3
  49. package/dist/StatusCard/index.js +1 -1
  50. package/dist/Switcher/index.js +4 -4
  51. package/dist/TableCells/TableCells.d.ts +10 -2
  52. package/dist/TableCells/index.js +4 -3
  53. package/dist/Text/index.js +2 -1
  54. package/dist/ThreadSummary/index.js +1 -1
  55. package/dist/TimeRangePicker/index.js +4 -4
  56. package/dist/TimeWindowPicker/index.js +4 -4
  57. package/dist/TreeGrid/TreeGrid.d.ts +143 -12
  58. package/dist/TreeGrid/index.d.ts +1 -1
  59. package/dist/TreeGrid/index.js +15 -2
  60. package/dist/{TreeGrid-H3GHMKZX.css → TreeGrid-XZCH5WCC.css} +232 -2
  61. package/dist/ValueField/index.js +3 -3
  62. package/dist/{chunk-G44KKOMB.js → chunk-2LLMUJFB.js} +1 -1
  63. package/dist/{chunk-ONHYFU7D.js → chunk-AGJBHLPE.js} +1 -1
  64. package/dist/{chunk-BK4KUIAZ.js → chunk-AP6JSZGT.js} +12 -4
  65. package/dist/chunk-FL5DTFF3.js +557 -0
  66. package/dist/{chunk-L72GPZ56.js → chunk-G6QKJGQQ.js} +1 -1
  67. package/dist/{chunk-CL3FWLDO.js → chunk-HI47TXSW.js} +1 -1
  68. package/dist/{chunk-M6EVTMTK.js → chunk-HYVYYODN.js} +1 -1
  69. package/dist/{chunk-XQWWA2LG.js → chunk-IQO6YDEM.js} +19 -51
  70. package/dist/{chunk-HTCNTCBE.js → chunk-KMMRKMBQ.js} +1 -1
  71. package/dist/chunk-LIRXQOTR.js +892 -0
  72. package/dist/{chunk-CQIODINH.js → chunk-M2DHVN6T.js} +1 -1
  73. package/dist/{chunk-EMXUREKE.js → chunk-MKTHLT4E.js} +1 -1
  74. package/dist/{chunk-PF6X74C5.js → chunk-NHQ7O4DG.js} +3 -3
  75. package/dist/{chunk-DBH7ORCH.js → chunk-PCXMJZTE.js} +1 -1
  76. package/dist/{chunk-J3QFTG4B.js → chunk-PXYDEDNN.js} +1 -1
  77. package/dist/{chunk-PMO6W5NE.js → chunk-SBVTOIFP.js} +2 -2
  78. package/dist/{chunk-3NCIQO2P.js → chunk-U5Y335HH.js} +8 -4
  79. package/dist/{chunk-XRKBPNX4.js → chunk-V3QWPHY4.js} +1 -1
  80. package/dist/chunk-WSIJDWUG.js +10 -0
  81. package/dist/{chunk-O5CEG7TQ.js → chunk-XLMURU75.js} +1 -6
  82. package/dist/generated/index.js +90 -90
  83. package/dist/index.js +90 -90
  84. package/dist/styles.css +472 -31
  85. package/dist/utils/titleIfCut.d.ts +18 -0
  86. package/package.json +3 -3
  87. package/dist/chunk-CTQZK5J3.js +0 -8
  88. package/dist/chunk-ERESJG6C.js +0 -353
  89. package/dist/chunk-Z346ESBB.js +0 -591
  90. package/dist/{Editor-YHHCK5SJ.js → Editor-XRI2NOO5.js} +2 -2
  91. package/dist/{chunk-JZADK2FT.js → chunk-3JE6YIG5.js} +2 -2
  92. package/dist/{chunk-5KJOG5YP.js → chunk-6IAW2ZIE.js} +2 -2
  93. package/dist/{chunk-XLVWSNW3.js → chunk-CQAR3F33.js} +1 -1
  94. package/dist/{chunk-AC255TMQ.js → chunk-CRRW4UGJ.js} +1 -1
  95. package/dist/{chunk-IA3NL54W.js → chunk-CTHZHMVG.js} +1 -1
  96. package/dist/{chunk-MTKHMGJH.js → chunk-HR5O6PSR.js} +1 -1
  97. package/dist/{chunk-OU6ZSWEJ.js → chunk-I2GJLUU3.js} +1 -1
  98. package/dist/{chunk-7L6JJ7VJ.js → chunk-K2GVWTHA.js} +1 -1
  99. package/dist/{chunk-RSI6EJSH.js → chunk-LNXL22Y7.js} +1 -1
  100. package/dist/{chunk-NGRSGJM3.js → chunk-MFZBLJYF.js} +1 -1
  101. package/dist/{chunk-OAKECTYH.js → chunk-NIZRR2NN.js} +1 -1
  102. package/dist/{chunk-3Z2BSKS5.js → chunk-NRMF2PKX.js} +1 -1
  103. package/dist/{chunk-DK7CXQFY.js → chunk-QCCWXOKK.js} +1 -1
  104. package/dist/{chunk-LNQSNXGJ.js → chunk-S4JRQJEP.js} +1 -1
  105. package/dist/{chunk-HU5PAZMU.js → chunk-TXQ6FZJL.js} +1 -1
  106. package/dist/{chunk-GA773IOZ.js → chunk-V6CVW6PF.js} +1 -1
  107. package/dist/{chunk-EW4ULFHK.js → chunk-WTJU7MAG.js} +1 -1
@@ -1,14 +1,13 @@
1
- import { TreeGrid } from './chunk-ERESJG6C.js';
1
+ import { TreeGrid } from './chunk-FL5DTFF3.js';
2
2
  import { createTreeModel, treeParent } from './chunk-MY374UUD.js';
3
3
  import { OrgLabel } from './chunk-44GFQ4O3.js';
4
- import { Checkbox } from './chunk-M6G7XLLP.js';
5
4
  import { AddPill } from './chunk-DVRECWCB.js';
6
5
  import { IconButton } from './chunk-WDLAAZFZ.js';
7
6
  import { cx } from './chunk-ODEQTPFM.js';
8
- import './OrgTable-XYHEFI5X.css';
7
+ import './OrgTable-5NXRECVP.css';
9
8
  import { useMemo, useRef, useImperativeHandle, useCallback } from 'react';
10
9
  import { ChevronDownGlyph, ChevronUpGlyph } from '@crewlethq/icons/glyphs';
11
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
10
+ import { jsx, jsxs } from 'react/jsx-runtime';
12
11
 
13
12
  var LABELS = {
14
13
  expandAll: "Expand all",
@@ -16,11 +15,9 @@ var LABELS = {
16
15
  };
17
16
  function OrgTable({
18
17
  rows,
19
- renderCell,
20
18
  tone,
21
19
  controls = true,
22
20
  selection,
23
- cellHasControl,
24
21
  layout = "scroll",
25
22
  labels,
26
23
  ref,
@@ -28,8 +25,7 @@ function OrgTable({
28
25
  ...rest
29
26
  }) {
30
27
  const text = { ...LABELS, ...labels };
31
- const tree = useMemo(() => createTreeModel(rows), [rows]);
32
- const deep = useMemo(() => Math.max(0, ...tree.depth.values()) >= 3, [tree]);
28
+ const deep = useMemo(() => Math.max(0, ...createTreeModel(rows).depth.values()) >= 3, [rows]);
33
29
  const grid = useRef(null);
34
30
  useImperativeHandle(
35
31
  ref,
@@ -40,30 +36,21 @@ function OrgTable({
40
36
  }),
41
37
  []
42
38
  );
43
- const cell = useCallback(
44
- (id, column, context) => {
45
- if (column !== 1) return renderCell(id, column, context);
46
- const depth = tree.depth.get(id) ?? 0;
39
+ const indent = useCallback(
40
+ (id, context) => {
41
+ const depth = context.tree.depth.get(id) ?? 0;
47
42
  const open = context.expandable(id) && context.expanded(id);
48
- return /* @__PURE__ */ jsxs(Fragment, { children: [
49
- /* @__PURE__ */ jsx(
50
- OrgTableWire,
51
- {
52
- depth,
53
- tone: tone?.(id),
54
- trunk: depth > 0 || open,
55
- last: !open && lastUnderRoot(tree, id)
56
- }
57
- ),
58
- selection && /* @__PURE__ */ jsx(OrgTableSelect, { id, selection, context }),
59
- renderCell(id, column, context)
60
- ] });
43
+ return /* @__PURE__ */ jsx(
44
+ OrgTableWire,
45
+ {
46
+ depth,
47
+ tone: tone?.(id),
48
+ trunk: depth > 0 || open,
49
+ last: !open && lastUnderRoot(context.tree, id)
50
+ }
51
+ );
61
52
  },
62
- [tree, renderCell, tone, selection]
63
- );
64
- const hasControl = useCallback(
65
- (id, column, key) => column === 1 && selection !== void 0 && selection.checked(id) !== null || (cellHasControl?.(id, column, key) ?? false),
66
- [selection, cellHasControl]
53
+ [tone]
67
54
  );
68
55
  return /* @__PURE__ */ jsxs(
69
56
  "div",
@@ -109,8 +96,8 @@ function OrgTable({
109
96
  ref: grid,
110
97
  rows,
111
98
  layout,
112
- renderCell: cell,
113
- cellHasControl: hasControl,
99
+ renderIndent: indent,
100
+ selection,
114
101
  labels,
115
102
  className: "crewlet-org-table__grid"
116
103
  }
@@ -126,25 +113,6 @@ function lastUnderRoot(tree, id) {
126
113
  }
127
114
  return true;
128
115
  }
129
- function OrgTableSelect({
130
- id,
131
- selection,
132
- context
133
- }) {
134
- const checked = selection.checked(id);
135
- return /* @__PURE__ */ jsx("span", { className: "crewlet-org-table__select", children: checked !== null && /* @__PURE__ */ jsx(
136
- Checkbox,
137
- {
138
- hideLabel: true,
139
- label: selection.label(id),
140
- checked: checked === true,
141
- indeterminate: checked === "mixed",
142
- tabIndex: context.tabStop(id, 1) ? 0 : -1,
143
- onClick: () => context.opened(id, 1),
144
- onCheckedChange: (next) => selection.onCheckedChange(id, next)
145
- }
146
- ) });
147
- }
148
116
  function OrgTableWire({
149
117
  depth,
150
118
  tone,
@@ -1,4 +1,4 @@
1
- import { ContrastLevelTag } from './chunk-EW4ULFHK.js';
1
+ import { ContrastLevelTag } from './chunk-WTJU7MAG.js';
2
2
  import { Popover } from './chunk-LCAKSEMB.js';
3
3
  import { IconButton } from './chunk-WDLAAZFZ.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';