@bygghammar/cms-platform 0.77.0 → 0.78.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
@@ -1,3 +1,9 @@
1
+ ## 0.78.0
2
+
3
+ - Countdown block: the unit tiles now always stay on a single row on mobile.
4
+ Tiles shrink to fit (with smaller mobile padding, digits, labels and gaps)
5
+ instead of wrapping; desktop sizing and all colour/layout settings unchanged.
6
+
1
7
  ## 0.77.0
2
8
 
3
9
  - Global Sections list: preview thumbnails now use the section's first block type
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bygghammar/cms-platform",
3
- "version": "0.77.0",
3
+ "version": "0.78.0",
4
4
  "description": "Shared CMS platform: blocks, block types, i18n core, UI primitives and design-token contract used by every Bygghammar/Voyara site.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -10,12 +10,28 @@ import { useCountdownReplacement } from "../countdown-replacement";
10
10
  import type { CountdownProps } from "../types";
11
11
 
12
12
  const TILE_SIZE = {
13
- sm: { box: "min-w-14 px-3 py-2.5", digit: "text-2xl md:text-3xl", unit: "text-[0.55rem]" },
14
- md: { box: "min-w-20 px-4 py-3.5", digit: "text-3xl md:text-5xl", unit: "text-[0.6rem]" },
15
- lg: { box: "min-w-28 px-6 py-5", digit: "text-4xl md:text-6xl", unit: "text-[0.68rem]" },
13
+ sm: {
14
+ box: "min-w-0 flex-1 px-2 py-2 sm:min-w-14 sm:flex-none sm:px-3 sm:py-2.5",
15
+ digit: "text-xl sm:text-2xl md:text-3xl",
16
+ unit: "text-[0.5rem] sm:text-[0.55rem]",
17
+ },
18
+ md: {
19
+ box: "min-w-0 flex-1 px-2 py-2.5 sm:min-w-20 sm:flex-none sm:px-4 sm:py-3.5",
20
+ digit: "text-2xl sm:text-3xl md:text-5xl",
21
+ unit: "text-[0.5rem] sm:text-[0.6rem]",
22
+ },
23
+ lg: {
24
+ box: "min-w-0 flex-1 px-2 py-3 sm:min-w-28 sm:flex-none sm:px-6 sm:py-5",
25
+ digit: "text-2xl sm:text-4xl md:text-6xl",
26
+ unit: "text-[0.5rem] sm:text-[0.68rem]",
27
+ },
16
28
  } as const;
17
29
 
18
- const GAP = { sm: "gap-2", md: "gap-3 md:gap-4", lg: "gap-5 md:gap-7" } as const;
30
+ const GAP = {
31
+ sm: "gap-1.5 sm:gap-2",
32
+ md: "gap-1.5 sm:gap-3 md:gap-4",
33
+ lg: "gap-2 sm:gap-5 md:gap-7",
34
+ } as const;
19
35
  const PADDING = {
20
36
  compact: "py-8 md:py-10",
21
37
  normal: "py-14 md:py-20",
@@ -149,11 +165,12 @@ export function CountdownBlock({ props: p }: { props: CountdownProps }) {
149
165
  <>
150
166
  {heading(p.title, p.body)}
151
167
  <div
152
- className={`mt-8 flex flex-wrap items-stretch ${GAP[p.gap ?? "md"]} ${align.row}`}
168
+ className={`mt-8 flex w-full flex-nowrap items-stretch sm:w-auto sm:flex-wrap ${GAP[p.gap ?? "md"]} ${align.row}`}
153
169
  aria-live="off"
154
170
  >
155
171
  {units.map((u, i) => (
156
- <div key={i} className="flex items-stretch">
172
+ <div key={i} className="flex min-w-0 flex-1 items-stretch sm:flex-none">
173
+
157
174
  <div
158
175
  className={`flex flex-col items-center justify-center bg-[var(--cd-tile-bg)] ${size.box} ${border} ${shadow}`}
159
176
  style={{ borderRadius: "var(--cd-radius)" }}