@kolkrabbi/kol-component 0.353.0 → 0.355.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 +7 -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 +1 -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/ModalHeader.jsx +2 -2
- 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 +2 -2
- 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 +22 -18
- 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 +11 -11
- 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/Table.jsx +3 -3
- package/src/organisms/ToolPalette.jsx +2 -2
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Tailwind skips `node_modules` when scanning, so point it at this package's sourc
|
|
|
23
23
|
|
|
24
24
|
```jsx
|
|
25
25
|
import { Button, Tag, Badge, Slider, Dropdown, Table } from '@kolkrabbi/kol-component'
|
|
26
|
-
import {
|
|
26
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
27
27
|
|
|
28
28
|
<Button variant="primary" iconLeft="plus">New</Button>
|
|
29
29
|
<Badge variant="success">Active</Badge>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-component",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.355.0",
|
|
4
4
|
"description": "The core component library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"embla-carousel-react": "^8.6.0",
|
|
33
33
|
"pdfjs-dist": "^6.3.289",
|
|
34
34
|
"react-syntax-highlighter": "^16.1.1",
|
|
35
|
+
"@kolkrabbi/kol-growth": "^0.5.0",
|
|
35
36
|
"@kolkrabbi/kol-markdown": "^0.2.0",
|
|
36
|
-
"@kolkrabbi/kol-search": "^0.3.0"
|
|
37
|
-
"@kolkrabbi/kol-growth": "^0.5.0"
|
|
37
|
+
"@kolkrabbi/kol-search": "^0.3.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@kolkrabbi/kol-icons": ">=0.
|
|
40
|
+
"@kolkrabbi/kol-icons": ">=0.68.0",
|
|
41
41
|
"framer-motion": "^12.0.0",
|
|
42
42
|
"gsap": "^3.13.0",
|
|
43
43
|
"hls.js": "^1.6.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@kolkrabbi/kol-icons": "^0.
|
|
48
|
+
"@kolkrabbi/kol-icons": "^0.68.0"
|
|
49
49
|
},
|
|
50
50
|
"files": [
|
|
51
51
|
"src",
|
package/src/atoms/Badge.jsx
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* oq-16 — `3 effects`. The status tones keep today's look.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
12
12
|
|
|
13
13
|
/* Tone names mirror StatusChip's --ui-* ladder (error/warning/info/success —
|
|
14
14
|
* siblings, one language). `destructive` and `critical` are legacy aliases
|
|
@@ -51,7 +51,7 @@ const Badge = ({
|
|
|
51
51
|
className={`kol-badge ${variantClass} ${sizeClass} ${className}`.trim()}
|
|
52
52
|
{...props}
|
|
53
53
|
>
|
|
54
|
-
{icon && <
|
|
54
|
+
{icon && <IconLoader name={icon} size={ICON_SIZES[size] ?? ICON_SIZES.md} />}
|
|
55
55
|
{children}
|
|
56
56
|
</div>
|
|
57
57
|
)
|
package/src/atoms/Button.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isValidElement } from 'react'
|
|
2
2
|
import { toneClass, VARIANT_TONE } 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 './Kbd.jsx'
|
|
6
6
|
|
|
@@ -151,7 +151,7 @@ const Button = ({
|
|
|
151
151
|
// Icon injection seam — a component type resolves names against a custom
|
|
152
152
|
// registry (EditorIcon etc.); a pre-rendered node drops in verbatim.
|
|
153
153
|
if (isValidElement(iconComponent)) return iconComponent
|
|
154
|
-
const IconCmp = iconComponent ||
|
|
154
|
+
const IconCmp = iconComponent || IconLoader
|
|
155
155
|
|
|
156
156
|
// If no hover icon, render single icon
|
|
157
157
|
if (!iconHoverName) {
|
package/src/atoms/Delta.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Delta — A change against a previous value. `↗ 19.8% from 10,740` (float-everything W2 row 29, 2026-11-04 — the
|
|
@@ -18,7 +18,7 @@ export default function Delta({ value, direction = 'up', from, fromLabel = 'from
|
|
|
18
18
|
return (
|
|
19
19
|
<span className={`inline-flex items-center gap-2 ${className}`.trim()}>
|
|
20
20
|
<span className="inline-flex items-center gap-1 kol-float-timecode text-fg-emphasis">
|
|
21
|
-
{ARROW[direction] && <
|
|
21
|
+
{ARROW[direction] && <IconLoader name={ARROW[direction]} size={12} className="text-oq-96" />}
|
|
22
22
|
{value}
|
|
23
23
|
</span>
|
|
24
24
|
{from != null && <span className="kol-float-hint text-fg-64">{fromLabel} {from}</span>}
|
package/src/atoms/FileIcon.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* FileIcon — A file drawn as a page. the file as a page: folded corner, the kind's glyph, the extension under it.
|
|
@@ -22,7 +22,7 @@ export default function FileIcon({ ext, glyph, className = '' }) {
|
|
|
22
22
|
<path className="kol-file-icon-fold" d="M66 2v26a6 6 0 0 0 6 6h26z" />
|
|
23
23
|
{glyph && (
|
|
24
24
|
<foreignObject x="30" y={label ? 42 : 52} width="40" height="40">
|
|
25
|
-
<
|
|
25
|
+
<IconLoader name={glyph} size={40} className="kol-file-icon-glyph" />
|
|
26
26
|
</foreignObject>
|
|
27
27
|
)}
|
|
28
28
|
{label && <text className="kol-file-icon-ext" x="50" y="108" textAnchor="middle" {...fit}>{label}</text>}
|
package/src/atoms/IconFrame.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
import { SOLO } from '../hooks/glyphLadders.js'
|
|
3
3
|
import { toneClass } from '../utilities/tone.js'
|
|
4
4
|
|
|
@@ -94,7 +94,7 @@ export default function IconFrame({
|
|
|
94
94
|
/* `tone="sunken"` (ControlToneSunken, 2026-08-28) — the control set's dark well + fg-96 ink, no states, as ever */
|
|
95
95
|
/* no variant → no class: the frame inherits a wrapper's tone, else secondary (2026-09-03) */
|
|
96
96
|
const cls = `kol-icon-frame${variant ? ` kol-icon-frame-${variant}` : ''} kol-icon-frame-${size}${radiusCls} ${toneClass(tone)} ${className}`.replace(/\s+/g, ' ').trim()
|
|
97
|
-
const glyph = <
|
|
97
|
+
const glyph = <IconLoader name={name} size={resolvedIconSize} />
|
|
98
98
|
|
|
99
99
|
/* The element follows the affordance, and the CLASS is identical in all three
|
|
100
100
|
* branches — that is the whole contract. A frame that can be clicked must be
|
package/src/atoms/IconPlate.jsx
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* so a glyph is judged on the same paper in either theme. The guide is the 24-unit keyline grid
|
|
9
9
|
* (Material-style: dashed diagonals, the three keyline rectangles, the centre circle).
|
|
10
10
|
*
|
|
11
|
-
* The plate draws no glyph of its own — pass one as children, sized to the plate (`<
|
|
11
|
+
* The plate draws no glyph of its own — pass one as children, sized to the plate (`<IconLoader size={size} />`,
|
|
12
12
|
* raw SVG markup, anything). `size="fill"` takes the parent's width and stays square.
|
|
13
13
|
*
|
|
14
14
|
* @param {number|'fill'} [size=24] the plate's edge in px, or 'fill'
|
package/src/atoms/IconToggle.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
import { SOLO } from '../hooks/glyphLadders.js'
|
|
3
3
|
import { Tooltip } from '../utilities/Popover.jsx'
|
|
4
4
|
|
|
@@ -38,7 +38,7 @@ export default function IconToggle({
|
|
|
38
38
|
tone = 'default',
|
|
39
39
|
size = 'sm',
|
|
40
40
|
disabled = false,
|
|
41
|
-
iconComponent: IconCmp =
|
|
41
|
+
iconComponent: IconCmp = IconLoader,
|
|
42
42
|
className = '',
|
|
43
43
|
...rest
|
|
44
44
|
}) {
|
package/src/atoms/Input.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
3
3
|
import { toneClass } from '../utilities/tone.js'
|
|
4
4
|
import { glyphSize } from '../hooks/glyphLadders.js'
|
|
5
5
|
|
|
@@ -167,10 +167,10 @@ export default function Input({
|
|
|
167
167
|
const propertyLen = Math.max(String(value ?? placeholder ?? '').length, 1)
|
|
168
168
|
|
|
169
169
|
/* the error: a mark inside, a message under (row 36) */
|
|
170
|
-
const errorMark = error ? <span aria-hidden="true" className="kol-control-error flex items-center shrink-0 pl-2 text-[var(--ui-error)]"><
|
|
170
|
+
const errorMark = error ? <span aria-hidden="true" className="kol-control-error flex items-center shrink-0 pl-2 text-[var(--ui-error)]"><IconLoader name="alert-triangle" size={14} /></span> : null
|
|
171
171
|
const errorText = typeof error === 'string' && error ? (
|
|
172
172
|
<span role="alert" className={`flex items-center gap-1.5 ${resolvedVariant === 'float' ? 'kol-float-label' : 'kol-mono-10'} text-fg-64`}>
|
|
173
|
-
<
|
|
173
|
+
<IconLoader name="info" size={12} />{error}
|
|
174
174
|
</span>
|
|
175
175
|
) : null
|
|
176
176
|
|
|
@@ -211,7 +211,7 @@ export default function Input({
|
|
|
211
211
|
)}
|
|
212
212
|
{iconLeft && (
|
|
213
213
|
<span aria-hidden="true" className="flex items-center text-auto opacity-50 shrink-0 pr-2">
|
|
214
|
-
<
|
|
214
|
+
<IconLoader name={iconLeft} size={resolvedIconSize} />
|
|
215
215
|
</span>
|
|
216
216
|
)}
|
|
217
217
|
{prefix !== undefined && (
|
package/src/atoms/Kbd.jsx
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* It follows the cap: 10 in `sm`, 12 in `md` (2026-10-02 —
|
|
15
15
|
* it was 12 in both, so in the small ⌘K cap the ⌘ outgrew the K)
|
|
16
16
|
*/
|
|
17
|
-
import {
|
|
17
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
18
18
|
|
|
19
19
|
const SIZE = {
|
|
20
20
|
sm: 'h-4 min-w-4 px-1 kol-helper-10',
|
|
@@ -29,7 +29,7 @@ export default function Kbd({ size = 'md', icon, className = '', children, ...re
|
|
|
29
29
|
className={`inline-flex items-center justify-center gap-0.5 shrink-0 rounded-[var(--kol-radius-xs)] bg-oq-08 text-oq-64 ${SIZE[size] ?? SIZE.md} ${className}`.trim()}
|
|
30
30
|
{...rest}
|
|
31
31
|
>
|
|
32
|
-
{icon && <
|
|
32
|
+
{icon && <IconLoader name={icon} size={GLYPH[size] ?? GLYPH.md} />}
|
|
33
33
|
{children}
|
|
34
34
|
</kbd>
|
|
35
35
|
)
|
package/src/atoms/Label.jsx
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Label — minimal form label. Inherits typography from parent (consumer
|
|
3
5
|
* supplies `kol-helper-N` or similar via className when needed). Defaults
|
|
4
6
|
* to `text-fg-48` for the muted-control look.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} icon a kol-icons name, drawn before the text at the label's own size (1em) — never a text glyph
|
|
5
9
|
*/
|
|
6
|
-
export default function Label({ children, htmlFor, className = '' }) {
|
|
10
|
+
export default function Label({ children, htmlFor, icon, className = '' }) {
|
|
7
11
|
return (
|
|
8
|
-
<label htmlFor={htmlFor} className={`text-fg-48 ${className}`}>
|
|
12
|
+
<label htmlFor={htmlFor} className={`text-fg-48 ${icon ? 'inline-flex items-center gap-1 ' : ''}${className}`}>
|
|
13
|
+
{icon && <IconLoader name={icon} size="1em" />}
|
|
9
14
|
{children}
|
|
10
15
|
</label>
|
|
11
16
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* SectionLabel — A section's name with its arrow.
|
|
@@ -28,7 +28,7 @@ export default function SectionLabel({
|
|
|
28
28
|
<span className="kol-float-label truncate text-fg-64">{text}</span>
|
|
29
29
|
{onAdd && (
|
|
30
30
|
<button type="button" aria-label={addLabel} onClick={onAdd} 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)] cursor-pointer">
|
|
31
|
-
<
|
|
31
|
+
<IconLoader name="plus" size={14} />
|
|
32
32
|
</button>
|
|
33
33
|
)}
|
|
34
34
|
</div>
|
|
@@ -74,13 +74,13 @@ export default function SectionLabel({
|
|
|
74
74
|
overflow: 'hidden'
|
|
75
75
|
}}
|
|
76
76
|
>
|
|
77
|
-
<
|
|
77
|
+
<IconLoader
|
|
78
78
|
name="arrow-downright"
|
|
79
79
|
size={config.iconSize}
|
|
80
80
|
className="icon-default"
|
|
81
81
|
style={{ position: 'absolute' }}
|
|
82
82
|
/>
|
|
83
|
-
<
|
|
83
|
+
<IconLoader
|
|
84
84
|
name="arrow-downright"
|
|
85
85
|
size={config.iconSize}
|
|
86
86
|
className="icon-hover"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
3
3
|
|
|
4
4
|
/* Promoted verbatim from showcase/src/sets/content-card-comparison.jsx
|
|
5
5
|
* (ContentFiltersCollection, kol-r2b2 2026-08-27) — the card's `size` slot:
|
|
@@ -69,7 +69,7 @@ export default function SizeOrDownload({
|
|
|
69
69
|
>
|
|
70
70
|
<span className="inline-flex w-0 overflow-hidden transition-[width] duration-500 ease-[var(--kol-ease-house)] group-hover/size:w-[20px] group-hover/size:delay-200">
|
|
71
71
|
<span className="inline-flex h-4 w-4 -translate-x-2 items-center justify-center text-oq-80 transition-transform duration-500 ease-[var(--kol-ease-house)] group-hover/size:translate-x-0 group-hover/size:delay-200">
|
|
72
|
-
<
|
|
72
|
+
<IconLoader name={done ? confirmIcon : icon} size={16} />
|
|
73
73
|
</span>
|
|
74
74
|
</span>
|
|
75
75
|
<span className="kol-mono-12 text-oq-80">{label}</span>
|
package/src/atoms/SortHeader.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* SortHeader — one sortable field: label + direction arrow. Strip chrome, verbatim
|
|
@@ -24,7 +24,7 @@ export default function SortHeader({ label, active = false, dir = 'asc', onClick
|
|
|
24
24
|
{...props}
|
|
25
25
|
>
|
|
26
26
|
{typeof label === 'string' ? label.toUpperCase() : label}
|
|
27
|
-
{active && <
|
|
27
|
+
{active && <IconLoader name={dir === 'asc' ? 'arrow-down' : 'arrow-up'} size={10} />}
|
|
28
28
|
</button>
|
|
29
29
|
)
|
|
30
30
|
}
|
package/src/atoms/Tag.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
|
|
3
3
|
const ICON_SIZES = { xs: 8, sm: 10, md: 12, lg: 14 }
|
|
4
4
|
const PALETTE = new Set(['blue', 'teal', 'green', 'yellow', 'red', 'orange', 'purple'])
|
|
@@ -115,7 +115,7 @@ export default function Tag({
|
|
|
115
115
|
style={hue ? { ...style, '--kol-tag-hue': hue } : style}
|
|
116
116
|
onClick={onClick}
|
|
117
117
|
>
|
|
118
|
-
{icon && <
|
|
118
|
+
{icon && <IconLoader name={icon} size={iconSize} />}
|
|
119
119
|
<span>{hash && !float ? '#' : ''}{content}</span>
|
|
120
120
|
{count != null && <span className="kol-tag-count">{count}</span>}
|
|
121
121
|
{onRemove && (
|
|
@@ -125,7 +125,7 @@ export default function Tag({
|
|
|
125
125
|
className="kol-tag-dismiss"
|
|
126
126
|
onClick={handleRemove}
|
|
127
127
|
>
|
|
128
|
-
<
|
|
128
|
+
<IconLoader name="x" size={iconSize} />
|
|
129
129
|
</span>
|
|
130
130
|
)}
|
|
131
131
|
</Element>
|
package/src/atoms/Textarea.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Textarea — Multi-line text input. multi-line text atom built on the .kol-control shell with the
|
|
@@ -118,7 +118,7 @@ export default function Textarea({
|
|
|
118
118
|
window.addEventListener('pointerup', up)
|
|
119
119
|
}}
|
|
120
120
|
>
|
|
121
|
-
<
|
|
121
|
+
<IconLoader name="resize-grip" size={12} />
|
|
122
122
|
</span>
|
|
123
123
|
</label>
|
|
124
124
|
)
|
package/src/atoms/ValueField.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* ValueField — A read-only value in a field's capsule. `○ Open` (float-everything W3 row 45, 2026-11-04 — the
|
|
@@ -17,7 +17,7 @@ const H = { sm: 'h-[var(--kol-float-h-sm)] px-3 text-[length:var(--kol-float-t-s
|
|
|
17
17
|
export default function ValueField({ children, icon, prefix, size = 'md', className = '', ...rest }) {
|
|
18
18
|
return (
|
|
19
19
|
<span className={`inline-flex items-center gap-2 rounded-full bg-[var(--kol-float-well)] font-[family-name:var(--kol-font-family-float)] font-medium leading-none text-fg-emphasis ${H[size] ?? H.md} ${className}`.trim()} {...rest}>
|
|
20
|
-
{prefix ?? (icon && <
|
|
20
|
+
{prefix ?? (icon && <IconLoader name={icon} size={14} className="text-oq-64" />)}
|
|
21
21
|
{children}
|
|
22
22
|
</span>
|
|
23
23
|
)
|
package/src/atoms/ViewToggle.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
3
3
|
import { toneClass } from '../utilities/tone.js'
|
|
4
4
|
import { Tooltip } from '../utilities/Popover.jsx'
|
|
5
5
|
|
|
@@ -68,7 +68,7 @@ const ViewToggle = ({
|
|
|
68
68
|
aria-pressed={option.onClick && option.pressed == null ? undefined : active}
|
|
69
69
|
className={`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full transition-colors cursor-pointer kol-float-label font-medium ${active ? 'bg-fg-16 text-fg-emphasis' : 'text-fg-64 hover:bg-fg-08 hover:text-fg-emphasis'}`}
|
|
70
70
|
>
|
|
71
|
-
{option.icon ? <
|
|
71
|
+
{option.icon ? <IconLoader name={option.icon} size={16} variant={iconVariant} /> : option.label}
|
|
72
72
|
</button>
|
|
73
73
|
)
|
|
74
74
|
return option.icon ? <Tooltip key={option.value} label={option.label}>{button}</Tooltip> : button
|
|
@@ -142,7 +142,7 @@ const ViewToggle = ({
|
|
|
142
142
|
aria-pressed={option.onClick && option.pressed == null ? undefined : active}
|
|
143
143
|
>
|
|
144
144
|
{isIconVariant && option.icon ? (
|
|
145
|
-
<
|
|
145
|
+
<IconLoader name={option.icon} size={14} variant={iconVariant} />
|
|
146
146
|
) : (
|
|
147
147
|
option.label
|
|
148
148
|
)}
|
package/src/index.js
CHANGED
|
@@ -318,7 +318,7 @@ export { default as SpectrumGrid } from './organisms/SpectrumGrid.jsx'
|
|
|
318
318
|
export { default as Table } from './organisms/Table.jsx'
|
|
319
319
|
|
|
320
320
|
// loaders (re-export — infrastructure, documented on /docs/loaders)
|
|
321
|
-
export { Icon } from '@kolkrabbi/kol-icons'
|
|
321
|
+
export { IconLoader, Icon } from '@kolkrabbi/kol-icons' // Icon = IconLoader's deprecated alias (2026-11-08)
|
|
322
322
|
|
|
323
323
|
// graphics (SVG illustration loader — globs its own ./graphics/svg/**)
|
|
324
324
|
export { default as Graphic, GRAPHICS } from './graphics/Graphic.jsx'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRef, useState, useEffect, useLayoutEffect } from 'react'
|
|
2
2
|
import { DURATION } from '../utilities/motion.js'
|
|
3
3
|
import gsap from 'gsap'
|
|
4
|
-
import {
|
|
4
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
5
5
|
import { glyphSize } from '../hooks/glyphLadders.js'
|
|
6
6
|
import { Tooltip } from '../utilities/Popover.jsx'
|
|
7
7
|
|
|
@@ -168,11 +168,11 @@ export default function ActionButton({
|
|
|
168
168
|
const glyph = (
|
|
169
169
|
<span className="kol-action-glyph relative inline-grid place-items-center" style={{ width: glyphPx, height: glyphPx }}>
|
|
170
170
|
<span ref={restRef} className="inline-flex" style={{ gridArea: '1 / 1' }}>
|
|
171
|
-
<
|
|
171
|
+
<IconLoader name={icon} size={glyphPx} />
|
|
172
172
|
</span>
|
|
173
173
|
{confirmIcon && (
|
|
174
174
|
<span ref={onRef} className="inline-flex" style={{ gridArea: '1 / 1', opacity: 0 }}>
|
|
175
|
-
<
|
|
175
|
+
<IconLoader name={confirmIcon} size={glyphPx} />
|
|
176
176
|
</span>
|
|
177
177
|
)}
|
|
178
178
|
</span>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
import ButtonGroup from './ButtonGroup.jsx'
|
|
3
3
|
import { glyphSize } from '../hooks/glyphLadders.js'
|
|
4
4
|
|
|
@@ -54,7 +54,7 @@ export default function AlignmentGrid({ onAlign, items = ALIGN_BUTTONS, size = '
|
|
|
54
54
|
* ladder, never a number typed here */
|
|
55
55
|
options={cells.map((b) => ({
|
|
56
56
|
value: `${b.axis}-${b.mode}`,
|
|
57
|
-
label: <
|
|
57
|
+
label: <IconLoader name={b.icon} size={glyphSize(size)} />,
|
|
58
58
|
ariaLabel: b.title,
|
|
59
59
|
}))}
|
|
60
60
|
onChange={(v) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useContext } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
3
3
|
import ActionButton from './ActionButton.jsx'
|
|
4
4
|
import { Tooltip } from '../utilities/Popover.jsx'
|
|
5
5
|
import { useModal } from './Modal.jsx'
|
|
@@ -43,7 +43,7 @@ export const useAsk = () => {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export const glyph = (name) => <
|
|
46
|
+
export const glyph = (name) => <IconLoader name={name} size={14} />
|
|
47
47
|
|
|
48
48
|
/* the plate's two actions, stacked over its padded height; a plate press never opens the card */
|
|
49
49
|
function AppPlate({ name, verbs, onSettings }) {
|
|
@@ -58,7 +58,7 @@ function AppPlate({ name, verbs, onSettings }) {
|
|
|
58
58
|
|
|
59
59
|
const placeholder = (
|
|
60
60
|
<div className="size-full flex items-center justify-center bg-oq-04 text-oq-24" aria-label="No preview yet">
|
|
61
|
-
<
|
|
61
|
+
<IconLoader name="image" size={24} />
|
|
62
62
|
</div>
|
|
63
63
|
)
|
|
64
64
|
|
|
@@ -101,7 +101,7 @@ export function useAppItem(variant, { title, verbs, download, menuItems, date, s
|
|
|
101
101
|
controlStart: mark?.icon ? (
|
|
102
102
|
<Tooltip label={mark.label}>
|
|
103
103
|
<span className="kol-media-control" role="img" aria-label={mark.label} style={{ cursor: 'default' }}>
|
|
104
|
-
<span className="kol-action-glyph inline-grid place-items-center" style={{ width: 20, height: 20 }}><
|
|
104
|
+
<span className="kol-action-glyph inline-grid place-items-center" style={{ width: 20, height: 20 }}><IconLoader name={mark.icon} size={20} /></span>
|
|
105
105
|
</span>
|
|
106
106
|
</Tooltip>
|
|
107
107
|
/* INSERT ON A CARD (StudioCreate's parts, 2026-10-24 — every card the same fields and icons, so a part keeps its plate):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Button from '../atoms/Button.jsx'
|
|
2
2
|
import IconFrame from '../atoms/IconFrame.jsx'
|
|
3
|
-
import {
|
|
3
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
4
4
|
import { glyphSize } from '../hooks/glyphLadders.js'
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -65,7 +65,7 @@ export default function CloseButton({ onClick, size = 'sm', label = 'Close', hov
|
|
|
65
65
|
if (!frame) {
|
|
66
66
|
return (
|
|
67
67
|
<button type="button" onClick={onClick} aria-label={label} className={`inline-flex shrink-0 items-center justify-center bg-transparent border-none p-0 cursor-pointer text-oq-96 ${className}`.trim()} {...rest}>
|
|
68
|
-
<
|
|
68
|
+
<IconLoader name="x" size={glyphSize(size, true)} />
|
|
69
69
|
</button>
|
|
70
70
|
)
|
|
71
71
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
3
3
|
import ColorSwatch from './ColorSwatch.jsx'
|
|
4
4
|
import Input from '../atoms/Input.jsx'
|
|
5
5
|
import { usePopover, PopoverPanel, Tooltip } from '../utilities/Popover.jsx'
|
|
@@ -164,7 +164,7 @@ export default function ColorInputRow({
|
|
|
164
164
|
locked ? 'opacity-100' : 'opacity-0 group-hover:opacity-100'
|
|
165
165
|
}`}
|
|
166
166
|
>
|
|
167
|
-
<
|
|
167
|
+
<IconLoader name={locked ? 'lock' : 'unlock'} size={12} />
|
|
168
168
|
</span>
|
|
169
169
|
</button>
|
|
170
170
|
</Tooltip>
|
|
@@ -2,7 +2,7 @@ import ContentMedia from './ContentMedia.jsx'
|
|
|
2
2
|
import ContentText from './ContentText.jsx'
|
|
3
3
|
import { useAppItem } from './AppItem.jsx'
|
|
4
4
|
import { toneClass } from '../utilities/tone.js'
|
|
5
|
-
import {
|
|
5
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* ContentRow — The row form of a content card. the row form of the content-card system: leading thumb (where
|
|
@@ -176,7 +176,7 @@ function ContentRowFloat({ title, url, href = url, external, onClick, className
|
|
|
176
176
|
<span className="kol-float-hint truncate text-fg-emphasis" style={{ fontSize: 13 }}>{title}</span>
|
|
177
177
|
{url && <span className="kol-float-timecode truncate text-fg-64" style={{ fontSize: 11 }}>{url}</span>}
|
|
178
178
|
</span>
|
|
179
|
-
<
|
|
179
|
+
<IconLoader name="arrow-upright" size={16} className="shrink-0 text-oq-64 group-hover:text-oq-96" />
|
|
180
180
|
</a>
|
|
181
181
|
)
|
|
182
182
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
import Tag from '../atoms/Tag.jsx'
|
|
3
3
|
|
|
4
4
|
/* taxonomy-ok: molecule — nests Tag (atom) + kol-icons' Icon. */
|
|
@@ -68,7 +68,7 @@ export default function DocFrontmatter({ metadata }) {
|
|
|
68
68
|
return (
|
|
69
69
|
<div key={key} className="flex items-baseline gap-4 py-1">
|
|
70
70
|
<span className="flex items-center gap-2 min-w-[120px] kol-helper-12 text-meta">
|
|
71
|
-
{icon && <
|
|
71
|
+
{icon && <IconLoader name={icon} size={14} className="text-oq-48" />}
|
|
72
72
|
{FIELD_LABELS[key] ?? humanise(key)}
|
|
73
73
|
</span>
|
|
74
74
|
<span className="flex-1 min-w-0 [overflow-wrap:anywhere] kol-mono-12 text-strong">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useLayoutEffect, useRef, useState } from 'react'
|
|
2
2
|
import { toneClass } from '../utilities/tone.js'
|
|
3
|
-
import {
|
|
3
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
4
4
|
import { MenuList } from './MenuList.jsx'
|
|
5
5
|
import { Menu } from './Menu.jsx'
|
|
6
6
|
import { glyphSize, indicatorSize } from '../hooks/glyphLadders.js'
|
|
@@ -247,7 +247,7 @@ const Dropdown = ({
|
|
|
247
247
|
/* the glyph comes from the SOLO ladder — an icon alone in a pinned
|
|
248
248
|
* square — never from a call-site number */
|
|
249
249
|
typeof iconOnly === 'string'
|
|
250
|
-
? <
|
|
250
|
+
? <IconLoader name={iconOnly} size={glyphSize(resolvedSize, true)} />
|
|
251
251
|
: iconOnly
|
|
252
252
|
) : (
|
|
253
253
|
<>
|
|
@@ -265,7 +265,7 @@ const Dropdown = ({
|
|
|
265
265
|
</span>
|
|
266
266
|
{/* chrome lives in .kol-dd-caret (trailing edge + open-state flip) —
|
|
267
267
|
* keyed off the trigger's data-state, no inline styles */}
|
|
268
|
-
<
|
|
268
|
+
<IconLoader name="chevron-down" size={float ? 'var(--kol-float-ic)' : indicatorSize(resolvedSize)} className="kol-dd-caret" />
|
|
269
269
|
</>
|
|
270
270
|
)}
|
|
271
271
|
{/* a consumer's own trigger mark — the tool-palette corner fold rides
|
|
@@ -301,7 +301,7 @@ const Dropdown = ({
|
|
|
301
301
|
label: option.icon ? (
|
|
302
302
|
<>
|
|
303
303
|
<span className="shrink-0 inline-flex items-center" style={{ marginRight: 'var(--kol-spacing-2)' }}>
|
|
304
|
-
<
|
|
304
|
+
<IconLoader name={option.icon} size={glyphSize(resolvedSize)} />
|
|
305
305
|
</span>
|
|
306
306
|
{option.label}
|
|
307
307
|
</>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* EmblaNav — THE prev/next pair for an embla carousel.
|
|
@@ -41,10 +41,10 @@ export default function EmblaNav({
|
|
|
41
41
|
className={`kol-embla-controls ${placement === 'inline' ? 'is-inline' : ''} ${className}`.trim()}
|
|
42
42
|
>
|
|
43
43
|
<button type="button" className={btn} aria-label={prevLabel} onClick={onPrev} disabled={!canPrev}>
|
|
44
|
-
<
|
|
44
|
+
<IconLoader name="chevron-left" size={size} />
|
|
45
45
|
</button>
|
|
46
46
|
<button type="button" className={btn} aria-label={nextLabel} onClick={onNext} disabled={!canNext}>
|
|
47
|
-
<
|
|
47
|
+
<IconLoader name="chevron-right" size={size} />
|
|
48
48
|
</button>
|
|
49
49
|
</div>
|
|
50
50
|
)
|
|
@@ -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 { usePopover, PopoverPanel } from '../utilities/Popover.jsx'
|
|
5
5
|
import Dropdown from './Dropdown.jsx'
|
|
@@ -92,7 +92,7 @@ export function StatusChip({ value, options = [], onChange, variant = 'neutral',
|
|
|
92
92
|
className={`inline-flex shrink-0 transition-transform duration-150${open ? ' rotate-180' : ''}`}
|
|
93
93
|
aria-hidden="true"
|
|
94
94
|
>
|
|
95
|
-
<
|
|
95
|
+
<IconLoader name="chevron-down" size={10} />
|
|
96
96
|
</span>
|
|
97
97
|
)}
|
|
98
98
|
</button>
|
|
@@ -124,7 +124,7 @@ export function StatusChip({ value, options = [], onChange, variant = 'neutral',
|
|
|
124
124
|
}}
|
|
125
125
|
/* check column always reserved — labels align whether or
|
|
126
126
|
* not a row carries the mark (reference grammar) */
|
|
127
|
-
leading={<span className="inline-flex w-4 justify-center">{val === value && <
|
|
127
|
+
leading={<span className="inline-flex w-4 justify-center">{val === value && <IconLoader name="check" size={12} />}</span>}
|
|
128
128
|
label={label}
|
|
129
129
|
/>
|
|
130
130
|
</li>
|
|
@@ -167,7 +167,7 @@ export default function FieldRow({
|
|
|
167
167
|
* + centred (frame 2026-08-09) */
|
|
168
168
|
className="flex h-18 w-34 items-center justify-center rounded border-0 bg-fg-04 text-oq-64 transition-colors duration-150 enabled:cursor-pointer enabled:hover:text-emphasis disabled:opacity-60"
|
|
169
169
|
>
|
|
170
|
-
<
|
|
170
|
+
<IconLoader name="plus" size={16} />
|
|
171
171
|
</button>
|
|
172
172
|
)
|
|
173
173
|
const fileEmpty = (
|
|
@@ -217,7 +217,7 @@ export default function FieldRow({
|
|
|
217
217
|
onClick={() => onChange(null)}
|
|
218
218
|
className="absolute top-1 right-1 inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-full border-0 kol-overlay-scrim text-white"
|
|
219
219
|
>
|
|
220
|
-
<
|
|
220
|
+
<IconLoader name="x" size={10} />
|
|
221
221
|
</button>
|
|
222
222
|
)}
|
|
223
223
|
</span>
|
|
@@ -236,7 +236,7 @@ export default function FieldRow({
|
|
|
236
236
|
onClick={() => onChange(null)}
|
|
237
237
|
className="inline-flex shrink-0 cursor-pointer border-0 bg-transparent p-0 text-oq-64 hover:text-emphasis"
|
|
238
238
|
>
|
|
239
|
-
<
|
|
239
|
+
<IconLoader name="x" size={12} />
|
|
240
240
|
</button>
|
|
241
241
|
)}
|
|
242
242
|
</span>
|