spoko-design-system 1.16.2 → 1.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/CHANGELOG.md +12 -0
- package/icon.config.ts +1 -0
- package/package.json +1 -1
- package/src/components/Jumbotron/index.astro +8 -4
- package/src/components/Jumbotron/types.ts +4 -1
- package/src/components/Jumbotron/variants/Default.astro +3 -3
- package/src/components/Jumbotron/variants/Hero.astro +4 -4
- package/src/components/Jumbotron/variants/PostSplit.astro +28 -4
- package/src/pages/components/jumbotron.mdx +78 -10
- package/uno-config/theme/shortcuts/jumbotron.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [1.18.0](https://github.com/polo-blue/sds/compare/v1.17.0...v1.18.0) (2025-12-07)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **icons:** add bi:arrow-right-short icon ([edf3039](https://github.com/polo-blue/sds/commit/edf30393b8594cd50848aa7b38e0a84d2cc43a87))
|
|
6
|
+
|
|
7
|
+
## [1.17.0](https://github.com/polo-blue/sds/compare/v1.16.2...v1.17.0) (2025-12-07)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **Jumbotron:** add split and slim props to PostSplit variant ([831969f](https://github.com/polo-blue/sds/commit/831969ff0a3bacdfde8eeb0d33b84d518bff836f))
|
|
12
|
+
|
|
1
13
|
## [1.16.2](https://github.com/polo-blue/sds/compare/v1.16.1...v1.16.2) (2025-12-07)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
package/icon.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ interface Props {
|
|
|
12
12
|
imageWidth?: number;
|
|
13
13
|
imageHeight?: number;
|
|
14
14
|
imageClass?: string;
|
|
15
|
-
|
|
15
|
+
slim?: boolean;
|
|
16
16
|
description?: string;
|
|
17
17
|
info?: string;
|
|
18
18
|
date?: string;
|
|
@@ -22,6 +22,7 @@ interface Props {
|
|
|
22
22
|
lang?: string;
|
|
23
23
|
fullWidth?: boolean;
|
|
24
24
|
align?: 'left' | 'center' | 'right';
|
|
25
|
+
split?: 'equal' | 'wide';
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
const {
|
|
@@ -31,7 +32,7 @@ const {
|
|
|
31
32
|
imageWidth,
|
|
32
33
|
imageHeight,
|
|
33
34
|
imageClass,
|
|
34
|
-
|
|
35
|
+
slim = false,
|
|
35
36
|
description,
|
|
36
37
|
info,
|
|
37
38
|
date,
|
|
@@ -41,6 +42,7 @@ const {
|
|
|
41
42
|
lang = 'en',
|
|
42
43
|
fullWidth = false,
|
|
43
44
|
align = 'left',
|
|
45
|
+
split = 'equal',
|
|
44
46
|
} = Astro.props;
|
|
45
47
|
|
|
46
48
|
// Helper (function to check if a slot has content)
|
|
@@ -74,7 +76,7 @@ const commonProps = {
|
|
|
74
76
|
|
|
75
77
|
{
|
|
76
78
|
variant === 'default' && (
|
|
77
|
-
<DefaultVariant {...commonProps}
|
|
79
|
+
<DefaultVariant {...commonProps} slim={slim}>
|
|
78
80
|
<slot name="intro" slot="intro" />
|
|
79
81
|
<slot name="subtitle" slot="subtitle" />
|
|
80
82
|
<slot name="cta-content" slot="cta-content" />
|
|
@@ -82,7 +84,7 @@ const commonProps = {
|
|
|
82
84
|
)
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
{variant === 'hero' && <HeroVariant {...commonProps} description={description} info={info}
|
|
87
|
+
{variant === 'hero' && <HeroVariant {...commonProps} description={description} info={info} slim={slim} />}
|
|
86
88
|
|
|
87
89
|
{variant === 'post' && <PostVariant {...commonProps} author={author} date={date} categories={categories} />}
|
|
88
90
|
|
|
@@ -99,6 +101,8 @@ const commonProps = {
|
|
|
99
101
|
imageClass={imageClass}
|
|
100
102
|
fullWidth={fullWidth}
|
|
101
103
|
align={align}
|
|
104
|
+
split={split}
|
|
105
|
+
slim={slim}
|
|
102
106
|
/>
|
|
103
107
|
)
|
|
104
108
|
}
|
|
@@ -15,9 +15,9 @@ export interface Props {
|
|
|
15
15
|
title?: string;
|
|
16
16
|
image?: string;
|
|
17
17
|
backgroundClass?: string;
|
|
18
|
+
slim?: boolean;
|
|
18
19
|
|
|
19
20
|
// Default & Hero variant props
|
|
20
|
-
small?: boolean;
|
|
21
21
|
description?: string;
|
|
22
22
|
info?: string;
|
|
23
23
|
|
|
@@ -25,4 +25,7 @@ export interface Props {
|
|
|
25
25
|
date?: string;
|
|
26
26
|
author?: Author;
|
|
27
27
|
categories?: Category[];
|
|
28
|
+
|
|
29
|
+
// Post Split variant props
|
|
30
|
+
split?: 'equal' | 'wide';
|
|
28
31
|
}
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
// variants/Default.astro
|
|
3
3
|
interface Props {
|
|
4
4
|
title?: string;
|
|
5
|
-
|
|
5
|
+
slim?: boolean;
|
|
6
6
|
hasIntroContent: boolean;
|
|
7
7
|
hasSubtitleContent: boolean;
|
|
8
8
|
hasCtaContent: boolean;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
const { title = '',
|
|
11
|
+
const { title = '', slim = false, hasIntroContent, hasSubtitleContent, hasCtaContent } = Astro.props;
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
<header
|
|
15
15
|
class:list={[
|
|
16
16
|
'flow content-grid', // globalne klasy
|
|
17
17
|
'jumbotron-header-base bg-vw', // klasy bazowe i tło
|
|
18
|
-
|
|
18
|
+
slim ? 'jumbotron-container-small' : 'jumbotron-container-large', // wariant rozmiaru
|
|
19
19
|
]}
|
|
20
20
|
>
|
|
21
21
|
{hasIntroContent ? <slot name="intro" /> : <h1 class="jumbotron-title-default" set:html={title} />}
|
|
@@ -6,13 +6,13 @@ interface Props {
|
|
|
6
6
|
description?: string;
|
|
7
7
|
info?: string;
|
|
8
8
|
backgroundClass?: string;
|
|
9
|
-
|
|
9
|
+
slim?: boolean;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
const { title = '', image, description, info, backgroundClass,
|
|
12
|
+
const { title = '', image, description, info, backgroundClass, slim = false } = Astro.props;
|
|
13
13
|
|
|
14
|
-
// Height classes based on
|
|
15
|
-
const heightClass =
|
|
14
|
+
// Height classes based on slim prop
|
|
15
|
+
const heightClass = slim ? 'py-6 min-h-32' : 'py-8 h-56 sm:h-72 md:max-h-72';
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
<div class={`relative w-full ${backgroundClass}`}>
|
|
@@ -19,6 +19,8 @@ interface Props {
|
|
|
19
19
|
lang: string;
|
|
20
20
|
fullWidth?: boolean;
|
|
21
21
|
align?: 'left' | 'center' | 'right';
|
|
22
|
+
split?: 'equal' | 'wide';
|
|
23
|
+
slim?: boolean;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
// Note: imageClass allows responsive image sizing via Tailwind/UnoCSS classes
|
|
@@ -39,8 +41,18 @@ const {
|
|
|
39
41
|
lang = 'en',
|
|
40
42
|
fullWidth = false,
|
|
41
43
|
align = 'left',
|
|
44
|
+
split = 'equal',
|
|
45
|
+
slim = false,
|
|
42
46
|
} = Astro.props;
|
|
43
47
|
|
|
48
|
+
// Grid classes based on split prop
|
|
49
|
+
// equal = 50/50, wide = 2/3 text + 1/3 image
|
|
50
|
+
const splitClasses = {
|
|
51
|
+
equal: 'jumbotron-split-header',
|
|
52
|
+
wide: 'jumbotron-split-header jumbotron-split-header-wide',
|
|
53
|
+
};
|
|
54
|
+
const splitClass = splitClasses[split];
|
|
55
|
+
|
|
44
56
|
// Alignment determines content and image position
|
|
45
57
|
// align="left" = content left, image right (default)
|
|
46
58
|
// align="center" = both centered
|
|
@@ -68,9 +80,15 @@ const cleanTitle = stripHtml(title);
|
|
|
68
80
|
|
|
69
81
|
<div class:list={['jumbotron-split-wrapper bg-blue-900 bg-vw', { 'full-width-block': fullWidth }]}>
|
|
70
82
|
<div class="jumbotron-split-container">
|
|
71
|
-
<header class=
|
|
83
|
+
<header class:list={[splitClass, { 'jumbotron-split-header-slim': slim }]}>
|
|
72
84
|
<div class="heading flex flex-wrap text-white relative items-center mt-auto w-full z-[2]">
|
|
73
|
-
<div
|
|
85
|
+
<div
|
|
86
|
+
class:list={[
|
|
87
|
+
'jumbotron-split-content',
|
|
88
|
+
contentMarginClass,
|
|
89
|
+
{ 'jumbotron-split-content-slim': slim },
|
|
90
|
+
]}
|
|
91
|
+
>
|
|
74
92
|
<h1 class="jumbotron-split-title" set:html={title} />
|
|
75
93
|
|
|
76
94
|
{description && <p class="jumbotron-description order-3 w-full mt-0" set:html={description} />}
|
|
@@ -101,8 +119,14 @@ const cleanTitle = stripHtml(title);
|
|
|
101
119
|
|
|
102
120
|
{
|
|
103
121
|
image && (
|
|
104
|
-
<div
|
|
105
|
-
|
|
122
|
+
<div
|
|
123
|
+
class:list={[
|
|
124
|
+
'jumbotron-split-image-wrapper',
|
|
125
|
+
imageWrapperClass,
|
|
126
|
+
{ 'jumbotron-split-image-wrapper-slim': slim },
|
|
127
|
+
]}
|
|
128
|
+
>
|
|
129
|
+
<div class:list={['jumbotron-split-image', imageClass, { 'jumbotron-split-image-slim': slim }]}>
|
|
106
130
|
<Image
|
|
107
131
|
class="jumbotron-split-img"
|
|
108
132
|
src={image}
|
|
@@ -14,7 +14,7 @@ A Jumbotron indicates a big box for calling extra attention to some special cont
|
|
|
14
14
|
- [Responsive Behavior](#responsive-behavior)
|
|
15
15
|
- [Variants](#variants)
|
|
16
16
|
- [Default Variant](#default-variant-classic)
|
|
17
|
-
- [
|
|
17
|
+
- [Slim Variant](#slim-variant)
|
|
18
18
|
- [Hero Variant](#hero-variant)
|
|
19
19
|
- [Post Variant](#post-variant-full-overlay)
|
|
20
20
|
- [Post Split Variant](#post-split-variant)
|
|
@@ -26,7 +26,7 @@ A Jumbotron indicates a big box for calling extra attention to some special cont
|
|
|
26
26
|
- Use the `hero` variant for page headers with background images and important messaging
|
|
27
27
|
- Use the `post` variant for blog posts and articles with full-width image overlays
|
|
28
28
|
- Use the `post-split` variant when you need to display image alongside content
|
|
29
|
-
- Consider using `
|
|
29
|
+
- Consider using `slim` prop for less important or secondary sections
|
|
30
30
|
|
|
31
31
|
## Responsive Behavior
|
|
32
32
|
The component adapts to different screen sizes:
|
|
@@ -71,13 +71,13 @@ The default variant is ideal for primary content sections. It supports custom in
|
|
|
71
71
|
</Jumbotron>
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
##
|
|
74
|
+
## Slim Variant
|
|
75
75
|
A more compact version of the default variant, useful for secondary content sections or when vertical space is limited.
|
|
76
76
|
|
|
77
77
|
<div class="component-preview">
|
|
78
|
-
<Jumbotron
|
|
78
|
+
<Jumbotron
|
|
79
79
|
variant="default"
|
|
80
|
-
|
|
80
|
+
slim
|
|
81
81
|
title={`Lorem ipsum dolor sit amet, <span class="text-accent-light">consectetur</span> adipiscing elit.`}
|
|
82
82
|
>
|
|
83
83
|
<p slot="subtitle"
|
|
@@ -87,9 +87,9 @@ A more compact version of the default variant, useful for secondary content sect
|
|
|
87
87
|
</div>
|
|
88
88
|
|
|
89
89
|
```js
|
|
90
|
-
<Jumbotron
|
|
90
|
+
<Jumbotron
|
|
91
91
|
variant="default"
|
|
92
|
-
|
|
92
|
+
slim
|
|
93
93
|
title={`Lorem ipsum dolor sit amet, <span class="text-accent-light">consectetur</span> adipiscing elit.`}
|
|
94
94
|
>
|
|
95
95
|
<p slot="subtitle"
|
|
@@ -355,6 +355,71 @@ Use the `imageClass` prop to control image dimensions with Tailwind/UnoCSS class
|
|
|
355
355
|
/>
|
|
356
356
|
```
|
|
357
357
|
|
|
358
|
+
### Post Split Slim Version
|
|
359
|
+
Use the `slim` prop to reduce vertical padding and image height. Useful for secondary content or when vertical space is limited.
|
|
360
|
+
|
|
361
|
+
<div class="component-preview pb-0 !block">
|
|
362
|
+
<Jumbotron
|
|
363
|
+
variant="post-split"
|
|
364
|
+
title="Slim Post Split"
|
|
365
|
+
image="https://img.freepik.com/premium-photo/tranquil-scene-nature-beauty-tropical-rainforest-adventure-generated-by-artificial-intelligence_188544-83820.jpg?w=1200&h=675&f=webp"
|
|
366
|
+
slim
|
|
367
|
+
/>
|
|
368
|
+
</div>
|
|
369
|
+
|
|
370
|
+
```js
|
|
371
|
+
<Jumbotron
|
|
372
|
+
variant="post-split"
|
|
373
|
+
title="Slim Post Split"
|
|
374
|
+
image="path/to/image.jpg"
|
|
375
|
+
slim
|
|
376
|
+
/>
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### Post Split with Column Split Ratio
|
|
380
|
+
Use the `split` prop to control the column width ratio between text and image on desktop. Available options: `equal` (default 50/50), `wide` (2/3 text + 1/3 image).
|
|
381
|
+
|
|
382
|
+
<div class="component-preview pb-0 !block">
|
|
383
|
+
<Jumbotron
|
|
384
|
+
variant="post-split"
|
|
385
|
+
title="Wide Split (2/3 + 1/3)"
|
|
386
|
+
image="https://img.freepik.com/premium-photo/tranquil-scene-nature-beauty-tropical-rainforest-adventure-generated-by-artificial-intelligence_188544-83820.jpg?w=1200&h=675&f=webp"
|
|
387
|
+
split="wide"
|
|
388
|
+
/>
|
|
389
|
+
</div>
|
|
390
|
+
|
|
391
|
+
```js
|
|
392
|
+
<Jumbotron
|
|
393
|
+
variant="post-split"
|
|
394
|
+
title="Wide Split (2/3 + 1/3)"
|
|
395
|
+
image="path/to/image.jpg"
|
|
396
|
+
split="wide"
|
|
397
|
+
/>
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### Post Split Slim with Wide Split
|
|
401
|
+
Combine `slim` and `split="wide"` for a compact layout with 2/3 + 1/3 column ratio.
|
|
402
|
+
|
|
403
|
+
<div class="component-preview pb-0 !block">
|
|
404
|
+
<Jumbotron
|
|
405
|
+
variant="post-split"
|
|
406
|
+
title="Slim Wide Split"
|
|
407
|
+
image="https://img.freepik.com/premium-photo/tranquil-scene-nature-beauty-tropical-rainforest-adventure-generated-by-artificial-intelligence_188544-83820.jpg?w=1200&h=675&f=webp"
|
|
408
|
+
slim
|
|
409
|
+
split="wide"
|
|
410
|
+
/>
|
|
411
|
+
</div>
|
|
412
|
+
|
|
413
|
+
```js
|
|
414
|
+
<Jumbotron
|
|
415
|
+
variant="post-split"
|
|
416
|
+
title="Slim Wide Split"
|
|
417
|
+
image="path/to/image.jpg"
|
|
418
|
+
slim
|
|
419
|
+
split="wide"
|
|
420
|
+
/>
|
|
421
|
+
```
|
|
422
|
+
|
|
358
423
|
### Post Split with Text Alignment
|
|
359
424
|
Use the `align` prop to control text alignment within the content area. Available options: `left` (default), `center`, `right`.
|
|
360
425
|
|
|
@@ -398,7 +463,7 @@ Use the `align` prop to control text alignment within the content area. Availabl
|
|
|
398
463
|
Shows how to fully customize the header section using the intro slot. Useful for complex layouts or custom styling.
|
|
399
464
|
|
|
400
465
|
<div class="component-preview">
|
|
401
|
-
<Jumbotron variant="default"
|
|
466
|
+
<Jumbotron variant="default" slim>
|
|
402
467
|
<h2 slot="intro" class="text-3xl text-white sm:(text-3xl pt-0) md:text-4xl lg:text-5xl">
|
|
403
468
|
Lorem ipsum dolor sit amet, <span class="text-accent-light">consectetur</span> adipiscing elit.
|
|
404
469
|
</h2>
|
|
@@ -409,7 +474,7 @@ Shows how to fully customize the header section using the intro slot. Useful for
|
|
|
409
474
|
</div>
|
|
410
475
|
|
|
411
476
|
```js
|
|
412
|
-
<Jumbotron variant="default"
|
|
477
|
+
<Jumbotron variant="default" slim>
|
|
413
478
|
<h2 slot="intro" class="text-3xl text-white sm:(text-3xl pt-0) md:text-4xl lg:text-5xl">
|
|
414
479
|
Lorem ipsum dolor sit amet, <span class="text-accent-light">consectetur</span> adipiscing elit.
|
|
415
480
|
</h2>
|
|
@@ -428,9 +493,9 @@ Shows how to fully customize the header section using the intro slot. Useful for
|
|
|
428
493
|
- default: 'default'
|
|
429
494
|
- `title`: Main heading text. Supports HTML markup for styling.
|
|
430
495
|
- `image`: Image URL (required for hero, post and post-split variants)
|
|
496
|
+
- `slim`: Reduces vertical padding and height (works with default, hero, and post-split variants)
|
|
431
497
|
|
|
432
498
|
### Default & Hero Props
|
|
433
|
-
- `small`: Reduces vertical padding (useful for secondary content)
|
|
434
499
|
- `description`: Secondary text below title (hero variant only)
|
|
435
500
|
- `info`: Additional information text (hero variant only)
|
|
436
501
|
|
|
@@ -450,6 +515,9 @@ Shows how to fully customize the header section using the intro slot. Useful for
|
|
|
450
515
|
- `description`: Optional description text below the title
|
|
451
516
|
- `fullWidth`: When true, adds `full-width-block` class for full viewport width
|
|
452
517
|
- `align`: Text alignment within content area ('left' | 'center' | 'right', default: 'left')
|
|
518
|
+
- `split`: Column width ratio on desktop ('equal' | 'wide', default: 'equal')
|
|
519
|
+
- `equal`: 50/50 split between text and image
|
|
520
|
+
- `wide`: 2/3 text + 1/3 image split
|
|
453
521
|
|
|
454
522
|
### Slots
|
|
455
523
|
- `intro`: Replaces the default title with custom content. Useful for complex headings or custom markup.
|
|
@@ -54,13 +54,18 @@ export const jumbotronShortcuts = [
|
|
|
54
54
|
['jumbotron-split-wrapper', 'w-full'],
|
|
55
55
|
['jumbotron-split-container', 'xl:container mx-auto px-3.5 md:px-0'],
|
|
56
56
|
['jumbotron-split-header', 'w-full justify-center text-white z-2 mt-auto md:(grid grid-cols-2) pb-4 mb-8'],
|
|
57
|
+
['jumbotron-split-header-wide', 'md:grid-cols-[2fr_1fr]'],
|
|
58
|
+
['jumbotron-split-header-slim', 'pb-2 mb-4'],
|
|
57
59
|
['jumbotron-split-content', 'pl-4 pr-8 py-5 xl:(py-0 pl-0) flex flex-wrap'],
|
|
60
|
+
['jumbotron-split-content-slim', 'py-3 xl:py-0'],
|
|
58
61
|
[
|
|
59
62
|
'jumbotron-split-title',
|
|
60
63
|
'font-headlight text-3xl md:(text-4xl mb-3) xl:text-11 mt-1 order-2 line-clamp-3 pb-1 w-full',
|
|
61
64
|
],
|
|
62
65
|
['jumbotron-split-meta', 'order-3 flex items-center text-gray-100'],
|
|
63
66
|
['jumbotron-split-image-wrapper', 'relative -mb-8 md:mt-4'],
|
|
67
|
+
['jumbotron-split-image-wrapper-slim', '-mb-4 md:mt-2'],
|
|
64
68
|
['jumbotron-split-image', 'relative shadow-xl md:max-h-112 overflow-hidden'],
|
|
69
|
+
['jumbotron-split-image-slim', 'md:max-h-72'],
|
|
65
70
|
['jumbotron-split-img', 'object-cover'],
|
|
66
71
|
];
|