intelliwaketssveltekitv25 0.3.52 → 0.3.53
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 +89 -91
- package/package.json +1 -1
package/dist/Modal.svelte
CHANGED
|
@@ -207,103 +207,101 @@
|
|
|
207
207
|
<svelte:window onmouseup={doMouseUp}
|
|
208
208
|
onmousemove={doMouseMove} />
|
|
209
209
|
|
|
210
|
-
<
|
|
211
|
-
<dialog class='bg-white shadow-xl rounded-lg overflow-hidden w-full p-0
|
|
210
|
+
<dialog class='bg-white shadow-xl rounded-lg overflow-hidden w-full p-0
|
|
212
211
|
dark:bg-slate-600 dark:text-white m-auto {clazz}'
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
212
|
+
style:transform='translate({CleanNumber(x, 4)}px,{CleanNumber(y, 4)}px) scale({isShowing ? 1 : 0.9})'
|
|
213
|
+
onkeydown={keyDown}
|
|
214
|
+
style:max-width={width}
|
|
215
|
+
bind:this={dialogElement}
|
|
216
|
+
onclick={(e) => {
|
|
218
217
|
if (!isDialogMouseDown) cancelAction(e)
|
|
219
218
|
}}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
<div>
|
|
236
|
-
{@render header()}
|
|
237
|
-
</div>
|
|
238
|
-
<button class='float-right btnLink text-white !py-0'
|
|
239
|
-
onclick={cancelAction} aria-label="Close">
|
|
240
|
-
<svg xmlns='http://www.w3.org/2000/svg'
|
|
241
|
-
height='16'
|
|
242
|
-
width='12'
|
|
243
|
-
viewBox='0 0 384 512'>
|
|
244
|
-
<path
|
|
245
|
-
fill='white'
|
|
246
|
-
d='M192 244.7L45.9 98.6 34.6 109.9 180.7 256 34.6 402.1l11.3 11.3L192 267.3 338.1 413.4l11.3-11.3L203.3 256 349.4 109.9 338.1 98.6 192 244.7z' />
|
|
247
|
-
</svg>
|
|
248
|
-
</button>
|
|
249
|
-
</div>
|
|
250
|
-
{/if}
|
|
251
|
-
</h4>
|
|
252
|
-
<fieldset class='px-4 pb-6 dialogBody overflow-x-hidden {classBody}'
|
|
253
|
-
disabled={useDisable}
|
|
254
|
-
class:pt-3={!marginForStickyHeader}
|
|
255
|
-
class:mt-3={marginForStickyHeader}
|
|
256
|
-
style="overflow-y: {overflowY};">
|
|
257
|
-
<ActivityOverlay show={useDisable} />
|
|
258
|
-
{#if body}
|
|
259
|
-
{@render body?.()}
|
|
260
|
-
{/if}
|
|
261
|
-
</fieldset>
|
|
262
|
-
{#if !!cancelButton || !!okButton}
|
|
263
|
-
<fieldset
|
|
264
|
-
class='dialogButtons grid grid-cols-[min-content_min-content_1fr_min-content_min-content] border-t-slate-200 dark:border-t-slate-700 px-4 py-2 {classFooter}'
|
|
265
|
-
class:border-t={borderFooter}
|
|
266
|
-
disabled={useDisable}>
|
|
267
|
-
<div class='pr-2'>
|
|
268
|
-
{#if !!cancelButton}
|
|
269
|
-
<button type='button'
|
|
270
|
-
class='dialogButtonCancel btnLink bg-transparent hover:bg-transparent shadow-none text-slate-500 hover:text-slate-700 dark:text-slate-300 pl-0 pt-1'
|
|
271
|
-
class:whitespace-nowrap={!okButtonWrap}
|
|
272
|
-
onclick={cancelAction}>
|
|
273
|
-
{cancelButton}
|
|
274
|
-
</button>
|
|
275
|
-
{/if}
|
|
276
|
-
</div>
|
|
219
|
+
onclose={cancelAction}
|
|
220
|
+
>
|
|
221
|
+
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
222
|
+
<div class='[all:revert] grid grid-rows-[auto_1fr_auto] max-h-[90vh] max-w-[100vw] text-left overflow-hidden'
|
|
223
|
+
onmousedown={dialogMouseDown}
|
|
224
|
+
onclick={(e) => {e.stopPropagation()}}
|
|
225
|
+
role="button"
|
|
226
|
+
tabindex={-1}>
|
|
227
|
+
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
228
|
+
<h4 class='dialogHeader bg-primary-main dark:bg-primary-face text-white py-2 px-4 select-none mb-0 {classHeader}'
|
|
229
|
+
data-color-dark={color}
|
|
230
|
+
class:cursor-grab={isMouseDown}
|
|
231
|
+
onmousedown={doMouseDown}>
|
|
232
|
+
{#if header}
|
|
233
|
+
<div class='grid grid-cols-[1fr_auto]'>
|
|
277
234
|
<div>
|
|
278
|
-
{@render
|
|
279
|
-
</div>
|
|
280
|
-
<div class='text-center'>
|
|
281
|
-
{@render centerFooter?.()}
|
|
282
|
-
</div>
|
|
283
|
-
<div class='text-right'>
|
|
284
|
-
{@render rightFooter?.()}
|
|
235
|
+
{@render header()}
|
|
285
236
|
</div>
|
|
286
|
-
<
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
237
|
+
<button class='float-right btnLink text-white !py-0'
|
|
238
|
+
onclick={cancelAction} aria-label="Close">
|
|
239
|
+
<svg xmlns='http://www.w3.org/2000/svg'
|
|
240
|
+
height='16'
|
|
241
|
+
width='12'
|
|
242
|
+
viewBox='0 0 384 512'>
|
|
243
|
+
<path
|
|
244
|
+
fill='white'
|
|
245
|
+
d='M192 244.7L45.9 98.6 34.6 109.9 180.7 256 34.6 402.1l11.3 11.3L192 267.3 338.1 413.4l11.3-11.3L203.3 256 349.4 109.9 338.1 98.6 192 244.7z' />
|
|
246
|
+
</svg>
|
|
247
|
+
</button>
|
|
248
|
+
</div>
|
|
249
|
+
{/if}
|
|
250
|
+
</h4>
|
|
251
|
+
<fieldset class='px-4 pb-6 dialogBody overflow-x-hidden {classBody}'
|
|
252
|
+
disabled={useDisable}
|
|
253
|
+
class:pt-3={!marginForStickyHeader}
|
|
254
|
+
class:mt-3={marginForStickyHeader}
|
|
255
|
+
style="overflow-y: {overflowY};">
|
|
256
|
+
<ActivityOverlay show={useDisable} />
|
|
257
|
+
{#if body}
|
|
258
|
+
{@render body?.()}
|
|
303
259
|
{/if}
|
|
304
|
-
</
|
|
305
|
-
|
|
306
|
-
|
|
260
|
+
</fieldset>
|
|
261
|
+
{#if !!cancelButton || !!okButton}
|
|
262
|
+
<fieldset
|
|
263
|
+
class='dialogButtons grid grid-cols-[min-content_min-content_1fr_min-content_min-content] border-t-slate-200 dark:border-t-slate-700 px-4 py-2 {classFooter}'
|
|
264
|
+
class:border-t={borderFooter}
|
|
265
|
+
disabled={useDisable}>
|
|
266
|
+
<div class='pr-2'>
|
|
267
|
+
{#if !!cancelButton}
|
|
268
|
+
<button type='button'
|
|
269
|
+
class='dialogButtonCancel btnLink bg-transparent hover:bg-transparent shadow-none text-slate-500 hover:text-slate-700 dark:text-slate-300 pl-0 pt-1'
|
|
270
|
+
class:whitespace-nowrap={!okButtonWrap}
|
|
271
|
+
onclick={cancelAction}>
|
|
272
|
+
{cancelButton}
|
|
273
|
+
</button>
|
|
274
|
+
{/if}
|
|
275
|
+
</div>
|
|
276
|
+
<div>
|
|
277
|
+
{@render leftFooter?.()}
|
|
278
|
+
</div>
|
|
279
|
+
<div class='text-center'>
|
|
280
|
+
{@render centerFooter?.()}
|
|
281
|
+
</div>
|
|
282
|
+
<div class='text-right'>
|
|
283
|
+
{@render rightFooter?.()}
|
|
284
|
+
</div>
|
|
285
|
+
<div class='text-right pl-2'>
|
|
286
|
+
{#if !!okButton}
|
|
287
|
+
<button type={okType}
|
|
288
|
+
class='dialogButtonOK shadow-none okButton {classButton}'
|
|
289
|
+
data-color={okColor ?? color}
|
|
290
|
+
class:whitespace-nowrap={!okButtonWrap}
|
|
291
|
+
bind:this={okButtonElement}
|
|
292
|
+
onclick={okAction}
|
|
293
|
+
disabled={okDisabled}>
|
|
294
|
+
{#if okFAProps}
|
|
295
|
+
<Icon fw {...okFAProps} />
|
|
296
|
+
{/if}
|
|
297
|
+
{okButton}
|
|
298
|
+
</button>
|
|
299
|
+
{/if}
|
|
300
|
+
</div>
|
|
301
|
+
</fieldset>
|
|
302
|
+
{/if}
|
|
303
|
+
</div>
|
|
304
|
+
</dialog>
|
|
307
305
|
|
|
308
306
|
<style>
|
|
309
307
|
/*dialog {
|