@everchron/ec-shards 1.3.3 → 1.3.6

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": "@everchron/ec-shards",
3
- "version": "1.3.3",
3
+ "version": "1.3.6",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="ecs-tab-pane" :class="{ show: show }">
2
+ <div class="ecs-tab-pane" :class="[ show ? 'show' : '', flex ? 'ecs-tab-pane-flex' :'', directionClass ]">
3
3
  <slot></slot>
4
4
  </div>
5
5
  </template>
@@ -11,7 +11,25 @@
11
11
  show: {
12
12
  type: Boolean,
13
13
  default: false
14
+ },
15
+ /** Sets the tab to full height, which is helpful for tabs that contain flex elements. */
16
+ flex: {
17
+ type: Boolean,
18
+ default: false
19
+ },
20
+ /** Determines the flex direction, if the flex prop has been set. */
21
+ flexDirection: {
22
+ type: String,
23
+ validator: v => ['row', 'row-reverse', 'column', 'column-reverse'].includes(v),
24
+ default: "row"
14
25
  }
26
+ },
27
+
28
+ computed: {
29
+ directionClass() {
30
+ if (this.flex)
31
+ return `ecs-tab-pane-flex-${this.flexDirection}`
32
+ },
15
33
  }
16
34
  }
17
35
  </script>
@@ -27,16 +45,9 @@
27
45
  &.show{
28
46
  display: block;
29
47
  }
30
- }
31
-
32
- &-flex{
33
- > .ecs-tab-pane{
34
- display: none;
35
- height: 100%;
36
48
 
37
- &.show{
38
- display: flex;
39
- }
49
+ &.ecs-tab-pane-flex.show{
50
+ display: flex;
40
51
  }
41
52
  }
42
53
  }
@@ -1,10 +1,5 @@
1
1
  <template>
2
- <div class="ecs-tab-content"
3
- :class="[
4
- flex ? 'ecs-tab-content-flex' : '',
5
- fill ? 'ecs-tab-content-fill' : '',
6
- directionClass
7
- ]">
2
+ <div class="ecs-tab-content" :class="[fill ? 'ecs-tab-content-fill' : '']">
8
3
  <slot></slot>
9
4
  </div>
10
5
  </template>
@@ -12,29 +7,11 @@
12
7
  <script>
13
8
  export default {
14
9
  props: {
15
- /** Sets the tab to full height, which is helpful for tabs that contain flex elements. */
16
- flex: {
17
- type: Boolean,
18
- default: false
19
- },
20
- /** Determines the flex direction, if the flex prop has been set. */
21
- flexDirection: {
22
- type: String,
23
- validator: v => ['row', 'row-reverse', 'column', 'column-reverse'].includes(v),
24
- default: "row"
25
- },
26
- /** Sets the height of the tabs area to 100%. Also sets the inner tab height to 100%. */
10
+ /** Sets the height of the tabs area to 100%. */
27
11
  fill: {
28
12
  type: Boolean,
29
13
  default: false
30
14
  }
31
- },
32
-
33
- computed: {
34
- directionClass() {
35
- if (this.flex)
36
- return `ecs-tab-content-flex-${this.flexDirection}`
37
- },
38
15
  }
39
16
  }
40
17
  </script>
@@ -43,32 +20,14 @@
43
20
  @import "../../tokens/build/scss/tokens.scss";
44
21
  @import "../mixins/svg-uri";
45
22
 
46
- .ecs-tab-content-flex{
47
- height: 100%;
48
- min-height: 0;
49
-
50
- &-row{
51
- flex-direction: row;
52
- }
53
-
54
- &-row-reverse{
55
- flex-direction: row-reverse;
56
- }
57
-
58
- &-column{
59
- flex-direction: column;
60
- }
61
-
62
- &-column-reverse{
63
- flex-direction: column-reverse;
64
- }
65
- }
66
-
67
23
  .ecs-tab-content-fill{
68
24
  height: 100%;
25
+ width: 100%;
26
+ min-height: 0;
69
27
 
70
28
  .ecs-tab-pane{
71
- min-height: 100%;
29
+ height: 100%;
30
+ width: 100%;
72
31
  }
73
32
  }
74
33
  </style>