@contentrain/astro-kit 0.4.0 → 0.6.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 (71) hide show
  1. package/README.md +2 -0
  2. package/catalog.json +1519 -165
  3. package/components/_shared/KitImage.astro +10 -4
  4. package/components/_shared/image.ts +14 -0
  5. package/components/_shared/types.ts +2 -1
  6. package/components/announcement/Announcement.astro +53 -0
  7. package/components/announcement/fixtures.json +6 -0
  8. package/components/announcement/meta.json +53 -0
  9. package/components/card-grid/CardGrid.astro +5 -3
  10. package/components/card-grid/meta.json +25 -11
  11. package/components/consent/Consent.astro +87 -0
  12. package/components/consent/fixtures.json +4 -0
  13. package/components/consent/meta.json +67 -0
  14. package/components/contact-details/ContactDetails.astro +74 -0
  15. package/components/contact-details/fixtures.json +4 -0
  16. package/components/contact-details/meta.json +105 -0
  17. package/components/contact-form/ContactForm.astro +22 -6
  18. package/components/contact-form/fixtures.json +2 -1
  19. package/components/contact-form/meta.json +7 -6
  20. package/components/cta/meta.json +4 -4
  21. package/components/faq/Faq.astro +1 -1
  22. package/components/faq/meta.json +7 -7
  23. package/components/feature-list/FeatureList.astro +85 -0
  24. package/components/feature-list/fixtures.json +129 -0
  25. package/components/feature-list/meta.json +118 -0
  26. package/components/footer/Footer.astro +15 -7
  27. package/components/footer/fixtures.json +3 -1
  28. package/components/footer/meta.json +12 -0
  29. package/components/gallery/Gallery.astro +7 -3
  30. package/components/gallery/meta.json +6 -6
  31. package/components/header/Header.astro +6 -4
  32. package/components/header/fixtures.json +2 -1
  33. package/components/hero/meta.json +30 -8
  34. package/components/logo-cloud/LogoCloud.astro +69 -0
  35. package/components/logo-cloud/fixtures.json +139 -0
  36. package/components/logo-cloud/meta.json +107 -0
  37. package/components/nav/Nav.astro +11 -4
  38. package/components/nav/fixtures.json +1 -0
  39. package/components/nav/meta.json +8 -0
  40. package/components/newsletter/meta.json +12 -0
  41. package/components/pricing/Pricing.astro +94 -0
  42. package/components/pricing/fixtures.json +6 -0
  43. package/components/pricing/meta.json +133 -0
  44. package/components/prose/Prose.astro +7 -3
  45. package/components/prose/fixtures.json +2 -1
  46. package/components/prose/meta.json +5 -2
  47. package/components/slider/Slider.astro +15 -3
  48. package/components/slider/meta.json +8 -8
  49. package/components/split/Split.astro +64 -0
  50. package/components/split/fixtures.json +6 -0
  51. package/components/split/meta.json +154 -0
  52. package/components/stats/Stats.astro +66 -0
  53. package/components/stats/fixtures.json +98 -0
  54. package/components/stats/meta.json +113 -0
  55. package/components/steps/Steps.astro +77 -0
  56. package/components/steps/fixtures.json +5 -0
  57. package/components/steps/meta.json +105 -0
  58. package/components/team/Team.astro +82 -0
  59. package/components/team/fixtures.json +5 -0
  60. package/components/team/meta.json +116 -0
  61. package/components/testimonial/Testimonial.astro +5 -3
  62. package/components/testimonial/meta.json +21 -20
  63. package/dist/index.d.mts +115 -2
  64. package/dist/index.d.mts.map +1 -1
  65. package/dist/index.mjs +175 -3
  66. package/dist/index.mjs.map +1 -1
  67. package/mapping/classic.json +51 -6
  68. package/mapping/divi.json +359 -9
  69. package/mapping/elementor.json +581 -8
  70. package/mapping/gutenberg.json +420 -4
  71. package/package.json +2 -2
@@ -0,0 +1,66 @@
1
+ ---
2
+ // A row of figures, each with a short label, under an optional heading and
3
+ // intro. Figures are static text: no counting animation.
4
+ import { tv } from 'tailwind-variants'
5
+ import Section, { type Tone } from '../_shared/Section.astro'
6
+
7
+ const stats = tv({
8
+ slots: {
9
+ list: 'grid grid-cols-2 gap-6 md:gap-8',
10
+ item: 'flex flex-col-reverse gap-1',
11
+ value: 'text-4xl [font-weight:var(--font-weight-heading,700)] tracking-tight tabular-nums md:text-5xl',
12
+ label: 'text-sm opacity-80',
13
+ },
14
+ variants: {
15
+ columns: {
16
+ '2': { list: 'md:grid-cols-2' },
17
+ '3': { list: 'md:grid-cols-3' },
18
+ '4': { list: 'md:grid-cols-4' },
19
+ },
20
+ style: {
21
+ plain: {},
22
+ card: { item: 'rounded-[var(--radius-card)] bg-surface p-6 text-ink ring-1 ring-line/60' },
23
+ },
24
+ // accent/accent-ink is only ~5:1 — dimming text on it drops it under 4.5:1 (WCAG 1.4.3).
25
+ tone: { default: {}, muted: {}, inverse: {}, accent: { label: 'opacity-100' } },
26
+ },
27
+ defaultVariants: { columns: '3', style: 'plain', tone: 'default' },
28
+ })
29
+
30
+ interface Item {
31
+ value: string
32
+ label: string
33
+ prefix?: string | undefined
34
+ suffix?: string | undefined
35
+ }
36
+
37
+ interface Props {
38
+ heading?: string | undefined
39
+ intro?: string | undefined
40
+ items: Item[]
41
+ columns?: '2' | '3' | '4' | undefined
42
+ style?: 'plain' | 'card' | undefined
43
+ tone?: Tone | undefined
44
+ id?: string | undefined
45
+ }
46
+
47
+ const { heading, intro, items, columns, style, tone, id } = Astro.props
48
+ const s = stats({ columns, style, tone })
49
+ const headingId = heading && id ? `${id}-title` : undefined
50
+ ---
51
+ <Section tone={tone} id={id} aria-labelledby={headingId}>
52
+ {(heading || intro) && (
53
+ <header class="mb-10 flex max-w-2xl flex-col gap-3">
54
+ {heading && <h2 id={headingId} class="text-3xl [font-weight:var(--font-weight-heading,700)] tracking-tight text-balance md:text-4xl">{heading}</h2>}
55
+ {intro && <p class:list={['text-lg', tone === 'accent' ? undefined : 'opacity-80']} data-kit-text>{intro}</p>}
56
+ </header>
57
+ )}
58
+ <dl class={s.list()}>
59
+ {items.map(item => (
60
+ <div class={s.item()}>
61
+ <dt class={s.label()}>{item.label}</dt>
62
+ <dd class={s.value()}>{item.prefix}{item.value}{item.suffix}</dd>
63
+ </div>
64
+ ))}
65
+ </dl>
66
+ </Section>
@@ -0,0 +1,98 @@
1
+ [
2
+ {
3
+ "name": "three-plain",
4
+ "props": {
5
+ "heading": "By the numbers",
6
+ "intro": "A decade of shipping sites for small teams.",
7
+ "items": [
8
+ {
9
+ "value": "12",
10
+ "label": "Years in business",
11
+ "suffix": "+"
12
+ },
13
+ {
14
+ "value": "480",
15
+ "label": "Clients served"
16
+ },
17
+ {
18
+ "value": "99.9",
19
+ "label": "Uptime",
20
+ "suffix": "%"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "name": "four-card-muted",
27
+ "props": {
28
+ "items": [
29
+ {
30
+ "value": "12",
31
+ "label": "Years in business",
32
+ "suffix": "+"
33
+ },
34
+ {
35
+ "value": "480",
36
+ "label": "Clients served"
37
+ },
38
+ {
39
+ "value": "99.9",
40
+ "label": "Uptime",
41
+ "suffix": "%"
42
+ },
43
+ {
44
+ "value": "2",
45
+ "label": "Revenue handled",
46
+ "prefix": "$",
47
+ "suffix": "M"
48
+ }
49
+ ],
50
+ "columns": "4",
51
+ "style": "card",
52
+ "tone": "muted"
53
+ }
54
+ },
55
+ {
56
+ "name": "two-inverse",
57
+ "props": {
58
+ "heading": "Results",
59
+ "items": [
60
+ {
61
+ "value": "12",
62
+ "label": "Years in business",
63
+ "suffix": "+"
64
+ },
65
+ {
66
+ "value": "480",
67
+ "label": "Clients served"
68
+ }
69
+ ],
70
+ "columns": "2",
71
+ "tone": "inverse"
72
+ }
73
+ },
74
+ {
75
+ "name": "card-accent",
76
+ "props": {
77
+ "heading": "Our reach",
78
+ "items": [
79
+ {
80
+ "value": "12",
81
+ "label": "Years in business",
82
+ "suffix": "+"
83
+ },
84
+ {
85
+ "value": "480",
86
+ "label": "Clients served"
87
+ },
88
+ {
89
+ "value": "99.9",
90
+ "label": "Uptime",
91
+ "suffix": "%"
92
+ }
93
+ ],
94
+ "style": "card",
95
+ "tone": "accent"
96
+ }
97
+ }
98
+ ]
@@ -0,0 +1,113 @@
1
+ {
2
+ "id": "stats",
3
+ "name": "Stats",
4
+ "description": "A row of figures with a short label each (years in business, clients, uptime), with an optional heading and intro. The counter/number section of a landing page; numbers are static text, not animated.",
5
+ "category": "section",
6
+ "uses": [],
7
+ "shared": [
8
+ "Section.astro"
9
+ ],
10
+ "variants": {
11
+ "columns": {
12
+ "options": [
13
+ "2",
14
+ "3",
15
+ "4"
16
+ ],
17
+ "default": "3",
18
+ "description": "Figures per row on wide screens; two on phones."
19
+ },
20
+ "style": {
21
+ "options": [
22
+ "plain",
23
+ "card"
24
+ ],
25
+ "default": "plain",
26
+ "description": "plain: figures on the section background. card: each figure in its own box."
27
+ },
28
+ "tone": {
29
+ "options": [
30
+ "default",
31
+ "muted",
32
+ "inverse",
33
+ "accent"
34
+ ],
35
+ "default": "default",
36
+ "description": "Section background."
37
+ }
38
+ },
39
+ "props": {
40
+ "heading": {
41
+ "type": "string",
42
+ "label": "Heading",
43
+ "description": "Section heading."
44
+ },
45
+ "intro": {
46
+ "type": "text",
47
+ "label": "Introduction",
48
+ "description": "A sentence under the heading."
49
+ },
50
+ "items": {
51
+ "type": "array",
52
+ "label": "Figures",
53
+ "required": true,
54
+ "items": {
55
+ "type": "object",
56
+ "fields": {
57
+ "value": {
58
+ "type": "string",
59
+ "label": "Figure",
60
+ "required": true,
61
+ "description": "The number as shown, without prefix or suffix (`120`, `4.9`, `24/7`)."
62
+ },
63
+ "label": {
64
+ "type": "string",
65
+ "label": "Label",
66
+ "required": true,
67
+ "description": "What the figure counts (Clients, Countries)."
68
+ },
69
+ "prefix": {
70
+ "type": "string",
71
+ "label": "Prefix",
72
+ "description": "Printed before the figure (`$`, `~`)."
73
+ },
74
+ "suffix": {
75
+ "type": "string",
76
+ "label": "Suffix",
77
+ "description": "Printed after the figure (`+`, `%`, `k`)."
78
+ }
79
+ }
80
+ },
81
+ "description": "The figures, in order (Elementor counter, Divi number counter, a Gutenberg columns row of big numbers)."
82
+ },
83
+ "id": {
84
+ "type": "string",
85
+ "content": false,
86
+ "description": "Anchor id of the section; the heading gets `<id>-title`."
87
+ }
88
+ },
89
+ "slots": {},
90
+ "js": "none",
91
+ "dependencies": {},
92
+ "sources": {
93
+ "gutenberg": [
94
+ "core/columns"
95
+ ],
96
+ "elementor": [
97
+ "elementor/counter"
98
+ ],
99
+ "divi": [
100
+ "divi/et_pb_number_counter",
101
+ "divi/et_pb_circle_counter"
102
+ ]
103
+ },
104
+ "a11y": "A description list: each label is the term, each figure its value, so a screen reader reads them as pairs. The section is labelled by its heading.",
105
+ "pattern": {
106
+ "summary": "row of big numbers with short labels",
107
+ "signals": [
108
+ "2–4 columns",
109
+ "repeated number + label",
110
+ "no images"
111
+ ]
112
+ }
113
+ }
@@ -0,0 +1,77 @@
1
+ ---
2
+ // How it works: an ordered sequence of steps, each a title and a line of
3
+ // text, optionally with an image — as a vertical list or a row across the
4
+ // page, numbered or plain.
5
+ import { tv } from 'tailwind-variants'
6
+ import KitImage from '../_shared/KitImage.astro'
7
+ import Section from '../_shared/Section.astro'
8
+ import { imageOf, type ImageSource } from '../_shared/image'
9
+
10
+ const steps = tv({
11
+ slots: {
12
+ header: 'mb-10 flex max-w-2xl flex-col gap-3',
13
+ heading: 'text-3xl [font-weight:var(--font-weight-heading,700)] tracking-tight text-balance md:text-4xl',
14
+ intro: 'text-lg opacity-80',
15
+ list: 'grid gap-8 [counter-reset:kit-step]',
16
+ step: 'flex gap-4 [counter-increment:kit-step]',
17
+ body: 'flex flex-col gap-2',
18
+ media: 'mb-2 overflow-hidden rounded-[var(--radius-image,var(--radius-card))]',
19
+ title: 'text-lg leading-snug [font-weight:var(--font-weight-heading,600)] text-balance',
20
+ text: 'text-pretty opacity-80',
21
+ },
22
+ variants: {
23
+ layout: {
24
+ list: { list: 'max-w-3xl' },
25
+ row: { list: 'sm:grid-cols-2 lg:auto-cols-fr lg:grid-flow-col lg:grid-cols-none', step: 'flex-col' },
26
+ },
27
+ // The number is drawn from a CSS counter, so the list stays one <ol> a screen reader counts itself.
28
+ style: {
29
+ numbered: { step: "before:flex before:size-10 before:shrink-0 before:items-center before:justify-center before:rounded-full before:bg-accent before:font-semibold before:text-accent-ink before:content-[counter(kit-step)]" },
30
+ plain: { step: 'border-l-2 border-accent pl-4' },
31
+ },
32
+ },
33
+ defaultVariants: { layout: 'list', style: 'numbered' },
34
+ })
35
+
36
+ interface Step {
37
+ title: string
38
+ text: string
39
+ /** The image's address. */
40
+ image?: ImageSource | undefined
41
+ imageAlt?: string | undefined
42
+ }
43
+
44
+ interface Props {
45
+ heading?: string | undefined
46
+ intro?: string | undefined
47
+ items: Step[]
48
+ layout?: 'list' | 'row' | undefined
49
+ style?: 'numbered' | 'plain' | undefined
50
+ id?: string | undefined
51
+ }
52
+
53
+ const { heading, intro, items, layout, style, id } = Astro.props
54
+ const s = steps({ layout, style })
55
+ const headingId = heading && id ? `${id}-title` : undefined
56
+ ---
57
+ {items.length > 0 && (
58
+ <Section id={id} aria-labelledby={headingId}>
59
+ {(heading || intro) && (
60
+ <header class={s.header()}>
61
+ {heading && <h2 id={headingId} class={s.heading()}>{heading}</h2>}
62
+ {intro && <p class={s.intro()} data-kit-text>{intro}</p>}
63
+ </header>
64
+ )}
65
+ <ol class={s.list()}>
66
+ {items.map(step => (
67
+ <li class={s.step()}>
68
+ <div class={s.body()}>
69
+ {imageOf(step.image, step.imageAlt) && <div class={s.media()}><KitImage image={imageOf(step.image, step.imageAlt)!} sizes="(min-width: 1024px) 25vw, (min-width: 640px) 50vw, 100vw" class="aspect-[3/2] w-full object-cover" /></div>}
70
+ <h3 class={s.title()}>{step.title}</h3>
71
+ <p class={s.text()} data-kit-text>{step.text}</p>
72
+ </div>
73
+ </li>
74
+ ))}
75
+ </ol>
76
+ </Section>
77
+ )}
@@ -0,0 +1,5 @@
1
+ [
2
+ {"name": "list-numbered", "props": {"id": "how", "heading": "How it works", "intro": "Three steps from WordPress to a static site.", "items": [{"title": "Connect", "text": "Point us at your site; we read everything it publishes."}, {"title": "Review", "text": "Check the plan: every page, model and redirect."}, {"title": "Launch", "text": "Deploy the new site; every old address still works."}]}},
3
+ {"name": "row-plain-images", "props": {"layout": "row", "style": "plain", "heading": "Our process", "items": [{"title": "Discover", "text": "We learn the site and its readers.", "image": "/kit-fixtures/photo-1.svg"}, {"title": "Design", "text": "We draw the pages and the system.", "image": "/kit-fixtures/photo-2.svg"}, {"title": "Build", "text": "We ship it, fast and accessible.", "image": "/kit-fixtures/photo-3.svg", "imageAlt": "A laptop showing the finished site"}]}},
4
+ {"name": "row-numbered", "props": {"layout": "row", "items": [{"title": "Sign up", "text": "One minute, no card."}, {"title": "Import", "text": "Bring your content."}, {"title": "Edit", "text": "Change it in Studio."}, {"title": "Publish", "text": "Push and it is live."}]}}
5
+ ]
@@ -0,0 +1,105 @@
1
+ {
2
+ "id": "steps",
3
+ "name": "Steps",
4
+ "description": "How it works: an ordered sequence of steps, each a title and a line of text with an optional image, as a vertical list or a row, numbered or plain.",
5
+ "category": "section",
6
+ "uses": [],
7
+ "shared": [
8
+ "KitImage.astro",
9
+ "Section.astro",
10
+ "image.ts",
11
+ "types.ts"
12
+ ],
13
+ "variants": {
14
+ "layout": {
15
+ "options": [
16
+ "list",
17
+ "row"
18
+ ],
19
+ "default": "list",
20
+ "description": "A vertical list, or one row across the page on wide screens."
21
+ },
22
+ "style": {
23
+ "options": [
24
+ "numbered",
25
+ "plain"
26
+ ],
27
+ "default": "numbered",
28
+ "description": "A number badge before each step, or an accent rule beside it."
29
+ }
30
+ },
31
+ "props": {
32
+ "heading": {
33
+ "type": "string",
34
+ "label": "Heading",
35
+ "description": "Section heading above the steps."
36
+ },
37
+ "intro": {
38
+ "type": "text",
39
+ "label": "Intro",
40
+ "description": "A line or two under the heading."
41
+ },
42
+ "items": {
43
+ "type": "array",
44
+ "label": "Steps",
45
+ "required": true,
46
+ "items": {
47
+ "type": "object",
48
+ "fields": {
49
+ "title": {
50
+ "type": "string",
51
+ "label": "Title",
52
+ "required": true,
53
+ "description": "The step's name."
54
+ },
55
+ "text": {
56
+ "type": "text",
57
+ "label": "Text",
58
+ "required": true,
59
+ "description": "What happens in this step."
60
+ },
61
+ "image": {
62
+ "type": "image",
63
+ "label": "Image",
64
+ "description": "An image for the step."
65
+ },
66
+ "imageAlt": {
67
+ "type": "string",
68
+ "label": "Image description",
69
+ "description": "What the image shows; empty if decorative."
70
+ }
71
+ }
72
+ },
73
+ "description": "The steps, in order (Elementor icon boxes, Divi blurbs, Gutenberg columns of heading + text)."
74
+ },
75
+ "id": {
76
+ "type": "string",
77
+ "content": false,
78
+ "description": "Anchor id of the section; the heading gets `<id>-title`."
79
+ }
80
+ },
81
+ "slots": {},
82
+ "js": "none",
83
+ "dependencies": {},
84
+ "sources": {
85
+ "gutenberg": [
86
+ "core/columns"
87
+ ],
88
+ "elementor": [
89
+ "elementor/icon-box"
90
+ ],
91
+ "divi": [
92
+ "divi/et_pb_blurb"
93
+ ]
94
+ },
95
+ "a11y": "Steps are an <ol>, so their order and count are announced; the visible numbers are CSS counters, not text. Each title is an <h3>. The section is labelled by its heading when it has one.",
96
+ "pattern": {
97
+ "summary": "ordered sequence: numbered title + short text units",
98
+ "signals": [
99
+ "3+ repeated units",
100
+ "number or step label",
101
+ "title",
102
+ "short text"
103
+ ]
104
+ }
105
+ }
@@ -0,0 +1,82 @@
1
+ ---
2
+ // The people behind the site: a portrait, a name, a role and a short bio for
3
+ // each, as a grid of cards or plain entries. A member with a page links to it.
4
+ import { tv } from 'tailwind-variants'
5
+ import KitImage from '../_shared/KitImage.astro'
6
+ import Section from '../_shared/Section.astro'
7
+ import { imageOf, type ImageSource } from '../_shared/image'
8
+
9
+ const team = tv({
10
+ slots: {
11
+ header: 'mb-10 flex max-w-2xl flex-col gap-3',
12
+ heading: 'text-3xl [font-weight:var(--font-weight-heading,700)] tracking-tight text-balance md:text-4xl',
13
+ intro: 'text-lg opacity-80',
14
+ list: 'grid gap-6 sm:grid-cols-2 md:gap-8',
15
+ member: 'group relative flex flex-col gap-3',
16
+ portrait: 'overflow-hidden rounded-[var(--radius-image,var(--radius-card))]',
17
+ name: 'text-lg leading-snug [font-weight:var(--font-weight-heading,600)]',
18
+ role: 'text-sm font-medium text-accent',
19
+ bio: 'text-pretty opacity-80',
20
+ },
21
+ variants: {
22
+ columns: {
23
+ '2': {},
24
+ '3': { list: 'md:grid-cols-3' },
25
+ '4': { list: 'lg:grid-cols-4' },
26
+ },
27
+ style: {
28
+ card: { member: 'rounded-card border border-line p-6', portrait: '-mx-6 -mt-6 mb-2 rounded-b-none' },
29
+ plain: {},
30
+ },
31
+ },
32
+ defaultVariants: { columns: '3', style: 'card' },
33
+ })
34
+
35
+ interface Member {
36
+ name: string
37
+ role?: string | undefined
38
+ bio?: string | undefined
39
+ /** The portrait's address. */
40
+ image?: ImageSource | undefined
41
+ imageAlt?: string | undefined
42
+ href?: string | undefined
43
+ }
44
+
45
+ interface Props {
46
+ heading?: string | undefined
47
+ intro?: string | undefined
48
+ items: Member[]
49
+ columns?: '2' | '3' | '4' | undefined
50
+ style?: 'card' | 'plain' | undefined
51
+ id?: string | undefined
52
+ }
53
+
54
+ const { heading, intro, items, columns, style, id } = Astro.props
55
+ const s = team({ columns, style })
56
+ const headingId = heading && id ? `${id}-title` : undefined
57
+ ---
58
+ {items.length > 0 && (
59
+ <Section id={id} aria-labelledby={headingId}>
60
+ {(heading || intro) && (
61
+ <header class={s.header()}>
62
+ {heading && <h2 id={headingId} class={s.heading()}>{heading}</h2>}
63
+ {intro && <p class={s.intro()} data-kit-text>{intro}</p>}
64
+ </header>
65
+ )}
66
+ <ul class={s.list()}>
67
+ {items.map(member => (
68
+ <li class={s.member()}>
69
+ {/* The portrait's text defaults to the name: a photo of a named person is not decoration. */}
70
+ {imageOf(member.image, member.imageAlt ?? member.name) && <div class={s.portrait()}><KitImage image={imageOf(member.image, member.imageAlt ?? member.name)!} sizes="(min-width: 1024px) 25vw, (min-width: 640px) 50vw, 100vw" class="aspect-square w-full object-cover" /></div>}
71
+ <h3 class={s.name()}>
72
+ {member.href
73
+ ? <a href={member.href} class="text-current no-underline after:absolute after:inset-0 after:content-[''] hover:text-accent">{member.name}</a>
74
+ : member.name}
75
+ </h3>
76
+ {member.role && <p class={s.role()}>{member.role}</p>}
77
+ {member.bio && <p class={s.bio()} data-kit-text>{member.bio}</p>}
78
+ </li>
79
+ ))}
80
+ </ul>
81
+ </Section>
82
+ )}
@@ -0,0 +1,5 @@
1
+ [
2
+ {"name": "three-card", "props": {"id": "team", "heading": "The team", "intro": "Small, senior, and in the same room.", "items": [{"name": "Mira Kovač", "role": "Editor", "bio": "Keeps every page honest and every sentence short.", "image": "/kit-fixtures/avatar-1.svg", "href": "/team/mira/"}, {"name": "Jon Ade", "role": "Engineer", "bio": "Builds the sites and keeps them fast.", "image": "/kit-fixtures/avatar-2.svg", "href": "/team/jon/"}, {"name": "Lea Park", "role": "Designer", "bio": "Draws the systems the sites are made of.", "image": "/kit-fixtures/avatar-3.svg"}]}},
3
+ {"name": "two-plain", "props": {"columns": "2", "style": "plain", "heading": "Founders", "items": [{"name": "Mira Kovač", "role": "Co-founder", "image": "/kit-fixtures/avatar-1.svg", "imageAlt": "Mira Kovač, smiling"}, {"name": "Jon Ade", "role": "Co-founder", "image": "/kit-fixtures/avatar-2.svg"}]}},
4
+ {"name": "four-card-no-photos", "props": {"columns": "4", "items": [{"name": "Mira Kovač", "role": "Editor"}, {"name": "Jon Ade", "role": "Engineer"}, {"name": "Lea Park", "role": "Designer"}, {"name": "Sam Ortiz", "role": "Producer", "bio": "Keeps the schedule."}]}}
5
+ ]
@@ -0,0 +1,116 @@
1
+ {
2
+ "id": "team",
3
+ "name": "Team",
4
+ "description": "The people behind the site: portrait, name, role and a short bio each, as cards or plain entries. A member with a page is clickable as a whole.",
5
+ "category": "section",
6
+ "uses": [],
7
+ "shared": [
8
+ "KitImage.astro",
9
+ "Section.astro",
10
+ "image.ts",
11
+ "types.ts"
12
+ ],
13
+ "variants": {
14
+ "columns": {
15
+ "options": [
16
+ "2",
17
+ "3",
18
+ "4"
19
+ ],
20
+ "default": "3",
21
+ "description": "Columns on wide screens; one on phones, two on tablets."
22
+ },
23
+ "style": {
24
+ "options": [
25
+ "card",
26
+ "plain"
27
+ ],
28
+ "default": "card",
29
+ "description": "Member chrome: a bordered card with the portrait on top, or none."
30
+ }
31
+ },
32
+ "props": {
33
+ "heading": {
34
+ "type": "string",
35
+ "label": "Heading",
36
+ "description": "Section heading above the team."
37
+ },
38
+ "intro": {
39
+ "type": "text",
40
+ "label": "Intro",
41
+ "description": "A line or two under the heading."
42
+ },
43
+ "items": {
44
+ "type": "array",
45
+ "label": "Members",
46
+ "required": true,
47
+ "items": {
48
+ "type": "object",
49
+ "fields": {
50
+ "name": {
51
+ "type": "string",
52
+ "label": "Name",
53
+ "required": true,
54
+ "description": "The person's name."
55
+ },
56
+ "role": {
57
+ "type": "string",
58
+ "label": "Role",
59
+ "description": "Their title or role."
60
+ },
61
+ "bio": {
62
+ "type": "text",
63
+ "label": "Bio",
64
+ "description": "A short biography."
65
+ },
66
+ "image": {
67
+ "type": "image",
68
+ "label": "Photo",
69
+ "description": "Their portrait; shown square."
70
+ },
71
+ "imageAlt": {
72
+ "type": "string",
73
+ "label": "Photo description",
74
+ "description": "Who the photo shows; defaults to their name."
75
+ },
76
+ "href": {
77
+ "type": "url",
78
+ "label": "Link",
79
+ "description": "Their profile page; makes the whole entry a link."
80
+ }
81
+ }
82
+ },
83
+ "description": "The people, in display order (Divi team member name/position/content/image_url, Elementor image box)."
84
+ },
85
+ "id": {
86
+ "type": "string",
87
+ "content": false,
88
+ "description": "Anchor id of the section; the heading gets `<id>-title`."
89
+ }
90
+ },
91
+ "slots": {},
92
+ "js": "none",
93
+ "dependencies": {},
94
+ "sources": {
95
+ "gutenberg": [
96
+ "core/columns"
97
+ ],
98
+ "elementor": [
99
+ "elementor/image-box"
100
+ ],
101
+ "divi": [
102
+ "divi/et_pb_team_member"
103
+ ]
104
+ },
105
+ "a11y": "Members are a <ul>; each name is an <h3>, and a linked member's link text is the name. A portrait's text defaults to the name. The section is labelled by its heading when it has one.",
106
+ "pattern": {
107
+ "summary": "repeated person units: portrait + name + role",
108
+ "signals": [
109
+ "2+ columns",
110
+ "1 image per column",
111
+ "name",
112
+ "role",
113
+ "short text"
114
+ ]
115
+ }
116
+ }