lexgui 8.2.2 → 8.2.4
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/build/components/BaseComponent.d.ts +2 -0
- package/build/components/Form.d.ts +6 -0
- package/build/components/TextInput.d.ts +2 -0
- package/build/core/Namespace.js +1 -1
- package/build/core/Namespace.js.map +1 -1
- package/build/extensions/AssetView.d.ts +137 -137
- package/build/extensions/AssetView.js +1 -2
- package/build/extensions/AssetView.js.map +1 -1
- package/build/extensions/Audio.js +2 -2
- package/build/extensions/Audio.js.map +1 -1
- package/build/extensions/CodeEditor.d.ts +363 -358
- package/build/extensions/CodeEditor.js +5087 -5054
- package/build/extensions/CodeEditor.js.map +1 -1
- package/build/extensions/DocMaker.d.ts +14 -13
- package/build/extensions/DocMaker.js +354 -331
- package/build/extensions/DocMaker.js.map +1 -1
- package/build/lexgui.all.js +288 -145
- package/build/lexgui.all.js.map +1 -1
- package/build/lexgui.all.min.js +1 -1
- package/build/lexgui.all.module.js +288 -145
- package/build/lexgui.all.module.js.map +1 -1
- package/build/lexgui.all.module.min.js +1 -1
- package/build/lexgui.css +59 -57
- package/build/lexgui.js +195 -107
- package/build/lexgui.js.map +1 -1
- package/build/lexgui.min.css +2 -2
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +195 -107
- package/build/lexgui.module.js.map +1 -1
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +33 -1
- package/demo.js +6 -3
- package/examples/all-components.html +15 -1
- package/examples/code-editor.html +7 -1
- package/examples/editor.html +9 -7
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -2,7 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
## dev
|
|
4
4
|
|
|
5
|
-
## 8.2.
|
|
5
|
+
## 8.2.4 (master)
|
|
6
|
+
|
|
7
|
+
Fixed Form not automatically syncing inputs when pressing primary action button.
|
|
8
|
+
Added support for Tags `options.tagClass`.
|
|
9
|
+
Added support for TextArea `options.submitOnEnterKey` (def. true).
|
|
10
|
+
Fixed bug TextArea adding line break on submit using Enter key.
|
|
11
|
+
Fixed Checkbox, Toggle disabled CSS.
|
|
12
|
+
LX.prompt now submits on Enter key. Improved Prompt content html.
|
|
13
|
+
Minor CSS tweaks.
|
|
14
|
+
|
|
15
|
+
CodeEditor:
|
|
16
|
+
- Fixed `onContextMenu` issue on no selected content.
|
|
17
|
+
- Fixed tokenizer edge case with number decimals.
|
|
18
|
+
|
|
19
|
+
## 8.2.3
|
|
20
|
+
|
|
21
|
+
Fixed TextInput not updating on browser autofill.
|
|
22
|
+
Allow support to disable: Array, DatePicker, Layers, List, Pad, Rate, and Tags components.
|
|
23
|
+
Add `options.mapIcon` to change Map2D opener button icon.
|
|
24
|
+
Added `destructive` class support for Dropdown items.
|
|
25
|
+
|
|
26
|
+
Form Component:
|
|
27
|
+
- Enter key now submits the form as native behaviour.
|
|
28
|
+
- Added `options.skipEnterSubmit` to disable the Enter submission.
|
|
29
|
+
- Per entry data `entry.submit` overrides the general form options.
|
|
30
|
+
- Docs updated.
|
|
31
|
+
|
|
32
|
+
DocMaker:
|
|
33
|
+
- Support collapsable header.
|
|
34
|
+
- Added `className` support for some docs utilities.
|
|
35
|
+
- Changed `#content` docs selector to `.lexdocs-content`.
|
|
36
|
+
|
|
37
|
+
## 8.2.2
|
|
6
38
|
|
|
7
39
|
AssetView:
|
|
8
40
|
- Added suppord for custom folder names in `onBeforeCreateFolder` using 1st resolve param.
|
package/demo.js
CHANGED
|
@@ -99,7 +99,7 @@ LX._registerIconsAndColors( "./" );
|
|
|
99
99
|
const header = LX.makeContainer( [ null, "auto" ], "flex flex-col gap-4 p-8 pb-4 items-center", `
|
|
100
100
|
<a href="docs?p=changelog" class="flex flex-row gap-1 items-center text-sm p-1 px-4 rounded-full text-secondary-foreground decoration-none hover:bg-secondary cursor-pointer"><span class="flex bg-info w-2 h-2 rounded-full"></span>
|
|
101
101
|
New Components: Avatar, Spinner, Pagination and more${ LX.makeIcon( "ArrowRight", { svgClass: "sm" } ).innerHTML }</a>
|
|
102
|
-
<p class="fg text-
|
|
102
|
+
<p class="fg text-foreground font-medium tracking-tight leading-none text-center text-balance sm:text-5xl text-4xl">Build your Application Interface</p>
|
|
103
103
|
<p class="text-secondary-foreground font-light text-xl xs:text-lg text-center text-balance leading-normal max-w-3xl">A modern-style UI kit, inspired by shadcn, built for the web. Pure HTML, JavaScript, and Tailwind CSS. Fully Open Source.</p>
|
|
104
104
|
`, area );
|
|
105
105
|
|
|
@@ -382,7 +382,7 @@ LX._registerIconsAndColors( "./" );
|
|
|
382
382
|
|
|
383
383
|
panel.branch("Node", { icon: "Box" });
|
|
384
384
|
panel.addText("Name", "node_1");
|
|
385
|
-
panel.addCheckbox("Visibility", true, null);
|
|
385
|
+
panel.addCheckbox("Visibility", true, null, {disabled: true});
|
|
386
386
|
panel.addLayers("Layers", 10, null);
|
|
387
387
|
|
|
388
388
|
const map2Dpoints = [
|
|
@@ -401,6 +401,9 @@ LX._registerIconsAndColors( "./" );
|
|
|
401
401
|
panel.addVector3( "Position", [0.0, 0.0, 0.0] );
|
|
402
402
|
panel.addVector4( "Rotation", [0.0, 0.0, 0.0, 1.0] );
|
|
403
403
|
panel.addVector3( "Scale", [1.0, 1.0, 1.0] );
|
|
404
|
+
|
|
405
|
+
panel.addSeparator();
|
|
406
|
+
panel.addToggle("JSON", true, null, {className: "primary", disabled: true});
|
|
404
407
|
panel.addButton(null, "Export", () => { console.log("Exported!") }, { buttonClass: "primary", xmustConfirm: true,
|
|
405
408
|
// confirmSide: "left",
|
|
406
409
|
// confirmAlign: "start",
|
|
@@ -710,7 +713,7 @@ LX._registerIconsAndColors( "./" );
|
|
|
710
713
|
{ name: "Make a copy" },
|
|
711
714
|
{ name: "Favourite" },
|
|
712
715
|
null,
|
|
713
|
-
{ name: "Delete", icon: "Trash2", className: "
|
|
716
|
+
{ name: "Delete", icon: "Trash2", className: "destructive" },
|
|
714
717
|
]
|
|
715
718
|
}
|
|
716
719
|
});
|
|
@@ -204,6 +204,7 @@
|
|
|
204
204
|
checkLeftPanel.addCheckbox(null, true, null, { className: "success", label: "Success" });
|
|
205
205
|
checkLeftPanel.addCheckbox(null, true, null, { className: "warning", label: "Warning" });
|
|
206
206
|
checkLeftPanel.addCheckbox(null, true, null, { className: "destructive", label: "Destructive" });
|
|
207
|
+
checkLeftPanel.addCheckbox(null, true, null, { label: "Disabled", disabled: true });
|
|
207
208
|
}
|
|
208
209
|
|
|
209
210
|
// Radiogroup
|
|
@@ -266,6 +267,7 @@
|
|
|
266
267
|
panelB.addOTP("Disabled OTP", "965114", null, { disabled: true });
|
|
267
268
|
panelB.branch("Map2D Inputs", { closed: closedDefault });
|
|
268
269
|
panelB.addMap2D("Map2D", map2Dpoints, null, { size: [ 300, 300 ] });
|
|
270
|
+
panelB.addMap2D("Disabled Map2D", map2Dpoints, null, { size: [ 300, 300 ], disabled: true });
|
|
269
271
|
panelB.branch("Color Inputs", { closed: closedDefault });
|
|
270
272
|
panelB.addColor("From Hex Color", "#b7a9b1");
|
|
271
273
|
panelB.addColor("From RGB Color", { r: 1, g: 0.1, b: 0.6 });
|
|
@@ -287,6 +289,7 @@
|
|
|
287
289
|
p.addButton("Unity Button", "Click me!", null, { buttonClass: "primary" });
|
|
288
290
|
} });
|
|
289
291
|
panelB.addSelect("With Labels", selectValuesWithLabels, "Unity", null);
|
|
292
|
+
panelB.addSelect("Disabled", selectValuesWithLabels, "Unity", null, { disabled: true });
|
|
290
293
|
panelB.addSelect("With Filter", selectValuesWithLabels, "Godot", null, { filter: true, placeholder: "Search tools..." });
|
|
291
294
|
panelB.addSelect("Custom Empty Msg", selectValuesWithLabels, "Unreal Engine", null, { filter: true, emptyMsg: "No tools found.", placeholder: "Search tools..." });
|
|
292
295
|
panelB.addSelect("With Images", [{ value: "Godot", src: "https://godotengine.org/assets/press/logo_vertical_color_light.png" }, { value: "Unity", src: "https://logos-world.net/wp-content/uploads/2023/01/Unity-Logo.png" }, { value: "Unreal Engine", src: "https://cdn2.unrealengine.com/ue-logo-stacked-unreal-engine-w-677x545-fac11de0943f.png" }], "Godot", null);
|
|
@@ -294,6 +297,9 @@
|
|
|
294
297
|
panelB.branch("File Inputs", { closed: closedDefault });
|
|
295
298
|
panelB.addFile("Classic");
|
|
296
299
|
panelB.addFile("Disabled", null, { disabled: true });
|
|
300
|
+
panelB.branch("Pad Inputs", { closed: closedDefault });
|
|
301
|
+
panelB.addPad("2D Pad", [0.5, 0.5], null, { padSize: "100px", min: -1, max: 2 });
|
|
302
|
+
panelB.addPad("Disabled 2D Pad", [0.5, 0.5], null, { disabled: true, padSize: "100px", min: -1, max: 2 });
|
|
297
303
|
}
|
|
298
304
|
|
|
299
305
|
// Rate
|
|
@@ -301,6 +307,7 @@
|
|
|
301
307
|
panelC.branch("Rate", { closed: closedDefault });
|
|
302
308
|
panelC.addRate("Basic Rate", 2, null);
|
|
303
309
|
panelC.addRate("Rate With Halfs", 4.5, null, { allowHalf: true });
|
|
310
|
+
panelC.addRate("Disabled Rate", 2, null, { disabled: true });
|
|
304
311
|
}
|
|
305
312
|
|
|
306
313
|
// DatePicker
|
|
@@ -312,6 +319,7 @@
|
|
|
312
319
|
panelC.addDate("Using Today's Date", null, null, { today: true });
|
|
313
320
|
panelC.addDate("Allow Until Today", null, null, { untilToday: true });
|
|
314
321
|
panelC.addDate("Allow From Today", null, null, { fromToday: true });
|
|
322
|
+
panelC.addDate("Disabled Date", "15/04/2025", null, { disabled: true });
|
|
315
323
|
}
|
|
316
324
|
|
|
317
325
|
// Tree
|
|
@@ -384,6 +392,7 @@
|
|
|
384
392
|
panelC.branch("List", { closed: closedDefault });
|
|
385
393
|
panelC.addList("Number List", [ 1, 2, 3, 4 ] );
|
|
386
394
|
panelC.addList("String List", [ 'GPTeam', 'Blat Bunny', 'Blat Panthers' ], 'Blat Panthers');
|
|
395
|
+
panelC.addList("Disabled List", [ 'GPTeam', 'Blat Bunny', 'Blat Panthers' ], 'Blat Panthers', null, { disabled: true } );
|
|
387
396
|
panelC.addList("String List with Icons", [['GPTeam', 'Gpu'], ['Blat Bunny', 'Bone'], ['Blat Panthers', 'PawPrint']], 'Blat Panthers');
|
|
388
397
|
}
|
|
389
398
|
|
|
@@ -393,6 +402,9 @@
|
|
|
393
402
|
panelC.addArray("Array", ['GPTeam', 'Blat Panthers', 'Blat Bunny'], (value, event) => {
|
|
394
403
|
console.log(value);
|
|
395
404
|
});
|
|
405
|
+
panelC.addArray("Disabled Array", ['GPTeam', 'Blat Panthers', 'Blat Bunny'], (value, event) => {
|
|
406
|
+
console.log(value);
|
|
407
|
+
}, { disabled: true } );
|
|
396
408
|
}
|
|
397
409
|
|
|
398
410
|
// Table
|
|
@@ -438,13 +450,15 @@
|
|
|
438
450
|
// Tags
|
|
439
451
|
{
|
|
440
452
|
panelC.branch("Tags", { closed: closedDefault });
|
|
441
|
-
panelC.addTags("
|
|
453
|
+
panelC.addTags("Classic Tags", "2d, karate, ai, engine, ps5, console");
|
|
454
|
+
panelC.addTags("Disabled Tags", "2d, karate, ai, engine, ps5, console", null, { disabled: true } );
|
|
442
455
|
}
|
|
443
456
|
|
|
444
457
|
// Layers
|
|
445
458
|
{
|
|
446
459
|
panelC.branch("Layers", { closed: closedDefault });
|
|
447
460
|
panelC.addLayers("Layers", 10);
|
|
461
|
+
panelC.addLayers("Disabled Layers", 10, null, { disabled: true });
|
|
448
462
|
}
|
|
449
463
|
|
|
450
464
|
// Progress
|
|
@@ -94,7 +94,13 @@
|
|
|
94
94
|
},
|
|
95
95
|
xonCreateFile: ( instance ) => {
|
|
96
96
|
return { name: "new_shader.wgsl", language: "WGSL" }
|
|
97
|
-
}
|
|
97
|
+
},
|
|
98
|
+
onContextMenu: ( editor, content, event ) => {
|
|
99
|
+
if( !content ) return;
|
|
100
|
+
return [
|
|
101
|
+
{ path: "Custom Action", callback: () => console.log( content ) }
|
|
102
|
+
];
|
|
103
|
+
},
|
|
98
104
|
});
|
|
99
105
|
|
|
100
106
|
// editor.loadFile("../data/animation.bml", { language: "JSON" });
|
package/examples/editor.html
CHANGED
|
@@ -876,7 +876,7 @@
|
|
|
876
876
|
{ name: "Make a copy", callback: (a) => console.log(a) },
|
|
877
877
|
{ name: "Favourite", callback: (a) => console.log(a) },
|
|
878
878
|
null,
|
|
879
|
-
{ name: "Delete", icon: "Trash2", className: "
|
|
879
|
+
{ name: "Delete", icon: "Trash2", className: "destructive", callback: (a) => console.log(a) },
|
|
880
880
|
]
|
|
881
881
|
}
|
|
882
882
|
});
|
|
@@ -887,7 +887,7 @@
|
|
|
887
887
|
}, { pattern: { uppercase: true } });
|
|
888
888
|
panel.addTextArea("Notes", "", (value, event) => {
|
|
889
889
|
console.log(value);
|
|
890
|
-
}, { placeholder: 'Some notes...' });
|
|
890
|
+
}, { placeholder: 'Some notes...', submitOnEnterKey: false });
|
|
891
891
|
panel.addKnob("A Small but disabled Knob", 4, 0, 200, value => { console.log(value) }, { size: 'sm', disabled: true });
|
|
892
892
|
panel.addKnob("A Knob", 4, 0, 200, value => { console.log(value) });
|
|
893
893
|
panel.addKnob("A Big Knob with Snap", 4, 0, 200, value => { console.log(value) }, { size: 'bg', snap: 4 });
|
|
@@ -965,17 +965,19 @@
|
|
|
965
965
|
let dialog = new LX.Dialog('Login', panel => {
|
|
966
966
|
|
|
967
967
|
const formData = {
|
|
968
|
-
|
|
968
|
+
username: {
|
|
969
969
|
value: "",
|
|
970
|
-
|
|
970
|
+
label: "Username",
|
|
971
971
|
icon: "User",
|
|
972
|
+
name: "username",
|
|
972
973
|
pattern: { minLength: 3 }
|
|
973
974
|
},
|
|
974
|
-
|
|
975
|
+
password: {
|
|
975
976
|
value: "",
|
|
977
|
+
label: "Password",
|
|
976
978
|
type: "password",
|
|
977
|
-
placeholder: "Enter password",
|
|
978
979
|
icon: "KeyRound",
|
|
980
|
+
name: "password",
|
|
979
981
|
pattern: { lowercase: true, uppercase: true, digit: true, minLength: 6 },
|
|
980
982
|
submit: true
|
|
981
983
|
}
|
|
@@ -985,7 +987,7 @@
|
|
|
985
987
|
if( !errors.length )
|
|
986
988
|
{
|
|
987
989
|
dialog.close();
|
|
988
|
-
LX.toast( "Logged in!", `Welcome ${ value.
|
|
990
|
+
LX.toast( "Logged in!", `Welcome ${ value.username } :)`);
|
|
989
991
|
}
|
|
990
992
|
else
|
|
991
993
|
{
|