poe-svelte-ui-lib 1.25.0 → 1.25.2
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/Modal.svelte
CHANGED
|
@@ -52,7 +52,11 @@
|
|
|
52
52
|
|
|
53
53
|
const handleClickOutside = (e: MouseEvent) => {
|
|
54
54
|
const target = e.target as HTMLElement
|
|
55
|
-
|
|
55
|
+
/* [data-ui-portal] — элементы вроде выпадающего списка Select физически вынесены в
|
|
56
|
+
document.body (портал, чтобы их не обрезал overflow родителя), т.е. DOM-предок у них —
|
|
57
|
+
не [data-modal], а <body>. Без этой проверки клик по такому элементу внутри модалки
|
|
58
|
+
считался бы кликом "снаружи" и сразу закрывал бы её. */
|
|
59
|
+
if (isTopmost && !target.closest("[data-modal]") && !target.closest("[data-ui-portal]")) {
|
|
56
60
|
isOpen = false
|
|
57
61
|
onCancel()
|
|
58
62
|
}
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
/* Список вариантов выносится в document.body (портал), чтобы его не обрезал
|
|
17
17
|
overflow-hidden/overflow-auto ближайшего скроллящегося предка (например,
|
|
18
18
|
панель свойств конструктора). Позиция считается от dropdownElement и
|
|
19
|
-
обновляется, пока список открыт, при скролле/резайзе где угодно на странице.
|
|
19
|
+
обновляется, пока список открыт, при скролле/резайзе где угодно на странице.
|
|
20
|
+
Атрибут data-ui-portal на контейнере — чтобы Modal.svelte не принимал клик по
|
|
21
|
+
опции (физически лежащей вне [data-modal]) за клик "снаружи" и не закрывался. */
|
|
20
22
|
function portal(node: HTMLElement) {
|
|
21
23
|
document.body.appendChild(node)
|
|
22
24
|
return {
|
|
@@ -174,6 +176,7 @@
|
|
|
174
176
|
<div
|
|
175
177
|
use:portal
|
|
176
178
|
bind:this={portalElement}
|
|
179
|
+
data-ui-portal
|
|
177
180
|
class="fixed z-[9999] mt-1"
|
|
178
181
|
style="top: {anchorRect?.bottom ?? 0}px; left: {anchorRect?.left ?? 0}px; width: {anchorRect?.width ?? 0}px;"
|
|
179
182
|
transition:slide={{ duration: 150 }}
|
|
@@ -262,6 +265,7 @@
|
|
|
262
265
|
<div
|
|
263
266
|
use:portal
|
|
264
267
|
bind:this={portalElement}
|
|
268
|
+
data-ui-portal
|
|
265
269
|
class="fixed z-[9999] mt-1 select-none"
|
|
266
270
|
style="top: {anchorRect?.bottom ?? 0}px; left: {anchorRect?.left ?? 0}px; width: {anchorRect?.width ?? 0}px;"
|
|
267
271
|
transition:slide={{ duration: 150 }}
|
package/dist/Table/Table.svelte
CHANGED
|
@@ -393,7 +393,7 @@
|
|
|
393
393
|
{@const image = content.data}
|
|
394
394
|
<div
|
|
395
395
|
class="flex items-center justify-center [&_svg]:h-full [&_svg]:max-h-full [&_svg]:w-full [&_svg]:max-w-full"
|
|
396
|
-
style={`width: ${image.width || "
|
|
396
|
+
style={`width: ${image.width || "2rem"}; height: ${image.height || "2rem"}; `}
|
|
397
397
|
>
|
|
398
398
|
{#if hasImage(column, row, index)}
|
|
399
399
|
<img
|