@happyvertical/smrt-commerce 0.55.16 → 0.55.17
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/smrt-knowledge.json +3 -3
- package/dist/svelte/components/CustomerDetail.svelte +4 -1
- package/dist/svelte/components/CustomerDirectory.svelte +4 -1
- package/dist/svelte/components/CustomerForm.svelte +3 -0
- package/dist/svelte/components/InvoiceActions.svelte +4 -1
- package/dist/svelte/components/InvoiceAllocationFields.svelte +4 -1
- package/dist/svelte/components/InvoiceCard.svelte +12 -9
- package/dist/svelte/components/InvoiceEditor.svelte +4 -1
- package/dist/svelte/components/InvoiceHeader.svelte +25 -22
- package/dist/svelte/components/InvoiceLineEditor.svelte +4 -1
- package/dist/svelte/components/InvoiceLineItems.svelte +29 -26
- package/dist/svelte/components/InvoiceReview.svelte +4 -1
- package/dist/svelte/components/InvoiceTotals.svelte +14 -11
- package/dist/svelte/components/PartyAddressFields.svelte +3 -0
- package/dist/svelte/components/PartyContactFields.svelte +4 -1
- package/dist/svelte/components/PricingVersionDecision.svelte +4 -1
- package/dist/svelte/components/PricingVersionSummary.svelte +4 -1
- package/dist/svelte/components/PurchaseOrderEditor.svelte +4 -1
- package/dist/svelte/components/PurchaseOrderHeaderForm.svelte +1 -1
- package/dist/svelte/components/PurchaseSourceSelector.svelte +7 -2
- package/dist/svelte/components/QuoteEditor.svelte +4 -1
- package/dist/svelte/components/QuoteRevisionComparison.svelte +4 -1
- package/dist/svelte/components/QuoteRevisionHistory.svelte +4 -1
- package/dist/svelte/components/UnbilledItems.svelte +27 -24
- package/dist/svelte/components/VendorDetail.svelte +4 -1
- package/dist/svelte/components/VendorDirectory.svelte +4 -1
- package/dist/svelte/components/VendorForm.svelte +3 -0
- package/dist/svelte/playground/InvoicePreparationPreview.svelte +6 -1
- package/dist/svelte/playground/PartySelectPreview.svelte +4 -1
- package/package.json +9 -9
|
@@ -65,7 +65,7 @@ const text = $derived({
|
|
|
65
65
|
});
|
|
66
66
|
</script>
|
|
67
67
|
|
|
68
|
-
<section class="contacts" aria-labelledby={headingId}>
|
|
68
|
+
<section class="contacts" aria-labelledby={headingId} data-smrt-component="PartyContactFields">
|
|
69
69
|
<div class="contacts-heading">
|
|
70
70
|
<h2 id={headingId}>{text.heading}</h2>
|
|
71
71
|
{#if !readOnly && canAdd}
|
|
@@ -132,6 +132,8 @@ const text = $derived({
|
|
|
132
132
|
</section>
|
|
133
133
|
|
|
134
134
|
<style>
|
|
135
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
136
|
+
@layer smrt.theme {
|
|
135
137
|
.contacts { display: grid; gap: var(--smrt-spacing-4); min-inline-size: 0; }
|
|
136
138
|
.contacts-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--smrt-spacing-3); flex-wrap: wrap; }
|
|
137
139
|
h2, h3, p { margin: 0; }
|
|
@@ -150,4 +152,5 @@ const text = $derived({
|
|
|
150
152
|
.field-grid { grid-template-columns: minmax(0, 1fr); }
|
|
151
153
|
.contact-card { padding: var(--smrt-spacing-3); }
|
|
152
154
|
}
|
|
155
|
+
}
|
|
153
156
|
</style>
|
|
@@ -59,7 +59,7 @@ const { t } = useI18n();
|
|
|
59
59
|
const id = $props.id();
|
|
60
60
|
</script>
|
|
61
61
|
|
|
62
|
-
<section class="pricing-decision">
|
|
62
|
+
<section class="pricing-decision" data-smrt-component="PricingVersionDecision">
|
|
63
63
|
<PricingVersionSummary {version} />
|
|
64
64
|
{#if error}<p role="alert">{error}</p>{/if}
|
|
65
65
|
{#if readOnly}
|
|
@@ -82,7 +82,10 @@ const id = $props.id();
|
|
|
82
82
|
</section>
|
|
83
83
|
|
|
84
84
|
<style>
|
|
85
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
86
|
+
@layer smrt.theme {
|
|
85
87
|
.pricing-decision { min-width: 0; overflow-wrap: anywhere; }
|
|
86
88
|
.decisions { display: flex; flex-wrap: wrap; gap: var(--smrt-spacing-3); margin-top: var(--smrt-spacing-3); }
|
|
87
89
|
.decisions :global(button) { max-width: 100%; white-space: normal; }
|
|
90
|
+
}
|
|
88
91
|
</style>
|
|
@@ -23,7 +23,7 @@ function amount(value: number | null): string {
|
|
|
23
23
|
}
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
|
-
<section class="pricing-summary" aria-label={version.label}>
|
|
26
|
+
<section class="pricing-summary" aria-label={version.label} data-smrt-component="PricingVersionSummary">
|
|
27
27
|
<h3>{version.label}</h3>
|
|
28
28
|
<p>{version.counterparty} · {version.status}</p>
|
|
29
29
|
<p><strong>{t(M['commerce.pricing.total'])}: {amount(version.total.amountMinor)} {version.total.currency}</strong></p>
|
|
@@ -39,8 +39,11 @@ function amount(value: number | null): string {
|
|
|
39
39
|
</section>
|
|
40
40
|
|
|
41
41
|
<style>
|
|
42
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
43
|
+
@layer smrt.theme {
|
|
42
44
|
.pricing-summary { min-width: 0; overflow-wrap: anywhere; }
|
|
43
45
|
.pricing-summary ul { display: grid; gap: var(--smrt-spacing-3); padding-inline-start: var(--smrt-spacing-5); }
|
|
44
46
|
.pricing-summary li { min-width: 0; }
|
|
45
47
|
.pricing-summary li strong { display: block; }
|
|
48
|
+
}
|
|
46
49
|
</style>
|
|
@@ -137,7 +137,7 @@ function displayMoney(value: QuoteMoneyMinor): string {
|
|
|
137
137
|
const money = (amountMinor: number | null) =>
|
|
138
138
|
displayMoney({ currency, minorUnitDigits, amountMinor });
|
|
139
139
|
</script>
|
|
140
|
-
<section class="purchase-editor" aria-label={title}>
|
|
140
|
+
<section class="purchase-editor" aria-label={title} data-smrt-component="PurchaseOrderEditor">
|
|
141
141
|
<h2>{title}</h2>
|
|
142
142
|
<p>{t(P['commerce.purchase.boundary'])}</p>
|
|
143
143
|
<p>{source.vendor} — {source.label} · {currency}</p>
|
|
@@ -202,9 +202,12 @@ const money = (amountMinor: number | null) =>
|
|
|
202
202
|
{/if}
|
|
203
203
|
</section>
|
|
204
204
|
<style>
|
|
205
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
206
|
+
@layer smrt.theme {
|
|
205
207
|
.editor-attachments { min-width: 0; margin: 0; padding: 0; border: 0; }
|
|
206
208
|
.purchase-editor{max-width:48rem;min-width:0;overflow-wrap:anywhere;color:var(--smrt-color-on-surface)}
|
|
207
209
|
fieldset{min-width:0;margin-block:var(--smrt-spacing-4,1rem);padding:var(--smrt-spacing-4,1rem);border:1px solid var(--smrt-color-outline-variant);border-radius:var(--smrt-radius-md,0.5rem)}
|
|
208
210
|
.allocation{margin-block:var(--smrt-spacing-4,1rem)}
|
|
209
211
|
.actions{display:flex;flex-wrap:wrap;gap:var(--smrt-spacing-3,0.75rem);margin-block:var(--smrt-spacing-4,1rem)}
|
|
212
|
+
}
|
|
210
213
|
</style>
|
|
@@ -71,7 +71,7 @@ const textFields = [
|
|
|
71
71
|
] as const;
|
|
72
72
|
</script>
|
|
73
73
|
|
|
74
|
-
<section aria-label={title}>
|
|
74
|
+
<section aria-label={title} data-smrt-component="PurchaseOrderHeaderForm">
|
|
75
75
|
<h2>{title}</h2>
|
|
76
76
|
{#if message}<p role="alert">{message}</p>{/if}
|
|
77
77
|
<Form {...formAttributes} {action} method="post" {onsubmit} preventDefault={false}>
|
|
@@ -39,7 +39,7 @@ let {
|
|
|
39
39
|
}: Props = $props();
|
|
40
40
|
const { t } = useI18n();
|
|
41
41
|
</script>
|
|
42
|
-
<div class="purchase-source">
|
|
42
|
+
<div class="purchase-source" data-smrt-component="PurchaseSourceSelector">
|
|
43
43
|
<Form {action} {onsubmit} method="get" preventDefault={false}>
|
|
44
44
|
{#each hiddenFields as field}<Input type="hidden" name={field.name} value={field.value} />{/each}
|
|
45
45
|
<FormGroup label={label ?? t(P['commerce.purchase.source'])} {error} required>
|
|
@@ -53,4 +53,9 @@ const { t } = useI18n();
|
|
|
53
53
|
<Button type="submit" disabled={disabled || sources.every(source=>source.disabled)} density="touch">{t(P['commerce.purchase.use'])}</Button>
|
|
54
54
|
</Form>
|
|
55
55
|
</div>
|
|
56
|
-
<style
|
|
56
|
+
<style>
|
|
57
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
58
|
+
@layer smrt.theme {
|
|
59
|
+
.purchase-source{max-width:48rem;min-width:0;overflow-wrap:anywhere;color:var(--smrt-color-on-surface)}
|
|
60
|
+
}
|
|
61
|
+
</style>
|
|
@@ -115,7 +115,7 @@ const title = $derived(
|
|
|
115
115
|
);
|
|
116
116
|
</script>
|
|
117
117
|
|
|
118
|
-
<section class="quote-editor" aria-label={title}>
|
|
118
|
+
<section class="quote-editor" aria-label={title} data-smrt-component="QuoteEditor">
|
|
119
119
|
<h2>{title}</h2>
|
|
120
120
|
<p>{t(Q[kind === 'vendor-quotation' ? 'commerce.quote.vendor_hint' : 'commerce.quote.estimate_hint'])}</p>
|
|
121
121
|
{#if readonly}<p>{t(Q['commerce.quote.readonly'])}</p>{/if}
|
|
@@ -170,8 +170,11 @@ const title = $derived(
|
|
|
170
170
|
</section>
|
|
171
171
|
|
|
172
172
|
<style>
|
|
173
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
174
|
+
@layer smrt.theme {
|
|
173
175
|
.editor-attachments { min-width: 0; margin: 0; padding: 0; border: 0; }
|
|
174
176
|
.quote-editor { max-width: 48rem; min-width: 0; color: var(--smrt-color-on-surface); overflow-wrap: anywhere; }
|
|
175
177
|
fieldset { min-width: 0; margin-block: var(--smrt-spacing-4, 1rem); padding: var(--smrt-spacing-4, 1rem); border: 1px solid var(--smrt-color-outline-variant); border-radius: var(--smrt-radius-md, 0.5rem); }
|
|
176
178
|
.actions { margin-top: var(--smrt-spacing-4, 1rem); }
|
|
179
|
+
}
|
|
177
180
|
</style>
|
|
@@ -28,7 +28,7 @@ const delta = $derived.by(() => {
|
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
</script>
|
|
31
|
-
<section class="quote-comparison" aria-label={title ?? t(Q['commerce.quote.compare'])}>
|
|
31
|
+
<section class="quote-comparison" aria-label={title ?? t(Q['commerce.quote.compare'])} data-smrt-component="QuoteRevisionComparison">
|
|
32
32
|
<h2>{title ?? t(Q['commerce.quote.compare'])}</h2>
|
|
33
33
|
<div class="versions">
|
|
34
34
|
<QuoteRevisionHistory revisions={[previous]} title={t(Q['commerce.quote.before'])} />
|
|
@@ -39,6 +39,9 @@ const delta = $derived.by(() => {
|
|
|
39
39
|
{:else}<p>{t(Q['commerce.quote.incomparable'])}</p>{/if}
|
|
40
40
|
</section>
|
|
41
41
|
<style>
|
|
42
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
43
|
+
@layer smrt.theme {
|
|
42
44
|
.quote-comparison { min-width: 0; color: var(--smrt-color-on-surface); overflow-wrap: anywhere; }
|
|
43
45
|
.versions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--smrt-spacing-4, 1rem); }
|
|
46
|
+
}
|
|
44
47
|
</style>
|
|
@@ -28,7 +28,7 @@ function amount(money: QuoteMoneyMinor): string {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
</script>
|
|
31
|
-
<section class="quote-history" aria-label={title ?? t(Q['commerce.quote.history'])}>
|
|
31
|
+
<section class="quote-history" aria-label={title ?? t(Q['commerce.quote.history'])} data-smrt-component="QuoteRevisionHistory">
|
|
32
32
|
<h2>{title ?? t(Q['commerce.quote.history'])}</h2>
|
|
33
33
|
<ol>
|
|
34
34
|
{#each revisions as revision (revision.id)}
|
|
@@ -48,8 +48,11 @@ function amount(money: QuoteMoneyMinor): string {
|
|
|
48
48
|
</ol>
|
|
49
49
|
</section>
|
|
50
50
|
<style>
|
|
51
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
52
|
+
@layer smrt.theme {
|
|
51
53
|
.quote-history { min-width: 0; color: var(--smrt-color-on-surface); overflow-wrap: anywhere; }
|
|
52
54
|
ol { padding-inline-start: var(--smrt-spacing-6, 1.5rem); }
|
|
53
55
|
li { margin-block: var(--smrt-spacing-4, 1rem); }
|
|
54
56
|
article { padding: var(--smrt-spacing-4, 1rem); border: 1px solid var(--smrt-color-outline-variant); border-radius: var(--smrt-radius-md, 0.5rem); }
|
|
57
|
+
}
|
|
55
58
|
</style>
|
|
@@ -98,7 +98,7 @@ const someSelected = $derived(
|
|
|
98
98
|
);
|
|
99
99
|
</script>
|
|
100
100
|
|
|
101
|
-
<div class="unbilled-items">
|
|
101
|
+
<div class="unbilled-items" data-smrt-component="UnbilledItems">
|
|
102
102
|
{#if items.length === 0}
|
|
103
103
|
<div class="empty-state">
|
|
104
104
|
<p>{emptyMessage}</p>
|
|
@@ -166,10 +166,12 @@ const someSelected = $derived(
|
|
|
166
166
|
</div>
|
|
167
167
|
|
|
168
168
|
<style>
|
|
169
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
170
|
+
@layer smrt.theme {
|
|
169
171
|
.unbilled-items {
|
|
170
172
|
display: flex;
|
|
171
173
|
flex-direction: column;
|
|
172
|
-
border: 1px solid var(--smrt-color-outline-variant
|
|
174
|
+
border: 1px solid var(--smrt-color-outline-variant);
|
|
173
175
|
border-radius: var(--smrt-radius-medium, 0.5rem);
|
|
174
176
|
overflow: hidden;
|
|
175
177
|
}
|
|
@@ -179,7 +181,7 @@ const someSelected = $derived(
|
|
|
179
181
|
align-items: center;
|
|
180
182
|
justify-content: center;
|
|
181
183
|
padding: var(--smrt-spacing-8, 2rem) var(--smrt-spacing-4, 1rem);
|
|
182
|
-
color: var(--smrt-color-on-surface-variant
|
|
184
|
+
color: var(--smrt-color-on-surface-variant);
|
|
183
185
|
}
|
|
184
186
|
|
|
185
187
|
.empty-state p {
|
|
@@ -191,8 +193,8 @@ const someSelected = $derived(
|
|
|
191
193
|
justify-content: space-between;
|
|
192
194
|
align-items: center;
|
|
193
195
|
padding: var(--smrt-spacing-3, 0.75rem) var(--smrt-spacing-4, 1rem);
|
|
194
|
-
background: var(--smrt-color-surface-container-low
|
|
195
|
-
border-bottom: 1px solid var(--smrt-color-outline-variant
|
|
196
|
+
background: var(--smrt-color-surface-container-low);
|
|
197
|
+
border-bottom: 1px solid var(--smrt-color-outline-variant);
|
|
196
198
|
}
|
|
197
199
|
|
|
198
200
|
.select-all {
|
|
@@ -201,13 +203,13 @@ const someSelected = $derived(
|
|
|
201
203
|
gap: var(--smrt-spacing-2, 0.5rem);
|
|
202
204
|
font: var(--smrt-typography-body-medium-font);
|
|
203
205
|
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
204
|
-
color: var(--smrt-color-on-surface
|
|
206
|
+
color: var(--smrt-color-on-surface);
|
|
205
207
|
cursor: pointer;
|
|
206
208
|
}
|
|
207
209
|
|
|
208
210
|
.selected-count {
|
|
209
211
|
font: var(--smrt-typography-label-small-font);
|
|
210
|
-
color: var(--smrt-color-on-surface-variant
|
|
212
|
+
color: var(--smrt-color-on-surface-variant);
|
|
211
213
|
}
|
|
212
214
|
|
|
213
215
|
.items-list {
|
|
@@ -215,7 +217,7 @@ const someSelected = $derived(
|
|
|
215
217
|
flex-direction: column;
|
|
216
218
|
max-height: 400px;
|
|
217
219
|
overflow-y: auto;
|
|
218
|
-
background: var(--smrt-color-surface
|
|
220
|
+
background: var(--smrt-color-surface);
|
|
219
221
|
}
|
|
220
222
|
|
|
221
223
|
.item-row {
|
|
@@ -223,7 +225,7 @@ const someSelected = $derived(
|
|
|
223
225
|
align-items: center;
|
|
224
226
|
gap: var(--smrt-spacing-3, 0.75rem);
|
|
225
227
|
padding: var(--smrt-spacing-3, 0.75rem) var(--smrt-spacing-4, 1rem);
|
|
226
|
-
border-bottom: 1px solid var(--smrt-color-surface-variant
|
|
228
|
+
border-bottom: 1px solid var(--smrt-color-surface-variant);
|
|
227
229
|
cursor: pointer;
|
|
228
230
|
transition: background var(--smrt-duration-fast, 150ms) var(--smrt-easing-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
229
231
|
}
|
|
@@ -235,11 +237,11 @@ const someSelected = $derived(
|
|
|
235
237
|
}
|
|
236
238
|
|
|
237
239
|
.item-row:hover {
|
|
238
|
-
background: var(--smrt-color-surface-container-low
|
|
240
|
+
background: var(--smrt-color-surface-container-low);
|
|
239
241
|
}
|
|
240
242
|
|
|
241
243
|
.item-row.selected {
|
|
242
|
-
background: var(--smrt-color-primary-container
|
|
244
|
+
background: var(--smrt-color-primary-container);
|
|
243
245
|
}
|
|
244
246
|
|
|
245
247
|
.item-row:last-child {
|
|
@@ -267,22 +269,22 @@ const someSelected = $derived(
|
|
|
267
269
|
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
268
270
|
text-transform: uppercase;
|
|
269
271
|
letter-spacing: 0.025em;
|
|
270
|
-
border-radius: var(--smrt-radius-full
|
|
272
|
+
border-radius: var(--smrt-radius-full);
|
|
271
273
|
}
|
|
272
274
|
|
|
273
275
|
.type-expense {
|
|
274
|
-
background: var(--smrt-color-tertiary-container
|
|
275
|
-
color: var(--smrt-color-on-tertiary-container
|
|
276
|
+
background: var(--smrt-color-tertiary-container);
|
|
277
|
+
color: var(--smrt-color-on-tertiary-container);
|
|
276
278
|
}
|
|
277
279
|
|
|
278
280
|
.type-time {
|
|
279
|
-
background: var(--smrt-color-primary-container
|
|
280
|
-
color: var(--smrt-color-on-primary-container
|
|
281
|
+
background: var(--smrt-color-primary-container);
|
|
282
|
+
color: var(--smrt-color-on-primary-container);
|
|
281
283
|
}
|
|
282
284
|
|
|
283
285
|
.item-description {
|
|
284
286
|
font: var(--smrt-typography-body-medium-font);
|
|
285
|
-
color: var(--smrt-color-on-surface
|
|
287
|
+
color: var(--smrt-color-on-surface);
|
|
286
288
|
white-space: nowrap;
|
|
287
289
|
overflow: hidden;
|
|
288
290
|
text-overflow: ellipsis;
|
|
@@ -292,17 +294,17 @@ const someSelected = $derived(
|
|
|
292
294
|
display: flex;
|
|
293
295
|
gap: var(--smrt-spacing-3, 0.75rem);
|
|
294
296
|
font: var(--smrt-typography-body-small-font);
|
|
295
|
-
color: var(--smrt-color-on-surface-variant
|
|
297
|
+
color: var(--smrt-color-on-surface-variant);
|
|
296
298
|
}
|
|
297
299
|
|
|
298
300
|
.item-category {
|
|
299
|
-
color: var(--smrt-color-on-surface-variant
|
|
301
|
+
color: var(--smrt-color-on-surface-variant);
|
|
300
302
|
}
|
|
301
303
|
|
|
302
304
|
.item-amount {
|
|
303
305
|
font: var(--smrt-typography-body-medium-font);
|
|
304
306
|
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
305
|
-
color: var(--smrt-color-on-surface
|
|
307
|
+
color: var(--smrt-color-on-surface);
|
|
306
308
|
font-variant-numeric: tabular-nums;
|
|
307
309
|
}
|
|
308
310
|
|
|
@@ -311,8 +313,8 @@ const someSelected = $derived(
|
|
|
311
313
|
justify-content: space-between;
|
|
312
314
|
align-items: center;
|
|
313
315
|
padding: var(--smrt-spacing-4, 1rem);
|
|
314
|
-
background: var(--smrt-color-surface-container-low
|
|
315
|
-
border-top: 1px solid var(--smrt-color-outline-variant
|
|
316
|
+
background: var(--smrt-color-surface-container-low);
|
|
317
|
+
border-top: 1px solid var(--smrt-color-outline-variant);
|
|
316
318
|
}
|
|
317
319
|
|
|
318
320
|
.selected-summary {
|
|
@@ -323,12 +325,13 @@ const someSelected = $derived(
|
|
|
323
325
|
|
|
324
326
|
.summary-label {
|
|
325
327
|
font: var(--smrt-typography-body-medium-font);
|
|
326
|
-
color: var(--smrt-color-on-surface-variant
|
|
328
|
+
color: var(--smrt-color-on-surface-variant);
|
|
327
329
|
}
|
|
328
330
|
|
|
329
331
|
.summary-value {
|
|
330
332
|
font: var(--smrt-typography-title-large-font);
|
|
331
333
|
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
332
|
-
color: var(--smrt-color-on-surface
|
|
334
|
+
color: var(--smrt-color-on-surface);
|
|
333
335
|
}
|
|
336
|
+
}
|
|
334
337
|
</style>
|
|
@@ -80,7 +80,7 @@ function minimumOrder(amountMinor: number): string {
|
|
|
80
80
|
}
|
|
81
81
|
</script>
|
|
82
82
|
|
|
83
|
-
<section class="party-detail">
|
|
83
|
+
<section class="party-detail" data-smrt-component="VendorDetail">
|
|
84
84
|
{#if backHref}<Button href={backHref} variant="ghost">{t(M['commerce.party.back_to'], { plural })}</Button>{/if}
|
|
85
85
|
<PageHeader title={vendor.profile.name} subtitle={vendor.profile.description ?? t(M['commerce.vendor.details'])}>
|
|
86
86
|
{#snippet actions()}
|
|
@@ -122,6 +122,8 @@ function minimumOrder(amountMinor: number): string {
|
|
|
122
122
|
</section>
|
|
123
123
|
|
|
124
124
|
<style>
|
|
125
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
126
|
+
@layer smrt.theme {
|
|
125
127
|
.party-detail { display: grid; gap: var(--smrt-spacing-5); max-inline-size: 64rem; min-inline-size: 0; overflow-wrap: anywhere; }
|
|
126
128
|
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--smrt-spacing-4); }
|
|
127
129
|
h2 { margin: 0 0 var(--smrt-spacing-4); font: var(--smrt-typography-title-medium-font); color: var(--smrt-color-on-surface); }
|
|
@@ -131,4 +133,5 @@ function minimumOrder(amountMinor: number): string {
|
|
|
131
133
|
a { color: var(--smrt-color-primary); }
|
|
132
134
|
.notes { margin: 0; white-space: pre-wrap; }
|
|
133
135
|
@media (max-width: 42rem) { .summary-grid { grid-template-columns: minmax(0, 1fr); } dl { grid-template-columns: minmax(0, 1fr); gap: var(--smrt-spacing-1); } dd { margin-block-end: var(--smrt-spacing-2); } }
|
|
136
|
+
}
|
|
134
137
|
</style>
|
|
@@ -132,7 +132,7 @@ function vendorMeta(vendor: VendorDisplayData): string {
|
|
|
132
132
|
}
|
|
133
133
|
</script>
|
|
134
134
|
|
|
135
|
-
<section class="party-directory">
|
|
135
|
+
<section class="party-directory" data-smrt-component="VendorDirectory">
|
|
136
136
|
<PageHeader title={plural} subtitle={labels.plural ? t(M['commerce.party.manage_named'], { plural }) : t(M['commerce.vendor.manage'])}>
|
|
137
137
|
{#snippet actions()}
|
|
138
138
|
{#if canCreate && addHref}<Button href={addHref}>{labels.add ?? (labels.singular ? t(M['commerce.party.add_named'], { singular }) : t(M['commerce.vendor.add']))}</Button>{/if}
|
|
@@ -199,6 +199,8 @@ function vendorMeta(vendor: VendorDisplayData): string {
|
|
|
199
199
|
</section>
|
|
200
200
|
|
|
201
201
|
<style>
|
|
202
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
203
|
+
@layer smrt.theme {
|
|
202
204
|
.party-directory { display: grid; gap: var(--smrt-spacing-5); max-inline-size: 64rem; min-inline-size: 0; }
|
|
203
205
|
:global(.directory-search) { display: grid; grid-template-columns: minmax(12rem, 2fr) minmax(10rem, 1fr) auto; align-items: end; gap: var(--smrt-spacing-3); }
|
|
204
206
|
:global(.directory-search .form-group) { margin: 0; min-inline-size: 0; }
|
|
@@ -212,4 +214,5 @@ function vendorMeta(vendor: VendorDisplayData): string {
|
|
|
212
214
|
.meta { margin-block-start: var(--smrt-spacing-2); color: var(--smrt-color-on-surface-variant); }
|
|
213
215
|
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--smrt-spacing-3); }
|
|
214
216
|
@media (max-width: 42rem) { :global(.directory-search) { grid-template-columns: minmax(0, 1fr); } :global(.directory-search .button) { inline-size: 100%; } .party-row { align-items: start; } }
|
|
217
|
+
}
|
|
215
218
|
</style>
|
|
@@ -213,6 +213,8 @@ const errorList = $derived(
|
|
|
213
213
|
</Form>
|
|
214
214
|
|
|
215
215
|
<style>
|
|
216
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
217
|
+
@layer smrt.theme {
|
|
216
218
|
:global(.party-form) { display: grid; gap: var(--smrt-spacing-5); min-inline-size: 0; padding-block-end: var(--smrt-spacing-8); }
|
|
217
219
|
.native-default-submit { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
|
218
220
|
.form-error { margin: 0; padding: var(--smrt-spacing-4); border-inline-start: 4px solid var(--smrt-color-error); background: var(--smrt-color-error-container); color: var(--smrt-color-on-error-container); border-radius: var(--smrt-radius-small); }
|
|
@@ -221,4 +223,5 @@ const errorList = $derived(
|
|
|
221
223
|
.locked-value { color: var(--smrt-color-on-surface-variant); }
|
|
222
224
|
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--smrt-spacing-4); }
|
|
223
225
|
@media (max-width: 42rem) { .field-grid { grid-template-columns: minmax(0, 1fr); } }
|
|
226
|
+
}
|
|
224
227
|
</style>
|
|
@@ -113,4 +113,9 @@ function submit(event: SubmitEvent & { currentTarget: HTMLFormElement }) {
|
|
|
113
113
|
{/snippet}
|
|
114
114
|
</InvoiceEditor>
|
|
115
115
|
</div>
|
|
116
|
-
<style
|
|
116
|
+
<style>
|
|
117
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
118
|
+
@layer smrt.theme {
|
|
119
|
+
.preview { display: grid; gap: var(--smrt-spacing-4); }
|
|
120
|
+
}
|
|
121
|
+
</style>
|
|
@@ -96,13 +96,16 @@ const match = <T extends { profile: { name: string } }>(
|
|
|
96
96
|
</div>
|
|
97
97
|
|
|
98
98
|
<style>
|
|
99
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
100
|
+
@layer smrt.theme {
|
|
99
101
|
.preview {
|
|
100
102
|
display: grid;
|
|
101
|
-
gap: var(--smrt-spacing-2
|
|
103
|
+
gap: var(--smrt-spacing-2);
|
|
102
104
|
max-width: 28rem;
|
|
103
105
|
color: var(--smrt-color-on-surface);
|
|
104
106
|
}
|
|
105
107
|
p {
|
|
106
108
|
margin: 0;
|
|
107
109
|
}
|
|
110
|
+
}
|
|
108
111
|
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-commerce",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.17",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Commerce models for the SMRT framework - contracts, fulfillments, payments",
|
|
6
6
|
"type": "module",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@happyvertical/accounting": "^0.103.4",
|
|
63
63
|
"@happyvertical/payments": "^0.103.4",
|
|
64
|
-
"@happyvertical/smrt-core": "0.55.
|
|
65
|
-
"@happyvertical/smrt-jobs": "0.55.
|
|
66
|
-
"@happyvertical/smrt-ledgers": "0.55.
|
|
67
|
-
"@happyvertical/smrt-subscriptions": "0.55.
|
|
68
|
-
"@happyvertical/smrt-tenancy": "0.55.
|
|
69
|
-
"@happyvertical/smrt-types": "0.55.
|
|
70
|
-
"@happyvertical/smrt-ui": "0.55.
|
|
64
|
+
"@happyvertical/smrt-core": "0.55.17",
|
|
65
|
+
"@happyvertical/smrt-jobs": "0.55.17",
|
|
66
|
+
"@happyvertical/smrt-ledgers": "0.55.17",
|
|
67
|
+
"@happyvertical/smrt-subscriptions": "0.55.17",
|
|
68
|
+
"@happyvertical/smrt-tenancy": "0.55.17",
|
|
69
|
+
"@happyvertical/smrt-types": "0.55.17",
|
|
70
|
+
"@happyvertical/smrt-ui": "0.55.17"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"svelte": "^5.57.0"
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@happyvertical/smrt-vitest": "0.55.
|
|
81
|
+
"@happyvertical/smrt-vitest": "0.55.17",
|
|
82
82
|
"@sveltejs/package": "^2.5.8",
|
|
83
83
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
84
84
|
"@testing-library/jest-dom": "^7.0.1",
|