@axium/contacts 0.2.4 → 0.2.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.
- package/lib/InitForm.svelte +20 -14
- package/package.json +1 -1
- package/routes/contacts/[id]/+page.svelte +4 -4
package/lib/InitForm.svelte
CHANGED
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
{/snippet}
|
|
40
40
|
|
|
41
41
|
{#snippet add(field: ArrayField)}
|
|
42
|
-
{#if init[field].length}<span
|
|
42
|
+
{#if init[field].length}<span></span>{/if}
|
|
43
43
|
<button class="icon-text" onclick={() => init[field].push({} as any)}>
|
|
44
44
|
<Icon i="plus" />
|
|
45
45
|
<span>{text('contacts.init.add.' + field)}</span>
|
|
46
46
|
</button>
|
|
47
|
-
<span
|
|
47
|
+
<span></span>
|
|
48
48
|
{/snippet}
|
|
49
49
|
|
|
50
50
|
<div class="contact-init-actions">
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
<div class="contact-init">
|
|
73
73
|
<Icon i="user" />
|
|
74
|
+
|
|
74
75
|
<div class="section">
|
|
75
76
|
{@render zod('display', more.names, true)}
|
|
76
77
|
{@render zod('prefix', more.names, true)}
|
|
@@ -92,7 +93,7 @@
|
|
|
92
93
|
|
|
93
94
|
<Icon i="regular/envelope" />
|
|
94
95
|
{#each init.emails, i}
|
|
95
|
-
{#if i}<span
|
|
96
|
+
{#if i}<span></span>{/if}
|
|
96
97
|
<div class={['email', init.emails.length > 1 && 'with-label']}>
|
|
97
98
|
<ZodInput bind:rootValue={init} path="emails.{i}.email" schema={Email.shape.email} {updateValue} noLabel="placeholder" />
|
|
98
99
|
{#if init.emails.length > 1}
|
|
@@ -105,7 +106,7 @@
|
|
|
105
106
|
|
|
106
107
|
<Icon i="phone" />
|
|
107
108
|
{#each init.phones, i}
|
|
108
|
-
{#if i}<span
|
|
109
|
+
{#if i}<span></span>{/if}
|
|
109
110
|
<div class={['phone', init.phones.length > 1 && 'with-label']}>
|
|
110
111
|
<ZodInput bind:rootValue={init} path="phones.{i}.country" schema={Phone.shape.country} {updateValue} noLabel="placeholder" />
|
|
111
112
|
<ZodInput bind:rootValue={init} path="phones.{i}.number" schema={Phone.shape.number} {updateValue} noLabel="placeholder" />
|
|
@@ -119,7 +120,7 @@
|
|
|
119
120
|
|
|
120
121
|
<Icon i="regular/location-dot" />
|
|
121
122
|
{#each init.addresses, i}
|
|
122
|
-
{#if i}<span
|
|
123
|
+
{#if i}<span></span>{/if}
|
|
123
124
|
<div class="section">
|
|
124
125
|
<LocationSelect bind:value={init.addresses[i]} />
|
|
125
126
|
</div>
|
|
@@ -132,12 +133,12 @@
|
|
|
132
133
|
<div class="section">
|
|
133
134
|
<DateSelect bind:day={init.birthDay} bind:month={init.birthMonth} bind:year={init.birthYear} />
|
|
134
135
|
</div>
|
|
135
|
-
<span
|
|
136
|
+
<span></span>
|
|
136
137
|
|
|
137
138
|
{#if showDetailed}
|
|
138
139
|
<Icon i="regular/circle-nodes" />
|
|
139
140
|
{#each init.relationships as rel, i}
|
|
140
|
-
{#if i}<span
|
|
141
|
+
{#if i}<span></span>{/if}
|
|
141
142
|
<div class="section">
|
|
142
143
|
<Discovery
|
|
143
144
|
onSelect={result => (rel.to = result.contact.id)}
|
|
@@ -160,7 +161,7 @@
|
|
|
160
161
|
|
|
161
162
|
<Icon i="regular/calendar-day" />
|
|
162
163
|
{#each init.dates, i}
|
|
163
|
-
{#if i}<span
|
|
164
|
+
{#if i}<span></span>{/if}
|
|
164
165
|
<div class="section">
|
|
165
166
|
<ZodInput bind:rootValue={init} path="dates.{i}" schema={SigDate} {updateValue} noLabel="placeholder" />
|
|
166
167
|
</div>
|
|
@@ -170,7 +171,7 @@
|
|
|
170
171
|
|
|
171
172
|
<Icon i="link-simple" />
|
|
172
173
|
{#each init.urls, i}
|
|
173
|
-
{#if i}<span
|
|
174
|
+
{#if i}<span></span>{/if}
|
|
174
175
|
<div class="section">
|
|
175
176
|
<ZodInput bind:rootValue={init} path="urls.{i}" schema={ContactURL} {updateValue} noLabel="placeholder" />
|
|
176
177
|
</div>
|
|
@@ -180,7 +181,7 @@
|
|
|
180
181
|
|
|
181
182
|
<Icon i="regular/input-text" />
|
|
182
183
|
{#each init.custom, i}
|
|
183
|
-
{#if i}<span
|
|
184
|
+
{#if i}<span></span>{/if}
|
|
184
185
|
<div class="section">
|
|
185
186
|
<ZodInput bind:rootValue={init} path="custom.{i}" schema={Custom} {updateValue} noLabel="placeholder" />
|
|
186
187
|
</div>
|
|
@@ -191,15 +192,15 @@
|
|
|
191
192
|
|
|
192
193
|
<Icon i="regular/note" />
|
|
193
194
|
<textarea bind:value={init.notes} {@attach dynamicRows(50, 3)}></textarea>
|
|
194
|
-
<span
|
|
195
|
+
<span></span>
|
|
195
196
|
|
|
196
|
-
<span
|
|
197
|
+
<span></span>
|
|
197
198
|
<div>
|
|
198
199
|
<button onclick={() => (showDetailed = !showDetailed)}>
|
|
199
200
|
<span>{text('contacts.init.show_' + (showDetailed ? 'less' : 'more'))}</span>
|
|
200
201
|
</button>
|
|
201
202
|
</div>
|
|
202
|
-
<span
|
|
203
|
+
<span></span>
|
|
203
204
|
</div>
|
|
204
205
|
|
|
205
206
|
<style>
|
|
@@ -243,7 +244,8 @@
|
|
|
243
244
|
background-color: var(--bg-menu);
|
|
244
245
|
|
|
245
246
|
button.toggle {
|
|
246
|
-
height:
|
|
247
|
+
height: 2em;
|
|
248
|
+
padding: 0.5em 0;
|
|
247
249
|
}
|
|
248
250
|
|
|
249
251
|
:global(.ZodInput) {
|
|
@@ -251,6 +253,10 @@
|
|
|
251
253
|
flex-direction: column;
|
|
252
254
|
gap: 1em;
|
|
253
255
|
}
|
|
256
|
+
|
|
257
|
+
:global(& > .Icon) {
|
|
258
|
+
margin: 0.5em 0;
|
|
259
|
+
}
|
|
254
260
|
}
|
|
255
261
|
|
|
256
262
|
.section {
|
package/package.json
CHANGED
|
@@ -247,15 +247,15 @@
|
|
|
247
247
|
border-radius: 1em;
|
|
248
248
|
background-color: var(--bg-menu);
|
|
249
249
|
|
|
250
|
-
button.toggle {
|
|
251
|
-
height: 1em;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
250
|
:global(.ZodInput) {
|
|
255
251
|
display: flex;
|
|
256
252
|
flex-direction: column;
|
|
257
253
|
gap: 1em;
|
|
258
254
|
}
|
|
255
|
+
|
|
256
|
+
:global(& > .Icon) {
|
|
257
|
+
margin: 0.25em 0;
|
|
258
|
+
}
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
.section {
|