@central-ui/react 0.3.0 → 0.5.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/pagination/index.d.ts +158 -0
- package/dist/components/pagination/index.js +157 -0
- 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 +135 -44
- package/dist/components/stepper/index.js +185 -62
- 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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/icons.d.ts +104 -23
- package/dist/utils/icons.js +16 -3
- package/package.json +69 -69
- package/src/presets/shopify-polaris/shopify-polaris-accordion.css +28 -28
- package/src/presets/shopify-polaris/shopify-polaris-pagination.css +55 -0
- package/src/presets/shopify-polaris/shopify-polaris-stepper.css +63 -27
- package/src/presets/shopify-polaris/shopify-polaris.css +1 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-accordion.css +28 -28
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-pagination.css +49 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-stepper.css +64 -26
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy.css +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StyleProps } from '../../types/Style.ts';
|
|
2
|
-
import { Root as RadixRoot, Input as RadixInput } from '@radix-ui/react-password-toggle-field';
|
|
2
|
+
import { Root as RadixRoot, Input as RadixInput, Toggle as RadixToggle } from '@radix-ui/react-password-toggle-field';
|
|
3
3
|
import { Input as BaseInput } from '@base-ui/react/input';
|
|
4
4
|
import type { SVGIconProps } from '../../types/Icon.ts';
|
|
5
5
|
import type { ComponentProps, ComponentPropsWithRef, ReactElement } from 'react';
|
|
@@ -50,34 +50,34 @@ export declare function Root({ children, id, validation, value, defaultValue, on
|
|
|
50
50
|
export type InputProps = Omit<ComponentPropsWithRef<typeof RadixInput>, keyof Pick<RootProps, 'id' | 'name' | 'form' | 'value' | 'defaultValue' | 'onValueChange' | 'disabled' | 'readOnly' | 'required'> | 'asChild'> & {
|
|
51
51
|
className?: string;
|
|
52
52
|
} & StyleProps;
|
|
53
|
-
export declare
|
|
54
|
-
export declare
|
|
55
|
-
export declare
|
|
53
|
+
export declare function Input({ disableStyle, className, 'aria-describedby': describedBy, ref, ...props }: InputProps): import("react").JSX.Element;
|
|
54
|
+
export declare function InputGroup({ disableStyle, className, onClick, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
55
|
+
export declare function Container({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
56
56
|
/** Labels the associated control automatically. Supply the visible text; do not wire a second label association. */
|
|
57
|
-
export declare
|
|
58
|
-
export declare
|
|
57
|
+
export declare function Label({ disableStyle, className, id, ref, ...props }: Omit<ComponentProps<'label'>, 'htmlFor'> & StyleProps): import("react").JSX.Element;
|
|
58
|
+
export declare function Description({ disableStyle, className, id, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
59
59
|
type MessageProps = Omit<ComponentProps<'div'>, 'children'> & StyleProps & {
|
|
60
60
|
children?: ValidationMessageChildren;
|
|
61
61
|
};
|
|
62
62
|
/** 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. */
|
|
63
|
-
export declare
|
|
63
|
+
export declare function Error({ children, ref, ...props }: MessageProps): import("react").JSX.Element | null;
|
|
64
64
|
/** 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. */
|
|
65
|
-
export declare
|
|
66
|
-
export declare
|
|
65
|
+
export declare function Success({ children, ref, ...props }: MessageProps): import("react").JSX.Element | null;
|
|
66
|
+
export declare function Addon({ disableStyle, className, variant, ref, ...props }: (ComponentProps<'div'> & {
|
|
67
67
|
/** Choose the preset appearance; this does not add action behavior. */
|
|
68
|
-
variant?:
|
|
69
|
-
} & StyleProps
|
|
70
|
-
export declare
|
|
68
|
+
variant?: 'normal' | 'emphasized';
|
|
69
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
70
|
+
export declare function AddonText({ disableStyle, className, ref, ...props }: ComponentProps<'span'> & StyleProps): import("react").JSX.Element;
|
|
71
71
|
/** Supply the decorative icon as a child. Its classes are preserved; interaction belongs to the surrounding control. */
|
|
72
72
|
export declare function AddonIcon({ disableStyle, children, className, ...props }: (Omit<ComponentProps<'svg'>, 'children'> & {
|
|
73
73
|
/** Supply the decorative icon; the wrapper forwards the relevant state and preserves its classes. */
|
|
74
74
|
children: ReactElement<ComponentProps<'svg'>>;
|
|
75
75
|
}) & StyleProps): ReactElement<import("react").SVGProps<SVGSVGElement>, string | import("react").JSXElementConstructor<any>>;
|
|
76
|
-
export declare
|
|
76
|
+
export declare function AddonButton({ disableStyle, className, disabled, type, ref, ...props }: ComponentProps<'button'> & StyleProps): import("react").JSX.Element;
|
|
77
77
|
/** Built-in icon; no children needed. Use it inside its matching control. */
|
|
78
|
-
export declare
|
|
78
|
+
export declare function AddonLoadingIcon({ disableStyle, className, strokeWidth, ref, ...props }: Omit<SVGIconProps, 'children'> & StyleProps): import("react").JSX.Element;
|
|
79
79
|
/** Toggles password visibility automatically; do not maintain another visibility state. */
|
|
80
|
-
export declare
|
|
80
|
+
export declare function AddonVisibilityButton({ disableStyle, className, disabled, id, ref, ...props }: ComponentPropsWithRef<typeof RadixToggle> & StyleProps): import("react").JSX.Element;
|
|
81
81
|
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
82
82
|
export declare function AddonVisibleIcon({ disableStyle, children, className, ...props }: (Omit<ComponentProps<'svg'>, 'children'> & {
|
|
83
83
|
/** Omit for the supplied default icon; pass a child only to replace it. */
|
|
@@ -4,7 +4,7 @@ import { Input as BaseInput } from '@base-ui/react/input';
|
|
|
4
4
|
import { Eye, EyeOff, LoaderCircle } from "../../utils/icons.js";
|
|
5
5
|
import { useRef } from 'react';
|
|
6
6
|
import { useForwardClickToInput } from "../../utils/useForwardClickToInput.js";
|
|
7
|
-
import { cloneElement, createContext,
|
|
7
|
+
import { cloneElement, createContext, useContext, useEffect, useId, useState, } from 'react';
|
|
8
8
|
import { twMerge } from 'tailwind-merge';
|
|
9
9
|
import { readValidation, validationAttributes, validationMessageContent } from "../../utils/Validation.js";
|
|
10
10
|
/**
|
|
@@ -66,7 +66,7 @@ export function Root({ children, id, validation, value, defaultValue, onValueCha
|
|
|
66
66
|
validation: readValidation(validation),
|
|
67
67
|
}, children: children }) }));
|
|
68
68
|
}
|
|
69
|
-
export
|
|
69
|
+
export function Input({ disableStyle, className, 'aria-describedby': describedBy, ref, ...props }) {
|
|
70
70
|
const context = useInputContext();
|
|
71
71
|
const inputRef = useRef(null);
|
|
72
72
|
// Resetting the internal value when the surrounding html form resets, since the control is always controlled by Root's value
|
|
@@ -96,58 +96,58 @@ export const Input = /* @__PURE__ */ forwardRef(function Input({ disableStyle, c
|
|
|
96
96
|
if (!details.isCanceled && !context.controlled)
|
|
97
97
|
context.setValueInternalState(nextValue);
|
|
98
98
|
}, "data-component": "passwordinput-input", "data-style-disabled": disableStyle ? '' : undefined, className: className }) }));
|
|
99
|
-
}
|
|
100
|
-
export
|
|
99
|
+
}
|
|
100
|
+
export function InputGroup({ disableStyle, className, onClick, ref, ...props }) {
|
|
101
101
|
const attributes = usePartAttributes();
|
|
102
102
|
const forwardClick = useForwardClickToInput('input:not([type="hidden"])', onClick);
|
|
103
103
|
return (_jsx("div", { ...attributes, ...props, ref: ref, onClick: forwardClick, "data-component": "passwordinput-inputgroup", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
104
|
-
}
|
|
105
|
-
export
|
|
104
|
+
}
|
|
105
|
+
export function Container({ disableStyle, className, ref, ...props }) {
|
|
106
106
|
const attributes = usePartAttributes();
|
|
107
107
|
return (_jsx("div", { ...attributes, ...props, ref: ref, "data-component": "passwordinput-container", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
108
|
-
}
|
|
108
|
+
}
|
|
109
109
|
/** Labels the associated control automatically. Supply the visible text; do not wire a second label association. */
|
|
110
|
-
export
|
|
110
|
+
export function Label({ disableStyle, className, id, ref, ...props }) {
|
|
111
111
|
const context = useInputContext();
|
|
112
112
|
const labelId = id ?? context.inputId + '-label';
|
|
113
113
|
const attributes = usePartAttributes();
|
|
114
114
|
return (_jsx("label", { ...attributes, ...props, id: labelId, ref: ref, htmlFor: context.inputId, "data-component": "passwordinput-label", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
115
|
-
}
|
|
116
|
-
export
|
|
115
|
+
}
|
|
116
|
+
export function Description({ disableStyle, className, id, ref, ...props }) {
|
|
117
117
|
const messageId = useMessageId(id);
|
|
118
118
|
const attributes = usePartAttributes();
|
|
119
119
|
return (_jsx("div", { ...attributes, ...props, id: messageId, ref: ref, "data-component": "passwordinput-description", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
120
|
-
}
|
|
120
|
+
}
|
|
121
121
|
/** 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. */
|
|
122
|
-
export
|
|
122
|
+
export function Error({ children, ref, ...props }) {
|
|
123
123
|
const context = useInputContext();
|
|
124
124
|
const content = validationMessageContent(context.validation, 'error', children);
|
|
125
125
|
if (content === undefined)
|
|
126
126
|
return null;
|
|
127
127
|
return _jsx(Message, { ...props, ref: ref, role: "alert", component: "passwordinput-error", children: content });
|
|
128
|
-
}
|
|
128
|
+
}
|
|
129
129
|
/** 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. */
|
|
130
|
-
export
|
|
130
|
+
export function Success({ children, ref, ...props }) {
|
|
131
131
|
const context = useInputContext();
|
|
132
132
|
const content = validationMessageContent(context.validation, 'success', children);
|
|
133
133
|
if (content === undefined)
|
|
134
134
|
return null;
|
|
135
135
|
return _jsx(Message, { ...props, ref: ref, role: "status", component: "passwordinput-success", children: content });
|
|
136
|
-
}
|
|
136
|
+
}
|
|
137
137
|
// The shared body of Error and Success, mounted only while they show, so only visible messages describe the password input
|
|
138
|
-
|
|
138
|
+
function Message({ disableStyle, className, id, component, ref, ...props }) {
|
|
139
139
|
const messageId = useMessageId(id);
|
|
140
140
|
const attributes = usePartAttributes();
|
|
141
141
|
return _jsx("div", { "aria-atomic": "true", ...attributes, ...props, id: messageId, ref: ref, "data-component": component, "data-style-disabled": disableStyle ? '' : undefined, className: className });
|
|
142
|
-
}
|
|
143
|
-
export
|
|
142
|
+
}
|
|
143
|
+
export function Addon({ disableStyle, className, variant = 'normal', ref, ...props }) {
|
|
144
144
|
const attributes = usePartAttributes();
|
|
145
145
|
return (_jsx("div", { ...attributes, ...props, ref: ref, "data-variant": variant, "data-component": "passwordinput-addon", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
146
|
-
}
|
|
147
|
-
export
|
|
146
|
+
}
|
|
147
|
+
export function AddonText({ disableStyle, className, ref, ...props }) {
|
|
148
148
|
const attributes = usePartAttributes();
|
|
149
149
|
return (_jsx("span", { ...attributes, ...props, ref: ref, "data-component": "passwordinput-addontext", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
150
|
-
}
|
|
150
|
+
}
|
|
151
151
|
/** Supply the decorative icon as a child. Its classes are preserved; interaction belongs to the surrounding control. */
|
|
152
152
|
export function AddonIcon({ disableStyle, children, className, ...props }) {
|
|
153
153
|
const attributes = usePartAttributes();
|
|
@@ -163,22 +163,22 @@ export function AddonIcon({ disableStyle, children, className, ...props }) {
|
|
|
163
163
|
className: twMerge(children.props.className, className),
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
export
|
|
166
|
+
export function AddonButton({ disableStyle, className, disabled, type = 'button', ref, ...props }) {
|
|
167
167
|
const context = useInputContext();
|
|
168
168
|
const attributes = usePartAttributes();
|
|
169
169
|
return (_jsx("button", { ...attributes, ...props, ref: ref, type: type, disabled: disabled || context.disabled || context.readOnly, "data-component": "passwordinput-addonbutton", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
170
|
-
}
|
|
170
|
+
}
|
|
171
171
|
/** Built-in icon; no children needed. Use it inside its matching control. */
|
|
172
|
-
export
|
|
172
|
+
export function AddonLoadingIcon({ disableStyle, className, strokeWidth = 1.5, ref, ...props }) {
|
|
173
173
|
const attributes = usePartAttributes();
|
|
174
174
|
return (_jsx(LoaderCircle, { ...attributes, "aria-hidden": true, ...props, ref: ref, strokeWidth: strokeWidth, "data-component": "passwordinput-addonloadingicon", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
175
|
-
}
|
|
175
|
+
}
|
|
176
176
|
/** Toggles password visibility automatically; do not maintain another visibility state. */
|
|
177
|
-
export
|
|
177
|
+
export function AddonVisibilityButton({ disableStyle, className, disabled, id, ref, ...props }) {
|
|
178
178
|
const context = useInputContext();
|
|
179
179
|
const attributes = usePartAttributes();
|
|
180
180
|
return (_jsx(RadixToggle, { ...attributes, ...props, id: id ?? context.inputId + '-toggle', ref: ref, disabled: disabled || context.disabled || context.readOnly, "data-component": "passwordinput-addonvisibilitybutton", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
181
|
-
}
|
|
181
|
+
}
|
|
182
182
|
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
183
183
|
export function AddonVisibleIcon({ disableStyle, children = _jsx(EyeOff, {}), className, ...props }) {
|
|
184
184
|
const attributes = usePartAttributes();
|
|
@@ -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 { Popover as BasePopover } from '@base-ui/react/popover';
|
|
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 and CloseButton render their own buttons; pass asChild to give their behavior to your own button instead. Popup already includes its portal and positioner. Use Header/Body/Footer as needed; an Arrow is optional.
|
|
@@ -40,30 +40,30 @@ import type { SVGIconProps } from '../../types/Icon.ts';
|
|
|
40
40
|
*/
|
|
41
41
|
export declare function Root<Payload = unknown>(props: BasePopover.Root.Props<Payload>): import("react").JSX.Element;
|
|
42
42
|
/** Opens the popover. Pass asChild to give this behavior to your own element, like your app's Button. */
|
|
43
|
-
export declare
|
|
43
|
+
export declare function OpenButton({ asChild, disableStyle, children, ref, ...props }: Omit<BasePopover.Trigger.Props, 'className' | 'render'> & {
|
|
44
44
|
className?: string;
|
|
45
|
-
} & AsChildProps & StyleProps
|
|
46
|
-
export type PopupProps = Omit<ComponentPropsWithRef<typeof BasePopover.Popup>, 'className'> & {
|
|
45
|
+
} & AsChildProps & StyleProps): import("react").JSX.Element;
|
|
46
|
+
export type PopupProps = Omit<ComponentPropsWithRef<typeof BasePopover.Popup>, 'className' | 'render'> & {
|
|
47
47
|
className?: string;
|
|
48
48
|
} & Pick<BasePopover.Portal.Props, 'container' | 'keepMounted'> & Pick<BasePopover.Positioner.Props, 'anchor' | 'positionMethod' | 'side' | 'sideOffset' | 'align' | 'alignOffset' | 'collisionBoundary' | 'collisionPadding' | 'sticky' | 'arrowPadding' | 'disableAnchorTracking' | 'collisionAvoidance'> & StyleProps;
|
|
49
49
|
/** Already includes the portal and positioner. Keep it in the matching Root and let the native open state control visibility. */
|
|
50
50
|
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;
|
|
51
|
-
export declare
|
|
52
|
-
export declare
|
|
53
|
-
export declare
|
|
54
|
-
export declare
|
|
55
|
-
export declare
|
|
51
|
+
export declare function Arrow({ disableStyle, className, style, ref, ...props }: Omit<ComponentProps<'svg'>, 'children' | 'dangerouslySetInnerHTML'> & StyleProps): import("react").JSX.Element;
|
|
52
|
+
export declare function Header({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
53
|
+
export declare function Body({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
54
|
+
export declare function Footer({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
55
|
+
export declare function Title({ disableStyle, className, ref, ...props }: (Omit<BasePopover.Title.Props, 'className' | 'render'> & {
|
|
56
56
|
className?: string;
|
|
57
|
-
} & StyleProps
|
|
58
|
-
export declare
|
|
57
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
58
|
+
export declare function Description({ disableStyle, className, ref, ...props }: (Omit<BasePopover.Description.Props, 'className' | 'render'> & {
|
|
59
59
|
className?: string;
|
|
60
|
-
} & StyleProps
|
|
60
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
61
61
|
/** Icon-only: put just a CloseButtonIcon inside, never text like "Close". Name it for screen readers with aria-label instead, e.g. aria-label="Close". Pass asChild to give closing behavior to your own button instead, like a "Done" Button. */
|
|
62
|
-
export declare
|
|
62
|
+
export declare function CloseButton({ asChild, disableStyle, children, ref, ...props }: Omit<BasePopover.Close.Props, 'className' | 'render'> & {
|
|
63
63
|
className?: string;
|
|
64
|
-
} & AsChildProps & StyleProps
|
|
64
|
+
} & AsChildProps & StyleProps): import("react").JSX.Element;
|
|
65
65
|
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
66
|
-
export declare
|
|
66
|
+
export declare function CloseButtonIcon({ disableStyle, children, className, ref, ...props }: (SVGIconProps & {
|
|
67
67
|
/** Omit for the supplied default icon; pass a child only to replace it. */
|
|
68
68
|
children?: ReactElement<SVGIconProps>;
|
|
69
|
-
} & StyleProps
|
|
69
|
+
}) & StyleProps): import("react").FunctionComponentElement<any>;
|
|
@@ -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 { Popover as BasePopover } from '@base-ui/react/popover';
|
|
4
|
-
import { cloneElement
|
|
4
|
+
import { cloneElement } from 'react';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { X } from "../../utils/icons.js";
|
|
7
7
|
/**
|
|
@@ -43,10 +43,10 @@ export function Root(props) {
|
|
|
43
43
|
return _jsx(BasePopover.Root, { ...props });
|
|
44
44
|
}
|
|
45
45
|
/** Opens the popover. Pass asChild to give this behavior to your own element, like your app's Button. */
|
|
46
|
-
export
|
|
46
|
+
export function OpenButton({ asChild, disableStyle, children, ref, ...props }) {
|
|
47
47
|
const rendering = asChildRendering({ asChild, children, component: 'popover-openbutton', disableStyle });
|
|
48
48
|
return _jsx(BasePopover.Trigger, { ...props, ref: ref, ...rendering });
|
|
49
|
-
}
|
|
49
|
+
}
|
|
50
50
|
/** Already includes the portal and positioner. Keep it in the matching Root and let the native open state control visibility. */
|
|
51
51
|
export function Popup({ disableStyle, container, keepMounted, anchor, positionMethod, side = 'bottom', sideOffset = 5, align = 'start', alignOffset, collisionBoundary, collisionPadding, sticky, arrowPadding, disableAnchorTracking, collisionAvoidance, className, style, ...props }) {
|
|
52
52
|
const baseStyle = {
|
|
@@ -57,31 +57,31 @@ export function Popup({ disableStyle, container, keepMounted, anchor, positionMe
|
|
|
57
57
|
? (state) => ({ ...baseStyle, ...style(state) })
|
|
58
58
|
: { ...baseStyle, ...style } }) }) }));
|
|
59
59
|
}
|
|
60
|
-
export
|
|
60
|
+
export function Arrow({ disableStyle, className, style, ref, ...props }) {
|
|
61
61
|
return (_jsxs(BasePopover.Arrow, { style: style, render: _jsx("svg", { ...props, ref: ref, "aria-hidden": true, width: "20", height: "10", viewBox: "0 0 20 10" }), "data-component": "popover-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": "popover-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": "popover-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": "popover-arrow-3" })] }));
|
|
62
|
-
}
|
|
63
|
-
export
|
|
62
|
+
}
|
|
63
|
+
export function Header({ disableStyle, className, ref, ...props }) {
|
|
64
64
|
return (_jsx("div", { ...props, ref: ref, "data-component": "popover-header", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
65
|
-
}
|
|
66
|
-
export
|
|
65
|
+
}
|
|
66
|
+
export function Body({ disableStyle, className, ref, ...props }) {
|
|
67
67
|
return (_jsx("div", { ...props, ref: ref, "data-component": "popover-body", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
68
|
-
}
|
|
69
|
-
export
|
|
68
|
+
}
|
|
69
|
+
export function Footer({ disableStyle, className, ref, ...props }) {
|
|
70
70
|
return (_jsx("div", { ...props, ref: ref, "data-component": "popover-footer", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
71
|
-
}
|
|
72
|
-
export
|
|
71
|
+
}
|
|
72
|
+
export function Title({ disableStyle, className, ref, ...props }) {
|
|
73
73
|
return (_jsx(BasePopover.Title, { ...props, ref: ref, "data-component": "popover-title", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
74
|
-
}
|
|
75
|
-
export
|
|
74
|
+
}
|
|
75
|
+
export function Description({ disableStyle, className, ref, ...props }) {
|
|
76
76
|
return (_jsx(BasePopover.Description, { ...props, ref: ref, "data-component": "popover-description", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
77
|
-
}
|
|
77
|
+
}
|
|
78
78
|
/** Icon-only: put just a CloseButtonIcon inside, never text like "Close". Name it for screen readers with aria-label instead, e.g. aria-label="Close". Pass asChild to give closing behavior to your own button instead, like a "Done" Button. */
|
|
79
|
-
export
|
|
79
|
+
export function CloseButton({ asChild, disableStyle, children, ref, ...props }) {
|
|
80
80
|
const rendering = asChildRendering({ asChild, children, component: 'popover-closebutton', disableStyle });
|
|
81
81
|
return _jsx(BasePopover.Close, { ...props, ref: ref, ...rendering });
|
|
82
|
-
}
|
|
82
|
+
}
|
|
83
83
|
/** A default icon is supplied. Omit children for the usual case; pass an icon only to replace that visual. */
|
|
84
|
-
export
|
|
84
|
+
export function CloseButtonIcon({ disableStyle, children, className, ref, ...props }) {
|
|
85
85
|
return cloneElement(children ?? _jsx(X, {}), {
|
|
86
86
|
...props,
|
|
87
87
|
ref,
|
|
@@ -91,5 +91,6 @@ export const CloseButtonIcon = /* @__PURE__ */ forwardRef(function CloseButtonIc
|
|
|
91
91
|
'data-style-disabled': disableStyle ? '' : undefined,
|
|
92
92
|
},
|
|
93
93
|
className: twMerge(children?.props.className, className),
|
|
94
|
+
strokeWidth: props.strokeWidth ?? children?.props.strokeWidth ?? 2,
|
|
94
95
|
});
|
|
95
|
-
}
|
|
96
|
+
}
|
|
@@ -65,30 +65,30 @@ export type RootProps<Value = string> = Omit<BaseRadioGroup.Props<Value>, 'rende
|
|
|
65
65
|
* </Radio.Root>
|
|
66
66
|
*/
|
|
67
67
|
export declare function Root<Value>({ children, validation, ...props }: RootProps<Value>): import("react").JSX.Element;
|
|
68
|
-
export declare
|
|
69
|
-
export declare
|
|
68
|
+
export declare function Container({ disableStyle, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
69
|
+
export declare function List({ disableStyle, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
70
70
|
/** Labels the associated control automatically. Supply the visible text; do not wire a second label association. */
|
|
71
|
-
export declare
|
|
71
|
+
export declare function Label({ disableStyle, className, id, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
72
72
|
type ItemCoreKeys = 'value' | 'disabled' | 'readOnly' | 'required' | 'inputRef';
|
|
73
73
|
export type ItemProps<Value = string> = Omit<ComponentProps<'div'>, 'children'> & Pick<BaseRadio.Root.Props<Value>, ItemCoreKeys> & {
|
|
74
74
|
children: ReactNode;
|
|
75
75
|
} & StyleProps;
|
|
76
76
|
export declare function Item<Value>({ disableStyle, children, value, disabled, readOnly, required, inputRef, id, className, ...props }: ItemProps<Value>): import("react").JSX.Element;
|
|
77
|
-
export declare
|
|
77
|
+
export declare function ItemButton({ disableStyle, className, ref, ...props }: (Omit<BaseRadio.Root.Props, 'value' | 'disabled' | 'readOnly' | 'required' | 'inputRef' | 'id' | 'className' | 'render' | 'nativeButton'> & {
|
|
78
78
|
className?: string;
|
|
79
|
-
} & StyleProps
|
|
79
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
80
80
|
/** Tracks the surrounding item state automatically. Keep it mounted; do not add your own visibility condition. Use the supplied default visual unless customization is needed. */
|
|
81
|
-
export declare
|
|
81
|
+
export declare function ItemIndicator({ disableStyle, children, className, ref, ...props }: (Omit<BaseRadio.Indicator.Props, 'className' | 'render'> & {
|
|
82
82
|
className?: string;
|
|
83
|
-
} & StyleProps
|
|
84
|
-
export declare
|
|
85
|
-
export declare
|
|
86
|
-
export declare
|
|
83
|
+
}) & StyleProps): import("react").JSX.Element;
|
|
84
|
+
export declare function ItemLabel({ disableStyle, className, ref, ...props }: Omit<ComponentProps<'label'>, 'htmlFor'> & StyleProps): import("react").JSX.Element;
|
|
85
|
+
export declare function ItemDescription({ disableStyle, className, id, ref, ...props }: ComponentProps<'span'> & StyleProps): import("react").JSX.Element;
|
|
86
|
+
export declare function Description({ disableStyle, className, id, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
87
87
|
type MessageProps = Omit<ComponentProps<'div'>, 'children'> & StyleProps & {
|
|
88
88
|
children?: ValidationMessageChildren;
|
|
89
89
|
};
|
|
90
90
|
/** 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. */
|
|
91
|
-
export declare
|
|
91
|
+
export declare function Error({ children, ref, ...props }: MessageProps): import("react").JSX.Element | null;
|
|
92
92
|
/** 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. */
|
|
93
|
-
export declare
|
|
93
|
+
export declare function Success({ children, ref, ...props }: MessageProps): import("react").JSX.Element | null;
|
|
94
94
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { RadioGroup as BaseRadioGroup } from '@base-ui/react/radio-group';
|
|
3
3
|
import { Radio as BaseRadio } from '@base-ui/react/radio';
|
|
4
|
-
import { createContext, useCallback,
|
|
4
|
+
import { createContext, useCallback, useContext, useEffect, useId, useState, } from 'react';
|
|
5
5
|
import { readValidation, validationAttributes, validationMessageContent, } from "../../utils/Validation.js";
|
|
6
6
|
/**
|
|
7
7
|
* Root owns the chosen value. For each choice keep Item, ItemButton, ItemIndicator, and ItemLabel together. The indicator follows selection automatically; do not manage a separate checked state for each item.
|
|
@@ -79,16 +79,16 @@ export function Root({ children, validation, ...props }) {
|
|
|
79
79
|
}, children: _jsx(_Fragment, { children: children }) }));
|
|
80
80
|
}, children: children }));
|
|
81
81
|
}
|
|
82
|
-
export
|
|
82
|
+
export function Container({ disableStyle, className, ref, ...props }) {
|
|
83
83
|
return (_jsx("div", { ...props, ref: ref, "data-component": "radio-container", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
84
|
-
}
|
|
85
|
-
export
|
|
84
|
+
}
|
|
85
|
+
export function List({ disableStyle, ref, ...props }) {
|
|
86
86
|
const context = useRadioContext();
|
|
87
87
|
const { ref: nativeRef, ...nativeProps } = context.elementProps;
|
|
88
88
|
return (_jsx("div", { ...nativeProps, ...props, ref: useRootRef(nativeRef, ref), "data-component": "radio-list", "data-style-disabled": disableStyle ? '' : undefined, className: props.className }));
|
|
89
|
-
}
|
|
89
|
+
}
|
|
90
90
|
/** Labels the associated control automatically. Supply the visible text; do not wire a second label association. */
|
|
91
|
-
export
|
|
91
|
+
export function Label({ disableStyle, className, id, ref, ...props }) {
|
|
92
92
|
const generatedId = useId();
|
|
93
93
|
const labelId = id ?? generatedId;
|
|
94
94
|
const context = useRadioContext();
|
|
@@ -97,7 +97,7 @@ export const Label = /* @__PURE__ */ forwardRef(function Label({ disableStyle, c
|
|
|
97
97
|
return () => context.setLabelIds((current) => current.filter((value) => value !== labelId));
|
|
98
98
|
}, [labelId, context.setLabelIds]);
|
|
99
99
|
return (_jsx("div", { ...props, id: labelId, ref: ref, "data-disabled": context.state.disabled ? '' : undefined, "data-component": "radio-label", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
100
|
-
}
|
|
100
|
+
}
|
|
101
101
|
export function Item({ disableStyle, children, value, disabled, readOnly, required, inputRef, id, className, ...props }) {
|
|
102
102
|
const generatedId = useId();
|
|
103
103
|
const group = useRadioContext();
|
|
@@ -123,22 +123,22 @@ export function Item({ disableStyle, children, value, disabled, readOnly, requir
|
|
|
123
123
|
setMessageIds,
|
|
124
124
|
}, children: _jsx("div", { ...props, "data-component": "radio-item", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: children }) }));
|
|
125
125
|
}
|
|
126
|
-
export
|
|
126
|
+
export function ItemButton({ disableStyle, className, ref, ...props }) {
|
|
127
127
|
const item = useItemContext();
|
|
128
128
|
const group = useRadioContext();
|
|
129
129
|
return (_jsx(BaseRadio.Root, { ...props, ...item.coreProps, ref: ref, "aria-describedby": [props['aria-describedby'], ...group.messageIds, ...item.messageIds]
|
|
130
130
|
.filter(Boolean)
|
|
131
131
|
.join(' ') || undefined, "aria-invalid": group.validation.state === 'error' || props['aria-invalid'] || undefined, ...validationAttributes(group.validation), "data-component": "radio-itembutton", "data-style-disabled": disableStyle ? '' : undefined, className: className, render: (buttonProps, state) => (_jsx(RadioButtonSurface, { ...buttonProps, state: state })) }));
|
|
132
|
-
}
|
|
132
|
+
}
|
|
133
133
|
/** Tracks the surrounding item state automatically. Keep it mounted; do not add your own visibility condition. Use the supplied default visual unless customization is needed. */
|
|
134
|
-
export
|
|
134
|
+
export function ItemIndicator({ disableStyle, children, className, ref, ...props }) {
|
|
135
135
|
return (_jsx(BaseRadio.Indicator, { ...props, ref: ref, "data-component": "radio-itemindicator", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: children }));
|
|
136
|
-
}
|
|
137
|
-
export
|
|
136
|
+
}
|
|
137
|
+
export function ItemLabel({ disableStyle, className, ref, ...props }) {
|
|
138
138
|
const item = useItemContext();
|
|
139
139
|
return (_jsx("label", { ...props, ref: ref, htmlFor: item.coreProps.id, "data-disabled": item.state.disabled ? '' : undefined, "data-component": "radio-itemlabel", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
140
|
-
}
|
|
141
|
-
export
|
|
140
|
+
}
|
|
141
|
+
export function ItemDescription({ disableStyle, className, id, ref, ...props }) {
|
|
142
142
|
const generatedId = useId();
|
|
143
143
|
const messageId = id ?? generatedId;
|
|
144
144
|
const item = useItemContext();
|
|
@@ -147,34 +147,34 @@ export const ItemDescription = /* @__PURE__ */ forwardRef(function ItemDescripti
|
|
|
147
147
|
return () => item.setMessageIds((current) => current.filter((value) => value !== messageId));
|
|
148
148
|
}, [messageId, item.setMessageIds]);
|
|
149
149
|
return (_jsx("span", { ...props, ref: ref, id: messageId, "data-disabled": item.state.disabled ? '' : undefined, "data-checked": item.state.checked ? '' : undefined, "data-component": "radio-itemdescription", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
150
|
-
}
|
|
151
|
-
export
|
|
150
|
+
}
|
|
151
|
+
export function Description({ disableStyle, className, id, ref, ...props }) {
|
|
152
152
|
const messageId = useMessageId(id);
|
|
153
153
|
const context = useRadioContext();
|
|
154
154
|
return (_jsx("div", { ...props, id: messageId, ref: ref, "data-disabled": context.state.disabled ? '' : undefined, "data-component": "radio-description", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
155
|
-
}
|
|
155
|
+
}
|
|
156
156
|
/** 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. */
|
|
157
|
-
export
|
|
157
|
+
export function Error({ children, ref, ...props }) {
|
|
158
158
|
const context = useRadioContext();
|
|
159
159
|
const content = validationMessageContent(context.validation, 'error', children);
|
|
160
160
|
if (content === undefined)
|
|
161
161
|
return null;
|
|
162
162
|
return (_jsx(Message, { ...props, ref: ref, role: "alert", component: "radio-error", children: content }));
|
|
163
|
-
}
|
|
163
|
+
}
|
|
164
164
|
/** 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. */
|
|
165
|
-
export
|
|
165
|
+
export function Success({ children, ref, ...props }) {
|
|
166
166
|
const context = useRadioContext();
|
|
167
167
|
const content = validationMessageContent(context.validation, 'success', children);
|
|
168
168
|
if (content === undefined)
|
|
169
169
|
return null;
|
|
170
170
|
return (_jsx(Message, { ...props, ref: ref, role: "status", component: "radio-success", children: content }));
|
|
171
|
-
}
|
|
171
|
+
}
|
|
172
172
|
// The shared body of Error and Success, mounted only while they show, so only visible messages describe the group
|
|
173
|
-
|
|
173
|
+
function Message({ disableStyle, className, id, component, ref, ...props }) {
|
|
174
174
|
const messageId = useMessageId(id);
|
|
175
175
|
const context = useRadioContext();
|
|
176
176
|
return (_jsx("div", { "aria-atomic": "true", ...props, id: messageId, ref: ref, "data-disabled": context.state.disabled ? '' : undefined, ...validationAttributes(context.validation), "data-component": component, "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
177
|
-
}
|
|
177
|
+
}
|
|
178
178
|
const RadioContext = /* @__PURE__ */ createContext(null);
|
|
179
179
|
function useRadioContext() {
|
|
180
180
|
const context = useContext(RadioContext);
|
|
@@ -190,7 +190,7 @@ function useItemContext() {
|
|
|
190
190
|
return context;
|
|
191
191
|
}
|
|
192
192
|
// Rendered by Base UI as the radio element, it reports Base UI's live state back to the item's mirror
|
|
193
|
-
|
|
193
|
+
function RadioButtonSurface({ state, ref, ...props }) {
|
|
194
194
|
const context = useItemContext();
|
|
195
195
|
useEffect(() => {
|
|
196
196
|
context.setState({
|
|
@@ -201,7 +201,7 @@ const RadioButtonSurface = /* @__PURE__ */ forwardRef(function RadioButtonSurfac
|
|
|
201
201
|
});
|
|
202
202
|
}, [state.checked, state.disabled, state.readOnly, state.required, context.setState]);
|
|
203
203
|
return _jsx("span", { ...props, ref: ref });
|
|
204
|
-
}
|
|
204
|
+
}
|
|
205
205
|
// Registering a message part's id in the group's and buttons' aria-describedby while the part is mounted
|
|
206
206
|
function useMessageId(id) {
|
|
207
207
|
const generatedId = useId();
|
|
@@ -40,7 +40,7 @@ export declare function Root({ children, validation, ...props }: Omit<RatingGrou
|
|
|
40
40
|
/** The rating's validation state, with an optional message: `'error'` styles it as invalid, `['error', 'Rate your delivery']` also shows that message in Error. Same for `'success'` and Success. Omit it for a neutral rating. */
|
|
41
41
|
validation?: Validation;
|
|
42
42
|
}): import("react").JSX.Element;
|
|
43
|
-
export declare
|
|
43
|
+
export declare function Container({ disableStyle, children, className, ref, ...props }: ComponentProps<'div'> & StyleProps): import("react").JSX.Element;
|
|
44
44
|
export declare function Label({ disableStyle, className, ...props }: Omit<RatingGroupLabelProps, 'asChild'> & StyleProps): import("react").JSX.Element;
|
|
45
45
|
/** Calls children for each rating index. Pass the supplied index to StarButton; do not create a second hover or selection state. */
|
|
46
46
|
export declare function StarsList({ disableStyle, className, children, ...props }: (Omit<RatingGroupControlProps, 'asChild' | 'children'> & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { RatingGroup, useRatingGroup, useRatingGroupContext, } from '@ark-ui/react/rating-group';
|
|
3
3
|
import { Star as DefaultStarIcon } from "../../utils/icons.js";
|
|
4
|
-
import { cloneElement, createContext,
|
|
4
|
+
import { cloneElement, createContext, useContext, useId, Fragment } from 'react';
|
|
5
5
|
import { readValidation, validationAttributes, validationMessageContent } from "../../utils/Validation.js";
|
|
6
6
|
/**
|
|
7
7
|
* Root configures the scale and selection. StarsList supplies indices; use StarButton with StarIcon for each rating. Highlight, checked, and half-star appearance are built in; do not recreate hover state.
|
|
@@ -39,10 +39,10 @@ export function Root({ children, validation, ...props }) {
|
|
|
39
39
|
const rating = useRatingGroup(props);
|
|
40
40
|
return (_jsx(RootPropsContext.Provider, { value: { validation: readValidation(validation) }, children: _jsx(RatingGroup.RootProvider, { value: rating, asChild: true, children: _jsx(_Fragment, { children: children }) }) }));
|
|
41
41
|
}
|
|
42
|
-
export
|
|
42
|
+
export function Container({ disableStyle, children, className, ref, ...props }) {
|
|
43
43
|
const root = useRootPropsContext();
|
|
44
44
|
return (_jsxs("div", { ...props, ref: ref, ...validationAttributes(root.validation), "data-component": "ratinginput-container", "data-style-disabled": disableStyle ? '' : undefined, className: className, children: [children, _jsx(RatingGroup.HiddenInput, { style: { display: 'none' } })] }));
|
|
45
|
-
}
|
|
45
|
+
}
|
|
46
46
|
export function Label({ disableStyle, className, ...props }) {
|
|
47
47
|
return (_jsx(RatingGroup.Label, { ...props, "data-component": "ratinginput-label", "data-style-disabled": disableStyle ? '' : undefined, className: className }));
|
|
48
48
|
}
|