@kolkrabbi/kol-component 0.368.0 → 0.369.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.368.0",
3
+ "version": "0.369.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-search": "^0.3.0",
36
- "@kolkrabbi/kol-growth": "^0.5.0",
37
- "@kolkrabbi/kol-markdown": "^0.2.0"
36
+ "@kolkrabbi/kol-markdown": "^0.2.0",
37
+ "@kolkrabbi/kol-growth": "^0.5.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@kolkrabbi/kol-icons": ">=0.69.0",
@@ -54,7 +54,7 @@ export default function ContextMenu({ menu, children, variant, className = '' })
54
54
  <Menu anchor={{ x: menu.x, y: menu.y }} open onOpenChange={(v) => { if (!v) menu.close() }} variant={variant} panelClassName={`min-w-44 ${className}`.trim()}>
55
55
  {/* Any click inside closes — a menu item that leaves the menu open after acting is the one interaction people
56
56
  * report as broken. Items keep their own onClick; this runs after it on the way up. */}
57
- <div onClick={menu.close} role="none" className="flex flex-col">
57
+ <div onClick={menu.close} role="none" className="flex flex-col gap-[var(--kol-spacing-0-5)]">
58
58
  {typeof children === 'function' ? children(menu.payload) : children}
59
59
  </div>
60
60
  </Menu>
@@ -334,7 +334,7 @@ const Dropdown = ({
334
334
  * not"*). One rule: an open dropdown has the line. */}
335
335
  <div className="kol-dd-div" />
336
336
 
337
- <div ref={listRef} className="kol-dd-list" role="listbox" aria-multiselectable={multiple || undefined} style={scale !== 1 ? { zoom: scale } : undefined}>
337
+ <div ref={listRef} className="kol-dd-list flex flex-col gap-[var(--kol-spacing-0-5)]" role="listbox" aria-multiselectable={multiple || undefined} style={scale !== 1 ? { zoom: scale } : undefined}>
338
338
  <MenuList items={items} dividerClassName="my-1" headingClassName={headingCls} />
339
339
  </div>
340
340
  </Menu>
@@ -58,7 +58,7 @@ export function MenuTrigger({ open = false, iconOnly, icon, iconComponent, varia
58
58
  }
59
59
 
60
60
  export const MenuPanel = ({ variant, sheet = false, className = '', children, ...rest }) => (
61
- <div className={`kol-menu-panel ${panelClass(variant, sheet)} ${className}`.replace(/\s+/g, ' ').trim()} {...rest}>{children}</div>
61
+ <div className={`kol-menu-panel flex flex-col gap-[var(--kol-spacing-0-5)] ${panelClass(variant, sheet)} ${className}`.replace(/\s+/g, ' ').trim()} {...rest}>{children}</div>
62
62
  )
63
63
 
64
64
  export { MenuLabel }
@@ -138,7 +138,7 @@ export function Menu({
138
138
  className={`kol-menu-panel${fused ? ' kol-menu-panel--fused' : ' w-max'} ${panelClass(variant, sheet)} ${panelClassName}`.replace(/\s+/g, ' ').trim()}
139
139
  style={{ ...ambient, ...(minWidth ? { minWidth } : null), ...panelStyle }}>
140
140
  {/* a row's click closes the menu (it bubbles from `[data-menu-item]`); a flyout row only toggles */}
141
- <div role="none" className="flex flex-col min-h-0" onClick={(e) => { if (closeOnSelect && e.target.closest('[data-menu-item]')) setOpen(false) }}>
141
+ <div role="none" className="flex flex-col gap-[var(--kol-spacing-0-5)] min-h-0" onClick={(e) => { if (closeOnSelect && e.target.closest('[data-menu-item]')) setOpen(false) }}>
142
142
  <MenuList items={items} search={search} variant={variant}>
143
143
  {typeof children === 'function' ? children({ close: () => setOpen(false) }) : children}
144
144
  </MenuList>
@@ -295,7 +295,7 @@ function MenuFlyoutNest({ prefix, iconLeft, label, disabled, scroll, rowClass, p
295
295
  <div
296
296
  ref={panel}
297
297
  role="menu"
298
- className={`absolute ${fit.flip ? 'right-full' : 'left-full'} flex flex-col w-max min-w-[180px] max-w-[320px] z-10 ${panelClassName ?? 'py-1 bg-surface-secondary rounded border border-oq-08 shadow-lg'} ${scroll ? 'max-h-[60vh] overflow-y-auto' : ''}`}
298
+ className={`absolute ${fit.flip ? 'right-full' : 'left-full'} flex flex-col gap-[var(--kol-spacing-0-5)] w-max min-w-[180px] max-w-[320px] z-10 ${panelClassName ?? 'py-1 bg-surface-secondary rounded border border-oq-08 shadow-lg'} ${scroll ? 'max-h-[60vh] overflow-y-auto' : ''}`}
299
299
  style={{ top: -5 + fit.dy, ...(fit.flip && panelStyle?.marginLeft != null ? { ...panelStyle, marginLeft: undefined, marginRight: panelStyle.marginLeft } : panelStyle) }}
300
300
  >
301
301
  {children}
@@ -444,7 +444,7 @@ export default function CommandOverlay({
444
444
  <div className="border-t border-fg-08 max-h-[70vh] overflow-y-auto" style={RULE}>{children}</div>
445
445
  ) : results.length > 0 && (
446
446
  /* FIXED BODY HEIGHT — the panel holds still while the list narrows. */
447
- <ul ref={listRef} id={listId} role="listbox" className="h-80 overflow-y-auto">
447
+ <ul ref={listRef} id={listId} role="listbox" className="flex h-80 flex-col gap-[var(--kol-spacing-0-5)] overflow-y-auto">
448
448
  {results.map((item, i) => {
449
449
  const heading = (item.group ?? '') !== (results[i - 1]?.group ?? '') || i === 0
450
450
  return (