lexgui 0.5.4 → 0.5.6
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/codeeditor.js +20 -17
- package/build/lexgui.css +198 -118
- package/build/lexgui.js +1327 -237
- package/build/lexgui.min.css +1 -1
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +1327 -237
- package/build/lexgui.module.min.js +1 -1
- package/build/utilities.css +53 -0
- package/changelog.md +33 -1
- package/demo.js +17 -9
- package/examples/all_widgets.html +13 -3
- package/examples/area_tabs.html +1 -1
- package/examples/dialogs.html +3 -3
- package/examples/timeline.html +1 -1
- package/package.json +1 -1
package/build/utilities.css
CHANGED
|
@@ -153,6 +153,30 @@
|
|
|
153
153
|
.mr-7 { margin-right: 1.75rem }
|
|
154
154
|
.mr-8 { margin-right: 2rem }
|
|
155
155
|
|
|
156
|
+
.mx-0 { margin-left: 0; margin-right: 0 }
|
|
157
|
+
.mx-1 { margin-left: 0.25rem; margin-right: 0.25rem }
|
|
158
|
+
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem }
|
|
159
|
+
.mx-3 { margin-left: 0.75rem; margin-right: 0.75rem }
|
|
160
|
+
.mx-4 { margin-left: 1rem; margin-right: 1rem }
|
|
161
|
+
.mx-5 { margin-left: 1.25rem; margin-right: 1.25rem }
|
|
162
|
+
.mx-6 { margin-left: 1.5rem; margin-right: 1.5rem }
|
|
163
|
+
.mx-7 { margin-left: 1.75rem; margin-right: 1.75rem }
|
|
164
|
+
.mx-8 { margin-left: 2rem; margin-right: 2rem }
|
|
165
|
+
.mx-10 { margin-left: 2.5rem; margin-right: 2.5rem }
|
|
166
|
+
.mx-12 { margin-left: 3rem; margin-right: 3rem }
|
|
167
|
+
|
|
168
|
+
.my-0 { margin-top: 0; margin-bottom: 0 }
|
|
169
|
+
.my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem }
|
|
170
|
+
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem }
|
|
171
|
+
.my-3 { margin-top: 0.75rem; margin-bottom: 0.75rem }
|
|
172
|
+
.my-4 { margin-top: 1rem; margin-bottom: 1rem }
|
|
173
|
+
.my-5 { margin-top: 1.25rem; margin-bottom: 1.25rem }
|
|
174
|
+
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem }
|
|
175
|
+
.my-7 { margin-top: 1.75rem; margin-bottom: 1.75rem }
|
|
176
|
+
.my-8 { margin-top: 2rem; margin-bottom: 2rem }
|
|
177
|
+
.my-10 { margin-top: 2.5rem; margin-bottom: 2.5rem }
|
|
178
|
+
.my-12 { margin-top: 3rem; margin-bottom: 3rem }
|
|
179
|
+
|
|
156
180
|
.p-0 { padding: 0 }
|
|
157
181
|
.p-1 { padding: 0.25rem }
|
|
158
182
|
.p-2 { padding: 0.5rem }
|
|
@@ -255,6 +279,11 @@
|
|
|
255
279
|
.h-full { height: 100% }
|
|
256
280
|
.h-screen { height: 100vh }
|
|
257
281
|
|
|
282
|
+
.resize-none { resize: none }
|
|
283
|
+
|
|
284
|
+
.size-fixed { field-sizing: fixed }
|
|
285
|
+
.size-content { field-sizing: content }
|
|
286
|
+
|
|
258
287
|
/* Positioning */
|
|
259
288
|
|
|
260
289
|
.relative { position: relative }
|
|
@@ -276,6 +305,7 @@
|
|
|
276
305
|
/* Borders / Radius / Shadow */
|
|
277
306
|
|
|
278
307
|
.border { border: 1px solid var(--global-color-tertiary) }
|
|
308
|
+
.border-colored { border: 1px solid currentColor }
|
|
279
309
|
|
|
280
310
|
.border-top { border-top: 1px solid var(--global-color-tertiary) }
|
|
281
311
|
.border-bottom { border-bottom: 1px solid var(--global-color-tertiary) }
|
|
@@ -294,6 +324,28 @@
|
|
|
294
324
|
.rounded-lg { border-radius: 0.5rem }
|
|
295
325
|
.rounded-full { border-radius: 9999px }
|
|
296
326
|
|
|
327
|
+
.rounded-t-none { border-top-left-radius: 0; border-top-right-radius: 0 }
|
|
328
|
+
.rounded-r-none { border-top-right-radius: 0; border-bottom-right-radius: 0 }
|
|
329
|
+
.rounded-b-none { border-bottom-right-radius: 0; border-bottom-left-radius: 0 }
|
|
330
|
+
.rounded-l-none { border-top-left-radius: 0; border-bottom-left-radius: 0 }
|
|
331
|
+
|
|
332
|
+
.rounded-t { border-top-left-radius: 0.25rem; border-top-right-radius: 0.25rem }
|
|
333
|
+
.rounded-r { border-top-right-radius: 0.25rem; border-bottom-right-radius: 0.25rem }
|
|
334
|
+
.rounded-b { border-bottom-right-radius: 0.25rem; border-bottom-left-radius: 0.25rem }
|
|
335
|
+
.rounded-l { border-top-left-radius: 0.25rem; border-bottom-left-radius: 0.25rem }
|
|
336
|
+
|
|
337
|
+
.rounded-t-lg { border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem }
|
|
338
|
+
.rounded-r-lg { border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem }
|
|
339
|
+
.rounded-b-lg { border-bottom-right-radius: 0.5rem; border-bottom-left-radius: 0.5rem }
|
|
340
|
+
.rounded-l-lg { border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem }
|
|
341
|
+
|
|
342
|
+
.rounded-t-full { border-top-left-radius: 9999px; border-top-right-radius: 9999px }
|
|
343
|
+
.rounded-r-full { border-top-right-radius: 9999px; border-bottom-right-radius: 9999px }
|
|
344
|
+
.rounded-b-full { border-bottom-right-radius: 9999px; border-bottom-left-radius: 9999px }
|
|
345
|
+
.rounded-l-full { border-top-left-radius: 9999px; border-bottom-left-radius: 9999px }
|
|
346
|
+
|
|
347
|
+
.outline-none { outline: none }
|
|
348
|
+
|
|
297
349
|
.shadow { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) }
|
|
298
350
|
.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) }
|
|
299
351
|
.shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1) }
|
|
@@ -301,6 +353,7 @@
|
|
|
301
353
|
/* Interaction / Misc */
|
|
302
354
|
|
|
303
355
|
.cursor-pointer { cursor: pointer }
|
|
356
|
+
.cursor-text { cursor: text }
|
|
304
357
|
.pointer-events-none { pointer-events: none }
|
|
305
358
|
.pointer-events-auto { pointer-events: auto }
|
|
306
359
|
|
package/changelog.md
CHANGED
|
@@ -2,7 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
## dev
|
|
4
4
|
|
|
5
|
-
## 0.5.
|
|
5
|
+
## 0.5.6 (master)
|
|
6
|
+
|
|
7
|
+
Widgets:
|
|
8
|
+
- ColorInput Widget now uses a new custom `ColorPicker`.
|
|
9
|
+
- `selectAll` input is now checked when every row is selected in Table Widget.
|
|
10
|
+
- Added new OTPInput widget.
|
|
11
|
+
- SwapButton functionality `options.swap` supported in default Button Widget.
|
|
12
|
+
|
|
13
|
+
Added `LX.makeKbd(keys, extraClass)` to create keyboard shortcuts.
|
|
14
|
+
Fixed Badges theming issues.
|
|
15
|
+
Docs updated.
|
|
16
|
+
|
|
17
|
+
## 0.5.5
|
|
18
|
+
|
|
19
|
+
Table Widget:
|
|
20
|
+
- Added support `options.filterValue`.
|
|
21
|
+
- Fixed filtering when row data contains HTML tags.
|
|
22
|
+
|
|
23
|
+
Other Widgets:
|
|
24
|
+
- Support for TextInput `options.fit`.
|
|
25
|
+
- Select Widget box alignment using custom overflow container (default is closer Area).
|
|
26
|
+
- `options.overflowContainer`, `options.overflowContainerX`, `options.overflowContainerY`
|
|
27
|
+
|
|
28
|
+
Added Area Tabs option `allowDelete`, `false` by default.
|
|
29
|
+
Fixed some minor CodeEditor issues.
|
|
30
|
+
Added `LX.stripHTML(html)` to get clean text from HTML string.
|
|
31
|
+
Fixed all "popup" menus position in scrolled window.
|
|
32
|
+
Added support for options `side`, `active` and `offset` in `LX.asTooltip(trigger, content, options)`.
|
|
33
|
+
Allowed users to register extra icons in LX.ICONS using `LX.registerIcon`.
|
|
34
|
+
Icons and Customization docs updated.
|
|
35
|
+
Minor CSS improvements. Added more class utilities.
|
|
36
|
+
|
|
37
|
+
## 0.5.4
|
|
6
38
|
|
|
7
39
|
Widgets:
|
|
8
40
|
- Added support for disabling resize in TextArea Widget `options.resize: false`.
|
package/demo.js
CHANGED
|
@@ -64,7 +64,8 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
64
64
|
m.add( "Scene/New Scene", () => { console.log("New scene created!") });
|
|
65
65
|
m.add( "Scene/Open Scene", { icon: "fa-solid fa-folder-open", short: "S" } );
|
|
66
66
|
m.add( "Scene/Open Recent/hello.scene" );
|
|
67
|
-
m.add( "Scene/Open Recent/goodbye.scene" );
|
|
67
|
+
m.add( "Scene/Open Recent/Old/goodbye.scene" );
|
|
68
|
+
m.add( "Scene/Open Recent/Old/salute.scene" );
|
|
68
69
|
m.add( "Project/Project Settings", { disabled: true } );
|
|
69
70
|
m.add( "Project/" );
|
|
70
71
|
m.add( "Project/Export", { icon: "fa-solid fa-download" });
|
|
@@ -201,7 +202,7 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
201
202
|
panel.addText("Text", "LexGUI.js @jxarco", null, {placeholder: "e.g. ColorPicker", icon: "fa fa-font"});
|
|
202
203
|
panel.addColor("Font Color", "#303b8d", null);
|
|
203
204
|
panel.addNumber("Font Size", 36, null, { min: 1, max: 48, step: 1, units: "px"});
|
|
204
|
-
panel.addSelect("Font Family", ["Arial", "GeistSans", "Monospace"], "GeistSans");
|
|
205
|
+
panel.addSelect("Font Family", ["Arial", "GeistSans", "Monospace", "Ubuntu"], "GeistSans");
|
|
205
206
|
panel.addVector2("2D Position", [300, 350], null, { min: 0, max: 1024 });
|
|
206
207
|
const opacityValues = [
|
|
207
208
|
[0.2, 0.3146875],
|
|
@@ -250,7 +251,6 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
250
251
|
m.add( "Shopping ", { icon: "shopping-cart" } );
|
|
251
252
|
m.add( "Promotions", { icon: "flag", content: LX.badge("21", badgeClass, { asElement: true }) } );
|
|
252
253
|
}, {
|
|
253
|
-
// collapseToIcons: false,
|
|
254
254
|
className: "border-right",
|
|
255
255
|
headerTitle: "jxarco",
|
|
256
256
|
headerSubtitle: "alexroco.30@gmail.com",
|
|
@@ -453,13 +453,20 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
// Code
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
// } );
|
|
456
|
+
{
|
|
457
|
+
const codeContainer = LX.makeContainer( [ "auto", "800px" ], "flex flex-col border rounded-lg overflow-hidden" );
|
|
458
|
+
tabs.add( "Code", codeContainer );
|
|
460
459
|
|
|
461
|
-
|
|
462
|
-
|
|
460
|
+
const codeArea = new LX.Area();
|
|
461
|
+
codeContainer.appendChild( codeArea.root );
|
|
462
|
+
|
|
463
|
+
let editor = new LX.CodeEditor(codeArea, {
|
|
464
|
+
// allowAddScripts: false,
|
|
465
|
+
// autocomplete: false,
|
|
466
|
+
// disableEdition: true,
|
|
467
|
+
// fileExplorer: false
|
|
468
|
+
});
|
|
469
|
+
}
|
|
463
470
|
|
|
464
471
|
// Audio
|
|
465
472
|
// {
|
|
@@ -474,6 +481,7 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
|
|
|
474
481
|
// Footer
|
|
475
482
|
{
|
|
476
483
|
const footer = new LX.Footer( {
|
|
484
|
+
className: "border-top",
|
|
477
485
|
parent: LX.root,
|
|
478
486
|
columns: [
|
|
479
487
|
{
|
|
@@ -115,8 +115,12 @@
|
|
|
115
115
|
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "fa fa-cube", buttonClass: "bg-primary" });
|
|
116
116
|
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "fa fa-table-cells", buttonClass: "bg-tertiary fg-tertiary" });
|
|
117
117
|
buttonsLeftPanel.endLine("justify-start");
|
|
118
|
-
buttonsLeftPanel.
|
|
119
|
-
buttonsLeftPanel.
|
|
118
|
+
buttonsLeftPanel.sameLine();
|
|
119
|
+
buttonsLeftPanel.addLabel("Swap Buttons");
|
|
120
|
+
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "fa fa-moon", swap: "fa fa-sun", buttonClass: "bg-none" });
|
|
121
|
+
buttonsLeftPanel.addButton(null, "Not used", null, { icon: "fa fa-eye", swap: "fa fa-eye-slash" });
|
|
122
|
+
buttonsLeftPanel.endLine("justify-start");
|
|
123
|
+
buttonsLeftPanel.addButton(null, LX.makeIcon("circle-plus").innerHTML + "Button with Inlined Icon", null);
|
|
120
124
|
buttonsLeftPanel.addButton(null, "With a Badge" + LX.badge("+99", "accent sm"));
|
|
121
125
|
buttonsRightPanel.branch("Outline Buttons", { closed: closedDefault });
|
|
122
126
|
buttonsRightPanel.addButton(null, "Classic Outline", null, { buttonClass: "outline" });
|
|
@@ -207,9 +211,15 @@
|
|
|
207
211
|
panelB.addVector2("Classic Vec2", [0, 0], null);
|
|
208
212
|
panelB.addVector3("Disabled Vec3", [0, 0, 0], null, { disabled: true });
|
|
209
213
|
panelB.addVector4("Classic Vec4", [0, 0, 0, 0], null);
|
|
214
|
+
panelB.branch("OTP Inputs", { closed: closedDefault });
|
|
215
|
+
panelB.addOTP("Default Pattern", "464346");
|
|
216
|
+
panelB.addOTP("Custom Pattern", "23423411", null, { pattern: "xxxx-xxxx" });
|
|
217
|
+
panelB.addOTP("Empty", "");
|
|
218
|
+
panelB.addOTP("Disabled OTP", "965114", null, { disabled: true });
|
|
210
219
|
panelB.branch("Color Inputs", { closed: closedDefault });
|
|
211
220
|
panelB.addColor("From Hex Color", "#b7a9b1");
|
|
212
|
-
panelB.addColor("From RGB Color",
|
|
221
|
+
panelB.addColor("From RGB Color", { r: 1, g: 0.1, b: 0.6 });
|
|
222
|
+
panelB.addColor("Color With Alpha", "#47c1b7ff");
|
|
213
223
|
panelB.addColor("Disabled Color", "#b7a9b1", null, { disabled: true });
|
|
214
224
|
panelB.branch("Range Inputs", { closed: closedDefault });
|
|
215
225
|
panelB.addRange("Classic", 1, null, { min: 0, max: 10, step: 1 });
|
package/examples/area_tabs.html
CHANGED
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
panel.branch("Canvas", { icon: "fa-solid fa-palette", filter: true });
|
|
88
88
|
panel.addColor("Background", "#b7a9b1");
|
|
89
89
|
panel.addText("Text", "Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "fa fa-font" });
|
|
90
|
-
panel.addColor("Font Color",
|
|
90
|
+
panel.addColor("Font Color", { r: 1, g: 0.1, b: 0.6 }, (value, event) => {
|
|
91
91
|
console.log("Font Color: ", value);
|
|
92
92
|
});
|
|
93
93
|
panel.addNumber("Font Size", 36, (value, event) => {
|
package/examples/dialogs.html
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
p.branch("Canvas");
|
|
31
31
|
p.addColor("Background", "#b7a9b1");
|
|
32
32
|
p.addText("Text", "Pocket Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "fa fa-font" });
|
|
33
|
-
p.addColor("Font Color",
|
|
33
|
+
p.addColor("Font Color", { r: 1, g: 0.1, b: 0.6 }, (value, event) => {
|
|
34
34
|
console.log("Font Color: ", value);
|
|
35
35
|
});
|
|
36
36
|
p.addNumber("Font Size", 36, (value, event) => {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
p.branch("Canvas");
|
|
51
51
|
p.addColor("Background", "#b7a9b1");
|
|
52
52
|
p.addText("Text", "Dialog Lexgui.js @jxarco", null, { placeholder: "e.g. ColorPicker", icon: "fa fa-font" });
|
|
53
|
-
p.addColor("Font Color",
|
|
53
|
+
p.addColor("Font Color", { r: 1, g: 0.1, b: 0.6 }, (value, event) => {
|
|
54
54
|
console.log("Font Color: ", value);
|
|
55
55
|
});
|
|
56
56
|
p.addNumber("Font Size", 36, (value, event) => {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
p.addSelect("Best Engine", ["Godot", "Unity", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Unreal Engine", "Pepe"], "Godot", (value, event) => {
|
|
73
73
|
console.log(value);
|
|
74
74
|
}, { filter: true });
|
|
75
|
-
p.addColor("Font Color",
|
|
75
|
+
p.addColor("Font Color", { r: 1, g: 0.1, b: 0.6 }, (value, event) => {
|
|
76
76
|
console.log("Font Color: ", value);
|
|
77
77
|
});
|
|
78
78
|
p.addNumber("Font Size", 36, (value, event) => {
|
package/examples/timeline.html
CHANGED
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
panel.addColor("Background", LX.getThemeColor("global-selected-light"));
|
|
117
117
|
panel.addText("Track", trackName, null)
|
|
118
118
|
panel.addText("Text", "Lexgui.js @evallsg", null, {placeholder: "e.g. ColorPicker", icon: "fa fa-font"});
|
|
119
|
-
panel.addColor("Font Color",
|
|
119
|
+
panel.addColor("Font Color", { r: 1, g: 0.1, b: 0.6 }, (value, event) => {
|
|
120
120
|
console.log("Font Color: ", value);
|
|
121
121
|
});
|
|
122
122
|
panel.addNumber("Font Size", 36, (value, event) => {
|