@dxos/react-ui-stack 0.7.5-main.9d2a38b → 0.7.5-main.b19bfc8
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 +159 -163
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +195 -198
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +159 -163
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/MenuSignifier.d.ts +2 -3
- package/dist/types/src/components/MenuSignifier.d.ts.map +1 -1
- package/dist/types/src/components/Stack.d.ts +6 -1
- package/dist/types/src/components/Stack.d.ts.map +1 -1
- package/dist/types/src/components/Stack.stories.d.ts +1 -2
- package/dist/types/src/components/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.d.ts +7 -5
- package/dist/types/src/components/StackItem.d.ts.map +1 -1
- package/dist/types/src/components/StackItemContent.d.ts +1 -1
- package/dist/types/src/components/StackItemContent.d.ts.map +1 -1
- package/dist/types/src/components/StackItemDragHandle.d.ts +2 -2
- package/dist/types/src/components/StackItemDragHandle.d.ts.map +1 -1
- package/dist/types/src/components/StackItemHeading.d.ts +1 -1
- package/dist/types/src/components/StackItemHeading.d.ts.map +1 -1
- package/dist/types/src/components/StackItemResizeHandle.d.ts +1 -2
- package/dist/types/src/components/StackItemResizeHandle.d.ts.map +1 -1
- package/dist/types/src/components/StackItemSigil.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useStackDropForElements.d.ts +15 -0
- package/dist/types/src/hooks/useStackDropForElements.d.ts.map +1 -0
- package/package.json +29 -27
- package/src/components/Stack.stories.tsx +1 -1
- package/src/components/Stack.tsx +44 -57
- package/src/components/StackContext.tsx +3 -1
- package/src/components/StackItem.tsx +45 -14
- package/src/components/StackItemContent.tsx +2 -0
- package/src/components/StackItemHeading.tsx +1 -1
- package/src/components/StackItemResizeHandle.tsx +12 -98
- package/src/components/StackItemSigil.tsx +90 -103
- package/src/hooks/index.ts +5 -0
- package/src/hooks/useStackDropForElements.ts +73 -0
- package/dist/types/src/playwright/playwright.config.d.ts +0 -3
- package/dist/types/src/playwright/playwright.config.d.ts.map +0 -1
- /package/src/playwright/{playwright.config.ts → playwright.config.cts} +0 -0
package/dist/lib/node/index.cjs
CHANGED
|
@@ -36,15 +36,16 @@ __export(node_exports, {
|
|
|
36
36
|
StackContext: () => StackContext,
|
|
37
37
|
StackItem: () => StackItem,
|
|
38
38
|
StackItemContext: () => StackItemContext,
|
|
39
|
+
autoScrollRootAttributes: () => autoScrollRootAttributes,
|
|
39
40
|
railGridHorizontal: () => railGridHorizontal,
|
|
41
|
+
railGridHorizontalContainFitContent: () => railGridHorizontalContainFitContent,
|
|
40
42
|
railGridVertical: () => railGridVertical,
|
|
43
|
+
railGridVerticalContainFitContent: () => railGridVerticalContainFitContent,
|
|
41
44
|
translations: () => translations_default,
|
|
42
45
|
useStack: () => useStack,
|
|
43
46
|
useStackItem: () => useStackItem
|
|
44
47
|
});
|
|
45
48
|
module.exports = __toCommonJS(node_exports);
|
|
46
|
-
var import_adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
47
|
-
var import_closest_edge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
|
|
48
49
|
var import_react_tabster = require("@fluentui/react-tabster");
|
|
49
50
|
var import_react_compose_refs = require("@radix-ui/react-compose-refs");
|
|
50
51
|
var import_react = __toESM(require("react"));
|
|
@@ -52,36 +53,39 @@ var import_react_ui = require("@dxos/react-ui");
|
|
|
52
53
|
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
53
54
|
var import_react2 = require("react");
|
|
54
55
|
var import_combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
56
|
+
var import_adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
57
|
+
var import_element = require("@atlaskit/pragmatic-drag-and-drop-auto-scroll/element");
|
|
58
|
+
var import_closest_edge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
|
|
59
|
+
var import_react3 = require("react");
|
|
60
|
+
var import_combine2 = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
55
61
|
var import_adapter2 = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
56
|
-
var
|
|
57
|
-
var
|
|
62
|
+
var import_preserve_offset_on_source = require("@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source");
|
|
63
|
+
var import_scroll_just_enough_into_view = require("@atlaskit/pragmatic-drag-and-drop/element/scroll-just-enough-into-view");
|
|
58
64
|
var import_closest_edge2 = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
|
|
59
65
|
var import_react_tabster2 = require("@fluentui/react-tabster");
|
|
60
66
|
var import_react_compose_refs2 = require("@radix-ui/react-compose-refs");
|
|
61
|
-
var
|
|
67
|
+
var import_react4 = __toESM(require("react"));
|
|
62
68
|
var import_react_ui2 = require("@dxos/react-ui");
|
|
69
|
+
var import_react_ui_dnd = require("@dxos/react-ui-dnd");
|
|
63
70
|
var import_react_ui_theme2 = require("@dxos/react-ui-theme");
|
|
64
|
-
var
|
|
71
|
+
var import_react5 = __toESM(require("react"));
|
|
65
72
|
var import_react_ui_theme3 = require("@dxos/react-ui-theme");
|
|
66
73
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
67
|
-
var import_react5 = __toESM(require("react"));
|
|
68
|
-
var import_react_tabster3 = require("@fluentui/react-tabster");
|
|
69
74
|
var import_react6 = __toESM(require("react"));
|
|
75
|
+
var import_react_tabster3 = require("@fluentui/react-tabster");
|
|
76
|
+
var import_react7 = __toESM(require("react"));
|
|
70
77
|
var import_react_ui_attention = require("@dxos/react-ui-attention");
|
|
71
78
|
var import_react_ui_theme4 = require("@dxos/react-ui-theme");
|
|
72
|
-
var import_adapter3 = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
73
|
-
var import_disable_native_drag_preview2 = require("@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview");
|
|
74
|
-
var import_prevent_unhandled2 = require("@atlaskit/pragmatic-drag-and-drop/prevent-unhandled");
|
|
75
|
-
var import_react7 = __toESM(require("react"));
|
|
76
|
-
var import_react_ui_theme5 = require("@dxos/react-ui-theme");
|
|
77
79
|
var import_react8 = __toESM(require("react"));
|
|
80
|
+
var import_react_ui_dnd2 = require("@dxos/react-ui-dnd");
|
|
81
|
+
var import_react9 = __toESM(require("react"));
|
|
78
82
|
var import_keyboard = require("@dxos/keyboard");
|
|
79
83
|
var import_react_ui3 = require("@dxos/react-ui");
|
|
80
84
|
var import_react_ui_attention2 = require("@dxos/react-ui-attention");
|
|
81
|
-
var
|
|
85
|
+
var import_react_ui_theme5 = require("@dxos/react-ui-theme");
|
|
82
86
|
var import_util = require("@dxos/util");
|
|
83
|
-
var import_react9 = __toESM(require("react"));
|
|
84
87
|
var import_react10 = __toESM(require("react"));
|
|
88
|
+
var import_react11 = __toESM(require("react"));
|
|
85
89
|
var import_react_ui4 = require("@dxos/react-ui");
|
|
86
90
|
var StackContext = /* @__PURE__ */ (0, import_react2.createContext)({
|
|
87
91
|
orientation: "vertical",
|
|
@@ -97,34 +101,22 @@ var StackItemContext = /* @__PURE__ */ (0, import_react2.createContext)({
|
|
|
97
101
|
}
|
|
98
102
|
});
|
|
99
103
|
var useStackItem = () => (0, import_react2.useContext)(StackItemContext);
|
|
100
|
-
var
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const composedItemRef = (0, import_react_compose_refs.composeRefs)(stackRef, forwardedRef);
|
|
105
|
-
const [dropping, setDropping] = (0, import_react.useState)(false);
|
|
106
|
-
const arrowNavigationGroup = (0, import_react_tabster.useArrowNavigationGroup)({
|
|
107
|
-
axis: orientation
|
|
108
|
-
});
|
|
109
|
-
const styles = {
|
|
110
|
-
[orientation === "horizontal" ? "gridTemplateColumns" : "gridTemplateRows"]: `repeat(${itemsCount}, min-content)`,
|
|
111
|
-
...style
|
|
112
|
-
};
|
|
113
|
-
const selfDroppable = !!(itemsCount < 1 && onRearrange && props.id);
|
|
114
|
-
(0, import_react.useLayoutEffect)(() => {
|
|
115
|
-
if (!stackElement || !selfDroppable) {
|
|
104
|
+
var useStackDropForElements = ({ element, selfDroppable, orientation, id, onRearrange }) => {
|
|
105
|
+
const [dropping, setDropping] = (0, import_react3.useState)(false);
|
|
106
|
+
(0, import_react3.useLayoutEffect)(() => {
|
|
107
|
+
if (!element || !selfDroppable) {
|
|
116
108
|
return;
|
|
117
109
|
}
|
|
118
110
|
const acceptSourceType = orientation === "horizontal" ? "column" : "card";
|
|
119
|
-
return (0, import_adapter.dropTargetForElements)({
|
|
120
|
-
element
|
|
121
|
-
getData: ({ input, element }) => {
|
|
111
|
+
return (0, import_combine.combine)((0, import_adapter.dropTargetForElements)({
|
|
112
|
+
element,
|
|
113
|
+
getData: ({ input, element: element2 }) => {
|
|
122
114
|
return (0, import_closest_edge.attachClosestEdge)({
|
|
123
|
-
id
|
|
115
|
+
id,
|
|
124
116
|
type: orientation === "horizontal" ? "card" : "column"
|
|
125
117
|
}, {
|
|
126
118
|
input,
|
|
127
|
-
element,
|
|
119
|
+
element: element2,
|
|
128
120
|
allowedEdges: [
|
|
129
121
|
orientation === "horizontal" ? "left" : "top"
|
|
130
122
|
]
|
|
@@ -140,17 +132,68 @@ var Stack = /* @__PURE__ */ (0, import_react.forwardRef)(({ children, classNames
|
|
|
140
132
|
setDropping(true);
|
|
141
133
|
}
|
|
142
134
|
},
|
|
143
|
-
onDragLeave: () =>
|
|
135
|
+
onDragLeave: () => {
|
|
136
|
+
return setDropping(false);
|
|
137
|
+
},
|
|
144
138
|
onDrop: ({ self, source }) => {
|
|
145
139
|
setDropping(false);
|
|
146
|
-
if (source.data.type === acceptSourceType && selfDroppable) {
|
|
140
|
+
if (source.data.type === acceptSourceType && selfDroppable && onRearrange) {
|
|
147
141
|
onRearrange(source.data, self.data, (0, import_closest_edge.extractClosestEdge)(self.data));
|
|
148
142
|
}
|
|
149
143
|
}
|
|
150
|
-
})
|
|
144
|
+
}), (0, import_element.autoScrollForElements)({
|
|
145
|
+
element,
|
|
146
|
+
getAllowedAxis: () => orientation
|
|
147
|
+
}));
|
|
148
|
+
}, [
|
|
149
|
+
element,
|
|
150
|
+
selfDroppable,
|
|
151
|
+
orientation,
|
|
152
|
+
id,
|
|
153
|
+
onRearrange
|
|
154
|
+
]);
|
|
155
|
+
return {
|
|
156
|
+
dropping
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
var railGridHorizontal = "grid-rows-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]";
|
|
160
|
+
var railGridVertical = "grid-cols-[[rail-start]_var(--rail-size)_[content-start]_1fr_[content-end]]";
|
|
161
|
+
var railGridHorizontalContainFitContent = "grid-rows-[[rail-start]_var(--rail-size)_[content-start]_fit-content(calc(100%-var(--rail-size)*2+2px))_[content-end]]";
|
|
162
|
+
var railGridVerticalContainFitContent = "grid-cols-[[rail-start]_var(--rail-size)_[content-start]_fit-content(calc(100%-var(--rail-size)*2+2px))_[content-end]]";
|
|
163
|
+
var autoScrollRootAttributes = {
|
|
164
|
+
"data-drag-autoscroll": "idle"
|
|
165
|
+
};
|
|
166
|
+
var Stack = /* @__PURE__ */ (0, import_react.forwardRef)(({ children, classNames, style, orientation = "vertical", rail = true, size = "intrinsic", onRearrange, itemsCount = import_react.Children.count(children), ...props }, forwardedRef) => {
|
|
167
|
+
const [stackElement, stackRef] = (0, import_react.useState)(null);
|
|
168
|
+
const composedItemRef = (0, import_react_compose_refs.composeRefs)(stackRef, forwardedRef);
|
|
169
|
+
const arrowNavigationGroup = (0, import_react_tabster.useArrowNavigationGroup)({
|
|
170
|
+
axis: orientation
|
|
171
|
+
});
|
|
172
|
+
const styles = {
|
|
173
|
+
[orientation === "horizontal" ? "gridTemplateColumns" : "gridTemplateRows"]: `repeat(${itemsCount}, min-content) [tabster-dummies] 0`,
|
|
174
|
+
...style
|
|
175
|
+
};
|
|
176
|
+
const selfDroppable = !!(itemsCount < 1 && onRearrange && props.id);
|
|
177
|
+
const { dropping } = useStackDropForElements({
|
|
178
|
+
id: props.id,
|
|
179
|
+
element: stackElement,
|
|
180
|
+
selfDroppable,
|
|
181
|
+
orientation,
|
|
182
|
+
onRearrange
|
|
183
|
+
});
|
|
184
|
+
const gridClasses = (0, import_react.useMemo)(() => {
|
|
185
|
+
if (!rail) {
|
|
186
|
+
return orientation === "horizontal" ? "grid-rows-1 pli-1" : "grid-cols-1 plb-1";
|
|
187
|
+
}
|
|
188
|
+
if (orientation === "horizontal") {
|
|
189
|
+
return size === "contain-fit-content" ? railGridHorizontalContainFitContent : railGridHorizontal;
|
|
190
|
+
} else {
|
|
191
|
+
return size === "contain-fit-content" ? railGridVerticalContainFitContent : railGridVertical;
|
|
192
|
+
}
|
|
151
193
|
}, [
|
|
152
|
-
|
|
153
|
-
|
|
194
|
+
rail,
|
|
195
|
+
orientation,
|
|
196
|
+
size
|
|
154
197
|
]);
|
|
155
198
|
return /* @__PURE__ */ import_react.default.createElement(StackContext.Provider, {
|
|
156
199
|
value: {
|
|
@@ -162,17 +205,21 @@ var Stack = /* @__PURE__ */ (0, import_react.forwardRef)(({ children, classNames
|
|
|
162
205
|
}, /* @__PURE__ */ import_react.default.createElement("div", {
|
|
163
206
|
...props,
|
|
164
207
|
...arrowNavigationGroup,
|
|
165
|
-
className: (0, import_react_ui_theme.mx)("grid relative",
|
|
208
|
+
className: (0, import_react_ui_theme.mx)("grid relative", gridClasses, (size === "contain" || size === "contain-fit-content") && (orientation === "horizontal" ? "overflow-x-auto min-bs-0 bs-full max-bs-full" : "overflow-y-auto min-is-0 is-full max-is-full"), classNames),
|
|
209
|
+
"data-rail": rail,
|
|
166
210
|
"aria-orientation": orientation,
|
|
167
211
|
style: styles,
|
|
168
212
|
ref: composedItemRef
|
|
169
213
|
}, children, selfDroppable && dropping && /* @__PURE__ */ import_react.default.createElement(import_react_ui.ListItem.DropIndicator, {
|
|
214
|
+
lineInset: 8,
|
|
215
|
+
terminalInset: -8,
|
|
216
|
+
gap: -8,
|
|
170
217
|
edge: orientation === "horizontal" ? "left" : "top"
|
|
171
218
|
})));
|
|
172
219
|
});
|
|
173
|
-
var StackItemContent = /* @__PURE__ */ (0,
|
|
220
|
+
var StackItemContent = /* @__PURE__ */ (0, import_react5.forwardRef)(({ children, toolbar, statusbar, classNames, size = "intrinsic", ...props }, forwardedRef) => {
|
|
174
221
|
const { size: stackItemSize } = useStack();
|
|
175
|
-
return /* @__PURE__ */
|
|
222
|
+
return /* @__PURE__ */ import_react5.default.createElement("div", {
|
|
176
223
|
role: "none",
|
|
177
224
|
...props,
|
|
178
225
|
className: (0, import_react_ui_theme3.mx)("group grid grid-cols-[100%]", stackItemSize === "contain" && "min-bs-0 overflow-hidden", size === "video" ? "aspect-video" : size === "square" && "aspect-square", classNames),
|
|
@@ -193,7 +240,7 @@ var StackItemContent = /* @__PURE__ */ (0, import_react4.forwardRef)(({ children
|
|
|
193
240
|
var StackItemDragHandle = ({ asChild, children }) => {
|
|
194
241
|
const { selfDragHandleRef } = useStackItem();
|
|
195
242
|
const Root = asChild ? import_react_slot.Slot : "div";
|
|
196
|
-
return /* @__PURE__ */
|
|
243
|
+
return /* @__PURE__ */ import_react6.default.createElement(Root, {
|
|
197
244
|
ref: selfDragHandleRef,
|
|
198
245
|
role: "button"
|
|
199
246
|
}, children);
|
|
@@ -203,104 +250,44 @@ var StackItemHeading = ({ children, classNames, ...props }) => {
|
|
|
203
250
|
const focusableGroupAttrs = (0, import_react_tabster3.useFocusableGroup)({
|
|
204
251
|
tabBehavior: "limited"
|
|
205
252
|
});
|
|
206
|
-
return /* @__PURE__ */
|
|
253
|
+
return /* @__PURE__ */ import_react7.default.createElement("div", {
|
|
207
254
|
role: "heading",
|
|
208
255
|
...props,
|
|
209
256
|
tabIndex: 0,
|
|
210
257
|
...focusableGroupAttrs,
|
|
211
|
-
className: (0, import_react_ui_theme4.mx)("flex items-center
|
|
258
|
+
className: (0, import_react_ui_theme4.mx)("flex items-center dx-focus-ring-inset-over-all relative !border-is-0", orientation === "horizontal" ? "bs-[--rail-size]" : "is-[--rail-size] flex-col", classNames)
|
|
212
259
|
}, children);
|
|
213
260
|
};
|
|
214
|
-
var StackItemHeadingLabel = /* @__PURE__ */ (0,
|
|
261
|
+
var StackItemHeadingLabel = /* @__PURE__ */ (0, import_react7.forwardRef)(({ attendableId, related, classNames, ...props }, forwardedRef) => {
|
|
215
262
|
const { hasAttention, isAncestor, isRelated } = (0, import_react_ui_attention.useAttention)(attendableId);
|
|
216
|
-
return /* @__PURE__ */
|
|
263
|
+
return /* @__PURE__ */ import_react7.default.createElement("h1", {
|
|
217
264
|
...props,
|
|
218
265
|
"data-attention": (related && isRelated || hasAttention || isAncestor).toString(),
|
|
219
266
|
className: (0, import_react_ui_theme4.mx)("pli-1 min-is-0 is-0 grow truncate font-medium text-baseText data-[attention=true]:text-accentText self-center", classNames),
|
|
220
267
|
ref: forwardedRef
|
|
221
268
|
});
|
|
222
269
|
});
|
|
223
|
-
var
|
|
224
|
-
var
|
|
225
|
-
var measureStackItem = (element) => {
|
|
226
|
-
const stackItemElement = element.closest("[data-dx-stack-item]");
|
|
227
|
-
return stackItemElement?.getBoundingClientRect() ?? {
|
|
228
|
-
width: DEFAULT_EXTRINSIC_SIZE,
|
|
229
|
-
height: DEFAULT_EXTRINSIC_SIZE
|
|
230
|
-
};
|
|
231
|
-
};
|
|
232
|
-
var getNextSize = (startSize, location, client) => {
|
|
233
|
-
return Math.max(MIN_SIZE, startSize + (location.current.input[client] - location.initial.input[client]) / REM);
|
|
234
|
-
};
|
|
270
|
+
var MIN_WIDTH = 20;
|
|
271
|
+
var MIN_HEIGHT = 3;
|
|
235
272
|
var StackItemResizeHandle = () => {
|
|
236
273
|
const { orientation } = useStack();
|
|
237
274
|
const { setSize, size } = useStackItem();
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
(0, import_adapter3.draggable)({
|
|
246
|
-
element: buttonRef.current,
|
|
247
|
-
onGenerateDragPreview: ({ nativeSetDragImage }) => {
|
|
248
|
-
(0, import_disable_native_drag_preview2.disableNativeDragPreview)({
|
|
249
|
-
nativeSetDragImage
|
|
250
|
-
});
|
|
251
|
-
import_prevent_unhandled2.preventUnhandled.start();
|
|
252
|
-
},
|
|
253
|
-
onDragStart: () => {
|
|
254
|
-
dragStartSize.current = dragStartSize.current === "min-content" ? measureStackItem(buttonRef.current)[orientation === "horizontal" ? "width" : "height"] / REM : dragStartSize.current;
|
|
255
|
-
},
|
|
256
|
-
onDrag: ({ location }) => {
|
|
257
|
-
if (typeof dragStartSize.current !== "number") {
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
setSize(getNextSize(dragStartSize.current, location, client));
|
|
261
|
-
},
|
|
262
|
-
onDrop: ({ location }) => {
|
|
263
|
-
if (typeof dragStartSize.current !== "number") {
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
const nextSize = getNextSize(dragStartSize.current, location, client);
|
|
267
|
-
setSize(nextSize, true);
|
|
268
|
-
dragStartSize.current = nextSize;
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
}, []);
|
|
272
|
-
return /* @__PURE__ */ import_react7.default.createElement("button", {
|
|
273
|
-
ref: buttonRef,
|
|
274
|
-
className: (0, import_react_ui_theme5.mx)(orientation === "horizontal" ? "cursor-col-resize" : "cursor-row-resize", "group absolute is-3 bs-full inline-end-[-1px] !border-lb-0", "before:transition-opacity before:duration-100 before:ease-in-out before:opacity-0 hover:before:opacity-100 focus-visible:before:opacity-100 active:before:opacity-100", "before:absolute before:block before:inset-block-0 before:inline-end-0 before:is-1 before:bg-accentFocusIndicator")
|
|
275
|
-
}, /* @__PURE__ */ import_react7.default.createElement("div", {
|
|
276
|
-
role: "none",
|
|
277
|
-
className: "absolute block-start-0 inline-end-[1px] bs-[--rail-size] flex items-center group-hover:opacity-0 group-focus-visible:opacity-0 group-active:opacity-0"
|
|
278
|
-
}, /* @__PURE__ */ import_react7.default.createElement(DragHandleSignifier, null)));
|
|
279
|
-
};
|
|
280
|
-
var DragHandleSignifier = () => {
|
|
281
|
-
return /* @__PURE__ */ import_react7.default.createElement("svg", {
|
|
282
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
283
|
-
viewBox: "0 0 256 256",
|
|
284
|
-
fill: "currentColor",
|
|
285
|
-
className: "shrink-0 bs-[1em] is-[1em] text-unAccent"
|
|
286
|
-
}, /* @__PURE__ */ import_react7.default.createElement("path", {
|
|
287
|
-
d: "M256,64c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z"
|
|
288
|
-
}), /* @__PURE__ */ import_react7.default.createElement("path", {
|
|
289
|
-
d: "M256,120c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z"
|
|
290
|
-
}), /* @__PURE__ */ import_react7.default.createElement("path", {
|
|
291
|
-
d: "M256,176c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z"
|
|
292
|
-
}), /* @__PURE__ */ import_react7.default.createElement("path", {
|
|
293
|
-
d: "M256,232c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z"
|
|
294
|
-
}));
|
|
275
|
+
return /* @__PURE__ */ import_react8.default.createElement(import_react_ui_dnd2.ResizeHandle, {
|
|
276
|
+
side: orientation === "horizontal" ? "inline-end" : "block-end",
|
|
277
|
+
fallbackSize: DEFAULT_EXTRINSIC_SIZE,
|
|
278
|
+
minSize: orientation === "horizontal" ? MIN_WIDTH : MIN_HEIGHT,
|
|
279
|
+
size,
|
|
280
|
+
onSizeChange: setSize
|
|
281
|
+
});
|
|
295
282
|
};
|
|
296
|
-
var MenuSignifierHorizontal = () => /* @__PURE__ */
|
|
283
|
+
var MenuSignifierHorizontal = () => /* @__PURE__ */ import_react10.default.createElement("svg", {
|
|
297
284
|
className: "absolute block-end-[7px]",
|
|
298
285
|
width: 20,
|
|
299
286
|
height: 2,
|
|
300
287
|
viewBox: "0 0 20 2",
|
|
301
288
|
stroke: "currentColor",
|
|
302
289
|
opacity: 0.5
|
|
303
|
-
}, /* @__PURE__ */
|
|
290
|
+
}, /* @__PURE__ */ import_react10.default.createElement("line", {
|
|
304
291
|
x1: 0.5,
|
|
305
292
|
y1: 0.75,
|
|
306
293
|
x2: 19,
|
|
@@ -326,35 +313,40 @@ var translations_default = [
|
|
|
326
313
|
}
|
|
327
314
|
}
|
|
328
315
|
];
|
|
329
|
-
var StackItemSigilButton = /* @__PURE__ */ (0,
|
|
316
|
+
var StackItemSigilButton = /* @__PURE__ */ (0, import_react9.forwardRef)(({ attendableId, classNames, related, children, ...props }, forwardedRef) => {
|
|
330
317
|
const { hasAttention, isAncestor, isRelated } = (0, import_react_ui_attention2.useAttention)(attendableId);
|
|
331
318
|
const variant = related && isRelated || hasAttention || isAncestor ? "primary" : "ghost";
|
|
332
|
-
return /* @__PURE__ */
|
|
319
|
+
return /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.Button, {
|
|
333
320
|
...props,
|
|
334
321
|
variant,
|
|
335
322
|
classNames: [
|
|
336
|
-
"shrink-0 pli-0 min-bs-0 is-[--rail-action] bs-[--rail-action] relative",
|
|
323
|
+
"shrink-0 pli-0 min-bs-0 is-[--rail-action] bs-[--rail-action] relative app-no-drag",
|
|
337
324
|
classNames
|
|
338
325
|
],
|
|
339
326
|
ref: forwardedRef
|
|
340
|
-
}, /* @__PURE__ */
|
|
327
|
+
}, /* @__PURE__ */ import_react9.default.createElement(MenuSignifierHorizontal, null), children);
|
|
341
328
|
});
|
|
342
|
-
var StackItemSigil = /* @__PURE__ */ (0,
|
|
329
|
+
var StackItemSigil = /* @__PURE__ */ (0, import_react9.forwardRef)(({ actions: actionGroups, onAction, triggerLabel, attendableId, icon, related, children }, forwardedRef) => {
|
|
343
330
|
const { t } = (0, import_react_ui3.useTranslation)(translationKey);
|
|
344
|
-
const suppressNextTooltip = (0,
|
|
345
|
-
const [optionsMenuOpen, setOptionsMenuOpen] = (0,
|
|
346
|
-
const
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
331
|
+
const suppressNextTooltip = (0, import_react9.useRef)(false);
|
|
332
|
+
const [optionsMenuOpen, setOptionsMenuOpen] = (0, import_react9.useState)(false);
|
|
333
|
+
const hasActions = actionGroups && actionGroups.length > 0;
|
|
334
|
+
const button = /* @__PURE__ */ import_react9.default.createElement(StackItemSigilButton, {
|
|
335
|
+
attendableId,
|
|
336
|
+
related,
|
|
337
|
+
// TODO(wittjosiah): Better disabling of interactive styles when no action are available.
|
|
338
|
+
// Remove underscore icon when no actions are available?
|
|
339
|
+
classNames: !hasActions && "cursor-default"
|
|
340
|
+
}, /* @__PURE__ */ import_react9.default.createElement("span", {
|
|
341
|
+
className: "sr-only"
|
|
342
|
+
}, triggerLabel), /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.Icon, {
|
|
343
|
+
icon,
|
|
344
|
+
size: 5
|
|
345
|
+
}));
|
|
346
|
+
if (!hasActions) {
|
|
347
|
+
return button;
|
|
348
|
+
}
|
|
349
|
+
return /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.DropdownMenu.Root, {
|
|
358
350
|
open: optionsMenuOpen,
|
|
359
351
|
onOpenChange: (nextOpen) => {
|
|
360
352
|
if (!nextOpen) {
|
|
@@ -362,30 +354,20 @@ var StackItemSigil = /* @__PURE__ */ (0, import_react8.forwardRef)(({ actions: a
|
|
|
362
354
|
}
|
|
363
355
|
return setOptionsMenuOpen(nextOpen);
|
|
364
356
|
}
|
|
365
|
-
}, /* @__PURE__ */
|
|
366
|
-
asChild: true
|
|
367
|
-
}, /* @__PURE__ */ import_react8.default.createElement(import_react_ui3.DropdownMenu.Trigger, {
|
|
357
|
+
}, /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.DropdownMenu.Trigger, {
|
|
368
358
|
asChild: true,
|
|
369
359
|
ref: forwardedRef
|
|
370
|
-
}, /* @__PURE__ */
|
|
371
|
-
attendableId,
|
|
372
|
-
related
|
|
373
|
-
}, /* @__PURE__ */ import_react8.default.createElement("span", {
|
|
374
|
-
className: "sr-only"
|
|
375
|
-
}, triggerLabel), /* @__PURE__ */ import_react8.default.createElement(import_react_ui3.Icon, {
|
|
376
|
-
icon,
|
|
377
|
-
size: 5
|
|
378
|
-
})))), /* @__PURE__ */ import_react8.default.createElement(import_react_ui3.DropdownMenu.Portal, null, /* @__PURE__ */ import_react8.default.createElement(import_react_ui3.DropdownMenu.Content, {
|
|
360
|
+
}, button), /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.DropdownMenu.Portal, null, /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.DropdownMenu.Content, {
|
|
379
361
|
classNames: "z-[31]"
|
|
380
|
-
}, /* @__PURE__ */
|
|
381
|
-
const separator = index > 0 ? /* @__PURE__ */
|
|
382
|
-
return /* @__PURE__ */
|
|
362
|
+
}, /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.DropdownMenu.Viewport, null, actionGroups?.map((actions, index) => {
|
|
363
|
+
const separator = index > 0 ? /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.DropdownMenu.Separator, null) : null;
|
|
364
|
+
return /* @__PURE__ */ import_react9.default.createElement(import_react9.Fragment, {
|
|
383
365
|
key: index
|
|
384
366
|
}, separator, actions.map((action) => {
|
|
385
367
|
const shortcut = typeof action.properties.keyBinding === "string" ? action.properties.keyBinding : action.properties.keyBinding?.[(0, import_util.getHostPlatform)()];
|
|
386
368
|
const menuItemType = action.properties.menuItemType;
|
|
387
369
|
const Root = menuItemType === "toggle" ? import_react_ui3.DropdownMenu.CheckboxItem : import_react_ui3.DropdownMenu.Item;
|
|
388
|
-
return /* @__PURE__ */
|
|
370
|
+
return /* @__PURE__ */ import_react9.default.createElement(Root, {
|
|
389
371
|
key: action.id,
|
|
390
372
|
onClick: (event) => {
|
|
391
373
|
if (action.properties.disabled) {
|
|
@@ -402,36 +384,34 @@ var StackItemSigil = /* @__PURE__ */ (0, import_react8.forwardRef)(({ actions: a
|
|
|
402
384
|
...action.properties?.testId && {
|
|
403
385
|
"data-testid": action.properties.testId
|
|
404
386
|
}
|
|
405
|
-
}, /* @__PURE__ */
|
|
387
|
+
}, /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.Icon, {
|
|
406
388
|
icon: action.properties.icon ?? "ph--placeholder--regular",
|
|
407
389
|
size: 4
|
|
408
|
-
}), /* @__PURE__ */
|
|
390
|
+
}), /* @__PURE__ */ import_react9.default.createElement("span", {
|
|
409
391
|
className: "grow truncate"
|
|
410
|
-
}, (0, import_react_ui3.toLocalizedString)(action.properties.label ?? "", t)), menuItemType === "toggle" && /* @__PURE__ */
|
|
392
|
+
}, (0, import_react_ui3.toLocalizedString)(action.properties.label ?? "", t)), menuItemType === "toggle" && /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.DropdownMenu.ItemIndicator, {
|
|
411
393
|
asChild: true
|
|
412
|
-
}, /* @__PURE__ */
|
|
394
|
+
}, /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.Icon, {
|
|
413
395
|
icon: "ph--check--regular",
|
|
414
396
|
size: 4
|
|
415
|
-
})), shortcut && /* @__PURE__ */
|
|
416
|
-
className: (0,
|
|
397
|
+
})), shortcut && /* @__PURE__ */ import_react9.default.createElement("span", {
|
|
398
|
+
className: (0, import_react_ui_theme5.mx)("shrink-0", import_react_ui_theme5.descriptionText)
|
|
417
399
|
}, (0, import_keyboard.keySymbols)(shortcut).join("")));
|
|
418
400
|
}));
|
|
419
|
-
}), children), /* @__PURE__ */
|
|
420
|
-
side: "bottom"
|
|
421
|
-
}, triggerLabel, /* @__PURE__ */ import_react8.default.createElement(import_react_ui3.Tooltip.Arrow, null))));
|
|
401
|
+
}), children), /* @__PURE__ */ import_react9.default.createElement(import_react_ui3.DropdownMenu.Arrow, null))));
|
|
422
402
|
});
|
|
423
403
|
var DEFAULT_HORIZONTAL_SIZE = 44;
|
|
424
404
|
var DEFAULT_VERTICAL_SIZE = "min-content";
|
|
425
405
|
var DEFAULT_EXTRINSIC_SIZE = DEFAULT_HORIZONTAL_SIZE;
|
|
426
|
-
var StackItemRoot = /* @__PURE__ */ (0,
|
|
427
|
-
const [itemElement, itemRef] = (0,
|
|
428
|
-
const [selfDragHandleElement, selfDragHandleRef] = (0,
|
|
429
|
-
const [closestEdge, setEdge] = (0,
|
|
406
|
+
var StackItemRoot = /* @__PURE__ */ (0, import_react4.forwardRef)(({ item, children, classNames, size: propsSize, onSizeChange, role, order, style, disableRearrange, focusIndicatorVariant = "over-all", ...props }, forwardedRef) => {
|
|
407
|
+
const [itemElement, itemRef] = (0, import_react4.useState)(null);
|
|
408
|
+
const [selfDragHandleElement, selfDragHandleRef] = (0, import_react4.useState)(null);
|
|
409
|
+
const [closestEdge, setEdge] = (0, import_react4.useState)(null);
|
|
430
410
|
const { orientation, rail, onRearrange } = useStack();
|
|
431
|
-
const [size = orientation === "horizontal" ? DEFAULT_HORIZONTAL_SIZE : DEFAULT_VERTICAL_SIZE, setInternalSize] = (0,
|
|
411
|
+
const [size = orientation === "horizontal" ? DEFAULT_HORIZONTAL_SIZE : DEFAULT_VERTICAL_SIZE, setInternalSize] = (0, import_react4.useState)(propsSize);
|
|
432
412
|
const Root = role ?? "div";
|
|
433
413
|
const composedItemRef = (0, import_react_compose_refs2.composeRefs)(itemRef, forwardedRef);
|
|
434
|
-
const setSize = (0,
|
|
414
|
+
const setSize = (0, import_react4.useCallback)((nextSize, commit) => {
|
|
435
415
|
setInternalSize(nextSize);
|
|
436
416
|
if (commit) {
|
|
437
417
|
onSizeChange?.(nextSize);
|
|
@@ -440,11 +420,11 @@ var StackItemRoot = /* @__PURE__ */ (0, import_react3.forwardRef)(({ item, child
|
|
|
440
420
|
onSizeChange
|
|
441
421
|
]);
|
|
442
422
|
const type = orientation === "horizontal" ? "column" : "card";
|
|
443
|
-
(0,
|
|
444
|
-
if (!itemElement || !onRearrange) {
|
|
423
|
+
(0, import_react4.useLayoutEffect)(() => {
|
|
424
|
+
if (!itemElement || !onRearrange || disableRearrange) {
|
|
445
425
|
return;
|
|
446
426
|
}
|
|
447
|
-
return (0,
|
|
427
|
+
return (0, import_combine2.combine)((0, import_adapter2.draggable)({
|
|
448
428
|
element: itemElement,
|
|
449
429
|
...selfDragHandleElement && {
|
|
450
430
|
dragHandle: selfDragHandleElement
|
|
@@ -453,12 +433,25 @@ var StackItemRoot = /* @__PURE__ */ (0, import_react3.forwardRef)(({ item, child
|
|
|
453
433
|
id: item.id,
|
|
454
434
|
type
|
|
455
435
|
}),
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
(0,
|
|
459
|
-
|
|
436
|
+
onGenerateDragPreview: ({ nativeSetDragImage, source, location }) => {
|
|
437
|
+
document.body.setAttribute("data-drag-preview", "true");
|
|
438
|
+
(0, import_scroll_just_enough_into_view.scrollJustEnoughIntoView)({
|
|
439
|
+
element: source.element
|
|
460
440
|
});
|
|
461
|
-
|
|
441
|
+
const { x, y } = (0, import_preserve_offset_on_source.preserveOffsetOnSource)({
|
|
442
|
+
element: source.element,
|
|
443
|
+
input: location.current.input
|
|
444
|
+
})({
|
|
445
|
+
container: source.element.offsetParent ?? document.body
|
|
446
|
+
});
|
|
447
|
+
nativeSetDragImage?.(source.element, x, y);
|
|
448
|
+
},
|
|
449
|
+
onDragStart: () => {
|
|
450
|
+
document.body.removeAttribute("data-drag-preview");
|
|
451
|
+
itemElement?.closest("[data-drag-autoscroll]")?.setAttribute("data-drag-autoscroll", "active");
|
|
452
|
+
},
|
|
453
|
+
onDrop: () => {
|
|
454
|
+
itemElement?.closest("[data-drag-autoscroll]")?.setAttribute("data-drag-autoscroll", "idle");
|
|
462
455
|
}
|
|
463
456
|
}), (0, import_adapter2.dropTargetForElements)({
|
|
464
457
|
element: itemElement,
|
|
@@ -506,29 +499,30 @@ var StackItemRoot = /* @__PURE__ */ (0, import_react3.forwardRef)(({ item, child
|
|
|
506
499
|
const focusGroupAttrs = (0, import_react_tabster2.useFocusableGroup)({
|
|
507
500
|
tabBehavior: "limited"
|
|
508
501
|
});
|
|
509
|
-
return /* @__PURE__ */
|
|
502
|
+
return /* @__PURE__ */ import_react4.default.createElement(StackItemContext.Provider, {
|
|
510
503
|
value: {
|
|
511
504
|
selfDragHandleRef,
|
|
512
505
|
size,
|
|
513
506
|
setSize
|
|
514
507
|
}
|
|
515
|
-
}, /* @__PURE__ */
|
|
508
|
+
}, /* @__PURE__ */ import_react4.default.createElement(Root, {
|
|
516
509
|
...props,
|
|
517
510
|
tabIndex: 0,
|
|
518
511
|
...focusGroupAttrs,
|
|
519
|
-
className: (0, import_react_ui_theme2.mx)("group/stack-item grid relative
|
|
512
|
+
className: (0, import_react_ui_theme2.mx)("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"), classNames),
|
|
520
513
|
"data-dx-stack-item": true,
|
|
514
|
+
...import_react_ui_dnd.resizeAttributes,
|
|
521
515
|
style: {
|
|
522
|
-
...size
|
|
523
|
-
[orientation === "horizontal" ? "inlineSize" : "blockSize"]: `${size}rem`
|
|
524
|
-
},
|
|
516
|
+
...(0, import_react_ui_dnd.sizeStyle)(size, orientation),
|
|
525
517
|
...Number.isFinite(order) && {
|
|
526
518
|
[orientation === "horizontal" ? "gridColumn" : "gridRow"]: `${order}`
|
|
527
519
|
},
|
|
528
520
|
...style
|
|
529
521
|
},
|
|
530
522
|
ref: composedItemRef
|
|
531
|
-
}, children, closestEdge && /* @__PURE__ */
|
|
523
|
+
}, children, closestEdge && /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.ListItem.DropIndicator, {
|
|
524
|
+
lineInset: 8,
|
|
525
|
+
terminalInset: -8,
|
|
532
526
|
edge: closestEdge
|
|
533
527
|
})));
|
|
534
528
|
});
|
|
@@ -543,46 +537,46 @@ var StackItem = {
|
|
|
543
537
|
SigilButton: StackItemSigilButton
|
|
544
538
|
};
|
|
545
539
|
var LayoutControl = ({ icon, label, ...props }) => {
|
|
546
|
-
return /* @__PURE__ */
|
|
540
|
+
return /* @__PURE__ */ import_react11.default.createElement(import_react_ui4.Tooltip.Root, null, /* @__PURE__ */ import_react11.default.createElement(import_react_ui4.Tooltip.Trigger, {
|
|
547
541
|
asChild: true
|
|
548
|
-
}, /* @__PURE__ */
|
|
542
|
+
}, /* @__PURE__ */ import_react11.default.createElement(import_react_ui4.Button, {
|
|
549
543
|
variant: "ghost",
|
|
550
544
|
...props
|
|
551
|
-
}, /* @__PURE__ */
|
|
545
|
+
}, /* @__PURE__ */ import_react11.default.createElement("span", {
|
|
552
546
|
className: "sr-only"
|
|
553
|
-
}, label), /* @__PURE__ */
|
|
547
|
+
}, label), /* @__PURE__ */ import_react11.default.createElement(import_react_ui4.Icon, {
|
|
554
548
|
icon
|
|
555
|
-
}))), /* @__PURE__ */
|
|
549
|
+
}))), /* @__PURE__ */ import_react11.default.createElement(import_react_ui4.Tooltip.Portal, null, /* @__PURE__ */ import_react11.default.createElement(import_react_ui4.Tooltip.Content, {
|
|
556
550
|
side: "bottom"
|
|
557
551
|
}, label)));
|
|
558
552
|
};
|
|
559
|
-
var LayoutControls = /* @__PURE__ */ (0,
|
|
553
|
+
var LayoutControls = /* @__PURE__ */ (0, import_react11.forwardRef)(({ onClick, variant = "default", capabilities: can, isSolo, pin, close = false, children, ...props }, forwardedRef) => {
|
|
560
554
|
const { t } = (0, import_react_ui4.useTranslation)(translationKey);
|
|
561
555
|
const buttonClassNames = variant === "hide-disabled" ? "disabled:hidden !p-1" : "!p-1";
|
|
562
|
-
return /* @__PURE__ */
|
|
556
|
+
return /* @__PURE__ */ import_react11.default.createElement(import_react_ui4.ButtonGroup, {
|
|
563
557
|
...props,
|
|
564
558
|
ref: forwardedRef
|
|
565
559
|
}, pin && !isSolo && [
|
|
566
560
|
"both",
|
|
567
561
|
"start"
|
|
568
|
-
].includes(pin) && /* @__PURE__ */
|
|
562
|
+
].includes(pin) && /* @__PURE__ */ import_react11.default.createElement(LayoutControl, {
|
|
569
563
|
label: t("pin start label"),
|
|
570
564
|
variant: "ghost",
|
|
571
565
|
classNames: buttonClassNames,
|
|
572
566
|
onClick: () => onClick?.("pin-start"),
|
|
573
567
|
icon: "ph--caret-line-left--regular"
|
|
574
|
-
}), can.solo && /* @__PURE__ */
|
|
568
|
+
}), can.solo && /* @__PURE__ */ import_react11.default.createElement(LayoutControl, {
|
|
575
569
|
label: t("solo layout label"),
|
|
576
570
|
classNames: buttonClassNames,
|
|
577
571
|
onClick: () => onClick?.("solo"),
|
|
578
572
|
icon: isSolo ? "ph--arrows-in--regular" : "ph--arrows-out--regular"
|
|
579
|
-
}), !isSolo && can.solo && /* @__PURE__ */
|
|
573
|
+
}), !isSolo && can.solo && /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, /* @__PURE__ */ import_react11.default.createElement(LayoutControl, {
|
|
580
574
|
label: t("increment start label"),
|
|
581
575
|
disabled: !can.incrementStart,
|
|
582
576
|
classNames: buttonClassNames,
|
|
583
577
|
onClick: () => onClick?.("increment-start"),
|
|
584
578
|
icon: "ph--caret-left--regular"
|
|
585
|
-
}), /* @__PURE__ */
|
|
579
|
+
}), /* @__PURE__ */ import_react11.default.createElement(LayoutControl, {
|
|
586
580
|
label: t("increment end label"),
|
|
587
581
|
disabled: !can.incrementEnd,
|
|
588
582
|
classNames: buttonClassNames,
|
|
@@ -591,12 +585,12 @@ var LayoutControls = /* @__PURE__ */ (0, import_react10.forwardRef)(({ onClick,
|
|
|
591
585
|
})), pin && !isSolo && [
|
|
592
586
|
"both",
|
|
593
587
|
"end"
|
|
594
|
-
].includes(pin) && /* @__PURE__ */
|
|
588
|
+
].includes(pin) && /* @__PURE__ */ import_react11.default.createElement(LayoutControl, {
|
|
595
589
|
label: t("pin end label"),
|
|
596
590
|
classNames: buttonClassNames,
|
|
597
591
|
onClick: () => onClick?.("pin-end"),
|
|
598
592
|
icon: "ph--caret-line-right--regular"
|
|
599
|
-
}), close && !isSolo && /* @__PURE__ */
|
|
593
|
+
}), close && !isSolo && /* @__PURE__ */ import_react11.default.createElement(LayoutControl, {
|
|
600
594
|
label: t(`${typeof close === "string" ? "minify" : "close"} label`),
|
|
601
595
|
classNames: buttonClassNames,
|
|
602
596
|
onClick: () => onClick?.("close"),
|
|
@@ -614,8 +608,11 @@ var LayoutControls = /* @__PURE__ */ (0, import_react10.forwardRef)(({ onClick,
|
|
|
614
608
|
StackContext,
|
|
615
609
|
StackItem,
|
|
616
610
|
StackItemContext,
|
|
611
|
+
autoScrollRootAttributes,
|
|
617
612
|
railGridHorizontal,
|
|
613
|
+
railGridHorizontalContainFitContent,
|
|
618
614
|
railGridVertical,
|
|
615
|
+
railGridVerticalContainFitContent,
|
|
619
616
|
translations,
|
|
620
617
|
useStack,
|
|
621
618
|
useStackItem
|