@pretable/ui 0.7.0 → 0.9.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.
Files changed (2) hide show
  1. package/dist/grid.css +43 -0
  2. package/package.json +1 -1
package/dist/grid.css CHANGED
@@ -760,6 +760,49 @@
760
760
  cursor: pointer;
761
761
  opacity: 0;
762
762
  transition: opacity 0.1s ease;
763
+ /* Containing block for the ::after hit area below. */
764
+ position: relative;
765
+ }
766
+ /* WCAG 2.5.8 (Target Size, Minimum) asks for 24x24 CSS px. The funnel drew
767
+ an 18x18 tap target on every filterable column, so a phone got an 18px
768
+ target on every header.
769
+ The GLYPH stays 18x18 — the header is dense by design and a bigger icon
770
+ would change the look of every grid — and the missing 6px is bought with a
771
+ transparent ::after. A pseudo-element rather than padding + negative
772
+ margin: padding would grow the button's own border box, and the button is
773
+ the thing the hover background and the focus ring are drawn on, so an
774
+ 18px glyph would suddenly wear a 24px hover chip. Out-of-flow also means
775
+ the header box cannot change size — @pretable/ui's `readDensity` and the
776
+ surface's virtualisation geometry both measure header/row height in JS,
777
+ and a change there would desynchronise painted from measured layout.
778
+ `right: 0`, NOT centred: the funnel's right edge is flush against the 4px
779
+ resize strip (the slots are parked at left:-22 and left:-4 off the
780
+ column's trailing edge — see pretable-surface.tsx). The strip is not at
781
+ risk — it carries z-index: 2 inside the overlay anchor's stacking context,
782
+ so it hit-tests above the funnel either way, and a centred box measurably
783
+ steals none of it. What a centred box costs is the FUNNEL: 3 of its 24px
784
+ land under the strip where nothing can ever tap them, and the reachable
785
+ target measures 21px — still short of the 24 this rule exists to reach.
786
+ (iPhone 13, hit-test sweep: right:0 → 24 wide, left:-3px → 21 wide.)
787
+ Growing leftward spends all 6px on the header cell instead, which is a
788
+ sort target hundreds of px wide.
789
+ Height is a flat 24px, not 100%: the tightest shipped header is Excel's
790
+ compact tier at exactly 24px, so 24 fits every tier without spilling into
791
+ the first data row.
792
+ KNOWN GAP: with the drag-to-group panel on, @pretable/react also renders an
793
+ 18px column-menu button immediately left of the funnel, and it paints above
794
+ the funnel's hit area (later in tree order, same stacking context). The
795
+ funnel then measures 24 tall but only ~17 wide. Three controls in the 40px
796
+ the overlay anchor allots cannot each have 24; closing that one needs the
797
+ slot offsets in pretable-surface.tsx to move, not another CSS rule. */
798
+ :where([data-pretable-filter-funnel])::after {
799
+ content: "";
800
+ position: absolute;
801
+ top: 50%;
802
+ right: 0;
803
+ width: 24px;
804
+ height: 24px;
805
+ transform: translateY(-50%);
763
806
  }
764
807
  /* Reveal funnels on header-row hover, on funnel keyboard focus, or when a
765
808
  filter is active. The header row is a flat list of sibling header cells,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pretable/ui",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "CSS themes, tokens, and grid styles for Pretable.",
5
5
  "license": "MIT",
6
6
  "repository": {