burne-ui 1.8.3 → 1.8.5

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.
@@ -4,6 +4,8 @@ export { isInlineIconChild, readBadgeInlineIconPosition } from './badgeInlineIco
4
4
  export declare function hasInlineIconChildren(children: ReactNode): boolean;
5
5
  export declare function hasBadgeTextContent(children: ReactNode): boolean;
6
6
  export declare function hasMeaningfulContent(node: ReactNode): boolean;
7
+ /** Single digit `0`–`9` → circular badge (same layout as icon-only). */
8
+ export declare function isBadgeSingleDigitContent(children: ReactNode): boolean;
7
9
  export declare function renderBadgeInlineChildren(children: ReactNode, size: BadgeSize): ReactNode;
8
10
  export declare function isBadgeElement(child: ReactElement): boolean;
9
11
  export declare function resolveBadgeBody({ size, children, icon, iconOnly, iconPosition, inlineIconMode, meaningChild, dot, }: ResolveBadgeBodyProps): ResolvedBadgeBody;
@@ -4,17 +4,23 @@ export type { BadgePlacement, BadgeSize, BadgeStatus, BadgeVariant } from './bad
4
4
  export declare const BADGE_VARIANT_SURFACE: Record<Exclude<BadgeVariant, "gloss">, string>;
5
5
  export declare const BADGE_ANCHOR_PLACEMENT: Record<BadgePlacement, string>;
6
6
  export declare const BADGE_TEXT_ROW: Record<BadgeSize, string>;
7
- export declare const BADGE_SQUARE_MIN: Record<BadgeSize, string>;
8
- export declare const BADGE_TEXT_VARIANT: Record<BadgeSize, TextVariant>;
9
- export declare const BADGE_ICON_ONLY: Record<BadgeSize, string>;
7
+ /** Equal box for icon-only / single-digit — fixed square → circle with `rounded-full`. */
8
+ export declare const BADGE_CIRCLE: Record<BadgeSize, string>;
10
9
  export declare const BADGE_DOT_DIM: Record<BadgeSize, string>;
10
+ export declare const BADGE_TEXT_VARIANT: Record<BadgeSize, TextVariant>;
11
+ /** Same tight line-box as panel titles (`Card.Title` → `leading-none`). */
12
+ export declare const BADGE_TEXT_CLASS = "leading-none";
11
13
  export declare const BADGE_INLINE_SVG_SIZE: Record<BadgeSize, string>;
12
14
  export declare const BADGE_TEXT_ROW_BASE = "box-border isolate inline-flex max-w-full shrink-0 select-none items-center justify-center truncate rounded-full whitespace-nowrap motion-reduce:transition-none";
13
15
  export declare const BADGE_ICON_ONLY_BASE = "box-border isolate inline-flex items-center justify-center rounded-full whitespace-nowrap";
14
16
  export declare const BADGE_DOT_RING = "box-border isolate inline-flex shrink-0 rounded-full ring-2 ring-background motion-reduce:ring-1";
15
17
  export declare function dotFillClass(variant: BadgeVariant, status: BadgeStatus): string;
16
- export declare function badgeSurfaceClass(variant: BadgeVariant, status: BadgeStatus): string;
17
- export declare function badgeGlossStatusTextClass(status: BadgeStatus): string;
18
+ /**
19
+ * Panel surface follows `variant` only (Alert pattern).
20
+ * `status` tints text/icons via `SEMANTIC_STATUS_TEXT` — not the shell fill.
21
+ */
22
+ export declare function badgeSurfaceClass(variant: BadgeVariant, status?: BadgeStatus): string;
23
+ export declare function badgeStatusTextClass(status: BadgeStatus): string;
18
24
  export declare function badgeDotSurfaceClass(variant: BadgeVariant, status: BadgeStatus, isGloss: boolean): string;
19
25
  /** Icon wrapper in simple/inline API (`icon` prop or `data-icon` on child). */
20
26
  export declare const BADGE_ICON_SLOT_BASE = "inline-flex shrink-0 [&_svg]:shrink-0";
@@ -22,4 +22,5 @@ export declare const DropdownItem: import('react').NamedExoticComponent<Omit<HTM
22
22
  disabled?: boolean;
23
23
  selection?: boolean;
24
24
  status?: import('./dropdownTypes').DropdownItemStatus;
25
+ indicator?: boolean;
25
26
  } & import('react').RefAttributes<HTMLElement>>;
@@ -118,6 +118,8 @@ export type DropdownItemProps = Omit<HTMLAttributes<HTMLElement>, "value"> & {
118
118
  disabled?: boolean;
119
119
  selection?: boolean;
120
120
  status?: DropdownItemStatus;
121
+ /** Render selection indicator (same as `<Dropdown.ItemIndicator />`). */
122
+ indicator?: boolean;
121
123
  };
122
124
  export type UseDropdownRootStateProps = Pick<DropdownProps, "open" | "defaultOpen" | "onOpenChange" | "multiple" | "value" | "defaultValue" | "onValueChange" | "closeOnSelect" | "popoverVariant" | "portalContainer">;
123
125
  export type UseDropdownPopoverMenuProps = {
@@ -23,6 +23,7 @@ export declare const Dropdown: typeof DropdownRoot & {
23
23
  disabled?: boolean;
24
24
  selection?: boolean;
25
25
  status?: import('./dropdownTypes').DropdownItemStatus;
26
+ indicator?: boolean;
26
27
  } & import('react').RefAttributes<HTMLElement>>;
27
28
  ItemLabel: typeof DropdownItemLabel;
28
29
  ItemHint: typeof DropdownItemHint;
@@ -1,13 +1,14 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { OptionListItemContextValue } from '../utils/optionListItemContext';
3
3
  import { DropdownItemStatus } from './dropdownTypes';
4
- export declare function useDropdownItemState({ children, href, selection, value, disabled, status, }: {
4
+ export declare function useDropdownItemState({ children, href, selection, value, disabled, status, indicator, }: {
5
5
  children: ReactNode;
6
6
  href?: string;
7
7
  selection?: boolean;
8
8
  value?: string;
9
9
  disabled?: boolean;
10
10
  status?: DropdownItemStatus;
11
+ indicator?: boolean;
11
12
  }): {
12
13
  parts: import('../utils/optionListItemChildren').OptionListItemParts;
13
14
  selectItem: (value: string) => void;
@@ -49,7 +49,7 @@ export type InputClassNamesProviderProps = {
49
49
  classNames?: Prettify<InputClassNames>;
50
50
  children: ReactNode;
51
51
  };
52
- export type InputProps = HTMLAttributes<HTMLDivElement> & {
52
+ export type InputProps = Omit<HTMLAttributes<HTMLDivElement>, "prefix"> & {
53
53
  children?: ReactNode;
54
54
  label?: ReactNode;
55
55
  hint?: ReactNode;
@@ -2,10 +2,12 @@ import { TextVariant } from '../Text';
2
2
  import { KbdSize, KbdVariant } from './kbdTypes';
3
3
  export declare const KBD_VARIANT_SURFACE: Record<Exclude<KbdVariant, "gloss">, string>;
4
4
  export declare const KBD_TEXT_VARIANT: Record<KbdSize, TextVariant>;
5
+ /** Same tight line-box as Badge / panel titles (`leading-none`). */
6
+ export declare const KBD_TEXT_CLASS = "leading-none";
5
7
  export declare const KBD_LAYOUT: Record<KbdSize, string>;
6
8
  export declare const KBD_ROOT_BASE_CLASS = "box-border isolate inline-flex max-w-full shrink-0 select-none items-center justify-center whitespace-nowrap rounded-small font-mono motion-reduce:transition-none";
7
9
  export declare const KBD_GROUP_BASE_CLASS = "inline-flex items-center gap-xsmall";
8
- export declare const KBD_GROUP_SEPARATOR_CLASS = "select-none text-muted text-xsmall";
10
+ export declare const KBD_GROUP_SEPARATOR_CLASS = "select-none text-muted text-xsmall leading-none";
9
11
  export declare function kbdSurfaceClass(variant: KbdVariant): string;
10
12
  export declare function kbdRootClass({ variant, size, motionClass, slotRoot, className, }: {
11
13
  variant: KbdVariant;
@@ -2,7 +2,7 @@ import { ListBoxProps } from './listBoxTypes';
2
2
  export type { ListBoxProps, ListBoxSectionProps, ListBoxHeaderProps, ListBoxSeparatorProps, ListBoxEmptyProps, ListBoxItemProps, ListBoxLabelProps, ListBoxHintProps, ListBoxIconProps, ListBoxItemIndicatorProps, ListBoxSize, ListBoxVariant, ListBoxClassNames, } from './listBoxTypes';
3
3
  export { ListBoxRootShell, ListBoxSection, ListBoxHeader, ListBoxSeparator, ListBoxEmpty, ListBoxItem, ListBoxLabel, ListBoxHint, ListBoxIcon, ListBoxItemIndicator, } from './listBoxParts';
4
4
  export { useListBox, useListBoxActiveValue } from './listBoxContext';
5
- export declare function ListBoxRoot({ classNames, children, className, size, variant, multiple, value, defaultValue, onValueChange, selectionIndicator, disabled, activeValue, onActiveValueChange, listId: listIdProp, "aria-label": ariaLabelProp, "aria-labelledby": ariaLabelledByProp, ...rest }: ListBoxProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function ListBoxRoot({ classNames, children, className, size, variant, multiple, value, defaultValue, onValueChange, disabled, activeValue, onActiveValueChange, listId: listIdProp, "aria-label": ariaLabelProp, "aria-labelledby": ariaLabelledByProp, ...rest }: ListBoxProps): import("react/jsx-runtime").JSX.Element;
6
6
  export declare namespace ListBoxRoot {
7
7
  var displayName: string;
8
8
  }
@@ -10,6 +10,7 @@ export declare const ListBox: typeof ListBoxRoot & {
10
10
  label?: import('react').ReactNode;
11
11
  hint?: import('react').ReactNode;
12
12
  icon?: import('react').ReactNode;
13
+ indicator?: boolean;
13
14
  } & import('react').RefAttributes<HTMLButtonElement>>;
14
15
  Label: typeof ListBoxLabel;
15
16
  Hint: typeof ListBoxHint;
@@ -11,13 +11,12 @@ export declare function resolveListBoxItemIndicatorClassNames({ slotClassNames,
11
11
  }): SelectionIndicatorClassNames;
12
12
  export declare function normalizeListBoxValues(value: string | string[] | undefined): string[];
13
13
  export declare function partitionListBoxItemChildren(children: ReactNode): import('../utils/optionListItemChildren').OptionListItemParts;
14
- export declare function resolveListBoxItemLayout({ children, label, hint, icon, showIndicator, }: Pick<UseListBoxItemStateProps, "children" | "label" | "hint" | "icon"> & {
15
- showIndicator: boolean;
16
- }): {
14
+ export declare function resolveListBoxItemLayout({ children, label, hint, icon, indicator, }: Pick<UseListBoxItemStateProps, "children" | "label" | "hint" | "icon" | "indicator">): {
17
15
  parts: import('../utils/optionListItemChildren').OptionListItemParts;
18
16
  hasCompoundIndicator: boolean;
19
17
  hasHint: boolean;
20
18
  hasIcon: boolean;
19
+ hasRest: boolean;
21
20
  isCompound: boolean;
22
21
  hasLabel: boolean;
23
22
  showIndicatorSlot: boolean;
@@ -25,6 +25,7 @@ export declare const ListBoxItem: import('react').NamedExoticComponent<Omit<impo
25
25
  label?: import('react').ReactNode;
26
26
  hint?: import('react').ReactNode;
27
27
  icon?: import('react').ReactNode;
28
+ indicator?: boolean;
28
29
  } & import('react').RefAttributes<HTMLButtonElement>>;
29
30
  export declare function ListBoxLabel({ className, ...props }: ListBoxLabelProps): import("react/jsx-runtime").JSX.Element;
30
31
  export declare namespace ListBoxLabel {
@@ -38,7 +38,6 @@ export type ListBoxContextValue = {
38
38
  selected: Set<string>;
39
39
  selectItem: (value: string) => void;
40
40
  setActiveValue: (value: string | null) => void;
41
- showIndicator: boolean;
42
41
  indicatorMode: "radio" | "multi";
43
42
  disabled?: boolean;
44
43
  /**
@@ -55,7 +54,6 @@ export type ListBoxProps = Omit<HTMLAttributes<HTMLDivElement>, "children" | "on
55
54
  value?: string | string[];
56
55
  defaultValue?: string | string[];
57
56
  onValueChange?: (value: string | string[]) => void;
58
- selectionIndicator?: boolean;
59
57
  disabled?: boolean;
60
58
  activeValue?: string | null;
61
59
  onActiveValueChange?: (value: string | null) => void;
@@ -80,6 +78,8 @@ export type ListBoxItemProps = Omit<HTMLAttributes<HTMLButtonElement>, "value">
80
78
  label?: ReactNode;
81
79
  hint?: ReactNode;
82
80
  icon?: ReactNode;
81
+ /** Simple API: render selection indicator (same as `<ListBox.ItemIndicator />`). */
82
+ indicator?: boolean;
83
83
  };
84
84
  export type ListBoxLabelProps = HTMLAttributes<HTMLSpanElement>;
85
85
  export type ListBoxHintProps = HTMLAttributes<HTMLSpanElement>;
@@ -99,7 +99,7 @@ export type ListBoxRootShellProps = Omit<HTMLAttributes<HTMLDivElement>, "childr
99
99
  ariaLabelledBy?: string;
100
100
  children?: ReactNode;
101
101
  };
102
- export type UseListBoxItemStateProps = Pick<ListBoxItemProps, "children" | "label" | "hint" | "icon" | "value" | "disabled">;
102
+ export type UseListBoxItemStateProps = Pick<ListBoxItemProps, "children" | "label" | "hint" | "icon" | "indicator" | "value" | "disabled">;
103
103
  export type UseListBoxItemAnimationsProps = {
104
104
  disabled: boolean;
105
105
  hasLabel: boolean;
@@ -1,9 +1,10 @@
1
1
  import { UseListBoxItemStateProps } from './listBoxTypes';
2
- export declare function useListBoxItemState({ children, label, hint, icon, value, disabled: disabledProp, }: UseListBoxItemStateProps): {
2
+ export declare function useListBoxItemState({ children, label, hint, icon, indicator, value, disabled: disabledProp, }: UseListBoxItemStateProps): {
3
3
  parts: import('../utils/optionListItemChildren').OptionListItemParts;
4
4
  hasCompoundIndicator: boolean;
5
5
  hasHint: boolean;
6
6
  hasIcon: boolean;
7
+ hasRest: boolean;
7
8
  isCompound: boolean;
8
9
  hasLabel: boolean;
9
10
  showIndicatorSlot: boolean;
@@ -1,5 +1,5 @@
1
1
  import { ListBoxContextValue, UseListBoxRootStateProps } from './listBoxTypes';
2
- export declare function useListBoxRootState({ size, multiple, value: valueProp, defaultValue, onValueChange, selectionIndicator, disabled, activeValue: activeValueProp, onActiveValueChange, listId: listIdProp, }: UseListBoxRootStateProps): {
2
+ export declare function useListBoxRootState({ size, multiple, value: valueProp, defaultValue, onValueChange, disabled, activeValue: activeValueProp, onActiveValueChange, listId: listIdProp, }: UseListBoxRootStateProps): {
3
3
  listId: string;
4
4
  contextValue: ListBoxContextValue;
5
5
  activeValue: string | null;
@@ -11,7 +11,7 @@ export declare const POPOVER_CONTENT_CLASS = "pointer-events-auto z-popover w-ma
11
11
  export declare const POPOVER_PANEL_RELATIVE_CLASS = "relative overflow-visible";
12
12
  export declare const POPOVER_GLOSS_PANEL_CLASS = "gloss-panel gloss-deep relative z-[1] flex min-w-0 origin-center flex-col overflow-hidden text-foreground";
13
13
  export declare const POPOVER_GLOSS_CONTENT_CLASS = "gloss-content flex min-w-0 flex-col";
14
- export declare const POPOVER_DEFAULT_PANEL_CLASS = "relative z-[1] flex min-w-0 flex-col overflow-hidden border-token bg-surface text-foreground animate-shadow";
14
+ export declare const POPOVER_DEFAULT_PANEL_CLASS = "relative z-[1] flex min-w-0 flex-col overflow-hidden border-token bg-surface text-foreground shadow-token-large";
15
15
  export declare const POPOVER_ARROW_BASE_CLASS = "pointer-events-none absolute z-0 size-2 rotate-45";
16
16
  export declare const POPOVER_ARROW_GLOSS_CLASS = "border-0 bg-[var(--color-surface)]";
17
17
  export declare const POPOVER_ARROW_DEFAULT_CLASS = "border-token bg-surface";
@@ -29,7 +29,7 @@ export declare const TOOLTIP_GLOSS_PANEL_BASE_CLASS = "gloss-panel gloss-deep re
29
29
  export declare const TOOLTIP_GLOSS_CONTENT_CLASS = "gloss-content";
30
30
  /** Compound slots (`Tooltip.Message`) — pass-through grid children. */
31
31
  export declare const TOOLTIP_COMPOUND_CONTENTS_CLASS = "contents";
32
- export declare const TOOLTIP_PANEL_BASE_CLASS = "relative z-[1] w-max min-w-0 rounded-mid text-left animate-shadow";
32
+ export declare const TOOLTIP_PANEL_BASE_CLASS = "relative z-[1] w-max min-w-0 rounded-mid text-left shadow-token-large";
33
33
  export declare function tooltipTitleClass(status: SemanticStatus): string;
34
34
  export declare function tooltipIndicatorClass(status: SemanticStatus, slotClass?: string, className?: string): string;
35
35
  export declare function tooltipGlossShellClass({ size, slotClass, className, }: {
@@ -1,4 +1,7 @@
1
- export declare const OPTION_LIST_ITEM_LABEL_WRAP_CLASS = "inline-flex min-w-0 items-center";
1
+ /** Shell for label; default width comes from cell (`w-fit`). Override with `w-full`. */
2
+ export declare const OPTION_LIST_ITEM_LABEL_WRAP_CLASS = "flex min-w-0 items-center";
3
+ /** Inner Text fills the label shell so `w-full` on the shell stretches rich content. */
4
+ export declare const OPTION_LIST_ITEM_LABEL_TEXT_FILL_CLASS = "block min-w-0 w-full";
2
5
  export declare const OPTION_LIST_ITEM_LABEL_MIN_WIDTH_CLASS = "min-w-0";
3
6
  export declare const OPTION_LIST_ITEM_LABEL_MOTION_CLASS = "origin-center";
4
7
  export declare const OPTION_LIST_ITEM_LABEL_TEXT_CLASS = "font-w-mid";