@kolkrabbi/kol-component 0.354.0 → 0.356.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/README.md +1 -1
- package/package.json +5 -5
- package/src/atoms/Badge.jsx +2 -2
- package/src/atoms/Button.jsx +2 -2
- package/src/atoms/Delta.jsx +2 -2
- package/src/atoms/FileIcon.jsx +2 -2
- package/src/atoms/IconFrame.jsx +2 -2
- package/src/atoms/IconPlate.jsx +1 -1
- package/src/atoms/IconToggle.jsx +2 -2
- package/src/atoms/Input.jsx +4 -4
- package/src/atoms/Kbd.jsx +2 -2
- package/src/atoms/Label.jsx +2 -2
- package/src/atoms/SectionLabel.jsx +4 -4
- package/src/atoms/SizeOrDownload.jsx +2 -2
- package/src/atoms/SortHeader.jsx +2 -2
- package/src/atoms/Tag.jsx +3 -3
- package/src/atoms/Textarea.jsx +2 -2
- package/src/atoms/ValueField.jsx +2 -2
- package/src/atoms/ViewToggle.jsx +3 -3
- package/src/index.js +2 -1
- package/src/molecules/ActionButton.jsx +3 -3
- package/src/molecules/AlignmentGrid.jsx +2 -2
- package/src/molecules/AppItem.jsx +4 -4
- package/src/molecules/CloseButton.jsx +2 -2
- package/src/molecules/ColorInputRow.jsx +2 -2
- package/src/molecules/ContentRow.jsx +2 -2
- package/src/molecules/DocFrontmatter.jsx +2 -2
- package/src/molecules/Dropdown.jsx +4 -4
- package/src/molecules/EmblaNav.jsx +3 -3
- package/src/molecules/FieldRow.jsx +6 -6
- package/src/molecules/LayerRow.jsx +2 -2
- package/src/molecules/LinkAddRow.jsx +2 -2
- package/src/molecules/Menu.jsx +2 -2
- package/src/molecules/MenuItem.jsx +6 -6
- package/src/molecules/MenuList.jsx +2 -2
- package/src/molecules/Modal.jsx +50 -51
- package/src/molecules/ModalHeader.jsx +2 -2
- package/src/molecules/ModalShell.jsx +48 -0
- package/src/molecules/MultiSelect.jsx +2 -2
- package/src/molecules/OptionRow.jsx +2 -2
- package/src/molecules/PasswordInput.jsx +2 -2
- package/src/molecules/ProfileCard.jsx +2 -2
- package/src/molecules/QuantityInput.jsx +3 -3
- package/src/molecules/QuickLookFrame.jsx +24 -18
- package/src/molecules/QuickLookHeader.jsx +4 -4
- package/src/molecules/ReadingChapterNav.jsx +3 -3
- package/src/molecules/SearchInput.jsx +5 -5
- package/src/molecules/SectionCardItem.jsx +4 -4
- package/src/molecules/ShapeDropdown.jsx +2 -2
- package/src/molecules/SplitToolButton.jsx +4 -4
- package/src/molecules/StepList.jsx +3 -3
- package/src/molecules/Stepper.jsx +5 -5
- package/src/molecules/SwatchControls.jsx +3 -3
- package/src/molecules/TabsRow.jsx +8 -8
- package/src/molecules/TaskRow.jsx +2 -2
- package/src/molecules/TreeRow.jsx +3 -3
- package/src/organisms/AppItemMenuProvider.jsx +2 -2
- package/src/organisms/ColorPickerPopover.jsx +2 -2
- package/src/organisms/ColumnBrowser.jsx +8 -8
- package/src/organisms/CommandOverlay.jsx +2 -2
- package/src/organisms/ContentFilters.jsx +2 -2
- package/src/organisms/LayerStack.jsx +3 -3
- package/src/organisms/MediaLibrary.jsx +23 -22
- package/src/organisms/MediaLibraryPages.jsx +35 -35
- package/src/organisms/MediaViewer.jsx +3 -3
- package/src/organisms/NavDrawer.jsx +2 -2
- package/src/organisms/NavRail.jsx +1 -1
- package/src/organisms/NavRailFloat.jsx +5 -5
- package/src/organisms/NavRailSite.jsx +5 -5
- package/src/organisms/Rail.jsx +1 -1
- package/src/organisms/RecordManager.jsx +3 -3
- package/src/organisms/SettingsPanel.jsx +11 -7
- package/src/organisms/Table.jsx +3 -3
- package/src/organisms/ToolPalette.jsx +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
import TreeRow from './TreeRow.jsx'
|
|
3
3
|
|
|
4
4
|
/* taxonomy-ok: molecule — TreeRow (molecule) + kol-icons's Icon. */
|
|
@@ -30,7 +30,7 @@ export default function LayerRow({ icon = 'layers', name, selected = false, visi
|
|
|
30
30
|
onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); e.stopPropagation(); fn?.() } }}
|
|
31
31
|
className="inline-flex size-5 shrink-0 items-center justify-center rounded-full text-oq-64 hover:text-oq-96 focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)]"
|
|
32
32
|
>
|
|
33
|
-
<
|
|
33
|
+
<IconLoader name={glyph} size={12} />
|
|
34
34
|
</span>
|
|
35
35
|
)
|
|
36
36
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
3
3
|
import Input from '../atoms/Input.jsx'
|
|
4
4
|
import Button from '../atoms/Button.jsx'
|
|
5
5
|
|
|
@@ -42,7 +42,7 @@ export default function LinkAddRow({ onAdd, title, href, namePlaceholder = 'Link
|
|
|
42
42
|
<span className="kol-float-body text-fg-emphasis">{title}</span>
|
|
43
43
|
{href && (
|
|
44
44
|
<a href={href} target="_blank" rel="noreferrer" aria-label={`Open ${title}`} className="inline-flex text-oq-64 hover:text-oq-96 transition-colors">
|
|
45
|
-
<
|
|
45
|
+
<IconLoader name="arrow-upright" size={18} />
|
|
46
46
|
</a>
|
|
47
47
|
)}
|
|
48
48
|
</div>
|
package/src/molecules/Menu.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useLayoutEffect, useRef, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
3
3
|
import Button from '../atoms/Button.jsx'
|
|
4
4
|
import { MenuRow, MenuDivider } from './MenuItem.jsx'
|
|
5
5
|
import { MenuList, MenuLabel, panelClass } from './MenuList.jsx'
|
|
@@ -40,7 +40,7 @@ import { TONE_VARS } from '../utilities/tone.js'
|
|
|
40
40
|
*/
|
|
41
41
|
|
|
42
42
|
/* the ⋮ — kol-icons `more-vertical` (user 2026-10-31: *"just make a vertical version"* — was `more` turned 90°) */
|
|
43
|
-
const MORE = <
|
|
43
|
+
const MORE = <IconLoader name="more-vertical" size={16} />
|
|
44
44
|
|
|
45
45
|
export function MenuTrigger({ open = false, iconOnly, icon, iconComponent, variant, mono = false, size, children, ...rest }) {
|
|
46
46
|
/* the float trigger: a capsule on the float well, lit fg-16 while its menu is open; `mono` for a value (the date chip) */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useLayoutEffect, useRef, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
3
3
|
import { Menu } from './Menu.jsx'
|
|
4
4
|
import Kbd from '../atoms/Kbd.jsx'
|
|
5
5
|
import Divider from '../atoms/Divider.jsx'
|
|
@@ -67,7 +67,7 @@ export function MenuItem({
|
|
|
67
67
|
>
|
|
68
68
|
<span>{label}</span>
|
|
69
69
|
{caret && (
|
|
70
|
-
<
|
|
70
|
+
<IconLoader
|
|
71
71
|
name="chevron-down"
|
|
72
72
|
size={10}
|
|
73
73
|
style={{ transform: open ? 'rotate(180deg)' : 'rotate(0deg)', transition: 'transform 200ms' }}
|
|
@@ -152,8 +152,8 @@ export function MenuRow({ href, onClick, onPointerEnter, onPointerLeave, disable
|
|
|
152
152
|
{/* the dot is kol-icons `ascii-dot` drawn at twice the slot and pulled back into it: at the slot's own size its
|
|
153
153
|
* 2.25/24 circle is a 2.6px speck; at 24 it is the rail's • (≈4.5px) and still takes the check's 14px column */}
|
|
154
154
|
{indicator === 'dot'
|
|
155
|
-
? <
|
|
156
|
-
: indicator && <
|
|
155
|
+
? <IconLoader name="ascii-dot" size={size === 'xs' ? 16 : 24} style={{ margin: size === 'xs' ? -4 : -5 }} />
|
|
156
|
+
: indicator && <IconLoader name={INDICATOR[indicator] ?? indicator} size={size === 'xs' ? indicatorSize('xs') : 14} />}
|
|
157
157
|
{/* ⌘ is drawn, never typed — the Kbd's `command` glyph (as SearchInput's and Button's caps; W2 row 27, 2026-11-04) */}
|
|
158
158
|
{kbd != null && (typeof kbd === 'string' && kbd.startsWith('⌘')
|
|
159
159
|
? <Kbd size="md" icon="command" className="kol-menu-kbd">{kbd.slice(1)}</Kbd>
|
|
@@ -231,7 +231,7 @@ function MenuAccordionNest({ prefix, iconLeft, label, disabled, children }) {
|
|
|
231
231
|
className={`${NEST_ROW} text-body hover:text-emphasis`}
|
|
232
232
|
>
|
|
233
233
|
<NestRowBody prefix={prefix} iconLeft={iconLeft} label={label} />
|
|
234
|
-
<
|
|
234
|
+
<IconLoader
|
|
235
235
|
name="chevron-down"
|
|
236
236
|
size={10}
|
|
237
237
|
className="text-emphasis shrink-0"
|
|
@@ -288,7 +288,7 @@ function MenuFlyoutNest({ prefix, iconLeft, label, disabled, scroll, rowClass, p
|
|
|
288
288
|
className={rowClass ? `kol-menu-btn w-full shrink-0 flex items-center gap-2 text-left disabled:opacity-40 disabled:cursor-not-allowed ${rowClass}` : `${NEST_ROW} ${open ? 'text-emphasis' : 'text-body hover:text-emphasis'}`}
|
|
289
289
|
>
|
|
290
290
|
<NestRowBody prefix={prefix} iconLeft={iconLeft} label={label} />
|
|
291
|
-
<
|
|
291
|
+
<IconLoader name="chevron-right" size={10} className="text-emphasis shrink-0" />
|
|
292
292
|
</button>
|
|
293
293
|
{open && (
|
|
294
294
|
/* top -5 = the panel's 1px border + 4px pad, so its first row sits on the trigger row */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
3
3
|
import SearchInput from './SearchInput.jsx'
|
|
4
4
|
import { MenuRow, MenuDivider, MenuFlyout } from './MenuItem.jsx'
|
|
5
5
|
import { Tooltip } from '../utilities/Popover.jsx'
|
|
@@ -31,7 +31,7 @@ export const panelClass = (variant, sheet) => (variant === 'float' ? `kol-menu-p
|
|
|
31
31
|
|
|
32
32
|
export const MenuLabel = ({ className = 'kol-menu-label kol-helper-12', children }) => <div className={className}>{children}</div>
|
|
33
33
|
|
|
34
|
-
const glyph = (icon, size) => (typeof icon === 'string' ? <
|
|
34
|
+
const glyph = (icon, size) => (typeof icon === 'string' ? <IconLoader name={icon} size={size} /> : icon)
|
|
35
35
|
/* a row's trailing marks — real icons and Kbd only (W2): `indicator` 'dot' | 'check' | 'chevron', `checked` = 'check',
|
|
36
36
|
* `kbd` a key cap, `trailing` an icon name for an action (download) */
|
|
37
37
|
const indicatorOf = (it) => it.indicator ?? (it.checked ? 'check' : undefined)
|
package/src/molecules/Modal.jsx
CHANGED
|
@@ -4,6 +4,7 @@ import Button from '../atoms/Button.jsx'
|
|
|
4
4
|
import Input from '../atoms/Input.jsx'
|
|
5
5
|
import ToggleCheckbox from '../atoms/ToggleCheckbox.jsx'
|
|
6
6
|
import QuickLookHeader from './QuickLookHeader.jsx'
|
|
7
|
+
import ModalShell from './ModalShell.jsx'
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Modal — promise-based prompt + confirm + alert dialogs.
|
|
@@ -85,16 +86,11 @@ import QuickLookHeader from './QuickLookHeader.jsx'
|
|
|
85
86
|
|
|
86
87
|
const ModalCtx = (globalThis[Symbol.for('@kolkrabbi/kol-component/ModalCtx')] ??= createContext(null))
|
|
87
88
|
|
|
88
|
-
/* THE MODAL VARIANTS (user 2026-10-31: *"do we not use variants for different styles?"*)
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
/* float (W6, 2026-11-04): the float window — solid ground + the float shadow, the window radius, no edge */
|
|
94
|
-
float: { className: 'kol-float-solid !rounded-[var(--kol-float-window-r)] text-fg-emphasis', style: {} },
|
|
95
|
-
bordered: { className: 'border border-fg-08', style: { background: 'var(--kol-surface-primary)', color: 'var(--kol-surface-on-primary)' } },
|
|
96
|
-
}
|
|
97
|
-
const modalVariant = (v, fallback) => MODAL_VARIANTS[v] ?? MODAL_VARIANTS[fallback]
|
|
89
|
+
/* THE MODAL VARIANTS (user 2026-10-31: *"do we not use variants for different styles?"*) live on ModalShell (W2.1,
|
|
90
|
+
* 2026-11-08) — the one panel: `lift`, `bordered`, `float`. Each modal keeps its own default (prompts bordered, Dialog
|
|
91
|
+
* lift) until he picks one; an unknown name falls back to that default. */
|
|
92
|
+
const KNOWN = new Set(['lift', 'bordered', 'float'])
|
|
93
|
+
const modalVariant = (v, fallback) => (KNOWN.has(v) ? v : fallback)
|
|
98
94
|
|
|
99
95
|
export function ModalProvider({ children, variant = 'bordered', container }) {
|
|
100
96
|
const [state, setState] = useState(null)
|
|
@@ -135,7 +131,7 @@ export function ModalProvider({ children, variant = 'bordered', container }) {
|
|
|
135
131
|
|
|
136
132
|
function ModalView({ state, closeWith, variant, contained }) {
|
|
137
133
|
const look = modalVariant(variant, 'bordered')
|
|
138
|
-
const float =
|
|
134
|
+
const float = look === 'float'
|
|
139
135
|
const [val, setVal] = useState(state.defaultValue ?? '')
|
|
140
136
|
const [values, setValues] = useState(() => Object.fromEntries((state.options ?? []).map((o) => [o.id, !!o.defaultValue])))
|
|
141
137
|
const [fieldVals, setFieldVals] = useState(() => Object.fromEntries((state.fields ?? []).map((f) => [f.id, f.defaultValue ?? ''])))
|
|
@@ -214,21 +210,35 @@ function ModalView({ state, closeWith, variant, contained }) {
|
|
|
214
210
|
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
215
211
|
}}
|
|
216
212
|
>
|
|
217
|
-
<
|
|
213
|
+
<ModalShell
|
|
218
214
|
ref={dialogRef}
|
|
215
|
+
variant={look}
|
|
219
216
|
role={typing ? 'dialog' : 'alertdialog'}
|
|
220
217
|
aria-modal="true"
|
|
221
218
|
aria-labelledby="kol-modal-title"
|
|
222
219
|
onMouseDown={(e) => e.stopPropagation()}
|
|
223
|
-
className={float ?
|
|
220
|
+
className={float ? 'gap-[18px] p-6' : 'gap-4 p-5'}
|
|
224
221
|
style={{
|
|
225
|
-
...look.style,
|
|
226
222
|
minWidth: 320,
|
|
227
223
|
maxWidth: contained ? '90%' : '90vw',
|
|
228
224
|
...(float ? { width: 562 } : {}),
|
|
229
225
|
}}
|
|
226
|
+
header={float && state.header && <QuickLookHeader variant="float" icon={state.icon} title={state.header} onClose={cancel} />}
|
|
227
|
+
footer={float ? (
|
|
228
|
+
/* the float's actions sit apart: recovery quiet at the left, the next step at the right */
|
|
229
|
+
<div className="flex items-center justify-between gap-3">
|
|
230
|
+
{state.kind !== 'alert' ? <Button variant="float" tone="ghost" size="md" onClick={cancel}>{state.cancelLabel ?? 'Cancel'}</Button> : <span />}
|
|
231
|
+
<Button variant="float" tone={state.tone === 'danger' ? 'danger' : 'inverted'} size="md" onClick={submit} data-modal-ok>{state.okLabel ?? 'OK'}</Button>
|
|
232
|
+
</div>
|
|
233
|
+
) : (
|
|
234
|
+
<div className="flex gap-2 justify-end">
|
|
235
|
+
{state.kind !== 'alert' && <Button size="sm" onClick={cancel}>{state.cancelLabel ?? 'Cancel'}</Button>}
|
|
236
|
+
{/* inverted, not primary: since tone-is-the-ground-axis (2026-09-03) primary is the
|
|
237
|
+
* dark ground, so OK drew the same as Cancel and nothing showed what Enter does */}
|
|
238
|
+
<Button tone="inverted" size="sm" onClick={submit} data-modal-ok>{state.okLabel ?? 'OK'}</Button>
|
|
239
|
+
</div>
|
|
240
|
+
)}
|
|
230
241
|
>
|
|
231
|
-
{float && state.header && <QuickLookHeader variant="float" icon={state.icon} title={state.header} onClose={cancel} />}
|
|
232
242
|
{/* kol-mono-12, not helper: dialog copy WRAPS, and helper's
|
|
233
243
|
* line-height 1 is single-line chrome only (type protocol). */}
|
|
234
244
|
{/* pre-line: an alert can carry a failure list, one per line */}
|
|
@@ -276,21 +286,7 @@ function ModalView({ state, closeWith, variant, contained }) {
|
|
|
276
286
|
))}
|
|
277
287
|
</div>
|
|
278
288
|
)}
|
|
279
|
-
|
|
280
|
-
/* the float's actions sit apart: recovery quiet at the left, the next step at the right */
|
|
281
|
-
<div className="flex items-center justify-between gap-3">
|
|
282
|
-
{state.kind !== 'alert' ? <Button variant="float" tone="ghost" size="md" onClick={cancel}>{state.cancelLabel ?? 'Cancel'}</Button> : <span />}
|
|
283
|
-
<Button variant="float" tone={state.tone === 'danger' ? 'danger' : 'inverted'} size="md" onClick={submit} data-modal-ok>{state.okLabel ?? 'OK'}</Button>
|
|
284
|
-
</div>
|
|
285
|
-
) : (
|
|
286
|
-
<div className="flex gap-2 justify-end">
|
|
287
|
-
{state.kind !== 'alert' && <Button size="sm" onClick={cancel}>{state.cancelLabel ?? 'Cancel'}</Button>}
|
|
288
|
-
{/* inverted, not primary: since tone-is-the-ground-axis (2026-09-03) primary is the
|
|
289
|
-
* dark ground, so OK drew the same as Cancel and nothing showed what Enter does */}
|
|
290
|
-
<Button tone="inverted" size="sm" onClick={submit} data-modal-ok>{state.okLabel ?? 'OK'}</Button>
|
|
291
|
-
</div>
|
|
292
|
-
)}
|
|
293
|
-
</div>
|
|
289
|
+
</ModalShell>
|
|
294
290
|
</div>
|
|
295
291
|
)
|
|
296
292
|
}
|
|
@@ -329,7 +325,7 @@ export function useModal() {
|
|
|
329
325
|
/**
|
|
330
326
|
* Dialog — Modal's shell holding any content (MetricDashboardUpstream, kol-website 2026-10-31 — metric's filter and
|
|
331
327
|
* segment dialogs). The same `.kol-overlay-scrim` + `.kol-modal` surface as the prompts above, with `children` in place
|
|
332
|
-
* of a prompt. **z 150, not Modal's 1000**, so KOL's portalled floats (z 210+) open ABOVE it — a Dropdown or Combobox
|
|
328
|
+
* of a prompt — both draw their panel through `ModalShell` (W2.1, 2026-11-08). **z 150, not Modal's 1000**, so KOL's portalled floats (z 210+) open ABOVE it — a Dropdown or Combobox
|
|
333
329
|
* inside a dialog has to show its list (a native `<dialog>` cannot: `showModal()` puts it in the top layer, over every
|
|
334
330
|
* portal). Esc and a press on the scrim close it; Esc is left to an open float inside first.
|
|
335
331
|
*
|
|
@@ -362,8 +358,8 @@ export function useModal() {
|
|
|
362
358
|
* @param {ReactNode} [aside] · @param {ReactNode} [footer] · @param {number} [height=656]
|
|
363
359
|
*/
|
|
364
360
|
export function Dialog({ open, onClose, title, width = 560, variant = 'lift', icon, onMinimise, blocking = true, container, kind, headerEnd, sections, section, onSection, aside, footer, height = 656, children }) {
|
|
365
|
-
const look = modalVariant(variant, 'lift')
|
|
366
|
-
const float =
|
|
361
|
+
const look = variant === 'settings' ? 'settings' : modalVariant(variant, 'lift')
|
|
362
|
+
const float = look === 'float'
|
|
367
363
|
useEffect(() => {
|
|
368
364
|
if (!open) return undefined
|
|
369
365
|
const onKey = (e) => { if (e.key === 'Escape' && !document.querySelector('.kol-popover-float, [data-state="open"].kol-dd-trigger')) onClose() }
|
|
@@ -377,17 +373,20 @@ export function Dialog({ open, onClose, title, width = 560, variant = 'lift', ic
|
|
|
377
373
|
return createPortal(
|
|
378
374
|
<div onMouseDown={blocking ? onClose : undefined} className={blocking ? 'kol-overlay-scrim' : 'pointer-events-none'}
|
|
379
375
|
style={{ position: container ? 'absolute' : 'fixed', inset: 0, zIndex: 150, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
|
380
|
-
<
|
|
381
|
-
className="kol-
|
|
382
|
-
style={{ width: `min(${width}px, calc(${within} - 32px))`, height: `min(${height}px, calc(${withinH} - 32px))` }}
|
|
383
|
-
|
|
384
|
-
<
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
376
|
+
<ModalShell variant="settings" role="dialog" aria-modal={blocking ? 'true' : undefined} aria-label={title} data-dialog onMouseDown={(e) => e.stopPropagation()}
|
|
377
|
+
className="kol-settings-window pointer-events-auto overflow-hidden"
|
|
378
|
+
style={{ width: `min(${width}px, calc(${within} - 32px))`, height: `min(${height}px, calc(${withinH} - 32px))` }}
|
|
379
|
+
header={(
|
|
380
|
+
<header className="flex items-center gap-4 h-[60px] shrink-0 pl-6 pr-[22px] border-b border-oq-16">
|
|
381
|
+
<h2 className="text-[14px] font-semibold leading-none">{title}</h2>
|
|
382
|
+
{kind && <span className="text-[11px] text-oq-64 leading-none mt-px">{kind}</span>}
|
|
383
|
+
<span className="flex-1" />
|
|
384
|
+
{headerEnd}
|
|
385
|
+
<button type="button" aria-label="Close" onClick={onClose}
|
|
386
|
+
className="ml-3 size-7 -mr-[7px] inline-flex items-center justify-center rounded-md text-[20px] leading-none text-oq-64 hover:text-(--kol-fg-96) hover:bg-(--kol-oq-08) focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)]">×</button>
|
|
387
|
+
</header>
|
|
388
|
+
)}
|
|
389
|
+
footer={footer && <footer className="flex items-center gap-3 h-[60px] shrink-0 px-6 border-t border-oq-16">{footer}</footer>}>
|
|
391
390
|
<div className="flex flex-1 min-h-0">
|
|
392
391
|
{sections?.length > 0 && (
|
|
393
392
|
<nav aria-label="Settings" className="w-[156px] shrink-0 overflow-y-auto bg-surface-primary border-r border-oq-16 px-2 pt-[21px] pb-4">
|
|
@@ -420,8 +419,7 @@ export function Dialog({ open, onClose, title, width = 560, variant = 'lift', ic
|
|
|
420
419
|
<div className="flex-1 min-w-0 overflow-y-auto pl-6 pr-5 pt-6 pb-6">{children}</div>
|
|
421
420
|
{aside && <aside className="w-[248px] shrink-0 mr-6 pt-6 pb-6 overflow-y-auto">{aside}</aside>}
|
|
422
421
|
</div>
|
|
423
|
-
|
|
424
|
-
</div>
|
|
422
|
+
</ModalShell>
|
|
425
423
|
</div>,
|
|
426
424
|
container ?? document.body,
|
|
427
425
|
)
|
|
@@ -432,7 +430,8 @@ export function Dialog({ open, onClose, title, width = 560, variant = 'lift', ic
|
|
|
432
430
|
className={blocking ? 'kol-overlay-scrim' : 'pointer-events-none'}
|
|
433
431
|
style={{ position: container ? 'absolute' : 'fixed', inset: 0, zIndex: 150, display: 'flex', alignItems: 'center', justifyContent: 'center' }}
|
|
434
432
|
>
|
|
435
|
-
<
|
|
433
|
+
<ModalShell
|
|
434
|
+
variant={look}
|
|
436
435
|
role="dialog"
|
|
437
436
|
aria-modal={blocking ? 'true' : undefined}
|
|
438
437
|
aria-label={title}
|
|
@@ -441,12 +440,12 @@ export function Dialog({ open, onClose, title, width = 560, variant = 'lift', ic
|
|
|
441
440
|
/* THE OVERLAY PANEL (MetricRebuild, 2026-10-31 — user: the filter dialog read as "a borderless box floating
|
|
442
441
|
* mid-page"): it painted the page's own surface behind an fg-08 hairline, so on a dark page it was the page.
|
|
443
442
|
* `.kol-overlay-panel` is the lift every KOL overlay wears (oq-04, no border — the scrim is the edge). */
|
|
444
|
-
className={float ? `
|
|
445
|
-
style={{
|
|
443
|
+
className={float ? `pointer-events-auto gap-[18px] p-6 ${container ? 'max-h-[85%]' : 'max-h-[85vh]'} overflow-auto` : `${container ? 'max-h-[85%]' : 'max-h-[85vh]'}${blocking ? '' : ' pointer-events-auto'}`}
|
|
444
|
+
style={{ width: `min(${width}px, calc(${container ? '100%' : '100vw'} - 32px))` }}
|
|
445
|
+
header={float && title && <QuickLookHeader variant="float" icon={icon} title={title} onMinimise={onMinimise} onClose={onClose} />}
|
|
446
446
|
>
|
|
447
|
-
{float && title && <QuickLookHeader variant="float" icon={icon} title={title} onMinimise={onMinimise} onClose={onClose} />}
|
|
448
447
|
{children}
|
|
449
|
-
</
|
|
448
|
+
</ModalShell>
|
|
450
449
|
</div>,
|
|
451
450
|
container ?? document.body,
|
|
452
451
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Button from '../atoms/Button.jsx'
|
|
2
2
|
import Avatar from '../atoms/Avatar.jsx'
|
|
3
|
-
import {
|
|
3
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
4
4
|
|
|
5
5
|
/* taxonomy-ok: molecule — Avatar (atom) or kol-icons's Icon, a title and trailing actions on Button's nav row */
|
|
6
6
|
|
|
@@ -29,7 +29,7 @@ export default function ModalHeader({ title, avatar, icon, actions, variant = 'd
|
|
|
29
29
|
const cls = `${ROW[float ? 'float' : 'default']} ${className}`.trim()
|
|
30
30
|
const lead = avatar != null
|
|
31
31
|
? (typeof avatar === 'string' ? <Avatar {...(isSrc(avatar) ? { src: avatar } : { initial: avatar })} alt="" size="xs" /> : avatar)
|
|
32
|
-
: icon && <
|
|
32
|
+
: icon && <IconLoader name={icon} size={float ? 'var(--kol-float-ic)' : 22} />
|
|
33
33
|
const body = <>{lead}{actions ? <span className="flex-1 text-left">{title}</span> : title}{actions && <span className="ml-auto flex shrink-0 items-center pointer-events-auto">{actions}</span>}</>
|
|
34
34
|
if (onClick) return <Button variant="nav" size="lg" className={cls} onClick={onClick}>{body}</Button>
|
|
35
35
|
return <div role="heading" aria-level={2} className={`${NAV_LG} ${cls} cursor-default pointer-events-none`}>{body}</div>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { forwardRef } from 'react'
|
|
2
|
+
|
|
3
|
+
/* taxonomy-ok: molecule — the modal family's panel: the surface every modal, dialog and sheet window draws its parts on */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* ModalShell — The one modal panel (plan-2026-11-08-outstanding W2.1, his Figma issue 52: *"modals not built on one
|
|
7
|
+
* modal"*). The surface, the radius, a header slot, the body and a footer slot — nothing else. The scrim, the portal,
|
|
8
|
+
* the keys and the size stay the caller's (Modal, Dialog, FullscreenOverlay), so every overlay can wear it whatever
|
|
9
|
+
* layer it sits in. Padding and the gap between the parts are the caller's too (`className`): a prompt and a media
|
|
10
|
+
* window do not share them.
|
|
11
|
+
*
|
|
12
|
+
* <ModalShell header={<QuickLookHeader … />} footer={<div>…actions</div>} className="gap-4 p-5" style={{ width: 560 }}>
|
|
13
|
+
* …body
|
|
14
|
+
* </ModalShell>
|
|
15
|
+
*
|
|
16
|
+
* ONE RADIUS: `--kol-radius-sm` (4px) — the radius Modal's prompts and Dialog wore. The float style's windows keep the
|
|
17
|
+
* float window radius (`float`, 28) and the generator settings window its 16 (`settings`); both are the float style's
|
|
18
|
+
* own, drawn in its Figma.
|
|
19
|
+
*
|
|
20
|
+
* @param {'lift'|'bordered'|'float'|'settings'} [variant='lift']
|
|
21
|
+
* `lift` — the overlay panel every KOL overlay wears (`.kol-overlay-panel`: oq-04, no border, the scrim is the edge);
|
|
22
|
+
* `bordered` — the page surface behind an fg-08 hairline (Modal's prompts); `float` — the float window
|
|
23
|
+
* (`kol-float-solid`); `settings` — the generator settings window (the secondary surface, oq-16 edge, the float shadow).
|
|
24
|
+
* @param {ReactNode} [header] drawn first
|
|
25
|
+
* @param {ReactNode} [footer] drawn last
|
|
26
|
+
* @param {string} [className] the caller's layout: padding, gap, size
|
|
27
|
+
* @param {Object} [style]
|
|
28
|
+
* Any other prop (role, aria-*, onMouseDown, data-*) lands on the panel; the ref is the panel.
|
|
29
|
+
*/
|
|
30
|
+
const VARIANTS = {
|
|
31
|
+
lift: { className: 'kol-overlay-panel rounded-[var(--kol-radius-sm)]', style: {} },
|
|
32
|
+
bordered: { className: 'border border-fg-08 rounded-[var(--kol-radius-sm)]', style: { background: 'var(--kol-surface-primary)', color: 'var(--kol-surface-on-primary)' } },
|
|
33
|
+
float: { className: 'kol-float-solid !rounded-[var(--kol-float-window-r)] text-fg-emphasis', style: {} },
|
|
34
|
+
settings: { className: 'rounded-2xl border border-oq-16 bg-surface-secondary text-fg-96 font-(family-name:--kol-font-family-float) shadow-[var(--kol-shadow-float)]', style: {} },
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const ModalShell = forwardRef(function ModalShell({ variant = 'lift', header, footer, className = '', style, children, ...rest }, ref) {
|
|
38
|
+
const look = VARIANTS[variant] ?? VARIANTS.lift
|
|
39
|
+
return (
|
|
40
|
+
<div ref={ref} {...rest} className={`kol-modal flex flex-col ${look.className} ${className}`.trim()} style={{ ...look.style, ...style }}>
|
|
41
|
+
{header}
|
|
42
|
+
{children}
|
|
43
|
+
{footer}
|
|
44
|
+
</div>
|
|
45
|
+
)
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
export default ModalShell
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
import { MenuRow } from './MenuItem.jsx'
|
|
3
3
|
import { Menu } from './Menu.jsx'
|
|
4
4
|
import { indicatorSize } from '../hooks/glyphLadders.js'
|
|
@@ -50,7 +50,7 @@ export default function MultiSelect({ groups = [], value = {}, onChange, label,
|
|
|
50
50
|
data-state={open ? 'open' : 'closed'}
|
|
51
51
|
>
|
|
52
52
|
<span className="kol-dd-label"><span>{label ?? groups.map(labelOf).filter(Boolean).join(' · ')}</span></span>
|
|
53
|
-
<
|
|
53
|
+
<IconLoader name="chevron-down" size={indicatorSize(size)} className="kol-dd-caret" />
|
|
54
54
|
</button>
|
|
55
55
|
)}
|
|
56
56
|
>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* `ROW_HEIGHT` / `ROW_TYPE` / `ROW_FILL` are exported for a row that cannot take this anatomy (the
|
|
31
31
|
* media rows view's table row: twisty, drag hit, columns) — it still sits on the same ramp and fills.
|
|
32
32
|
*/
|
|
33
|
-
import {
|
|
33
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
34
34
|
import { glyphSize } from '../hooks/glyphLadders.js'
|
|
35
35
|
|
|
36
36
|
/* the box: min-height on the ramp, and a pad that lands one line of the step's type exactly on it —
|
|
@@ -75,7 +75,7 @@ export default function OptionRow({
|
|
|
75
75
|
const state = disabled ? 'text-fg-80 opacity-[var(--kol-opacity-disabled)]'
|
|
76
76
|
: selected ? ROW_FILL.selected : active ? ROW_FILL.active : trail ? ROW_FILL.trail
|
|
77
77
|
: `${muted ? 'text-fg-48' : 'text-fg-80'}${hover ? ` hover:${TONE}` : ''}`
|
|
78
|
-
const lead = leading ?? (icon && <
|
|
78
|
+
const lead = leading ?? (icon && <IconLoader name={icon} size={glyphSize(size)} />)
|
|
79
79
|
return (
|
|
80
80
|
<Tag
|
|
81
81
|
className={`flex items-center gap-2 px-4 border border-transparent ${ROW_HEIGHT[size] ?? ROW_HEIGHT.md} rounded-[var(--kol-radius-sm)] ${disabled ? 'cursor-not-allowed' : 'cursor-pointer'} text-left ${type ?? ROW_TYPE[size] ?? ROW_TYPE.md} transition-colors ${state} ${className}`.trim()}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
3
3
|
import Input from '../atoms/Input.jsx'
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -30,7 +30,7 @@ export default function PasswordInput({ revealed, onRevealChange, revealLabel, .
|
|
|
30
30
|
onClick={toggle}
|
|
31
31
|
className="inline-flex items-center justify-center shrink-0 cursor-pointer text-oq-64 hover:text-oq-96 transition-colors outline-none focus-visible:[box-shadow:var(--kol-float-focus)] rounded-full"
|
|
32
32
|
>
|
|
33
|
-
<
|
|
33
|
+
<IconLoader name={shown ? 'eye-off' : 'eye-on'} size={16} />
|
|
34
34
|
</button>
|
|
35
35
|
}
|
|
36
36
|
/>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useId, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
3
3
|
import IconFrame from '../atoms/IconFrame.jsx'
|
|
4
4
|
import { Tooltip } from '../utilities/Popover.jsx'
|
|
5
5
|
import useSectionTheme from '../hooks/useSectionTheme.js'
|
|
@@ -177,7 +177,7 @@ export default function ProfileCard({
|
|
|
177
177
|
aria-label={label}
|
|
178
178
|
className={`${ramp.iconBox} flex items-center justify-center ${ink} transition-transform hover:scale-125`}
|
|
179
179
|
>
|
|
180
|
-
<
|
|
180
|
+
<IconLoader name={icon} size={ramp.iconSize} />
|
|
181
181
|
</a>
|
|
182
182
|
</Tooltip>
|
|
183
183
|
))}
|
|
@@ -25,7 +25,7 @@ import { useEffect, useState } from 'react'
|
|
|
25
25
|
* @param {string} ariaLabel FLOAT: what the value is; the − + read `Decrease <it>` / `Increase <it>` (default quantity)
|
|
26
26
|
* @param {string} className extra classes on the root
|
|
27
27
|
*/
|
|
28
|
-
import {
|
|
28
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
29
29
|
const FLOAT_H = { sm: 'h-[var(--kol-float-h-sm)]', md: 'h-[var(--kol-float-h-md)]', lg: 'h-[var(--kol-float-h-lg)]' }
|
|
30
30
|
|
|
31
31
|
const SIZE_MAP = {
|
|
@@ -83,9 +83,9 @@ const QuantityInput = ({
|
|
|
83
83
|
const btn = 'inline-flex h-full w-8 shrink-0 items-center justify-center rounded-full text-oq-64 hover:text-oq-96 disabled:opacity-40 disabled:hover:text-oq-64 cursor-pointer disabled:cursor-not-allowed outline-none focus-visible:[box-shadow:var(--kol-float-focus)] transition-colors'
|
|
84
84
|
return (
|
|
85
85
|
<div className={`inline-flex items-center rounded-full bg-[var(--kol-float-well)] px-1 kol-float-panel text-fg-emphasis ${FLOAT_H[size] ?? FLOAT_H.md} ${className}`.trim()}>
|
|
86
|
-
<button type="button" onClick={decrement} disabled={value <= min} className={btn} aria-label={`Decrease ${ariaLabel}`}><
|
|
86
|
+
<button type="button" onClick={decrement} disabled={value <= min} className={btn} aria-label={`Decrease ${ariaLabel}`}><IconLoader name="minus" size={14} /></button>
|
|
87
87
|
<span className="min-w-6 flex-1 text-center tabular-nums">{value}{unit ? ` ${unit}` : ''}</span>
|
|
88
|
-
<button type="button" onClick={increment} disabled={value >= max} className={btn} aria-label={`Increase ${ariaLabel}`}><
|
|
88
|
+
<button type="button" onClick={increment} disabled={value >= max} className={btn} aria-label={`Increase ${ariaLabel}`}><IconLoader name="plus" size={14} /></button>
|
|
89
89
|
</div>
|
|
90
90
|
)
|
|
91
91
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useRef, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
3
3
|
import QuickLookHeader from './QuickLookHeader.jsx'
|
|
4
|
+
import ModalShell from './ModalShell.jsx'
|
|
4
5
|
|
|
5
|
-
/* taxonomy-ok: molecule —
|
|
6
|
+
/* taxonomy-ok: molecule — QuickLookHeader (molecule) on ModalShell (molecule) + kol-icons's IconLoader. */
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* QuickLookFrame — The preview window. the Finder Quick Look window (user 2026-09-23: *"put them in a container LIKE
|
|
@@ -68,26 +69,31 @@ export default function QuickLookFrame({ variant, icon, onMinimise, status, titl
|
|
|
68
69
|
const grip = { role: 'separator', 'aria-label': 'Resize', onPointerDown, onPointerMove, onPointerUp, onPointerCancel: onPointerUp }
|
|
69
70
|
if (variant === 'float') {
|
|
70
71
|
return (
|
|
71
|
-
<
|
|
72
|
-
className={`
|
|
73
|
-
{header && <QuickLookHeader variant="float" icon={icon} title={title} actions={actions} onMinimise={onMinimise} onClose={onClose} />}
|
|
72
|
+
<ModalShell ref={ref} variant="float" style={size ? { width: size.w, height: size.h } : undefined}
|
|
73
|
+
className={`w-full max-w-[562px] gap-[18px] p-5 ${className}`.trim()}
|
|
74
|
+
header={header && <QuickLookHeader variant="float" icon={icon} title={title} actions={actions} onMinimise={onMinimise} onClose={onClose} />}
|
|
75
|
+
footer={(
|
|
76
|
+
<>
|
|
77
|
+
{footer}
|
|
78
|
+
<div className="flex items-center gap-3">
|
|
79
|
+
<span className="kol-float-label min-w-0 flex-1 truncate text-fg-64">{status}</span>
|
|
80
|
+
<span {...grip} className="inline-flex size-4 cursor-nwse-resize touch-none items-center justify-center text-oq-64 hover:text-oq-96"><IconLoader name="expand" size={13} /></span>
|
|
81
|
+
</div>
|
|
82
|
+
</>
|
|
83
|
+
)}>
|
|
74
84
|
<div className="flex min-h-0 flex-1 flex-col gap-[18px]">{children}</div>
|
|
75
|
-
|
|
76
|
-
<div className="flex items-center gap-3">
|
|
77
|
-
<span className="kol-float-label min-w-0 flex-1 truncate text-fg-64">{status}</span>
|
|
78
|
-
<span {...grip} className="inline-flex size-4 cursor-nwse-resize touch-none items-center justify-center text-oq-64 hover:text-oq-96"><Icon name="expand" size={13} /></span>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
85
|
+
</ModalShell>
|
|
81
86
|
)
|
|
82
87
|
}
|
|
83
|
-
|
|
88
|
+
/* THE PANEL IS ModalShell's (W2.2, 2026-11-08): the lift surface and the one modal radius; the oq-12 hairline the
|
|
89
|
+
* window wore went with its own panel style — the scrim is the edge, as on every other KOL overlay */
|
|
90
|
+
const style = size ? { width: size.w, height: size.h, '--kol-ql-frame-h': `${size.h}px`, '--kol-ql-max-w': `${size.w}px` } : undefined
|
|
84
91
|
return (
|
|
85
|
-
<
|
|
86
|
-
className={`kol-quicklook${footer ? ' kol-quicklook--footer' : ''}${size ? ' kol-quicklook--sized' : ''} ${className}`.trim()}
|
|
87
|
-
{header && <QuickLookHeader title={title} meta={meta} actions={actions} nav={nav} onClose={onClose} />}
|
|
92
|
+
<ModalShell ref={ref} style={style}
|
|
93
|
+
className={`kol-quicklook${footer ? ' kol-quicklook--footer' : ''}${size ? ' kol-quicklook--sized' : ''} ${className}`.trim()}
|
|
94
|
+
header={header && <QuickLookHeader title={title} meta={meta} actions={actions} nav={nav} onClose={onClose} />}
|
|
95
|
+
footer={<>{footer && <div className="kol-quicklook-footer">{footer}</div>}<span className="kol-quicklook-grip" {...grip} /></>}>
|
|
88
96
|
<div className="kol-quicklook-body">{children}</div>
|
|
89
|
-
|
|
90
|
-
<span className="kol-quicklook-grip" {...grip} />
|
|
91
|
-
</div>
|
|
97
|
+
</ModalShell>
|
|
92
98
|
)
|
|
93
99
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
import Button from '../atoms/Button.jsx'
|
|
3
3
|
import CloseButton from './CloseButton.jsx'
|
|
4
4
|
|
|
@@ -28,11 +28,11 @@ export default function QuickLookHeader({ variant, icon, title, meta, actions, n
|
|
|
28
28
|
const ctl = 'inline-flex size-6 shrink-0 items-center justify-center rounded-full text-oq-64 hover:text-oq-96 hover:bg-fg-08 focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)] cursor-pointer'
|
|
29
29
|
return (
|
|
30
30
|
<div className={`flex min-h-6 w-full items-center gap-3 ${className}`.trim()}>
|
|
31
|
-
{icon && <
|
|
31
|
+
{icon && <IconLoader name={icon} size={16} className="shrink-0 text-oq-64" />}
|
|
32
32
|
<span className="kol-float-panel min-w-0 flex-1 truncate text-fg-emphasis">{title}</span>
|
|
33
33
|
{actions}
|
|
34
|
-
{onMinimise && <button type="button" aria-label="Minimise" onClick={onMinimise} className={ctl}><
|
|
35
|
-
{onClose && <button type="button" aria-label="Close" onClick={onClose} className={ctl}><
|
|
34
|
+
{onMinimise && <button type="button" aria-label="Minimise" onClick={onMinimise} className={ctl}><IconLoader name="minus" size={14} /></button>}
|
|
35
|
+
{onClose && <button type="button" aria-label="Close" onClick={onClose} className={ctl}><IconLoader name="x" size={16} /></button>}
|
|
36
36
|
</div>
|
|
37
37
|
)
|
|
38
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* ReadingChapterNav — The chapters either side, as two capsules. `‹ Previous interlude · Second interlude` /
|
|
@@ -18,12 +18,12 @@ function Side({ dir, item }) {
|
|
|
18
18
|
return (
|
|
19
19
|
<El {...(item.href ? { href: item.href } : { type: 'button' })} onClick={item.onClick}
|
|
20
20
|
className={`flex h-14 min-w-0 items-center gap-3 rounded-full bg-surface-secondary text-left no-underline cursor-pointer hover:shadow-[inset_0_0_0_999px_var(--kol-fg-08)] focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)] ${next ? 'pl-5 pr-4' : 'pl-4 pr-5'}`}>
|
|
21
|
-
{!next && <
|
|
21
|
+
{!next && <IconLoader name="chevron-left" size="var(--kol-float-ic)" className="shrink-0 text-oq-64" />}
|
|
22
22
|
<span className="flex min-w-0 flex-1 flex-col">
|
|
23
23
|
<span className="kol-float-ruler truncate uppercase text-fg-64">{item.label ?? (next ? 'Next' : 'Previous')}</span>
|
|
24
24
|
<span className="kol-float-hint truncate text-fg-emphasis">{item.title}</span>
|
|
25
25
|
</span>
|
|
26
|
-
{next && <
|
|
26
|
+
{next && <IconLoader name="chevron-right" size="var(--kol-float-ic)" className="shrink-0 text-oq-64" />}
|
|
27
27
|
</El>
|
|
28
28
|
)
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react'
|
|
2
2
|
import { toneClass } from '../utilities/tone.js'
|
|
3
|
-
import {
|
|
3
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
4
4
|
import { glyphSize } from '../hooks/glyphLadders.js'
|
|
5
5
|
import Kbd from '../atoms/Kbd.jsx'
|
|
6
6
|
|
|
@@ -186,7 +186,7 @@ export default function SearchInput({
|
|
|
186
186
|
{/* SOLO ladder, and NO ink class — it inherits from its chrome
|
|
187
187
|
exactly as IconFrame's glyph does, so it cannot drift from the
|
|
188
188
|
icon beside it. */}
|
|
189
|
-
<
|
|
189
|
+
<IconLoader name="search" size={iconSize ?? glyphSize(size, true)} />
|
|
190
190
|
</button>
|
|
191
191
|
)}
|
|
192
192
|
{isOpen && (
|
|
@@ -244,7 +244,7 @@ export default function SearchInput({
|
|
|
244
244
|
onClick={onBack}
|
|
245
245
|
className={`flex items-center shrink-0 cursor-pointer transition-colors ${bare ? 'text-oq-48 hover:text-oq-96' : 'text-auto opacity-50 hover:opacity-100'}`}
|
|
246
246
|
>
|
|
247
|
-
<
|
|
247
|
+
<IconLoader name="arrow-left" size={iconSize ?? glyphSize(size)} />
|
|
248
248
|
</button>
|
|
249
249
|
) : (
|
|
250
250
|
<span
|
|
@@ -252,7 +252,7 @@ export default function SearchInput({
|
|
|
252
252
|
className={`flex items-center shrink-0 ${bare ? 'text-oq-48' : 'text-auto opacity-50'}`}
|
|
253
253
|
>
|
|
254
254
|
{/* ADJACENT — this glyph sits in the field's line box beside the query; a float glyph is the float's 18 */}
|
|
255
|
-
<
|
|
255
|
+
<IconLoader name="search" size={iconSize ?? (variant === 'float' ? 'var(--kol-float-ic)' : glyphSize(size))} />
|
|
256
256
|
</span>
|
|
257
257
|
)}
|
|
258
258
|
<input
|
|
@@ -275,7 +275,7 @@ export default function SearchInput({
|
|
|
275
275
|
onClick={onClear}
|
|
276
276
|
className="inline-flex items-center justify-center shrink-0 cursor-pointer text-oq-48 hover:text-oq-96 transition-colors"
|
|
277
277
|
>
|
|
278
|
-
<
|
|
278
|
+
<IconLoader name="x" size={12} />
|
|
279
279
|
</button>
|
|
280
280
|
) : shortcutHint ? (
|
|
281
281
|
/* aria-hidden — affordance, not a label (same stance as Input's prefix/suffix) */
|