@alfalab/core-components-radio-group 3.0.7 → 3.0.9

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/Component.js CHANGED
@@ -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 styles = {"component":"radio-group__component_1c3my","error":"radio-group__error_1c3my","radioList":"radio-group__radioList_1c3my","vertical":"radio-group__vertical_1c3my","radio":"radio-group__radio_1c3my","horizontal":"radio-group__horizontal_1c3my","tag":"radio-group__tag_1c3my","tagLabel":"radio-group__tagLabel_1c3my","label":"radio-group__label_1c3my","sub":"radio-group__sub_1c3my","errorMessage":"radio-group__errorMessage_1c3my","hint":"radio-group__hint_1c3my","hiddenInput":"radio-group__hiddenInput_1c3my"};
15
+ var styles = {"component":"radio-group__component_4kez1","error":"radio-group__error_4kez1","radioList":"radio-group__radioList_4kez1","vertical":"radio-group__vertical_4kez1","radio":"radio-group__radio_4kez1","horizontal":"radio-group__horizontal_4kez1","tagLabel":"radio-group__tagLabel_4kez1","label":"radio-group__label_4kez1","sub":"radio-group__sub_4kez1","errorMessage":"radio-group__errorMessage_4kez1","hint":"radio-group__hint_4kez1","hiddenInput":"radio-group__hiddenInput_4kez1"};
16
16
  require('./index.css')
17
17
 
18
18
  var RadioGroup = React.forwardRef(function (_a, ref) {
@@ -20,7 +20,6 @@
20
20
  --gap-m: 16px;
21
21
  --gap-xl: 24px;
22
22
  --gap-xs-neg: -8px;
23
- --gap-xl-neg: -24px;
24
23
  } :root {
25
24
  } :root {
26
25
  --focus-color: var(--color-light-border-link);
@@ -45,15 +44,15 @@
45
44
  margin-bottom: 0;
46
45
  } .horizontal .radioList {
47
46
  flex-wrap: wrap;
48
- margin-right: var(--gap-xl-neg);
49
47
  margin-bottom: var(--gap-xs-neg);
50
- } .tag.horizontal .radioList {
51
- margin-right: var(--gap-xs-neg);
52
48
  } .horizontal .radio {
53
49
  margin-right: var(--gap-xl);
54
50
  margin-bottom: var(--gap-xs);
55
51
  } .horizontal .tagLabel {
56
52
  margin-right: var(--gap-xs);
53
+ } .horizontal .radio:last-child,
54
+ .horizontal .tagLabel:last-child {
55
+ margin-right: 0;
57
56
  } .label {
58
57
  font-size: 16px;
59
58
  line-height: 24px;
@@ -80,4 +79,5 @@
80
79
  outline-offset: 2px;
81
80
  } .tagLabel {
82
81
  position: relative;
82
+ max-width: 100%;
83
83
  }
package/esm/Component.js CHANGED
@@ -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 styles = {"component":"radio-group__component_1c3my","error":"radio-group__error_1c3my","radioList":"radio-group__radioList_1c3my","vertical":"radio-group__vertical_1c3my","radio":"radio-group__radio_1c3my","horizontal":"radio-group__horizontal_1c3my","tag":"radio-group__tag_1c3my","tagLabel":"radio-group__tagLabel_1c3my","label":"radio-group__label_1c3my","sub":"radio-group__sub_1c3my","errorMessage":"radio-group__errorMessage_1c3my","hint":"radio-group__hint_1c3my","hiddenInput":"radio-group__hiddenInput_1c3my"};
6
+ var styles = {"component":"radio-group__component_4kez1","error":"radio-group__error_4kez1","radioList":"radio-group__radioList_4kez1","vertical":"radio-group__vertical_4kez1","radio":"radio-group__radio_4kez1","horizontal":"radio-group__horizontal_4kez1","tagLabel":"radio-group__tagLabel_4kez1","label":"radio-group__label_4kez1","sub":"radio-group__sub_4kez1","errorMessage":"radio-group__errorMessage_4kez1","hint":"radio-group__hint_4kez1","hiddenInput":"radio-group__hiddenInput_4kez1"};
7
7
  require('./index.css')
8
8
 
9
9
  var RadioGroup = forwardRef(function (_a, ref) {
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: un1x6 */
1
+ /* hash: 1q4m4 */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-link: #0072ef;
@@ -21,7 +21,6 @@
21
21
  --gap-m: 16px;
22
22
  --gap-xl: 24px;
23
23
  --gap-xs-neg: -8px;
24
- --gap-xl-neg: -24px;
25
24
  } :root {
26
25
  } :root {
27
26
  --focus-color: var(--color-light-border-link);
@@ -29,56 +28,57 @@
29
28
  --radio-group-error-color: var(--color-light-text-negative);
30
29
  --radio-group-hint-color: var(--color-light-text-secondary);
31
30
  --radio-group-label-color: var(--color-light-text-primary);
32
- } .radio-group__component_1c3my {
31
+ } .radio-group__component_4kez1 {
33
32
  display: flex;
34
33
  flex-direction: column;
35
- } .radio-group__error_1c3my {
34
+ } .radio-group__error_4kez1 {
36
35
  padding-left: var(--gap-xs);
37
36
  border-left: 1px solid var(--radio-group-error-color);
38
- } .radio-group__radioList_1c3my {
37
+ } .radio-group__radioList_4kez1 {
39
38
  display: flex;
40
- } .radio-group__vertical_1c3my .radio-group__radioList_1c3my {
39
+ } .radio-group__vertical_4kez1 .radio-group__radioList_4kez1 {
41
40
  flex-direction: column;
42
41
  align-items: flex-start;
43
- } .radio-group__vertical_1c3my .radio-group__radio_1c3my {
42
+ } .radio-group__vertical_4kez1 .radio-group__radio_4kez1 {
44
43
  margin-bottom: var(--gap-m)
45
- } .radio-group__vertical_1c3my .radio-group__radio_1c3my:last-child {
44
+ } .radio-group__vertical_4kez1 .radio-group__radio_4kez1:last-child {
46
45
  margin-bottom: 0;
47
- } .radio-group__horizontal_1c3my .radio-group__radioList_1c3my {
46
+ } .radio-group__horizontal_4kez1 .radio-group__radioList_4kez1 {
48
47
  flex-wrap: wrap;
49
- margin-right: var(--gap-xl-neg);
50
48
  margin-bottom: var(--gap-xs-neg);
51
- } .radio-group__tag_1c3my.radio-group__horizontal_1c3my .radio-group__radioList_1c3my {
52
- margin-right: var(--gap-xs-neg);
53
- } .radio-group__horizontal_1c3my .radio-group__radio_1c3my {
49
+ } .radio-group__horizontal_4kez1 .radio-group__radio_4kez1 {
54
50
  margin-right: var(--gap-xl);
55
51
  margin-bottom: var(--gap-xs);
56
- } .radio-group__horizontal_1c3my .radio-group__tagLabel_1c3my {
52
+ } .radio-group__horizontal_4kez1 .radio-group__tagLabel_4kez1 {
57
53
  margin-right: var(--gap-xs);
58
- } .radio-group__label_1c3my {
54
+ } .radio-group__horizontal_4kez1 .radio-group__radio_4kez1:last-child,
55
+ .radio-group__horizontal_4kez1 .radio-group__tagLabel_4kez1:last-child {
56
+ margin-right: 0;
57
+ } .radio-group__label_4kez1 {
59
58
  font-size: 16px;
60
59
  line-height: 24px;
61
60
  font-weight: 400;
62
61
  margin-bottom: var(--gap-s);
63
62
  color: var(--radio-group-label-color);
64
- } .radio-group__sub_1c3my {
63
+ } .radio-group__sub_4kez1 {
65
64
  font-size: 14px;
66
65
  line-height: 18px;
67
66
  font-weight: 400;
68
67
  margin-top: var(--gap-s);
69
- } .radio-group__errorMessage_1c3my {
68
+ } .radio-group__errorMessage_4kez1 {
70
69
  color: var(--radio-group-error-color);
71
- } .radio-group__hint_1c3my {
70
+ } .radio-group__hint_4kez1 {
72
71
  color: var(--radio-group-hint-color);
73
- } .radio-group__hiddenInput_1c3my {
72
+ } .radio-group__hiddenInput_4kez1 {
74
73
  position: absolute;
75
74
  z-index: -1;
76
75
  top: 0;
77
76
  left: 0;
78
77
  opacity: 0
79
- } .radio-group__hiddenInput_1c3my:focus ~ button {
78
+ } .radio-group__hiddenInput_4kez1:focus ~ button {
80
79
  outline: 2px solid var(--focus-color);
81
80
  outline-offset: 2px;
82
- } .radio-group__tagLabel_1c3my {
81
+ } .radio-group__tagLabel_4kez1 {
83
82
  position: relative;
83
+ max-width: 100%;
84
84
  }
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: un1x6 */
1
+ /* hash: 1q4m4 */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-link: #0072ef;
@@ -21,7 +21,6 @@
21
21
  --gap-m: 16px;
22
22
  --gap-xl: 24px;
23
23
  --gap-xs-neg: -8px;
24
- --gap-xl-neg: -24px;
25
24
  } :root {
26
25
  } :root {
27
26
  --focus-color: var(--color-light-border-link);
@@ -29,56 +28,57 @@
29
28
  --radio-group-error-color: var(--color-light-text-negative);
30
29
  --radio-group-hint-color: var(--color-light-text-secondary);
31
30
  --radio-group-label-color: var(--color-light-text-primary);
32
- } .radio-group__component_1c3my {
31
+ } .radio-group__component_4kez1 {
33
32
  display: flex;
34
33
  flex-direction: column;
35
- } .radio-group__error_1c3my {
34
+ } .radio-group__error_4kez1 {
36
35
  padding-left: var(--gap-xs);
37
36
  border-left: 1px solid var(--radio-group-error-color);
38
- } .radio-group__radioList_1c3my {
37
+ } .radio-group__radioList_4kez1 {
39
38
  display: flex;
40
- } .radio-group__vertical_1c3my .radio-group__radioList_1c3my {
39
+ } .radio-group__vertical_4kez1 .radio-group__radioList_4kez1 {
41
40
  flex-direction: column;
42
41
  align-items: flex-start;
43
- } .radio-group__vertical_1c3my .radio-group__radio_1c3my {
42
+ } .radio-group__vertical_4kez1 .radio-group__radio_4kez1 {
44
43
  margin-bottom: var(--gap-m)
45
- } .radio-group__vertical_1c3my .radio-group__radio_1c3my:last-child {
44
+ } .radio-group__vertical_4kez1 .radio-group__radio_4kez1:last-child {
46
45
  margin-bottom: 0;
47
- } .radio-group__horizontal_1c3my .radio-group__radioList_1c3my {
46
+ } .radio-group__horizontal_4kez1 .radio-group__radioList_4kez1 {
48
47
  flex-wrap: wrap;
49
- margin-right: var(--gap-xl-neg);
50
48
  margin-bottom: var(--gap-xs-neg);
51
- } .radio-group__tag_1c3my.radio-group__horizontal_1c3my .radio-group__radioList_1c3my {
52
- margin-right: var(--gap-xs-neg);
53
- } .radio-group__horizontal_1c3my .radio-group__radio_1c3my {
49
+ } .radio-group__horizontal_4kez1 .radio-group__radio_4kez1 {
54
50
  margin-right: var(--gap-xl);
55
51
  margin-bottom: var(--gap-xs);
56
- } .radio-group__horizontal_1c3my .radio-group__tagLabel_1c3my {
52
+ } .radio-group__horizontal_4kez1 .radio-group__tagLabel_4kez1 {
57
53
  margin-right: var(--gap-xs);
58
- } .radio-group__label_1c3my {
54
+ } .radio-group__horizontal_4kez1 .radio-group__radio_4kez1:last-child,
55
+ .radio-group__horizontal_4kez1 .radio-group__tagLabel_4kez1:last-child {
56
+ margin-right: 0;
57
+ } .radio-group__label_4kez1 {
59
58
  font-size: 16px;
60
59
  line-height: 24px;
61
60
  font-weight: 400;
62
61
  margin-bottom: var(--gap-s);
63
62
  color: var(--radio-group-label-color);
64
- } .radio-group__sub_1c3my {
63
+ } .radio-group__sub_4kez1 {
65
64
  font-size: 14px;
66
65
  line-height: 18px;
67
66
  font-weight: 400;
68
67
  margin-top: var(--gap-s);
69
- } .radio-group__errorMessage_1c3my {
68
+ } .radio-group__errorMessage_4kez1 {
70
69
  color: var(--radio-group-error-color);
71
- } .radio-group__hint_1c3my {
70
+ } .radio-group__hint_4kez1 {
72
71
  color: var(--radio-group-hint-color);
73
- } .radio-group__hiddenInput_1c3my {
72
+ } .radio-group__hiddenInput_4kez1 {
74
73
  position: absolute;
75
74
  z-index: -1;
76
75
  top: 0;
77
76
  left: 0;
78
77
  opacity: 0
79
- } .radio-group__hiddenInput_1c3my:focus ~ button {
78
+ } .radio-group__hiddenInput_4kez1:focus ~ button {
80
79
  outline: 2px solid var(--focus-color);
81
80
  outline-offset: 2px;
82
- } .radio-group__tagLabel_1c3my {
81
+ } .radio-group__tagLabel_4kez1 {
83
82
  position: relative;
83
+ max-width: 100%;
84
84
  }
@@ -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 styles = {"component":"radio-group__component_1c3my","error":"radio-group__error_1c3my","radioList":"radio-group__radioList_1c3my","vertical":"radio-group__vertical_1c3my","radio":"radio-group__radio_1c3my","horizontal":"radio-group__horizontal_1c3my","tag":"radio-group__tag_1c3my","tagLabel":"radio-group__tagLabel_1c3my","label":"radio-group__label_1c3my","sub":"radio-group__sub_1c3my","errorMessage":"radio-group__errorMessage_1c3my","hint":"radio-group__hint_1c3my","hiddenInput":"radio-group__hiddenInput_1c3my"};
5
+ const styles = {"component":"radio-group__component_4kez1","error":"radio-group__error_4kez1","radioList":"radio-group__radioList_4kez1","vertical":"radio-group__vertical_4kez1","radio":"radio-group__radio_4kez1","horizontal":"radio-group__horizontal_4kez1","tagLabel":"radio-group__tagLabel_4kez1","label":"radio-group__label_4kez1","sub":"radio-group__sub_4kez1","errorMessage":"radio-group__errorMessage_4kez1","hint":"radio-group__hint_4kez1","hiddenInput":"radio-group__hiddenInput_4kez1"};
6
6
  require('./index.css')
7
7
 
8
8
  const RadioGroup = forwardRef(({ children, className, direction = 'vertical', label, error, hint, onChange, onBlur, onFocus, type = 'radio', dataTestId, disabled = false, name, value, }, ref) => {
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: un1x6 */
1
+ /* hash: 1q4m4 */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-link: #0072ef;
@@ -21,7 +21,6 @@
21
21
  --gap-m: 16px;
22
22
  --gap-xl: 24px;
23
23
  --gap-xs-neg: -8px;
24
- --gap-xl-neg: -24px;
25
24
  } :root {
26
25
  } :root {
27
26
  --focus-color: var(--color-light-border-link);
@@ -29,56 +28,57 @@
29
28
  --radio-group-error-color: var(--color-light-text-negative);
30
29
  --radio-group-hint-color: var(--color-light-text-secondary);
31
30
  --radio-group-label-color: var(--color-light-text-primary);
32
- } .radio-group__component_1c3my {
31
+ } .radio-group__component_4kez1 {
33
32
  display: flex;
34
33
  flex-direction: column;
35
- } .radio-group__error_1c3my {
34
+ } .radio-group__error_4kez1 {
36
35
  padding-left: var(--gap-xs);
37
36
  border-left: 1px solid var(--radio-group-error-color);
38
- } .radio-group__radioList_1c3my {
37
+ } .radio-group__radioList_4kez1 {
39
38
  display: flex;
40
- } .radio-group__vertical_1c3my .radio-group__radioList_1c3my {
39
+ } .radio-group__vertical_4kez1 .radio-group__radioList_4kez1 {
41
40
  flex-direction: column;
42
41
  align-items: flex-start;
43
- } .radio-group__vertical_1c3my .radio-group__radio_1c3my {
42
+ } .radio-group__vertical_4kez1 .radio-group__radio_4kez1 {
44
43
  margin-bottom: var(--gap-m)
45
- } .radio-group__vertical_1c3my .radio-group__radio_1c3my:last-child {
44
+ } .radio-group__vertical_4kez1 .radio-group__radio_4kez1:last-child {
46
45
  margin-bottom: 0;
47
- } .radio-group__horizontal_1c3my .radio-group__radioList_1c3my {
46
+ } .radio-group__horizontal_4kez1 .radio-group__radioList_4kez1 {
48
47
  flex-wrap: wrap;
49
- margin-right: var(--gap-xl-neg);
50
48
  margin-bottom: var(--gap-xs-neg);
51
- } .radio-group__tag_1c3my.radio-group__horizontal_1c3my .radio-group__radioList_1c3my {
52
- margin-right: var(--gap-xs-neg);
53
- } .radio-group__horizontal_1c3my .radio-group__radio_1c3my {
49
+ } .radio-group__horizontal_4kez1 .radio-group__radio_4kez1 {
54
50
  margin-right: var(--gap-xl);
55
51
  margin-bottom: var(--gap-xs);
56
- } .radio-group__horizontal_1c3my .radio-group__tagLabel_1c3my {
52
+ } .radio-group__horizontal_4kez1 .radio-group__tagLabel_4kez1 {
57
53
  margin-right: var(--gap-xs);
58
- } .radio-group__label_1c3my {
54
+ } .radio-group__horizontal_4kez1 .radio-group__radio_4kez1:last-child,
55
+ .radio-group__horizontal_4kez1 .radio-group__tagLabel_4kez1:last-child {
56
+ margin-right: 0;
57
+ } .radio-group__label_4kez1 {
59
58
  font-size: 16px;
60
59
  line-height: 24px;
61
60
  font-weight: 400;
62
61
  margin-bottom: var(--gap-s);
63
62
  color: var(--radio-group-label-color);
64
- } .radio-group__sub_1c3my {
63
+ } .radio-group__sub_4kez1 {
65
64
  font-size: 14px;
66
65
  line-height: 18px;
67
66
  font-weight: 400;
68
67
  margin-top: var(--gap-s);
69
- } .radio-group__errorMessage_1c3my {
68
+ } .radio-group__errorMessage_4kez1 {
70
69
  color: var(--radio-group-error-color);
71
- } .radio-group__hint_1c3my {
70
+ } .radio-group__hint_4kez1 {
72
71
  color: var(--radio-group-hint-color);
73
- } .radio-group__hiddenInput_1c3my {
72
+ } .radio-group__hiddenInput_4kez1 {
74
73
  position: absolute;
75
74
  z-index: -1;
76
75
  top: 0;
77
76
  left: 0;
78
77
  opacity: 0
79
- } .radio-group__hiddenInput_1c3my:focus ~ button {
78
+ } .radio-group__hiddenInput_4kez1:focus ~ button {
80
79
  outline: 2px solid var(--focus-color);
81
80
  outline-offset: 2px;
82
- } .radio-group__tagLabel_1c3my {
81
+ } .radio-group__tagLabel_4kez1 {
83
82
  position: relative;
83
+ max-width: 100%;
84
84
  }
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-radio-group",
3
- "version": "3.0.7",
3
+ "version": "3.0.9",
4
4
  "description": "Radio group",
5
5
  "keywords": [],
6
6
  "license": "MIT",
7
7
  "main": "index.js",
8
8
  "module": "./esm/index.js",
9
- "scripts": {
10
- "postinstall": "node -e \"if (require('fs').existsSync('./send-stats.js')){require('./send-stats.js')} \""
11
- },
12
9
  "publishConfig": {
13
10
  "access": "public",
14
11
  "directory": "dist"
package/send-stats.js DELETED
@@ -1,82 +0,0 @@
1
- const http = require('http');
2
- const fs = require('fs');
3
- const { promisify } = require('util');
4
- const path = require('path');
5
-
6
- const readFile = promisify(fs.readFile);
7
-
8
- async function main() {
9
- const remoteHost = process.env.NIS_HOST || 'digital';
10
- const remotePort = process.env.NIS_PORT || 80;
11
- const remotePath = process.env.NIS_PATH || '/npm-install-stats/api/install-stats';
12
-
13
- try {
14
- const [_, node, os, arch] =
15
- /node\/v(\d+\.\d+\.\d+) (\w+) (\w+)/.exec(process.env.npm_config_user_agent) || [];
16
- const [__, npm] = /npm\/(\d+\.\d+\.\d+)/.exec(process.env.npm_config_user_agent) || [];
17
- const [___, yarn] = /yarn\/(\d+\.\d+\.\d+)/.exec(process.env.npm_config_user_agent) || [];
18
-
19
- let ownPackageJson, packageJson;
20
-
21
- try {
22
- const result = await Promise.all([
23
- readFile(path.join(process.cwd(), 'package.json'), 'utf-8'),
24
- readFile(path.join(process.cwd(), '../../../package.json'), 'utf-8'),
25
- ]);
26
-
27
- ownPackageJson = JSON.parse(result[0]);
28
- packageJson = JSON.parse(result[1]);
29
- } catch (err) {
30
- ownPackageJson = '';
31
- packageJson = '';
32
- }
33
-
34
- const data = {
35
- node,
36
- npm,
37
- yarn,
38
- os,
39
- arch,
40
- ownPackageJson: JSON.stringify(ownPackageJson),
41
- packageJson: JSON.stringify(packageJson),
42
- };
43
-
44
- const body = JSON.stringify(data);
45
-
46
- const options = {
47
- host: remoteHost,
48
- port: remotePort,
49
- path: remotePath,
50
- method: 'POST',
51
- headers: {
52
- 'Content-Type': 'application/json',
53
- 'Content-Length': body.length,
54
- },
55
- };
56
-
57
- return new Promise((resolve, reject) => {
58
- const req = http.request(options, (res) => {
59
- res.on('end', () => {
60
- resolve();
61
- });
62
- });
63
-
64
- req.on('error', () => {
65
- reject();
66
- });
67
-
68
- req.write(body);
69
- req.end();
70
- });
71
- } catch (error) {
72
- throw error;
73
- }
74
- }
75
-
76
- main()
77
- .then(() => {
78
- process.exit(0);
79
- })
80
- .catch(() => {
81
- process.exit(0);
82
- });