@duro-app/ui 0.34.1 → 0.34.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@duro-app/ui",
3
- "version": "0.34.1",
3
+ "version": "0.34.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -53,7 +53,7 @@
53
53
  }
54
54
  },
55
55
  "dependencies": {
56
- "@duro-app/tokens": "^0.34.1"
56
+ "@duro-app/tokens": "^0.34.3"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/preset-typescript": "^7.28.0",
@@ -121,7 +121,14 @@ function extractColumnMeta(children: ReactNode): {template: string; labels: stri
121
121
  (unwrappedType as {name?: string} | null)?.name ||
122
122
  ''
123
123
  if (unwrappedType === HeaderCell || displayName === 'HeaderCell') {
124
- widths.push(props.width || '1fr')
124
+ // Default to minmax(0, 1fr) instead of plain '1fr' so each column
125
+ // can shrink below its content's min-content size. A plain '1fr'
126
+ // track has an implicit min of `auto` (= min-content), which makes
127
+ // the column refuse to shrink and the whole table overflow when a
128
+ // cell's text is wider than 1/N of the container. With minmax(0,
129
+ // 1fr), the cell's compact-mode `min-width: 0` + `overflow:
130
+ // hidden` + `text-overflow: ellipsis` can actually truncate.
131
+ widths.push(props.width || 'minmax(0, 1fr)')
125
132
  const explicit = typeof props.label === 'string' ? props.label : undefined
126
133
  const fallback = extractText(props.children).trim()
127
134
  const label = explicit ?? fallback
@@ -48,10 +48,14 @@ export const styles = css.create({
48
48
  textAlign: 'end',
49
49
  },
50
50
 
51
- // Truncate
51
+ // Truncate. minWidth: 0 lets a truncating Text actually shrink inside a
52
+ // flex/grid container — without it, the default `min-width: auto` would
53
+ // keep the element at its content width, so text-overflow: ellipsis would
54
+ // never trigger and the text would just overflow the parent instead.
52
55
  truncate: {
53
56
  overflow: 'hidden',
54
57
  textOverflow: 'ellipsis',
55
58
  whiteSpace: 'nowrap',
59
+ minWidth: 0,
56
60
  },
57
61
  })