@everchron/ec-shards 0.6.93 → 0.6.97

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.6.93",
3
+ "version": "0.6.97",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
package/src/.DS_Store ADDED
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -97,13 +97,13 @@
97
97
  watch: {
98
98
  valueFalse() {
99
99
  if (!this.checked) {
100
- this.$emit('input', this.valueWhenFalse, this.id)
100
+ this.$emit('input', this.valueWhenFalse)
101
101
  }
102
102
  },
103
103
 
104
104
  valueTrue() {
105
105
  if (this.checked) {
106
- this.$emit('input', this.valueWhenTrue, this.id)
106
+ this.$emit('input', this.valueWhenTrue)
107
107
  }
108
108
  },
109
109
 
@@ -115,7 +115,6 @@
115
115
  methods: {
116
116
  handleClick() {
117
117
  this.checked = !this.checked
118
- console.log('handleClick', this.id)
119
118
  this.$emit('input', this.checked ? this.valueWhenTrue : this.valueWhenFalse, this.id)
120
119
  }
121
120
  }
@@ -13,7 +13,7 @@
13
13
  <slot name="headercontrols"></slot>
14
14
  </div>
15
15
  <ecs-button-toolbar v-if="$slots.sidebar && width <= 1400" @click="sidebarToggle" :icon="sidebarIcon" :title="showSidebar ? 'Hide ' + sidebarTitle : 'Show ' + sidebarTitle" :active="showSidebar" :badge="sidebarIconBadge" class="sidebar-button" />
16
- <ecs-button-toolbar @click="$emit('close')" icon="close">{{ closeText }}</ecs-button-toolbar>
16
+ <ecs-button-toolbar @click="$emit('close')" :disabled="closeDisabled" icon="close">{{ closeText }}</ecs-button-toolbar>
17
17
  </div>
18
18
  <div ref="content" class="ecs-overlay-content scrollbar">
19
19
  <div v-if="$slots.tabs" class="ecs-overlay-tabs scrollbar scrollbar-sml">
@@ -75,6 +75,10 @@
75
75
  type: String,
76
76
  default: 'Close'
77
77
  },
78
+ closeDisabled: {
79
+ type: Boolean,
80
+ default: false
81
+ },
78
82
  fullWidth: {
79
83
  type: Boolean,
80
84
  default: false
@@ -192,6 +192,7 @@
192
192
  text-overflow: ellipsis;
193
193
  overflow: hidden;
194
194
  white-space: nowrap;
195
+ cursor: pointer;
195
196
 
196
197
  &:hover,
197
198
  &.active{
@@ -263,7 +264,7 @@
263
264
  }
264
265
 
265
266
  &.control{
266
- padding: 9px 12px;
267
+ padding: 11px 12px;
267
268
 
268
269
  .ecs-form-check{
269
270
  margin-bottom: 0;
@@ -272,6 +273,10 @@
272
273
  .ecs-form-check-label{
273
274
  display: block;
274
275
  }
276
+
277
+ .ecs-switch-wrapper{
278
+ margin: -7px 0;
279
+ }
275
280
  }
276
281
 
277
282
  &-color{
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <div class="ecs-tab-bar" :class="[
3
3
  typeClass,
4
- directionClass]"
4
+ directionClass
5
+ ]"
5
6
  >
6
7
  <slot></slot>
7
8
  </div>
@@ -45,7 +46,7 @@
45
46
  display: flex;
46
47
 
47
48
  &-standard{
48
- &.tab-bar-row{
49
+ &.ecs-tab-bar-row{
49
50
  border-bottom: 1px solid rgba(174, 177, 185, 0.35);
50
51
  }
51
52
  }
@@ -1,9 +1,14 @@
1
1
  <template>
2
2
  <button class="ecs-tab-button"
3
- :class="[subtab ? `ecs-tab-button-child` : '', show ? `show` : '', badge ? `ecs-tab-button-badge` : '']"
4
- @click="handleClick"
5
- >
3
+ :class="[
4
+ subtab ? `ecs-tab-button-child` : '',
5
+ show ? `show` : '',
6
+ badge ? `ecs-tab-button-badge` : '']"
7
+ :disabled="disabled"
8
+ @click="handleClick">
9
+
6
10
  <ecs-icon v-if="icon" :type="icon" />
11
+ <ecs-icon v-if="icon && sticker" :type="`sticker-${sticker}`" class="sticker" width="16" height="16" />
7
12
  <slot></slot>
8
13
  </button>
9
14
  </template>
@@ -31,6 +36,14 @@
31
36
  badge: {
32
37
  type: Boolean,
33
38
  default: false
39
+ },
40
+ sticker: {
41
+ type: String,
42
+ validator: v => ['success', 'error', 'warning', 'warning-critical', null].includes(v)
43
+ },
44
+ disabled: {
45
+ type: Boolean,
46
+ default: false
34
47
  }
35
48
  },
36
49
 
@@ -53,6 +66,7 @@
53
66
  .ecs-tab-button{
54
67
  transition: .2s;
55
68
  position: relative;
69
+ cursor: pointer;
56
70
 
57
71
  &:after{
58
72
  content: "";
@@ -76,6 +90,10 @@
76
90
  opacity: .5;
77
91
  pointer-events: none;
78
92
  }
93
+
94
+ .sticker{
95
+ position: absolute;
96
+ }
79
97
  }
80
98
 
81
99
  .ecs-tab-bar-standard{
@@ -133,9 +151,14 @@
133
151
  margin-right: 0;
134
152
  }
135
153
 
136
- .icon{
154
+ .icon:not(.sticker){
137
155
  margin: 0 4px 0 -4px;
138
156
  }
157
+
158
+ .sticker{
159
+ left: 15px;
160
+ top: 13px;
161
+ }
139
162
  }
140
163
  }
141
164
 
@@ -155,10 +178,15 @@
155
178
  top: 0;
156
179
  }
157
180
 
158
- .icon{
181
+ .icon:not(.sticker){
159
182
  margin: -5px 5px -5px -5px;
160
183
  }
161
184
 
185
+ .sticker{
186
+ top: 23px;
187
+ left: 25px;
188
+ }
189
+
162
190
  &.ecs-tab-button-child{
163
191
  font-size: 13px;
164
192
  padding-left: 45px;
Binary file
@@ -28,9 +28,9 @@ export const standardRowIcons = () => ({
28
28
  components: { EcsTabs, EcsTab, EcsTabBar, EcsTabButton },
29
29
  template: `<div>
30
30
  <ecs-tab-bar>
31
- <ecs-tab-button show icon="settings">Settings</ecs-tab-button>
32
- <ecs-tab-button icon="calendar" badge>Calendar</ecs-tab-button>
33
- <ecs-tab-button icon="evidence">Versions</ecs-tab-button>
31
+ <ecs-tab-button sticker="success" show icon="settings">Settings</ecs-tab-button>
32
+ <ecs-tab-button sticker="warning" icon="calendar" badge>Calendar</ecs-tab-button>
33
+ <ecs-tab-button sticker="error" icon="evidence">Versions</ecs-tab-button>
34
34
  </ecs-tab-bar>
35
35
  <ecs-tabs>
36
36
  <ecs-tab show>First Tab</ecs-tab>
@@ -155,6 +155,7 @@ Sheet tab bars are used exclusively as a tab bar for controlling table sheets, w
155
155
 
156
156
  ## Guidelines and Best Practices
157
157
 
158
+ - 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.
158
159
  - Icons should be used for any tab bar, but only preferred **not** on the segmented tab bar.
159
160
  - Icons are **required** for the sidebar tab bar.
160
161
  - Tooltips should be used when a tab has no text content.
@@ -177,4 +178,4 @@ Sheet tab bars are used exclusively as a tab bar for controlling table sheets, w
177
178
 
178
179
  ### EcsTabButton
179
180
 
180
- <ArgsTable of={EcsTabButton} />
181
+ <ArgsTable of={EcsTabButton} />