@spillway-cms/blocks 0.1.23 → 0.1.24

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/meta.js CHANGED
@@ -7,7 +7,7 @@ export const blockMeta = {
7
7
  Heading: {
8
8
  summary: 'A section heading.',
9
9
  description: 'A standalone heading (h1 to h4) with alignment.',
10
- aiHint: 'Use to start a section. Prefer h2 for sections and h3 for sub-sections; the Hero already provides the h1. Keep headings short and specific.',
10
+ aiHint: 'Use to start a section. Prefer h2 for sections and h3 for sub-sections; the Hero already provides the h1. Keep headings short and specific. anchor is an optional link name for #links (lowercase words joined by hyphens, unique on the page); On this page lists headings without one too.',
11
11
  },
12
12
  Text: {
13
13
  summary: 'Paragraphs of body copy.',
@@ -26,8 +26,8 @@ export const blockMeta = {
26
26
  },
27
27
  Video: {
28
28
  summary: 'A captioned video to play.',
29
- description: 'A video (MP4 or WebM) from the media library, played with the browser\'s own controls (keyboard accessible, with a captions button), a poster image, captions files (.vtt) with a language and a label each, and an optional transcript in an expandable section under it. Nothing loads until the visitor presses play. The title names the player for screen readers and, with the description, goes into VideoObject structured data for video search results. A muted video can play on its own when in view, only when the brand\'s motion is on and the visitor has not asked for reduced motion.',
30
- aiHint: 'Use for a how-to, a tour or an interview hosted in the media library; for YouTube or Vimeo use Embed. src must be a real /media/ URL of an .mp4 or .webm file, poster a real image from the library, and each tracks item a real .vtt file from the library with srclang (en, es, fr-CA) and label (English); mark one default. Always set title (what the video is) and a one-sentence description. Put the transcript in transcript when one is known; never invent captions, transcripts or file URLs. Leave autoplay off unless the video is silent decoration (it needs muted true).',
29
+ description: 'A video (MP4 or WebM) from the media library, played with the browser\'s own controls (keyboard accessible, with a captions button), a poster image, captions files (.vtt) with a language and a label each, and an optional transcript in an expandable section under it. Nothing loads until the visitor presses play. It also plays a YouTube or Vimeo address: the page shows a poster (the block\'s own, else the video\'s thumbnail, which the server caches) with a play button and loads the privacy-friendly player (youtube-nocookie.com, Vimeo with do-not-track) only when it is pressed, in place or in a lightbox; with the consent banner on, it says the video comes from YouTube or Vimeo, which may set cookies. The title names the player for screen readers and, with the description, goes into VideoObject structured data for video search results. A muted video can play on its own when in view, only when the brand\'s motion is on and the visitor has not asked for reduced motion.',
30
+ aiHint: 'Use for a how-to, a tour or an interview hosted in the media library; for a YouTube or Vimeo video put its address (https://www.youtube.com/watch?v=..., https://vimeo.com/...) in src, with display "inline" or "lightbox", leaving tracks empty (captions come from the host). Otherwise src must be a real /media/ URL of an .mp4 or .webm file, poster a real image from the library, and each tracks item a real .vtt file from the library with srclang (en, es, fr-CA) and label (English); mark one default. Always set title (what the video is) and a one-sentence description. Put the transcript in transcript when one is known; never invent captions, transcripts or file URLs. Leave autoplay off unless the video is silent decoration (it needs muted true).',
31
31
  },
32
32
  Columns: {
33
33
  summary: 'Side-by-side columns of blocks.',
@@ -36,8 +36,28 @@ export const blockMeta = {
36
36
  },
37
37
  Section: {
38
38
  summary: 'A band that holds other blocks.',
39
- description: 'A full-width band with a background (page, surface, primary, secondary or dark) and a width (narrow, normal, wide), holding any blocks in its content slot; each block inside keeps its own alignment. Text and buttons turn light on the colored and dark backgrounds.',
40
- aiHint: 'Use to group a heading, text, buttons or cards on one background, for example a dark band with a Heading, a Text and a Buttons block. Put the child blocks in "content". Prefer it to Spacer for separating sections.',
39
+ description: 'A full-width band with a background (page, surface, primary, secondary or dark) and a width (narrow, normal, wide), holding any blocks in its content slot; each block inside keeps its own alignment. Text and buttons turn light on the colored and dark backgrounds. It can have a background image from the media library (cropped around its focal point, under an overlay in a brand color at 20 to 80 percent, with light or dark text to match) and a muted background video that plays only when motion is allowed, with a pause button. A link name gives it an id for #links.',
40
+ aiHint: 'Use to group a heading, text, buttons or cards on one background, for example a dark band with a Heading, a Text and a Buttons block. Put the child blocks in "content". Prefer it to Spacer for separating sections. For a photo band, set backgroundImage to a real /media/ image (or "find: " and what it shows when photos are offered), overlay "dark" (or "primary") with overlayStrength 60 or more and textColor "auto"; keep the text inside short. backgroundVideo only with a real .mp4 or .webm and a backgroundImage as its poster. anchor is an optional link name (lowercase words joined by hyphens, unique on the page).',
41
+ },
42
+ OnThisPage: {
43
+ summary: 'Links to the page\'s headings.',
44
+ description: 'A list of links to the page\'s headings (H2, H2 and H3, or H2 to H4), filled in when the page is shown, as a nested list under a title ("On this page"). It can stay in view while the page scrolls, in a sidebar column or a sidebar placement. Jumps scroll smoothly unless the visitor asked for reduced motion.',
45
+ aiHint: 'Use on long pages with four or more H2 sections (a program page, a policy, a guide), near the top or in the first column of a two-column layout with sticky true. It lists Heading blocks on its own: give the headings short, distinct text; nothing else to fill in.',
46
+ },
47
+ Tabs: {
48
+ summary: 'Panels of blocks behind tabs.',
49
+ description: 'Two to twelve tabs, each a panel that holds any blocks, with the tabs above the panel or beside it. Arrow keys move between the tabs, a link to #link-name opens a tab, and on narrow screens the tabs scroll sideways. Without JavaScript, and in the page builder, every panel shows under its heading after a list of links to them.',
50
+ aiHint: 'Use for parallel content people choose between, such as program levels (Undergraduate, Graduate, Online), audiences or the steps of a process, three to six tabs with short labels (one or two words). Each tab has a label and a "content" array of child blocks (Heading, Text, Image, Buttons, Columns). Not for content everyone must read: use Sections for that. orientation "vertical" suits five or more tabs with longer labels.',
51
+ },
52
+ Accordion: {
53
+ summary: 'Items that open to any blocks.',
54
+ description: 'A list of items whose titles open in place to show any blocks (text, images, buttons, columns), one at a time or several, with a heading level for the titles, the first item optionally open, links to an item by its link name (#visiting-campus) and, marked as FAQ, the titles and answers in the page\'s FAQPage structured data. Without JavaScript, and in the page builder, every item is open.',
55
+ aiHint: 'Use for many short sections people scan for one answer: policies, requirements, office hours, questions with rich answers. Each item has a title (a heading people scan) and a "content" array of child blocks, usually one Text block. Set headingLevel to the level after the heading above it (h3 under an h2). Set faq true only when the titles are real questions. For plain questions and answers the Faq block is enough.',
56
+ },
57
+ Carousel: {
58
+ summary: 'Slides of blocks to browse.',
59
+ description: 'Slides that each hold any blocks, in four variants: hero (full width, optionally full screen), cards (several visible, the next peeking in), testimonial (a thumbnail switcher) and stats (big numbers). Previous and Next, dots or thumbnails, swiping, arrow keys and screen reader labels ("1 of 3"); autoplay is off by default, has a pause button and never runs when the brand\'s motion is off or the visitor reduces motion. Without JavaScript the slides are a row that scrolls sideways.',
60
+ aiHint: 'Use sparingly: only when people browse the slides by choice (stories, featured programs, testimonials, key figures), never for information everyone must see, which belongs in Cards or Sections. Three to six slides. Each slide has a short label and a "content" array of child blocks: a Hero for the hero variant (titleLevel h2 on every Hero after the first, so the page keeps one H1), a Heading, Text and Button for cards, a Text quote with the person\'s name for testimonial, a Heading with the figure and a Text saying what it counts for stats. Always give title (it names the carousel). Leave autoplay false.',
41
61
  },
42
62
  CallToAction: {
43
63
  summary: 'A short pitch with one button.',
@@ -46,8 +66,8 @@ export const blockMeta = {
46
66
  },
47
67
  Cards: {
48
68
  summary: 'A grid of cards with links.',
49
- description: 'A grid of cards with title, text, optional link and image, in 2 to 4 columns.',
50
- aiHint: 'Use for features, benefits, services or a list of related pages. Three cards with parallel phrasing read best. Leave href empty when there is no target page.',
69
+ description: 'A grid of cards with title, text, optional link, image and icon, in 2 to 4 columns. An icon is decorative unless it has a label.',
70
+ aiHint: 'Use for features, benefits, services or a list of related pages. Three cards with parallel phrasing read best. Leave href empty when there is no target page. Give each card an icon that fits its title when the cards have no images (the same style of icon on every card), and leave iconLabel empty: the title says what it is. Icon names are the bundled set (graduation-cap, book-open, users, map-pin, calendar, heart, globe, award, briefcase, flask-conical, lightbulb, phone, mail, arrow-right and more; the field lists them all); leave icon empty when no icon fits.',
51
71
  },
52
72
  Faq: {
53
73
  summary: 'Questions that open to answers.',
@@ -61,8 +81,8 @@ export const blockMeta = {
61
81
  },
62
82
  Stats: {
63
83
  summary: 'Big numbers with labels.',
64
- description: 'Up to six large figures (98%, 40, 14:1), each with what it counts.',
65
- aiHint: 'Use for three or four true, specific figures the site states elsewhere. The label says what is counted, in a few words. Do not invent numbers.',
84
+ description: 'Up to six large figures (98%, 40, 14:1), each with what it counts and an optional icon above it.',
85
+ aiHint: 'Use for three or four true, specific figures the site states elsewhere. The label says what is counted, in a few words. Do not invent numbers. An icon per figure is optional (decorative; iconLabel empty). Icon names are the bundled set (graduation-cap, book-open, users, map-pin, calendar, heart, globe, award, briefcase, flask-conical, lightbulb, phone, mail, arrow-right and more; the field lists them all); leave icon empty when no icon fits.',
66
86
  },
67
87
  LogoStrip: {
68
88
  summary: 'A row of partner logos.',
@@ -87,7 +107,7 @@ export const blockMeta = {
87
107
  Spacer: {
88
108
  summary: 'Space between sections.',
89
109
  description: 'Vertical space (s, m, l, xl).',
90
- aiHint: 'Use sparingly. Blocks already have padding, and every block has spaceAbove and spaceBelow (auto, none, s, m, l, xl) to adjust it, and a motion object ({ entrance: none|fade|rise|scale|slide-left|slide-right, delay: none|short|medium, stagger, hover: none|lift|zoom|tilt, scroll: none|fade-out|pin|parallax (Hero with a background image only) }); a Hero can take backgroundVideo (.mp4 or .webm, needs backgroundImage as its poster) Stats countUp, and LogoStrip and Testimonials marquee (true scrolls the row with a pause button), all capped by the brand\'s motion level; use entrances sparingly and never on the first block of a page.',
110
+ aiHint: 'Use sparingly. Blocks already have padding, and every block has spaceAbove and spaceBelow (auto, none, s, m, l, xl) to adjust it, and a motion object ({ entrance: none|fade|rise|scale|slide-left|slide-right, delay: none|short|medium, stagger, hover: none|lift|zoom|tilt, scroll: none|fade-out|pin|parallax (a Hero or a Section with a background image only) }); a Hero or a Section can take backgroundVideo (.mp4 or .webm, needs backgroundImage as its poster) Stats countUp, and LogoStrip and Testimonials marquee (true scrolls the row with a pause button), all capped by the brand\'s motion level; use entrances sparingly and never on the first block of a page.',
91
111
  },
92
112
  Search: {
93
113
  summary: 'A search box for this site.',
@@ -104,6 +124,11 @@ export const blockMeta = {
104
124
  description: "One of the site's menus as a list of links: the whole menu, or only the branch that holds the page being viewed (its sub-items, like a department's navigation), one or two levels deep, stacked for a sidebar or in a row. It can follow the menu of the department section the page is in instead of naming one. The current page is marked; nothing shows when there are no links for the page.",
105
125
  aiHint: 'Use for in-page or sidebar navigation of a section of the site. Set menuKey to an existing menu key (main is the header menu); use show "branch" to list the pages around the current one. Do not repeat the header navigation on a page.',
106
126
  },
127
+ Breadcrumbs: {
128
+ summary: 'The trail to this page.',
129
+ description: "The links from the home page to the page being viewed (Home, then each level above it, then the page), from the page's address (the titles of the pages at each level, as in the structured data) or from its place in the main menu. A navigation landmark named Breadcrumb with the page marked as current; nothing shows on the home page. Usually placed above the content of every page of a type with Structure → Placements, or with Site settings → Breadcrumbs.",
130
+ aiHint: 'Use at the top of deep content pages (programs, departments, news, events), not on the home page or a landing page. Prefer a placement or the site setting over adding it to each page by hand. source "path" follows the address; "menu" follows the main menu.',
131
+ },
107
132
  Divider: {
108
133
  summary: 'A line between sections.',
109
134
  description: 'A horizontal rule.',
@@ -117,12 +142,12 @@ export const blockMeta = {
117
142
  Buttons: {
118
143
  summary: 'A row of one to four buttons.',
119
144
  description: 'One to four buttons in a row that wraps on small screens, each with its own label, link, emphasis (primary, secondary or text link) and an option to open in a new tab; aligned left, center or right.',
120
- aiHint: 'Use when a section needs more than one action, for example "Book a demo" (primary) and "Read the docs" (secondary). One primary button per row; the rest secondary or text links.',
145
+ aiHint: 'Use when a section needs more than one action, for example "Book a demo" (primary) and "Read the docs" (secondary). One primary button per row; the rest secondary or text links. An icon is optional (decorative, iconPosition before or after the label), for example arrow-right after or download before.',
121
146
  },
122
147
  Button: {
123
148
  summary: 'A single button or text link.',
124
- description: 'A single button with alignment; its emphasis (primary, secondary or a text link) comes from its style.',
125
- aiHint: 'Use for a standalone link styled as a button. Label is a verb phrase; href is a site path or full URL.',
149
+ description: 'A single button with alignment and an optional icon before or after the label; its emphasis (primary, secondary or a text link) comes from its style.',
150
+ aiHint: 'Use for a standalone link styled as a button. Label is a verb phrase; href is a site path or full URL. icon is optional and decorative (arrow-right, download, external-link).',
126
151
  },
127
152
  Form: {
128
153
  summary: 'A contact or signup form.',
package/dist/meta.js.map C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,EAAE,4BAA4B;QACrC,WAAW,EAAE,0UAA0U;QACvV,MAAM,EAAE,+JAA+J;KACxK;IACD,aAAa,EAAE;QACb,OAAO,EAAE,gCAAgC;QACzC,WAAW,EAAE,uFAAuF;QACpG,MAAM,EAAE,+IAA+I;KACxJ;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,+BAA+B;QACxC,WAAW,EAAE,sIAAsI;QACnJ,MAAM,EAAE,qHAAqH;KAC9H;IACD,gBAAgB,EAAE;QAChB,OAAO,EAAE,iCAAiC;QAC1C,WAAW,EAAE,oMAAoM;QACjN,MAAM,EAAE,iKAAiK;KAC1K;IACD,UAAU,EAAE;QACV,OAAO,EAAE,gCAAgC;QACzC,WAAW,EAAE,iQAAiQ;QAC9Q,MAAM,EAAE,8JAA8J;KACvK;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,0BAA0B;QACnC,WAAW,EAAE,uUAAuU;QACpV,MAAM,EAAE,2LAA2L;KACpM;IACD,WAAW,EAAE;QACX,OAAO,EAAE,gCAAgC;QACzC,WAAW,EAAE,yRAAyR;QACtS,MAAM,EAAE,wKAAwK;KACjL;IACD,WAAW,EAAE;QACX,OAAO,EAAE,wBAAwB;QACjC,WAAW,EAAE,2LAA2L;QACxM,MAAM,EAAE,4IAA4I;KACrJ;CACF,CAAC"}
package/dist/motion.d.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  * root as `data-sw-motion`: `subtle` plays scale and slides as a short rise and turns tilt off. Reduced motion, from the operating
9
9
  * system or the visitor's switch (`sw-reduce-motion` on the root), turns every rule off.
10
10
  */
11
- export declare const MOTION_CSS = "\n/* Motion: entrances (armed by the page's motion script), stagger and hover. */\n[data-motion] { --sw-motion-from: none; --sw-motion-wait: 0ms; }\n[data-motion=\"rise\"] { --sw-motion-from: translateY(var(--sw-motion-distance, 24px)); }\n[data-motion=\"scale\"] { --sw-motion-from: scale(0.94); }\n[data-motion=\"slide-left\"] { --sw-motion-from: translateX(calc(-1 * var(--sw-motion-distance, 24px))); }\n[data-motion=\"slide-right\"] { --sw-motion-from: translateX(var(--sw-motion-distance, 24px)); }\n[data-sw-motion=\"subtle\"] :is([data-motion=\"scale\"], [data-motion=\"slide-left\"], [data-motion=\"slide-right\"]) { --sw-motion-from: translateY(calc(var(--sw-motion-distance, 24px) / 2)); }\n[data-sw-motion=\"subtle\"] [data-motion=\"rise\"] { --sw-motion-from: translateY(calc(var(--sw-motion-distance, 24px) / 2)); }\n[data-motion-delay=\"short\"] { --sw-motion-wait: 150ms; }\n[data-motion-delay=\"medium\"] { --sw-motion-wait: 300ms; }\n/* The transition runs only as a block arrives (sw-in), so hiding the blocks below the fold is instant. */\n.sw-motion-ready [data-motion].sw-in:not([data-motion-stagger]),\n.sw-motion-ready [data-motion].sw-in[data-motion-stagger] :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > * {\n transition: opacity var(--sw-motion-duration, 600ms) var(--sw-motion-easing, cubic-bezier(0.2, 0.7, 0.2, 1)), transform var(--sw-motion-duration, 600ms) var(--sw-motion-easing, cubic-bezier(0.2, 0.7, 0.2, 1));\n transition-delay: calc(var(--sw-motion-wait) + var(--sw-motion-index, 0) * 80ms);\n}\n.sw-motion-ready [data-motion]:not([data-motion-stagger]):not(.sw-in),\n.sw-motion-ready [data-motion][data-motion-stagger]:not(.sw-in) :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > * { opacity: 0; transform: var(--sw-motion-from); }\n[data-motion-hover] :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *, [data-motion-hover].sw-image, [data-motion-hover] img { transition: transform 200ms ease, box-shadow 200ms ease; }\n[data-sw-motion] [data-motion-hover=\"lift\"] :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *:hover, [data-sw-motion] [data-motion-hover=\"lift\"].sw-image:hover { transform: translateY(-4px); box-shadow: var(--sw-shadow, 0 8px 24px rgba(0, 0, 0, 0.12)); }\n[data-motion-hover=\"zoom\"] :is(:is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *, .sw-image) { overflow: hidden; }\n[data-sw-motion] [data-motion-hover=\"zoom\"] :is(:is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *, .sw-image):hover img, [data-sw-motion] [data-motion-hover=\"zoom\"].sw-image:hover img { transform: scale(1.05); }\n[data-sw-motion=\"expressive\"] [data-motion-hover=\"tilt\"] :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *:hover { transform: perspective(800px) rotateX(2deg) rotateY(-3deg) translateY(-2px); }\n/* On scroll: the page script writes --sw-scroll (0 as the block enters at the bottom, 1 as it leaves at the top); unset, every\n effect sits at rest. Parallax moves a Hero's background slower than the page (half as far at the subtle level). */\n[data-motion-scroll=\"parallax\"] { --sw-parallax: 16%; }\n[data-sw-motion=\"subtle\"] [data-motion-scroll=\"parallax\"] { --sw-parallax: 8%; }\n[data-sw-motion] [data-motion-scroll=\"parallax\"].sw-hero--image { overflow: hidden; }\n[data-sw-motion] [data-motion-scroll=\"parallax\"] .sw-hero__bg { transform: translateY(calc((var(--sw-scroll, 0.5) - 0.5) * var(--sw-parallax))) scale(1.18); will-change: transform; }\n[data-sw-motion] [data-motion-scroll=\"parallax\"].sw-hero--image:not(:has(.sw-hero__bg)) { background-position: center calc(50% + (var(--sw-scroll, 0.5) - 0.5) * var(--sw-parallax) * 4); }\n[data-sw-motion] [data-motion-scroll=\"fade-out\"] { opacity: clamp(0, calc((1 - var(--sw-scroll, 0)) / 0.35), 1); }\n[data-sw-motion] [data-motion-scroll=\"pin\"] { position: sticky; top: 0; z-index: 0; }\n[data-sw-motion] [data-motion-scroll=\"pin\"] ~ * { position: relative; z-index: 1; }\n.sw-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }\n.sw-hero { position: relative; }\n.sw-video-toggle { position: absolute; right: var(--sw-space-3, 1rem); bottom: var(--sw-space-3, 1rem); z-index: 1; font: inherit; font-size: 0.8125rem; color: #ffffff; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 999px; padding: 0.3rem 0.85rem; cursor: pointer; }\n.sw-video-toggle:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }\n/* Marquee (Logo strip, Testimonials): the page script adds sw-marquee-on and copies the items (the copies are hidden from\n assistive technology) so the row loops; items carry their spacing as a margin so moving by half is seamless. */\n[data-motion-marquee]:not(.sw-marquee-on) [data-sw-marquee-clone] { display: none; }\n.sw-marquee-on .sw-container { overflow: hidden; }\n.sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid) { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 0; width: max-content; animation: sw-marquee var(--sw-marquee-duration, 40s) linear infinite; }\n.sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid) > * { flex: none; margin-inline-end: var(--sw-marquee-gap, var(--sw-space-4, 2rem)); }\n.sw-testimonials.sw-marquee-on .sw-testimonials__grid > * { width: min(22rem, 80vw); --sw-marquee-gap: var(--sw-space-3, 1.5rem); }\n.sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid):hover, .sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid):focus-within, .sw-marquee-paused :is(.sw-logos__list, .sw-testimonials__grid) { animation-play-state: paused; }\n@keyframes sw-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }\n.sw-lottie-toggle { display: block; margin: var(--sw-space-1, 0.5rem) auto 0; font: inherit; font-size: 0.8125rem; color: inherit; background: none; border: 1px solid currentColor; border-radius: 999px; padding: 0.2rem 0.75rem; cursor: pointer; opacity: 0.85; }\n.sw-lottie-toggle[hidden] { display: none; }\n.sw-marquee-toggle { display: block; margin: 0 auto var(--sw-space-3, 1rem); font: inherit; font-size: 0.8125rem; color: inherit; background: none; border: 1px solid currentColor; border-radius: 999px; padding: 0.2rem 0.75rem; cursor: pointer; opacity: 0.85; }\n.sw-marquee-toggle[hidden] { display: none; }\n.sw-motion-switch { font: inherit; font-size: 0.8125rem; color: inherit; background: none; border: 1px solid currentColor; border-radius: 999px; padding: 0.2rem 0.75rem; cursor: pointer; opacity: 0.85; }\n.sw-motion-switch[aria-pressed=\"true\"] { background: var(--sw-color-text); color: var(--sw-color-bg); opacity: 1; }\n.sw-reduce-motion *, .sw-reduce-motion *::before, .sw-reduce-motion *::after { transition: none !important; animation: none !important; }\n.sw-reduce-motion [data-motion], .sw-reduce-motion [data-motion] *, .sw-reduce-motion [data-motion-scroll], .sw-reduce-motion [data-motion-scroll] * { opacity: 1 !important; transform: none !important; }\n@media (prefers-reduced-motion: reduce) {\n html:not(.sw-motion-allowed) :is([data-motion], [data-motion-scroll]), html:not(.sw-motion-allowed) :is([data-motion], [data-motion-scroll]) * { opacity: 1 !important; transform: none !important; transition: none !important; }\n html:not(.sw-motion-allowed) .sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid) { animation: none !important; }\n}\n";
11
+ export declare const MOTION_CSS = "\n/* Motion: entrances (armed by the page's motion script), stagger and hover. */\n[data-motion] { --sw-motion-from: none; --sw-motion-wait: 0ms; }\n[data-motion=\"rise\"] { --sw-motion-from: translateY(var(--sw-motion-distance, 24px)); }\n[data-motion=\"scale\"] { --sw-motion-from: scale(0.94); }\n[data-motion=\"slide-left\"] { --sw-motion-from: translateX(calc(-1 * var(--sw-motion-distance, 24px))); }\n[data-motion=\"slide-right\"] { --sw-motion-from: translateX(var(--sw-motion-distance, 24px)); }\n[data-sw-motion=\"subtle\"] :is([data-motion=\"scale\"], [data-motion=\"slide-left\"], [data-motion=\"slide-right\"]) { --sw-motion-from: translateY(calc(var(--sw-motion-distance, 24px) / 2)); }\n[data-sw-motion=\"subtle\"] [data-motion=\"rise\"] { --sw-motion-from: translateY(calc(var(--sw-motion-distance, 24px) / 2)); }\n[data-motion-delay=\"short\"] { --sw-motion-wait: 150ms; }\n[data-motion-delay=\"medium\"] { --sw-motion-wait: 300ms; }\n/* The transition runs only as a block arrives (sw-in), so hiding the blocks below the fold is instant. */\n.sw-motion-ready [data-motion].sw-in:not([data-motion-stagger]),\n.sw-motion-ready [data-motion].sw-in[data-motion-stagger] :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > * {\n transition: opacity var(--sw-motion-duration, 600ms) var(--sw-motion-easing, cubic-bezier(0.2, 0.7, 0.2, 1)), transform var(--sw-motion-duration, 600ms) var(--sw-motion-easing, cubic-bezier(0.2, 0.7, 0.2, 1));\n transition-delay: calc(var(--sw-motion-wait) + var(--sw-motion-index, 0) * 80ms);\n}\n.sw-motion-ready [data-motion]:not([data-motion-stagger]):not(.sw-in),\n.sw-motion-ready [data-motion][data-motion-stagger]:not(.sw-in) :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > * { opacity: 0; transform: var(--sw-motion-from); }\n[data-motion-hover] :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *, [data-motion-hover].sw-image, [data-motion-hover] img { transition: transform 200ms ease, box-shadow 200ms ease; }\n[data-sw-motion] [data-motion-hover=\"lift\"] :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *:hover, [data-sw-motion] [data-motion-hover=\"lift\"].sw-image:hover { transform: translateY(-4px); box-shadow: var(--sw-shadow, 0 8px 24px rgba(0, 0, 0, 0.12)); }\n[data-motion-hover=\"zoom\"] :is(:is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *, .sw-image) { overflow: hidden; }\n[data-sw-motion] [data-motion-hover=\"zoom\"] :is(:is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *, .sw-image):hover img, [data-sw-motion] [data-motion-hover=\"zoom\"].sw-image:hover img { transform: scale(1.05); }\n[data-sw-motion=\"expressive\"] [data-motion-hover=\"tilt\"] :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *:hover { transform: perspective(800px) rotateX(2deg) rotateY(-3deg) translateY(-2px); }\n/* On scroll: the page script writes --sw-scroll (0 as the block enters at the bottom, 1 as it leaves at the top); unset, every\n effect sits at rest. Parallax moves a Hero's background slower than the page (half as far at the subtle level). */\n[data-motion-scroll=\"parallax\"] { --sw-parallax: 16%; }\n[data-sw-motion=\"subtle\"] [data-motion-scroll=\"parallax\"] { --sw-parallax: 8%; }\n[data-sw-motion] [data-motion-scroll=\"parallax\"].sw-hero--image { overflow: hidden; }\n[data-sw-motion] [data-motion-scroll=\"parallax\"] .sw-hero__bg { transform: translateY(calc((var(--sw-scroll, 0.5) - 0.5) * var(--sw-parallax))) scale(1.18); will-change: transform; }\n[data-sw-motion] [data-motion-scroll=\"parallax\"].sw-section--media > :is(.sw-section__bg, picture > .sw-section__bg) { transform: translateY(calc((var(--sw-scroll, 0.5) - 0.5) * var(--sw-parallax))) scale(1.18); will-change: transform; }\n[data-sw-motion] [data-motion-scroll=\"parallax\"].sw-hero--image:not(:has(.sw-hero__bg)) { background-position: center calc(50% + (var(--sw-scroll, 0.5) - 0.5) * var(--sw-parallax) * 4); }\n[data-sw-motion] [data-motion-scroll=\"fade-out\"] { opacity: clamp(0, calc((1 - var(--sw-scroll, 0)) / 0.35), 1); }\n[data-sw-motion] [data-motion-scroll=\"pin\"] { position: sticky; top: 0; z-index: 0; }\n[data-sw-motion] [data-motion-scroll=\"pin\"] ~ * { position: relative; z-index: 1; }\n.sw-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }\n.sw-hero, .sw-section--media { position: relative; }\n.sw-video-toggle { position: absolute; right: var(--sw-space-3, 1rem); bottom: var(--sw-space-3, 1rem); z-index: 1; font: inherit; font-size: 0.8125rem; color: #ffffff; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 999px; padding: 0.3rem 0.85rem; cursor: pointer; }\n.sw-video-toggle:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }\n/* Marquee (Logo strip, Testimonials): the page script adds sw-marquee-on and copies the items (the copies are hidden from\n assistive technology) so the row loops; items carry their spacing as a margin so moving by half is seamless. */\n[data-motion-marquee]:not(.sw-marquee-on) [data-sw-marquee-clone] { display: none; }\n.sw-marquee-on .sw-container { overflow: hidden; }\n.sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid) { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 0; width: max-content; animation: sw-marquee var(--sw-marquee-duration, 40s) linear infinite; }\n.sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid) > * { flex: none; margin-inline-end: var(--sw-marquee-gap, var(--sw-space-4, 2rem)); }\n.sw-testimonials.sw-marquee-on .sw-testimonials__grid > * { width: min(22rem, 80vw); --sw-marquee-gap: var(--sw-space-3, 1.5rem); }\n.sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid):hover, .sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid):focus-within, .sw-marquee-paused :is(.sw-logos__list, .sw-testimonials__grid) { animation-play-state: paused; }\n@keyframes sw-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }\n.sw-lottie-toggle { display: block; margin: var(--sw-space-1, 0.5rem) auto 0; font: inherit; font-size: 0.8125rem; color: inherit; background: none; border: 1px solid currentColor; border-radius: 999px; padding: 0.2rem 0.75rem; cursor: pointer; opacity: 0.85; }\n.sw-lottie-toggle[hidden] { display: none; }\n.sw-marquee-toggle { display: block; margin: 0 auto var(--sw-space-3, 1rem); font: inherit; font-size: 0.8125rem; color: inherit; background: none; border: 1px solid currentColor; border-radius: 999px; padding: 0.2rem 0.75rem; cursor: pointer; opacity: 0.85; }\n.sw-marquee-toggle[hidden] { display: none; }\n.sw-motion-switch { font: inherit; font-size: 0.8125rem; color: inherit; background: none; border: 1px solid currentColor; border-radius: 999px; padding: 0.2rem 0.75rem; cursor: pointer; opacity: 0.85; }\n.sw-motion-switch[aria-pressed=\"true\"] { background: var(--sw-color-text); color: var(--sw-color-bg); opacity: 1; }\n.sw-reduce-motion *, .sw-reduce-motion *::before, .sw-reduce-motion *::after { transition: none !important; animation: none !important; }\n.sw-reduce-motion [data-motion], .sw-reduce-motion [data-motion] *, .sw-reduce-motion [data-motion-scroll], .sw-reduce-motion [data-motion-scroll] * { opacity: 1 !important; transform: none !important; }\n@media (prefers-reduced-motion: reduce) {\n html:not(.sw-motion-allowed) :is([data-motion], [data-motion-scroll]), html:not(.sw-motion-allowed) :is([data-motion], [data-motion-scroll]) * { opacity: 1 !important; transform: none !important; transition: none !important; }\n html:not(.sw-motion-allowed) .sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid) { animation: none !important; }\n}\n";
12
12
  /** The visitor's choice in local storage: "1" reduce, "0" allow; absent follows the operating system. */
13
13
  export declare const MOTION_STORAGE_KEY = "sw-reduce-motion";
14
14
  /**
package/dist/motion.js CHANGED
@@ -40,12 +40,13 @@ export const MOTION_CSS = `
40
40
  [data-sw-motion="subtle"] [data-motion-scroll="parallax"] { --sw-parallax: 8%; }
41
41
  [data-sw-motion] [data-motion-scroll="parallax"].sw-hero--image { overflow: hidden; }
42
42
  [data-sw-motion] [data-motion-scroll="parallax"] .sw-hero__bg { transform: translateY(calc((var(--sw-scroll, 0.5) - 0.5) * var(--sw-parallax))) scale(1.18); will-change: transform; }
43
+ [data-sw-motion] [data-motion-scroll="parallax"].sw-section--media > :is(.sw-section__bg, picture > .sw-section__bg) { transform: translateY(calc((var(--sw-scroll, 0.5) - 0.5) * var(--sw-parallax))) scale(1.18); will-change: transform; }
43
44
  [data-sw-motion] [data-motion-scroll="parallax"].sw-hero--image:not(:has(.sw-hero__bg)) { background-position: center calc(50% + (var(--sw-scroll, 0.5) - 0.5) * var(--sw-parallax) * 4); }
44
45
  [data-sw-motion] [data-motion-scroll="fade-out"] { opacity: clamp(0, calc((1 - var(--sw-scroll, 0)) / 0.35), 1); }
45
46
  [data-sw-motion] [data-motion-scroll="pin"] { position: sticky; top: 0; z-index: 0; }
46
47
  [data-sw-motion] [data-motion-scroll="pin"] ~ * { position: relative; z-index: 1; }
47
48
  .sw-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
48
- .sw-hero { position: relative; }
49
+ .sw-hero, .sw-section--media { position: relative; }
49
50
  .sw-video-toggle { position: absolute; right: var(--sw-space-3, 1rem); bottom: var(--sw-space-3, 1rem); z-index: 1; font: inherit; font-size: 0.8125rem; color: #ffffff; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 999px; padding: 0.3rem 0.85rem; cursor: pointer; }
50
51
  .sw-video-toggle:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
51
52
  /* Marquee (Logo strip, Testimonials): the page script adds sw-marquee-on and copies the items (the copies are hidden from
@@ -1 +1 @@
1
- {"version":3,"file":"motion.js","sourceRoot":"","sources":["../src/motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,8GAA8G;AAC9G,MAAM,KAAK,GAAG,qJAAqJ,CAAC;AAEpK,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;4DAakC,KAAK;;;;;kEAKC,KAAK;sBACjD,KAAK;8CACmB,KAAK;iCAClB,KAAK;kDACY,KAAK;2DACI,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoC/D,CAAC;AAEF,yGAAyG;AACzG,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,oDAAoD,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uGA2EZ,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,MAAM,CAAC;;;;;;;;;;MAU/H,CAAC"}
1
+ {"version":3,"file":"motion.js","sourceRoot":"","sources":["../src/motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,8GAA8G;AAC9G,MAAM,KAAK,GAAG,qJAAqJ,CAAC;AAEpK,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;4DAakC,KAAK;;;;;kEAKC,KAAK;sBACjD,KAAK;8CACmB,KAAK;iCAClB,KAAK;kDACY,KAAK;2DACI,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqC/D,CAAC;AAEF,yGAAyG;AACzG,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,oDAAoD,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uGA2EZ,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,MAAM,CAAC;;;;;;;;;;MAU/H,CAAC"}
package/dist/styles.css CHANGED
@@ -393,6 +393,24 @@
393
393
  border-color: var(--sw-color-primary-contrast, #ffffff);
394
394
  color: var(--sw-color-primary, #1d4ed8);
395
395
  }
396
+ /* A background image or video (docs/dev/section-media-icons-anchors.md): behind the blocks, cropped around its focal point, under
397
+ an overlay in a brand color at the chosen strength. The section is its own stacking context, so the picture and the overlay
398
+ sit behind its blocks and never over the page around it. */
399
+ .sw-section--media { position: relative; isolation: isolate; overflow: hidden; }
400
+ .sw-section__bg { position: absolute; inset: 0; z-index: -2; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
401
+ .sw-section__overlay { position: absolute; inset: 0; z-index: -1; background: var(--sw-overlay-color, #111827); opacity: var(--sw-overlay-strength, 0.6); }
402
+ .sw-section--overlay-dark { --sw-overlay-color: var(--sw-color-neutral-900, #111827); }
403
+ .sw-section--overlay-light { --sw-overlay-color: var(--sw-color-bg, #ffffff); }
404
+ .sw-section--overlay-primary { --sw-overlay-color: var(--sw-color-primary, #1d4ed8); }
405
+ .sw-section--overlay-secondary { --sw-overlay-color: var(--sw-color-secondary, #334155); }
406
+ .sw-section--strength-20 { --sw-overlay-strength: 0.2; }
407
+ .sw-section--strength-30 { --sw-overlay-strength: 0.3; }
408
+ .sw-section--strength-40 { --sw-overlay-strength: 0.4; }
409
+ .sw-section--strength-50 { --sw-overlay-strength: 0.5; }
410
+ .sw-section--strength-60 { --sw-overlay-strength: 0.6; }
411
+ .sw-section--strength-70 { --sw-overlay-strength: 0.7; }
412
+ .sw-section--strength-80 { --sw-overlay-strength: 0.8; }
413
+ .sw-section--on-light { color: var(--sw-color-text); }
396
414
 
397
415
  /* ---------- Call to action ---------- */
398
416
 
@@ -813,6 +831,17 @@
813
831
  .sw-menu-block--horizontal .sw-menu-block__sublist { display: none; }
814
832
  .sw-menu-block__placeholder { padding: 1rem; border: 1px dashed color-mix(in srgb, currentColor 35%, transparent); border-radius: var(--sw-radius, 8px); font-size: 0.9rem; opacity: 0.8; }
815
833
 
834
+ /* ---------- Breadcrumbs ---------- */
835
+ .sw-breadcrumbs { padding-top: 1rem; padding-bottom: 0; font-size: 0.875rem; }
836
+ .sw-breadcrumbs__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
837
+ .sw-breadcrumbs__item { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; }
838
+ .sw-breadcrumbs__item + .sw-breadcrumbs__item::before { content: ""; flex: none; width: 0.4em; height: 0.4em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); opacity: 0.55; }
839
+ .sw-breadcrumbs__item a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 0.2em; }
840
+ .sw-breadcrumbs__item a:hover { text-decoration-color: currentColor; }
841
+ .sw-breadcrumbs__item a:focus-visible { outline: 2px solid var(--sw-color-primary, #1d4ed8); outline-offset: 2px; border-radius: 2px; }
842
+ .sw-breadcrumbs__item [aria-current="page"] { font-weight: 600; text-decoration: none; }
843
+ .sw-breadcrumbs__placeholder { padding: 0.75rem 1rem; border: 1px dashed color-mix(in srgb, currentColor 35%, transparent); border-radius: var(--sw-radius, 8px); font-size: 0.9rem; opacity: 0.8; }
844
+
816
845
  /* ---------- Regions (Structure, Placements) ----------
817
846
  Blocks placed above the content, beside it in a sidebar, or below it. The main column comes first in the document; from
818
847
  900 px the sidebars sit beside it, below that they follow it. Inside the grid the page's own containers drop their gutter. */
@@ -1339,6 +1368,113 @@
1339
1368
  .sw-logos--gray a:hover .sw-logos__img, .sw-logos--gray a:focus-visible .sw-logos__img { filter: none; opacity: 1; }
1340
1369
 
1341
1370
 
1371
+ /* ---------- Carousel, Accordion, Tabs ---------- */
1372
+ /* Blocks inside a slide, an item or a tab share its box: no second gutter, one gap between them. */
1373
+ .sw-slot-body > .sw-block { padding-block: 0; }
1374
+ .sw-slot-body > .sw-block + .sw-block { padding-top: var(--sw-space-2); }
1375
+ .sw-slot-body .sw-container { max-width: none; padding-inline: 0; }
1376
+
1377
+ /* Accordion: without the script every item is open under its heading; with it the heading holds a button. */
1378
+ .sw-accordion__title { margin: 0 0 var(--sw-space-3); }
1379
+ .sw-accordion__list { display: grid; gap: var(--sw-accordion-gap, 0); border-top: var(--sw-accordion-rule, 1px solid var(--sw-color-border)); }
1380
+ .sw-accordion__item { border-bottom: 1px solid var(--sw-color-border); scroll-margin-top: var(--sw-space-3); }
1381
+ .sw-page .sw-accordion__heading { margin: 0; font-size: 1.125rem; line-height: 1.35; letter-spacing: 0; }
1382
+ .sw-accordion__heading > .sw-accordion__label { display: block; padding: var(--sw-space-2) 0 var(--sw-space-1); }
1383
+ .sw-accordion__trigger { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: var(--sw-space-2); min-height: 3rem; padding: var(--sw-space-2) 0; margin: 0; font: inherit; font-weight: 700; color: inherit; text-align: start; background: none; border: 0; border-radius: 2px; cursor: pointer; }
1384
+ .sw-accordion__trigger:hover .sw-accordion__label { text-decoration: underline; text-underline-offset: 0.15em; }
1385
+ .sw-accordion__icon { position: relative; flex: none; width: 1rem; height: 1rem; color: var(--sw-color-primary, #1d4ed8); }
1386
+ .sw-accordion__icon::before, .sw-accordion__icon::after { content: ''; position: absolute; left: 0; top: calc(50% - 1px); width: 100%; height: 2px; border-radius: 1px; background: currentColor; transition: transform 160ms ease; }
1387
+ .sw-accordion__icon::after { transform: rotate(90deg); }
1388
+ .sw-accordion__trigger[aria-expanded="true"] .sw-accordion__icon::after { transform: rotate(0deg); }
1389
+ .sw-accordion__panel { padding: 0 0 var(--sw-space-2); }
1390
+ .sw-accordion__panel[hidden] { display: none; }
1391
+ .sw-accordion__panel[hidden="until-found"] { display: block; content-visibility: hidden; padding: 0; }
1392
+
1393
+ /* Tabs: without the script, a list of links to the panels and every panel under its heading. */
1394
+ .sw-tabs__title { margin: 0 0 var(--sw-space-3); }
1395
+ .sw-tabs__layout { display: grid; gap: var(--sw-space-3); }
1396
+ .sw-tabs__list { position: relative; display: flex; gap: var(--sw-space-1); margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: thin; border-bottom: var(--sw-tabs-rule, 1px solid var(--sw-color-border)); }
1397
+ .sw-tabs__item { flex: none; display: flex; }
1398
+ .sw-page .sw-tabs__tab { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.5rem 1rem; color: var(--sw-color-muted); font-weight: 600; text-decoration: none; white-space: nowrap; border-radius: var(--sw-radius, 8px) var(--sw-radius, 8px) 0 0; }
1399
+ .sw-page .sw-tabs__tab:hover { color: var(--sw-color-text); text-decoration: none; }
1400
+ .sw-page .sw-tabs__tab[aria-selected="true"] { color: var(--sw-color-text); box-shadow: inset 0 -3px 0 var(--sw-color-primary, #1d4ed8); }
1401
+ /* Inside the ring: the list scrolls, so a ring outside the tab would be cut off. */
1402
+ .sw-page .sw-tabs__tab:focus-visible { outline: 2px solid var(--sw-color-primary, #1d4ed8); outline-offset: -4px; }
1403
+ .sw-tabs__panel { scroll-margin-top: var(--sw-space-3); }
1404
+ .sw-tabs__panel + .sw-tabs__panel { margin-top: var(--sw-space-4); }
1405
+ .sw-page .sw-tabs__heading { margin: 0 0 var(--sw-space-2); }
1406
+ .sw-tabs--on .sw-tabs__panel + .sw-tabs__panel { margin-top: 0; }
1407
+ .sw-tabs--on .sw-tabs__heading { display: none; }
1408
+ .sw-tabs__panel[hidden] { display: none; }
1409
+ .sw-tabs--on .sw-tabs__panel:focus-visible { outline: none; box-shadow: var(--sw-focus-ring); border-radius: 2px; }
1410
+ @media (min-width: 760px) {
1411
+ .sw-tabs--vertical .sw-tabs__layout { grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr); align-items: start; }
1412
+ .sw-tabs--vertical .sw-tabs__list { flex-direction: column; overflow: visible; border-bottom: 0; border-inline-end: var(--sw-tabs-rule, 1px solid var(--sw-color-border)); }
1413
+ .sw-page .sw-tabs--vertical .sw-tabs__tab { width: 100%; white-space: normal; border-radius: var(--sw-radius, 8px) 0 0 var(--sw-radius, 8px); }
1414
+ .sw-page .sw-tabs--vertical .sw-tabs__tab[aria-selected="true"] { box-shadow: inset -3px 0 0 var(--sw-color-primary, #1d4ed8); }
1415
+ }
1416
+
1417
+ /* Carousel: without the script a row that scrolls sideways with snapping; with it, controls and one row position at a time. */
1418
+ .sw-carousel { --sw-carousel-gap: var(--sw-space-3, 1.5rem); --sw-carousel-n: 1; --sw-carousel-peek: 0px; position: relative; }
1419
+ .sw-carousel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sw-space-2); margin-bottom: var(--sw-space-3); }
1420
+ .sw-carousel__head--empty, .sw-carousel--hero .sw-carousel__head:not(:has(.sw-carousel__title)) { margin-bottom: 0; }
1421
+ .sw-carousel__title { margin: 0; }
1422
+ .sw-carousel__frame { position: relative; }
1423
+ .sw-carousel__track { position: relative; display: flex; gap: var(--sw-carousel-gap); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; padding: 6px 6px var(--sw-space-1); margin-inline: -6px; scroll-padding-inline: 6px; }
1424
+ .sw-carousel--hero .sw-carousel__track { padding: 0; margin-inline: 0; scroll-padding-inline: 0; }
1425
+ .sw-carousel__track:focus-visible { outline: none; box-shadow: var(--sw-focus-ring); border-radius: 2px; }
1426
+ .sw-carousel__slide { flex: 0 0 calc((100% - (var(--sw-carousel-n) - 1) * var(--sw-carousel-gap) - var(--sw-carousel-peek)) / var(--sw-carousel-n)); min-width: 0; scroll-snap-align: start; }
1427
+ .sw-carousel--cards { --sw-carousel-peek: 15%; }
1428
+ @media (min-width: 640px) { .sw-carousel--per-2, .sw-carousel--per-3, .sw-carousel--per-4 { --sw-carousel-n: 2; } .sw-carousel--cards { --sw-carousel-peek: 3rem; } }
1429
+ @media (min-width: 900px) { .sw-carousel--per-3, .sw-carousel--per-4 { --sw-carousel-n: 3; } }
1430
+ @media (min-width: 1100px) { .sw-carousel--per-4 { --sw-carousel-n: 4; } }
1431
+ .sw-carousel--hero { --sw-carousel-gap: 0px; }
1432
+ .sw-block.sw-carousel--hero { padding-block: 0; }
1433
+ .sw-carousel--hero + .sw-block { padding-top: var(--sw-block-pad, 1.5rem); }
1434
+ .sw-carousel--hero .sw-carousel__body { display: flex; flex-direction: column; height: 100%; }
1435
+ .sw-carousel--hero .sw-carousel__body > * { flex: 1 0 auto; }
1436
+ .sw-carousel--full .sw-carousel__slide { min-height: 100svh; }
1437
+ .sw-carousel--testimonial .sw-carousel__slide { text-align: center; }
1438
+ .sw-carousel--testimonial .sw-carousel__body { max-width: 46rem; margin-inline: auto; font-size: 1.125rem; }
1439
+ .sw-carousel--stats .sw-carousel__slide { text-align: center; }
1440
+ .sw-page .sw-carousel--stats .sw-carousel__body > .sw-block:first-child :is(h2, h3, h4) { font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem); color: var(--sw-color-primary, #1d4ed8); font-variant-numeric: tabular-nums; }
1441
+ .sw-carousel__slide-frame { height: 100%; }
1442
+ /* With the script: no scroll bar (the controls move the row), the controls and the picker appear. */
1443
+ .sw-carousel--on .sw-carousel__track { scrollbar-width: none; }
1444
+ .sw-carousel--on:not(.sw-carousel--hero) .sw-carousel__track { padding-bottom: 6px; }
1445
+ .sw-carousel--on .sw-carousel__track::-webkit-scrollbar { display: none; }
1446
+ .sw-carousel__controls { display: flex; align-items: center; gap: var(--sw-space-1); margin-inline-start: auto; }
1447
+ .sw-carousel__controls[hidden], .sw-carousel__picker[hidden], .sw-carousel__button[hidden] { display: none; }
1448
+ .sw-carousel__button { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.75rem; font: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1; color: var(--sw-carousel-ink, var(--sw-color-primary-contrast, #ffffff)); background: var(--sw-carousel-fill, var(--sw-color-primary, #1d4ed8)); border: 2px solid var(--sw-carousel-edge, var(--sw-color-primary, #1d4ed8)); border-radius: 999px; cursor: pointer; }
1449
+ .sw-carousel__prev, .sw-carousel__next { padding: 0; }
1450
+ .sw-carousel__button[aria-disabled="true"] { opacity: 0.45; cursor: default; }
1451
+ .sw-carousel__foot { display: flex; justify-content: center; margin-top: var(--sw-space-2); }
1452
+ .sw-carousel__picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem; }
1453
+ .sw-carousel__pick { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; padding: 0; background: none; border: 0; border-radius: 999px; cursor: pointer; color: var(--sw-color-primary, #1d4ed8); }
1454
+ .sw-carousel__pick::before { content: ''; width: 0.7rem; height: 0.7rem; border-radius: 999px; border: 2px solid currentColor; background: transparent; }
1455
+ .sw-carousel__pick[aria-current="true"]::before { background: currentColor; }
1456
+ .sw-carousel__picker--thumbs { gap: var(--sw-space-1); }
1457
+ .sw-carousel__picker--thumbs .sw-carousel__pick { width: 3.25rem; height: 3.25rem; border: 2px solid transparent; }
1458
+ .sw-carousel__picker--thumbs .sw-carousel__pick::before { content: none; }
1459
+ .sw-carousel__picker--thumbs .sw-carousel__pick[aria-current="true"] { border-color: currentColor; }
1460
+ .sw-carousel__thumb { width: 2.75rem; height: 2.75rem; border-radius: 999px; object-fit: cover; }
1461
+ .sw-carousel__initial { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 999px; background: var(--sw-color-surface); color: var(--sw-color-text); font-weight: 700; }
1462
+ /* Hero: the controls and the picker sit over the slide. */
1463
+ .sw-carousel--hero .sw-carousel__head { position: absolute; inset-inline: 0; bottom: var(--sw-space-3); z-index: 2; margin: 0; pointer-events: none; }
1464
+ .sw-carousel--hero .sw-carousel__head > * { pointer-events: auto; }
1465
+ .sw-carousel--hero .sw-carousel__head:has(.sw-carousel__title) { position: static; margin-block: var(--sw-block-pad, 1.5rem) var(--sw-space-3); pointer-events: auto; }
1466
+ .sw-carousel--hero .sw-carousel__foot { position: absolute; inset-inline: 0; bottom: var(--sw-space-3); z-index: 1; justify-content: flex-start; margin: 0; pointer-events: none; }
1467
+ .sw-carousel--hero .sw-carousel__picker { pointer-events: auto; padding: 0.15rem 0.35rem; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #ffffff; }
1468
+ .sw-carousel--hero .sw-carousel__pick { color: #ffffff; }
1469
+ .sw-carousel--hero .sw-carousel__pick:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #111827; }
1470
+ /* The page builder: slides one under the other, each named. */
1471
+ .sw-carousel--editing .sw-carousel__edit-slide + .sw-carousel__edit-slide { margin-top: var(--sw-space-3); }
1472
+ .sw-page .sw-carousel__edit-label { margin: 0 auto var(--sw-space-1); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; color: var(--sw-color-muted); }
1473
+ @media (prefers-reduced-motion: no-preference) {
1474
+ html:not(.sw-reduce-motion) .sw-carousel__track { scroll-behavior: smooth; }
1475
+ }
1476
+
1477
+
1342
1478
  /* Scrollytelling: an ordinary list of steps until the motion script adds sw-story-on (wide screens only). */
1343
1479
  .sw-story__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sw-space-5, 3rem); }
1344
1480
  .sw-story__figure { margin: 0 0 var(--sw-space-2, 1rem); }
@@ -1390,6 +1526,51 @@ model-viewer:not(:defined) > .sw-model__poster { display: block; width: 100%; he
1390
1526
  .sw-video__transcript-summary { padding: var(--sw-space-1) 0; cursor: pointer; font-weight: 600; }
1391
1527
  .sw-video__transcript-summary:focus-visible { outline: 2px solid var(--sw-color-primary); outline-offset: 2px; }
1392
1528
  .sw-video__transcript-text { padding-bottom: var(--sw-space-2); }
1529
+ /* A YouTube or Vimeo video: the facade until the visitor presses play, then the player in its place. */
1530
+ .sw-video__remote { position: relative; }
1531
+ .sw-video__facade { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--sw-radius, 8px); overflow: hidden; background: #000000; color: #ffffff; cursor: pointer; text-decoration: none; }
1532
+ .sw-video__facade:focus-visible { outline: 3px solid var(--sw-color-primary); outline-offset: 3px; }
1533
+ .sw-video__poster { display: block; width: 100%; height: 100%; object-fit: cover; }
1534
+ .sw-video__poster--none { display: grid; place-items: end start; padding: 1rem 1.25rem; box-sizing: border-box; background: linear-gradient(135deg, var(--sw-color-neutral-900, #111827), #000000); color: #ffffff; font-weight: 600; text-align: start; }
1535
+ .sw-video__play { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 4.25rem; height: 4.25rem; border-radius: 999px; background: rgba(0, 0, 0, 0.72); color: #ffffff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); transition: transform 150ms ease, background-color 150ms ease; }
1536
+ .sw-video__facade:hover .sw-video__play, .sw-video__facade:focus-visible .sw-video__play { background: var(--sw-color-primary, #1d4ed8); transform: scale(1.06); }
1537
+ .sw-video__frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--sw-radius, 8px); background: #000000; }
1538
+ .sw-video__consent { margin: var(--sw-space-1, 0.5rem) 0 0; font-size: 0.875rem; color: var(--sw-color-muted); }
1539
+ .sw-video__consent[hidden] { display: none; }
1540
+ .sw-video-lightbox__stage { width: min(100%, calc((100vh - 120px) * 16 / 9)); aspect-ratio: 16 / 9; display: grid; place-items: center; }
1541
+ .sw-video-lightbox__stage .sw-video__frame { width: 100%; height: 100%; border-radius: 0; }
1542
+ .sw-video-lightbox__watch { color: #ffffff; }
1543
+
1544
+
1545
+ /* ---------- Icons ---------- */
1546
+ .sw-icon { display: inline-block; width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.2em; }
1547
+ .sw-button .sw-icon { width: 1.1em; height: 1.1em; }
1548
+ .sw-button:has(.sw-icon) { display: inline-flex; align-items: center; gap: 0.45em; }
1549
+ .sw-card__icon { display: block; width: 2.25rem; height: 2.25rem; margin-bottom: var(--sw-space-2, 0.75rem); color: var(--sw-color-primary); }
1550
+ .sw-section--on-dark .sw-card__icon, .sw-hero .sw-card__icon { color: inherit; }
1551
+ .sw-stat__icon { display: block; width: 2rem; height: 2rem; margin: 0 0 var(--sw-space-1, 0.5rem); color: var(--sw-color-primary); }
1552
+ .sw-stats--center .sw-stat__icon { margin-inline: auto; }
1553
+ .sw-section--on-dark .sw-stat__icon { color: inherit; }
1554
+
1555
+
1556
+ /* ---------- On this page ---------- */
1557
+ .sw-toc__title { margin: 0 0 var(--sw-space-1, 0.5rem); font-weight: 700; font-size: 0.95rem; }
1558
+ .sw-toc__list { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--sw-color-border); }
1559
+ .sw-toc__list--nested { border: 0; padding-inline-start: 0.85rem; }
1560
+ .sw-toc__item { margin: 0; }
1561
+ .sw-toc__link { display: block; padding: 0.3rem 0.75rem; color: var(--sw-color-text); text-decoration: none; font-size: 0.95rem; line-height: 1.35; border-inline-start: 2px solid transparent; margin-inline-start: -2px; }
1562
+ .sw-toc__list--nested .sw-toc__link { font-size: 0.9rem; color: var(--sw-color-muted); }
1563
+ .sw-toc__link:hover { color: var(--sw-color-primary); border-inline-start-color: currentColor; text-decoration: underline; }
1564
+ .sw-toc__link:focus-visible { outline: 2px solid var(--sw-color-primary); outline-offset: 2px; }
1565
+ .sw-toc__note { margin: 0; color: var(--sw-color-muted); font-size: 0.9rem; }
1566
+ .sw-toc--sticky { position: sticky; top: var(--sw-toc-top, 1rem); align-self: start; max-height: calc(100vh - 2rem); overflow: auto; }
1567
+ /* In a sidebar placement the blocks' wrappers take the sidebar's full height, so the list has room to stay in view. */
1568
+ .sw-region:has(.sw-toc--sticky) > .sw-page, .sw-region:has(.sw-toc--sticky) > .sw-page > .sw-page { height: 100%; }
1569
+ /* Jump targets clear a sticky header; jumps scroll smoothly unless the visitor asked for reduced motion. */
1570
+ .sw-heading__text[id], .sw-section[id] { scroll-margin-top: var(--sw-anchor-offset, 5rem); }
1571
+ @media (prefers-reduced-motion: no-preference) {
1572
+ html:has(.sw-toc):not(.sw-reduce-motion) { scroll-behavior: smooth; }
1573
+ }
1393
1574
 
1394
1575
 
1395
1576
  /* Motion: entrances (armed by the page's motion script), stagger and hover. */
@@ -1421,12 +1602,13 @@ model-viewer:not(:defined) > .sw-model__poster { display: block; width: 100%; he
1421
1602
  [data-sw-motion="subtle"] [data-motion-scroll="parallax"] { --sw-parallax: 8%; }
1422
1603
  [data-sw-motion] [data-motion-scroll="parallax"].sw-hero--image { overflow: hidden; }
1423
1604
  [data-sw-motion] [data-motion-scroll="parallax"] .sw-hero__bg { transform: translateY(calc((var(--sw-scroll, 0.5) - 0.5) * var(--sw-parallax))) scale(1.18); will-change: transform; }
1605
+ [data-sw-motion] [data-motion-scroll="parallax"].sw-section--media > :is(.sw-section__bg, picture > .sw-section__bg) { transform: translateY(calc((var(--sw-scroll, 0.5) - 0.5) * var(--sw-parallax))) scale(1.18); will-change: transform; }
1424
1606
  [data-sw-motion] [data-motion-scroll="parallax"].sw-hero--image:not(:has(.sw-hero__bg)) { background-position: center calc(50% + (var(--sw-scroll, 0.5) - 0.5) * var(--sw-parallax) * 4); }
1425
1607
  [data-sw-motion] [data-motion-scroll="fade-out"] { opacity: clamp(0, calc((1 - var(--sw-scroll, 0)) / 0.35), 1); }
1426
1608
  [data-sw-motion] [data-motion-scroll="pin"] { position: sticky; top: 0; z-index: 0; }
1427
1609
  [data-sw-motion] [data-motion-scroll="pin"] ~ * { position: relative; z-index: 1; }
1428
1610
  .sw-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
1429
- .sw-hero { position: relative; }
1611
+ .sw-hero, .sw-section--media { position: relative; }
1430
1612
  .sw-video-toggle { position: absolute; right: var(--sw-space-3, 1rem); bottom: var(--sw-space-3, 1rem); z-index: 1; font: inherit; font-size: 0.8125rem; color: #ffffff; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 999px; padding: 0.3rem 0.85rem; cursor: pointer; }
1431
1613
  .sw-video-toggle:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
1432
1614
  /* Marquee (Logo strip, Testimonials): the page script adds sw-marquee-on and copies the items (the copies are hidden from
package/dist/styles.js CHANGED
@@ -31,6 +31,15 @@ export const blockStyleSlots = {
31
31
  ],
32
32
  Heading: [{ key: 'tone', label: 'Tone', options: [opt('default', 'Default'), opt('muted', 'Muted'), opt('accent', 'Accent')], default: 'default' }],
33
33
  Text: [{ key: 'tone', label: 'Tone', options: [opt('default', 'Default'), opt('muted', 'Muted'), opt('accent', 'Accent')], default: 'default' }],
34
+ Accordion: [
35
+ { key: 'look', label: 'Items', options: [opt('lines', 'Divided by lines'), opt('boxed', 'Boxed')], default: 'lines', help: 'Boxed puts each item in a bordered box on the surface color.' },
36
+ { key: 'icon', label: 'Icon', options: [opt('plus', 'Plus and minus'), opt('chevron', 'Chevron')], default: 'plus' },
37
+ ],
38
+ Tabs: [{ key: 'look', label: 'Tabs', options: [opt('underline', 'Underlined'), opt('pills', 'Pills')], default: 'underline', help: 'Pills fill the selected tab with the primary color.' }],
39
+ Carousel: [
40
+ { key: 'frame', label: 'Slides', options: [opt('none', 'No frame'), opt('card', 'Card')], default: 'none', help: 'Card puts each slide in a bordered box on the surface color (not on the hero variant).' },
41
+ { key: 'controls', label: 'Buttons', options: [opt('solid', 'Solid'), opt('outline', 'Outline')], default: 'solid' },
42
+ ],
34
43
  };
35
44
  const style = (block, key, label, description, tokens, isDefault = false) => ({
36
45
  block,
@@ -59,6 +68,12 @@ export const builtInBlockStyles = [
59
68
  style('Text', 'default', 'Default', 'The body text color.', { tone: 'default' }, true),
60
69
  style('Text', 'muted', 'Muted', 'The muted text color, for secondary copy.', { tone: 'muted' }),
61
70
  style('Text', 'accent', 'Accent', 'The accent color, for a short highlighted passage.', { tone: 'accent' }),
71
+ style('Accordion', 'lines', 'Lines', 'Items divided by thin lines, a plus that turns into a minus.', { look: 'lines', icon: 'plus' }, true),
72
+ style('Accordion', 'boxed', 'Boxed', 'Each item in a bordered box on the surface color, with a chevron.', { look: 'boxed', icon: 'chevron' }),
73
+ style('Tabs', 'underline', 'Underline', 'The selected tab underlined in the primary color.', { look: 'underline' }, true),
74
+ style('Tabs', 'pills', 'Pills', 'Rounded tabs; the selected one filled with the primary color.', { look: 'pills' }),
75
+ style('Carousel', 'plain', 'Plain', 'Slides without a frame and solid buttons in the primary color.', { frame: 'none', controls: 'solid' }, true),
76
+ style('Carousel', 'framed', 'Framed', 'Each slide in a card on the surface color and outlined buttons.', { frame: 'card', controls: 'outline' }),
62
77
  ];
63
78
  /** The built-in default style key of each styled core block (renders fall back to it when nothing resolved a style). */
64
79
  export const builtInDefaultStyle = Object.fromEntries(builtInBlockStyles.filter((s) => s.isDefault).map((s) => [s.block, s.key]));
@@ -70,6 +85,10 @@ export function styleClassFor(block, key) {
70
85
  // ---------- sample props ----------
71
86
  /** A neutral landscape (sky, hills) as an inline SVG, so a sample shows how a style treats an image without loading one. */
72
87
  export const BLOCK_STYLE_SAMPLE_IMAGE = `data:image/svg+xml,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 360"><defs><linearGradient id="s" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#7aa7c7"/><stop offset="1" stop-color="#d9e6ef"/></linearGradient></defs><rect width="640" height="360" fill="url(#s)"/><path d="M0 250 Q160 170 320 240 T640 220 V360 H0Z" fill="#5d7f5a"/><path d="M0 300 Q200 240 400 300 T640 290 V360 H0Z" fill="#3f5f3d"/></svg>')}`;
88
+ /** A Text block inside a sample's slot. */
89
+ function sampleText(content) {
90
+ return { type: 'Text', props: { id: `Text-sample-${content.length}`, content, format: 'paragraphs', size: 'normal', align: 'left' } };
91
+ }
73
92
  /**
74
93
  * Sample props per styled core block: enough to show every part a style changes. Brand → Styles previews, the page builder's
75
94
  * Style field and the style guide (Brand → Style guide, /brand) all render the blocks with these.
@@ -81,6 +100,42 @@ export const blockStyleSampleProps = {
81
100
  CallToAction: { title: 'Ready to get started?', text: 'Tell the reader what happens next.', buttonLabel: 'Contact us', buttonHref: '#' },
82
101
  Heading: { text: 'A section heading', level: 'h2', align: 'left' },
83
102
  Text: { content: 'Body copy in this style. A second sentence shows how a paragraph reads.', format: 'paragraphs', size: 'normal', align: 'left' },
103
+ Accordion: {
104
+ title: '',
105
+ headingLevel: 'h3',
106
+ open: 'multiple',
107
+ openFirst: true,
108
+ faq: false,
109
+ width: 'normal',
110
+ items: [
111
+ { title: 'First question', anchor: '', content: [sampleText('The answer, with as much detail as it needs.')] },
112
+ { title: 'Second question', anchor: '', content: [sampleText('Another answer.')] },
113
+ ],
114
+ },
115
+ Tabs: {
116
+ title: '',
117
+ orientation: 'horizontal',
118
+ headingLevel: 'h3',
119
+ tabs: [
120
+ { label: 'Overview', anchor: 'sample-overview', content: [sampleText('What the first tab holds.')] },
121
+ { label: 'Details', anchor: 'sample-details', content: [sampleText('What the second tab holds.')] },
122
+ ],
123
+ },
124
+ Carousel: {
125
+ title: 'Featured',
126
+ showTitle: false,
127
+ variant: 'cards',
128
+ perView: 2,
129
+ height: 'auto',
130
+ autoplay: false,
131
+ interval: 7,
132
+ loop: false,
133
+ slides: [
134
+ { label: 'First', thumbnail: '', content: [sampleText('A first slide.')] },
135
+ { label: 'Second', thumbnail: '', content: [sampleText('A second slide.')] },
136
+ { label: 'Third', thumbnail: '', content: [sampleText('A third slide.')] },
137
+ ],
138
+ },
84
139
  };
85
140
  // ---------- tokens ----------
86
141
  const PRIMARY = 'var(--sw-color-primary, #1d4ed8)';
@@ -191,6 +246,37 @@ function ctaRules(s, t) {
191
246
  ...(!card && bg !== 'none' ? [[`${s} + .sw-block`, 'padding-top:var(--sw-block-pad, 1.5rem)']] : []),
192
247
  ];
193
248
  }
249
+ function accordionRules(s, t) {
250
+ const boxed = t.look === 'boxed';
251
+ const chevron = t.icon === 'chevron';
252
+ return [
253
+ [`${s} .sw-accordion__list`, boxed ? 'gap:var(--sw-space-1);border-top:0' : 'gap:0;border-top:1px solid var(--sw-color-border)'],
254
+ [`${s} .sw-accordion__item`, boxed ? `border:1px solid var(--sw-color-border);border-radius:var(--sw-radius, 8px);background:${SURFACE};padding-inline:var(--sw-space-2)` : 'border:0;border-bottom:1px solid var(--sw-color-border);border-radius:0;background:transparent;padding-inline:0'],
255
+ // Plus: two bars, the upright one turns flat when open. Chevron: two short bars at an angle that flip when open.
256
+ [`${s} .sw-accordion__icon::before`, chevron ? 'left:0;width:60%;transform:translateX(0.05rem) rotate(45deg)' : 'left:0;width:100%;transform:none'],
257
+ [`${s} .sw-accordion__icon::after`, chevron ? 'left:40%;width:60%;transform:translateX(-0.05rem) rotate(-45deg)' : 'left:0;width:100%;transform:rotate(90deg)'],
258
+ [`${s} .sw-accordion__trigger[aria-expanded="true"] .sw-accordion__icon::before`, chevron ? 'left:0;width:60%;transform:translateX(0.05rem) rotate(-45deg)' : 'left:0;width:100%;transform:none'],
259
+ [`${s} .sw-accordion__trigger[aria-expanded="true"] .sw-accordion__icon::after`, chevron ? 'left:40%;width:60%;transform:translateX(-0.05rem) rotate(45deg)' : 'left:0;width:100%;transform:rotate(0deg)'],
260
+ ];
261
+ }
262
+ function tabsRules(s, t) {
263
+ const pills = t.look === 'pills';
264
+ const tab = `.sw-page ${s} .sw-tabs__tab`;
265
+ return [
266
+ [`${s} .sw-tabs__list`, pills ? 'border-bottom:0;border-inline-end:0;gap:var(--sw-space-1)' : 'gap:var(--sw-space-1)'],
267
+ [tab, pills ? 'border-radius:999px;background:transparent;border:1px solid var(--sw-color-border)' : 'border:0;background:transparent'],
268
+ [`${tab}[aria-selected="true"]`, pills ? `background:${PRIMARY};color:${CONTRAST};border-color:${PRIMARY};box-shadow:none` : 'background:transparent;color:var(--sw-color-text);border-color:transparent'],
269
+ ...(pills ? [[`.sw-page ${s}.sw-tabs--vertical .sw-tabs__tab`, 'border-radius:999px', WIDE]] : []),
270
+ ];
271
+ }
272
+ function carouselRules(s, t) {
273
+ const card = t.frame === 'card';
274
+ const outline = t.controls === 'outline';
275
+ return [
276
+ [`${s}:not(.sw-carousel--hero) .sw-carousel__slide`, card ? `border:1px solid var(--sw-color-border);border-radius:var(--sw-radius, 8px);background:${SURFACE};padding:var(--sw-space-3)` : 'border:0;border-radius:0;background:transparent;padding:0'],
277
+ [s, outline ? `--sw-carousel-fill:${PAGE_BG};--sw-carousel-ink:${PRIMARY};--sw-carousel-edge:currentColor` : `--sw-carousel-fill:${PRIMARY};--sw-carousel-ink:${CONTRAST};--sw-carousel-edge:${PRIMARY}`],
278
+ ];
279
+ }
194
280
  const TONE = { default: 'inherit', muted: 'var(--sw-color-muted)', accent: `var(--sw-color-accent, ${PRIMARY})` };
195
281
  /**
196
282
  * The CSS of one core block style, or '' when the block has no slots or the key is not a valid style key. A slot value outside
@@ -222,6 +308,15 @@ export function blockStyleCss(s) {
222
308
  case 'Text':
223
309
  rules = [[`${sel} .sw-prose`, `color:${TONE[t.tone]}`]];
224
310
  break;
311
+ case 'Accordion':
312
+ rules = accordionRules(sel, t);
313
+ break;
314
+ case 'Tabs':
315
+ rules = tabsRules(sel, t);
316
+ break;
317
+ case 'Carousel':
318
+ rules = carouselRules(sel, t);
319
+ break;
225
320
  default:
226
321
  rules = [];
227
322
  }