@ceebee/ui 1.7.0 → 1.8.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/dist/client.js CHANGED
@@ -816,10 +816,14 @@ function ThemeBridge({
816
816
  if (event.target instanceof HTMLElement && event.target.id === SKIN_LINK_ID) refresh();
817
817
  };
818
818
  document.addEventListener("load", onSkinLoad, true);
819
+ const coarsePointer = window.matchMedia("(pointer: coarse)");
820
+ const onPointerChange = () => refresh();
821
+ coarsePointer.addEventListener("change", onPointerChange);
819
822
  return () => {
820
823
  rootObserver.disconnect();
821
824
  headObserver.disconnect();
822
825
  document.removeEventListener("load", onSkinLoad, true);
826
+ coarsePointer.removeEventListener("change", onPointerChange);
823
827
  };
824
828
  }, [refresh]);
825
829
  const mergedTheme = useMemo(() => ({
package/dist/styles.css CHANGED
@@ -38,9 +38,23 @@
38
38
  --cb-weight-medium: 500;
39
39
  --cb-weight-semibold: 600;
40
40
 
41
- --cb-control-height-sm: 2rem;
42
- --cb-control-height-md: 2.5rem;
43
- --cb-control-height-lg: 3rem;
41
+ /* The height a control must not go below for the pointer in use. A mouse points and can hit a
42
+ 32px target; a finger cannot, so a coarse pointer needs 44px — WCAG 2.5.5, Apple HIG, and
43
+ Material all land there. */
44
+ --cb-control-floor-fine: 2rem;
45
+ --cb-control-floor-coarse: 2.75rem;
46
+ --cb-control-floor: var(--cb-control-floor-fine);
47
+
48
+ /* The ladder's preferred heights. A density scale retunes these; the resolved heights below are
49
+ `max()` of the preferred step and the active floor, so no scale can shrink a control under the
50
+ target its pointer can hit. */
51
+ --cb-control-height-base-sm: 2rem;
52
+ --cb-control-height-base-md: 2.5rem;
53
+ --cb-control-height-base-lg: 3rem;
54
+
55
+ --cb-control-height-sm: max(var(--cb-control-height-base-sm), var(--cb-control-floor));
56
+ --cb-control-height-md: max(var(--cb-control-height-base-md), var(--cb-control-floor));
57
+ --cb-control-height-lg: max(var(--cb-control-height-base-lg), var(--cb-control-floor));
44
58
  --cb-canvas-block-size: 32rem;
45
59
 
46
60
  --cb-sticker-enter-y: var(--cb-space-3);
@@ -73,6 +87,16 @@
73
87
  --cb-z-overlay: var(--cb-z-modal-backdrop);
74
88
  }
75
89
 
90
+ /* A coarse pointer switches the active floor to the touch target. The resolved heights above are
91
+ `max()` of the preferred step and that floor, so `sm` and `md` both reach 44px and `lg` keeps its
92
+ 48px — nothing here restates a step, so retuning `--cb-control-height-base-*` on either pointer
93
+ still cannot take a control under its floor. */
94
+ @media (pointer: coarse) {
95
+ :root {
96
+ --cb-control-floor: var(--cb-control-floor-coarse);
97
+ }
98
+ }
99
+
76
100
  /* tokens/skin.css */
77
101
  /* Skin tokens: the default Ceebee skin. A Skin file rewrites only these.
78
102
  Light is defined on bare :root so no colour has its only definition inside a media query. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceebee/ui",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "Ceebee's design system: tokens, themed primitives, motion, and onboarding.",
5
5
  "license": "MIT",
6
6
  "repository": {