@kolkrabbi/kol-styleguide 0.9.0 → 0.10.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/package.json +1 -1
- package/src/BrandAssets.jsx +25 -3
package/package.json
CHANGED
package/src/BrandAssets.jsx
CHANGED
|
@@ -3,8 +3,8 @@ import { ContentCollection, FullscreenOverlay, Graphic, GRAPHIC_RAW, Table } fro
|
|
|
3
3
|
import PageSection from '@kolkrabbi/kol-framework/src/PageSection.jsx'
|
|
4
4
|
import AssetTable from './AssetTable.jsx'
|
|
5
5
|
import AssetCard from './AssetCard.jsx'
|
|
6
|
-
import { BrandAvatar } from './SocialMocks.jsx'
|
|
7
|
-
import { BusinessCardBack, BusinessCardFront, EmailSignature, Envelope, Letterhead } from './StationeryMocks.jsx'
|
|
6
|
+
import { BrandAvatar, PostEditorial, PostPhoto, StoryPhoto } from './SocialMocks.jsx'
|
|
7
|
+
import { BusinessCardBack, BusinessCardFront, EmailSignature, Envelope, Letterhead, LetterheadB } from './StationeryMocks.jsx'
|
|
8
8
|
import BrandMark from './BrandMark.jsx'
|
|
9
9
|
import { Prose, SectionIndex } from './BrandBook.jsx'
|
|
10
10
|
import {
|
|
@@ -30,6 +30,9 @@ const graphicRows = (category, names = []) => names.map((name) => {
|
|
|
30
30
|
}
|
|
31
31
|
})
|
|
32
32
|
|
|
33
|
+
/* the drawn social mocks a template may name instead of a photo (kol-website's Social page, 2026-10-14) */
|
|
34
|
+
const SOCIAL_MOCKS = { PostPhoto, PostEditorial, StoryPhoto }
|
|
35
|
+
|
|
33
36
|
/* square preview tile with its category / name — kol-website's GraphicCard */
|
|
34
37
|
function GraphicCard({ category, name, polarity = 'dark' }) {
|
|
35
38
|
const bg = polarity === 'dark' ? 'bg-surface-inverse' : 'bg-surface-primary'
|
|
@@ -150,12 +153,31 @@ export default function BrandAssets({ brand, Logo, logoSources }) {
|
|
|
150
153
|
</div>
|
|
151
154
|
<div className="col-span-2"><AssetCard><Letterhead mark={mark(marks.letter, { style: { height: '100%', width: 'auto' } })} info={info} /></AssetCard></div>
|
|
152
155
|
</div>
|
|
156
|
+
{/* the second letterhead, its own row (kol-website's Stationery page): `stationery.letterheadB: true` */}
|
|
157
|
+
{brand?.stationery?.letterheadB && (
|
|
158
|
+
<div className="kol-grid mt-12">
|
|
159
|
+
<div className="col-span-2">
|
|
160
|
+
<AssetCard caption="Letterhead, A4 [B]"><LetterheadB mark={mark(marks.letter, { style: { display: 'inline-block', height: 48, width: 'auto' } })} info={info} /></AssetCard>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
)}
|
|
153
164
|
</PageSection>
|
|
154
165
|
)
|
|
155
166
|
case 'social': return (
|
|
156
167
|
<PageSection key={s.key} {...head}>
|
|
157
168
|
<ContentCollection cols={3} className="mt-8 items-start">
|
|
158
|
-
{brand.social.templates.map(({ caption, ratio, src }) => (
|
|
169
|
+
{brand.social.templates.map(({ caption, ratio, src, mock }) => mock ? (
|
|
170
|
+
/* A DRAWN MOCK (BrandAssetsSocialMocksAndLetterheadB, kol-website 2026-10-27): `mock` names one of
|
|
171
|
+
kol-styleguide's social mocks, or is a node; it carries the brand's logomark itself, so no
|
|
172
|
+
overlay. `ratio` boxes a mock that does not size itself (PostEditorial), as kol-website does. */
|
|
173
|
+
<AssetCard key={caption ?? String(mock)} caption={caption}>
|
|
174
|
+
{(() => {
|
|
175
|
+
const Mock = typeof mock === 'string' ? SOCIAL_MOCKS[mock] : null
|
|
176
|
+
const node = Mock ? <Mock mark={mark(marks.avatar)} /> : mock
|
|
177
|
+
return ratio ? <div className="overflow-hidden rounded-sm" style={{ aspectRatio: ratio }}>{node}</div> : node
|
|
178
|
+
})()}
|
|
179
|
+
</AssetCard>
|
|
180
|
+
) : (
|
|
159
181
|
<AssetCard key={caption ?? src} caption={caption}>
|
|
160
182
|
<div className="relative overflow-hidden" style={{ aspectRatio: ratio }}>
|
|
161
183
|
<img src={src} alt="" loading="lazy" className="absolute inset-0 w-full h-full object-cover" />
|