@kolkrabbi/kol-component 0.379.0 → 0.381.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 +4 -4
- package/src/atoms/Badge.jsx +1 -5
- package/src/atoms/Button.jsx +4 -11
- package/src/atoms/Input.jsx +2 -6
- package/src/atoms/Pill.jsx +1 -3
- package/src/atoms/ProgressBar.jsx +3 -6
- package/src/atoms/SectionLabel.jsx +0 -22
- package/src/atoms/Tag.jsx +4 -7
- package/src/atoms/Textarea.jsx +1 -5
- package/src/atoms/ToggleCheckbox.jsx +3 -5
- package/src/atoms/ToggleSwitch.jsx +2 -7
- package/src/atoms/ViewToggle.jsx +0 -27
- package/src/index.js +1 -1
- package/src/molecules/AccountMenu.jsx +2 -2
- package/src/molecules/ButtonGroup.jsx +5 -14
- package/src/molecules/ButtonSplit.jsx +12 -26
- package/src/molecules/ContentRow.jsx +1 -29
- package/src/molecules/ContextMenu.jsx +0 -1
- package/src/molecules/DocsToc.jsx +1 -16
- package/src/molecules/Dropdown.jsx +4 -17
- package/src/molecules/EmptyState.jsx +1 -15
- package/src/molecules/FieldPair.jsx +1 -1
- package/src/molecules/Header.jsx +4 -4
- package/src/molecules/IndexRow.jsx +1 -1
- package/src/molecules/InlineAddRow.jsx +2 -2
- package/src/molecules/LabeledControl.jsx +5 -11
- package/src/molecules/LayerRow.jsx +1 -1
- package/src/molecules/LinkAddRow.jsx +5 -7
- package/src/molecules/Menu.jsx +11 -30
- package/src/molecules/MenuFloat.jsx +6 -12
- package/src/molecules/MenuList.jsx +5 -11
- package/src/molecules/Modal.jsx +16 -48
- package/src/molecules/ModalHeader.jsx +12 -20
- package/src/molecules/ModalShell.jsx +4 -7
- package/src/molecules/NoticeBanner.jsx +1 -1
- package/src/molecules/PanelsMenu.jsx +2 -2
- package/src/molecules/PasswordInput.jsx +1 -1
- package/src/molecules/QuantityInput.jsx +2 -18
- package/src/molecules/QuickLookFrame.jsx +2 -31
- package/src/molecules/RailHeader.jsx +11 -20
- package/src/molecules/ReadingActions.jsx +2 -2
- package/src/molecules/ReadingNotes.jsx +3 -3
- package/src/molecules/ReadingSettings.jsx +8 -8
- package/src/molecules/SearchInput.jsx +4 -5
- package/src/molecules/SectionText.jsx +2 -9
- package/src/molecules/SettingsControls.jsx +23 -23
- package/src/molecules/Slider.jsx +3 -54
- package/src/molecules/SpecList.jsx +1 -21
- package/src/molecules/TabsRow.jsx +6 -50
- package/src/molecules/TaskRow.jsx +2 -2
- package/src/molecules/TocRow.jsx +1 -1
- package/src/molecules/WorkspaceSwitcher.jsx +3 -6
- package/src/organisms/CommandOverlay.jsx +16 -116
- package/src/organisms/ContentFilters.jsx +4 -12
- package/src/organisms/MediaLibrary.jsx +0 -55
- package/src/organisms/NavRail.jsx +1 -4
- package/src/organisms/ReadingContents.jsx +2 -2
- package/src/organisms/ReadingOverview.jsx +5 -5
- package/src/organisms/ReadingPanel.jsx +1 -1
- package/src/organisms/SettingsPanel.jsx +19 -40
- package/src/organisms/Table.jsx +1 -49
- package/src/utilities/Popover.jsx +2 -4
- package/src/utilities/SelectionOverlay.jsx +1 -45
- package/src/molecules/FloatModuleHeader.jsx +0 -11
- package/src/organisms/NavRailFloat.jsx +0 -139
|
@@ -40,7 +40,6 @@ export function useContextMenu() {
|
|
|
40
40
|
return { open: !!state, x: state?.x, y: state?.y, payload: state?.payload ?? null, openAt, close }
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
/** `variant="float"` (float-everything W4 row 55, 2026-11-04): the float list — the list radius, 34 rows, the float flyouts */
|
|
44
43
|
export default function ContextMenu({ menu, children, variant, className = '' }) {
|
|
45
44
|
/* ONE ESCAPE, ONE LEVEL (kol-fxr 2026-10-08: a menu opened inside a FullscreenOverlay took the
|
|
46
45
|
* dialog with it). Open, the menu is the top layer, so the overlay under it ignores that Escape. */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef } from 'react'
|
|
2
2
|
import useScrollSpy from '../hooks/useScrollSpy.js'
|
|
3
|
-
import TocRow from './TocRow.jsx'
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* DocsToc — A page's table of contents. on-page table of contents for long docs pages: a flat list of
|
|
@@ -75,10 +74,7 @@ import TocRow from './TocRow.jsx'
|
|
|
75
74
|
* knowledge and does not belong in the package.
|
|
76
75
|
*
|
|
77
76
|
* @param {Array<{id: string, label: string, children?: Array<{id: string, label: string}>}>} toc headings to render + observe; RAIL: `children` are the section's entries, one tick each in place of `minors`
|
|
78
|
-
* @param {'list'|'rail'
|
|
79
|
-
* W8 row 121, 2026-11-04) — the numbered contents list: one `TocRow` per heading
|
|
80
|
-
* (`01 · First interlude`), the one in view lifted fg-16 as `current`
|
|
81
|
-
* @param {boolean} numbered FLOAT: number the rows 01, 02 … (default true)
|
|
77
|
+
* @param {'list'|'rail'} variant render (default 'list' — the docs-sidebar column)
|
|
82
78
|
* @param {Function} onNavigate (event) => void — optional click handler on every link
|
|
83
79
|
* @param {string} rootMargin IntersectionObserver rootMargin passed to the
|
|
84
80
|
* spy. Default keeps the ported source's tighter
|
|
@@ -105,7 +101,6 @@ export default function DocsToc({
|
|
|
105
101
|
position = 'right',
|
|
106
102
|
minSections = 2,
|
|
107
103
|
ariaLabel = 'On this page',
|
|
108
|
-
numbered = true,
|
|
109
104
|
className = '',
|
|
110
105
|
}) {
|
|
111
106
|
/* Children are observed too, in document order; the active SECTION is the
|
|
@@ -116,16 +111,6 @@ export default function DocsToc({
|
|
|
116
111
|
)
|
|
117
112
|
const activeSection = toc.find((item) => item.id === activeId || item.children?.some((c) => c.id === activeId))?.id
|
|
118
113
|
|
|
119
|
-
if (variant === 'float') {
|
|
120
|
-
return (
|
|
121
|
-
<nav aria-label={ariaLabel} className={`flex flex-col gap-0.5 ${className}`.trim()}>
|
|
122
|
-
{toc.map((item, i) => (
|
|
123
|
-
<TocRow key={item.id} number={numbered ? i + 1 : undefined} label={item.label} href={`#${item.id}`} current={activeSection === item.id} onClick={onNavigate} />
|
|
124
|
-
))}
|
|
125
|
-
</nav>
|
|
126
|
-
)
|
|
127
|
-
}
|
|
128
|
-
|
|
129
114
|
if (variant === 'rail') {
|
|
130
115
|
return (
|
|
131
116
|
<TocRail
|
|
@@ -27,12 +27,6 @@ import { glyphSize, indicatorSize } from '../hooks/glyphLadders.js'
|
|
|
27
27
|
* differed by. Use the tone.
|
|
28
28
|
* variant="outline" — bordered trigger; open panel carries the
|
|
29
29
|
* same border, trigger's bottom edge acts as the divider
|
|
30
|
-
* variant="float" — the float select (float-everything W2 row 25 · W4 row 54, 2026-11-04): the
|
|
31
|
-
* trigger a `kol-btn-float` capsule on the float well (a `tone` still wins), the float heights by `size`
|
|
32
|
-
* (sm 28 · md 36 · lg 44); its list opens 8 under it on `--kol-float-list-r`, the trigger's width, 34 rows
|
|
33
|
-
* in Inter, no hairline. Still rest and open only. The caret is the float spec's chevron for the trigger's size
|
|
34
|
-
* (`--kol-float-chev-*`, 12 at sm — plan-2026-11-12-float-system W3.1); in the list hover is the only fill, the
|
|
35
|
-
* current row carries its dot and no fill (`--kol-float-row-hover` · `-row-selected`).
|
|
36
30
|
*
|
|
37
31
|
* Legacy aliases (pre-law variants, kept so call-sites don't break):
|
|
38
32
|
* default → primary · subtle → primary · minimal → outline
|
|
@@ -273,7 +267,6 @@ const DropdownOn = ({
|
|
|
273
267
|
/* `variant="raised"` retires into `tone="faint"` (2026-10-31) — the alias, until nobody passes it */
|
|
274
268
|
if (variant === 'raised') { variant = undefined; tone = 'faint' }
|
|
275
269
|
const resolvedVariant = LEGACY_VARIANTS[variant] || variant
|
|
276
|
-
const float = resolvedVariant === 'float'
|
|
277
270
|
|
|
278
271
|
/* The panel is `Menu fused` (plan-2026-10-31-menu-engine W1.3): below the trigger, never flipped (the fused edge
|
|
279
272
|
* assumes below), the trigger's width, a listbox. */
|
|
@@ -329,10 +322,8 @@ const DropdownOn = ({
|
|
|
329
322
|
* never leaks into Button's variant set */
|
|
330
323
|
resolvedVariant === 'grey' ? 'kol-dd-trigger--grey' : resolvedVariant === 'raised' ? 'kol-dd-trigger--raised' : resolvedVariant && `kol-btn-${resolvedVariant}`,
|
|
331
324
|
`kol-btn-${resolvedSize}`,
|
|
332
|
-
|
|
333
|
-
!float && SIZE_TYPE[resolvedSize],
|
|
325
|
+
SIZE_TYPE[resolvedSize],
|
|
334
326
|
'kol-dd-trigger',
|
|
335
|
-
float && 'kol-dd-trigger--float',
|
|
336
327
|
/* ICON-ONLY: the pinned square from Button's own class, so a tool-rail
|
|
337
328
|
* dropdown is the same box as the icon button beside it at every rung
|
|
338
329
|
* (editor-set-is-behind-its-source, kol-fxr 2026-09-03 — its ToolPalette
|
|
@@ -377,7 +368,7 @@ const DropdownOn = ({
|
|
|
377
368
|
</span>
|
|
378
369
|
{/* chrome lives in .kol-dd-caret (trailing edge + open-state flip) —
|
|
379
370
|
* keyed off the trigger's data-state, no inline styles */}
|
|
380
|
-
<IconLoader name="chevron-down" size={
|
|
371
|
+
<IconLoader name="chevron-down" size={indicatorSize(resolvedSize)} className="kol-dd-caret" />
|
|
381
372
|
</>
|
|
382
373
|
)}
|
|
383
374
|
{/* a consumer's own trigger mark — the tool-palette corner fold rides
|
|
@@ -397,9 +388,7 @@ const DropdownOn = ({
|
|
|
397
388
|
/* NO HOVER STATE ANYWHERE ON A DROPDOWN (user 2026-08-28) — the indicator marks the current value. */
|
|
398
389
|
hover: false,
|
|
399
390
|
size: resolvedSize,
|
|
400
|
-
|
|
401
|
-
* current one carries its dot and no fill (W3.1, P2: "it dosnt highlight selected, only hover") */
|
|
402
|
-
rowClass: float ? `kol-menu-row${isActive ? ' kol-menu-row--current' : ''}` : (ROW[resolvedSize] ?? ROW.sm),
|
|
391
|
+
rowClass: ROW[resolvedSize] ?? ROW.sm,
|
|
403
392
|
height: rowHeight,
|
|
404
393
|
onPointerEnter: onOptionHover ? () => reportHover(option.value) : undefined,
|
|
405
394
|
onPointerLeave: onOptionHover ? () => reportHover(null) : undefined,
|
|
@@ -431,9 +420,7 @@ const DropdownOn = ({
|
|
|
431
420
|
closeOnSelect={!multiple}
|
|
432
421
|
rootClassName={`kol-dd-root relative inline-block align-middle ${className}`}
|
|
433
422
|
trigger={trig}
|
|
434
|
-
|
|
435
|
-
offset={float ? 8 : undefined}
|
|
436
|
-
panelClassName={`${resolvedVariant && !float ? `kol-dd-panel--${resolvedVariant}` : ''} ${toneClass(tone)} ${inPanel ? 'kol-hw-panel' : ''}`.replace(/\s+/g, ' ').trim()}
|
|
423
|
+
panelClassName={`${resolvedVariant ? `kol-dd-panel--${resolvedVariant}` : ''} ${toneClass(tone)} ${inPanel ? 'kol-hw-panel' : ''}`.replace(/\s+/g, ' ').trim()}
|
|
437
424
|
panelStyle={{
|
|
438
425
|
'--kol-dd-max-rows': maxRows ?? 10,
|
|
439
426
|
/* a row is the trigger's height; the panel's max-height reads it */
|
|
@@ -17,22 +17,8 @@
|
|
|
17
17
|
* @param {string} footer optional note above a top hairline
|
|
18
18
|
* @param {boolean} gated hide unless placeholders are switched on (default false)
|
|
19
19
|
* @param {string} className extra classes on the wrapper
|
|
20
|
-
* @param {'float'} [variant] `float` (float-everything W6 row 92, 2026-11-04 — kol-float--style 46:3073): the empty panel
|
|
21
|
-
* on a float — the title in `kol-float-window` (Inter 18), the body in `kol-float-body` on fg-64, the
|
|
22
|
-
* footer pinned to the panel's foot in `kol-float-hint` (`Panel stays open.`), no rule above it. It
|
|
23
|
-
* fills its panel's height (`flex-1`) so the footer lands at the bottom.
|
|
24
20
|
*/
|
|
25
|
-
export default function EmptyState({ eyebrow, title, body, footer, gated = false,
|
|
26
|
-
if (variant === 'float') {
|
|
27
|
-
return (
|
|
28
|
-
<div className={`flex min-h-0 flex-1 flex-col${gated ? ' kol-placeholder' : ''} ${className}`.trim()}>
|
|
29
|
-
{eyebrow && <p className="kol-float-label mb-1 text-fg-64">{eyebrow}</p>}
|
|
30
|
-
{title && <p className="kol-float-window mb-3 text-fg-emphasis">{title}</p>}
|
|
31
|
-
{body && <p className="kol-float-body whitespace-pre-line text-fg-64">{body}</p>}
|
|
32
|
-
{footer && <p className="kol-float-hint mt-auto pt-6 text-fg-64">{footer}</p>}
|
|
33
|
-
</div>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
21
|
+
export default function EmptyState({ eyebrow, title, body, footer, gated = false, className = '' }) {
|
|
36
22
|
return (
|
|
37
23
|
<div className={`${gated ? 'kol-placeholder' : ''}${className ? ` ${className}` : ''}` || undefined}>
|
|
38
24
|
{/* helper (line-height 1) is single-line chrome ONLY — title and footer
|
|
@@ -20,7 +20,7 @@ import Input from '../atoms/Input.jsx'
|
|
|
20
20
|
* `.kol-field-pair--folio`.
|
|
21
21
|
*
|
|
22
22
|
* @param {Array} fields two Input prop sets — `[{ prefix: 'X', value, onChange, ... }, { prefix: 'Y', ... }]`
|
|
23
|
-
* @param {'
|
|
23
|
+
* @param {'filled'|'outline'|'kolbox'|'folio'} [variant] passed to both Inputs; `kolbox` takes the slots below
|
|
24
24
|
* @param {'sm'|'md'|'lg'} [size] passed to both
|
|
25
25
|
* @param {ReactNode} [first] kolbox: the left cell
|
|
26
26
|
* @param {ReactNode} [second] kolbox: the right cell
|
package/src/molecules/Header.jsx
CHANGED
|
@@ -43,9 +43,9 @@ const CHEV = '[--kol-float-ic:var(--kol-float-chev-sm)]'
|
|
|
43
43
|
|
|
44
44
|
export default function Header({ variant = 'property', icon, title, kind, onSwitch, end, onExpand, onCollapseH, collapsedV = false, onCollapseV, onMinimise, onClose, className = '' }) {
|
|
45
45
|
const toggles = <>
|
|
46
|
-
{onExpand && <Button
|
|
47
|
-
{onCollapseH && <Button
|
|
48
|
-
{onCollapseV && <Button
|
|
46
|
+
{onExpand && <Button tone="ghost" size="sm" iconOnly="arrow-upright" aria-label="Expand" onClick={onExpand} />}
|
|
47
|
+
{onCollapseH && <Button tone="ghost" size="sm" iconOnly={variant === 'nav' ? 'panel-left' : 'panel-right'} aria-label="Collapse" onClick={onCollapseH} />}
|
|
48
|
+
{onCollapseV && <Button tone="ghost" size="sm" iconOnly={collapsedV ? 'chevron-down' : 'chevron-up'} className={CHEV}
|
|
49
49
|
aria-label={collapsedV ? 'Expand' : 'Collapse'} aria-expanded={!collapsedV} onClick={onCollapseV} />}
|
|
50
50
|
</>
|
|
51
51
|
const any = end || onExpand || onCollapseH || onCollapseV
|
|
@@ -93,7 +93,7 @@ export default function Header({ variant = 'property', icon, title, kind, onSwit
|
|
|
93
93
|
: <span className="kol-float-panel text-emphasis min-w-0 flex-1 truncate">{slot}</span>)}
|
|
94
94
|
{(any || onClose) && <span className="ml-auto flex shrink-0 items-center gap-1">
|
|
95
95
|
{end}{toggles}
|
|
96
|
-
{onClose && <Button
|
|
96
|
+
{onClose && <Button tone="ghost" size="sm" iconOnly="x" aria-label="Close" onClick={onClose} />}
|
|
97
97
|
</span>}
|
|
98
98
|
</div>
|
|
99
99
|
)
|
|
@@ -26,7 +26,7 @@ export default function IndexRow({ title, cells = [], checked = false, onCheck,
|
|
|
26
26
|
aria-selected={onClick ? selected : undefined}
|
|
27
27
|
className={`flex h-7 w-full items-center gap-3 rounded-[var(--kol-float-list-r)] px-2.5 ${onClick ? 'cursor-pointer focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)]' : ''} ${selected ? 'bg-fg-12' : 'hover:bg-fg-04'} ${className}`.trim()}
|
|
28
28
|
>
|
|
29
|
-
{onCheck && <span onClick={(e) => e.stopPropagation()} className="inline-flex shrink-0"><ToggleCheckbox
|
|
29
|
+
{onCheck && <span onClick={(e) => e.stopPropagation()} className="inline-flex shrink-0"><ToggleCheckbox checked={checked} onChange={onCheck} aria-label="Done" /></span>}
|
|
30
30
|
<span className={`kol-float-hint min-w-0 flex-1 truncate ${checked ? 'text-fg-48' : 'text-fg-emphasis'}`}>{title}</span>
|
|
31
31
|
{cells.map((c, i) => {
|
|
32
32
|
const cell = c && typeof c === 'object' && 'value' in c ? c : { value: c }
|
|
@@ -6,12 +6,12 @@ import Kbd from '../atoms/Kbd.jsx'
|
|
|
6
6
|
* InlineAddRow — Add a row where the next row would be. `+ New brief · ↵` (float-everything W3 row 41, 2026-11-04 —
|
|
7
7
|
* the exploration's inline add). A full-width `Input` led by the plus and trailed by the return cap: type, press
|
|
8
8
|
* Enter, `onAdd(text)` fires and the field clears; Escape clears it. Nothing opens, nothing moves — the row is the
|
|
9
|
-
* form.
|
|
9
|
+
* form.
|
|
10
10
|
*
|
|
11
11
|
* @param {string} label the placeholder — what the row adds (`New brief`)
|
|
12
12
|
* @param {Function} onAdd `(text) => void` on Enter with a non-empty, trimmed value
|
|
13
13
|
* @param {boolean} [kbd] the ↵ cap at the end (default true)
|
|
14
|
-
* @param {'
|
|
14
|
+
* @param {'filled'|'outline'} [variant]
|
|
15
15
|
* @param {'sm'|'md'|'lg'} [size]
|
|
16
16
|
* @param {string} [className]
|
|
17
17
|
*/
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Props:
|
|
16
16
|
* label — any node: the label text, or an icon with text (a ToggleSwitch row's glyph). A string takes the
|
|
17
|
-
* variant's label style (kol-helper-10, tracked
|
|
17
|
+
* variant's label style (kol-helper-10, tracked).
|
|
18
18
|
* hint — optional secondary text after the label (lower-case, less
|
|
19
19
|
* weight). Useful for current-value displays, units, etc.
|
|
20
20
|
* horizontal — bool. true: the label beside the control (left); false (default): the label above it
|
|
@@ -34,11 +34,6 @@
|
|
|
34
34
|
* variant — `'panel'` is the hardware panel label (was kol-hardware `PanelLabel`, merged
|
|
35
35
|
* 2026-10-01): `kol-helper-8`, uppercase, hugging the control; it takes
|
|
36
36
|
* `labelPosition` (`top · bottom · left · right`, default bottom), `labelClass` and `gap`.
|
|
37
|
-
* `'float'` (float-everything W3 row 37, 2026-11-04): the label over a capsule — the float hint role
|
|
38
|
-
* (Inter 12) at fg-64, no uppercase, no tracking, `--kol-float-label-gap` from the control; `horizontal` keeps
|
|
39
|
-
* the same label in the `--kol-float-label-w` column (a `labelWidth` still wins), the row at least the float
|
|
40
|
-
* sm height. Every float row is this (plan-2026-11-12-float-system W2.1); the wrapper carries
|
|
41
|
-
* `data-labeled-control`.
|
|
42
37
|
* `'settings'` (plan-2026-11-12-float-rails-figma W13.1): the generator settings window's row (`Dialog
|
|
43
38
|
* variant="settings"`): the label in Inter 10 at oq-64, 6 over the control; `horizontal` puts it beside the
|
|
44
39
|
* control, 8 apart, the label hugging its text (a `labelWidth` still sets a column).
|
|
@@ -135,12 +130,11 @@ export default function LabeledControl({
|
|
|
135
130
|
)
|
|
136
131
|
}
|
|
137
132
|
const showLabel = !!label
|
|
138
|
-
const float = variant === 'float'
|
|
139
133
|
const settings = variant === 'settings'
|
|
140
|
-
const lw = labelWidth ?? (
|
|
141
|
-
const gapClass =
|
|
134
|
+
const lw = labelWidth ?? (settings ? 'fit-content' : 48)
|
|
135
|
+
const gapClass = settings ? (horizontal ?? inline ? 'gap-2' : 'gap-1.5') : null
|
|
142
136
|
const mark = { 'data-labeled-control': '', ...rest }
|
|
143
|
-
const labelType = labelClass ?? (
|
|
137
|
+
const labelType = labelClass ?? (settings ? SETTINGS_LABEL : 'kol-helper-10 tracking-widest text-meta')
|
|
144
138
|
/* a display class from the caller replaces the wrapper's own (`hidden md:flex` must hold) */
|
|
145
139
|
const display = DISPLAY.test(className) ? '' : 'flex'
|
|
146
140
|
/* …and so does a gap class: the caller's spacing, not two utilities racing */
|
|
@@ -164,7 +158,7 @@ export default function LabeledControl({
|
|
|
164
158
|
* showed as "C" or not at all. Label on its line, the value under it. */
|
|
165
159
|
const labelAuto = lw === 'auto'
|
|
166
160
|
return (
|
|
167
|
-
<div {...mark} className={`${display} ${labelAuto ? `flex-col items-start gap-1 sm:flex-row ${text ? 'sm:items-baseline' : 'sm:items-center'} sm:gap-3` : `${text ? 'items-baseline' : 'items-center'} ${ownGap ? '' : gapClass ?? 'gap-3'}`}${
|
|
161
|
+
<div {...mark} className={`${display} ${labelAuto ? `flex-col items-start gap-1 sm:flex-row ${text ? 'sm:items-baseline' : 'sm:items-center'} sm:gap-3` : `${text ? 'items-baseline' : 'items-center'} ${ownGap ? '' : gapClass ?? 'gap-3'}`}${className}`}>
|
|
168
162
|
{showLabel && (
|
|
169
163
|
<span
|
|
170
164
|
/* A LABEL NEVER WRAPS (review 2, § 6.2 — the helper law by construction, 01-foundations/03-typography.md:29):
|
|
@@ -30,7 +30,7 @@ import TreeRow from './TreeRow.jsx'
|
|
|
30
30
|
*/
|
|
31
31
|
export default function LayerRow({ variant = 'row', icon = 'layers', name, selected = false, visible = true, onToggleVisible, locked = false, onToggleLock, depth = 0, onClick, className = '' }) {
|
|
32
32
|
if (variant === 'head') {
|
|
33
|
-
const btn = (label, glyph, on, fn) => <Button
|
|
33
|
+
const btn = (label, glyph, on, fn) => <Button tone="ghost" size="sm" iconOnly={glyph} aria-label={label} aria-pressed={on} onClick={fn} />
|
|
34
34
|
return (
|
|
35
35
|
<div className={`flex items-center gap-2 ${className}`.trim()}>
|
|
36
36
|
<IconLoader name={icon} size={18} className="shrink-0 text-oq-64" />
|
|
@@ -7,9 +7,8 @@ import Button from '../atoms/Button.jsx'
|
|
|
7
7
|
* LinkAddRow — Add a named link. `name · URL · Add link` (float-everything W3 row 43, 2026-11-04 — the exploration's
|
|
8
8
|
* project links card). One row: the name field, the URL field (mono, `https://…`) taking the room, and the Add
|
|
9
9
|
* button; Enter in either field adds too. `onAdd({ name, url })` fires with both trimmed and the fields clear; the
|
|
10
|
-
* button is disabled until the URL has something. With `title` the row sits under a head — the title at the
|
|
11
|
-
*
|
|
12
|
-
* draws the capsules; the default is the filled shell.
|
|
10
|
+
* button is disabled until the URL has something. With `title` the row sits under a head — the title at the body
|
|
11
|
+
* size with the open-in-new glyph linking to `href`.
|
|
13
12
|
*
|
|
14
13
|
* @param {Function} onAdd `({ name, url }) => void`
|
|
15
14
|
* @param {string} [title] the head's name (`kol-vault`)
|
|
@@ -17,13 +16,12 @@ import Button from '../atoms/Button.jsx'
|
|
|
17
16
|
* @param {string} [namePlaceholder] default `Link name`
|
|
18
17
|
* @param {string} [urlPlaceholder] default `https://…`
|
|
19
18
|
* @param {string} [addLabel] default `Add link`
|
|
20
|
-
* @param {'
|
|
19
|
+
* @param {'filled'|'outline'} [variant]
|
|
21
20
|
* @param {string} [className]
|
|
22
21
|
*/
|
|
23
22
|
export default function LinkAddRow({ onAdd, title, href, namePlaceholder = 'Link name', urlPlaceholder = 'https://…', addLabel = 'Add link', variant, className = '' }) {
|
|
24
23
|
const [name, setName] = useState('')
|
|
25
24
|
const [url, setUrl] = useState('')
|
|
26
|
-
const float = variant === 'float'
|
|
27
25
|
const ready = url.trim().length > 0
|
|
28
26
|
const add = () => { if (!ready) return; onAdd?.({ name: name.trim(), url: url.trim() }); setName(''); setUrl('') }
|
|
29
27
|
const onKey = (e) => { if (e.key === 'Enter') add() }
|
|
@@ -32,12 +30,12 @@ export default function LinkAddRow({ onAdd, title, href, namePlaceholder = 'Link
|
|
|
32
30
|
<div className="flex flex-wrap items-center gap-2">
|
|
33
31
|
<Input variant={variant} size="md" placeholder={namePlaceholder} value={name} onChange={(e) => setName(e.target.value)} onKeyDown={onKey} className="w-64 max-w-full" />
|
|
34
32
|
<Input variant={variant} size="md" type="url" inputMode="url" placeholder={urlPlaceholder} value={url} onChange={(e) => setUrl(e.target.value)} onKeyDown={onKey} width="100%" className="flex-1 min-w-40" inputClassName="font-mono" />
|
|
35
|
-
<Button
|
|
33
|
+
<Button size="md" disabled={!ready} onClick={add}>{addLabel}</Button>
|
|
36
34
|
</div>
|
|
37
35
|
)
|
|
38
36
|
if (!title) return <div className={className}>{row}</div>
|
|
39
37
|
return (
|
|
40
|
-
<div className={`flex flex-col gap-4 ${
|
|
38
|
+
<div className={`flex flex-col gap-4 ${className}`.trim()}>
|
|
41
39
|
<div className="flex items-center justify-between gap-4">
|
|
42
40
|
<span className="kol-float-body text-fg-emphasis">{title}</span>
|
|
43
41
|
{href && (
|
package/src/molecules/Menu.jsx
CHANGED
|
@@ -3,7 +3,7 @@ import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
|
3
3
|
import Button from '../atoms/Button.jsx'
|
|
4
4
|
import KolboxGlyph from '../utilities/kolboxGlyph.jsx'
|
|
5
5
|
import { MenuRow, MenuDivider } from './MenuItem.jsx'
|
|
6
|
-
import { MenuList, MenuLabel
|
|
6
|
+
import { MenuList, MenuLabel } from './MenuList.jsx'
|
|
7
7
|
import { PopoverPanel, PopoverLayer, usePopover } from '../utilities/Popover.jsx'
|
|
8
8
|
import { TONE_VARS } from '../utilities/tone.js'
|
|
9
9
|
|
|
@@ -32,24 +32,12 @@ import { TONE_VARS } from '../utilities/tone.js'
|
|
|
32
32
|
* · `tone: 'danger'` the destructive row (the error ink).
|
|
33
33
|
* `search` ({ placeholder, empty }) puts a search field above the rows and filters them by label.
|
|
34
34
|
* `children` sit above the rows.
|
|
35
|
-
*
|
|
36
|
-
* THE FLOAT LOOK (float-everything W4, 2026-11-04 — rows 46–60 of the gap map): `variant="float"` on any of them. The
|
|
37
|
-
* panel is a list on `--kol-float-list-r` (8), 4 in, the float surface and shadow; its rows are 34, 12 in, Inter 12/500,
|
|
38
|
-
* lifted on `--kol-fg-16`; a flyout opens 8 off the row on the same list. `MenuMore variant="float"` is the More sheet —
|
|
39
|
-
* `--kol-float-menu-r` (20), 6 in. `MenuTrigger variant="float"` is a `Button variant="float"` capsule on the float well;
|
|
40
|
-
* `MenuDatePicker variant="float"` sets its value in mono — the date chip (row 33). Today's defaults do not move.
|
|
41
35
|
*/
|
|
42
36
|
|
|
43
37
|
/* the ⋮ — kol-icons `more-vertical` (user 2026-10-31: *"just make a vertical version"* — was `more` turned 90°) */
|
|
44
38
|
const MORE = <IconLoader name="more-vertical" size={16} />
|
|
45
39
|
|
|
46
|
-
export function MenuTrigger({ open = false, iconOnly, icon, iconComponent, variant,
|
|
47
|
-
/* the float trigger: a capsule on the float well, lit fg-16 while its menu is open; `mono` for a value (the date chip) */
|
|
48
|
-
if (variant === 'float') {
|
|
49
|
-
const cls = `kol-menu-trigger kol-menu-trigger--float${mono ? ' kol-menu-trigger--mono' : ''} ${rest.className ?? ''}`.trim()
|
|
50
|
-
if (iconOnly) return <Button variant="float" size={size ?? 'md'} pressed={open} iconOnly={iconOnly === true ? 'more-vertical' : iconOnly} iconComponent={iconOnly === true ? MORE : iconComponent} {...rest} className={cls} />
|
|
51
|
-
return <Button variant="float" size={size ?? 'md'} pressed={open} iconLeft={icon} iconComponent={iconComponent} {...rest} className={cls}>{children}</Button>
|
|
52
|
-
}
|
|
40
|
+
export function MenuTrigger({ open = false, iconOnly, icon, iconComponent, variant, size, children, ...rest }) {
|
|
53
41
|
if (iconOnly) {
|
|
54
42
|
return <Button variant="tab" size="sm" pressed={open} iconOnly={iconOnly === true ? 'more-vertical' : iconOnly} iconComponent={iconOnly === true ? MORE : iconComponent} {...rest} className={`kol-menu-trigger ${rest.className ?? ''}`.trim()} />
|
|
55
43
|
}
|
|
@@ -58,8 +46,8 @@ export function MenuTrigger({ open = false, iconOnly, icon, iconComponent, varia
|
|
|
58
46
|
return <Button variant="tab" size="sm" pressed={open} iconLeft={icon} iconComponent={iconComponent} {...rest} className={`kol-menu-trigger kol-menu-trigger--quiet ${rest.className ?? ''}`.trim()}>{children}</Button>
|
|
59
47
|
}
|
|
60
48
|
|
|
61
|
-
export const MenuPanel = ({
|
|
62
|
-
<div className={`kol-menu-panel flex flex-col gap-[var(--kol-spacing-0-5)] ${
|
|
49
|
+
export const MenuPanel = ({ className = '', children, ...rest }) => (
|
|
50
|
+
<div className={`kol-menu-panel flex flex-col gap-[var(--kol-spacing-0-5)] ${className}`.replace(/\s+/g, ' ').trim()} {...rest}>{children}</div>
|
|
63
51
|
)
|
|
64
52
|
|
|
65
53
|
export { MenuLabel }
|
|
@@ -302,7 +290,6 @@ function MenuFolio({ open, onClose, items = [], anchor, 'aria-label': label, min
|
|
|
302
290
|
* `kol-tone-*` wrapper floats on that tone's surface
|
|
303
291
|
* closeOnSelect false keeps the panel open while rows toggle (a multiselect)
|
|
304
292
|
* open / onOpenChange controlled, when the caller needs the state
|
|
305
|
-
* variant 'float' — the float list; `sheet` makes it the More sheet (20 radius, 6 in)
|
|
306
293
|
* offset the gap under the trigger (default 4; a fused panel sits at -1, a point anchor at 2 — pass one to override)
|
|
307
294
|
* variant 'kolbox' (plan-2026-11-18-kolbox-system W31.2 batch 4): kolbox's menu, its own API — see `MenuKolbox` above;
|
|
308
295
|
* it also reads `items` and a point `anchor` (Folio on kolbox, 2026-11-22) — see `MenuKolboxItems`
|
|
@@ -316,7 +303,7 @@ export function Menu(props) {
|
|
|
316
303
|
|
|
317
304
|
function MenuOn({
|
|
318
305
|
items, trigger, anchor, align = 'start', minWidth, offset, defaultOpen = false, open: openProp, onOpenChange,
|
|
319
|
-
stayOpen = false, closeOnSelect = true, fused = false, search, role = 'menu',
|
|
306
|
+
stayOpen = false, closeOnSelect = true, fused = false, search, role = 'menu',
|
|
320
307
|
panelClassName = '', panelStyle, rootClassName, className = '', children,
|
|
321
308
|
}) {
|
|
322
309
|
const [own, setOwn] = useState(defaultOpen)
|
|
@@ -350,15 +337,11 @@ function MenuOn({
|
|
|
350
337
|
if (!open || !rootRef.current) return
|
|
351
338
|
const cs = getComputedStyle(rootRef.current.firstElementChild ?? rootRef.current)
|
|
352
339
|
const vars = {}
|
|
353
|
-
/* A FLOAT PANEL IS A FLOAT SURFACE (FloatMenuPanelInk, kol-website 2026-11-04): the theme's, as RailTrigger's card,
|
|
354
|
-
* the search modal and the float Dropdown (which pins `--kol-tone-panel-bg` on its trigger) — never the trigger's
|
|
355
|
-
* ground. Its rows read theme ink (fg-88, the fg-16 lift), so an inverted trigger's panel-bg painted them out. */
|
|
356
340
|
for (const v of TONE_VARS) {
|
|
357
|
-
if (variant === 'float' && v.startsWith('--kol-tone-panel')) continue
|
|
358
341
|
const val = cs.getPropertyValue(v).trim(); if (val) vars[v] = val
|
|
359
342
|
}
|
|
360
343
|
setAmbient(vars)
|
|
361
|
-
}, [open
|
|
344
|
+
}, [open])
|
|
362
345
|
|
|
363
346
|
/* the wrapper takes the ref (a Button need not forward one); the trigger takes the handlers and the aria —
|
|
364
347
|
* `aria-pressed` cleared, an open menu is `aria-expanded`, its fill is the trigger's `pressed` */
|
|
@@ -371,11 +354,11 @@ function MenuOn({
|
|
|
371
354
|
)}
|
|
372
355
|
{open && (
|
|
373
356
|
<PopoverPanel popover={popover} panel={false} focus={false}
|
|
374
|
-
className={`kol-menu-panel${fused ? ' kol-menu-panel--fused' : ' w-max'} ${
|
|
357
|
+
className={`kol-menu-panel${fused ? ' kol-menu-panel--fused' : ' w-max'} ${panelClassName}`.replace(/\s+/g, ' ').trim()}
|
|
375
358
|
style={{ ...ambient, ...(minWidth ? { minWidth } : null), ...panelStyle }}>
|
|
376
359
|
{/* a row's click closes the menu (it bubbles from `[data-menu-item]`); a flyout row only toggles */}
|
|
377
360
|
<div role="none" className="flex flex-col gap-[var(--kol-spacing-0-5)] min-h-0" onClick={(e) => { if (closeOnSelect && e.target.closest('[data-menu-item]')) setOpen(false) }}>
|
|
378
|
-
<MenuList items={items} search={search}
|
|
361
|
+
<MenuList items={items} search={search}>
|
|
379
362
|
{typeof children === 'function' ? children({ close: () => setOpen(false) }) : children}
|
|
380
363
|
</MenuList>
|
|
381
364
|
</div>
|
|
@@ -445,18 +428,16 @@ export function MenuDatePicker({ groups = [], value, onChange, label, icon = 'ca
|
|
|
445
428
|
]),
|
|
446
429
|
...(compare ? [{ divider: true }, { key: 'compare', label: compare.label, kbd: compare.kbd, onClick: compare.onClick }] : []),
|
|
447
430
|
]
|
|
448
|
-
/* the float date chip (row 33): the value in mono on the well, the calendar glyph 16 */
|
|
449
431
|
return (
|
|
450
432
|
<Menu align={align} minWidth={minWidth} offset={8} items={items} variant={variant}
|
|
451
|
-
trigger={({ open, props }) => <MenuTrigger open={open} icon={icon} iconComponent={iconComponent} variant={variant}
|
|
433
|
+
trigger={({ open, props }) => <MenuTrigger open={open} icon={icon} iconComponent={iconComponent} variant={variant} {...props}>{label}</MenuTrigger>} />
|
|
452
434
|
)
|
|
453
435
|
}
|
|
454
436
|
|
|
455
|
-
/** MenuMore — the ⋮ chip and its rows (`items`, as `Menu`'s); `label` names it for a screen reader.
|
|
456
|
-
* the More sheet (row 53): the ⋮ as a float circle, the rows in a sheet on `--kol-float-menu-r`. */
|
|
437
|
+
/** MenuMore — the ⋮ chip and its rows (`items`, as `Menu`'s); `label` names it for a screen reader. */
|
|
457
438
|
export function MenuMore({ label, items = [], align = 'end', minWidth = 224, defaultOpen, stayOpen, variant }) {
|
|
458
439
|
return (
|
|
459
|
-
<Menu align={align} minWidth={minWidth} offset={8} items={items} defaultOpen={defaultOpen} stayOpen={stayOpen} variant={variant}
|
|
440
|
+
<Menu align={align} minWidth={minWidth} offset={8} items={items} defaultOpen={defaultOpen} stayOpen={stayOpen} variant={variant}
|
|
460
441
|
trigger={({ open, props }) => <MenuTrigger open={open} iconOnly aria-label={label} variant={variant} {...props} />} />
|
|
461
442
|
)
|
|
462
443
|
}
|
|
@@ -24,26 +24,20 @@ const FLOAT_ROW = 'w-full justify-start kol-btn-float'
|
|
|
24
24
|
* @param {Array} items `[{ path, label, icon? }]` — destinations, after a divider's worth of nothing
|
|
25
25
|
* @param {string} active the item path that is current
|
|
26
26
|
* @param {Function} onPick `(item | action) => void` — after the row's own press; the sheet closes here
|
|
27
|
-
* @param {'float'} variant the floating style (round 3, W16 2026-10-31): each row a `kol-btn-float` pill — 40 (48 on touch)
|
|
28
|
-
* tall, 12 in, an 18 (20) glyph, the current row oq-16 — in a `.kol-more-sheet-float`; AppFloatNav
|
|
29
|
-
* and the signed-out Home pass it. Unset, the rows are A
|
|
30
27
|
* @param {boolean} itemsFirst the destinations above the actions (PhoneNav's More, 2026-10-28: the whole nav, then the
|
|
31
28
|
* page's buttons); Home's masthead button keeps actions first
|
|
32
29
|
*/
|
|
33
|
-
export default function MenuFloatRows({ actions = [], items = [], active, onPick, itemsFirst = false
|
|
34
|
-
|
|
35
|
-
* which would outrank the components layer */
|
|
36
|
-
const float = variant === 'float'
|
|
37
|
-
const rowCls = float ? FLOAT_ROW : 'w-full justify-start h-11 gap-3'
|
|
30
|
+
export default function MenuFloatRows({ actions = [], items = [], active, onPick, itemsFirst = false }) {
|
|
31
|
+
const rowCls = 'w-full justify-start h-11 gap-3'
|
|
38
32
|
const level = useContext(Level)
|
|
39
|
-
const glyph =
|
|
33
|
+
const glyph = 22
|
|
40
34
|
const acts = (
|
|
41
35
|
<>
|
|
42
36
|
{actions.map((a) => {
|
|
43
37
|
/* a row with `sub` inside a MenuFloat opens its level instead of picking — the chevron at the row's end */
|
|
44
38
|
const nests = level && a.sub?.length > 0
|
|
45
39
|
/* the account row is the ModalHeader (menu-system W4.1) — avatar · title, pressable */
|
|
46
|
-
if (a.avatar && !nests) return <ModalHeader key={a.label}
|
|
40
|
+
if (a.avatar && !nests) return <ModalHeader key={a.label} avatar={a.avatar} title={a.label} onClick={() => { onPick?.(a); a.onPress?.() }} />
|
|
47
41
|
return (
|
|
48
42
|
/* a nesting row draws its own glyph so the label can take the room between it and the chevron; 8 apart, as Button's */
|
|
49
43
|
<Button key={a.label} variant="nav" size="lg" iconLeft={a.checked === undefined && !nests ? a.icon : undefined} iconSize={glyph} disabled={a.disabled}
|
|
@@ -51,7 +45,7 @@ export default function MenuFloatRows({ actions = [], items = [], active, onPick
|
|
|
51
45
|
aria-haspopup={nests ? 'menu' : undefined} aria-expanded={nests ? level.isOpen(a) : undefined}
|
|
52
46
|
onClick={(e) => { if (nests) { level.open(a, e.currentTarget); return } onPick?.(a); a.onPress?.() }}>
|
|
53
47
|
{a.checked !== undefined && (
|
|
54
|
-
<span className="inline-flex items-center justify-center shrink-0" style={{ width:
|
|
48
|
+
<span className="inline-flex items-center justify-center shrink-0" style={{ width: 22, height: 22 }}>{a.checked && <IconLoader name="check" size={22} />}</span>
|
|
55
49
|
)}
|
|
56
50
|
{nests ? <>{a.icon && <IconLoader name={a.icon} size={glyph} />}<span className="flex-1 text-left">{a.label}</span><IconLoader name="chevron-right" size={glyph} className="shrink-0 text-oq-48" /></> : a.label}
|
|
57
51
|
</Button>
|
|
@@ -123,7 +117,7 @@ export function MenuFloat({ beside = false, cardClass = '', onLeaf, title, title
|
|
|
123
117
|
<Level.Provider value={at(depth)}>
|
|
124
118
|
<LevelRows key={`${depth}:${rowKey(trail[depth - 1].row)}`} onKeyDown={keys(depth)}>
|
|
125
119
|
{lead}
|
|
126
|
-
<MenuFloatRows
|
|
120
|
+
<MenuFloatRows actions={rows} onPick={onLeaf} />
|
|
127
121
|
</LevelRows>
|
|
128
122
|
</Level.Provider>
|
|
129
123
|
)
|
|
@@ -8,7 +8,7 @@ import { Tooltip } from '../utilities/Popover.jsx'
|
|
|
8
8
|
* MenuList — THE rows of every menu (plan-2026-11-07-menu-system W1.1). `Menu`, `Dropdown` and `ContextMenu` (through
|
|
9
9
|
* `Menu`) render it inside their PopoverPanel; nothing else maps rows. It is the list only — no panel, no trigger.
|
|
10
10
|
*
|
|
11
|
-
* <MenuList
|
|
11
|
+
* <MenuList search={{ placeholder: 'Find' }} items={[
|
|
12
12
|
* { heading: 'Graph interval' }, // a MenuLabel
|
|
13
13
|
* { label: 'Days', current: true, indicator: 'dot', onClick },
|
|
14
14
|
* { divider: true }, // a MenuDivider
|
|
@@ -21,14 +21,10 @@ import { Tooltip } from '../utilities/Popover.jsx'
|
|
|
21
21
|
* · `size` · `height` · `shortcut` · `prefix` · `onPointerEnter` / `onPointerLeave` (Dropdown's rows do).
|
|
22
22
|
* search `{ placeholder, empty }` — a search field above the rows that filters them by label
|
|
23
23
|
* children sit above the rows (under the search)
|
|
24
|
-
* variant 'float' the float list's rows and flyouts · 'sheet' the More sheet's (the same rows)
|
|
25
24
|
* dividerClassName the rule's class, whole (default `kol-menu-rule` — the panel's edge-to-edge rule)
|
|
26
25
|
* headingClassName the heading's class, whole (default the MenuLabel's)
|
|
27
26
|
*/
|
|
28
27
|
|
|
29
|
-
/* `variant="float"` the list (8) · `sheet` the More sheet (20) on it */
|
|
30
|
-
export const panelClass = (variant, sheet) => (variant === 'float' ? `kol-menu-panel--float${sheet ? ' kol-menu-panel--sheet' : ''}` : '')
|
|
31
|
-
|
|
32
28
|
export const MenuLabel = ({ className = 'kol-menu-label kol-helper-12', children }) => <div className={className}>{children}</div>
|
|
33
29
|
|
|
34
30
|
const glyph = (icon, size) => (typeof icon === 'string' ? <IconLoader name={icon} size={size} /> : icon)
|
|
@@ -36,8 +32,7 @@ const glyph = (icon, size) => (typeof icon === 'string' ? <IconLoader name={icon
|
|
|
36
32
|
* `kbd` a key cap, `trailing` an icon name for an action (download) */
|
|
37
33
|
const indicatorOf = (it) => it.indicator ?? (it.checked ? 'check' : undefined)
|
|
38
34
|
|
|
39
|
-
export function MenuList({ items = [], search,
|
|
40
|
-
const float = variant === 'float' || variant === 'sheet'
|
|
35
|
+
export function MenuList({ items = [], search, dividerClassName = 'kol-menu-rule', headingClassName, children }) {
|
|
41
36
|
const [q, setQ] = useState('')
|
|
42
37
|
let rows = items
|
|
43
38
|
if (search) {
|
|
@@ -47,7 +42,7 @@ export function MenuList({ items = [], search, variant, dividerClassName = 'kol-
|
|
|
47
42
|
}
|
|
48
43
|
return (
|
|
49
44
|
<>
|
|
50
|
-
{search && <div className="pb-1"><SearchInput variant=
|
|
45
|
+
{search && <div className="pb-1"><SearchInput variant="outline" size="sm" value={q} onChange={(e) => setQ(e.target?.value ?? e)} onClear={() => setQ('')} placeholder={search.placeholder || 'Search'} /></div>}
|
|
51
46
|
{children}
|
|
52
47
|
{rows.map((it, i) => {
|
|
53
48
|
if (it.divider) return <MenuDivider key={it.key ?? `d${i}`} className={dividerClassName} />
|
|
@@ -55,9 +50,8 @@ export function MenuList({ items = [], search, variant, dividerClassName = 'kol-
|
|
|
55
50
|
const icon = it.icon && <span className="text-oq-88 inline-flex">{glyph(it.icon, 16)}</span>
|
|
56
51
|
const cls = it.rowClass ?? `kol-menu-row kol-helper-12${it.current ? ' kol-menu-row--current' : ''}${it.tone === 'danger' ? ' kol-menu-row--danger' : ''}`
|
|
57
52
|
const row = it.items?.length && !it.disabled ? (
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<MenuList items={it.items} variant={variant} dividerClassName={dividerClassName} headingClassName={headingClassName} />
|
|
53
|
+
<MenuFlyout flyout iconLeft={icon} label={it.label} rowClass={cls} panelClassName="kol-menu-panel min-w-[200px]" panelStyle={{ marginLeft: 4 }}>
|
|
54
|
+
<MenuList items={it.items} dividerClassName={dividerClassName} headingClassName={headingClassName} />
|
|
61
55
|
</MenuFlyout>
|
|
62
56
|
) : (
|
|
63
57
|
<MenuRow href={it.href} disabled={it.disabled} rowClass={cls} onClick={it.onClick} iconLeft={icon} prefix={it.prefix}
|