@contentrain/astro-kit 0.35.0 → 0.36.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
@@ -626,6 +626,11 @@
626
626
  "label": "Image description",
627
627
  "description": "What the image shows, for readers who cannot see it; empty when it is decoration."
628
628
  },
629
+ "icon": {
630
+ "type": "image",
631
+ "label": "Icon",
632
+ "description": "A small image above the title (decoration)."
633
+ },
629
634
  "eyebrow": {
630
635
  "type": "string",
631
636
  "label": "Eyebrow",
@@ -791,6 +796,7 @@
791
796
  "items[].linkLabel": "items[].link_label",
792
797
  "items[].image": "items[].image",
793
798
  "items[].imageAlt": "items[].image_alt",
799
+ "items[].icon": "items[].icon",
794
800
  "items[].eyebrow": "items[].eyebrow"
795
801
  }
796
802
  },
@@ -42,6 +42,8 @@ interface Item {
42
42
  /** The image's address (or, until 0.7, an `ImageInput`). */
43
43
  image?: ImageSource | undefined
44
44
  imageAlt?: string | undefined
45
+ /** A small image (an icon) above the title: decoration, so it has no alt (an icon box's svg, a feature's mark). */
46
+ icon?: string | undefined
45
47
  eyebrow?: string | undefined
46
48
  }
47
49
 
@@ -79,6 +81,7 @@ const headingId = title ? `cards-${title.toLowerCase().replace(/[^a-z0-9]+/g, '-
79
81
  {items.map(item => (
80
82
  <li class={card()}>
81
83
  {imageOf(item.image, item.imageAlt) && <div class={media()}><KitImage image={imageOf(item.image, item.imageAlt)!} sizes="(min-width: 1024px) 33vw, (min-width: 640px) 50vw, 100vw" class="aspect-[3/2] w-full object-cover transition duration-300 group-hover:scale-[1.02]" /></div>}
84
+ {item.icon && <KitImage image={{ src: item.icon, alt: '' }} class="h-10 w-10 object-contain" />}
82
85
  {item.eyebrow && <p class="text-sm font-medium text-accent-text">{item.eyebrow}</p>}
83
86
  <CardHeading class={cardTitle()}>
84
87
  {item.href && !item.linkLabel
@@ -4,5 +4,6 @@
4
4
  { "name": "four-elevated-inverse", "props": { "columns": "4", "style": "elevated", "tone": "inverse", "headingLevel": 3, "title": "Team", "items": [{ "title": "Mira Kovač", "text": "Editor", "image": { "src": "/kit-fixtures/avatar-1.svg", "alt": "Mira Kovač", "width": 96, "height": 96 } }, { "title": "Jon Ade", "text": "Engineer", "image": { "src": "/kit-fixtures/avatar-2.svg", "alt": "Jon Ade", "width": 96, "height": 96 } }, { "title": "Lea Park", "text": "Designer", "image": { "src": "/kit-fixtures/avatar-3.svg", "alt": "Lea Park", "width": 96, "height": 96 } }, { "title": "Sam Ortiz", "text": "Producer" }] } },
5
5
  { "name": "accent", "props": { "tone": "accent", "columns": "3", "items": [{ "title": "Fast", "text": "Static HTML, one stylesheet." }, { "title": "Editable", "text": "Content in Contentrain Studio." }, { "title": "Kept", "text": "Every address survives." }] } },
6
6
  {"name": "measured-columns", "props": {"title": "Services", "measured": {"containerPx": 1140, "padY": 80, "columns": {"390": 1, "768": 2, "1280": 4}, "gap": 30, "radius": 4, "bg": {"color": "#f4f1ea"}}, "items": [{"title": "Audits", "text": "Where a site loses readers."}, {"title": "Builds", "text": "Static and fast."}, {"title": "Hosting", "text": "Managed for you."}, {"title": "Care", "text": "Kept up to date."}]}},
7
+ {"name": "icon-boxes", "props": {"columns": "3", "align": "center", "items": [{"title": "Design", "text": "Layouts built around your products.", "icon": "/kit-fixtures/icon-1.svg"}, {"title": "Build", "text": "Fast pages that stay fast.", "icon": "/kit-fixtures/icon-1.svg"}, {"title": "Grow", "text": "Monthly reports you can read in five minutes.", "icon": "/kit-fixtures/icon-1.svg"}]}},
7
8
  {"name": "link-labels", "props": {"columns": "4", "align": "center", "items": [{"title": "Kasko", "href": "/urunlerimiz/kasko/", "linkLabel": "Teklif Al"}, {"title": "Trafik Sigortası", "href": "/urunlerimiz/trafik-sigortasi/", "linkLabel": "Teklif Al"}, {"title": "Konut Sigortası", "href": "/urunlerimiz/konut-sigortasi/", "linkLabel": "Teklif Al"}, {"title": "Tamamlayıcı Sağlık"}]}}
8
9
  ]
@@ -99,6 +99,11 @@
99
99
  "label": "Image description",
100
100
  "description": "What the image shows, for readers who cannot see it; empty when it is decoration."
101
101
  },
102
+ "icon": {
103
+ "type": "image",
104
+ "label": "Icon",
105
+ "description": "A small image above the title (decoration)."
106
+ },
102
107
  "eyebrow": {
103
108
  "type": "string",
104
109
  "label": "Eyebrow",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentrain/astro-kit",
3
- "version": "0.35.0",
3
+ "version": "0.36.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",