@crewlethq/ui 0.39.0 → 0.40.1
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/README.md +47 -1
- package/dist/AppShell/AppShell.d.ts +13 -2
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-NDU4XMGF.css → AppShell-VE2MAV42.css} +71 -7
- package/dist/ArtifactBar/index.js +6 -5
- package/dist/AvatarPicker/index.js +10 -6
- package/dist/CatalogTile/index.js +1 -1
- package/dist/{CatalogTile-TGR2ZZVQ.css → CatalogTile-XL4XLFUH.css} +8 -4
- package/dist/CharacterPicker/index.js +2 -2
- package/dist/Charts/Histogram.d.ts +71 -0
- package/dist/Charts/index.d.ts +2 -0
- package/dist/Charts/index.js +1 -1
- package/dist/{Charts-MBJG72BS.css → Charts-TZ744HT6.css} +118 -0
- package/dist/DataGrid/DataGrid.d.ts +267 -0
- package/dist/DataGrid/index.d.ts +3 -0
- package/dist/DataGrid/index.js +7 -0
- package/dist/DataGrid-AQKPJD7W.css +482 -0
- package/dist/HuePicker/index.js +11 -4
- package/dist/LayersList/index.js +2 -2
- package/dist/LockedLabel/LockedLabel.d.ts +34 -0
- package/dist/LockedLabel/index.d.ts +3 -0
- package/dist/LockedLabel/index.js +3 -0
- package/dist/LockedLabel-VQEGEB7G.css +16 -0
- package/dist/MarkdownEditor/index.js +8 -5
- package/dist/MergeConflicts/index.js +11 -5
- package/dist/PageNote/PageNote.d.ts +14 -0
- package/dist/PageNote/index.d.ts +3 -0
- package/dist/PageNote/index.js +2 -0
- package/dist/PageNote-RHLXH3ML.css +12 -0
- package/dist/PropertyList/PropertyList.d.ts +88 -0
- package/dist/PropertyList/index.d.ts +3 -0
- package/dist/PropertyList/index.js +7 -0
- package/dist/PropertyList-SCYM66LL.css +96 -0
- package/dist/RelatedRow/RelatedRow.d.ts +27 -0
- package/dist/RelatedRow/index.d.ts +3 -0
- package/dist/RelatedRow/index.js +9 -0
- package/dist/RelatedRow-2FVS6QQA.css +6 -0
- package/dist/SectionFrame/SectionFrame.d.ts +76 -0
- package/dist/SectionFrame/index.d.ts +3 -0
- package/dist/SectionFrame/index.js +7 -0
- package/dist/SectionFrame-M62UUVFQ.css +164 -0
- package/dist/SegmentedControl/index.js +11 -4
- package/dist/SheetColumnEditor/index.js +6 -5
- package/dist/SheetGrid/index.js +2 -2
- package/dist/SidebarNav/SidebarNav.d.ts +35 -2
- package/dist/SidebarNav/index.js +2 -1
- package/dist/{SidebarNav-7SGUZYKK.css → SidebarNav-YI74SPDC.css} +10 -0
- package/dist/Tabs/Tabs.d.ts +55 -1
- package/dist/Tabs/fold.d.ts +54 -0
- package/dist/Tabs/index.d.ts +1 -1
- package/dist/Tabs/index.js +9 -2
- package/dist/Tabs/roving.d.ts +3 -3
- package/dist/{Tabs-WIF7457H.css → Tabs-S7F4RWAN.css} +77 -0
- package/dist/TagsInput/index.js +1 -1
- package/dist/ThemeGallery/index.js +2 -2
- package/dist/ThemeSwitcher/index.js +12 -5
- package/dist/VersionCompare/index.js +12 -5
- package/dist/{chunk-B5J23C73.js → chunk-2PEXZ7L4.js} +1 -1
- package/dist/{chunk-TZYFTC4M.js → chunk-2VOHUGUA.js} +1 -1
- package/dist/{chunk-2QZ2VPHR.js → chunk-4OK4DX3V.js} +2 -2
- package/dist/{chunk-ECGGQX2H.js → chunk-A44YHLCQ.js} +2 -2
- package/dist/{chunk-F4LPQA4E.js → chunk-BA32AVKS.js} +1 -1
- package/dist/chunk-CV4NES3P.js +9 -0
- package/dist/{chunk-PPHTIKZO.js → chunk-E4BOVKNJ.js} +1 -1
- package/dist/{chunk-W7PAIVAP.js → chunk-E7QLG3PG.js} +30 -9
- package/dist/{chunk-RKKO7QHH.js → chunk-EGMQURBR.js} +5 -4
- package/dist/{chunk-GMW4ZHST.js → chunk-EX22Q5SH.js} +2 -2
- package/dist/{chunk-F3WZ5AKM.js → chunk-GFYQKMQZ.js} +1 -1
- package/dist/{chunk-DYB66CNM.js → chunk-GR4YM7HT.js} +6 -3
- package/dist/{chunk-HG5VF3TZ.js → chunk-HMVQQEHW.js} +91 -2
- package/dist/chunk-INVSUFJK.js +71 -0
- package/dist/{chunk-4LRAJXHL.js → chunk-JSWOXRRE.js} +1 -1
- package/dist/{chunk-ZMDYQ2HH.js → chunk-KWWP3D7M.js} +1 -1
- package/dist/{chunk-46RL3E54.js → chunk-M6NQ4XGK.js} +1 -1
- package/dist/chunk-OHGH7O6T.js +19 -0
- package/dist/{chunk-4ISUIS6F.js → chunk-OOC7Q67K.js} +1 -1
- package/dist/{chunk-XNXK5MA4.js → chunk-PCT47E7O.js} +1 -1
- package/dist/{chunk-YEVG2X5R.js → chunk-SNQRGH4A.js} +1 -1
- package/dist/chunk-T6MXORP5.js +116 -0
- package/dist/chunk-X4IXXLWM.js +306 -0
- package/dist/chunk-XIDD7PJO.js +416 -0
- package/dist/chunk-ZUTUI27P.js +21 -0
- package/dist/generated/index.d.ts +6 -0
- package/dist/generated/index.js +62 -56
- package/dist/index.js +62 -56
- package/dist/styles.css +1087 -20
- package/package.json +3 -3
- package/dist/chunk-7SDUKCNW.js +0 -141
- package/dist/{chunk-JZPK4IXR.js → chunk-DKNBGL26.js} +1 -1
- /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.
|
|
3
|
+
"version": "0.40.1",
|
|
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.
|
|
46
|
-
"@crewlethq/tokens": "0.
|
|
45
|
+
"@crewlethq/icons": "0.40.1",
|
|
46
|
+
"@crewlethq/tokens": "0.40.1",
|
|
47
47
|
"prosemirror-commands": "1.7.2",
|
|
48
48
|
"prosemirror-gapcursor": "1.4.1",
|
|
49
49
|
"prosemirror-history": "1.5.1",
|
package/dist/chunk-7SDUKCNW.js
DELETED
|
@@ -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 };
|
|
@@ -2,11 +2,11 @@ import { TagGroup } from './chunk-O2EGEONV.js';
|
|
|
2
2
|
import { CursorFlag } from './chunk-3BYIWOTV.js';
|
|
3
3
|
import { presenceHueClass } from './chunk-I6POAB4V.js';
|
|
4
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
|