@contentrain/astro-kit 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/catalog.json
CHANGED
|
@@ -3432,6 +3432,14 @@
|
|
|
3432
3432
|
],
|
|
3433
3433
|
"default": "auto",
|
|
3434
3434
|
"description": "The quote's text size. auto: the layout's own (body size in a grid, 2xl–3xl for a single quote). base, lg, xl: that size on every width."
|
|
3435
|
+
},
|
|
3436
|
+
"frame": {
|
|
3437
|
+
"options": [
|
|
3438
|
+
"card",
|
|
3439
|
+
"plain"
|
|
3440
|
+
],
|
|
3441
|
+
"default": "card",
|
|
3442
|
+
"description": "card: each quote in its box (a bordered, padded card in the grid; the surface colour in a muted section). plain: the quote and who said it straight on the section, across the column, with no box, as Elementor's testimonial widget draws them."
|
|
3435
3443
|
}
|
|
3436
3444
|
},
|
|
3437
3445
|
"props": {
|
package/components/faq/Faq.astro
CHANGED
|
@@ -29,8 +29,10 @@ const faq = tv({
|
|
|
29
29
|
plain: { list: 'gap-2', summary: 'list-item list-[revert] py-1 text-[length:var(--text-body,1rem)] [font-weight:inherit] [&::-webkit-details-marker]:inline', marker: 'hidden', answer: 'pt-2 ps-5' },
|
|
30
30
|
},
|
|
31
31
|
tone: { default: {}, muted: { item: 'bg-surface' }, inverse: { answer: 'prose-invert' }, accent: { answer: 'prose-invert' } },
|
|
32
|
-
// heading: the question as a small heading. bold: body size in bold, as accordion and toggle titles often are.
|
|
33
|
-
|
|
32
|
+
// heading: the question as a small heading. bold: body size in bold, as accordion and toggle titles often are. The
|
|
33
|
+
// weight is an arbitrary property like the summary's own: twMerge replaces one only with another, and a `font-bold`
|
|
34
|
+
// beside it lost in the CSS (IP-4 elementor G9: the question stayed at the heading weight).
|
|
35
|
+
questionStyle: { heading: {}, bold: { summary: 'text-[length:var(--text-body,1rem)] [font-weight:700]' } },
|
|
34
36
|
},
|
|
35
37
|
compoundVariants: [
|
|
36
38
|
{ style: 'cards', tone: 'muted', class: { item: 'border-transparent' } },
|
|
@@ -39,11 +39,15 @@ const testimonial = tv({
|
|
|
39
39
|
lg: { quote: 'text-lg leading-relaxed md:text-lg' },
|
|
40
40
|
xl: { quote: 'text-xl leading-snug md:text-xl' },
|
|
41
41
|
},
|
|
42
|
+
// card: a quote in its box (the grid's border and padding, a muted section's surface). plain: the quote and who said
|
|
43
|
+
// it on the section itself, across the column, as Elementor's testimonial widget draws them.
|
|
44
|
+
frame: { card: {}, plain: {} },
|
|
42
45
|
},
|
|
43
46
|
compoundVariants: [
|
|
44
47
|
{ layout: 'grid', tone: 'muted', class: { card: 'border-transparent text-ink' } },
|
|
48
|
+
{ frame: 'plain', class: { card: 'rounded-none border-0 bg-transparent p-0' } },
|
|
45
49
|
],
|
|
46
|
-
defaultVariants: { layout: 'grid', tone: 'default', quoteSize: 'auto' },
|
|
50
|
+
defaultVariants: { layout: 'grid', tone: 'default', quoteSize: 'auto', frame: 'card' },
|
|
47
51
|
})
|
|
48
52
|
|
|
49
53
|
interface Props {
|
|
@@ -51,12 +55,13 @@ interface Props {
|
|
|
51
55
|
heading?: string | undefined
|
|
52
56
|
layout?: 'single' | 'grid' | undefined
|
|
53
57
|
quoteSize?: 'auto' | 'base' | 'lg' | 'xl' | undefined
|
|
58
|
+
frame?: 'card' | 'plain' | undefined
|
|
54
59
|
tone?: 'default' | 'muted' | 'inverse' | 'accent' | undefined
|
|
55
60
|
id?: string | undefined
|
|
56
61
|
}
|
|
57
62
|
|
|
58
|
-
const { items, heading, layout, quoteSize, tone, id } = Astro.props
|
|
59
|
-
const s = testimonial({ layout, quoteSize, tone })
|
|
63
|
+
const { items, heading, layout, quoteSize, frame, tone, id } = Astro.props
|
|
64
|
+
const s = testimonial({ layout, quoteSize, frame, tone })
|
|
60
65
|
const headingId = heading && id ? `${id}-title` : undefined
|
|
61
66
|
// Two quotes share the row: a third column would stand empty beside them and narrow both (IP-4 elementor launch G9).
|
|
62
67
|
const list = s.list(items.length === 2 && (layout ?? 'grid') === 'grid' ? { class: 'lg:grid-cols-2' } : {})
|
|
@@ -35,6 +35,14 @@
|
|
|
35
35
|
"name": "single-quote-lg",
|
|
36
36
|
"props": { "layout": "single", "quoteSize": "lg", "items": [{ "quote": "We planned less and saw more.", "name": "Jonas Weber", "role": "Reader" }] }
|
|
37
37
|
},
|
|
38
|
+
{
|
|
39
|
+
"name": "grid-plain",
|
|
40
|
+
"props": { "frame": "plain", "quoteSize": "xl", "items": [{ "quote": "We sold out our first kiln batch on launch day.", "name": "Ruth Adeyemi", "role": "Potter" }, { "quote": "Six weeks, one price, and they answered every email.", "name": "Daniel Okafor", "role": "Leatherworker" }] }
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "single-plain-muted",
|
|
44
|
+
"props": { "layout": "single", "frame": "plain", "tone": "muted", "items": [{ "quote": "Calm pages and a fast checkout.", "name": "Ruth Adeyemi" }] }
|
|
45
|
+
},
|
|
38
46
|
{
|
|
39
47
|
"name": "grid-source-quoted",
|
|
40
48
|
"props": { "items": [{ "quote": "“We set it up before lunch.”", "name": "Grace Lin", "role": "Head of Support, Fernhill" }, { "quote": "People just read the page.", "name": "Omar Haddad", "role": "Support lead" }] }
|
|
@@ -38,6 +38,14 @@
|
|
|
38
38
|
],
|
|
39
39
|
"default": "auto",
|
|
40
40
|
"description": "The quote's text size. auto: the layout's own (body size in a grid, 2xl–3xl for a single quote). base, lg, xl: that size on every width."
|
|
41
|
+
},
|
|
42
|
+
"frame": {
|
|
43
|
+
"options": [
|
|
44
|
+
"card",
|
|
45
|
+
"plain"
|
|
46
|
+
],
|
|
47
|
+
"default": "card",
|
|
48
|
+
"description": "card: each quote in its box (a bordered, padded card in the grid; the surface colour in a muted section). plain: the quote and who said it straight on the section, across the column, with no box, as Elementor's testimonial widget draws them."
|
|
41
49
|
}
|
|
42
50
|
},
|
|
43
51
|
"props": {
|
package/mapping/elementor.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "astro-kit-mapping@1",
|
|
3
3
|
"builder": "elementor",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "11",
|
|
5
5
|
"fallback": "prose",
|
|
6
6
|
"defaults": {
|
|
7
7
|
"elementor/video": {
|
|
@@ -276,6 +276,9 @@
|
|
|
276
276
|
{
|
|
277
277
|
"match": "elementor/testimonial",
|
|
278
278
|
"component": "testimonial",
|
|
279
|
+
"variant": {
|
|
280
|
+
"frame": "plain"
|
|
281
|
+
},
|
|
279
282
|
"group": "siblings",
|
|
280
283
|
"into": "items",
|
|
281
284
|
"item": {
|
|
@@ -855,7 +858,8 @@
|
|
|
855
858
|
"id": "testimonial.quotes",
|
|
856
859
|
"component": "testimonial",
|
|
857
860
|
"variant": {
|
|
858
|
-
"quoteSize": "xl"
|
|
861
|
+
"quoteSize": "xl",
|
|
862
|
+
"frame": "plain"
|
|
859
863
|
},
|
|
860
864
|
"slots": {
|
|
861
865
|
"title": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentrain/astro-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Copy-in Astro components for Contentrain sites (shadcn model): typed props, tailwind-variants, zero JavaScript by default — with a machine-readable catalog",
|
|
6
6
|
"type": "module",
|