@spree/dashboard-ui 1.0.0-beta.2 → 1.0.0-beta.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spree/dashboard-ui",
3
3
  "license": "MIT",
4
- "version": "1.0.0-beta.2",
4
+ "version": "1.0.0-beta.3",
5
5
  "description": "Spree Dashboard design system — shadcn primitives, headless composed components, and design tokens. Source-only package; consumers compile via their own Vite/Tailwind setup. Developer Preview.",
6
6
  "author": "Vendo Connect Inc.",
7
7
  "homepage": "https://spreecommerce.org",
@@ -1,3 +1,4 @@
1
+ import type { ReactNode } from 'react'
1
2
  import { Thumbnail } from '../ui/thumbnail'
2
3
  import { PackageIcon } from './icons'
3
4
 
@@ -5,6 +6,9 @@ import { PackageIcon } from './icons'
5
6
  * One row of a fulfillment's item list, already joined to its line item by
6
7
  * the caller. The image and the price are optional: a surface that does not
7
8
  * expose them renders the name and the count alone.
9
+ *
10
+ * `priceSource` is a node because saying where a price came from means
11
+ * linking to it, and routing belongs to the app.
8
12
  */
9
13
  export type FulfillmentItemRowData = {
10
14
  key: string
@@ -12,6 +16,7 @@ export type FulfillmentItemRowData = {
12
16
  optionsText?: string | null
13
17
  thumbnailUrl?: string | null
14
18
  displayPrice?: string | null
19
+ priceSource?: ReactNode
15
20
  quantity: number
16
21
  }
17
22
 
@@ -35,14 +40,15 @@ function ItemRow({ row }: { row: FulfillmentItemRowData }) {
35
40
  )}
36
41
  </div>
37
42
 
38
- <div className="shrink-0 whitespace-nowrap text-right text-muted-foreground text-sm">
43
+ <div className="min-w-0 shrink text-right text-muted-foreground text-sm">
39
44
  {row.displayPrice ? (
40
- <span>
45
+ <span className="whitespace-nowrap">
41
46
  {row.displayPrice} × {row.quantity}
42
47
  </span>
43
48
  ) : (
44
- <span>× {row.quantity}</span>
49
+ <span className="whitespace-nowrap">× {row.quantity}</span>
45
50
  )}
51
+ {row.priceSource && <div className="truncate text-xs">{row.priceSource}</div>}
46
52
  </div>
47
53
  </div>
48
54
  )