spoko-design-system 1.12.0 → 1.13.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
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [1.13.0](https://github.com/polo-blue/sds/compare/v1.12.1...v1.13.0) (2025-12-06)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **jumbotron:** add align prop to PostSplit variant ([b3bd696](https://github.com/polo-blue/sds/commit/b3bd6967fca48eea0ca11d225c320e210bcf749e))
|
|
6
|
+
|
|
7
|
+
## [1.12.1](https://github.com/polo-blue/sds/compare/v1.12.0...v1.12.1) (2025-12-06)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **jumbotron:** add overflow-hidden and right alignment to split-image ([2545a89](https://github.com/polo-blue/sds/commit/2545a89bbc01bd262cbd4a56346ba3cca9ead619))
|
|
12
|
+
|
|
1
13
|
## [1.12.0](https://github.com/polo-blue/sds/compare/v1.11.5...v1.12.0) (2025-12-06)
|
|
2
14
|
|
|
3
15
|
### Features
|
package/package.json
CHANGED
|
@@ -20,6 +20,7 @@ interface Props {
|
|
|
20
20
|
backgroundClass?: string;
|
|
21
21
|
lang?: string;
|
|
22
22
|
fullWidth?: boolean;
|
|
23
|
+
align?: 'left' | 'center' | 'right';
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
const {
|
|
@@ -37,6 +38,7 @@ const {
|
|
|
37
38
|
backgroundClass = 'bg-blue-darker',
|
|
38
39
|
lang = 'en',
|
|
39
40
|
fullWidth = false,
|
|
41
|
+
align = 'left',
|
|
40
42
|
} = Astro.props;
|
|
41
43
|
|
|
42
44
|
// Helper (function to check if a slot has content)
|
|
@@ -92,6 +94,7 @@ const commonProps = {
|
|
|
92
94
|
imageWidth={imageWidth}
|
|
93
95
|
imageHeight={imageHeight}
|
|
94
96
|
fullWidth={fullWidth}
|
|
97
|
+
align={align}
|
|
95
98
|
/>
|
|
96
99
|
)
|
|
97
100
|
}
|
|
@@ -16,6 +16,7 @@ interface Props {
|
|
|
16
16
|
hasCategories: boolean;
|
|
17
17
|
lang: string;
|
|
18
18
|
fullWidth?: boolean;
|
|
19
|
+
align?: 'left' | 'center' | 'right';
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
const {
|
|
@@ -30,8 +31,17 @@ const {
|
|
|
30
31
|
hasCategories,
|
|
31
32
|
lang = 'en',
|
|
32
33
|
fullWidth = false,
|
|
34
|
+
align = 'left',
|
|
33
35
|
} = Astro.props;
|
|
34
36
|
|
|
37
|
+
// Alignment class mapping
|
|
38
|
+
const alignmentClasses = {
|
|
39
|
+
left: 'justify-start',
|
|
40
|
+
center: 'justify-center',
|
|
41
|
+
right: 'justify-end',
|
|
42
|
+
};
|
|
43
|
+
const alignmentClass = alignmentClasses[align];
|
|
44
|
+
|
|
35
45
|
// Helper function to remove HTML tags
|
|
36
46
|
const stripHtml = (html: string) => {
|
|
37
47
|
return html.replace(/<[^>]*>/g, '');
|
|
@@ -45,7 +55,10 @@ const cleanTitle = stripHtml(title);
|
|
|
45
55
|
<div class="jumbotron-split-container">
|
|
46
56
|
<header class="jumbotron-split-header">
|
|
47
57
|
<div
|
|
48
|
-
class=
|
|
58
|
+
class:list={[
|
|
59
|
+
'heading flex flex-wrap text-white relative items-center mt-auto w-full z-[2]',
|
|
60
|
+
alignmentClass,
|
|
61
|
+
]}
|
|
49
62
|
>
|
|
50
63
|
<div class="jumbotron-split-content">
|
|
51
64
|
<h1 class="jumbotron-split-title" set:html={title} />
|
|
@@ -43,6 +43,6 @@ export const jumbotronShortcuts = [
|
|
|
43
43
|
['jumbotron-split-title', 'font-headlight text-3xl md:(text-4xl mb-3) xl:text-11 mt-1 order-2 line-clamp-3 pb-1 w-full'],
|
|
44
44
|
['jumbotron-split-meta', 'order-3 flex items-center text-gray-100'],
|
|
45
45
|
['jumbotron-split-image-wrapper', 'relative -mb-8 md:(mt-4 -ml-4 mr-4) xl:(ml-0 mr-0)'],
|
|
46
|
-
['jumbotron-split-image', 'relative shadow-xl md:max-h-112'],
|
|
46
|
+
['jumbotron-split-image', 'relative shadow-xl md:max-h-112 overflow-hidden md:ml-auto'],
|
|
47
47
|
['jumbotron-split-img', 'object-cover']
|
|
48
48
|
];
|