@everchron/ec-shards 0.6.97 → 0.6.101

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.97",
3
+ "version": "0.6.101",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"><polygon fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" points="15 5.137 18.18 11.63 25.292 12.677 20.146 17.728 21.36 24.863 15 21.492 8.64 24.863 9.854 17.728 4.708 12.677 11.819 11.63"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"><polygon vector-effect="non-scaling-stroke" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" points="15 5.137 18.18 11.63 25.292 12.677 20.146 17.728 21.36 24.863 15 21.492 8.64 24.863 9.854 17.728 4.708 12.677 11.819 11.63"/></svg>
@@ -1,16 +1,32 @@
1
1
  <template>
2
- <button class="ecs-toolbar-button"
2
+ <a v-if="href" :href="href" :target="target" class="ecs-toolbar-button"
3
3
  :class="[
4
4
  iconClass,
5
5
  active ? 'active' : '',
6
+ activeHighlight ? 'active-highlight' : '',
6
7
  dropdown ? 'ecs-toolbar-button-dropdown' : '',
7
8
  dropdownClass]"
8
9
  @click="$emit('click', $event)">
9
10
 
10
- <ecs-icon v-if="icon && iconPosition == 'left'" width="26" height="26" :type="icon" />
11
+ <ecs-icon v-if="icon && iconPosition == 'left'" :width="iconSize" :height="iconSize" :color="iconTint" :type="icon" />
11
12
  <slot></slot>
12
13
  <span class="badge" v-if="badge" :style="{ background: badgeColor }"></span>
13
- <ecs-icon v-if="icon && iconPosition == 'right'" width="26" height="26" :type="icon" />
14
+ <ecs-icon v-if="icon && iconPosition == 'right'" :width="iconSize" :height="iconSize" :color="iconTint" :type="icon" />
15
+ </a>
16
+
17
+ <button v-else class="ecs-toolbar-button"
18
+ :class="[
19
+ iconClass,
20
+ active ? 'active' : '',
21
+ activeHighlight ? 'active-highlight' : '',
22
+ dropdown ? 'ecs-toolbar-button-dropdown' : '',
23
+ dropdownClass]"
24
+ @click="$emit('click', $event)">
25
+
26
+ <ecs-icon v-if="icon && iconPosition == 'left'" :width="iconSize" :height="iconSize" :color="iconTint" :type="icon" />
27
+ <slot></slot>
28
+ <span class="badge" v-if="badge" :style="{ background: badgeColor }"></span>
29
+ <ecs-icon v-if="icon && iconPosition == 'right'" :width="iconSize" :height="iconSize" :color="iconTint" :type="icon" />
14
30
  </button>
15
31
  </template>
16
32
 
@@ -23,10 +39,26 @@
23
39
  },
24
40
 
25
41
  props: {
42
+ href: {
43
+ type: String,
44
+ default: null
45
+ },
46
+ target: {
47
+ type: String,
48
+ default: null
49
+ },
26
50
  icon: {
27
51
  type: String,
28
52
  default: null
29
53
  },
54
+ iconSize: {
55
+ type: String,
56
+ default: '26'
57
+ },
58
+ iconColor: {
59
+ type: String,
60
+ default: '#2A2D3D'
61
+ },
30
62
  iconPosition: {
31
63
  type: String,
32
64
  validator: v => ['left', 'right'].includes(v),
@@ -40,6 +72,10 @@
40
72
  type: Boolean,
41
73
  default: false
42
74
  },
75
+ activeHighlight: {
76
+ type: Boolean,
77
+ default: false
78
+ },
43
79
  badge: {
44
80
  type: Boolean,
45
81
  default: false
@@ -62,6 +98,16 @@
62
98
  return `ecs-toolbar-button-icon-only`
63
99
  return this.icon
64
100
  },
101
+
102
+ iconTint() {
103
+ if (this.activeHighlight)
104
+ return '#0961EB'
105
+ else if (!!this.$slots.default)
106
+ return '#858E9E'
107
+ else
108
+ return this.iconColor
109
+ },
110
+
65
111
  dropdownClass() {
66
112
  if (this.dropdown && !!this.$slots.default)
67
113
  return `ecs-toolbar-button-dropdown-text`
@@ -108,6 +154,12 @@
108
154
  z-index: 2;
109
155
  }
110
156
 
157
+ &.active-highlight{
158
+ background: rgba($blue-8, .1);
159
+ z-index: 2;
160
+ border: 1px solid $blue-5;
161
+ }
162
+
111
163
  &-icon-only{
112
164
  width: 32px;
113
165
  height: 32px;
@@ -118,7 +170,6 @@
118
170
  font-size: 14px;
119
171
 
120
172
  .icon{
121
- color: $gray-8;
122
173
  margin-right: 4px;
123
174
  }
124
175
 
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <transition name="dialog-fade">
3
- <div v-if="isShown" class="ecs-modal" :class="[typeClass, clickthroughBackdrop ? 'ecs-modal-click-through' : '']">
3
+ <div v-if="isShown" class="ecs-modal" :class="[typeClass, clickthrough ? 'ecs-modal-click-through' : '']">
4
4
 
5
5
  <div class="ecs-modal-dialog ecs-modal-sheet">
6
6
  <div v-if="$slots.header" class="ecs-modal-header-wrap">
7
7
  <slot name="header"></slot>
8
8
  </div>
9
- <div class="ecs-modal-content-wrap">
9
+ <div class="ecs-modal-content-wrap scrollbar">
10
10
  <slot></slot>
11
11
  </div>
12
12
  <div v-if="$slots.footer" class="ecs-modal-footer-wrap">
@@ -35,7 +35,7 @@
35
35
  validator: v => ['default', 'drawer',].includes(v),
36
36
  default: 'default'
37
37
  },
38
- clickthroughBackdrop: {
38
+ clickthrough: {
39
39
  type: Boolean,
40
40
  default: false
41
41
  },
@@ -7,7 +7,7 @@
7
7
  </div>
8
8
 
9
9
  <div v-else-if="type === 'radiobutton'" class="ecs-popover-list-item control no-hover">
10
- <ecs-radiobutton @input="$emit('input', $event)" :disabled="disabled" :value="value" :value-false="valueFalse" :value-true="valueTrue">
10
+ <ecs-radiobutton @input="$emit('input', $event)" :disabled="disabled" :checked="value">
11
11
  <slot></slot>
12
12
  </ecs-radiobutton>
13
13
  </div>
@@ -32,6 +32,7 @@ export const group = () => ({
32
32
  template: `<ecs-button-toolbar-group>
33
33
  <ecs-button-toolbar icon="marker" active />
34
34
  <ecs-button-toolbar icon="rectangle" />
35
- <ecs-button-toolbar icon="delete" badge />
35
+ <ecs-button-toolbar icon="rectangle" active-highlight />
36
+ <ecs-button-toolbar href="https://google.com" target="_blank" icon="delete" badge />
36
37
  </ecs-button-toolbar-group>`,
37
38
  });
@@ -69,8 +69,9 @@ Toolbar buttons can be grouped by wrapping them with the EcsToolbarButtonGroup c
69
69
  ```js
70
70
  <ecs-button-toolbar-group>
71
71
  <ecs-button-toolbar icon="marker" active />
72
- <ecs-button-toolbar icon="rectangleselect" />
73
- <ecs-button-toolbar icon="delete" />
72
+ <ecs-button-toolbar icon="rectangle" />
73
+ <ecs-button-toolbar icon="rectangle" active-highlight />
74
+ <ecs-button-toolbar icon="delete" badge />
74
75
  </ecs-button-toolbar-group>
75
76
  ```
76
77
 
@@ -82,4 +83,4 @@ Toolbar buttons can be grouped by wrapping them with the EcsToolbarButtonGroup c
82
83
 
83
84
  ### EcsToolbarButtonGroup
84
85
 
85
- <ArgsTable of={EcsButtonToolbarGroup} />
86
+ <ArgsTable of={EcsButtonToolbarGroup} />