spoko-design-system 1.14.1 → 1.15.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/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/components/Jumbotron/index.astro +3 -0
- package/src/components/Jumbotron/variants/Hero.astro +2 -6
- package/src/components/Jumbotron/variants/PostSplit.astro +7 -2
- package/src/pages/components/jumbotron.mdx +31 -0
- package/uno-config/theme/shortcuts/jumbotron.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [1.15.0](https://github.com/polo-blue/sds/compare/v1.14.2...v1.15.0) (2025-12-07)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **Jumbotron:** add imageClass prop for responsive image sizing ([56d6392](https://github.com/polo-blue/sds/commit/56d6392721eb3bd7509d5b064cb00d4b81aa6d9c))
|
|
6
|
+
|
|
7
|
+
## [1.14.2](https://github.com/polo-blue/sds/compare/v1.14.1...v1.14.2) (2025-12-07)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **jumbotron:** make description margin conditional per variant ([6c8e59d](https://github.com/polo-blue/sds/commit/6c8e59d813aa512f210503f4ac9facfb3f9b23d6))
|
|
12
|
+
|
|
1
13
|
## [1.14.1](https://github.com/polo-blue/sds/compare/v1.14.0...v1.14.1) (2025-12-07)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ interface Props {
|
|
|
11
11
|
image?: string;
|
|
12
12
|
imageWidth?: number;
|
|
13
13
|
imageHeight?: number;
|
|
14
|
+
imageClass?: string;
|
|
14
15
|
small?: boolean;
|
|
15
16
|
description?: string;
|
|
16
17
|
info?: string;
|
|
@@ -29,6 +30,7 @@ const {
|
|
|
29
30
|
image,
|
|
30
31
|
imageWidth,
|
|
31
32
|
imageHeight,
|
|
33
|
+
imageClass,
|
|
32
34
|
small = false,
|
|
33
35
|
description,
|
|
34
36
|
info,
|
|
@@ -94,6 +96,7 @@ const commonProps = {
|
|
|
94
96
|
description={description}
|
|
95
97
|
imageWidth={imageWidth}
|
|
96
98
|
imageHeight={imageHeight}
|
|
99
|
+
imageClass={imageClass}
|
|
97
100
|
fullWidth={fullWidth}
|
|
98
101
|
align={align}
|
|
99
102
|
/>
|
|
@@ -27,12 +27,8 @@ const { title = '', image, description, info, backgroundClass } = Astro.props;
|
|
|
27
27
|
class="font-headlight text-3xl sm:text-4xl md:text-5xl xl:text-6xl mt-1 line-clamp-3 leading-tight"
|
|
28
28
|
set:html={title}
|
|
29
29
|
/>
|
|
30
|
-
{
|
|
31
|
-
|
|
32
|
-
<div class="mb-1 line-clamp-3 text-base sm:text-lg leading-none mt-4" set:html={description} />
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
{info && <div class="font-medium mb-4 line-clamp-1 text-base sm:text-lg mt-2" set:html={info} />}
|
|
30
|
+
{description && <div class="jumbotron-description mt-4" set:html={description} />}
|
|
31
|
+
{info && <div class="jumbotron-info" set:html={info} />}
|
|
36
32
|
</header>
|
|
37
33
|
</div>
|
|
38
34
|
</div>
|
|
@@ -10,6 +10,7 @@ interface Props {
|
|
|
10
10
|
image?: string;
|
|
11
11
|
imageWidth?: number;
|
|
12
12
|
imageHeight?: number;
|
|
13
|
+
imageClass?: string;
|
|
13
14
|
author?: Author;
|
|
14
15
|
date?: string;
|
|
15
16
|
categories?: Category[];
|
|
@@ -20,12 +21,16 @@ interface Props {
|
|
|
20
21
|
align?: 'left' | 'center' | 'right';
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
// Note: imageClass allows responsive image sizing via Tailwind/UnoCSS classes
|
|
25
|
+
// Example: imageClass="max-w-100 lg:max-w-80" for responsive max-width control
|
|
26
|
+
|
|
23
27
|
const {
|
|
24
28
|
title = '',
|
|
25
29
|
description,
|
|
26
30
|
image,
|
|
27
31
|
imageWidth = 768,
|
|
28
32
|
imageHeight = 432,
|
|
33
|
+
imageClass,
|
|
29
34
|
author,
|
|
30
35
|
date,
|
|
31
36
|
categories = [],
|
|
@@ -65,7 +70,7 @@ const cleanTitle = stripHtml(title);
|
|
|
65
70
|
<div class="jumbotron-split-content">
|
|
66
71
|
<h1 class="jumbotron-split-title" set:html={title} />
|
|
67
72
|
|
|
68
|
-
{description && <p class="jumbotron-description order-3 w-full" set:html={description} />}
|
|
73
|
+
{description && <p class="jumbotron-description order-3 w-full mt-0" set:html={description} />}
|
|
69
74
|
|
|
70
75
|
{
|
|
71
76
|
hasCategories && (
|
|
@@ -94,7 +99,7 @@ const cleanTitle = stripHtml(title);
|
|
|
94
99
|
{
|
|
95
100
|
image && (
|
|
96
101
|
<div class="jumbotron-split-image-wrapper">
|
|
97
|
-
<div class=
|
|
102
|
+
<div class:list={['jumbotron-split-image', imageClass]}>
|
|
98
103
|
<Image
|
|
99
104
|
class="jumbotron-split-img"
|
|
100
105
|
src={image}
|
|
@@ -326,6 +326,35 @@ Use `fullWidth` prop to make the jumbotron span the full viewport width, useful
|
|
|
326
326
|
/>
|
|
327
327
|
```
|
|
328
328
|
|
|
329
|
+
### Post Split with Responsive Image Sizing
|
|
330
|
+
Use the `imageClass` prop to control image dimensions with Tailwind/UnoCSS classes. This allows responsive sizing at different breakpoints.
|
|
331
|
+
|
|
332
|
+
```js
|
|
333
|
+
// Limit image width on desktop
|
|
334
|
+
<Jumbotron
|
|
335
|
+
variant="post-split"
|
|
336
|
+
title="Post with Custom Image Size"
|
|
337
|
+
image="path/to/image.jpg"
|
|
338
|
+
imageClass="max-w-100 lg:max-w-80"
|
|
339
|
+
/>
|
|
340
|
+
|
|
341
|
+
// Limit both width and height
|
|
342
|
+
<Jumbotron
|
|
343
|
+
variant="post-split"
|
|
344
|
+
title="Category with Small Image"
|
|
345
|
+
image="path/to/image.jpg"
|
|
346
|
+
imageClass="max-w-75 max-h-50"
|
|
347
|
+
/>
|
|
348
|
+
|
|
349
|
+
// Different sizes at breakpoints
|
|
350
|
+
<Jumbotron
|
|
351
|
+
variant="post-split"
|
|
352
|
+
title="Responsive Image"
|
|
353
|
+
image="path/to/image.jpg"
|
|
354
|
+
imageClass="max-w-full md:max-w-80 lg:max-w-100"
|
|
355
|
+
/>
|
|
356
|
+
```
|
|
357
|
+
|
|
329
358
|
### Post Split with Text Alignment
|
|
330
359
|
Use the `align` prop to control text alignment within the content area. Available options: `left` (default), `center`, `right`.
|
|
331
360
|
|
|
@@ -417,6 +446,8 @@ Shows how to fully customize the header section using the intro slot. Useful for
|
|
|
417
446
|
### Post Split Props
|
|
418
447
|
- `imageWidth`: Custom image width in pixels (default: 768)
|
|
419
448
|
- `imageHeight`: Custom image height in pixels (default: 432)
|
|
449
|
+
- `imageClass`: Tailwind/UnoCSS classes for responsive image sizing (e.g., `max-w-100 lg:max-w-80`)
|
|
450
|
+
- `description`: Optional description text below the title
|
|
420
451
|
- `fullWidth`: When true, adds `full-width-block` class for full viewport width
|
|
421
452
|
- `align`: Text alignment within content area ('left' | 'center' | 'right', default: 'left')
|
|
422
453
|
|
|
@@ -47,7 +47,7 @@ export const jumbotronShortcuts = [
|
|
|
47
47
|
['jumbotron-categories', 'order-1 mt-4'],
|
|
48
48
|
|
|
49
49
|
// Content styles
|
|
50
|
-
['jumbotron-description', 'mb-1 line-clamp-3 text-base sm:text-lg leading-
|
|
50
|
+
['jumbotron-description', 'mb-1 line-clamp-3 text-base sm:text-lg leading-tight'],
|
|
51
51
|
['jumbotron-info', 'font-medium mb-4 line-clamp-1 text-base sm:text-lg mt-2'],
|
|
52
52
|
|
|
53
53
|
// Post Split variant
|
|
@@ -61,6 +61,6 @@ export const jumbotronShortcuts = [
|
|
|
61
61
|
],
|
|
62
62
|
['jumbotron-split-meta', 'order-4 flex items-center text-gray-100'],
|
|
63
63
|
['jumbotron-split-image-wrapper', 'relative -mb-8 md:(mt-4 -ml-4 mr-4) xl:(ml-0 mr-0)'],
|
|
64
|
-
['jumbotron-split-image', 'relative shadow-xl
|
|
64
|
+
['jumbotron-split-image', 'relative shadow-xl overflow-hidden md:ml-auto'],
|
|
65
65
|
['jumbotron-split-img', 'object-cover'],
|
|
66
66
|
];
|