@kolkrabbi/kol-component 0.65.0 → 0.66.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.
|
|
3
|
+
"version": "0.66.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",
|
package/src/atoms/Divider.jsx
CHANGED
|
@@ -10,15 +10,24 @@ import React from 'react'
|
|
|
10
10
|
* @param {Object} props
|
|
11
11
|
* @param {string} props.variant - 'horizontal' or 'vertical' (default: 'horizontal')
|
|
12
12
|
* @param {string} props.className - Additional classes
|
|
13
|
+
* @param {number} props.height - vertical variant only: the rule's height in px
|
|
14
|
+
* (default 16 — sized to the type it separates, not to the row)
|
|
13
15
|
* @param {string} props.opacity - Opacity level (01, 02, 04, 08, 12, 16, 24, 32, 48, 64, 80, 88, 96) (default: '08')
|
|
14
16
|
*/
|
|
15
|
-
const Divider = ({ variant = 'horizontal', className = '', opacity = '08', inverse = false }) => {
|
|
17
|
+
const Divider = ({ variant = 'horizontal', className = '', opacity = '08', inverse = false, height = 16 }) => {
|
|
16
18
|
const isVertical = variant === 'vertical'
|
|
17
19
|
const opacityClass = inverse ? `bg-fg-inverse-${opacity}` : `bg-fg-${opacity}`
|
|
18
20
|
|
|
19
21
|
if (isVertical) {
|
|
22
|
+
/* THE RULE IS CENTRED ON WHAT IT SEPARATES, not stretched to the row.
|
|
23
|
+
*
|
|
24
|
+
* This hardcoded `self-stretch` AHEAD of `className`, so the wrapper always
|
|
25
|
+
* filled the flex line — a row whose height comes from 32px icon buttons
|
|
26
|
+
* gave a rule taller than the 18px type beside it, and any `self-*` passed
|
|
27
|
+
* from a call site lost to the hardcoded one. `align-self: center` with an
|
|
28
|
+
* explicit height puts it back on the type; `height` stays overridable. */
|
|
20
29
|
return (
|
|
21
|
-
<div className={`
|
|
30
|
+
<div className={`flex self-center items-center justify-center ${className}`.trim()} style={{ height }}>
|
|
22
31
|
<div className={opacityClass} style={{ width: '1px', height: '100%' }} />
|
|
23
32
|
</div>
|
|
24
33
|
)
|
|
@@ -81,12 +81,11 @@ const ContentFilters = ({
|
|
|
81
81
|
/* THE LOOK SEAMS. Every one defaults to what the component shipped, so
|
|
82
82
|
* passing nothing renders exactly as before — these exist because the
|
|
83
83
|
* hardcoded values were the wrong call for every consumer but one. */
|
|
84
|
-
/*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
|
|
89
|
-
titleClassName = 'kol-mono-14',
|
|
84
|
+
/* HELPER + UPPERCASE. The title is part of the header STRIP — same chrome as
|
|
85
|
+
* RECENT/SAVED beside it — and helper is the single-line ramp that strip
|
|
86
|
+
* runs on. Casing and ramp are separate props precisely so a consumer whose
|
|
87
|
+
* titles wrap can move to `kol-mono-14` without losing the casing. */
|
|
88
|
+
titleClassName = 'kol-helper-14',
|
|
90
89
|
titleUppercase = true,
|
|
91
90
|
labelClassName = 'kol-helper-12 text-fg-96',
|
|
92
91
|
labelUppercase = true,
|
|
@@ -277,7 +276,7 @@ const ContentFilters = ({
|
|
|
277
276
|
{titleIcon && <IconFrame name={titleIcon} variant="secondary" size="md" />}
|
|
278
277
|
<span className={titleClassName} style={titleUppercase ? { textTransform: 'uppercase', letterSpacing: 1 } : undefined}>{title}</span>
|
|
279
278
|
</h2>
|
|
280
|
-
<Divider variant="vertical"
|
|
279
|
+
<Divider variant="vertical" />
|
|
281
280
|
<div className="flex items-center gap-1">
|
|
282
281
|
{/* IconFrame, not a kol-btn with its chrome cancelled inline.
|
|
283
282
|
* 05-control-chrome.md:109 — "any icon-only control in chrome is
|