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