@dosgato/dialog 1.0.8 → 1.1.0
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/Container.svelte +1 -0
- package/dist/Dialog.svelte +4 -0
- package/dist/FieldChooserLink.svelte +6 -0
- package/dist/FieldDateTime.svelte +5 -4
- package/dist/FieldMultiple.svelte +4 -0
- package/dist/FieldSelect.svelte +7 -0
- package/dist/Tabs.svelte +1 -0
- package/dist/iconpicker/FieldIconPicker.svelte +9 -3
- package/dist/iconpicker/iconpicker.js +21403 -14036
- package/dist/tree/Tree.svelte +69 -13
- package/dist/tree/Tree.svelte.d.ts +1 -0
- package/dist/tree/treestore.d.ts +1 -0
- package/package.json +1 -1
package/dist/Container.svelte
CHANGED
|
@@ -70,6 +70,7 @@ $: setNeedsShowHelp(helpelement);
|
|
|
70
70
|
.dialog-field-container[data-related~="1"] {
|
|
71
71
|
padding-top: 0;
|
|
72
72
|
padding-left: calc(var(--dialog-container-padding, 1em) + var(--dialog-related-padding, 1em));
|
|
73
|
+
margin-top: -0.5em;
|
|
73
74
|
}
|
|
74
75
|
.dialog-field-container[data-related~="2"] {
|
|
75
76
|
padding-left: calc(var(--dialog-container-padding, 1em) + (2 * var(--dialog-related-padding, 1em)));
|
package/dist/Dialog.svelte
CHANGED
|
@@ -243,6 +243,11 @@ $: void updateSelected($value);
|
|
|
243
243
|
align-items: flex-start;
|
|
244
244
|
margin-top: 0.2em;
|
|
245
245
|
}
|
|
246
|
+
.dialog-chooser-entry > button {
|
|
247
|
+
border-radius: 0.25em;
|
|
248
|
+
border: 1px solid #808080;
|
|
249
|
+
color: black;
|
|
250
|
+
}
|
|
246
251
|
.dialog-chooser-entry-input {
|
|
247
252
|
position: relative;
|
|
248
253
|
flex-grow: 1;
|
|
@@ -261,6 +266,7 @@ $: void updateSelected($value);
|
|
|
261
266
|
transform: translateY(-50%);
|
|
262
267
|
cursor: pointer;
|
|
263
268
|
line-height: 1;
|
|
269
|
+
color: black;
|
|
264
270
|
}
|
|
265
271
|
:global([data-eq~="400px"] .dialog-chooser-container .dialog-chooser-thumbnail img) {
|
|
266
272
|
object-position: left;
|
|
@@ -17,15 +17,16 @@ export let extradescid = undefined;
|
|
|
17
17
|
export let helptext = undefined;
|
|
18
18
|
export let inputelement = undefined;
|
|
19
19
|
let showBadInputMessage = false;
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
function wrapOnBlur(onBlur) {
|
|
21
|
+
const date = new Date(inputelement.value);
|
|
22
|
+
showBadInputMessage = inputelement.validity.badInput || !(date instanceof Date && !isNaN(date.valueOf()));
|
|
23
|
+
onBlur();
|
|
23
24
|
}
|
|
24
25
|
</script>
|
|
25
26
|
|
|
26
27
|
<FieldStandard bind:id {label} {path} {required} {defaultValue} {conditional} {related} {helptext} serialize={datetimeSerialize} deserialize={datetimeDeserialize} let:value let:valid let:invalid let:id let:onBlur let:onChange let:helptextid let:messagesid>
|
|
27
28
|
{#if showBadInputMessage}<div class="bad-input-warning" aria-live='polite'>{`Field ${label}`} must include both a date and time</div>{/if}
|
|
28
|
-
<Input bind:inputelement={inputelement} type="datetime-local" name={path} {value} {id} class="dialog-input {className}"
|
|
29
|
+
<Input bind:inputelement={inputelement} type="datetime-local" name={path} {value} {id} class="dialog-input {className}" onBlur={() => { wrapOnBlur(onBlur) }} {onChange} {valid} {invalid} {min} {max} {step} {extradescid} {messagesid} {helptextid}/>
|
|
29
30
|
</FieldStandard>
|
|
30
31
|
|
|
31
32
|
<style>
|
package/dist/FieldSelect.svelte
CHANGED
package/dist/Tabs.svelte
CHANGED
|
@@ -104,8 +104,8 @@ function onKeyDown(e) {
|
|
|
104
104
|
</script>
|
|
105
105
|
|
|
106
106
|
<FieldStandard bind:id {path} {descid} {label} {required} {defaultValue} {conditional} {helptext} let:value let:valid let:invalid let:id let:onBlur let:setVal let:messagesid let:helptextid>
|
|
107
|
-
<Icon icon={`${value.prefix === 'fab' ? '
|
|
108
|
-
<button type="button" id="btnSelectIcon" on:click={() => { modalOpen = true }} aria-describedby={getDescribedBy([descid, messagesid, helptextid])}>Select New Icon</button>
|
|
107
|
+
<Icon icon={`${value.prefix === 'fab' ? 'fa6-brands' : 'fa6-solid'}:${value.icon?.slice(3) ?? 'graduation-cap'}`}/>
|
|
108
|
+
<button type="button" id="btnSelectIcon" class="select-icon" on:click={() => { modalOpen = true }} aria-describedby={getDescribedBy([descid, messagesid, helptextid])}>Select New Icon</button>
|
|
109
109
|
{#if modalOpen}
|
|
110
110
|
<Modal>
|
|
111
111
|
<section>
|
|
@@ -130,8 +130,9 @@ function onKeyDown(e) {
|
|
|
130
130
|
<ScreenReaderOnly><legend class="sr-only">Icons</legend></ScreenReaderOnly>
|
|
131
131
|
<div class="icon-picker-items" role="radiogroup">
|
|
132
132
|
{#each visibleIcons as icon, idx (icon.class)}
|
|
133
|
+
|
|
133
134
|
<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}>
|
|
134
|
-
<Icon icon={`${iconToPrefix[icon.class] === 'fab' ? '
|
|
135
|
+
<Icon icon={`${iconToPrefix[icon.class] === 'fab' ? 'fa6-brands' : 'fa6-solid'}:${icon.class.slice(3)}`}/>
|
|
135
136
|
<ScreenReaderOnly>{icon.label}</ScreenReaderOnly>
|
|
136
137
|
</div>
|
|
137
138
|
{:else}
|
|
@@ -153,6 +154,11 @@ function onKeyDown(e) {
|
|
|
153
154
|
|
|
154
155
|
|
|
155
156
|
<style>
|
|
157
|
+
.select-icon {
|
|
158
|
+
border-radius: 0.25em;
|
|
159
|
+
border: 1px solid #808080;
|
|
160
|
+
color: black;
|
|
161
|
+
}
|
|
156
162
|
section {
|
|
157
163
|
position: relative;
|
|
158
164
|
background-color: #f4f4f4;
|