@dxos/react-ui-stack 0.8.4-main.f9ba587 → 0.8.4-main.fcfe5033a5
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/index.mjs +545 -1003
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{testing → playwright}/index.mjs +5 -1
- package/dist/lib/browser/{testing → playwright}/index.mjs.map +3 -3
- package/dist/lib/node-esm/index.mjs +545 -1003
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{testing → playwright}/index.mjs +5 -1
- package/dist/lib/node-esm/{testing → playwright}/index.mjs.map +3 -3
- package/dist/types/src/components/Stack/Stack.d.ts +13 -10
- package/dist/types/src/components/Stack/Stack.d.ts.map +1 -1
- package/dist/types/src/components/Stack/Stack.stories.d.ts +12 -3
- 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/MenuSignifier.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItem.d.ts +14 -17
- package/dist/types/src/components/StackItem/StackItem.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItem.stories.d.ts +13 -5
- package/dist/types/src/components/StackItem/StackItem.stories.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemContent.d.ts +4 -37
- package/dist/types/src/components/StackItem/StackItemContent.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemDragHandle.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemHeading.d.ts +2 -2
- package/dist/types/src/components/StackItem/StackItemHeading.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemResizeHandle.d.ts +1 -1
- package/dist/types/src/components/StackItem/StackItemResizeHandle.d.ts.map +1 -1
- package/dist/types/src/components/StackItem/StackItemSigil.d.ts +2 -2
- package/dist/types/src/components/StackItem/StackItemSigil.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/{defs.d.ts → types.d.ts} +1 -1
- package/dist/types/src/components/types.d.ts.map +1 -0
- package/dist/types/src/hooks/useStackDropForElements.d.ts +9 -7
- package/dist/types/src/hooks/useStackDropForElements.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/playwright/index.d.ts.map +1 -0
- package/dist/types/src/playwright/stack-manager.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +10 -10
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +48 -39
- package/src/components/Stack/Stack.stories.tsx +15 -18
- package/src/components/Stack/Stack.tsx +239 -53
- package/src/components/StackContext.tsx +2 -1
- package/src/components/StackItem/MenuSignifier.tsx +2 -9
- package/src/components/StackItem/StackItem.stories.tsx +22 -18
- package/src/components/StackItem/StackItem.tsx +61 -43
- package/src/components/StackItem/StackItemContent.tsx +25 -44
- package/src/components/StackItem/StackItemDragHandle.tsx +4 -3
- package/src/components/StackItem/StackItemHeading.tsx +17 -20
- package/src/components/StackItem/StackItemResizeHandle.tsx +2 -2
- package/src/components/StackItem/StackItemSigil.tsx +10 -7
- package/src/components/index.ts +2 -1
- package/src/hooks/useStackDropForElements.ts +61 -47
- package/src/index.ts +0 -3
- package/src/{testing → playwright}/index.ts +1 -1
- package/src/playwright/playwright.config.ts +1 -1
- package/src/playwright/smoke.spec.ts +1 -1
- package/src/translations.ts +9 -9
- package/dist/types/src/components/defs.d.ts.map +0 -1
- package/dist/types/src/components/deprecated/LayoutControls.d.ts +0 -19
- package/dist/types/src/components/deprecated/LayoutControls.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/Card.d.ts +0 -57
- package/dist/types/src/exemplars/Card/Card.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/Card.stories.d.ts +0 -13
- package/dist/types/src/exemplars/Card/Card.stories.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/CardDragPreview.d.ts +0 -6
- package/dist/types/src/exemplars/Card/CardDragPreview.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/fragments.d.ts +0 -12
- package/dist/types/src/exemplars/Card/fragments.d.ts.map +0 -1
- package/dist/types/src/exemplars/Card/index.d.ts +0 -4
- package/dist/types/src/exemplars/Card/index.d.ts.map +0 -1
- package/dist/types/src/exemplars/CardStack/CardStack.d.ts +0 -40
- package/dist/types/src/exemplars/CardStack/CardStack.d.ts.map +0 -1
- package/dist/types/src/exemplars/CardStack/CardStack.stories.d.ts +0 -9
- package/dist/types/src/exemplars/CardStack/CardStack.stories.d.ts.map +0 -1
- package/dist/types/src/exemplars/CardStack/CardStackDragPreview.d.ts +0 -9
- package/dist/types/src/exemplars/CardStack/CardStackDragPreview.d.ts.map +0 -1
- package/dist/types/src/exemplars/CardStack/index.d.ts +0 -3
- package/dist/types/src/exemplars/CardStack/index.d.ts.map +0 -1
- package/dist/types/src/exemplars/index.d.ts +0 -3
- package/dist/types/src/exemplars/index.d.ts.map +0 -1
- package/dist/types/src/testing/index.d.ts.map +0 -1
- package/dist/types/src/testing/stack-manager.d.ts.map +0 -1
- package/src/components/deprecated/LayoutControls.tsx +0 -109
- package/src/exemplars/Card/Card.stories.tsx +0 -78
- package/src/exemplars/Card/Card.tsx +0 -167
- package/src/exemplars/Card/CardDragPreview.tsx +0 -22
- package/src/exemplars/Card/fragments.ts +0 -23
- package/src/exemplars/Card/index.ts +0 -7
- package/src/exemplars/CardStack/CardStack.stories.tsx +0 -172
- package/src/exemplars/CardStack/CardStack.tsx +0 -136
- package/src/exemplars/CardStack/CardStackDragPreview.tsx +0 -61
- package/src/exemplars/CardStack/index.ts +0 -6
- package/src/exemplars/index.ts +0 -6
- /package/dist/types/src/{testing → playwright}/index.d.ts +0 -0
- /package/dist/types/src/{testing → playwright}/stack-manager.d.ts +0 -0
- /package/src/components/{defs.ts → types.ts} +0 -0
- /package/src/{testing → playwright}/stack-manager.ts +0 -0
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
|
|
3
3
|
// src/components/Stack/Stack.tsx
|
|
4
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
5
|
-
import { useArrowNavigationGroup } from "@fluentui/react-tabster";
|
|
6
4
|
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
7
|
-
import React, { Children, forwardRef, useState as useState2
|
|
8
|
-
import { ListItem } from "@dxos/react-ui";
|
|
9
|
-
import { mx } from "@dxos/
|
|
5
|
+
import React, { Children, forwardRef, useCallback, useEffect, useState as useState2 } from "react";
|
|
6
|
+
import { ListItem, useId } from "@dxos/react-ui";
|
|
7
|
+
import { mx } from "@dxos/ui-theme";
|
|
10
8
|
|
|
11
9
|
// src/hooks/useStackDropForElements.ts
|
|
12
|
-
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|
13
|
-
import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
14
10
|
import { autoScrollForElements } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element";
|
|
15
11
|
import { attachClosestEdge, extractClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
12
|
+
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|
13
|
+
import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
16
14
|
import { useLayoutEffect, useState } from "react";
|
|
17
|
-
var
|
|
15
|
+
var noop = () => {
|
|
16
|
+
};
|
|
17
|
+
var useStackDropForElements = ({ id, element, scrollElement = element, orientation, selfDroppable, onRearrange }) => {
|
|
18
18
|
const [dropping, setDropping] = useState(false);
|
|
19
19
|
useLayoutEffect(() => {
|
|
20
|
-
if (!element
|
|
20
|
+
if (!element) {
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
const acceptSourceType = orientation === "horizontal" ? "column" : "card";
|
|
24
|
-
return combine(dropTargetForElements({
|
|
24
|
+
return combine(selfDroppable ? dropTargetForElements({
|
|
25
25
|
element,
|
|
26
26
|
getData: ({ input, element: element2 }) => {
|
|
27
27
|
return attachClosestEdge({
|
|
@@ -54,16 +54,16 @@ var useStackDropForElements = ({ id, element, scrollElement = element, selfDropp
|
|
|
54
54
|
onRearrange(source.data, self.data, extractClosestEdge(self.data));
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
}), autoScrollForElements({
|
|
57
|
+
}) : noop, scrollElement ? autoScrollForElements({
|
|
58
58
|
element: scrollElement,
|
|
59
59
|
getAllowedAxis: () => orientation
|
|
60
|
-
}));
|
|
60
|
+
}) : noop);
|
|
61
61
|
}, [
|
|
62
|
+
id,
|
|
62
63
|
element,
|
|
63
64
|
scrollElement,
|
|
64
65
|
selfDroppable,
|
|
65
66
|
orientation,
|
|
66
|
-
id,
|
|
67
67
|
onRearrange
|
|
68
68
|
]);
|
|
69
69
|
return {
|
|
@@ -95,590 +95,615 @@ var StackItemContext = /* @__PURE__ */ createContext({
|
|
|
95
95
|
var useStackItem = () => useContext(StackItemContext);
|
|
96
96
|
|
|
97
97
|
// src/components/Stack/Stack.tsx
|
|
98
|
-
var railGridHorizontal = "grid-rows-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]";
|
|
99
|
-
var railGridVertical = "grid-cols-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]";
|
|
100
|
-
var
|
|
101
|
-
var
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
var railGridHorizontal = "grid-rows-[[rail-start]_var(--dx-rail-size)_[content-start]_1fr_[content-end]]";
|
|
99
|
+
var railGridVertical = "grid-cols-[[rail-start]_var(--dx-rail-size)_[content-start]_1fr_[content-end]]";
|
|
100
|
+
var PERPENDICULAR_FOCUS_THRESHHOLD = 128;
|
|
101
|
+
var scrollIntoViewAndFocus = (el, orientation) => {
|
|
102
|
+
el.scrollIntoView({
|
|
103
|
+
behavior: "instant",
|
|
104
|
+
[orientation === "vertical" ? "block" : "inline"]: "center"
|
|
105
|
+
});
|
|
106
|
+
return el.focus();
|
|
104
107
|
};
|
|
105
|
-
var Stack = /* @__PURE__ */ forwardRef(({ children, classNames, style, orientation = "vertical", rail = true, size = "intrinsic",
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
var Stack = /* @__PURE__ */ forwardRef(({ children, classNames, id, style, orientation = "vertical", rail = true, size = "intrinsic", itemsCount = Children.count(children), circularFocus, separatorOnScroll, getDropElement, onBlur, onKeyDown, onRearrange, ...props }, forwardedRef) => {
|
|
109
|
+
const stackId = useId("stack", id);
|
|
110
|
+
const [stackElement, stackRef] = useState2(null);
|
|
111
|
+
const [lastFocusedItem, setLastFocusedItem] = useState2();
|
|
112
|
+
const composedItemRef = composeRefs(stackRef, forwardedRef);
|
|
113
|
+
const selfDroppable = !!(itemsCount < 1 && onRearrange && id);
|
|
114
|
+
const { dropping } = useStackDropForElements({
|
|
115
|
+
id,
|
|
116
|
+
element: getDropElement && stackElement ? getDropElement(stackElement) : stackElement,
|
|
117
|
+
scrollElement: stackElement,
|
|
118
|
+
selfDroppable,
|
|
119
|
+
orientation,
|
|
120
|
+
onRearrange
|
|
121
|
+
});
|
|
122
|
+
const handleScroll = useCallback(() => {
|
|
123
|
+
if (stackElement && Number.isFinite(separatorOnScroll)) {
|
|
124
|
+
const scrollPosition = orientation === "horizontal" ? stackElement.scrollLeft : stackElement.scrollTop;
|
|
125
|
+
const scrollSize = orientation === "horizontal" ? stackElement.scrollWidth : stackElement.scrollHeight;
|
|
126
|
+
const clientSize = orientation === "horizontal" ? stackElement.clientWidth : stackElement.clientHeight;
|
|
127
|
+
const separatorHost = stackElement.closest("[data-scroll-separator]");
|
|
128
|
+
if (separatorHost) {
|
|
129
|
+
separatorHost.setAttribute("data-scroll-separator", String(scrollPosition > separatorOnScroll));
|
|
130
|
+
separatorHost.setAttribute("data-scroll-separator-end", String(scrollSize - (scrollPosition + clientSize) > separatorOnScroll));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}, [
|
|
134
|
+
stackElement,
|
|
135
|
+
separatorOnScroll,
|
|
136
|
+
orientation
|
|
137
|
+
]);
|
|
138
|
+
const handleBlur = useCallback((event) => {
|
|
139
|
+
if (event.target) {
|
|
140
|
+
const target = event.target;
|
|
141
|
+
const closestStackItem = target.closest(`[data-dx-item-id]`);
|
|
142
|
+
if (closestStackItem?.closest(`[data-dx-stack="${stackId}"]`)) {
|
|
143
|
+
setLastFocusedItem(closestStackItem?.getAttribute("data-dx-item-id") ?? void 0);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
onBlur?.(event);
|
|
147
|
+
}, [
|
|
148
|
+
stackId,
|
|
149
|
+
onBlur
|
|
150
|
+
]);
|
|
151
|
+
const handleKeyDown = useKeyDown(stackId, circularFocus, onKeyDown);
|
|
152
|
+
useEffect(() => {
|
|
153
|
+
if (!(stackElement && Number.isFinite(separatorOnScroll))) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const observer = new MutationObserver(() => {
|
|
157
|
+
handleScroll();
|
|
112
158
|
});
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
159
|
+
observer.observe(stackElement, {
|
|
160
|
+
childList: true,
|
|
161
|
+
subtree: true
|
|
162
|
+
});
|
|
163
|
+
return () => {
|
|
164
|
+
observer.disconnect();
|
|
116
165
|
};
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
166
|
+
}, [
|
|
167
|
+
stackElement,
|
|
168
|
+
handleScroll
|
|
169
|
+
]);
|
|
170
|
+
return /* @__PURE__ */ React.createElement(StackContext.Provider, {
|
|
171
|
+
value: {
|
|
172
|
+
stackId,
|
|
123
173
|
orientation,
|
|
174
|
+
rail,
|
|
175
|
+
size,
|
|
124
176
|
onRearrange
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
177
|
+
}
|
|
178
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
179
|
+
...props,
|
|
180
|
+
...Number.isFinite(separatorOnScroll) && {
|
|
181
|
+
onScroll: handleScroll
|
|
182
|
+
},
|
|
183
|
+
className: mx("relative grid [--stack-gap:var(--spacing-trim-xs)]", size === "contain" && (orientation === "horizontal" ? "overflow-x-auto overscroll-x-contain min-h-0 max-h-full h-full" : "overflow-y-auto min-w-0 max-w-full w-full"), rail ? orientation === "horizontal" ? railGridHorizontal : railGridVertical : orientation === "horizontal" ? "grid-rows-1 px-(--stack-gap)" : "grid-cols-1 py-(--stack-gap)", classNames),
|
|
184
|
+
style: {
|
|
185
|
+
[orientation === "horizontal" ? "gridTemplateColumns" : "gridTemplateRows"]: size === "split" ? `repeat(${itemsCount}, 1fr)` : `repeat(${itemsCount}, min-content) [tabster-dummies] 0`,
|
|
186
|
+
...style
|
|
187
|
+
},
|
|
188
|
+
"aria-orientation": orientation,
|
|
189
|
+
"data-dx-stack": stackId,
|
|
190
|
+
"data-dx-stack-circular-focus": circularFocus,
|
|
191
|
+
"data-dx-last-focused-item": lastFocusedItem,
|
|
192
|
+
"data-rail": rail,
|
|
193
|
+
onBlur: handleBlur,
|
|
194
|
+
onKeyDown: handleKeyDown,
|
|
195
|
+
ref: composedItemRef
|
|
196
|
+
}, children, selfDroppable && dropping && /* @__PURE__ */ React.createElement(ListItem.DropIndicator, {
|
|
197
|
+
lineInset: 8,
|
|
198
|
+
terminalInset: -8,
|
|
199
|
+
gap: -8,
|
|
200
|
+
edge: orientation === "horizontal" ? "left" : "top"
|
|
201
|
+
})));
|
|
202
|
+
});
|
|
203
|
+
var useKeyDown = (stackId, circularFocus, onKeyDown) => useCallback((event) => {
|
|
204
|
+
const target = event.target;
|
|
205
|
+
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)}"]`)) {
|
|
206
|
+
const closestOwnedItem = target.closest(`[data-dx-stack-item="${stackId}"]`);
|
|
207
|
+
const closestStack = target.closest("[data-dx-stack]");
|
|
208
|
+
const closestStackItems = Array.from(closestStack?.querySelectorAll(`[data-dx-stack-item="${stackId}"]`) ?? []);
|
|
209
|
+
const closestStackOrientation = closestStack?.getAttribute("aria-orientation");
|
|
210
|
+
const ancestorStack = closestStack?.parentElement?.closest("[data-dx-stack]");
|
|
211
|
+
if (closestOwnedItem && closestStack) {
|
|
212
|
+
const ancestorOrientation = ancestorStack?.getAttribute("aria-orientation");
|
|
213
|
+
const parallelDelta = (closestStackOrientation === "vertical" ? event.key === "ArrowUp" : event.key === "ArrowLeft") ? -1 : (closestStackOrientation === "vertical" ? event.key === "ArrowDown" : event.key === "ArrowRight") ? 1 : 0;
|
|
214
|
+
const perpendicularDelta = (closestStackOrientation === "vertical" ? event.key === "ArrowLeft" : event.key === "ArrowUp") ? -1 : (closestStackOrientation === "vertical" ? event.key === "ArrowRight" : event.key === "ArrowDown") ? 1 : 0;
|
|
215
|
+
if (parallelDelta !== 0) {
|
|
216
|
+
const currentIndex = closestStackItems.indexOf(closestOwnedItem);
|
|
217
|
+
const nextIndex = currentIndex + parallelDelta;
|
|
218
|
+
let adjacentItem;
|
|
219
|
+
if (circularFocus) {
|
|
220
|
+
adjacentItem = closestStackItems[(nextIndex + closestStackItems.length) % closestStackItems.length];
|
|
221
|
+
} else {
|
|
222
|
+
if (nextIndex >= 0 && nextIndex < closestStackItems.length) {
|
|
223
|
+
adjacentItem = closestStackItems[nextIndex];
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (adjacentItem) {
|
|
227
|
+
event.preventDefault();
|
|
228
|
+
scrollIntoViewAndFocus(adjacentItem, closestStackOrientation);
|
|
135
229
|
}
|
|
136
230
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
231
|
+
if (perpendicularDelta !== 0) {
|
|
232
|
+
if (ancestorStack && ancestorOrientation !== closestStackOrientation) {
|
|
233
|
+
const siblingStacks = Array.from(ancestorStack.querySelectorAll(`[data-dx-stack-item="${ancestorStack.getAttribute("data-dx-stack")}"] [data-dx-stack]`));
|
|
234
|
+
const currentStackIndex = siblingStacks.indexOf(closestStack);
|
|
235
|
+
const nextStackIndex = currentStackIndex + perpendicularDelta;
|
|
236
|
+
let adjacentStack;
|
|
237
|
+
if (ancestorStack.getAttribute("data-dx-stack-circular-focus") === "true") {
|
|
238
|
+
adjacentStack = siblingStacks[(nextStackIndex + siblingStacks.length) % siblingStacks.length];
|
|
239
|
+
} else {
|
|
240
|
+
if (nextStackIndex >= 0 && nextStackIndex < siblingStacks.length) {
|
|
241
|
+
adjacentStack = siblingStacks[nextStackIndex];
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
const adjacentStackSelfItem = adjacentStack?.closest(`[data-dx-stack-item=${ancestorStack.getAttribute("data-dx-stack")}]`);
|
|
245
|
+
const adjacentStackItems = adjacentStack ? Array.from(adjacentStack.querySelectorAll(`[data-dx-stack-item="${adjacentStack.getAttribute("data-dx-stack")}"]`)) : [];
|
|
246
|
+
if (adjacentStack && adjacentStackItems.length > 0) {
|
|
247
|
+
let closestItem = adjacentStackItems[0];
|
|
248
|
+
const lastFocusedItem = adjacentStack.querySelector(`[data-dx-item-id="${adjacentStack.getAttribute("data-dx-last-focused-item") ?? "never"}"]`);
|
|
249
|
+
if (lastFocusedItem) {
|
|
250
|
+
closestItem = lastFocusedItem;
|
|
251
|
+
} else {
|
|
252
|
+
const ownedItemRect = closestOwnedItem.getBoundingClientRect();
|
|
253
|
+
const targetPosition = closestStackOrientation === "vertical" ? ownedItemRect.top : ownedItemRect.left;
|
|
254
|
+
let closestDistance = Infinity;
|
|
255
|
+
for (const item of adjacentStackItems) {
|
|
256
|
+
const itemRect = item.getBoundingClientRect();
|
|
257
|
+
const itemPosition = closestStackOrientation === "vertical" ? itemRect.top : itemRect.left;
|
|
258
|
+
const distance = Math.abs(itemPosition - targetPosition);
|
|
259
|
+
if (distance < closestDistance) {
|
|
260
|
+
closestDistance = distance;
|
|
261
|
+
closestItem = item;
|
|
262
|
+
}
|
|
263
|
+
if (closestDistance <= PERPENDICULAR_FOCUS_THRESHHOLD) {
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
event.preventDefault();
|
|
269
|
+
scrollIntoViewAndFocus(closestItem, closestStackOrientation);
|
|
270
|
+
} else if (adjacentStackSelfItem) {
|
|
271
|
+
event.preventDefault();
|
|
272
|
+
scrollIntoViewAndFocus(adjacentStackSelfItem, ancestorOrientation);
|
|
273
|
+
}
|
|
274
|
+
} else if (closestOwnedItem) {
|
|
275
|
+
const closestOwnedItemStack = closestOwnedItem.querySelector("[data-dx-stack]");
|
|
276
|
+
const closestOwnedItemStackItems = closestOwnedItemStack ? Array.from(closestOwnedItemStack.querySelectorAll(`[data-dx-stack-item="${closestOwnedItemStack.getAttribute("data-dx-stack")}"]`)) : [];
|
|
277
|
+
if (closestOwnedItemStackItems.length > 0) {
|
|
278
|
+
event.preventDefault();
|
|
279
|
+
scrollIntoViewAndFocus(closestOwnedItemStackItems[[
|
|
280
|
+
"ArrowUp",
|
|
281
|
+
"ArrowLeft"
|
|
282
|
+
].includes(event.key) ? closestOwnedItemStackItems.length - 1 : 0], closestOwnedItemStack?.getAttribute("aria-orientation"));
|
|
283
|
+
}
|
|
284
|
+
}
|
|
191
285
|
}
|
|
192
|
-
}
|
|
193
|
-
lineInset: 8,
|
|
194
|
-
terminalInset: -8,
|
|
195
|
-
gap: -8,
|
|
196
|
-
edge: orientation === "horizontal" ? "left" : "top"
|
|
197
|
-
})));
|
|
198
|
-
} finally {
|
|
199
|
-
_effect.f();
|
|
286
|
+
}
|
|
200
287
|
}
|
|
201
|
-
|
|
288
|
+
onKeyDown?.(event);
|
|
289
|
+
}, [
|
|
290
|
+
onKeyDown,
|
|
291
|
+
stackId,
|
|
292
|
+
circularFocus
|
|
293
|
+
]);
|
|
202
294
|
|
|
203
295
|
// src/components/StackItem/StackItem.tsx
|
|
204
|
-
import {
|
|
296
|
+
import { attachClosestEdge as attachClosestEdge2, extractClosestEdge as extractClosestEdge2 } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
|
|
205
297
|
import { combine as combine2 } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|
206
298
|
import { draggable, dropTargetForElements as dropTargetForElements2 } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
207
299
|
import { preserveOffsetOnSource } from "@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source";
|
|
208
300
|
import { setCustomNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview";
|
|
209
|
-
import {
|
|
210
|
-
import { useFocusableGroup as useFocusableGroup2 } from "@fluentui/react-tabster";
|
|
301
|
+
import { useFocusableGroup } from "@fluentui/react-tabster";
|
|
211
302
|
import { composeRefs as composeRefs2 } from "@radix-ui/react-compose-refs";
|
|
212
|
-
import React8, { forwardRef as forwardRef5,
|
|
303
|
+
import React8, { forwardRef as forwardRef5, useCallback as useCallback2, useLayoutEffect as useLayoutEffect2, useMemo as useMemo2, useState as useState4 } from "react";
|
|
213
304
|
import { createPortal } from "react-dom";
|
|
214
305
|
import { ListItem as ListItem2 } from "@dxos/react-ui";
|
|
215
306
|
import { resizeAttributes, sizeStyle } from "@dxos/react-ui-dnd";
|
|
216
|
-
import { mx as mx5 } from "@dxos/
|
|
307
|
+
import { mx as mx5 } from "@dxos/ui-theme";
|
|
217
308
|
|
|
218
309
|
// src/components/StackItem/StackItemContent.tsx
|
|
219
|
-
import {
|
|
220
|
-
import
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
return /* @__PURE__ */ React2.createElement("div", {
|
|
243
|
-
role: "none",
|
|
244
|
-
...props,
|
|
245
|
-
className: mx2("group grid grid-cols-[100%]", 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),
|
|
246
|
-
style,
|
|
247
|
-
"data-popover-collision-boundary": true,
|
|
248
|
-
ref: forwardedRef
|
|
249
|
-
}, children);
|
|
250
|
-
} finally {
|
|
251
|
-
_effect.f();
|
|
252
|
-
}
|
|
310
|
+
import React2, { forwardRef as forwardRef2, useMemo } from "react";
|
|
311
|
+
import { mx as mx2 } from "@dxos/ui-theme";
|
|
312
|
+
var StackItemContent = /* @__PURE__ */ forwardRef2(({ classNames, children, toolbar, statusbar, ...props }, forwardedRef) => {
|
|
313
|
+
const { size: stackItemSize } = useStack();
|
|
314
|
+
const { role } = useStackItem();
|
|
315
|
+
const style = useMemo(() => ({
|
|
316
|
+
gridTemplateRows: [
|
|
317
|
+
toolbar && role === "section" ? "calc(var(--dx-toolbar-size) - 1px)" : "var(--dx-toolbar-size)",
|
|
318
|
+
"1fr",
|
|
319
|
+
statusbar && "var(--dx-statusbar-size)"
|
|
320
|
+
].filter(Boolean).join(" ")
|
|
321
|
+
}), [
|
|
322
|
+
toolbar,
|
|
323
|
+
statusbar
|
|
324
|
+
]);
|
|
325
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
326
|
+
...props,
|
|
327
|
+
role: "none",
|
|
328
|
+
style,
|
|
329
|
+
className: mx2("group grid grid-cols-[100%] dx-density-coarse", stackItemSize === "contain" && "min-h-0 overflow-hidden", toolbar && role === "section" && "[&_.dx-toolbar]:sticky [&_.dx-toolbar]:z-[1] [&_.dx-toolbar]:top-0 [&_.dx-toolbar]:-mb-px [&_.dx-toolbar]:min-w-0", toolbar && "[&>.dx-toolbar]:relative [&>.dx-toolbar]:border-b [&>.dx-toolbar]:border-subdued-separator", classNames),
|
|
330
|
+
"data-popover-collision-boundary": true,
|
|
331
|
+
ref: forwardedRef
|
|
332
|
+
}, children);
|
|
253
333
|
});
|
|
334
|
+
StackItemContent.displayName = "StackItemContent";
|
|
254
335
|
|
|
255
336
|
// src/components/StackItem/StackItemDragHandle.tsx
|
|
256
|
-
import {
|
|
337
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
257
338
|
import { Slot } from "@radix-ui/react-slot";
|
|
258
339
|
import React3 from "react";
|
|
259
340
|
var StackItemDragHandle = ({ asChild, children }) => {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
role: "button"
|
|
267
|
-
}, children);
|
|
268
|
-
} finally {
|
|
269
|
-
_effect.f();
|
|
270
|
-
}
|
|
341
|
+
const { selfDragHandleRef } = useStackItem();
|
|
342
|
+
const Comp = asChild ? Slot : Primitive.div;
|
|
343
|
+
return /* @__PURE__ */ React3.createElement(Comp, {
|
|
344
|
+
ref: selfDragHandleRef,
|
|
345
|
+
role: "button"
|
|
346
|
+
}, children);
|
|
271
347
|
};
|
|
272
348
|
|
|
273
349
|
// src/components/StackItem/StackItemHeading.tsx
|
|
274
|
-
import {
|
|
275
|
-
import { useFocusableGroup } from "@fluentui/react-tabster";
|
|
350
|
+
import { Primitive as Primitive2 } from "@radix-ui/react-primitive";
|
|
276
351
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
277
352
|
import React4, { forwardRef as forwardRef3 } from "react";
|
|
278
353
|
import { useAttention } from "@dxos/react-ui-attention";
|
|
279
|
-
import { mx as mx3 } from "@dxos/
|
|
280
|
-
var StackItemHeading = ({ children, classNames, asChild, separateOnScroll, ...props }) => {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
return /* @__PURE__ */ React4.createElement(Root, {
|
|
289
|
-
role: "heading",
|
|
290
|
-
...props,
|
|
291
|
-
tabIndex: 0,
|
|
292
|
-
...focusableGroupAttrs,
|
|
293
|
-
className: mx3("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)
|
|
294
|
-
}, children);
|
|
295
|
-
} finally {
|
|
296
|
-
_effect.f();
|
|
297
|
-
}
|
|
354
|
+
import { mx as mx3 } from "@dxos/ui-theme";
|
|
355
|
+
var StackItemHeading = ({ children, classNames, asChild, separateOnScroll, role, ...props }) => {
|
|
356
|
+
const { orientation } = useStack();
|
|
357
|
+
const Comp = asChild ? Slot2 : Primitive2.div;
|
|
358
|
+
return /* @__PURE__ */ React4.createElement(Comp, {
|
|
359
|
+
...props,
|
|
360
|
+
role: role ?? "heading",
|
|
361
|
+
className: mx3("flex items-center border-x-0! bg-header-surface", separateOnScroll ? 'border-transparent [[data-scroll-separator="true"]_&]:border-subdued-separator' : "border-subdued-separator", orientation === "horizontal" ? "h-(--dx-rail-size)" : "w-(--dx-rail-size) flex-col", orientation === "horizontal" ? "border-b" : "border-e", classNames)
|
|
362
|
+
}, children);
|
|
298
363
|
};
|
|
299
364
|
var StackItemHeadingStickyContent = ({ children }) => {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
className: "sticky block-start-0 bg-[--sticky-bg] p-1 is-full"
|
|
305
|
-
}, children);
|
|
306
|
-
} finally {
|
|
307
|
-
_effect.f();
|
|
308
|
-
}
|
|
365
|
+
return /* @__PURE__ */ React4.createElement("div", {
|
|
366
|
+
role: "none",
|
|
367
|
+
className: "sticky top-0 bg-(--sticky-bg) p-1 w-full"
|
|
368
|
+
}, children);
|
|
309
369
|
};
|
|
310
370
|
var StackItemHeadingLabel = /* @__PURE__ */ forwardRef3(({ attendableId, related, classNames, ...props }, forwardedRef) => {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
ref: forwardedRef
|
|
319
|
-
});
|
|
320
|
-
} finally {
|
|
321
|
-
_effect.f();
|
|
322
|
-
}
|
|
371
|
+
const { hasAttention, isAncestor, isRelated } = useAttention(attendableId);
|
|
372
|
+
return /* @__PURE__ */ React4.createElement("h1", {
|
|
373
|
+
...props,
|
|
374
|
+
"data-attention": (related && isRelated || hasAttention || isAncestor).toString(),
|
|
375
|
+
className: mx3("px-1 min-w-0 w-0 grow truncate font-medium text-base-surface-text data-[attention=true]:text-accent-text self-center", classNames),
|
|
376
|
+
ref: forwardedRef
|
|
377
|
+
});
|
|
323
378
|
});
|
|
324
379
|
|
|
325
380
|
// src/components/StackItem/StackItemResizeHandle.tsx
|
|
326
|
-
import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
|
|
327
381
|
import React5 from "react";
|
|
328
382
|
import { ResizeHandle } from "@dxos/react-ui-dnd";
|
|
329
383
|
var MIN_WIDTH = 20;
|
|
330
384
|
var MIN_HEIGHT = 3;
|
|
331
|
-
var StackItemResizeHandle = () => {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
onSizeChange: setSize
|
|
342
|
-
});
|
|
343
|
-
} finally {
|
|
344
|
-
_effect.f();
|
|
345
|
-
}
|
|
385
|
+
var StackItemResizeHandle = (_) => {
|
|
386
|
+
const { orientation } = useStack();
|
|
387
|
+
const { setSize, size } = useStackItem();
|
|
388
|
+
return /* @__PURE__ */ React5.createElement(ResizeHandle, {
|
|
389
|
+
side: orientation === "horizontal" ? "inline-end" : "block-end",
|
|
390
|
+
fallbackSize: DEFAULT_EXTRINSIC_SIZE,
|
|
391
|
+
minSize: orientation === "horizontal" ? MIN_WIDTH : MIN_HEIGHT,
|
|
392
|
+
size,
|
|
393
|
+
onSizeChange: setSize
|
|
394
|
+
});
|
|
346
395
|
};
|
|
347
396
|
|
|
348
397
|
// src/components/StackItem/StackItemSigil.tsx
|
|
349
|
-
import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
|
|
350
398
|
import React7, { Fragment, forwardRef as forwardRef4, useState as useState3 } from "react";
|
|
351
399
|
import { keySymbols } from "@dxos/keyboard";
|
|
352
400
|
import { Button, DropdownMenu, Icon, toLocalizedString, useTranslation } from "@dxos/react-ui";
|
|
353
401
|
import { useAttention as useAttention2 } from "@dxos/react-ui-attention";
|
|
354
|
-
import {
|
|
402
|
+
import { mx as mx4 } from "@dxos/ui-theme";
|
|
355
403
|
import { getHostPlatform } from "@dxos/util";
|
|
356
404
|
|
|
357
|
-
// src/components/StackItem/MenuSignifier.tsx
|
|
358
|
-
import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
|
|
359
|
-
import React6 from "react";
|
|
360
|
-
var MenuSignifierHorizontal = () => {
|
|
361
|
-
var _effect = _useSignals6();
|
|
362
|
-
try {
|
|
363
|
-
return /* @__PURE__ */ React6.createElement("svg", {
|
|
364
|
-
className: "absolute block-end-[7px]",
|
|
365
|
-
width: 20,
|
|
366
|
-
height: 2,
|
|
367
|
-
viewBox: "0 0 20 2",
|
|
368
|
-
stroke: "currentColor",
|
|
369
|
-
opacity: 0.5
|
|
370
|
-
}, /* @__PURE__ */ React6.createElement("line", {
|
|
371
|
-
x1: 0.5,
|
|
372
|
-
y1: 0.75,
|
|
373
|
-
x2: 19,
|
|
374
|
-
y2: 0.75,
|
|
375
|
-
strokeWidth: 1.25,
|
|
376
|
-
strokeLinecap: "round",
|
|
377
|
-
strokeDasharray: "6 20",
|
|
378
|
-
strokeDashoffset: "-6.5"
|
|
379
|
-
}));
|
|
380
|
-
} finally {
|
|
381
|
-
_effect.f();
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
|
-
|
|
385
405
|
// src/translations.ts
|
|
386
|
-
var translationKey = "react-ui-stack";
|
|
406
|
+
var translationKey = "@dxos/react-ui-stack";
|
|
387
407
|
var translations = [
|
|
388
408
|
{
|
|
389
409
|
"en-US": {
|
|
390
410
|
[translationKey]: {
|
|
391
|
-
"resize
|
|
392
|
-
"drag
|
|
393
|
-
"pin
|
|
394
|
-
"pin
|
|
395
|
-
"increment
|
|
396
|
-
"increment
|
|
397
|
-
"close
|
|
398
|
-
"minify
|
|
411
|
+
"resize.label": "Drag to resize",
|
|
412
|
+
"drag-handle.label": "Drag to rearrange",
|
|
413
|
+
"pin-start.label": "Pin to the left sidebar",
|
|
414
|
+
"pin-end.label": "Pin to the right sidebar",
|
|
415
|
+
"increment-start.label": "Move to the left",
|
|
416
|
+
"increment-end.label": "Move to the right",
|
|
417
|
+
"close.label": "Close",
|
|
418
|
+
"minify.label": "Minify"
|
|
399
419
|
}
|
|
400
420
|
}
|
|
401
421
|
}
|
|
402
422
|
];
|
|
403
423
|
|
|
424
|
+
// src/components/StackItem/MenuSignifier.tsx
|
|
425
|
+
import React6 from "react";
|
|
426
|
+
var MenuSignifierHorizontal = () => /* @__PURE__ */ React6.createElement("svg", {
|
|
427
|
+
className: "absolute bottom-[7px]",
|
|
428
|
+
width: 20,
|
|
429
|
+
height: 2,
|
|
430
|
+
viewBox: "0 0 20 2",
|
|
431
|
+
stroke: "currentColor",
|
|
432
|
+
opacity: 0.5
|
|
433
|
+
}, /* @__PURE__ */ React6.createElement("line", {
|
|
434
|
+
x1: 0.5,
|
|
435
|
+
y1: 0.75,
|
|
436
|
+
x2: 19,
|
|
437
|
+
y2: 0.75,
|
|
438
|
+
strokeWidth: 1.25,
|
|
439
|
+
strokeLinecap: "round",
|
|
440
|
+
strokeDasharray: "6 20",
|
|
441
|
+
strokeDashoffset: "-6.5"
|
|
442
|
+
}));
|
|
443
|
+
|
|
404
444
|
// src/components/StackItem/StackItemSigil.tsx
|
|
405
445
|
var StackItemSigilButton = /* @__PURE__ */ forwardRef4(({ attendableId, classNames, related, isMenu = true, children, ...props }, forwardedRef) => {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
classNames
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
ref: forwardedRef
|
|
418
|
-
}, isMenu && /* @__PURE__ */ React7.createElement(MenuSignifierHorizontal, null), children);
|
|
419
|
-
} finally {
|
|
420
|
-
_effect.f();
|
|
421
|
-
}
|
|
446
|
+
const { hasAttention, isAncestor, isRelated } = useAttention2(attendableId);
|
|
447
|
+
const variant = related && isRelated || hasAttention || isAncestor ? "primary" : "ghost";
|
|
448
|
+
return /* @__PURE__ */ React7.createElement(Button, {
|
|
449
|
+
...props,
|
|
450
|
+
variant,
|
|
451
|
+
classNames: [
|
|
452
|
+
"shrink-0 px-0 min-h-0 w-(--dx-rail-action) h-(--dx-rail-action) relative dx-app-no-drag",
|
|
453
|
+
classNames
|
|
454
|
+
],
|
|
455
|
+
ref: forwardedRef
|
|
456
|
+
}, isMenu && /* @__PURE__ */ React7.createElement(MenuSignifierHorizontal, null), children);
|
|
422
457
|
});
|
|
423
458
|
var StackItemSigil = /* @__PURE__ */ forwardRef4(({ actions: actionGroups, onAction, triggerLabel, attendableId, icon, related, children }, forwardedRef) => {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
onClick: (event) => {
|
|
464
|
-
if (action.properties.disabled) {
|
|
465
|
-
return;
|
|
466
|
-
}
|
|
467
|
-
event.stopPropagation();
|
|
468
|
-
setOptionsMenuOpen(false);
|
|
469
|
-
onAction?.(action);
|
|
470
|
-
},
|
|
471
|
-
classNames: "gap-2",
|
|
472
|
-
disabled: action.properties.disabled,
|
|
473
|
-
checked: menuItemType === "toggle" ? action.properties.isChecked : void 0,
|
|
474
|
-
...action.properties?.testId && {
|
|
475
|
-
"data-testid": action.properties.testId
|
|
459
|
+
const { t } = useTranslation(translationKey);
|
|
460
|
+
const [optionsMenuOpen, setOptionsMenuOpen] = useState3(false);
|
|
461
|
+
const hasActions = actionGroups && actionGroups.length > 0;
|
|
462
|
+
const button = /* @__PURE__ */ React7.createElement(StackItemSigilButton, {
|
|
463
|
+
attendableId,
|
|
464
|
+
related,
|
|
465
|
+
isMenu: hasActions,
|
|
466
|
+
// TODO(wittjosiah): Better disabling of interactive styles when no action are available.
|
|
467
|
+
// Remove underscore icon when no actions are available?
|
|
468
|
+
classNames: !hasActions && "cursor-default"
|
|
469
|
+
}, /* @__PURE__ */ React7.createElement("span", {
|
|
470
|
+
className: "sr-only"
|
|
471
|
+
}, triggerLabel), /* @__PURE__ */ React7.createElement(Icon, {
|
|
472
|
+
icon
|
|
473
|
+
}));
|
|
474
|
+
if (!hasActions) {
|
|
475
|
+
return button;
|
|
476
|
+
}
|
|
477
|
+
return /* @__PURE__ */ React7.createElement(DropdownMenu.Root, {
|
|
478
|
+
open: optionsMenuOpen,
|
|
479
|
+
onOpenChange: setOptionsMenuOpen
|
|
480
|
+
}, /* @__PURE__ */ React7.createElement(DropdownMenu.Trigger, {
|
|
481
|
+
asChild: true,
|
|
482
|
+
ref: forwardedRef
|
|
483
|
+
}, button), /* @__PURE__ */ React7.createElement(DropdownMenu.Portal, null, /* @__PURE__ */ React7.createElement(DropdownMenu.Content, {
|
|
484
|
+
classNames: "z-[31]"
|
|
485
|
+
}, /* @__PURE__ */ React7.createElement(DropdownMenu.Viewport, null, actionGroups?.map((actions, index) => {
|
|
486
|
+
const separator = index > 0 ? /* @__PURE__ */ React7.createElement(DropdownMenu.Separator, null) : null;
|
|
487
|
+
return /* @__PURE__ */ React7.createElement(Fragment, {
|
|
488
|
+
key: index
|
|
489
|
+
}, separator, actions.map((action) => {
|
|
490
|
+
const shortcut = typeof action.properties.keyBinding === "string" ? action.properties.keyBinding : action.properties.keyBinding?.[getHostPlatform()];
|
|
491
|
+
const menuItemType = action.properties.menuItemType;
|
|
492
|
+
const Root = menuItemType === "toggle" ? DropdownMenu.CheckboxItem : DropdownMenu.Item;
|
|
493
|
+
return /* @__PURE__ */ React7.createElement(Root, {
|
|
494
|
+
key: action.id,
|
|
495
|
+
onClick: (event) => {
|
|
496
|
+
if (action.properties.disabled) {
|
|
497
|
+
return;
|
|
476
498
|
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
})
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
499
|
+
event.stopPropagation();
|
|
500
|
+
setOptionsMenuOpen(false);
|
|
501
|
+
onAction?.(action);
|
|
502
|
+
},
|
|
503
|
+
classNames: "gap-2",
|
|
504
|
+
disabled: action.properties.disabled,
|
|
505
|
+
checked: menuItemType === "toggle" ? action.properties.isChecked : void 0,
|
|
506
|
+
...action.properties?.testId && {
|
|
507
|
+
"data-testid": action.properties.testId
|
|
508
|
+
}
|
|
509
|
+
}, /* @__PURE__ */ React7.createElement(Icon, {
|
|
510
|
+
icon: action.properties.icon ?? "ph--placeholder--regular",
|
|
511
|
+
size: 4
|
|
512
|
+
}), /* @__PURE__ */ React7.createElement("span", {
|
|
513
|
+
className: "grow truncate"
|
|
514
|
+
}, toLocalizedString(action.properties.label ?? "", t)), menuItemType === "toggle" && /* @__PURE__ */ React7.createElement(DropdownMenu.ItemIndicator, {
|
|
515
|
+
asChild: true
|
|
516
|
+
}, /* @__PURE__ */ React7.createElement(Icon, {
|
|
517
|
+
icon: "ph--check--regular",
|
|
518
|
+
size: 4
|
|
519
|
+
})), shortcut && /* @__PURE__ */ React7.createElement("span", {
|
|
520
|
+
className: mx4("shrink-0", "text-description")
|
|
521
|
+
}, keySymbols(shortcut).join("")));
|
|
522
|
+
}));
|
|
523
|
+
}), children), /* @__PURE__ */ React7.createElement(DropdownMenu.Arrow, null))));
|
|
495
524
|
});
|
|
496
525
|
|
|
497
526
|
// src/components/StackItem/StackItem.tsx
|
|
498
|
-
var DEFAULT_HORIZONTAL_SIZE = 48;
|
|
499
527
|
var DEFAULT_VERTICAL_SIZE = "min-content";
|
|
528
|
+
var DEFAULT_HORIZONTAL_SIZE = 50;
|
|
500
529
|
var DEFAULT_EXTRINSIC_SIZE = DEFAULT_HORIZONTAL_SIZE;
|
|
501
|
-
var StackItemRoot = /* @__PURE__ */ forwardRef5(({
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
530
|
+
var StackItemRoot = /* @__PURE__ */ forwardRef5(({ classNames, children, style, role, item, order, prevSiblingId, nextSiblingId, size: sizeProp, onSizeChange, disableRearrange, focusIndicatorVariant = "over-all", ...props }, forwardedRef) => {
|
|
531
|
+
const [itemElement, itemRef] = useState4(null);
|
|
532
|
+
const composedItemRef = composeRefs2(itemRef, forwardedRef);
|
|
533
|
+
const [selfDragHandleElement, selfDragHandleRef] = useState4(null);
|
|
534
|
+
const [closestEdge, setEdge] = useState4(null);
|
|
535
|
+
const [sourceId, setSourceId] = useState4(null);
|
|
536
|
+
const [dragState, setDragState] = useState4(idle);
|
|
537
|
+
const { orientation, rail, onRearrange, size: stackSize, stackId } = useStack();
|
|
538
|
+
const [size = orientation === "horizontal" ? DEFAULT_HORIZONTAL_SIZE : DEFAULT_VERTICAL_SIZE, setInternalSize] = useState4(sizeProp);
|
|
539
|
+
const Root = role ?? "div";
|
|
540
|
+
const setSize = useCallback2((nextSize, commit) => {
|
|
541
|
+
setInternalSize(nextSize);
|
|
542
|
+
if (commit) {
|
|
543
|
+
onSizeChange?.(nextSize);
|
|
544
|
+
}
|
|
545
|
+
}, [
|
|
546
|
+
onSizeChange
|
|
547
|
+
]);
|
|
548
|
+
const type = orientation === "horizontal" ? "column" : "card";
|
|
549
|
+
useLayoutEffect2(() => {
|
|
550
|
+
if (!itemElement || !onRearrange || disableRearrange) {
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
return combine2(draggable({
|
|
554
|
+
element: itemElement,
|
|
555
|
+
...selfDragHandleElement && {
|
|
556
|
+
dragHandle: selfDragHandleElement
|
|
557
|
+
},
|
|
558
|
+
getInitialData: () => ({
|
|
559
|
+
id: item.id,
|
|
560
|
+
type
|
|
561
|
+
}),
|
|
562
|
+
onGenerateDragPreview: ({ nativeSetDragImage, source, location }) => {
|
|
563
|
+
document.body.setAttribute("data-drag-preview", "true");
|
|
564
|
+
const offsetFn = preserveOffsetOnSource({
|
|
565
|
+
element: source.element,
|
|
566
|
+
input: location.current.input
|
|
567
|
+
});
|
|
568
|
+
const rect = source.element.getBoundingClientRect();
|
|
569
|
+
setCustomNativeDragPreview({
|
|
570
|
+
nativeSetDragImage,
|
|
571
|
+
getOffset: ({ container }) => {
|
|
572
|
+
return offsetFn({
|
|
573
|
+
container
|
|
574
|
+
});
|
|
575
|
+
},
|
|
576
|
+
render: ({ container }) => {
|
|
577
|
+
container.style.width = rect.width + "px";
|
|
578
|
+
setDragState({
|
|
579
|
+
type: "preview",
|
|
580
|
+
container,
|
|
581
|
+
item
|
|
582
|
+
});
|
|
583
|
+
return () => {
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
},
|
|
588
|
+
onDragStart: () => {
|
|
589
|
+
document.body.removeAttribute("data-drag-preview");
|
|
590
|
+
itemElement?.closest("[data-drag-autoscroll]")?.setAttribute("data-drag-autoscroll", "active");
|
|
591
|
+
setDragState({
|
|
592
|
+
type: "is-dragging",
|
|
593
|
+
item
|
|
594
|
+
});
|
|
595
|
+
},
|
|
596
|
+
onDrop: () => {
|
|
597
|
+
itemElement?.closest("[data-drag-autoscroll]")?.setAttribute("data-drag-autoscroll", "idle");
|
|
598
|
+
setDragState(idle);
|
|
525
599
|
}
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
},
|
|
531
|
-
getInitialData: () => ({
|
|
600
|
+
}), dropTargetForElements2({
|
|
601
|
+
element: itemElement,
|
|
602
|
+
getData: ({ input, element }) => {
|
|
603
|
+
return attachClosestEdge2({
|
|
532
604
|
id: item.id,
|
|
533
605
|
type
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
container.style.width = rect.width + "px";
|
|
551
|
-
setDragState({
|
|
552
|
-
type: "preview",
|
|
553
|
-
container,
|
|
554
|
-
item
|
|
555
|
-
});
|
|
556
|
-
return () => {
|
|
557
|
-
};
|
|
558
|
-
}
|
|
559
|
-
});
|
|
560
|
-
},
|
|
561
|
-
onDragStart: () => {
|
|
562
|
-
document.body.removeAttribute("data-drag-preview");
|
|
563
|
-
itemElement?.closest("[data-drag-autoscroll]")?.setAttribute("data-drag-autoscroll", "active");
|
|
564
|
-
setDragState({
|
|
565
|
-
type: "is-dragging",
|
|
566
|
-
item
|
|
567
|
-
});
|
|
568
|
-
},
|
|
569
|
-
onDrop: () => {
|
|
570
|
-
itemElement?.closest("[data-drag-autoscroll]")?.setAttribute("data-drag-autoscroll", "idle");
|
|
571
|
-
setDragState(idle);
|
|
606
|
+
}, {
|
|
607
|
+
input,
|
|
608
|
+
element,
|
|
609
|
+
allowedEdges: orientation === "horizontal" ? [
|
|
610
|
+
"left",
|
|
611
|
+
"right"
|
|
612
|
+
] : [
|
|
613
|
+
"top",
|
|
614
|
+
"bottom"
|
|
615
|
+
]
|
|
616
|
+
});
|
|
617
|
+
},
|
|
618
|
+
onDragEnter: ({ self, source }) => {
|
|
619
|
+
if (source.data.type === self.data.type) {
|
|
620
|
+
setEdge(extractClosestEdge2(self.data));
|
|
621
|
+
setSourceId(source.data.id);
|
|
572
622
|
}
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
});
|
|
590
|
-
},
|
|
591
|
-
onDragEnter: ({ self, source }) => {
|
|
592
|
-
if (source.data.type === self.data.type) {
|
|
593
|
-
setEdge(extractClosestEdge2(self.data));
|
|
594
|
-
setSourceId(source.data.id);
|
|
595
|
-
}
|
|
596
|
-
},
|
|
597
|
-
onDrag: ({ self, source }) => {
|
|
598
|
-
if (source.data.type === self.data.type) {
|
|
599
|
-
setEdge(extractClosestEdge2(self.data));
|
|
600
|
-
setSourceId(source.data.id);
|
|
601
|
-
}
|
|
602
|
-
},
|
|
603
|
-
onDragLeave: () => {
|
|
604
|
-
setEdge(null);
|
|
605
|
-
setSourceId(null);
|
|
606
|
-
},
|
|
607
|
-
onDrop: ({ self, source }) => {
|
|
608
|
-
setEdge(null);
|
|
609
|
-
setSourceId(null);
|
|
610
|
-
if (source.data.type === self.data.type) {
|
|
611
|
-
onRearrange(source.data, self.data, extractClosestEdge2(self.data));
|
|
612
|
-
}
|
|
623
|
+
},
|
|
624
|
+
onDrag: ({ self, source }) => {
|
|
625
|
+
if (source.data.type === self.data.type) {
|
|
626
|
+
setEdge(extractClosestEdge2(self.data));
|
|
627
|
+
setSourceId(source.data.id);
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
onDragLeave: () => {
|
|
631
|
+
setEdge(null);
|
|
632
|
+
setSourceId(null);
|
|
633
|
+
},
|
|
634
|
+
onDrop: ({ self, source }) => {
|
|
635
|
+
setEdge(null);
|
|
636
|
+
setSourceId(null);
|
|
637
|
+
if (source.data.type === self.data.type) {
|
|
638
|
+
onRearrange(source.data, self.data, extractClosestEdge2(self.data));
|
|
613
639
|
}
|
|
614
|
-
}));
|
|
615
|
-
}, [
|
|
616
|
-
orientation,
|
|
617
|
-
item,
|
|
618
|
-
onRearrange,
|
|
619
|
-
selfDragHandleElement,
|
|
620
|
-
itemElement
|
|
621
|
-
]);
|
|
622
|
-
const focusableGroupAttrs = useFocusableGroup2({
|
|
623
|
-
tabBehavior: "limited"
|
|
624
|
-
});
|
|
625
|
-
const shouldShowDropIndicator = () => {
|
|
626
|
-
if (!closestEdge || !sourceId) {
|
|
627
|
-
return false;
|
|
628
|
-
}
|
|
629
|
-
if (sourceId === item.id) {
|
|
630
|
-
return false;
|
|
631
|
-
}
|
|
632
|
-
const isTrailingEdgeOfPrevSibling = prevSiblingId !== void 0 && sourceId === prevSiblingId && (orientation === "horizontal" && closestEdge === "left" || orientation === "vertical" && closestEdge === "top");
|
|
633
|
-
if (isTrailingEdgeOfPrevSibling) {
|
|
634
|
-
return false;
|
|
635
|
-
}
|
|
636
|
-
const isLeadingEdgeOfNextSibling = nextSiblingId !== void 0 && sourceId === nextSiblingId && (orientation === "horizontal" && closestEdge === "right" || orientation === "vertical" && closestEdge === "bottom");
|
|
637
|
-
if (isLeadingEdgeOfNextSibling) {
|
|
638
|
-
return false;
|
|
639
640
|
}
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
641
|
+
}));
|
|
642
|
+
}, [
|
|
643
|
+
orientation,
|
|
644
|
+
item,
|
|
645
|
+
onRearrange,
|
|
646
|
+
selfDragHandleElement,
|
|
647
|
+
itemElement
|
|
648
|
+
]);
|
|
649
|
+
const focusableGroupAttrs = useFocusableGroup({
|
|
650
|
+
tabBehavior: "limited"
|
|
651
|
+
});
|
|
652
|
+
const shouldShowDropIndicator = () => {
|
|
653
|
+
if (!closestEdge || !sourceId) {
|
|
654
|
+
return false;
|
|
655
|
+
}
|
|
656
|
+
if (sourceId === item.id) {
|
|
657
|
+
return false;
|
|
658
|
+
}
|
|
659
|
+
const isTrailingEdgeOfPrevSibling = prevSiblingId !== void 0 && sourceId === prevSiblingId && (orientation === "horizontal" && closestEdge === "left" || orientation === "vertical" && closestEdge === "top");
|
|
660
|
+
if (isTrailingEdgeOfPrevSibling) {
|
|
661
|
+
return false;
|
|
662
|
+
}
|
|
663
|
+
const isLeadingEdgeOfNextSibling = nextSiblingId !== void 0 && sourceId === nextSiblingId && (orientation === "horizontal" && closestEdge === "right" || orientation === "vertical" && closestEdge === "bottom");
|
|
664
|
+
if (isLeadingEdgeOfNextSibling) {
|
|
665
|
+
return false;
|
|
666
|
+
}
|
|
667
|
+
return true;
|
|
668
|
+
};
|
|
669
|
+
const stackItemContextValue = useMemo2(() => ({
|
|
670
|
+
selfDragHandleRef,
|
|
671
|
+
size,
|
|
672
|
+
setSize,
|
|
673
|
+
state: dragState,
|
|
674
|
+
setState: setDragState,
|
|
675
|
+
role
|
|
676
|
+
}), [
|
|
677
|
+
selfDragHandleRef,
|
|
678
|
+
size,
|
|
679
|
+
setSize,
|
|
680
|
+
dragState,
|
|
681
|
+
setDragState,
|
|
682
|
+
role
|
|
683
|
+
]);
|
|
684
|
+
return /* @__PURE__ */ React8.createElement(StackItemContext.Provider, {
|
|
685
|
+
value: stackItemContextValue
|
|
686
|
+
}, /* @__PURE__ */ React8.createElement(Root, {
|
|
687
|
+
...props,
|
|
688
|
+
tabIndex: 0,
|
|
689
|
+
...focusableGroupAttrs,
|
|
690
|
+
className: mx5("group/stack-item grid relative", focusIndicatorVariant === "over-all" ? "dx-focus-ring-inset-over-all" : focusIndicatorVariant === "over-all-always" ? "dx-focus-ring-inset-over-all-always" : orientation === "horizontal" ? focusIndicatorVariant === "group-always" ? "dx-focus-ring-group-x-always" : "dx-focus-ring-group-x" : focusIndicatorVariant === "group-always" ? "dx-focus-ring-group-y-always" : "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-b border-subdued-separator", classNames),
|
|
691
|
+
"data-dx-stack-item": stackId,
|
|
692
|
+
"data-dx-item-id": item.id,
|
|
693
|
+
...resizeAttributes,
|
|
694
|
+
style: {
|
|
695
|
+
...stackSize !== "split" && sizeStyle(size, orientation),
|
|
696
|
+
...Number.isFinite(order) && {
|
|
697
|
+
[orientation === "horizontal" ? "gridColumn" : "gridRow"]: `${order}`
|
|
672
698
|
},
|
|
673
|
-
|
|
674
|
-
},
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
}
|
|
699
|
+
...style
|
|
700
|
+
},
|
|
701
|
+
ref: composedItemRef
|
|
702
|
+
}, children, shouldShowDropIndicator() && closestEdge && /* @__PURE__ */ React8.createElement(ListItem2.DropIndicator, {
|
|
703
|
+
lineInset: 8,
|
|
704
|
+
terminalInset: -8,
|
|
705
|
+
edge: closestEdge
|
|
706
|
+
})));
|
|
682
707
|
});
|
|
683
708
|
var StackItemDragPreview = ({ children }) => {
|
|
684
709
|
const { state } = useStackItem();
|
|
@@ -689,507 +714,24 @@ var StackItemDragPreview = ({ children }) => {
|
|
|
689
714
|
var StackItem = {
|
|
690
715
|
Root: StackItemRoot,
|
|
691
716
|
Content: StackItemContent,
|
|
717
|
+
DragHandle: StackItemDragHandle,
|
|
718
|
+
DragPreview: StackItemDragPreview,
|
|
692
719
|
Heading: StackItemHeading,
|
|
693
720
|
HeadingLabel: StackItemHeadingLabel,
|
|
694
721
|
HeadingStickyContent: StackItemHeadingStickyContent,
|
|
695
722
|
ResizeHandle: StackItemResizeHandle,
|
|
696
|
-
DragHandle: StackItemDragHandle,
|
|
697
723
|
Sigil: StackItemSigil,
|
|
698
|
-
SigilButton: StackItemSigilButton
|
|
699
|
-
DragPreview: StackItemDragPreview
|
|
700
|
-
};
|
|
701
|
-
|
|
702
|
-
// src/exemplars/Card/Card.tsx
|
|
703
|
-
import { useSignals as _useSignals9 } from "@preact-signals/safe-react/tracking";
|
|
704
|
-
import { Primitive } from "@radix-ui/react-primitive";
|
|
705
|
-
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
706
|
-
import React9, { forwardRef as forwardRef6 } from "react";
|
|
707
|
-
import { Icon as Icon2, IconButton, Toolbar, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
708
|
-
import { hoverableControls, mx as mx6 } from "@dxos/react-ui-theme";
|
|
709
|
-
|
|
710
|
-
// src/exemplars/Card/fragments.ts
|
|
711
|
-
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";
|
|
712
|
-
var cardSpacing = "pli-cardSpacingInline mlb-cardSpacingBlock";
|
|
713
|
-
var labelSpacing = "mbs-inputSpacingBlock mbe-labelSpacingBlock";
|
|
714
|
-
var cardDialogContent = "p-0 bs-content min-bs-[8rem] max-bs-full md:max-is-[32rem] overflow-hidden";
|
|
715
|
-
var cardDialogHeader = "pli-cardSpacingInline mbs-cardSpacingBlock flex justify-between";
|
|
716
|
-
var cardDialogOverflow = "overflow-y-auto min-bs-0 flex-1";
|
|
717
|
-
var cardDialogPaddedOverflow = `${cardDialogOverflow} plb-cardSpacingBlock`;
|
|
718
|
-
var cardDialogSearchListRoot = "pli-cardSpacingInline pbs-cardSpacingBlock [&>input]:mbe-0 min-bs-0 flex-1 flex flex-col";
|
|
719
|
-
var cardText = cardSpacing;
|
|
720
|
-
var cardHeading = "text-lg font-medium line-clamp-2";
|
|
721
|
-
var cardChrome = "pli-[--dx-cardSpacingChrome] mlb-[--dx-cardSpacingChrome] [&_.dx-button]:text-start [&_.dx-button]:is-full";
|
|
722
|
-
|
|
723
|
-
// src/exemplars/Card/Card.tsx
|
|
724
|
-
var CardStaticRoot = /* @__PURE__ */ forwardRef6(({ children, classNames, asChild, role = "group", ...props }, forwardedRef) => {
|
|
725
|
-
var _effect = _useSignals9();
|
|
726
|
-
try {
|
|
727
|
-
const Root = asChild ? Slot3 : "div";
|
|
728
|
-
const rootProps = asChild ? {
|
|
729
|
-
classNames: [
|
|
730
|
-
cardRoot,
|
|
731
|
-
classNames
|
|
732
|
-
]
|
|
733
|
-
} : {
|
|
734
|
-
className: mx6(cardRoot, classNames),
|
|
735
|
-
role
|
|
736
|
-
};
|
|
737
|
-
return /* @__PURE__ */ React9.createElement(Root, {
|
|
738
|
-
...props,
|
|
739
|
-
...rootProps,
|
|
740
|
-
ref: forwardedRef
|
|
741
|
-
}, children);
|
|
742
|
-
} finally {
|
|
743
|
-
_effect.f();
|
|
744
|
-
}
|
|
745
|
-
});
|
|
746
|
-
var CardSurfaceRoot = ({ role = "never", children }) => {
|
|
747
|
-
var _effect = _useSignals9();
|
|
748
|
-
try {
|
|
749
|
-
if ([
|
|
750
|
-
"popover",
|
|
751
|
-
"card--kanban"
|
|
752
|
-
].includes(role)) {
|
|
753
|
-
return /* @__PURE__ */ React9.createElement("div", {
|
|
754
|
-
className: role === "popover" ? "popover-card-width" : role === "card--kanban" ? "contents" : ""
|
|
755
|
-
}, children);
|
|
756
|
-
} else {
|
|
757
|
-
return /* @__PURE__ */ React9.createElement(CardStaticRoot, role === "card--document" && {
|
|
758
|
-
classNames: [
|
|
759
|
-
"mlb-[1em]",
|
|
760
|
-
hoverableControls
|
|
761
|
-
]
|
|
762
|
-
}, children);
|
|
763
|
-
}
|
|
764
|
-
} finally {
|
|
765
|
-
_effect.f();
|
|
766
|
-
}
|
|
767
|
-
};
|
|
768
|
-
var CardHeading = /* @__PURE__ */ forwardRef6(({ children, classNames, asChild, role = "heading", ...props }, forwardedRef) => {
|
|
769
|
-
var _effect = _useSignals9();
|
|
770
|
-
try {
|
|
771
|
-
const Root = asChild ? Slot3 : "div";
|
|
772
|
-
const rootProps = asChild ? {
|
|
773
|
-
classNames: [
|
|
774
|
-
cardHeading,
|
|
775
|
-
cardText,
|
|
776
|
-
classNames
|
|
777
|
-
]
|
|
778
|
-
} : {
|
|
779
|
-
className: mx6(cardHeading, cardText, classNames),
|
|
780
|
-
role
|
|
781
|
-
};
|
|
782
|
-
return /* @__PURE__ */ React9.createElement(Root, {
|
|
783
|
-
...props,
|
|
784
|
-
...rootProps,
|
|
785
|
-
ref: forwardedRef
|
|
786
|
-
}, children);
|
|
787
|
-
} finally {
|
|
788
|
-
_effect.f();
|
|
789
|
-
}
|
|
790
|
-
});
|
|
791
|
-
var CardToolbar = /* @__PURE__ */ forwardRef6(({ children, classNames, ...props }, forwardedRef) => {
|
|
792
|
-
var _effect = _useSignals9();
|
|
793
|
-
try {
|
|
794
|
-
return /* @__PURE__ */ React9.createElement(Toolbar.Root, {
|
|
795
|
-
...props,
|
|
796
|
-
classNames: [
|
|
797
|
-
"bg-transparent density-coarse",
|
|
798
|
-
classNames
|
|
799
|
-
],
|
|
800
|
-
ref: forwardedRef
|
|
801
|
-
}, children);
|
|
802
|
-
} finally {
|
|
803
|
-
_effect.f();
|
|
804
|
-
}
|
|
805
|
-
});
|
|
806
|
-
var CardToolbarIconButton = Toolbar.IconButton;
|
|
807
|
-
var CardToolbarSeparator = Toolbar.Separator;
|
|
808
|
-
var CardDragHandle = /* @__PURE__ */ forwardRef6(({ toolbarItem }, forwardedRef) => {
|
|
809
|
-
var _effect = _useSignals9();
|
|
810
|
-
try {
|
|
811
|
-
const { t } = useTranslation2(translationKey);
|
|
812
|
-
const Root = toolbarItem ? Toolbar.IconButton : IconButton;
|
|
813
|
-
return /* @__PURE__ */ React9.createElement(Root, {
|
|
814
|
-
iconOnly: true,
|
|
815
|
-
icon: "ph--dots-six-vertical--regular",
|
|
816
|
-
variant: "ghost",
|
|
817
|
-
label: t("drag handle label"),
|
|
818
|
-
classNames: "pli-2",
|
|
819
|
-
ref: forwardedRef
|
|
820
|
-
});
|
|
821
|
-
} finally {
|
|
822
|
-
_effect.f();
|
|
823
|
-
}
|
|
824
|
-
});
|
|
825
|
-
var CardDragPreview = StackItem.DragPreview;
|
|
826
|
-
var CardMenu = Primitive.div;
|
|
827
|
-
var CardPoster = (props) => {
|
|
828
|
-
var _effect = _useSignals9();
|
|
829
|
-
try {
|
|
830
|
-
const aspect = props.aspect === "auto" ? "aspect-auto" : "aspect-video";
|
|
831
|
-
if (props.image) {
|
|
832
|
-
return /* @__PURE__ */ React9.createElement("img", {
|
|
833
|
-
className: `dx-card__poster ${aspect} object-cover is-full bs-auto`,
|
|
834
|
-
src: props.image,
|
|
835
|
-
alt: props.alt
|
|
836
|
-
});
|
|
837
|
-
}
|
|
838
|
-
if (props.icon) {
|
|
839
|
-
return /* @__PURE__ */ React9.createElement("div", {
|
|
840
|
-
role: "image",
|
|
841
|
-
className: `dx-card__poster grid ${aspect} place-items-center bg-inputSurface text-subdued`,
|
|
842
|
-
"aria-label": props.alt
|
|
843
|
-
}, /* @__PURE__ */ React9.createElement(Icon2, {
|
|
844
|
-
icon: props.icon,
|
|
845
|
-
size: 10
|
|
846
|
-
}));
|
|
847
|
-
}
|
|
848
|
-
} finally {
|
|
849
|
-
_effect.f();
|
|
850
|
-
}
|
|
851
|
-
};
|
|
852
|
-
var CardChrome = /* @__PURE__ */ forwardRef6(({ children, classNames, asChild, role = "none", ...props }, forwardedRef) => {
|
|
853
|
-
var _effect = _useSignals9();
|
|
854
|
-
try {
|
|
855
|
-
const Root = asChild ? Slot3 : "div";
|
|
856
|
-
const rootProps = asChild ? {
|
|
857
|
-
classNames: [
|
|
858
|
-
cardChrome,
|
|
859
|
-
classNames
|
|
860
|
-
]
|
|
861
|
-
} : {
|
|
862
|
-
className: mx6(cardChrome, classNames),
|
|
863
|
-
role
|
|
864
|
-
};
|
|
865
|
-
return /* @__PURE__ */ React9.createElement(Root, {
|
|
866
|
-
...props,
|
|
867
|
-
...rootProps,
|
|
868
|
-
ref: forwardedRef
|
|
869
|
-
}, children);
|
|
870
|
-
} finally {
|
|
871
|
-
_effect.f();
|
|
872
|
-
}
|
|
873
|
-
});
|
|
874
|
-
var CardText = /* @__PURE__ */ forwardRef6(({ children, classNames, asChild, role = "none", ...props }, forwardedRef) => {
|
|
875
|
-
var _effect = _useSignals9();
|
|
876
|
-
try {
|
|
877
|
-
const Root = asChild ? Slot3 : "p";
|
|
878
|
-
const rootProps = asChild ? {
|
|
879
|
-
classNames: [
|
|
880
|
-
cardText,
|
|
881
|
-
classNames
|
|
882
|
-
]
|
|
883
|
-
} : {
|
|
884
|
-
className: mx6(cardText, classNames),
|
|
885
|
-
role
|
|
886
|
-
};
|
|
887
|
-
return /* @__PURE__ */ React9.createElement(Root, {
|
|
888
|
-
...props,
|
|
889
|
-
...rootProps,
|
|
890
|
-
ref: forwardedRef
|
|
891
|
-
}, children);
|
|
892
|
-
} finally {
|
|
893
|
-
_effect.f();
|
|
894
|
-
}
|
|
895
|
-
});
|
|
896
|
-
var Card = {
|
|
897
|
-
StaticRoot: CardStaticRoot,
|
|
898
|
-
SurfaceRoot: CardSurfaceRoot,
|
|
899
|
-
Heading: CardHeading,
|
|
900
|
-
Toolbar: CardToolbar,
|
|
901
|
-
ToolbarIconButton: CardToolbarIconButton,
|
|
902
|
-
ToolbarSeparator: CardToolbarSeparator,
|
|
903
|
-
DragHandle: CardDragHandle,
|
|
904
|
-
DragPreview: CardDragPreview,
|
|
905
|
-
Menu: CardMenu,
|
|
906
|
-
Poster: CardPoster,
|
|
907
|
-
Chrome: CardChrome,
|
|
908
|
-
Text: CardText
|
|
909
|
-
};
|
|
910
|
-
|
|
911
|
-
// src/exemplars/Card/CardDragPreview.tsx
|
|
912
|
-
import { useSignals as _useSignals10 } from "@preact-signals/safe-react/tracking";
|
|
913
|
-
import React10 from "react";
|
|
914
|
-
import { mx as mx7 } from "@dxos/react-ui-theme";
|
|
915
|
-
var CardDragPreviewRoot = ({ children }) => {
|
|
916
|
-
var _effect = _useSignals10();
|
|
917
|
-
try {
|
|
918
|
-
return /* @__PURE__ */ React10.createElement("div", {
|
|
919
|
-
className: "p-2"
|
|
920
|
-
}, children);
|
|
921
|
-
} finally {
|
|
922
|
-
_effect.f();
|
|
923
|
-
}
|
|
924
|
-
};
|
|
925
|
-
var CardDragPreviewContent = ({ children }) => {
|
|
926
|
-
var _effect = _useSignals10();
|
|
927
|
-
try {
|
|
928
|
-
return /* @__PURE__ */ React10.createElement("div", {
|
|
929
|
-
className: mx7(cardRoot, "ring-focusLine ring-neutralFocusIndicator")
|
|
930
|
-
}, children);
|
|
931
|
-
} finally {
|
|
932
|
-
_effect.f();
|
|
933
|
-
}
|
|
934
|
-
};
|
|
935
|
-
var CardDragPreview2 = {
|
|
936
|
-
Root: CardDragPreviewRoot,
|
|
937
|
-
Content: CardDragPreviewContent
|
|
938
|
-
};
|
|
939
|
-
|
|
940
|
-
// src/exemplars/CardStack/CardStack.tsx
|
|
941
|
-
import { useSignals as _useSignals11 } from "@preact-signals/safe-react/tracking";
|
|
942
|
-
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
943
|
-
import React11, { forwardRef as forwardRef7 } from "react";
|
|
944
|
-
import { mx as mx8 } from "@dxos/react-ui-theme";
|
|
945
|
-
var CardStackStack = /* @__PURE__ */ forwardRef7(({ children, classNames, itemsCount = 0, ...props }, forwardedRef) => {
|
|
946
|
-
var _effect = _useSignals11();
|
|
947
|
-
try {
|
|
948
|
-
return /* @__PURE__ */ React11.createElement(Stack, {
|
|
949
|
-
orientation: "vertical",
|
|
950
|
-
size: "contain",
|
|
951
|
-
rail: false,
|
|
952
|
-
classNames: (
|
|
953
|
-
/* NOTE(thure): Do not let this element have zero intrinsic size, otherwise the drop indicator will not display. See #9035. */
|
|
954
|
-
[
|
|
955
|
-
"plb-1",
|
|
956
|
-
itemsCount > 0 && "plb-2",
|
|
957
|
-
classNames
|
|
958
|
-
]
|
|
959
|
-
),
|
|
960
|
-
itemsCount,
|
|
961
|
-
separatorOnScroll: 9,
|
|
962
|
-
"data-density": "fine",
|
|
963
|
-
...props,
|
|
964
|
-
ref: forwardedRef
|
|
965
|
-
}, children);
|
|
966
|
-
} finally {
|
|
967
|
-
_effect.f();
|
|
968
|
-
}
|
|
969
|
-
});
|
|
970
|
-
var CardStackDragHandle = Card.DragHandle;
|
|
971
|
-
var cardStackHeading = "mli-2 order-first bg-transparent rounded-bs-md flex items-center";
|
|
972
|
-
var CardStackHeading = /* @__PURE__ */ forwardRef7(({ children, classNames, asChild, role = "heading", ...props }, forwardedRef) => {
|
|
973
|
-
var _effect = _useSignals11();
|
|
974
|
-
try {
|
|
975
|
-
const Root = asChild ? Slot4 : "div";
|
|
976
|
-
const rootProps = asChild ? {
|
|
977
|
-
classNames: [
|
|
978
|
-
cardStackHeading,
|
|
979
|
-
classNames
|
|
980
|
-
]
|
|
981
|
-
} : {
|
|
982
|
-
className: mx8(cardStackHeading, classNames),
|
|
983
|
-
role
|
|
984
|
-
};
|
|
985
|
-
return /* @__PURE__ */ React11.createElement(Root, {
|
|
986
|
-
...props,
|
|
987
|
-
...rootProps,
|
|
988
|
-
ref: forwardedRef
|
|
989
|
-
}, children);
|
|
990
|
-
} finally {
|
|
991
|
-
_effect.f();
|
|
992
|
-
}
|
|
993
|
-
});
|
|
994
|
-
var cardStackFooter = 'plb-2 mli-2 border-bs border-transparent [[data-scroll-separator-end="true"]_&]:border-subduedSeparator';
|
|
995
|
-
var CardStackFooter = /* @__PURE__ */ forwardRef7(({ children, classNames, asChild, role = "none", ...props }, forwardedRef) => {
|
|
996
|
-
var _effect = _useSignals11();
|
|
997
|
-
try {
|
|
998
|
-
const Root = asChild ? Slot4 : "div";
|
|
999
|
-
const rootProps = asChild ? {
|
|
1000
|
-
classNames: [
|
|
1001
|
-
cardStackFooter,
|
|
1002
|
-
classNames
|
|
1003
|
-
]
|
|
1004
|
-
} : {
|
|
1005
|
-
className: mx8(cardStackFooter, classNames),
|
|
1006
|
-
role
|
|
1007
|
-
};
|
|
1008
|
-
return /* @__PURE__ */ React11.createElement(Root, {
|
|
1009
|
-
...props,
|
|
1010
|
-
...rootProps,
|
|
1011
|
-
ref: forwardedRef
|
|
1012
|
-
}, children);
|
|
1013
|
-
} finally {
|
|
1014
|
-
_effect.f();
|
|
1015
|
-
}
|
|
1016
|
-
});
|
|
1017
|
-
var cardStackContent = [
|
|
1018
|
-
"shrink min-bs-0 bg-baseSurface border border-separator rounded-md grid dx-focus-ring-group-x-indicator kanban-drop",
|
|
1019
|
-
railGridHorizontalContainFitContent
|
|
1020
|
-
];
|
|
1021
|
-
var CardStackContent = /* @__PURE__ */ forwardRef7(({ children, classNames, asChild, role = "none", ...props }, forwardedRef) => {
|
|
1022
|
-
var _effect = _useSignals11();
|
|
1023
|
-
try {
|
|
1024
|
-
const Root = asChild ? Slot4 : "div";
|
|
1025
|
-
const rootProps = asChild ? {
|
|
1026
|
-
classNames: [
|
|
1027
|
-
...cardStackContent,
|
|
1028
|
-
classNames
|
|
1029
|
-
]
|
|
1030
|
-
} : {
|
|
1031
|
-
className: mx8(...cardStackContent, classNames),
|
|
1032
|
-
role
|
|
1033
|
-
};
|
|
1034
|
-
return /* @__PURE__ */ React11.createElement(Root, {
|
|
1035
|
-
...props,
|
|
1036
|
-
...rootProps,
|
|
1037
|
-
"data-scroll-separator": "false",
|
|
1038
|
-
ref: forwardedRef
|
|
1039
|
-
}, children);
|
|
1040
|
-
} finally {
|
|
1041
|
-
_effect.f();
|
|
1042
|
-
}
|
|
1043
|
-
});
|
|
1044
|
-
var cardStackRoot = "flex flex-col pli-2 plb-2";
|
|
1045
|
-
var CardStackRoot = /* @__PURE__ */ forwardRef7(({ children, classNames, asChild, role = "none", ...props }, forwardedRef) => {
|
|
1046
|
-
var _effect = _useSignals11();
|
|
1047
|
-
try {
|
|
1048
|
-
const Root = asChild ? Slot4 : "div";
|
|
1049
|
-
const rootProps = asChild ? {
|
|
1050
|
-
classNames: [
|
|
1051
|
-
cardStackRoot,
|
|
1052
|
-
classNames
|
|
1053
|
-
]
|
|
1054
|
-
} : {
|
|
1055
|
-
className: mx8(cardStackRoot, classNames),
|
|
1056
|
-
role
|
|
1057
|
-
};
|
|
1058
|
-
return /* @__PURE__ */ React11.createElement(Root, {
|
|
1059
|
-
...props,
|
|
1060
|
-
...rootProps,
|
|
1061
|
-
ref: forwardedRef
|
|
1062
|
-
}, children);
|
|
1063
|
-
} finally {
|
|
1064
|
-
_effect.f();
|
|
1065
|
-
}
|
|
1066
|
-
});
|
|
1067
|
-
var cardStackItem = "contain-layout pli-2 plb-1 first-of-type:pbs-0 last-of-type:pbe-0";
|
|
1068
|
-
var CardStackItem = /* @__PURE__ */ forwardRef7(({ children, classNames, asChild, role = "none", ...props }, forwardedRef) => {
|
|
1069
|
-
var _effect = _useSignals11();
|
|
1070
|
-
try {
|
|
1071
|
-
const Root = asChild ? Slot4 : "div";
|
|
1072
|
-
const rootProps = asChild ? {
|
|
1073
|
-
classNames: [
|
|
1074
|
-
cardStackItem,
|
|
1075
|
-
classNames
|
|
1076
|
-
]
|
|
1077
|
-
} : {
|
|
1078
|
-
className: mx8(cardStackItem, classNames),
|
|
1079
|
-
role
|
|
1080
|
-
};
|
|
1081
|
-
return /* @__PURE__ */ React11.createElement(Root, {
|
|
1082
|
-
...props,
|
|
1083
|
-
...rootProps,
|
|
1084
|
-
ref: forwardedRef
|
|
1085
|
-
}, children);
|
|
1086
|
-
} finally {
|
|
1087
|
-
_effect.f();
|
|
1088
|
-
}
|
|
1089
|
-
});
|
|
1090
|
-
var CardStack = {
|
|
1091
|
-
Root: CardStackRoot,
|
|
1092
|
-
Content: CardStackContent,
|
|
1093
|
-
Stack: CardStackStack,
|
|
1094
|
-
Heading: CardStackHeading,
|
|
1095
|
-
Footer: CardStackFooter,
|
|
1096
|
-
DragHandle: CardStackDragHandle,
|
|
1097
|
-
Item: CardStackItem
|
|
1098
|
-
};
|
|
1099
|
-
|
|
1100
|
-
// src/exemplars/CardStack/CardStackDragPreview.tsx
|
|
1101
|
-
import { useSignals as _useSignals12 } from "@preact-signals/safe-react/tracking";
|
|
1102
|
-
import React12 from "react";
|
|
1103
|
-
import { IconButton as IconButton2, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
1104
|
-
import { mx as mx9 } from "@dxos/react-ui-theme";
|
|
1105
|
-
var CardStackDragPreviewRoot = ({ children }) => {
|
|
1106
|
-
var _effect = _useSignals12();
|
|
1107
|
-
try {
|
|
1108
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
1109
|
-
className: "p-2"
|
|
1110
|
-
}, /* @__PURE__ */ React12.createElement("div", {
|
|
1111
|
-
className: "rounded-md max-bs-[calc(100dvh-1rem)] overflow-hidden bg-baseSurface border border-separator ring-focusLine ring-neutralFocusIndicator flex flex-col"
|
|
1112
|
-
}, children));
|
|
1113
|
-
} finally {
|
|
1114
|
-
_effect.f();
|
|
1115
|
-
}
|
|
1116
|
-
};
|
|
1117
|
-
var CardStackDragPreviewHeading = ({ children }) => {
|
|
1118
|
-
var _effect = _useSignals12();
|
|
1119
|
-
try {
|
|
1120
|
-
const { t } = useTranslation3(translationKey);
|
|
1121
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
1122
|
-
className: "flex items-center p-2"
|
|
1123
|
-
}, /* @__PURE__ */ React12.createElement(IconButton2, {
|
|
1124
|
-
iconOnly: true,
|
|
1125
|
-
icon: "ph--dots-six-vertical--regular",
|
|
1126
|
-
variant: "ghost",
|
|
1127
|
-
label: t("column drag handle label"),
|
|
1128
|
-
classNames: "pli-2"
|
|
1129
|
-
}), children);
|
|
1130
|
-
} finally {
|
|
1131
|
-
_effect.f();
|
|
1132
|
-
}
|
|
1133
|
-
};
|
|
1134
|
-
var CardStackDragPreviewContent = ({ children, itemsCount = 0 }) => {
|
|
1135
|
-
var _effect = _useSignals12();
|
|
1136
|
-
try {
|
|
1137
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
1138
|
-
className: mx9("overflow-y-auto flex-1 pli-2 flex flex-col gap-2", "plb-1", itemsCount > 0 ? "plb-2" : "plb-1")
|
|
1139
|
-
}, children);
|
|
1140
|
-
} finally {
|
|
1141
|
-
_effect.f();
|
|
1142
|
-
}
|
|
1143
|
-
};
|
|
1144
|
-
var CardStackDragPreviewFooter = ({ children }) => {
|
|
1145
|
-
var _effect = _useSignals12();
|
|
1146
|
-
try {
|
|
1147
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
1148
|
-
className: "p-2 border-t border-separator"
|
|
1149
|
-
}, children);
|
|
1150
|
-
} finally {
|
|
1151
|
-
_effect.f();
|
|
1152
|
-
}
|
|
1153
|
-
};
|
|
1154
|
-
var CardStackDragPreview = {
|
|
1155
|
-
Root: CardStackDragPreviewRoot,
|
|
1156
|
-
Heading: CardStackDragPreviewHeading,
|
|
1157
|
-
Content: CardStackDragPreviewContent,
|
|
1158
|
-
Footer: CardStackDragPreviewFooter
|
|
724
|
+
SigilButton: StackItemSigilButton
|
|
1159
725
|
};
|
|
1160
726
|
export {
|
|
1161
|
-
Card,
|
|
1162
|
-
CardDragPreview2 as CardDragPreview,
|
|
1163
|
-
CardStack,
|
|
1164
|
-
CardStackDragPreview,
|
|
1165
727
|
DEFAULT_EXTRINSIC_SIZE,
|
|
1166
728
|
DEFAULT_HORIZONTAL_SIZE,
|
|
1167
729
|
DEFAULT_VERTICAL_SIZE,
|
|
1168
730
|
Stack,
|
|
1169
731
|
StackContext,
|
|
1170
732
|
StackItem,
|
|
1171
|
-
StackItemDragPreview,
|
|
1172
|
-
autoScrollRootAttributes,
|
|
1173
|
-
cardChrome,
|
|
1174
|
-
cardDialogContent,
|
|
1175
|
-
cardDialogHeader,
|
|
1176
|
-
cardDialogOverflow,
|
|
1177
|
-
cardDialogPaddedOverflow,
|
|
1178
|
-
cardDialogSearchListRoot,
|
|
1179
|
-
cardHeading,
|
|
1180
|
-
cardRoot,
|
|
1181
|
-
cardSpacing,
|
|
1182
|
-
cardStackContent,
|
|
1183
|
-
cardStackFooter,
|
|
1184
|
-
cardStackHeading,
|
|
1185
|
-
cardStackItem,
|
|
1186
|
-
cardStackRoot,
|
|
1187
|
-
cardText,
|
|
1188
|
-
labelSpacing,
|
|
1189
733
|
railGridHorizontal,
|
|
1190
|
-
railGridHorizontalContainFitContent,
|
|
1191
734
|
railGridVertical,
|
|
1192
|
-
railGridVerticalContainFitContent,
|
|
1193
735
|
translationKey,
|
|
1194
736
|
translations
|
|
1195
737
|
};
|