x4js 2.2.7 → 2.2.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 (99) hide show
  1. package/package.json +1 -1
  2. package/src/components/base.scss +19 -1
  3. package/src/components/boxes/boxes.module.scss +1 -1
  4. package/src/components/boxes/boxes.ts +1 -1
  5. package/src/components/breadcrumb/breadcrumb.ts +1 -1
  6. package/src/components/btngroup/btngroup.module.scss +1 -1
  7. package/src/components/btngroup/btngroup.ts +9 -1
  8. package/src/components/button/button.module.scss +1 -1
  9. package/src/components/button/button.ts +1 -1
  10. package/src/components/calendar/calendar.module.scss +1 -1
  11. package/src/components/calendar/calendar.ts +1 -1
  12. package/src/components/checkbox/checkbox.module.scss +1 -1
  13. package/src/components/colorinput/colorinput.module.scss +1 -1
  14. package/src/components/colorinput/colorinput.ts +1 -1
  15. package/src/components/colorpicker/colorpicker.module.scss +1 -1
  16. package/src/components/colorpicker/colorpicker.ts +1 -1
  17. package/src/components/combobox/combobox.module.scss +1 -1
  18. package/src/components/combobox/combobox.ts +1 -1
  19. package/src/components/dialog/dialog.module.scss +1 -1
  20. package/src/components/dialog/dialog.ts +22 -2
  21. package/src/components/filedrop/filedrop.module.scss +1 -1
  22. package/src/components/filedrop/filedrop.ts +1 -1
  23. package/src/components/form/form.module.scss +1 -1
  24. package/src/components/form/form.ts +1 -1
  25. package/src/components/gridview/gridview.module.scss +1 -1
  26. package/src/components/gridview/gridview.ts +1 -1
  27. package/src/components/header/header.ts +1 -1
  28. package/src/components/icon/icon.module.scss +1 -1
  29. package/src/components/icon/icon.ts +4 -1
  30. package/src/components/image/image.module.scss +1 -1
  31. package/src/components/image/image.ts +1 -1
  32. package/src/components/input/input.module.scss +1 -1
  33. package/src/components/input/input.ts +1 -1
  34. package/src/components/keyboard/keyboard.module.scss +1 -1
  35. package/src/components/keyboard/keyboard.ts +1 -1
  36. package/src/components/label/label.module.scss +1 -1
  37. package/src/components/label/label.ts +1 -1
  38. package/src/components/link/link.ts +1 -1
  39. package/src/components/listbox/listbox.module.scss +36 -2
  40. package/src/components/listbox/listbox.ts +1 -1
  41. package/src/components/menu/menu.module.scss +1 -1
  42. package/src/components/menu/menu.ts +1 -1
  43. package/src/components/messages/messages.module.scss +1 -1
  44. package/src/components/messages/messages.ts +22 -5
  45. package/src/components/monaco/monaco.module.scss +22 -0
  46. package/src/components/monaco/monaco.ts +95 -9
  47. package/src/components/monaco/readme.md +2 -1
  48. package/src/components/normalize.scss +1 -1
  49. package/src/components/notification/notification.module.scss +1 -1
  50. package/src/components/notification/notification.ts +1 -1
  51. package/src/components/panel/panel.module.scss +1 -1
  52. package/src/components/panel/panel.ts +1 -1
  53. package/src/components/popup/popup.module.scss +1 -1
  54. package/src/components/popup/popup.ts +1 -1
  55. package/src/components/progress/progress.module.scss +1 -1
  56. package/src/components/progress/progress.ts +1 -1
  57. package/src/components/propgrid/progrid.module.scss +2 -2
  58. package/src/components/propgrid/propgrid.ts +1 -1
  59. package/src/components/radio/radio.module.scss +1 -1
  60. package/src/components/radio/radio.ts +1 -1
  61. package/src/components/rating/rating.ts +1 -1
  62. package/src/components/select/select.module.scss +26 -3
  63. package/src/components/shared.scss +1 -1
  64. package/src/components/sizers/sizer.module.scss +9 -5
  65. package/src/components/sizers/sizer.ts +20 -14
  66. package/src/components/slider/slider.module.scss +1 -1
  67. package/src/components/slider/slider.ts +1 -1
  68. package/src/components/spreadsheet/spreadsheet.module.scss +1 -1
  69. package/src/components/spreadsheet/spreadsheet.ts +1 -1
  70. package/src/components/switch/switch.module.scss +1 -1
  71. package/src/components/switch/switch.ts +1 -1
  72. package/src/components/tabs/tabs.ts +2 -2
  73. package/src/components/textarea/textarea.module.scss +1 -1
  74. package/src/components/textarea/textarea.ts +1 -1
  75. package/src/components/textedit/textedit.module.scss +1 -1
  76. package/src/components/textedit/textedit.ts +1 -1
  77. package/src/components/themes.scss +1 -1
  78. package/src/components/tickline/tickline.module.scss +1 -1
  79. package/src/components/tooltips/tooltips.scss +1 -1
  80. package/src/components/tooltips/tooltips.ts +1 -1
  81. package/src/components/treeview/treeview.module.scss +6 -2
  82. package/src/components/treeview/treeview.ts +5 -3
  83. package/src/components/viewport/viewport.module.scss +1 -1
  84. package/src/components/viewport/viewport.ts +1 -1
  85. package/src/core/component.ts +9 -7
  86. package/src/core/core_application.ts +2 -1
  87. package/src/core/core_colors.ts +1 -1
  88. package/src/core/core_data.ts +1 -1
  89. package/src/core/core_dom.ts +1 -1
  90. package/src/core/core_dragdrop.ts +1 -1
  91. package/src/core/core_element.ts +1 -1
  92. package/src/core/core_events.ts +1 -1
  93. package/src/core/core_i18n.ts +1 -1
  94. package/src/core/core_router.ts +1 -1
  95. package/src/core/core_styles.ts +1 -1
  96. package/src/core/core_svg.ts +1 -1
  97. package/src/core/core_tools.ts +1 -1
  98. package/src/x4.scss +1 -1
  99. package/src/x4.ts +1 -1
@@ -17,6 +17,8 @@ import { Progress } from '../components.js';
17
17
  import "./messages.module.scss";
18
18
 
19
19
  import error_icon from "./circle-exclamation.svg";
20
+ import question_icon from "./circle-question.svg";
21
+
20
22
  import pen_icon from "./pen-field.svg";
21
23
  import spinner from "./spinner.svg"
22
24
 
@@ -40,7 +42,16 @@ export class MessageBox extends Dialog<DialogProps>
40
42
  *
41
43
  */
42
44
 
43
- private static _create( msg: string | UnsafeHtml, buttons?: BtnGroupItem[], title?: string ) {
45
+ private static _create( msg: string | UnsafeHtml, buttons: BtnGroupItem[], title: string, icon_type: "error" | "question" ) {
46
+
47
+ let icon = error_icon;
48
+ switch( icon_type ) {
49
+ case "question": {
50
+ icon = question_icon;
51
+ break;
52
+ }
53
+ }
54
+
44
55
  const box = new MessageBox({
45
56
  modal: true,
46
57
  title: title ?? _tr.global.error,
@@ -65,9 +76,9 @@ export class MessageBox extends Dialog<DialogProps>
65
76
  * display a messagebox
66
77
  */
67
78
 
68
- static show( msg: string | UnsafeHtml, buttons?: BtnGroupItem[], title?: string ): MessageBox {
79
+ static show( msg: string | UnsafeHtml, buttons?: BtnGroupItem[], title?: string, icon_type?: "error" | "question" ): MessageBox {
69
80
 
70
- const box = this._create( msg, buttons, title );
81
+ const box = this._create( msg, buttons, title, icon_type );
71
82
  box.on( "btnclick", ( ev ) => {
72
83
  asap( ( ) => {
73
84
  box.close()
@@ -82,10 +93,10 @@ export class MessageBox extends Dialog<DialogProps>
82
93
  * idem with promise
83
94
  */
84
95
 
85
- static async showAsync( msg: string | UnsafeHtml, buttons?: BtnGroupItem[], title?: string ) : Promise<string> {
96
+ static async showAsync( msg: string | UnsafeHtml, buttons?: BtnGroupItem[], title?: string, icon_type?: "error" | "question" ) : Promise<string> {
86
97
 
87
98
  return new Promise( (resolve, reject ) => {
88
- const box = this._create( msg, buttons, title );
99
+ const box = this._create( msg, buttons, title, icon_type );
89
100
  box.on( "btnclick", ( ev ) => {
90
101
  asap( ( ) => {
91
102
  resolve( ev.button );
@@ -99,6 +110,7 @@ export class MessageBox extends Dialog<DialogProps>
99
110
  }
100
111
  }
101
112
 
113
+ // :: INPUT ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
102
114
 
103
115
  interface InputOptions {
104
116
  password?: boolean;
@@ -168,6 +180,8 @@ export class InputBox extends Dialog<DialogProps>
168
180
  }
169
181
 
170
182
 
183
+ // :: PROMPT ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
184
+
171
185
 
172
186
  @class_ns( "x4" )
173
187
  export class PromptBox extends Dialog<DialogProps>
@@ -237,6 +251,9 @@ export class PromptBox extends Dialog<DialogProps>
237
251
  }
238
252
  }
239
253
 
254
+
255
+ // :: PROGRESS ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
256
+
240
257
  @class_ns( "x4" )
241
258
  export class ProgressionBox extends Dialog {
242
259
 
@@ -0,0 +1,22 @@
1
+ /**
2
+ * ___ ___ __
3
+ * \ \/ / / _
4
+ * \ / /_| |_
5
+ * / \____ _|
6
+ * /__/\__\ |_|
7
+ *
8
+ * @file monacoeditor.module.scss
9
+ * @author Etienne Cochard
10
+ *
11
+ * @copyright (c) 2026 R-libre ingenierie
12
+ *
13
+ * Use of this source code is governed by an MIT-style license
14
+ * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
15
+ **/
16
+
17
+ .x4monacoeditor {
18
+ display: grid;
19
+ grid-template-rows: 1fr;
20
+ grid-template-columns: 1fr;
21
+ overflow: hidden;
22
+ }
@@ -1,25 +1,111 @@
1
- import { Component, ComponentProps } from '../../x4.js';
1
+ import { class_ns, Component, ComponentProps } from '../../x4.js';
2
2
 
3
- import * as monaco from './bin/monaco.js';
4
- import "./bin/monaco.css"
3
+ import Monaco from './bin/monaco';
4
+ import "./monaco.module.scss"
5
5
 
6
6
 
7
7
  interface MonacoEditorProps extends ComponentProps {
8
8
  language: "typescript" | "javascript" | "json" | "css" | "html";
9
9
  theme?: string;
10
10
  content?: string;
11
+ options?: Monaco.editor.IEditorOptions & Monaco.editor.IGlobalEditorOptions;
11
12
  }
12
13
 
14
+ @class_ns( "x4" )
13
15
  export class MonacoEditor extends Component<MonacoEditorProps> {
14
16
 
17
+ static initCount = 0;
18
+ static basePath: string = "./bin";
19
+ static monaco: typeof Monaco;
20
+ static initCbs: Function[] = [];
21
+
22
+ private _editor: Monaco.editor.IStandaloneCodeEditor;
23
+
24
+ static async start( ) {
25
+ if( this.initCount ) {
26
+ return;
27
+ }
28
+
29
+ this.monaco = (await import( "./bin/monaco.js" )).default;
30
+ this.initCount++;
31
+
32
+ globalThis.MonacoEnvironment = {
33
+ getWorkerUrl: function (_moduleId, label) {
34
+ let workerPath: string;
35
+
36
+ if (label == 'json') {
37
+ workerPath = 'json.worker.js';
38
+ }
39
+ else if (label == 'css' || label == 'scss' || label == 'less') {
40
+ workerPath = 'css.worker.js';
41
+ }
42
+ else if (label == 'html' ) {
43
+ workerPath = 'html.worker.js';
44
+ }
45
+ else if (label === 'typescript' || label === 'javascript') {
46
+ workerPath = 'ts.worker.js';
47
+ }
48
+ else {
49
+ workerPath = "editor.worker.js";
50
+ }
51
+
52
+ const fullpath = MonacoEditor.basePath+'/workers/'+workerPath;
53
+ console.log( `getting "${label} path: ${fullpath}` );
54
+ return fullpath;
55
+ }
56
+ };
57
+
58
+ const link = document.createElement('link');
59
+ link.rel = 'stylesheet';
60
+ link.href = MonacoEditor.basePath+'/monaco.css';
61
+ link.type = 'text/css';
62
+ document.head.appendChild(link);
63
+ }
64
+
65
+ static addTypelib( name: string, code: string ) {
66
+ const register = ( ) => {
67
+ ///@ts-ignore
68
+ const ts = MonacoEditor.monaco.languages.typescript;
69
+ ///@ts-ignore
70
+ ts.typescriptDefaults.addExtraLib( code, `ts:filename/${name}`);
71
+ }
72
+
73
+ if( MonacoEditor.monaco ) {
74
+ register( );
75
+ }
76
+ else {
77
+ this.initCbs.push( register );
78
+ }
79
+ }
80
+
15
81
  constructor( props: MonacoEditorProps ) {
82
+ const content = props.content;
83
+ delete props.content;
84
+
16
85
  super( props );
17
-
18
- monaco.editor.create( this.dom as HTMLElement, {
19
- value: props.content,
20
- language: props.language,
21
- theme: props.theme,
22
- });
86
+
87
+ MonacoEditor.start( )
88
+ .then( ( ) => {
89
+ MonacoEditor.initCbs.forEach( x => x() );
90
+
91
+ this._editor = MonacoEditor.monaco.editor.create( this.dom as HTMLElement, {
92
+ value: content,
93
+ language: props.language,
94
+ theme: props.theme,
95
+ //automaticLayout: true,
96
+ });
97
+
98
+ if( props.options ) {
99
+ this._editor.updateOptions( props.options );
100
+ }
101
+ } );
102
+
103
+ this.addDOMEvent( "resized", ( ) => {
104
+ //const rc = this.getBoundingRect( );
105
+ if( this._editor ) {
106
+ this._editor.layout();
107
+ }
108
+ })
23
109
  }
24
110
  }
25
111
 
@@ -1,3 +1,4 @@
1
1
  # using monaco in x4
2
2
 
3
- you must copy ./bin/* in your destination folder
3
+ you must copy ./bin/* in your destination folder ex. monaco folder
4
+ see demo/components/monaco for a full example.
@@ -8,7 +8,7 @@
8
8
  * @file normalize.scss
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file notification.module.scss
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file notification.ts
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file panel.module.scss
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file panel.ts
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file popup.module.scss
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file popup.ts
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file progress.module.scss
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file progress.ts
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -10,7 +10,7 @@
10
10
 
11
11
  .x4propertygrid {
12
12
  background: var( --propertygrid-background );
13
- border: 1px solid var(--color-primary-a50);
13
+ border: 1px solid var(--border);
14
14
  overflow-y: auto;
15
15
  flex-basis: 0;
16
16
 
@@ -40,7 +40,7 @@
40
40
 
41
41
  &:not( :last-child ) {
42
42
  border-bottom: 1px solid var(--color-primary-a50);
43
- box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
43
+ //box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
44
44
  }
45
45
 
46
46
  display: flex;
@@ -8,7 +8,7 @@
8
8
  * @file propgrid.ts
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file radio.scss
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file radio.ts
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file rating.ts
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -1,9 +1,32 @@
1
1
 
2
2
 
3
- .x4select {
4
- padding: 4px;
3
+ .x4select,
4
+ ::picker(select) {
5
+ appearance: base-select;
6
+
7
+ padding: 5px;
5
8
  outline: none;
6
9
 
10
+ border-radius: 0;
7
11
  border: 1px solid var( --border );
8
12
  background-color: white;
9
- }
13
+ }
14
+
15
+ //-- global saddly
16
+ option {
17
+ padding: 5px;
18
+ }
19
+
20
+ option:checked {
21
+ background-color: var( --accent-background );
22
+ color: var( --accent-color );
23
+ }
24
+
25
+ option:hover {
26
+ background-color: var( --accent-background-focus );
27
+ color: var( --accent-color );
28
+ }
29
+
30
+ option::checkmark {
31
+ display: none;
32
+ }
@@ -8,7 +8,7 @@
8
8
  * @file shared.scss
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file sizer.module.scss
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -26,8 +26,10 @@
26
26
  cursor: ns-resize;
27
27
  }
28
28
 
29
- &.vsize,
30
- &.hsize {
29
+ &.vsize-next,
30
+ &.vsize-prev,
31
+ &.hsize-next,
32
+ &.hsize-prev {
31
33
  position: relative;
32
34
  align-self: stretch;
33
35
  min-width: 4px;
@@ -38,11 +40,13 @@
38
40
  }
39
41
  }
40
42
 
41
- &.hsize {
43
+ &.hsize-next,
44
+ &.hsize-prev {
42
45
  cursor: ew-resize;
43
46
  }
44
47
 
45
- &.vsize {
48
+ &.vsize-next,
49
+ &.vsize-prev {
46
50
  cursor: ns-resize;
47
51
  }
48
52
 
@@ -8,7 +8,7 @@
8
8
  * @file sizer.ts
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -33,7 +33,8 @@ interface CSizerEvent extends ComponentEvents {
33
33
  stop: ComponentEvent;
34
34
  }
35
35
 
36
- type SizerType = "left" | "top" | "right" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "hsize" | "vsize";
36
+ type SizerType = "left" | "top" | "right" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right"
37
+ | "hsize-prev" | "hsize-next" | "vsize-prev" | "vsize-next";
37
38
 
38
39
  /**
39
40
  *
@@ -57,8 +58,13 @@ export class CSizer extends Component<ComponentProps,CSizerEvent> {
57
58
  this.setCapture( e.pointerId );
58
59
 
59
60
  let targ = target;
60
- if( !targ && (type=='hsize' || type=='vsize') ) {
61
- targ = this.nextElement( );
61
+ if( !targ ) {
62
+ if( type=='hsize-next' || type=='vsize-next' ) {
63
+ targ = this.nextElement( );
64
+ }
65
+ else if( type=='hsize-prev' || type=='vsize-prev' ) {
66
+ targ = this.prevElement( );
67
+ }
62
68
  }
63
69
 
64
70
  this._ref = targ ?? componentFromDOM( this.dom.parentElement );
@@ -66,14 +72,14 @@ export class CSizer extends Component<ComponentProps,CSizerEvent> {
66
72
  this._delta = {x:0,y:0};
67
73
  const rc = this._ref.getBoundingRect();
68
74
 
69
- if( this._type=="hsize" || this._type.includes("left") ) {
75
+ if( this._type=="hsize-next" || this._type.includes("left") ) {
70
76
  this._delta.x = e.pageX-rc.left;
71
77
  }
72
78
  else {
73
79
  this._delta.x = e.pageX-(rc.left+rc.width);
74
80
  }
75
81
 
76
- if( this._type=="vsize" || this._type.includes("top") ) {
82
+ if( this._type=="vsize-next" || this._type.includes("top") ) {
77
83
  this._delta.y = e.pageY-rc.top;
78
84
  }
79
85
  else {
@@ -110,11 +116,11 @@ export class CSizer extends Component<ComponentProps,CSizerEvent> {
110
116
  nr.height = (rc.top+rc.height)-pt.y;
111
117
  horz = false;
112
118
  }
113
- else if( this._type=="vsize" ) {
119
+ else if( this._type=="vsize-next" ) {
114
120
  nr.height = (rc.top+rc.height)-pt.y;
115
121
  horz = false;
116
122
  }
117
- else if( this._type.includes("bottom") ) {
123
+ else if( this._type.includes("bottom") || this._type=='vsize-prev' ) {
118
124
  //nr.top = rc.top;
119
125
  nr.height = (pt.y-rc.top);
120
126
  horz = false;
@@ -123,10 +129,10 @@ export class CSizer extends Component<ComponentProps,CSizerEvent> {
123
129
  nr.left = pt.x;
124
130
  nr.width = ((rc.left+rc.width)-pt.x);
125
131
  }
126
- else if( this._type=="hsize" ) {
132
+ else if( this._type=="hsize-next" ) {
127
133
  nr.width = ((rc.left+rc.width)-pt.x);
128
134
  }
129
- else if( this._type.includes("right") ) {
135
+ else if( this._type.includes("right") || this._type=='hsize-prev' ) {
130
136
  nr.width = (pt.x-rc.left);
131
137
  }
132
138
 
@@ -143,14 +149,14 @@ export class CSizer extends Component<ComponentProps,CSizerEvent> {
143
149
 
144
150
  @class_ns( "x4" )
145
151
  export class HSizer extends CSizer {
146
- constructor( ) {
147
- super( "hsize" );
152
+ constructor( next = true ) {
153
+ super( next ? "hsize-next" : "hsize-prev" );
148
154
  }
149
155
  }
150
156
 
151
157
  @class_ns( "x4" )
152
158
  export class VSizer extends CSizer {
153
- constructor( ) {
154
- super( "vsize" );
159
+ constructor( next = true ) {
160
+ super( next ? "vsize-next" : "vsize-prev" );
155
161
  }
156
162
  }
@@ -8,7 +8,7 @@
8
8
  * @file slider.module.scss
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file slider.ts
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file spreadsheet.module.scss
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file spreadsheet.ts
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file switch.module.scss
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file switch.ts
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file tabs.ts
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -153,7 +153,7 @@ export class Tabs extends Box<TabsProps> {
153
153
  constructor( props: TabsProps ) {
154
154
  super( props );
155
155
 
156
- this.setClass( "vertical", props.vertical );
156
+ this.setClass( "vertical", props.vertical ?? false );
157
157
 
158
158
  const pages = props.items?.map( x => {
159
159
  return {
@@ -8,7 +8,7 @@
8
8
  * @file textarea.module.scss
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file textarea.ts
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
@@ -8,7 +8,7 @@
8
8
  * @file textedit.module.scss
9
9
  * @author Etienne Cochard
10
10
  *
11
- * @copyright (c) 2024 R-libre ingenierie
11
+ * @copyright (c) 2026 R-libre ingenierie
12
12
  *
13
13
  * Use of this source code is governed by an MIT-style license
14
14
  * that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.