@kolkrabbi/kol-component 0.310.0 → 0.311.1
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 +1 -1
- package/src/atoms/Image.jsx +1 -1
- package/src/molecules/ColorInputRow.jsx +2 -2
- package/src/molecules/ColorSwatch.jsx +1 -1
- package/src/molecules/ContentText.jsx +1 -1
- package/src/molecules/FieldRow.jsx +3 -3
- package/src/molecules/PropertyInput.jsx +2 -2
- package/src/molecules/TabsRow.jsx +11 -6
- package/src/organisms/ColorPickerPopover.jsx +1 -1
- package/src/organisms/FramedMediaBand.jsx +1 -1
- package/src/organisms/RecordManager.jsx +8 -8
package/package.json
CHANGED
package/src/atoms/Image.jsx
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* visible at its intended size (aspect-ratio preserved).
|
|
7
7
|
*/
|
|
8
8
|
import { useState } from 'react'
|
|
9
|
-
import AssetPlaceholder from '../utilities/AssetPlaceholder'
|
|
9
|
+
import AssetPlaceholder from '../utilities/AssetPlaceholder.jsx'
|
|
10
10
|
|
|
11
11
|
export default function Image({
|
|
12
12
|
src,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
2
|
import { Icon } from '@kolkrabbi/kol-icons'
|
|
3
3
|
import ColorSwatch from './ColorSwatch.jsx'
|
|
4
|
-
import Input from '../atoms/Input'
|
|
5
|
-
import { usePopover, PopoverPanel, Tooltip } from '../utilities/Popover'
|
|
4
|
+
import Input from '../atoms/Input.jsx'
|
|
5
|
+
import { usePopover, PopoverPanel, Tooltip } from '../utilities/Popover.jsx'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* ColorInputRow — swatch chip + `#` hex input row. The single merged form of
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
* onClick — if provided, renders as <button>; else <span>.
|
|
40
40
|
* title — passes through.
|
|
41
41
|
*/
|
|
42
|
-
import TransparentX from '../utilities/TransparentX'
|
|
42
|
+
import TransparentX from '../utilities/TransparentX.jsx'
|
|
43
43
|
import { Tooltip } from '../utilities/Popover.jsx'
|
|
44
44
|
|
|
45
45
|
const SIZE_CLASSES = {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* @param {'subtle'|'meta'|'body'|'lede'|'strong'|'shout'|'scream'|'emphasis'} text - ONE ink role for every slot, replacing the ink each ramp hardcodes (`text-emphasis` on a title, `text-meta` on a date). It also re-inks a `<slot>Class` override, which is the point: an override replaces the ramp string WHOLE, so `kickerClass="kol-sans-body-01"` silently drops the `text-meta` the ramp carried and the kicker jumps to inherited ink (kol-client-hrafn, `contentcard-bg-and-text-props` 2026-09-03). `text` sets the level once instead of re-specifying eight ramps. It FLATTENS the hierarchy by design — every slot lands on the same role — so a card that wants its own relative steps still passes per-slot classes
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
|
-
import Tag from '../atoms/Tag'
|
|
36
|
+
import Tag from '../atoms/Tag.jsx'
|
|
37
37
|
|
|
38
38
|
/* THE ROW INK LADDER — three rungs, and only three (2026-08-15).
|
|
39
39
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
2
|
import { Icon } from '@kolkrabbi/kol-icons'
|
|
3
|
-
import Input from '../atoms/Input'
|
|
4
|
-
import { usePopover, PopoverPanel } from '../utilities/Popover'
|
|
5
|
-
import Dropdown from './Dropdown'
|
|
3
|
+
import Input from '../atoms/Input.jsx'
|
|
4
|
+
import { usePopover, PopoverPanel } from '../utilities/Popover.jsx'
|
|
5
|
+
import Dropdown from './Dropdown.jsx'
|
|
6
6
|
import OptionRow from './OptionRow.jsx'
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Use in a `grid grid-cols-2 gap-4` for x/y/width/height/rotation row pairs.
|
|
7
7
|
*/
|
|
8
|
-
import Label from '../atoms/Label'
|
|
8
|
+
import Label from '../atoms/Label.jsx'
|
|
9
9
|
import Input from '../atoms/Input.jsx'
|
|
10
|
-
import Stepper from './Stepper'
|
|
10
|
+
import Stepper from './Stepper.jsx'
|
|
11
11
|
|
|
12
12
|
export default function PropertyInput({
|
|
13
13
|
label,
|
|
@@ -42,6 +42,10 @@ import { RAIL_ROW } from '../hooks/railRow.js'
|
|
|
42
42
|
* the transport both compose, so the two stay one size and one look):
|
|
43
43
|
* @param {'bottom'|'top'} [edge='bottom'] the pill's edge; `top` sits TABBAR_PILL_INSET under the top safe-area inset
|
|
44
44
|
* @param {boolean} [border=true] the pill's 1px oq-08 hairline
|
|
45
|
+
* @param {boolean} [dock=false] THE DOCK (PhoneNavDock, kol-fxr 2026-10-28, frame B2 — user: *"I moved the Phone nav in desktop,
|
|
46
|
+
* that component shoudl probablyget its own variant"*): the pill on a DESK — shown from md up, hidden
|
|
47
|
+
* below (the phone has its own nav), placed at the content's bottom-left, 64 in from the rail's edge
|
|
48
|
+
* (`--kol-shell-rail-width`) and 64 up, not centred
|
|
45
49
|
* @param {boolean} [shadow=false] a drop shadow — for a pill that floats over content (the transport), not the nav
|
|
46
50
|
* @param {'fill'|'circle'} [active='fill'] the lit slot: `fill` its whole 56 slot (today), `circle` a 44×44 1:1 circle
|
|
47
51
|
* @param {boolean} [foldable=false] a sideways swipe (> 40px) folds the pill into a 28×72 edge tab; a tap restores it
|
|
@@ -59,11 +63,11 @@ export const tabbarPillWidth = (count) => count * TABBAR_PILL_TAB + 14
|
|
|
59
63
|
/* the collapse's motion — one duration for the width and the glyph swap (300, user 2026-10-23: 180 read as abrupt) */
|
|
60
64
|
const COLLAPSE_MS = 300
|
|
61
65
|
|
|
62
|
-
export default function TabsRow({ tabs: raw = [], value, onChange, onClose, onMinimise, look = 'underline', placement = 'inline', shape = 'bar', collapsed = false, onExpand, edge, border, shadow, active, foldable, folded, onFoldChange, foldSide, size, tracked = false, ariaLabel, className, style }) {
|
|
66
|
+
export default function TabsRow({ tabs: raw = [], value, onChange, onClose, onMinimise, look = 'underline', placement = 'inline', shape = 'bar', collapsed = false, onExpand, edge, border, shadow, dock, active, foldable, folded, onFoldChange, foldSide, size, tracked = false, ariaLabel, className, style }) {
|
|
63
67
|
const tabs = raw.map((t) => ({ ...t, id: t.id ?? t.value }))
|
|
64
68
|
if (look === 'chip') return <ChipTabs tabs={tabs} value={value} onChange={onChange} size={size ?? 'sm'} ariaLabel={ariaLabel} className={className ?? ''} />
|
|
65
69
|
if (look === 'text') return <TextTabs tabs={tabs} value={value} onChange={onChange} size={size ?? 14} tracked={tracked} className={className ?? 'gap-6'} style={style} />
|
|
66
|
-
if (look === 'stacked') return <StackedTabs tabs={tabs} value={value} onChange={onChange} placement={placement} shape={shape} collapsed={collapsed} onExpand={onExpand} edge={edge} border={border} shadow={shadow} active={active} foldable={foldable} folded={folded} onFoldChange={onFoldChange} foldSide={foldSide} ariaLabel={ariaLabel} className={className ?? ''} />
|
|
70
|
+
if (look === 'stacked') return <StackedTabs tabs={tabs} value={value} onChange={onChange} placement={placement} shape={shape} collapsed={collapsed} onExpand={onExpand} edge={edge} border={border} shadow={shadow} dock={dock} active={active} foldable={foldable} folded={folded} onFoldChange={onFoldChange} foldSide={foldSide} ariaLabel={ariaLabel} className={className ?? ''} />
|
|
67
71
|
return <UnderlineTabs tabs={tabs} value={value} onChange={onChange} onClose={onClose} onMinimise={onMinimise} />
|
|
68
72
|
}
|
|
69
73
|
|
|
@@ -106,7 +110,7 @@ function TextTabs({ tabs, value, onChange, size, tracked, className, style }) {
|
|
|
106
110
|
/* the fold: a sideways swipe past this folds the pill, as frame E's prototype measures it */
|
|
107
111
|
const FOLD_SWIPE = 40
|
|
108
112
|
|
|
109
|
-
function StackedTabs({ tabs, value, onChange, placement, shape = 'bar', collapsed = false, onExpand, edge = 'bottom', border = true, shadow = false, active: activeShape = 'fill', foldable = false, folded: foldedProp, onFoldChange, foldSide = 'left', ariaLabel = 'Sections', className }) {
|
|
113
|
+
function StackedTabs({ tabs, value, onChange, placement, shape = 'bar', collapsed = false, onExpand, edge = 'bottom', border = true, shadow = false, dock = false, active: activeShape = 'fill', foldable = false, folded: foldedProp, onFoldChange, foldSide = 'left', ariaLabel = 'Sections', className }) {
|
|
110
114
|
const [foldedOwn, setFoldedOwn] = useState(false)
|
|
111
115
|
const swipe = useRef({ x: null, swiped: false })
|
|
112
116
|
if (tabs.length === 0) return null
|
|
@@ -154,7 +158,7 @@ function StackedTabs({ tabs, value, onChange, placement, shape = 'bar', collapse
|
|
|
154
158
|
<nav
|
|
155
159
|
{...swipeProps}
|
|
156
160
|
className={`${pill
|
|
157
|
-
?
|
|
161
|
+
? `kol-mobile-tabbar kol-mobile-tabbar-pill ${dock ? 'hidden md:flex' : 'md:hidden'} fixed z-[calc(var(--kol-z-sticky)+1)] rounded-full p-1.5 overflow-hidden `
|
|
158
162
|
: phone ? 'kol-mobile-tabbar md:hidden fixed inset-x-0 bottom-0 z-[var(--kol-z-sticky)] ' : ''}flex items-stretch ${className}`.trim()}
|
|
159
163
|
style={pill ? {
|
|
160
164
|
/* THE PILL (user 2026-10-23, iOS Files beside the full-width bar): floats off the bottom edge, hugs its tabs,
|
|
@@ -162,8 +166,9 @@ function StackedTabs({ tabs, value, onChange, placement, shape = 'bar', collapse
|
|
|
162
166
|
* centre line, so the collapse shrinks it toward where More was and the × lands under the same thumb. */
|
|
163
167
|
height: TABBAR_H,
|
|
164
168
|
width: isCollapsed ? TABBAR_H : W,
|
|
165
|
-
|
|
166
|
-
|
|
169
|
+
...(dock
|
|
170
|
+
? { left: 'calc(var(--kol-shell-rail-width, 48px) + 64px)', bottom: 64 }
|
|
171
|
+
: { right: `calc(50% - ${W / 2}px)`, [top ? 'top' : 'bottom']: inset }),
|
|
167
172
|
background: 'var(--kol-surface-secondary)',
|
|
168
173
|
/* without the hairline the 1px it took stays, transparent, so the slots never move */
|
|
169
174
|
border: `1px solid ${border ? 'var(--kol-oq-08)' : 'transparent'}`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
2
|
import ColorSwatch from '../molecules/ColorSwatch.jsx'
|
|
3
|
-
import Input from '../atoms/Input'
|
|
3
|
+
import Input from '../atoms/Input.jsx'
|
|
4
4
|
import { usePopover, PopoverPanel } from '../utilities/Popover.jsx'
|
|
5
5
|
import { HueStrip, SBSquare, AlphaStrip } from './SpectrumControls.jsx'
|
|
6
6
|
import { hexToHsva, hsvaToHex } from '../hooks/colorMath.js'
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useMemo, useRef, useState } from 'react'
|
|
2
2
|
import { createPortal } from 'react-dom'
|
|
3
3
|
import { Icon } from '@kolkrabbi/kol-icons'
|
|
4
|
-
import Button from '../atoms/Button'
|
|
5
|
-
import SearchInput from '../molecules/SearchInput'
|
|
6
|
-
import ToggleCheckbox from '../atoms/ToggleCheckbox'
|
|
7
|
-
import IconFrame from '../atoms/IconFrame'
|
|
4
|
+
import Button from '../atoms/Button.jsx'
|
|
5
|
+
import SearchInput from '../molecules/SearchInput.jsx'
|
|
6
|
+
import ToggleCheckbox from '../atoms/ToggleCheckbox.jsx'
|
|
7
|
+
import IconFrame from '../atoms/IconFrame.jsx'
|
|
8
8
|
import Rail from '../molecules/Rail.jsx'
|
|
9
|
-
import FieldRow, { StatusChip } from '../molecules/FieldRow'
|
|
10
|
-
import { Tooltip } from '../utilities/Popover'
|
|
11
|
-
import Table from './Table'
|
|
12
|
-
import MediaLibrary from './MediaLibrary'
|
|
9
|
+
import FieldRow, { StatusChip } from '../molecules/FieldRow.jsx'
|
|
10
|
+
import { Tooltip } from '../utilities/Popover.jsx'
|
|
11
|
+
import Table from './Table.jsx'
|
|
12
|
+
import MediaLibrary from './MediaLibrary.jsx'
|
|
13
13
|
import usePointerSort from '../hooks/usePointerSort.js'
|
|
14
14
|
|
|
15
15
|
/* TOOLBAR ICONS ARE BARE GLYPHS (user ruling 2026-08-09, verbatim: "did I
|