@cloudflare/kumo 2.9.2 → 2.10.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/ai/component-registry.json +110 -5
  3. package/ai/component-registry.md +90 -1
  4. package/ai/schemas.ts +13 -1
  5. package/dist/.build-complete +1 -1
  6. package/dist/ai/schemas.d.ts +58 -2
  7. package/dist/ai/schemas.js +42 -1
  8. package/dist/chunks/{combobox-m2nvbt0b1stb2syc.js → combobox-l4pucshucau0qvrl.js} +18 -11
  9. package/dist/chunks/{pagination-k0yll9ynbi8flc3b.js → pagination-bya4kmtn4rqbexjb.js} +1 -1
  10. package/dist/chunks/{select-ln6ibqbbs0n4tiig.js → select-cqgxro9via28v4u8.js} +22 -19
  11. package/dist/chunks/{sidebar-kvjzu0ya0b2z6eec.js → sidebar-c5otog7ms7rb19cr.js} +15 -6
  12. package/dist/chunks/{tabs-fww6z6ws987yd0kw.js → tabs-n7bpptah74dbh8kw.js} +21 -11
  13. package/dist/chunks/{toolbar-gwd1orc8yl7lzaou.js → toolbar-o25cb9lcznranewe.js} +20 -27
  14. package/dist/components/combobox.d.ts +1 -1
  15. package/dist/components/combobox.js +1 -1
  16. package/dist/components/pagination.js +1 -1
  17. package/dist/components/select.d.ts +1 -1
  18. package/dist/components/select.js +1 -1
  19. package/dist/components/sidebar.js +1 -1
  20. package/dist/components/tabs.d.ts +1 -1
  21. package/dist/components/tabs.js +1 -1
  22. package/dist/components/toolbar.d.ts +1 -1
  23. package/dist/components/toolbar.js +1 -1
  24. package/dist/{index-DUCaDjfd.d.ts → index-Bw3M24Mi.d.ts} +11 -2
  25. package/dist/{index-FZvrMcIo2.d.ts → index-CaoLMX-b2.d.ts} +3 -1
  26. package/dist/{index-B6LJIy7_2.d.ts → index-DTjmw8Vy2.d.ts} +7 -1
  27. package/dist/{index-C3iraF8M2.d.ts → index-FCkuxSvs2.d.ts} +5 -0
  28. package/dist/index.d.ts +4 -4
  29. package/dist/index.js +6 -6
  30. package/dist/styles/kumo-standalone.css +1 -1
  31. package/package.json +1 -1
  32. package/scripts/component-registry/index.ts +71 -1
@@ -87,7 +87,7 @@ function renderOptionsFromItems(items) {
87
87
  * </Select>
88
88
  * ```
89
89
  */
90
- function Select({ children, className, renderValue, label, hideLabel, placeholder, loading, size = KUMO_SELECT_DEFAULT_VARIANTS.size, labelTooltip, description, error, required, container: containerProp, ...props }) {
90
+ function Select({ children, className, render, renderValue, label, hideLabel, placeholder, loading, size = KUMO_SELECT_DEFAULT_VARIANTS.size, labelTooltip, description, error, required, container: containerProp, ...props }) {
91
91
  const labelId = useId();
92
92
  const contextContainer = usePortalContainer();
93
93
  const container = containerProp ?? contextContainer ?? void 0;
@@ -121,30 +121,33 @@ function Select({ children, className, renderValue, label, hideLabel, placeholde
121
121
  children: label
122
122
  })
123
123
  }) : null;
124
+ const selectTrigger = /* @__PURE__ */ jsxs(SelectTrigger, {
125
+ "data-kumo-component": "Select",
126
+ "data-kumo-part": "trigger",
127
+ render,
128
+ className: cn(selectVariants({ size }), props.disabled && "cursor-not-allowed opacity-50", error && "!ring-kumo-danger focus:ring-[1.5px] focus:ring-kumo-danger/50", className),
129
+ "aria-label": triggerAriaLabel,
130
+ "aria-labelledby": triggerLabelledBy,
131
+ children: [loading ? /* @__PURE__ */ jsx(SkeletonLine, { className: "w-32" }) : /* @__PURE__ */ jsx(SelectValue, {
132
+ placeholder,
133
+ className: "min-w-0 truncate data-[placeholder]:text-kumo-placeholder",
134
+ children: valueChildrenFn
135
+ }), /* @__PURE__ */ jsx(SelectIcon, {
136
+ className: cn("flex shrink-0 items-center", triggerIconStyles[size].className),
137
+ children: /* @__PURE__ */ jsx(CaretUpDownIcon, {
138
+ size: triggerIconStyles[size].iconSize,
139
+ className: "fill-current"
140
+ })
141
+ })]
142
+ });
124
143
  const selectControl = /* @__PURE__ */ jsxs(SelectRoot, {
125
144
  ...baseProps,
126
145
  items: normalizedItems,
127
146
  disabled: loading || props.disabled,
147
+ required,
128
148
  children: [
129
149
  selectLabelNode,
130
- /* @__PURE__ */ jsxs(SelectTrigger, {
131
- "data-kumo-component": "Select",
132
- "data-kumo-part": "trigger",
133
- className: cn(selectVariants({ size }), props.disabled && "cursor-not-allowed opacity-50", error && "!ring-kumo-danger focus:ring-[1.5px] focus:ring-kumo-danger/50", className),
134
- "aria-label": triggerAriaLabel,
135
- "aria-labelledby": triggerLabelledBy,
136
- children: [loading ? /* @__PURE__ */ jsx(SkeletonLine, { className: "w-32" }) : /* @__PURE__ */ jsx(SelectValue, {
137
- placeholder,
138
- className: "min-w-0 truncate data-[placeholder]:text-kumo-placeholder",
139
- children: valueChildrenFn
140
- }), /* @__PURE__ */ jsx(SelectIcon, {
141
- className: cn("flex shrink-0 items-center", triggerIconStyles[size].className),
142
- children: /* @__PURE__ */ jsx(CaretUpDownIcon, {
143
- size: triggerIconStyles[size].iconSize,
144
- className: "fill-current"
145
- })
146
- })]
147
- }),
150
+ selectTrigger,
148
151
  /* @__PURE__ */ jsx(SelectPortal, {
149
152
  container,
150
153
  children: /* @__PURE__ */ jsx(SelectPositioner, { children: /* @__PURE__ */ jsx(SelectPopup, {
@@ -249,6 +249,7 @@ const SidebarRoot = forwardRef(({ className, contentClassName, children, fullScr
249
249
  const triggerRef = useRef(null);
250
250
  const mobileNodeRef = useRef(null);
251
251
  const shouldRestoreFocusRef = useRef(false);
252
+ const isPointerInPeekZoneRef = useRef(false);
252
253
  useEffect(() => {
253
254
  if (!isMobile || !openMobile) return;
254
255
  const handleKeyDown = (e) => {
@@ -281,7 +282,15 @@ const SidebarRoot = forwardRef(({ className, contentClassName, children, fullScr
281
282
  }
282
283
  }, [isMobile, openMobile]);
283
284
  const handlePeekBlur = useCallback((e) => {
284
- if (!e.currentTarget.contains(e.relatedTarget)) stopPeek();
285
+ if (!e.currentTarget.contains(e.relatedTarget) && !isPointerInPeekZoneRef.current) stopPeek();
286
+ }, [stopPeek]);
287
+ const handlePeekMouseEnter = useCallback(() => {
288
+ isPointerInPeekZoneRef.current = true;
289
+ startPeek();
290
+ }, [startPeek]);
291
+ const handlePeekMouseLeave = useCallback(() => {
292
+ isPointerInPeekZoneRef.current = false;
293
+ stopPeek();
285
294
  }, [stopPeek]);
286
295
  if (collapsible === "none") return /* @__PURE__ */ jsx("aside", {
287
296
  ref,
@@ -350,8 +359,8 @@ const SidebarRoot = forwardRef(({ className, contentClassName, children, fullScr
350
359
  children: [/* @__PURE__ */ jsx("div", {
351
360
  "data-sidebar": "peek-zone",
352
361
  className: "flex min-h-0 flex-1 flex-col",
353
- onMouseEnter: startPeek,
354
- onMouseLeave: stopPeek,
362
+ onMouseEnter: handlePeekMouseEnter,
363
+ onMouseLeave: handlePeekMouseLeave,
355
364
  onFocus: startPeek,
356
365
  onBlur: handlePeekBlur,
357
366
  children: nonFooterChildren
@@ -404,7 +413,7 @@ const SidebarContent = forwardRef(({ className, children, ...props }, ref) => /*
404
413
  })
405
414
  }), /* @__PURE__ */ jsx(ScrollAreaScrollbar, {
406
415
  orientation: "vertical",
407
- className: cn("flex w-1.5 touch-none p-px select-none", "opacity-0 transition-opacity duration-150", "data-[hovering]:opacity-100 data-[scrolling]:opacity-100"),
416
+ className: cn("flex w-1.5 touch-none p-px select-none", "opacity-0 transition-opacity duration-150", "data-[hovering]:opacity-100 data-[scrolling]:opacity-100", "group-data-[state=collapsed]/sidebar:hidden"),
408
417
  children: /* @__PURE__ */ jsx(ScrollAreaThumb, { className: "flex-1 rounded-full bg-kumo-line" })
409
418
  })]
410
419
  }));
@@ -625,6 +634,7 @@ const SidebarMenuButton = forwardRef(({ className, icon: IconProp, active = fals
625
634
  let button;
626
635
  if (href) button = /* @__PURE__ */ jsx(LinkComponent, {
627
636
  ref,
637
+ ...props,
628
638
  className: cn(buttonClasses, "no-underline!"),
629
639
  href,
630
640
  to: href,
@@ -634,7 +644,6 @@ const SidebarMenuButton = forwardRef(({ className, icon: IconProp, active = fals
634
644
  "data-kumo-component": "Sidebar",
635
645
  "data-kumo-part": "menu-button-link",
636
646
  "data-size": size,
637
- onClick: props.onClick,
638
647
  children: content
639
648
  });
640
649
  else button = /* @__PURE__ */ jsx("button", {
@@ -750,6 +759,7 @@ const SidebarMenuSubButton = forwardRef(({ className, active = false, href, targ
750
759
  let button;
751
760
  if (href) button = /* @__PURE__ */ jsx(LinkComponent, {
752
761
  ref,
762
+ ...props,
753
763
  className: cn(buttonClasses, "no-underline!"),
754
764
  href,
755
765
  to: href,
@@ -758,7 +768,6 @@ const SidebarMenuSubButton = forwardRef(({ className, active = false, href, targ
758
768
  "data-sidebar": "menu-sub-button",
759
769
  "data-kumo-component": "Sidebar",
760
770
  "data-kumo-part": "menu-sub-button-link",
761
- onClick: props.onClick,
762
771
  children: content
763
772
  });
764
773
  else button = /* @__PURE__ */ jsx("button", {
@@ -2,7 +2,7 @@
2
2
  import { t as cn } from "./vendor-styling-da1xibnxfkjmtglr.js";
3
3
  import { i as TabsRoot, n as TabsIndicator, r as TabsTab, t as TabsList } from "./TabsList-obzldrvfzo50uqr4.js";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
- import { useEffect, useRef, useState } from "react";
5
+ import { useEffect, useLayoutEffect, useRef, useState } from "react";
6
6
  //#region src/components/tabs/tabs.tsx
7
7
  const KUMO_TABS_DEFAULT_VARIANTS = {
8
8
  variant: "segmented",
@@ -42,7 +42,7 @@ function Tabs({ tabs, value, selectedValue, onValueChange, activateOnFocus, clas
42
42
  ...DEFAULT_LABELS,
43
43
  ...labelsProp
44
44
  };
45
- const { ref: listRef, isOverflowing, canScrollStart, canScrollEnd } = useOverflowDetect(true);
45
+ const { ref: listRef, isOverflowing, canScrollStart, canScrollEnd } = useOverflowDetect(true, items.map((item) => item.value).join("|"));
46
46
  const bindDrag = useHorizontalDragScroll(listRef, isOverflowing);
47
47
  return /* @__PURE__ */ jsxs(TabsRoot, {
48
48
  ...rootProps,
@@ -65,6 +65,7 @@ function Tabs({ tabs, value, selectedValue, onValueChange, activateOnFocus, clas
65
65
  "data-kumo-part": "tab",
66
66
  value: tab.value,
67
67
  render: tab.render,
68
+ nativeButton: tab.nativeButton,
68
69
  onClick: (e) => {
69
70
  e.currentTarget.scrollIntoView({
70
71
  behavior: "smooth",
@@ -211,26 +212,25 @@ function useHorizontalDragScroll(ref, enabled) {
211
212
  * Returns a ref to attach and a boolean for conditional rendering.
212
213
  * The `data-overflowing` attribute drives the scroll-fade CSS.
213
214
  */
214
- function useOverflowDetect(enabled) {
215
+ function useOverflowDetect(enabled, watchKey) {
215
216
  const ref = useRef(null);
216
217
  const [overflowState, setOverflowState] = useState({
217
218
  isOverflowing: false,
218
219
  canScrollStart: false,
219
220
  canScrollEnd: false
220
221
  });
222
+ useLayoutEffect(() => {
223
+ if (!enabled) return;
224
+ const el = ref.current;
225
+ if (!el) return;
226
+ setOverflowState((prevState) => getNextOverflowState(el, prevState));
227
+ }, [enabled, watchKey]);
221
228
  useEffect(() => {
222
229
  if (!enabled) return;
223
230
  const el = ref.current;
224
231
  if (!el) return;
225
232
  const check = () => {
226
- const maxScrollLeft = Math.max(0, el.scrollWidth - el.clientWidth);
227
- const scrollLeft = Math.min(Math.max(0, el.scrollLeft), maxScrollLeft);
228
- const nextState = {
229
- isOverflowing: maxScrollLeft > 1,
230
- canScrollStart: scrollLeft > 1,
231
- canScrollEnd: maxScrollLeft - scrollLeft > 1
232
- };
233
- setOverflowState((prevState) => prevState.isOverflowing === nextState.isOverflowing && prevState.canScrollStart === nextState.canScrollStart && prevState.canScrollEnd === nextState.canScrollEnd ? prevState : nextState);
233
+ setOverflowState((prevState) => getNextOverflowState(el, prevState));
234
234
  };
235
235
  const ro = new ResizeObserver(check);
236
236
  ro.observe(el);
@@ -253,5 +253,15 @@ function useOverflowDetect(enabled) {
253
253
  ...overflowState
254
254
  };
255
255
  }
256
+ function getNextOverflowState(el, prevState) {
257
+ const maxScrollLeft = Math.max(0, el.scrollWidth - el.clientWidth);
258
+ const scrollLeft = Math.min(Math.max(0, el.scrollLeft), maxScrollLeft);
259
+ const nextState = {
260
+ isOverflowing: maxScrollLeft > 1,
261
+ canScrollStart: scrollLeft > 1,
262
+ canScrollEnd: maxScrollLeft - scrollLeft > 1
263
+ };
264
+ return prevState.isOverflowing === nextState.isOverflowing && prevState.canScrollStart === nextState.canScrollStart && prevState.canScrollEnd === nextState.canScrollEnd ? prevState : nextState;
265
+ }
256
266
  //#endregion
257
267
  export { Tabs as t };
@@ -7,6 +7,7 @@ import { n as ToolbarButton, r as ToolbarRoot, t as ToolbarInput } from "./Toolb
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  import React, { Children, cloneElement, createContext, isValidElement } from "react";
9
9
  //#region src/components/toolbar/toolbar.tsx
10
+ /** @deprecated Toolbar size customization is deprecated. Omit `size` to use the default base size. */
10
11
  const KUMO_TOOLBAR_VARIANTS = { size: {
11
12
  xs: {
12
13
  classes: "text-xs",
@@ -25,20 +26,16 @@ const KUMO_TOOLBAR_VARIANTS = { size: {
25
26
  description: "Large toolbar for prominent controls"
26
27
  }
27
28
  } };
29
+ /** @deprecated Toolbar size customization is deprecated. Omit `size` to use the default base size. */
28
30
  const KUMO_TOOLBAR_DEFAULT_VARIANTS = { size: "base" };
29
31
  const ToolbarSizeContext = createContext({ size: KUMO_TOOLBAR_DEFAULT_VARIANTS.size });
30
- function toolbarControlClassName(className) {
31
- return cn("relative min-w-0 border-0 bg-transparent shadow-none ring-0 focus-within:z-2 focus:z-2 focus-visible:z-2", "rounded-none first:rounded-l-lg last:rounded-r-lg only:rounded-lg", "not-first:border-l not-first:border-kumo-line", "focus:ring-[1.5px] focus:ring-kumo-focus/50 focus-visible:ring-2 focus-visible:ring-kumo-brand", className);
32
- }
33
- /**
34
- * Groups toolbar controls into one compact card with shared sizing and internal
35
- * separators.
36
- */
32
+ const TOOLBAR_CONTROL_STYLES = cn("relative min-w-0 rounded-none border-0 bg-transparent shadow-none ring-0", "focus-within:z-2 focus:z-2 focus-visible:z-2 has-[:focus-visible]:z-2");
33
+ /** Groups toolbar controls into one compact card. */
37
34
  const Root = React.forwardRef(({ children, className, size = KUMO_TOOLBAR_DEFAULT_VARIANTS.size, ...props }, ref) => {
38
35
  return /* @__PURE__ */ jsx(ToolbarRoot, {
39
36
  ref,
40
37
  "data-kumo-component": "Toolbar",
41
- className: cn("inline-flex w-fit items-stretch rounded-lg bg-kumo-control shadow-xs ring ring-kumo-line", KUMO_TOOLBAR_VARIANTS.size[size].classes, className),
38
+ className: cn("inline-flex w-fit items-stretch rounded-lg bg-kumo-control shadow-xs ring ring-kumo-line", "[&>*:first-child]:rounded-l-lg [&>*:not([aria-hidden='true']):not([type='hidden']):not(:has(~_:not([aria-hidden='true']):not([type='hidden'])))]:rounded-r-lg", "[&>*_[data-kumo-toolbar-input]:focus]:rounded-[inherit]", "[&>*:not([aria-hidden='true']):not(:first-child)]:border-l [&>*:not([aria-hidden='true']):not(:first-child)]:border-kumo-line", KUMO_TOOLBAR_VARIANTS.size[size].classes, className),
42
39
  ...props,
43
40
  children: /* @__PURE__ */ jsx(ToolbarSizeContext.Provider, {
44
41
  value: { size },
@@ -51,34 +48,29 @@ const Button = React.forwardRef(({ children, className, disabled, loading, shape
51
48
  const toolbar = React.useContext(ToolbarSizeContext);
52
49
  const resolvedShape = shape ?? (children == null && IconComponent ? "square" : "base");
53
50
  const ariaLabel = props["aria-label"];
54
- const button = resolvedShape === "base" ? /* @__PURE__ */ jsx(Button$1, {
55
- className: toolbarControlClassName(className),
51
+ const buttonProps = {
56
52
  disabled,
57
- icon: IconComponent,
58
53
  loading,
59
- shape: "base",
54
+ icon: IconComponent,
60
55
  size: toolbar.size,
61
56
  type: type ?? "button",
62
- variant: "ghost",
63
- children
57
+ variant: "ghost"
58
+ };
59
+ const button = resolvedShape === "base" ? /* @__PURE__ */ jsx(Button$1, {
60
+ shape: "base",
61
+ ...buttonProps
64
62
  }) : /* @__PURE__ */ jsx(Button$1, {
65
63
  "aria-label": ariaLabel,
66
- className: toolbarControlClassName(className),
67
- disabled,
68
- icon: IconComponent,
69
- loading,
70
64
  shape: resolvedShape,
71
- size: toolbar.size,
72
- type: type ?? "button",
73
- variant: "ghost",
74
- children
65
+ ...buttonProps
75
66
  });
76
67
  return /* @__PURE__ */ jsx(ToolbarButton, {
77
68
  ref,
78
69
  "data-kumo-component": "Toolbar.Button",
79
- disabled: loading || disabled,
70
+ className: cn(className, TOOLBAR_CONTROL_STYLES),
80
71
  render: button,
81
- ...props
72
+ ...props,
73
+ children
82
74
  });
83
75
  });
84
76
  Button.displayName = "Toolbar.Button";
@@ -88,11 +80,12 @@ const Input = React.forwardRef(({ className, style, ...props }, ref) => {
88
80
  ref,
89
81
  "data-kumo-component": "Toolbar.Input",
90
82
  render: /* @__PURE__ */ jsx(Input$1, {
91
- className: typeof className === "function" ? (state) => toolbarControlClassName(className(state)) : toolbarControlClassName(className),
83
+ className: typeof className === "function" ? (state) => cn(className(state), TOOLBAR_CONTROL_STYLES) : cn(className, TOOLBAR_CONTROL_STYLES),
92
84
  size: toolbar.size,
93
85
  style
94
86
  }),
95
- ...props
87
+ ...props,
88
+ "data-kumo-toolbar-input": ""
96
89
  });
97
90
  });
98
91
  Input.displayName = "Toolbar.Input";
@@ -110,7 +103,7 @@ const InputGroupRoot = React.forwardRef(({ children, className, ...props }, ref)
110
103
  });
111
104
  return /* @__PURE__ */ jsx(InputGroup, {
112
105
  ref,
113
- className: toolbarControlClassName(className),
106
+ className: cn(TOOLBAR_CONTROL_STYLES, className),
114
107
  size: toolbar.size,
115
108
  ...props,
116
109
  children: toolbarChildren
@@ -1,2 +1,2 @@
1
- import { i as ComboboxProps, n as Combobox, r as ComboboxInputSide, t as ComboboxFilter } from "../index-DUCaDjfd.js";
1
+ import { i as ComboboxProps, n as Combobox, r as ComboboxInputSide, t as ComboboxFilter } from "../index-Bw3M24Mi.js";
2
2
  export { Combobox, type ComboboxFilter, type ComboboxInputSide, type ComboboxProps };
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { t as Combobox } from "../chunks/combobox-m2nvbt0b1stb2syc.js";
2
+ import { t as Combobox } from "../chunks/combobox-l4pucshucau0qvrl.js";
3
3
  export { Combobox };
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { t as Pagination } from "../chunks/pagination-k0yll9ynbi8flc3b.js";
2
+ import { t as Pagination } from "../chunks/pagination-bya4kmtn4rqbexjb.js";
3
3
  export { Pagination };
@@ -1,2 +1,2 @@
1
- import { t as Select } from "../index-FZvrMcIo2.js";
1
+ import { t as Select } from "../index-CaoLMX-b2.js";
2
2
  export { Select };
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { t as Select } from "../chunks/select-ln6ibqbbs0n4tiig.js";
2
+ import { t as Select } from "../chunks/select-cqgxro9via28v4u8.js";
3
3
  export { Select };
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { A as useSidebar, C as SidebarRail, D as SidebarSlidingView, E as SidebarSeparator, O as SidebarSlidingViews, S as SidebarProvider, T as SidebarRoot, _ as SidebarMenuChevron, a as SidebarCollapsible, b as SidebarMenuSubButton, c as SidebarContent, d as SidebarGroupLabel, f as SidebarHeader, g as SidebarMenuButton, h as SidebarMenuBadge, i as Sidebar, k as SidebarTrigger, l as SidebarFooter, m as SidebarMenu, n as KUMO_SIDEBAR_STYLING, o as SidebarCollapsibleContent, p as SidebarLoading, r as KUMO_SIDEBAR_VARIANTS, s as SidebarCollapsibleTrigger, t as KUMO_SIDEBAR_DEFAULT_VARIANTS, u as SidebarGroup, v as SidebarMenuItem, w as SidebarResizeHandle, x as SidebarMenuSubItem, y as SidebarMenuSub } from "../chunks/sidebar-kvjzu0ya0b2z6eec.js";
2
+ import { A as useSidebar, C as SidebarRail, D as SidebarSlidingView, E as SidebarSeparator, O as SidebarSlidingViews, S as SidebarProvider, T as SidebarRoot, _ as SidebarMenuChevron, a as SidebarCollapsible, b as SidebarMenuSubButton, c as SidebarContent, d as SidebarGroupLabel, f as SidebarHeader, g as SidebarMenuButton, h as SidebarMenuBadge, i as Sidebar, k as SidebarTrigger, l as SidebarFooter, m as SidebarMenu, n as KUMO_SIDEBAR_STYLING, o as SidebarCollapsibleContent, p as SidebarLoading, r as KUMO_SIDEBAR_VARIANTS, s as SidebarCollapsibleTrigger, t as KUMO_SIDEBAR_DEFAULT_VARIANTS, u as SidebarGroup, v as SidebarMenuItem, w as SidebarResizeHandle, x as SidebarMenuSubItem, y as SidebarMenuSub } from "../chunks/sidebar-c5otog7ms7rb19cr.js";
3
3
  export { KUMO_SIDEBAR_DEFAULT_VARIANTS, KUMO_SIDEBAR_STYLING, KUMO_SIDEBAR_VARIANTS, Sidebar, SidebarCollapsible, SidebarCollapsibleContent, SidebarCollapsibleTrigger, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarLoading, SidebarMenu, SidebarMenuBadge, SidebarMenuButton, SidebarMenuChevron, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarResizeHandle, SidebarRoot, SidebarSeparator, SidebarSlidingView, SidebarSlidingViews, SidebarTrigger, useSidebar };
@@ -1,2 +1,2 @@
1
- import { n as TabsItem, r as TabsProps, t as Tabs } from "../index-C3iraF8M2.js";
1
+ import { n as TabsItem, r as TabsProps, t as Tabs } from "../index-FCkuxSvs2.js";
2
2
  export { Tabs, type TabsItem, type TabsProps };
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { t as Tabs } from "../chunks/tabs-fww6z6ws987yd0kw.js";
2
+ import { t as Tabs } from "../chunks/tabs-n7bpptah74dbh8kw.js";
3
3
  export { Tabs };
@@ -1,2 +1,2 @@
1
- import { a as ToolbarInputGroupProps, c as ToolbarSize, i as ToolbarButtonProps, n as KUMO_TOOLBAR_VARIANTS, o as ToolbarInputProps, r as Toolbar, s as ToolbarProps, t as KUMO_TOOLBAR_DEFAULT_VARIANTS } from "../index-B6LJIy7_2.js";
1
+ import { a as ToolbarInputGroupProps, c as ToolbarSize, i as ToolbarButtonProps, n as KUMO_TOOLBAR_VARIANTS, o as ToolbarInputProps, r as Toolbar, s as ToolbarProps, t as KUMO_TOOLBAR_DEFAULT_VARIANTS } from "../index-DTjmw8Vy2.js";
2
2
  export { KUMO_TOOLBAR_DEFAULT_VARIANTS, KUMO_TOOLBAR_VARIANTS, Toolbar, type ToolbarButtonProps, type ToolbarInputGroupProps, type ToolbarInputProps, type ToolbarProps, type ToolbarSize };
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { n as KUMO_TOOLBAR_VARIANTS, r as Toolbar, t as KUMO_TOOLBAR_DEFAULT_VARIANTS } from "../chunks/toolbar-gwd1orc8yl7lzaou.js";
2
+ import { n as KUMO_TOOLBAR_VARIANTS, r as Toolbar, t as KUMO_TOOLBAR_DEFAULT_VARIANTS } from "../chunks/toolbar-o25cb9lcznranewe.js";
3
3
  export { KUMO_TOOLBAR_DEFAULT_VARIANTS, KUMO_TOOLBAR_VARIANTS, Toolbar };
@@ -129,12 +129,19 @@ declare function Root<Value, Multiple extends boolean | undefined = false>({ lab
129
129
  declare namespace Root {
130
130
  var displayName: string;
131
131
  }
132
- declare function Content({ children, className, align, sideOffset, alignOffset, side, container: containerProp }: PropsWithChildren<{
132
+ declare function Content({ children, className, align, sideOffset, alignOffset, side, anchor, positionMethod, collisionAvoidance, collisionBoundary, collisionPadding, sticky, disableAnchorTracking, container: containerProp }: PropsWithChildren<{
133
133
  className?: string;
134
134
  align?: Combobox.Positioner.Props["align"];
135
135
  alignOffset?: Combobox.Positioner.Props["alignOffset"];
136
136
  side?: Combobox.Positioner.Props["side"];
137
137
  sideOffset?: Combobox.Positioner.Props["sideOffset"];
138
+ anchor?: Combobox.Positioner.Props["anchor"];
139
+ positionMethod?: Combobox.Positioner.Props["positionMethod"];
140
+ collisionAvoidance?: Combobox.Positioner.Props["collisionAvoidance"];
141
+ collisionBoundary?: Combobox.Positioner.Props["collisionBoundary"];
142
+ collisionPadding?: Combobox.Positioner.Props["collisionPadding"];
143
+ sticky?: Combobox.Positioner.Props["sticky"];
144
+ disableAnchorTracking?: Combobox.Positioner.Props["disableAnchorTracking"];
138
145
  /**
139
146
  * Container element for the portal. Use this to render the combobox inside
140
147
  * a Shadow DOM or custom container. Overrides `KumoPortalProvider` context.
@@ -145,8 +152,10 @@ declare function Content({ children, className, align, sideOffset, alignOffset,
145
152
  declare namespace Content {
146
153
  var displayName: string;
147
154
  }
148
- declare function TriggerValue({ className, ...props }: Combobox.Value.Props & {
155
+ declare function TriggerValue({ className, render, ...props }: Combobox.Value.Props & {
149
156
  className?: string;
157
+ /** Replaces the trigger element while preserving Combobox behavior. */
158
+ render?: Combobox.Trigger.Props["render"];
150
159
  }): import("react/jsx-runtime").JSX.Element;
151
160
  declare namespace TriggerValue {
152
161
  var displayName: string;
@@ -62,6 +62,8 @@ type SelectPropsGeneric<T, Multiple extends boolean | undefined = false> = Omit<
62
62
  * ```
63
63
  */
64
64
  renderValue?: (value: Multiple extends true ? T[] : T) => ReactNode;
65
+ /** Replaces the trigger element while preserving Select behavior. */
66
+ render?: Select.Trigger.Props["render"];
65
67
  className?: string;
66
68
  /**
67
69
  * Data structure of items rendered in the popup.
@@ -123,7 +125,7 @@ type SelectPropsGeneric<T, Multiple extends boolean | undefined = false> = Omit<
123
125
  * </Select>
124
126
  * ```
125
127
  */
126
- declare function Select$1<T, Multiple extends boolean | undefined = false>({ children, className, renderValue, label, hideLabel, placeholder, loading, size, labelTooltip, description, error, required, container: containerProp, ...props }: SelectPropsGeneric<T, Multiple> & {
128
+ declare function Select$1<T, Multiple extends boolean | undefined = false>({ children, className, render, renderValue, label, hideLabel, placeholder, loading, size, labelTooltip, description, error, required, container: containerProp, ...props }: SelectPropsGeneric<T, Multiple> & {
127
129
  required?: boolean;
128
130
  }): import("react/jsx-runtime").JSX.Element;
129
131
  declare namespace Select$1 {
@@ -4,6 +4,7 @@ import { t as InputGroup } from "./input-group-DpGSsAZy.js";
4
4
  import React from "react";
5
5
  import { Toolbar } from "@base-ui/react/toolbar";
6
6
  //#region src/components/toolbar/toolbar.d.ts
7
+ /** @deprecated Toolbar size customization is deprecated. Omit `size` to use the default base size. */
7
8
  declare const KUMO_TOOLBAR_VARIANTS: {
8
9
  readonly size: {
9
10
  readonly xs: {
@@ -24,14 +25,19 @@ declare const KUMO_TOOLBAR_VARIANTS: {
24
25
  };
25
26
  };
26
27
  };
28
+ /** @deprecated Toolbar size customization is deprecated. Omit `size` to use the default base size. */
27
29
  declare const KUMO_TOOLBAR_DEFAULT_VARIANTS: {
28
30
  readonly size: "base";
29
31
  };
32
+ /** @deprecated Toolbar size customization is deprecated. Omit `size` to use the default base size. */
30
33
  type ToolbarSize = keyof typeof KUMO_TOOLBAR_VARIANTS.size;
31
34
  interface ToolbarProps extends Omit<Toolbar.Root.Props, "children"> {
32
35
  /** Toolbar controls rendered as one grouped card. */
33
36
  children: React.ReactNode;
34
- /** Locks every toolbar item to this size. */
37
+ /**
38
+ * Locks every toolbar item to this size.
39
+ * @deprecated Omit this prop to use the default base size. Toolbar size customization will be removed in a future major release.
40
+ */
35
41
  size?: ToolbarSize;
36
42
  }
37
43
  type ToolbarButtonProps = Omit<ButtonProps, "size" | "variant"> & Pick<Toolbar.Button.Props, "focusableWhenDisabled">;
@@ -42,6 +42,11 @@ type TabsItem = {
42
42
  * When using a function, it receives the props to spread on the element and the tab's state.
43
43
  */
44
44
  render?: TabsTab.Props["render"];
45
+ /**
46
+ * Whether the rendered tab is a native button. Set to `false` when `render` produces a non-button element, such as a link.
47
+ * @default true
48
+ */
49
+ nativeButton?: TabsTab.Props["nativeButton"];
45
50
  };
46
51
  /**
47
52
  * Tabs component props.
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ import { a as CloudflareLogoSvgVariant, c as KUMO_CLOUDFLARE_LOGO_DEFAULT_VARIAN
13
13
  import { n as Code, r as CodeBlock } from "./index-B9niVl3r.js";
14
14
  import { a as CollapsibleProps, i as CollapsiblePanelProps, n as CollapsibleDefaultPanelProps, o as CollapsibleRootProps, r as CollapsibleDefaultTriggerProps, s as CollapsibleTriggerProps, t as Collapsible } from "./index-CzTgKPh-.js";
15
15
  import { n as PortalContainer, t as KumoPortalProvider } from "./portal-provider-4AHCxYE6.js";
16
- import { n as Combobox } from "./index-DUCaDjfd.js";
16
+ import { n as Combobox } from "./index-Bw3M24Mi.js";
17
17
  import { a as CommandPaletteFooterProps, c as CommandPaletteInputProps, d as CommandPaletteLoadingProps, f as CommandPaletteResultItemProps, i as CommandPaletteEmptyProps, l as CommandPaletteItemProps, m as HighlightRange, n as KUMO_COMMAND_PALETTE_DEFAULT_VARIANTS, o as CommandPaletteGroupLabelProps, p as CommandPaletteRootProps, r as KUMO_COMMAND_PALETTE_VARIANTS, s as CommandPaletteGroupProps, t as CommandPalette, u as CommandPaletteListProps } from "./index-CeBzVJP8.js";
18
18
  import { i as DatePickerProps, n as DayPickerProps, r as DatePicker, t as DateRange } from "./index-Vj9ZzRh0.js";
19
19
  import { t as DateRangePicker } from "./index-lOWfpkxK.js";
@@ -39,17 +39,17 @@ import { t as Meter } from "./index-yK3Hayg_.js";
39
39
  import { t as Pagination } from "./index-Dsn2VLZv.js";
40
40
  import { _ as PopoverTriggerProps, a as Popover, d as PopoverDescriptionProps, h as PopoverTitleProps, l as PopoverContentProps, n as KUMO_POPOVER_VARIANTS, p as PopoverRootProps, s as PopoverCloseProps, t as KUMO_POPOVER_DEFAULT_VARIANTS } from "./index-BoPqM1Ia2.js";
41
41
  import { a as KumoRadioVariantsProps, c as RadioGroup, d as RadioItemProps, f as RadioLegendProps, i as KumoRadioVariant, l as RadioGroupChangeEventDetails, m as radioVariants, n as KUMO_RADIO_VARIANTS, o as Radio, p as RadioVariant, r as KumoRadioAppearance, s as RadioControlPosition, t as KUMO_RADIO_DEFAULT_VARIANTS, u as RadioGroupProps } from "./index-bAud6rG22.js";
42
- import { t as Select } from "./index-FZvrMcIo2.js";
42
+ import { t as Select } from "./index-CaoLMX-b2.js";
43
43
  import { i as SensitiveInputProps, n as KUMO_SENSITIVE_INPUT_VARIANTS, r as SensitiveInput, t as KUMO_SENSITIVE_INPUT_DEFAULT_VARIANTS } from "./index-D2Gvly0i2.js";
44
44
  import { A as SidebarRail, B as SidebarState, C as SidebarMenuItem, D as SidebarMenuSubItem, E as SidebarMenuSubButtonProps, F as SidebarSide, H as SidebarVariant, I as SidebarSlidingView, M as SidebarRoot, N as SidebarRootProps, O as SidebarProvider, P as SidebarSeparator, R as SidebarSlidingViews, S as SidebarMenuChevron, T as SidebarMenuSubButton, U as useSidebar, V as SidebarTrigger, _ as SidebarMenu, a as SidebarCollapsible, b as SidebarMenuButtonProps, c as SidebarCollapsibleTrigger, d as SidebarContextValue, f as SidebarFooter, g as SidebarLoading, h as SidebarHeader, i as Sidebar, j as SidebarResizeHandle, k as SidebarProviderProps, m as SidebarGroupLabel, n as KUMO_SIDEBAR_STYLING, o as SidebarCollapsibleContent, p as SidebarGroup, r as KUMO_SIDEBAR_VARIANTS, t as KUMO_SIDEBAR_DEFAULT_VARIANTS, u as SidebarContent, v as SidebarMenuBadge, w as SidebarMenuSub, x as SidebarMenuButtonSize, y as SidebarMenuButton } from "./index-DpzpArsi2.js";
45
45
  import { t as Surface } from "./index-CzIWigmH.js";
46
46
  import { a as Switch, c as SwitchLegendProps } from "./index-AMEc1MEg2.js";
47
47
  import { a as KUMO_TABLE_OF_CONTENTS_VARIANTS, c as TableOfContentsGroupProps, d as TableOfContentsProps, f as TableOfContentsTitleProps, i as KUMO_TABLE_OF_CONTENTS_DEFAULT_VARIANTS, l as TableOfContentsItemProps, n as UseTableOfContentsActiveIdResult, o as KumoTableOfContentsState, r as useTableOfContentsActiveId, s as TableOfContents, t as UseTableOfContentsActiveIdOptions, u as TableOfContentsListProps } from "./index-DIV3riUd2.js";
48
48
  import { a as Table } from "./index-Bgl_czT12.js";
49
- import { n as TabsItem, r as TabsProps, t as Tabs } from "./index-C3iraF8M2.js";
49
+ import { n as TabsItem, r as TabsProps, t as Tabs } from "./index-FCkuxSvs2.js";
50
50
  import { t as Text } from "./index-BkyMHk632.js";
51
51
  import { a as Toasty, i as ToastProvider, o as createKumoToastManager, s as useKumoToastManager, t as Toast } from "./index-CGbkysYW2.js";
52
- import { a as ToolbarInputGroupProps, c as ToolbarSize, i as ToolbarButtonProps, n as KUMO_TOOLBAR_VARIANTS, o as ToolbarInputProps, r as Toolbar, s as ToolbarProps, t as KUMO_TOOLBAR_DEFAULT_VARIANTS } from "./index-B6LJIy7_2.js";
52
+ import { a as ToolbarInputGroupProps, c as ToolbarSize, i as ToolbarButtonProps, n as KUMO_TOOLBAR_VARIANTS, o as ToolbarInputProps, r as Toolbar, s as ToolbarProps, t as KUMO_TOOLBAR_DEFAULT_VARIANTS } from "./index-DTjmw8Vy2.js";
53
53
  import "./components/tooltip.js";
54
54
  import { n as safeRandomId, t as cn } from "./cn-DCSItmT-.js";
55
55
  //#region src/blocks/delete-resource/delete-resource.d.ts
package/dist/index.js CHANGED
@@ -19,8 +19,8 @@ import { n as Textarea, t as InputArea } from "./chunks/input-dwl9oy1f1ufah0bx.j
19
19
  import { t as InputGroup } from "./chunks/input-group-otq3m9lach1jyxl0.js";
20
20
  import { t as ClipboardText } from "./chunks/clipboard-text-fuyj4apm2xry4hkk.js";
21
21
  import { n as CodeBlock, t as Code } from "./chunks/code-eu8kzwqnlhoyin24.js";
22
- import { t as Combobox } from "./chunks/combobox-m2nvbt0b1stb2syc.js";
23
- import { n as KUMO_TOOLBAR_VARIANTS, r as Toolbar, t as KUMO_TOOLBAR_DEFAULT_VARIANTS } from "./chunks/toolbar-gwd1orc8yl7lzaou.js";
22
+ import { t as Combobox } from "./chunks/combobox-l4pucshucau0qvrl.js";
23
+ import { n as KUMO_TOOLBAR_VARIANTS, r as Toolbar, t as KUMO_TOOLBAR_DEFAULT_VARIANTS } from "./chunks/toolbar-o25cb9lcznranewe.js";
24
24
  import { t as LayerCard } from "./chunks/layer-card-nah241sxhj6i7i03.js";
25
25
  import { a as DialogTitle, i as DialogRoot, n as DialogClose, o as DialogTrigger, r as DialogDescription, t as Dialog } from "./chunks/dialog-b4r3dv8uvgl2pqem.js";
26
26
  import { t as DropdownMenu } from "./chunks/dropdown-k0y5j6iuad7tvqgx.js";
@@ -29,11 +29,11 @@ import "./components/field.js";
29
29
  import { t as SkeletonLine } from "./chunks/skeleton-line-f6sju1dxawm8h9tg.js";
30
30
  import { n as useMenuNavigation, t as MenuBar } from "./chunks/menubar-m0h31eymts6exeke.js";
31
31
  import { t as Meter } from "./chunks/meter-iauic8ww87xxqf74.js";
32
- import { t as Select } from "./chunks/select-ln6ibqbbs0n4tiig.js";
33
- import { t as Pagination } from "./chunks/pagination-k0yll9ynbi8flc3b.js";
32
+ import { t as Select } from "./chunks/select-cqgxro9via28v4u8.js";
33
+ import { t as Pagination } from "./chunks/pagination-bya4kmtn4rqbexjb.js";
34
34
  import { t as Surface } from "./chunks/surface-jwwh5xl06kv9tp7b.js";
35
35
  import { r as Switch } from "./chunks/switch-cusffup6w3tan5ot.js";
36
- import { t as Tabs } from "./chunks/tabs-fww6z6ws987yd0kw.js";
36
+ import { t as Tabs } from "./chunks/tabs-n7bpptah74dbh8kw.js";
37
37
  import { r as Table } from "./chunks/table-ds3nzcffm3pu9o0l.js";
38
38
  import { t as Text } from "./chunks/text-e1ko7r96hsoz2tor.js";
39
39
  import { i as useKumoToastManager, n as Toasty, r as createKumoToastManager, t as ToastProvider } from "./chunks/toast-itl6qo5oy1vy6d36.js";
@@ -50,7 +50,7 @@ import { t as DatePicker } from "./chunks/date-picker-njfirc1m165k6yax.js";
50
50
  import { t as Flow } from "./chunks/flow-fbsv3yek3w7v5a6p.js";
51
51
  import { a as TimeseriesChart, i as ChartLegend, n as ChoroplethMap, o as Chart, r as SankeyChart, s as ChartPalette, t as BubbleMap } from "./chunks/chart-bxxlck50zlsbj3kl.js";
52
52
  import { i as autocompleteVariants, n as KUMO_AUTOCOMPLETE_DEFAULT_VARIANTS, r as KUMO_AUTOCOMPLETE_VARIANTS, t as Autocomplete } from "./chunks/autocomplete-m8n1c775n0iilomf.js";
53
- import { A as useSidebar, C as SidebarRail, D as SidebarSlidingView, E as SidebarSeparator, O as SidebarSlidingViews, S as SidebarProvider, T as SidebarRoot, _ as SidebarMenuChevron, a as SidebarCollapsible, b as SidebarMenuSubButton, c as SidebarContent, d as SidebarGroupLabel, f as SidebarHeader, g as SidebarMenuButton, h as SidebarMenuBadge, i as Sidebar, k as SidebarTrigger, l as SidebarFooter, m as SidebarMenu, n as KUMO_SIDEBAR_STYLING, o as SidebarCollapsibleContent, p as SidebarLoading, r as KUMO_SIDEBAR_VARIANTS, s as SidebarCollapsibleTrigger, t as KUMO_SIDEBAR_DEFAULT_VARIANTS, u as SidebarGroup, v as SidebarMenuItem, w as SidebarResizeHandle, x as SidebarMenuSubItem, y as SidebarMenuSub } from "./chunks/sidebar-kvjzu0ya0b2z6eec.js";
53
+ import { A as useSidebar, C as SidebarRail, D as SidebarSlidingView, E as SidebarSeparator, O as SidebarSlidingViews, S as SidebarProvider, T as SidebarRoot, _ as SidebarMenuChevron, a as SidebarCollapsible, b as SidebarMenuSubButton, c as SidebarContent, d as SidebarGroupLabel, f as SidebarHeader, g as SidebarMenuButton, h as SidebarMenuBadge, i as Sidebar, k as SidebarTrigger, l as SidebarFooter, m as SidebarMenu, n as KUMO_SIDEBAR_STYLING, o as SidebarCollapsibleContent, p as SidebarLoading, r as KUMO_SIDEBAR_VARIANTS, s as SidebarCollapsibleTrigger, t as KUMO_SIDEBAR_DEFAULT_VARIANTS, u as SidebarGroup, v as SidebarMenuItem, w as SidebarResizeHandle, x as SidebarMenuSubItem, y as SidebarMenuSub } from "./chunks/sidebar-c5otog7ms7rb19cr.js";
54
54
  import { i as TableOfContents, n as KUMO_TABLE_OF_CONTENTS_DEFAULT_VARIANTS, r as KUMO_TABLE_OF_CONTENTS_VARIANTS, t as useTableOfContentsActiveId } from "./chunks/table-of-contents-l66abisn473qzd07.js";
55
55
  import { jsx, jsxs } from "react/jsx-runtime";
56
56
  import { useCallback, useEffect, useState } from "react";