minka-ds 0.3.4 → 0.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minka-ds",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "Minka product design system — tokenized component library",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -55,7 +55,7 @@ interface AmountCellProps {
55
55
  }
56
56
 
57
57
  function AmountCell({ children, className }: AmountCellProps) {
58
- const base = cn("text-body-sm text-[var(--color-text-default)] tabular-nums", className)
58
+ const base = cn("text-body-sm text-[var(--color-text-default)]", className)
59
59
 
60
60
  // PP Neue Montreal's $ glyph has a wide right sidebearing that creates a
61
61
  // visible gap before digits. Split it into its own box with a negative
@@ -36,6 +36,7 @@ export interface StatCardAmountProps extends StatCardBase {
36
36
  percent?: number
37
37
  color?: StatCardColor
38
38
  secondary?: string
39
+ subvalue?: string
39
40
  badge?: string
40
41
  actions?: StatCardAction[]
41
42
  onClick?: () => void
@@ -112,7 +113,7 @@ function StatCard(props: StatCardProps) {
112
113
 
113
114
  // Amount
114
115
  if (props.type === "amount") {
115
- const { label, value, unit, percent, color = "default", secondary, badge, actions, onClick, className } = props
116
+ const { label, value, unit, percent, color = "default", secondary, subvalue, badge, actions, onClick, className } = props
116
117
  const Comp = onClick ? "button" : "div"
117
118
  return (
118
119
  <Comp
@@ -138,7 +139,7 @@ function StatCard(props: StatCardProps) {
138
139
  <span className="text-heading-1-serif text-[var(--color-text-disabled)]">—</span>
139
140
  ) : (
140
141
  <>
141
- <span className={cn("text-heading-2-serif tabular-nums tracking-tight", VALUE_COLOR[color])}>
142
+ <span className={cn("text-heading-2-serif tracking-tight", VALUE_COLOR[color])}>
142
143
  {value}
143
144
  </span>
144
145
  {unit && <span className="text-caption text-[var(--color-text-muted)]">{unit}</span>}
@@ -155,6 +156,7 @@ function StatCard(props: StatCardProps) {
155
156
  </div>
156
157
  )}
157
158
  </div>
159
+ {subvalue && <span className="text-caption text-[var(--color-text-muted)]">{subvalue}</span>}
158
160
  </Comp>
159
161
  )
160
162
  }