@wix/site-ui 1.105.0 → 1.107.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.
@@ -0,0 +1,82 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { Radio } from "../Radio/index.js";
4
+ import { Field } from "../Field/index.js";
5
+ import * as __rspack_external_react from "react";
6
+ const RadioField_module = {
7
+ fieldItem: "fieldItem-RyE1Xd",
8
+ fieldLabel: "fieldLabel-3Ws24V",
9
+ fieldLabelStack: "fieldLabelStack-TwpByX",
10
+ fieldLabelText: "fieldLabelText-cfnyvw",
11
+ fieldSuffix: "fieldSuffix-SKi6ny"
12
+ };
13
+ const RadioField = /*#__PURE__*/ __rspack_external_react.forwardRef(({ checked, description, descriptionProps, disabled, error, errorProps, indicatorProps, invalid, itemProps, label, labelProps, name, onSelect, radioProps, size, suffix, value, variant = 'default', ...props }, ref)=>{
14
+ const { className: itemClassName, onClick: itemOnClick, ...restItemProps } = itemProps ?? {};
15
+ const { className: labelClassName, ...restLabelProps } = labelProps ?? {};
16
+ const { className: descriptionClassName, render: descriptionRender = /*#__PURE__*/ jsx("span", {}), ...restDescriptionProps } = descriptionProps ?? {};
17
+ const { className: errorClassName, match = true, ...restErrorProps } = errorProps ?? {};
18
+ const { disabled: radioDisabled, ...restRadioProps } = radioProps ?? {};
19
+ const isDisabled = disabled || radioDisabled;
20
+ const handleClick = (event)=>{
21
+ itemOnClick?.(event);
22
+ if (!event.defaultPrevented && onSelect && !isDisabled && !checked) onSelect(value);
23
+ };
24
+ return /*#__PURE__*/ jsxs(Field.Root, {
25
+ ...props,
26
+ ref: ref,
27
+ name: name,
28
+ disabled: isDisabled,
29
+ invalid: invalid ?? Boolean(error),
30
+ children: [
31
+ /*#__PURE__*/ jsxs(Field.Item, {
32
+ ...restItemProps,
33
+ className: clsx(RadioField_module.fieldItem, itemClassName),
34
+ "data-variant": variant,
35
+ onClick: handleClick,
36
+ children: [
37
+ /*#__PURE__*/ jsx(Radio.Root, {
38
+ value: checked ? '' : value,
39
+ size: size,
40
+ disabled: isDisabled,
41
+ ...restRadioProps,
42
+ children: /*#__PURE__*/ jsx(Radio.Indicator, {
43
+ ...indicatorProps
44
+ })
45
+ }),
46
+ /*#__PURE__*/ jsxs(Field.Label, {
47
+ ...restLabelProps,
48
+ className: clsx(RadioField_module.fieldLabel, {
49
+ [RadioField_module.fieldLabelStack]: description
50
+ }, labelClassName),
51
+ children: [
52
+ /*#__PURE__*/ jsxs("span", {
53
+ className: RadioField_module.fieldLabelText,
54
+ children: [
55
+ label,
56
+ suffix ? /*#__PURE__*/ jsx("span", {
57
+ className: RadioField_module.fieldSuffix,
58
+ children: suffix
59
+ }) : null
60
+ ]
61
+ }),
62
+ description ? /*#__PURE__*/ jsx(Field.Description, {
63
+ ...restDescriptionProps,
64
+ render: descriptionRender,
65
+ className: descriptionClassName,
66
+ children: description
67
+ }) : null
68
+ ]
69
+ })
70
+ ]
71
+ }),
72
+ error ? /*#__PURE__*/ jsx(Field.Error, {
73
+ ...restErrorProps,
74
+ match: match,
75
+ className: errorClassName,
76
+ children: error
77
+ }) : null
78
+ ]
79
+ });
80
+ });
81
+ RadioField.displayName = 'RadioField';
82
+ export { RadioField };
@@ -1,6 +1,11 @@
1
1
  .root-kKvIZ_ {
2
2
  flex-direction: column;
3
- gap: 12px;
4
3
  display: flex;
5
4
  }
6
5
 
6
+ .root-kKvIZ_[data-orientation="horizontal"] {
7
+ flex-flow: wrap;
8
+ align-items: center;
9
+ gap: 24px 30px;
10
+ }
11
+
@@ -158,6 +158,8 @@ declare const pointer: "pointer";
158
158
 
159
159
  export declare const RadioGroup: React_2.ForwardRefExoticComponent<Omit<Omit<RadioGroup_2.Props<unknown>, "ref">, "className"> & {
160
160
  className?: string | undefined;
161
+ } & {
162
+ orientation?: RadioGroupOrientation | undefined;
161
163
  } & React_2.RefAttributes<HTMLDivElement>>;
162
164
 
163
165
  /**
@@ -181,6 +183,8 @@ export declare type RadioGroupChangeEventDetails = BaseUIChangeEventDetails<Radi
181
183
 
182
184
  export declare type RadioGroupChangeEventReason = typeof REASONS.none;
183
185
 
186
+ declare type RadioGroupOrientation = 'vertical' | 'horizontal';
187
+
184
188
  export declare interface RadioGroupProps<Value = any> extends Omit<BaseUIComponentProps<'div', RadioGroupState>, 'value'> {
185
189
  /**
186
190
  * Whether the component should ignore user interaction.
@@ -156,9 +156,11 @@ if ("production" !== process.env.NODE_ENV) RadioGroup_RadioGroup.displayName = "
156
156
  const RadioGroup_module = {
157
157
  root: "root-kKvIZ_"
158
158
  };
159
- const RadioGroup_RadioGroup_RadioGroup = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(RadioGroup_RadioGroup, {
159
+ const RadioGroup_RadioGroup_RadioGroup = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, orientation = 'vertical', 'aria-orientation': ariaOrientation, ...props }, ref)=>/*#__PURE__*/ jsx(RadioGroup_RadioGroup, {
160
160
  ref: ref,
161
161
  className: clsx(RadioGroup_module.root, className),
162
+ "data-orientation": orientation,
163
+ "aria-orientation": ariaOrientation ?? ('horizontal' === orientation ? orientation : void 0),
162
164
  ...props
163
165
  }));
164
166
  export { RadioGroup_RadioGroup_RadioGroup as RadioGroup };
@@ -0,0 +1,22 @@
1
+ .label-JrSYqL {
2
+ font: var(--wst-paragraph-3-font);
3
+ color: var(--wst-paragraph-2-color, #000);
4
+ }
5
+
6
+ .group-N19s7N[data-spacing]:not([data-orientation="horizontal"]) {
7
+ gap: 12px;
8
+ }
9
+
10
+ .group-N19s7N[data-variant="box"] {
11
+ align-items: flex-start;
12
+ }
13
+
14
+ .group-N19s7N[data-variant="box"][data-fluid] {
15
+ align-items: stretch;
16
+ width: 100%;
17
+ }
18
+
19
+ .group-N19s7N[data-variant="box"]:not([data-spacing]) > * + * {
20
+ margin-top: -1px;
21
+ }
22
+
@@ -0,0 +1,402 @@
1
+ import { RadioGroup } from '@base-ui/react';
2
+ import { RadioGroupOrientation } from '../RadioGroup/RadioGroup';
3
+ import * as React_2 from 'react';
4
+
5
+ declare type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
6
+ /**
7
+ * The reason for the event.
8
+ */
9
+ reason: Reason;
10
+ /**
11
+ * The native event associated with the custom event.
12
+ */
13
+ event: ReasonToEvent<Reason>;
14
+ /**
15
+ * Cancels Base UI from handling the event.
16
+ */
17
+ cancel: () => void;
18
+ /**
19
+ * Allows the event to propagate in cases where Base UI will stop the propagation.
20
+ */
21
+ allowPropagation: () => void;
22
+ /**
23
+ * Indicates whether the event has been canceled.
24
+ */
25
+ isCanceled: boolean;
26
+ /**
27
+ * Indicates whether the event is allowed to propagate.
28
+ */
29
+ isPropagationAllowed: boolean;
30
+ /**
31
+ * The element that triggered the event, if applicable.
32
+ */
33
+ trigger: Element | undefined;
34
+ } & CustomProperties;
35
+
36
+ /**
37
+ * Details of custom change events emitted by Base UI components.
38
+ */
39
+ declare type BaseUIChangeEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends string ? BaseUIChangeEventDetail<Reason, CustomProperties> & {} : never;
40
+
41
+ /**
42
+ * Props shared by all Base UI components.
43
+ * Contains `className` (string or callback taking the component's state as an argument) and `render` (function to customize rendering).
44
+ */
45
+ declare type BaseUIComponentProps<ElementType extends React_2.ElementType, State, RenderFunctionProps = HTMLProps> = Omit<WithBaseUIEvent<React_2.ComponentPropsWithRef<ElementType>>, 'className' | 'color' | 'defaultValue' | 'defaultChecked' | 'style'> & {
46
+ /**
47
+ * CSS class applied to the element, or a function that
48
+ * returns a class based on the component's state.
49
+ */
50
+ className?: string | ((state: State) => string | undefined) | undefined;
51
+ /**
52
+ * Allows you to replace the component's HTML element
53
+ * with a different tag, or compose it with another component.
54
+ *
55
+ * Accepts a `ReactElement` or a function that returns the element to render.
56
+ */
57
+ render?: React_2.ReactElement | ComponentRenderFn<RenderFunctionProps, State> | undefined;
58
+ /**
59
+ * Style applied to the element, or a function that
60
+ * returns a style object based on the component's state.
61
+ */
62
+ style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
63
+ };
64
+
65
+ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E & {
66
+ preventBaseUIHandler: () => void;
67
+ readonly baseUIHandlerPrevented?: boolean | undefined;
68
+ };
69
+
70
+ declare const cancelOpen: "cancel-open";
71
+
72
+ declare const chipRemovePress: "chip-remove-press";
73
+
74
+ declare const clearPress: "clear-press";
75
+
76
+ declare const closePress: "close-press";
77
+
78
+ declare const closeWatcher: "close-watcher";
79
+
80
+ /**
81
+ * Shape of the render prop: a function that takes props to be spread on the element and component's state and returns a React element.
82
+ *
83
+ * @template Props Props to be spread on the rendered element.
84
+ * @template State Component's internal state.
85
+ */
86
+ declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
87
+
88
+ declare const decrementPress: "decrement-press";
89
+
90
+ declare const disabled: "disabled";
91
+
92
+ declare const drag: "drag";
93
+
94
+ declare const escapeKey: "escape-key";
95
+
96
+ declare interface FieldRootState {
97
+ /**
98
+ * Whether the component should ignore user interaction.
99
+ */
100
+ disabled: boolean;
101
+ /**
102
+ * Whether the field has been touched.
103
+ */
104
+ touched: boolean;
105
+ /**
106
+ * Whether the field value has changed from its initial value.
107
+ */
108
+ dirty: boolean;
109
+ /**
110
+ * Whether the field is valid.
111
+ */
112
+ valid: boolean | null;
113
+ /**
114
+ * Whether the field has a value.
115
+ */
116
+ filled: boolean;
117
+ /**
118
+ * Whether the field is focused.
119
+ */
120
+ focused: boolean;
121
+ }
122
+
123
+ declare const focusOut: "focus-out";
124
+
125
+ declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
126
+ ref?: React_2.Ref<T> | undefined;
127
+ };
128
+
129
+ declare const imperativeAction: "imperative-action";
130
+
131
+ declare const incrementPress: "increment-press";
132
+
133
+ declare const initial: "initial";
134
+
135
+ declare const inputBlur: "input-blur";
136
+
137
+ declare const inputChange: "input-change";
138
+
139
+ declare const inputClear: "input-clear";
140
+
141
+ declare const inputPaste: "input-paste";
142
+
143
+ declare const inputPress: "input-press";
144
+
145
+ declare const itemPress: "item-press";
146
+
147
+ declare const keyboard: "keyboard";
148
+
149
+ declare const linkPress: "link-press";
150
+
151
+ declare const listNavigation: "list-navigation";
152
+
153
+ declare const missing: "missing";
154
+
155
+ declare const none: "none";
156
+
157
+ declare const outsidePress: "outside-press";
158
+
159
+ declare const pointer: "pointer";
160
+
161
+ declare const RadioGroup_2: React_2.ForwardRefExoticComponent<Omit<Omit<RadioGroup_3.Props<unknown>, "ref">, "className"> & {
162
+ className?: string | undefined;
163
+ } & {
164
+ orientation?: RadioGroupOrientation_2 | undefined;
165
+ } & React_2.RefAttributes<HTMLDivElement>>;
166
+
167
+ /**
168
+ * Provides a shared state to a series of radio buttons.
169
+ * Renders a `<div>` element.
170
+ *
171
+ * Documentation: [Base UI Radio Group](https://base-ui.com/react/components/radio)
172
+ */
173
+ declare const RadioGroup_3: {
174
+ <Value>(props: RadioGroup_3.Props<Value>): React_2.JSX.Element;
175
+ };
176
+
177
+ declare namespace RadioGroup_3 {
178
+ type State = RadioGroupState;
179
+ type Props<TValue = any> = RadioGroupProps_2<TValue>;
180
+ type ChangeEventReason = RadioGroupChangeEventReason;
181
+ type ChangeEventDetails = RadioGroupChangeEventDetails;
182
+ }
183
+
184
+ declare type RadioGroupChangeEventDetails = BaseUIChangeEventDetails<RadioGroup_3.ChangeEventReason>;
185
+
186
+ declare type RadioGroupChangeEventReason = typeof REASONS.none;
187
+
188
+ export declare const RadioGroupField: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<RadioGroup.Props<unknown>, "ref">, "className"> & {
189
+ className?: string | undefined;
190
+ } & {
191
+ orientation?: RadioGroupOrientation | undefined;
192
+ } & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
193
+ /** Accessible label rendered above the group. */
194
+ label?: React_2.ReactNode;
195
+ /** Error message rendered below the group when invalid. */
196
+ error?: React_2.ReactNode;
197
+ /** Always-visible helper text rendered below the group. */
198
+ description?: React_2.ReactNode;
199
+ /** Visual style applied to every radio in the group. */
200
+ variant?: RadioGroupFieldVariant | undefined;
201
+ /** Separates `box` tiles instead of collapsing their borders. */
202
+ withSpacing?: boolean | undefined;
203
+ /** Stretches `box` tiles to the available width. */
204
+ fluid?: boolean | undefined;
205
+ /** Marks the group invalid, styling every radio and revealing `error`. */
206
+ invalid?: boolean | undefined;
207
+ /** Size in pixels applied to every radio in the group. */
208
+ size?: number | undefined;
209
+ } & React_2.RefAttributes<HTMLDivElement>>;
210
+
211
+ export declare type RadioGroupFieldProps = RadioGroupProps & {
212
+ /** Accessible label rendered above the group. */
213
+ label?: React_2.ReactNode;
214
+ /** Error message rendered below the group when invalid. */
215
+ error?: React_2.ReactNode;
216
+ /** Always-visible helper text rendered below the group. */
217
+ description?: React_2.ReactNode;
218
+ /** Visual style applied to every radio in the group. */
219
+ variant?: RadioGroupFieldVariant;
220
+ /** Separates `box` tiles instead of collapsing their borders. */
221
+ withSpacing?: boolean;
222
+ /** Stretches `box` tiles to the available width. */
223
+ fluid?: boolean;
224
+ /** Marks the group invalid, styling every radio and revealing `error`. */
225
+ invalid?: boolean;
226
+ /** Size in pixels applied to every radio in the group. */
227
+ size?: number;
228
+ };
229
+
230
+ export declare type RadioGroupFieldVariant = 'default' | 'box';
231
+
232
+ declare type RadioGroupOrientation_2 = 'vertical' | 'horizontal';
233
+
234
+ declare type RadioGroupProps = React_2.ComponentPropsWithoutRef<typeof RadioGroup_2>;
235
+
236
+ declare interface RadioGroupProps_2<Value = any> extends Omit<BaseUIComponentProps<'div', RadioGroupState>, 'value'> {
237
+ /**
238
+ * Whether the component should ignore user interaction.
239
+ * @default false
240
+ */
241
+ disabled?: boolean | undefined;
242
+ /**
243
+ * Whether the user should be unable to select a different radio button in the group.
244
+ * @default false
245
+ */
246
+ readOnly?: boolean | undefined;
247
+ /**
248
+ * Whether the user must choose a value before submitting a form.
249
+ * @default false
250
+ */
251
+ required?: boolean | undefined;
252
+ /**
253
+ * Identifies the field when a form is submitted.
254
+ */
255
+ name?: string | undefined;
256
+ /**
257
+ * Identifies the form that owns the radio inputs.
258
+ * Useful when the radio group is rendered outside the form.
259
+ */
260
+ form?: string | undefined;
261
+ /**
262
+ * The controlled value of the radio item that should be currently selected.
263
+ *
264
+ * To render an uncontrolled radio group, use the `defaultValue` prop instead.
265
+ */
266
+ value?: Value | undefined;
267
+ /**
268
+ * The uncontrolled value of the radio button that should be initially selected.
269
+ *
270
+ * To render a controlled radio group, use the `value` prop instead.
271
+ */
272
+ defaultValue?: Value | undefined;
273
+ /**
274
+ * Callback fired when the value changes.
275
+ */
276
+ onValueChange?: ((value: Value, eventDetails: RadioGroup_3.ChangeEventDetails) => void) | undefined;
277
+ /**
278
+ * A ref to access the hidden input element.
279
+ */
280
+ inputRef?: React_2.Ref<HTMLInputElement> | undefined;
281
+ }
282
+
283
+ declare interface RadioGroupState extends FieldRootState {
284
+ /**
285
+ * Whether the user should be unable to select a different radio button in the group.
286
+ */
287
+ readOnly: boolean;
288
+ /**
289
+ * Whether the user must tick a radio button within the group before submitting a form.
290
+ */
291
+ required: boolean;
292
+ }
293
+
294
+ declare namespace REASONS {
295
+ export {
296
+ none,
297
+ triggerPress,
298
+ triggerHover,
299
+ triggerFocus,
300
+ outsidePress,
301
+ itemPress,
302
+ closePress,
303
+ linkPress,
304
+ clearPress,
305
+ chipRemovePress,
306
+ trackPress,
307
+ incrementPress,
308
+ decrementPress,
309
+ inputChange,
310
+ inputClear,
311
+ inputBlur,
312
+ inputPaste,
313
+ inputPress,
314
+ focusOut,
315
+ escapeKey,
316
+ closeWatcher,
317
+ listNavigation,
318
+ keyboard,
319
+ pointer,
320
+ drag,
321
+ wheel,
322
+ scrub,
323
+ cancelOpen,
324
+ siblingOpen,
325
+ disabled,
326
+ missing,
327
+ initial,
328
+ imperativeAction,
329
+ swipe,
330
+ windowResize
331
+ }
332
+ }
333
+
334
+ /**
335
+ * Maps a change `reason` string to the corresponding native event type.
336
+ */
337
+ declare type ReasonToEvent<Reason extends string> = Reason extends keyof ReasonToEventMap ? ReasonToEventMap[Reason] : Event;
338
+
339
+ declare interface ReasonToEventMap {
340
+ [REASONS.none]: Event;
341
+ [REASONS.triggerPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
342
+ [REASONS.triggerHover]: MouseEvent;
343
+ [REASONS.triggerFocus]: FocusEvent;
344
+ [REASONS.outsidePress]: MouseEvent | PointerEvent | TouchEvent;
345
+ [REASONS.itemPress]: MouseEvent | KeyboardEvent | PointerEvent;
346
+ [REASONS.closePress]: MouseEvent | KeyboardEvent | PointerEvent;
347
+ [REASONS.linkPress]: MouseEvent | PointerEvent;
348
+ [REASONS.clearPress]: PointerEvent | MouseEvent | KeyboardEvent;
349
+ [REASONS.chipRemovePress]: PointerEvent | MouseEvent | KeyboardEvent;
350
+ [REASONS.trackPress]: PointerEvent | MouseEvent | TouchEvent;
351
+ [REASONS.incrementPress]: PointerEvent | MouseEvent | TouchEvent;
352
+ [REASONS.decrementPress]: PointerEvent | MouseEvent | TouchEvent;
353
+ [REASONS.inputChange]: InputEvent | Event;
354
+ [REASONS.inputClear]: InputEvent | FocusEvent | Event;
355
+ [REASONS.inputBlur]: FocusEvent;
356
+ [REASONS.inputPaste]: ClipboardEvent;
357
+ [REASONS.inputPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
358
+ [REASONS.focusOut]: FocusEvent | KeyboardEvent;
359
+ [REASONS.escapeKey]: KeyboardEvent;
360
+ [REASONS.closeWatcher]: Event;
361
+ [REASONS.listNavigation]: KeyboardEvent;
362
+ [REASONS.keyboard]: KeyboardEvent;
363
+ [REASONS.pointer]: PointerEvent;
364
+ [REASONS.drag]: PointerEvent | TouchEvent;
365
+ [REASONS.swipe]: PointerEvent | TouchEvent;
366
+ [REASONS.wheel]: WheelEvent;
367
+ [REASONS.scrub]: PointerEvent;
368
+ [REASONS.cancelOpen]: MouseEvent;
369
+ [REASONS.siblingOpen]: Event;
370
+ [REASONS.disabled]: Event;
371
+ [REASONS.missing]: Event;
372
+ [REASONS.initial]: Event;
373
+ [REASONS.imperativeAction]: Event;
374
+ [REASONS.windowResize]: UIEvent;
375
+ }
376
+
377
+ declare const scrub: "scrub";
378
+
379
+ declare const siblingOpen: "sibling-open";
380
+
381
+ declare const swipe: "swipe";
382
+
383
+ declare const trackPress: "track-press";
384
+
385
+ declare const triggerFocus: "trigger-focus";
386
+
387
+ declare const triggerHover: "trigger-hover";
388
+
389
+ declare const triggerPress: "trigger-press";
390
+
391
+ declare const wheel: "wheel";
392
+
393
+ declare const windowResize: "window-resize";
394
+
395
+ /**
396
+ * Adds a `preventBaseUIHandler` method to all event handlers.
397
+ */
398
+ declare type WithBaseUIEvent<T> = { [K in keyof T]: WithPreventBaseUIHandler<T[K]> };
399
+
400
+ declare type WithPreventBaseUIHandler<T> = T extends ((event: infer E) => any) ? E extends React_2.SyntheticEvent<Element, Event> ? (event: BaseUIEvent<E>) => ReturnType<T> : T : T extends undefined ? undefined : T;
401
+
402
+ export { }
@@ -0,0 +1,55 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { RadioGroup as RadioGroup_RadioGroup_RadioGroup } from "../RadioGroup/index.js";
4
+ import { Field } from "../Field/index.js";
5
+ import * as __rspack_external_react from "react";
6
+ const RadioGroupField_module = {
7
+ label: "label-JrSYqL",
8
+ group: "group-N19s7N"
9
+ };
10
+ const RadioGroupField = /*#__PURE__*/ __rspack_external_react.forwardRef(({ label, error, description, variant = 'default', withSpacing = false, fluid = false, invalid, disabled, size, children, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...props }, ref)=>{
11
+ const labelId = __rspack_external_react.useId();
12
+ const isInvalid = invalid ?? Boolean(error);
13
+ const items = __rspack_external_react.Children.map(children, (child)=>{
14
+ if (!/*#__PURE__*/ __rspack_external_react.isValidElement(child)) return child;
15
+ const childProps = child.props;
16
+ return /*#__PURE__*/ __rspack_external_react.cloneElement(child, {
17
+ variant: childProps.variant ?? variant,
18
+ invalid: childProps.invalid ?? (isInvalid || void 0),
19
+ size: childProps.size ?? size,
20
+ checked: void 0
21
+ });
22
+ });
23
+ return /*#__PURE__*/ jsxs(Field.Root, {
24
+ invalid: isInvalid,
25
+ disabled: disabled,
26
+ children: [
27
+ null != label ? /*#__PURE__*/ jsx("span", {
28
+ id: labelId,
29
+ className: RadioGroupField_module.label,
30
+ children: label
31
+ }) : null,
32
+ /*#__PURE__*/ jsx(RadioGroup_RadioGroup_RadioGroup, {
33
+ ref: ref,
34
+ disabled: disabled,
35
+ "aria-label": null == label ? ariaLabel : void 0,
36
+ "aria-labelledby": null != label ? ariaLabelledby ?? labelId : ariaLabelledby,
37
+ "data-variant": variant,
38
+ "data-spacing": withSpacing ? '' : void 0,
39
+ "data-fluid": fluid ? '' : void 0,
40
+ className: clsx(RadioGroupField_module.group, className),
41
+ ...props,
42
+ children: items
43
+ }),
44
+ null != error ? /*#__PURE__*/ jsx(Field.Error, {
45
+ match: isInvalid,
46
+ children: error
47
+ }) : null,
48
+ null != description ? /*#__PURE__*/ jsx(Field.Description, {
49
+ children: description
50
+ }) : null
51
+ ]
52
+ });
53
+ });
54
+ RadioGroupField.displayName = 'RadioGroupField';
55
+ export { RadioGroupField };