@dosgato/dialog 0.0.18 → 0.0.19
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/Listbox.svelte
CHANGED
|
@@ -122,6 +122,7 @@ function focusListbox() {
|
|
|
122
122
|
<span id={labelId}>{label}</span>
|
|
123
123
|
<ul bind:this={listboxElement} role="listbox" id={listId} class="listbox-items" tabindex="0" aria-describedby={descid} aria-labelledby={labelId} aria-multiselectable={multiselect} on:keydown={onkeydown} on:focus={focusListbox}>
|
|
124
124
|
{#each items as item, i (item.value)}
|
|
125
|
+
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
125
126
|
<li
|
|
126
127
|
bind:this={itemelements[i]}
|
|
127
128
|
id={`${listId}-${i}`}
|
package/Tab.svelte
CHANGED
|
@@ -13,7 +13,7 @@ const last = idx === $store.tabs.length - 1;
|
|
|
13
13
|
{#if $accordion}
|
|
14
14
|
<div bind:this={tabelements[idx]} id={$store.tabids[title]} class="tabs-tab" class:last aria-selected={active} aria-controls={$store.panelids[title]} role="tab" tabindex={0} on:click={onClick(idx)} on:keydown={onKeyDown(idx)}><Icon icon={$store.tabs[idx].icon} inline />{title}<i class="tabs-accordion-arrow" aria-hidden="true"></i></div>
|
|
15
15
|
{/if}
|
|
16
|
-
<div id={$store.panelids[title]} hidden={!active} role="tabpanel" tabindex="
|
|
16
|
+
<div id={$store.panelids[title]} hidden={!active} role="tabpanel" tabindex="-1" aria-labelledby={$store.tabids[title]} class="tabs-panel" class:accordion={$accordion}>
|
|
17
17
|
<slot />
|
|
18
18
|
</div>
|
|
19
19
|
|
package/chooser/Chooser.svelte
CHANGED
|
@@ -92,7 +92,7 @@ onMount(async () => {
|
|
|
92
92
|
</ul>
|
|
93
93
|
</Loading>
|
|
94
94
|
</section>
|
|
95
|
-
<section class="dialog-chooser-preview" tabindex=
|
|
95
|
+
<section class="dialog-chooser-preview" tabindex="-1">
|
|
96
96
|
{#if $preview}
|
|
97
97
|
<Thumbnail item={$preview} />
|
|
98
98
|
<Details item={$preview}>
|
package/chooser/Details.svelte
CHANGED
|
File without changes
|
|
@@ -73,10 +73,10 @@ function onSelectCategory() {
|
|
|
73
73
|
}
|
|
74
74
|
function onKeyDown(e) {
|
|
75
75
|
const currentSelectionIndex = visibleIcons.findIndex(i => i.class === selected.icon);
|
|
76
|
-
let newIndex;
|
|
77
76
|
if (modifierKey(e))
|
|
78
77
|
return;
|
|
79
|
-
|
|
78
|
+
let newIndex;
|
|
79
|
+
if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {
|
|
80
80
|
e.preventDefault();
|
|
81
81
|
if (currentSelectionIndex === visibleIcons.length - 1) {
|
|
82
82
|
newIndex = 0;
|
|
@@ -124,11 +124,11 @@ function onKeyDown(e) {
|
|
|
124
124
|
{/each}
|
|
125
125
|
</select>
|
|
126
126
|
</div>
|
|
127
|
-
<fieldset
|
|
127
|
+
<fieldset>
|
|
128
128
|
<ScreenReaderOnly><legend class="sr-only">Icons</legend></ScreenReaderOnly>
|
|
129
|
-
<div class="icon-picker-items" role="radiogroup"
|
|
129
|
+
<div class="icon-picker-items" role="radiogroup">
|
|
130
130
|
{#each visibleIcons as icon, idx (icon.class)}
|
|
131
|
-
<div bind:this={iconElements[idx]} id={icon.class} class="icon-picker-item" role="radio" aria-checked={icon.class === selected.icon} tabindex={icon.class === selected.icon ? 0 : -1} data-index={idx} on:click={() => onSelectIcon(icon.class)}>
|
|
131
|
+
<div bind:this={iconElements[idx]} id={icon.class} class="icon-picker-item" role="radio" aria-checked={icon.class === selected.icon} tabindex={icon.class === selected.icon ? 0 : -1} data-index={idx} on:click={() => onSelectIcon(icon.class)} on:keydown={onKeyDown}>
|
|
132
132
|
<Icon icon={`${iconToPrefix[icon.class] === 'fab' ? 'fa-brands' : 'fa-solid'}:${icon.class.slice(3)}`}/>
|
|
133
133
|
<ScreenReaderOnly>{icon.label}</ScreenReaderOnly>
|
|
134
134
|
</div>
|
|
@@ -253,4 +253,4 @@ function onKeyDown(e) {
|
|
|
253
253
|
line-height: 250px;
|
|
254
254
|
color: #999;
|
|
255
255
|
}
|
|
256
|
-
</style>
|
|
256
|
+
</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": "0.0.
|
|
4
|
+
"version": "0.0.19",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@txstate-mws/svelte-components": "^1.3.0",
|
|
7
7
|
"@txstate-mws/svelte-forms": ">=0.0.22",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"./chooser/Page.svelte": "./chooser/Page.svelte",
|
|
67
67
|
"./chooser/Thumbnail.svelte": "./chooser/Thumbnail.svelte",
|
|
68
68
|
"./chooser": "./chooser/index.js",
|
|
69
|
-
"./colorpicker/
|
|
69
|
+
"./colorpicker/FieldColorPicker.svelte": "./colorpicker/FieldColorPicker.svelte",
|
|
70
70
|
"./colorpicker/colorpicker": "./colorpicker/colorpicker.js",
|
|
71
71
|
"./colorpicker": "./colorpicker/index.js",
|
|
72
72
|
"./fileIcons": "./fileIcons.js",
|