@nebularstreams/libmui 2.0.1 → 2.0.3

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,15 +1,12 @@
1
1
  {
2
2
  "name": "@nebularstreams/libmui",
3
3
  "description": "Micro UI based on Mithril",
4
- "version": "2.0.1",
4
+ "version": "2.0.3",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "scripts": {
8
8
  "build": "rollup -c"
9
9
  },
10
- "files": [
11
- "dist"
12
- ],
13
10
  "dependencies": {
14
11
  "mithril": "^2.0.0"
15
12
  },
@@ -0,0 +1,20 @@
1
+ import resolve from "@rollup/plugin-node-resolve";
2
+ import commonjs from "@rollup/plugin-commonjs";
3
+ import {terser} from "rollup-plugin-terser";
4
+ import postcss from "rollup-plugin-postcss";
5
+
6
+ export default {
7
+ input: "src/index.js",
8
+ output: [
9
+ {
10
+ file: "dist/libui.esm.js",
11
+ format: "es",
12
+ sourcemap: true,
13
+ }
14
+ ],
15
+ plugins: [resolve(), commonjs(), postcss({
16
+ extract: "libui.css", // Combine all CSS into this file
17
+ minimize: true, // Minify the CSS
18
+ }), terser()],
19
+ external: ["mithril"]
20
+ };
package/src/app/app.js ADDED
@@ -0,0 +1,9 @@
1
+ function startApp(target, appMetadata) {
2
+ m.route(
3
+ document.getElementById(target),
4
+ appMetadata.default || "/",
5
+ appMetadata.routes
6
+ );
7
+ }
8
+
9
+ export default startApp;
@@ -0,0 +1,5 @@
1
+ :root {
2
+ --unitsize-mini: 1.25rem;
3
+ --unitsize-small: 2rem;
4
+ --unitsize: 2.54rem;
5
+ }
@@ -0,0 +1,81 @@
1
+
2
+ .no-marg-top {
3
+ margin-top: 0 !important;
4
+ }
5
+
6
+ .no-marg-bottom {
7
+ margin-bottom: 0 !important;
8
+ }
9
+
10
+ .no-marg-right {
11
+ margin-right: 0 !important;
12
+ }
13
+
14
+ .no-marg-left {
15
+ margin-left: 0 !important;
16
+ }
17
+
18
+ .no-pad-top {
19
+ padding-top: 0 !important;
20
+ }
21
+
22
+ .no-pad-bottom {
23
+ padding-bottom: 0 !important;
24
+ }
25
+
26
+ .no-pad-left {
27
+ padding-left: 0 !important;
28
+ }
29
+
30
+ .no-pad-right {
31
+ padding-right: 0 !important;
32
+ }
33
+
34
+ .order-first {
35
+ order: -1;
36
+ }
37
+
38
+ .order-1 {
39
+ order: 1
40
+ }
41
+
42
+ .order-2 {
43
+ order: 2
44
+ }
45
+
46
+ .order-3 {
47
+ order: 3
48
+ }
49
+
50
+ .order-4 {
51
+ order: 4
52
+ }
53
+
54
+ .order-5 {
55
+ order: 5
56
+ }
57
+
58
+ .order-6 {
59
+ order: 6
60
+ }
61
+
62
+
63
+ .to-top {
64
+ top: 0;
65
+ bottom: auto !important;
66
+ }
67
+
68
+ .to-bottom {
69
+ bottom: 0;
70
+ top: auto !important;
71
+ }
72
+
73
+ .to-left {
74
+ left: 0;
75
+ right: auto !important;
76
+ }
77
+
78
+ .to-right {
79
+ right: 0;
80
+ left: auto !important;
81
+ }
@@ -0,0 +1,178 @@
1
+ /** b.root.bootstrap */
2
+
3
+ /* padding, ie. pad-1 pad-h */
4
+
5
+ .pad-0 {
6
+ padding: 0;
7
+ }
8
+
9
+ .pad-1 {
10
+ padding: 0.25rem;
11
+ }
12
+
13
+ .pad-2 {
14
+ padding: 0.5rem;
15
+ }
16
+
17
+ .pad-3 {
18
+ padding: 0.75rem;
19
+ }
20
+
21
+ .pad-4 {
22
+ padding: 1rem;
23
+ }
24
+
25
+ .pad-5 {
26
+ padding: 1.25rem;
27
+ }
28
+
29
+ .pad-6 {
30
+ padding: 1.5rem;
31
+ }
32
+
33
+ .pad-7 {
34
+ padding: 1.75rem;
35
+ }
36
+
37
+ .pad-8 {
38
+ padding: 2rem;
39
+ }
40
+
41
+ .pad-h {
42
+ padding-top: 0 !important;
43
+ padding-bottom: 0 !important;
44
+ }
45
+
46
+ .pad-v {
47
+ padding-left: 0 !important;
48
+ padding-right: 0 !important;
49
+ }
50
+
51
+ /* margin, ie. marg-1 marg-h */
52
+ .marg-0 {
53
+ margin: 0;
54
+ }
55
+
56
+
57
+ .marg-1 {
58
+ margin: 0.25rem;
59
+ }
60
+
61
+ .marg-2 {
62
+ margin: 0.5rem;
63
+ }
64
+
65
+ .marg-3 {
66
+ margin: 0.75rem;
67
+ }
68
+
69
+ .marg-4 {
70
+ margin: 1rem;
71
+ }
72
+
73
+
74
+ .marg-5 {
75
+ margin: 1.25rem;
76
+ }
77
+
78
+ .marg-6 {
79
+ margin: 1.5rem;
80
+ }
81
+
82
+ .marg-7 {
83
+ margin: 1.75rem;
84
+ }
85
+
86
+ .marg-8 {
87
+ margin: 2rem;
88
+ }
89
+
90
+ .marg-t {
91
+ margin-bottom: 0 !important;
92
+ margin-left: 0 !important;
93
+ margin-right: 0 !important;
94
+ }
95
+
96
+ .marg-b {
97
+ margin-top: 0 !important;
98
+ margin-left: 0 !important;
99
+ margin-right: 0 !important;
100
+ }
101
+
102
+ .marg-l {
103
+ margin-top: 0 !important;
104
+ margin-bottom: 0 !important;
105
+ margin-right: 0 !important;
106
+ }
107
+
108
+ .marg-r {
109
+ margin-top: 0 !important;
110
+ margin-bottom: 0 !important;
111
+ margin-left: 0 !important;
112
+ }
113
+
114
+ .marg-h {
115
+ margin-top: 0 !important;
116
+ margin-bottom: 0 !important;
117
+ }
118
+
119
+ .marg-v {
120
+ margin-left: 0 !important;
121
+ margin-right: 0 !important;
122
+ }
123
+
124
+ .col-1 {
125
+ width: calc(100% / 12)
126
+ }
127
+
128
+ .col-2 {
129
+ width: calc(100% * 2 / 12)
130
+ }
131
+
132
+ .col-3 {
133
+ width: calc(100% * 3 / 12)
134
+ }
135
+
136
+ .col-4 {
137
+ width: calc(100% * 4 / 12)
138
+ }
139
+
140
+ .col-5 {
141
+ width: calc(100% * 5 / 12)
142
+ }
143
+
144
+ .col-6 {
145
+ width: calc(100% * 6 / 12)
146
+ }
147
+
148
+ .col-7 {
149
+ width: calc(100% * 7 / 12)
150
+ }
151
+
152
+ .col-8 {
153
+ width: calc(100% * 8 / 12)
154
+ }
155
+
156
+ .col-9 {
157
+ width: calc(100% * 9 / 12)
158
+ }
159
+
160
+ .col-10 {
161
+ width: calc(100% * 10 / 12)
162
+ }
163
+
164
+ .col-11 {
165
+ width: calc(100% * 11 / 12)
166
+ }
167
+
168
+ .col-12 {
169
+ width: 100%
170
+ }
171
+
172
+ .al-right {
173
+ text-align: right;
174
+ }
175
+
176
+ .al-center {
177
+ text-align: center;
178
+ }
@@ -0,0 +1,70 @@
1
+ /** b.root.flex */
2
+
3
+ .flexrow {
4
+ display: flex;
5
+ flex-direction: row;
6
+ }
7
+
8
+ .flexcol {
9
+ display: flex;
10
+ flex-direction: column;
11
+ }
12
+
13
+ .flexcenter {
14
+ align-self: center;
15
+ justify-content: center;
16
+ }
17
+
18
+ .flexaround {
19
+ justify-content: space-around;
20
+ }
21
+
22
+ .flexeven {
23
+ justify-content: space-evenly;
24
+ }
25
+
26
+ .flex-al-center {
27
+ align-items: center;
28
+ }
29
+
30
+ .flex-al-end {
31
+ align-items: flex-end;
32
+ }
33
+
34
+ .flex-sal-center {
35
+ align-self: center;
36
+ }
37
+
38
+ .flex-sal-end {
39
+ align-self: flex-end;
40
+ }
41
+
42
+ .wrap {
43
+ flex-wrap: wrap;
44
+ }
45
+
46
+ .grows {
47
+ flex-grow: 1;
48
+ }
49
+
50
+ .growsheight {
51
+ flex-grow: 1;
52
+ height: 50%;
53
+ }
54
+
55
+ .noshrink {
56
+ flex-shrink: 0;
57
+ }
58
+
59
+ .flexbreak {
60
+ flex-basis: 100%;
61
+ height: 0;
62
+ }
63
+
64
+ .flexrow.rev {
65
+ flex-direction: row-reverse;
66
+ }
67
+
68
+ .flexcol.rev {
69
+ flex-direction: column-reverse;
70
+ }
@@ -0,0 +1,37 @@
1
+ .w-100 {
2
+ width: 100%;
3
+ }
4
+
5
+ .w-75 {
6
+ width: 75%;
7
+ }
8
+
9
+ .w-50 {
10
+ width: 50%;
11
+ }
12
+
13
+ .w-60 {
14
+ width: 60%;
15
+ }
16
+
17
+ .w-40 {
18
+ width: 40%;
19
+ }
20
+ .w-66 {
21
+ width: 66.66666%;
22
+ }
23
+ .w-33 {
24
+ width: 33.333333%;
25
+ }
26
+
27
+ .h-100 {
28
+ height: 100%;
29
+ }
30
+
31
+ .h-75 {
32
+ height: 75%;
33
+ }
34
+
35
+ .h-50 {
36
+ height: 50%;
37
+ }
@@ -0,0 +1,55 @@
1
+ .fullwidth {
2
+ width: 100%;
3
+ }
4
+
5
+ .fullheight {
6
+ height: 100%;
7
+ }
8
+
9
+
10
+ .halfwidth {
11
+ width: 50%;
12
+ }
13
+
14
+ .halfheight {
15
+ height: 50%;
16
+ }
17
+
18
+ .fitheight {
19
+ height: fit-content;
20
+ }
21
+
22
+ .fitwidth {
23
+ width: fit-content;
24
+ }
25
+
26
+ .unitheight {
27
+ height: var(--unitsize);
28
+ line-height: var(--unitsize);
29
+ }
30
+
31
+ .unitwidth {
32
+ width: var(--unitsize);
33
+ }
34
+
35
+ .unitsize {
36
+ width: var(--unitsize) !important;
37
+ height: var(--unitsize) !important;
38
+ line-height: var(--unitsize) !important;
39
+ }
40
+
41
+
42
+ .unitheightsmall {
43
+ height: var(--unitsize-small);
44
+ line-height: var(--unitsize-small);
45
+ }
46
+
47
+ .unitwidthsmall {
48
+ width: var(--unitsize-small);
49
+ }
50
+
51
+ .unitsizesmall {
52
+ width: var(--unitsize-small);
53
+ height: var(--unitsize-small);
54
+ line-height: var(--unitsize-small);
55
+ }
@@ -0,0 +1,48 @@
1
+ .fg-accent {
2
+ color: var(--accent);
3
+ }
4
+
5
+ .primary {
6
+ color: var(--primary-color);
7
+ }
8
+
9
+ .accent-back {
10
+ color: var(--text-over-accent);
11
+ background-color: var(--accent) !important;
12
+ }
13
+
14
+ .bg-accent {
15
+ color: var(--text-over-accent) !important;
16
+ background-color: var(--accent) !important;
17
+ }
18
+
19
+ .bg-accent-light {
20
+ background-color: var(--accent-light) !important;
21
+ }
22
+
23
+ .bg-accent-dark {
24
+ color: var(--text-over-accent) ;
25
+ background-color: var(--accent-dark) !important;
26
+ }
27
+
28
+ .bg-primary {
29
+ background-color: var(--primary-color) !important;
30
+ color: var(--text-over-primary);
31
+ }
32
+
33
+ .bg-window {
34
+ background-color: var(--window-background) !important;
35
+ color: var(--text);
36
+ }
37
+
38
+ .bg-window-hi {
39
+ background-color: var(--window-background-hi) !important;
40
+ color: var(--text);
41
+ }
42
+
43
+
44
+ .bg-window-lo {
45
+ background-color: var(--window-background-lo) !important;
46
+ color: var(--text);
47
+ }
48
+
@@ -0,0 +1,111 @@
1
+
2
+ .relative {
3
+ position: relative;
4
+ }
5
+
6
+ .absolute {
7
+ position: absolute;
8
+ }
9
+
10
+ .absolute.right {
11
+ right: 0;
12
+ }
13
+
14
+ .absolute.bottom {
15
+ bottom: 0;
16
+ }
17
+
18
+ .scrolly {
19
+ overflow-y: auto !important;
20
+ overflow-x: hidden;
21
+ -webkit-overflow-scrolling: touch;
22
+ -ms-overflow-style: -ms-autohiding-scrollbar;
23
+ scrollbar-width: none; /* Firefox */
24
+ }
25
+
26
+ .scrollx::-webkit-scrollbar,
27
+ .scrolly::-webkit-scrollbar {
28
+ display: none;
29
+ }
30
+
31
+ /* Hide scrollbar for IE, Edge and Firefox */
32
+
33
+ .scrollx {
34
+ overflow-y: hidden;
35
+ overflow-x: auto !important;
36
+ -webkit-overflow-scrolling: touch;
37
+ -ms-overflow-style: -ms-autohiding-scrollbar;
38
+ scrollbar-width: none; /* Firefox */
39
+ }
40
+
41
+ .scroll {
42
+ overflow: auto !important;
43
+ -webkit-overflow-scrolling: touch;
44
+ }
45
+
46
+ .vcenter {
47
+ vertical-align: middle;
48
+ }
49
+
50
+ .monospace {
51
+ white-space: pre-wrap;
52
+ font-family: monospace;
53
+ }
54
+
55
+
56
+ .ohidden {
57
+ overflow: hidden;
58
+ }
59
+
60
+ .font-50 {
61
+ font-size: 0.5rem;
62
+ }
63
+
64
+ .font-75 {
65
+ font-size: 0.75rem;
66
+ }
67
+
68
+ .font-100 {
69
+ font-size: 1rem;
70
+ }
71
+
72
+ .font-125 {
73
+ font-size: 1.25rem;
74
+ }
75
+
76
+ .font-150 {
77
+ font-size: 1.5rem;
78
+ }
79
+
80
+ .font-100 {
81
+ font-size: 1rem;
82
+ }
83
+
84
+ .vcenter {
85
+ vertical-align: middle;
86
+ }
87
+
88
+ .shadow-1 {
89
+ box-shadow: 0 0 1px var(--shadow-color);
90
+ z-index: 100;
91
+ }
92
+
93
+ .shadow-2 {
94
+ box-shadow: 0 0 2px var(--shadow-color);
95
+ z-index: 100;
96
+ }
97
+
98
+ .shadow-3 {
99
+ box-shadow: 0 0 3px var(--shadow-color);
100
+ z-index: 100;
101
+ }
102
+
103
+ .shadow-4 {
104
+ box-shadow: 0 0 4px var(--shadow-color);
105
+ z-index: 100;
106
+ }
107
+
108
+ .pointer {
109
+ cursor: pointer;
110
+ }
111
+
@@ -0,0 +1,3 @@
1
+ * {
2
+ box-sizing: border-box;
3
+ }
@@ -0,0 +1,60 @@
1
+
2
+ body {
3
+ padding: 0;
4
+ margin: 0;
5
+ overflow: hidden;
6
+ font-family: sans-serif;
7
+ background: black no-repeat center;
8
+ background-size: cover;
9
+ box-sizing: border-box;
10
+ }
11
+
12
+ body.error:after {
13
+ content: attr(data-error);
14
+ position: absolute;
15
+ width: calc(100% - 4rem);
16
+ bottom: 0;
17
+ margin: 2rem;
18
+ font-size: 1.5rem;
19
+ color: white;
20
+ text-align: center;
21
+ border: solid 1px rgba(255, 25, 25, 0.5);
22
+ padding: 2rem;
23
+ left: 0;
24
+ box-sizing: border-box;
25
+ background: rgba(80, 0, 0, 0.8);
26
+ border-radius: 1rem;
27
+ }
28
+ body.loading canvas,
29
+ body.loading .ui-button,
30
+ body.loading .popper {
31
+ opacity: 0;
32
+ }
33
+
34
+ body.loading .progressbar {
35
+ display: block;
36
+ }
37
+
38
+ canvas {
39
+ position: absolute;
40
+ width: 100% !important;
41
+ height: 100% !important;
42
+ }
43
+
44
+ .progressbar {
45
+ display: none;
46
+ bottom: 1rem;
47
+ left: 1rem;
48
+ right: 1rem;
49
+ height: 0.5rem;
50
+ position: absolute;
51
+ }
52
+
53
+ .progressbar > div {
54
+ background: white;
55
+ height: 100%;
56
+ position: absolute;
57
+ left: 0;
58
+ top: 0;
59
+ border-radius: 1rem;
60
+ }
@@ -0,0 +1,6 @@
1
+ .cardiebody {
2
+ display: flex;
3
+ flex-direction: row;
4
+ align-items: self-start;
5
+ }
6
+