@happyvertical/smrt-commerce 0.60.16 → 0.60.18

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.
Files changed (33) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/manifest.json +1 -1
  4. package/dist/smrt-knowledge.json +3 -3
  5. package/dist/svelte/components/CustomerDetail.svelte +60 -15
  6. package/dist/svelte/components/CustomerDirectory.svelte +82 -22
  7. package/dist/svelte/components/CustomerForm.svelte +74 -18
  8. package/dist/svelte/components/InvoiceActions.svelte +7 -3
  9. package/dist/svelte/components/InvoiceAllocationFields.svelte +22 -4
  10. package/dist/svelte/components/InvoiceCard.svelte +81 -82
  11. package/dist/svelte/components/InvoiceHeader.svelte +56 -57
  12. package/dist/svelte/components/InvoiceLineItems.svelte +142 -123
  13. package/dist/svelte/components/InvoiceRecordScreen.svelte +30 -7
  14. package/dist/svelte/components/InvoiceReview.svelte +16 -3
  15. package/dist/svelte/components/InvoiceTotals.svelte +37 -40
  16. package/dist/svelte/components/MoneyInvoiceEditor.svelte +44 -15
  17. package/dist/svelte/components/PartyAddressFields.svelte +32 -6
  18. package/dist/svelte/components/PartyContactFields.svelte +83 -26
  19. package/dist/svelte/components/PricingVersionDecision.svelte +20 -5
  20. package/dist/svelte/components/PricingVersionSummary.svelte +20 -5
  21. package/dist/svelte/components/PurchaseOrderEditor.svelte +42 -9
  22. package/dist/svelte/components/PurchaseSourceSelector.svelte +13 -2
  23. package/dist/svelte/components/QuoteEditor.svelte +35 -7
  24. package/dist/svelte/components/QuoteRevisionComparison.svelte +18 -4
  25. package/dist/svelte/components/QuoteRevisionHistory.svelte +25 -5
  26. package/dist/svelte/components/UnbilledItems.svelte +106 -106
  27. package/dist/svelte/components/VendorDetail.svelte +57 -12
  28. package/dist/svelte/components/VendorDirectory.svelte +82 -22
  29. package/dist/svelte/components/VendorForm.svelte +70 -16
  30. package/dist/svelte/playground/InvoicePreparationPreview.svelte +9 -2
  31. package/dist/svelte/playground/PartyFormPreview.svelte +1 -1
  32. package/dist/svelte/playground/PartySelectPreview.svelte +10 -4
  33. package/package.json +16 -16
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-commerce",
5
- "packageVersion": "0.60.16",
5
+ "packageVersion": "0.60.18",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-commerce:ContractCollection": {
8
8
  "name": "contractcollection",
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-commerce",
6
- "packageVersion": "0.60.16",
6
+ "packageVersion": "0.60.18",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "5f8b5d9b7429c1c45d90ae28fd71c9c6ea92a230b6632c801c0e77b1d4f80bae",
11
- "packageJson": "53191fd5096c4072b1139c71141a6ddf254beffee124ce5c8226583768a91a1c",
10
+ "manifest": "a553d9284da5fcf3504507b789b18ab070168627590480102d0e510d91f46cb3",
11
+ "packageJson": "57a89cbc9b79f410e252f34b8a334740a7b7ca7a124f7d9c66b66e30fec15d98",
12
12
  "agents": "ce13a8c83d4f0c81b3de99c0c7ed4fcbab9178dd267ca3f76b992cb0a1309ce4",
13
13
  "moduleDoc:agents/customer-vendor-ui.md": "2b22e519411a16d8c493496fc168da77b9acd25f6077ea8fbac00cfee3a3501c",
14
14
  "moduleDoc:README.md": "beb2fada61d0babc7aa0528b883a9d47d6c827d876ace1cce04a908338fa01f8",
@@ -106,7 +106,7 @@ function creditLimit(amountMinor: number): string {
106
106
  }
107
107
  </script>
108
108
 
109
- <section class="party-detail" data-smrt-component="CustomerDetail">
109
+ <section class="smrt-customer-detail__root" data-smrt-component="CustomerDetail">
110
110
  {#if backHref}<Button href={backHref} variant="ghost">{t(M['commerce.party.back_to'], { plural })}</Button>{/if}
111
111
  {#if header && !headless}
112
112
  {@render header()}
@@ -118,7 +118,7 @@ function creditLimit(amountMinor: number): string {
118
118
  </PageHeader>
119
119
  {/if}
120
120
 
121
- <div class="summary-grid">
121
+ <div class="smrt-customer-detail__summary-grid" data-smrt-part="summary">
122
122
  <Card padding="md">
123
123
  <h2>{t(M['commerce.party.identity'])}</h2>
124
124
  <dl>
@@ -138,27 +138,72 @@ function creditLimit(amountMinor: number): string {
138
138
  </Card>
139
139
  </div>
140
140
 
141
- <div class="summary-grid">
142
- <Card padding="md"><h2>{t(M['commerce.party.shipping_address'])}</h2><p class="address">{shippingAddress || notRecorded}</p></Card>
143
- <Card padding="md"><h2>{t(M['commerce.party.billing_address'])}</h2><p class="address">{billingAddress || notRecorded}</p></Card>
141
+ <div class="smrt-customer-detail__summary-grid" data-smrt-part="summary">
142
+ <Card padding="md"><h2>{t(M['commerce.party.shipping_address'])}</h2><p class="smrt-customer-detail__address" data-smrt-part="body">{shippingAddress || notRecorded}</p></Card>
143
+ <Card padding="md"><h2>{t(M['commerce.party.billing_address'])}</h2><p class="smrt-customer-detail__address" data-smrt-part="body">{billingAddress || notRecorded}</p></Card>
144
144
  </div>
145
145
 
146
146
  <PartyContactFields contacts={customer.contacts ?? []} labels={contactLabels} readOnly />
147
- {#if customer.notes}<Card padding="md"><h2>{t(M['commerce.party.notes'])}</h2><p class="notes">{customer.notes}</p></Card>{/if}
147
+ {#if customer.notes}<Card padding="md"><h2>{t(M['commerce.party.notes'])}</h2><p class="smrt-customer-detail__notes" data-smrt-part="body">{customer.notes}</p></Card>{/if}
148
148
  {@render extension?.(customer)}
149
149
  </section>
150
150
 
151
151
  <style>
152
152
  @layer smrt.reset, smrt.structure, smrt.theme;
153
+ @layer smrt.structure {
154
+ .smrt-customer-detail__root {
155
+ display: grid;
156
+ gap: var(--smrt-spacing-5);
157
+ max-inline-size: 64rem;
158
+ min-inline-size: 0;
159
+ overflow-wrap: anywhere;
160
+ }
161
+ .smrt-customer-detail__summary-grid {
162
+ display: grid;
163
+ grid-template-columns: repeat(2, minmax(0, 1fr));
164
+ gap: var(--smrt-spacing-4);
165
+ }
166
+ h2 {
167
+ margin: 0 0 var(--smrt-spacing-4);
168
+ }
169
+ dl {
170
+ display: grid;
171
+ grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr);
172
+ gap: var(--smrt-spacing-2) var(--smrt-spacing-4);
173
+ margin: 0;
174
+ }
175
+ dd {
176
+ margin: 0;
177
+ }
178
+ .smrt-customer-detail__address, .smrt-customer-detail__notes {
179
+ margin: 0;
180
+ white-space: pre-wrap;
181
+ }
182
+ @media (max-width: 42rem) {
183
+ .smrt-customer-detail__summary-grid {
184
+ grid-template-columns: minmax(0, 1fr);
185
+ }
186
+ dl {
187
+ grid-template-columns: minmax(0, 1fr);
188
+ gap: var(--smrt-spacing-1);
189
+ }
190
+ dd {
191
+ margin-block-end: var(--smrt-spacing-2);
192
+ }
193
+ }
194
+ }
195
+
153
196
  @layer smrt.theme {
154
- .party-detail { display: grid; gap: var(--smrt-spacing-5); max-inline-size: 64rem; min-inline-size: 0; overflow-wrap: anywhere; }
155
- .summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--smrt-spacing-4); }
156
- h2 { margin: 0 0 var(--smrt-spacing-4); font: var(--smrt-typography-title-medium-font); color: var(--smrt-color-on-surface); }
157
- dl { display: grid; grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr); gap: var(--smrt-spacing-2) var(--smrt-spacing-4); margin: 0; }
158
- dt { color: var(--smrt-color-on-surface-variant); }
159
- dd { margin: 0; }
160
- a { color: var(--smrt-color-primary); }
161
- .address, .notes { margin: 0; white-space: pre-wrap; }
162
- @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); } }
197
+ h2 {
198
+ font: var(--smrt-typography-title-medium-font);
199
+ color: var(--smrt-color-on-surface);
200
+ }
201
+ dt {
202
+ color: var(--smrt-color-on-surface-variant);
203
+ }
204
+ a {
205
+ color: var(--smrt-color-primary);
206
+ }
163
207
  }
208
+
164
209
  </style>
@@ -138,7 +138,7 @@ function customerTypeLabel(value: string | undefined): string {
138
138
  }
139
139
  </script>
140
140
 
141
- <section class="party-directory" data-smrt-component="CustomerDirectory">
141
+ <section class="smrt-customer-directory__root" data-smrt-component="CustomerDirectory">
142
142
  {#if header && !headless}
143
143
  {@render header()}
144
144
  {:else if !headless}
@@ -149,7 +149,7 @@ function customerTypeLabel(value: string | undefined): string {
149
149
  </PageHeader>
150
150
  {/if}
151
151
 
152
- <Form class="directory-search" method="get" action={searchAction} preventDefault={false} stagedReview={false}>
152
+ <Form class="smrt-customer-directory__search" method="get" action={searchAction} preventDefault={false} stagedReview={false}>
153
153
  {#each searchHiddenFields as [name, value]}
154
154
  <Input interaction={false} type="hidden" {name} {value} />
155
155
  {/each}
@@ -174,25 +174,25 @@ function customerTypeLabel(value: string | undefined): string {
174
174
  {#if errorMessage}
175
175
  <Alert variant="error" title={t(M['commerce.customer.unable_to_load'])}>{errorMessage}</Alert>
176
176
  {:else if loading}
177
- <div class="loading" role="status" aria-label={labels.loading ?? t(M['commerce.customer.loading'])}>
177
+ <div class="smrt-customer-directory__loading" role="status" aria-label={labels.loading ?? t(M['commerce.customer.loading'])} data-smrt-part="status">
178
178
  <Skeleton height="6rem" /><Skeleton height="6rem" /><Skeleton height="6rem" />
179
179
  </div>
180
180
  {:else if items.length === 0}
181
181
  <EmptyState title={labels.empty ?? t(M['commerce.customer.no_results'])} description={resolvedEmptyDescription} />
182
182
  {:else}
183
- <p class="result-count">
183
+ <p class="smrt-customer-directory__count" data-smrt-part="count">
184
184
  {pageSize === undefined
185
185
  ? t(M['commerce.party.showing_count'], { count: items.length, total })
186
186
  : t(M['commerce.party.showing'], { first, last, total })}
187
187
  </p>
188
- <div class="party-list">
188
+ <div class="smrt-customer-directory__list" data-smrt-part="list">
189
189
  {#each items as item (item.data.id)}
190
190
  <Card padding="md" hoverable data-party-id={item.data.id}>
191
- <div class="party-row">
192
- <div class="party-copy">
191
+ <div class="smrt-customer-directory__row" data-smrt-part="row">
192
+ <div class="smrt-customer-directory__copy" data-smrt-part="body">
193
193
  <h2>{#if item.href}<a href={item.href}>{item.data.profile.name}</a>{:else}{item.data.profile.name}{/if}</h2>
194
194
  <p>{item.data.profile.email || t(M['commerce.party.no_contact_details'])}</p>
195
- <p class="meta">{customerTypeLabel(item.data.customerType)}{item.data.paymentTerms ? ` · ${item.data.paymentTerms}` : ''}</p>
195
+ <p class="smrt-customer-directory__meta" data-smrt-part="meta">{customerTypeLabel(item.data.customerType)}{item.data.paymentTerms ? ` · ${item.data.paymentTerms}` : ''}</p>
196
196
  </div>
197
197
  <StatusBadge status={item.data.status} label={statusLabel(item.data.status)} />
198
198
  </div>
@@ -200,7 +200,7 @@ function customerTypeLabel(value: string | undefined): string {
200
200
  </Card>
201
201
  {/each}
202
202
  </div>
203
- <nav class="pagination" aria-label={t(M['commerce.party.pagination'], { singular })}>
203
+ <nav class="smrt-customer-directory__pagination" data-smrt-part="nav" aria-label={t(M['commerce.party.pagination'], { singular })}>
204
204
  {#if previousHref}<Button href={previousHref} variant="secondary">{labels.previous ?? t(M['commerce.party.previous'])}</Button>{/if}
205
205
  <span>{t(M['commerce.party.page'], { page })}</span>
206
206
  {#if nextHref}<Button href={nextHref} variant="secondary">{labels.next ?? t(M['commerce.party.next'])}</Button>{/if}
@@ -210,19 +210,79 @@ function customerTypeLabel(value: string | undefined): string {
210
210
 
211
211
  <style>
212
212
  @layer smrt.reset, smrt.structure, smrt.theme;
213
+ @layer smrt.structure {
214
+ .smrt-customer-directory__root {
215
+ display: grid;
216
+ gap: var(--smrt-spacing-5);
217
+ max-inline-size: 64rem;
218
+ min-inline-size: 0;
219
+ }
220
+ :global(.smrt-customer-directory__search) {
221
+ display: grid;
222
+ grid-template-columns: minmax(12rem, 2fr) minmax(10rem, 1fr) auto;
223
+ align-items: end;
224
+ gap: var(--smrt-spacing-3);
225
+ }
226
+ :global(.smrt-customer-directory__search [data-smrt-component="FormGroup"]) {
227
+ margin: 0;
228
+ min-inline-size: 0;
229
+ }
230
+ .smrt-customer-directory__loading, .smrt-customer-directory__list {
231
+ display: grid;
232
+ gap: var(--smrt-spacing-3);
233
+ }
234
+ .smrt-customer-directory__count {
235
+ margin: 0;
236
+ }
237
+ .smrt-customer-directory__row {
238
+ display: flex;
239
+ align-items: start;
240
+ justify-content: space-between;
241
+ gap: var(--smrt-spacing-4);
242
+ }
243
+ .smrt-customer-directory__copy {
244
+ min-inline-size: 0;
245
+ }
246
+ h2, p {
247
+ margin: 0;
248
+ }
249
+ .smrt-customer-directory__meta {
250
+ margin-block-start: var(--smrt-spacing-2);
251
+ }
252
+ .smrt-customer-directory__pagination {
253
+ display: flex;
254
+ align-items: center;
255
+ justify-content: center;
256
+ gap: var(--smrt-spacing-3);
257
+ }
258
+ @media (max-width: 42rem) {
259
+ :global(.smrt-customer-directory__search) {
260
+ grid-template-columns: minmax(0, 1fr);
261
+ }
262
+ :global(.smrt-customer-directory__search [data-smrt-component="Button"]) {
263
+ inline-size: 100%;
264
+ }
265
+ .smrt-customer-directory__row {
266
+ align-items: start;
267
+ }
268
+ }
269
+ }
270
+
213
271
  @layer smrt.theme {
214
- .party-directory { display: grid; gap: var(--smrt-spacing-5); max-inline-size: 64rem; min-inline-size: 0; }
215
- :global(.directory-search) { display: grid; grid-template-columns: minmax(12rem, 2fr) minmax(10rem, 1fr) auto; align-items: end; gap: var(--smrt-spacing-3); }
216
- :global(.directory-search .form-group) { margin: 0; min-inline-size: 0; }
217
- .loading, .party-list { display: grid; gap: var(--smrt-spacing-3); }
218
- .result-count { margin: 0; color: var(--smrt-color-on-surface-variant); }
219
- .party-row { display: flex; align-items: start; justify-content: space-between; gap: var(--smrt-spacing-4); }
220
- .party-copy { min-inline-size: 0; }
221
- h2, p { margin: 0; }
222
- h2 { font: var(--smrt-typography-title-medium-font); }
223
- h2 a { color: var(--smrt-color-primary); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
224
- .meta { margin-block-start: var(--smrt-spacing-2); color: var(--smrt-color-on-surface-variant); }
225
- .pagination { display: flex; align-items: center; justify-content: center; gap: var(--smrt-spacing-3); }
226
- @media (max-width: 42rem) { :global(.directory-search) { grid-template-columns: minmax(0, 1fr); } :global(.directory-search [data-smrt-component="Button"]) { inline-size: 100%; } .party-row { align-items: start; } }
272
+ .smrt-customer-directory__count {
273
+ color: var(--smrt-color-on-surface-variant);
274
+ }
275
+ h2 {
276
+ font: var(--smrt-typography-title-medium-font);
277
+ }
278
+ h2 a {
279
+ color: var(--smrt-color-primary);
280
+ text-decoration-thickness: 1px;
281
+ text-underline-offset: 0.15em;
282
+ }
283
+ .smrt-customer-directory__meta {
284
+ color: var(--smrt-color-on-surface-variant);
285
+ }
227
286
  }
287
+
228
288
  </style>
@@ -124,7 +124,7 @@ function attachEnhance(form: HTMLFormElement) {
124
124
 
125
125
  <Form
126
126
  bind:this={formComponent}
127
- class="party-form"
127
+ class="smrt-customer-form__form"
128
128
  action={transport.action}
129
129
  method={transport.method ?? 'post'}
130
130
  preventDefault={false}
@@ -139,20 +139,20 @@ function attachEnhance(form: HTMLFormElement) {
139
139
  <Input interaction={false} type="hidden" name={names.profileId} value={values.profileId} />
140
140
  {/if}
141
141
  {#if !readOnly && canSubmit}
142
- <span class="native-default-submit" aria-hidden="true">
142
+ <span class="smrt-customer-form__native-submit" aria-hidden="true" data-smrt-part="actions">
143
143
  <Button type="submit" name={intentName} value={transport.saveIntent ?? 'save'} tabindex={-1}>
144
144
  {labels.save ?? (labels.singular ? t(M[mode === 'create' ? 'commerce.party.add_named' : 'commerce.party.save_named'], { singular: labels.singular }) : t(M[mode === 'create' ? 'commerce.customer.add' : 'commerce.customer.save']))}
145
145
  </Button>
146
146
  </span>
147
147
  {/if}
148
148
 
149
- {#if errors.form}<p class="form-error" role="alert">{errors.form}</p>{/if}
149
+ {#if errors.form}<p class="smrt-customer-form__error" role="alert" data-smrt-part="error">{errors.form}</p>{/if}
150
150
  <ErrorSummary errors={errorList} />
151
151
 
152
- <fieldset class="form-section">
152
+ <fieldset class="smrt-customer-form__section" data-smrt-part="group">
153
153
  <legend>{t(M['commerce.party.identity'])}</legend>
154
154
  {#if lockIdentityKind && values.identityKind}
155
- <p class="locked-value">{t(M['commerce.party.identity'])}: {values.identityKind === 'business' ? t(M['commerce.party.identity_business']) : t(M['commerce.party.identity_person'])}</p>
155
+ <p class="smrt-customer-form__locked-value" data-smrt-part="value">{t(M['commerce.party.identity'])}: {values.identityKind === 'business' ? t(M['commerce.party.identity_business']) : t(M['commerce.party.identity_person'])}</p>
156
156
  <Input interaction={false} type="hidden" name={names.identityKind} value={values.identityKind} />
157
157
  {:else}
158
158
  <FormGroup label={t(M['commerce.party.identity'])} required error={errors.fields?.identityKind}>
@@ -166,7 +166,7 @@ function attachEnhance(form: HTMLFormElement) {
166
166
  <FormGroup label={t(M['commerce.party.name'], { singular })} required error={errors.fields?.name}>
167
167
  <Input name={names.name} value={values.name ?? ''} maxlength={160} required readonly={readOnly} />
168
168
  </FormGroup>
169
- <div class="field-grid">
169
+ <div class="smrt-customer-form__field-grid" data-smrt-part="group">
170
170
  <FormGroup label={t(M['commerce.party.profile_email'])} error={errors.fields?.email}>
171
171
  <Input name={names.email} type="email" value={values.email ?? ''} maxlength={320} readonly={readOnly} />
172
172
  </FormGroup>
@@ -186,9 +186,9 @@ function attachEnhance(form: HTMLFormElement) {
186
186
  </FormGroup>
187
187
  </fieldset>
188
188
 
189
- <fieldset class="form-section">
189
+ <fieldset class="smrt-customer-form__section" data-smrt-part="group">
190
190
  <legend>{t(M['commerce.party.commercial_terms'])}</legend>
191
- <div class="field-grid">
191
+ <div class="smrt-customer-form__field-grid" data-smrt-part="group">
192
192
  <FormGroup label={t(M['commerce.party.status'])} error={errors.fields?.status}>
193
193
  <Select name={names.status} value={values.status ?? 'active'} disabled={readOnly}>
194
194
  {#if values.status && !['active', 'inactive', 'suspended'].includes(values.status)}
@@ -212,7 +212,7 @@ function attachEnhance(form: HTMLFormElement) {
212
212
  </FormGroup>
213
213
  </fieldset>
214
214
 
215
- <div class="address-pair">
215
+ <div class="smrt-customer-form__address-pair" data-smrt-part="group">
216
216
  <PartyAddressFields heading={t(M['commerce.party.shipping_address'])} value={values.shippingAddress} names={{ street1: names.shippingStreet1, street2: names.shippingStreet2, city: names.shippingCity, state: names.shippingState, postalCode: names.shippingPostalCode, country: names.shippingCountry }} errors={{ street1: errors.fields?.shippingStreet1, street2: errors.fields?.shippingStreet2, city: errors.fields?.shippingCity, state: errors.fields?.shippingState, postalCode: errors.fields?.shippingPostalCode, country: errors.fields?.shippingCountry }} {readOnly} {countryOptions} {provinceOptions} />
217
217
  <PartyAddressFields heading={t(M['commerce.party.billing_address'])} value={values.billingAddress} names={{ street1: names.billingStreet1, street2: names.billingStreet2, city: names.billingCity, state: names.billingState, postalCode: names.billingPostalCode, country: names.billingCountry }} errors={{ street1: errors.fields?.billingStreet1, street2: errors.fields?.billingStreet2, city: errors.fields?.billingCity, state: errors.fields?.billingState, postalCode: errors.fields?.billingPostalCode, country: errors.fields?.billingCountry }} {readOnly} {countryOptions} {provinceOptions} />
218
218
  </div>
@@ -246,15 +246,71 @@ function attachEnhance(form: HTMLFormElement) {
246
246
 
247
247
  <style>
248
248
  @layer smrt.reset, smrt.structure, smrt.theme;
249
+ @layer smrt.structure {
250
+ :global(.smrt-customer-form__form) {
251
+ display: grid;
252
+ gap: var(--smrt-spacing-5);
253
+ min-inline-size: 0;
254
+ padding-block-end: var(--smrt-spacing-8);
255
+ }
256
+ .smrt-customer-form__native-submit {
257
+ position: absolute;
258
+ inline-size: 1px;
259
+ block-size: 1px;
260
+ padding: 0;
261
+ margin: -1px;
262
+ overflow: hidden;
263
+ clip: rect(0, 0, 0, 0);
264
+ white-space: nowrap;
265
+ }
266
+ .smrt-customer-form__error {
267
+ margin: 0;
268
+ padding: var(--smrt-spacing-4);
269
+ }
270
+ .smrt-customer-form__section {
271
+ min-inline-size: 0;
272
+ margin: 0;
273
+ padding: var(--smrt-spacing-4);
274
+ }
275
+ legend {
276
+ padding-inline: var(--smrt-spacing-2);
277
+ }
278
+ .smrt-customer-form__field-grid, .smrt-customer-form__address-pair {
279
+ display: grid;
280
+ grid-template-columns: repeat(2, minmax(0, 1fr));
281
+ gap: 0 var(--smrt-spacing-4);
282
+ }
283
+ .smrt-customer-form__address-pair {
284
+ gap: var(--smrt-spacing-4);
285
+ }
286
+ @media (max-width: 42rem) {
287
+ .smrt-customer-form__field-grid, .smrt-customer-form__address-pair {
288
+ grid-template-columns: minmax(0, 1fr);
289
+ }
290
+ }
291
+ }
292
+
249
293
  @layer smrt.theme {
250
- :global(.party-form) { display: grid; gap: var(--smrt-spacing-5); min-inline-size: 0; padding-block-end: var(--smrt-spacing-8); }
251
- .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; }
252
- .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); }
253
- .form-section { min-inline-size: 0; margin: 0; padding: var(--smrt-spacing-4); border: var(--smrt-hairline); border-radius: var(--smrt-radius-medium); }
254
- legend { padding-inline: var(--smrt-spacing-2); font: var(--smrt-typography-title-medium-font); color: var(--smrt-color-on-surface); }
255
- .locked-value { color: var(--smrt-color-on-surface-variant); }
256
- .field-grid, .address-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--smrt-spacing-4); }
257
- .address-pair { gap: var(--smrt-spacing-4); }
258
- @media (max-width: 42rem) { .field-grid, .address-pair { grid-template-columns: minmax(0, 1fr); } }
294
+ .smrt-customer-form__native-submit {
295
+ border: 0;
296
+ }
297
+ .smrt-customer-form__error {
298
+ border-inline-start: 4px solid var(--smrt-color-error);
299
+ background: var(--smrt-color-error-container);
300
+ color: var(--smrt-color-on-error-container);
301
+ border-radius: var(--smrt-radius-small);
302
+ }
303
+ .smrt-customer-form__section {
304
+ border: var(--smrt-hairline);
305
+ border-radius: var(--smrt-radius-medium);
306
+ }
307
+ legend {
308
+ font: var(--smrt-typography-title-medium-font);
309
+ color: var(--smrt-color-on-surface);
310
+ }
311
+ .smrt-customer-form__locked-value {
312
+ color: var(--smrt-color-on-surface-variant);
313
+ }
259
314
  }
315
+
260
316
  </style>
@@ -61,7 +61,7 @@ const canMarkPaid = $derived(
61
61
  const canDelete = $derived(status === 'draft');
62
62
  </script>
63
63
 
64
- <div class="invoice-actions" data-smrt-component="InvoiceActions">
64
+ <div class="smrt-invoice-actions__root" data-smrt-component="InvoiceActions">
65
65
  {#if canSend && onsend}
66
66
  <Button variant="primary" {size} onclick={onsend} disabled={loading}>
67
67
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
@@ -127,11 +127,15 @@ const canDelete = $derived(status === 'draft');
127
127
 
128
128
  <style>
129
129
  @layer smrt.reset, smrt.structure, smrt.theme;
130
- @layer smrt.theme {
131
- .invoice-actions {
130
+ @layer smrt.structure {
131
+ .smrt-invoice-actions__root {
132
132
  display: flex;
133
133
  gap: var(--smrt-spacing-2, 0.5rem);
134
134
  flex-wrap: wrap;
135
135
  }
136
136
  }
137
+
138
+ @layer smrt.theme {
139
+ }
140
+
137
141
  </style>
@@ -33,7 +33,7 @@ const names = $derived({
33
33
  ...fields,
34
34
  });
35
35
  </script>
36
- <div class="allocations" data-smrt-component="InvoiceAllocationFields">
36
+ <div class="smrt-invoice-allocation-fields__root" data-smrt-component="InvoiceAllocationFields">
37
37
  {#if !mayReadSources}<p>{t(M['commerce.preparation.restricted'])}</p>
38
38
  {:else if sources.length === 0}<p>{t(M['commerce.preparation.empty'])}</p>{/if}
39
39
  {#if allocations.length === 0}<p>{t(M['commerce.preparation.no_rows'])}</p>{/if}
@@ -67,9 +67,27 @@ const names = $derived({
67
67
  </div>
68
68
  <style>
69
69
  @layer smrt.reset, smrt.structure, smrt.theme;
70
+ @layer smrt.structure {
71
+ .smrt-invoice-allocation-fields__root {
72
+ display: grid;
73
+ gap: var(--smrt-spacing-4);
74
+ min-width: 0;
75
+ }
76
+ fieldset {
77
+ min-width: 0;
78
+ margin: 0;
79
+ padding: var(--smrt-spacing-4);
80
+ }
81
+ p {
82
+ margin: 0;
83
+ }
84
+ }
85
+
70
86
  @layer smrt.theme {
71
- .allocations { display: grid; gap: var(--smrt-spacing-4); min-width: 0; }
72
- fieldset { min-width: 0; margin: 0; padding: var(--smrt-spacing-4); border: var(--smrt-hairline-strong); border-radius: var(--smrt-radius-small); }
73
- p { margin: 0; }
87
+ fieldset {
88
+ border: var(--smrt-hairline-strong);
89
+ border-radius: var(--smrt-radius-small);
90
+ }
74
91
  }
92
+
75
93
  </style>