intelliwaketssveltekitv25 0.1.84 → 0.1.86
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/DropDownControl.svelte +0 -2
- package/dist/Modal.svelte +12 -5
- package/dist/Modal.svelte.d.ts +1 -0
- package/package.json +1 -1
package/dist/Modal.svelte
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
rightFooter,
|
|
19
19
|
show = $bindable(false),
|
|
20
20
|
noShowValue = false,
|
|
21
|
+
forceNoShow = false,
|
|
21
22
|
width = '40em',
|
|
22
23
|
cancelButton = 'Cancel',
|
|
23
24
|
okButton = 'OK',
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
show: unknown
|
|
50
51
|
/** The value to compare against to have the modal hidden, default 'false' */
|
|
51
52
|
noShowValue?: unknown
|
|
53
|
+
forceNoShow?: boolean
|
|
52
54
|
width?: string
|
|
53
55
|
cancelButton?: string | false
|
|
54
56
|
okButton?: string | false
|
|
@@ -119,7 +121,7 @@
|
|
|
119
121
|
let x = $state(0)
|
|
120
122
|
let y = $state(0)
|
|
121
123
|
|
|
122
|
-
async function changeIsShowing(isShow: unknown, isNoShowValue: unknown) {
|
|
124
|
+
async function changeIsShowing(isShow: unknown, isNoShowValue: unknown, isForceNoShow: boolean) {
|
|
123
125
|
await tick()
|
|
124
126
|
if (!isShowing) {
|
|
125
127
|
x = 0
|
|
@@ -127,8 +129,13 @@
|
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
if (dialogElement) {
|
|
130
|
-
if (
|
|
131
|
-
if (
|
|
132
|
+
if (isForceNoShow) {
|
|
133
|
+
if (isShowing) {
|
|
134
|
+
isShowing = false
|
|
135
|
+
dialogElement.close()
|
|
136
|
+
}
|
|
137
|
+
} else if (isShow !== isNoShowValue) {
|
|
138
|
+
if (!isShowing && !forceNoShow && (isShow || noShowValue !== false)) {
|
|
132
139
|
isShowing = true
|
|
133
140
|
dialogElement.showModal()
|
|
134
141
|
}
|
|
@@ -142,7 +149,7 @@
|
|
|
142
149
|
}
|
|
143
150
|
|
|
144
151
|
$effect(() => {
|
|
145
|
-
changeIsShowing(show, noShowValue)
|
|
152
|
+
changeIsShowing(show, noShowValue, forceNoShow)
|
|
146
153
|
})
|
|
147
154
|
|
|
148
155
|
let isMouseDown = $state(false)
|
|
@@ -176,7 +183,7 @@
|
|
|
176
183
|
onmousemove={doMouseMove} />
|
|
177
184
|
|
|
178
185
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
179
|
-
<dialog class='bg-white shadow-xl
|
|
186
|
+
<dialog class='bg-white shadow-xl rounded-lg overflow-hidden w-full p-0
|
|
180
187
|
dark:bg-slate-600 dark:text-white m-auto {clazz}'
|
|
181
188
|
class:overflow-y-visible={overflowVisible}
|
|
182
189
|
class:overflow-hidden={!overflowVisible}
|
package/dist/Modal.svelte.d.ts
CHANGED