@kolkrabbi/kol-component 0.12.8 → 0.12.10

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.12.8",
3
+ "version": "0.12.10",
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",
@@ -20,6 +20,7 @@ import { Icon } from '@kolkrabbi/kol-icons'
20
20
  * value; the SECOND is "on".
21
21
  */
22
22
  const ViewToggle = ({
23
+ size = 'sm',
23
24
  viewMode,
24
25
  onViewChange,
25
26
  variant = 'text',
@@ -75,8 +76,8 @@ const ViewToggle = ({
75
76
  * border-reveal hover. (Earlier ghost variant revealed an outline on
76
77
  * hover; that's deliberately gone.) */
77
78
  return isActive
78
- ? 'kol-control kol-control--filled kol-control-sm kol-mono-12'
79
- : 'kol-control kol-control-sm kol-mono-12 text-meta hover:text-emphasis'
79
+ ? `kol-control kol-control--filled kol-control-${size} kol-mono-${size === 'md' ? '14' : '12'}`
80
+ : `kol-control kol-control-${size} kol-mono-${size === 'md' ? '14' : '12'} text-meta hover:text-emphasis`
80
81
  }
81
82
 
82
83
  return (
@@ -27,6 +27,7 @@ const ContentFilters = ({
27
27
  items,
28
28
  title,
29
29
  totalCount,
30
+ titleIcon,
30
31
  filterGroups = [],
31
32
  renderItem,
32
33
  viewModeOptions,
@@ -120,7 +121,7 @@ const ContentFilters = ({
120
121
  const isActive = activeFilters.has(filterKey)
121
122
  return (
122
123
  <div key={value} onClick={() => toggleFilter(group.key, value)}>
123
- <Tag size="md" variant="default" hash={false} className={isActive ? 'border-fg-32' : 'border-fg-08'}>
124
+ <Tag size="sm" variant="default" hash={false} className={isActive ? 'border-fg-32' : 'border-fg-08'}>
124
125
  {value}
125
126
  </Tag>
126
127
  </div>
@@ -134,7 +135,7 @@ const ContentFilters = ({
134
135
  <div className="w-full" style={{ display: 'flex', flexDirection: 'column', flex: 1 }}>
135
136
  <div className="flex items-center justify-between mb-4">
136
137
  <div className="flex items-center gap-6">
137
- <h2 className="kol-helper-14">{title}</h2>
138
+ <h2 className="kol-helper-16 flex items-center gap-3">{titleIcon && <Icon name={titleIcon} size={20} />}{title}</h2>
138
139
  <div className="flex items-center gap-1">
139
140
  <button
140
141
  type="button"
@@ -209,6 +210,7 @@ const ContentFilters = ({
209
210
  * that pattern (kol-control--filled active / bare inactive). */}
210
211
  {viewModeOptions && (
211
212
  <ViewToggle
213
+ size="md"
212
214
  viewMode={viewMode}
213
215
  onViewChange={handleViewModeChange}
214
216
  options={viewModeOptions}