@bimdata/design-system 2.1.0-rc.32 → 2.1.0-rc.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bimdata/design-system",
3
- "version": "2.1.0-rc.32",
3
+ "version": "2.1.0-rc.33",
4
4
  "main": "./src/BIMDataComponents/index.js",
5
5
  "module": "./src/BIMDataComponents/index.js",
6
6
  "files": [
@@ -10,10 +10,14 @@
10
10
  :disabled="disabled"
11
11
  @click="onClick"
12
12
  >
13
- <div class="bimdata-radio__background" />
14
- <div class="bimdata-radio__circle"></div>
15
- <div class="bimdata-radio__dot"></div>
16
- <span class="bimdata-radio__text">{{ text }}</span>
13
+ <div class="bimdata-radio__btn">
14
+ <div class="bimdata-radio__background" />
15
+ <div class="bimdata-radio__circle"></div>
16
+ <div class="bimdata-radio__dot"></div>
17
+ </div>
18
+ <div class="bimdata-radio__text">
19
+ <slot>{{ text }}</slot>
20
+ </div>
17
21
  </button>
18
22
  </template>
19
23
 
@@ -14,10 +14,33 @@
14
14
  align-items: center;
15
15
  cursor: pointer;
16
16
 
17
+ &__btn {
18
+ position: relative;
19
+ width: 23px;
20
+ height: 23px;
21
+ }
22
+
17
23
  &__text {
18
24
  font-size: calculateEm(12px);
19
25
  }
20
26
 
27
+ &__background {
28
+ cursor: inherit;
29
+ position: absolute;
30
+ top: 0;
31
+ left: 0;
32
+ margin: 0;
33
+ width: 23px;
34
+ height: 23px;
35
+ border: none;
36
+ border-radius: 50%;
37
+ outline: none;
38
+ opacity: 0;
39
+ transform: scale(1);
40
+ background-color: var(--color-granite);
41
+ transition: all 0.2s cubic-bezier(0, 0, 0.2, 1);
42
+ }
43
+
21
44
  &__circle,
22
45
  &__dot {
23
46
  content: '';
@@ -45,7 +68,25 @@
45
68
  transform: translate(5px, 5px) scale(0);
46
69
  }
47
70
 
71
+ &--checked {
72
+ .bimdata-radio__background {
73
+ background-color: var(--color-primary);
74
+ }
75
+ .bimdata-radio__circle {
76
+ border-color: var(--color-primary);
77
+ }
78
+ .bimdata-radio__dot {
79
+ background-color: var(--color-primary);
80
+ transform: translate(5px, 5px) scale(1);
81
+ }
82
+ }
83
+
48
84
  &--big {
85
+ .bimdata-radio__btn,
86
+ .bimdata-radio__background {
87
+ width: 30px;
88
+ height: 30px;
89
+ }
49
90
  .bimdata-radio__circle {
50
91
  width: 24px;
51
92
  height: 24px;
@@ -58,38 +99,6 @@
58
99
  top: 1px;
59
100
  left: 1px;
60
101
  }
61
- .bimdata-radio__background {
62
- width: 30px;
63
- height: 30px;
64
- }
65
- }
66
-
67
- // custom INPUT : radio button background
68
- &__background {
69
- cursor: inherit;
70
- margin: 0;
71
- width: 23px;
72
- height: 23px;
73
- border: none;
74
- border-radius: 50%;
75
- outline: none;
76
- opacity: 0;
77
- transform: scale(1);
78
- background-color: var(--color-granite);
79
- transition: all 0.2s cubic-bezier(0, 0, 0.2, 1);
80
- }
81
-
82
- &--checked {
83
- .bimdata-radio__background {
84
- background-color: var(--color-primary);
85
- }
86
- .bimdata-radio__circle {
87
- border-color: var(--color-primary);
88
- }
89
- .bimdata-radio__dot {
90
- background-color: var(--color-primary);
91
- transform: translate(5px, 5px) scale(1);
92
- }
93
102
  }
94
103
 
95
104
  &:hover:not(.disabled) {