@dosgato/dialog 1.0.8 → 1.1.1

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.
@@ -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)));
@@ -130,6 +130,10 @@ $: describedby = [title ? labelid : undefined, descid].filter(isNotBlank).join('
130
130
  margin-right: 0.4em;
131
131
  }
132
132
 
133
+ .header-buttons button {
134
+ color: black;
135
+ }
136
+
133
137
  .dialog-content {
134
138
  position: relative;
135
139
  padding: 2em;
@@ -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 wrapOnChange(onChange) {
21
- showBadInputMessage = inputelement.validity.badInput;
22
- onChange();
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}" onChange={() => { wrapOnChange(onChange) }} {onBlur} {valid} {invalid} {min} {max} {step} {extradescid} {messagesid} {helptextid}/>
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>
@@ -111,6 +111,10 @@ $: messages = compact ? $messageStore : [];
111
111
  padding: 0.15em;
112
112
  cursor: pointer;
113
113
  font-size: 1.3em;
114
+ color: black;
115
+ }
116
+ .dialog-multiple-buttons button:disabled {
117
+ color: #6d6d6d;
114
118
  }
115
119
 
116
120
  </style>
@@ -53,3 +53,10 @@ onMount(reactToChoices);
53
53
  {/each}
54
54
  </select>
55
55
  </FieldStandard>
56
+
57
+ <style>
58
+ select {
59
+ color: black;
60
+ }
61
+
62
+ </style>
package/dist/Tabs.svelte CHANGED
@@ -172,6 +172,7 @@ onMount(reactToCurrent);
172
172
  background: none;
173
173
  cursor: pointer;
174
174
  border: 0;
175
+ color: black;
175
176
  }
176
177
  li:not(.left) {
177
178
  margin-left: -1px;
@@ -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' ? 'fa-brands' : 'fa-solid'}:${value.icon?.slice(3) ?? 'graduation-cap'}`}/>
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' ? 'fa-brands' : 'fa-solid'}:${icon.class.slice(3)}`}/>
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;