@danxbot/ui 13.1.0 → 13.2.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.
@@ -21,6 +21,7 @@ declare const button: import("tailwind-variants").TVReturnType<{
21
21
  md: "h-control-md rounded-md px-5 text-sm";
22
22
  lg: "h-control-lg rounded-lg px-6 text-md";
23
23
  xl: "h-control-xl rounded-lg px-8 text-lg";
24
+ list: "h-auto w-full items-start justify-start gap-3 rounded-md px-3 py-2 text-left text-sm whitespace-normal";
24
25
  };
25
26
  iconOnly: {
26
27
  true: "px-0 aspect-square";
@@ -50,6 +51,7 @@ declare const button: import("tailwind-variants").TVReturnType<{
50
51
  md: "h-control-md rounded-md px-5 text-sm";
51
52
  lg: "h-control-lg rounded-lg px-6 text-md";
52
53
  xl: "h-control-xl rounded-lg px-8 text-lg";
54
+ list: "h-auto w-full items-start justify-start gap-3 rounded-md px-3 py-2 text-left text-sm whitespace-normal";
53
55
  };
54
56
  iconOnly: {
55
57
  true: "px-0 aspect-square";
@@ -79,6 +81,7 @@ declare const button: import("tailwind-variants").TVReturnType<{
79
81
  md: "h-control-md rounded-md px-5 text-sm";
80
82
  lg: "h-control-lg rounded-lg px-6 text-md";
81
83
  xl: "h-control-xl rounded-lg px-8 text-lg";
84
+ list: "h-auto w-full items-start justify-start gap-3 rounded-md px-3 py-2 text-left text-sm whitespace-normal";
82
85
  };
83
86
  iconOnly: {
84
87
  true: "px-0 aspect-square";
@@ -146,3 +149,42 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, Va
146
149
  }
147
150
  export declare function Button({ className, variant, size, iconOnly, fullWidth, render, loading, leadingIcon, trailingIcon, disabled, children, onPointerDown, onClick, disabledReason, disabledReasonTooltip, ref, "aria-disabled": ariaDisabled, ...props }: ButtonProps): import("react").JSX.Element;
148
151
  export { button as buttonVariants };
152
+ export interface ListItemButtonProps extends Omit<ButtonProps, "size" | "iconOnly" | "fullWidth" | "children"> {
153
+ /**
154
+ * The row's bold leading identifier — an actor name, a from-state, a
155
+ * category label. Always rendered `font-semibold`, on the same wrapping
156
+ * line as `detail`.
157
+ */
158
+ leading: ReactNode;
159
+ /**
160
+ * Secondary text following `leading` on the SAME wrapping line — the
161
+ * action, the target, whatever finishes the sentence `leading` starts.
162
+ * Rendered `font-normal`; wraps together with `leading` as one line of
163
+ * text, not as a separate flex item.
164
+ */
165
+ detail?: ReactNode;
166
+ /**
167
+ * A muted line rendered on its OWN row below `leading`/`detail` — a
168
+ * trigger, a guard clause, any extra context. Never inlined with the line
169
+ * above, unlike `detail`.
170
+ */
171
+ subline?: ReactNode;
172
+ /**
173
+ * Marks this row as the current selection. Stamps `data-selected="true"`
174
+ * on the rendered `<button>` (omitted entirely, not `"false"`, when unset —
175
+ * the same convention the native `docs-step-list__item` buttons this
176
+ * replaces already used, so an existing `[data-selected]` CSS selector
177
+ * keeps working unchanged) and applies the library's own selected
178
+ * treatment rather than leaving every consumer to invent one.
179
+ */
180
+ selected?: boolean;
181
+ }
182
+ /**
183
+ * A list-item trigger for multi-line, rich-content rows that `Button`'s
184
+ * fixed single-line sizes cannot fit — see the file header above.
185
+ *
186
+ * `fullWidth` is not a prop here: a list-item row always spans its `<li>`,
187
+ * which is the entire reason this exists, so it's forced rather than left
188
+ * for every caller to remember.
189
+ */
190
+ export declare function ListItemButton({ leading, detail, subline, selected, variant, className, ...props }: ListItemButtonProps): import("react").JSX.Element;
@@ -1,4 +1,5 @@
1
- import type { ReactNode, Ref } from "react";
1
+ import type { ComponentProps, ReactNode, Ref } from "react";
2
+ import { Collapsible as BaseCollapsible } from "@base-ui/react/collapsible";
2
3
  export interface SeparatorProps {
3
4
  orientation?: "horizontal" | "vertical";
4
5
  /** Text or a chip centred on the line — "or", "Today", a count. */
@@ -33,6 +34,37 @@ export interface ScrollAreaProps {
33
34
  * present when you are steering, invisible when you are reading.
34
35
  */
35
36
  export declare function ScrollArea({ children, maxHeight, className }: ScrollAreaProps): import("react").JSX.Element;
37
+ export interface CollapsibleRootProps extends Omit<ComponentProps<typeof BaseCollapsible.Root>, "render"> {
38
+ }
39
+ /**
40
+ * Groups a `CollapsibleTrigger` and a `CollapsiblePanel` (or several of
41
+ * either) that can live anywhere as siblings underneath it — the headless
42
+ * counterpart to the fully-composed `Collapsible` below. Renders a plain
43
+ * `<div>` (Base UI's own default); pass `className` for whatever layout the
44
+ * trigger row and panel need to share, or leave it unset to render no box
45
+ * at all beyond that default.
46
+ */
47
+ export declare function CollapsibleRoot({ className, ...props }: CollapsibleRootProps): import("react").JSX.Element;
48
+ export interface CollapsibleTriggerProps extends Omit<ComponentProps<typeof BaseCollapsible.Trigger>, "render"> {
49
+ }
50
+ /**
51
+ * The bare trigger `<button>` half of the headless `Collapsible` parts —
52
+ * real Base UI `aria-controls`/`aria-expanded` wiring, zero imposed layout.
53
+ * Unlike `Collapsible`'s own trigger, this draws no chevron and forces no
54
+ * flex row: the caller's `children` are the ENTIRE button content, laid out
55
+ * however the caller wants (e.g. sharing a row with an unrelated `action`
56
+ * control that is NOT itself part of this button, rendered as a sibling
57
+ * outside it).
58
+ */
59
+ export declare function CollapsibleTrigger({ className, ...props }: CollapsibleTriggerProps): import("react").JSX.Element;
60
+ export interface CollapsiblePanelProps extends Omit<ComponentProps<typeof BaseCollapsible.Panel>, "render"> {
61
+ }
62
+ /**
63
+ * The bare panel half of the headless `Collapsible` parts — same
64
+ * height-animation recipe `Collapsible`'s own panel uses, with no forced
65
+ * inner padding wrapper, so the caller controls its own spacing.
66
+ */
67
+ export declare function CollapsiblePanel({ className, ...props }: CollapsiblePanelProps): import("react").JSX.Element;
36
68
  export interface CollapsibleProps {
37
69
  /**
38
70
  * The trigger's CONTENT — not a button.
@@ -64,7 +96,10 @@ export interface CollapsibleProps {
64
96
  * One disclosure, without the accordion around it.
65
97
  *
66
98
  * Height animates from `--collapsible-panel-height`, which Base UI publishes —
67
- * no measuring, no effect, no frame of lag on first open.
99
+ * no measuring, no effect, no frame of lag on first open. Built on the
100
+ * headless `CollapsibleRoot`/`CollapsibleTrigger`/`CollapsiblePanel` parts
101
+ * above — see their own doc if this fixed trigger-row-plus-nested-panel
102
+ * shape doesn't fit your consumer.
68
103
  */
69
104
  export declare function Collapsible({ trigger, defaultOpen, open, onOpenChange, triggerClassName, chevron, children, className, }: CollapsibleProps): import("react").JSX.Element;
70
105
  export interface EmptyStateProps {
@@ -13,6 +13,7 @@ export { Icon, type IconProps, type IconSize, type IconName } from "./components
13
13
  export { getIcon, hasIcon, iconNames, type IconNode, type IconNodeChild, } from "./lib/icons";
14
14
  export { coreIcons, type CoreIconName } from "./icons/data";
15
15
  export { Button, type ButtonProps } from "./components/Button";
16
+ export { ListItemButton, type ListItemButtonProps } from "./components/Button";
16
17
  export { IconButton, type IconButtonProps, type IconButtonVariant, type IconButtonTone, } from "./components/IconButton";
17
18
  export { Badge, type BadgeProps, type BadgeDismiss, } from "./components/Badge";
18
19
  export { Callout, type CalloutProps } from "./components/Callout";
@@ -59,7 +60,7 @@ export { PaginationBar, type PaginationBarProps, type PaginationBarMode, } from
59
60
  export { Stepper, stepStatus, stepperProgress, advanceBlockReason, assertSteps, type StepperProps, type Step, type StepStatus, type StepperProgress, } from "./components/stepper";
60
61
  export { StatusChecklist, tallyChecklist, type StatusChecklistProps, type ChecklistItem, type ChecklistState, type ChecklistTally, } from "./components/checklist";
61
62
  export { Toggle, ToggleGroup, Toolbar, ToolbarButton, ToolbarGroup, ToolbarInput, ToolbarSeparator, type ToggleProps, type ToggleGroupProps, type ToolbarProps, type ToolbarButtonProps, type ToolbarGroupProps, type ToolbarInputProps, } from "./components/Toggle";
62
- export { Separator, ScrollArea, Collapsible, EmptyState, Timeline, type SeparatorProps, type ScrollAreaProps, type CollapsibleProps, type EmptyStateProps, type TimelineProps, type TimelineItem, } from "./components/Surface";
63
+ export { Separator, ScrollArea, Collapsible, CollapsibleRoot, CollapsibleTrigger, CollapsiblePanel, EmptyState, Timeline, type SeparatorProps, type ScrollAreaProps, type CollapsibleProps, type CollapsibleRootProps, type CollapsibleTriggerProps, type CollapsiblePanelProps, type EmptyStateProps, type TimelineProps, type TimelineItem, } from "./components/Surface";
63
64
  export { PanelGroup, Panel, PanelResizer, type PanelGroupProps, type PanelProps, type PanelResizerProps, type PanelDirection, type PanelNarrowMode, } from "./components/Panel";
64
65
  export { Avatar, AvatarGroup, type AvatarProps, type AvatarGroupProps, type AvatarStatus, } from "./components/Avatar";
65
66
  export { Progress, Meter, ProgressRing, type ProgressProps, type MeterProps, type ProgressRingProps, type ProgressRingValueProps, type ProgressRingSegmentsProps, type ProgressRingSegment, type ProgressTone, } from "./components/Progress";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "13.1.0",
3
+ "version": "13.2.0",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",