@humanforest/ui 0.3.3 → 0.3.5

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": "@humanforest/ui",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",
@@ -9,7 +9,7 @@
9
9
  "preset.gen.js"
10
10
  ],
11
11
  "dependencies": {
12
- "@humanforest/tokens": "^0.3.3",
12
+ "@humanforest/tokens": "^0.3.5",
13
13
  "@internationalized/date": "^3.12.2",
14
14
  "@mapbox/search-js-core": "^1.6.0",
15
15
  "@turf/boolean-point-in-polygon": "^7.4.0",
package/preset.gen.js CHANGED
@@ -1017,7 +1017,8 @@ var progressGroupTheme = {
1017
1017
  var proseTheme = {
1018
1018
  codePreview: {
1019
1019
  slots: {
1020
- preview: "ed-demo"
1020
+ preview: "ed-demo",
1021
+ code: "[&>div]:rounded-t-none [&>div>div>pre]:rounded-t-none"
1021
1022
  }
1022
1023
  },
1023
1024
  codeCollapse: {
@@ -119,8 +119,8 @@ const props = withDefaults(
119
119
  flush?: boolean;
120
120
  /**
121
121
  * The card fills the height its row gives it instead of hugging its content, so cards in a row
122
- * end level. Only for content that can take the extra height: an FKpi whose bleed chart is a
123
- * `fill` sparkline grows into it. A bar, a table or a line of text cannot, and the spare height
122
+ * end level. Only for content that can take the extra height: an FKpi whose chart is a
123
+ * `fill` sparkline grows into it. A fixed-height chart, a table or a line of text cannot, and the spare height
124
124
  * lands as a gap under it.
125
125
  */
126
126
  stretch?: boolean;
@@ -22,8 +22,8 @@ export const kpiTheme = tv({
22
22
  // bleed pulls by the same expression, so the graphic meets the edge the padding leaves.
23
23
  //
24
24
  // No row template: the rows are implicit, one per part present, so a tile without a visual has
25
- // no empty track under its caption, and no gap in front of one. A bleed visual adds a flexible
26
- // last row (`visualFit`); a grouped tile takes its rows from the group instead (`aligned`).
25
+ // no empty track under its caption, and no gap in front of one. A visual adds a flexible last
26
+ // row (`visualFit`); a grouped tile takes its rows from the group instead (`aligned`).
27
27
  //
28
28
  // One explicit minmax(0,1fr) column: without it the implicit column sizes to max-content, and a
29
29
  // chart with an intrinsic width (Unovis defaults to 300px) makes the tile's own grid wider than
@@ -78,22 +78,22 @@ export const kpiTheme = tv({
78
78
  * carry only the first — which left every other visual undoing it with utilities at the call
79
79
  * site.
80
80
  *
81
- * `bleed` (the default) is for a graphic that IS data and nothing else, a sparkline being the
82
- * case: it runs through the tile's gutter to both side edges and sits on the bottom edge, which
81
+ * `bleed` (the default) is for a graphic that IS data and nothing else, a line or area sparkline
82
+ * being the case: it runs through the tile's gutter to both side edges and sits on the bottom edge, which
83
83
  * the tile reaches by zeroing its own bottom padding rather than by a negative margin — a
84
84
  * margin would shrink the grid row and pull the graphic up over the caption. Its row is the
85
85
  * tile's last and flexible one, and the graphic spans it bottom-aligned: a tile given more
86
86
  * height than it needs — a group's shared row, a stretched FInsetCard — grows a `fill`
87
87
  * sparkline into the spare height and leaves any other graphic on the bottom edge.
88
88
  *
89
- * `inset` is for a graphic carrying text, FDistributionBar's legend being the case. Text set
90
- * against the card's edge reads as a mistake, so the padding stays. It also top-aligns, and
91
- * packs the tile's rows to the top with `content-start`, so a tile stretched taller than its
92
- * content keeps the extra height below the graphic rather than spread between its rows.
89
+ * `inset` is for bars, and for a graphic carrying text, FDistributionBar's legend being the
90
+ * case. Text set against the card's edge reads as a mistake, so the padding stays. It shares
91
+ * bleed's last, flexible row, with the graphic at the top of it: spare height lands below a
92
+ * graphic that cannot grow, and a `fill` sparkline grows into it.
93
93
  */
94
94
  visualFit: {
95
95
  bleed: { root: 'pb-0 grid-rows-[auto_auto_auto_1fr]', visual: 'self-stretch flex flex-col justify-end -mx-[var(--forest-kpi-pad,var(--forest-card-pad))]' },
96
- inset: { root: 'content-start', visual: 'self-start' },
96
+ inset: { root: 'grid-rows-[auto_auto_auto_1fr]', visual: 'self-stretch flex flex-col justify-start' },
97
97
  },
98
98
  // A grouped tile spans exactly the rows its group declares (kpiGroupRows), so a group with no
99
99
  // visual has no empty last track and no group gap under its captions.
@@ -26,6 +26,10 @@ export const proseTheme = {
26
26
  codePreview: {
27
27
  slots: {
28
28
  preview: 'ed-demo',
29
+ // Stock squares `code > div > pre`, the top of a bare block joined under the pane. A collapsed
30
+ // block wraps that <pre> one level deeper, so the wrapper and the <pre> both kept 12px top
31
+ // corners and notched the joint at each end.
32
+ code: '[&>div]:rounded-t-none [&>div>div>pre]:rounded-t-none',
29
33
  },
30
34
  },
31
35