@dosgato/dialog 1.1.3 → 1.1.5

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.
@@ -1,7 +1,7 @@
1
1
  <script context="module">export const DIALOG_TABS_CONTEXT = {};
2
2
  </script>
3
- <script>import arrowLeft from '@iconify-icons/ph/arrow-left';
4
- import arrowRight from '@iconify-icons/ph/arrow-right';
3
+ <script>import arrowLeft from '@iconify-icons/ph/arrow-left-bold';
4
+ import arrowRight from '@iconify-icons/ph/arrow-right-bold';
5
5
  import xLight from '@iconify-icons/ph/x-light';
6
6
  import arrowsOutSimple from '@iconify-icons/ph/arrows-out-simple';
7
7
  import arrowsInSimple from '@iconify-icons/ph/arrows-in-simple';
@@ -106,6 +106,11 @@ $: describedby = [title ? labelid : undefined, descid].filter(isNotBlank).join('
106
106
  max-width: 2000px;
107
107
  }
108
108
 
109
+ section {
110
+ container-type: inline-size;
111
+ container-name: dosgato-dialog-section
112
+ }
113
+
109
114
  @media (max-width: 430px) {
110
115
  section.tiny, section.small, section.normal, section.large, section.xl {
111
116
  width: 95vw;
@@ -182,6 +187,12 @@ $: describedby = [title ? labelid : undefined, descid].filter(isNotBlank).join('
182
187
  }
183
188
  }
184
189
 
190
+ @container dosgato-dialog-section (max-width: 350px) {
191
+ footer.actions {
192
+ padding: 0.5em;
193
+ }
194
+ }
195
+
185
196
  .header-buttons {
186
197
  position: absolute;
187
198
  top: 0.1em;
@@ -77,7 +77,9 @@ $: messages = compact ? $messageStore : [];
77
77
  </div>{/if}
78
78
  </div>
79
79
  <svelte:fragment slot="addbutton" let:maxed let:onClick>
80
- <Button type="button" icon={plusCircleLight} class="{addMoreClass} dialog-multiple-button" disabled={maxed} on:click={onClick}>{maxed ? maxedText : addMoreText}</Button>
80
+ {#if !maxed || (maxed && maxLength > 1)}
81
+ <Button type="button" icon={plusCircleLight} class="{addMoreClass} dialog-multiple-button" disabled={maxed} on:click={onClick}>{maxed ? maxedText : addMoreText}</Button>
82
+ {/if}
81
83
  </svelte:fragment>
82
84
  </AddMore>
83
85
  </Container>
package/dist/Tabs.svelte CHANGED
@@ -10,7 +10,7 @@ export let tabs;
10
10
  export let active = undefined;
11
11
  export let store = new TabStore(tabs, active);
12
12
  export let disableDialogControl = false;
13
- export let accordionOnMobile = true;
13
+ export let accordionOnMobile = false;
14
14
  /**
15
15
  * Takes the width of the tabs area, in pixels, and returns the number of tabs that should be
16
16
  * displayed at that width.
@@ -87,7 +87,7 @@ let thumbnailExpanded = false;
87
87
  </script>
88
88
 
89
89
  <Dialog size="xl" ignoreTabs title={label} on:escape continueText="Choose" disabled={!$preview && required} cancelText="Cancel">
90
- <section class="dialog-chooser-window">
90
+ <section class="dialog-chooser-window" class:no-controls={$sources.length < 2}>
91
91
  {#if $sources.length > 1}
92
92
  <header class="dialog-chooser-controls">
93
93
  <Tabs bind:store={tabStore} tabs={$sources.map(s => ({ name: s.name, title: s.label ?? s.name }))} active={$preview?.source ?? $selected?.source ?? $source?.name ?? initialSource} accordionOnMobile={false}/>
@@ -126,6 +126,9 @@ let thumbnailExpanded = false;
126
126
  container-type: inline-size;
127
127
  container-name: dosgato-dialog-chooser-window
128
128
  }
129
+ .dialog-chooser-window.no-controls {
130
+ height: 85vh;
131
+ }
129
132
  .dialog-chooser-window * {
130
133
  box-sizing: border-box;
131
134
  }
@@ -263,7 +263,7 @@ async function selectHeader(selected) {
263
263
  cursor: col-resize;
264
264
  }
265
265
  .tree-header > .tree-header-cell {
266
- padding: 0.4em 0.3em;
266
+ padding: 0.4em 0.5em;
267
267
  }
268
268
  .tree-header > .tree-separator {
269
269
  position: relative;
@@ -364,12 +364,13 @@ $: if ($dragging) {
364
364
  :global(.resizing) .tree-node {
365
365
  cursor: col-resize;
366
366
  }
367
+ .tree-node > div {
368
+ padding: 0.6em 0.5em;
369
+ }
367
370
  .tree-node .checkbox {
368
371
  min-width: 1.5em;
369
372
  max-width: 1.5em;
370
- }
371
- .tree-node > div {
372
- padding: 0.6em 0.3em;
373
+ padding-left: 0.3em;
373
374
  }
374
375
  .tree-node > div.left {
375
376
  display: flex;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dosgato/dialog",
3
3
  "description": "A component library for building forms that edit a JSON document.",
4
- "version": "1.1.3",
4
+ "version": "1.1.5",
5
5
  "scripts": {
6
6
  "prepublishOnly": "svelte-package",
7
7
  "dev": "vite dev --force",