@dosgato/dialog 1.1.2 → 1.1.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.
package/dist/Dialog.svelte
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script context="module">export const DIALOG_TABS_CONTEXT = {};
|
|
2
2
|
</script>
|
|
3
|
-
<script>import
|
|
4
|
-
import
|
|
3
|
+
<script>import arrowLeft from '@iconify-icons/ph/arrow-left';
|
|
4
|
+
import arrowRight from '@iconify-icons/ph/arrow-right';
|
|
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';
|
|
@@ -59,7 +59,7 @@ $: describedby = [title ? labelid : undefined, descid].filter(isNotBlank).join('
|
|
|
59
59
|
<footer class="actions">
|
|
60
60
|
<slot name="buttons" {nextTitle} {prevTitle} hasRequired={hasRequired && !ignoreTabs} onPrev={onPrev} onNext={onNext} {describedby}>
|
|
61
61
|
{#if prevTitle && !ignoreTabs}
|
|
62
|
-
<Button class="prev" disabled={!prevTitle} on:click={onPrev}><Icon icon={
|
|
62
|
+
<Button class="prev" disabled={!prevTitle} on:click={onPrev}><Icon icon={arrowLeft} inline /> <span class="prev-next" aria-hidden="true">Previous</span><ScreenReaderOnly>Previous Tab ({prevTitle})</ScreenReaderOnly></Button>
|
|
63
63
|
{/if}
|
|
64
64
|
{#if isNotBlank(cancelText)}
|
|
65
65
|
<Button cancel {describedby} on:click={() => dispatch('escape')}>{cancelText}</Button>
|
|
@@ -68,7 +68,7 @@ $: describedby = [title ? labelid : undefined, descid].filter(isNotBlank).join('
|
|
|
68
68
|
<Button class="primary" disabled={disabled || (hasRequired && !ignoreTabs)} {describedby} on:click={() => dispatch('continue')}><Icon icon={continueIcon} inline /> {continueText}</Button>
|
|
69
69
|
{/if}
|
|
70
70
|
{#if nextTitle && !ignoreTabs}
|
|
71
|
-
<Button class="next" disabled={!nextTitle} on:click={onNext}>Next
|
|
71
|
+
<Button class="next" disabled={!nextTitle} on:click={onNext}><span class="prev-next" aria-hidden="true">Next</span><ScreenReaderOnly> Next Tab ({nextTitle})</ScreenReaderOnly> <Icon icon={arrowRight} inline /></Button>
|
|
72
72
|
{/if}
|
|
73
73
|
</slot>
|
|
74
74
|
</footer>
|
|
@@ -167,9 +167,21 @@ $: describedby = [title ? labelid : undefined, descid].filter(isNotBlank).join('
|
|
|
167
167
|
border-bottom: 0px !important;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
footer.actions {
|
|
171
|
+
container-type: inline-size;
|
|
172
|
+
container-name: dosgato-dialog-actions
|
|
173
|
+
}
|
|
174
|
+
|
|
170
175
|
footer.actions :global(.prev) {
|
|
171
176
|
margin-right: auto;
|
|
172
177
|
}
|
|
178
|
+
|
|
179
|
+
@container dosgato-dialog-actions (max-width: 450px) {
|
|
180
|
+
footer.actions :global(button span.prev-next) {
|
|
181
|
+
display: none;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
173
185
|
.header-buttons {
|
|
174
186
|
position: absolute;
|
|
175
187
|
top: 0.1em;
|
|
@@ -245,6 +245,7 @@ $: void updateSelected($value);
|
|
|
245
245
|
}
|
|
246
246
|
:global([data-eq~="400px"]) .dialog-chooser-entry {
|
|
247
247
|
flex-direction: column;
|
|
248
|
+
align-items: center;
|
|
248
249
|
}
|
|
249
250
|
.dialog-chooser-entry > button {
|
|
250
251
|
border-radius: 0.25em;
|
|
@@ -260,6 +261,7 @@ $: void updateSelected($value);
|
|
|
260
261
|
}
|
|
261
262
|
:global([data-eq~="400px"]) .dialog-chooser-entry-input {
|
|
262
263
|
margin-bottom: 0.2em;
|
|
264
|
+
width: 100%;
|
|
263
265
|
}
|
|
264
266
|
.dialog-chooser-entry-input input {
|
|
265
267
|
width: 100%;
|
|
@@ -97,17 +97,17 @@ $: reactToPreview($preview);
|
|
|
97
97
|
flex-direction: row;
|
|
98
98
|
height: 25vh;
|
|
99
99
|
}
|
|
100
|
-
.dialog-chooser-preview :global(.dialog-chooser-thumbnail) {
|
|
100
|
+
.dialog-chooser-preview .preview-container :global(.dialog-chooser-thumbnail) {
|
|
101
101
|
max-width: 50%;
|
|
102
102
|
}
|
|
103
|
-
.dialog-chooser-preview :global(.dialog-chooser-thumbnail.expanded) {
|
|
103
|
+
.dialog-chooser-preview .preview-container :global(.dialog-chooser-thumbnail.expanded) {
|
|
104
104
|
max-width: unset;
|
|
105
105
|
}
|
|
106
|
-
.dialog-chooser-preview :global(.dialog-chooser-thumbnail img) {
|
|
106
|
+
.dialog-chooser-preview .preview-container :global(.dialog-chooser-thumbnail img) {
|
|
107
107
|
object-fit: cover;
|
|
108
108
|
object-position: center;
|
|
109
109
|
}
|
|
110
|
-
.dialog-chooser-preview :global(.dialog-chooser-thumbnail.expanded img) {
|
|
110
|
+
.dialog-chooser-preview .preview-container :global(.dialog-chooser-thumbnail.expanded img) {
|
|
111
111
|
object-fit: scale-down;
|
|
112
112
|
width: unset;
|
|
113
113
|
}
|
package/dist/tree/Tree.svelte
CHANGED
|
@@ -207,24 +207,24 @@ async function selectHeader(selected) {
|
|
|
207
207
|
</script>
|
|
208
208
|
|
|
209
209
|
<svelte:window on:mouseup={headerDragEnd} />
|
|
210
|
+
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
210
211
|
<div class="tree-header" class:resizing={!!dragtargetid} use:resize={{ store: treeWidth }} on:mouseup={headerDragEnd} on:touchend={headerDragEnd} on:mousemove={dragtargetid ? headerDrag : undefined} on:touchmove={dragtargetid ? headerDrag : undefined}>
|
|
211
|
-
<div class="checkbox" bind:this={checkboxelement} aria-hidden="true"> </div>
|
|
212
|
-
{#each shownHeaders as header, i (header.label)}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
{
|
|
216
|
-
{
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
{
|
|
224
|
-
|
|
225
|
-
</
|
|
226
|
-
|
|
227
|
-
{/if}
|
|
212
|
+
<div class="checkbox" bind:this={checkboxelement} aria-hidden="true"> </div>
|
|
213
|
+
{#each shownHeaders as header, i (header.label)}
|
|
214
|
+
<div bind:this={headerelements[i]} id={header.id} class="tree-header-cell {header.id}" aria-hidden="true" style:width={$headerOverride[header.id] ?? $headerSizes?.[i]} style:padding-left={i === 0 ? '1.4em' : undefined}>{header.label}{#if i === 0 && $store.loading}<LoadIcon />{/if}{#if i === 0 && isNotBlank(search)} (searching: {search}){/if}</div>
|
|
215
|
+
{#if enableResize && i !== shownHeaders.length - 1}<div class="tree-separator {header.id}" on:mousedown={headerDragStart(header, i)} on:touchstart={headerDragStart(header, i)} on:dblclick={headerDragReset}> </div>{/if}
|
|
216
|
+
{/each}
|
|
217
|
+
{#if hiddenHeaders.length}
|
|
218
|
+
<div class="button-wrapper">
|
|
219
|
+
<button bind:this={showMoreButton} type='button'><Icon icon={dotsIcon} hiddenLabel="View other columns"/></button>
|
|
220
|
+
<PopupMenu bind:value={selectedHeaderValue} items={hiddenHeaders.map(h => ({ value: h.id, label: h.label }))} buttonelement={showMoreButton} on:change={async e => { await selectHeader(e.detail) }} let:item menuContainerClass="hideable-container" menuClass="hideable-headers" menuItemSelectedClass="selected-header">
|
|
221
|
+
{#if 'value' in item}
|
|
222
|
+
<Icon icon={'value' in item && item.value === selectedHeaderValue ? radioSelectedIcon : circleIcon} inline width="1.1em"/>
|
|
223
|
+
{item.label}
|
|
224
|
+
{/if}
|
|
225
|
+
</PopupMenu>
|
|
226
|
+
</div>
|
|
227
|
+
{/if}
|
|
228
228
|
</div>
|
|
229
229
|
{#if mounted && myRootItems?.length}
|
|
230
230
|
<!-- svelte-ignore a11y-no-noninteractive-element-to-interactive-role -->
|
|
@@ -312,7 +312,7 @@ async function selectHeader(selected) {
|
|
|
312
312
|
padding: 0.4em;
|
|
313
313
|
background: white;
|
|
314
314
|
border: 1px solid slategray;
|
|
315
|
-
border-radius:
|
|
315
|
+
border-radius: 5px;
|
|
316
316
|
min-width: 10em;
|
|
317
317
|
max-height: 20em;
|
|
318
318
|
overflow-y: auto;
|
|
@@ -320,6 +320,8 @@ async function selectHeader(selected) {
|
|
|
320
320
|
:global(div.hideable-container ul.hideable-headers li[role="option"]) {
|
|
321
321
|
padding-left: 0;
|
|
322
322
|
color: black;
|
|
323
|
+
padding: 0.5em;
|
|
324
|
+
font-size: 1.1em;
|
|
323
325
|
}
|
|
324
326
|
|
|
325
327
|
</style>
|
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.
|
|
4
|
+
"version": "1.1.3",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepublishOnly": "svelte-package",
|
|
7
7
|
"dev": "vite dev --force",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@iconify-icons/mdi": "^1.2.22",
|
|
28
28
|
"@iconify-icons/ph": "^1.2.2",
|
|
29
29
|
"@txstate-mws/svelte-components": "^1.5.5",
|
|
30
|
-
"@txstate-mws/svelte-forms": "^1.3.
|
|
30
|
+
"@txstate-mws/svelte-forms": "^1.3.17",
|
|
31
31
|
"codemirror": "^6.0.1",
|
|
32
32
|
"txstate-utils": "^1.8.0"
|
|
33
33
|
},
|