@alfalab/core-components-switch 5.0.0 → 5.1.0-snapshot-92b8690

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 (52) hide show
  1. package/default.css +11 -11
  2. package/default.module.css.js +1 -1
  3. package/default.module.css.js.map +1 -1
  4. package/dynamic-mixins/Component.d.ts +124 -0
  5. package/dynamic-mixins/Component.js +58 -0
  6. package/dynamic-mixins/Component.js.map +1 -0
  7. package/dynamic-mixins/default.css +43 -0
  8. package/dynamic-mixins/default.module.css.js +8 -0
  9. package/dynamic-mixins/default.module.css.js.map +1 -0
  10. package/dynamic-mixins/index.css +100 -0
  11. package/dynamic-mixins/index.d.ts +1 -0
  12. package/dynamic-mixins/index.js +10 -0
  13. package/dynamic-mixins/index.js.map +1 -0
  14. package/dynamic-mixins/index.module.css.js +8 -0
  15. package/dynamic-mixins/index.module.css.js.map +1 -0
  16. package/dynamic-mixins/inverted.css +43 -0
  17. package/dynamic-mixins/inverted.module.css.js +8 -0
  18. package/dynamic-mixins/inverted.module.css.js.map +1 -0
  19. package/dynamic-mixins/types/colors.d.ts +1 -0
  20. package/dynamic-mixins/types/colors.js +3 -0
  21. package/dynamic-mixins/types/colors.js.map +1 -0
  22. package/esm/default.css +11 -11
  23. package/esm/default.module.css.js +1 -1
  24. package/esm/default.module.css.js.map +1 -1
  25. package/esm/index.css +19 -19
  26. package/esm/index.module.css.js +1 -1
  27. package/esm/index.module.css.js.map +1 -1
  28. package/esm/inverted.css +11 -11
  29. package/esm/inverted.module.css.js +1 -1
  30. package/esm/inverted.module.css.js.map +1 -1
  31. package/index.css +19 -19
  32. package/index.module.css.js +1 -1
  33. package/index.module.css.js.map +1 -1
  34. package/inverted.css +11 -11
  35. package/inverted.module.css.js +1 -1
  36. package/inverted.module.css.js.map +1 -1
  37. package/modern/default.css +11 -11
  38. package/modern/default.module.css.js +1 -1
  39. package/modern/default.module.css.js.map +1 -1
  40. package/modern/index.css +19 -19
  41. package/modern/index.module.css.js +1 -1
  42. package/modern/index.module.css.js.map +1 -1
  43. package/modern/inverted.css +11 -11
  44. package/modern/inverted.module.css.js +1 -1
  45. package/modern/inverted.module.css.js.map +1 -1
  46. package/moderncssm/default.module.css +11 -0
  47. package/moderncssm/index.module.css +19 -0
  48. package/moderncssm/inverted.module.css +11 -0
  49. package/package.json +4 -4
  50. package/src/default.module.css +1 -1
  51. package/src/index.module.css +1 -1
  52. package/src/inverted.module.css +1 -1
@@ -10,36 +10,47 @@
10
10
  --switch-disabled-checked-bg-color: var(--switch-disabled-bg-color);
11
11
  --switch-icon-disabled-color: var(--color-light-neutral-translucent-500);
12
12
  }
13
+
13
14
  .switch {
14
15
  background-color: var(--switch-bg-color)
15
16
  }
17
+
16
18
  .switch:hover {
17
19
  background-color: var(--switch-hover-bg-color);
18
20
  }
21
+
19
22
  .label {
20
23
  color: var(--switch-label-color);
21
24
  }
25
+
22
26
  .hint {
23
27
  color: var(--switch-hint-color);
24
28
  }
29
+
25
30
  .checked .switch {
26
31
  background-color: var(--switch-checked-bg-color)
27
32
  }
33
+
28
34
  .checked .switch:hover {
29
35
  background-color: var(--switch-checked-hover-bg-color);
30
36
  }
37
+
31
38
  .disabled .label {
32
39
  color: var(--switch-disabled-color);
33
40
  }
41
+
34
42
  .disabled .hint {
35
43
  color: var(--switch-disabled-color);
36
44
  }
45
+
37
46
  .disabled .switch {
38
47
  background-color: var(--switch-disabled-bg-color)
39
48
  }
49
+
40
50
  .disabled .switch:before {
41
51
  background-color: var(--switch-icon-disabled-color);
42
52
  }
53
+
43
54
  .disabled.checked .switch {
44
55
  background-color: var(--switch-disabled-checked-bg-color);
45
56
  }
@@ -3,6 +3,7 @@
3
3
  --switch-error-color: var(--color-light-text-negative);
4
4
  --switch-icon-color: var(--color-static-neutral-0);
5
5
  }
6
+
6
7
  .component {
7
8
  display: inline-flex;
8
9
  align-items: flex-start;
@@ -12,24 +13,30 @@
12
13
  cursor: pointer;
13
14
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
14
15
  }
16
+
15
17
  .component input {
16
18
  opacity: 0;
17
19
  position: absolute;
18
20
  }
21
+
19
22
  .start {
20
23
  align-items: flex-start;
21
24
  }
25
+
22
26
  .center {
23
27
  align-items: center;
24
28
  }
29
+
25
30
  .addons {
26
31
  margin-left: auto;
27
32
  padding-left: var(--gap-16);
28
33
  line-height: 24px;
29
34
  }
35
+
30
36
  .block {
31
37
  width: 100%;
32
38
  }
39
+
33
40
  .switch {
34
41
  position: relative;
35
42
  border-radius: var(--border-radius-16);
@@ -41,6 +48,7 @@
41
48
  transition: background-color 0.2s ease, border-color 0.2s ease;
42
49
  box-sizing: border-box;
43
50
  }
51
+
44
52
  .switch:before {
45
53
  content: '';
46
54
  position: absolute;
@@ -54,50 +62,61 @@
54
62
  box-sizing: border-box;
55
63
  transition: transform 0.2s ease;
56
64
  }
65
+
57
66
  .content {
58
67
  margin-left: var(--gap-12);
59
68
  flex-grow: 1;
60
69
  }
70
+
61
71
  .label {
62
72
  font-size: 16px;
63
73
  line-height: 24px;
64
74
  font-weight: 400;
65
75
  display: block;
66
76
  }
77
+
67
78
  .label:not(:only-child) {
68
79
  margin-bottom: var(--gap-4);
69
80
  }
81
+
70
82
  .errorMessage {
71
83
  font-size: 14px;
72
84
  line-height: 18px;
73
85
  font-weight: 400;
74
86
  color: var(--switch-error-color);
75
87
  }
88
+
76
89
  .hint {
77
90
  font-size: 14px;
78
91
  line-height: 18px;
79
92
  font-weight: 400;
80
93
  display: block;
81
94
  }
95
+
82
96
  .component.reversed {
83
97
  flex-direction: row-reverse;
84
98
  }
99
+
85
100
  .reversed .content {
86
101
  margin-right: var(--gap-16);
87
102
  margin-left: var(--gap-0);
88
103
  }
104
+
89
105
  .reversed .addons {
90
106
  margin-left: var(--gap-0);
91
107
  padding-left: var(--gap-0);
92
108
  margin-right: auto;
93
109
  padding-right: var(--gap-16);
94
110
  }
111
+
95
112
  .checked .switch:before {
96
113
  transform: translateX(16px);
97
114
  }
115
+
98
116
  .disabled {
99
117
  cursor: var(--disabled-cursor);
100
118
  }
119
+
101
120
  .focused .switch {
102
121
  outline: 2px solid var(--focus-color);
103
122
  outline-offset: 2px;
@@ -10,36 +10,47 @@
10
10
  --switch-disabled-checked-bg-inverted-color: var(--switch-disabled-bg-inverted-color);
11
11
  --switch-icon-disabled-inverted-color: var(--color-light-neutral-translucent-500-inverted);
12
12
  }
13
+
13
14
  .switch {
14
15
  background-color: var(--switch-bg-inverted-color)
15
16
  }
17
+
16
18
  .switch:hover {
17
19
  background-color: var(--switch-hover-bg-inverted-color);
18
20
  }
21
+
19
22
  .label {
20
23
  color: var(--switch-label-inverted-color);
21
24
  }
25
+
22
26
  .hint {
23
27
  color: var(--switch-hint-inverted-color);
24
28
  }
29
+
25
30
  .checked .switch {
26
31
  background-color: var(--switch-checked-bg-inverted-color)
27
32
  }
33
+
28
34
  .checked .switch:hover {
29
35
  background-color: var(--switch-checked-hover-bg-inverted-color);
30
36
  }
37
+
31
38
  .disabled .label {
32
39
  color: var(--switch-disabled-inverted-color);
33
40
  }
41
+
34
42
  .disabled .hint {
35
43
  color: var(--switch-disabled-inverted-color);
36
44
  }
45
+
37
46
  .disabled .switch {
38
47
  background-color: var(--switch-disabled-bg-inverted-color)
39
48
  }
49
+
40
50
  .disabled .switch:before {
41
51
  background-color: var(--switch-icon-disabled-inverted-color);
42
52
  }
53
+
43
54
  .disabled.checked .switch {
44
55
  background-color: var(--switch-disabled-checked-bg-inverted-color);
45
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-switch",
3
- "version": "5.0.0",
3
+ "version": "5.1.0-snapshot-92b8690",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "main": "index.js",
11
11
  "module": "./esm/index.js",
12
12
  "dependencies": {
13
- "@alfalab/core-components-shared": "^1.0.0",
13
+ "@alfalab/core-components-shared": "1.1.0-snapshot-92b8690",
14
14
  "@alfalab/hooks": "^1.13.1",
15
15
  "classnames": "^2.5.1",
16
16
  "react-merge-refs": "^1.1.0",
@@ -25,6 +25,6 @@
25
25
  "directory": "dist"
26
26
  },
27
27
  "gitHead": "f054fef20200664c65e2501ef1f916c555cdf05d",
28
- "themesVersion": "14.0.0",
29
- "varsVersion": "10.0.0"
28
+ "themesVersion": "14.1.0-snapshot-92b8690",
29
+ "varsVersion": "10.1.0-snapshot-92b8690"
30
30
  }
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/index.css';
1
+ @import '@alfalab/core-components-vars/src/no-dynamic-mixins-index.css';
2
2
  @import './vars.css';
3
3
 
4
4
  .switch {
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/index.css';
1
+ @import '@alfalab/core-components-vars/src/no-dynamic-mixins-index.css';
2
2
  @import './vars.css';
3
3
 
4
4
  .component {
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/index.css';
1
+ @import '@alfalab/core-components-vars/src/no-dynamic-mixins-index.css';
2
2
  @import './vars.css';
3
3
 
4
4
  .switch {