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