@everchron/ec-shards 0.7.64 → 0.7.65

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": "0.7.64",
3
+ "version": "0.7.65",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -78,7 +78,7 @@
78
78
  &-sheet{
79
79
  background: #FFFFFF;
80
80
  background-clip: padding-box;
81
- border-radius: 4px;
81
+ border-radius: 6px;
82
82
  outline: 0;
83
83
  box-shadow: 0 0 0 1px rgba(47,51,60,0.03), 0 1px 5px 0 rgba(47,51,60,0.25);
84
84
 
@@ -94,7 +94,7 @@
94
94
  .ecs-modal-default{
95
95
  .ecs-modal-sheet{
96
96
  margin: 30px auto;
97
- width: 780px;
97
+ width: 820px;
98
98
  }
99
99
  }
100
100
 
@@ -38,7 +38,7 @@
38
38
 
39
39
  .ecs-modal-header{
40
40
  background: #FFF;
41
- border-radius: 4px 4px 0 0;
41
+ border-radius: 6px 6px 0 0;
42
42
  box-shadow: 0 1px 0 $gray-3;
43
43
  min-height: 48px;
44
44
 
@@ -46,6 +46,10 @@
46
46
  background: $gray-3;
47
47
  box-shadow: none;
48
48
  padding: 0 4px 0 0;
49
+
50
+ .ecs-modal-header-main{
51
+ padding: 0;
52
+ }
49
53
  }
50
54
 
51
55
  &-scroll{
@@ -13,7 +13,7 @@
13
13
  props: {
14
14
  type: {
15
15
  type: String,
16
- validator: v => ['standard', 'sidebar', 'segment', 'sheet', null].includes(v),
16
+ validator: v => ['standard', 'sidebar', 'segment', 'sheet', 'modal', null].includes(v),
17
17
  default: 'standard'
18
18
  },
19
19
  direction: {
@@ -74,6 +74,11 @@
74
74
  margin-top: -1px;
75
75
  }
76
76
 
77
+ &-modal{
78
+ display: flex;
79
+ position: relative;
80
+ }
81
+
77
82
  &-column{
78
83
  flex-direction: column;
79
84
  }
@@ -10,6 +10,7 @@
10
10
  <ecs-icon v-if="icon" :type="icon" />
11
11
  <ecs-icon v-if="icon && sticker" :type="`sticker-${sticker}`" class="sticker" width="16" height="16" />
12
12
  <slot></slot>
13
+ <span v-if="shortcut" class="shortcut">{{ shortcut }}</span>
13
14
  </button>
14
15
  </template>
15
16
 
@@ -43,6 +44,9 @@
43
44
  disabled: {
44
45
  type: Boolean,
45
46
  default: false
47
+ },
48
+ shortcut: {
49
+ type: String
46
50
  }
47
51
  },
48
52
 
@@ -327,4 +331,33 @@
327
331
  }
328
332
  }
329
333
  }
334
+
335
+ .ecs-tab-bar-modal{
336
+ .ecs-tab-button{
337
+ font-size: 16px;
338
+ line-height: 24px;
339
+ color: $gray-15;
340
+ display: flex;
341
+ align-items: center;
342
+ transition: .2s;
343
+ height: 48px;
344
+ padding: 0 16px;
345
+ border-top-left-radius: 6px;
346
+ border-top-right-radius: 6px;
347
+
348
+ &:hover{
349
+ background: rgba($gray-10, .05);
350
+ }
351
+
352
+ &.show{
353
+ background: #FFF;
354
+ }
355
+
356
+ .shortcut{
357
+ color: $gray-6;
358
+ font-size: 12px;
359
+ margin-left: 8px;
360
+ }
361
+ }
362
+ }
330
363
  </style>
@@ -2,6 +2,7 @@ import EcsTabs from '@components/tabs/tabs';
2
2
  import EcsTab from '@components/tab/tab';
3
3
  import EcsTabBar from '@components/tab-bar/tab-bar';
4
4
  import EcsTabButton from '@components/tab-button/tab-button';
5
+ import EcsModalHeader from '@components/modal-header/modal-header';
5
6
 
6
7
  export default {
7
8
  title: 'Navigation/Tabs',
@@ -104,6 +105,24 @@ export const sheetTabs = () => ({
104
105
  </div>`,
105
106
  });
106
107
 
108
+ export const modalTabs = () => ({
109
+ components: { EcsTabs, EcsTab, EcsTabBar, EcsTabButton, EcsModalHeader },
110
+ template: `<div>
111
+ <ecs-modal-header type="tabs">
112
+ <ecs-tab-bar type="modal">
113
+ <ecs-tab-button show shortcut="⌘N">Settings</ecs-tab-button>
114
+ <ecs-tab-button shortcut="⌘F">Calendar</ecs-tab-button>
115
+ <ecs-tab-button shortcut="⌘E">Versions</ecs-tab-button>
116
+ </ecs-tab-bar>
117
+ </ecs-modal-header><div>
118
+ <ecs-tabs>
119
+ <ecs-tab show>First Tab</ecs-tab>
120
+ <ecs-tab>Second Tab</ecs-tab>
121
+ <ecs-tab>Third Tab</ecs-tab>
122
+ </ecs-tabs>
123
+ </div>`,
124
+ });
125
+
107
126
  export const sidebarTabs = () => ({
108
127
  components: { EcsTabs, EcsTab, EcsTabBar, EcsTabButton },
109
128
  template: `<div>
@@ -153,6 +153,24 @@ Sheet tab bars are used exclusively as a tab bar for controlling table sheets, w
153
153
  </ecs-tab-bar>
154
154
  ```
155
155
 
156
+ ## Modal Tabs
157
+
158
+ Modal tab bars are used exclusively as a tab bar within EcsModalHeader components.
159
+
160
+ <Canvas withSource="none" withToolbar={true}>
161
+ <Story name="Modal Tabs" height="240px">
162
+ {stories.modalTabs()}
163
+ </Story>
164
+ </Canvas>
165
+
166
+ ```js
167
+ <ecs-tab-bar type="modal">
168
+ <ecs-tab-button show>Bundles</ecs-tab-button>
169
+ <ecs-tab-button>Calendar</ecs-tab-button>
170
+ <ecs-tab-button>Versions</ecs-tab-button>
171
+ </ecs-tab-bar>
172
+ ```
173
+
156
174
  ## Guidelines and Best Practices
157
175
 
158
176
  - Stickers (small additional icons to indicate a status of a tab) can be added via the `sticker` attribute. The following stickers are available: `success`, `error`, `warning`, and `warning-critical`. **Do not** use a sticker for anything else but a standard tab bar (either horizontal or vertical), also only tabs that have an icon will display a sticker.