@kolkrabbi/kol-component 0.44.1 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-component",
3
- "version": "0.44.1",
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 ViewToggle
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
@@ -138,15 +137,20 @@ const ContentFilters = ({
138
137
  * uppercase these themselves. */
139
138
  const renderFilterGroup = (group) => (
140
139
  <div key={group.key} className="flex flex-col gap-3">
141
- {/* The group label wears the layout strip's exact text treatment
142
- * `kol-helper-12` at 1px tracking so TAGS / TYPES and LIST / GRID read
143
- * as one family across the row (user ruling 2026-08-15: "LIST GRID text
144
- * has style, that style also on TAGS and any other filter category").
145
- * Rest ink, not active: the label is a heading, not a state. */}
146
- <h4 className="kol-helper-12 text-fg-32" style={{ letterSpacing: 1 }}>
140
+ {/* THE CATEGORY LABEL IS THE ACTIVE INK `kol-helper-12` at `text-fg-96`,
141
+ * the same full opacity a SELECTED layout item wears (user ruling
142
+ * 2026-08-15: "TAGS and other categories are ACTIVE state full opacity").
143
+ *
144
+ * Read the RENDER, not the default: the retired fork defaulted this to
145
+ * `text-fg-32` and kol-monitor overrode it per call site with
146
+ * `labelClassName="kol-helper-12 text-fg-96"` — so the fork's default was
147
+ * never what anyone looked at. No inline letter-spacing: the helper ramp
148
+ * carries its own, and the override the fork added was not in the
149
+ * rendered path either. */}
150
+ <h4 className="kol-helper-12 text-fg-96" style={{ textTransform: 'uppercase' }}>
147
151
  {group.label}
148
152
  </h4>
149
- <div className="flex flex-wrap gap-2">
153
+ <div className="flex flex-wrap gap-4">
150
154
  {group.values.map((value) => (
151
155
  <Tag
152
156
  key={value}
@@ -155,6 +159,7 @@ const ContentFilters = ({
155
159
  hash={false}
156
160
  active={activeFilters.has(`${group.key}:${value}`)}
157
161
  onClick={() => toggleFilter(group.key, value)}
162
+ className={activeFilters.has(`${group.key}:${value}`) ? 'text-fg-96' : 'text-fg-48'}
158
163
  >
159
164
  {value}
160
165
  </Tag>
@@ -187,7 +192,7 @@ const ContentFilters = ({
187
192
  aria-label="Toggle filters"
188
193
  style={{ background: 'transparent', border: 'none', cursor: 'pointer', color: 'inherit' }}
189
194
  >
190
- <IconSeam name="filter" size={20} />
195
+ <IconSeam name="filter" size={16} />
191
196
  </button>
192
197
  <div
193
198
  className="flex items-center justify-center rounded-sm cursor-pointer hover:bg-fg-04 transition-colors"
@@ -215,7 +220,7 @@ const ContentFilters = ({
215
220
  position: searchOpen ? 'absolute' : 'relative',
216
221
  }}
217
222
  >
218
- <IconSeam name="search" size={20} />
223
+ <IconSeam name="search" size={16} />
219
224
  </span>
220
225
  {searchOpen && (
221
226
  <input
@@ -250,16 +255,28 @@ const ContentFilters = ({
250
255
  {filteredItems.length} of {totalCount}
251
256
  </span>
252
257
  )}
253
- {/* View-mode toggle active = filled chip, inactive = bare text
254
- * (user ruling 2026-07-28, live look). ViewToggle's text variant IS
255
- * that pattern (kol-control--filled active / bare inactive). */}
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. */}
256
267
  {viewModeOptions && (
257
- <ViewToggle
258
- size="md"
259
- viewMode={viewMode}
260
- onViewChange={handleViewModeChange}
261
- options={viewModeOptions}
262
- />
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>
263
280
  )}
264
281
  </div>
265
282
  </div>
@@ -283,7 +300,7 @@ const ContentFilters = ({
283
300
  <button
284
301
  type="button"
285
302
  onClick={clearAllFilters}
286
- className="kol-helper-12 transition-colors underline text-fg-48"
303
+ className="kol-helper-12 transition-colors underline text-fg-32 hover:text-fg-48"
287
304
  style={{ background: 'transparent', border: 'none', cursor: 'pointer' }}
288
305
  >
289
306
  Clear all ({activeFilters.size})