@kolkrabbi/kol-shell 0.115.0 → 0.117.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 +6 -6
- package/src/MoreSheet.jsx +4 -3
- package/src/StudioDetail.jsx +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.117.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The application shell",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,19 +12,19 @@
|
|
|
12
12
|
"./src/*": "./src/*"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@kolkrabbi/kol-component": ">=0.
|
|
15
|
+
"@kolkrabbi/kol-component": ">=0.349.0",
|
|
16
16
|
"@kolkrabbi/kol-framework": ">=0.55.0",
|
|
17
|
-
"@kolkrabbi/kol-icons": ">=0.
|
|
17
|
+
"@kolkrabbi/kol-icons": ">=0.61.1",
|
|
18
18
|
"@kolkrabbi/kol-theme": ">=0.215.0",
|
|
19
19
|
"gsap": "^3.13.0",
|
|
20
20
|
"react": "^18.3.0 || ^19.0.0",
|
|
21
21
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@kolkrabbi/kol-
|
|
24
|
+
"@kolkrabbi/kol-component": "^0.354.0",
|
|
25
|
+
"@kolkrabbi/kol-framework": "^0.73.0",
|
|
25
26
|
"@kolkrabbi/kol-icons": "^0.66.0",
|
|
26
|
-
"@kolkrabbi/kol-
|
|
27
|
-
"@kolkrabbi/kol-component": "^0.344.0"
|
|
27
|
+
"@kolkrabbi/kol-theme": "^0.216.1"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"src",
|
package/src/MoreSheet.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useContext, useEffect, useRef, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { Button, ModalHeader, usePopover, PopoverPanel } from '@kolkrabbi/kol-component'
|
|
3
3
|
import { Icon } from '@kolkrabbi/kol-icons'
|
|
4
4
|
|
|
5
5
|
/* the open level a row sits in (FloatMenu); null outside one, where a row's `sub` is ignored as before */
|
|
@@ -38,13 +38,14 @@ export default function MoreRows({ actions = [], items = [], active, onPick, ite
|
|
|
38
38
|
{actions.map((a) => {
|
|
39
39
|
/* a row with `sub` inside a FloatMenu opens its level instead of picking — the chevron at the row's end */
|
|
40
40
|
const nests = level && a.sub?.length > 0
|
|
41
|
+
/* the account row is the ModalHeader (menu-system W4.1) — avatar · title, pressable */
|
|
42
|
+
if (a.avatar && !nests) return <ModalHeader key={a.label} variant={float ? 'float' : 'default'} avatar={a.avatar} title={a.label} onClick={() => { onPick?.(a); a.onPress?.() }} />
|
|
41
43
|
return (
|
|
42
44
|
/* a nesting row draws its own glyph so the label can take the room between it and the chevron; 8 apart, as Button's */
|
|
43
|
-
<Button key={a.label} variant="nav" size="lg" iconLeft={a.checked === undefined && !
|
|
45
|
+
<Button key={a.label} variant="nav" size="lg" iconLeft={a.checked === undefined && !nests ? a.icon : undefined} iconSize={glyph}
|
|
44
46
|
className={rowCls} style={nests ? { gap: 8 } : undefined}
|
|
45
47
|
aria-haspopup={nests ? 'menu' : undefined} aria-expanded={nests ? level.isOpen(a) : undefined}
|
|
46
48
|
onClick={(e) => { if (nests) { level.open(a, e.currentTarget); return } onPick?.(a); a.onPress?.() }}>
|
|
47
|
-
{a.avatar && <Avatar src={a.avatar} alt="" size="xs" />}
|
|
48
49
|
{a.checked !== undefined && (
|
|
49
50
|
<span className="inline-flex items-center justify-center shrink-0" style={{ width: float ? 'var(--kol-float-ic)' : 22, height: float ? 'var(--kol-float-ic)' : 22 }}>{a.checked && <Icon name="check" size={22} />}</span>
|
|
50
51
|
)}
|
package/src/StudioDetail.jsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
2
|
import { Button, Divider, SectionText, useMediaQuery } from '@kolkrabbi/kol-component'
|
|
3
|
+
import { Icon } from '@kolkrabbi/kol-icons'
|
|
3
4
|
import PageShell from './PageShell.jsx'
|
|
4
5
|
|
|
5
6
|
/* taxonomy-ok: organism — nests PageShell (relative) + kol-component's SectionText, Divider, Button */
|
|
@@ -66,8 +67,9 @@ export default function StudioDetail({ back, title, subtitle, description, secti
|
|
|
66
67
|
<PageShell mode={narrow ? 'scroll' : 'fixed'} className={className}>
|
|
67
68
|
<SectionText
|
|
68
69
|
level="app"
|
|
69
|
-
/*
|
|
70
|
-
|
|
70
|
+
/* Back — a text link in the eyebrow, history back; from Create it returns there, from Library to Library.
|
|
71
|
+
* The chevron is an Icon at the text's size, never a glyph character */
|
|
72
|
+
eyebrow={<span onClick={goBack} className="kol-helper-12 text-fg-48 hover:text-fg-96 cursor-pointer select-none inline-flex items-center gap-1"><Icon name="chevron-left" size="1em" />{back?.label ?? 'Back'}</span>}
|
|
71
73
|
headline={title}
|
|
72
74
|
body={subtitle}
|
|
73
75
|
/>
|