@smwb/ui-solid 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist/assets/styles/less/components/table/table.entry.css +1 -1
- package/dist/assets/styles/less/components/treeView/treeView.entry.css +1 -1
- package/dist/components/dataDisplay/table/tableHeadCell.js +32 -23
- package/dist/components/dataDisplay/table/tableHeadCell.js.map +1 -1
- package/dist/components/layout/floatingWindow/floatingWindow.js +186 -173
- package/dist/components/layout/floatingWindow/floatingWindow.js.map +1 -1
- package/dist/connects/rt/index.d.ts +2 -0
- package/dist/connects/rt/table/index.d.ts +2 -0
- package/dist/connects/rt/table/table.d.ts +48 -0
- package/dist/headless/components/dataDisplay/table/tableHeadCell.js +32 -23
- package/dist/headless/components/dataDisplay/table/tableHeadCell.js.map +1 -1
- package/dist/headless/components/layout/floatingWindow/floatingWindow.js +186 -173
- package/dist/headless/components/layout/floatingWindow/floatingWindow.js.map +1 -1
- package/dist/headless/source/components/dataDisplay/table/tableHeadCell.jsx +7 -4
- package/dist/headless/source/components/dataDisplay/table/tableHeadCell.jsx.map +1 -1
- package/dist/headless/source/components/layout/floatingWindow/floatingWindow.jsx +20 -5
- package/dist/headless/source/components/layout/floatingWindow/floatingWindow.jsx.map +1 -1
- package/dist/headless/source/connects/rt/index.js +5 -0
- package/dist/headless/source/connects/rt/index.js.map +7 -0
- package/dist/headless/source/connects/rt/table/index.js +6 -0
- package/dist/headless/source/connects/rt/table/index.js.map +7 -0
- package/dist/headless/source/connects/rt/table/table.jsx +183 -0
- package/dist/headless/source/connects/rt/table/table.jsx.map +1 -0
- package/dist/source/components/dataDisplay/table/tableHeadCell.jsx +7 -4
- package/dist/source/components/dataDisplay/table/tableHeadCell.jsx.map +1 -1
- package/dist/source/components/layout/floatingWindow/floatingWindow.jsx +20 -5
- package/dist/source/components/layout/floatingWindow/floatingWindow.jsx.map +1 -1
- package/dist/source/connects/rt/index.js +5 -0
- package/dist/source/connects/rt/index.js.map +7 -0
- package/dist/source/connects/rt/table/index.js +6 -0
- package/dist/source/connects/rt/table/index.js.map +7 -0
- package/dist/source/connects/rt/table/table.jsx +183 -0
- package/dist/source/connects/rt/table/table.jsx.map +1 -0
- package/package.json +18 -5
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { isServer as
|
|
2
|
-
import { mergeProps as
|
|
3
|
-
import
|
|
4
|
-
import { createCssTransition as
|
|
5
|
-
import { createControllableState as
|
|
6
|
-
import { createId as
|
|
7
|
-
import { mergeRefs as
|
|
8
|
-
import { Icon as
|
|
9
|
-
var
|
|
10
|
-
const
|
|
1
|
+
import { isServer as $, createComponent as d, Portal as ie, use as oe, spread as K, mergeProps as T, insert as c, setAttribute as x, effect as M, memo as ae, template as _, delegateEvents as re } from "solid-js/web";
|
|
2
|
+
import { mergeProps as le, splitProps as se, createSignal as de, createMemo as ce, createEffect as A, onCleanup as V, Show as y, For as he } from "solid-js";
|
|
3
|
+
import O from "clsx";
|
|
4
|
+
import { createCssTransition as we } from "../../../primitives/createCssTransition.js";
|
|
5
|
+
import { createControllableState as E } from "../../../primitives/createControllableState.js";
|
|
6
|
+
import { createId as pe } from "../../../primitives/createId.js";
|
|
7
|
+
import { mergeRefs as ue } from "../../../primitives/mergeRefs.js";
|
|
8
|
+
import { Icon as P } from "../../base/icon/icon.js";
|
|
9
|
+
var me = /* @__PURE__ */ _("<span class=smwb-floating-window__title>"), ge = /* @__PURE__ */ _("<button type=button class=smwb-floating-window__action data-testid=floating-window-collapse>"), fe = /* @__PURE__ */ _("<button type=button class=smwb-floating-window__action data-testid=floating-window-close>"), xe = /* @__PURE__ */ _("<div class=smwb-floating-window__body data-testid=floating-window-body>"), ye = /* @__PURE__ */ _("<div><div class=smwb-floating-window__header data-testid=floating-window-header><span class=smwb-floating-window__grip data-testid=floating-window-move role=button tabindex=0></span><div class=smwb-floating-window__actions data-no-drag>"), be = /* @__PURE__ */ _("<div>");
|
|
10
|
+
const _e = {
|
|
11
11
|
n: {
|
|
12
12
|
dx: 0,
|
|
13
13
|
dy: 1,
|
|
@@ -56,15 +56,15 @@ const fe = {
|
|
|
56
56
|
dw: -1,
|
|
57
57
|
dh: 1
|
|
58
58
|
}
|
|
59
|
-
},
|
|
59
|
+
}, ve = ["n", "s", "e", "w", "ne", "nw", "se", "sw"], b = () => typeof window > "u" ? {
|
|
60
60
|
width: 0,
|
|
61
61
|
height: 0
|
|
62
62
|
} : {
|
|
63
63
|
width: window.innerWidth,
|
|
64
64
|
height: window.innerHeight
|
|
65
65
|
};
|
|
66
|
-
function
|
|
67
|
-
const
|
|
66
|
+
function Re(X) {
|
|
67
|
+
const Y = le({
|
|
68
68
|
minWidth: 200,
|
|
69
69
|
minHeight: 120,
|
|
70
70
|
keepVisible: 56,
|
|
@@ -88,10 +88,10 @@ function Me(O) {
|
|
|
88
88
|
closeAriaLabel: "Close window",
|
|
89
89
|
collapseAriaLabel: "Collapse window",
|
|
90
90
|
expandAriaLabel: "Expand window"
|
|
91
|
-
},
|
|
91
|
+
}, X), [t, U] = se(Y, ["open", "title", "headerActions", "position", "defaultPosition", "onPositionChange", "onMoveEnd", "size", "defaultSize", "onResize", "onResizeEnd", "minWidth", "minHeight", "maxWidth", "maxHeight", "keepVisible", "moveStep", "resizeStep", "zIndex", "onActivate", "collapsed", "defaultCollapsed", "onCollapsedChange", "collapsible", "movable", "resizable", "closeOnEsc", "onClose", "moveHandleAriaLabel", "resizeHandleAriaLabel", "closeAriaLabel", "collapseAriaLabel", "expandAriaLabel", "class", "style", "children", "ref"]);
|
|
92
92
|
let f;
|
|
93
|
-
const
|
|
94
|
-
in: () =>
|
|
93
|
+
const H = pe(void 0, "smwb-floating-window-title"), R = we({
|
|
94
|
+
in: () => t.open,
|
|
95
95
|
timeout: {
|
|
96
96
|
enter: 120,
|
|
97
97
|
exit: 120
|
|
@@ -100,199 +100,212 @@ function Me(O) {
|
|
|
100
100
|
enterDone: "smwb-floating-window_entered"
|
|
101
101
|
},
|
|
102
102
|
appear: !0
|
|
103
|
-
}), [
|
|
104
|
-
value: () =>
|
|
105
|
-
defaultValue:
|
|
106
|
-
onChange: (e) =>
|
|
107
|
-
}), [z,
|
|
108
|
-
value: () =>
|
|
109
|
-
defaultValue:
|
|
110
|
-
onChange: (e) =>
|
|
111
|
-
}), [m,
|
|
112
|
-
value: () =>
|
|
113
|
-
defaultValue:
|
|
114
|
-
onChange: (e) =>
|
|
115
|
-
}),
|
|
116
|
-
const
|
|
103
|
+
}), [v, F] = E({
|
|
104
|
+
value: () => t.position,
|
|
105
|
+
defaultValue: t.defaultPosition,
|
|
106
|
+
onChange: (e) => t.onPositionChange?.(e)
|
|
107
|
+
}), [z, Z] = E({
|
|
108
|
+
value: () => t.size,
|
|
109
|
+
defaultValue: t.defaultSize,
|
|
110
|
+
onChange: (e) => t.onResize?.(e)
|
|
111
|
+
}), [m, j] = E({
|
|
112
|
+
value: () => t.collapsed,
|
|
113
|
+
defaultValue: t.defaultCollapsed,
|
|
114
|
+
onChange: (e) => t.onCollapsedChange?.(e)
|
|
115
|
+
}), C = (e, n) => {
|
|
116
|
+
const i = t.maxWidth ?? n.width, r = t.maxHeight ?? n.height, a = Math.max(t.minWidth, Math.min(i, e.width)), o = Math.max(t.minHeight, Math.min(r, e.height)), l = Math.min(t.keepVisible, a), u = Math.max(l - a, Math.min(n.width - l, e.x)), g = Math.max(0, Math.min(Math.max(0, n.height - l), e.y));
|
|
117
117
|
return {
|
|
118
118
|
x: u,
|
|
119
119
|
y: g,
|
|
120
|
-
width:
|
|
121
|
-
height:
|
|
120
|
+
width: a,
|
|
121
|
+
height: o
|
|
122
122
|
};
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
width:
|
|
135
|
-
height:
|
|
123
|
+
}, G = (e, n) => {
|
|
124
|
+
const i = C(e, n);
|
|
125
|
+
return {
|
|
126
|
+
...i,
|
|
127
|
+
x: Math.max(0, Math.min(i.x, n.width - i.width)),
|
|
128
|
+
y: Math.max(0, Math.min(i.y, n.height - i.height))
|
|
129
|
+
};
|
|
130
|
+
}, [N, L] = de(!1), s = ce(() => {
|
|
131
|
+
const e = {
|
|
132
|
+
x: v().x,
|
|
133
|
+
y: v().y,
|
|
134
|
+
width: z().width,
|
|
135
|
+
height: z().height
|
|
136
|
+
};
|
|
137
|
+
return N() ? C(e, b()) : G(e, b());
|
|
138
|
+
}), h = (e, n = !0) => {
|
|
139
|
+
n && L(!0);
|
|
140
|
+
const i = C(e, b()), r = v(), a = z();
|
|
141
|
+
(i.x !== r.x || i.y !== r.y) && F({
|
|
142
|
+
x: i.x,
|
|
143
|
+
y: i.y
|
|
144
|
+
}), (i.width !== a.width || i.height !== a.height) && Z({
|
|
145
|
+
width: i.width,
|
|
146
|
+
height: i.height
|
|
136
147
|
});
|
|
137
148
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
149
|
+
A(() => {
|
|
150
|
+
t.open || L(!1);
|
|
151
|
+
}), A(() => {
|
|
152
|
+
if ($ || !t.open) return;
|
|
153
|
+
const e = () => h(s(), !1);
|
|
154
|
+
window.addEventListener("resize", e), V(() => window.removeEventListener("resize", e));
|
|
155
|
+
}), A(() => {
|
|
156
|
+
if ($ || !t.open || !t.closeOnEsc || !t.onClose) return;
|
|
157
|
+
const e = (n) => {
|
|
158
|
+
n.key === "Escape" && (!f || !f.contains(document.activeElement) || t.onClose?.());
|
|
146
159
|
};
|
|
147
|
-
document.addEventListener("keydown", e),
|
|
160
|
+
document.addEventListener("keydown", e), V(() => document.removeEventListener("keydown", e));
|
|
148
161
|
});
|
|
149
|
-
const
|
|
150
|
-
|
|
162
|
+
const k = () => {
|
|
163
|
+
t.onActivate?.(), f && !f.contains(document.activeElement) && f.focus({
|
|
151
164
|
preventScroll: !0
|
|
152
165
|
});
|
|
153
166
|
};
|
|
154
167
|
let w = null;
|
|
155
|
-
const
|
|
156
|
-
if (!
|
|
168
|
+
const q = (e) => {
|
|
169
|
+
if (!t.movable || e.target?.closest("button,[data-no-drag]")) return;
|
|
157
170
|
e.preventDefault();
|
|
158
|
-
const
|
|
171
|
+
const n = s();
|
|
159
172
|
w = {
|
|
160
173
|
px: e.clientX,
|
|
161
174
|
py: e.clientY,
|
|
162
|
-
x:
|
|
163
|
-
y:
|
|
175
|
+
x: n.x,
|
|
176
|
+
y: n.y
|
|
164
177
|
};
|
|
165
178
|
try {
|
|
166
179
|
e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
167
180
|
} catch {
|
|
168
181
|
}
|
|
169
|
-
},
|
|
182
|
+
}, B = (e) => {
|
|
170
183
|
if (!w) return;
|
|
171
|
-
const
|
|
184
|
+
const n = s();
|
|
172
185
|
h({
|
|
173
|
-
...
|
|
186
|
+
...n,
|
|
174
187
|
x: w.x + e.clientX - w.px,
|
|
175
188
|
y: w.y + e.clientY - w.py
|
|
176
189
|
});
|
|
177
|
-
},
|
|
190
|
+
}, S = (e) => {
|
|
178
191
|
if (w) {
|
|
179
192
|
w = null;
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
x:
|
|
183
|
-
y:
|
|
193
|
+
const n = s();
|
|
194
|
+
t.onMoveEnd?.({
|
|
195
|
+
x: n.x,
|
|
196
|
+
y: n.y
|
|
184
197
|
});
|
|
185
198
|
}
|
|
186
199
|
e.currentTarget.hasPointerCapture?.(e.pointerId) && e.currentTarget.releasePointerCapture?.(e.pointerId);
|
|
187
200
|
};
|
|
188
201
|
let p = null;
|
|
189
|
-
const
|
|
190
|
-
|
|
202
|
+
const J = (e, n) => {
|
|
203
|
+
n.preventDefault(), n.stopPropagation(), p = {
|
|
191
204
|
dir: e,
|
|
192
|
-
px:
|
|
193
|
-
py:
|
|
205
|
+
px: n.clientX,
|
|
206
|
+
py: n.clientY,
|
|
194
207
|
rect: s()
|
|
195
|
-
},
|
|
208
|
+
}, k();
|
|
196
209
|
try {
|
|
197
|
-
|
|
210
|
+
n.currentTarget.setPointerCapture?.(n.pointerId);
|
|
198
211
|
} catch {
|
|
199
212
|
}
|
|
200
|
-
},
|
|
213
|
+
}, Q = (e) => {
|
|
201
214
|
if (!p) return;
|
|
202
|
-
const
|
|
215
|
+
const n = _e[p.dir], i = e.clientX - p.px, r = e.clientY - p.py, a = p.rect, o = b(), l = t.maxWidth ?? o.width, u = t.maxHeight ?? o.height, g = Math.min(l, Math.max(t.minWidth, a.width + n.dw * i)), W = Math.min(u, Math.max(t.minHeight, a.height + n.dh * r));
|
|
203
216
|
h({
|
|
204
|
-
x:
|
|
205
|
-
y:
|
|
217
|
+
x: n.dx ? a.x + a.width - g : a.x,
|
|
218
|
+
y: n.dy ? a.y + a.height - W : a.y,
|
|
206
219
|
width: g,
|
|
207
|
-
height:
|
|
220
|
+
height: W
|
|
208
221
|
});
|
|
209
|
-
},
|
|
222
|
+
}, D = (e) => {
|
|
210
223
|
if (p) {
|
|
211
224
|
p = null;
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
width:
|
|
215
|
-
height:
|
|
225
|
+
const n = s();
|
|
226
|
+
t.onResizeEnd?.({
|
|
227
|
+
width: n.width,
|
|
228
|
+
height: n.height
|
|
216
229
|
});
|
|
217
230
|
}
|
|
218
231
|
e.currentTarget.hasPointerCapture?.(e.pointerId) && e.currentTarget.releasePointerCapture?.(e.pointerId);
|
|
219
|
-
},
|
|
220
|
-
const
|
|
221
|
-
e ?
|
|
222
|
-
width:
|
|
223
|
-
height:
|
|
224
|
-
}) :
|
|
225
|
-
x:
|
|
226
|
-
y:
|
|
232
|
+
}, I = (e) => {
|
|
233
|
+
const n = s();
|
|
234
|
+
e ? t.onResizeEnd?.({
|
|
235
|
+
width: n.width,
|
|
236
|
+
height: n.height
|
|
237
|
+
}) : t.onMoveEnd?.({
|
|
238
|
+
x: n.x,
|
|
239
|
+
y: n.y
|
|
227
240
|
});
|
|
228
|
-
},
|
|
229
|
-
const
|
|
230
|
-
ArrowLeft: [-
|
|
231
|
-
ArrowRight: [
|
|
232
|
-
ArrowUp: [0, -
|
|
233
|
-
ArrowDown: [0,
|
|
241
|
+
}, ee = (e) => {
|
|
242
|
+
const n = s(), i = e.shiftKey ? t.resizeStep : t.moveStep, a = {
|
|
243
|
+
ArrowLeft: [-i, 0],
|
|
244
|
+
ArrowRight: [i, 0],
|
|
245
|
+
ArrowUp: [0, -i],
|
|
246
|
+
ArrowDown: [0, i]
|
|
234
247
|
}[e.key];
|
|
235
|
-
|
|
236
|
-
...
|
|
237
|
-
width:
|
|
238
|
-
height:
|
|
248
|
+
a && (e.preventDefault(), e.shiftKey ? h({
|
|
249
|
+
...n,
|
|
250
|
+
width: n.width + a[0],
|
|
251
|
+
height: n.height + a[1]
|
|
239
252
|
}) : h({
|
|
240
|
-
...
|
|
241
|
-
x:
|
|
242
|
-
y:
|
|
243
|
-
}),
|
|
244
|
-
},
|
|
245
|
-
const
|
|
253
|
+
...n,
|
|
254
|
+
x: n.x + a[0],
|
|
255
|
+
y: n.y + a[1]
|
|
256
|
+
}), I(e.shiftKey));
|
|
257
|
+
}, te = (e) => {
|
|
258
|
+
const n = s(), i = b();
|
|
246
259
|
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
247
260
|
e.preventDefault();
|
|
248
|
-
const
|
|
261
|
+
const r = e.key === "ArrowRight" ? 1 : -1;
|
|
249
262
|
h({
|
|
250
|
-
...
|
|
251
|
-
width:
|
|
263
|
+
...n,
|
|
264
|
+
width: n.width + r * t.resizeStep
|
|
252
265
|
});
|
|
253
266
|
} else if (e.key === "ArrowUp" || e.key === "ArrowDown") {
|
|
254
267
|
e.preventDefault();
|
|
255
|
-
const
|
|
268
|
+
const r = e.key === "ArrowDown" ? 1 : -1;
|
|
256
269
|
h({
|
|
257
|
-
...
|
|
258
|
-
height:
|
|
270
|
+
...n,
|
|
271
|
+
height: n.height + r * t.resizeStep
|
|
259
272
|
});
|
|
260
273
|
} else if (e.key === "Home")
|
|
261
274
|
e.preventDefault(), h({
|
|
262
|
-
...
|
|
263
|
-
width:
|
|
264
|
-
height:
|
|
275
|
+
...n,
|
|
276
|
+
width: t.minWidth,
|
|
277
|
+
height: t.minHeight
|
|
265
278
|
});
|
|
266
279
|
else if (e.key === "End")
|
|
267
280
|
e.preventDefault(), h({
|
|
268
|
-
...
|
|
269
|
-
width:
|
|
270
|
-
height:
|
|
281
|
+
...n,
|
|
282
|
+
width: t.maxWidth ?? i.width,
|
|
283
|
+
height: t.maxHeight ?? i.height
|
|
271
284
|
});
|
|
272
285
|
else
|
|
273
286
|
return;
|
|
274
|
-
|
|
275
|
-
},
|
|
287
|
+
I(!0);
|
|
288
|
+
}, ne = () => j((e) => !e);
|
|
276
289
|
return d(y, {
|
|
277
290
|
get when() {
|
|
278
|
-
return
|
|
291
|
+
return R.mounted();
|
|
279
292
|
},
|
|
280
293
|
get children() {
|
|
281
|
-
return d(
|
|
294
|
+
return d(ie, {
|
|
282
295
|
get mount() {
|
|
283
|
-
return
|
|
296
|
+
return $ ? void 0 : document.body;
|
|
284
297
|
},
|
|
285
298
|
get children() {
|
|
286
|
-
var e =
|
|
287
|
-
return typeof
|
|
299
|
+
var e = ye(), n = e.firstChild, i = n.firstChild, r = i.nextSibling, a = ue(t.ref, (o) => f = o);
|
|
300
|
+
return typeof a == "function" && oe(a, e), K(e, T(U, {
|
|
288
301
|
"data-testid": "floating-window",
|
|
289
302
|
role: "dialog",
|
|
290
303
|
tabindex: -1,
|
|
291
304
|
get "aria-labelledby"() {
|
|
292
|
-
return
|
|
305
|
+
return t.title ? H : void 0;
|
|
293
306
|
},
|
|
294
307
|
get class() {
|
|
295
|
-
return
|
|
308
|
+
return O("smwb-floating-window", t.class, R.classes(), {
|
|
296
309
|
"smwb-collapsed": m()
|
|
297
310
|
});
|
|
298
311
|
},
|
|
@@ -304,100 +317,100 @@ function Me(O) {
|
|
|
304
317
|
...m() ? {} : {
|
|
305
318
|
height: `${s().height}px`
|
|
306
319
|
},
|
|
307
|
-
...
|
|
308
|
-
"z-index":
|
|
320
|
+
...t.zIndex === void 0 ? {} : {
|
|
321
|
+
"z-index": t.zIndex
|
|
309
322
|
},
|
|
310
|
-
...typeof
|
|
323
|
+
...typeof t.style == "object" && t.style ? t.style : {}
|
|
311
324
|
};
|
|
312
325
|
},
|
|
313
|
-
"on:pointerdown":
|
|
314
|
-
}), !1, !0),
|
|
326
|
+
"on:pointerdown": k
|
|
327
|
+
}), !1, !0), n.addEventListener("pointercancel", S), n.$$pointerup = S, n.$$pointermove = B, n.$$pointerdown = q, i.$$keydown = ee, c(i, d(P, {
|
|
315
328
|
name: "drag_indicator"
|
|
316
|
-
})), c(
|
|
329
|
+
})), c(n, d(y, {
|
|
317
330
|
get when() {
|
|
318
|
-
return
|
|
331
|
+
return t.title;
|
|
319
332
|
},
|
|
320
333
|
get children() {
|
|
321
|
-
var
|
|
322
|
-
return x(
|
|
334
|
+
var o = me();
|
|
335
|
+
return x(o, "id", H), c(o, () => t.title), o;
|
|
323
336
|
}
|
|
324
|
-
}),
|
|
337
|
+
}), r), c(r, () => t.headerActions, null), c(r, d(y, {
|
|
325
338
|
get when() {
|
|
326
|
-
return
|
|
339
|
+
return t.collapsible;
|
|
327
340
|
},
|
|
328
341
|
get children() {
|
|
329
|
-
var
|
|
330
|
-
return
|
|
342
|
+
var o = ge();
|
|
343
|
+
return o.$$click = ne, c(o, d(P, {
|
|
331
344
|
get name() {
|
|
332
345
|
return m() ? "open_in_full" : "close_fullscreen";
|
|
333
346
|
}
|
|
334
|
-
})),
|
|
335
|
-
var u = m() ?
|
|
336
|
-
return u !== l.e && x(
|
|
347
|
+
})), M((l) => {
|
|
348
|
+
var u = m() ? t.expandAriaLabel : t.collapseAriaLabel, g = !m();
|
|
349
|
+
return u !== l.e && x(o, "aria-label", l.e = u), g !== l.t && x(o, "aria-expanded", l.t = g), l;
|
|
337
350
|
}, {
|
|
338
351
|
e: void 0,
|
|
339
352
|
t: void 0
|
|
340
|
-
}),
|
|
353
|
+
}), o;
|
|
341
354
|
}
|
|
342
|
-
}), null), c(
|
|
355
|
+
}), null), c(r, d(y, {
|
|
343
356
|
get when() {
|
|
344
|
-
return
|
|
357
|
+
return t.onClose;
|
|
345
358
|
},
|
|
346
359
|
get children() {
|
|
347
|
-
var
|
|
348
|
-
return
|
|
360
|
+
var o = fe();
|
|
361
|
+
return o.$$click = () => t.onClose?.(), c(o, d(P, {
|
|
349
362
|
name: "close"
|
|
350
|
-
})),
|
|
363
|
+
})), M(() => x(o, "aria-label", t.closeAriaLabel)), o;
|
|
351
364
|
}
|
|
352
365
|
}), null), c(e, d(y, {
|
|
353
366
|
get when() {
|
|
354
367
|
return !m();
|
|
355
368
|
},
|
|
356
369
|
get children() {
|
|
357
|
-
var
|
|
358
|
-
return c(
|
|
370
|
+
var o = xe();
|
|
371
|
+
return c(o, () => t.children), o;
|
|
359
372
|
}
|
|
360
373
|
}), null), c(e, d(y, {
|
|
361
374
|
get when() {
|
|
362
|
-
return
|
|
375
|
+
return ae(() => !!t.resizable)() && !m();
|
|
363
376
|
},
|
|
364
377
|
get children() {
|
|
365
|
-
return d(
|
|
366
|
-
each:
|
|
367
|
-
children: (
|
|
368
|
-
var l =
|
|
369
|
-
return x(l, "data-testid", `floating-window-resize-${
|
|
378
|
+
return d(he, {
|
|
379
|
+
each: ve,
|
|
380
|
+
children: (o) => (() => {
|
|
381
|
+
var l = be();
|
|
382
|
+
return x(l, "data-testid", `floating-window-resize-${o}`), K(l, T({
|
|
370
383
|
get class() {
|
|
371
|
-
return
|
|
384
|
+
return O("smwb-floating-window__resize", `smwb-floating-window__resize_${o}`);
|
|
372
385
|
}
|
|
373
|
-
}, () =>
|
|
386
|
+
}, () => o === "se" ? {
|
|
374
387
|
role: "separator",
|
|
375
388
|
tabindex: 0,
|
|
376
|
-
"aria-label":
|
|
377
|
-
"aria-valuemin":
|
|
378
|
-
"aria-valuemax": Math.round(
|
|
389
|
+
"aria-label": t.resizeHandleAriaLabel,
|
|
390
|
+
"aria-valuemin": t.minWidth,
|
|
391
|
+
"aria-valuemax": Math.round(t.maxWidth ?? b().width),
|
|
379
392
|
"aria-valuenow": Math.round(s().width),
|
|
380
|
-
onKeyDown:
|
|
393
|
+
onKeyDown: te
|
|
381
394
|
} : {
|
|
382
395
|
"aria-hidden": !0,
|
|
383
396
|
tabindex: -1
|
|
384
397
|
}, {
|
|
385
|
-
onPointerDown: (u) =>
|
|
386
|
-
onPointerMove:
|
|
387
|
-
onPointerUp:
|
|
388
|
-
onPointerCancel:
|
|
398
|
+
onPointerDown: (u) => J(o, u),
|
|
399
|
+
onPointerMove: Q,
|
|
400
|
+
onPointerUp: D,
|
|
401
|
+
onPointerCancel: D
|
|
389
402
|
}), !1, !1), l;
|
|
390
403
|
})()
|
|
391
404
|
});
|
|
392
405
|
}
|
|
393
|
-
}), null),
|
|
406
|
+
}), null), M(() => x(i, "aria-label", t.moveHandleAriaLabel)), e;
|
|
394
407
|
}
|
|
395
408
|
});
|
|
396
409
|
}
|
|
397
410
|
});
|
|
398
411
|
}
|
|
399
|
-
|
|
412
|
+
re(["pointerdown", "pointermove", "pointerup", "keydown", "click"]);
|
|
400
413
|
export {
|
|
401
|
-
|
|
414
|
+
Re as FloatingWindow
|
|
402
415
|
};
|
|
403
416
|
//# sourceMappingURL=floatingWindow.js.map
|