@smwb/ui-solid 0.10.0 → 0.11.0

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.
Files changed (26) hide show
  1. package/README.md +16 -0
  2. package/dist/assets/styles/less/components/treeView/treeView.entry.css +1 -1
  3. package/dist/components/layout/floatingWindow/floatingWindow.js +186 -173
  4. package/dist/components/layout/floatingWindow/floatingWindow.js.map +1 -1
  5. package/dist/connects/rt/index.d.ts +2 -0
  6. package/dist/connects/rt/table/index.d.ts +2 -0
  7. package/dist/connects/rt/table/table.d.ts +48 -0
  8. package/dist/headless/components/layout/floatingWindow/floatingWindow.js +186 -173
  9. package/dist/headless/components/layout/floatingWindow/floatingWindow.js.map +1 -1
  10. package/dist/headless/source/components/layout/floatingWindow/floatingWindow.jsx +20 -5
  11. package/dist/headless/source/components/layout/floatingWindow/floatingWindow.jsx.map +1 -1
  12. package/dist/headless/source/connects/rt/index.js +5 -0
  13. package/dist/headless/source/connects/rt/index.js.map +7 -0
  14. package/dist/headless/source/connects/rt/table/index.js +6 -0
  15. package/dist/headless/source/connects/rt/table/index.js.map +7 -0
  16. package/dist/headless/source/connects/rt/table/table.jsx +183 -0
  17. package/dist/headless/source/connects/rt/table/table.jsx.map +1 -0
  18. package/dist/source/components/layout/floatingWindow/floatingWindow.jsx +20 -5
  19. package/dist/source/components/layout/floatingWindow/floatingWindow.jsx.map +1 -1
  20. package/dist/source/connects/rt/index.js +5 -0
  21. package/dist/source/connects/rt/index.js.map +7 -0
  22. package/dist/source/connects/rt/table/index.js +6 -0
  23. package/dist/source/connects/rt/table/index.js.map +7 -0
  24. package/dist/source/connects/rt/table/table.jsx +183 -0
  25. package/dist/source/connects/rt/table/table.jsx.map +1 -0
  26. package/package.json +16 -3
package/README.md CHANGED
@@ -159,6 +159,22 @@ Each component's required entries (and their dependencies) are listed by the MCP
159
159
  `get_component_props` (see `@smwb/ui-mcp-solid`). Import `<name>.entry.less`, never the bare
160
160
  `components/<name>/<name>.less`.
161
161
 
162
+ ### TanStack Table adapter
163
+
164
+ ```tsx
165
+ import { Table } from "@smwb/ui-solid/solid-table";
166
+
167
+ <Table data={rows} columns={columns} sortable withPagination limit={10} />;
168
+ ```
169
+
170
+ Binds [@tanstack/solid-table](https://tanstack.com/table) v8 to the smwb table components:
171
+ columns are plain `ColumnDef`s, cells go through `flexRender`, and the adapter adds the sort
172
+ affordance, the pagination footer and the loading / error rows. Column definitions written for
173
+ the `react-table` adapter work unchanged.
174
+
175
+ `@tanstack/solid-table` is an optional peer — install it in your app; it ships with this subpath
176
+ only. Column dragging and resizing are not ported yet. See Storybook → **Connects / solid-table**.
177
+
162
178
  ## Customization and theming
163
179
 
164
180
  | Goal | Approach | Rebuild CSS? |
@@ -1 +1 @@
1
- .smwb-tree__wrapper .smwb-tree__node:first-child{border-left:0}.smwb-tree__wrapper .smwb-tree__node:first-child:before{opacity:0}.smwb-tree__node{padding-left:30px;margin-left:9px;position:relative;border-left:1px solid var(--smui-primaryColor)}.smwb-tree__node:last-child{border-left-color:transparent}.smwb-tree__node:before{position:absolute;top:0;left:-1px;height:20px;width:25px;border-bottom:1px solid var(--smui-primaryColor);border-left:1px solid var(--smui-primaryColor);content:"";font-weight:600;font-size:14px}.smwb-tree__node__label{position:relative;display:inline-flex;align-items:center;gap:10px}.smwb-tree__node__content{display:flex;align-items:center;gap:10px;height:40px;cursor:pointer;user-select:none}.smwb-tree__node_selected>.smwb-tree__node__content{background-color:var(--smui-onSurfaceHover);border-radius:4px}.smwb-tree__node__checkbox{flex-shrink:0;width:18px;height:18px;min-width:18px;min-height:18px;margin:0;cursor:pointer;accent-color:var(--smui-checkboxCheckedBg)}.smwb-tree__node__loading{padding:4px 8px 4px 28px;font-size:13px;color:var(--smui-onSurfaceVariant)}
1
+ .smwb-tree__wrapper .smwb-tree__node:first-child{border-left:0}.smwb-tree__wrapper .smwb-tree__node:first-child:before{opacity:0}.smwb-tree__node{padding-left:30px;margin-left:9px;position:relative;border-left:1px solid var(--smui-primaryColor)}.smwb-tree__node:last-child{border-left-color:transparent}.smwb-tree__node:before{position:absolute;top:0;left:-1px;height:20px;width:25px;border-bottom:1px solid var(--smui-primaryColor);border-left:1px solid var(--smui-primaryColor);content:"";font-weight:600;font-size:14px}.smwb-tree__node__label{position:relative;display:inline-flex;align-items:center;gap:10px;min-width:0;overflow-wrap:break-word}.smwb-tree__node__label>.smwb-icon__wrapper{flex:none}.smwb-tree__node__content{display:flex;align-items:center;gap:10px;min-height:40px;cursor:pointer;user-select:none}.smwb-tree__node_selected>.smwb-tree__node__content{background-color:var(--smui-onSurfaceHover);border-radius:4px}.smwb-tree__node__checkbox{flex-shrink:0;width:18px;height:18px;min-width:18px;min-height:18px;margin:0;cursor:pointer;accent-color:var(--smui-checkboxCheckedBg)}.smwb-tree__node__loading{padding:4px 8px 4px 28px;font-size:13px;color:var(--smui-onSurfaceVariant)}
@@ -1,14 +1,14 @@
1
- import { isServer as C, createComponent as d, Portal as ee, use as te, spread as I, mergeProps as W, insert as c, setAttribute as x, effect as $, memo as ie, template as b, delegateEvents as ne } from "solid-js/web";
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 oe, splitProps as re, createMemo as ae, createEffect as K, onCleanup as T, Show as y, For as le } from "solid-js";
4
- import V from "clsx";
5
- import { createCssTransition as se } from "../../../primitives/createCssTransition.js";
6
- import { createControllableState as A } from "../../../primitives/createControllableState.js";
7
- import { createId as de } from "../../../primitives/createId.js";
8
- import { mergeRefs as ce } from "../../../primitives/mergeRefs.js";
9
- import { Icon as M } from "../../base/icon/icon.js";
10
- var he = /* @__PURE__ */ b("<span class=smwb-floating-window__title>"), we = /* @__PURE__ */ b("<button type=button class=smwb-floating-window__action data-testid=floating-window-collapse>"), pe = /* @__PURE__ */ b("<button type=button class=smwb-floating-window__action data-testid=floating-window-close>"), ue = /* @__PURE__ */ b("<div class=smwb-floating-window__body data-testid=floating-window-body>"), me = /* @__PURE__ */ b("<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>"), ge = /* @__PURE__ */ b("<div>");
11
- const fe = {
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
- }, xe = ["n", "s", "e", "w", "ne", "nw", "se", "sw"], v = () => typeof window > "u" ? {
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 Ee(O) {
68
- const X = oe({
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
- }, O), [i, Y] = re(X, ["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
+ }, 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 E = de(void 0, "smwb-floating-window-title"), P = se({
95
- in: () => i.open,
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
- }), [_, U] = A({
105
- value: () => i.position,
106
- defaultValue: i.defaultPosition,
107
- onChange: (e) => i.onPositionChange?.(e)
108
- }), [z, F] = A({
109
- value: () => i.size,
110
- defaultValue: i.defaultSize,
111
- onChange: (e) => i.onResize?.(e)
112
- }), [m, Z] = A({
113
- value: () => i.collapsed,
114
- defaultValue: i.defaultCollapsed,
115
- onChange: (e) => i.onCollapsedChange?.(e)
116
- }), H = (e, t) => {
117
- const r = i.maxWidth ?? t.width, a = i.maxHeight ?? t.height, o = Math.max(i.minWidth, Math.min(r, e.width)), n = Math.max(i.minHeight, Math.min(a, e.height)), l = Math.min(i.keepVisible, o), u = Math.max(l - o, Math.min(t.width - l, e.x)), g = Math.max(0, Math.min(Math.max(0, t.height - l), e.y));
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: o,
122
- height: n
121
+ width: a,
122
+ height: o
123
123
  };
124
- }, s = ae(() => H({
125
- x: _().x,
126
- y: _().y,
127
- width: z().width,
128
- height: z().height
129
- }, v())), h = (e) => {
130
- const t = H(e, v()), r = _(), a = z();
131
- (t.x !== r.x || t.y !== r.y) && U({
132
- x: t.x,
133
- y: t.y
134
- }), (t.width !== a.width || t.height !== a.height) && F({
135
- width: t.width,
136
- height: t.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
- K(() => {
140
- if (C || !i.open) return;
141
- const e = () => h(s());
142
- window.addEventListener("resize", e), T(() => window.removeEventListener("resize", e));
143
- }), K(() => {
144
- if (C || !i.open || !i.closeOnEsc || !i.onClose) return;
145
- const e = (t) => {
146
- t.key === "Escape" && (!f || !f.contains(document.activeElement) || i.onClose?.());
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), T(() => document.removeEventListener("keydown", e));
161
+ document.addEventListener("keydown", e), V(() => document.removeEventListener("keydown", e));
149
162
  });
150
- const L = () => {
151
- i.onActivate?.(), f && !f.contains(document.activeElement) && f.focus({
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 j = (e) => {
157
- if (!i.movable || e.target?.closest("button,[data-no-drag]")) return;
169
+ const q = (e) => {
170
+ if (!t.movable || e.target?.closest("button,[data-no-drag]")) return;
158
171
  e.preventDefault();
159
- const t = s();
172
+ const n = s();
160
173
  w = {
161
174
  px: e.clientX,
162
175
  py: e.clientY,
163
- x: t.x,
164
- y: t.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
- }, G = (e) => {
183
+ }, B = (e) => {
171
184
  if (!w) return;
172
- const t = s();
185
+ const n = s();
173
186
  h({
174
- ...t,
187
+ ...n,
175
188
  x: w.x + e.clientX - w.px,
176
189
  y: w.y + e.clientY - w.py
177
190
  });
178
- }, R = (e) => {
191
+ }, S = (e) => {
179
192
  if (w) {
180
193
  w = null;
181
- const t = s();
182
- i.onMoveEnd?.({
183
- x: t.x,
184
- y: t.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 N = (e, t) => {
191
- t.preventDefault(), t.stopPropagation(), p = {
203
+ const J = (e, n) => {
204
+ n.preventDefault(), n.stopPropagation(), p = {
192
205
  dir: e,
193
- px: t.clientX,
194
- py: t.clientY,
206
+ px: n.clientX,
207
+ py: n.clientY,
195
208
  rect: s()
196
- }, L();
209
+ }, k();
197
210
  try {
198
- t.currentTarget.setPointerCapture?.(t.pointerId);
211
+ n.currentTarget.setPointerCapture?.(n.pointerId);
199
212
  } catch {
200
213
  }
201
- }, q = (e) => {
214
+ }, Q = (e) => {
202
215
  if (!p) return;
203
- const t = fe[p.dir], r = e.clientX - p.px, a = e.clientY - p.py, o = p.rect, n = v(), l = i.maxWidth ?? n.width, u = i.maxHeight ?? n.height, g = Math.min(l, Math.max(i.minWidth, o.width + t.dw * r)), S = Math.min(u, Math.max(i.minHeight, o.height + t.dh * a));
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: t.dx ? o.x + o.width - g : o.x,
206
- y: t.dy ? o.y + o.height - S : o.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: S
221
+ height: W
209
222
  });
210
- }, k = (e) => {
223
+ }, D = (e) => {
211
224
  if (p) {
212
225
  p = null;
213
- const t = s();
214
- i.onResizeEnd?.({
215
- width: t.width,
216
- height: t.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
- }, D = (e) => {
221
- const t = s();
222
- e ? i.onResizeEnd?.({
223
- width: t.width,
224
- height: t.height
225
- }) : i.onMoveEnd?.({
226
- x: t.x,
227
- y: t.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
- }, B = (e) => {
230
- const t = s(), r = e.shiftKey ? i.resizeStep : i.moveStep, o = {
231
- ArrowLeft: [-r, 0],
232
- ArrowRight: [r, 0],
233
- ArrowUp: [0, -r],
234
- ArrowDown: [0, r]
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
- o && (e.preventDefault(), e.shiftKey ? h({
237
- ...t,
238
- width: t.width + o[0],
239
- height: t.height + o[1]
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
- ...t,
242
- x: t.x + o[0],
243
- y: t.y + o[1]
244
- }), D(e.shiftKey));
245
- }, J = (e) => {
246
- const t = s(), r = v();
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 a = e.key === "ArrowRight" ? 1 : -1;
262
+ const r = e.key === "ArrowRight" ? 1 : -1;
250
263
  h({
251
- ...t,
252
- width: t.width + a * i.resizeStep
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 a = e.key === "ArrowDown" ? 1 : -1;
269
+ const r = e.key === "ArrowDown" ? 1 : -1;
257
270
  h({
258
- ...t,
259
- height: t.height + a * i.resizeStep
271
+ ...n,
272
+ height: n.height + r * t.resizeStep
260
273
  });
261
274
  } else if (e.key === "Home")
262
275
  e.preventDefault(), h({
263
- ...t,
264
- width: i.minWidth,
265
- height: i.minHeight
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
- ...t,
270
- width: i.maxWidth ?? r.width,
271
- height: i.maxHeight ?? r.height
282
+ ...n,
283
+ width: t.maxWidth ?? i.width,
284
+ height: t.maxHeight ?? i.height
272
285
  });
273
286
  else
274
287
  return;
275
- D(!0);
276
- }, Q = () => Z((e) => !e);
288
+ I(!0);
289
+ }, ne = () => j((e) => !e);
277
290
  return d(y, {
278
291
  get when() {
279
- return P.mounted();
292
+ return R.mounted();
280
293
  },
281
294
  get children() {
282
- return d(ee, {
295
+ return d(ie, {
283
296
  get mount() {
284
- return C ? void 0 : document.body;
297
+ return $ ? void 0 : document.body;
285
298
  },
286
299
  get children() {
287
- var e = me(), t = e.firstChild, r = t.firstChild, a = r.nextSibling, o = ce(i.ref, (n) => f = n);
288
- return typeof o == "function" && te(o, e), I(e, W(Y, {
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 i.title ? E : void 0;
306
+ return t.title ? H : void 0;
294
307
  },
295
308
  get class() {
296
- return V("smwb-floating-window", i.class, P.classes(), {
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
- ...i.zIndex === void 0 ? {} : {
309
- "z-index": i.zIndex
321
+ ...t.zIndex === void 0 ? {} : {
322
+ "z-index": t.zIndex
310
323
  },
311
- ...typeof i.style == "object" && i.style ? i.style : {}
324
+ ...typeof t.style == "object" && t.style ? t.style : {}
312
325
  };
313
326
  },
314
- "on:pointerdown": L
315
- }), !1, !0), t.addEventListener("pointercancel", R), t.$$pointerup = R, t.$$pointermove = G, t.$$pointerdown = j, r.$$keydown = B, c(r, d(M, {
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(t, d(y, {
330
+ })), c(n, d(y, {
318
331
  get when() {
319
- return i.title;
332
+ return t.title;
320
333
  },
321
334
  get children() {
322
- var n = he();
323
- return x(n, "id", E), c(n, () => i.title), n;
335
+ var o = me();
336
+ return x(o, "id", H), c(o, () => t.title), o;
324
337
  }
325
- }), a), c(a, () => i.headerActions, null), c(a, d(y, {
338
+ }), r), c(r, () => t.headerActions, null), c(r, d(y, {
326
339
  get when() {
327
- return i.collapsible;
340
+ return t.collapsible;
328
341
  },
329
342
  get children() {
330
- var n = we();
331
- return n.$$click = Q, c(n, d(M, {
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
- })), $((l) => {
336
- var u = m() ? i.expandAriaLabel : i.collapseAriaLabel, g = !m();
337
- return u !== l.e && x(n, "aria-label", l.e = u), g !== l.t && x(n, "aria-expanded", l.t = g), l;
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
- }), n;
354
+ }), o;
342
355
  }
343
- }), null), c(a, d(y, {
356
+ }), null), c(r, d(y, {
344
357
  get when() {
345
- return i.onClose;
358
+ return t.onClose;
346
359
  },
347
360
  get children() {
348
- var n = pe();
349
- return n.$$click = () => i.onClose?.(), c(n, d(M, {
361
+ var o = fe();
362
+ return o.$$click = () => t.onClose?.(), c(o, d(P, {
350
363
  name: "close"
351
- })), $(() => x(n, "aria-label", i.closeAriaLabel)), n;
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 n = ue();
359
- return c(n, () => i.children), n;
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 ie(() => !!i.resizable)() && !m();
376
+ return ae(() => !!t.resizable)() && !m();
364
377
  },
365
378
  get children() {
366
- return d(le, {
367
- each: xe,
368
- children: (n) => (() => {
369
- var l = ge();
370
- return x(l, "data-testid", `floating-window-resize-${n}`), I(l, W({
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 V("smwb-floating-window__resize", `smwb-floating-window__resize_${n}`);
385
+ return O("smwb-floating-window__resize", `smwb-floating-window__resize_${o}`);
373
386
  }
374
- }, () => n === "se" ? {
387
+ }, () => o === "se" ? {
375
388
  role: "separator",
376
389
  tabindex: 0,
377
- "aria-label": i.resizeHandleAriaLabel,
378
- "aria-valuemin": i.minWidth,
379
- "aria-valuemax": Math.round(i.maxWidth ?? v().width),
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: J
394
+ onKeyDown: te
382
395
  } : {
383
396
  "aria-hidden": !0,
384
397
  tabindex: -1
385
398
  }, {
386
- onPointerDown: (u) => N(n, u),
387
- onPointerMove: q,
388
- onPointerUp: k,
389
- onPointerCancel: k
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), $(() => x(r, "aria-label", i.moveHandleAriaLabel)), e;
407
+ }), null), M(() => x(i, "aria-label", t.moveHandleAriaLabel)), e;
395
408
  }
396
409
  });
397
410
  }
398
411
  });
399
412
  }
400
- ne(["pointerdown", "pointermove", "pointerup", "keydown", "click"]);
413
+ re(["pointerdown", "pointermove", "pointerup", "keydown", "click"]);
401
414
  export {
402
- Ee as FloatingWindow
415
+ Le as FloatingWindow
403
416
  };
404
417
  //# sourceMappingURL=floatingWindow.js.map