@dxos/react-ui-stack 0.8.4-main.c1de068 → 0.8.4-main.e098934
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/dist/lib/browser/{chunk-P3TQV4BA.mjs → chunk-3V2YUQK5.mjs} +346 -169
- package/dist/lib/browser/chunk-3V2YUQK5.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +5 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/playwright/index.mjs +23 -6
- package/dist/lib/browser/playwright/index.mjs.map +2 -2
- package/dist/lib/browser/testing/index.mjs +3 -3
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/{chunk-3WVEPAJ4.mjs → chunk-HE3BRF7A.mjs} +346 -169
- package/dist/lib/node-esm/chunk-HE3BRF7A.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +5 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/playwright/index.mjs +23 -6
- package/dist/lib/node-esm/playwright/index.mjs.map +2 -2
- package/dist/lib/node-esm/testing/index.mjs +3 -3
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/components/Image/Image.d.ts +11 -0
- package/dist/types/src/components/Image/Image.d.ts.map +1 -0
- package/dist/types/src/components/Image/Image.stories.d.ts +31 -0
- package/dist/types/src/components/Image/Image.stories.d.ts.map +1 -0
- package/dist/types/src/components/Image/index.d.ts +2 -0
- package/dist/types/src/components/Image/index.d.ts.map +1 -0
- package/dist/types/src/components/Stack/Stack.d.ts +9 -2
- package/dist/types/src/components/Stack/Stack.d.ts.map +1 -1
- package/dist/types/src/components/Stack/Stack.stories.d.ts +12 -2
- package/dist/types/src/components/Stack/Stack.stories.d.ts.map +1 -1
- package/dist/types/src/components/StackContext.d.ts +2 -1
- package/dist/types/src/components/StackContext.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItem.d.ts +3 -3
- package/dist/types/src/components/StackItem/StackItem.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItem.stories.d.ts +13 -4
- package/dist/types/src/components/StackItem/StackItem.stories.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemContent.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemHeading.d.ts +1 -1
- package/dist/types/src/components/StackItem/StackItemHeading.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemResizeHandle.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemSigil.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/exemplars/Card/Card.d.ts +2 -2
- package/dist/types/src/exemplars/Card/Card.d.ts.map +1 -1
- package/dist/types/src/exemplars/Card/Card.stories.d.ts +34 -3
- package/dist/types/src/exemplars/Card/Card.stories.d.ts.map +1 -1
- package/dist/types/src/exemplars/Card/fragments.d.ts +2 -1
- package/dist/types/src/exemplars/Card/fragments.d.ts.map +1 -1
- package/dist/types/src/exemplars/CardStack/CardStack.d.ts.map +1 -1
- package/dist/types/src/exemplars/CardStack/CardStack.stories.d.ts +6 -2
- package/dist/types/src/exemplars/CardStack/CardStack.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/useStackDropForElements.d.ts +1 -1
- package/dist/types/src/hooks/useStackDropForElements.d.ts.map +1 -1
- package/dist/types/src/testing/CardContainer.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +21 -21
- package/src/components/Image/Image.stories.tsx +58 -0
- package/src/components/Image/Image.tsx +137 -0
- package/src/components/Image/index.ts +5 -0
- package/src/components/Stack/Stack.stories.tsx +6 -5
- package/src/components/Stack/Stack.tsx +160 -18
- package/src/components/StackContext.tsx +2 -1
- package/src/components/StackItem/StackItem.stories.tsx +14 -10
- package/src/components/StackItem/StackItem.tsx +15 -14
- package/src/components/StackItem/StackItemContent.tsx +1 -0
- package/src/components/StackItem/StackItemHeading.tsx +3 -3
- package/src/components/StackItem/StackItemResizeHandle.tsx +2 -1
- package/src/components/StackItem/StackItemSigil.tsx +2 -1
- package/src/components/index.ts +1 -0
- package/src/exemplars/Card/Card.stories.tsx +33 -23
- package/src/exemplars/Card/Card.tsx +11 -11
- package/src/exemplars/Card/fragments.ts +2 -1
- package/src/exemplars/CardStack/CardStack.stories.tsx +6 -6
- package/src/exemplars/CardStack/CardStack.tsx +1 -1
- package/src/hooks/useStackDropForElements.ts +1 -1
- package/src/testing/CardContainer.tsx +9 -6
- package/dist/lib/browser/chunk-P3TQV4BA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3WVEPAJ4.mjs.map +0 -7
|
@@ -1,5 +1,102 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
+
// src/components/Image/Image.tsx
|
|
4
|
+
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
5
|
+
import React, { useRef, useState } from "react";
|
|
6
|
+
import { mx } from "@dxos/react-ui-theme";
|
|
7
|
+
var Image = ({ classNames, src, alt = "", crossOrigin = "anonymous", sampleSize = 64, contrast = 0.95 }) => {
|
|
8
|
+
var _effect = _useSignals();
|
|
9
|
+
try {
|
|
10
|
+
const [crossOriginState, setCrossOriginState] = useState(crossOrigin);
|
|
11
|
+
const [dominantColor, setDominantColor] = useState(void 0);
|
|
12
|
+
const [imageLoaded, setImageLoaded] = useState(false);
|
|
13
|
+
const canvasRef = useRef(null);
|
|
14
|
+
const extractDominantColor = (img) => {
|
|
15
|
+
const canvas = canvasRef.current;
|
|
16
|
+
const ctx = canvas?.getContext("2d");
|
|
17
|
+
if (!canvas || !ctx) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
canvas.width = sampleSize;
|
|
21
|
+
canvas.height = sampleSize;
|
|
22
|
+
ctx.drawImage(img, 0, 0, sampleSize, sampleSize);
|
|
23
|
+
try {
|
|
24
|
+
const imageData = ctx.getImageData(0, 0, sampleSize, sampleSize);
|
|
25
|
+
const pixels = imageData.data;
|
|
26
|
+
let r = 0;
|
|
27
|
+
let g = 0;
|
|
28
|
+
let b = 0;
|
|
29
|
+
let totalWeight = 0;
|
|
30
|
+
for (let i = 0; i < pixels.length; i += 4) {
|
|
31
|
+
const red = pixels[i];
|
|
32
|
+
const green = pixels[i + 1];
|
|
33
|
+
const blue = pixels[i + 2];
|
|
34
|
+
const alpha = pixels[i + 3];
|
|
35
|
+
if (alpha === 0) continue;
|
|
36
|
+
const max = Math.max(red, green, blue);
|
|
37
|
+
const min = Math.min(red, green, blue);
|
|
38
|
+
const saturation = max === 0 ? 0 : (max - min) / max;
|
|
39
|
+
const weight = 1 + saturation * 2;
|
|
40
|
+
r += red * weight;
|
|
41
|
+
g += green * weight;
|
|
42
|
+
b += blue * weight;
|
|
43
|
+
totalWeight += weight;
|
|
44
|
+
}
|
|
45
|
+
if (totalWeight > 0) {
|
|
46
|
+
r = Math.round(r / totalWeight);
|
|
47
|
+
g = Math.round(g / totalWeight);
|
|
48
|
+
b = Math.round(b / totalWeight);
|
|
49
|
+
r = Math.round(r * contrast);
|
|
50
|
+
g = Math.round(g * contrast);
|
|
51
|
+
b = Math.round(b * contrast);
|
|
52
|
+
setDominantColor(`rgb(${r}, ${g}, ${b})`);
|
|
53
|
+
}
|
|
54
|
+
} catch {
|
|
55
|
+
setCrossOriginState(void 0);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const handleImageError = () => {
|
|
59
|
+
setCrossOriginState(void 0);
|
|
60
|
+
};
|
|
61
|
+
const handleImageLoad = (ev) => {
|
|
62
|
+
const img = ev.target;
|
|
63
|
+
extractDominantColor(img);
|
|
64
|
+
setImageLoaded(true);
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
67
|
+
className: mx(`relative flex is-full justify-center overflow-hidden transition-all duration-700`, classNames),
|
|
68
|
+
style: {
|
|
69
|
+
backgroundColor: dominantColor
|
|
70
|
+
}
|
|
71
|
+
}, /* @__PURE__ */ React.createElement("canvas", {
|
|
72
|
+
ref: canvasRef,
|
|
73
|
+
style: {
|
|
74
|
+
display: "none"
|
|
75
|
+
},
|
|
76
|
+
"aria-hidden": "true"
|
|
77
|
+
}), /* @__PURE__ */ React.createElement("div", {
|
|
78
|
+
className: "absolute inset-0 pointer-events-none",
|
|
79
|
+
style: {
|
|
80
|
+
background: dominantColor ? `radial-gradient(circle at center, transparent 30%, ${dominantColor} 100%)` : void 0,
|
|
81
|
+
transition: "opacity 0.7s ease-in-out",
|
|
82
|
+
opacity: 0.5
|
|
83
|
+
}
|
|
84
|
+
}), /* @__PURE__ */ React.createElement("img", {
|
|
85
|
+
src,
|
|
86
|
+
alt,
|
|
87
|
+
crossOrigin: crossOriginState,
|
|
88
|
+
onError: handleImageError,
|
|
89
|
+
onLoad: handleImageLoad,
|
|
90
|
+
className: mx("z-10 object-contain transition-opacity duration-500", classNames),
|
|
91
|
+
style: {
|
|
92
|
+
opacity: imageLoaded ? 1 : 0
|
|
93
|
+
}
|
|
94
|
+
}));
|
|
95
|
+
} finally {
|
|
96
|
+
_effect.f();
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
3
100
|
// src/components/StackContext.tsx
|
|
4
101
|
import { createContext, useContext } from "react";
|
|
5
102
|
var StackContext = /* @__PURE__ */ createContext({
|
|
@@ -24,21 +121,20 @@ var StackItemContext = /* @__PURE__ */ createContext({
|
|
|
24
121
|
var useStackItem = () => useContext(StackItemContext);
|
|
25
122
|
|
|
26
123
|
// src/components/Stack/Stack.tsx
|
|
27
|
-
import { useSignals as
|
|
28
|
-
import { useArrowNavigationGroup } from "@fluentui/react-tabster";
|
|
124
|
+
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
29
125
|
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
30
|
-
import
|
|
31
|
-
import { ListItem } from "@dxos/react-ui";
|
|
32
|
-
import { mx } from "@dxos/react-ui-theme";
|
|
126
|
+
import React2, { Children, forwardRef, useCallback, useEffect, useMemo, useState as useState3 } from "react";
|
|
127
|
+
import { ListItem, useId } from "@dxos/react-ui";
|
|
128
|
+
import { mx as mx2 } from "@dxos/react-ui-theme";
|
|
33
129
|
|
|
34
130
|
// src/hooks/useStackDropForElements.ts
|
|
35
131
|
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|
36
132
|
import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
37
133
|
import { autoScrollForElements } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element";
|
|
38
134
|
import { attachClosestEdge, extractClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
39
|
-
import { useLayoutEffect, useState } from "react";
|
|
135
|
+
import { useLayoutEffect, useState as useState2 } from "react";
|
|
40
136
|
var useStackDropForElements = ({ id, element, scrollElement = element, selfDroppable, orientation, onRearrange }) => {
|
|
41
|
-
const [dropping, setDropping] =
|
|
137
|
+
const [dropping, setDropping] = useState2(false);
|
|
42
138
|
useLayoutEffect(() => {
|
|
43
139
|
if (!element || !selfDroppable) {
|
|
44
140
|
return;
|
|
@@ -102,16 +198,22 @@ var railGridVerticalContainFitContent = "grid-cols-[[rail-start]_var(--rail-size
|
|
|
102
198
|
var autoScrollRootAttributes = {
|
|
103
199
|
"data-drag-autoscroll": "idle"
|
|
104
200
|
};
|
|
201
|
+
var PERPENDICULAR_FOCUS_THRESHHOLD = 128;
|
|
202
|
+
var scrollIntoViewAndFocus = (el, orientation) => {
|
|
203
|
+
el.scrollIntoView({
|
|
204
|
+
behavior: "instant",
|
|
205
|
+
[orientation === "vertical" ? "block" : "inline"]: "center"
|
|
206
|
+
});
|
|
207
|
+
return el.focus();
|
|
208
|
+
};
|
|
105
209
|
var Stack = /* @__PURE__ */ forwardRef(({ children, classNames, style, orientation = "vertical", rail = true, size = "intrinsic", onRearrange, itemsCount = Children.count(children), getDropElement, separatorOnScroll, ...props }, forwardedRef) => {
|
|
106
|
-
var _effect =
|
|
210
|
+
var _effect = _useSignals2();
|
|
107
211
|
try {
|
|
108
|
-
const
|
|
212
|
+
const stackId = useId("stack", props.id);
|
|
213
|
+
const [stackElement, stackRef] = useState3(null);
|
|
109
214
|
const composedItemRef = composeRefs(stackRef, forwardedRef);
|
|
110
|
-
const arrowNavigationAttrs = useArrowNavigationGroup({
|
|
111
|
-
axis: orientation
|
|
112
|
-
});
|
|
113
215
|
const styles = {
|
|
114
|
-
[orientation === "horizontal" ? "gridTemplateColumns" : "gridTemplateRows"]: `repeat(${itemsCount}, min-content) [tabster-dummies] 0`,
|
|
216
|
+
[orientation === "horizontal" ? "gridTemplateColumns" : "gridTemplateRows"]: size === "split" ? `repeat(${itemsCount}, 1fr)` : `repeat(${itemsCount}, min-content) [tabster-dummies] 0`,
|
|
115
217
|
...style
|
|
116
218
|
};
|
|
117
219
|
const selfDroppable = !!(itemsCount < 1 && onRearrange && props.id);
|
|
@@ -139,14 +241,81 @@ var Stack = /* @__PURE__ */ forwardRef(({ children, classNames, style, orientati
|
|
|
139
241
|
separatorOnScroll,
|
|
140
242
|
orientation
|
|
141
243
|
]);
|
|
244
|
+
const handleKeyDown = useCallback((event) => {
|
|
245
|
+
const target = event.target;
|
|
246
|
+
if (event.key.startsWith("Arrow") && !target.closest(`input, textarea, [role="textbox"], [data-tabster*="mover"], [data-arrow-keys="all"], [data-arrow-keys~="${event.key.toLowerCase().slice(5)}"]`)) {
|
|
247
|
+
const closestOwnedItem = target.closest(`[data-dx-stack-item="${stackId}"]`);
|
|
248
|
+
const closestStack = target.closest("[data-dx-stack]");
|
|
249
|
+
const closestStackItems = Array.from(closestStack?.querySelectorAll(`[data-dx-stack-item="${stackId}"]`) ?? []);
|
|
250
|
+
const closestStackOrientation = closestStack?.getAttribute("aria-orientation");
|
|
251
|
+
const ancestorStack = closestStack?.parentElement?.closest("[data-dx-stack]");
|
|
252
|
+
if (closestOwnedItem && closestStack) {
|
|
253
|
+
const ancestorOrientation = ancestorStack?.getAttribute("aria-orientation");
|
|
254
|
+
const parallelDelta = (closestStackOrientation === "vertical" ? event.key === "ArrowUp" : event.key === "ArrowLeft") ? -1 : (closestStackOrientation === "vertical" ? event.key === "ArrowDown" : event.key === "ArrowRight") ? 1 : 0;
|
|
255
|
+
const perpendicularDelta = (closestStackOrientation === "vertical" ? event.key === "ArrowLeft" : event.key === "ArrowUp") ? -1 : (closestStackOrientation === "vertical" ? event.key === "ArrowRight" : event.key === "ArrowDown") ? 1 : 0;
|
|
256
|
+
if (parallelDelta !== 0) {
|
|
257
|
+
const adjacentItem = closestStackItems[(closestStackItems.indexOf(closestOwnedItem) + parallelDelta + closestStackItems.length) % closestStackItems.length];
|
|
258
|
+
if (adjacentItem) {
|
|
259
|
+
event.preventDefault();
|
|
260
|
+
scrollIntoViewAndFocus(adjacentItem, closestStackOrientation);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (perpendicularDelta !== 0) {
|
|
264
|
+
if (ancestorStack && ancestorOrientation !== closestStackOrientation) {
|
|
265
|
+
const siblingStacks = Array.from(ancestorStack.querySelectorAll(`[data-dx-stack-item="${ancestorStack.getAttribute("data-dx-stack")}"] [data-dx-stack]`));
|
|
266
|
+
const adjacentStack = siblingStacks[(siblingStacks.indexOf(closestStack) + perpendicularDelta + siblingStacks.length) % siblingStacks.length];
|
|
267
|
+
const adjacentStackSelfItem = adjacentStack?.closest(`[data-dx-stack-item=${ancestorStack.getAttribute("data-dx-stack")}]`);
|
|
268
|
+
const adjacentStackItems = adjacentStack ? Array.from(adjacentStack.querySelectorAll(`[data-dx-stack-item="${adjacentStack.getAttribute("data-dx-stack")}"]`)) : [];
|
|
269
|
+
if (adjacentStackItems.length > 0) {
|
|
270
|
+
const ownedItemRect = closestOwnedItem.getBoundingClientRect();
|
|
271
|
+
const targetPosition = closestStackOrientation === "vertical" ? ownedItemRect.top : ownedItemRect.left;
|
|
272
|
+
let closestItem = adjacentStackItems[0];
|
|
273
|
+
let closestDistance = Infinity;
|
|
274
|
+
for (const item of adjacentStackItems) {
|
|
275
|
+
const itemRect = item.getBoundingClientRect();
|
|
276
|
+
const itemPosition = closestStackOrientation === "vertical" ? itemRect.top : itemRect.left;
|
|
277
|
+
const distance = Math.abs(itemPosition - targetPosition);
|
|
278
|
+
if (distance < closestDistance) {
|
|
279
|
+
closestDistance = distance;
|
|
280
|
+
closestItem = item;
|
|
281
|
+
}
|
|
282
|
+
if (closestDistance <= PERPENDICULAR_FOCUS_THRESHHOLD) {
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
event.preventDefault();
|
|
287
|
+
scrollIntoViewAndFocus(closestItem, closestStackOrientation);
|
|
288
|
+
} else if (adjacentStackSelfItem) {
|
|
289
|
+
event.preventDefault();
|
|
290
|
+
scrollIntoViewAndFocus(adjacentStackSelfItem, ancestorOrientation);
|
|
291
|
+
}
|
|
292
|
+
} else if (closestOwnedItem) {
|
|
293
|
+
const closestOwnedItemStack = closestOwnedItem.querySelector("[data-dx-stack]");
|
|
294
|
+
const closestOwnedItemStackItems = closestOwnedItemStack ? Array.from(closestOwnedItemStack.querySelectorAll(`[data-dx-stack-item="${closestOwnedItemStack.getAttribute("data-dx-stack")}"]`)) : [];
|
|
295
|
+
if (closestOwnedItemStackItems.length > 0) {
|
|
296
|
+
event.preventDefault();
|
|
297
|
+
scrollIntoViewAndFocus(closestOwnedItemStackItems[[
|
|
298
|
+
"ArrowUp",
|
|
299
|
+
"ArrowLeft"
|
|
300
|
+
].includes(event.key) ? closestOwnedItemStackItems.length - 1 : 0], closestOwnedItemStack?.getAttribute("aria-orientation"));
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
props.onKeyDown?.(event);
|
|
307
|
+
}, [
|
|
308
|
+
props.onKeyDown,
|
|
309
|
+
stackId
|
|
310
|
+
]);
|
|
142
311
|
const gridClasses = useMemo(() => {
|
|
143
312
|
if (!rail) {
|
|
144
|
-
return orientation === "horizontal" ? "grid-rows-1 pli-
|
|
313
|
+
return orientation === "horizontal" ? "grid-rows-1 pli-[--stack-gap]" : "grid-cols-1 plb-[--stack-gap]";
|
|
145
314
|
}
|
|
146
315
|
if (orientation === "horizontal") {
|
|
147
|
-
return
|
|
316
|
+
return railGridHorizontal;
|
|
148
317
|
} else {
|
|
149
|
-
return
|
|
318
|
+
return railGridVertical;
|
|
150
319
|
}
|
|
151
320
|
}, [
|
|
152
321
|
rail,
|
|
@@ -171,17 +340,19 @@ var Stack = /* @__PURE__ */ forwardRef(({ children, classNames, style, orientati
|
|
|
171
340
|
stackElement,
|
|
172
341
|
handleScroll
|
|
173
342
|
]);
|
|
174
|
-
return /* @__PURE__ */
|
|
343
|
+
return /* @__PURE__ */ React2.createElement(StackContext.Provider, {
|
|
175
344
|
value: {
|
|
176
345
|
orientation,
|
|
177
346
|
rail,
|
|
178
347
|
size,
|
|
179
|
-
onRearrange
|
|
348
|
+
onRearrange,
|
|
349
|
+
stackId
|
|
180
350
|
}
|
|
181
|
-
}, /* @__PURE__ */
|
|
351
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
182
352
|
...props,
|
|
183
|
-
|
|
184
|
-
|
|
353
|
+
className: mx2("grid relative [--stack-gap:var(--dx-trimXs)]", gridClasses, size === "contain" && (orientation === "horizontal" ? "overflow-x-auto overscroll-x-contain min-bs-0 max-bs-full bs-full" : "overflow-y-auto min-is-0 max-is-full is-full"), classNames),
|
|
354
|
+
onKeyDown: handleKeyDown,
|
|
355
|
+
"data-dx-stack": stackId,
|
|
185
356
|
"data-rail": rail,
|
|
186
357
|
"aria-orientation": orientation,
|
|
187
358
|
style: styles,
|
|
@@ -189,7 +360,7 @@ var Stack = /* @__PURE__ */ forwardRef(({ children, classNames, style, orientati
|
|
|
189
360
|
...Number.isFinite(separatorOnScroll) && {
|
|
190
361
|
onScroll: handleScroll
|
|
191
362
|
}
|
|
192
|
-
}, children, selfDroppable && dropping && /* @__PURE__ */
|
|
363
|
+
}, children, selfDroppable && dropping && /* @__PURE__ */ React2.createElement(ListItem.DropIndicator, {
|
|
193
364
|
lineInset: 8,
|
|
194
365
|
terminalInset: -8,
|
|
195
366
|
gap: -8,
|
|
@@ -220,7 +391,7 @@ var translations = [
|
|
|
220
391
|
];
|
|
221
392
|
|
|
222
393
|
// src/components/StackItem/StackItem.tsx
|
|
223
|
-
import { useSignals as
|
|
394
|
+
import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
|
|
224
395
|
import { combine as combine2 } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|
225
396
|
import { draggable, dropTargetForElements as dropTargetForElements2 } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
226
397
|
import { preserveOffsetOnSource } from "@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source";
|
|
@@ -228,18 +399,18 @@ import { setCustomNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/el
|
|
|
228
399
|
import { attachClosestEdge as attachClosestEdge2, extractClosestEdge as extractClosestEdge2 } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
229
400
|
import { useFocusableGroup as useFocusableGroup2 } from "@fluentui/react-tabster";
|
|
230
401
|
import { composeRefs as composeRefs2 } from "@radix-ui/react-compose-refs";
|
|
231
|
-
import
|
|
402
|
+
import React9, { forwardRef as forwardRef5, useCallback as useCallback2, useLayoutEffect as useLayoutEffect2, useMemo as useMemo3, useState as useState5 } from "react";
|
|
232
403
|
import { createPortal } from "react-dom";
|
|
233
404
|
import { ListItem as ListItem2 } from "@dxos/react-ui";
|
|
234
405
|
import { resizeAttributes, sizeStyle } from "@dxos/react-ui-dnd";
|
|
235
|
-
import { mx as
|
|
406
|
+
import { mx as mx6 } from "@dxos/react-ui-theme";
|
|
236
407
|
|
|
237
408
|
// src/components/StackItem/StackItemContent.tsx
|
|
238
|
-
import { useSignals as
|
|
239
|
-
import
|
|
240
|
-
import { mx as
|
|
409
|
+
import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
|
|
410
|
+
import React3, { forwardRef as forwardRef2, useMemo as useMemo2 } from "react";
|
|
411
|
+
import { mx as mx3 } from "@dxos/react-ui-theme";
|
|
241
412
|
var StackItemContent = /* @__PURE__ */ forwardRef2(({ children, toolbar, statusbar, layoutManaged, classNames, size = "intrinsic", ...props }, forwardedRef) => {
|
|
242
|
-
var _effect =
|
|
413
|
+
var _effect = _useSignals3();
|
|
243
414
|
try {
|
|
244
415
|
const { size: stackItemSize } = useStack();
|
|
245
416
|
const { role } = useStackItem();
|
|
@@ -258,10 +429,10 @@ var StackItemContent = /* @__PURE__ */ forwardRef2(({ children, toolbar, statusb
|
|
|
258
429
|
statusbar,
|
|
259
430
|
layoutManaged
|
|
260
431
|
]);
|
|
261
|
-
return /* @__PURE__ */
|
|
432
|
+
return /* @__PURE__ */ React3.createElement("div", {
|
|
262
433
|
role: "none",
|
|
263
434
|
...props,
|
|
264
|
-
className:
|
|
435
|
+
className: mx3("group grid grid-cols-[100%] density-coarse", stackItemSize === "contain" && "min-bs-0 overflow-hidden", size === "video" ? "aspect-video" : size === "square" && "aspect-square", toolbar && "[&>.dx-toolbar]:relative [&>.dx-toolbar]:border-be [&>.dx-toolbar]:border-subduedSeparator", role === "section" && toolbar && "[&_.dx-toolbar]:sticky [&_.dx-toolbar]:z-[1] [&_.dx-toolbar]:block-start-0 [&_.dx-toolbar]:-mbe-px [&_.dx-toolbar]:min-is-0", classNames),
|
|
265
436
|
style,
|
|
266
437
|
"data-popover-collision-boundary": true,
|
|
267
438
|
ref: forwardedRef
|
|
@@ -272,15 +443,15 @@ var StackItemContent = /* @__PURE__ */ forwardRef2(({ children, toolbar, statusb
|
|
|
272
443
|
});
|
|
273
444
|
|
|
274
445
|
// src/components/StackItem/StackItemDragHandle.tsx
|
|
275
|
-
import { useSignals as
|
|
446
|
+
import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
|
|
276
447
|
import { Slot } from "@radix-ui/react-slot";
|
|
277
|
-
import
|
|
448
|
+
import React4 from "react";
|
|
278
449
|
var StackItemDragHandle = ({ asChild, children }) => {
|
|
279
|
-
var _effect =
|
|
450
|
+
var _effect = _useSignals4();
|
|
280
451
|
try {
|
|
281
452
|
const { selfDragHandleRef } = useStackItem();
|
|
282
453
|
const Root = asChild ? Slot : "div";
|
|
283
|
-
return /* @__PURE__ */
|
|
454
|
+
return /* @__PURE__ */ React4.createElement(Root, {
|
|
284
455
|
ref: selfDragHandleRef,
|
|
285
456
|
role: "button"
|
|
286
457
|
}, children);
|
|
@@ -290,35 +461,35 @@ var StackItemDragHandle = ({ asChild, children }) => {
|
|
|
290
461
|
};
|
|
291
462
|
|
|
292
463
|
// src/components/StackItem/StackItemHeading.tsx
|
|
293
|
-
import { useSignals as
|
|
464
|
+
import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
|
|
294
465
|
import { useFocusableGroup } from "@fluentui/react-tabster";
|
|
295
466
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
296
|
-
import
|
|
467
|
+
import React5, { forwardRef as forwardRef3 } from "react";
|
|
297
468
|
import { useAttention } from "@dxos/react-ui-attention";
|
|
298
|
-
import { mx as
|
|
469
|
+
import { mx as mx4 } from "@dxos/react-ui-theme";
|
|
299
470
|
var StackItemHeading = ({ children, classNames, asChild, separateOnScroll, ...props }) => {
|
|
300
|
-
var _effect =
|
|
471
|
+
var _effect = _useSignals5();
|
|
301
472
|
try {
|
|
302
473
|
const { orientation } = useStack();
|
|
303
474
|
const focusableGroupAttrs = useFocusableGroup({
|
|
304
475
|
tabBehavior: "limited"
|
|
305
476
|
});
|
|
306
477
|
const Root = asChild ? Slot2 : "div";
|
|
307
|
-
return /* @__PURE__ */
|
|
478
|
+
return /* @__PURE__ */ React5.createElement(Root, {
|
|
308
479
|
role: "heading",
|
|
309
480
|
...props,
|
|
310
481
|
tabIndex: 0,
|
|
311
482
|
...focusableGroupAttrs,
|
|
312
|
-
className:
|
|
483
|
+
className: mx4("flex items-center dx-focus-ring-inset-over-all relative !border-is-0 bg-headerSurface", separateOnScroll ? 'border-transparent [[data-scroll-separator="true"]_&]:border-subduedSeparator' : "border-subduedSeparator", orientation === "horizontal" ? "bs-[--rail-size]" : "is-[--rail-size] flex-col", orientation === "horizontal" ? "border-be" : "border-ie", classNames)
|
|
313
484
|
}, children);
|
|
314
485
|
} finally {
|
|
315
486
|
_effect.f();
|
|
316
487
|
}
|
|
317
488
|
};
|
|
318
489
|
var StackItemHeadingStickyContent = ({ children }) => {
|
|
319
|
-
var _effect =
|
|
490
|
+
var _effect = _useSignals5();
|
|
320
491
|
try {
|
|
321
|
-
return /* @__PURE__ */
|
|
492
|
+
return /* @__PURE__ */ React5.createElement("div", {
|
|
322
493
|
role: "none",
|
|
323
494
|
className: "sticky block-start-0 bg-[--sticky-bg] p-1 is-full"
|
|
324
495
|
}, children);
|
|
@@ -327,13 +498,13 @@ var StackItemHeadingStickyContent = ({ children }) => {
|
|
|
327
498
|
}
|
|
328
499
|
};
|
|
329
500
|
var StackItemHeadingLabel = /* @__PURE__ */ forwardRef3(({ attendableId, related, classNames, ...props }, forwardedRef) => {
|
|
330
|
-
var _effect =
|
|
501
|
+
var _effect = _useSignals5();
|
|
331
502
|
try {
|
|
332
503
|
const { hasAttention, isAncestor, isRelated } = useAttention(attendableId);
|
|
333
|
-
return /* @__PURE__ */
|
|
504
|
+
return /* @__PURE__ */ React5.createElement("h1", {
|
|
334
505
|
...props,
|
|
335
506
|
"data-attention": (related && isRelated || hasAttention || isAncestor).toString(),
|
|
336
|
-
className:
|
|
507
|
+
className: mx4("pli-1 min-is-0 is-0 grow truncate font-medium text-baseText data-[attention=true]:text-accentText self-center", classNames),
|
|
337
508
|
ref: forwardedRef
|
|
338
509
|
});
|
|
339
510
|
} finally {
|
|
@@ -342,17 +513,17 @@ var StackItemHeadingLabel = /* @__PURE__ */ forwardRef3(({ attendableId, related
|
|
|
342
513
|
});
|
|
343
514
|
|
|
344
515
|
// src/components/StackItem/StackItemResizeHandle.tsx
|
|
345
|
-
import { useSignals as
|
|
346
|
-
import
|
|
516
|
+
import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
|
|
517
|
+
import React6 from "react";
|
|
347
518
|
import { ResizeHandle } from "@dxos/react-ui-dnd";
|
|
348
519
|
var MIN_WIDTH = 20;
|
|
349
520
|
var MIN_HEIGHT = 3;
|
|
350
521
|
var StackItemResizeHandle = () => {
|
|
351
|
-
var _effect =
|
|
522
|
+
var _effect = _useSignals6();
|
|
352
523
|
try {
|
|
353
524
|
const { orientation } = useStack();
|
|
354
525
|
const { setSize, size } = useStackItem();
|
|
355
|
-
return /* @__PURE__ */
|
|
526
|
+
return /* @__PURE__ */ React6.createElement(ResizeHandle, {
|
|
356
527
|
side: orientation === "horizontal" ? "inline-end" : "block-end",
|
|
357
528
|
fallbackSize: DEFAULT_EXTRINSIC_SIZE,
|
|
358
529
|
minSize: orientation === "horizontal" ? MIN_WIDTH : MIN_HEIGHT,
|
|
@@ -365,28 +536,28 @@ var StackItemResizeHandle = () => {
|
|
|
365
536
|
};
|
|
366
537
|
|
|
367
538
|
// src/components/StackItem/StackItemSigil.tsx
|
|
368
|
-
import { useSignals as
|
|
369
|
-
import
|
|
539
|
+
import { useSignals as _useSignals8 } from "@preact-signals/safe-react/tracking";
|
|
540
|
+
import React8, { Fragment, forwardRef as forwardRef4, useState as useState4 } from "react";
|
|
370
541
|
import { keySymbols } from "@dxos/keyboard";
|
|
371
542
|
import { Button, DropdownMenu, Icon, toLocalizedString, useTranslation } from "@dxos/react-ui";
|
|
372
543
|
import { useAttention as useAttention2 } from "@dxos/react-ui-attention";
|
|
373
|
-
import { descriptionText, mx as
|
|
544
|
+
import { descriptionText, mx as mx5 } from "@dxos/react-ui-theme";
|
|
374
545
|
import { getHostPlatform } from "@dxos/util";
|
|
375
546
|
|
|
376
547
|
// src/components/StackItem/MenuSignifier.tsx
|
|
377
|
-
import { useSignals as
|
|
378
|
-
import
|
|
548
|
+
import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
|
|
549
|
+
import React7 from "react";
|
|
379
550
|
var MenuSignifierHorizontal = () => {
|
|
380
|
-
var _effect =
|
|
551
|
+
var _effect = _useSignals7();
|
|
381
552
|
try {
|
|
382
|
-
return /* @__PURE__ */
|
|
553
|
+
return /* @__PURE__ */ React7.createElement("svg", {
|
|
383
554
|
className: "absolute block-end-[7px]",
|
|
384
555
|
width: 20,
|
|
385
556
|
height: 2,
|
|
386
557
|
viewBox: "0 0 20 2",
|
|
387
558
|
stroke: "currentColor",
|
|
388
559
|
opacity: 0.5
|
|
389
|
-
}, /* @__PURE__ */
|
|
560
|
+
}, /* @__PURE__ */ React7.createElement("line", {
|
|
390
561
|
x1: 0.5,
|
|
391
562
|
y1: 0.75,
|
|
392
563
|
x2: 19,
|
|
@@ -403,11 +574,11 @@ var MenuSignifierHorizontal = () => {
|
|
|
403
574
|
|
|
404
575
|
// src/components/StackItem/StackItemSigil.tsx
|
|
405
576
|
var StackItemSigilButton = /* @__PURE__ */ forwardRef4(({ attendableId, classNames, related, isMenu = true, children, ...props }, forwardedRef) => {
|
|
406
|
-
var _effect =
|
|
577
|
+
var _effect = _useSignals8();
|
|
407
578
|
try {
|
|
408
579
|
const { hasAttention, isAncestor, isRelated } = useAttention2(attendableId);
|
|
409
580
|
const variant = related && isRelated || hasAttention || isAncestor ? "primary" : "ghost";
|
|
410
|
-
return /* @__PURE__ */
|
|
581
|
+
return /* @__PURE__ */ React8.createElement(Button, {
|
|
411
582
|
...props,
|
|
412
583
|
variant,
|
|
413
584
|
classNames: [
|
|
@@ -415,50 +586,50 @@ var StackItemSigilButton = /* @__PURE__ */ forwardRef4(({ attendableId, classNam
|
|
|
415
586
|
classNames
|
|
416
587
|
],
|
|
417
588
|
ref: forwardedRef
|
|
418
|
-
}, isMenu && /* @__PURE__ */
|
|
589
|
+
}, isMenu && /* @__PURE__ */ React8.createElement(MenuSignifierHorizontal, null), children);
|
|
419
590
|
} finally {
|
|
420
591
|
_effect.f();
|
|
421
592
|
}
|
|
422
593
|
});
|
|
423
594
|
var StackItemSigil = /* @__PURE__ */ forwardRef4(({ actions: actionGroups, onAction, triggerLabel, attendableId, icon, related, children }, forwardedRef) => {
|
|
424
|
-
var _effect =
|
|
595
|
+
var _effect = _useSignals8();
|
|
425
596
|
try {
|
|
426
597
|
const { t } = useTranslation(translationKey);
|
|
427
|
-
const [optionsMenuOpen, setOptionsMenuOpen] =
|
|
598
|
+
const [optionsMenuOpen, setOptionsMenuOpen] = useState4(false);
|
|
428
599
|
const hasActions = actionGroups && actionGroups.length > 0;
|
|
429
|
-
const button = /* @__PURE__ */
|
|
600
|
+
const button = /* @__PURE__ */ React8.createElement(StackItemSigilButton, {
|
|
430
601
|
attendableId,
|
|
431
602
|
related,
|
|
432
603
|
isMenu: hasActions,
|
|
433
604
|
// TODO(wittjosiah): Better disabling of interactive styles when no action are available.
|
|
434
605
|
// Remove underscore icon when no actions are available?
|
|
435
606
|
classNames: !hasActions && "cursor-default"
|
|
436
|
-
}, /* @__PURE__ */
|
|
607
|
+
}, /* @__PURE__ */ React8.createElement("span", {
|
|
437
608
|
className: "sr-only"
|
|
438
|
-
}, triggerLabel), /* @__PURE__ */
|
|
609
|
+
}, triggerLabel), /* @__PURE__ */ React8.createElement(Icon, {
|
|
439
610
|
icon,
|
|
440
611
|
size: 5
|
|
441
612
|
}));
|
|
442
613
|
if (!hasActions) {
|
|
443
614
|
return button;
|
|
444
615
|
}
|
|
445
|
-
return /* @__PURE__ */
|
|
616
|
+
return /* @__PURE__ */ React8.createElement(DropdownMenu.Root, {
|
|
446
617
|
open: optionsMenuOpen,
|
|
447
618
|
onOpenChange: setOptionsMenuOpen
|
|
448
|
-
}, /* @__PURE__ */
|
|
619
|
+
}, /* @__PURE__ */ React8.createElement(DropdownMenu.Trigger, {
|
|
449
620
|
asChild: true,
|
|
450
621
|
ref: forwardedRef
|
|
451
|
-
}, button), /* @__PURE__ */
|
|
622
|
+
}, button), /* @__PURE__ */ React8.createElement(DropdownMenu.Portal, null, /* @__PURE__ */ React8.createElement(DropdownMenu.Content, {
|
|
452
623
|
classNames: "z-[31]"
|
|
453
|
-
}, /* @__PURE__ */
|
|
454
|
-
const separator = index > 0 ? /* @__PURE__ */
|
|
455
|
-
return /* @__PURE__ */
|
|
624
|
+
}, /* @__PURE__ */ React8.createElement(DropdownMenu.Viewport, null, actionGroups?.map((actions, index) => {
|
|
625
|
+
const separator = index > 0 ? /* @__PURE__ */ React8.createElement(DropdownMenu.Separator, null) : null;
|
|
626
|
+
return /* @__PURE__ */ React8.createElement(Fragment, {
|
|
456
627
|
key: index
|
|
457
628
|
}, separator, actions.map((action) => {
|
|
458
629
|
const shortcut = typeof action.properties.keyBinding === "string" ? action.properties.keyBinding : action.properties.keyBinding?.[getHostPlatform()];
|
|
459
630
|
const menuItemType = action.properties.menuItemType;
|
|
460
631
|
const Root = menuItemType === "toggle" ? DropdownMenu.CheckboxItem : DropdownMenu.Item;
|
|
461
|
-
return /* @__PURE__ */
|
|
632
|
+
return /* @__PURE__ */ React8.createElement(Root, {
|
|
462
633
|
key: action.id,
|
|
463
634
|
onClick: (event) => {
|
|
464
635
|
if (action.properties.disabled) {
|
|
@@ -474,21 +645,21 @@ var StackItemSigil = /* @__PURE__ */ forwardRef4(({ actions: actionGroups, onAct
|
|
|
474
645
|
...action.properties?.testId && {
|
|
475
646
|
"data-testid": action.properties.testId
|
|
476
647
|
}
|
|
477
|
-
}, /* @__PURE__ */
|
|
648
|
+
}, /* @__PURE__ */ React8.createElement(Icon, {
|
|
478
649
|
icon: action.properties.icon ?? "ph--placeholder--regular",
|
|
479
650
|
size: 4
|
|
480
|
-
}), /* @__PURE__ */
|
|
651
|
+
}), /* @__PURE__ */ React8.createElement("span", {
|
|
481
652
|
className: "grow truncate"
|
|
482
|
-
}, toLocalizedString(action.properties.label ?? "", t)), menuItemType === "toggle" && /* @__PURE__ */
|
|
653
|
+
}, toLocalizedString(action.properties.label ?? "", t)), menuItemType === "toggle" && /* @__PURE__ */ React8.createElement(DropdownMenu.ItemIndicator, {
|
|
483
654
|
asChild: true
|
|
484
|
-
}, /* @__PURE__ */
|
|
655
|
+
}, /* @__PURE__ */ React8.createElement(Icon, {
|
|
485
656
|
icon: "ph--check--regular",
|
|
486
657
|
size: 4
|
|
487
|
-
})), shortcut && /* @__PURE__ */
|
|
488
|
-
className:
|
|
658
|
+
})), shortcut && /* @__PURE__ */ React8.createElement("span", {
|
|
659
|
+
className: mx5("shrink-0", descriptionText)
|
|
489
660
|
}, keySymbols(shortcut).join("")));
|
|
490
661
|
}));
|
|
491
|
-
}), children), /* @__PURE__ */
|
|
662
|
+
}), children), /* @__PURE__ */ React8.createElement(DropdownMenu.Arrow, null))));
|
|
492
663
|
} finally {
|
|
493
664
|
_effect.f();
|
|
494
665
|
}
|
|
@@ -499,15 +670,15 @@ var DEFAULT_HORIZONTAL_SIZE = 48;
|
|
|
499
670
|
var DEFAULT_VERTICAL_SIZE = "min-content";
|
|
500
671
|
var DEFAULT_EXTRINSIC_SIZE = DEFAULT_HORIZONTAL_SIZE;
|
|
501
672
|
var StackItemRoot = /* @__PURE__ */ forwardRef5(({ item, children, classNames, size: propsSize, onSizeChange, role, order, prevSiblingId, nextSiblingId, style, disableRearrange, focusIndicatorVariant = "over-all", ...props }, forwardedRef) => {
|
|
502
|
-
var _effect =
|
|
673
|
+
var _effect = _useSignals9();
|
|
503
674
|
try {
|
|
504
|
-
const [itemElement, itemRef] =
|
|
505
|
-
const [selfDragHandleElement, selfDragHandleRef] =
|
|
506
|
-
const [closestEdge, setEdge] =
|
|
507
|
-
const [sourceId, setSourceId] =
|
|
508
|
-
const [dragState, setDragState] =
|
|
509
|
-
const { orientation, rail, onRearrange } = useStack();
|
|
510
|
-
const [size = orientation === "horizontal" ? DEFAULT_HORIZONTAL_SIZE : DEFAULT_VERTICAL_SIZE, setInternalSize] =
|
|
675
|
+
const [itemElement, itemRef] = useState5(null);
|
|
676
|
+
const [selfDragHandleElement, selfDragHandleRef] = useState5(null);
|
|
677
|
+
const [closestEdge, setEdge] = useState5(null);
|
|
678
|
+
const [sourceId, setSourceId] = useState5(null);
|
|
679
|
+
const [dragState, setDragState] = useState5(idle);
|
|
680
|
+
const { orientation, rail, onRearrange, size: stackSize, stackId } = useStack();
|
|
681
|
+
const [size = orientation === "horizontal" ? DEFAULT_HORIZONTAL_SIZE : DEFAULT_VERTICAL_SIZE, setInternalSize] = useState5(propsSize);
|
|
511
682
|
const Root = role ?? "div";
|
|
512
683
|
const composedItemRef = composeRefs2(itemRef, forwardedRef);
|
|
513
684
|
const setSize = useCallback2((nextSize, commit) => {
|
|
@@ -654,24 +825,24 @@ var StackItemRoot = /* @__PURE__ */ forwardRef5(({ item, children, classNames, s
|
|
|
654
825
|
setDragState,
|
|
655
826
|
role
|
|
656
827
|
]);
|
|
657
|
-
return /* @__PURE__ */
|
|
828
|
+
return /* @__PURE__ */ React9.createElement(StackItemContext.Provider, {
|
|
658
829
|
value: stackItemContextValue
|
|
659
|
-
}, /* @__PURE__ */
|
|
830
|
+
}, /* @__PURE__ */ React9.createElement(Root, {
|
|
660
831
|
...props,
|
|
661
832
|
tabIndex: 0,
|
|
662
833
|
...focusableGroupAttrs,
|
|
663
|
-
className:
|
|
664
|
-
"data-dx-stack-item":
|
|
834
|
+
className: mx6("group/stack-item grid relative", focusIndicatorVariant === "over-all" ? "dx-focus-ring-inset-over-all" : orientation === "horizontal" ? "dx-focus-ring-group-x" : "dx-focus-ring-group-y", orientation === "horizontal" ? "grid-rows-subgrid" : "grid-cols-subgrid", rail && (orientation === "horizontal" ? "row-span-2" : "col-span-2"), role === "section" && orientation !== "horizontal" && "border-be border-subduedSeparator", classNames),
|
|
835
|
+
"data-dx-stack-item": stackId,
|
|
665
836
|
...resizeAttributes,
|
|
666
837
|
style: {
|
|
667
|
-
...sizeStyle(size, orientation),
|
|
838
|
+
...stackSize !== "split" && sizeStyle(size, orientation),
|
|
668
839
|
...Number.isFinite(order) && {
|
|
669
840
|
[orientation === "horizontal" ? "gridColumn" : "gridRow"]: `${order}`
|
|
670
841
|
},
|
|
671
842
|
...style
|
|
672
843
|
},
|
|
673
844
|
ref: composedItemRef
|
|
674
|
-
}, children, shouldShowDropIndicator() && closestEdge && /* @__PURE__ */
|
|
845
|
+
}, children, shouldShowDropIndicator() && closestEdge && /* @__PURE__ */ React9.createElement(ListItem2.DropIndicator, {
|
|
675
846
|
lineInset: 8,
|
|
676
847
|
terminalInset: -8,
|
|
677
848
|
edge: closestEdge
|
|
@@ -702,6 +873,7 @@ var StackItem = {
|
|
|
702
873
|
// src/exemplars/Card/fragments.ts
|
|
703
874
|
var cardRoot = "rounded overflow-hidden bg-cardSurface border border-separator dark:border-subduedSeparator dx-focus-ring-group-y-indicator relative min-bs-[--rail-item] group/card";
|
|
704
875
|
var cardSpacing = "pli-cardSpacingInline mlb-cardSpacingBlock";
|
|
876
|
+
var cardNoSpacing = "pli-0 mlb-0";
|
|
705
877
|
var labelSpacing = "mbs-inputSpacingBlock mbe-labelSpacingBlock";
|
|
706
878
|
var cardDialogContent = "p-0 bs-content min-bs-[8rem] max-bs-full md:max-is-[32rem] overflow-hidden";
|
|
707
879
|
var cardDialogHeader = "pli-cardSpacingInline mbs-cardSpacingBlock flex justify-between";
|
|
@@ -709,18 +881,18 @@ var cardDialogOverflow = "overflow-y-auto min-bs-0 flex-1";
|
|
|
709
881
|
var cardDialogPaddedOverflow = `${cardDialogOverflow} plb-cardSpacingBlock`;
|
|
710
882
|
var cardDialogSearchListRoot = "pli-cardSpacingInline pbs-cardSpacingBlock [&>input]:mbe-0 min-bs-0 flex-1 flex flex-col";
|
|
711
883
|
var cardText = cardSpacing;
|
|
712
|
-
var cardHeading = "text-lg font-medium line-clamp-2";
|
|
884
|
+
var cardHeading = "text-lg font-medium line-clamp-2 grow";
|
|
713
885
|
var cardChrome = "pli-[--dx-cardSpacingChrome] mlb-[--dx-cardSpacingChrome] [&_.dx-button]:text-start [&_.dx-button]:is-full";
|
|
714
886
|
|
|
715
887
|
// src/exemplars/Card/Card.tsx
|
|
716
|
-
import { useSignals as
|
|
888
|
+
import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
|
|
717
889
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
718
890
|
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
719
|
-
import
|
|
891
|
+
import React10, { forwardRef as forwardRef6 } from "react";
|
|
720
892
|
import { Icon as Icon2, IconButton, Toolbar, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
721
|
-
import { hoverableControls, mx as
|
|
893
|
+
import { hoverableControls, mx as mx7 } from "@dxos/react-ui-theme";
|
|
722
894
|
var CardStaticRoot = /* @__PURE__ */ forwardRef6(({ children, classNames, asChild, role = "group", ...props }, forwardedRef) => {
|
|
723
|
-
var _effect =
|
|
895
|
+
var _effect = _useSignals10();
|
|
724
896
|
try {
|
|
725
897
|
const Root = asChild ? Slot3 : "div";
|
|
726
898
|
const rootProps = asChild ? {
|
|
@@ -729,10 +901,10 @@ var CardStaticRoot = /* @__PURE__ */ forwardRef6(({ children, classNames, asChil
|
|
|
729
901
|
classNames
|
|
730
902
|
]
|
|
731
903
|
} : {
|
|
732
|
-
className:
|
|
904
|
+
className: mx7(cardRoot, classNames),
|
|
733
905
|
role
|
|
734
906
|
};
|
|
735
|
-
return /* @__PURE__ */
|
|
907
|
+
return /* @__PURE__ */ React10.createElement(Root, {
|
|
736
908
|
...props,
|
|
737
909
|
...rootProps,
|
|
738
910
|
ref: forwardedRef
|
|
@@ -742,23 +914,23 @@ var CardStaticRoot = /* @__PURE__ */ forwardRef6(({ children, classNames, asChil
|
|
|
742
914
|
}
|
|
743
915
|
});
|
|
744
916
|
var CardSurfaceRoot = ({ role = "never", children, classNames }) => {
|
|
745
|
-
var _effect =
|
|
917
|
+
var _effect = _useSignals10();
|
|
746
918
|
try {
|
|
747
919
|
if ([
|
|
748
920
|
"card--popover",
|
|
749
921
|
"card--intrinsic",
|
|
750
922
|
"card--extrinsic"
|
|
751
923
|
].includes(role)) {
|
|
752
|
-
return /* @__PURE__ */
|
|
753
|
-
className:
|
|
924
|
+
return /* @__PURE__ */ React10.createElement("div", {
|
|
925
|
+
className: mx7(role === "card--popover" ? "popover-card-width" : [
|
|
754
926
|
"card--intrinsic",
|
|
755
927
|
"card--extrinsic"
|
|
756
928
|
].includes(role) ? "contents" : "", classNames)
|
|
757
929
|
}, children);
|
|
758
930
|
} else {
|
|
759
|
-
return /* @__PURE__ */
|
|
931
|
+
return /* @__PURE__ */ React10.createElement(CardStaticRoot, {
|
|
760
932
|
classNames: [
|
|
761
|
-
role === "card--transclusion" && "mlb-
|
|
933
|
+
role === "card--transclusion" && "mlb-1",
|
|
762
934
|
role === "card--transclusion" && hoverableControls,
|
|
763
935
|
classNames
|
|
764
936
|
]
|
|
@@ -769,7 +941,7 @@ var CardSurfaceRoot = ({ role = "never", children, classNames }) => {
|
|
|
769
941
|
}
|
|
770
942
|
};
|
|
771
943
|
var CardHeading = /* @__PURE__ */ forwardRef6(({ children, classNames, asChild, role = "heading", ...props }, forwardedRef) => {
|
|
772
|
-
var _effect =
|
|
944
|
+
var _effect = _useSignals10();
|
|
773
945
|
try {
|
|
774
946
|
const Root = asChild ? Slot3 : "div";
|
|
775
947
|
const rootProps = asChild ? {
|
|
@@ -779,10 +951,10 @@ var CardHeading = /* @__PURE__ */ forwardRef6(({ children, classNames, asChild,
|
|
|
779
951
|
classNames
|
|
780
952
|
]
|
|
781
953
|
} : {
|
|
782
|
-
className:
|
|
954
|
+
className: mx7(cardHeading, cardText, classNames),
|
|
783
955
|
role
|
|
784
956
|
};
|
|
785
|
-
return /* @__PURE__ */
|
|
957
|
+
return /* @__PURE__ */ React10.createElement(Root, {
|
|
786
958
|
...props,
|
|
787
959
|
...rootProps,
|
|
788
960
|
ref: forwardedRef
|
|
@@ -792,9 +964,9 @@ var CardHeading = /* @__PURE__ */ forwardRef6(({ children, classNames, asChild,
|
|
|
792
964
|
}
|
|
793
965
|
});
|
|
794
966
|
var CardToolbar = /* @__PURE__ */ forwardRef6(({ children, classNames, ...props }, forwardedRef) => {
|
|
795
|
-
var _effect =
|
|
967
|
+
var _effect = _useSignals10();
|
|
796
968
|
try {
|
|
797
|
-
return /* @__PURE__ */
|
|
969
|
+
return /* @__PURE__ */ React10.createElement(Toolbar.Root, {
|
|
798
970
|
...props,
|
|
799
971
|
classNames: [
|
|
800
972
|
"bg-transparent density-coarse",
|
|
@@ -809,11 +981,11 @@ var CardToolbar = /* @__PURE__ */ forwardRef6(({ children, classNames, ...props
|
|
|
809
981
|
var CardToolbarIconButton = Toolbar.IconButton;
|
|
810
982
|
var CardToolbarSeparator = Toolbar.Separator;
|
|
811
983
|
var CardDragHandle = /* @__PURE__ */ forwardRef6(({ toolbarItem }, forwardedRef) => {
|
|
812
|
-
var _effect =
|
|
984
|
+
var _effect = _useSignals10();
|
|
813
985
|
try {
|
|
814
986
|
const { t } = useTranslation2(translationKey);
|
|
815
987
|
const Root = toolbarItem ? Toolbar.IconButton : IconButton;
|
|
816
|
-
return /* @__PURE__ */
|
|
988
|
+
return /* @__PURE__ */ React10.createElement(Root, {
|
|
817
989
|
iconOnly: true,
|
|
818
990
|
icon: "ph--dots-six-vertical--regular",
|
|
819
991
|
variant: "ghost",
|
|
@@ -828,22 +1000,25 @@ var CardDragHandle = /* @__PURE__ */ forwardRef6(({ toolbarItem }, forwardedRef)
|
|
|
828
1000
|
var CardDragPreview = StackItem.DragPreview;
|
|
829
1001
|
var CardMenu = Primitive.div;
|
|
830
1002
|
var CardPoster = (props) => {
|
|
831
|
-
var _effect =
|
|
1003
|
+
var _effect = _useSignals10();
|
|
832
1004
|
try {
|
|
833
1005
|
const aspect = props.aspect === "auto" ? "aspect-auto" : "aspect-video";
|
|
834
1006
|
if (props.image) {
|
|
835
|
-
return /* @__PURE__ */
|
|
836
|
-
|
|
1007
|
+
return /* @__PURE__ */ React10.createElement(Image, {
|
|
1008
|
+
classNames: [
|
|
1009
|
+
`dx-card__poster is-full __bs-auto`,
|
|
1010
|
+
aspect
|
|
1011
|
+
],
|
|
837
1012
|
src: props.image,
|
|
838
1013
|
alt: props.alt
|
|
839
1014
|
});
|
|
840
1015
|
}
|
|
841
1016
|
if (props.icon) {
|
|
842
|
-
return /* @__PURE__ */
|
|
1017
|
+
return /* @__PURE__ */ React10.createElement("div", {
|
|
843
1018
|
role: "image",
|
|
844
|
-
className: `dx-card__poster grid
|
|
1019
|
+
className: mx7(`dx-card__poster grid place-items-center bg-inputSurface text-subdued`, aspect),
|
|
845
1020
|
"aria-label": props.alt
|
|
846
|
-
}, /* @__PURE__ */
|
|
1021
|
+
}, /* @__PURE__ */ React10.createElement(Icon2, {
|
|
847
1022
|
icon: props.icon,
|
|
848
1023
|
size: 10
|
|
849
1024
|
}));
|
|
@@ -853,7 +1028,7 @@ var CardPoster = (props) => {
|
|
|
853
1028
|
}
|
|
854
1029
|
};
|
|
855
1030
|
var CardChrome = /* @__PURE__ */ forwardRef6(({ children, classNames, asChild, role = "none", ...props }, forwardedRef) => {
|
|
856
|
-
var _effect =
|
|
1031
|
+
var _effect = _useSignals10();
|
|
857
1032
|
try {
|
|
858
1033
|
const Root = asChild ? Slot3 : "div";
|
|
859
1034
|
const rootProps = asChild ? {
|
|
@@ -862,10 +1037,10 @@ var CardChrome = /* @__PURE__ */ forwardRef6(({ children, classNames, asChild, r
|
|
|
862
1037
|
classNames
|
|
863
1038
|
]
|
|
864
1039
|
} : {
|
|
865
|
-
className:
|
|
1040
|
+
className: mx7(cardChrome, classNames),
|
|
866
1041
|
role
|
|
867
1042
|
};
|
|
868
|
-
return /* @__PURE__ */
|
|
1043
|
+
return /* @__PURE__ */ React10.createElement(Root, {
|
|
869
1044
|
...props,
|
|
870
1045
|
...rootProps,
|
|
871
1046
|
ref: forwardedRef
|
|
@@ -875,19 +1050,19 @@ var CardChrome = /* @__PURE__ */ forwardRef6(({ children, classNames, asChild, r
|
|
|
875
1050
|
}
|
|
876
1051
|
});
|
|
877
1052
|
var CardText = /* @__PURE__ */ forwardRef6(({ children, classNames, asChild, role = "none", ...props }, forwardedRef) => {
|
|
878
|
-
var _effect =
|
|
1053
|
+
var _effect = _useSignals10();
|
|
879
1054
|
try {
|
|
880
|
-
const Root = asChild ? Slot3 : "
|
|
1055
|
+
const Root = asChild ? Slot3 : "div";
|
|
881
1056
|
const rootProps = asChild ? {
|
|
882
1057
|
classNames: [
|
|
883
1058
|
cardText,
|
|
884
1059
|
classNames
|
|
885
1060
|
]
|
|
886
1061
|
} : {
|
|
887
|
-
className:
|
|
1062
|
+
className: mx7(cardText, classNames),
|
|
888
1063
|
role
|
|
889
1064
|
};
|
|
890
|
-
return /* @__PURE__ */
|
|
1065
|
+
return /* @__PURE__ */ React10.createElement(Root, {
|
|
891
1066
|
...props,
|
|
892
1067
|
...rootProps,
|
|
893
1068
|
ref: forwardedRef
|
|
@@ -912,13 +1087,13 @@ var Card = {
|
|
|
912
1087
|
};
|
|
913
1088
|
|
|
914
1089
|
// src/exemplars/Card/CardDragPreview.tsx
|
|
915
|
-
import { useSignals as
|
|
916
|
-
import
|
|
917
|
-
import { mx as
|
|
1090
|
+
import { useSignals as _useSignals11 } from "@preact-signals/safe-react/tracking";
|
|
1091
|
+
import React11 from "react";
|
|
1092
|
+
import { mx as mx8 } from "@dxos/react-ui-theme";
|
|
918
1093
|
var CardDragPreviewRoot = ({ children }) => {
|
|
919
|
-
var _effect =
|
|
1094
|
+
var _effect = _useSignals11();
|
|
920
1095
|
try {
|
|
921
|
-
return /* @__PURE__ */
|
|
1096
|
+
return /* @__PURE__ */ React11.createElement("div", {
|
|
922
1097
|
className: "p-2"
|
|
923
1098
|
}, children);
|
|
924
1099
|
} finally {
|
|
@@ -926,10 +1101,10 @@ var CardDragPreviewRoot = ({ children }) => {
|
|
|
926
1101
|
}
|
|
927
1102
|
};
|
|
928
1103
|
var CardDragPreviewContent = ({ children }) => {
|
|
929
|
-
var _effect =
|
|
1104
|
+
var _effect = _useSignals11();
|
|
930
1105
|
try {
|
|
931
|
-
return /* @__PURE__ */
|
|
932
|
-
className:
|
|
1106
|
+
return /* @__PURE__ */ React11.createElement("div", {
|
|
1107
|
+
className: mx8(cardRoot, "ring-focusLine ring-neutralFocusIndicator")
|
|
933
1108
|
}, children);
|
|
934
1109
|
} finally {
|
|
935
1110
|
_effect.f();
|
|
@@ -941,14 +1116,14 @@ var CardDragPreview2 = {
|
|
|
941
1116
|
};
|
|
942
1117
|
|
|
943
1118
|
// src/exemplars/CardStack/CardStack.tsx
|
|
944
|
-
import { useSignals as
|
|
1119
|
+
import { useSignals as _useSignals12 } from "@preact-signals/safe-react/tracking";
|
|
945
1120
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
946
|
-
import
|
|
947
|
-
import { mx as
|
|
1121
|
+
import React12, { forwardRef as forwardRef7 } from "react";
|
|
1122
|
+
import { mx as mx9 } from "@dxos/react-ui-theme";
|
|
948
1123
|
var CardStackStack = /* @__PURE__ */ forwardRef7(({ children, classNames, itemsCount = 0, ...props }, forwardedRef) => {
|
|
949
|
-
var _effect =
|
|
1124
|
+
var _effect = _useSignals12();
|
|
950
1125
|
try {
|
|
951
|
-
return /* @__PURE__ */
|
|
1126
|
+
return /* @__PURE__ */ React12.createElement(Stack, {
|
|
952
1127
|
orientation: "vertical",
|
|
953
1128
|
size: "contain",
|
|
954
1129
|
rail: false,
|
|
@@ -973,7 +1148,7 @@ var CardStackStack = /* @__PURE__ */ forwardRef7(({ children, classNames, itemsC
|
|
|
973
1148
|
var CardStackDragHandle = Card.DragHandle;
|
|
974
1149
|
var cardStackHeading = "mli-2 order-first bg-transparent rounded-bs-md flex items-center";
|
|
975
1150
|
var CardStackHeading = /* @__PURE__ */ forwardRef7(({ children, classNames, asChild, role = "heading", ...props }, forwardedRef) => {
|
|
976
|
-
var _effect =
|
|
1151
|
+
var _effect = _useSignals12();
|
|
977
1152
|
try {
|
|
978
1153
|
const Root = asChild ? Slot4 : "div";
|
|
979
1154
|
const rootProps = asChild ? {
|
|
@@ -982,10 +1157,10 @@ var CardStackHeading = /* @__PURE__ */ forwardRef7(({ children, classNames, asCh
|
|
|
982
1157
|
classNames
|
|
983
1158
|
]
|
|
984
1159
|
} : {
|
|
985
|
-
className:
|
|
1160
|
+
className: mx9(cardStackHeading, classNames),
|
|
986
1161
|
role
|
|
987
1162
|
};
|
|
988
|
-
return /* @__PURE__ */
|
|
1163
|
+
return /* @__PURE__ */ React12.createElement(Root, {
|
|
989
1164
|
...props,
|
|
990
1165
|
...rootProps,
|
|
991
1166
|
ref: forwardedRef
|
|
@@ -996,7 +1171,7 @@ var CardStackHeading = /* @__PURE__ */ forwardRef7(({ children, classNames, asCh
|
|
|
996
1171
|
});
|
|
997
1172
|
var cardStackFooter = 'plb-2 mli-2 border-bs border-transparent [[data-scroll-separator-end="true"]_&]:border-subduedSeparator';
|
|
998
1173
|
var CardStackFooter = /* @__PURE__ */ forwardRef7(({ children, classNames, asChild, role = "none", ...props }, forwardedRef) => {
|
|
999
|
-
var _effect =
|
|
1174
|
+
var _effect = _useSignals12();
|
|
1000
1175
|
try {
|
|
1001
1176
|
const Root = asChild ? Slot4 : "div";
|
|
1002
1177
|
const rootProps = asChild ? {
|
|
@@ -1005,10 +1180,10 @@ var CardStackFooter = /* @__PURE__ */ forwardRef7(({ children, classNames, asChi
|
|
|
1005
1180
|
classNames
|
|
1006
1181
|
]
|
|
1007
1182
|
} : {
|
|
1008
|
-
className:
|
|
1183
|
+
className: mx9(cardStackFooter, classNames),
|
|
1009
1184
|
role
|
|
1010
1185
|
};
|
|
1011
|
-
return /* @__PURE__ */
|
|
1186
|
+
return /* @__PURE__ */ React12.createElement(Root, {
|
|
1012
1187
|
...props,
|
|
1013
1188
|
...rootProps,
|
|
1014
1189
|
ref: forwardedRef
|
|
@@ -1022,7 +1197,7 @@ var cardStackContent = [
|
|
|
1022
1197
|
railGridHorizontalContainFitContent
|
|
1023
1198
|
];
|
|
1024
1199
|
var CardStackContent = /* @__PURE__ */ forwardRef7(({ children, classNames, asChild, role = "none", ...props }, forwardedRef) => {
|
|
1025
|
-
var _effect =
|
|
1200
|
+
var _effect = _useSignals12();
|
|
1026
1201
|
try {
|
|
1027
1202
|
const Root = asChild ? Slot4 : "div";
|
|
1028
1203
|
const rootProps = asChild ? {
|
|
@@ -1031,10 +1206,10 @@ var CardStackContent = /* @__PURE__ */ forwardRef7(({ children, classNames, asCh
|
|
|
1031
1206
|
classNames
|
|
1032
1207
|
]
|
|
1033
1208
|
} : {
|
|
1034
|
-
className:
|
|
1209
|
+
className: mx9(...cardStackContent, classNames),
|
|
1035
1210
|
role
|
|
1036
1211
|
};
|
|
1037
|
-
return /* @__PURE__ */
|
|
1212
|
+
return /* @__PURE__ */ React12.createElement(Root, {
|
|
1038
1213
|
...props,
|
|
1039
1214
|
...rootProps,
|
|
1040
1215
|
"data-scroll-separator": "false",
|
|
@@ -1046,7 +1221,7 @@ var CardStackContent = /* @__PURE__ */ forwardRef7(({ children, classNames, asCh
|
|
|
1046
1221
|
});
|
|
1047
1222
|
var cardStackRoot = "flex flex-col pli-2 plb-2";
|
|
1048
1223
|
var CardStackRoot = /* @__PURE__ */ forwardRef7(({ children, classNames, asChild, role = "none", ...props }, forwardedRef) => {
|
|
1049
|
-
var _effect =
|
|
1224
|
+
var _effect = _useSignals12();
|
|
1050
1225
|
try {
|
|
1051
1226
|
const Root = asChild ? Slot4 : "div";
|
|
1052
1227
|
const rootProps = asChild ? {
|
|
@@ -1055,10 +1230,10 @@ var CardStackRoot = /* @__PURE__ */ forwardRef7(({ children, classNames, asChild
|
|
|
1055
1230
|
classNames
|
|
1056
1231
|
]
|
|
1057
1232
|
} : {
|
|
1058
|
-
className:
|
|
1233
|
+
className: mx9(cardStackRoot, classNames),
|
|
1059
1234
|
role
|
|
1060
1235
|
};
|
|
1061
|
-
return /* @__PURE__ */
|
|
1236
|
+
return /* @__PURE__ */ React12.createElement(Root, {
|
|
1062
1237
|
...props,
|
|
1063
1238
|
...rootProps,
|
|
1064
1239
|
ref: forwardedRef
|
|
@@ -1069,7 +1244,7 @@ var CardStackRoot = /* @__PURE__ */ forwardRef7(({ children, classNames, asChild
|
|
|
1069
1244
|
});
|
|
1070
1245
|
var cardStackItem = "contain-layout pli-2 plb-1 first-of-type:pbs-0 last-of-type:pbe-0";
|
|
1071
1246
|
var CardStackItem = /* @__PURE__ */ forwardRef7(({ children, classNames, asChild, role = "none", ...props }, forwardedRef) => {
|
|
1072
|
-
var _effect =
|
|
1247
|
+
var _effect = _useSignals12();
|
|
1073
1248
|
try {
|
|
1074
1249
|
const Root = asChild ? Slot4 : "div";
|
|
1075
1250
|
const rootProps = asChild ? {
|
|
@@ -1078,10 +1253,10 @@ var CardStackItem = /* @__PURE__ */ forwardRef7(({ children, classNames, asChild
|
|
|
1078
1253
|
classNames
|
|
1079
1254
|
]
|
|
1080
1255
|
} : {
|
|
1081
|
-
className:
|
|
1256
|
+
className: mx9(cardStackItem, classNames),
|
|
1082
1257
|
role
|
|
1083
1258
|
};
|
|
1084
|
-
return /* @__PURE__ */
|
|
1259
|
+
return /* @__PURE__ */ React12.createElement(Root, {
|
|
1085
1260
|
...props,
|
|
1086
1261
|
...rootProps,
|
|
1087
1262
|
ref: forwardedRef
|
|
@@ -1101,16 +1276,16 @@ var CardStack = {
|
|
|
1101
1276
|
};
|
|
1102
1277
|
|
|
1103
1278
|
// src/exemplars/CardStack/CardStackDragPreview.tsx
|
|
1104
|
-
import { useSignals as
|
|
1105
|
-
import
|
|
1279
|
+
import { useSignals as _useSignals13 } from "@preact-signals/safe-react/tracking";
|
|
1280
|
+
import React13 from "react";
|
|
1106
1281
|
import { IconButton as IconButton2, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
1107
|
-
import { mx as
|
|
1282
|
+
import { mx as mx10 } from "@dxos/react-ui-theme";
|
|
1108
1283
|
var CardStackDragPreviewRoot = ({ children }) => {
|
|
1109
|
-
var _effect =
|
|
1284
|
+
var _effect = _useSignals13();
|
|
1110
1285
|
try {
|
|
1111
|
-
return /* @__PURE__ */
|
|
1286
|
+
return /* @__PURE__ */ React13.createElement("div", {
|
|
1112
1287
|
className: "p-2"
|
|
1113
|
-
}, /* @__PURE__ */
|
|
1288
|
+
}, /* @__PURE__ */ React13.createElement("div", {
|
|
1114
1289
|
className: "rounded-md max-bs-[calc(100dvh-1rem)] overflow-hidden bg-baseSurface border border-separator ring-focusLine ring-neutralFocusIndicator flex flex-col"
|
|
1115
1290
|
}, children));
|
|
1116
1291
|
} finally {
|
|
@@ -1118,12 +1293,12 @@ var CardStackDragPreviewRoot = ({ children }) => {
|
|
|
1118
1293
|
}
|
|
1119
1294
|
};
|
|
1120
1295
|
var CardStackDragPreviewHeading = ({ children }) => {
|
|
1121
|
-
var _effect =
|
|
1296
|
+
var _effect = _useSignals13();
|
|
1122
1297
|
try {
|
|
1123
1298
|
const { t } = useTranslation3(translationKey);
|
|
1124
|
-
return /* @__PURE__ */
|
|
1299
|
+
return /* @__PURE__ */ React13.createElement("div", {
|
|
1125
1300
|
className: "flex items-center p-2"
|
|
1126
|
-
}, /* @__PURE__ */
|
|
1301
|
+
}, /* @__PURE__ */ React13.createElement(IconButton2, {
|
|
1127
1302
|
iconOnly: true,
|
|
1128
1303
|
icon: "ph--dots-six-vertical--regular",
|
|
1129
1304
|
variant: "ghost",
|
|
@@ -1135,19 +1310,19 @@ var CardStackDragPreviewHeading = ({ children }) => {
|
|
|
1135
1310
|
}
|
|
1136
1311
|
};
|
|
1137
1312
|
var CardStackDragPreviewContent = ({ children, itemsCount = 0 }) => {
|
|
1138
|
-
var _effect =
|
|
1313
|
+
var _effect = _useSignals13();
|
|
1139
1314
|
try {
|
|
1140
|
-
return /* @__PURE__ */
|
|
1141
|
-
className:
|
|
1315
|
+
return /* @__PURE__ */ React13.createElement("div", {
|
|
1316
|
+
className: mx10("overflow-y-auto flex-1 pli-2 flex flex-col gap-2", "plb-1", itemsCount > 0 ? "plb-2" : "plb-1")
|
|
1142
1317
|
}, children);
|
|
1143
1318
|
} finally {
|
|
1144
1319
|
_effect.f();
|
|
1145
1320
|
}
|
|
1146
1321
|
};
|
|
1147
1322
|
var CardStackDragPreviewFooter = ({ children }) => {
|
|
1148
|
-
var _effect =
|
|
1323
|
+
var _effect = _useSignals13();
|
|
1149
1324
|
try {
|
|
1150
|
-
return /* @__PURE__ */
|
|
1325
|
+
return /* @__PURE__ */ React13.createElement("div", {
|
|
1151
1326
|
className: "p-2 border-t border-separator"
|
|
1152
1327
|
}, children);
|
|
1153
1328
|
} finally {
|
|
@@ -1162,6 +1337,7 @@ var CardStackDragPreview = {
|
|
|
1162
1337
|
};
|
|
1163
1338
|
|
|
1164
1339
|
export {
|
|
1340
|
+
Image,
|
|
1165
1341
|
StackContext,
|
|
1166
1342
|
railGridHorizontal,
|
|
1167
1343
|
railGridVertical,
|
|
@@ -1178,6 +1354,7 @@ export {
|
|
|
1178
1354
|
StackItem,
|
|
1179
1355
|
cardRoot,
|
|
1180
1356
|
cardSpacing,
|
|
1357
|
+
cardNoSpacing,
|
|
1181
1358
|
labelSpacing,
|
|
1182
1359
|
cardDialogContent,
|
|
1183
1360
|
cardDialogHeader,
|
|
@@ -1197,4 +1374,4 @@ export {
|
|
|
1197
1374
|
CardStack,
|
|
1198
1375
|
CardStackDragPreview
|
|
1199
1376
|
};
|
|
1200
|
-
//# sourceMappingURL=chunk-
|
|
1377
|
+
//# sourceMappingURL=chunk-HE3BRF7A.mjs.map
|