lexgui 0.5.5 → 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.
@@ -324,6 +324,28 @@
324
324
  .rounded-lg { border-radius: 0.5rem }
325
325
  .rounded-full { border-radius: 9999px }
326
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
+
327
349
  .shadow { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) }
328
350
  .shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) }
329
351
  .shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1) }
@@ -331,6 +353,7 @@
331
353
  /* Interaction / Misc */
332
354
 
333
355
  .cursor-pointer { cursor: pointer }
356
+ .cursor-text { cursor: text }
334
357
  .pointer-events-none { pointer-events: none }
335
358
  .pointer-events-auto { pointer-events: auto }
336
359
 
package/changelog.md CHANGED
@@ -2,10 +2,22 @@
2
2
 
3
3
  ## dev
4
4
 
5
- ## 0.5.5 (master)
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
6
18
 
7
19
  Table Widget:
8
- - Added support `options.filterValue`..
20
+ - Added support `options.filterValue`.
9
21
  - Fixed filtering when row data contains HTML tags.
10
22
 
11
23
  Other Widgets:
@@ -18,7 +30,7 @@ Fixed some minor CodeEditor issues.
18
30
  Added `LX.stripHTML(html)` to get clean text from HTML string.
19
31
  Fixed all "popup" menus position in scrolled window.
20
32
  Added support for options `side`, `active` and `offset` in `LX.asTooltip(trigger, content, options)`.
21
- Allowed users to register extra icons in LX.ICONS using `LX.registerIcon`;
33
+ Allowed users to register extra icons in LX.ICONS using `LX.registerIcon`.
22
34
  Icons and Customization docs updated.
23
35
  Minor CSS improvements. Added more class utilities.
24
36
 
package/demo.js CHANGED
@@ -202,7 +202,7 @@ const area = LX.init( { strictViewport: false, rootClass: "wrapper" } );
202
202
  panel.addText("Text", "LexGUI.js @jxarco", null, {placeholder: "e.g. ColorPicker", icon: "fa fa-font"});
203
203
  panel.addColor("Font Color", "#303b8d", null);
204
204
  panel.addNumber("Font Size", 36, null, { min: 1, max: 48, step: 1, units: "px"});
205
- panel.addSelect("Font Family", ["Arial", "GeistSans", "Monospace"], "GeistSans");
205
+ panel.addSelect("Font Family", ["Arial", "GeistSans", "Monospace", "Ubuntu"], "GeistSans");
206
206
  panel.addVector2("2D Position", [300, 350], null, { min: 0, max: 1024 });
207
207
  const opacityValues = [
208
208
  [0.2, 0.3146875],
@@ -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.addButton(null, LX.makeIcon("circle-plus").innerHTML + "Button with Icon Start", null);
119
- buttonsLeftPanel.addButton(null, "Button with Icon End" + LX.makeIcon("circle-plus").innerHTML, null);
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", [1, 0.1, 0.6]);
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 });
@@ -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", [1, 0.1, 0.6], (value, event) => {
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) => {
@@ -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", [1, 0.1, 0.6], (value, event) => {
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", [1, 0.1, 0.6], (value, event) => {
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", [1, 0.1, 0.6], (value, event) => {
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) => {
@@ -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", [0.1, 0.1, 0.8], (value, event) => {
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) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lexgui",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "JS library to create web graphical user interfaces",
5
5
  "type": "module",
6
6
  "main": "./build/lexgui.js",