@spaethtech/svelte-ui 0.17.1-dev.80.6b8fb45 → 0.17.1-dev.81.31c9800

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.
@@ -103,10 +103,11 @@
103
103
  /** Font size for the WHOLE table. Applied as `font-size` on the
104
104
  * outer container; every descendant inherits via standard CSS
105
105
  * cascade — headers, cells, footer text all follow. */
106
- // DataTable's own density is set via inline-style CSS vars + cell padding that already bakes in its
107
- // own `md:` responsive step neither can be re-prefixed per size tier. So the TABLE'S density keys
108
- // off the base tier of a responsive `size` (via resolveScalar); the responsive `size` is still passed
109
- // through to child controls (Button/Select/Checkbox), which DO resize at every breakpoint.
106
+ // DataTable's own density (font size + row height + cell padding) is a pure function of `size` — it
107
+ // NEVER changes with the viewport. It keys off the base tier of a responsive `size` (via
108
+ // resolveScalar) because its font-size/height are single inline-style CSS vars that can't carry
109
+ // per-breakpoint variants; the responsive `size` is still passed through to child controls
110
+ // (Button/Select/Checkbox), which DO resize at every breakpoint.
110
111
  const sSize = $derived(resolveScalar(size, "md"));
111
112
  const textVar = $derived(
112
113
  sSize === "lg" ? "var(--ui-text-lg)" : sSize === "md" ? "var(--ui-text)" : "var(--ui-text-sm)",
@@ -121,15 +122,10 @@
121
122
  ? "var(--ui-height)"
122
123
  : "var(--ui-height-sm)",
123
124
  );
124
- /** Cell padding scales with size. Mobile-first: base padding is
125
- * tight; the md: variant applies at 768px so tables feel
126
- * chunkier on desktop but stay dense on phones. */
125
+ /** Cell padding a pure function of `size` (no viewport step), so a table's density is exactly its
126
+ * `size` at every width. The values pair with `heightVar` (sm 24 / md 32 / lg 40px). */
127
127
  const cellPad = $derived(
128
- sSize === "lg"
129
- ? "py-3 px-4 md:py-4 md:px-5"
130
- : sSize === "md"
131
- ? "py-2 px-3 md:py-3 md:px-4"
132
- : "py-1 px-2 md:py-2 md:px-3",
128
+ sSize === "lg" ? "py-3 px-4" : sSize === "md" ? "py-2 px-3" : "py-1 px-2",
133
129
  );
134
130
  /** Inter-column gap. Tracks the same size axis so lead/cell/tail
135
131
  * spacing stays proportional to cell padding. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaethtech/svelte-ui",
3
- "version": "0.17.1-dev.80.6b8fb45",
3
+ "version": "0.17.1-dev.81.31c9800",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/spaethtech/svelte-ui.git"