dlg-ui 1.0.17 → 1.0.19

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.
@@ -0,0 +1,26 @@
1
+ {
2
+ "workbench.colorCustomizations": {
3
+ "activityBar.activeBackground": "#125D0D",
4
+ "activityBar.background": "#125D0D",
5
+ "activityBar.foreground": "#e7e7e7",
6
+ "activityBar.inactiveForeground": "#e7e7e799",
7
+ "activityBarBadge.background": "#000000",
8
+ "activityBarBadge.foreground": "#e7e7e7",
9
+ "commandCenter.border": "#e7e7e799",
10
+ "sash.hoverBorder": "#125D0D",
11
+ "statusBar.background": "#125D0D",
12
+ "statusBar.foreground": "#e7e7e7",
13
+ "statusBarItem.hoverBackground": "#125D0D",
14
+ "statusBarItem.remoteBackground": "#125D0D",
15
+ "statusBarItem.remoteForeground": "#e7e7e7",
16
+ "titleBar.activeBackground": "#125D0D",
17
+ "titleBar.activeForeground": "#e7e7e7",
18
+ "titleBar.inactiveBackground": "#125D0D99",
19
+ "titleBar.inactiveForeground": "#e7e7e799"
20
+ },
21
+ "peacock.remoteColor": "290ea0",
22
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
23
+ "[javascript]": {
24
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
25
+ }
26
+ }
@@ -26,3 +26,449 @@
26
26
  flex-direction: column;
27
27
  margin: 5px 0px 5px 0px;
28
28
  }
29
+
30
+ /* === dropdown.css === */
31
+ .dropdown-option {
32
+ border-bottom-style: solid;
33
+ border-width: 2px;
34
+ width: 100%;
35
+ padding-left: 8px;
36
+ padding-right: 8px;
37
+ padding-top: 6px;
38
+ padding-bottom: 6px;
39
+ box-sizing: border-box;
40
+ cursor: pointer;
41
+ }
42
+
43
+ .dropdown-option:hover {
44
+ background-color: black;
45
+ color: white;
46
+ border: black;
47
+ }
48
+
49
+ .dropdown-options {
50
+ white-space: normal;
51
+ max-height: 0;
52
+ overflow-wrap: break-word;
53
+ border-style: solid;
54
+ border-top-style: none;
55
+ border-bottom-style: none;
56
+ border-width: 2px;
57
+ background-color: #f6f6f6;
58
+ transform: scaleY(0);
59
+ transform-origin: top;
60
+ transition: opacity 0.2s ease, transform 0.2s ease;
61
+ opacity: 0;
62
+ position: absolute;
63
+ z-index: 1;
64
+ width: 100%;
65
+ box-sizing: border-box;
66
+ }
67
+
68
+ .dropdown-options.display {
69
+ opacity: 1;
70
+ max-height: 500px;
71
+ transform: scaleY(1);
72
+ }
73
+
74
+ .dropdown-placeholder {
75
+ font-style: italic;
76
+ color: #444;
77
+ }
78
+
79
+ .dropdown-select {
80
+ width: 100%;
81
+ padding-left: 8px;
82
+ padding-top: 8px;
83
+ padding-bottom: 8px;
84
+ padding-right: 20px;
85
+ box-sizing: border-box;
86
+ position: relative;
87
+ overflow: hidden;
88
+ white-space: nowrap;
89
+ text-overflow: ellipsis;
90
+ cursor: pointer;
91
+ border-style: solid;
92
+ border-width: 2px;
93
+ background-color: #eee;
94
+ user-select: none;
95
+ }
96
+
97
+ .dropdown-select::after {
98
+ content: '\25BC';
99
+ display: block;
100
+ position: absolute;
101
+ right: 0px;
102
+ top: 50%;
103
+ right: 8px;
104
+ pointer-events: none;
105
+ transition: transform 0.3s ease;
106
+ top: 25%;
107
+ }
108
+
109
+ .dropdown-select.open::after {
110
+ transform: rotate(-180deg);
111
+ transform-origin: center;
112
+ padding-right: 0px;
113
+ }
114
+
115
+ .dropdown-wrapper {
116
+ width: 100%;
117
+ position: relative;
118
+ }
119
+
120
+ .header-dropdown-options {
121
+ white-space: normal;
122
+ overflow-wrap: break-word;
123
+ border-style: solid;
124
+ border-top-style: none;
125
+ border-bottom-style: none;
126
+ border-width: 2px;
127
+ background-color: #f6f6f6;
128
+ max-height: 0;
129
+ opacity: 0;
130
+ transform: scaleY(0);
131
+ transform-origin: top;
132
+ transition: opacity 0.2s ease, transform 0.2s ease;
133
+ position: absolute;
134
+ z-index: 1;
135
+ width: 100%;
136
+ box-sizing: border-box;
137
+ }
138
+
139
+ .header-dropdown-options.open {
140
+ border-top-style: solid;
141
+ opacity: 1;
142
+ max-height: 500px;
143
+ transform: scaleY(1);
144
+ }
145
+
146
+ .header-dropdown-select {
147
+ width: fit-content;
148
+ max-width: 100%;
149
+ padding-top: 8px;
150
+ padding-bottom: 2px;
151
+ padding-right: 25px;
152
+ box-sizing: border-box;
153
+ position: relative;
154
+ overflow: hidden;
155
+ white-space: nowrap;
156
+ text-overflow: ellipsis;
157
+ cursor: pointer;
158
+ border-bottom-style: solid;
159
+ border-width: 2px;
160
+ user-select: none;
161
+ }
162
+
163
+ .header-dropdown-select.open {
164
+ border-bottom-style: none;
165
+ }
166
+
167
+ .header-dropdown-select::after {
168
+ content: '\25BE';
169
+ display: block;
170
+ position: absolute;
171
+ right: 0px;
172
+ top: 11%;
173
+ pointer-events: none;
174
+ transition: transform 0.3s ease;
175
+ font-size: 1.3rem;
176
+ }
177
+
178
+ .header-dropdown-select.open::after {
179
+ transform: rotate(-180deg);
180
+ transform-origin: center;
181
+ padding-right: 0px;
182
+ top: 16%;
183
+ }
184
+
185
+ .header-dropdown-selected {
186
+ font-weight: bold;
187
+ }
188
+
189
+ .header-dropdown-wrapper {
190
+ width: 100%;
191
+ position: relative;
192
+ }
193
+
194
+ /* === fly-in.css === */
195
+ .fly-in-container {
196
+ height: inherit;
197
+ }
198
+
199
+ .fly-in-dropdown {
200
+ background-color: #d6d6d6;
201
+ border-bottom-left-radius: 10px;
202
+ border: solid;
203
+ border-right: none;
204
+ border-width: 2px;
205
+ padding: 10px;
206
+ z-index: 2;
207
+ opacity: 0;
208
+ max-height: 0;
209
+ right: 0%;
210
+ display: none;
211
+ }
212
+
213
+ .fly-in-dropdown-hover {
214
+ opacity: 1;
215
+ max-height: 500px;
216
+ max-width: 500px;
217
+ }
218
+
219
+ .fly-in-icon {
220
+ align-self: center;
221
+ padding: 0.5em;
222
+ height: 50% !important;
223
+ width: auto !important;
224
+ }
225
+
226
+ .fly-in-image {
227
+ height: inherit;
228
+ padding: 0.5em;
229
+ box-sizing: border-box;
230
+ border-top-left-radius: 38%;
231
+ border-bottom-left-radius: 38%;
232
+ border-bottom-right-radius: 38%;
233
+ background-color: #e6e6e6;
234
+ position: relative;
235
+ }
236
+
237
+ .fly-in-preview {
238
+ height: inherit;
239
+ display: flex;
240
+ justify-self: start;
241
+ position: relative;
242
+ right: 43px;
243
+ margin-right: -43px;
244
+ }
245
+
246
+ .fly-in-title {
247
+ opacity: 0;
248
+ max-height: 0;
249
+ position: absolute;
250
+ top: 20%;
251
+ overflow: hidden;
252
+ transition: opacity 0.3s ease, max-height 0.3s ease;
253
+ }
254
+
255
+ .fly-in-wrapper:hover .fly-in-title {
256
+ opacity: 1;
257
+ max-height: 500px;
258
+ }
259
+
260
+ .fly-in-wrapper {
261
+ position: absolute;
262
+ display: flex;
263
+ flex-direction: column;
264
+ background-color: #d6d6d6;
265
+ right: 0%;
266
+ height: 10vh;
267
+ transition: width 0.3s ease;
268
+ min-width: 131px;
269
+ transition: min-width 0.3s ease;
270
+ }
271
+
272
+ /* === navbar.css === */
273
+ .navbar-body {
274
+ flex: 1 1 auto;
275
+ padding: 0 1em;
276
+ }
277
+
278
+ .navbar-container {
279
+ background-color: #eee;
280
+ position: sticky;
281
+ top: 0;
282
+ left: 0;
283
+ min-height: 5vh;
284
+ height: fit-content;
285
+ display: flex;
286
+ justify-content: space-between;
287
+ align-items: center;
288
+ z-index: 10;
289
+ padding: 0 1em;
290
+ }
291
+
292
+ .navbar-dropdown .header-dropdown-options {
293
+ position: absolute;
294
+ min-width: 60px !important;
295
+ }
296
+
297
+ .navbar-dropdown .header-dropdown-select {
298
+ padding-top: 0px;
299
+ border-bottom-style: none;
300
+ }
301
+
302
+ .navbar-dropdown .header-dropdown-select::after {
303
+ top: -3px;
304
+ }
305
+
306
+ .navbar-dropdown .header-dropdown-selected {
307
+ font-weight: normal;
308
+ }
309
+
310
+ .navbar-elements {
311
+ display: flex;
312
+ flex-wrap: wrap;
313
+ width: fit-content;
314
+ }
315
+
316
+ .navbar-selection {
317
+ padding: 8px;
318
+ display: flex;
319
+ align-items: center;
320
+ position: relative;
321
+ }
322
+
323
+ .navbar-selection::before {
324
+ content: '';
325
+ position: absolute;
326
+ top: 0;
327
+ left: 0;
328
+ width: 100%;
329
+ height: 100%;
330
+ transform: scaleY(0);
331
+ background-color: #cccccc;
332
+ z-index: -1;
333
+ transition: transform 0.3s ease;
334
+ transform-origin: bottom;
335
+ }
336
+
337
+ .navbar-selection:hover::before {
338
+ height: 100%;
339
+ transform: scaleY(1);
340
+ }
341
+
342
+ .navbar-title {
343
+ font-size: clamp(20px, 3vw, 30px);
344
+ margin-right: 1em;
345
+ width: fit-content;
346
+ white-space: nowrap;
347
+ font-weight: bold;
348
+ }
349
+
350
+ .navbar-wrapper {
351
+ display: flex;
352
+ flex-direction: column;
353
+ min-height: 100vh;
354
+ }
355
+
356
+ .navbar-yield {
357
+ display: flex;
358
+ justify-content: center;
359
+ flex: 1 1 auto;
360
+ padding-top: 8px;
361
+ }
362
+
363
+ /* === player-card.css === */
364
+ .player-card {
365
+ display: flex;
366
+ flex-direction: row;
367
+ padding: 0.5em;
368
+ font-size: 1em;
369
+ background-color: #f6f6f6;
370
+ border: solid;
371
+ }
372
+
373
+ .player-name {
374
+ width: 40%;
375
+ display: flex;
376
+ flex-direction: column;
377
+ justify-content: center;
378
+ align-items: center;
379
+ }
380
+
381
+ .player-pic {
382
+ width: 30%;
383
+ display: flex;
384
+ flex-direction: column;
385
+ justify-content: center;
386
+ align-items: center;
387
+ }
388
+
389
+ .player-points {
390
+ font-size: 0.8em;
391
+ }
392
+
393
+ .player-pos {
394
+ width: 10%;
395
+ display: flex;
396
+ flex-direction: column;
397
+ justify-content: center;
398
+ align-items: center;
399
+ }
400
+
401
+ .player-text {
402
+ text-align: center;
403
+ }
404
+
405
+ .player-trophy {
406
+ width: 20%;
407
+ display: flex;
408
+ flex-direction: column;
409
+ justify-content: center;
410
+ align-items: center;
411
+ position: relative;
412
+ }
413
+
414
+ .has-trophy::after {
415
+ content: '\00D7'var(--trophy-count);
416
+ color: Blue;
417
+ font-weight: 900;
418
+ font-size: 1.3em;
419
+ position: absolute;
420
+ left: 50%;
421
+ top: 30%;
422
+ transform: translate(-50%, -60%);
423
+ pointer-events: none;
424
+ text-shadow: 1px 1px 2px #0002;
425
+ }
426
+
427
+ .player-pic img,
428
+ .player-trophy img {
429
+ width: 100%;
430
+ height: auto;
431
+ display: block;
432
+ object-fit: contain;
433
+ }
434
+
435
+ .player-pic img {
436
+ border-radius: 50%;
437
+ }
438
+
439
+ .player-wrapper {
440
+ container-type: inline-size;
441
+ width: 100%;
442
+ }
443
+
444
+ @container (min-width: 100px) {
445
+ .player-card {
446
+ font-size: 0.6rem;
447
+ }
448
+ }
449
+ @container (min-width: 200px) {
450
+ .player-card {
451
+ font-size: 0.8rem;
452
+ }
453
+ }
454
+ @container (min-width: 300px) {
455
+ .player-card {
456
+ font-size: 1rem;
457
+ }
458
+ }
459
+ @container (min-width: 400px) {
460
+ .player-card {
461
+ font-size: 1.4rem;
462
+ }
463
+ }
464
+ @container (min-width: 500px) {
465
+ .player-card {
466
+ font-size: 1.5rem;
467
+ }
468
+ }
469
+ @container (min-width: 600px) {
470
+ .player-card {
471
+ font-size: 2rem;
472
+ }
473
+ }
474
+
@@ -5,6 +5,8 @@
5
5
  font-size: 1em;
6
6
  background-color: #f6f6f6;
7
7
  border: solid;
8
+ height: 100%;
9
+ box-sizing: border-box;
8
10
  }
9
11
 
10
12
  .player-name {
@@ -76,6 +78,7 @@
76
78
  .player-wrapper {
77
79
  container-type: inline-size;
78
80
  width: 100%;
81
+ height: 100%;
79
82
  }
80
83
 
81
84
  @container (min-width: 100px) {
@@ -107,4 +110,4 @@
107
110
  .player-card {
108
111
  font-size: 2rem;
109
112
  }
110
- }
113
+ }
package/index.js CHANGED
@@ -1,15 +1,54 @@
1
1
  'use strict';
2
2
 
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
3
6
  module.exports = {
4
7
  name: require('./package').name,
5
8
 
6
9
  included(app) {
7
10
  this._super.included.apply(this, arguments);
8
11
 
9
- // Import individual CSS files for proper processing
10
- app.import('addon/styles/dropdown.css');
11
- app.import('addon/styles/fly-in.css');
12
- app.import('addon/styles/navbar.css');
13
- app.import('addon/styles/player-card.css');
12
+ // Concatenate all CSS files into addon.css at build time
13
+ this.concatCSSFiles();
14
+ },
15
+
16
+ // Copy public assets to consuming app
17
+ treeForPublic() {
18
+ const publicTree = this._super.treeForPublic.apply(this, arguments);
19
+
20
+ // This will copy everything from addon/public to the consuming app's public folder
21
+ return publicTree;
22
+ },
23
+
24
+ concatCSSFiles() {
25
+ const stylesDir = path.join(__dirname, 'addon/styles');
26
+ const addonCssPath = path.join(stylesDir, 'addon.css');
27
+
28
+ const cssFiles = [
29
+ 'dropdown.css',
30
+ 'fly-in.css',
31
+ 'navbar.css',
32
+ 'player-card.css',
33
+ ];
34
+
35
+ // Start with existing addon.css content (without the @import statements)
36
+ let existingContent = fs.readFileSync(addonCssPath, 'utf8');
37
+
38
+ // Remove any @import statements
39
+ existingContent = existingContent.replace(/@import.*?;/g, '').trim();
40
+
41
+ let concatenatedCSS = existingContent + '\n\n';
42
+
43
+ // Append content from other CSS files
44
+ cssFiles.forEach((file) => {
45
+ const filePath = path.join(stylesDir, file);
46
+ if (fs.existsSync(filePath)) {
47
+ const content = fs.readFileSync(filePath, 'utf8');
48
+ concatenatedCSS += `/* === ${file} === */\n${content}\n\n`;
49
+ }
50
+ });
51
+
52
+ fs.writeFileSync(addonCssPath, concatenatedCSS);
14
53
  },
15
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dlg-ui",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "The default blueprint for ember-cli addons.",
5
5
  "keywords": [
6
6
  "ember-addon"