@kolkrabbi/kol-component 0.172.0 → 0.173.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-component",
3
- "version": "0.172.0",
3
+ "version": "0.173.0",
4
4
  "description": "KOL design-system components — atoms through organisms, emitting canonical kol-* classes. Pairs with @kolkrabbi/kol-theme for styling.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -52,6 +52,13 @@ import { minHeightClass } from './sectionHeights.js'
52
52
  * media stacks on top at `min-h-[50vh]`. This is the layout `SectionHero variant="split"`
53
53
  * draws, without the hero's overlay / glass panel / carousel machinery or its name — the
54
54
  * user's reason for not putting a hero under an About section.
55
+ * @param {'center'|'start'} [textAlign] how the TYPE rags inside the text block —
56
+ * `align` places the block, this aligns what is in it (section-split-fill-text-align,
57
+ * kol-client-olina 2026-09-03; user: *"same placement but just aligned to left … can the
58
+ * text align left and everything else kinda stays as is?"*). Works in BOTH forms rather
59
+ * than only in `fill`, because a prop that silently does nothing in the default form is a
60
+ * seam wired to nothing. Unset, each form keeps exactly what it did: `fill` centres,
61
+ * bounded follows `align` (centred when `align="center"`, else start).
55
62
  * @param {'right'|'left'|'center'} [align='right'] media side, or centred single column
56
63
  * @param {'full'|'80'|'60'|string} [height='60'] min-height on the family's ladder — full = 100dvh,
57
64
  * 80 = 70svh / 80vh, 60 = 50svh / 60vh (default), 40 = 35svh / 40vh; the columns stay vertically centred inside it
@@ -80,6 +87,7 @@ export default function SectionSplit({
80
87
  mediaHover = false,
81
88
  mediaClip = true,
82
89
  align = 'right',
90
+ textAlign,
83
91
  fill = false,
84
92
  height = '60',
85
93
  caption,
@@ -100,6 +108,10 @@ export default function SectionSplit({
100
108
  const bleed = fullBleed ? FULL_BLEED : ''
101
109
  const centred = align === 'center'
102
110
  const mediaFirst = align === 'left'
111
+ /* unset = each form's own prior behaviour, so nothing existing moves */
112
+ const fillText = textAlign ?? 'center'
113
+ const boundedText = textAlign ?? (centred ? 'center' : 'start')
114
+ const justify = (a) => (a === 'center' ? 'justify-center' : 'justify-start')
103
115
  const grid = centred
104
116
  ? 'grid grid-cols-1 justify-items-center gap-[clamp(48px,6vw,96px)]'
105
117
  : 'grid grid-cols-1 min-[901px]:grid-cols-2 items-center gap-[clamp(48px,6vw,96px)]'
@@ -135,14 +147,14 @@ export default function SectionSplit({
135
147
  headlineAs={headlineAs}
136
148
  body={body}
137
149
  actions={actions}
138
- actionsClass="flex flex-wrap gap-4 pt-2 justify-center"
139
- align="center"
150
+ actionsClass={`flex flex-wrap gap-4 pt-2 ${justify(fillText)}`}
151
+ align={fillText}
140
152
  slotClass={slotClass}
141
153
  slotStyle={slotStyle}
142
154
  className="max-w-[var(--kol-content-column)]"
143
155
  >
144
156
  {meta && meta.length > 0 && (
145
- <div className="kol-section-split-meta flex flex-wrap gap-y-7 gap-x-12 pt-4 justify-center">
157
+ <div className={`kol-section-split-meta flex flex-wrap gap-y-7 gap-x-12 pt-4 ${justify(fillText)}`}>
146
158
  {meta.map((m) => (
147
159
  <div key={m.label} className="flex flex-col gap-0.5">
148
160
  <span className="kol-section-split-meta-num">{m.num}</span>
@@ -177,14 +189,14 @@ export default function SectionSplit({
177
189
  headlineAs={headlineAs}
178
190
  body={body}
179
191
  actions={actions}
180
- actionsClass={`flex flex-wrap gap-4 pt-2${centred ? ' justify-center' : ''}`}
181
- align={centred ? 'center' : 'start'}
192
+ actionsClass={`flex flex-wrap gap-4 pt-2 ${justify(boundedText)}`}
193
+ align={boundedText}
182
194
  slotClass={slotClass}
183
195
  slotStyle={slotStyle}
184
196
  className={`max-w-[640px] ${mediaFirst ? 'order-2' : ''} ${columnClassName}`}
185
197
  >
186
198
  {meta && meta.length > 0 && (
187
- <div className={`kol-section-split-meta flex flex-wrap gap-y-7 gap-x-12 pt-4${centred ? ' justify-center' : ''}`}>
199
+ <div className={`kol-section-split-meta flex flex-wrap gap-y-7 gap-x-12 pt-4 ${justify(boundedText)}`}>
188
200
  {meta.map((m) => (
189
201
  <div key={m.label} className="flex flex-col gap-0.5">
190
202
  <span className="kol-section-split-meta-num">{m.num}</span>