@entur/form 6.0.1 → 7.0.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/form.cjs.development.js +173 -90
- package/dist/form.cjs.development.js.map +1 -1
- package/dist/form.cjs.production.min.js +1 -1
- package/dist/form.cjs.production.min.js.map +1 -1
- package/dist/form.esm.js +176 -94
- package/dist/form.esm.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/inputPanel/CheckboxPanel.d.ts +30 -0
- package/dist/inputPanel/InputPanelBase.d.ts +33 -0
- package/dist/{RadioPanel.d.ts → inputPanel/RadioPanel.d.ts} +9 -10
- package/dist/inputPanel/index.d.ts +2 -0
- package/dist/styles.css +435 -380
- package/package.json +5 -5
|
@@ -61,7 +61,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
61
61
|
return target;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
var _excluded$
|
|
64
|
+
var _excluded$g = ["children", "hideIcon", "variant", "className"];
|
|
65
65
|
var AlertIcon = function AlertIcon(_ref) {
|
|
66
66
|
var variant = _ref.variant;
|
|
67
67
|
var iconClass = "eds-feedback-text__icon eds-feedback-text__icon--" + variant;
|
|
@@ -90,7 +90,7 @@ var FeedbackText = function FeedbackText(_ref2) {
|
|
|
90
90
|
hideIcon = _ref2$hideIcon === void 0 ? false : _ref2$hideIcon,
|
|
91
91
|
variant = _ref2.variant,
|
|
92
92
|
className = _ref2.className,
|
|
93
|
-
rest = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
93
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded$g);
|
|
94
94
|
return React__default["default"].createElement(typography.SubLabel, _extends({
|
|
95
95
|
className: classNames__default["default"]('eds-feedback-text', {
|
|
96
96
|
'eds-feedback-text--info': variant === 'info'
|
|
@@ -124,14 +124,14 @@ var useInputGroupContext = function useInputGroupContext() {
|
|
|
124
124
|
return React__namespace.useContext(InputGroupContext);
|
|
125
125
|
};
|
|
126
126
|
|
|
127
|
-
var _excluded$
|
|
127
|
+
var _excluded$f = ["label", "required", "labelId", "staticAnimation"];
|
|
128
128
|
var InputGroupLabel = function InputGroupLabel(_ref) {
|
|
129
129
|
var label = _ref.label,
|
|
130
130
|
required = _ref.required,
|
|
131
131
|
labelId = _ref.labelId,
|
|
132
132
|
_ref$staticAnimation = _ref.staticAnimation,
|
|
133
133
|
staticAnimation = _ref$staticAnimation === void 0 ? false : _ref$staticAnimation,
|
|
134
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
134
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
135
135
|
var _useInputGroupContext = useInputGroupContext(),
|
|
136
136
|
isFilled = _useInputGroupContext.isFilled;
|
|
137
137
|
var filler = staticAnimation || isFilled;
|
|
@@ -161,7 +161,7 @@ var useVariant = function useVariant() {
|
|
|
161
161
|
return context;
|
|
162
162
|
};
|
|
163
163
|
|
|
164
|
-
var _excluded$
|
|
164
|
+
var _excluded$e = ["children", "className", "dark", "disabled", "readOnly", "variant", "prepend", "append", "size", "isFilled", "label", "required", "labelTooltip", "feedback", "labelId", "labelProps", "style", "disableLabelAnimation", "ariaAlertOnFeedback"];
|
|
165
165
|
var BaseFormControl = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
166
166
|
var children = _ref.children,
|
|
167
167
|
className = _ref.className,
|
|
@@ -188,7 +188,7 @@ var BaseFormControl = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
188
188
|
disableLabelAnimation = _ref$disableLabelAnim === void 0 ? false : _ref$disableLabelAnim,
|
|
189
189
|
_ref$ariaAlertOnFeedb = _ref.ariaAlertOnFeedback,
|
|
190
190
|
ariaAlertOnFeedback = _ref$ariaAlertOnFeedb === void 0 ? false : _ref$ariaAlertOnFeedb,
|
|
191
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
191
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
192
192
|
var contextVariant = useVariant();
|
|
193
193
|
var currentVariant = variant || contextVariant;
|
|
194
194
|
return React__default["default"].createElement(InputGroupContextProvider, null, React__default["default"].createElement("div", _extends({
|
|
@@ -224,7 +224,7 @@ var BaseFormControl = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
224
224
|
}, feedback));
|
|
225
225
|
});
|
|
226
226
|
|
|
227
|
-
var _excluded$
|
|
227
|
+
var _excluded$d = ["checked", "className", "children", "style", "disabled", "reduceClickArea"];
|
|
228
228
|
var Checkbox = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
229
229
|
var checked = _ref.checked,
|
|
230
230
|
className = _ref.className,
|
|
@@ -233,19 +233,13 @@ var Checkbox = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
233
233
|
_ref$disabled = _ref.disabled,
|
|
234
234
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
235
235
|
reduceClickArea = _ref.reduceClickArea,
|
|
236
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
237
|
-
|
|
238
|
-
// Read more at https://reactjs.org/docs/hooks-reference.html#useimperativehandle
|
|
239
|
-
var innerRef = React__default["default"].useRef(null);
|
|
240
|
-
//eslint-disable-next-line
|
|
241
|
-
React__default["default"].useImperativeHandle(ref, function () {
|
|
242
|
-
return innerRef.current;
|
|
243
|
-
});
|
|
236
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
237
|
+
var inputRef = React__default["default"].useRef(null);
|
|
244
238
|
var isIndeterminate = checked === 'indeterminate';
|
|
245
239
|
var isControlled = checked !== undefined;
|
|
246
240
|
React__default["default"].useEffect(function () {
|
|
247
|
-
if (
|
|
248
|
-
|
|
241
|
+
if (inputRef && inputRef.current) {
|
|
242
|
+
inputRef.current.indeterminate = isIndeterminate;
|
|
249
243
|
}
|
|
250
244
|
}, [isIndeterminate]);
|
|
251
245
|
return React__default["default"].createElement("label", {
|
|
@@ -256,7 +250,7 @@ var Checkbox = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
256
250
|
style: style
|
|
257
251
|
}, React__default["default"].createElement("input", _extends({
|
|
258
252
|
type: "checkbox",
|
|
259
|
-
ref:
|
|
253
|
+
ref: utils.mergeRefs(ref, inputRef),
|
|
260
254
|
checked: isControlled ? checked === true : undefined,
|
|
261
255
|
disabled: disabled
|
|
262
256
|
}, rest)), React__default["default"].createElement("span", {
|
|
@@ -287,23 +281,21 @@ var CheckboxIcon = function CheckboxIcon(_ref2) {
|
|
|
287
281
|
height: "5",
|
|
288
282
|
fill: "white"
|
|
289
283
|
}) : React__default["default"].createElement("path", {
|
|
290
|
-
className: "eds-checkbox-icon__path",
|
|
291
284
|
d: "M14.1 27.2l7.1 7.2 14.6-14.8",
|
|
292
285
|
fill: "none"
|
|
293
286
|
}));
|
|
294
287
|
};
|
|
295
288
|
|
|
296
|
-
var _excluded$
|
|
289
|
+
var _excluded$c = ["children", "className", "label"];
|
|
297
290
|
var Fieldset = function Fieldset(_ref) {
|
|
298
291
|
var children = _ref.children,
|
|
299
292
|
className = _ref.className,
|
|
300
293
|
label = _ref.label,
|
|
301
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
294
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
302
295
|
return React__default["default"].createElement("fieldset", _extends({
|
|
303
296
|
className: classNames__default["default"]('eds-fieldset', className)
|
|
304
|
-
}, rest), label && React__default["default"].createElement(typography.
|
|
305
|
-
as: "legend"
|
|
306
|
-
className: "eds-legend"
|
|
297
|
+
}, rest), label && React__default["default"].createElement(typography.Heading5, {
|
|
298
|
+
as: "legend"
|
|
307
299
|
}, label), children);
|
|
308
300
|
};
|
|
309
301
|
|
|
@@ -317,13 +309,14 @@ var useRadioGroupContext = function useRadioGroupContext() {
|
|
|
317
309
|
return context;
|
|
318
310
|
};
|
|
319
311
|
|
|
320
|
-
var _excluded$
|
|
312
|
+
var _excluded$b = ["className", "children", "value", "disabled"];
|
|
321
313
|
var Radio = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
314
|
+
var _rest$name, _rest$checked, _rest$onChange;
|
|
322
315
|
var className = _ref.className,
|
|
323
316
|
children = _ref.children,
|
|
324
317
|
value = _ref.value,
|
|
325
318
|
disabled = _ref.disabled,
|
|
326
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
319
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
327
320
|
var classList = classNames__default["default"](className, 'eds-form-component--radio__radio', {
|
|
328
321
|
'eds-form-component--radio__radio--disabled': disabled
|
|
329
322
|
});
|
|
@@ -335,11 +328,11 @@ var Radio = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
335
328
|
className: "eds-form-component--radio__container"
|
|
336
329
|
}, React__default["default"].createElement("input", _extends({
|
|
337
330
|
type: "radio",
|
|
338
|
-
name: name,
|
|
331
|
+
name: (_rest$name = rest.name) != null ? _rest$name : name,
|
|
339
332
|
ref: ref,
|
|
340
333
|
value: value,
|
|
341
|
-
checked: selectedValue === value,
|
|
342
|
-
onChange: onChange,
|
|
334
|
+
checked: (_rest$checked = rest.checked) != null ? _rest$checked : selectedValue === value,
|
|
335
|
+
onChange: (_rest$onChange = rest.onChange) != null ? _rest$onChange : onChange,
|
|
343
336
|
disabled: disabled
|
|
344
337
|
}, rest)), React__default["default"].createElement("span", {
|
|
345
338
|
className: classList
|
|
@@ -352,30 +345,9 @@ var Radio = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
352
345
|
}, children));
|
|
353
346
|
});
|
|
354
347
|
|
|
355
|
-
var _excluded$
|
|
356
|
-
var
|
|
357
|
-
var
|
|
358
|
-
value = _ref.value,
|
|
359
|
-
children = _ref.children,
|
|
360
|
-
onChange = _ref.onChange,
|
|
361
|
-
label = _ref.label,
|
|
362
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
363
|
-
var contextValue = React__default["default"].useMemo(function () {
|
|
364
|
-
return {
|
|
365
|
-
name: name,
|
|
366
|
-
value: value,
|
|
367
|
-
onChange: onChange
|
|
368
|
-
};
|
|
369
|
-
}, [name, value, onChange]);
|
|
370
|
-
return React__default["default"].createElement(RadioGroupContextProvider, {
|
|
371
|
-
value: contextValue
|
|
372
|
-
}, label ? React__default["default"].createElement(Fieldset, _extends({
|
|
373
|
-
label: label
|
|
374
|
-
}, rest), children) : children);
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
var _excluded$7 = ["className", "children", "value", "title", "secondaryLabel", "size", "hideCheckbox", "style", "id", "disabled"];
|
|
378
|
-
var RadioPanel = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
348
|
+
var _excluded$a = ["className", "children", "value", "title", "secondaryLabel", "size", "hideSelectionIndicator", "style", "id", "disabled", "type", "onChange", "checked", "name"];
|
|
349
|
+
var InputPanelBase = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
350
|
+
var _ref2, _inputRef$current, _ref3, _inputRef$current2;
|
|
379
351
|
var className = _ref.className,
|
|
380
352
|
children = _ref.children,
|
|
381
353
|
value = _ref.value,
|
|
@@ -383,60 +355,170 @@ var RadioPanel = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
383
355
|
secondaryLabel = _ref.secondaryLabel,
|
|
384
356
|
_ref$size = _ref.size,
|
|
385
357
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
386
|
-
_ref$
|
|
387
|
-
|
|
358
|
+
_ref$hideSelectionInd = _ref.hideSelectionIndicator,
|
|
359
|
+
hideSelectionIndicator = _ref$hideSelectionInd === void 0 ? false : _ref$hideSelectionInd,
|
|
388
360
|
style = _ref.style,
|
|
389
361
|
id = _ref.id,
|
|
390
362
|
_ref$disabled = _ref.disabled,
|
|
391
363
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
var
|
|
401
|
-
var
|
|
364
|
+
_ref$type = _ref.type,
|
|
365
|
+
type = _ref$type === void 0 ? 'radio' : _ref$type,
|
|
366
|
+
onChange = _ref.onChange,
|
|
367
|
+
checked = _ref.checked,
|
|
368
|
+
name = _ref.name,
|
|
369
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
370
|
+
var classList = classNames__default["default"](className, 'eds-input-panel__container', "eds-input-panel--" + size);
|
|
371
|
+
var inputRef = React.useRef(null);
|
|
372
|
+
var defaultId = utils.useRandomId('eds-inputpanel');
|
|
373
|
+
var inputPanelId = id || defaultId;
|
|
374
|
+
var forceUpdate = utils.useForceUpdate();
|
|
375
|
+
var handleOnChange = function handleOnChange(e) {
|
|
376
|
+
if (onChange === undefined) forceUpdate();
|
|
377
|
+
onChange == null ? void 0 : onChange(e);
|
|
378
|
+
};
|
|
402
379
|
return React__default["default"].createElement("label", {
|
|
403
|
-
className: "eds-
|
|
404
|
-
htmlFor:
|
|
380
|
+
className: "eds-input-panel",
|
|
381
|
+
htmlFor: inputPanelId
|
|
405
382
|
}, React__default["default"].createElement("input", _extends({
|
|
406
|
-
type:
|
|
383
|
+
type: type,
|
|
407
384
|
name: name,
|
|
408
|
-
ref: ref,
|
|
385
|
+
ref: utils.mergeRefs(ref, inputRef),
|
|
409
386
|
value: value,
|
|
410
|
-
checked:
|
|
411
|
-
onChange:
|
|
412
|
-
id:
|
|
387
|
+
checked: checked,
|
|
388
|
+
onChange: handleOnChange,
|
|
389
|
+
id: inputPanelId,
|
|
413
390
|
disabled: disabled
|
|
414
391
|
}, rest)), React__default["default"].createElement("div", {
|
|
415
392
|
className: classList,
|
|
416
393
|
style: style
|
|
417
394
|
}, React__default["default"].createElement("div", {
|
|
418
|
-
className: "eds-
|
|
395
|
+
className: "eds-input-panel__title-wrapper"
|
|
419
396
|
}, React__default["default"].createElement("div", {
|
|
420
|
-
className: "eds-
|
|
397
|
+
className: "eds-input-panel__title"
|
|
421
398
|
}, title), React__default["default"].createElement("div", {
|
|
422
|
-
className: "eds-
|
|
423
|
-
}, secondaryLabel && React__default["default"].createElement("
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
399
|
+
className: "eds-input-panel__secondary-label-and-icon-wrapper"
|
|
400
|
+
}, secondaryLabel !== undefined && React__default["default"].createElement(React__default["default"].Fragment, null, secondaryLabel), React__default["default"].createElement("span", {
|
|
401
|
+
style: {
|
|
402
|
+
pointerEvents: 'none'
|
|
403
|
+
}
|
|
404
|
+
}, !(disabled || hideSelectionIndicator) && (type === 'radio' ? React__default["default"].createElement(Radio, {
|
|
405
|
+
name: "",
|
|
406
|
+
value: "",
|
|
407
|
+
checked: (_ref2 = checked != null ? checked : (_inputRef$current = inputRef.current) == null ? void 0 : _inputRef$current.checked) != null ? _ref2 : false,
|
|
408
|
+
onChange: function onChange() {
|
|
409
|
+
return;
|
|
410
|
+
},
|
|
411
|
+
"aria-hidden": "true",
|
|
412
|
+
tabIndex: -1
|
|
413
|
+
}) : React__default["default"].createElement(Checkbox, {
|
|
414
|
+
checked: (_ref3 = checked != null ? checked : (_inputRef$current2 = inputRef.current) == null ? void 0 : _inputRef$current2.checked) != null ? _ref3 : false,
|
|
415
|
+
onChange: function onChange() {
|
|
416
|
+
return null;
|
|
417
|
+
},
|
|
418
|
+
"aria-hidden": "true",
|
|
419
|
+
tabIndex: -1
|
|
420
|
+
}))))), children && React__default["default"].createElement("div", {
|
|
421
|
+
className: "eds-input-panel__additional-content"
|
|
427
422
|
}, children)));
|
|
428
423
|
});
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
424
|
+
|
|
425
|
+
var _excluded$9 = ["className", "children", "value", "title", "secondaryLabel", "size", "hideRadioButton", "style", "id", "disabled"];
|
|
426
|
+
var RadioPanel = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
427
|
+
var className = _ref.className,
|
|
428
|
+
children = _ref.children,
|
|
429
|
+
value = _ref.value,
|
|
430
|
+
title = _ref.title,
|
|
431
|
+
secondaryLabel = _ref.secondaryLabel,
|
|
432
|
+
_ref$size = _ref.size,
|
|
433
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
434
|
+
_ref$hideRadioButton = _ref.hideRadioButton,
|
|
435
|
+
hideRadioButton = _ref$hideRadioButton === void 0 ? false : _ref$hideRadioButton,
|
|
436
|
+
style = _ref.style,
|
|
437
|
+
id = _ref.id,
|
|
438
|
+
_ref$disabled = _ref.disabled,
|
|
439
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
440
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
441
|
+
var _useRadioGroupContext = useRadioGroupContext(),
|
|
442
|
+
name = _useRadioGroupContext.name,
|
|
443
|
+
selected = _useRadioGroupContext.value,
|
|
444
|
+
onChange = _useRadioGroupContext.onChange;
|
|
445
|
+
return React__default["default"].createElement(InputPanelBase, _extends({
|
|
446
|
+
type: "radio",
|
|
447
|
+
name: name,
|
|
448
|
+
title: title,
|
|
449
|
+
value: value,
|
|
450
|
+
checked: selected === value,
|
|
451
|
+
onChange: onChange,
|
|
452
|
+
className: className,
|
|
453
|
+
secondaryLabel: secondaryLabel,
|
|
454
|
+
size: size,
|
|
455
|
+
hideSelectionIndicator: hideRadioButton,
|
|
456
|
+
style: style,
|
|
457
|
+
id: id,
|
|
458
|
+
disabled: disabled
|
|
459
|
+
}, rest, {
|
|
460
|
+
ref: ref
|
|
461
|
+
}), children);
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
var _excluded$8 = ["name", "checked", "onChange", "className", "children", "value", "title", "secondaryLabel", "size", "hideCheckbox", "style", "id", "disabled"];
|
|
465
|
+
var CheckboxPanel = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
466
|
+
var name = _ref.name,
|
|
467
|
+
checked = _ref.checked,
|
|
468
|
+
onChange = _ref.onChange,
|
|
469
|
+
className = _ref.className,
|
|
470
|
+
children = _ref.children,
|
|
471
|
+
value = _ref.value,
|
|
472
|
+
title = _ref.title,
|
|
473
|
+
secondaryLabel = _ref.secondaryLabel,
|
|
474
|
+
_ref$size = _ref.size,
|
|
475
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
476
|
+
_ref$hideCheckbox = _ref.hideCheckbox,
|
|
477
|
+
hideCheckbox = _ref$hideCheckbox === void 0 ? false : _ref$hideCheckbox,
|
|
478
|
+
style = _ref.style,
|
|
479
|
+
id = _ref.id,
|
|
480
|
+
_ref$disabled = _ref.disabled,
|
|
481
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
482
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
483
|
+
return React__default["default"].createElement(InputPanelBase, _extends({
|
|
484
|
+
type: "checkbox",
|
|
485
|
+
name: name,
|
|
486
|
+
title: title,
|
|
487
|
+
value: value,
|
|
488
|
+
checked: checked,
|
|
489
|
+
onChange: onChange,
|
|
490
|
+
className: className,
|
|
491
|
+
secondaryLabel: secondaryLabel,
|
|
492
|
+
size: size,
|
|
493
|
+
hideSelectionIndicator: hideCheckbox,
|
|
494
|
+
style: style,
|
|
495
|
+
id: id,
|
|
496
|
+
disabled: disabled
|
|
497
|
+
}, rest, {
|
|
498
|
+
ref: ref
|
|
499
|
+
}), children);
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
var _excluded$7 = ["name", "value", "children", "onChange", "label"];
|
|
503
|
+
var RadioGroup = function RadioGroup(_ref) {
|
|
504
|
+
var name = _ref.name,
|
|
505
|
+
value = _ref.value,
|
|
506
|
+
children = _ref.children,
|
|
507
|
+
onChange = _ref.onChange,
|
|
508
|
+
label = _ref.label,
|
|
509
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
510
|
+
var contextValue = React__default["default"].useMemo(function () {
|
|
511
|
+
return {
|
|
512
|
+
name: name,
|
|
513
|
+
value: value,
|
|
514
|
+
onChange: onChange
|
|
515
|
+
};
|
|
516
|
+
}, [name, value, onChange]);
|
|
517
|
+
return React__default["default"].createElement(RadioGroupContextProvider, {
|
|
518
|
+
value: contextValue
|
|
519
|
+
}, label ? React__default["default"].createElement(Fieldset, _extends({
|
|
520
|
+
label: label
|
|
521
|
+
}, rest), children) : children);
|
|
440
522
|
};
|
|
441
523
|
|
|
442
524
|
var _excluded$6 = ["className", "children", "labelPlacement", "icon", "hideIcon", "color", "contrastColor", "size", "checked"];
|
|
@@ -844,6 +926,7 @@ utils.warnAboutMissingStyles('form', 'icons', 'typography');
|
|
|
844
926
|
|
|
845
927
|
exports.BaseFormControl = BaseFormControl;
|
|
846
928
|
exports.Checkbox = Checkbox;
|
|
929
|
+
exports.CheckboxPanel = CheckboxPanel;
|
|
847
930
|
exports.FeedbackText = FeedbackText;
|
|
848
931
|
exports.Fieldset = Fieldset;
|
|
849
932
|
exports.InputGroupContextProvider = InputGroupContextProvider;
|