@everchron/ec-shards 1.3.2 → 1.3.5

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.2",
3
+ "version": "1.3.5",
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,5 +1,5 @@
1
1
  <template>
2
- <div class="ecs-tab-content" :class="[flex ? 'ecs-tab-content-flex' : '', fill ? 'ecs-tab-content-fill' : '']">
2
+ <div class="ecs-tab-content" :class="[fill ? 'ecs-tab-content-fill' : '']">
3
3
  <slot></slot>
4
4
  </div>
5
5
  </template>
@@ -7,12 +7,7 @@
7
7
  <script>
8
8
  export default {
9
9
  props: {
10
- /** Sets the tab to full height, which is helpful for tabs that contain flex elements. */
11
- flex: {
12
- type: Boolean,
13
- default: false
14
- },
15
- /** 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%. */
16
11
  fill: {
17
12
  type: Boolean,
18
13
  default: false
@@ -25,16 +20,8 @@
25
20
  @import "../../tokens/build/scss/tokens.scss";
26
21
  @import "../mixins/svg-uri";
27
22
 
28
- .ecs-tab-content-flex{
29
- height: 100%;
30
- min-height: 0;
31
- }
32
-
33
23
  .ecs-tab-content-fill{
34
24
  height: 100%;
35
-
36
- .ecs-tab-pane{
37
- min-height: 100%;
38
- }
25
+ width: 100%;
39
26
  }
40
27
  </style>
@@ -6,7 +6,13 @@ import { Meta } from '@storybook/addon-docs/blocks';
6
6
  Changelog
7
7
  </h1>
8
8
 
9
- ## Version 1.3.1 (27 August 2022)
9
+ ## Version 1.3.3 (27 August 2022)
10
+
11
+ ### Changes
12
+
13
+ - Added flexDirection prop to EcsTabs component.
14
+
15
+ ## Version 1.3.2 (27 August 2022)
10
16
 
11
17
  ### Fixes
12
18