@central-ui/react 0.3.0 → 0.4.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.
- package/dist/components/accordion/index.d.ts +14 -14
- package/dist/components/accordion/index.js +19 -19
- package/dist/components/autocomplete/index.d.ts +51 -47
- package/dist/components/autocomplete/index.js +57 -57
- package/dist/components/avatar/index.d.ts +7 -6
- package/dist/components/avatar/index.js +9 -9
- package/dist/components/banner/index.js +1 -1
- package/dist/components/carousel/index.d.ts +31 -11
- package/dist/components/carousel/index.js +25 -21
- package/dist/components/checkbox/index.d.ts +12 -11
- package/dist/components/checkbox/index.js +21 -21
- package/dist/components/combobox/index.d.ts +56 -56
- package/dist/components/combobox/index.js +67 -68
- package/dist/components/datepicker/index.d.ts +8 -9
- package/dist/components/datepicker/index.js +13 -13
- package/dist/components/dialog/index.d.ts +18 -18
- package/dist/components/dialog/index.js +22 -21
- package/dist/components/drawer/index.d.ts +24 -24
- package/dist/components/drawer/index.js +28 -27
- package/dist/components/exception/index.d.ts +23 -11
- package/dist/components/exception/index.js +17 -17
- package/dist/components/fileupload/index.d.ts +8 -8
- package/dist/components/input/index.d.ts +14 -14
- package/dist/components/input/index.js +27 -27
- package/dist/components/menu/index.d.ts +37 -37
- package/dist/components/menu/index.js +47 -47
- package/dist/components/numberinput/index.d.ts +22 -22
- package/dist/components/numberinput/index.js +35 -35
- package/dist/components/otpinput/index.d.ts +12 -12
- package/dist/components/otpinput/index.js +21 -21
- package/dist/components/passwordinput/index.d.ts +15 -15
- package/dist/components/passwordinput/index.js +27 -27
- package/dist/components/popover/index.d.ts +16 -16
- package/dist/components/popover/index.js +20 -19
- package/dist/components/radio/index.d.ts +12 -12
- package/dist/components/radio/index.js +25 -25
- package/dist/components/ratinginput/index.d.ts +1 -1
- package/dist/components/ratinginput/index.js +3 -3
- package/dist/components/select/index.d.ts +29 -29
- package/dist/components/select/index.js +33 -33
- package/dist/components/slider/index.d.ts +20 -20
- package/dist/components/slider/index.js +27 -27
- package/dist/components/stepper/index.d.ts +8 -7
- package/dist/components/stepper/index.js +4 -2
- package/dist/components/switch/index.d.ts +9 -9
- package/dist/components/switch/index.js +17 -17
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table/index.js +16 -16
- package/dist/components/tabs/index.d.ts +10 -10
- package/dist/components/tabs/index.js +11 -11
- package/dist/components/textarea/index.d.ts +13 -13
- package/dist/components/textarea/index.js +25 -25
- package/dist/components/toast/index.d.ts +11 -11
- package/dist/components/toast/index.js +11 -11
- package/dist/components/toggle/index.d.ts +7 -7
- package/dist/components/toggle/index.js +9 -9
- package/dist/components/tooltip/index.d.ts +6 -6
- package/dist/components/tooltip/index.js +6 -7
- package/dist/components/tour/index.d.ts +2 -2
- package/dist/components/tour/index.js +5 -4
- package/dist/utils/icons.d.ts +92 -23
- package/dist/utils/icons.js +3 -3
- package/package.json +69 -69
- package/src/presets/shopify-polaris/shopify-polaris-accordion.css +28 -28
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-accordion.css +28 -28
|
@@ -49,34 +49,34 @@ export declare function Root({ children, id, validation, value, defaultValue, on
|
|
|
49
49
|
export type InputProps = Omit<BaseInput.Props, 'id' | 'name' | 'form' | 'value' | 'defaultValue' | 'onValueChange' | 'disabled' | 'readOnly' | 'required' | 'type' | 'className' | 'render'> & {
|
|
50
50
|
className?: string;
|
|
51
51
|
} & StyleProps;
|
|
52
|
-
export declare
|
|
53
|
-
export declare
|
|
54
|
-
export declare
|
|
52
|
+
export declare function Input({ disableStyle, className, 'aria-describedby': describedBy, ref, ...props }: InputProps): import("react").JSX.Element;
|
|
53
|
+
export declare function InputGroup({ disableStyle, className, onClick, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
54
|
+
export declare function Container({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
55
55
|
/** Labels the associated control automatically. Supply the visible text; do not wire a second label association. */
|
|
56
|
-
export declare
|
|
57
|
-
export declare
|
|
56
|
+
export declare function Label({ disableStyle, className, ref, ...props }: Omit<ComponentProps<'label'>, 'htmlFor'> & StyleProps): import("react").JSX.Element;
|
|
57
|
+
export declare function Description({ disableStyle, className, id, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
58
58
|
type MessageProps = Omit<ComponentProps<'div'>, 'children'> & StyleProps & {
|
|
59
59
|
children?: ValidationMessageChildren;
|
|
60
60
|
};
|
|
61
61
|
/** Shows itself only while Root's validation is `'error'`: with no children it shows the message from `['error', message]`, a function children formats that message, and other children replace it. */
|
|
62
|
-
export declare
|
|
62
|
+
export declare function Error({ children, ref, ...props }: MessageProps): import("react").JSX.Element | null;
|
|
63
63
|
/** Shows itself only while Root's validation is `'success'`: with no children it shows the message from `['success', message]`, a function children formats that message, and other children replace it. */
|
|
64
|
-
export declare
|
|
65
|
-
export declare
|
|
64
|
+
export declare function Success({ children, ref, ...props }: MessageProps): import("react").JSX.Element | null;
|
|
65
|
+
export declare function Addon({ disableStyle, className, variant, ref, ...props }: ComponentProps<'div'> & StyleProps & {
|
|
66
66
|
/** Choose the preset appearance; this does not add action behavior. */
|
|
67
|
-
variant?:
|
|
68
|
-
}
|
|
69
|
-
export declare
|
|
67
|
+
variant?: 'normal' | 'emphasized';
|
|
68
|
+
}): import("react").JSX.Element;
|
|
69
|
+
export declare function AddonText({ disableStyle, className, ref, ...props }: ComponentProps<'span'> & StyleProps): import("react").JSX.Element;
|
|
70
70
|
/** Supply the decorative icon as a child. Its classes are preserved; interaction belongs to the surrounding control. */
|
|
71
71
|
export declare function AddonIcon(props: Omit<ComponentProps<'svg'>, 'children'> & StyleProps & {
|
|
72
72
|
/** Supply the decorative icon; the wrapper forwards the relevant state and preserves its classes. */
|
|
73
73
|
children: ReactElement<ComponentProps<'svg'>>;
|
|
74
74
|
}): import("react").JSX.Element;
|
|
75
|
-
export declare
|
|
75
|
+
export declare function AddonButton({ disableStyle, className, disabled, type, ref, ...props }: ComponentProps<'button'> & StyleProps): import("react").JSX.Element;
|
|
76
76
|
/** Built-in icon; no children needed. Use it inside its matching control. */
|
|
77
|
-
export declare
|
|
77
|
+
export declare function AddonLoadingIcon({ disableStyle, className, strokeWidth, ref, ...props }: Omit<SVGIconProps, 'children'> & StyleProps): import("react").JSX.Element;
|
|
78
78
|
/** Clears the control automatically; no clearing click handler needed. Supply the clear icon and an accessible name. */
|
|
79
|
-
export declare
|
|
79
|
+
export declare function AddonClearButton({ disableStyle, className, disabled, onClick, ref, ...props }: ComponentProps<'button'> & StyleProps): import("react").JSX.Element;
|
|
80
80
|
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
81
81
|
export declare function AddonClearButtonIcon({ children, ...props }: Omit<ComponentProps<'svg'>, 'children'> & StyleProps & {
|
|
82
82
|
/** Omit for the supplied default icon; pass a child only to replace it. */
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Input as BaseInput } from '@base-ui/react/input';
|
|
3
3
|
import { LoaderCircle, X } from "../../utils/icons.js";
|
|
4
4
|
import { useForwardClickToInput } from "../../utils/useForwardClickToInput.js";
|
|
5
|
-
import { cloneElement, createContext,
|
|
5
|
+
import { cloneElement, createContext, useContext, useEffect, useId, useRef, useState } from 'react';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
7
|
import { readValidation, validationAttributes, validationMessageContent } from "../../utils/Validation.js";
|
|
8
8
|
/**
|
|
@@ -68,7 +68,7 @@ export function Root({ children, id, validation, value, defaultValue, onValueCha
|
|
|
68
68
|
setDescribedByIds,
|
|
69
69
|
}, children: children }));
|
|
70
70
|
}
|
|
71
|
-
export
|
|
71
|
+
export function Input({ disableStyle, className, 'aria-describedby': describedBy, ref, ...props }) {
|
|
72
72
|
const context = useInputContext();
|
|
73
73
|
const attributes = usePartAttributes();
|
|
74
74
|
// Resetting the internal value when the surrounding html form resets, since the input is always controlled by Root's value
|
|
@@ -92,74 +92,74 @@ export const Input = /* @__PURE__ */ forwardRef(function Input({ disableStyle, c
|
|
|
92
92
|
if (!details.isCanceled && !context.controlled)
|
|
93
93
|
context.setValueInternalState(nextValue);
|
|
94
94
|
}, "data-component": "input-input", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
95
|
-
}
|
|
96
|
-
export
|
|
95
|
+
}
|
|
96
|
+
export function InputGroup({ disableStyle, className, onClick, ref, ...props }) {
|
|
97
97
|
const attributes = usePartAttributes();
|
|
98
98
|
// Focusing the input when clicking anywhere in the group, like on its padding or an addon text
|
|
99
99
|
const forwardClick = useForwardClickToInput('input:not([type="hidden"])', onClick);
|
|
100
100
|
return _jsx("div", { ...attributes, ...props, ref: ref, onClick: forwardClick, "data-component": "input-inputgroup", "data-style-disabled": disableStyle ? '' : undefined, className: className });
|
|
101
|
-
}
|
|
102
|
-
export
|
|
101
|
+
}
|
|
102
|
+
export function Container({ disableStyle, className, ref, ...props }) {
|
|
103
103
|
const attributes = usePartAttributes();
|
|
104
104
|
return _jsx("div", { ...attributes, ...props, ref: ref, "data-component": "input-container", "data-style-disabled": disableStyle ? '' : undefined, className: className });
|
|
105
|
-
}
|
|
105
|
+
}
|
|
106
106
|
/** Labels the associated control automatically. Supply the visible text; do not wire a second label association. */
|
|
107
|
-
export
|
|
107
|
+
export function Label({ disableStyle, className, ref, ...props }) {
|
|
108
108
|
const context = useInputContext();
|
|
109
109
|
const attributes = usePartAttributes();
|
|
110
110
|
return _jsx("label", { ...attributes, ...props, ref: ref, htmlFor: context.inputId, "data-component": "input-label", "data-style-disabled": disableStyle ? '' : undefined, className: className });
|
|
111
|
-
}
|
|
112
|
-
export
|
|
111
|
+
}
|
|
112
|
+
export function Description({ disableStyle, className, id, ref, ...props }) {
|
|
113
113
|
const describedById = useDescribedById(id);
|
|
114
114
|
const attributes = usePartAttributes();
|
|
115
115
|
return _jsx("div", { ...attributes, ...props, id: describedById, ref: ref, "data-component": "input-description", "data-style-disabled": disableStyle ? '' : undefined, className: className });
|
|
116
|
-
}
|
|
116
|
+
}
|
|
117
117
|
/** Shows itself only while Root's validation is `'error'`: with no children it shows the message from `['error', message]`, a function children formats that message, and other children replace it. */
|
|
118
|
-
export
|
|
118
|
+
export function Error({ children, ref, ...props }) {
|
|
119
119
|
const context = useInputContext();
|
|
120
120
|
const content = validationMessageContent(context.validation, 'error', children);
|
|
121
121
|
if (content === undefined)
|
|
122
122
|
return null;
|
|
123
123
|
return _jsx(Message, { ...props, ref: ref, role: "alert", component: "input-error", children: content });
|
|
124
|
-
}
|
|
124
|
+
}
|
|
125
125
|
/** Shows itself only while Root's validation is `'success'`: with no children it shows the message from `['success', message]`, a function children formats that message, and other children replace it. */
|
|
126
|
-
export
|
|
126
|
+
export function Success({ children, ref, ...props }) {
|
|
127
127
|
const context = useInputContext();
|
|
128
128
|
const content = validationMessageContent(context.validation, 'success', children);
|
|
129
129
|
if (content === undefined)
|
|
130
130
|
return null;
|
|
131
131
|
return _jsx(Message, { ...props, ref: ref, role: "status", component: "input-success", children: content });
|
|
132
|
-
}
|
|
132
|
+
}
|
|
133
133
|
// The shared body of Error and Success, mounted only while they show, so only visible messages describe the input
|
|
134
|
-
|
|
134
|
+
function Message({ disableStyle, className, id, component, ref, ...props }) {
|
|
135
135
|
const describedById = useDescribedById(id);
|
|
136
136
|
const attributes = usePartAttributes();
|
|
137
137
|
return _jsx("div", { "aria-atomic": "true", ...attributes, ...props, id: describedById, ref: ref, "data-component": component, "data-style-disabled": disableStyle ? '' : undefined, className: className });
|
|
138
|
-
}
|
|
139
|
-
export
|
|
138
|
+
}
|
|
139
|
+
export function Addon({ disableStyle, className, variant = 'normal', ref, ...props }) {
|
|
140
140
|
const attributes = usePartAttributes();
|
|
141
141
|
return _jsx("div", { ...attributes, ...props, ref: ref, "data-variant": variant, "data-component": "input-addon", "data-style-disabled": disableStyle ? '' : undefined, className: className });
|
|
142
|
-
}
|
|
143
|
-
export
|
|
142
|
+
}
|
|
143
|
+
export function AddonText({ disableStyle, className, ref, ...props }) {
|
|
144
144
|
const attributes = usePartAttributes();
|
|
145
145
|
return _jsx("span", { ...attributes, ...props, ref: ref, "data-component": "input-addontext", "data-style-disabled": disableStyle ? '' : undefined, className: className });
|
|
146
|
-
}
|
|
146
|
+
}
|
|
147
147
|
/** Supply the decorative icon as a child. Its classes are preserved; interaction belongs to the surrounding control. */
|
|
148
148
|
export function AddonIcon(props) {
|
|
149
149
|
return _jsx(ClonedIcon, { ...props, component: "input-addonicon" });
|
|
150
150
|
}
|
|
151
|
-
export
|
|
151
|
+
export function AddonButton({ disableStyle, className, disabled, type = 'button', ref, ...props }) {
|
|
152
152
|
const context = useInputContext();
|
|
153
153
|
const attributes = usePartAttributes();
|
|
154
154
|
return _jsx("button", { ...attributes, ...props, ref: ref, type: type, disabled: disabled || context.disabled || context.readOnly, "data-component": "input-addonbutton", "data-style-disabled": disableStyle ? '' : undefined, className: className });
|
|
155
|
-
}
|
|
155
|
+
}
|
|
156
156
|
/** Built-in icon; no children needed. Use it inside its matching control. */
|
|
157
|
-
export
|
|
157
|
+
export function AddonLoadingIcon({ disableStyle, className, strokeWidth = 1.5, ref, ...props }) {
|
|
158
158
|
const attributes = usePartAttributes();
|
|
159
159
|
return _jsx(LoaderCircle, { ...attributes, "aria-hidden": true, ...props, ref: ref, strokeWidth: strokeWidth, "data-component": "input-addonloadingicon", "data-style-disabled": disableStyle ? '' : undefined, className: className });
|
|
160
|
-
}
|
|
160
|
+
}
|
|
161
161
|
/** Clears the control automatically; no clearing click handler needed. Supply the clear icon and an accessible name. */
|
|
162
|
-
export
|
|
162
|
+
export function AddonClearButton({ disableStyle, className, disabled, onClick, ref, ...props }) {
|
|
163
163
|
const context = useInputContext();
|
|
164
164
|
const attributes = usePartAttributes();
|
|
165
165
|
return (_jsx("button", { ...attributes, "aria-label": "Clear text", ...props, ref: ref, type: "button", disabled: disabled || context.disabled || context.readOnly, onClick: (event) => {
|
|
@@ -172,7 +172,7 @@ export const AddonClearButton = /* @__PURE__ */ forwardRef(function AddonClearBu
|
|
|
172
172
|
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
173
173
|
input.focus();
|
|
174
174
|
}, "data-component": "input-addonclearbutton", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
175
|
-
}
|
|
175
|
+
}
|
|
176
176
|
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
177
177
|
export function AddonClearButtonIcon({ children = _jsx(X, {}), ...props }) {
|
|
178
178
|
return _jsx(ClonedIcon, { ...props, component: "input-addonclearbuttonicon", children: children });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { StyleProps } from '../../types/Style.ts';
|
|
2
2
|
import type { AsChildProps } from '../../utils/asChild.ts';
|
|
3
3
|
import { Menu as BaseMenu } from '@base-ui/react/menu';
|
|
4
|
-
import type { ComponentPropsWithRef, ReactElement } from 'react';
|
|
4
|
+
import type { ComponentProps, ComponentPropsWithRef, ReactElement } from 'react';
|
|
5
5
|
import type { SVGIconProps } from '../../types/Icon.ts';
|
|
6
6
|
/**
|
|
7
7
|
* OpenButton renders its own trigger button; pass asChild to give its behavior to your own button instead. Popup already includes its portal and positioner. Choose ButtonItem for actions and LinkItem for navigation. Use the matching checkbox/radio composition for persistent choices; submenu parts belong in SubMenuRoot.
|
|
@@ -51,63 +51,63 @@ import type { SVGIconProps } from '../../types/Icon.ts';
|
|
|
51
51
|
export declare function Root<Payload = unknown>(props: BaseMenu.Root.Props<Payload>): import("react").JSX.Element;
|
|
52
52
|
export declare const SubMenuRoot: typeof BaseMenu.SubmenuRoot;
|
|
53
53
|
/** Opens the menu. Pass asChild to give this behavior to your own element, like your app's Button. */
|
|
54
|
-
export declare
|
|
54
|
+
export declare function OpenButton({ asChild, disableStyle, children, ref, ...props }: Omit<BaseMenu.Trigger.Props, 'className' | 'render'> & {
|
|
55
55
|
className?: string;
|
|
56
|
-
} & AsChildProps & StyleProps
|
|
57
|
-
export type PopupProps = Omit<ComponentPropsWithRef<typeof BaseMenu.Popup>, 'className'> & {
|
|
56
|
+
} & AsChildProps & StyleProps): import("react").JSX.Element;
|
|
57
|
+
export type PopupProps = Omit<ComponentPropsWithRef<typeof BaseMenu.Popup>, 'className' | 'render'> & {
|
|
58
58
|
className?: string;
|
|
59
59
|
} & Pick<BaseMenu.Portal.Props, 'container' | 'keepMounted'> & Pick<BaseMenu.Positioner.Props, 'anchor' | 'positionMethod' | 'side' | 'sideOffset' | 'align' | 'alignOffset' | 'collisionBoundary' | 'collisionPadding' | 'sticky' | 'arrowPadding' | 'disableAnchorTracking' | 'collisionAvoidance'> & StyleProps;
|
|
60
60
|
/** Already includes the portal and positioner. Keep it in the matching Root and let the native open state control visibility. */
|
|
61
61
|
export declare function Popup({ disableStyle, container, keepMounted, anchor, positionMethod, side, sideOffset, align, alignOffset, collisionBoundary, collisionPadding, sticky, arrowPadding, disableAnchorTracking, collisionAvoidance, className, style, ...props }: PopupProps): import("react").JSX.Element;
|
|
62
|
-
export declare
|
|
63
|
-
export declare
|
|
62
|
+
export declare function Arrow({ disableStyle, className, style, ref, ...props }: Omit<ComponentProps<'svg'>, 'children' | 'dangerouslySetInnerHTML'> & StyleProps): import("react").JSX.Element;
|
|
63
|
+
export declare function Group({ disableStyle, className, ref, ...props }: (Omit<BaseMenu.Group.Props, 'className' | 'render'> & {
|
|
64
64
|
className?: string;
|
|
65
|
-
} & StyleProps
|
|
65
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
66
66
|
/** Omit for an unlabeled/flat-looking group; keep the Group wrapper. Supply the heading only when grouping should be visible. */
|
|
67
|
-
export declare
|
|
67
|
+
export declare function GroupLabel({ disableStyle, className, ref, ...props }: (Omit<BaseMenu.GroupLabel.Props, 'className' | 'render'> & {
|
|
68
68
|
className?: string;
|
|
69
|
-
} & StyleProps
|
|
70
|
-
export declare
|
|
71
|
-
export declare
|
|
69
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
70
|
+
export declare function ItemsList({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
71
|
+
export declare function ButtonItem({ disableStyle, className, tone, ref, ...props }: (Omit<BaseMenu.Item.Props, 'className' | 'render'> & {
|
|
72
72
|
className?: string;
|
|
73
73
|
/** Choose the visual tone. This does not validate data or show/hide feedback messages. */
|
|
74
|
-
tone?:
|
|
75
|
-
} & StyleProps
|
|
76
|
-
export declare
|
|
74
|
+
tone?: 'neutral' | 'danger';
|
|
75
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
76
|
+
export declare function LinkItem({ disableStyle, className, ref, ...props }: (Omit<BaseMenu.LinkItem.Props, 'className' | 'render'> & {
|
|
77
77
|
className?: string;
|
|
78
|
-
} & StyleProps
|
|
79
|
-
export declare
|
|
78
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
79
|
+
export declare function RadioGroup({ disableStyle, className, ref, ...props }: (Omit<BaseMenu.RadioGroup.Props, 'className' | 'render'> & {
|
|
80
80
|
className?: string;
|
|
81
|
-
} & StyleProps
|
|
82
|
-
export declare
|
|
81
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
82
|
+
export declare function SubMenuOpenButton({ disableStyle, className, ref, ...props }: (Omit<BaseMenu.SubmenuTrigger.Props, 'className' | 'render'> & {
|
|
83
83
|
className?: string;
|
|
84
|
-
} & StyleProps
|
|
85
|
-
export declare
|
|
84
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
85
|
+
export declare function Separator({ disableStyle, className, ref, ...props }: (Omit<BaseMenu.Separator.Props, 'className' | 'render'> & {
|
|
86
86
|
className?: string;
|
|
87
|
-
} & StyleProps
|
|
87
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
88
88
|
/** Supply the decorative icon as a child. Its classes are preserved; interaction belongs to the surrounding control. */
|
|
89
|
-
export declare
|
|
89
|
+
export declare function Icon({ disableStyle, children, className, ref, ...props }: (SVGIconProps & {
|
|
90
90
|
/** Supply the decorative icon; the wrapper forwards the relevant state and preserves its classes. */
|
|
91
91
|
children: ReactElement<SVGIconProps>;
|
|
92
|
-
} & StyleProps,
|
|
92
|
+
}) & StyleProps): ReactElement<SVGIconProps, string | import("react").JSXElementConstructor<any>>;
|
|
93
93
|
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
94
|
-
export declare
|
|
94
|
+
export declare function SubMenuOpenButtonIcon({ disableStyle, children, className, ref, ...props }: (SVGIconProps & {
|
|
95
95
|
/** Omit for the supplied default icon; pass a child only to replace it. */
|
|
96
96
|
children?: ReactElement<SVGIconProps>;
|
|
97
|
-
} & StyleProps
|
|
98
|
-
export declare
|
|
99
|
-
export declare
|
|
97
|
+
}) & StyleProps): import("react").FunctionComponentElement<any>;
|
|
98
|
+
export declare function CheckboxContainer({ ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
99
|
+
export declare function CheckboxButtonItem({ disableStyle, className, label, ref, ...props }: (Omit<BaseMenu.CheckboxItem.Props, 'className' | 'render' | 'nativeButton' | 'id'> & {
|
|
100
100
|
className?: string;
|
|
101
|
-
} & StyleProps
|
|
102
|
-
export declare
|
|
103
|
-
export declare
|
|
101
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
102
|
+
export declare function CheckboxLabel({ ref, ...props }: Omit<ComponentProps<'label'>, 'id' | 'htmlFor'> & StyleProps): import("react").JSX.Element;
|
|
103
|
+
export declare function CheckboxItemIndicator({ disableStyle, children, className, ref, ...props }: (Omit<BaseMenu.CheckboxItemIndicator.Props, 'className' | 'render'> & {
|
|
104
104
|
className?: string;
|
|
105
|
-
} & StyleProps
|
|
106
|
-
export declare
|
|
107
|
-
export declare
|
|
105
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
106
|
+
export declare function RadioContainer({ ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
107
|
+
export declare function RadioButtonItem({ disableStyle, className, label, ref, ...props }: (Omit<BaseMenu.RadioItem.Props, 'className' | 'render' | 'nativeButton' | 'id'> & {
|
|
108
108
|
className?: string;
|
|
109
|
-
} & StyleProps
|
|
110
|
-
export declare
|
|
111
|
-
export declare
|
|
109
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
110
|
+
export declare function RadioLabel({ ref, ...props }: Omit<ComponentProps<'label'>, 'id' | 'htmlFor'> & StyleProps): import("react").JSX.Element;
|
|
111
|
+
export declare function RadioItemIndicator({ disableStyle, children, className, ref, ...props }: (Omit<BaseMenu.RadioItemIndicator.Props, 'className' | 'render'> & {
|
|
112
112
|
className?: string;
|
|
113
|
-
} & StyleProps
|
|
113
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { asChildRendering } from "../../utils/asChild.js";
|
|
3
3
|
import { Menu as BaseMenu } from '@base-ui/react/menu';
|
|
4
|
-
import { cloneElement, createContext,
|
|
4
|
+
import { cloneElement, createContext, useContext, useEffect, useId, useState, } from 'react';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { Check, ChevronRight } from "../../utils/icons.js";
|
|
7
7
|
/**
|
|
@@ -54,10 +54,10 @@ export function Root(props) {
|
|
|
54
54
|
}
|
|
55
55
|
export const SubMenuRoot = BaseMenu.SubmenuRoot;
|
|
56
56
|
/** Opens the menu. Pass asChild to give this behavior to your own element, like your app's Button. */
|
|
57
|
-
export
|
|
57
|
+
export function OpenButton({ asChild, disableStyle, children, ref, ...props }) {
|
|
58
58
|
const rendering = asChildRendering({ asChild, children, component: 'menu-openbutton', disableStyle });
|
|
59
59
|
return _jsx(BaseMenu.Trigger, { ...props, ref: ref, ...rendering });
|
|
60
|
-
}
|
|
60
|
+
}
|
|
61
61
|
/** Already includes the portal and positioner. Keep it in the matching Root and let the native open state control visibility. */
|
|
62
62
|
export function Popup({ disableStyle, container, keepMounted, anchor, positionMethod, side = 'bottom', sideOffset = 5, align = 'start', alignOffset, collisionBoundary, collisionPadding, sticky, arrowPadding, disableAnchorTracking, collisionAvoidance, className, style, ...props }) {
|
|
63
63
|
const baseStyle = {
|
|
@@ -68,36 +68,36 @@ export function Popup({ disableStyle, container, keepMounted, anchor, positionMe
|
|
|
68
68
|
? (state) => ({ ...baseStyle, ...style(state) })
|
|
69
69
|
: { ...baseStyle, ...style } }) }) }));
|
|
70
70
|
}
|
|
71
|
-
export
|
|
71
|
+
export function Arrow({ disableStyle, className, style, ref, ...props }) {
|
|
72
72
|
return (_jsxs(BaseMenu.Arrow, { style: style, render: _jsx("svg", { ...props, ref: ref, "aria-hidden": true, width: "20", height: "10", viewBox: "0 0 20 10" }), "data-component": "menu-arrow", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: [_jsx("path", { d: "M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z", "data-component": "menu-arrow-1" }), _jsx("path", { d: "M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z", "data-component": "menu-arrow-2" }), _jsx("path", { d: "M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z", "data-component": "menu-arrow-3" })] }));
|
|
73
|
-
}
|
|
74
|
-
export
|
|
73
|
+
}
|
|
74
|
+
export function Group({ disableStyle, className, ref, ...props }) {
|
|
75
75
|
return (_jsx(BaseMenu.Group, { ...props, ref: ref, "data-component": "menu-group", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
76
|
-
}
|
|
76
|
+
}
|
|
77
77
|
/** Omit for an unlabeled/flat-looking group; keep the Group wrapper. Supply the heading only when grouping should be visible. */
|
|
78
|
-
export
|
|
78
|
+
export function GroupLabel({ disableStyle, className, ref, ...props }) {
|
|
79
79
|
return (_jsx(BaseMenu.GroupLabel, { ...props, ref: ref, "data-component": "menu-grouplabel", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
80
|
-
}
|
|
81
|
-
export
|
|
80
|
+
}
|
|
81
|
+
export function ItemsList({ disableStyle, className, ref, ...props }) {
|
|
82
82
|
return (_jsx("div", { ...props, ref: ref, "data-component": "menu-itemslist", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
83
|
-
}
|
|
84
|
-
export
|
|
83
|
+
}
|
|
84
|
+
export function ButtonItem({ disableStyle, className, tone = 'neutral', ref, ...props }) {
|
|
85
85
|
return (_jsx(BaseMenu.Item, { ...props, "data-tone": tone, ref: ref, "data-component": "menu-buttonitem", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
86
|
-
}
|
|
87
|
-
export
|
|
86
|
+
}
|
|
87
|
+
export function LinkItem({ disableStyle, className, ref, ...props }) {
|
|
88
88
|
return (_jsx(BaseMenu.LinkItem, { ...props, ref: ref, "data-component": "menu-linkitem", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
89
|
-
}
|
|
90
|
-
export
|
|
89
|
+
}
|
|
90
|
+
export function RadioGroup({ disableStyle, className, ref, ...props }) {
|
|
91
91
|
return (_jsx(BaseMenu.RadioGroup, { ...props, ref: ref, "data-component": "menu-radiogroup", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
92
|
-
}
|
|
93
|
-
export
|
|
92
|
+
}
|
|
93
|
+
export function SubMenuOpenButton({ disableStyle, className, ref, ...props }) {
|
|
94
94
|
return (_jsx(BaseMenu.SubmenuTrigger, { ...props, ref: ref, "data-component": "menu-submenuopenbutton", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
95
|
-
}
|
|
96
|
-
export
|
|
95
|
+
}
|
|
96
|
+
export function Separator({ disableStyle, className, ref, ...props }) {
|
|
97
97
|
return (_jsx(BaseMenu.Separator, { ...props, ref: ref, "data-component": "menu-separator", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
98
|
-
}
|
|
98
|
+
}
|
|
99
99
|
/** Supply the decorative icon as a child. Its classes are preserved; interaction belongs to the surrounding control. */
|
|
100
|
-
export
|
|
100
|
+
export function Icon({ disableStyle, children, className, ref, ...props }) {
|
|
101
101
|
return cloneElement(children, {
|
|
102
102
|
...props,
|
|
103
103
|
ref,
|
|
@@ -108,9 +108,9 @@ export const Icon = /* @__PURE__ */ forwardRef(function Icon({ disableStyle, chi
|
|
|
108
108
|
},
|
|
109
109
|
className: twMerge(children.props.className, className),
|
|
110
110
|
});
|
|
111
|
-
}
|
|
111
|
+
}
|
|
112
112
|
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
113
|
-
export
|
|
113
|
+
export function SubMenuOpenButtonIcon({ disableStyle, children, className, ref, ...props }) {
|
|
114
114
|
return cloneElement(children ?? _jsx(ChevronRight, {}), {
|
|
115
115
|
...props,
|
|
116
116
|
ref,
|
|
@@ -121,36 +121,36 @@ export const SubMenuOpenButtonIcon = /* @__PURE__ */ forwardRef(function SubMenu
|
|
|
121
121
|
},
|
|
122
122
|
className: twMerge(children?.props.className, className),
|
|
123
123
|
});
|
|
124
|
-
}
|
|
125
|
-
export
|
|
124
|
+
}
|
|
125
|
+
export function CheckboxContainer({ ref, ...props }) {
|
|
126
126
|
return _jsx(CheckableContainer, { ...props, ref: ref, component: "menu-checkboxcontainer" });
|
|
127
|
-
}
|
|
128
|
-
export
|
|
127
|
+
}
|
|
128
|
+
export function CheckboxButtonItem({ disableStyle, className, label, ref, ...props }) {
|
|
129
129
|
const context = useCheckableContext();
|
|
130
130
|
return (_jsx(BaseMenu.CheckboxItem, { ...props, ref: ref, id: context.id, "aria-labelledby": context.id + '-label', label: label ?? context.label, nativeButton: true, "data-component": "menu-checkboxbuttonitem", "data-style-disabled": disableStyle ? '' : undefined, className: className, render: (buttonProps, state) => (_jsx(CheckableButtonSurface, { ...buttonProps, state: state })) }));
|
|
131
|
-
}
|
|
132
|
-
export
|
|
131
|
+
}
|
|
132
|
+
export function CheckboxLabel({ ref, ...props }) {
|
|
133
133
|
return _jsx(CheckableLabel, { ...props, ref: ref, component: "menu-checkboxlabel" });
|
|
134
|
-
}
|
|
135
|
-
export
|
|
134
|
+
}
|
|
135
|
+
export function CheckboxItemIndicator({ disableStyle, children, className, ref, ...props }) {
|
|
136
136
|
return (_jsx(BaseMenu.CheckboxItemIndicator, { ...props, ref: ref, "data-component": "menu-checkboxitemindicator", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: children ?? (_jsx(Check, { "aria-hidden": true, strokeWidth: 3.5, "data-component": "menu-checkboxitemindicator-1" })) }));
|
|
137
|
-
}
|
|
138
|
-
export
|
|
137
|
+
}
|
|
138
|
+
export function RadioContainer({ ref, ...props }) {
|
|
139
139
|
return _jsx(CheckableContainer, { ...props, ref: ref, component: "menu-radiocontainer" });
|
|
140
|
-
}
|
|
141
|
-
export
|
|
140
|
+
}
|
|
141
|
+
export function RadioButtonItem({ disableStyle, className, label, ref, ...props }) {
|
|
142
142
|
const context = useCheckableContext();
|
|
143
143
|
return (_jsx(BaseMenu.RadioItem, { ...props, ref: ref, id: context.id, "aria-labelledby": context.id + '-label', label: label ?? context.label, nativeButton: true, "data-component": "menu-radiobuttonitem", "data-style-disabled": disableStyle ? '' : undefined, className: className, render: (buttonProps, state) => (_jsx(CheckableButtonSurface, { ...buttonProps, state: state })) }));
|
|
144
|
-
}
|
|
145
|
-
export
|
|
144
|
+
}
|
|
145
|
+
export function RadioLabel({ ref, ...props }) {
|
|
146
146
|
return _jsx(CheckableLabel, { ...props, ref: ref, component: "menu-radiolabel" });
|
|
147
|
-
}
|
|
148
|
-
export
|
|
147
|
+
}
|
|
148
|
+
export function RadioItemIndicator({ disableStyle, children, className, ref, ...props }) {
|
|
149
149
|
return (_jsx(BaseMenu.RadioItemIndicator, { ...props, ref: ref, "data-component": "menu-radioitemindicator", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: children ?? _jsx("span", { "data-component": "menu-radioitemindicator-1" }) }));
|
|
150
|
-
}
|
|
150
|
+
}
|
|
151
151
|
const CheckableContext = /* @__PURE__ */ createContext(null);
|
|
152
152
|
// Shared by CheckboxContainer and RadioContainer, which only differ by their data-component name
|
|
153
|
-
|
|
153
|
+
function CheckableContainer({ disableStyle, className, component, ref, ...props }) {
|
|
154
154
|
const id = useId();
|
|
155
155
|
const [label, setLabel] = useState('');
|
|
156
156
|
const [state, setState] = useState({
|
|
@@ -159,19 +159,19 @@ const CheckableContainer = /* @__PURE__ */ forwardRef(function CheckableContaine
|
|
|
159
159
|
highlighted: false,
|
|
160
160
|
});
|
|
161
161
|
return (_jsx(CheckableContext.Provider, { value: { id, label, setLabel, state, setState }, children: _jsx("div", { ...props, ref: ref, "data-disabled": state.disabled ? '' : undefined, "data-highlighted": state.highlighted ? '' : undefined, "data-checked": state.checked ? '' : undefined, "data-component": component, "data-style-disabled": disableStyle ? '' : undefined, className: className }) }));
|
|
162
|
-
}
|
|
162
|
+
}
|
|
163
163
|
// Shared by CheckboxLabel and RadioLabel, which only differ by their data-component name
|
|
164
|
-
|
|
164
|
+
function CheckableLabel({ disableStyle, className, children, component, ref, ...props }) {
|
|
165
165
|
const context = useCheckableContext();
|
|
166
166
|
return (_jsx("label", { ...props, ref: ref, id: context.id + '-label', htmlFor: context.id, "data-disabled": context.state.disabled ? '' : undefined, "data-component": component, "data-style-disabled": disableStyle ? '' : undefined, className: className, children: _jsx(CheckableLabelText, { children: children }) }));
|
|
167
|
-
}
|
|
167
|
+
}
|
|
168
168
|
function useCheckableContext() {
|
|
169
169
|
const context = useContext(CheckableContext);
|
|
170
170
|
if (!context)
|
|
171
171
|
throw new Error('Menu checkable parts must be inside their Container');
|
|
172
172
|
return context;
|
|
173
173
|
}
|
|
174
|
-
|
|
174
|
+
function CheckableButtonSurface({ state, ref, ...props }) {
|
|
175
175
|
const context = useCheckableContext();
|
|
176
176
|
useEffect(() => {
|
|
177
177
|
context.setState({
|
|
@@ -181,7 +181,7 @@ const CheckableButtonSurface = /* @__PURE__ */ forwardRef(function CheckableButt
|
|
|
181
181
|
});
|
|
182
182
|
}, [state.checked, state.disabled, state.highlighted, context.setState]);
|
|
183
183
|
return _jsx("button", { type: "button", ...props, ref: ref });
|
|
184
|
-
}
|
|
184
|
+
}
|
|
185
185
|
function CheckableLabelText({ children }) {
|
|
186
186
|
const context = useCheckableContext();
|
|
187
187
|
return (_jsx("span", { ref: (element) => {
|
|
@@ -45,51 +45,51 @@ export type RootProps = Omit<BaseNumber.Root.Props, 'className' | 'render'> & {
|
|
|
45
45
|
* }
|
|
46
46
|
* </NumberInput.Root>
|
|
47
47
|
*/
|
|
48
|
-
export declare
|
|
49
|
-
export declare
|
|
48
|
+
export declare function Root({ id, validation, children, ref, ...props }: RootProps): import("react").JSX.Element;
|
|
49
|
+
export declare function Input({ disableStyle, className, 'aria-describedby': describedBy, ref, ...props }: (Omit<BaseNumber.Input.Props, 'className' | 'id' | 'value' | 'defaultValue' | 'disabled' | 'readOnly' | 'required' | 'name' | 'form' | 'render'> & {
|
|
50
50
|
className?: string;
|
|
51
|
-
} & StyleProps
|
|
52
|
-
export declare
|
|
51
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
52
|
+
export declare function Container({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
53
53
|
/** Labels the associated control automatically. Supply the visible text; do not wire a second label association. */
|
|
54
|
-
export declare
|
|
55
|
-
export declare
|
|
54
|
+
export declare function Label({ disableStyle, className, id, ref, ...props }: Omit<ComponentProps<'label'>, 'htmlFor'> & StyleProps): import("react").JSX.Element;
|
|
55
|
+
export declare function Description({ disableStyle, className, id, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
56
56
|
type MessageProps = Omit<ComponentProps<'div'>, 'children'> & StyleProps & {
|
|
57
57
|
children?: ValidationMessageChildren;
|
|
58
58
|
};
|
|
59
59
|
/** Shows itself only while Root's validation is `'error'`: with no children it shows the message from `['error', message]`, a function children formats that message, and other children replace it. */
|
|
60
|
-
export declare
|
|
60
|
+
export declare function Error({ children, ref, ...props }: MessageProps): import("react").JSX.Element | null;
|
|
61
61
|
/** Shows itself only while Root's validation is `'success'`: with no children it shows the message from `['success', message]`, a function children formats that message, and other children replace it. */
|
|
62
|
-
export declare
|
|
63
|
-
export declare
|
|
62
|
+
export declare function Success({ children, ref, ...props }: MessageProps): import("react").JSX.Element | null;
|
|
63
|
+
export declare function Addon({ disableStyle, className, variant, ref, ...props }: (ComponentProps<'div'> & {
|
|
64
64
|
/** Choose the preset appearance; this does not add action behavior. */
|
|
65
|
-
variant?:
|
|
66
|
-
} & StyleProps
|
|
67
|
-
export declare
|
|
65
|
+
variant?: 'normal' | 'emphasized';
|
|
66
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
67
|
+
export declare function AddonText({ disableStyle, className, ref, ...props }: ComponentProps<'span'> & StyleProps): import("react").JSX.Element;
|
|
68
68
|
/** Supply the decorative icon as a child. Its classes are preserved; interaction belongs to the surrounding control. */
|
|
69
69
|
export declare function AddonIcon({ disableStyle, children, className, ...props }: (Omit<ComponentProps<'svg'>, 'children'> & {
|
|
70
70
|
/** Supply the decorative icon; the wrapper forwards the relevant state and preserves its classes. */
|
|
71
71
|
children: ReactElement<ComponentProps<'svg'>>;
|
|
72
72
|
}) & StyleProps): ReactElement<import("react").SVGProps<SVGSVGElement>, string | import("react").JSXElementConstructor<any>>;
|
|
73
|
-
export declare
|
|
73
|
+
export declare function AddonButton({ disableStyle, className, disabled, type, ref, ...props }: ComponentProps<'button'> & StyleProps): import("react").JSX.Element;
|
|
74
74
|
/** Built-in icon; no children needed. Use it inside its matching control. */
|
|
75
|
-
export declare
|
|
76
|
-
export declare
|
|
75
|
+
export declare function AddonLoadingIcon({ disableStyle, className, strokeWidth, ref, ...props }: Omit<SVGIconProps, 'children'> & StyleProps): import("react").JSX.Element;
|
|
76
|
+
export declare function InputGroup({ disableStyle, className, onClick, ref, ...props }: (Omit<BaseNumber.Group.Props, 'className' | 'render'> & {
|
|
77
77
|
className?: string;
|
|
78
|
-
} & StyleProps
|
|
79
|
-
export declare
|
|
78
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
79
|
+
export declare function ButtonsList({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
80
80
|
/** Formats the current number automatically. Omit children for the default display; customize only when the usual number formatting is insufficient. */
|
|
81
|
-
export declare
|
|
82
|
-
export declare
|
|
81
|
+
export declare function ValueText({ disableStyle, className, ref, ...props }: Omit<ComponentProps<'span'>, 'children'> & StyleProps): import("react").JSX.Element;
|
|
82
|
+
export declare function IncrementButton({ disableStyle, className, ref, ...props }: (Omit<BaseNumber.Increment.Props, 'className' | 'render'> & {
|
|
83
83
|
className?: string;
|
|
84
|
-
} & StyleProps
|
|
84
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
85
85
|
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
86
86
|
export declare function IncrementButtonIcon({ disableStyle, children, className, ...props }: (Omit<ComponentProps<'svg'>, 'children'> & {
|
|
87
87
|
/** Omit for the supplied default icon; pass a child only to replace it. */
|
|
88
88
|
children?: ReactElement<ComponentProps<'svg'>>;
|
|
89
89
|
}) & StyleProps): ReactElement<import("react").SVGProps<SVGSVGElement>, string | import("react").JSXElementConstructor<any>>;
|
|
90
|
-
export declare
|
|
90
|
+
export declare function DecrementButton({ disableStyle, className, ref, ...props }: (Omit<BaseNumber.Decrement.Props, 'className' | 'render'> & {
|
|
91
91
|
className?: string;
|
|
92
|
-
} & StyleProps
|
|
92
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
93
93
|
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
94
94
|
export declare function DecrementButtonIcon({ disableStyle, children, className, ...props }: (Omit<ComponentProps<'svg'>, 'children'> & {
|
|
95
95
|
/** Omit for the supplied default icon; pass a child only to replace it. */
|