@asd20/ui 3.2.1023 → 3.2.1024

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
@@ -5,7 +5,7 @@
5
5
  "*.scss",
6
6
  "*.vue"
7
7
  ],
8
- "version": "3.2.1023",
8
+ "version": "3.2.1024",
9
9
  "private": false,
10
10
  "license": "MIT",
11
11
  "repository": {
@@ -2,8 +2,9 @@
2
2
  <div
3
3
  :class="[
4
4
  'asd20-checkbox',
5
- { 'asd20-checkbox__no-icon': !icon && !checkbox },
6
- { 'asd20-checkbox__checkbox': !icon && checkbox },
5
+ { 'asd20-checkbox__no-icon': !icon && !checkbox && !radio },
6
+ { 'asd20-checkbox__checkbox': !icon && checkbox && !radio },
7
+ { 'asd20-checkbox__radio': !icon && !checkbox && radio },
7
8
  ]"
8
9
  >
9
10
  <input
@@ -38,6 +39,7 @@ export default {
38
39
  count: { type: Number, default: 0 },
39
40
  icon: { type: String, default: '' },
40
41
  checkbox: { type: Boolean, default: false },
42
+ radio: { type: Boolean, default: false },
41
43
  },
42
44
  data() {
43
45
  return {
@@ -161,6 +163,33 @@ export default {
161
163
  opacity: 1;
162
164
  }
163
165
  }
166
+ &.asd20-checkbox__radio {
167
+ label:before {
168
+ display: none;
169
+ }
170
+ label:after {
171
+ content: '';
172
+ display: block;
173
+ width: space(1);
174
+ height: space(1);
175
+ margin-right: space(-0.5);
176
+ flex-shrink: 0;
177
+ border-radius: 50%;
178
+ border: 2px solid var(--color__accent);
179
+ background: #fff;
180
+
181
+ order: 1;
182
+ }
183
+
184
+ input:checked + label:before {
185
+ }
186
+ input:checked + label:after {
187
+ border: 2px solid var(--color__accent);
188
+ box-shadow: inset 3px 3px 0px 0px #fff;
189
+ box-shadow: inset 0px 0px 0px 3px #fff;
190
+ background: var(--color__accent);
191
+ }
192
+ }
164
193
 
165
194
  input:focus + label:after {
166
195
  @include asd20-focus;
@@ -11,6 +11,7 @@
11
11
  :count="option.count"
12
12
  :description="option.description"
13
13
  :value="checkedValues.indexOf(option.value) > -1"
14
+ :radio="radio"
14
15
  @input="onInput($event, option)"
15
16
  />
16
17
  <slot
@@ -34,6 +35,7 @@ export default {
34
35
  props: {
35
36
  checkedValues: { type: Array, default: () => [] },
36
37
  options: { type: Array, default: () => [] },
38
+ radio: { type: Boolean, default: false },
37
39
  },
38
40
  methods: {
39
41
  onInput(checked, option) {