@node-projects/web-component-designer 0.0.167 → 0.0.168

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.
@@ -13,7 +13,7 @@ export class ContextMenu {
13
13
  color: black;
14
14
  }
15
15
 
16
- .context_menu.display {
16
+ .context_menu.context_menu_display {
17
17
  opacity: 1;
18
18
  transform: scale(1);
19
19
  }
@@ -46,18 +46,18 @@ export class ContextMenu {
46
46
  background-color: #bbb;
47
47
  }
48
48
 
49
- .context_menu li .cm_icon_span {
50
- width: 1.5em;
49
+ .context_menu li .context_menu_icon_span {
50
+ width: 28px;
51
51
  display: inline-block;
52
52
  border-right: 1px solid #aaa;
53
- padding: 0px 3px;
54
53
  }
55
54
 
56
- .context_menu li .cm_icon_span {
57
- padding-left: 5px;
55
+ .context_menu li .context_menu_text {
56
+ padding-left: 2px;
57
+ vertical-align: middle;
58
58
  }
59
59
 
60
- .context_menu li .cm_sub_span {
60
+ .context_menu li .context_menu_sub_span {
61
61
  width: 1em;
62
62
  display: inline-block;
63
63
  text-align: center;
@@ -81,23 +81,23 @@ export class ContextMenu {
81
81
  visibility: visible;
82
82
  }
83
83
 
84
- .context_menu li.cm_divider {
84
+ .context_menu li.context_menu_divider {
85
85
  border-bottom: 1px solid #aaa;
86
86
  margin: 5px;
87
87
  padding: 0;
88
88
  cursor: default;
89
89
  }
90
90
 
91
- .context_menu li.cm_divider:hover {
91
+ .context_menu li.context_menu_divider:hover {
92
92
  background-color: inherit;
93
93
  }
94
94
 
95
- .context_menu.cm_border_right>ul ul {
95
+ .context_menu.context_menu_border_right>ul ul {
96
96
  left: unset;
97
97
  right: 100%;
98
98
  }
99
99
 
100
- .context_menu.cm_border_bottom>ul ul {
100
+ .context_menu.context_menu_border_bottom>ul ul {
101
101
  top: unset;
102
102
  bottom: 0;
103
103
  }
@@ -132,7 +132,7 @@ export class ContextMenu {
132
132
  if (this._menuElement == null) {
133
133
  this._menuElement = document.createElement("div");
134
134
  this._menuElement.className = "context_menu";
135
- this._menuElement.id = "cm_" + this.num;
135
+ this._menuElement.id = "context_menu_" + this.num;
136
136
  if (shadowRoot === document)
137
137
  document.body.appendChild(this._menuElement);
138
138
  else
@@ -151,7 +151,7 @@ export class ContextMenu {
151
151
  let li = document.createElement("li");
152
152
  if (item.title !== '-') {
153
153
  let icon_span = document.createElement("span");
154
- icon_span.className = 'cm_icon_span';
154
+ icon_span.className = 'context_menu_icon_span';
155
155
  if ((item.icon ?? '') != '') {
156
156
  icon_span.innerHTML = item.icon;
157
157
  }
@@ -159,10 +159,10 @@ export class ContextMenu {
159
159
  icon_span.innerHTML = this.options?.defaultIcon ?? '';
160
160
  }
161
161
  let text_span = document.createElement("span");
162
- text_span.className = 'cm_text';
162
+ text_span.className = 'context_menu_text';
163
163
  text_span.innerHTML = item.title;
164
164
  let sub_span = document.createElement("span");
165
- sub_span.className = 'cm_sub_span';
165
+ sub_span.className = 'context_menu_sub_span';
166
166
  if (item.children != null) {
167
167
  sub_span.innerHTML = this.options?.subIcon ?? '›';
168
168
  }
@@ -195,7 +195,7 @@ export class ContextMenu {
195
195
  }
196
196
  else {
197
197
  if (!lastWasDivider) {
198
- li.className = "cm_divider";
198
+ li.className = "context_menu_divider";
199
199
  lastWasDivider = true;
200
200
  ul_outer.appendChild(li);
201
201
  }
@@ -227,18 +227,18 @@ export class ContextMenu {
227
227
  }
228
228
  let sizes = ContextUtil.getSizes(menu);
229
229
  if ((windowWidth - clickCoordsX) < sizes.width) {
230
- menu.classList.add("cm_border_right");
230
+ menu.classList.add("context_menu_border_right");
231
231
  }
232
232
  else {
233
- menu.classList.remove("cm_border_right");
233
+ menu.classList.remove("context_menu_border_right");
234
234
  }
235
235
  if ((windowHeight - clickCoordsY) < sizes.height) {
236
- menu.classList.add("cm_border_bottom");
236
+ menu.classList.add("context_menu_border_bottom");
237
237
  }
238
238
  else {
239
- menu.classList.remove("cm_border_bottom");
239
+ menu.classList.remove("context_menu_border_bottom");
240
240
  }
241
- menu.classList.add("display");
241
+ menu.classList.add("context_menu_display");
242
242
  event.preventDefault();
243
243
  window.addEventListener("keyup", this._windowKeyUpBound);
244
244
  window.addEventListener("mousedown", this._windowDownBound);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "A UI designer for Polymer apps",
3
3
  "name": "@node-projects/web-component-designer",
4
- "version": "0.0.167",
4
+ "version": "0.0.168",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "",