x4js 1.4.7 → 1.4.10

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 (175) hide show
  1. package/README.md +4 -0
  2. package/build.sh +5 -0
  3. package/lib/application.d.ts +15 -11
  4. package/lib/application.js +15 -11
  5. package/lib/base64.d.ts +15 -11
  6. package/lib/base64.js +15 -11
  7. package/lib/base_component.d.ts +18 -1
  8. package/lib/base_component.js +18 -1
  9. package/lib/button.d.ts +15 -11
  10. package/lib/button.js +15 -11
  11. package/lib/calendar.d.ts +15 -11
  12. package/lib/calendar.js +29 -22
  13. package/lib/canvas.d.ts +15 -11
  14. package/lib/canvas.js +15 -11
  15. package/lib/cardview.d.ts +15 -11
  16. package/lib/cardview.js +15 -11
  17. package/lib/checkbox.d.ts +17 -12
  18. package/lib/checkbox.js +18 -11
  19. package/lib/color.d.ts +15 -11
  20. package/lib/color.js +15 -11
  21. package/lib/colorpicker.d.ts +18 -11
  22. package/lib/colorpicker.js +18 -11
  23. package/lib/combobox.d.ts +15 -11
  24. package/lib/combobox.js +16 -12
  25. package/lib/component.d.ts +19 -15
  26. package/lib/component.js +19 -15
  27. package/lib/datastore.d.ts +15 -11
  28. package/lib/datastore.js +16 -12
  29. package/lib/dialog.d.ts +15 -11
  30. package/lib/dialog.js +19 -14
  31. package/lib/dom_events.d.ts +17 -1
  32. package/lib/dom_events.js +17 -1
  33. package/lib/drag_manager.d.ts +28 -0
  34. package/lib/drawtext.d.ts +15 -11
  35. package/lib/drawtext.js +15 -11
  36. package/lib/fileupload.d.ts +15 -11
  37. package/lib/fileupload.js +15 -11
  38. package/lib/form.d.ts +15 -11
  39. package/lib/form.js +15 -11
  40. package/lib/formatters.d.ts +15 -11
  41. package/lib/formatters.js +15 -11
  42. package/lib/gridview.d.ts +15 -11
  43. package/lib/gridview.js +59 -29
  44. package/lib/i18n.d.ts +15 -11
  45. package/lib/i18n.js +15 -11
  46. package/lib/icon.d.ts +20 -12
  47. package/lib/icon.js +107 -25
  48. package/lib/image.d.ts +15 -11
  49. package/lib/image.js +15 -11
  50. package/lib/index.d.ts +28 -0
  51. package/lib/index.js +28 -0
  52. package/lib/input.d.ts +15 -11
  53. package/lib/input.js +15 -11
  54. package/lib/label.d.ts +15 -11
  55. package/lib/label.js +15 -11
  56. package/lib/layout.d.ts +21 -17
  57. package/lib/layout.js +21 -17
  58. package/lib/link.d.ts +15 -11
  59. package/lib/link.js +15 -11
  60. package/lib/listview.d.ts +15 -11
  61. package/lib/listview.js +15 -11
  62. package/lib/md5.d.ts +16 -11
  63. package/lib/md5.js +16 -10
  64. package/lib/menu.d.ts +15 -11
  65. package/lib/menu.js +19 -12
  66. package/lib/messagebox.d.ts +15 -11
  67. package/lib/messagebox.js +17 -13
  68. package/lib/panel.d.ts +15 -11
  69. package/lib/panel.js +15 -11
  70. package/lib/popup.d.ts +15 -11
  71. package/lib/popup.js +20 -18
  72. package/lib/property_editor.d.ts +15 -11
  73. package/lib/property_editor.js +15 -11
  74. package/lib/radiobtn.d.ts +15 -11
  75. package/lib/radiobtn.js +15 -11
  76. package/lib/rating.d.ts +15 -11
  77. package/lib/rating.js +15 -11
  78. package/lib/request.d.ts +15 -11
  79. package/lib/request.js +16 -12
  80. package/lib/router.d.ts +28 -0
  81. package/lib/router.js +28 -0
  82. package/lib/settings.d.ts +15 -11
  83. package/lib/settings.js +15 -11
  84. package/lib/sidebarview.d.ts +15 -11
  85. package/lib/sidebarview.js +15 -11
  86. package/lib/smartedit.d.ts +15 -11
  87. package/lib/smartedit.js +15 -11
  88. package/lib/spreadsheet.d.ts +15 -11
  89. package/lib/spreadsheet.js +15 -11
  90. package/lib/styles.d.ts +16 -12
  91. package/lib/styles.js +21 -14
  92. package/lib/svgcomponent.d.ts +15 -11
  93. package/lib/svgcomponent.js +15 -11
  94. package/lib/tabbar.d.ts +17 -2
  95. package/lib/tabbar.js +17 -2
  96. package/lib/tabview.d.ts +15 -11
  97. package/lib/tabview.js +15 -11
  98. package/lib/textarea.d.ts +15 -11
  99. package/lib/textarea.js +15 -11
  100. package/lib/textedit.d.ts +15 -11
  101. package/lib/textedit.js +16 -12
  102. package/lib/texthiliter.d.ts +15 -11
  103. package/lib/texthiliter.js +15 -11
  104. package/lib/toaster.d.ts +15 -11
  105. package/lib/toaster.js +15 -11
  106. package/lib/tools.d.ts +15 -11
  107. package/lib/tools.js +15 -11
  108. package/lib/tooltips.d.ts +15 -11
  109. package/lib/tooltips.js +15 -11
  110. package/lib/treeview.d.ts +15 -11
  111. package/lib/treeview.js +15 -11
  112. package/{x4.css → lib/x4.css} +236 -97
  113. package/lib/x4_events.d.ts +17 -12
  114. package/lib/x4_events.js +24 -14
  115. package/package.json +5 -1
  116. package/src/MIT-license.md +14 -0
  117. package/src/application.ts +15 -11
  118. package/src/base64.ts +15 -11
  119. package/src/base_component.ts +18 -1
  120. package/src/button.ts +15 -11
  121. package/src/calendar.ts +30 -22
  122. package/src/canvas.ts +22 -18
  123. package/src/cardview.ts +15 -11
  124. package/src/checkbox.ts +21 -12
  125. package/src/color.ts +15 -11
  126. package/src/colorpicker.ts +19 -11
  127. package/src/combobox.ts +16 -12
  128. package/src/component.ts +21 -16
  129. package/src/datastore.ts +16 -12
  130. package/src/dialog.ts +19 -14
  131. package/src/dom_events.ts +17 -1
  132. package/src/drag_manager.ts +28 -0
  133. package/src/drawtext.ts +15 -11
  134. package/src/fileupload.ts +15 -11
  135. package/src/form.ts +15 -11
  136. package/src/formatters.ts +15 -11
  137. package/src/gridview.ts +76 -30
  138. package/src/i18n.ts +15 -11
  139. package/src/icon.ts +125 -33
  140. package/src/image.ts +15 -11
  141. package/src/index.ts +29 -0
  142. package/src/input.ts +15 -11
  143. package/src/label.ts +15 -11
  144. package/src/layout.ts +21 -17
  145. package/src/link.ts +15 -11
  146. package/src/listview.ts +15 -11
  147. package/src/md5.ts +16 -10
  148. package/src/menu.ts +19 -12
  149. package/src/messagebox.ts +17 -13
  150. package/src/panel.ts +15 -11
  151. package/src/popup.ts +20 -19
  152. package/src/property_editor.ts +15 -11
  153. package/src/radiobtn.ts +15 -11
  154. package/src/rating.ts +15 -11
  155. package/src/request.ts +16 -12
  156. package/src/router.ts +28 -0
  157. package/src/settings.ts +15 -11
  158. package/src/sidebarview.ts +15 -11
  159. package/src/smartedit.ts +15 -11
  160. package/src/spreadsheet.ts +15 -11
  161. package/src/styles.ts +23 -14
  162. package/src/svgcomponent.ts +15 -11
  163. package/src/tabbar.ts +17 -2
  164. package/src/tabview.ts +15 -11
  165. package/src/textarea.ts +15 -11
  166. package/src/textedit.ts +17 -13
  167. package/src/texthiliter.ts +15 -11
  168. package/src/toaster.ts +15 -11
  169. package/src/tools.ts +15 -11
  170. package/src/tooltips.ts +15 -11
  171. package/src/treeview.ts +15 -11
  172. package/src/x4.less +253 -106
  173. package/src/x4_events.ts +27 -16
  174. package/tsconfig.json +1 -1
  175. package/src/README.md +0 -2
@@ -1,6 +1,34 @@
1
+ /**
2
+ * ___ ___ __
3
+ * \ \_/ / / _
4
+ * \ / /_| |_
5
+ * / _ \____ _|
6
+ * /__/ \__\ |_|
7
+ *
8
+ * @file x4.less
9
+ * @author Etienne Cochard
10
+ *
11
+ * Copyright (c) 2019-2022 R-libre ingenierie
12
+ *
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.
21
+ *
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.
28
+ **/
1
29
  :root {
2
- --x4-font: "sans serif";
3
- --x4-font-size: "13px";
30
+ --x4-font: "Inter";
31
+ --x4-font-size: 13px;
4
32
  --x4-base-color: #266888;
5
33
  --x4-selection-color: #2458B3;
6
34
  --x4-hover-color: rgba(36, 88, 179, 0.9);
@@ -10,19 +38,121 @@
10
38
  --x4-success-color: #0A6640;
11
39
  --x4-form-color: white;
12
40
  --x4-tip-background: rgba(0, 0, 0, 0.5);
13
- --x4-button-color: #363636;
14
- --x4-button-border-color: #000000;
41
+ --x4-button-color: white;
42
+ --x4-button-text-color: #363636;
15
43
  --x4-scrollbar-width: 6px;
16
44
  --x4-scrollbar-background: white;
17
45
  --x4-scrollbar-thumb: grey;
18
46
  --x4-sizer-size: 4px;
19
- --x4-panel-border-color: rgba(0, 0, 0, 0.1);
20
- --x4-icon-font-family: var("fonteawesome");
21
- --x4-icon-circle-exclamation: "\f06a";
22
- --x4-icon-chevron-right: "\f054";
23
- --x4-icon-window-restore: "\f2d2";
24
- --x4-icon-arrow-down-long: "\f175";
25
- --x4-icon-arrow-up-long: "\f176";
47
+ --x4-default-border-color: rgba(0, 0, 0, 0.1);
48
+ --x4-icon-font-family: "fonteawesome";
49
+ --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>';
50
+ --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>';
51
+ --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>';
52
+ --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>';
53
+ --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>';
54
+ --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>';
55
+ --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>';
56
+ --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>';
57
+ --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>';
58
+ --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>';
59
+ --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>';
60
+ --x4-icon-calendar-days: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" fill="currentColor"><path d="M160 32V64H288V32C288 14.33 302.3 0 320 0C337.7 0 352 14.33 352 32V64H400C426.5 64 448 85.49 448 112V160H0V112C0 85.49 21.49 64 48 64H96V32C96 14.33 110.3 0 128 0C145.7 0 160 14.33 160 32zM0 192H448V464C448 490.5 426.5 512 400 512H48C21.49 512 0 490.5 0 464V192zM64 304C64 312.8 71.16 320 80 320H112C120.8 320 128 312.8 128 304V272C128 263.2 120.8 256 112 256H80C71.16 256 64 263.2 64 272V304zM192 304C192 312.8 199.2 320 208 320H240C248.8 320 256 312.8 256 304V272C256 263.2 248.8 256 240 256H208C199.2 256 192 263.2 192 272V304zM336 256C327.2 256 320 263.2 320 272V304C320 312.8 327.2 320 336 320H368C376.8 320 384 312.8 384 304V272C384 263.2 376.8 256 368 256H336zM64 432C64 440.8 71.16 448 80 448H112C120.8 448 128 440.8 128 432V400C128 391.2 120.8 384 112 384H80C71.16 384 64 391.2 64 400V432zM208 384C199.2 384 192 391.2 192 400V432C192 440.8 199.2 448 208 448H240C248.8 448 256 440.8 256 432V400C256 391.2 248.8 384 240 384H208zM320 432C320 440.8 327.2 448 336 448H368C376.8 448 384 440.8 384 432V400C384 391.2 376.8 384 368 384H336C327.2 384 320 391.2 320 400V432z"/></svg>';
61
+ }
62
+ /* source: https://tailwindcss.com/docs/customizing-colors/#default-color-palette */
63
+ :root {
64
+ --black: #000000;
65
+ --white: #ffffff;
66
+ --gray-100: #f7fafc;
67
+ --gray-200: #edf2f7;
68
+ --gray-300: #e2e8f0;
69
+ --gray-400: #cbd5e0;
70
+ --gray-500: #a0aec0;
71
+ --gray-600: #718096;
72
+ --gray-700: #4a5568;
73
+ --gray-800: #2d3748;
74
+ --gray-900: #1a202c;
75
+ --red-100: #fff5f5;
76
+ --red-200: #fed7d7;
77
+ --red-300: #feb2b2;
78
+ --red-400: #fc8181;
79
+ --red-500: #f56565;
80
+ --red-600: #e53e3e;
81
+ --red-700: #c53030;
82
+ --red-800: #9b2c2c;
83
+ --red-900: #742a2a;
84
+ --orange-100: #fffaf0;
85
+ --orange-200: #feebc8;
86
+ --orange-300: #fbd38d;
87
+ --orange-400: #f6ad55;
88
+ --orange-500: #ed8936;
89
+ --orange-600: #dd6b20;
90
+ --orange-700: #c05621;
91
+ --orange-800: #9c4221;
92
+ --orange-900: #7b341e;
93
+ --yellow-100: #fffff0;
94
+ --yellow-200: #fefcbf;
95
+ --yellow-300: #faf089;
96
+ --yellow-400: #f6e05e;
97
+ --yellow-500: #ecc94b;
98
+ --yellow-600: #d69e2e;
99
+ --yellow-700: #b7791f;
100
+ --yellow-800: #975a16;
101
+ --yellow-900: #744210;
102
+ --green-100: #f0fff4;
103
+ --green-200: #c6f6d5;
104
+ --green-300: #9ae6b4;
105
+ --green-400: #68d391;
106
+ --green-500: #48bb78;
107
+ --green-600: #38a169;
108
+ --green-700: #2f855a;
109
+ --green-800: #276749;
110
+ --green-900: #22543d;
111
+ --teal-100: #e6fffa;
112
+ --teal-200: #b2f5ea;
113
+ --teal-300: #81e6d9;
114
+ --teal-400: #4fd1c5;
115
+ --teal-500: #38b2ac;
116
+ --teal-600: #319795;
117
+ --teal-700: #2c7a7b;
118
+ --teal-800: #285e61;
119
+ --teal-900: #234e52;
120
+ --blue-100: #ebf8ff;
121
+ --blue-200: #bee3f8;
122
+ --blue-300: #90cdf4;
123
+ --blue-400: #63b3ed;
124
+ --blue-500: #4299e1;
125
+ --blue-600: #3182ce;
126
+ --blue-700: #2b6cb0;
127
+ --blue-800: #2c5282;
128
+ --blue-900: #2a4365;
129
+ --indigo-100: #ebf4ff;
130
+ --indigo-200: #c3dafe;
131
+ --indigo-300: #a3bffa;
132
+ --indigo-400: #7f9cf5;
133
+ --indigo-500: #667eea;
134
+ --indigo-600: #5a67d8;
135
+ --indigo-700: #4c51bf;
136
+ --indigo-800: #434190;
137
+ --indigo-900: #3c366b;
138
+ --purple-100: #faf5ff;
139
+ --purple-200: #e9d8fd;
140
+ --purple-300: #d6bcfa;
141
+ --purple-400: #b794f4;
142
+ --purple-500: #9f7aea;
143
+ --purple-600: #805ad5;
144
+ --purple-700: #6b46c1;
145
+ --purple-800: #553c9a;
146
+ --purple-900: #44337a;
147
+ --pink-100: #fff5f7;
148
+ --pink-200: #fed7e2;
149
+ --pink-300: #fbb6ce;
150
+ --pink-400: #f687b3;
151
+ --pink-500: #ed64a6;
152
+ --pink-600: #d53f8c;
153
+ --pink-700: #b83280;
154
+ --pink-800: #97266d;
155
+ --pink-900: #702459;
26
156
  }
27
157
  .x4-root-element {
28
158
  padding: 0;
@@ -161,7 +291,8 @@ textarea::selection {
161
291
  .x-icon:before {
162
292
  font-family: var(--x4-icon-font-family);
163
293
  }
164
- .x-icon.x-svg-icon {
294
+ .x-icon.x-svg-icon,
295
+ .x-icon svg {
165
296
  width: 1em;
166
297
  height: 1em;
167
298
  }
@@ -171,23 +302,21 @@ textarea::selection {
171
302
  align-items: center;
172
303
  outline: none;
173
304
  cursor: pointer;
174
- height: 2.5em;
305
+ height: 2rem;
175
306
  padding: 8px;
176
- border: 1px solid var(--x4-button-border-color);
177
307
  overflow: hidden;
308
+ border: 1px solid var(--x4-default-border-color);
178
309
  background-color: var(--x4-button-color);
179
- color: rgba(255, 255, 255, 0.6);
310
+ color: var(--x4-button-text-color);
180
311
  }
181
312
  .x-base-button .x-icon {
182
313
  margin: 0 4px;
183
314
  color: inherit;
184
315
  }
185
- .x-base-button:not(.x-disable):focus {
186
- border-color: white;
187
- }
188
- .x-base-button:not(.x-disable).x-active {
316
+ .x-base-button:focus {
317
+ border-color: var(--x4-focus-color);
318
+ background-color: var(--x4-focus-color);
189
319
  color: white;
190
- background-color: rgba(255, 255, 255, 0.2);
191
320
  }
192
321
  .x-base-button.x-disable {
193
322
  color: gray;
@@ -293,7 +422,7 @@ textarea::selection {
293
422
  .x-text-edit > .x-label,
294
423
  .x-combo-box > .x-label {
295
424
  padding: 4px;
296
- color: rgba(0, 0, 0, 0.8);
425
+ color: var(--gray-900);
297
426
  margin-top: 1px;
298
427
  line-height: 1.3em;
299
428
  min-height: 2em;
@@ -311,8 +440,7 @@ textarea::selection {
311
440
  outline: none;
312
441
  border: none;
313
442
  padding: 4px;
314
- color: rgba(0, 0, 0, 0.9);
315
- background-color: rgba(255, 255, 255, 0.25);
443
+ color: var(--gray-900);
316
444
  border-bottom: 1px solid transparent;
317
445
  margin-top: 1px;
318
446
  line-height: 1.3em;
@@ -321,7 +449,7 @@ textarea::selection {
321
449
  .x-combo-box input::placeholder,
322
450
  .x-text-edit .x-fake-input::placeholder,
323
451
  .x-combo-box .x-fake-input::placeholder {
324
- color: rgba(255, 255, 255, 0.5);
452
+ color: var(--gray-800);
325
453
  }
326
454
  .x-text-edit input::selection,
327
455
  .x-combo-box input::selection,
@@ -330,28 +458,34 @@ textarea::selection {
330
458
  background-color: var(--x4-selection-color);
331
459
  color: #fff;
332
460
  }
333
- .x-text-edit:focus,
334
- .x-combo-box:focus {
335
- outline: none;
461
+ .x-text-edit input:focus,
462
+ .x-combo-box input:focus,
463
+ .x-text-edit .x-fake-input:focus,
464
+ .x-combo-box .x-fake-input:focus {
465
+ border-bottom-color: var(--x4-focus-color);
336
466
  }
337
- .x-text-edit:focus > .x-label,
338
- .x-combo-box:focus > .x-label {
467
+ .x-text-edit:focus-within > .x-label,
468
+ .x-combo-box:focus-within > .x-label {
339
469
  color: var(--x4-focus-color);
340
470
  }
341
471
  .x-text-edit .x-button.gadget,
342
472
  .x-combo-box .x-button.gadget {
473
+ background-color: transparent;
343
474
  font-size: var(--x4-font-size);
344
- background-color: rgba(0, 0, 0, 0.1);
475
+ color: var(--gray-900);
345
476
  border: none;
346
477
  margin: 0;
347
478
  padding: 0;
348
479
  height: 2em;
349
480
  margin-top: 1px;
350
481
  }
351
- .x-text-edit .x-button.gadget .x-icon,
352
- .x-combo-box .x-button.gadget .x-icon {
353
- font-size: 85%;
354
- padding-right: 2px;
482
+ .x-text-edit .x-button.gadget:hover,
483
+ .x-combo-box .x-button.gadget:hover {
484
+ background-color: transparent;
485
+ }
486
+ .x-text-edit .x-button.gadget:focus,
487
+ .x-combo-box .x-button.gadget:focus {
488
+ color: var(--x4-focus-color);
355
489
  }
356
490
  .x-text-edit:focus .x-button.gadget,
357
491
  .x-combo-box:focus .x-button.gadget,
@@ -384,15 +518,6 @@ textarea::selection {
384
518
  top: -2px;
385
519
  z-index: 1;
386
520
  }
387
- .x-text-edit .error-info:before,
388
- .x-combo-box .error-info:before {
389
- font-family: var(--x4-icon-font-family);
390
- content: var(--x4-icon-circle-exclamation);
391
- padding-right: 3px;
392
- position: absolute;
393
- left: 1px;
394
- top: 6px;
395
- }
396
521
  .x-text-edit.x-required .label1:before,
397
522
  .x-combo-box.x-required .label1:before {
398
523
  content: '*';
@@ -403,6 +528,10 @@ textarea::selection {
403
528
  border-bottom: none;
404
529
  border-left: 4px solid var(--x4-error-color);
405
530
  }
531
+ .x-text-edit .x-button.gadget {
532
+ margin-left: 1 px;
533
+ margin-right: 1 px;
534
+ }
406
535
  .x-combo-box > .x-label {
407
536
  border-top: 1px solid transparent;
408
537
  }
@@ -460,20 +589,24 @@ textarea::selection {
460
589
  .x-text-edit:focus .label1 {
461
590
  color: black;
462
591
  }
592
+ .x-radio-btn,
463
593
  .x-check-box {
464
594
  align-items: center;
465
- color: rgba(0, 0, 0, 0.8);
595
+ color: var(--gray-900);
466
596
  outline: none;
467
597
  padding: 4px 0;
468
598
  }
599
+ .x-radio-btn input,
469
600
  .x-check-box input {
470
601
  outline: none;
471
602
  margin: 4px;
472
603
  padding: 0;
473
604
  }
605
+ .x-radio-btn .x-label,
474
606
  .x-check-box .x-label {
475
607
  padding: 4px;
476
608
  }
609
+ .x-radio-btn:focus-within,
477
610
  .x-check-box:focus-within {
478
611
  text-decoration: underline;
479
612
  color: var(--x4-selection-color);
@@ -544,7 +677,7 @@ textarea::selection {
544
677
  align-items: center;
545
678
  outline: none;
546
679
  background-color: transparent;
547
- color: rgba(0, 0, 0, 0.8);
680
+ color: var(--gray-900);
548
681
  padding: 0px 8px;
549
682
  min-width: 120px;
550
683
  border: none;
@@ -552,22 +685,17 @@ textarea::selection {
552
685
  .x-menu-item .x-icon {
553
686
  width: 1em;
554
687
  margin-right: 8px;
555
- color: rgba(0, 0, 0, 0.3);
688
+ color: var(--gray-700);
556
689
  }
557
690
  .x-menu-item .x-label {
558
691
  padding: 4px;
559
692
  }
560
693
  .x-menu-item:hover {
561
694
  background-color: #c6d3d9;
562
- color: black;
695
+ color: var(--gray-900);
563
696
  }
564
697
  .x-menu-item:hover .x-icon {
565
- color: black;
566
- }
567
- .x-popup-menu-item:after {
568
- content: var(--x4-icon-chevron-right);
569
- font-family: var(--x4-icon-font-family);
570
- font-size: 80%;
698
+ color: var(--gray-900);
571
699
  }
572
700
  .x-menu-separator {
573
701
  margin-top: 4px;
@@ -611,10 +739,7 @@ textarea::selection {
611
739
  margin-right: var(--x4-scrollbar-width);
612
740
  }
613
741
  .x-list-view {
614
- border: 1px solid transparent;
615
- }
616
- .x-list-view:focus {
617
- outline: none;
742
+ border: 1px solid var(--x4-default-border-color);
618
743
  }
619
744
  .x-list-view .x-list-item {
620
745
  padding: 4px;
@@ -632,6 +757,10 @@ textarea::selection {
632
757
  .x-list-view .x-list-item:focus {
633
758
  outline: none;
634
759
  }
760
+ .x-list-view:focus {
761
+ outline: none;
762
+ border-color: var(--x4-focus-color);
763
+ }
635
764
  .x-list-view .gadgets {
636
765
  border-top: 1px solid rgba(0, 0, 0, 0.5);
637
766
  background-color: rgba(0, 0, 0, 0.1);
@@ -658,6 +787,8 @@ textarea::selection {
658
787
  .x-popup {
659
788
  position: absolute;
660
789
  z-index: 1000;
790
+ font-family: var(--x4-font);
791
+ font-size: var(--x4-font-size);
661
792
  }
662
793
  .x-popup:focus {
663
794
  outline: none;
@@ -666,7 +797,7 @@ textarea::selection {
666
797
  align-items: center;
667
798
  line-height: 1.5em;
668
799
  padding: 4px;
669
- border-bottom: 1px solid var(--x4-panel-border-color);
800
+ border-bottom: 1px solid var(--x4-default-border-color);
670
801
  }
671
802
  .x-panel > .title > .x-label {
672
803
  flex: 1;
@@ -678,7 +809,7 @@ textarea::selection {
678
809
  box-shadow: none;
679
810
  }
680
811
  .x-panel > .title > .x-button:focus {
681
- color: black;
812
+ color: var(--gray-900);
682
813
  }
683
814
  .x-panel > .body {
684
815
  padding: 8px;
@@ -691,26 +822,40 @@ textarea::selection {
691
822
  min-height: 100px;
692
823
  }
693
824
  .x-dialog > .title {
694
- height: 3rem;
825
+ height: 2rem;
695
826
  color: white;
696
827
  padding: 0 8px;
697
828
  display: flex;
698
829
  align-items: center;
830
+ background-color: var(--x4-selection-color);
699
831
  }
700
832
  .x-dialog > .title .x-icon {
701
- width: 1.7em;
833
+ width: 2em;
834
+ height: 1.9em;
835
+ padding: 4px;
702
836
  text-align: center;
703
837
  cursor: pointer;
704
838
  }
705
839
  .x-dialog > .title .x-icon:hover {
706
840
  background-color: rgba(255, 255, 255, 0.1);
707
841
  }
842
+ .x-dialog > .title .x-icon.close-btn:hover {
843
+ background-color: var(--x4-error-color);
844
+ color: white;
845
+ }
708
846
  .x-dialog > .title .x-label {
709
847
  border-bottom: none;
710
848
  padding: 0;
711
849
  }
712
- .x-dialog.maximized > .title .max-btn:before {
713
- content: var(--x4-icon-window-restore);
850
+ .x-dialog > .title .res-btn {
851
+ display: none;
852
+ }
853
+ .x-dialog.maximized > .title .min-btn,
854
+ .x-dialog.maximized > .title .max-btn {
855
+ display: none;
856
+ }
857
+ .x-dialog.maximized > .title .res-btn {
858
+ display: block;
714
859
  }
715
860
  .x-dialog.x-resized {
716
861
  display: flex;
@@ -800,6 +945,7 @@ textarea::selection {
800
945
  }
801
946
  .x-form {
802
947
  background-color: var(--x4-form-color);
948
+ margin-block-end: 0;
803
949
  padding: 8px;
804
950
  min-width: 250px;
805
951
  min-height: 50px;
@@ -824,19 +970,6 @@ textarea::selection {
824
970
  .x-form > .footer .x-button:not(:first-child) {
825
971
  margin-left: 8px;
826
972
  }
827
- .x-button {
828
- background-color: rgba(255, 255, 255, 0.25);
829
- border-color: transparent;
830
- font-family: var(--x4-font);
831
- font-size: var(--x4-font-size);
832
- }
833
- .x-button .x-icon {
834
- width: 1.5em;
835
- }
836
- .x-button:focus {
837
- border-color: rgba(255, 255, 255, 0.4);
838
- color: black;
839
- }
840
973
  .x-hidden {
841
974
  display: none ! important;
842
975
  }
@@ -935,7 +1068,7 @@ textarea::selection {
935
1068
  overflow: hidden;
936
1069
  padding: 4px;
937
1070
  white-space: nowrap;
938
- color: black;
1071
+ color: var(--gray-900);
939
1072
  height: 2em;
940
1073
  }
941
1074
  .x-spreadsheet .x-footer,
@@ -961,21 +1094,26 @@ textarea::selection {
961
1094
  border-right: 1px solid rgba(0, 0, 0, 0.1);
962
1095
  height: unset;
963
1096
  }
964
- .x-spreadsheet .x-footer .x-cell.sort:before,
965
- .x-grid-view .x-footer .x-cell.sort:before,
966
- .x-spreadsheet .x-header .x-cell.sort:before,
967
- .x-grid-view .x-header .x-cell.sort:before {
968
- content: var(--x4-icon-arrow-down-long);
969
- font-family: var(--x4-icon-font-family);
970
- padding-right: 4px;
1097
+ .x-spreadsheet .x-footer .x-cell.sort,
1098
+ .x-grid-view .x-footer .x-cell.sort,
1099
+ .x-spreadsheet .x-header .x-cell.sort,
1100
+ .x-grid-view .x-header .x-cell.sort {
1101
+ background-image: var(--x4-icon-arrow-down-long);
1102
+ background-repeat: no-repeat;
1103
+ background-size: 1rem 1rem;
1104
+ background-position: right 0 top 6px;
1105
+ padding-right: calc(1rem + 4px);
1106
+ }
1107
+ .x-spreadsheet .x-footer .x-cell.sort.desc,
1108
+ .x-grid-view .x-footer .x-cell.sort.desc,
1109
+ .x-spreadsheet .x-header .x-cell.sort.desc,
1110
+ .x-grid-view .x-header .x-cell.sort.desc {
1111
+ background-image: var(--x4-icon-arrow-up-long);
971
1112
  }
972
- .x-spreadsheet .x-footer .x-cell.sort.desc:before,
973
- .x-grid-view .x-footer .x-cell.sort.desc:before,
974
- .x-spreadsheet .x-header .x-cell.sort.desc:before,
975
- .x-grid-view .x-header .x-cell.sort.desc:before {
976
- content: var(--x4-icon-arrow-up-long);
977
- font-family: var(--x4-icon-font-family);
978
- padding-right: 4px;
1113
+ .x-spreadsheet .x-header .x-cell,
1114
+ .x-grid-view .x-header .x-cell {
1115
+ display: flex;
1116
+ align-items: center;
979
1117
  }
980
1118
  .x-spreadsheet .x-row,
981
1119
  .x-grid-view .x-row {
@@ -1146,7 +1284,7 @@ textarea::selection {
1146
1284
  max-height: 400px;
1147
1285
  border: 1px solid #00000073;
1148
1286
  overflow: auto;
1149
- color: black;
1287
+ color: var(--gray-900);
1150
1288
  }
1151
1289
  .x-popup-list-view .x-combo-popup .x-list-item {
1152
1290
  height: 2em;
@@ -1181,18 +1319,19 @@ textarea::selection {
1181
1319
  }
1182
1320
  .x-calendar .month-sel .x-button {
1183
1321
  height: auto;
1184
- color: black;
1322
+ color: var(--gray-900);
1185
1323
  }
1186
1324
  .x-calendar .week {
1187
1325
  align-items: center;
1326
+ border: 1px solid transparent;
1188
1327
  }
1189
1328
  .x-calendar .week:hover {
1190
- background-color: var(--x4-hover-color);
1329
+ border-color: var(--x4-hover-color);
1191
1330
  border-radius: 4px;
1192
1331
  }
1193
1332
  .x-calendar .week .cell {
1194
1333
  height: 100%;
1195
- color: rgba(0, 0, 0, 0.7);
1334
+ color: var(--gray-900);
1196
1335
  text-align: center;
1197
1336
  }
1198
1337
  .x-calendar .week .cell span {
@@ -1222,7 +1361,7 @@ textarea::selection {
1222
1361
  color: white;
1223
1362
  }
1224
1363
  .x-calendar .header .cell {
1225
- color: rgba(0, 0, 0, 0.5);
1364
+ color: var(--gray-800);
1226
1365
  height: 1.5em;
1227
1366
  }
1228
1367
  .x-calendar .header:hover {
@@ -1496,7 +1635,7 @@ textarea::selection {
1496
1635
  width: 100%;
1497
1636
  color: transparent;
1498
1637
  background-color: transparent;
1499
- caret-color: black;
1638
+ color: var(--gray-900);
1500
1639
  -moz-tab-size: 4;
1501
1640
  -o-tab-size: 4;
1502
1641
  tab-size: 4;
@@ -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
  export declare type EventCallback<T extends BasicEvent = BasicEvent> = (event: T) => any;
26
30
  export interface EventDisposer {
@@ -244,7 +248,8 @@ export declare class EventSource<Q extends EventMap, T extends EventTypes = MapE
244
248
  * @param eventName - event name
245
249
  * @param callback - callback to remove (must be the same as in on )
246
250
  */
247
- off(eventName: string, callback: EventCallback): void;
251
+ off<K extends keyof Q>(type: K, callback: (ev: Q[K]) => any): void;
252
+ _off(eventName: string, callback: EventCallback): void;
248
253
  /**
249
254
  * remove all listeners for an event
250
255
  * @param eventName - event name