@kolkrabbi/kol-component 0.358.0 → 0.360.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.358.0",
3
+ "version": "0.360.0",
4
4
  "description": "The core component library",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,8 +33,8 @@
33
33
  "pdfjs-dist": "^6.3.289",
34
34
  "react-syntax-highlighter": "^16.1.1",
35
35
  "@kolkrabbi/kol-markdown": "^0.2.0",
36
- "@kolkrabbi/kol-search": "^0.3.0",
37
- "@kolkrabbi/kol-growth": "^0.5.0"
36
+ "@kolkrabbi/kol-growth": "^0.5.0",
37
+ "@kolkrabbi/kol-search": "^0.3.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@kolkrabbi/kol-icons": ">=0.68.0",
package/src/index.js CHANGED
@@ -279,8 +279,9 @@ export { default as SettingsPanel, LabeledControlSection, SettingsRow, SettingsS
279
279
  /* the settings BODY as data — one call for the page, the drawer and a sheet
280
280
  * (user 2026-09-03: "lets normalise a component they can grab") */
281
281
  export { default as SettingsSections } from './organisms/SettingsSections.jsx'
282
- /* the rail kit (RailKit, kol-monitor 2026-10-24): the parts a Rail's content is built from; RailSection and RailRow
283
- * are the settings rail's LabeledControlSection and SettingsRow under the kit's names — the same components */
282
+ /* the rail kit (RailKit, kol-monitor 2026-10-24): the parts a Rail's content is built from. Its sections and rows are
283
+ * LabeledControlSection and SettingsRow. @deprecated 2026-11-08: the RailSection / RailRow aliases below are retired by
284
+ * the user's ruling ("I always called it labeledControl and LabeledControlSection… I never approved the rename") */
284
285
  export { RailHeader, RailTabs, RailHint, RailActions, RailFoot, RailNav } from './organisms/RailKit.jsx'
285
286
  export { LabeledControlSection as RailSection, SettingsRow as RailRow } from './organisms/SettingsPanel.jsx'
286
287
  export { default as SectionNewsletter } from './organisms/SectionNewsletter.jsx'
@@ -38,9 +38,15 @@ const LABEL = 'text-[10px] leading-[12px] text-oq-64 font-(family-name:--kol-fon
38
38
  const MONO = 'font-(family-name:--kol-font-family-mono) text-[10px] leading-[12px] text-fg-96'
39
39
 
40
40
  /* a disabled control: a fieldset disables every input and button inside it natively */
41
- const Dim = ({ disabled, className = '', children, ...rest }) => (
41
+ /* `row`: a fixed-height field whose content is one centred row. A fieldset does not centre its flex children vertically
42
+ * (the slider and readout rode the top 16px of the 28px box — modal-system review 2026-11-08), so the row is an inner
43
+ * div the box's inner height. `h-full` does not resolve inside a fieldset (its content box is auto-height), so the row
44
+ * states it: 26 inside the bordered 28 field, 28 where the box has no border. */
45
+ const Dim = ({ disabled, className = '', row, children, ...rest }) => (
42
46
  <fieldset disabled={disabled || undefined} aria-disabled={disabled || undefined} {...rest}
43
- className={`min-w-0 m-0 p-0 ${className.includes('border-oq-16') ? '' : 'border-0'} ${disabled ? 'opacity-40' : ''} ${className}`.trim()}>{children}</fieldset>
47
+ className={`min-w-0 m-0 p-0 ${className.includes('border-oq-16') ? '' : 'border-0'} ${disabled ? 'opacity-40' : ''} ${className}`.trim()}>
48
+ {row ? <div className={`flex items-center ${className.includes('border-oq-16') ? 'h-[26px]' : 'h-7'} min-w-0 ${row}`}>{children}</div> : children}
49
+ </fieldset>
44
50
  )
45
51
 
46
52
  export function SettingsGroup({ title, note, ruled = true, className = '', children }) {
@@ -70,7 +76,7 @@ export function SettingsCell({ label, span = 1, disabled, className = '', childr
70
76
 
71
77
  export function SettingsSlider({ value, onChange, min = 0, max = 1, step = 0.01, format = (v) => String(v), disabled, 'aria-label': ariaLabel }) {
72
78
  return (
73
- <Dim disabled={disabled} className={`${FIELD} flex items-center gap-3 pl-[9px] pr-2`}>
79
+ <Dim disabled={disabled} className={FIELD} row="gap-3 pl-[9px] pr-2">
74
80
  <Slider variant="float" readout="none" value={value} onChange={onChange} min={min} max={max} step={step} disabled={disabled}
75
81
  aria-label={ariaLabel} className="flex-1 min-w-0 [&_.kol-slider-float]:h-4" />
76
82
  <span className={`${MONO} w-[52px] shrink-0 tabular-nums`}>{format(value)}</span>
@@ -81,7 +87,7 @@ export function SettingsSlider({ value, onChange, min = 0, max = 1, step = 0.01,
81
87
  export function SettingsRange({ value = [0, 1], onChange, min = 0, max = 1, step = 0.01, format = (v) => String(v), disabled, 'aria-label': ariaLabel }) {
82
88
  const [a, b] = value
83
89
  return (
84
- <Dim disabled={disabled} className={`${FIELD} flex items-center gap-2 px-2`}>
90
+ <Dim disabled={disabled} className={FIELD} row="gap-2 px-2">
85
91
  <span className={`${MONO} shrink-0 tabular-nums`}>{format(a)}</span>
86
92
  <Slider variant="dual" value={a} value2={b} min={min} max={max} step={step} aria-label={ariaLabel}
87
93
  onChange={(v) => onChange?.([Math.min(v, b), b])} onChange2={(v) => onChange?.([a, Math.max(v, a)])}
@@ -111,7 +117,7 @@ export function SettingsSegmented({ value, onChange, options = [], disabled, ari
111
117
 
112
118
  export function SettingsToggle({ label, checked, onChange, disabled }) {
113
119
  return (
114
- <Dim disabled={disabled} className="flex items-center gap-2 h-7">
120
+ <Dim disabled={disabled} className="h-7" row="gap-2">
115
121
  <ToggleSwitch checked={!!checked} onChange={onChange} aria-label={label} disabled={disabled} />
116
122
  {label && <span className={INK}>{label}</span>}
117
123
  </Dim>