@crewlethq/ui 0.38.0 → 0.40.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 (157) hide show
  1. package/README.md +79 -3
  2. package/dist/AgentHandoffPanel/index.js +3 -3
  3. package/dist/AppShell/AppShell.d.ts +13 -2
  4. package/dist/AppShell/index.js +1 -1
  5. package/dist/{AppShell-NDU4XMGF.css → AppShell-NPSWZ3XW.css} +45 -4
  6. package/dist/ArtifactBar/index.js +6 -5
  7. package/dist/{ArtifactBar-FWPBBKQ5.css → ArtifactBar-6PGWGKN2.css} +13 -1
  8. package/dist/ArtifactCard/index.js +2 -2
  9. package/dist/AuthLayout/index.js +2 -2
  10. package/dist/AvatarPicker/index.js +10 -6
  11. package/dist/Card/Card.d.ts +14 -2
  12. package/dist/Card/index.js +1 -1
  13. package/dist/{Card-G2ZGT5Z6.css → Card-JR2UPQH7.css} +20 -0
  14. package/dist/CatalogTile/CatalogTile.d.ts +47 -0
  15. package/dist/CatalogTile/index.d.ts +3 -0
  16. package/dist/CatalogTile/index.js +3 -0
  17. package/dist/CatalogTile-XL4XLFUH.css +135 -0
  18. package/dist/CharacterPicker/index.js +2 -2
  19. package/dist/Charts/Histogram.d.ts +71 -0
  20. package/dist/Charts/index.d.ts +2 -0
  21. package/dist/Charts/index.js +1 -1
  22. package/dist/{Charts-MBJG72BS.css → Charts-TZ744HT6.css} +118 -0
  23. package/dist/CodeBlock/index.js +1 -1
  24. package/dist/{CodeBlock-GYNJ2HI6.css → CodeBlock-N5ETJF24.css} +13 -0
  25. package/dist/CommandPalette/index.js +3 -3
  26. package/dist/CommentThread/index.js +3 -3
  27. package/dist/Composer/index.js +2 -2
  28. package/dist/DataGrid/DataGrid.d.ts +267 -0
  29. package/dist/DataGrid/index.d.ts +3 -0
  30. package/dist/DataGrid/index.js +7 -0
  31. package/dist/DataGrid-AQKPJD7W.css +482 -0
  32. package/dist/DataTable/index.js +2 -2
  33. package/dist/DataView/index.js +4 -4
  34. package/dist/DatasetSource/DatasetSource.d.ts +7 -1
  35. package/dist/DatasetSource/index.js +1 -1
  36. package/dist/HuePicker/index.js +11 -4
  37. package/dist/LayersList/index.js +2 -2
  38. package/dist/LinkInterstitial/index.js +2 -2
  39. package/dist/List/List.d.ts +8 -0
  40. package/dist/List/index.js +1 -1
  41. package/dist/{List-MYJIV6MP.css → List-YHLIZFK4.css} +46 -0
  42. package/dist/ListInput/ListInput.d.ts +9 -1
  43. package/dist/ListInput/index.js +2 -2
  44. package/dist/LockedLabel/LockedLabel.d.ts +34 -0
  45. package/dist/LockedLabel/index.d.ts +3 -0
  46. package/dist/LockedLabel/index.js +3 -0
  47. package/dist/LockedLabel-VQEGEB7G.css +16 -0
  48. package/dist/MarkdownEditor/index.js +8 -5
  49. package/dist/MergeConflicts/index.js +11 -5
  50. package/dist/Modal/index.js +1 -1
  51. package/dist/{Modal-7MWRCWAI.css → Modal-TOEWHDCQ.css} +5 -0
  52. package/dist/ObjectHeader/index.js +1 -1
  53. package/dist/{ObjectHeader-D7GU7QNI.css → ObjectHeader-ZOS22FKX.css} +7 -8
  54. package/dist/PageNote/PageNote.d.ts +14 -0
  55. package/dist/PageNote/index.d.ts +3 -0
  56. package/dist/PageNote/index.js +2 -0
  57. package/dist/PageNote-RHLXH3ML.css +12 -0
  58. package/dist/PropertyList/PropertyList.d.ts +88 -0
  59. package/dist/PropertyList/index.d.ts +3 -0
  60. package/dist/PropertyList/index.js +7 -0
  61. package/dist/PropertyList-SCYM66LL.css +96 -0
  62. package/dist/RelatedRow/RelatedRow.d.ts +27 -0
  63. package/dist/RelatedRow/index.d.ts +3 -0
  64. package/dist/RelatedRow/index.js +9 -0
  65. package/dist/RelatedRow-2FVS6QQA.css +6 -0
  66. package/dist/RichEditor/index.js +1 -1
  67. package/dist/SectionFrame/SectionFrame.d.ts +76 -0
  68. package/dist/SectionFrame/index.d.ts +3 -0
  69. package/dist/SectionFrame/index.js +7 -0
  70. package/dist/SectionFrame-M62UUVFQ.css +164 -0
  71. package/dist/SegmentedControl/index.js +11 -4
  72. package/dist/SettingsTable/SettingsTable.d.ts +66 -0
  73. package/dist/SettingsTable/index.d.ts +3 -0
  74. package/dist/SettingsTable/index.js +3 -0
  75. package/dist/SettingsTable-6DUFAFXG.css +160 -0
  76. package/dist/ShareDialog/index.js +2 -2
  77. package/dist/SheetColumnEditor/index.js +7 -6
  78. package/dist/SheetGrid/index.js +3 -3
  79. package/dist/SidebarNav/SidebarNav.d.ts +35 -2
  80. package/dist/SidebarNav/index.js +2 -1
  81. package/dist/{SidebarNav-7SGUZYKK.css → SidebarNav-YI74SPDC.css} +10 -0
  82. package/dist/StatCard/index.js +1 -1
  83. package/dist/{StatCard-4T7TMWMN.css → StatCard-HAA3F5GX.css} +8 -3
  84. package/dist/StatGroup/index.js +1 -1
  85. package/dist/{StatGroup-DOFHX5QJ.css → StatGroup-ZMW7VQWP.css} +27 -0
  86. package/dist/Switcher/index.js +2 -2
  87. package/dist/Tabs/Tabs.d.ts +55 -1
  88. package/dist/Tabs/fold.d.ts +54 -0
  89. package/dist/Tabs/index.d.ts +1 -1
  90. package/dist/Tabs/index.js +9 -2
  91. package/dist/Tabs/roving.d.ts +3 -3
  92. package/dist/{Tabs-WIF7457H.css → Tabs-S7F4RWAN.css} +77 -0
  93. package/dist/TagsInput/index.js +1 -1
  94. package/dist/ThemeGallery/index.js +2 -2
  95. package/dist/ThemeSwitcher/index.js +12 -5
  96. package/dist/TileGrid/TileGrid.d.ts +33 -0
  97. package/dist/TileGrid/index.d.ts +3 -0
  98. package/dist/TileGrid/index.js +2 -0
  99. package/dist/TileGrid-I6LNYD2H.css +52 -0
  100. package/dist/VersionCompare/index.js +12 -5
  101. package/dist/{chunk-B5J23C73.js → chunk-2PEXZ7L4.js} +1 -1
  102. package/dist/{chunk-S27UBCVX.js → chunk-2VOHUGUA.js} +2 -2
  103. package/dist/{chunk-XBURIXHO.js → chunk-3TXY3PJZ.js} +1 -1
  104. package/dist/{chunk-2QZ2VPHR.js → chunk-4OK4DX3V.js} +2 -2
  105. package/dist/chunk-4RKTZSEW.js +64 -0
  106. package/dist/{chunk-ECGGQX2H.js → chunk-A44YHLCQ.js} +2 -2
  107. package/dist/{chunk-F4LPQA4E.js → chunk-BA32AVKS.js} +1 -1
  108. package/dist/chunk-CV4NES3P.js +9 -0
  109. package/dist/{chunk-PPHTIKZO.js → chunk-E4BOVKNJ.js} +1 -1
  110. package/dist/{chunk-W7PAIVAP.js → chunk-E7QLG3PG.js} +30 -9
  111. package/dist/{chunk-RKKO7QHH.js → chunk-EGMQURBR.js} +5 -4
  112. package/dist/{chunk-GMW4ZHST.js → chunk-EX22Q5SH.js} +2 -2
  113. package/dist/{chunk-A23KDROH.js → chunk-FXBGEANQ.js} +1 -1
  114. package/dist/{chunk-4L2BWSHR.js → chunk-GFYQKMQZ.js} +2 -2
  115. package/dist/{chunk-HG5VF3TZ.js → chunk-HMVQQEHW.js} +91 -2
  116. package/dist/{chunk-IPWU6ERC.js → chunk-HQJ24WPM.js} +4 -2
  117. package/dist/{chunk-SVGARBDY.js → chunk-IAGYPTEJ.js} +2 -2
  118. package/dist/{chunk-ZK3VYY7L.js → chunk-INHXF2CL.js} +24 -11
  119. package/dist/chunk-INVSUFJK.js +71 -0
  120. package/dist/{chunk-6NNY5WBF.js → chunk-JKAGN4V4.js} +1 -1
  121. package/dist/{chunk-4LRAJXHL.js → chunk-JSWOXRRE.js} +1 -1
  122. package/dist/{chunk-DYB66CNM.js → chunk-KKNHMXTE.js} +6 -3
  123. package/dist/{chunk-UWRBD2YO.js → chunk-KNHUBHFX.js} +1 -1
  124. package/dist/{chunk-ZMDYQ2HH.js → chunk-KWWP3D7M.js} +1 -1
  125. package/dist/{chunk-46RL3E54.js → chunk-M6NQ4XGK.js} +1 -1
  126. package/dist/{chunk-PT6WKXKW.js → chunk-MMPKN7WV.js} +1 -1
  127. package/dist/{chunk-NRBAXRWE.js → chunk-N3TFYBN3.js} +1 -1
  128. package/dist/chunk-NNTO3TNC.js +9 -0
  129. package/dist/{chunk-DS2C73RJ.js → chunk-NZWX27J7.js} +2 -2
  130. package/dist/{chunk-VGE3G3T4.js → chunk-ODOJJGXH.js} +1 -1
  131. package/dist/chunk-OHGH7O6T.js +19 -0
  132. package/dist/{chunk-4ISUIS6F.js → chunk-OOC7Q67K.js} +1 -1
  133. package/dist/{chunk-BT5H2THK.js → chunk-OUD75UB2.js} +1 -1
  134. package/dist/chunk-PCT47E7O.js +48 -0
  135. package/dist/{chunk-X3UYTAOG.js → chunk-PFZOFAQ6.js} +1 -1
  136. package/dist/{chunk-YQG4PZGC.js → chunk-QRKT4XTT.js} +2 -2
  137. package/dist/{chunk-BJI3RFXG.js → chunk-S4DREXGM.js} +1 -1
  138. package/dist/{chunk-GDDE4UM7.js → chunk-SEC2GR2V.js} +1 -1
  139. package/dist/{chunk-YEVG2X5R.js → chunk-SNQRGH4A.js} +1 -1
  140. package/dist/chunk-T6MXORP5.js +116 -0
  141. package/dist/{chunk-OTCXRJ7D.js → chunk-U2XAJONO.js} +1 -1
  142. package/dist/{chunk-3ZUINC7C.js → chunk-WYYCPV46.js} +6 -1
  143. package/dist/chunk-X4IXXLWM.js +306 -0
  144. package/dist/{chunk-PAQXOP2M.js → chunk-XGBUUQDU.js} +2 -2
  145. package/dist/chunk-XIDD7PJO.js +416 -0
  146. package/dist/{chunk-XO7PUL4F.js → chunk-YPTTSJPM.js} +1 -1
  147. package/dist/chunk-ZUTUI27P.js +21 -0
  148. package/dist/generated/index.d.ts +9 -0
  149. package/dist/generated/index.js +83 -74
  150. package/dist/index.js +83 -74
  151. package/dist/styles.css +1627 -104
  152. package/package.json +3 -3
  153. package/dist/chunk-7SDUKCNW.js +0 -141
  154. package/dist/{Editor-QV4JP242.js → Editor-IRDQ3JDZ.js} +1 -1
  155. package/dist/{chunk-JZPK4IXR.js → chunk-3PR65I3H.js} +2 -2
  156. package/dist/{chunk-ETVEGR2Y.js → chunk-ISA2O2BK.js} +1 -1
  157. /package/dist/{chunk-4QQ3MND5.js → chunk-S3QTFUJX.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewlethq/ui",
3
- "version": "0.38.0",
3
+ "version": "0.40.0",
4
4
  "description": "Crewlet shared React components built on @crewlethq/tokens and @crewlethq/icons.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,8 +42,8 @@
42
42
  "clean": "rm -rf dist src/generated"
43
43
  },
44
44
  "dependencies": {
45
- "@crewlethq/icons": "0.38.0",
46
- "@crewlethq/tokens": "0.38.0",
45
+ "@crewlethq/icons": "0.40.0",
46
+ "@crewlethq/tokens": "0.40.0",
47
47
  "prosemirror-commands": "1.7.2",
48
48
  "prosemirror-gapcursor": "1.4.1",
49
49
  "prosemirror-history": "1.5.1",
@@ -1,141 +0,0 @@
1
- import { useRoving, tabStop } from './chunk-RKKO7QHH.js';
2
- import { Count } from './chunk-BHHIIK3M.js';
3
- import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
4
- import { VisuallyHidden } from './chunk-BZFWDIV6.js';
5
- import { cx } from './chunk-ODEQTPFM.js';
6
- import './HitArea-QUOS6ZDJ.css';
7
- import './Tabs-WIF7457H.css';
8
- import React, { useRef, useImperativeHandle, useLayoutEffect } from 'react';
9
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
10
-
11
- function tabId(panelId, value) {
12
- return `${panelId}-tab-${value}`;
13
- }
14
- function reveal(nav) {
15
- const active = nav.querySelector(".crewlet-tabs__tab.is-active");
16
- if (!active) return;
17
- const row = nav.getBoundingClientRect();
18
- const tab = active.getBoundingClientRect();
19
- if (tab.left < row.left) nav.scrollLeft -= row.left - tab.left;
20
- else if (tab.right > row.right) nav.scrollLeft += tab.right - row.right;
21
- }
22
- function Tabs({
23
- items,
24
- variant = "pill",
25
- size = "md",
26
- ariaLabel,
27
- className = "",
28
- value,
29
- onValueChange,
30
- panelId,
31
- renderItem,
32
- trailing,
33
- ref
34
- }) {
35
- const navRef = useRef(null);
36
- useImperativeHandle(ref, () => navRef.current, []);
37
- const { buttons, onKeyDown } = useRoving(items.length, null);
38
- useLayoutEffect(() => {
39
- if (variant !== "underline") return;
40
- const nav = navRef.current;
41
- if (!nav) return;
42
- const update = () => {
43
- const active = nav.querySelector(".crewlet-tabs__tab.is-active");
44
- if (!active) {
45
- nav.style.setProperty("--crewlet-tabs-slider-width", "0px");
46
- return;
47
- }
48
- const navRect = nav.getBoundingClientRect();
49
- const activeRect = active.getBoundingClientRect();
50
- const left = activeRect.left - navRect.left + nav.scrollLeft;
51
- nav.style.setProperty("--crewlet-tabs-slider-left", `${left}px`);
52
- nav.style.setProperty("--crewlet-tabs-slider-width", `${activeRect.width}px`);
53
- };
54
- update();
55
- reveal(nav);
56
- const mutation = new MutationObserver(update);
57
- const resize = typeof ResizeObserver === "function" ? new ResizeObserver(update) : null;
58
- nav.querySelectorAll(".crewlet-tabs__tab").forEach((tab) => {
59
- mutation.observe(tab, { attributes: true, attributeFilter: ["class"] });
60
- resize?.observe(tab);
61
- });
62
- resize?.observe(nav);
63
- return () => {
64
- mutation.disconnect();
65
- resize?.disconnect();
66
- };
67
- }, [variant, value, items]);
68
- const rootClass = cx("crewlet-tabs", `crewlet-tabs--${variant}`, `crewlet-tabs--${size}`, className);
69
- const selected = tabStop(
70
- items,
71
- Math.max(
72
- 0,
73
- items.findIndex((item) => item.value === value)
74
- )
75
- );
76
- const rows = items.map((item, index) => {
77
- const isActive = value !== void 0 && value === item.value;
78
- const tabClassName = cx(
79
- "crewlet-tabs__tab",
80
- HIT_AREA_CLASS,
81
- isActive && "is-active",
82
- item.disabled && "is-disabled"
83
- );
84
- const children = /* @__PURE__ */ jsxs(Fragment, { children: [
85
- item.icon ? /* @__PURE__ */ jsx("span", { className: "crewlet-tabs__icon", children: item.icon }) : null,
86
- /* @__PURE__ */ jsx("span", { className: "crewlet-tabs__label", children: item.label }),
87
- item.marker ? item.marker.tone === "danger" ? /* @__PURE__ */ jsxs("span", { className: "crewlet-tabs__marker crewlet-tabs__marker--danger", children: [
88
- /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: item.marker.count }),
89
- /* @__PURE__ */ jsx(VisuallyHidden, { children: item.marker.label })
90
- ] }) : /* @__PURE__ */ jsx("span", { className: `crewlet-tabs__marker crewlet-tabs__marker--${item.marker.tone}`, children: /* @__PURE__ */ jsx(VisuallyHidden, { children: item.marker.label }) }) : item.count != null && item.count !== "" ? /* @__PURE__ */ jsx(Count, { value: item.count }) : null
91
- ] });
92
- const onSelect = () => {
93
- if (item.disabled) return;
94
- onValueChange?.(item.value);
95
- };
96
- if (renderItem) {
97
- return /* @__PURE__ */ jsx(React.Fragment, { children: renderItem({ item, className: tabClassName, isActive, onSelect, children }) }, item.value);
98
- }
99
- return /* @__PURE__ */ jsx(
100
- "button",
101
- {
102
- ref: (el) => {
103
- buttons.current[index] = el;
104
- },
105
- type: "button",
106
- role: "tab",
107
- id: panelId ? tabId(panelId, item.value) : void 0,
108
- "aria-selected": isActive,
109
- "aria-controls": panelId,
110
- tabIndex: index === selected ? 0 : -1,
111
- disabled: item.disabled,
112
- className: tabClassName,
113
- onClick: onSelect,
114
- onKeyDown: (event) => onKeyDown(event, false),
115
- children
116
- },
117
- item.value
118
- );
119
- });
120
- if (renderItem) {
121
- return /* @__PURE__ */ jsxs("nav", { ref: navRef, className: rootClass, "aria-label": ariaLabel, children: [
122
- rows,
123
- trailing
124
- ] });
125
- }
126
- return /* @__PURE__ */ jsx("div", { ref: navRef, className: rootClass, "aria-label": ariaLabel, role: "tablist", children: rows });
127
- }
128
- function TabPanel({ id, value, children, className }) {
129
- return /* @__PURE__ */ jsx(
130
- "div",
131
- {
132
- role: "tabpanel",
133
- id,
134
- "aria-labelledby": tabId(id, value),
135
- className: cx("crewlet-tab-panel", className),
136
- children
137
- }
138
- );
139
- }
140
-
141
- export { TabPanel, Tabs, tabId };
@@ -1,5 +1,5 @@
1
- import { schema, readMarkdown, writeMarkdown } from './chunk-QH6VYJ3X.js';
2
1
  import { richEditorLabels } from './chunk-CSQTDGTS.js';
2
+ import { schema, readMarkdown, writeMarkdown } from './chunk-QH6VYJ3X.js';
3
3
  import { safeHref, MARKDOWN_CALLOUT_TONES } from './chunk-BAKPMH3S.js';
4
4
  import { Toolbar } from './chunk-NR4CPM4T.js';
5
5
  import { FormField, Input } from './chunk-TYONQSOK.js';
@@ -1,12 +1,12 @@
1
1
  import { TagGroup } from './chunk-O2EGEONV.js';
2
+ import { Tag } from './chunk-KYIAFNU7.js';
2
3
  import { CursorFlag } from './chunk-3BYIWOTV.js';
3
4
  import { presenceHueClass } from './chunk-I6POAB4V.js';
4
- import { Tag } from './chunk-KYIAFNU7.js';
5
- import { StatusDot } from './chunk-WIATRXEJ.js';
6
5
  import { ChangeMark } from './chunk-66X5WDKE.js';
7
6
  import { isEmptyValue, displayText, ratingMax, findPerson, findOption, statusTone, editText, textMax, sheetLabels, normalizeValue, sameValue, spokenText, drawnColumns, fitSamples, fittedWidth, columnWidth, SHEET_COLUMN_BOUNDS, sortRows, SHEET_ROW_HEIGHT, cellKey, columnOffsets, SHEET_ROW_NUMBER_WIDTH, rangeOf, presenceByCell, presenceByRow, presenceByColumn, scrollToRow, planClear, visibleRows, cellDescription, nextSort, rowName, inRange, hasPrevious, flagText, toTSV, planPaste, parseTSV, isMod, moveFrom, isTypingKey, editorSide, optionHue, parseText, liveOptions, checkValue } from './chunk-LFSIKGRQ.js';
8
7
  import { presenceLabels } from './chunk-Z7JYG5TF.js';
9
8
  import { Popover } from './chunk-KHJIEPZV.js';
9
+ import { StatusDot } from './chunk-WIATRXEJ.js';
10
10
  import { Tooltip } from './chunk-I33UIUZD.js';
11
11
  import { Avatar } from './chunk-PZKHBB7D.js';
12
12
  import { Menu } from './chunk-D6FEHY5G.js';
@@ -1,5 +1,5 @@
1
- import { Kbd } from './chunk-SMBKXWML.js';
2
1
  import { Textarea } from './chunk-TYONQSOK.js';
2
+ import { Kbd } from './chunk-SMBKXWML.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Composer-TXULCPPV.css';
5
5
  import { forwardRef } from 'react';
File without changes