@kolkrabbi/kol-component 0.44.2 → 0.45.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 +1 -1
- package/src/organisms/ContentFilters.jsx +27 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-component",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "KOL design-system components — atoms through organisms, emitting canonical kol-* classes. Pairs with @kolkrabbi/kol-theme for styling.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -3,7 +3,6 @@ import Tag from '../atoms/Tag.jsx'
|
|
|
3
3
|
import Divider from '../atoms/Divider.jsx'
|
|
4
4
|
import Button from '../atoms/Button.jsx'
|
|
5
5
|
import { Icon } from '@kolkrabbi/kol-icons'
|
|
6
|
-
import ViewToggle from '../atoms/ViewToggle'
|
|
7
6
|
import IconFrame from '../atoms/IconFrame.jsx'
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -19,7 +18,7 @@ import IconFrame from '../atoms/IconFrame.jsx'
|
|
|
19
18
|
* @param {number} props.totalCount — total count before filtering
|
|
20
19
|
* @param {Array} props.filterGroups — [{label, key, values}, ...]
|
|
21
20
|
* @param {Function} props.renderItem — (filteredItems, viewMode, layout) => ReactNode
|
|
22
|
-
* @param {Array} props.viewModeOptions — optional view mode options for
|
|
21
|
+
* @param {Array} props.viewModeOptions — optional view mode options for the view strip
|
|
23
22
|
* @param {string} props.defaultViewMode — default view mode (default: 'list')
|
|
24
23
|
* @param {Function} props.onFilterChange — optional callback when filters change
|
|
25
24
|
* @param {Array} props.mutuallyExclusiveFilters — filter keys that should be mutually exclusive
|
|
@@ -148,7 +147,9 @@ const ContentFilters = ({
|
|
|
148
147
|
* never what anyone looked at. No inline letter-spacing: the helper ramp
|
|
149
148
|
* carries its own, and the override the fork added was not in the
|
|
150
149
|
* rendered path either. */}
|
|
151
|
-
<h4 className="kol-helper-12 text-fg-96"
|
|
150
|
+
<h4 className="kol-helper-12 text-fg-96" style={{ textTransform: 'uppercase' }}>
|
|
151
|
+
{group.label}
|
|
152
|
+
</h4>
|
|
152
153
|
<div className="flex flex-wrap gap-4">
|
|
153
154
|
{group.values.map((value) => (
|
|
154
155
|
<Tag
|
|
@@ -191,7 +192,7 @@ const ContentFilters = ({
|
|
|
191
192
|
aria-label="Toggle filters"
|
|
192
193
|
style={{ background: 'transparent', border: 'none', cursor: 'pointer', color: 'inherit' }}
|
|
193
194
|
>
|
|
194
|
-
<IconSeam name="filter" size={
|
|
195
|
+
<IconSeam name="filter" size={16} />
|
|
195
196
|
</button>
|
|
196
197
|
<div
|
|
197
198
|
className="flex items-center justify-center rounded-sm cursor-pointer hover:bg-fg-04 transition-colors"
|
|
@@ -219,7 +220,7 @@ const ContentFilters = ({
|
|
|
219
220
|
position: searchOpen ? 'absolute' : 'relative',
|
|
220
221
|
}}
|
|
221
222
|
>
|
|
222
|
-
<IconSeam name="search" size={
|
|
223
|
+
<IconSeam name="search" size={16} />
|
|
223
224
|
</span>
|
|
224
225
|
{searchOpen && (
|
|
225
226
|
<input
|
|
@@ -254,16 +255,28 @@ const ContentFilters = ({
|
|
|
254
255
|
{filteredItems.length} of {totalCount}
|
|
255
256
|
</span>
|
|
256
257
|
)}
|
|
257
|
-
{/*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
258
|
+
{/* RECENT / SAVED is the SAME STRIP as LIST / GRID, not a ViewToggle.
|
|
259
|
+
* Read off kol-monitor's original (_tmp/2026-08-15-shell-adoption/
|
|
260
|
+
* ContentFilters.jsx:225-232): inline spans, `kol-helper-14`,
|
|
261
|
+
* uppercase + 1px tracking, `text-fg-96` active / `text-fg-32` rest.
|
|
262
|
+
* That file imports ViewToggle and never renders it for this.
|
|
263
|
+
*
|
|
264
|
+
* This REPLACES the filled-chip reading of the 2026-07-28 ruling on
|
|
265
|
+
* this surface — user ruling 2026-08-15: the fork's look, everywhere.
|
|
266
|
+
* One family across the whole row. */}
|
|
260
267
|
{viewModeOptions && (
|
|
261
|
-
<
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
268
|
+
<div className="flex items-center gap-4">
|
|
269
|
+
{viewModeOptions.map((opt) => (
|
|
270
|
+
<span
|
|
271
|
+
key={opt.value}
|
|
272
|
+
onClick={() => handleViewModeChange(opt.value)}
|
|
273
|
+
className={`kol-helper-14 cursor-pointer select-none ${viewMode === opt.value ? 'text-fg-96' : 'text-fg-32 hover:text-fg-48'}`}
|
|
274
|
+
style={{ textTransform: 'uppercase', letterSpacing: 1 }}
|
|
275
|
+
>
|
|
276
|
+
{opt.label}
|
|
277
|
+
</span>
|
|
278
|
+
))}
|
|
279
|
+
</div>
|
|
267
280
|
)}
|
|
268
281
|
</div>
|
|
269
282
|
</div>
|