@nebularstreams/libmui 2.5.7 → 2.5.10

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.7",
4
+ "version": "2.5.10",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "scripts": {
@@ -3,6 +3,8 @@
3
3
  flex-direction: row;
4
4
  font-size: 1.5rem !important;
5
5
  position: relative;
6
+ color: var(--text);
7
+ font-variant: all-small-caps;
6
8
  }
7
9
 
8
10
  #modal-container button i {
@@ -15,7 +17,8 @@
15
17
  font-size: 1.5rem;
16
18
  background: var(--inputs);
17
19
  height: 2.54rem;
18
- margin-top: 0.25rem;;
20
+ margin-top: 0.25rem;
21
+ border: solid 1px var(--border-color);
19
22
  }
20
23
 
21
24
  .modal-content textarea {
@@ -35,12 +38,13 @@
35
38
 
36
39
  #modal-container > .modal-content {
37
40
  width: auto !important;
38
- min-width: 30%;
41
+ min-width: 500px;
39
42
  max-width: 50%;
40
43
  max-height: 75%;
41
44
  overflow-y: auto;
42
45
  background-color: var(--accent-light);
43
46
  border-radius: 1rem;
47
+ padding: 1rem;
44
48
  }
45
49
 
46
50
  #modal-container.iscustom {
@@ -63,9 +67,11 @@
63
67
  font-size: 1.25rem;
64
68
  padding: 0 0.75rem;
65
69
  border: solid 1px var(--border-color);
66
- border-radius: 0.25rem;
70
+ border-radius: 1rem;
67
71
  background: var(--inputs);
68
72
  outline: none;
73
+ color: var(--text);
74
+
69
75
  }
70
76
 
71
77
  #modaltitle {
@@ -99,6 +105,7 @@
99
105
  #modal-container button {
100
106
  background: transparent;
101
107
  border: none;
108
+ color: var(--text);
102
109
  }
103
110
 
104
111
  #modal-container .container {
package/src/style.js CHANGED
@@ -26,4 +26,6 @@ import "./widgets/css/range-anims.css"
26
26
  import "./widgets/css/separator.css"
27
27
  import "./widgets/css/smileys.css"
28
28
  import "./widgets/css/templatedinput.css"
29
- import "./widgets/css/uploadfile.css"
29
+ import "./widgets/css/uploadfile.css"
30
+ import "./widgets/css/colorjoe.css"
31
+ import "./widgets/css/mithril-range.css"
@@ -73,7 +73,7 @@ const CardieWidget = defineWidget(
73
73
  ? m(
74
74
  (element || "ul"),
75
75
  {
76
- class: "cardie ohidden noshrink "
76
+ class: "cardie ohidden "
77
77
  + (cols ? "flexcol " : "flexrow wrap ")
78
78
  + (attrs.class ? " " + attrs.class : "")
79
79
  + (nofold
@@ -0,0 +1,230 @@
1
+ #rgbValue, #hslaValue {
2
+ float: right;
3
+ }
4
+
5
+ .cj-container {
6
+ overflow: auto;
7
+ }
8
+
9
+ #showPicker {
10
+ float: left;
11
+ }
12
+
13
+ .colorjoe-popper .colorprobe i {
14
+ position: static !important;
15
+ }
16
+
17
+ .colorjoe-wrapper {
18
+ display: flex;
19
+ position: absolute;
20
+ left: 3%;
21
+ z-index: 100002;
22
+ width: 94%;
23
+ box-shadow: 0 0 3px var(--shadow-color);
24
+ background: var(--window-background);
25
+ border-radius: 0.5rem;
26
+ }
27
+
28
+ .colorPicker {
29
+ display: flex;
30
+ justify-content: space-evenly;
31
+ --colorjoe-size: 200px;
32
+ }
33
+
34
+ .colorjoe-popper .colorPicker {
35
+ --colorjoe-size: 300px;
36
+ }
37
+ /*
38
+ .colorPicker {
39
+ display: flex;
40
+ position: absolute;
41
+ left: 3%;
42
+ z-index: 100002;
43
+ width: 94%;
44
+ justify-content: space-evenly;
45
+ box-shadow: 0 0 3px var(--shadow-color);
46
+ padding: 0.6rem 0;
47
+ background: var(--window-background);
48
+ border-radius: 0.5rem;
49
+ margin: 0.5rem 0;
50
+ }
51
+ */
52
+
53
+ .underlay {
54
+ position: fixed;
55
+ top: 0;
56
+ left: 0;
57
+ height: 100%;
58
+ right: 0;
59
+ background: transparent;
60
+ z-index: 100000;
61
+ }
62
+
63
+ .colorPicker .extras {
64
+ float: right;
65
+ }
66
+
67
+ .colorPicker .extras .currentColorContainer {
68
+ overflow: hidden;
69
+ }
70
+
71
+ .colorPicker .extras .currentColor {
72
+ float: right;
73
+ width: 65px;
74
+ height: 30px;
75
+ border: 1px solid #BBB;
76
+ -moz-border-radius: .3em;
77
+ border-radius: .3em;
78
+ }
79
+
80
+ .colorPicker .extras .colorFields {
81
+ margin-top: 0.5em;
82
+ margin-bottom: 0.5em;
83
+ }
84
+
85
+ .colorPicker .extras .color {
86
+ text-align: right;
87
+ }
88
+
89
+ .colorPicker .extras .colorFields input {
90
+ width: 40px;
91
+ margin-left: 0.5em;
92
+ }
93
+
94
+ .colorPicker .extras .hex {
95
+ float: right;
96
+ }
97
+
98
+ .colorPicker .extras .hex input {
99
+ width: 60px;
100
+ }
101
+
102
+ .colorPicker .twod {
103
+ float: left;
104
+ margin: 0.5em;
105
+ }
106
+
107
+ /* main dimensions */
108
+ .colorPicker .twod, .colorPicker .twod .bg {
109
+ width: var(--colorjoe-size);
110
+ height: var(--colorjoe-size);
111
+ }
112
+
113
+ .colorPicker .oned, .colorPicker .oned .bg {
114
+ height: var(--colorjoe-size);
115
+ }
116
+
117
+ .colorPicker .oned, .colorPicker .oned .bg, .colorPicker .oned .pointer .shape {
118
+ width: 20px;
119
+ }
120
+
121
+ .colorPicker .twod .bg {
122
+ position: absolute;
123
+
124
+ /* These seem to cause issues in some browsers, careful!
125
+ border: 1px solid #BBB;
126
+ -moz-border-radius: .3em;
127
+ border-radius: .3em;
128
+ */
129
+ }
130
+
131
+ .colorPicker .twod .pointer {
132
+ position: relative;
133
+ z-index: 2;
134
+ width: 8px;
135
+ }
136
+
137
+ .colorPicker .twod .pointer .shape {
138
+ position: absolute;
139
+ }
140
+
141
+ .colorPicker .twod .pointer .shape1 {
142
+ -webkit-transform: translate(-50%, -50%);
143
+ -ms-transform: translate(-50%, -50%);
144
+ transform: translate(-50%, -50%);
145
+ width: 10px;
146
+ height: 10px;
147
+ border: 2px solid black;
148
+ -moz-border-radius: 5px;
149
+ border-radius: 5px;
150
+ }
151
+
152
+ .colorPicker .twod .pointer .shape2 {
153
+ -webkit-transform: translate(-50%, -50%);
154
+ -ms-transform: translate(-50%, -50%);
155
+ transform: translate(-50%, -50%);
156
+ width: 8px;
157
+ height: 8px;
158
+ border: 2px solid white;
159
+ -moz-border-radius: 4px;
160
+ border-radius: 4px;
161
+ }
162
+
163
+ .colorPicker .oned {
164
+ float: left;
165
+ margin: 0.5em;
166
+ }
167
+
168
+ .colorPicker .oned .bg {
169
+ border: 1px solid #BBB;
170
+ /*
171
+ -moz-border-radius: .3em;
172
+ border-radius: .3em;
173
+ */
174
+ }
175
+
176
+ .colorPicker .oned .pointer {
177
+ position: relative;
178
+ z-index: 2;
179
+ }
180
+
181
+ .colorPicker .oned .pointer .shape {
182
+ position: absolute;
183
+ margin-left: -1px;
184
+ margin-top: -4px;
185
+ height: 5px;
186
+ border: 2px solid black;
187
+ -moz-border-radius: 5px;
188
+ border-radius: 5px;
189
+ }
190
+
191
+ /* gradients, tweak as needed based on which browsers you want to support */
192
+ .colorPicker .oned .bg {
193
+ background: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 66%, #ff00ff 83%, #ff0000 100%);
194
+ }
195
+
196
+ .colorPicker .twod .bg1 {
197
+ z-index: 0;
198
+ background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
199
+ }
200
+
201
+ .colorPicker .twod .bg2 {
202
+ z-index: 1;
203
+ background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
204
+ }
205
+
206
+ #hslPicker .twod .bg1 {
207
+ background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 66%, #ff00ff 83%, #ff0000 100%);
208
+ }
209
+
210
+ #hslPicker .twod .bg2 {
211
+ background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(127, 127, 127, 1) 100%);
212
+ }
213
+
214
+ #hslPicker .oned .bg {
215
+ z-index: 1;
216
+ background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 100%);
217
+ }
218
+
219
+ #hslPicker .extras {
220
+ width: 100px;
221
+ }
222
+
223
+ #hslPicker .oned.alpha {
224
+ margin: 0;
225
+ }
226
+
227
+ #hslPicker .oned.alpha .bg,
228
+ .colorPicker .oned.alpha .bg {
229
+ background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(0, 0, 0, 0) 100%); /* W3C */
230
+ }
@@ -1,3 +1,7 @@
1
+ .textfield {
2
+ position: relative;
3
+ }
4
+
1
5
  .textfield input {
2
6
  height: 2rem;
3
7
  bordeR: solid 1px var(--border-color);
@@ -0,0 +1,69 @@
1
+ /* Styles for mithril-range */
2
+
3
+ /* Container hit area */
4
+ .mithril-range {
5
+ position: relative;
6
+ width: 100%;
7
+ padding: 0.7rem 0.5rem;
8
+ box-sizing: border-box;
9
+ user-select: none;
10
+ cursor: pointer;
11
+ outline: none !important;
12
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
13
+ font-size: 1rem;
14
+ }
15
+
16
+ .mithril-range:focus .mithril-range-handle {
17
+ background: var(--accent-alt) !important;
18
+ }
19
+
20
+ /* Bar in the middle of hit area */
21
+
22
+ .mithril-range-bar {
23
+ position: relative;
24
+ width: 100%;
25
+ height: 1.2rem;
26
+ box-sizing: border-box;
27
+ }
28
+
29
+ .mithril-range-bar-1 {
30
+ position: absolute;
31
+ left: 0;
32
+ top: 0.4rem;
33
+ width: 100%;
34
+ height: 0.3rem;
35
+ background-color: var(--accent);
36
+ box-sizing: border-box;
37
+ border-top-left-radius: 1rem;
38
+ border-bottom-left-radius: 1rem;
39
+ }
40
+
41
+ .mithril-range-bar-0 {
42
+ position: absolute;
43
+ right: 0;
44
+ top: 0.4rem;
45
+ width: 0;
46
+ height: 0.3rem;
47
+ box-sizing: border-box;
48
+ border-top-right-radius: 1rem;
49
+ border-bottom-right-radius: 1rem;
50
+ background: var(--window-background-lo);
51
+ }
52
+
53
+ /* Handle centered on bar */
54
+ .mithril-range-handle {
55
+ position: absolute;
56
+ left: 0;
57
+ top: 0.1rem;
58
+ display: inline-block;
59
+ background-color: #FFF;
60
+ width: 2px;
61
+ height: 0.8rem;
62
+ box-sizing: border-box;
63
+ border-top: 0;
64
+ border-bottom: 0;
65
+ box-shadow: 0 0 4px var(--shadow-color);
66
+ margin-top: 0.05rem;
67
+ }
68
+
69
+ /* End styles for mithril-range */