@kolkrabbi/kol-shell 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ContentFilters.jsx +24 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "KOL application shell — fixed 48px NavRail + AppShell layout root, PageShell/PageHeader scaffolds, ContentFilters catalog organism, GridCard, SettingsScaffold, WalkthroughPanel, ShortcutsOverlay. App chrome (kol-framework owns site chrome). Nav items, content, shortcuts and settings are consumer-injected. Sits above @kolkrabbi/kol-{theme,component,framework}.",
|
|
6
6
|
"license": "MIT",
|
package/src/ContentFilters.jsx
CHANGED
|
@@ -132,9 +132,12 @@ const ContentFilters = ({
|
|
|
132
132
|
})
|
|
133
133
|
}, [items, activeFilters, customFilterKeys, searchText, searchKeys])
|
|
134
134
|
|
|
135
|
-
//
|
|
136
|
-
//
|
|
137
|
-
//
|
|
135
|
+
// A group is a COLUMN: label on top, values beneath it — never label-left /
|
|
136
|
+
// values-right on one line (user ruling 2026-08-15, second QA round). The
|
|
137
|
+
// label wears the full strip idiom too — tracked `kol-helper-12` at the
|
|
138
|
+
// strip's rest ink — so a category header and the LIST/GRID items read as one
|
|
139
|
+
// family ("LIST GRID text has style, that style also on TAGS and any other
|
|
140
|
+
// filter category"). Rest ink, not active: the label is not interactive.
|
|
138
141
|
const renderFilterGroup = (group) => {
|
|
139
142
|
const prefix = `${group.key}:`
|
|
140
143
|
const selected = new Set(
|
|
@@ -144,15 +147,17 @@ const ContentFilters = ({
|
|
|
144
147
|
)
|
|
145
148
|
|
|
146
149
|
return (
|
|
147
|
-
<div key={group.key} className="flex
|
|
148
|
-
<h4 className="kol-helper-12 text-fg-
|
|
150
|
+
<div key={group.key} className="flex flex-col gap-3">
|
|
151
|
+
<h4 className="kol-helper-12 text-fg-32" style={{ letterSpacing: 1 }}>
|
|
152
|
+
{group.label}
|
|
153
|
+
</h4>
|
|
149
154
|
<TabStrip
|
|
150
155
|
options={group.values.map((v) => ({ value: v, label: v }))}
|
|
151
156
|
value={selected}
|
|
152
157
|
onChange={(v) => toggleFilter(group.key, v)}
|
|
153
158
|
size={12}
|
|
154
159
|
tracked
|
|
155
|
-
className="gap-4"
|
|
160
|
+
className="gap-4 flex-wrap"
|
|
156
161
|
/>
|
|
157
162
|
</div>
|
|
158
163
|
)
|
|
@@ -238,19 +243,25 @@ const ContentFilters = ({
|
|
|
238
243
|
|
|
239
244
|
<Divider className="mb-4" />
|
|
240
245
|
|
|
241
|
-
{/*
|
|
242
|
-
filter toggle is open), layout strip
|
|
243
|
-
|
|
244
|
-
|
|
246
|
+
{/* BELOW the divider: filter groups as left-aligned COLUMNS (only while
|
|
247
|
+
the filter toggle is open), layout strip RIGHT and ALWAYS visible.
|
|
248
|
+
`items-start` is load-bearing — it pins the strip to the label row, so
|
|
249
|
+
the strip and the group labels read as one line and the values hang
|
|
250
|
+
beneath. 0.1.1 read "at the divider level" as the header row above the
|
|
251
|
+
divider; the strip never belongs in the header
|
|
245
252
|
(ShellHeaderFilterRefinements, 2026-08-15). */}
|
|
246
253
|
{(layoutOptions || isExpanded) && (
|
|
247
|
-
<div className="flex items-
|
|
248
|
-
<div className="flex items-
|
|
254
|
+
<div className="flex items-start justify-between gap-16 mb-4">
|
|
255
|
+
<div className="flex items-start gap-16">
|
|
249
256
|
{isExpanded && filterGroups.map((group) => renderFilterGroup(group))}
|
|
250
257
|
{isExpanded && activeFilters.size > 0 && (
|
|
258
|
+
// Strip rest recipe, not its own ink — this button shares the line
|
|
259
|
+
// with the labels and values, and that line carries exactly TWO
|
|
260
|
+
// ink states (user ruling 2026-08-15: "we are not maintaining 3
|
|
261
|
+
// opacity states for one line in a component").
|
|
251
262
|
<button
|
|
252
263
|
onClick={clearAllFilters}
|
|
253
|
-
className="kol-helper-12 transition-colors underline text-fg-48"
|
|
264
|
+
className="kol-helper-12 transition-colors underline text-fg-32 hover:text-fg-48"
|
|
254
265
|
>
|
|
255
266
|
Clear all ({activeFilters.size})
|
|
256
267
|
</button>
|