@crewlethq/ui 0.39.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 (93) hide show
  1. package/README.md +43 -1
  2. package/dist/AppShell/AppShell.d.ts +13 -2
  3. package/dist/AppShell/index.js +1 -1
  4. package/dist/{AppShell-NDU4XMGF.css → AppShell-NPSWZ3XW.css} +45 -4
  5. package/dist/ArtifactBar/index.js +6 -5
  6. package/dist/AvatarPicker/index.js +10 -6
  7. package/dist/CatalogTile/index.js +1 -1
  8. package/dist/{CatalogTile-TGR2ZZVQ.css → CatalogTile-XL4XLFUH.css} +8 -4
  9. package/dist/CharacterPicker/index.js +2 -2
  10. package/dist/Charts/Histogram.d.ts +71 -0
  11. package/dist/Charts/index.d.ts +2 -0
  12. package/dist/Charts/index.js +1 -1
  13. package/dist/{Charts-MBJG72BS.css → Charts-TZ744HT6.css} +118 -0
  14. package/dist/DataGrid/DataGrid.d.ts +267 -0
  15. package/dist/DataGrid/index.d.ts +3 -0
  16. package/dist/DataGrid/index.js +7 -0
  17. package/dist/DataGrid-AQKPJD7W.css +482 -0
  18. package/dist/HuePicker/index.js +11 -4
  19. package/dist/LayersList/index.js +2 -2
  20. package/dist/LockedLabel/LockedLabel.d.ts +34 -0
  21. package/dist/LockedLabel/index.d.ts +3 -0
  22. package/dist/LockedLabel/index.js +3 -0
  23. package/dist/LockedLabel-VQEGEB7G.css +16 -0
  24. package/dist/MarkdownEditor/index.js +8 -5
  25. package/dist/MergeConflicts/index.js +11 -5
  26. package/dist/PageNote/PageNote.d.ts +14 -0
  27. package/dist/PageNote/index.d.ts +3 -0
  28. package/dist/PageNote/index.js +2 -0
  29. package/dist/PageNote-RHLXH3ML.css +12 -0
  30. package/dist/PropertyList/PropertyList.d.ts +88 -0
  31. package/dist/PropertyList/index.d.ts +3 -0
  32. package/dist/PropertyList/index.js +7 -0
  33. package/dist/PropertyList-SCYM66LL.css +96 -0
  34. package/dist/RelatedRow/RelatedRow.d.ts +27 -0
  35. package/dist/RelatedRow/index.d.ts +3 -0
  36. package/dist/RelatedRow/index.js +9 -0
  37. package/dist/RelatedRow-2FVS6QQA.css +6 -0
  38. package/dist/RichEditor/index.js +1 -1
  39. package/dist/SectionFrame/SectionFrame.d.ts +76 -0
  40. package/dist/SectionFrame/index.d.ts +3 -0
  41. package/dist/SectionFrame/index.js +7 -0
  42. package/dist/SectionFrame-M62UUVFQ.css +164 -0
  43. package/dist/SegmentedControl/index.js +11 -4
  44. package/dist/SheetColumnEditor/index.js +6 -5
  45. package/dist/SheetGrid/index.js +3 -3
  46. package/dist/SidebarNav/SidebarNav.d.ts +35 -2
  47. package/dist/SidebarNav/index.js +2 -1
  48. package/dist/{SidebarNav-7SGUZYKK.css → SidebarNav-YI74SPDC.css} +10 -0
  49. package/dist/Tabs/Tabs.d.ts +55 -1
  50. package/dist/Tabs/fold.d.ts +54 -0
  51. package/dist/Tabs/index.d.ts +1 -1
  52. package/dist/Tabs/index.js +9 -2
  53. package/dist/Tabs/roving.d.ts +3 -3
  54. package/dist/{Tabs-WIF7457H.css → Tabs-S7F4RWAN.css} +77 -0
  55. package/dist/TagsInput/index.js +1 -1
  56. package/dist/ThemeGallery/index.js +2 -2
  57. package/dist/ThemeSwitcher/index.js +12 -5
  58. package/dist/VersionCompare/index.js +12 -5
  59. package/dist/{chunk-B5J23C73.js → chunk-2PEXZ7L4.js} +1 -1
  60. package/dist/{chunk-TZYFTC4M.js → chunk-2VOHUGUA.js} +1 -1
  61. package/dist/{chunk-2QZ2VPHR.js → chunk-4OK4DX3V.js} +2 -2
  62. package/dist/{chunk-ECGGQX2H.js → chunk-A44YHLCQ.js} +2 -2
  63. package/dist/{chunk-F4LPQA4E.js → chunk-BA32AVKS.js} +1 -1
  64. package/dist/chunk-CV4NES3P.js +9 -0
  65. package/dist/{chunk-PPHTIKZO.js → chunk-E4BOVKNJ.js} +1 -1
  66. package/dist/{chunk-W7PAIVAP.js → chunk-E7QLG3PG.js} +30 -9
  67. package/dist/{chunk-RKKO7QHH.js → chunk-EGMQURBR.js} +5 -4
  68. package/dist/{chunk-GMW4ZHST.js → chunk-EX22Q5SH.js} +2 -2
  69. package/dist/{chunk-F3WZ5AKM.js → chunk-GFYQKMQZ.js} +1 -1
  70. package/dist/{chunk-HG5VF3TZ.js → chunk-HMVQQEHW.js} +91 -2
  71. package/dist/chunk-INVSUFJK.js +71 -0
  72. package/dist/{chunk-4LRAJXHL.js → chunk-JSWOXRRE.js} +1 -1
  73. package/dist/{chunk-DYB66CNM.js → chunk-KKNHMXTE.js} +6 -3
  74. package/dist/{chunk-ZMDYQ2HH.js → chunk-KWWP3D7M.js} +1 -1
  75. package/dist/{chunk-46RL3E54.js → chunk-M6NQ4XGK.js} +1 -1
  76. package/dist/chunk-OHGH7O6T.js +19 -0
  77. package/dist/{chunk-4ISUIS6F.js → chunk-OOC7Q67K.js} +1 -1
  78. package/dist/{chunk-XNXK5MA4.js → chunk-PCT47E7O.js} +1 -1
  79. package/dist/{chunk-X3UYTAOG.js → chunk-PFZOFAQ6.js} +1 -1
  80. package/dist/{chunk-YEVG2X5R.js → chunk-SNQRGH4A.js} +1 -1
  81. package/dist/chunk-T6MXORP5.js +116 -0
  82. package/dist/chunk-X4IXXLWM.js +306 -0
  83. package/dist/chunk-XIDD7PJO.js +416 -0
  84. package/dist/chunk-ZUTUI27P.js +21 -0
  85. package/dist/generated/index.d.ts +6 -0
  86. package/dist/generated/index.js +60 -54
  87. package/dist/index.js +60 -54
  88. package/dist/styles.css +1061 -17
  89. package/package.json +3 -3
  90. package/dist/chunk-7SDUKCNW.js +0 -141
  91. package/dist/{Editor-QV4JP242.js → Editor-IRDQ3JDZ.js} +1 -1
  92. package/dist/{chunk-JZPK4IXR.js → chunk-3PR65I3H.js} +2 -2
  93. /package/dist/{chunk-QRLIWCLX.js → chunk-S3QTFUJX.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewlethq/ui",
3
- "version": "0.39.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.39.0",
46
- "@crewlethq/tokens": "0.39.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';
File without changes