spoko-design-system 1.12.1 → 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,9 @@
|
|
|
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
|
+
|
|
1
7
|
## [1.12.1](https://github.com/polo-blue/sds/compare/v1.12.0...v1.12.1) (2025-12-06)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
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} />
|