@happyvertical/smrt-commerce 0.34.5 → 0.34.6

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "timestamp": 1782261279392,
3
+ "timestamp": 1782278450444,
4
4
  "packageName": "@happyvertical/smrt-commerce",
5
- "packageVersion": "0.34.5",
5
+ "packageVersion": "0.34.6",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-commerce:ContractCollection": {
8
8
  "name": "contractcollection",
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-06-24T00:34:40.961Z",
3
+ "generatedAt": "2026-06-24T05:20:51.136Z",
4
4
  "packageName": "@happyvertical/smrt-commerce",
5
- "packageVersion": "0.34.5",
5
+ "packageVersion": "0.34.6",
6
6
  "sourceManifestPath": "dist/manifest.json",
7
7
  "agentDocPath": "AGENTS.md",
8
8
  "sourceHashes": {
9
- "manifest": "3b9fa1bd797a1a92092219e597f5b8a222dd47db4f610919d61e9e92617aa96c",
10
- "packageJson": "4cb9d8280587124738b95f683bd9b98aaeaa1ef44ae0e353749ff7f9a2fa1d72",
9
+ "manifest": "4c5a46a6aa9040493eb9880f5032ee3a35ca5cc64146aa8cb0423a324ada1437",
10
+ "packageJson": "c0a1558e276a2bcfd75badff4fa129d9dcc248a3617b5eb4f48c0f98566088c6",
11
11
  "agents": "f544ac9cece5c94aaead6013316709fcd044944b993110fc7218c0db7c998a63"
12
12
  },
13
13
  "exports": [
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
9
+ import { Button } from '@happyvertical/smrt-ui/ui';
9
10
  import { M } from '../i18n.js';
10
11
  import type { InvoiceStatus } from '../types.js';
11
12
 
@@ -54,61 +55,61 @@ const canMarkPaid = $derived(
54
55
  const canDelete = $derived(status === 'draft');
55
56
  </script>
56
57
 
57
- <div class="invoice-actions" class:sm={size === 'sm'}>
58
+ <div class="invoice-actions">
58
59
  {#if canSend && onsend}
59
- <button type="button" class="btn btn-primary" onclick={onsend} disabled={loading}>
60
+ <Button variant="primary" {size} onclick={onsend} disabled={loading}>
60
61
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
61
62
  <path d="M14 2L7 9M14 2l-4 12-3-5-5-3 12-4z" />
62
63
  </svg>
63
64
  {t(M['commerce.invoice_actions.send_invoice'])}
64
- </button>
65
+ </Button>
65
66
  {/if}
66
67
 
67
68
  {#if canMarkPaid && onmarkpaid}
68
- <button type="button" class="btn btn-success" onclick={onmarkpaid} disabled={loading}>
69
+ <Button variant="primary" {size} onclick={onmarkpaid} disabled={loading}>
69
70
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2">
70
71
  <path d="M3 8l4 4 6-8" />
71
72
  </svg>
72
73
  {t(M['commerce.invoice_actions.mark_as_paid'])}
73
- </button>
74
+ </Button>
74
75
  {/if}
75
76
 
76
77
  {#if canEdit && onedit}
77
- <button type="button" class="btn btn-secondary" onclick={onedit} disabled={loading}>
78
+ <Button variant="secondary" {size} onclick={onedit} disabled={loading}>
78
79
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
79
80
  <path d="M11.5 2.5l2 2-8 8H3.5v-2l8-8z" />
80
81
  </svg>
81
82
  Edit
82
- </button>
83
+ </Button>
83
84
  {/if}
84
85
 
85
86
  {#if onprint}
86
- <button type="button" class="btn btn-secondary" onclick={onprint} disabled={loading}>
87
+ <Button variant="secondary" {size} onclick={onprint} disabled={loading}>
87
88
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
88
89
  <path d="M4 5V2h8v3M4 11h8M2 5h12v6H2z" />
89
90
  <path d="M4 11v3h8v-3" />
90
91
  </svg>
91
92
  Print
92
- </button>
93
+ </Button>
93
94
  {/if}
94
95
 
95
96
  {#if onexport}
96
- <button type="button" class="btn btn-secondary" onclick={onexport} disabled={loading}>
97
+ <Button variant="secondary" {size} onclick={onexport} disabled={loading}>
97
98
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
98
99
  <path d="M8 2v8M4 6l4-4 4 4M2 12v2h12v-2" />
99
100
  </svg>
100
101
  Export
101
- </button>
102
+ </Button>
102
103
  {/if}
103
104
 
104
105
  {#if canDelete && ondelete}
105
- <button type="button" class="btn btn-danger" onclick={ondelete} disabled={loading}>
106
+ <Button variant="danger" {size} onclick={ondelete} disabled={loading}>
106
107
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
107
108
  <path d="M3 4h10M5 4V3a1 1 0 011-1h4a1 1 0 011 1v1M6 7v5M10 7v5" />
108
109
  <path d="M4 4l1 10h6l1-10" />
109
110
  </svg>
110
111
  Delete
111
- </button>
112
+ </Button>
112
113
  {/if}
113
114
  </div>
114
115
 
@@ -118,74 +119,4 @@ const canDelete = $derived(status === 'draft');
118
119
  gap: var(--smrt-spacing-2, 0.5rem);
119
120
  flex-wrap: wrap;
120
121
  }
121
-
122
- .btn {
123
- display: inline-flex;
124
- align-items: center;
125
- gap: var(--smrt-spacing-2, 0.5rem);
126
- padding: var(--smrt-spacing-2, 0.5rem) var(--smrt-spacing-4, 1rem);
127
- font: var(--smrt-typography-label-large-font);
128
- font-weight: var(--smrt-typography-weight-medium, 500);
129
- border: none;
130
- border-radius: var(--smrt-radius-small, 0.375rem);
131
- cursor: pointer;
132
- transition: all var(--smrt-duration-fast, 150ms) var(--smrt-easing-standard, cubic-bezier(0.2, 0, 0, 1));
133
- white-space: nowrap;
134
- }
135
-
136
- @media (prefers-reduced-motion: reduce) {
137
- .btn {
138
- transition: none;
139
- }
140
- }
141
-
142
- .sm .btn {
143
- padding: var(--smrt-spacing-1_5, 0.375rem) var(--smrt-spacing-3, 0.75rem);
144
- font: var(--smrt-typography-label-medium-font);
145
- }
146
-
147
- .btn:disabled {
148
- opacity: 0.38;
149
- cursor: not-allowed;
150
- }
151
-
152
- .btn-primary {
153
- background: var(--smrt-color-primary, #005ac1);
154
- color: var(--smrt-color-on-primary, #ffffff);
155
- }
156
-
157
- .btn-primary:hover:not(:disabled) {
158
- background: color-mix(in srgb, var(--smrt-color-primary, #005ac1) 85%, var(--smrt-color-shadow, #000));
159
- }
160
-
161
- .btn-success {
162
- background: var(--smrt-color-tertiary, #006c4c);
163
- color: var(--smrt-color-on-tertiary, #ffffff);
164
- }
165
-
166
- .btn-success:hover:not(:disabled) {
167
- background: color-mix(in srgb, var(--smrt-color-tertiary, #006c4c) 85%, var(--smrt-color-shadow, #000));
168
- }
169
-
170
- .btn-secondary {
171
- background: var(--smrt-color-surface-container-lowest, #ffffff);
172
- color: var(--smrt-color-on-surface-variant, #44474e);
173
- border: 1px solid var(--smrt-color-outline, #74777f);
174
- }
175
-
176
- .btn-secondary:hover:not(:disabled) {
177
- background: var(--smrt-color-surface-container-low, #f7f2fa);
178
- border-color: var(--smrt-color-on-surface-variant, #44474e);
179
- }
180
-
181
- .btn-danger {
182
- background: var(--smrt-color-surface-container-lowest, #ffffff);
183
- color: var(--smrt-color-error, #ba1a1a);
184
- border: 1px solid var(--smrt-color-error-container, #ffdad6);
185
- }
186
-
187
- .btn-danger:hover:not(:disabled) {
188
- background: var(--smrt-color-error-container, #ffdad6);
189
- border-color: var(--smrt-color-error, #ba1a1a);
190
- }
191
122
  </style>
@@ -1 +1 @@
1
- {"version":3,"file":"InvoiceActions.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/InvoiceActions.svelte.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,yCAAyC;AACzC,MAAM,WAAW,KAAK;IACpB,6BAA6B;IAC7B,MAAM,EAAE,aAAa,CAAC;IACtB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AA8FD,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"InvoiceActions.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/InvoiceActions.svelte.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,yCAAyC;AACzC,MAAM,WAAW,KAAK;IACpB,6BAA6B;IAC7B,MAAM,EAAE,aAAa,CAAC;IACtB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AA+FD,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
@@ -99,6 +99,7 @@ const isOverdue = $derived.by(() => {
99
99
  </div>
100
100
  </a>
101
101
  {:else}
102
+ <!-- raw-primitive-allow: large pressable invoice card wrapping rich header/body/footer content with use:ripple, a structural selection control no Button primitive should own (mirrors the href anchor branch) -->
102
103
  <button type="button" class="invoice-card" onclick={onclick} use:ripple>
103
104
  <div class="card-header">
104
105
  <span class="invoice-number">{invoice.invoiceNumber}</span>
@@ -1 +1 @@
1
- {"version":3,"file":"InvoiceCard.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/InvoiceCard.svelte.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,aAAa,CAAC;AAG9D,sCAAsC;AACtC,MAAM,WAAW,KAAK;IACpB,mBAAmB;IACnB,OAAO,EAAE,WAAW,CAAC;IACrB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACzB,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAmHD,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"InvoiceCard.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/InvoiceCard.svelte.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,aAAa,CAAC;AAG9D,sCAAsC;AACtC,MAAM,WAAW,KAAK;IACpB,mBAAmB;IACnB,OAAO,EAAE,WAAW,CAAC;IACrB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACzB,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAoHD,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
@@ -7,6 +7,7 @@
7
7
  */
8
8
 
9
9
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
10
+ import { Button } from '@happyvertical/smrt-ui/ui';
10
11
  import type { Snippet } from 'svelte';
11
12
  import { M } from '../i18n.js';
12
13
  import type { LineItem } from '../types.js';
@@ -70,9 +71,9 @@ const total = $derived(items.reduce((sum, item) => sum + item.amount, 0));
70
71
  <div class="empty-state">
71
72
  <p>{emptyMessage}</p>
72
73
  {#if editable && onadd}
73
- <button type="button" class="add-btn" onclick={onadd}>
74
+ <Button variant="ghost" class="add-btn" onclick={onadd}>
74
75
  {t(M['commerce.invoice_line_items.add_item'])}
75
- </button>
76
+ </Button>
76
77
  {/if}
77
78
  </div>
78
79
  {:else}
@@ -112,8 +113,8 @@ const total = $derived(items.reduce((sum, item) => sum + item.amount, 0));
112
113
  <td class="col-amount">{formatMoney(item.amount)}</td>
113
114
  {#if editable}
114
115
  <td class="col-actions">
115
- <button
116
- type="button"
116
+ <Button
117
+ variant="ghost"
117
118
  class="action-btn delete"
118
119
  title={t(M['commerce.invoice_line_items.remove_item'])}
119
120
  onclick={() => ondelete?.(item.id)}
@@ -121,7 +122,7 @@ const total = $derived(items.reduce((sum, item) => sum + item.amount, 0));
121
122
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2">
122
123
  <path d="M4 4l8 8M4 12l8-8" />
123
124
  </svg>
124
- </button>
125
+ </Button>
125
126
  </td>
126
127
  {/if}
127
128
  </tr>
@@ -139,12 +140,12 @@ const total = $derived(items.reduce((sum, item) => sum + item.amount, 0));
139
140
  </table>
140
141
 
141
142
  {#if editable && onadd}
142
- <button type="button" class="add-btn add-btn-below" onclick={onadd}>
143
+ <Button variant="ghost" class="add-btn add-btn-below" onclick={onadd}>
143
144
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2">
144
145
  <path d="M8 3v10M3 8h10" />
145
146
  </svg>
146
147
  {t(M['commerce.invoice_line_items.add_item'])}
147
- </button>
148
+ </Button>
148
149
  {/if}
149
150
  {/if}
150
151
  </div>
@@ -262,7 +263,15 @@ const total = $derived(items.reduce((sum, item) => sum + item.amount, 0));
262
263
  color: var(--smrt-color-on-surface, #1c1b1f);
263
264
  }
264
265
 
265
- .action-btn {
266
+ /*
267
+ * These rules style the <button> rendered *inside* the smrt-ui <Button>
268
+ * child component (issue #1589). A plain scoped `.action-btn {}` rule would
269
+ * not reach it (no parent scope hash), so each is written as
270
+ * `.line-items-container :global(.class)` — Svelte compiles the ancestor to
271
+ * `.line-items-container.svelte-HASH .class`, which pierces into the child.
272
+ * Overrides cover sizing/shape/color; the ghost variant owns the base.
273
+ */
274
+ .line-items-container :global(.action-btn) {
266
275
  display: inline-flex;
267
276
  align-items: center;
268
277
  justify-content: center;
@@ -271,28 +280,27 @@ const total = $derived(items.reduce((sum, item) => sum + item.amount, 0));
271
280
  background: transparent;
272
281
  border: none;
273
282
  border-radius: var(--smrt-radius-extra-small, 0.25rem);
274
- cursor: pointer;
275
283
  color: var(--smrt-color-on-surface-variant, #49454f);
276
284
  transition: all var(--smrt-duration-fast, 150ms) var(--smrt-easing-standard, cubic-bezier(0.2, 0, 0, 1));
277
285
  }
278
286
 
279
287
  @media (prefers-reduced-motion: reduce) {
280
- .action-btn {
288
+ .line-items-container :global(.action-btn) {
281
289
  transition: none;
282
290
  }
283
291
  }
284
292
 
285
- .action-btn:hover {
293
+ .line-items-container :global(.action-btn:hover) {
286
294
  background: var(--smrt-color-surface-variant, #e7e0ec);
287
295
  color: var(--smrt-color-on-surface, #1c1b1f);
288
296
  }
289
297
 
290
- .action-btn.delete:hover {
298
+ .line-items-container :global(.action-btn.delete:hover) {
291
299
  background: var(--smrt-color-error-container, #ffdad6);
292
300
  color: var(--smrt-color-error, #ba1a1a);
293
301
  }
294
302
 
295
- .add-btn {
303
+ .line-items-container :global(.add-btn) {
296
304
  display: inline-flex;
297
305
  align-items: center;
298
306
  gap: var(--smrt-spacing-2, 0.5rem);
@@ -303,21 +311,20 @@ const total = $derived(items.reduce((sum, item) => sum + item.amount, 0));
303
311
  background: transparent;
304
312
  border: 1px dashed var(--smrt-color-primary, #005ac1);
305
313
  border-radius: var(--smrt-radius-small, 0.375rem);
306
- cursor: pointer;
307
314
  transition: all var(--smrt-duration-fast, 150ms) var(--smrt-easing-standard, cubic-bezier(0.2, 0, 0, 1));
308
315
  }
309
316
 
310
317
  @media (prefers-reduced-motion: reduce) {
311
- .add-btn {
318
+ .line-items-container :global(.add-btn) {
312
319
  transition: none;
313
320
  }
314
321
  }
315
322
 
316
- .add-btn:hover {
323
+ .line-items-container :global(.add-btn:hover) {
317
324
  background: var(--smrt-color-primary-container, #d3e3fd);
318
325
  }
319
326
 
320
- .add-btn-below {
327
+ .line-items-container :global(.add-btn-below) {
321
328
  margin-top: var(--smrt-spacing-3, 0.75rem);
322
329
  }
323
330
  </style>
@@ -1 +1 @@
1
- {"version":3,"file":"InvoiceLineItems.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/InvoiceLineItems.svelte.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,2CAA2C;AAC3C,MAAM,WAAW,KAAK;IACpB,4BAA4B;IAC5B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACzB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IACzD,kCAAkC;IAClC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA+HD,QAAA,MAAM,gBAAgB,2CAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"InvoiceLineItems.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/InvoiceLineItems.svelte.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,2CAA2C;AAC3C,MAAM,WAAW,KAAK;IACpB,4BAA4B;IAC5B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACzB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IACzD,kCAAkC;IAClC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAgID,QAAA,MAAM,gBAAgB,2CAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
9
+ import { Button } from '@happyvertical/smrt-ui/ui';
9
10
  import { M } from '../i18n.js';
10
11
  import type { UnbilledItem } from '../types.js';
11
12
 
@@ -105,6 +106,7 @@ const someSelected = $derived(
105
106
  {:else}
106
107
  <div class="items-header">
107
108
  <label class="select-all">
109
+ <!-- raw-primitive-allow: tri-state select-all checkbox needs the indeterminate flag for the some-but-not-all state; neither CheckboxInput nor Toggle exposes indeterminate, and a use action cannot be applied to a component -->
108
110
  <input
109
111
  type="checkbox"
110
112
  checked={allSelected}
@@ -121,6 +123,7 @@ const someSelected = $derived(
121
123
  <div class="items-list">
122
124
  {#each items as item (item.id)}
123
125
  <label class="item-row" class:selected={selectedIds.has(item.id)}>
126
+ <!-- raw-primitive-allow: native checkbox kept for visual + behavioral consistency with the indeterminate select-all checkbox above (which must stay native); the only checkbox primitive, CheckboxInput, also requires a smrt-svelte Provider in context, which this standalone presentational component does not assume -->
124
127
  <input
125
128
  type="checkbox"
126
129
  checked={selectedIds.has(item.id)}
@@ -150,13 +153,12 @@ const someSelected = $derived(
150
153
  <span class="summary-value">{formatMoney(selectedTotal)}</span>
151
154
  </div>
152
155
  {#if oncreate}
153
- <button
154
- type="button"
155
- class="create-btn"
156
+ <Button
157
+ variant="primary"
156
158
  onclick={() => oncreate?.([...selectedIds])}
157
159
  >
158
160
  {t(M['commerce.unbilled_items.create_invoice'])}
159
- </button>
161
+ </Button>
160
162
  {/if}
161
163
  </div>
162
164
  {/if}
@@ -329,28 +331,4 @@ const someSelected = $derived(
329
331
  font-weight: var(--smrt-typography-weight-semibold, 600);
330
332
  color: var(--smrt-color-on-surface, #1c1b1f);
331
333
  }
332
-
333
- .create-btn {
334
- display: inline-flex;
335
- align-items: center;
336
- padding: var(--smrt-spacing-2, 0.5rem) var(--smrt-spacing-4, 1rem);
337
- font: var(--smrt-typography-label-large-font);
338
- font-weight: var(--smrt-typography-weight-medium, 500);
339
- color: var(--smrt-color-on-primary, #ffffff);
340
- background: var(--smrt-color-primary, #005ac1);
341
- border: none;
342
- border-radius: var(--smrt-radius-small, 0.375rem);
343
- cursor: pointer;
344
- transition: background var(--smrt-duration-fast, 150ms) var(--smrt-easing-standard, cubic-bezier(0.2, 0, 0, 1));
345
- }
346
-
347
- @media (prefers-reduced-motion: reduce) {
348
- .create-btn {
349
- transition: none;
350
- }
351
- }
352
-
353
- .create-btn:hover {
354
- background: color-mix(in srgb, var(--smrt-color-primary, #005ac1) 85%, var(--smrt-color-shadow, #000));
355
- }
356
334
  </style>
@@ -1 +1 @@
1
- {"version":3,"file":"UnbilledItems.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/UnbilledItems.svelte.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,wCAAwC;AACxC,MAAM,WAAW,KAAK;IACpB,qBAAqB;IACrB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACzB,oCAAoC;IACpC,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpD,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC3C,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA4ID,QAAA,MAAM,aAAa,gDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"UnbilledItems.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/UnbilledItems.svelte.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,wCAAwC;AACxC,MAAM,WAAW,KAAK;IACpB,qBAAqB;IACrB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACzB,oCAAoC;IACpC,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpD,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC3C,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA+ID,QAAA,MAAM,aAAa,gDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-commerce",
3
- "version": "0.34.5",
3
+ "version": "0.34.6",
4
4
  "description": "Commerce models for the SMRT framework - contracts, fulfillments, payments",
5
5
  "type": "module",
6
+ "smrtRawPrimitives": "strict",
6
7
  "main": "./dist/index.js",
7
8
  "types": "./dist/index.d.ts",
8
9
  "exports": {
@@ -48,11 +49,11 @@
48
49
  "access": "public"
49
50
  },
50
51
  "dependencies": {
51
- "@happyvertical/smrt-core": "0.34.5",
52
- "@happyvertical/smrt-ledgers": "0.34.5",
53
- "@happyvertical/smrt-tenancy": "0.34.5",
54
- "@happyvertical/smrt-types": "0.34.5",
55
- "@happyvertical/smrt-ui": "0.34.5"
52
+ "@happyvertical/smrt-core": "0.34.6",
53
+ "@happyvertical/smrt-ledgers": "0.34.6",
54
+ "@happyvertical/smrt-tenancy": "0.34.6",
55
+ "@happyvertical/smrt-types": "0.34.6",
56
+ "@happyvertical/smrt-ui": "0.34.6"
56
57
  },
57
58
  "peerDependencies": {
58
59
  "svelte": "^5.18.0"
@@ -72,7 +73,7 @@
72
73
  "typescript": "^5.9.3",
73
74
  "vite": "^7.3.1",
74
75
  "vitest": "^4.0.17",
75
- "@happyvertical/smrt-vitest": "0.34.5"
76
+ "@happyvertical/smrt-vitest": "0.34.6"
76
77
  },
77
78
  "scripts": {
78
79
  "build": "vite build --mode library && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json",