@lancom/shared 0.0.347 → 0.0.348

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.
@@ -23,8 +23,8 @@
23
23
  bottom: -4px;
24
24
  left: -4px;
25
25
  border-radius: 13px;
26
- border: 2px solid $grey_1;
27
- transform: scale(0);
26
+ border: 2px solid $grey_4;
27
+ transform: scale(1);
28
28
  transition: transform .22s ease-in-out;
29
29
  }
30
30
  &-inner {
@@ -39,6 +39,7 @@
39
39
  &.selected {
40
40
  &:before {
41
41
  transform: scale(1);
42
+ border: 2px solid $grey_1;
42
43
  }
43
44
  }
44
45
  &-selected-icon {
@@ -3,6 +3,20 @@
3
3
  class="ProductColorImage"
4
4
  :class="{ zoomedIn }"
5
5
  :style="style">
6
+ <div
7
+ v-if="hasAdditionalColors"
8
+ :style="{
9
+ 'top': additionalColorHeight,
10
+ width: '100%',
11
+ height: '100%',
12
+ position: 'relative'
13
+ }">
14
+ <div
15
+ v-for="(additionalColorsThumb, index) of additionalColorsThumbs"
16
+ :key="index"
17
+ :style="additionalColorsThumb">
18
+ </div>
19
+ </div>
6
20
  </div>
7
21
  </template>
8
22
 
@@ -32,6 +46,23 @@ export default {
32
46
  },
33
47
  style() {
34
48
  return getColorBackgroundStyle(this.color);
49
+ },
50
+ hasAdditionalColors() {
51
+ return this.additionalColors.length > 0;
52
+ },
53
+ additionalColors() {
54
+ return (this.color.additionalColors || []);
55
+ },
56
+ additionalColorHeight() {
57
+ return `${100 / (this.additionalColors.length + 1)}%`;
58
+ },
59
+ additionalColorsThumbs() {
60
+ return (this.color.additionalColors || [])
61
+ .map(c => ({
62
+ ...getColorBackgroundStyle(c.color || c),
63
+ height: this.additionalColorHeight,
64
+ width: '100%'
65
+ }))
35
66
  }
36
67
  }
37
68
  };
@@ -38,11 +38,13 @@
38
38
  width: 36px;
39
39
  height: 36px;
40
40
  border-radius: 13px;
41
+ overflow: hidden;
41
42
  flex-shrink: 0;
42
43
  &-image {
43
44
  width: 100%;
44
45
  height: 100%;
45
46
  border-radius: 11px;
47
+ overflow: hidden;
46
48
  }
47
49
  &--selected {
48
50
  border: 2px solid $grey_1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.347",
3
+ "version": "0.0.348",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {