@duro-app/ui 0.34.0 → 0.34.1

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.0",
3
+ "version": "0.34.1",
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.0"
56
+ "@duro-app/tokens": "^0.34.1"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/preset-typescript": "^7.28.0",
@@ -184,7 +184,17 @@ export function Root({
184
184
  role="table"
185
185
  style={[
186
186
  styles.root,
187
- template ? styles.gridColumns(template) : undefined,
187
+ // When responsive, use gridColumnsResponsive so the explicit column
188
+ // template and the stack-mode @container override live in one StyleX
189
+ // style object. Splitting them across two styles (gridColumns +
190
+ // rootResponsive) causes StyleX conflict resolution to drop the
191
+ // column template because rootResponsive's gridTemplateColumns key
192
+ // always wins as the later entry in the array.
193
+ template
194
+ ? responsive
195
+ ? styles.gridColumnsResponsive(template)
196
+ : styles.gridColumns(template)
197
+ : undefined,
188
198
  responsive && styles.rootResponsive,
189
199
  ]}
190
200
  >
@@ -60,13 +60,13 @@ export const styles = css.create({
60
60
  },
61
61
 
62
62
  // Stack-mode override: the Root's grid collapses to a single column so
63
- // each Row spans full width and stacks vertically. Applied AFTER the
64
- // dynamic gridColumns(template) so this rule wins inside the @container.
63
+ // each Row spans full width and stacks vertically.
64
+ // NOTE: gridTemplateColumns is intentionally absent here. It is handled by
65
+ // gridColumnsResponsive() so that StyleX conflict resolution does not remove
66
+ // the explicit column template (a later style with the same property key
67
+ // always wins, so combining gridColumns + rootResponsive in one array would
68
+ // silently drop the column template).
65
69
  rootResponsive: {
66
- gridTemplateColumns: {
67
- default: null,
68
- [`@container (max-width: ${STACK_BP})`]: '1fr',
69
- },
70
70
  // The card-list look needs the outer border to disappear in stack
71
71
  // mode — each row paints its own border.
72
72
  borderWidth: {
@@ -298,8 +298,21 @@ export const styles = css.create({
298
298
  alignSelf: 'flex-start',
299
299
  },
300
300
 
301
- // Dynamic: grid columns applied on Root
301
+ // Dynamic: grid columns applied on Root (non-responsive path only).
302
302
  gridColumns: (template: string) => ({
303
303
  gridTemplateColumns: template,
304
304
  }),
305
+
306
+ // Dynamic: grid columns + stack-mode collapse in one style.
307
+ // Used instead of gridColumns() when responsive=true so that both the
308
+ // explicit column template and the @container override live in the same
309
+ // StyleX style object. If they were in separate styles (gridColumns +
310
+ // rootResponsive), StyleX conflict resolution would keep only the LAST
311
+ // style's gridTemplateColumns class and silently discard the earlier one.
312
+ gridColumnsResponsive: (template: string) => ({
313
+ gridTemplateColumns: {
314
+ default: template,
315
+ [`@container (max-width: ${STACK_BP})`]: '1fr',
316
+ },
317
+ }),
305
318
  })