@kolkrabbi/kol-component 0.226.0 → 0.227.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.226.0",
3
+ "version": "0.227.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",
@@ -35,7 +35,7 @@
35
35
  "react-dom": "^18.3.0 || ^19.0.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@kolkrabbi/kol-icons": "^0.28.0"
38
+ "@kolkrabbi/kol-icons": "^0.29.0"
39
39
  },
40
40
  "files": [
41
41
  "src",
@@ -56,6 +56,9 @@ import { glyphSize } from '../hooks/glyphLadders.js'
56
56
  * iconLeft/prefix — the paint-bar anatomy ([swatch] FFFFFF is ONE
57
57
  * container, not two boxes; ColorSwatchFieldSizing 2026-08-12). The
58
58
  * consumer owns the node's sizing; the shell's padding frames it.
59
+ * slotRight — its trailing mirror: an interactive node inside the shell, after the unit /
60
+ * suffix — a combo field's chevron (the design editor's type size, 2026-09-27: the chevron
61
+ * sat OUTSIDE the field as a second control). Not aria-hidden: it is a control.
59
62
  *
60
63
  * Chrome (bg/border/padding/transition/disabled) comes from .kol-control;
61
64
  * Input owns prefix/suffix/icon layout + the inner <input> styling.
@@ -75,6 +78,7 @@ export default function Input({
75
78
  prefix,
76
79
  suffix,
77
80
  slotLeft,
81
+ slotRight,
78
82
  affordance,
79
83
  unit,
80
84
  iconLeft,
@@ -217,6 +221,9 @@ export default function Input({
217
221
  {suffix !== undefined && (
218
222
  <span aria-hidden="true" className="text-meta pl-1 shrink-0">{suffix}</span>
219
223
  )}
224
+ {slotRight && (
225
+ <span className="flex items-center shrink-0 pl-1 ml-auto">{slotRight}</span>
226
+ )}
220
227
  </label>
221
228
  )
222
229
  }
@@ -29,7 +29,8 @@
29
29
  * strip (canvas alignment, transform cluster); onChange is the
30
30
  * action dispatch.
31
31
  * onChange — handler (newValue) => void
32
- * options — [{ value, label, ariaLabel? }]
32
+ * options — [{ value, label, ariaLabel?, tooltip? }] — a cell whose label is not a string
33
+ * (a glyph) shows its `ariaLabel` as a KOL Tooltip; `tooltip` overrides it
33
34
  * variant — 'default' (shipped chrome: shared outer stroke + dividers,
34
35
  * filled active cell) | 'filled' (the state law's tiles: every
35
36
  * cell a surface-secondary tile with 1px transparent gaps, NO
@@ -53,6 +54,7 @@
53
54
  * className — additional classes on the outer shell
54
55
  */
55
56
  import { toneClass } from '../utilities/tone.js'
57
+ import { Tooltip } from '../utilities/Popover.jsx'
56
58
 
57
59
  export default function SegmentedToggle({ value, onChange, options = [], variant = 'default', size = 'md', tone = 'default', ariaLabel, className = '' }) {
58
60
  const cellType = { xs: 'kol-mono-8', sm: 'kol-mono-12', md: 'kol-mono-14', lg: 'kol-mono-16' }[size]
@@ -86,8 +88,8 @@ export default function SegmentedToggle({ value, onChange, options = [], variant
86
88
  {options.map((opt, i) => {
87
89
  const isActive = !stateless && opt.value === value
88
90
  return (
91
+ <Tooltip key={opt.value} asChild label={opt.tooltip ?? (typeof opt.label === 'string' ? null : opt.ariaLabel)}>
89
92
  <button
90
- key={opt.value}
91
93
  type="button"
92
94
  role={stateless ? undefined : 'radio'}
93
95
  aria-checked={stateless ? undefined : isActive}
@@ -98,6 +100,7 @@ export default function SegmentedToggle({ value, onChange, options = [], variant
98
100
  >
99
101
  {opt.label}
100
102
  </button>
103
+ </Tooltip>
101
104
  )
102
105
  })}
103
106
  </div>
@@ -18,12 +18,31 @@
18
18
  * declaring it — that is the upgrade path if a consumer ever needs the stack
19
19
  * to vary the rule per-gap. One prop is a smaller API than a new component.
20
20
  *
21
+ * `pane` (editor inspector rebuild, 2026-09-27 — user: "why are we not sectioning off the panes?
22
+ * saying 'this is type' 'this is transform'"): the Affinity panel shape instead of a labelled form
23
+ * group — a titled header strip, a padded body, and a FULL-WIDTH rule between panes. Mount panes
24
+ * in a container with no horizontal padding; each pane pads itself, so its rule runs edge to edge.
25
+ *
21
26
  * @param {ReactNode} label the group's name
22
27
  * @param {ReactNode} actions controls on the label's row, right-aligned
23
28
  * @param {boolean} divided a hairline between divided siblings
29
+ * @param {boolean} pane the panel shape: header strip + body, full-width rules between panes
24
30
  * @param {string} className
25
31
  */
26
- export default function InspectorSection({ label, actions = null, children, divided = false, className = '' }) {
32
+ export default function InspectorSection({ label, actions = null, children, divided = false, pane = false, className = '' }) {
33
+ if (pane) {
34
+ return (
35
+ <section className={`kol-inspector-pane ${className}`.trim()}>
36
+ {(label || actions) && (
37
+ <header className="kol-inspector-pane-head">
38
+ {label && <h3 className="kol-inspector-pane-title">{label}</h3>}
39
+ {actions}
40
+ </header>
41
+ )}
42
+ <div className="kol-inspector-pane-body">{children}</div>
43
+ </section>
44
+ )
45
+ }
27
46
  return (
28
47
  <div className={`flex flex-col gap-2${divided ? ' kol-section--divided' : ''} ${className}`}>
29
48
  {/* `actions` — controls on the label's row, right-aligned (Figma's eye / plus on Fill and
@@ -140,7 +140,7 @@ const SplitToolButton = ({
140
140
  popover={popover}
141
141
  panel={false}
142
142
  focus={false}
143
- className="w-max bg-surface-secondary border border-fg-08 rounded shadow-lg"
143
+ className="w-max bg-surface-secondary border border-oq-08 rounded shadow-lg"
144
144
  >
145
145
  {variants.map((variant) => {
146
146
  const isActive = active && variant.id === value
@@ -43,7 +43,7 @@ const ToolPalette = ({
43
43
  iconComponent = Icon,
44
44
  className = '',
45
45
  }) => (
46
- <div className={`flex items-center gap-1 min-w-0 overflow-x-auto ${className}`.trim()}>
46
+ <div className={`kol-tool-palette flex items-center gap-1 min-w-0 overflow-x-auto ${className}`.trim()}>
47
47
  {items.map((it, i) => {
48
48
  if (it.kind === 'divider') return <Divider key={`d${i}`} variant="vertical" height={20} className="mx-1.5 shrink-0" />
49
49
  if (it.kind === 'split') {