@bonlineza/luxity-lib 2.40.9 → 2.41.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,692 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('styled-components')) :
3
- typeof define === 'function' && define.amd ? define(['react', 'styled-components'], factory) :
4
- (global = global || self, global.CommunicationPreferenceSection = factory(global.React, global.styled));
5
- }(this, (function (React, styled) { 'use strict';
6
-
7
- var React__default = 'default' in React ? React['default'] : React;
8
- var styled__default = 'default' in styled ? styled['default'] : styled;
9
-
10
- function _extends() {
11
- _extends = Object.assign ? Object.assign.bind() : function (target) {
12
- for (var i = 1; i < arguments.length; i++) {
13
- var source = arguments[i];
14
-
15
- for (var key in source) {
16
- if (Object.prototype.hasOwnProperty.call(source, key)) {
17
- target[key] = source[key];
18
- }
19
- }
20
- }
21
-
22
- return target;
23
- };
24
- return _extends.apply(this, arguments);
25
- }
26
-
27
- function _objectWithoutPropertiesLoose(source, excluded) {
28
- if (source == null) return {};
29
- var target = {};
30
- var sourceKeys = Object.keys(source);
31
- var key, i;
32
-
33
- for (i = 0; i < sourceKeys.length; i++) {
34
- key = sourceKeys[i];
35
- if (excluded.indexOf(key) >= 0) continue;
36
- target[key] = source[key];
37
- }
38
-
39
- return target;
40
- }
41
-
42
- function _objectWithoutProperties(source, excluded) {
43
- if (source == null) return {};
44
-
45
- var target = _objectWithoutPropertiesLoose(source, excluded);
46
-
47
- var key, i;
48
-
49
- if (Object.getOwnPropertySymbols) {
50
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
51
-
52
- for (i = 0; i < sourceSymbolKeys.length; i++) {
53
- key = sourceSymbolKeys[i];
54
- if (excluded.indexOf(key) >= 0) continue;
55
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
56
- target[key] = source[key];
57
- }
58
- }
59
-
60
- return target;
61
- }
62
-
63
- function _taggedTemplateLiteral(strings, raw) {
64
- if (!raw) {
65
- raw = strings.slice(0);
66
- }
67
-
68
- return Object.freeze(Object.defineProperties(strings, {
69
- raw: {
70
- value: Object.freeze(raw)
71
- }
72
- }));
73
- }
74
-
75
- var theme = {
76
- breakpoints: ['40em', '52em', '64em'],
77
- space: ['0px', '4px', '8px', '16px', '32px', '64px', '128px', '256px', '512px'],
78
- fontSizes: ['12px', '14px', '16px', '20px', '24px', '32px', '48px', '64px', '72px'],
79
- marginPaddings: ['0.5rem', '1rem', '1.5rem', '2rem', '2.5rem', '3rem', '3.5rem', '4rem', '4.5rem', '5rem', '5.5rem', '6rem'],
80
- letterSpacings: ['-0.5px', '0px', '+0.5px'],
81
- radii: ['0px', '2px', '4px', '8px'],
82
- borderRadius: '6px',
83
- colors: {
84
- primary: '#000',
85
- base: '#4e4949',
86
- baseLt: '#817c7c',
87
- borderColor: '#d8d8d8',
88
- ntrlMin: '#fff',
89
- ntrlMinTen: '#e6e6e6',
90
- gray: '#efefef',
91
- darkerGray: '#454141'
92
- },
93
- rareStepColors: {
94
- primary: '#202b58',
95
- secondary: '#ef5c2d',
96
- ntrlMin: '#ffffff',
97
- ntrl40: '#f4f4f4',
98
- ntrl50: '#808080',
99
- ntrl60: '#e8e8e8',
100
- ntrl70: '#252525',
101
- ntrlMax: '#000000'
102
- },
103
- rareStepFontWeights: {
104
- normal: 400,
105
- medium: 500,
106
- semiBold: 600,
107
- bold: 700
108
- },
109
- rareStepFontSize: {
110
- h1: '36px',
111
- h2: '30px',
112
- h3: '24px',
113
- h4: '20px',
114
- h5: '16px',
115
- h6: '14px',
116
- footerTitle: '16px'
117
- },
118
- rareStepPageSizes: {
119
- mobile: '500px',
120
- tablet: '768px',
121
- desktop: '992px',
122
- screenl: '1280px',
123
- screenxl: '1680px',
124
- screenxxl: '1920px',
125
- container: '1600px'
126
- }
127
- };
128
-
129
- var themed = (function (Component) {
130
- return /*#__PURE__*/React.forwardRef(function (props, ref) {
131
- return /*#__PURE__*/React__default.createElement(styled.ThemeProvider, {
132
- theme: theme
133
- }, /*#__PURE__*/React__default.createElement(Component, _extends({}, props, {
134
- ref: ref
135
- })));
136
- });
137
- });
138
-
139
- var isCheckBoxInput = (element) => element.type === 'checkbox';
140
-
141
- var isDateObject = (value) => value instanceof Date;
142
-
143
- var isNullOrUndefined = (value) => value == null;
144
-
145
- const isObjectType = (value) => typeof value === 'object';
146
- var isObject = (value) => !isNullOrUndefined(value) &&
147
- !Array.isArray(value) &&
148
- isObjectType(value) &&
149
- !isDateObject(value);
150
-
151
- var getEventValue = (event) => isObject(event) && event.target
152
- ? isCheckBoxInput(event.target)
153
- ? event.target.checked
154
- : event.target.value
155
- : event;
156
-
157
- var getNodeParentName = (name) => name.substring(0, name.search(/\.\d+(\.|$)/)) || name;
158
-
159
- var isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));
160
-
161
- var isPlainObject = (tempObject) => {
162
- const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;
163
- return (isObject(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf'));
164
- };
165
-
166
- var isWeb = typeof window !== 'undefined' &&
167
- typeof window.HTMLElement !== 'undefined' &&
168
- typeof document !== 'undefined';
169
-
170
- function cloneObject(data) {
171
- let copy;
172
- const isArray = Array.isArray(data);
173
- if (data instanceof Date) {
174
- copy = new Date(data);
175
- }
176
- else if (data instanceof Set) {
177
- copy = new Set(data);
178
- }
179
- else if (!(isWeb && (data instanceof Blob || data instanceof FileList)) &&
180
- (isArray || isObject(data))) {
181
- copy = isArray ? [] : {};
182
- if (!isArray && !isPlainObject(data)) {
183
- copy = data;
184
- }
185
- else {
186
- for (const key in data) {
187
- if (data.hasOwnProperty(key)) {
188
- copy[key] = cloneObject(data[key]);
189
- }
190
- }
191
- }
192
- }
193
- else {
194
- return data;
195
- }
196
- return copy;
197
- }
198
-
199
- var compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];
200
-
201
- var isUndefined = (val) => val === undefined;
202
-
203
- var get = (obj, path, defaultValue) => {
204
- if (!path || !isObject(obj)) {
205
- return defaultValue;
206
- }
207
- const result = compact(path.split(/[,[\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], obj);
208
- return isUndefined(result) || result === obj
209
- ? isUndefined(obj[path])
210
- ? defaultValue
211
- : obj[path]
212
- : result;
213
- };
214
-
215
- const EVENTS = {
216
- BLUR: 'blur',
217
- FOCUS_OUT: 'focusout',
218
- CHANGE: 'change',
219
- };
220
- const VALIDATION_MODE = {
221
- onBlur: 'onBlur',
222
- onChange: 'onChange',
223
- onSubmit: 'onSubmit',
224
- onTouched: 'onTouched',
225
- all: 'all',
226
- };
227
-
228
- const HookFormContext = React__default.createContext(null);
229
- /**
230
- * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.
231
- *
232
- * @remarks
233
- * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)
234
- *
235
- * @returns return all useForm methods
236
- *
237
- * @example
238
- * ```tsx
239
- * function App() {
240
- * const methods = useForm();
241
- * const onSubmit = data => console.log(data);
242
- *
243
- * return (
244
- * <FormProvider {...methods} >
245
- * <form onSubmit={methods.handleSubmit(onSubmit)}>
246
- * <NestedInput />
247
- * <input type="submit" />
248
- * </form>
249
- * </FormProvider>
250
- * );
251
- * }
252
- *
253
- * function NestedInput() {
254
- * const { register } = useFormContext(); // retrieve all hook methods
255
- * return <input {...register("test")} />;
256
- * }
257
- * ```
258
- */
259
- const useFormContext = () => React__default.useContext(HookFormContext);
260
-
261
- var getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {
262
- const result = {
263
- defaultValues: control._defaultValues,
264
- };
265
- for (const key in formState) {
266
- Object.defineProperty(result, key, {
267
- get: () => {
268
- const _key = key;
269
- if (control._proxyFormState[_key] !== VALIDATION_MODE.all) {
270
- control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all;
271
- }
272
- localProxyFormState && (localProxyFormState[_key] = true);
273
- return formState[_key];
274
- },
275
- });
276
- }
277
- return result;
278
- };
279
-
280
- var isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;
281
-
282
- var shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {
283
- updateFormState(formStateData);
284
- const { name, ...formState } = formStateData;
285
- return (isEmptyObject(formState) ||
286
- Object.keys(formState).length >= Object.keys(_proxyFormState).length ||
287
- Object.keys(formState).find((key) => _proxyFormState[key] ===
288
- (!isRoot || VALIDATION_MODE.all)));
289
- };
290
-
291
- var convertToArrayPayload = (value) => (Array.isArray(value) ? value : [value]);
292
-
293
- var shouldSubscribeByName = (name, signalName, exact) => exact && signalName
294
- ? name === signalName ||
295
- (Array.isArray(name) &&
296
- name.some((currentName) => currentName && exact && currentName === signalName))
297
- : !name ||
298
- !signalName ||
299
- name === signalName ||
300
- convertToArrayPayload(name).some((currentName) => currentName &&
301
- (currentName.startsWith(signalName) ||
302
- signalName.startsWith(currentName)));
303
-
304
- function useSubscribe(props) {
305
- const _props = React__default.useRef(props);
306
- _props.current = props;
307
- React__default.useEffect(() => {
308
- const subscription = !props.disabled &&
309
- _props.current.subject &&
310
- _props.current.subject.subscribe({
311
- next: _props.current.next,
312
- });
313
- return () => {
314
- subscription && subscription.unsubscribe();
315
- };
316
- }, [props.disabled]);
317
- }
318
-
319
- /**
320
- * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.
321
- *
322
- * @remarks
323
- * [API](https://react-hook-form.com/docs/useformstate) • [Demo](https://codesandbox.io/s/useformstate-75xly)
324
- *
325
- * @param props - include options on specify fields to subscribe. {@link UseFormStateReturn}
326
- *
327
- * @example
328
- * ```tsx
329
- * function App() {
330
- * const { register, handleSubmit, control } = useForm({
331
- * defaultValues: {
332
- * firstName: "firstName"
333
- * }});
334
- * const { dirtyFields } = useFormState({
335
- * control
336
- * });
337
- * const onSubmit = (data) => console.log(data);
338
- *
339
- * return (
340
- * <form onSubmit={handleSubmit(onSubmit)}>
341
- * <input {...register("firstName")} placeholder="First Name" />
342
- * {dirtyFields.firstName && <p>Field is dirty.</p>}
343
- * <input type="submit" />
344
- * </form>
345
- * );
346
- * }
347
- * ```
348
- */
349
- function useFormState(props) {
350
- const methods = useFormContext();
351
- const { control = methods.control, disabled, name, exact } = props || {};
352
- const [formState, updateFormState] = React__default.useState(control._formState);
353
- const _mounted = React__default.useRef(true);
354
- const _localProxyFormState = React__default.useRef({
355
- isDirty: false,
356
- isLoading: false,
357
- dirtyFields: false,
358
- touchedFields: false,
359
- isValidating: false,
360
- isValid: false,
361
- errors: false,
362
- });
363
- const _name = React__default.useRef(name);
364
- _name.current = name;
365
- useSubscribe({
366
- disabled,
367
- next: (value) => _mounted.current &&
368
- shouldSubscribeByName(_name.current, value.name, exact) &&
369
- shouldRenderFormState(value, _localProxyFormState.current, control._updateFormState) &&
370
- updateFormState({
371
- ...control._formState,
372
- ...value,
373
- }),
374
- subject: control._subjects.state,
375
- });
376
- React__default.useEffect(() => {
377
- _mounted.current = true;
378
- _localProxyFormState.current.isValid && control._updateValid(true);
379
- return () => {
380
- _mounted.current = false;
381
- };
382
- }, [control]);
383
- return getProxyFormState(formState, control, _localProxyFormState.current, false);
384
- }
385
-
386
- var isString = (value) => typeof value === 'string';
387
-
388
- var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {
389
- if (isString(names)) {
390
- isGlobal && _names.watch.add(names);
391
- return get(formValues, names, defaultValue);
392
- }
393
- if (Array.isArray(names)) {
394
- return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName), get(formValues, fieldName)));
395
- }
396
- isGlobal && (_names.watchAll = true);
397
- return formValues;
398
- };
399
-
400
- /**
401
- * Custom hook to subscribe to field change and isolate re-rendering at the component level.
402
- *
403
- * @remarks
404
- *
405
- * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)
406
- *
407
- * @example
408
- * ```tsx
409
- * const { watch } = useForm();
410
- * const values = useWatch({
411
- * name: "fieldName"
412
- * control,
413
- * })
414
- * ```
415
- */
416
- function useWatch(props) {
417
- const methods = useFormContext();
418
- const { control = methods.control, name, defaultValue, disabled, exact, } = props || {};
419
- const _name = React__default.useRef(name);
420
- _name.current = name;
421
- useSubscribe({
422
- disabled,
423
- subject: control._subjects.values,
424
- next: (formState) => {
425
- if (shouldSubscribeByName(_name.current, formState.name, exact)) {
426
- updateValue(cloneObject(generateWatchOutput(_name.current, control._names, formState.values || control._formValues, false, defaultValue)));
427
- }
428
- },
429
- });
430
- const [value, updateValue] = React__default.useState(control._getWatch(name, defaultValue));
431
- React__default.useEffect(() => control._removeUnmounted());
432
- return value;
433
- }
434
-
435
- var isKey = (value) => /^\w*$/.test(value);
436
-
437
- var stringToPath = (input) => compact(input.replace(/["|']|\]/g, '').split(/\.|\[/));
438
-
439
- function set(object, path, value) {
440
- let index = -1;
441
- const tempPath = isKey(path) ? [path] : stringToPath(path);
442
- const length = tempPath.length;
443
- const lastIndex = length - 1;
444
- while (++index < length) {
445
- const key = tempPath[index];
446
- let newValue = value;
447
- if (index !== lastIndex) {
448
- const objValue = object[key];
449
- newValue =
450
- isObject(objValue) || Array.isArray(objValue)
451
- ? objValue
452
- : !isNaN(+tempPath[index + 1])
453
- ? []
454
- : {};
455
- }
456
- object[key] = newValue;
457
- object = object[key];
458
- }
459
- return object;
460
- }
461
-
462
- /**
463
- * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.
464
- *
465
- * @remarks
466
- * [API](https://react-hook-form.com/docs/usecontroller) • [Demo](https://codesandbox.io/s/usecontroller-0o8px)
467
- *
468
- * @param props - the path name to the form field value, and validation rules.
469
- *
470
- * @returns field properties, field and form state. {@link UseControllerReturn}
471
- *
472
- * @example
473
- * ```tsx
474
- * function Input(props) {
475
- * const { field, fieldState, formState } = useController(props);
476
- * return (
477
- * <div>
478
- * <input {...field} placeholder={props.name} />
479
- * <p>{fieldState.isTouched && "Touched"}</p>
480
- * <p>{formState.isSubmitted ? "submitted" : ""}</p>
481
- * </div>
482
- * );
483
- * }
484
- * ```
485
- */
486
- function useController(props) {
487
- const methods = useFormContext();
488
- const { name, disabled, control = methods.control, shouldUnregister } = props;
489
- const isArrayField = isNameInFieldArray(control._names.array, name);
490
- const value = useWatch({
491
- control,
492
- name,
493
- defaultValue: get(control._formValues, name, get(control._defaultValues, name, props.defaultValue)),
494
- exact: true,
495
- });
496
- const formState = useFormState({
497
- control,
498
- name,
499
- });
500
- const _registerProps = React__default.useRef(control.register(name, {
501
- ...props.rules,
502
- value,
503
- }));
504
- _registerProps.current = control.register(name, props.rules);
505
- React__default.useEffect(() => {
506
- const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;
507
- const updateMounted = (name, value) => {
508
- const field = get(control._fields, name);
509
- if (field) {
510
- field._f.mount = value;
511
- }
512
- };
513
- updateMounted(name, true);
514
- if (_shouldUnregisterField) {
515
- const value = cloneObject(get(control._options.defaultValues, name));
516
- set(control._defaultValues, name, value);
517
- if (isUndefined(get(control._formValues, name))) {
518
- set(control._formValues, name, value);
519
- }
520
- }
521
- return () => {
522
- (isArrayField
523
- ? _shouldUnregisterField && !control._state.action
524
- : _shouldUnregisterField)
525
- ? control.unregister(name)
526
- : updateMounted(name, false);
527
- };
528
- }, [name, control, isArrayField, shouldUnregister]);
529
- React__default.useEffect(() => {
530
- control._updateDisabledField({
531
- disabled,
532
- fields: control._fields,
533
- name,
534
- });
535
- }, [disabled, name, control]);
536
- return {
537
- field: {
538
- name,
539
- value,
540
- disabled,
541
- onChange: React__default.useCallback((event) => _registerProps.current.onChange({
542
- target: {
543
- value: getEventValue(event),
544
- name: name,
545
- },
546
- type: EVENTS.CHANGE,
547
- }), [name]),
548
- onBlur: React__default.useCallback(() => _registerProps.current.onBlur({
549
- target: {
550
- value: get(control._formValues, name),
551
- name: name,
552
- },
553
- type: EVENTS.BLUR,
554
- }), [name, control]),
555
- ref: (elm) => {
556
- const field = get(control._fields, name);
557
- if (field && elm) {
558
- field._f.ref = {
559
- focus: () => elm.focus(),
560
- select: () => elm.select(),
561
- setCustomValidity: (message) => elm.setCustomValidity(message),
562
- reportValidity: () => elm.reportValidity(),
563
- };
564
- }
565
- },
566
- },
567
- formState,
568
- fieldState: Object.defineProperties({}, {
569
- invalid: {
570
- enumerable: true,
571
- get: () => !!get(formState.errors, name),
572
- },
573
- isDirty: {
574
- enumerable: true,
575
- get: () => !!get(formState.dirtyFields, name),
576
- },
577
- isTouched: {
578
- enumerable: true,
579
- get: () => !!get(formState.touchedFields, name),
580
- },
581
- error: {
582
- enumerable: true,
583
- get: () => get(formState.errors, name),
584
- },
585
- }),
586
- };
587
- }
588
-
589
- var _templateObject;
590
- var RadioButtonLabel = styled__default.label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n margin-bottom: ", ";\n margin-right: ", ";\n"])), function (props) {
591
- return props.theme.marginPaddings[0];
592
- }, function (props) {
593
- return props.theme.marginPaddings[0];
594
- });
595
-
596
- var _templateObject$1;
597
- var RadioButtonText = styled__default.div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
598
-
599
- var _templateObject$2;
600
- var RadioButtonCircle = styled__default.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n height: 20px;\n width: 20px;\n border-radius: 50%;\n margin-right: 5px;\n border: 1px solid ", ";\n display: flex;\n"])), function (props) {
601
- return props.theme.colors.base;
602
- });
603
-
604
- var _templateObject$3;
605
- var RadioButtonCircleInner = styled__default.div(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n height: 8px;\n width: 8px;\n border-radius: 50%;\n margin: auto;\n"])));
606
-
607
- var _templateObject$4;
608
- var RadioButtonInput = styled__default.input(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n display: none;\n :checked ~ ", " {\n ", " {\n background-color: ", ";\n }\n }\n"])), RadioButtonCircle, RadioButtonCircleInner, function (props) {
609
- return props.theme.colors.base;
610
- });
611
-
612
- var _excluded = ["ref"];
613
-
614
- var _templateObject$5, _templateObject2;
615
- var OptionsRow = styled__default.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: nowrap;\n flex-direction: row;\n"])));
616
- var Options = styled__default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: nowrap;\n flex-direction: row;\n flex-basis: 60%;\n"])));
617
-
618
- var CommunicationPreferenceOptionsRenderer = function CommunicationPreferenceOptionsRenderer(_ref) {
619
- var control = _ref.control,
620
- name = _ref.name,
621
- isDisabled = _ref.isDisabled,
622
- options = _ref.options,
623
- defaultValue = _ref.defaultValue,
624
- setValue = _ref.setValue;
625
-
626
- var _useController = useController({
627
- name: name,
628
- control: control,
629
- defaultValue: defaultValue
630
- }),
631
- _useController$field = _useController.field,
632
- ref = _useController$field.ref,
633
- inputProps = _objectWithoutProperties(_useController$field, _excluded),
634
- _useController$fieldS = _useController.fieldState,
635
- invalid = _useController$fieldS.invalid,
636
- error = _useController$fieldS.error;
637
-
638
- React.useEffect(function () {
639
- if (defaultValue) {
640
- setValue(name, defaultValue);
641
- }
642
- }, [defaultValue, name, setValue]);
643
- return /*#__PURE__*/React__default.createElement(OptionsRow, null, /*#__PURE__*/React__default.createElement(Options, null, options.map(function (option) {
644
- return /*#__PURE__*/React__default.createElement(RadioButtonLabel, {
645
- key: option.value,
646
- htmlFor: option.value
647
- }, /*#__PURE__*/React__default.createElement(RadioButtonInput, _extends({
648
- id: option.value,
649
- ref: ref,
650
- type: "radio",
651
- name: name,
652
- defaultChecked: inputProps.value === option.value.toString()
653
- }, inputProps, {
654
- disabled: isDisabled,
655
- value: option.value
656
- })), /*#__PURE__*/React__default.createElement(RadioButtonCircle, null, /*#__PURE__*/React__default.createElement(RadioButtonCircleInner, null)), /*#__PURE__*/React__default.createElement(RadioButtonText, null, option.label));
657
- })), invalid && /*#__PURE__*/React__default.createElement("span", {
658
- className: "form__error"
659
- }, error === null || error === void 0 ? void 0 : error.message));
660
- };
661
-
662
- var _templateObject$6, _templateObject2$1;
663
- var SectionContainer = styled__default.div(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteral(["\n border-top: flex 1px solid ", ";\n border-top-width: calc(100% - 50px);\n padding: 5px 10px;\n"])), function (props) {
664
- return props.theme.colors.primary;
665
- });
666
- var SectionHeading = styled__default.div(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n padding: 5px 10px;\n"])));
667
-
668
- var CommunicationPreferenceSection = function CommunicationPreferenceSection(_ref) {
669
- var section_heading = _ref.section_heading,
670
- description = _ref.description,
671
- control = _ref.control,
672
- name = _ref.name,
673
- isDisabled = _ref.isDisabled,
674
- options = _ref.options,
675
- defaultValue = _ref.defaultValue,
676
- setValue = _ref.setValue;
677
- return /*#__PURE__*/React__default.createElement(SectionContainer, null, /*#__PURE__*/React__default.createElement(SectionHeading, null, section_heading), /*#__PURE__*/React__default.createElement(CommunicationPreferenceOptionsRenderer, {
678
- description: description,
679
- control: control,
680
- name: name,
681
- isDisabled: isDisabled,
682
- options: options,
683
- defaultValue: defaultValue,
684
- setValue: setValue
685
- }));
686
- };
687
-
688
- var index = themed(CommunicationPreferenceSection);
689
-
690
- return index;
691
-
692
- })));