@kolkrabbi/kol-component 0.12.19 → 0.13.1

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.19",
3
+ "version": "0.13.1",
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",
@@ -24,7 +24,7 @@
24
24
  "@floating-ui/react": "^0.27.19",
25
25
  "embla-carousel-react": "^8.6.0",
26
26
  "react-syntax-highlighter": "^16.1.1",
27
- "@kolkrabbi/kol-icons": "0.8.4"
27
+ "@kolkrabbi/kol-icons": "0.8.10"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "framer-motion": "^12.0.0",
@@ -1,16 +1,25 @@
1
1
  /**
2
- * Pill Component
2
+ * Pill — the STATIC chip: a label, category, or status word. Not clickable.
3
3
  *
4
- * Small badge/tag component for labels, categories, or status indicators
5
- * Uses existing pill classes from components.css (pill-outline, pill-subtle, pill-inverse)
4
+ * The chip family, so the right one gets reached for (documented at source,
5
+ * 2026-07-30):
6
+ * Pill — static label. No states, no handlers. THIS component.
7
+ * Tag — interactive/filterable. Its active/onClick/onRemove states are the
8
+ * whole point; a Tag with no handler is a Pill wearing the wrong name.
9
+ * Badge — system status or a count.
10
+ *
11
+ * Defaults follow the standing laws: `subtle` (nothing defaults to outline —
12
+ * outline needs a stated reason) and `sm` (chip law). Both were wrong until
13
+ * 2026-07-30 — the component defaulted outline/md, so every correct call site
14
+ * had to pass both props explicitly.
6
15
  *
7
16
  * @param {Object} props
8
17
  * @param {string} props.children - Text content of the pill
9
- * @param {string} props.variant - Visual variant: 'outline' | 'subtle' | 'inverse' (default: 'outline')
10
- * @param {string} props.size - Size variant: 'sm' | 'md' | 'lg' (default: 'md')
18
+ * @param {string} props.variant - Visual variant: 'subtle' | 'outline' | 'inverse' (default: 'subtle')
19
+ * @param {string} props.size - Size variant: 'sm' | 'md' | 'lg' (default: 'sm')
11
20
  * @param {string} props.className - Additional classes for customization
12
21
  */
13
- const Pill = ({ children, variant = 'outline', size = 'md', className = '' }) => {
22
+ const Pill = ({ children, variant = 'subtle', size = 'sm', className = '' }) => {
14
23
  const variantClasses = {
15
24
  outline: 'pill-outline',
16
25
  subtle: 'pill-subtle',
package/src/atoms/Tag.jsx CHANGED
@@ -3,19 +3,29 @@ import { Icon } from '@kolkrabbi/kol-icons'
3
3
  const ICON_SIZES = { sm: 10, md: 12, lg: 14 }
4
4
 
5
5
  /**
6
- * Tag — canonical (merged web rich + brand compat).
6
+ * Tag — the INTERACTIVE chip: filterable, selectable, removable.
7
7
  *
8
- * Web's rich API: variant (default/naked/inverse/solid), size, color, solid,
9
- * active, icon, onRemove, onClick. Plus:
8
+ * The chip family (documented at source, 2026-07-30):
9
+ * Pill — static label. No states, no handlers. Reach for this for decoration.
10
+ * Tag — interactive/filterable. THIS component. Its `active`/`onClick`/
11
+ * `onRemove` states are the point — a Tag with no handler renders a
12
+ * <span> and is a Pill wearing the wrong name.
13
+ * Badge — system status or a count.
14
+ *
15
+ * Canonical (merged web rich + brand compat). Web's rich API: variant
16
+ * (default/naked/inverse/solid), size, color, solid, active, icon, onRemove,
17
+ * onClick. Plus:
10
18
  * - `hash` (default true) — prepend `#` (web's tag style). Pass hash={false}
11
19
  * for plain labels (brand usage).
12
20
  * - `text` — content fallback when no children (brand SwatchControls passes text=).
21
+ *
22
+ * `size` defaults to `sm` per the chip law (2026-07-30, same pass as Pill).
13
23
  */
14
24
  export default function Tag({
15
25
  children,
16
26
  text,
17
27
  variant = 'default',
18
- size = 'md',
28
+ size = 'sm',
19
29
  color,
20
30
  solid = false,
21
31
  active = false,
@@ -3,6 +3,10 @@ import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'
3
3
  import { oneDark } from 'react-syntax-highlighter/dist/esm/styles/prism'
4
4
  import { Icon } from '@kolkrabbi/kol-icons'
5
5
 
6
+ /* taxonomy-ok: molecule — nests <Icon> from @kolkrabbi/kol-icons (the copy
7
+ * affordance). The gate only counts kol-component nesting, so a molecule whose
8
+ * only KOL child lives in a sibling package reads as an atom to it. */
9
+
6
10
  /**
7
11
  * CodeBlock — REPLICATED from the elder reference
8
12
  * (kol-website/packages/ui/src/molecules/CodeBlock.jsx, 2026-07-28 user