x4js 1.4.8 → 1.4.9

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.
Files changed (173) hide show
  1. package/build.sh +5 -0
  2. package/lib/application.d.ts +15 -11
  3. package/lib/application.js +15 -11
  4. package/lib/base64.d.ts +15 -11
  5. package/lib/base64.js +15 -11
  6. package/lib/base_component.d.ts +18 -1
  7. package/lib/base_component.js +18 -1
  8. package/lib/button.d.ts +15 -11
  9. package/lib/button.js +15 -11
  10. package/lib/calendar.d.ts +15 -11
  11. package/lib/calendar.js +15 -11
  12. package/lib/canvas.d.ts +15 -11
  13. package/lib/canvas.js +15 -11
  14. package/lib/cardview.d.ts +15 -11
  15. package/lib/cardview.js +15 -11
  16. package/lib/checkbox.d.ts +17 -12
  17. package/lib/checkbox.js +18 -11
  18. package/lib/color.d.ts +15 -11
  19. package/lib/color.js +15 -11
  20. package/lib/colorpicker.d.ts +18 -11
  21. package/lib/colorpicker.js +18 -11
  22. package/lib/combobox.d.ts +15 -11
  23. package/lib/combobox.js +16 -12
  24. package/lib/component.d.ts +18 -14
  25. package/lib/component.js +18 -14
  26. package/lib/datastore.d.ts +15 -11
  27. package/lib/datastore.js +15 -11
  28. package/lib/dialog.d.ts +15 -11
  29. package/lib/dialog.js +19 -14
  30. package/lib/dom_events.d.ts +17 -1
  31. package/lib/dom_events.js +17 -1
  32. package/lib/drag_manager.d.ts +28 -0
  33. package/lib/drawtext.d.ts +15 -11
  34. package/lib/drawtext.js +15 -11
  35. package/lib/fileupload.d.ts +15 -11
  36. package/lib/fileupload.js +15 -11
  37. package/lib/form.d.ts +15 -11
  38. package/lib/form.js +15 -11
  39. package/lib/formatters.d.ts +15 -11
  40. package/lib/formatters.js +15 -11
  41. package/lib/gridview.d.ts +15 -11
  42. package/lib/gridview.js +59 -29
  43. package/lib/i18n.d.ts +15 -11
  44. package/lib/i18n.js +15 -11
  45. package/lib/icon.d.ts +20 -12
  46. package/lib/icon.js +107 -25
  47. package/lib/image.d.ts +15 -11
  48. package/lib/image.js +15 -11
  49. package/lib/index.d.ts +28 -0
  50. package/lib/index.js +28 -0
  51. package/lib/input.d.ts +15 -11
  52. package/lib/input.js +15 -11
  53. package/lib/label.d.ts +15 -11
  54. package/lib/label.js +15 -11
  55. package/lib/layout.d.ts +21 -17
  56. package/lib/layout.js +21 -17
  57. package/lib/link.d.ts +15 -11
  58. package/lib/link.js +15 -11
  59. package/lib/listview.d.ts +15 -11
  60. package/lib/listview.js +15 -11
  61. package/lib/md5.d.ts +15 -10
  62. package/lib/md5.js +15 -10
  63. package/lib/menu.d.ts +15 -11
  64. package/lib/menu.js +19 -12
  65. package/lib/messagebox.d.ts +15 -11
  66. package/lib/messagebox.js +17 -13
  67. package/lib/panel.d.ts +15 -11
  68. package/lib/panel.js +15 -11
  69. package/lib/popup.d.ts +15 -11
  70. package/lib/popup.js +15 -11
  71. package/lib/property_editor.d.ts +15 -11
  72. package/lib/property_editor.js +15 -11
  73. package/lib/radiobtn.d.ts +15 -11
  74. package/lib/radiobtn.js +15 -11
  75. package/lib/rating.d.ts +15 -11
  76. package/lib/rating.js +15 -11
  77. package/lib/request.d.ts +15 -11
  78. package/lib/request.js +15 -11
  79. package/lib/router.d.ts +28 -0
  80. package/lib/router.js +28 -0
  81. package/lib/settings.d.ts +15 -11
  82. package/lib/settings.js +15 -11
  83. package/lib/sidebarview.d.ts +15 -11
  84. package/lib/sidebarview.js +15 -11
  85. package/lib/smartedit.d.ts +15 -11
  86. package/lib/smartedit.js +15 -11
  87. package/lib/spreadsheet.d.ts +15 -11
  88. package/lib/spreadsheet.js +15 -11
  89. package/lib/styles.d.ts +16 -12
  90. package/lib/styles.js +21 -14
  91. package/lib/svgcomponent.d.ts +15 -11
  92. package/lib/svgcomponent.js +15 -11
  93. package/lib/tabbar.d.ts +17 -2
  94. package/lib/tabbar.js +17 -2
  95. package/lib/tabview.d.ts +15 -11
  96. package/lib/tabview.js +15 -11
  97. package/lib/textarea.d.ts +15 -11
  98. package/lib/textarea.js +15 -11
  99. package/lib/textedit.d.ts +15 -11
  100. package/lib/textedit.js +15 -11
  101. package/lib/texthiliter.d.ts +15 -11
  102. package/lib/texthiliter.js +15 -11
  103. package/lib/toaster.d.ts +15 -11
  104. package/lib/toaster.js +15 -11
  105. package/lib/tools.d.ts +15 -11
  106. package/lib/tools.js +15 -11
  107. package/lib/tooltips.d.ts +15 -11
  108. package/lib/tooltips.js +15 -11
  109. package/lib/treeview.d.ts +15 -11
  110. package/lib/treeview.js +15 -11
  111. package/lib/x4.css +1572 -0
  112. package/lib/x4_events.d.ts +15 -11
  113. package/lib/x4_events.js +15 -11
  114. package/package.json +5 -1
  115. package/src/MIT-license.md +14 -0
  116. package/src/application.ts +15 -11
  117. package/src/base64.ts +15 -11
  118. package/src/base_component.ts +18 -1
  119. package/src/button.ts +15 -11
  120. package/src/calendar.ts +15 -11
  121. package/src/canvas.ts +15 -11
  122. package/src/cardview.ts +15 -11
  123. package/src/checkbox.ts +21 -12
  124. package/src/color.ts +15 -11
  125. package/src/colorpicker.ts +19 -11
  126. package/src/combobox.ts +16 -12
  127. package/src/component.ts +18 -14
  128. package/src/datastore.ts +15 -11
  129. package/src/dialog.ts +19 -14
  130. package/src/dom_events.ts +17 -1
  131. package/src/drag_manager.ts +28 -0
  132. package/src/drawtext.ts +15 -11
  133. package/src/fileupload.ts +15 -11
  134. package/src/form.ts +15 -11
  135. package/src/formatters.ts +15 -11
  136. package/src/gridview.ts +76 -30
  137. package/src/i18n.ts +15 -11
  138. package/src/icon.ts +125 -33
  139. package/src/image.ts +15 -11
  140. package/src/index.ts +29 -0
  141. package/src/input.ts +15 -11
  142. package/src/label.ts +15 -11
  143. package/src/layout.ts +21 -17
  144. package/src/link.ts +15 -11
  145. package/src/listview.ts +15 -11
  146. package/src/md5.ts +15 -10
  147. package/src/menu.ts +19 -12
  148. package/src/messagebox.ts +17 -13
  149. package/src/panel.ts +15 -11
  150. package/src/popup.ts +15 -11
  151. package/src/property_editor.ts +15 -11
  152. package/src/radiobtn.ts +15 -11
  153. package/src/rating.ts +15 -11
  154. package/src/request.ts +15 -11
  155. package/src/router.ts +28 -0
  156. package/src/settings.ts +15 -11
  157. package/src/sidebarview.ts +15 -11
  158. package/src/smartedit.ts +15 -11
  159. package/src/spreadsheet.ts +15 -11
  160. package/src/styles.ts +23 -14
  161. package/src/svgcomponent.ts +15 -11
  162. package/src/tabbar.ts +17 -2
  163. package/src/tabview.ts +15 -11
  164. package/src/textarea.ts +15 -11
  165. package/src/textedit.ts +15 -11
  166. package/src/texthiliter.ts +15 -11
  167. package/src/toaster.ts +15 -11
  168. package/src/tools.ts +15 -11
  169. package/src/tooltips.ts +15 -11
  170. package/src/treeview.ts +15 -11
  171. package/src/x4.less +115 -87
  172. package/src/x4_events.ts +15 -11
  173. package/x4.css +111 -80
package/src/x4.less CHANGED
@@ -1,8 +1,37 @@
1
1
  // out: ../x4.css
2
2
 
3
+ /**
4
+ * ___ ___ __
5
+ * \ \_/ / / _
6
+ * \ / /_| |_
7
+ * / _ \____ _|
8
+ * /__/ \__\ |_|
9
+ *
10
+ * @file x4.less
11
+ * @author Etienne Cochard
12
+ *
13
+ * Copyright (c) 2019-2022 R-libre ingenierie
14
+ *
15
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ * of this software and associated documentation files (the "Software"), to deal
17
+ * in the Software without restriction, including without limitation the rights
18
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
19
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
20
+ * subject to the following conditions:
21
+ * The above copyright notice and this permission notice shall be included in all copies
22
+ * or substantial portions of the Software.
23
+ *
24
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
25
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
26
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
27
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
29
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30
+ **/
31
+
3
32
  :root {
4
- --x4-font: "sans serif";
5
- --x4-font-size: "13px";
33
+ --x4-font: "Inter";
34
+ --x4-font-size: 13px;
6
35
 
7
36
  --x4-base-color: #266888;
8
37
 
@@ -15,24 +44,31 @@
15
44
  --x4-form-color: white;
16
45
  --x4-tip-background: rgba(0,0,0,0.5);
17
46
 
18
- --x4-button-color: rgb(54,54,54);
19
- --x4-button-border-color: rgb(0,0,0);
20
-
47
+ --x4-button-color: white;
48
+ --x4-button-text-color: rgb(54,54,54);
49
+
21
50
  --x4-scrollbar-width: 6px;
22
51
  --x4-scrollbar-background: white;
23
52
  --x4-scrollbar-thumb: grey;
24
53
 
25
54
  --x4-sizer-size: 4px;
26
-
27
- --x4-panel-border-color: rgba(0,0,0,0.1);
55
+ --x4-default-border-color: rgba(0,0,0,0.1);
28
56
 
29
57
  // todo: svg
30
- --x4-icon-font-family: var( "fonteawesome" );
31
- --x4-icon-circle-exclamation: "\f06a";
32
- --x4-icon-chevron-right: "\f054";
33
- --x4-icon-window-restore: "\f2d2";
34
- --x4-icon-arrow-down-long: "\f175";
35
- --x4-icon-arrow-up-long: "\f176";;
58
+ --x4-icon-font-family: "fonteawesome";
59
+
60
+ --x4-icon-circle-exclamation: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM232 152C232 138.8 242.8 128 256 128s24 10.75 24 24v128c0 13.25-10.75 24-24 24S232 293.3 232 280V152zM256 400c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 385.9 273.4 400 256 400z"/></svg>';
61
+ --x4-icon-chevron-right: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"/></svg>';
62
+ --x4-icon-window-restore: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path d="M432 64H208C199.2 64 192 71.16 192 80V96H128V80C128 35.82 163.8 0 208 0H432C476.2 0 512 35.82 512 80V304C512 348.2 476.2 384 432 384H416V320H432C440.8 320 448 312.8 448 304V80C448 71.16 440.8 64 432 64zM0 192C0 156.7 28.65 128 64 128H320C355.3 128 384 156.7 384 192V448C384 483.3 355.3 512 320 512H64C28.65 512 0 483.3 0 448V192zM96 256H288C305.7 256 320 241.7 320 224C320 206.3 305.7 192 288 192H96C78.33 192 64 206.3 64 224C64 241.7 78.33 256 96 256z"/></svg>';
63
+ --x4-icon-arrow-down: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" fill="currentColor"><path d="M9.375 329.4c12.51-12.51 32.76-12.49 45.25 0L128 402.8V32c0-17.69 14.31-32 32-32s32 14.31 32 32v370.8l73.38-73.38c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-128 128c-12.5 12.5-32.75 12.5-45.25 0l-128-128C-3.125 362.1-3.125 341.9 9.375 329.4z"/></svg>';
64
+ --x4-icon-arrow-up: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" fill="currentColor"><path d="M310.6 182.6c-12.51 12.51-32.76 12.49-45.25 0L192 109.3V480c0 17.69-14.31 32-32 32s-32-14.31-32-32V109.3L54.63 182.6c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25l128-128c12.5-12.5 32.75-12.5 45.25 0l128 128C323.1 149.9 323.1 170.1 310.6 182.6z"/></svg>';
65
+ --x4-icon-exclamation: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512" fill="currentColor"><path d="M64 352c17.69 0 32-14.32 32-31.1V64.01c0-17.67-14.31-32.01-32-32.01S32 46.34 32 64.01v255.1C32 337.7 46.31 352 64 352zM64 400c-22.09 0-40 17.91-40 40s17.91 39.1 40 39.1s40-17.9 40-39.1S86.09 400 64 400z"/></svg>';
66
+ --x4-icon-window-minimize: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path d="M0 448C0 430.3 14.33 416 32 416H480C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H32C14.33 480 0 465.7 0 448z"/></svg>';
67
+ --x4-icon-window-maximize: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path d="M448 32C483.3 32 512 60.65 512 96V416C512 451.3 483.3 480 448 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H448zM96 96C78.33 96 64 110.3 64 128C64 145.7 78.33 160 96 160H416C433.7 160 448 145.7 448 128C448 110.3 433.7 96 416 96H96z"/></svg>';
68
+ --x4-icon-window-restore: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path d="M432 64H208C199.2 64 192 71.16 192 80V96H128V80C128 35.82 163.8 0 208 0H432C476.2 0 512 35.82 512 80V304C512 348.2 476.2 384 432 384H416V320H432C440.8 320 448 312.8 448 304V80C448 71.16 440.8 64 432 64zM0 192C0 156.7 28.65 128 64 128H320C355.3 128 384 156.7 384 192V448C384 483.3 355.3 512 320 512H64C28.65 512 0 483.3 0 448V192zM96 256H288C305.7 256 320 241.7 320 224C320 206.3 305.7 192 288 192H96C78.33 192 64 206.3 64 224C64 241.7 78.33 256 96 256z"/></svg>';
69
+ --x4-icon-rectangle-times: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path d="M448 32C483.3 32 512 60.65 512 96V416C512 451.3 483.3 480 448 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H448zM175 208.1L222.1 255.1L175 303C165.7 312.4 165.7 327.6 175 336.1C184.4 346.3 199.6 346.3 208.1 336.1L255.1 289.9L303 336.1C312.4 346.3 327.6 346.3 336.1 336.1C346.3 327.6 346.3 312.4 336.1 303L289.9 255.1L336.1 208.1C346.3 199.6 346.3 184.4 336.1 175C327.6 165.7 312.4 165.7 303 175L255.1 222.1L208.1 175C199.6 165.7 184.4 165.7 175 175C165.7 184.4 165.7 199.6 175 208.1V208.1z"/></svg>';
70
+ --x4-icon-xmark: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" fill="currentColor"><path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>';
71
+ --x4-icon-angle-down: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" fill="currentColor"><path d="M192 384c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L192 306.8l137.4-137.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-160 160C208.4 380.9 200.2 384 192 384z"/></svg>';
36
72
  }
37
73
 
38
74
  @BLACK10: rgba(0,0,0,0.1);
@@ -225,7 +261,7 @@ textarea {
225
261
  text-align: center;
226
262
  flex-direction: column;
227
263
 
228
- &.x-svg-icon {
264
+ &.x-svg-icon, svg {
229
265
  width: 1em;
230
266
  height: 1em;
231
267
  }
@@ -238,28 +274,23 @@ textarea {
238
274
  outline: none;
239
275
  cursor: pointer;
240
276
 
241
- height: 2.5em;
277
+ height: 2rem;
242
278
  padding: 8px;
243
- border: 1px solid var( --x4-button-border-color );
244
279
  overflow: hidden;
245
280
 
281
+ border: 1px solid var( --x4-default-border-color );
246
282
  background-color: var( --x4-button-color );
247
- color: @WHITE60;
283
+ color: var( --x4-button-text-color );
248
284
 
249
285
  .x-icon {
250
286
  margin: 0 4px;
251
287
  color: inherit;
252
288
  }
253
289
 
254
- &:not(.x-disable) {
255
- &:focus {
256
- border-color: white;
257
- }
258
-
259
- &.x-active {
260
- color: white;
261
- background-color: @WHITE20;
262
- }
290
+ &:focus {
291
+ border-color: var( --x4-focus-color );
292
+ background-color: var( --x4-focus-color );
293
+ color: white;
263
294
  }
264
295
 
265
296
  &.x-disable {
@@ -420,20 +451,22 @@ textarea {
420
451
  background-color: var( --x4-selection-color );
421
452
  color: #fff;
422
453
  }
423
- }
424
454
 
425
- &:focus {
426
- outline: none;
455
+ &:focus {
456
+ border-bottom-color: var( --x4-focus-color );
457
+ }
458
+ }
427
459
 
460
+ &:focus-within {
428
461
  &> .x-label {
429
462
  color: var( --x4-focus-color );
430
463
  }
431
464
  }
432
465
 
433
466
  .x-button.gadget {
434
-
467
+ background-color: transparent;
435
468
  font-size: var( --x4-font-size );
436
- background-color: @BLACK10;
469
+ color: black;
437
470
  border: none;
438
471
 
439
472
  margin: 0;
@@ -441,9 +474,8 @@ textarea {
441
474
  height: 2em;
442
475
  margin-top: 1px;
443
476
 
444
- .x-icon {
445
- font-size: 85%;
446
- padding-right: 2px;
477
+ &:focus {
478
+ color: var( --x4-focus-color );
447
479
  }
448
480
  }
449
481
 
@@ -477,15 +509,6 @@ textarea {
477
509
  position: absolute;
478
510
  top: -2px;
479
511
  z-index: 1;
480
-
481
- &:before {
482
- font-family: var( --x4-icon-font-family );
483
- content: var( --x4-icon-circle-exclamation );
484
- padding-right: 3px;
485
- position: absolute;
486
- left: 1px;
487
- top: 6px;
488
- }
489
512
  }
490
513
 
491
514
  &.x-required .label1:before {
@@ -727,15 +750,6 @@ textarea {
727
750
  }
728
751
  }
729
752
 
730
-
731
- .x-popup-menu-item {
732
- &:after {
733
- content: var( --x4-icon-chevron-right );
734
- font-family: var( --x4-icon-font-family );
735
- font-size: 80%;
736
- }
737
- }
738
-
739
753
  .x-menu-separator {
740
754
  margin-top: 4px;
741
755
  border-top: 1px solid @BLACK10;
@@ -792,11 +806,7 @@ textarea {
792
806
 
793
807
  .x-list-view {
794
808
 
795
- border: 1px solid transparent;
796
-
797
- &:focus {
798
- outline: none;
799
- }
809
+ border: 1px solid var( --x4-default-border-color );
800
810
 
801
811
  .x-list-item {
802
812
  padding: 4px;
@@ -818,6 +828,11 @@ textarea {
818
828
  }
819
829
  }
820
830
 
831
+ &:focus {
832
+ outline: none;
833
+ border-color: var( --x4-focus-color );
834
+ }
835
+
821
836
  .gadgets {
822
837
  border-top: 1px solid @BLACK50;
823
838
  background-color: @BLACK10;
@@ -852,6 +867,9 @@ textarea {
852
867
  position: absolute;
853
868
  z-index: 1000;
854
869
 
870
+ font-family: var( --x4-font );
871
+ font-size: var( --x4-font-size );
872
+
855
873
  &:focus {
856
874
  outline: none;
857
875
  }
@@ -877,7 +895,7 @@ textarea {
877
895
  }
878
896
  }
879
897
 
880
- border-bottom: 1px solid var( --x4-panel-border-color );
898
+ border-bottom: 1px solid var( --x4-default-border-color );
881
899
  }
882
900
 
883
901
  &>.body {
@@ -887,19 +905,23 @@ textarea {
887
905
  }
888
906
 
889
907
  .x-dialog {
890
-
891
908
  border: 0.5px solid @BLACK20;
909
+
892
910
  .z-float-8;
893
911
 
894
912
  & > .title {
895
- height: 3rem;
913
+ height: 2rem;
896
914
  color: white;
897
915
  padding: 0 8px;
898
916
  display: flex;
899
917
  align-items: center;
918
+ background-color: var( --x4-selection-color );
900
919
 
901
920
  .x-icon {
902
- width: 1.7em;
921
+ width: 2em;
922
+ height: 1.9em;
923
+ padding: 4px;
924
+
903
925
  text-align: center;
904
926
  cursor: pointer;
905
927
 
@@ -908,15 +930,29 @@ textarea {
908
930
  }
909
931
  }
910
932
 
933
+ .x-icon.close-btn:hover {
934
+ background-color: var( --x4-error-color );
935
+ color: white;
936
+ }
937
+
911
938
  .x-label {
912
939
  border-bottom: none;
913
940
  padding: 0;
914
941
  }
942
+
943
+ .res-btn {
944
+ display: none;
945
+ }
915
946
  }
916
947
 
917
948
  &.maximized > .title {
918
- .max-btn:before {
919
- content: var( --x4-icon-window-restore );
949
+ .min-btn,
950
+ .max-btn {
951
+ display: none;
952
+ }
953
+
954
+ .res-btn {
955
+ display: block;
920
956
  }
921
957
  }
922
958
 
@@ -1028,6 +1064,7 @@ textarea {
1028
1064
 
1029
1065
  .x-form {
1030
1066
  background-color: var( --x4-form-color );
1067
+ margin-block-end: 0;
1031
1068
  padding: 8px;
1032
1069
  min-width: 250px;
1033
1070
  min-height: 50px;
@@ -1057,22 +1094,6 @@ textarea {
1057
1094
  }
1058
1095
  }
1059
1096
 
1060
- .x-button {
1061
- background-color: @WHITE25;
1062
- border-color: transparent;
1063
- font-family: var( --x4-font );
1064
- font-size: var( --x4-font-size );
1065
-
1066
- .x-icon {
1067
- width: 1.5em;
1068
- }
1069
-
1070
- &:focus {
1071
- border-color: @WHITE40;
1072
- color: black;
1073
- }
1074
- }
1075
-
1076
1097
  .x-hidden {
1077
1098
  display: none ! important;
1078
1099
  }
@@ -1200,20 +1221,27 @@ textarea {
1200
1221
  //text-transform: capitalize;
1201
1222
  height: unset;
1202
1223
 
1203
- &.sort:before {
1204
- content: var( --x4-icon-arrow-down-long );
1205
- font-family: var( --x4-icon-font-family );
1206
- padding-right: 4px;
1224
+ &.sort {
1225
+ background-image: var( --x4-icon-arrow-down-long );
1226
+ background-repeat: no-repeat;
1227
+ background-size: 1rem 1rem;
1228
+ background-position: right 0 top 6px;
1229
+ padding-right: calc( 1rem + 4px );
1207
1230
  }
1208
1231
 
1209
- &.sort.desc:before {
1210
- content: var( --x4-icon-arrow-up-long );
1211
- font-family: var( --x4-icon-font-family );
1212
- padding-right: 4px;
1232
+ &.sort.desc {
1233
+ background-image: var( --x4-icon-arrow-up-long );
1213
1234
  }
1214
1235
  }
1215
1236
  }
1216
1237
 
1238
+ .x-header {
1239
+ .x-cell {
1240
+ display: flex;
1241
+ align-items: center;
1242
+ }
1243
+ }
1244
+
1217
1245
  .x-row {
1218
1246
  position: absolute;
1219
1247
  width: 100%;
package/src/x4_events.ts CHANGED
@@ -7,20 +7,24 @@
7
7
  *
8
8
  * @file observable.ts
9
9
  * @author Etienne Cochard
10
- * @license
11
- * Copyright (c) 2019-2021 R-libre ingenierie
12
10
  *
13
- * This program is free software; you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation; either version 3 of the License, or
16
- * (at your option) any later version.
11
+ * Copyright (c) 2019-2022 R-libre ingenierie
17
12
  *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
13
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ * of this software and associated documentation files (the "Software"), to deal
15
+ * in the Software without restriction, including without limitation the rights
16
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
17
+ * of the Software, and to permit persons to whom the Software is furnished to do so,
18
+ * subject to the following conditions:
19
+ * The above copyright notice and this permission notice shall be included in all copies
20
+ * or substantial portions of the Software.
22
21
  *
23
- * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
23
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
24
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
28
  **/
25
29
 
26
30
  // default stopPropagation implementation for Events