@usememos/ui 26.10.0 → 26.10.2
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/LICENSE +21 -0
- package/README.md +67 -92
- package/dist/index.js +3 -48
- package/dist/index.js.map +7 -0
- package/dist/styles.css +1 -0
- package/dist/tokens.css +1 -0
- package/dist/types/components/avatar/index.d.ts +16 -0
- package/dist/types/components/badge/index.d.ts +10 -0
- package/dist/types/components/button/index.d.ts +29 -0
- package/dist/types/components/checkbox/index.d.ts +11 -0
- package/dist/types/components/collapsible/index.d.ts +15 -0
- package/dist/types/components/combobox/index.d.ts +66 -0
- package/dist/types/components/dialog/alert-dialog.d.ts +19 -0
- package/dist/types/components/dialog/index.d.ts +22 -0
- package/dist/types/components/dialog/parts.d.ts +34 -0
- package/dist/types/components/field/fieldset.d.ts +11 -0
- package/dist/types/components/field/index.d.ts +24 -0
- package/dist/types/components/input/index.d.ts +19 -0
- package/dist/types/components/kbd/index.d.ts +5 -0
- package/dist/types/components/link/index.d.ts +11 -0
- package/dist/types/components/menu/index.d.ts +67 -0
- package/dist/types/components/popover/index.d.ts +28 -0
- package/dist/types/components/prose/index.d.ts +11 -0
- package/dist/types/components/radio-group/index.d.ts +15 -0
- package/dist/types/components/select/index.d.ts +46 -0
- package/dist/types/components/separator/index.d.ts +5 -0
- package/dist/types/components/skeleton/index.d.ts +13 -0
- package/dist/types/components/spinner/index.d.ts +10 -0
- package/dist/types/components/switch/index.d.ts +11 -0
- package/dist/types/components/table/index.d.ts +42 -0
- package/dist/types/components/tabs/index.d.ts +22 -0
- package/dist/types/components/textarea/index.d.ts +9 -0
- package/dist/types/components/toast/index.d.ts +19 -0
- package/dist/types/components/toggle/index.d.ts +11 -0
- package/dist/types/components/toggle-group/index.d.ts +13 -0
- package/dist/types/components/tooltip/index.d.ts +24 -0
- package/dist/types/index.d.ts +30 -0
- package/dist/types/internal/class-name.d.ts +7 -0
- package/dist/types/internal/popup.d.ts +9 -0
- package/dist/types/internal/size.d.ts +5 -0
- package/dist/types/types.d.ts +7 -0
- package/llms-full.txt +2181 -0
- package/llms.txt +53 -0
- package/package.json +34 -157
- package/dist/button.cjs +0 -74
- package/dist/button.d.cts +0 -15
- package/dist/button.d.ts +0 -15
- package/dist/button.js +0 -7
- package/dist/checkbox.cjs +0 -98
- package/dist/checkbox.d.cts +0 -16
- package/dist/checkbox.d.ts +0 -16
- package/dist/checkbox.js +0 -7
- package/dist/chunk-3DNMGJFC.js +0 -216
- package/dist/chunk-3VYNJ6UM.js +0 -27
- package/dist/chunk-3YY2G3JK.js +0 -125
- package/dist/chunk-5GQEJQKE.js +0 -60
- package/dist/chunk-6TNEFWVX.js +0 -9
- package/dist/chunk-BH4MPO4N.js +0 -25
- package/dist/chunk-F6GH4X7N.js +0 -34
- package/dist/chunk-HYN2P4OY.js +0 -84
- package/dist/chunk-OIUVLPTE.js +0 -54
- package/dist/chunk-S6LVYCE6.js +0 -157
- package/dist/chunk-SNSDJKJP.js +0 -44
- package/dist/chunk-WPO54YPG.js +0 -328
- package/dist/chunk-Z3ME5VRQ.js +0 -98
- package/dist/control-size-Bz2gyuyO.d.cts +0 -3
- package/dist/control-size-Bz2gyuyO.d.ts +0 -3
- package/dist/dialog.cjs +0 -203
- package/dist/dialog.d.cts +0 -34
- package/dist/dialog.d.ts +0 -34
- package/dist/dialog.js +0 -8
- package/dist/dropdown-menu.cjs +0 -378
- package/dist/dropdown-menu.d.cts +0 -60
- package/dist/dropdown-menu.d.ts +0 -60
- package/dist/dropdown-menu.js +0 -8
- package/dist/index.cjs +0 -1223
- package/dist/index.d.cts +0 -21
- package/dist/index.d.ts +0 -21
- package/dist/input.cjs +0 -67
- package/dist/input.d.cts +0 -11
- package/dist/input.d.ts +0 -11
- package/dist/input.js +0 -7
- package/dist/popover.cjs +0 -175
- package/dist/popover.d.cts +0 -53
- package/dist/popover.d.ts +0 -53
- package/dist/popover.js +0 -8
- package/dist/radio-group.cjs +0 -122
- package/dist/radio-group.d.cts +0 -25
- package/dist/radio-group.d.ts +0 -25
- package/dist/radio-group.js +0 -7
- package/dist/select.cjs +0 -266
- package/dist/select.d.cts +0 -45
- package/dist/select.d.ts +0 -45
- package/dist/select.js +0 -8
- package/dist/separator.cjs +0 -82
- package/dist/separator.d.cts +0 -12
- package/dist/separator.d.ts +0 -12
- package/dist/separator.js +0 -7
- package/dist/switch.cjs +0 -92
- package/dist/switch.d.cts +0 -16
- package/dist/switch.d.ts +0 -16
- package/dist/switch.js +0 -7
- package/dist/theme.css +0 -1097
- package/dist/tooltip.cjs +0 -148
- package/dist/tooltip.d.cts +0 -24
- package/dist/tooltip.d.ts +0 -24
- package/dist/tooltip.js +0 -8
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import type { Size } from '../../types.js';
|
|
3
|
+
export interface SkeletonProps extends useRender.ComponentProps<'div'> {
|
|
4
|
+
/** Defaults to the full width. */
|
|
5
|
+
width?: number | string;
|
|
6
|
+
/** Defaults to one line of text at `size`. */
|
|
7
|
+
height?: number | string;
|
|
8
|
+
/** A circle, for an avatar. Its width defaults to its height. */
|
|
9
|
+
round?: boolean;
|
|
10
|
+
size?: Size;
|
|
11
|
+
}
|
|
12
|
+
/** Holds the place of content that is still loading. Hidden from screen readers. */
|
|
13
|
+
export declare const Skeleton: import("react").ForwardRefExoticComponent<Omit<SkeletonProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import type { Size } from '../../types.js';
|
|
3
|
+
export interface SpinnerProps extends useRender.ComponentProps<'span'> {
|
|
4
|
+
/** 14, 16 or 20px. Defaults to the surrounding component's size, else md. */
|
|
5
|
+
size?: Size;
|
|
6
|
+
/** What is loading, for screen readers. */
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
/** A ring that turns while something short is in progress. */
|
|
10
|
+
export declare const Spinner: import("react").ForwardRefExoticComponent<Omit<SpinnerProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Switch as BaseSwitch } from '@base-ui/react/switch';
|
|
2
|
+
import type { Size } from '../../types.js';
|
|
3
|
+
export interface SwitchProps extends BaseSwitch.Root.Props {
|
|
4
|
+
/** 18, 20 or 22px tall. */
|
|
5
|
+
size?: Size;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Turns a setting on or off at once. Name it with a `Field.Label` around it,
|
|
9
|
+
* or `aria-label`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const Switch: import("react").ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { Size } from '../../types.js';
|
|
3
|
+
export interface RootProps extends ComponentPropsWithoutRef<'table'> {
|
|
4
|
+
/** `sm` for dense admin lists. Sets row height and cell text. */
|
|
5
|
+
size?: Size;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A `<table>` with rows separated by `line`. It sits in a box that scrolls
|
|
9
|
+
* sideways when the table is wider than the screen; the ref and every prop go
|
|
10
|
+
* to the `<table>`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const Root: import("react").ForwardRefExoticComponent<RootProps & import("react").RefAttributes<HTMLTableElement>>;
|
|
13
|
+
export interface HeaderProps extends ComponentPropsWithoutRef<'thead'> {
|
|
14
|
+
}
|
|
15
|
+
/** The `<thead>`, holding one Row of Head cells. */
|
|
16
|
+
export declare const Header: import("react").ForwardRefExoticComponent<HeaderProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
17
|
+
export interface BodyProps extends ComponentPropsWithoutRef<'tbody'> {
|
|
18
|
+
}
|
|
19
|
+
/** The `<tbody>`, holding the data Rows. */
|
|
20
|
+
export declare const Body: import("react").ForwardRefExoticComponent<BodyProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
21
|
+
export interface RowProps extends ComponentPropsWithoutRef<'tr'> {
|
|
22
|
+
}
|
|
23
|
+
/** A `<tr>`. Body rows highlight with `hover`. */
|
|
24
|
+
export declare const Row: import("react").ForwardRefExoticComponent<RowProps & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
25
|
+
export interface HeadProps extends ComponentPropsWithoutRef<'th'> {
|
|
26
|
+
/** Right-aligns a column of numbers. Set it on the column's Cells too. */
|
|
27
|
+
num?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** A column header, `<th scope="col">` in 12px `ink-muted`. */
|
|
30
|
+
export declare const Head: import("react").ForwardRefExoticComponent<HeadProps & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
31
|
+
export interface CellProps extends ComponentPropsWithoutRef<'td'> {
|
|
32
|
+
/** Right-aligns a number. */
|
|
33
|
+
num?: boolean;
|
|
34
|
+
/** Secondary text, such as a date, in `ink-muted`. */
|
|
35
|
+
muted?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** A data cell, `<td>`. */
|
|
38
|
+
export declare const Cell: import("react").ForwardRefExoticComponent<CellProps & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
39
|
+
export interface CaptionProps extends ComponentPropsWithoutRef<'caption'> {
|
|
40
|
+
}
|
|
41
|
+
/** Names the table, under it in `caption` style. Screen readers read it as the table's name. */
|
|
42
|
+
export declare const Caption: import("react").ForwardRefExoticComponent<CaptionProps & import("react").RefAttributes<HTMLTableCaptionElement>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Tabs as BaseTabs } from '@base-ui/react/tabs';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import type { IconElement, Size } from '../../types.js';
|
|
4
|
+
export interface RootProps extends BaseTabs.Root.Props {
|
|
5
|
+
size?: Size;
|
|
6
|
+
}
|
|
7
|
+
/** Switches between sections of the same page. Holds a List and one Panel per tab. */
|
|
8
|
+
export declare const Root: import("react").ForwardRefExoticComponent<Omit<RootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export interface ListProps extends BaseTabs.List.Props {
|
|
10
|
+
}
|
|
11
|
+
/** The well that holds the tabs, with the sliding key built in. */
|
|
12
|
+
export declare const List: import("react").ForwardRefExoticComponent<Omit<ListProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export interface TabProps extends BaseTabs.Tab.Props {
|
|
14
|
+
icon?: IconElement;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/** One tab. Its `value` matches a Panel's. */
|
|
18
|
+
export declare const Tab: import("react").ForwardRefExoticComponent<Omit<TabProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
19
|
+
export interface PanelProps extends BaseTabs.Panel.Props {
|
|
20
|
+
}
|
|
21
|
+
/** The content of one tab. */
|
|
22
|
+
export declare const Panel: import("react").ForwardRefExoticComponent<Omit<PanelProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Field as BaseField } from '@base-ui/react/field';
|
|
2
|
+
import type { Size } from '../../types.js';
|
|
3
|
+
export interface TextareaProps extends Omit<BaseField.Control.Props, 'size' | 'render'> {
|
|
4
|
+
size?: Size;
|
|
5
|
+
/** Visible lines before it scrolls. Default 3. */
|
|
6
|
+
rows?: number;
|
|
7
|
+
}
|
|
8
|
+
/** A few lines of plain text. Looks like Input. */
|
|
9
|
+
export declare const Textarea: import("react").ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Toast as BaseToast } from '@base-ui/react/toast';
|
|
2
|
+
export type ProviderProps = BaseToast.Provider.Props;
|
|
3
|
+
/** Holds the toasts. Wrap the app in it once. `timeout` (default 5000ms) and `limit` (default 3) apply to every toast. */
|
|
4
|
+
export declare const Provider: import("react").FC<import("@base-ui/react").ToastProviderProps>;
|
|
5
|
+
/**
|
|
6
|
+
* Adds, updates and closes toasts: `add({ title, description, type, actionProps, timeout })`.
|
|
7
|
+
* `type` is the tone: "success", "warning", "danger", or none for neutral.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useToastManager: typeof BaseToast.useToastManager;
|
|
10
|
+
/** A manager for code outside React. Pass it to `Provider` as `toastManager`. */
|
|
11
|
+
export declare const createToastManager: typeof BaseToast.createToastManager;
|
|
12
|
+
export interface ViewportProps extends BaseToast.Viewport.Props {
|
|
13
|
+
/** Where the toasts are portaled to. Default `document.body`. */
|
|
14
|
+
container?: BaseToast.Portal.Props['container'];
|
|
15
|
+
/** The accessible name of each toast's X button. Default "Close". */
|
|
16
|
+
closeLabel?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Shows the toasts: bottom-right, or bottom-center below `breakpoint-sm`. Render it once, inside Provider. */
|
|
19
|
+
export declare const Viewport: import("react").ForwardRefExoticComponent<Omit<ViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Toggle as BaseToggle } from '@base-ui/react/toggle';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import type { IconElement, Size } from '../../types.js';
|
|
4
|
+
export interface ToggleProps extends BaseToggle.Props {
|
|
5
|
+
size?: Size;
|
|
6
|
+
/** A Lucide element before the label. With no children the toggle is square and needs `aria-label`. */
|
|
7
|
+
icon?: IconElement;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/** Turns one option on or off and stays pressed while on. Also the item of a ToggleGroup. */
|
|
11
|
+
export declare const Toggle: import("react").ForwardRefExoticComponent<Omit<ToggleProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ToggleGroup as BaseToggleGroup } from '@base-ui/react/toggle-group';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import type { Size } from '../../types.js';
|
|
4
|
+
export interface ToggleGroupProps extends BaseToggleGroup.Props {
|
|
5
|
+
size?: Size;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A row of Toggles. With `multiple` it is a toolbar of independent on/off
|
|
10
|
+
* toggles. Without it, one choice among peers: a well with one sliding key,
|
|
11
|
+
* the same control as Tabs.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ToggleGroup: import("react").ForwardRefExoticComponent<Omit<ToggleGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
export type ProviderProps = BaseTooltip.Provider.Props;
|
|
4
|
+
/** Shares the hover delay between tooltips, so moving from one trigger to the next opens at once. */
|
|
5
|
+
export declare const Provider: import("react").FC<import("@base-ui/react").TooltipProviderProps>;
|
|
6
|
+
export type RootProps = BaseTooltip.Root.Props;
|
|
7
|
+
/** Groups a trigger and its tooltip. */
|
|
8
|
+
export declare const Root: <Payload>(props: BaseTooltip.Root.Props<Payload>) => React.JSX.Element;
|
|
9
|
+
export interface TriggerProps extends BaseTooltip.Trigger.Props {
|
|
10
|
+
/** Hover time before the tooltip opens, in ms. Default 400. */
|
|
11
|
+
delay?: number;
|
|
12
|
+
}
|
|
13
|
+
/** The control the tooltip names. Usually `render={<Button icon={...} aria-label="..." />}`. */
|
|
14
|
+
export declare const Trigger: import("react").ForwardRefExoticComponent<Omit<TriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
type PositionerProps = Pick<BaseTooltip.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'collisionPadding' | 'collisionAvoidance' | 'collisionBoundary' | 'sticky' | 'anchor' | 'positionMethod' | 'disableAnchorTracking'>;
|
|
16
|
+
export interface PopupProps extends BaseTooltip.Popup.Props, PositionerProps {
|
|
17
|
+
/** A keyboard shortcut shown after the label, such as "⌘ K". */
|
|
18
|
+
shortcut?: ReactNode;
|
|
19
|
+
/** Where the tooltip is portaled to. Default `document.body`. */
|
|
20
|
+
container?: BaseTooltip.Portal.Props['container'];
|
|
21
|
+
}
|
|
22
|
+
/** The label: two or three words, the same text as the trigger's `aria-label`. */
|
|
23
|
+
export declare const Popup: import("react").ForwardRefExoticComponent<Omit<PopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type { IconElement, Size, Tone } from './types.js';
|
|
2
|
+
export * as AlertDialog from './components/dialog/alert-dialog.js';
|
|
3
|
+
export * as Avatar from './components/avatar/index.js';
|
|
4
|
+
export { Badge, type BadgeProps } from './components/badge/index.js';
|
|
5
|
+
export { Button, buttonClasses, type ButtonClassesOptions, type ButtonProps, type ButtonVariant } from './components/button/index.js';
|
|
6
|
+
export { Checkbox, type CheckboxProps } from './components/checkbox/index.js';
|
|
7
|
+
export * as Collapsible from './components/collapsible/index.js';
|
|
8
|
+
export * as Combobox from './components/combobox/index.js';
|
|
9
|
+
export * as Dialog from './components/dialog/index.js';
|
|
10
|
+
export * as Field from './components/field/index.js';
|
|
11
|
+
export * as Fieldset from './components/field/fieldset.js';
|
|
12
|
+
export { Input, type InputProps } from './components/input/index.js';
|
|
13
|
+
export { Kbd, type KbdProps } from './components/kbd/index.js';
|
|
14
|
+
export { Link, type LinkProps } from './components/link/index.js';
|
|
15
|
+
export * as Menu from './components/menu/index.js';
|
|
16
|
+
export * as Popover from './components/popover/index.js';
|
|
17
|
+
export { Prose, type ProseProps } from './components/prose/index.js';
|
|
18
|
+
export { Radio, RadioGroup, type RadioGroupProps, type RadioProps } from './components/radio-group/index.js';
|
|
19
|
+
export * as Select from './components/select/index.js';
|
|
20
|
+
export { Separator, type SeparatorProps } from './components/separator/index.js';
|
|
21
|
+
export { Skeleton, type SkeletonProps } from './components/skeleton/index.js';
|
|
22
|
+
export { Spinner, type SpinnerProps } from './components/spinner/index.js';
|
|
23
|
+
export { Switch, type SwitchProps } from './components/switch/index.js';
|
|
24
|
+
export * as Table from './components/table/index.js';
|
|
25
|
+
export * as Tabs from './components/tabs/index.js';
|
|
26
|
+
export { Textarea, type TextareaProps } from './components/textarea/index.js';
|
|
27
|
+
export * as Toast from './components/toast/index.js';
|
|
28
|
+
export { Toggle, type ToggleProps } from './components/toggle/index.js';
|
|
29
|
+
export { ToggleGroup, type ToggleGroupProps } from './components/toggle-group/index.js';
|
|
30
|
+
export * as Tooltip from './components/tooltip/index.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Joins class names, skipping empty ones. */
|
|
2
|
+
export declare function cx(...names: (string | false | null | undefined)[]): string;
|
|
3
|
+
/**
|
|
4
|
+
* Puts our classes before the app's `className`, which Base UI lets be a
|
|
5
|
+
* function of the part's state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function withClass<State>(ours: string, theirs: string | ((state: State) => string | undefined) | undefined): string | ((state: State) => string);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Base UI's Positioner props that every folded `Popup` part accepts. */
|
|
2
|
+
declare const positionerKeys: readonly ["side", "align", "sideOffset", "alignOffset", "collisionPadding", "collisionAvoidance", "collisionBoundary", "sticky", "anchor", "positionMethod", "arrowPadding", "disableAnchorTracking", "alignItemWithTrigger"];
|
|
3
|
+
type PositionerKey = (typeof positionerKeys)[number];
|
|
4
|
+
/**
|
|
5
|
+
* Splits a folded Popup's props into the ones for Base UI's Positioner and
|
|
6
|
+
* the rest, for its Popup.
|
|
7
|
+
*/
|
|
8
|
+
export declare function splitPositioner<Props extends object>(props: Props): readonly [Record<string, unknown>, Omit<Props, "anchor" | "side" | "align" | "sideOffset" | "alignOffset" | "collisionPadding" | "collisionAvoidance" | "collisionBoundary" | "sticky" | "positionMethod" | "arrowPadding" | "disableAnchorTracking" | "alignItemWithTrigger">];
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Size } from '../types.js';
|
|
2
|
+
/** The size set on a component's Root, read by its parts. */
|
|
3
|
+
export declare const SizeContext: import("react").Context<Size | undefined>;
|
|
4
|
+
/** The size to render at: the component's own prop, else the nearest Root's, else md. */
|
|
5
|
+
export declare function useSize(size?: Size): Size;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
/** Control size. One value sets height, padding, text, icon size and radius together. */
|
|
3
|
+
export type Size = 'sm' | 'md' | 'lg';
|
|
4
|
+
/** Status tone for components that report a status, such as Badge and toasts. */
|
|
5
|
+
export type Tone = 'neutral' | 'success' | 'warning' | 'danger';
|
|
6
|
+
/** A Lucide icon element, such as `<Pin />` from lucide-react. Size and stroke come from the component. */
|
|
7
|
+
export type IconElement = ReactElement;
|