@nebularstreams/libmui 2.5.47 → 2.5.49

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nebularstreams/libmui",
3
3
  "description": "Micro UI based on Mithril",
4
- "version": "2.5.47",
4
+ "version": "2.5.49",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "scripts": {
package/src/index.js CHANGED
@@ -25,6 +25,7 @@ import clone from "./util/util.clone"
25
25
  import Tokenizer from "./util/util.tokenizer"
26
26
  import {CoolContentTicker, CoolGenericTicker, GenericButtonTicker, optionsPrompt} from "./widgets/CoolContentTicker";
27
27
  import EmptyButton from "./widgets/EmptyButton";
28
+ import CoolerEmpty from "./widgets/CoolerEmpty";
28
29
  import tainter from "./util/tainter"
29
30
 
30
31
  import MainState, {implement} from "./app/MainState";
@@ -56,6 +57,7 @@ export {
56
57
  ColorJoePack,
57
58
  ComboPrompt,
58
59
  ComboWidget,
60
+ CoolerEmpty,
59
61
  Empty,
60
62
  EmptyButton,
61
63
  Icon,
@@ -20,8 +20,6 @@ const
20
20
  const item = items[index];
21
21
 
22
22
  confirmPromise(
23
- null,
24
-
25
23
  "Choose an action for this preset",
26
24
 
27
25
  onAdd && allowUpdate
@@ -0,0 +1,37 @@
1
+ import m from "mithril"
2
+ import {defineWidget, ButtonNew, Empty} from "./Basic.js"
3
+
4
+
5
+ function TRANSLATE(message, arr, def) {
6
+ return arr ? arr[message] || (def || message) : (def || message);
7
+ }
8
+
9
+ const
10
+ CoolerEmpty = {
11
+ oninit: ({attrs}) => {
12
+ attrs.oninit && attrs.oninit()
13
+ },
14
+ view: ({attrs}) => m(Empty, {
15
+ class: attrs.class,
16
+ icon: attrs.icon,
17
+ size: attrs.size || 4
18
+ }, [
19
+ ...attrs.header ? [m("h3.pad-2.marg-0", TRANSLATE(attrs.header, attrs.headers))] : [],
20
+ m(".pad-2", TRANSLATE(attrs.message, attrs.messages)),
21
+ ...attrs.action ? [
22
+ m(ButtonNew, {
23
+ text: attrs.action.caption,
24
+ class: "accentbutton marg-4 marg-v pad-2 font-150",
25
+ onClick: attrs.action.onclick
26
+ })
27
+ ] : [],
28
+ ...attrs.actions
29
+ ? attrs.actions.map((action) => m(ButtonNew, {
30
+ text: action.caption,
31
+ class: "accentbutton marg-4 marg-v pad-2 font-150",
32
+ onClick: action.onclick
33
+ }))
34
+ : []
35
+ ])
36
+ };
37
+ export default CoolerEmpty;
@@ -113,8 +113,8 @@ const SmileysWidget = defineWidget(
113
113
  [
114
114
  m(InputWidget, {
115
115
  hint: "search emoji ...",
116
- containerClass: "bottombox forinputs unitheight col-12 font-125 order-end noshrink",
117
- class: "font-125 transparent",
116
+ containerClass: "bottombox forinputs unitheight col-12 font-125 order-end noshrink bg-inputs",
117
+ class: "font-125 transparent pad-1 pad-h",
118
118
  autofocus: true,
119
119
  value: filterText,
120
120
  oninput: (value) => {
@@ -25,7 +25,7 @@
25
25
  display: flex;
26
26
  flex-direction: column;
27
27
  justify-content: center;
28
- background: var(--window-background-hi);
28
+ /* background: var(--window-background-hi); */
29
29
  margin: 1px;
30
30
  }
31
31
 
@@ -52,12 +52,16 @@
52
52
  width: auto;
53
53
  flex-wrap: wrap;
54
54
  justify-content: space-between;
55
- border-bottom: solid 3px var(--border-color);
56
- background: var(--window-background-hi);
55
+ border-bottom: solid 1px var(--border-color);
56
+ /* background: var(--window-background-hi); */
57
57
  font-size: 1rem;
58
58
  padding: 0.25rem;
59
59
  }
60
60
 
61
+ .smileyswidget .textfield {
62
+ justify-content: center;
63
+ padding-left: 0.5rem;
64
+ }
61
65
 
62
66
  .smileyswidget .categories.flexrow > div.isfav {
63
67
  color: yellow;