@alfalab/core-components-radio-group 4.1.0 → 4.2.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.
Files changed (59) hide show
  1. package/Component.desktop.js +1 -1
  2. package/Component.mobile.js +1 -1
  3. package/components/base-radio-group/Component.js +5 -7
  4. package/components/base-radio-group/index.css +22 -22
  5. package/cssm/components/base-radio-group/Component.js +4 -6
  6. package/cssm/components/base-radio-group/index.module.css +10 -10
  7. package/cssm/desktop/index.d.ts +2 -0
  8. package/cssm/{desktop.js → desktop/index.js} +4 -4
  9. package/cssm/mobile/index.d.ts +2 -0
  10. package/cssm/{mobile.js → mobile/index.js} +4 -4
  11. package/desktop/index.d.ts +2 -0
  12. package/{desktop.js → desktop/index.js} +2 -2
  13. package/desktop/package.json +3 -0
  14. package/desktop.css +4 -4
  15. package/esm/Component.desktop.js +1 -1
  16. package/esm/Component.mobile.js +1 -1
  17. package/esm/components/base-radio-group/Component.js +5 -7
  18. package/esm/components/base-radio-group/index.css +22 -22
  19. package/esm/desktop/index.d.ts +2 -0
  20. package/esm/desktop/index.js +6 -0
  21. package/esm/desktop.css +4 -4
  22. package/esm/mobile/index.d.ts +2 -0
  23. package/esm/mobile/index.js +6 -0
  24. package/esm/mobile.css +4 -4
  25. package/mobile/index.d.ts +2 -0
  26. package/{mobile.js → mobile/index.js} +2 -2
  27. package/mobile/package.json +3 -0
  28. package/mobile.css +4 -4
  29. package/modern/Component.desktop.js +1 -1
  30. package/modern/Component.mobile.js +1 -1
  31. package/modern/components/base-radio-group/Component.js +5 -7
  32. package/modern/components/base-radio-group/index.css +22 -22
  33. package/modern/desktop/index.d.ts +2 -0
  34. package/modern/desktop/index.js +5 -0
  35. package/modern/desktop.css +4 -4
  36. package/modern/mobile/index.d.ts +2 -0
  37. package/modern/mobile/index.js +5 -0
  38. package/modern/mobile.css +4 -4
  39. package/package.json +1 -21
  40. package/src/components/base-radio-group/Component.tsx +13 -6
  41. package/src/components/base-radio-group/index.module.css +11 -11
  42. package/src/desktop/index.ts +1 -0
  43. package/src/desktop/package.json +3 -0
  44. package/src/mobile/index.ts +1 -0
  45. package/src/mobile/package.json +3 -0
  46. package/cssm/desktop.d.ts +0 -2
  47. package/cssm/mobile.d.ts +0 -2
  48. package/desktop.d.ts +0 -2
  49. package/esm/desktop.d.ts +0 -2
  50. package/esm/desktop.js +0 -6
  51. package/esm/mobile.d.ts +0 -2
  52. package/esm/mobile.js +0 -6
  53. package/mobile.d.ts +0 -2
  54. package/modern/desktop.d.ts +0 -2
  55. package/modern/desktop.js +0 -5
  56. package/modern/mobile.d.ts +0 -2
  57. package/modern/mobile.js +0 -5
  58. package/src/desktop.ts +0 -1
  59. package/src/mobile.ts +0 -1
@@ -12,7 +12,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
12
12
 
13
13
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
14
 
15
- var styles = {"radioList":"radio-group__radioList_j0spj","label":"radio-group__label_j0spj","sub":"radio-group__sub_j0spj"};
15
+ var styles = {"radioList":"radio-group__radioList_1arjj","label":"radio-group__label_1arjj","sub":"radio-group__sub_1arjj"};
16
16
  require('./desktop.css')
17
17
 
18
18
  var RadioGroupDesktop = React.forwardRef(function (props, ref) { return React__default.default.createElement(components_baseRadioGroup_Component.BaseRadioGroup, tslib.__assign({}, props, { ref: ref, styles: styles })); });
@@ -12,7 +12,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
12
12
 
13
13
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
14
 
15
- var styles = {"radioList":"radio-group__radioList_ree10","label":"radio-group__label_ree10","sub":"radio-group__sub_ree10"};
15
+ var styles = {"radioList":"radio-group__radioList_19nbj","label":"radio-group__label_19nbj","sub":"radio-group__sub_19nbj"};
16
16
  require('./mobile.css')
17
17
 
18
18
  var RadioGroupMobile = React.forwardRef(function (props, ref) { return (React__default.default.createElement(components_baseRadioGroup_Component.BaseRadioGroup, tslib.__assign({}, props, { ref: ref, styles: styles }))); });
@@ -12,7 +12,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
12
12
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
13
13
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
14
14
 
15
- var commonStyles = {"component":"radio-group__component_1gwql","error":"radio-group__error_1gwql","tag":"radio-group__tag_1gwql","radioList":"radio-group__radioList_1gwql","vertical":"radio-group__vertical_1gwql","radio":"radio-group__radio_1gwql","horizontal":"radio-group__horizontal_1gwql","tagLabel":"radio-group__tagLabel_1gwql","label":"radio-group__label_1gwql","sub":"radio-group__sub_1gwql","errorMessage":"radio-group__errorMessage_1gwql","hint":"radio-group__hint_1gwql","hiddenInput":"radio-group__hiddenInput_1gwql"};
15
+ var commonStyles = {"component":"radio-group__component_179iy","error":"radio-group__error_179iy","tag":"radio-group__tag_179iy","radioList":"radio-group__radioList_179iy","verticalRadioList":"radio-group__verticalRadioList_179iy","horizontalRadioList":"radio-group__horizontalRadioList_179iy","verticalRadio":"radio-group__verticalRadio_179iy","horizontalRadio":"radio-group__horizontalRadio_179iy","horizontalTagLabel":"radio-group__horizontalTagLabel_179iy","label":"radio-group__label_179iy","sub":"radio-group__sub_179iy","errorMessage":"radio-group__errorMessage_179iy","hint":"radio-group__hint_179iy","hiddenInput":"radio-group__hiddenInput_179iy","tagLabel":"radio-group__tagLabel_179iy"};
16
16
  require('./index.css')
17
17
 
18
18
  var BaseRadioGroup = React.forwardRef(function (_a, ref) {
@@ -33,22 +33,20 @@ var BaseRadioGroup = React.forwardRef(function (_a, ref) {
33
33
  };
34
34
  var renderRadio = function (child) {
35
35
  var _a = child.props, childClassName = _a.className, childValue = _a.value;
36
- return React.cloneElement(child, tslib.__assign(tslib.__assign({ onChange: function (event) { return handleChange(event, childValue); }, disabled: disabled }, child.props), { checked: isChecked(childValue), name: name, className: cn__default.default(childClassName, commonStyles.radio) }));
36
+ return React.cloneElement(child, tslib.__assign(tslib.__assign({ onChange: function (event) { return handleChange(event, childValue); }, disabled: disabled }, child.props), { checked: isChecked(childValue), name: name, className: cn__default.default(childClassName, commonStyles["".concat(direction, "Radio")]) }));
37
37
  };
38
38
  var renderTag = function (child) {
39
39
  var childValue = child.props.value;
40
40
  var checked = isChecked(childValue);
41
41
  var clone = React.cloneElement(child, tslib.__assign(tslib.__assign({ onClick: function (event) { return handleChange(event, childValue); }, disabled: disabled }, child.props), { checked: checked, name: name, tabIndex: -1 }));
42
- return (React__default.default.createElement("label", { className: cn__default.default(commonStyles.radio, commonStyles.tagLabel) },
42
+ return (React__default.default.createElement("label", { className: cn__default.default(commonStyles["".concat(direction, "Radio")], commonStyles["".concat(direction, "TagLabel")]) },
43
43
  React__default.default.createElement("input", { type: 'radio', autoComplete: 'off', onChange: function (event) { return handleChange(event, childValue); }, disabled: disabled || child.props.disabled, name: name, checked: checked, className: commonStyles.hiddenInput, value: child.props.value }),
44
44
  clone));
45
45
  };
46
46
  var errorMessage = typeof error === 'boolean' ? '' : error;
47
- return (React__default.default.createElement("div", { className: cn__default.default(commonStyles.component, commonStyles[type], commonStyles[direction], (_b = {}, _b[commonStyles.error] = error, _b), className), "data-test-id": dataTestId, ref: ref },
47
+ return (React__default.default.createElement("div", { className: cn__default.default(commonStyles.component, commonStyles[type], (_b = {}, _b[commonStyles.error] = error, _b), className), "data-test-id": dataTestId, ref: ref },
48
48
  label ? (React__default.default.createElement("span", { className: cn__default.default(commonStyles.label, styles.label) }, label)) : null,
49
- children ? (React__default.default.createElement("div", { className: cn__default.default(commonStyles.radioList, radioListClassName, (_c = {},
50
- _c[styles.radioList] = type === 'radio',
51
- _c)), onBlur: onBlur, onFocus: onFocus }, React.Children.map(children, function (child) {
49
+ children ? (React__default.default.createElement("div", { className: cn__default.default(commonStyles.radioList, commonStyles["".concat(direction, "RadioList")], radioListClassName, (_c = {}, _c[styles.radioList] = type === 'radio', _c)), onBlur: onBlur, onFocus: onFocus }, React.Children.map(children, function (child) {
52
50
  if (React.isValidElement(child)) {
53
51
  return type === 'radio' ? renderRadio(child) : renderTag(child);
54
52
  }
@@ -1,4 +1,4 @@
1
- /* hash: rhtyn */
1
+ /* hash: 1tmfa */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-link: #0072ef;
@@ -28,55 +28,55 @@
28
28
  --radio-group-hint-color: var(--color-light-text-secondary);
29
29
 
30
30
  /* mobile */
31
- } .radio-group__component_1gwql {
31
+ } .radio-group__component_179iy {
32
32
  display: flex;
33
33
  flex-direction: column;
34
- } .radio-group__error_1gwql {
34
+ } .radio-group__error_179iy {
35
35
  padding-left: var(--gap-s);
36
36
  border-left: 1px solid var(--radio-group-error-color)
37
- } .radio-group__error_1gwql.radio-group__tag_1gwql {
37
+ } .radio-group__error_179iy.radio-group__tag_179iy {
38
38
  padding-left: var(--gap-xs);
39
- } .radio-group__radioList_1gwql {
39
+ } .radio-group__radioList_179iy {
40
40
  display: flex;
41
- } .radio-group__vertical_1gwql .radio-group__radioList_1gwql {
41
+ } .radio-group__verticalRadioList_179iy {
42
42
  flex-direction: column;
43
43
  align-items: flex-start;
44
- } .radio-group__vertical_1gwql .radio-group__radio_1gwql {
45
- margin-bottom: var(--gap-m)
46
- } .radio-group__vertical_1gwql .radio-group__radio_1gwql:last-child {
47
- margin-bottom: 0;
48
- } .radio-group__horizontal_1gwql .radio-group__radioList_1gwql {
44
+ } .radio-group__horizontalRadioList_179iy {
49
45
  flex-wrap: wrap;
50
46
  margin-bottom: var(--gap-xs-neg);
51
- } .radio-group__horizontal_1gwql .radio-group__radio_1gwql {
47
+ } .radio-group__verticalRadio_179iy {
48
+ margin-bottom: var(--gap-m)
49
+ } .radio-group__verticalRadio_179iy:last-child {
50
+ margin-bottom: 0;
51
+ } .radio-group__horizontalRadio_179iy {
52
52
  margin-right: var(--gap-xl);
53
53
  margin-bottom: var(--gap-xs);
54
- } .radio-group__horizontal_1gwql .radio-group__tagLabel_1gwql {
54
+ } .radio-group__horizontalTagLabel_179iy {
55
55
  margin-right: var(--gap-xs);
56
- } .radio-group__horizontal_1gwql .radio-group__radio_1gwql:last-child,
57
- .radio-group__horizontal_1gwql .radio-group__tagLabel_1gwql:last-child {
56
+ } .radio-group__horizontalRadio_179iy:last-child,
57
+ .radio-group__horizontalTagLabel_179iy:last-child {
58
58
  margin-right: 0;
59
- } .radio-group__label_1gwql {
59
+ } .radio-group__label_179iy {
60
60
  margin-bottom: var(--gap-s);
61
- } .radio-group__sub_1gwql {
61
+ } .radio-group__sub_179iy {
62
62
  font-size: 14px;
63
63
  line-height: 18px;
64
64
  font-weight: 400;
65
65
  margin-top: var(--gap-s);
66
- } .radio-group__errorMessage_1gwql {
66
+ } .radio-group__errorMessage_179iy {
67
67
  color: var(--radio-group-error-color);
68
- } .radio-group__hint_1gwql {
68
+ } .radio-group__hint_179iy {
69
69
  color: var(--radio-group-hint-color);
70
- } .radio-group__hiddenInput_1gwql {
70
+ } .radio-group__hiddenInput_179iy {
71
71
  position: absolute;
72
72
  z-index: -1;
73
73
  top: 0;
74
74
  left: 0;
75
75
  opacity: 0
76
- } .radio-group__hiddenInput_1gwql:focus ~ button {
76
+ } .radio-group__hiddenInput_179iy:focus ~ button {
77
77
  outline: 2px solid var(--focus-color);
78
78
  outline-offset: 2px;
79
- } .radio-group__tagLabel_1gwql {
79
+ } .radio-group__tagLabel_179iy {
80
80
  position: relative;
81
81
  max-width: 100%;
82
82
  }
@@ -32,22 +32,20 @@ var BaseRadioGroup = React.forwardRef(function (_a, ref) {
32
32
  };
33
33
  var renderRadio = function (child) {
34
34
  var _a = child.props, childClassName = _a.className, childValue = _a.value;
35
- return React.cloneElement(child, tslib.__assign(tslib.__assign({ onChange: function (event) { return handleChange(event, childValue); }, disabled: disabled }, child.props), { checked: isChecked(childValue), name: name, className: cn__default.default(childClassName, commonStyles__default.default.radio) }));
35
+ return React.cloneElement(child, tslib.__assign(tslib.__assign({ onChange: function (event) { return handleChange(event, childValue); }, disabled: disabled }, child.props), { checked: isChecked(childValue), name: name, className: cn__default.default(childClassName, commonStyles__default.default["".concat(direction, "Radio")]) }));
36
36
  };
37
37
  var renderTag = function (child) {
38
38
  var childValue = child.props.value;
39
39
  var checked = isChecked(childValue);
40
40
  var clone = React.cloneElement(child, tslib.__assign(tslib.__assign({ onClick: function (event) { return handleChange(event, childValue); }, disabled: disabled }, child.props), { checked: checked, name: name, tabIndex: -1 }));
41
- return (React__default.default.createElement("label", { className: cn__default.default(commonStyles__default.default.radio, commonStyles__default.default.tagLabel) },
41
+ return (React__default.default.createElement("label", { className: cn__default.default(commonStyles__default.default["".concat(direction, "Radio")], commonStyles__default.default["".concat(direction, "TagLabel")]) },
42
42
  React__default.default.createElement("input", { type: 'radio', autoComplete: 'off', onChange: function (event) { return handleChange(event, childValue); }, disabled: disabled || child.props.disabled, name: name, checked: checked, className: commonStyles__default.default.hiddenInput, value: child.props.value }),
43
43
  clone));
44
44
  };
45
45
  var errorMessage = typeof error === 'boolean' ? '' : error;
46
- return (React__default.default.createElement("div", { className: cn__default.default(commonStyles__default.default.component, commonStyles__default.default[type], commonStyles__default.default[direction], (_b = {}, _b[commonStyles__default.default.error] = error, _b), className), "data-test-id": dataTestId, ref: ref },
46
+ return (React__default.default.createElement("div", { className: cn__default.default(commonStyles__default.default.component, commonStyles__default.default[type], (_b = {}, _b[commonStyles__default.default.error] = error, _b), className), "data-test-id": dataTestId, ref: ref },
47
47
  label ? (React__default.default.createElement("span", { className: cn__default.default(commonStyles__default.default.label, styles.label) }, label)) : null,
48
- children ? (React__default.default.createElement("div", { className: cn__default.default(commonStyles__default.default.radioList, radioListClassName, (_c = {},
49
- _c[styles.radioList] = type === 'radio',
50
- _c)), onBlur: onBlur, onFocus: onFocus }, React.Children.map(children, function (child) {
48
+ children ? (React__default.default.createElement("div", { className: cn__default.default(commonStyles__default.default.radioList, commonStyles__default.default["".concat(direction, "RadioList")], radioListClassName, (_c = {}, _c[styles.radioList] = type === 'radio', _c)), onBlur: onBlur, onFocus: onFocus }, React.Children.map(children, function (child) {
51
49
  if (React.isValidElement(child)) {
52
50
  return type === 'radio' ? renderRadio(child) : renderTag(child);
53
51
  }
@@ -37,23 +37,23 @@
37
37
  padding-left: var(--gap-xs);
38
38
  } .radioList {
39
39
  display: flex;
40
- } .vertical .radioList {
40
+ } .verticalRadioList {
41
41
  flex-direction: column;
42
42
  align-items: flex-start;
43
- } .vertical .radio {
44
- margin-bottom: var(--gap-m)
45
- } .vertical .radio:last-child {
46
- margin-bottom: 0;
47
- } .horizontal .radioList {
43
+ } .horizontalRadioList {
48
44
  flex-wrap: wrap;
49
45
  margin-bottom: var(--gap-xs-neg);
50
- } .horizontal .radio {
46
+ } .verticalRadio {
47
+ margin-bottom: var(--gap-m)
48
+ } .verticalRadio:last-child {
49
+ margin-bottom: 0;
50
+ } .horizontalRadio {
51
51
  margin-right: var(--gap-xl);
52
52
  margin-bottom: var(--gap-xs);
53
- } .horizontal .tagLabel {
53
+ } .horizontalTagLabel {
54
54
  margin-right: var(--gap-xs);
55
- } .horizontal .radio:last-child,
56
- .horizontal .tagLabel:last-child {
55
+ } .horizontalRadio:last-child,
56
+ .horizontalTagLabel:last-child {
57
57
  margin-right: 0;
58
58
  } .label {
59
59
  margin-bottom: var(--gap-s);
@@ -0,0 +1,2 @@
1
+ export * from "../Component.desktop";
2
+ export {};
@@ -2,14 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Component_desktop = require('./Component.desktop.js');
5
+ var Component_desktop = require('../Component.desktop.js');
6
6
  require('tslib');
7
7
  require('react');
8
- require('./components/base-radio-group/Component.js');
8
+ require('../components/base-radio-group/Component.js');
9
9
  require('classnames');
10
10
  require('@alfalab/hooks');
11
- require('./components/base-radio-group/index.module.css');
12
- require('./desktop.module.css');
11
+ require('../components/base-radio-group/index.module.css');
12
+ require('../desktop.module.css');
13
13
 
14
14
 
15
15
 
@@ -0,0 +1,2 @@
1
+ export * from "../Component.mobile";
2
+ export {};
@@ -2,14 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Component_mobile = require('./Component.mobile.js');
5
+ var Component_mobile = require('../Component.mobile.js');
6
6
  require('tslib');
7
7
  require('react');
8
- require('./components/base-radio-group/Component.js');
8
+ require('../components/base-radio-group/Component.js');
9
9
  require('classnames');
10
10
  require('@alfalab/hooks');
11
- require('./components/base-radio-group/index.module.css');
12
- require('./mobile.module.css');
11
+ require('../components/base-radio-group/index.module.css');
12
+ require('../mobile.module.css');
13
13
 
14
14
 
15
15
 
@@ -0,0 +1,2 @@
1
+ export * from "../Component.desktop";
2
+ export {};
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Component_desktop = require('./Component.desktop.js');
5
+ var Component_desktop = require('../Component.desktop.js');
6
6
  require('tslib');
7
7
  require('react');
8
- require('./components/base-radio-group/Component.js');
8
+ require('../components/base-radio-group/Component.js');
9
9
  require('classnames');
10
10
  require('@alfalab/hooks');
11
11
 
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../esm/desktop/index.js"
3
+ }
package/desktop.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 12evq */
1
+ /* hash: 1tcm4 */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -21,14 +21,14 @@
21
21
  --radio-group-list-padding-left: 0;
22
22
 
23
23
  /* mobile */
24
- } .radio-group__radioList_j0spj {
24
+ } .radio-group__radioList_1arjj {
25
25
  padding-left: var(--radio-group-list-padding-left);
26
- } .radio-group__label_j0spj {
26
+ } .radio-group__label_1arjj {
27
27
  font-size: 16px;
28
28
  line-height: 24px;
29
29
  font-weight: 400;
30
30
  color: var(--radio-group-label-color);
31
31
  padding-left: var(--radio-group-sub-padding-left);
32
- } .radio-group__sub_j0spj {
32
+ } .radio-group__sub_1arjj {
33
33
  padding-left: var(--radio-group-sub-padding-left);
34
34
  }
@@ -4,7 +4,7 @@ import { BaseRadioGroup } from './components/base-radio-group/Component.js';
4
4
  import 'classnames';
5
5
  import '@alfalab/hooks';
6
6
 
7
- var styles = {"radioList":"radio-group__radioList_j0spj","label":"radio-group__label_j0spj","sub":"radio-group__sub_j0spj"};
7
+ var styles = {"radioList":"radio-group__radioList_1arjj","label":"radio-group__label_1arjj","sub":"radio-group__sub_1arjj"};
8
8
  require('./desktop.css')
9
9
 
10
10
  var RadioGroupDesktop = forwardRef(function (props, ref) { return React.createElement(BaseRadioGroup, __assign({}, props, { ref: ref, styles: styles })); });
@@ -4,7 +4,7 @@ import { BaseRadioGroup } from './components/base-radio-group/Component.js';
4
4
  import 'classnames';
5
5
  import '@alfalab/hooks';
6
6
 
7
- var styles = {"radioList":"radio-group__radioList_ree10","label":"radio-group__label_ree10","sub":"radio-group__sub_ree10"};
7
+ var styles = {"radioList":"radio-group__radioList_19nbj","label":"radio-group__label_19nbj","sub":"radio-group__sub_19nbj"};
8
8
  require('./mobile.css')
9
9
 
10
10
  var RadioGroupMobile = forwardRef(function (props, ref) { return (React.createElement(BaseRadioGroup, __assign({}, props, { ref: ref, styles: styles }))); });
@@ -3,7 +3,7 @@ import React, { forwardRef, useState, Children, isValidElement, cloneElement } f
3
3
  import cn from 'classnames';
4
4
  import { useDidUpdateEffect } from '@alfalab/hooks';
5
5
 
6
- var commonStyles = {"component":"radio-group__component_1gwql","error":"radio-group__error_1gwql","tag":"radio-group__tag_1gwql","radioList":"radio-group__radioList_1gwql","vertical":"radio-group__vertical_1gwql","radio":"radio-group__radio_1gwql","horizontal":"radio-group__horizontal_1gwql","tagLabel":"radio-group__tagLabel_1gwql","label":"radio-group__label_1gwql","sub":"radio-group__sub_1gwql","errorMessage":"radio-group__errorMessage_1gwql","hint":"radio-group__hint_1gwql","hiddenInput":"radio-group__hiddenInput_1gwql"};
6
+ var commonStyles = {"component":"radio-group__component_179iy","error":"radio-group__error_179iy","tag":"radio-group__tag_179iy","radioList":"radio-group__radioList_179iy","verticalRadioList":"radio-group__verticalRadioList_179iy","horizontalRadioList":"radio-group__horizontalRadioList_179iy","verticalRadio":"radio-group__verticalRadio_179iy","horizontalRadio":"radio-group__horizontalRadio_179iy","horizontalTagLabel":"radio-group__horizontalTagLabel_179iy","label":"radio-group__label_179iy","sub":"radio-group__sub_179iy","errorMessage":"radio-group__errorMessage_179iy","hint":"radio-group__hint_179iy","hiddenInput":"radio-group__hiddenInput_179iy","tagLabel":"radio-group__tagLabel_179iy"};
7
7
  require('./index.css')
8
8
 
9
9
  var BaseRadioGroup = forwardRef(function (_a, ref) {
@@ -24,22 +24,20 @@ var BaseRadioGroup = forwardRef(function (_a, ref) {
24
24
  };
25
25
  var renderRadio = function (child) {
26
26
  var _a = child.props, childClassName = _a.className, childValue = _a.value;
27
- return cloneElement(child, __assign(__assign({ onChange: function (event) { return handleChange(event, childValue); }, disabled: disabled }, child.props), { checked: isChecked(childValue), name: name, className: cn(childClassName, commonStyles.radio) }));
27
+ return cloneElement(child, __assign(__assign({ onChange: function (event) { return handleChange(event, childValue); }, disabled: disabled }, child.props), { checked: isChecked(childValue), name: name, className: cn(childClassName, commonStyles["".concat(direction, "Radio")]) }));
28
28
  };
29
29
  var renderTag = function (child) {
30
30
  var childValue = child.props.value;
31
31
  var checked = isChecked(childValue);
32
32
  var clone = cloneElement(child, __assign(__assign({ onClick: function (event) { return handleChange(event, childValue); }, disabled: disabled }, child.props), { checked: checked, name: name, tabIndex: -1 }));
33
- return (React.createElement("label", { className: cn(commonStyles.radio, commonStyles.tagLabel) },
33
+ return (React.createElement("label", { className: cn(commonStyles["".concat(direction, "Radio")], commonStyles["".concat(direction, "TagLabel")]) },
34
34
  React.createElement("input", { type: 'radio', autoComplete: 'off', onChange: function (event) { return handleChange(event, childValue); }, disabled: disabled || child.props.disabled, name: name, checked: checked, className: commonStyles.hiddenInput, value: child.props.value }),
35
35
  clone));
36
36
  };
37
37
  var errorMessage = typeof error === 'boolean' ? '' : error;
38
- return (React.createElement("div", { className: cn(commonStyles.component, commonStyles[type], commonStyles[direction], (_b = {}, _b[commonStyles.error] = error, _b), className), "data-test-id": dataTestId, ref: ref },
38
+ return (React.createElement("div", { className: cn(commonStyles.component, commonStyles[type], (_b = {}, _b[commonStyles.error] = error, _b), className), "data-test-id": dataTestId, ref: ref },
39
39
  label ? (React.createElement("span", { className: cn(commonStyles.label, styles.label) }, label)) : null,
40
- children ? (React.createElement("div", { className: cn(commonStyles.radioList, radioListClassName, (_c = {},
41
- _c[styles.radioList] = type === 'radio',
42
- _c)), onBlur: onBlur, onFocus: onFocus }, Children.map(children, function (child) {
40
+ children ? (React.createElement("div", { className: cn(commonStyles.radioList, commonStyles["".concat(direction, "RadioList")], radioListClassName, (_c = {}, _c[styles.radioList] = type === 'radio', _c)), onBlur: onBlur, onFocus: onFocus }, Children.map(children, function (child) {
43
41
  if (isValidElement(child)) {
44
42
  return type === 'radio' ? renderRadio(child) : renderTag(child);
45
43
  }
@@ -1,4 +1,4 @@
1
- /* hash: rhtyn */
1
+ /* hash: 1tmfa */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-link: #0072ef;
@@ -28,55 +28,55 @@
28
28
  --radio-group-hint-color: var(--color-light-text-secondary);
29
29
 
30
30
  /* mobile */
31
- } .radio-group__component_1gwql {
31
+ } .radio-group__component_179iy {
32
32
  display: flex;
33
33
  flex-direction: column;
34
- } .radio-group__error_1gwql {
34
+ } .radio-group__error_179iy {
35
35
  padding-left: var(--gap-s);
36
36
  border-left: 1px solid var(--radio-group-error-color)
37
- } .radio-group__error_1gwql.radio-group__tag_1gwql {
37
+ } .radio-group__error_179iy.radio-group__tag_179iy {
38
38
  padding-left: var(--gap-xs);
39
- } .radio-group__radioList_1gwql {
39
+ } .radio-group__radioList_179iy {
40
40
  display: flex;
41
- } .radio-group__vertical_1gwql .radio-group__radioList_1gwql {
41
+ } .radio-group__verticalRadioList_179iy {
42
42
  flex-direction: column;
43
43
  align-items: flex-start;
44
- } .radio-group__vertical_1gwql .radio-group__radio_1gwql {
45
- margin-bottom: var(--gap-m)
46
- } .radio-group__vertical_1gwql .radio-group__radio_1gwql:last-child {
47
- margin-bottom: 0;
48
- } .radio-group__horizontal_1gwql .radio-group__radioList_1gwql {
44
+ } .radio-group__horizontalRadioList_179iy {
49
45
  flex-wrap: wrap;
50
46
  margin-bottom: var(--gap-xs-neg);
51
- } .radio-group__horizontal_1gwql .radio-group__radio_1gwql {
47
+ } .radio-group__verticalRadio_179iy {
48
+ margin-bottom: var(--gap-m)
49
+ } .radio-group__verticalRadio_179iy:last-child {
50
+ margin-bottom: 0;
51
+ } .radio-group__horizontalRadio_179iy {
52
52
  margin-right: var(--gap-xl);
53
53
  margin-bottom: var(--gap-xs);
54
- } .radio-group__horizontal_1gwql .radio-group__tagLabel_1gwql {
54
+ } .radio-group__horizontalTagLabel_179iy {
55
55
  margin-right: var(--gap-xs);
56
- } .radio-group__horizontal_1gwql .radio-group__radio_1gwql:last-child,
57
- .radio-group__horizontal_1gwql .radio-group__tagLabel_1gwql:last-child {
56
+ } .radio-group__horizontalRadio_179iy:last-child,
57
+ .radio-group__horizontalTagLabel_179iy:last-child {
58
58
  margin-right: 0;
59
- } .radio-group__label_1gwql {
59
+ } .radio-group__label_179iy {
60
60
  margin-bottom: var(--gap-s);
61
- } .radio-group__sub_1gwql {
61
+ } .radio-group__sub_179iy {
62
62
  font-size: 14px;
63
63
  line-height: 18px;
64
64
  font-weight: 400;
65
65
  margin-top: var(--gap-s);
66
- } .radio-group__errorMessage_1gwql {
66
+ } .radio-group__errorMessage_179iy {
67
67
  color: var(--radio-group-error-color);
68
- } .radio-group__hint_1gwql {
68
+ } .radio-group__hint_179iy {
69
69
  color: var(--radio-group-hint-color);
70
- } .radio-group__hiddenInput_1gwql {
70
+ } .radio-group__hiddenInput_179iy {
71
71
  position: absolute;
72
72
  z-index: -1;
73
73
  top: 0;
74
74
  left: 0;
75
75
  opacity: 0
76
- } .radio-group__hiddenInput_1gwql:focus ~ button {
76
+ } .radio-group__hiddenInput_179iy:focus ~ button {
77
77
  outline: 2px solid var(--focus-color);
78
78
  outline-offset: 2px;
79
- } .radio-group__tagLabel_1gwql {
79
+ } .radio-group__tagLabel_179iy {
80
80
  position: relative;
81
81
  max-width: 100%;
82
82
  }
@@ -0,0 +1,2 @@
1
+ export * from "../Component.desktop";
2
+ export {};
@@ -0,0 +1,6 @@
1
+ export { RadioGroupDesktop } from '../Component.desktop.js';
2
+ import 'tslib';
3
+ import 'react';
4
+ import '../components/base-radio-group/Component.js';
5
+ import 'classnames';
6
+ import '@alfalab/hooks';
package/esm/desktop.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 12evq */
1
+ /* hash: 1tcm4 */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -21,14 +21,14 @@
21
21
  --radio-group-list-padding-left: 0;
22
22
 
23
23
  /* mobile */
24
- } .radio-group__radioList_j0spj {
24
+ } .radio-group__radioList_1arjj {
25
25
  padding-left: var(--radio-group-list-padding-left);
26
- } .radio-group__label_j0spj {
26
+ } .radio-group__label_1arjj {
27
27
  font-size: 16px;
28
28
  line-height: 24px;
29
29
  font-weight: 400;
30
30
  color: var(--radio-group-label-color);
31
31
  padding-left: var(--radio-group-sub-padding-left);
32
- } .radio-group__sub_j0spj {
32
+ } .radio-group__sub_1arjj {
33
33
  padding-left: var(--radio-group-sub-padding-left);
34
34
  }
@@ -0,0 +1,2 @@
1
+ export * from "../Component.mobile";
2
+ export {};
@@ -0,0 +1,6 @@
1
+ export { RadioGroupMobile } from '../Component.mobile.js';
2
+ import 'tslib';
3
+ import 'react';
4
+ import '../components/base-radio-group/Component.js';
5
+ import 'classnames';
6
+ import '@alfalab/hooks';
package/esm/mobile.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1nxht */
1
+ /* hash: n4bof */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-secondary: rgba(60, 60, 67, 0.66); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -23,14 +23,14 @@
23
23
  --radio-group-mobile-sub-padding-left: var(--gap-2xs);
24
24
  --radio-group-mobile-list-padding-left: var(--gap-3xs);
25
25
  --radio-group-mobile-label-color: var(--color-light-text-secondary);
26
- } .radio-group__radioList_ree10 {
26
+ } .radio-group__radioList_19nbj {
27
27
  padding-left: var(--radio-group-mobile-list-padding-left);
28
- } .radio-group__label_ree10 {
28
+ } .radio-group__label_19nbj {
29
29
  font-size: 14px;
30
30
  line-height: 18px;
31
31
  font-weight: 400;
32
32
  color: var(--radio-group-mobile-label-color);
33
33
  padding-left: var(--radio-group-mobile-sub-padding-left);
34
- } .radio-group__sub_ree10 {
34
+ } .radio-group__sub_19nbj {
35
35
  padding-left: var(--radio-group-mobile-sub-padding-left);
36
36
  }
@@ -0,0 +1,2 @@
1
+ export * from "../Component.mobile";
2
+ export {};
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Component_mobile = require('./Component.mobile.js');
5
+ var Component_mobile = require('../Component.mobile.js');
6
6
  require('tslib');
7
7
  require('react');
8
- require('./components/base-radio-group/Component.js');
8
+ require('../components/base-radio-group/Component.js');
9
9
  require('classnames');
10
10
  require('@alfalab/hooks');
11
11
 
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../esm/mobile/index.js"
3
+ }
package/mobile.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1nxht */
1
+ /* hash: n4bof */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-secondary: rgba(60, 60, 67, 0.66); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -23,14 +23,14 @@
23
23
  --radio-group-mobile-sub-padding-left: var(--gap-2xs);
24
24
  --radio-group-mobile-list-padding-left: var(--gap-3xs);
25
25
  --radio-group-mobile-label-color: var(--color-light-text-secondary);
26
- } .radio-group__radioList_ree10 {
26
+ } .radio-group__radioList_19nbj {
27
27
  padding-left: var(--radio-group-mobile-list-padding-left);
28
- } .radio-group__label_ree10 {
28
+ } .radio-group__label_19nbj {
29
29
  font-size: 14px;
30
30
  line-height: 18px;
31
31
  font-weight: 400;
32
32
  color: var(--radio-group-mobile-label-color);
33
33
  padding-left: var(--radio-group-mobile-sub-padding-left);
34
- } .radio-group__sub_ree10 {
34
+ } .radio-group__sub_19nbj {
35
35
  padding-left: var(--radio-group-mobile-sub-padding-left);
36
36
  }
@@ -3,7 +3,7 @@ import { BaseRadioGroup } from './components/base-radio-group/Component.js';
3
3
  import 'classnames';
4
4
  import '@alfalab/hooks';
5
5
 
6
- const styles = {"radioList":"radio-group__radioList_j0spj","label":"radio-group__label_j0spj","sub":"radio-group__sub_j0spj"};
6
+ const styles = {"radioList":"radio-group__radioList_1arjj","label":"radio-group__label_1arjj","sub":"radio-group__sub_1arjj"};
7
7
  require('./desktop.css')
8
8
 
9
9
  const RadioGroupDesktop = forwardRef((props, ref) => React.createElement(BaseRadioGroup, { ...props, ref: ref, styles: styles }));
@@ -3,7 +3,7 @@ import { BaseRadioGroup } from './components/base-radio-group/Component.js';
3
3
  import 'classnames';
4
4
  import '@alfalab/hooks';
5
5
 
6
- const styles = {"radioList":"radio-group__radioList_ree10","label":"radio-group__label_ree10","sub":"radio-group__sub_ree10"};
6
+ const styles = {"radioList":"radio-group__radioList_19nbj","label":"radio-group__label_19nbj","sub":"radio-group__sub_19nbj"};
7
7
  require('./mobile.css')
8
8
 
9
9
  const RadioGroupMobile = forwardRef((props, ref) => (React.createElement(BaseRadioGroup, { ...props, ref: ref, styles: styles })));
@@ -2,7 +2,7 @@ import React, { forwardRef, useState, Children, isValidElement, cloneElement } f
2
2
  import cn from 'classnames';
3
3
  import { useDidUpdateEffect } from '@alfalab/hooks';
4
4
 
5
- const commonStyles = {"component":"radio-group__component_1gwql","error":"radio-group__error_1gwql","tag":"radio-group__tag_1gwql","radioList":"radio-group__radioList_1gwql","vertical":"radio-group__vertical_1gwql","radio":"radio-group__radio_1gwql","horizontal":"radio-group__horizontal_1gwql","tagLabel":"radio-group__tagLabel_1gwql","label":"radio-group__label_1gwql","sub":"radio-group__sub_1gwql","errorMessage":"radio-group__errorMessage_1gwql","hint":"radio-group__hint_1gwql","hiddenInput":"radio-group__hiddenInput_1gwql"};
5
+ const commonStyles = {"component":"radio-group__component_179iy","error":"radio-group__error_179iy","tag":"radio-group__tag_179iy","radioList":"radio-group__radioList_179iy","verticalRadioList":"radio-group__verticalRadioList_179iy","horizontalRadioList":"radio-group__horizontalRadioList_179iy","verticalRadio":"radio-group__verticalRadio_179iy","horizontalRadio":"radio-group__horizontalRadio_179iy","horizontalTagLabel":"radio-group__horizontalTagLabel_179iy","label":"radio-group__label_179iy","sub":"radio-group__sub_179iy","errorMessage":"radio-group__errorMessage_179iy","hint":"radio-group__hint_179iy","hiddenInput":"radio-group__hiddenInput_179iy","tagLabel":"radio-group__tagLabel_179iy"};
6
6
  require('./index.css')
7
7
 
8
8
  const BaseRadioGroup = forwardRef(({ children, className, radioListClassName, direction = 'vertical', label, error, hint, onChange, onBlur, onFocus, type = 'radio', dataTestId, disabled = false, name, value, styles, }, ref) => {
@@ -25,7 +25,7 @@ const BaseRadioGroup = forwardRef(({ children, className, radioListClassName, di
25
25
  ...child.props,
26
26
  checked: isChecked(childValue),
27
27
  name,
28
- className: cn(childClassName, commonStyles.radio),
28
+ className: cn(childClassName, commonStyles[`${direction}Radio`]),
29
29
  });
30
30
  };
31
31
  const renderTag = (child) => {
@@ -39,16 +39,14 @@ const BaseRadioGroup = forwardRef(({ children, className, radioListClassName, di
39
39
  name,
40
40
  tabIndex: -1,
41
41
  });
42
- return (React.createElement("label", { className: cn(commonStyles.radio, commonStyles.tagLabel) },
42
+ return (React.createElement("label", { className: cn(commonStyles[`${direction}Radio`], commonStyles[`${direction}TagLabel`]) },
43
43
  React.createElement("input", { type: 'radio', autoComplete: 'off', onChange: (event) => handleChange(event, childValue), disabled: disabled || child.props.disabled, name: name, checked: checked, className: commonStyles.hiddenInput, value: child.props.value }),
44
44
  clone));
45
45
  };
46
46
  const errorMessage = typeof error === 'boolean' ? '' : error;
47
- return (React.createElement("div", { className: cn(commonStyles.component, commonStyles[type], commonStyles[direction], { [commonStyles.error]: error }, className), "data-test-id": dataTestId, ref: ref },
47
+ return (React.createElement("div", { className: cn(commonStyles.component, commonStyles[type], { [commonStyles.error]: error }, className), "data-test-id": dataTestId, ref: ref },
48
48
  label ? (React.createElement("span", { className: cn(commonStyles.label, styles.label) }, label)) : null,
49
- children ? (React.createElement("div", { className: cn(commonStyles.radioList, radioListClassName, {
50
- [styles.radioList]: type === 'radio',
51
- }), onBlur: onBlur, onFocus: onFocus }, Children.map(children, (child) => {
49
+ children ? (React.createElement("div", { className: cn(commonStyles.radioList, commonStyles[`${direction}RadioList`], radioListClassName, { [styles.radioList]: type === 'radio' }), onBlur: onBlur, onFocus: onFocus }, Children.map(children, (child) => {
52
50
  if (isValidElement(child)) {
53
51
  return type === 'radio' ? renderRadio(child) : renderTag(child);
54
52
  }
@@ -1,4 +1,4 @@
1
- /* hash: rhtyn */
1
+ /* hash: 1tmfa */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-link: #0072ef;
@@ -28,55 +28,55 @@
28
28
  --radio-group-hint-color: var(--color-light-text-secondary);
29
29
 
30
30
  /* mobile */
31
- } .radio-group__component_1gwql {
31
+ } .radio-group__component_179iy {
32
32
  display: flex;
33
33
  flex-direction: column;
34
- } .radio-group__error_1gwql {
34
+ } .radio-group__error_179iy {
35
35
  padding-left: var(--gap-s);
36
36
  border-left: 1px solid var(--radio-group-error-color)
37
- } .radio-group__error_1gwql.radio-group__tag_1gwql {
37
+ } .radio-group__error_179iy.radio-group__tag_179iy {
38
38
  padding-left: var(--gap-xs);
39
- } .radio-group__radioList_1gwql {
39
+ } .radio-group__radioList_179iy {
40
40
  display: flex;
41
- } .radio-group__vertical_1gwql .radio-group__radioList_1gwql {
41
+ } .radio-group__verticalRadioList_179iy {
42
42
  flex-direction: column;
43
43
  align-items: flex-start;
44
- } .radio-group__vertical_1gwql .radio-group__radio_1gwql {
45
- margin-bottom: var(--gap-m)
46
- } .radio-group__vertical_1gwql .radio-group__radio_1gwql:last-child {
47
- margin-bottom: 0;
48
- } .radio-group__horizontal_1gwql .radio-group__radioList_1gwql {
44
+ } .radio-group__horizontalRadioList_179iy {
49
45
  flex-wrap: wrap;
50
46
  margin-bottom: var(--gap-xs-neg);
51
- } .radio-group__horizontal_1gwql .radio-group__radio_1gwql {
47
+ } .radio-group__verticalRadio_179iy {
48
+ margin-bottom: var(--gap-m)
49
+ } .radio-group__verticalRadio_179iy:last-child {
50
+ margin-bottom: 0;
51
+ } .radio-group__horizontalRadio_179iy {
52
52
  margin-right: var(--gap-xl);
53
53
  margin-bottom: var(--gap-xs);
54
- } .radio-group__horizontal_1gwql .radio-group__tagLabel_1gwql {
54
+ } .radio-group__horizontalTagLabel_179iy {
55
55
  margin-right: var(--gap-xs);
56
- } .radio-group__horizontal_1gwql .radio-group__radio_1gwql:last-child,
57
- .radio-group__horizontal_1gwql .radio-group__tagLabel_1gwql:last-child {
56
+ } .radio-group__horizontalRadio_179iy:last-child,
57
+ .radio-group__horizontalTagLabel_179iy:last-child {
58
58
  margin-right: 0;
59
- } .radio-group__label_1gwql {
59
+ } .radio-group__label_179iy {
60
60
  margin-bottom: var(--gap-s);
61
- } .radio-group__sub_1gwql {
61
+ } .radio-group__sub_179iy {
62
62
  font-size: 14px;
63
63
  line-height: 18px;
64
64
  font-weight: 400;
65
65
  margin-top: var(--gap-s);
66
- } .radio-group__errorMessage_1gwql {
66
+ } .radio-group__errorMessage_179iy {
67
67
  color: var(--radio-group-error-color);
68
- } .radio-group__hint_1gwql {
68
+ } .radio-group__hint_179iy {
69
69
  color: var(--radio-group-hint-color);
70
- } .radio-group__hiddenInput_1gwql {
70
+ } .radio-group__hiddenInput_179iy {
71
71
  position: absolute;
72
72
  z-index: -1;
73
73
  top: 0;
74
74
  left: 0;
75
75
  opacity: 0
76
- } .radio-group__hiddenInput_1gwql:focus ~ button {
76
+ } .radio-group__hiddenInput_179iy:focus ~ button {
77
77
  outline: 2px solid var(--focus-color);
78
78
  outline-offset: 2px;
79
- } .radio-group__tagLabel_1gwql {
79
+ } .radio-group__tagLabel_179iy {
80
80
  position: relative;
81
81
  max-width: 100%;
82
82
  }
@@ -0,0 +1,2 @@
1
+ export * from "../Component.desktop";
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export { RadioGroupDesktop } from '../Component.desktop.js';
2
+ import 'react';
3
+ import '../components/base-radio-group/Component.js';
4
+ import 'classnames';
5
+ import '@alfalab/hooks';
@@ -1,4 +1,4 @@
1
- /* hash: 12evq */
1
+ /* hash: 1tcm4 */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -21,14 +21,14 @@
21
21
  --radio-group-list-padding-left: 0;
22
22
 
23
23
  /* mobile */
24
- } .radio-group__radioList_j0spj {
24
+ } .radio-group__radioList_1arjj {
25
25
  padding-left: var(--radio-group-list-padding-left);
26
- } .radio-group__label_j0spj {
26
+ } .radio-group__label_1arjj {
27
27
  font-size: 16px;
28
28
  line-height: 24px;
29
29
  font-weight: 400;
30
30
  color: var(--radio-group-label-color);
31
31
  padding-left: var(--radio-group-sub-padding-left);
32
- } .radio-group__sub_j0spj {
32
+ } .radio-group__sub_1arjj {
33
33
  padding-left: var(--radio-group-sub-padding-left);
34
34
  }
@@ -0,0 +1,2 @@
1
+ export * from "../Component.mobile";
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export { RadioGroupMobile } from '../Component.mobile.js';
2
+ import 'react';
3
+ import '../components/base-radio-group/Component.js';
4
+ import 'classnames';
5
+ import '@alfalab/hooks';
package/modern/mobile.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1nxht */
1
+ /* hash: n4bof */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-secondary: rgba(60, 60, 67, 0.66); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -23,14 +23,14 @@
23
23
  --radio-group-mobile-sub-padding-left: var(--gap-2xs);
24
24
  --radio-group-mobile-list-padding-left: var(--gap-3xs);
25
25
  --radio-group-mobile-label-color: var(--color-light-text-secondary);
26
- } .radio-group__radioList_ree10 {
26
+ } .radio-group__radioList_19nbj {
27
27
  padding-left: var(--radio-group-mobile-list-padding-left);
28
- } .radio-group__label_ree10 {
28
+ } .radio-group__label_19nbj {
29
29
  font-size: 14px;
30
30
  line-height: 18px;
31
31
  font-weight: 400;
32
32
  color: var(--radio-group-mobile-label-color);
33
33
  padding-left: var(--radio-group-mobile-sub-padding-left);
34
- } .radio-group__sub_ree10 {
34
+ } .radio-group__sub_19nbj {
35
35
  padding-left: var(--radio-group-mobile-sub-padding-left);
36
36
  }
package/package.json CHANGED
@@ -1,31 +1,11 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-radio-group",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "Radio group",
5
5
  "keywords": [],
6
6
  "license": "MIT",
7
7
  "main": "index.js",
8
8
  "module": "./esm/index.js",
9
- "exports": {
10
- ".": {
11
- "import": "./esm/index.js",
12
- "require": "./index.js"
13
- },
14
- "./mobile": {
15
- "import": "./esm/mobile.js",
16
- "require": "./mobile.js"
17
- },
18
- "./desktop": {
19
- "import": "./esm/desktop.js",
20
- "require": "./desktop.js"
21
- },
22
- "./esm": "./esm/index.js",
23
- "./cssm": "./cssm/index.js",
24
- "./modern": "./modern/index.js",
25
- "./esm/*": "./esm/*",
26
- "./cssm/*": "./cssm/*",
27
- "./modern/*": "./modern/*"
28
- },
29
9
  "publishConfig": {
30
10
  "access": "public",
31
11
  "directory": "dist"
@@ -154,7 +154,7 @@ export const BaseRadioGroup = forwardRef<HTMLDivElement, BaseRadioGroupProps>(
154
154
  ...child.props,
155
155
  checked: isChecked(childValue),
156
156
  name,
157
- className: cn(childClassName, commonStyles.radio),
157
+ className: cn(childClassName, commonStyles[`${direction}Radio`]),
158
158
  });
159
159
  };
160
160
 
@@ -171,7 +171,12 @@ export const BaseRadioGroup = forwardRef<HTMLDivElement, BaseRadioGroupProps>(
171
171
  });
172
172
 
173
173
  return (
174
- <label className={cn(commonStyles.radio, commonStyles.tagLabel)}>
174
+ <label
175
+ className={cn(
176
+ commonStyles[`${direction}Radio`],
177
+ commonStyles[`${direction}TagLabel`],
178
+ )}
179
+ >
175
180
  <input
176
181
  type='radio'
177
182
  autoComplete='off'
@@ -194,7 +199,6 @@ export const BaseRadioGroup = forwardRef<HTMLDivElement, BaseRadioGroupProps>(
194
199
  className={cn(
195
200
  commonStyles.component,
196
201
  commonStyles[type],
197
- commonStyles[direction],
198
202
  { [commonStyles.error]: error },
199
203
  className,
200
204
  )}
@@ -207,9 +211,12 @@ export const BaseRadioGroup = forwardRef<HTMLDivElement, BaseRadioGroupProps>(
207
211
 
208
212
  {children ? (
209
213
  <div
210
- className={cn(commonStyles.radioList, radioListClassName, {
211
- [styles.radioList]: type === 'radio',
212
- })}
214
+ className={cn(
215
+ commonStyles.radioList,
216
+ commonStyles[`${direction}RadioList`],
217
+ radioListClassName,
218
+ { [styles.radioList]: type === 'radio' },
219
+ )}
213
220
  onBlur={onBlur}
214
221
  onFocus={onFocus}
215
222
  >
@@ -18,12 +18,17 @@
18
18
  display: flex;
19
19
  }
20
20
 
21
- .vertical .radioList {
21
+ .verticalRadioList {
22
22
  flex-direction: column;
23
23
  align-items: flex-start;
24
24
  }
25
25
 
26
- .vertical .radio {
26
+ .horizontalRadioList {
27
+ flex-wrap: wrap;
28
+ margin-bottom: var(--gap-xs-neg);
29
+ }
30
+
31
+ .verticalRadio {
27
32
  margin-bottom: var(--gap-m);
28
33
 
29
34
  &:last-child {
@@ -31,22 +36,17 @@
31
36
  }
32
37
  }
33
38
 
34
- .horizontal .radioList {
35
- flex-wrap: wrap;
36
- margin-bottom: var(--gap-xs-neg);
37
- }
38
-
39
- .horizontal .radio {
39
+ .horizontalRadio {
40
40
  margin-right: var(--gap-xl);
41
41
  margin-bottom: var(--gap-xs);
42
42
  }
43
43
 
44
- .horizontal .tagLabel {
44
+ .horizontalTagLabel {
45
45
  margin-right: var(--gap-xs);
46
46
  }
47
47
 
48
- .horizontal .radio:last-child,
49
- .horizontal .tagLabel:last-child {
48
+ .horizontalRadio:last-child,
49
+ .horizontalTagLabel:last-child {
50
50
  margin-right: 0;
51
51
  }
52
52
 
@@ -0,0 +1 @@
1
+ export * from '../Component.desktop';
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../esm/desktop/index.js"
3
+ }
@@ -0,0 +1 @@
1
+ export * from '../Component.mobile';
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../esm/mobile/index.js"
3
+ }
package/cssm/desktop.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./Component.desktop";
2
- export {};
package/cssm/mobile.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./Component.mobile";
2
- export {};
package/desktop.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./Component.desktop";
2
- export {};
package/esm/desktop.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./Component.desktop";
2
- export {};
package/esm/desktop.js DELETED
@@ -1,6 +0,0 @@
1
- export { RadioGroupDesktop } from './Component.desktop.js';
2
- import 'tslib';
3
- import 'react';
4
- import './components/base-radio-group/Component.js';
5
- import 'classnames';
6
- import '@alfalab/hooks';
package/esm/mobile.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./Component.mobile";
2
- export {};
package/esm/mobile.js DELETED
@@ -1,6 +0,0 @@
1
- export { RadioGroupMobile } from './Component.mobile.js';
2
- import 'tslib';
3
- import 'react';
4
- import './components/base-radio-group/Component.js';
5
- import 'classnames';
6
- import '@alfalab/hooks';
package/mobile.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./Component.mobile";
2
- export {};
@@ -1,2 +0,0 @@
1
- export * from "./Component.desktop";
2
- export {};
package/modern/desktop.js DELETED
@@ -1,5 +0,0 @@
1
- export { RadioGroupDesktop } from './Component.desktop.js';
2
- import 'react';
3
- import './components/base-radio-group/Component.js';
4
- import 'classnames';
5
- import '@alfalab/hooks';
@@ -1,2 +0,0 @@
1
- export * from "./Component.mobile";
2
- export {};
package/modern/mobile.js DELETED
@@ -1,5 +0,0 @@
1
- export { RadioGroupMobile } from './Component.mobile.js';
2
- import 'react';
3
- import './components/base-radio-group/Component.js';
4
- import 'classnames';
5
- import '@alfalab/hooks';
package/src/desktop.ts DELETED
@@ -1 +0,0 @@
1
- export * from './Component.desktop';
package/src/mobile.ts DELETED
@@ -1 +0,0 @@
1
- export * from './Component.mobile';