@sveltia/ui 0.7.2 → 0.7.3

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.
@@ -236,9 +236,9 @@ dialog:not(.open) :global(*) {
236
236
  pointer-events: none !important;
237
237
  }
238
238
  dialog :global(a),
239
- dialog :global(input),
240
- dialog :global(textarea),
241
- dialog :global(button),
239
+ dialog :global(input[aria-disabled="false"]),
240
+ dialog :global(textarea[aria-disabled="false"]),
241
+ dialog :global(button[aria-disabled="false"]),
242
242
  dialog :global([tabindex="0"]) {
243
243
  pointer-events: all;
244
244
  }
@@ -52,6 +52,11 @@
52
52
  */
53
53
  export let closeOnBackdropClick = false;
54
54
 
55
+ /**
56
+ * Whether to keep the content when the dialog is not displayed.
57
+ */
58
+ export let keepContent = false;
59
+
55
60
  const dispatch = createEventDispatcher();
56
61
  /** @type {?HTMLDialogElement} */
57
62
  let dialog;
@@ -162,7 +167,7 @@
162
167
  </Button>
163
168
  {/if}
164
169
  </div>
165
- {#if showContent}
170
+ {#if keepContent || showContent}
166
171
  {#if title || showClose === 'inside' || $$slots.header || $$slots['header-extra']}
167
172
  <div class="header">
168
173
  {#if $$slots.header}
@@ -275,6 +280,7 @@ dialog.vertical {
275
280
  max-width: 100vw;
276
281
  }
277
282
  dialog.vertical.open form {
283
+ max-width: calc(100vw - 48px);
278
284
  transform: translateX(0%);
279
285
  }
280
286
  dialog.vertical.small form {
@@ -312,6 +318,7 @@ dialog.horizontal {
312
318
  max-height: 100vh;
313
319
  }
314
320
  dialog.horizontal.open form {
321
+ max-height: calc(100vh - 48px);
315
322
  transform: translateY(0%);
316
323
  }
317
324
  dialog.horizontal.small form {
@@ -353,6 +360,6 @@ dialog.horizontal.x-large form {
353
360
  .main {
354
361
  flex: auto;
355
362
  overflow: auto;
356
- margin: 24px 24px;
363
+ padding: 24px;
357
364
  white-space: normal;
358
365
  }</style>
@@ -15,6 +15,7 @@ export default class Drawer extends SvelteComponent<{
15
15
  open?: boolean;
16
16
  showClose?: false | "inside" | "outside";
17
17
  closeOnBackdropClick?: boolean;
18
+ keepContent?: boolean;
18
19
  }, {
19
20
  submit: SubmitEvent;
20
21
  ok: CustomEvent<any>;
@@ -43,6 +44,7 @@ declare const __propDef: {
43
44
  open?: boolean;
44
45
  showClose?: ('inside' | 'outside' | false);
45
46
  closeOnBackdropClick?: boolean;
47
+ keepContent?: boolean;
46
48
  };
47
49
  events: {
48
50
  submit: SubmitEvent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltia/ui",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "publishConfig": {