@kolkrabbi/kol-component 0.178.0 → 0.180.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.180.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",
|
|
@@ -43,10 +43,18 @@
|
|
|
43
43
|
* mono-16, 8/20 pad). Same cell padding + mono type as the
|
|
44
44
|
* matching `.kol-btn-{sm,md,lg}`, so a segmented strip lines
|
|
45
45
|
* up with a Button of the same size.
|
|
46
|
+
* tone — the ground (segmented-toggle-sunken-tone, kol-client-olina 2026-09-03: the one
|
|
47
|
+
* control ControlToneSunken skipped; kol-fxr and olina carried the same three CSS
|
|
48
|
+
* lines to fake it). `sunken` (alias `inverse`): shell border transparent, the
|
|
49
|
+
* selected cell on `--kol-surface-sunken` / `fg-96`, rest cells as the default paints
|
|
50
|
+
* them; `filled` and `tonal` keep their own selected law. Through `toneClass`, so a
|
|
51
|
+
* `kol-tone-sunken` wrapper reaches it too. Unset = inherit.
|
|
46
52
|
* ariaLabel — accessible name for the group
|
|
47
53
|
* className — additional classes on the outer shell
|
|
48
54
|
*/
|
|
49
|
-
|
|
55
|
+
import { toneClass } from '../utilities/tone.js'
|
|
56
|
+
|
|
57
|
+
export default function SegmentedToggle({ value, onChange, options = [], variant = 'default', size = 'md', tone = 'default', ariaLabel, className = '' }) {
|
|
50
58
|
const cellType = { xs: 'kol-mono-8', sm: 'kol-mono-12', md: 'kol-mono-14', lg: 'kol-mono-16' }[size]
|
|
51
59
|
const stateless = value == null
|
|
52
60
|
const focusIdx = Math.max(0, options.findIndex((opt) => opt.value === value))
|
|
@@ -71,6 +79,7 @@ export default function SegmentedToggle({ value, onChange, options = [], variant
|
|
|
71
79
|
(variant === 'filled' || variant === 'tonal') && 'kol-seg--filled',
|
|
72
80
|
variant === 'tonal' && 'kol-seg--tonal',
|
|
73
81
|
size !== 'md' && `kol-seg--${size}`,
|
|
82
|
+
toneClass(tone),
|
|
74
83
|
className,
|
|
75
84
|
].filter(Boolean).join(' ')}
|
|
76
85
|
>
|
|
@@ -93,7 +93,7 @@ export default function SelectionOverlay({
|
|
|
93
93
|
fontSize: 10,
|
|
94
94
|
letterSpacing: '0.04em',
|
|
95
95
|
color: accentColor,
|
|
96
|
-
background: 'rgba(0,0,0,0.6)',
|
|
96
|
+
background: 'rgba(0,0,0,0.6)', /* a label chip on a canvas, not a scrim (sweep 2026-09-03) */
|
|
97
97
|
padding: '2px 6px',
|
|
98
98
|
borderRadius: 2,
|
|
99
99
|
whiteSpace: 'nowrap',
|
package/src/molecules/Modal.jsx
CHANGED
|
@@ -76,9 +76,12 @@ function ModalView({ state, closeWith }) {
|
|
|
76
76
|
return (
|
|
77
77
|
<div
|
|
78
78
|
onMouseDown={cancel}
|
|
79
|
+
/* THE scrim (overlay-scrim-outliers sweep, 2026-09-03): the docs said Modal
|
|
80
|
+
wore `.kol-overlay-scrim`; the source drew a raw `rgba(0,0,0,0.5)`. The
|
|
81
|
+
z stays above the drawers it can open from. */
|
|
82
|
+
className="kol-overlay-scrim"
|
|
79
83
|
style={{
|
|
80
84
|
position: 'fixed', inset: 0, zIndex: 1000,
|
|
81
|
-
background: 'rgba(0,0,0,0.5)',
|
|
82
85
|
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
83
86
|
}}
|
|
84
87
|
>
|
|
@@ -182,6 +182,7 @@ export default function TiltBento({
|
|
|
182
182
|
{overlayOpacity > 0 && (
|
|
183
183
|
<div
|
|
184
184
|
className={`absolute -inset-1 rounded ${coarse ? (coarseOpen ? 'opacity-60' : 'opacity-0') : 'opacity-0 group-hover:opacity-100'} ${fade} pointer-events-none`.trim()}
|
|
185
|
+
/* a tile's hover veil at the consumer's opacity — not a scrim (sweep 2026-09-03) */
|
|
185
186
|
style={{ backgroundColor: `rgba(0, 0, 0, ${overlayOpacity / 100})` }}
|
|
186
187
|
/>
|
|
187
188
|
)}
|
|
@@ -34,6 +34,9 @@ export default function OverlayGlassPanel({
|
|
|
34
34
|
className={`flex flex-col ${alignCls} ${gap} rounded-[var(--kol-radius-xs)] ${padding} ${maxWidth ? `${maxWidth} mx-auto` : ''} ${className}`.trim()}
|
|
35
35
|
style={{
|
|
36
36
|
backgroundColor: `color-mix(in srgb, var(--kol-surface-primary) ${surfaceOpacity}%, transparent)`,
|
|
37
|
+
/* a PANEL, not a scrim: the blur is this surface's whole point and the
|
|
38
|
+
no-blur ruling (OverlayScrimBlur, 2026-09-01) is about scrims — kept on
|
|
39
|
+
purpose (overlay-scrim-outliers sweep, 2026-09-03) */
|
|
37
40
|
backdropFilter: `blur(${blur})`,
|
|
38
41
|
}}
|
|
39
42
|
>
|