@usememos/ui 26.10.0 → 26.10.1
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 +65 -92
- package/dist/InterVariable-Italic.woff2 +0 -0
- package/dist/InterVariable.woff2 +0 -0
- package/dist/OFL.txt +92 -0
- 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 +2145 -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,34 @@
|
|
|
1
|
+
import { Dialog as BaseDialog } from '@base-ui/react/dialog';
|
|
2
|
+
import { type HTMLAttributes } from 'react';
|
|
3
|
+
export type RootProps = BaseDialog.Root.Props;
|
|
4
|
+
export interface TriggerProps extends BaseDialog.Trigger.Props {
|
|
5
|
+
}
|
|
6
|
+
export interface PopupProps extends BaseDialog.Popup.Props {
|
|
7
|
+
/** Where the dialog is portaled to. Default `document.body`. */
|
|
8
|
+
container?: BaseDialog.Portal.Props['container'];
|
|
9
|
+
/** Below `breakpoint-sm` the dialog becomes a sheet from the bottom. `false` keeps it centered. Default true. */
|
|
10
|
+
sheet?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface TitleProps extends BaseDialog.Title.Props {
|
|
13
|
+
}
|
|
14
|
+
export interface DescriptionProps extends BaseDialog.Description.Props {
|
|
15
|
+
}
|
|
16
|
+
export interface CloseProps extends BaseDialog.Close.Props {
|
|
17
|
+
}
|
|
18
|
+
export interface FooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Builds the styled parts on Base UI's Dialog or AlertDialog, which share
|
|
22
|
+
* their anatomy. `closeButton` adds the X at the top right of the popup.
|
|
23
|
+
*/
|
|
24
|
+
export declare function createDialogParts(Base: typeof BaseDialog, name: 'dialog' | 'alert-dialog', closeButton: boolean): {
|
|
25
|
+
Root: <Payload>(props: BaseDialog.Root.Props<Payload>) => React.JSX.Element;
|
|
26
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<TriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
Popup: import("react").ForwardRefExoticComponent<Omit<PopupProps & {
|
|
28
|
+
closeLabel?: string;
|
|
29
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
30
|
+
Title: import("react").ForwardRefExoticComponent<Omit<TitleProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
31
|
+
Description: import("react").ForwardRefExoticComponent<Omit<DescriptionProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
32
|
+
Close: import("react").ForwardRefExoticComponent<Omit<CloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
33
|
+
Footer: import("react").ForwardRefExoticComponent<FooterProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Fieldset as BaseFieldset } from '@base-ui/react/fieldset';
|
|
2
|
+
import type { Size } from '../../types.js';
|
|
3
|
+
export interface RootProps extends BaseFieldset.Root.Props {
|
|
4
|
+
size?: Size;
|
|
5
|
+
}
|
|
6
|
+
/** A group of checkboxes, radios or switches with one legend. */
|
|
7
|
+
export declare const Root: import("react").ForwardRefExoticComponent<Omit<RootProps, "ref"> & import("react").RefAttributes<HTMLFieldSetElement>>;
|
|
8
|
+
export interface LegendProps extends BaseFieldset.Legend.Props {
|
|
9
|
+
}
|
|
10
|
+
/** The group's name. */
|
|
11
|
+
export declare const Legend: import("react").ForwardRefExoticComponent<Omit<LegendProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Field as BaseField } from '@base-ui/react/field';
|
|
2
|
+
import type { Size } from '../../types.js';
|
|
3
|
+
export interface RootProps extends BaseField.Root.Props {
|
|
4
|
+
/** The size of the control inside, passed on to it. */
|
|
5
|
+
size?: Size;
|
|
6
|
+
}
|
|
7
|
+
/** One control with its label, description and error, wired for screen readers. */
|
|
8
|
+
export declare const Root: import("react").ForwardRefExoticComponent<Omit<RootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export interface LabelProps extends BaseField.Label.Props {
|
|
10
|
+
}
|
|
11
|
+
/** The label above a text control, or beside a Checkbox, Switch or Radio placed inside it. */
|
|
12
|
+
export declare const Label: import("react").ForwardRefExoticComponent<Omit<LabelProps, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
13
|
+
export interface ItemProps extends BaseField.Item.Props {
|
|
14
|
+
}
|
|
15
|
+
/** One option of a checkbox or radio group inside a Field: holds a Field.Label around the control. */
|
|
16
|
+
export declare const Item: import("react").ForwardRefExoticComponent<Omit<ItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export interface DescriptionProps extends BaseField.Description.Props {
|
|
18
|
+
}
|
|
19
|
+
/** One line of help under the control. Hidden while the field shows an error. */
|
|
20
|
+
export declare const Description: import("react").ForwardRefExoticComponent<Omit<DescriptionProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
21
|
+
export interface ErrorProps extends BaseField.Error.Props {
|
|
22
|
+
}
|
|
23
|
+
/** What is wrong and how to fix it, after a CircleAlert icon. Shown when the field is invalid. */
|
|
24
|
+
export declare const Error: import("react").ForwardRefExoticComponent<Omit<ErrorProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Input as BaseInput } from '@base-ui/react/input';
|
|
2
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
3
|
+
import type { Size } from '../../types.js';
|
|
4
|
+
export interface InputProps extends Omit<BaseInput.Props, 'size' | 'prefix' | 'className' | 'style'> {
|
|
5
|
+
size?: Size;
|
|
6
|
+
/** Says what the field is: a search or link icon. */
|
|
7
|
+
prefix?: ReactNode;
|
|
8
|
+
/** One action on the value (copy, clear), or a unit. */
|
|
9
|
+
suffix?: ReactNode;
|
|
10
|
+
/** Classes for the visible box around the input. */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Styles for the visible box around the input. */
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* One line of text: flat `surface` with an `edge`. The ref and every other
|
|
17
|
+
* prop go to the `<input>`; `className` and `style` go to the box around it.
|
|
18
|
+
*/
|
|
19
|
+
export declare const Input: import("react").ForwardRefExoticComponent<Omit<InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
export interface KbdProps extends useRender.ComponentProps<'kbd'> {
|
|
3
|
+
}
|
|
4
|
+
/** One keyboard key, such as "⌘", "Enter" or "/", as a tiny raised key. */
|
|
5
|
+
export declare const Kbd: import("react").ForwardRefExoticComponent<Omit<KbdProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
export interface LinkProps extends useRender.ComponentProps<'a'> {
|
|
3
|
+
/** For navigation that shouldn't draw the eye: ink-muted, ink on hover. */
|
|
4
|
+
muted?: boolean;
|
|
5
|
+
/** Opens in a new tab and shows an arrow. */
|
|
6
|
+
external?: boolean;
|
|
7
|
+
/** `always` inside running text, so the link isn't told apart by color alone. Default `hover`. */
|
|
8
|
+
underline?: 'hover' | 'always';
|
|
9
|
+
}
|
|
10
|
+
/** Goes somewhere. Accent text that underlines on hover and focus. */
|
|
11
|
+
export declare const Link: import("react").ForwardRefExoticComponent<Omit<LinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Menu as BaseMenu } from '@base-ui/react/menu';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import type { IconElement, Size } from '../../types.js';
|
|
4
|
+
export interface RootProps extends BaseMenu.Root.Props {
|
|
5
|
+
/** Row height of every item: 24, 32 or 40px. */
|
|
6
|
+
size?: Size;
|
|
7
|
+
}
|
|
8
|
+
/** Groups a trigger and its menu. */
|
|
9
|
+
export declare function Root({ size, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export interface TriggerProps extends BaseMenu.Trigger.Props {
|
|
11
|
+
}
|
|
12
|
+
/** Opens the menu. Usually `render={<Button variant="ghost" icon={<Ellipsis />} aria-label="More actions" />}`. */
|
|
13
|
+
export declare const Trigger: import("react").ForwardRefExoticComponent<Omit<TriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
type PositionerProps = Pick<BaseMenu.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'collisionPadding' | 'collisionAvoidance' | 'collisionBoundary' | 'sticky' | 'anchor' | 'positionMethod' | 'disableAnchorTracking'>;
|
|
15
|
+
export interface PopupProps extends BaseMenu.Popup.Props, PositionerProps {
|
|
16
|
+
/** Where the menu is portaled to. Default `document.body`. */
|
|
17
|
+
container?: BaseMenu.Portal.Props['container'];
|
|
18
|
+
}
|
|
19
|
+
/** The list of items. Also the popup of a submenu, inside `SubmenuRoot`. */
|
|
20
|
+
export declare const Popup: import("react").ForwardRefExoticComponent<Omit<PopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
+
interface RowProps {
|
|
22
|
+
/** A Lucide element before the label. */
|
|
23
|
+
icon?: IconElement;
|
|
24
|
+
/** A keyboard shortcut at the end of the row, such as "⌘ D". */
|
|
25
|
+
shortcut?: ReactNode;
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export interface ItemProps extends BaseMenu.Item.Props, RowProps {
|
|
29
|
+
/** A destructive action: red text. Put it last, after a Separator. */
|
|
30
|
+
danger?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** One action. */
|
|
33
|
+
export declare const Item: import("react").ForwardRefExoticComponent<Omit<ItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
export interface CheckboxItemProps extends BaseMenu.CheckboxItem.Props, RowProps {
|
|
35
|
+
}
|
|
36
|
+
/** An option that turns on or off, with a check at the end. Stays open on click. */
|
|
37
|
+
export declare const CheckboxItem: import("react").ForwardRefExoticComponent<Omit<CheckboxItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
38
|
+
export interface RadioGroupProps extends BaseMenu.RadioGroup.Props {
|
|
39
|
+
}
|
|
40
|
+
/** Groups RadioItems: exactly one is chosen. */
|
|
41
|
+
export declare const RadioGroup: import("react").ForwardRefExoticComponent<Omit<RadioGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
42
|
+
export interface RadioItemProps extends BaseMenu.RadioItem.Props, RowProps {
|
|
43
|
+
}
|
|
44
|
+
/** One choice in a RadioGroup, with a check at the end when chosen. Stays open on click. */
|
|
45
|
+
export declare const RadioItem: import("react").ForwardRefExoticComponent<Omit<RadioItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
|
+
export interface GroupProps extends BaseMenu.Group.Props {
|
|
47
|
+
}
|
|
48
|
+
/** A labeled set of items. */
|
|
49
|
+
export declare const Group: import("react").ForwardRefExoticComponent<Omit<GroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
50
|
+
export interface GroupLabelProps extends BaseMenu.GroupLabel.Props {
|
|
51
|
+
}
|
|
52
|
+
/** The name of a Group or RadioGroup. */
|
|
53
|
+
export declare const GroupLabel: import("react").ForwardRefExoticComponent<Omit<GroupLabelProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
54
|
+
export interface SeparatorProps extends BaseMenu.Separator.Props {
|
|
55
|
+
}
|
|
56
|
+
/** A line between groups of items. */
|
|
57
|
+
export declare const Separator: import("react").ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
58
|
+
export type SubmenuRootProps = BaseMenu.SubmenuRoot.Props;
|
|
59
|
+
/** Holds a SubmenuTrigger and its own Popup. */
|
|
60
|
+
export declare const SubmenuRoot: typeof BaseMenu.SubmenuRoot;
|
|
61
|
+
export interface SubmenuTriggerProps extends BaseMenu.SubmenuTrigger.Props {
|
|
62
|
+
icon?: IconElement;
|
|
63
|
+
children?: ReactNode;
|
|
64
|
+
}
|
|
65
|
+
/** The row that opens a submenu, with a chevron at the end. */
|
|
66
|
+
export declare const SubmenuTrigger: import("react").ForwardRefExoticComponent<Omit<SubmenuTriggerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Popover as BasePopover } from '@base-ui/react/popover';
|
|
2
|
+
export type RootProps = BasePopover.Root.Props;
|
|
3
|
+
/** Groups a trigger and its popover. */
|
|
4
|
+
export declare const Root: typeof BasePopover.Root;
|
|
5
|
+
export interface TriggerProps extends BasePopover.Trigger.Props {
|
|
6
|
+
}
|
|
7
|
+
/** Opens the popover. Usually `render={<Button />}`. */
|
|
8
|
+
export declare const Trigger: import("react").ForwardRefExoticComponent<Omit<TriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
type PositionerProps = Pick<BasePopover.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'collisionPadding' | 'collisionAvoidance' | 'collisionBoundary' | 'sticky' | 'anchor' | 'positionMethod' | 'disableAnchorTracking'>;
|
|
10
|
+
export interface PopupProps extends BasePopover.Popup.Props, PositionerProps {
|
|
11
|
+
/** Where the popover is portaled to. Default `document.body`. */
|
|
12
|
+
container?: BasePopover.Portal.Props['container'];
|
|
13
|
+
}
|
|
14
|
+
/** The panel: a surface with `shadow-pop`, `popover-width` wide. */
|
|
15
|
+
export declare const Popup: import("react").ForwardRefExoticComponent<Omit<PopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export interface TitleProps extends BasePopover.Title.Props {
|
|
17
|
+
}
|
|
18
|
+
/** The popover's heading, an `<h2>`. Names the popup for screen readers. */
|
|
19
|
+
export declare const Title: import("react").ForwardRefExoticComponent<Omit<TitleProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
20
|
+
export interface DescriptionProps extends BasePopover.Description.Props {
|
|
21
|
+
}
|
|
22
|
+
/** One line under the title, a `<p>`. */
|
|
23
|
+
export declare const Description: import("react").ForwardRefExoticComponent<Omit<DescriptionProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
24
|
+
export interface CloseProps extends BasePopover.Close.Props {
|
|
25
|
+
}
|
|
26
|
+
/** Closes the popover. Usually `render={<Button />}`. */
|
|
27
|
+
export declare const Close: import("react").ForwardRefExoticComponent<Omit<CloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface ProseProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
/** `md` is 15px on a 24px line for reading; `sm` is 14px on 22px, for dense lists. */
|
|
4
|
+
size?: 'sm' | 'md';
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Styles rendered Markdown inside it: headings, paragraphs, lists, task lists,
|
|
8
|
+
* code, quotes, tables, images and links. Put the rendered HTML in it as
|
|
9
|
+
* children. Without React, use the `mu-prose` class.
|
|
10
|
+
*/
|
|
11
|
+
export declare const Prose: import("react").ForwardRefExoticComponent<ProseProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Radio as BaseRadio } from '@base-ui/react/radio';
|
|
2
|
+
import { RadioGroup as BaseRadioGroup } from '@base-ui/react/radio-group';
|
|
3
|
+
import type { Size } from '../../types.js';
|
|
4
|
+
export interface RadioGroupProps extends BaseRadioGroup.Props {
|
|
5
|
+
size?: Size;
|
|
6
|
+
/** How the radios are laid out. Default `vertical`. */
|
|
7
|
+
orientation?: 'vertical' | 'horizontal';
|
|
8
|
+
}
|
|
9
|
+
/** Exactly one option from a short list that is always visible. Holds Radio items, each inside a Field.Label. */
|
|
10
|
+
export declare const RadioGroup: import("react").ForwardRefExoticComponent<Omit<RadioGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export interface RadioProps extends BaseRadio.Root.Props {
|
|
12
|
+
size?: Size;
|
|
13
|
+
}
|
|
14
|
+
/** One option: a round well that becomes a flat primary circle with a dot. */
|
|
15
|
+
export declare const Radio: import("react").ForwardRefExoticComponent<Omit<RadioProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Select as BaseSelect } from '@base-ui/react/select';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import type { IconElement, Size } from '../../types.js';
|
|
4
|
+
export type RootProps<Value, Multiple extends boolean | undefined = false> = BaseSelect.Root.Props<Value, Multiple> & {
|
|
5
|
+
size?: Size;
|
|
6
|
+
};
|
|
7
|
+
/** Groups the trigger and the list, and holds the value. Pass `items` so `Value` shows labels, not raw values. */
|
|
8
|
+
export declare function Root<Value, Multiple extends boolean | undefined = false>({ size, ...props }: RootProps<Value, Multiple>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export interface TriggerProps extends BaseSelect.Trigger.Props {
|
|
10
|
+
}
|
|
11
|
+
/** A neutral key that shows the value, with a chevron at the end. Holds `Value`. */
|
|
12
|
+
export declare const Trigger: import("react").ForwardRefExoticComponent<Omit<TriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
export interface ValueProps extends BaseSelect.Value.Props {
|
|
14
|
+
}
|
|
15
|
+
/** The chosen item's label, or `placeholder` in `ink-muted`. */
|
|
16
|
+
export declare const Value: import("react").ForwardRefExoticComponent<Omit<ValueProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
17
|
+
type PositionerProps = Pick<BaseSelect.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'collisionPadding' | 'collisionAvoidance' | 'collisionBoundary' | 'sticky' | 'anchor' | 'positionMethod' | 'disableAnchorTracking' | 'alignItemWithTrigger'>;
|
|
18
|
+
export interface PopupProps extends BaseSelect.Popup.Props, PositionerProps {
|
|
19
|
+
/** Where the list is portaled to. Default `document.body`. */
|
|
20
|
+
container?: BaseSelect.Portal.Props['container'];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The list of items. By default it opens over the trigger with the chosen
|
|
24
|
+
* item on top of the value; `alignItemWithTrigger={false}` opens it below.
|
|
25
|
+
*/
|
|
26
|
+
export declare const Popup: import("react").ForwardRefExoticComponent<Omit<PopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
27
|
+
export interface ItemProps extends BaseSelect.Item.Props {
|
|
28
|
+
/** A Lucide element before the label. */
|
|
29
|
+
icon?: IconElement;
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
/** One option, with a check at the end when chosen. */
|
|
33
|
+
export declare const Item: import("react").ForwardRefExoticComponent<Omit<ItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
export interface GroupProps extends BaseSelect.Group.Props {
|
|
35
|
+
}
|
|
36
|
+
/** A labeled set of items. */
|
|
37
|
+
export declare const Group: import("react").ForwardRefExoticComponent<Omit<GroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
38
|
+
export interface GroupLabelProps extends BaseSelect.GroupLabel.Props {
|
|
39
|
+
}
|
|
40
|
+
/** The name of a Group. */
|
|
41
|
+
export declare const GroupLabel: import("react").ForwardRefExoticComponent<Omit<GroupLabelProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
42
|
+
export interface SeparatorProps extends BaseSelect.Separator.Props {
|
|
43
|
+
}
|
|
44
|
+
/** A line between groups of items. */
|
|
45
|
+
export declare const Separator: import("react").ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Separator as BaseSeparator } from '@base-ui/react/separator';
|
|
2
|
+
export interface SeparatorProps extends BaseSeparator.Props {
|
|
3
|
+
}
|
|
4
|
+
/** A 1px line between groups of content. */
|
|
5
|
+
export declare const Separator: import("react").ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -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;
|