@cahyo-dimas/freeday 1.34.0 → 1.35.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,21 @@
3
3
  Semua perubahan penting dicatat di sini. Format longgar mengikuti
4
4
  [Keep a Changelog](https://keepachangelog.com/); tiap versi = git tag.
5
5
 
6
+ ## [1.35.0] — 2026-08-19
7
+ One note from the back-office app (IDU_EMATE_APPL_WEB, #012).
8
+ ### Added
9
+ - **`.fdy-table--sticky` + `.fdy-table-scroll--frozen`** — a table frozen on one axis or both, for
10
+ a grid read against two axes at once (a rate matrix, a timetable). This is a kit class rather
11
+ than four lines in an app because `position:sticky` on its own produces a **visibly broken**
12
+ table: `.fdy-table` collapses its borders, a collapsed border is painted by the table rather than
13
+ by either cell, and so a frozen cell scrolls out from under its own rule — the frozen column
14
+ arrives with nothing separating it from the data. The modifier separates the borders and puts
15
+ each one back on the cell that sticks. `<thead>` freezes at the top, `<th scope="row">` at the
16
+ left, the first header cell is the corner, and the row header paints the **body** surface so a
17
+ hovered row stays one band across the freeze line. `.fdy-table-scroll--frozen` is the scrollport
18
+ the freeze resolves against (the base `.fdy-table-scroll` scrolls one axis, so `top:0` never
19
+ engages); size it with `--fdy-table-frozen-h`, default `30rem`.
20
+
6
21
  ## [1.34.0] — 2026-08-19
7
22
  One note from the back-office app (IDU_EMATE_APPL_WEB, #008), and the second half of #005 it
8
23
  finally makes answerable.
package/COMPONENTS.md CHANGED
@@ -687,6 +687,26 @@ Semantic static table. Wrap in `.fdy-table-wrap` (bordered surface) or `.fdy-tab
687
687
  </div>
688
688
  ```
689
689
 
690
+ **Frozen axes — `.fdy-table--sticky`.** For a grid read against two axes at once (a rate
691
+ matrix, a timetable). Put `.fdy-table-scroll--frozen` on the wrapper — it scrolls both ways
692
+ and is the scrollport the frozen cells stick to — and size it with `--fdy-table-frozen-h`
693
+ (default `30rem`). `<thead>` freezes at the top, `<th scope="row">` freezes at the left, and
694
+ the first header cell is the corner. Do not reach for `position:sticky` directly: the base
695
+ table collapses its borders, and a collapsed border belongs to the table rather than the
696
+ cell, so it scrolls out from under whatever you froze.
697
+
698
+ ```html
699
+ <div class="fdy-table-scroll fdy-table-scroll--frozen" style="--fdy-table-frozen-h:26rem">
700
+ <table class="fdy-table fdy-table--sticky">
701
+ <caption class="fdy-visually-hidden">Exchange rates, August 2026</caption>
702
+ <thead><tr><th scope="col">Date</th><th scope="col" class="fdy-table__num">USD</th></tr></thead>
703
+ <tbody>
704
+ <tr><th scope="row">1 Aug</th><td class="fdy-table__num">16,240</td></tr>
705
+ </tbody>
706
+ </table>
707
+ </div>
708
+ ```
709
+
690
710
  ## Data table — `.fdy-datatable`
691
711
  > **Typed wrapper: `<FdyTable>`** — controlled: `columns` + `rows`, with sort/filter/page events (`update:pageIndex` · `onPageIndexChange` · `PageIndexChanged`) and `process` for driving a card list off the same processed set. The markup below is the raw enhancer path.
692
712
 
@@ -1657,6 +1657,30 @@ fieldset.fdy-field>legend{padding:0;float:none;margin-bottom:var(--space-2);}
1657
1657
  .fdy-table__selcol{width:1px;white-space:nowrap;}
1658
1658
  .fdy-table tbody tr[aria-selected="true"],.fdy-table tbody tr[aria-selected="true"]:hover{background:var(--color-primary-soft);}
1659
1659
 
1660
+ /* Frozen header row and/or first column — a rate matrix, a timetable, any grid read
1661
+ against two axes at once.
1662
+
1663
+ This modifier exists because `position:sticky` alone is NOT enough. With
1664
+ `border-collapse:collapse` the shared border belongs to the TABLE, not to either
1665
+ cell, so a frozen cell scrolls out from under its own rule and the frozen column
1666
+ loses the line that separates it from the data. Separate borders put each border
1667
+ back on the cell that sticks. */
1668
+ .fdy-table--sticky{border-collapse:separate;border-spacing:0;}
1669
+ .fdy-table--sticky th,.fdy-table--sticky td{border-bottom:var(--bw) solid var(--color-border-muted);}
1670
+ .fdy-table--sticky thead th{position:sticky;top:0;z-index:2;border-bottom:var(--bw) solid var(--color-border);}
1671
+ /* The row header freezes sideways over the data cells, so it needs an opaque
1672
+ background of its own — and it takes the BODY surface, not the header one, so a
1673
+ hovered row stays one continuous band across the freeze line. Losing that is
1674
+ losing the only way to track a row across a wide grid. */
1675
+ .fdy-table--sticky tbody th{position:sticky;left:0;z-index:1;background:var(--color-surface);border-right:var(--bw) solid var(--color-border);}
1676
+ .fdy-table--sticky tbody tr:hover th{background:var(--color-surface-2);}
1677
+ /* The corner cell is frozen on both axes, so it has to outrank both. */
1678
+ .fdy-table--sticky thead th:first-child{left:0;z-index:3;border-right:var(--bw) solid var(--color-border);}
1679
+
1680
+ /* The scrollport a sticky cell sticks to. Both axes scroll here, and the height is a
1681
+ custom property so a page can size it without out-specifying this rule. */
1682
+ .fdy-table-scroll--frozen{position:relative;overflow:auto;max-height:var(--fdy-table-frozen-h,30rem);}
1683
+
1660
1684
  /* Data-table shell (toolbar + scroll + footer stay put while the table scrolls) */
1661
1685
  .fdy-datatable{border:var(--bw) solid var(--color-border);border-radius:var(--radius-lg);box-shadow:var(--shadow-1);background:var(--color-surface);overflow:hidden;}
1662
1686
  .fdy-table-scroll{position:relative;overflow-x:auto;}
package/dist/freeday.css CHANGED
@@ -1274,6 +1274,30 @@ fieldset.fdy-field>legend{padding:0;float:none;margin-bottom:var(--space-2);}
1274
1274
  .fdy-table__selcol{width:1px;white-space:nowrap;}
1275
1275
  .fdy-table tbody tr[aria-selected="true"],.fdy-table tbody tr[aria-selected="true"]:hover{background:var(--color-primary-soft);}
1276
1276
 
1277
+ /* Frozen header row and/or first column — a rate matrix, a timetable, any grid read
1278
+ against two axes at once.
1279
+
1280
+ This modifier exists because `position:sticky` alone is NOT enough. With
1281
+ `border-collapse:collapse` the shared border belongs to the TABLE, not to either
1282
+ cell, so a frozen cell scrolls out from under its own rule and the frozen column
1283
+ loses the line that separates it from the data. Separate borders put each border
1284
+ back on the cell that sticks. */
1285
+ .fdy-table--sticky{border-collapse:separate;border-spacing:0;}
1286
+ .fdy-table--sticky th,.fdy-table--sticky td{border-bottom:var(--bw) solid var(--color-border-muted);}
1287
+ .fdy-table--sticky thead th{position:sticky;top:0;z-index:2;border-bottom:var(--bw) solid var(--color-border);}
1288
+ /* The row header freezes sideways over the data cells, so it needs an opaque
1289
+ background of its own — and it takes the BODY surface, not the header one, so a
1290
+ hovered row stays one continuous band across the freeze line. Losing that is
1291
+ losing the only way to track a row across a wide grid. */
1292
+ .fdy-table--sticky tbody th{position:sticky;left:0;z-index:1;background:var(--color-surface);border-right:var(--bw) solid var(--color-border);}
1293
+ .fdy-table--sticky tbody tr:hover th{background:var(--color-surface-2);}
1294
+ /* The corner cell is frozen on both axes, so it has to outrank both. */
1295
+ .fdy-table--sticky thead th:first-child{left:0;z-index:3;border-right:var(--bw) solid var(--color-border);}
1296
+
1297
+ /* The scrollport a sticky cell sticks to. Both axes scroll here, and the height is a
1298
+ custom property so a page can size it without out-specifying this rule. */
1299
+ .fdy-table-scroll--frozen{position:relative;overflow:auto;max-height:var(--fdy-table-frozen-h,30rem);}
1300
+
1277
1301
  /* Data-table shell (toolbar + scroll + footer stay put while the table scrolls) */
1278
1302
  .fdy-datatable{border:var(--bw) solid var(--color-border);border-radius:var(--radius-lg);box-shadow:var(--shadow-1);background:var(--color-surface);overflow:hidden;}
1279
1303
  .fdy-table-scroll{position:relative;overflow-x:auto;}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cahyo-dimas/freeday",
3
- "version": "1.34.0",
3
+ "version": "1.35.0",
4
4
  "description": "Freeday — token-driven, framework-agnostic UI KIT (design source-of-truth).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -37,6 +37,30 @@
37
37
  .fdy-table__selcol{width:1px;white-space:nowrap;}
38
38
  .fdy-table tbody tr[aria-selected="true"],.fdy-table tbody tr[aria-selected="true"]:hover{background:var(--color-primary-soft);}
39
39
 
40
+ /* Frozen header row and/or first column — a rate matrix, a timetable, any grid read
41
+ against two axes at once.
42
+
43
+ This modifier exists because `position:sticky` alone is NOT enough. With
44
+ `border-collapse:collapse` the shared border belongs to the TABLE, not to either
45
+ cell, so a frozen cell scrolls out from under its own rule and the frozen column
46
+ loses the line that separates it from the data. Separate borders put each border
47
+ back on the cell that sticks. */
48
+ .fdy-table--sticky{border-collapse:separate;border-spacing:0;}
49
+ .fdy-table--sticky th,.fdy-table--sticky td{border-bottom:var(--bw) solid var(--color-border-muted);}
50
+ .fdy-table--sticky thead th{position:sticky;top:0;z-index:2;border-bottom:var(--bw) solid var(--color-border);}
51
+ /* The row header freezes sideways over the data cells, so it needs an opaque
52
+ background of its own — and it takes the BODY surface, not the header one, so a
53
+ hovered row stays one continuous band across the freeze line. Losing that is
54
+ losing the only way to track a row across a wide grid. */
55
+ .fdy-table--sticky tbody th{position:sticky;left:0;z-index:1;background:var(--color-surface);border-right:var(--bw) solid var(--color-border);}
56
+ .fdy-table--sticky tbody tr:hover th{background:var(--color-surface-2);}
57
+ /* The corner cell is frozen on both axes, so it has to outrank both. */
58
+ .fdy-table--sticky thead th:first-child{left:0;z-index:3;border-right:var(--bw) solid var(--color-border);}
59
+
60
+ /* The scrollport a sticky cell sticks to. Both axes scroll here, and the height is a
61
+ custom property so a page can size it without out-specifying this rule. */
62
+ .fdy-table-scroll--frozen{position:relative;overflow:auto;max-height:var(--fdy-table-frozen-h,30rem);}
63
+
40
64
  /* Data-table shell (toolbar + scroll + footer stay put while the table scrolls) */
41
65
  .fdy-datatable{border:var(--bw) solid var(--color-border);border-radius:var(--radius-lg);box-shadow:var(--shadow-1);background:var(--color-surface);overflow:hidden;}
42
66
  .fdy-table-scroll{position:relative;overflow-x:auto;}