spoko-design-system 1.16.1 → 1.16.2

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.16.2](https://github.com/polo-blue/sds/compare/v1.16.1...v1.16.2) (2025-12-07)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **Jumbotron:** make align prop work correctly in PostSplit variant ([9e0f7df](https://github.com/polo-blue/sds/commit/9e0f7df15666c7af54c9709b6fe36f4845afaebd))
6
+
1
7
  ## [1.16.1](https://github.com/polo-blue/sds/compare/v1.16.0...v1.16.1) (2025-12-07)
2
8
 
3
9
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spoko-design-system",
3
- "version": "1.16.1",
3
+ "version": "1.16.2",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./index.ts",
@@ -41,13 +41,21 @@ const {
41
41
  align = 'left',
42
42
  } = Astro.props;
43
43
 
44
- // Alignment class mapping
45
- const alignmentClasses = {
46
- left: 'justify-start',
47
- center: 'justify-center',
48
- right: 'justify-end',
44
+ // Alignment determines content and image position
45
+ // align="left" = content left, image right (default)
46
+ // align="center" = both centered
47
+ // align="right" = content right, image left
48
+
49
+ // Content wrapper margin classes
50
+ const contentMarginClasses = {
51
+ left: 'mr-auto',
52
+ center: 'mx-auto text-center',
53
+ right: 'ml-auto text-right',
49
54
  };
50
- const alignmentClass = alignmentClasses[align];
55
+ const contentMarginClass = contentMarginClasses[align];
56
+
57
+ // Image is always aligned to the right
58
+ const imageWrapperClass = 'ml-auto';
51
59
 
52
60
  // Helper function to remove HTML tags
53
61
  const stripHtml = (html: string) => {
@@ -61,13 +69,8 @@ const cleanTitle = stripHtml(title);
61
69
  <div class:list={['jumbotron-split-wrapper bg-blue-900 bg-vw', { 'full-width-block': fullWidth }]}>
62
70
  <div class="jumbotron-split-container">
63
71
  <header class="jumbotron-split-header">
64
- <div
65
- class:list={[
66
- 'heading flex flex-wrap text-white relative items-center mt-auto w-full z-[2]',
67
- alignmentClass,
68
- ]}
69
- >
70
- <div class="jumbotron-split-content">
72
+ <div class="heading flex flex-wrap text-white relative items-center mt-auto w-full z-[2]">
73
+ <div class:list={['jumbotron-split-content', contentMarginClass]}>
71
74
  <h1 class="jumbotron-split-title" set:html={title} />
72
75
 
73
76
  {description && <p class="jumbotron-description order-3 w-full mt-0" set:html={description} />}
@@ -98,7 +101,7 @@ const cleanTitle = stripHtml(title);
98
101
 
99
102
  {
100
103
  image && (
101
- <div class="jumbotron-split-image-wrapper">
104
+ <div class:list={['jumbotron-split-image-wrapper', imageWrapperClass]}>
102
105
  <div class:list={['jumbotron-split-image', imageClass]}>
103
106
  <Image
104
107
  class="jumbotron-split-img"
@@ -54,13 +54,13 @@ 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-content', 'pl-4 pr-8 py-5 xl:(py-0 pl-0) flex flex-wrap ml-auto'],
57
+ ['jumbotron-split-content', 'pl-4 pr-8 py-5 xl:(py-0 pl-0) flex flex-wrap'],
58
58
  [
59
59
  'jumbotron-split-title',
60
60
  'font-headlight text-3xl md:(text-4xl mb-3) xl:text-11 mt-1 order-2 line-clamp-3 pb-1 w-full',
61
61
  ],
62
62
  ['jumbotron-split-meta', 'order-3 flex items-center text-gray-100'],
63
- ['jumbotron-split-image-wrapper', 'relative -mb-8 md:(mt-4 -ml-4 mr-4) xl:(ml-0 mr-0)'],
63
+ ['jumbotron-split-image-wrapper', 'relative -mb-8 md:mt-4'],
64
64
  ['jumbotron-split-image', 'relative shadow-xl md:max-h-112 overflow-hidden'],
65
65
  ['jumbotron-split-img', 'object-cover'],
66
66
  ];