@finqu/cool 1.2.0 → 1.2.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/dist/css/cool-grid.css +2 -2
- package/dist/css/cool-grid.css.map +3 -3
- package/dist/css/cool-grid.min.css +1 -1
- package/dist/css/cool-grid.min.css.map +1 -1
- package/dist/css/cool-reboot.css +2 -2
- package/dist/css/cool-reboot.css.map +6 -6
- package/dist/css/cool-reboot.min.css +1 -1
- package/dist/css/cool-reboot.min.css.map +1 -1
- package/dist/css/cool.css +2668 -726
- package/dist/css/cool.css.map +18 -18
- package/dist/css/cool.min.css +2 -2
- package/dist/css/cool.min.css.map +1 -1
- package/dist/js/cool.bundle.js +119 -32
- package/dist/js/cool.bundle.js.map +1 -1
- package/dist/js/cool.bundle.min.js +2 -2
- package/dist/js/cool.bundle.min.js.map +1 -1
- package/dist/js/cool.esm.js +119 -32
- package/dist/js/cool.esm.js.map +1 -1
- package/dist/js/cool.esm.min.js +2 -2
- package/dist/js/cool.esm.min.js.map +1 -1
- package/dist/js/cool.js +119 -32
- package/dist/js/cool.js.map +1 -1
- package/dist/js/cool.min.js +2 -2
- package/dist/js/cool.min.js.map +1 -1
- package/html/dropdown-test.html +200 -0
- package/html/index.html +480 -5
- package/js/dist/collapse.js +1 -1
- package/js/dist/common.js +677 -545
- package/js/dist/common.js.map +1 -1
- package/js/dist/dropdown.js +3188 -1819
- package/js/dist/dropdown.js.map +1 -1
- package/js/dist/popover.js +1 -1
- package/js/dist/sectiontabs.js +1 -1
- package/js/dist/select.js +2842 -2649
- package/js/dist/select.js.map +1 -1
- package/js/dist/tooltip.js +1 -1
- package/js/src/common.js +8 -0
- package/js/src/dialog.js +6 -1
- package/js/src/dropdown.js +77 -5
- package/js/src/select.js +31 -31
- package/package.json +21 -21
- package/scss/_alert.scss +79 -82
- package/scss/_badge.scss +16 -22
- package/scss/_dialog.scss +1 -0
- package/scss/_dropdown.scss +1 -4
- package/scss/_frame.scss +23 -3
- package/scss/_functions.scss +10 -0
- package/scss/_images.scss +7 -1
- package/scss/_navbar.scss +40 -0
- package/scss/_section.scss +14 -0
- package/scss/_type.scss +37 -6
- package/scss/_variables.scss +4 -3
- package/scss/cool-grid.scss +1 -1
- package/scss/cool-reboot.scss +1 -1
- package/scss/cool.scss +1 -1
- package/scss/mixins/_alert-variant.scss +13 -28
- package/scss/mixins/_badge-variant.scss +27 -5
- package/scss/mixins/_text-truncate.scss +77 -4
- package/scss/utilities/_cursor.scss +2 -2
- package/scss/utilities/_text.scss +4 -2
package/js/dist/tooltip.js
CHANGED
package/js/src/common.js
CHANGED
|
@@ -99,6 +99,10 @@ class Common {
|
|
|
99
99
|
linkDisabled = true;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
if (target.hasClass('table-link-exclude')) {
|
|
103
|
+
linkDisabled = true;
|
|
104
|
+
}
|
|
105
|
+
|
|
102
106
|
if (target.is('td, .td, img') && !linkDisabled) {
|
|
103
107
|
|
|
104
108
|
if (e.ctrlKey || e.metaKey) {
|
|
@@ -145,6 +149,10 @@ class Common {
|
|
|
145
149
|
btnDisabled = true;
|
|
146
150
|
}
|
|
147
151
|
|
|
152
|
+
if (target.hasClass('table-btn-exclude')) {
|
|
153
|
+
btnDisabled = true;
|
|
154
|
+
}
|
|
155
|
+
|
|
148
156
|
if (target.is('td, .td, img') && !btnDisabled) {
|
|
149
157
|
|
|
150
158
|
$(btn).click();
|
package/js/src/dialog.js
CHANGED
|
@@ -80,6 +80,11 @@ class Dialog {
|
|
|
80
80
|
onClose: settings.onClose
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
+
if (dialog.maxBodyHeight == null) {
|
|
84
|
+
|
|
85
|
+
dialog.maxBodyHeight = window.innerHeight - 200;
|
|
86
|
+
}
|
|
87
|
+
|
|
83
88
|
if (typeof dialog.template === 'function') {
|
|
84
89
|
|
|
85
90
|
dialog.$el = $(dialog.template());
|
|
@@ -534,7 +539,7 @@ if (typeof $ !== 'undefined') {
|
|
|
534
539
|
animationOut: 'fadeOut',
|
|
535
540
|
animationSpeed: 'fastest',
|
|
536
541
|
callbacks: {},
|
|
537
|
-
maxBodyHeight:
|
|
542
|
+
maxBodyHeight: null,
|
|
538
543
|
overflowVisible: false,
|
|
539
544
|
faPro: false,
|
|
540
545
|
debug: true,
|
package/js/src/dropdown.js
CHANGED
|
@@ -68,6 +68,7 @@ class Dropdown extends AbstractUIComponent {
|
|
|
68
68
|
this.minWidth = this.$el.data('minWidth') ? this.$el.data('minWidth') : this.opts.minWidth;
|
|
69
69
|
this.scroll = this.$el.data('scroll') ? this.$el.data('scroll') : this.opts.scroll;
|
|
70
70
|
this.scrollContentHeight = this.$el.data('scrollContentHeight') ? this.$el.data('scrollContentHeight') : this.opts.scrollContentHeight;
|
|
71
|
+
this.positionObserver = this.$el.attr('data-position-observer') ? JSON.parse(this.$el.attr('data-position-observer')) : this.opts.positionObserver;
|
|
71
72
|
this.closeOnItemClick = this.$el.data('closeOnItemClick') ? this.$el.data('closeOnItemClick') : this.opts.closeOnItemClick;
|
|
72
73
|
this.content = this.$el.data('content') ? this.$el.data('content') : this.opts.content;
|
|
73
74
|
this.contentOpen = false;
|
|
@@ -247,8 +248,10 @@ class Dropdown extends AbstractUIComponent {
|
|
|
247
248
|
let dropdownTriggerHeight = this.$el.outerHeight(true);
|
|
248
249
|
let dropdownTriggerPosX = this.$el.position().left;
|
|
249
250
|
let dropdownTriggerPosY = this.$el.position().top;
|
|
250
|
-
let dropdownPosX;
|
|
251
|
-
let dropdownPosY;
|
|
251
|
+
let dropdownPosX = 0;
|
|
252
|
+
let dropdownPosY = 0;
|
|
253
|
+
let offsetX = 0;
|
|
254
|
+
let offsetY = 0;
|
|
252
255
|
|
|
253
256
|
if (placement === 'top') {
|
|
254
257
|
|
|
@@ -283,14 +286,82 @@ class Dropdown extends AbstractUIComponent {
|
|
|
283
286
|
|
|
284
287
|
if (this.offset) {
|
|
285
288
|
|
|
286
|
-
|
|
287
|
-
let offsetX = offsets[0];
|
|
288
|
-
let offsetY = offsets[1];
|
|
289
|
+
const offsets = this.offset.split(',');
|
|
289
290
|
|
|
291
|
+
offsetX = offsets[0];
|
|
292
|
+
offsetY = offsets[1];
|
|
290
293
|
dropdownPosX += parseInt(offsetX, 10);
|
|
291
294
|
dropdownPosY += parseInt(offsetY, 10);
|
|
292
295
|
}
|
|
293
296
|
|
|
297
|
+
if (this.positionObserver) {
|
|
298
|
+
|
|
299
|
+
// this is not set during init so we have to fetch it
|
|
300
|
+
// and let's assume that this containing parent fits and is inside
|
|
301
|
+
// viewport
|
|
302
|
+
let $containingParent = null;
|
|
303
|
+
|
|
304
|
+
do {
|
|
305
|
+
$containingParent = $containingParent ? $containingParent.parent() : this.$container.parent();
|
|
306
|
+
|
|
307
|
+
if (!$containingParent) {
|
|
308
|
+
$containingParent = $('body');
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
} while ($containingParent.css('overflow-x') !== 'hidden' && $containingParent.css('overflow') !== 'hidden' && ($containingParent.prop('tagName') ? $containingParent.prop('tagName').toLowerCase() !== 'body' : false));
|
|
312
|
+
|
|
313
|
+
const containingBoundingRect = $containingParent.get(0).getBoundingClientRect();
|
|
314
|
+
const containerBoundingRect = this.$container.get(0).getBoundingClientRect();
|
|
315
|
+
|
|
316
|
+
if (containingBoundingRect.width < dropdownWidth) {
|
|
317
|
+
this.$dropdown.css('max-width', containingBoundingRect.width);
|
|
318
|
+
dropdownWidth = containingBoundingRect.width;
|
|
319
|
+
} else {
|
|
320
|
+
this.$dropdown.css('max-width', '');
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (containingBoundingRect.height < dropdownHeight) {
|
|
324
|
+
this.$dropdown.css('max-height', containingBoundingRect.height);
|
|
325
|
+
dropdownHeight = containingBoundingRect.height;
|
|
326
|
+
} else {
|
|
327
|
+
this.$dropdown.css('max-height', '');
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
const maxTop = Math.max(Math.abs(containingBoundingRect.y - containerBoundingRect.y), 0);
|
|
331
|
+
const maxLeft = Math.max(Math.abs(containingBoundingRect.x - containerBoundingRect.x), 0);
|
|
332
|
+
const maxRight = $containingParent.get(0).scrollWidth - (containerBoundingRect.x + containerBoundingRect.width);
|
|
333
|
+
const maxBottom = $containingParent.get(0).scrollHeight - (containerBoundingRect.y + (placement === 'dropbottom' ? containerBoundingRect.height : 0));
|
|
334
|
+
|
|
335
|
+
if (maxLeft < dropdownWidth && dropdownPosX < dropdownTriggerPosX) {
|
|
336
|
+
dropdownPosX = dropdownTriggerPosX;
|
|
337
|
+
|
|
338
|
+
// would be on top of the trigger
|
|
339
|
+
if (dropdownTriggerPosY + dropdownTriggerHeight > dropdownPosY) {
|
|
340
|
+
dropdownPosY = dropdownTriggerPosY + dropdownTriggerHeight + (offsetY > 0 ? offsetY : 0);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
if (maxRight < dropdownWidth && dropdownPosX + dropdownWidth > dropdownTriggerPosX + dropdownTriggerWidth) {
|
|
345
|
+
dropdownPosX = dropdownTriggerPosX + dropdownTriggerWidth - dropdownWidth;
|
|
346
|
+
|
|
347
|
+
if (dropdownTriggerPosY + dropdownTriggerHeight > dropdownPosY) {
|
|
348
|
+
dropdownPosY = dropdownTriggerPosY + dropdownTriggerHeight + (offsetY > 0 ? offsetY : 0);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
if (dropdownPosY < dropdownTriggerPosY && maxTop < dropdownHeight) {
|
|
353
|
+
dropdownPosY = dropdownTriggerPosY + dropdownTriggerHeight + offsetY;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
if (dropdownPosY >= dropdownTriggerPosY && maxBottom < dropdownHeight) {
|
|
357
|
+
if (dropdownPosX >= dropdownTriggerPosX + dropdownTriggerWidth || dropdownTriggerPosX >= dropdownPosX + dropdownWidth) {
|
|
358
|
+
dropdownPosY = dropdownTriggerPosY - (dropdownHeight - maxBottom);
|
|
359
|
+
} else {
|
|
360
|
+
dropdownPosY = dropdownTriggerPosY - dropdownHeight - offsetY
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
294
365
|
this.$dropdown.css({
|
|
295
366
|
position: 'absolute',
|
|
296
367
|
top: '0px',
|
|
@@ -427,6 +498,7 @@ if (typeof $ !== 'undefined') {
|
|
|
427
498
|
minWidth: null,
|
|
428
499
|
align: 'start',
|
|
429
500
|
closeOnItemClick: true,
|
|
501
|
+
positionObserver: true,
|
|
430
502
|
content: false,
|
|
431
503
|
scroll: true,
|
|
432
504
|
scrollContentHeight: 100,
|
package/js/src/select.js
CHANGED
|
@@ -132,6 +132,10 @@ class Select extends AbstractUIComponent {
|
|
|
132
132
|
this.itemsToExclude = this.$el.data('itemsToExclude') ? this.$el.data('itemsToExclude').replace(/\s/g, '').split(',') : this.opts.itemsToExclude;
|
|
133
133
|
this.preventClose = false;
|
|
134
134
|
|
|
135
|
+
if (this.itemsToExclude.length > 0) {
|
|
136
|
+
this.itemsToExclude = this.itemsToExclude.map(Number);
|
|
137
|
+
}
|
|
138
|
+
|
|
135
139
|
if (this.opts.setData) {
|
|
136
140
|
this.data = this.opts.setData;
|
|
137
141
|
}
|
|
@@ -140,13 +144,17 @@ class Select extends AbstractUIComponent {
|
|
|
140
144
|
this.data = this.$el.data('setData');
|
|
141
145
|
}
|
|
142
146
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
147
|
+
if (typeof this.data[this.name].filter !== 'undefined' && self.itemsToExclude) {
|
|
148
|
+
this.data[this.name] = this.data[this.name].filter(function(item) {
|
|
149
|
+
return self.itemsToExclude.indexOf(parseInt(item.id, 10)) === -1;
|
|
150
|
+
});
|
|
151
|
+
}
|
|
146
152
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
153
|
+
if (typeof this.items.filter !== 'undefined' && self.itemsToExclude) {
|
|
154
|
+
this.items = this.items.filter(function(item) {
|
|
155
|
+
return self.itemsToExclude.indexOf(parseInt(item.id, 10)) === -1;
|
|
156
|
+
});
|
|
157
|
+
}
|
|
150
158
|
|
|
151
159
|
if (this.$el.find('.select-search').length) {
|
|
152
160
|
this.showSearch = true;
|
|
@@ -212,6 +220,7 @@ class Select extends AbstractUIComponent {
|
|
|
212
220
|
}
|
|
213
221
|
|
|
214
222
|
if (this.showSearch) {
|
|
223
|
+
|
|
215
224
|
this.$searchContainer = this.$select.find('.select-search');
|
|
216
225
|
this.$searchInput = this.$select.find('[name="select-search"]');
|
|
217
226
|
this.$searchIconContainer = this.$select.find('.select-search-icon');
|
|
@@ -222,6 +231,7 @@ class Select extends AbstractUIComponent {
|
|
|
222
231
|
}
|
|
223
232
|
|
|
224
233
|
if (this.showFooter) {
|
|
234
|
+
|
|
225
235
|
this.$footerContainer = this.$select.find('.select-footer');
|
|
226
236
|
this.$closeButton = this.$select.find('[data-select-close]');
|
|
227
237
|
|
|
@@ -334,6 +344,7 @@ class Select extends AbstractUIComponent {
|
|
|
334
344
|
|
|
335
345
|
let el = this;
|
|
336
346
|
let val = $(this).val();
|
|
347
|
+
let closeTimeout = 600; // ms
|
|
337
348
|
|
|
338
349
|
self.preventClose = true;
|
|
339
350
|
|
|
@@ -348,14 +359,11 @@ class Select extends AbstractUIComponent {
|
|
|
348
359
|
self.data[self.name].indexOf(val) === -1 ? self.data[self.name].push(val) : false;
|
|
349
360
|
el.checked = true;
|
|
350
361
|
self.onSelect(el);
|
|
351
|
-
self.preventClose = false;
|
|
352
|
-
|
|
353
|
-
} else {
|
|
354
|
-
|
|
355
|
-
setTimeout(function() {
|
|
356
|
-
self.preventClose = false;
|
|
357
|
-
}, 800);
|
|
358
362
|
}
|
|
363
|
+
|
|
364
|
+
setTimeout(function() {
|
|
365
|
+
self.preventClose = false;
|
|
366
|
+
}, closeTimeout);
|
|
359
367
|
}, el);
|
|
360
368
|
|
|
361
369
|
} else if (el.checked) {
|
|
@@ -365,7 +373,7 @@ class Select extends AbstractUIComponent {
|
|
|
365
373
|
|
|
366
374
|
setTimeout(function() {
|
|
367
375
|
self.preventClose = false;
|
|
368
|
-
},
|
|
376
|
+
}, closeTimeout);
|
|
369
377
|
|
|
370
378
|
} else if (typeof self.confirmUncheck === 'function' && !el.checked) {
|
|
371
379
|
|
|
@@ -378,14 +386,11 @@ class Select extends AbstractUIComponent {
|
|
|
378
386
|
self.data[self.name] = self.data[self.name].filter(n => n != val);
|
|
379
387
|
el.checked = false;
|
|
380
388
|
self.onSelect(el);
|
|
381
|
-
self.preventClose = false;
|
|
382
|
-
|
|
383
|
-
} else {
|
|
384
|
-
|
|
385
|
-
setTimeout(function() {
|
|
386
|
-
self.preventClose = false;
|
|
387
|
-
}, 800);
|
|
388
389
|
}
|
|
390
|
+
|
|
391
|
+
setTimeout(function() {
|
|
392
|
+
self.preventClose = false;
|
|
393
|
+
}, closeTimeout);
|
|
389
394
|
}, el);
|
|
390
395
|
|
|
391
396
|
} else if (!el.checked && !self.preventUncheck) {
|
|
@@ -395,7 +400,7 @@ class Select extends AbstractUIComponent {
|
|
|
395
400
|
|
|
396
401
|
setTimeout(function() {
|
|
397
402
|
self.preventClose = false;
|
|
398
|
-
},
|
|
403
|
+
}, closeTimeout);
|
|
399
404
|
|
|
400
405
|
} else if (!el.checked && self.preventUncheck) {
|
|
401
406
|
|
|
@@ -403,7 +408,7 @@ class Select extends AbstractUIComponent {
|
|
|
403
408
|
|
|
404
409
|
setTimeout(function() {
|
|
405
410
|
self.preventClose = false;
|
|
406
|
-
},
|
|
411
|
+
}, closeTimeout);
|
|
407
412
|
}
|
|
408
413
|
});
|
|
409
414
|
|
|
@@ -569,7 +574,7 @@ class Select extends AbstractUIComponent {
|
|
|
569
574
|
});
|
|
570
575
|
|
|
571
576
|
items = items.filter(function(item) {
|
|
572
|
-
return
|
|
577
|
+
return self.data[self.name].indexOf(item.id) > -1 && self.itemsToExclude.indexOf(parseInt(item.id, 10)) === -1 && parseInt(item.id, 10) > 0;
|
|
573
578
|
});
|
|
574
579
|
|
|
575
580
|
let result = $(self._renderItemList(items));
|
|
@@ -682,12 +687,7 @@ class Select extends AbstractUIComponent {
|
|
|
682
687
|
});
|
|
683
688
|
|
|
684
689
|
items = items.filter(function(item) {
|
|
685
|
-
return
|
|
686
|
-
});
|
|
687
|
-
|
|
688
|
-
// Remove id with value 0 from results
|
|
689
|
-
items = items.filter(function(item) {
|
|
690
|
-
return item.id > 0;
|
|
690
|
+
return self.data[self.name].indexOf(item.id) === -1 && self.itemsToExclude.indexOf(parseInt(item.id, 10)) === -1 && parseInt(item.id, 10) > 0;
|
|
691
691
|
});
|
|
692
692
|
|
|
693
693
|
let result = $(self._renderItemList(items));
|
|
@@ -901,7 +901,7 @@ class Select extends AbstractUIComponent {
|
|
|
901
901
|
$input.prop('checked', true);
|
|
902
902
|
$input.addClass('checked');
|
|
903
903
|
|
|
904
|
-
this.data[this.name].indexOf(val) === -1 ? this.data[this.name]
|
|
904
|
+
this.data[this.name].indexOf(val) === -1 ? this.data[this.name] = [val] : false;
|
|
905
905
|
|
|
906
906
|
if (this.dynamicTitle) {
|
|
907
907
|
this.$selectTitle.html($input.parent().find('[data-label]').text());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finqu/cool",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Finqu UI package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -40,32 +40,32 @@
|
|
|
40
40
|
"homepage": "https://finqu.fi",
|
|
41
41
|
"license": "ISC",
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@babel/cli": "^7.
|
|
44
|
-
"@babel/core": "^7.
|
|
45
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.
|
|
46
|
-
"@babel/preset-env": "^7.
|
|
47
|
-
"autoprefixer": "^9.
|
|
48
|
-
"babel-eslint": "^10.0.
|
|
49
|
-
"babel-plugin-istanbul": "^5.
|
|
43
|
+
"@babel/cli": "^7.7.0",
|
|
44
|
+
"@babel/core": "^7.7.2",
|
|
45
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
|
|
46
|
+
"@babel/preset-env": "^7.7.1",
|
|
47
|
+
"autoprefixer": "^9.7.1",
|
|
48
|
+
"babel-eslint": "^10.0.3",
|
|
49
|
+
"babel-plugin-istanbul": "^5.2.0",
|
|
50
50
|
"broken-link-checker": "^0.7.8",
|
|
51
|
-
"bundlesize": "^0.17.
|
|
52
|
-
"clean-css-cli": "^4.
|
|
53
|
-
"cross-env": "^5.2.
|
|
51
|
+
"bundlesize": "^0.17.2",
|
|
52
|
+
"clean-css-cli": "^4.3.0",
|
|
53
|
+
"cross-env": "^5.2.1",
|
|
54
54
|
"eslint": "^5.13.0",
|
|
55
55
|
"find-unused-sass-variables": "^0.3.2",
|
|
56
|
-
"glob": "^7.1.
|
|
57
|
-
"jquery": "^3.
|
|
58
|
-
"node-sass": "^4.
|
|
59
|
-
"nodemon": "^1.
|
|
56
|
+
"glob": "^7.1.6",
|
|
57
|
+
"jquery": "^3.4.1",
|
|
58
|
+
"node-sass": "^4.13.0",
|
|
59
|
+
"nodemon": "^1.19.4",
|
|
60
60
|
"npm-run-all": "^4.1.5",
|
|
61
|
-
"postcss-cli": "^6.1.
|
|
62
|
-
"rollup": "^1.
|
|
63
|
-
"rollup-plugin-babel": "^4.3.
|
|
64
|
-
"rollup-plugin-commonjs": "^9.
|
|
65
|
-
"rollup-plugin-node-resolve": "^4.
|
|
61
|
+
"postcss-cli": "^6.1.3",
|
|
62
|
+
"rollup": "^1.26.3",
|
|
63
|
+
"rollup-plugin-babel": "^4.3.3",
|
|
64
|
+
"rollup-plugin-commonjs": "^9.3.4",
|
|
65
|
+
"rollup-plugin-node-resolve": "^4.2.4",
|
|
66
66
|
"shelljs": "^0.8.3",
|
|
67
67
|
"shx": "^0.3.2",
|
|
68
68
|
"terser": "^3.17.0",
|
|
69
|
-
"uglify-js": "^3.
|
|
69
|
+
"uglify-js": "^3.6.8"
|
|
70
70
|
}
|
|
71
71
|
}
|
package/scss/_alert.scss
CHANGED
|
@@ -1,118 +1,115 @@
|
|
|
1
1
|
// Alert
|
|
2
2
|
// ---------------------------------------------------------------------------------------------------------------
|
|
3
3
|
|
|
4
|
+
.alert-icon {
|
|
5
|
+
border-radius: 50% 50%;
|
|
6
|
+
width: 0.9em;
|
|
7
|
+
height: 0.9em;
|
|
8
|
+
border: 1px solid theme-color('primary');
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
vertical-align: middle;
|
|
14
|
+
position: relative;
|
|
15
|
+
z-index: 2;
|
|
16
|
+
background: white;
|
|
17
|
+
box-shadow: 0 0 0 0.2em fade-out(theme-color('primary'), 0.7);
|
|
18
|
+
|
|
19
|
+
.icon {
|
|
20
|
+
font-size: 0.5em;
|
|
21
|
+
color: theme-color('primary');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Alert variants
|
|
26
|
+
@each $color, $value in $theme-colors {
|
|
27
|
+
.alert-icon-#{$color} {
|
|
28
|
+
@include alert-icon-variant($value);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
4
32
|
.alert {
|
|
5
33
|
display: flex;
|
|
6
34
|
flex-direction: row;
|
|
7
35
|
position: relative;
|
|
8
|
-
border-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
box-shadow: 0 1px 2px #cccccc, 0 0 0 1px #eeeeee;
|
|
36
|
+
border-radius: $border-radius;
|
|
37
|
+
margin-bottom: $section-spacer;
|
|
38
|
+
box-shadow: $section-box-shadow;
|
|
12
39
|
width: 100%;
|
|
13
40
|
overflow: hidden;
|
|
14
|
-
align-items: center;
|
|
15
41
|
box-sizing: border-box;
|
|
16
42
|
position: relative;
|
|
43
|
+
padding: 0;
|
|
44
|
+
border-top: 2px solid theme-color('primary');
|
|
45
|
+
background-color: fade-out(theme-color('primary'), 0.9);
|
|
46
|
+
|
|
17
47
|
@include media-breakpoint-down(sm) {
|
|
18
|
-
margin-bottom:
|
|
48
|
+
margin-bottom: $section-spacer-mobile;
|
|
19
49
|
}
|
|
20
50
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
51
|
+
// Icon
|
|
52
|
+
.alert-icon {
|
|
53
|
+
width: 28px;
|
|
54
|
+
height: 28px;
|
|
55
|
+
margin-top: $section-padding;
|
|
56
|
+
margin-left: $section-padding;
|
|
57
|
+
margin-right: $section-padding / 2;
|
|
58
|
+
margin-bottom: $section-padding;
|
|
59
|
+
flex-shrink: 0;
|
|
60
|
+
flex-grow: 0;
|
|
61
|
+
|
|
62
|
+
.icon {
|
|
63
|
+
font-size: 14px;
|
|
24
64
|
}
|
|
25
65
|
}
|
|
26
66
|
|
|
27
67
|
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
font-size: 80%;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
68
|
+
// Content
|
|
69
|
+
.alert-content-container {
|
|
70
|
+
padding: $section-padding;
|
|
71
|
+
box-sizing: border-box;
|
|
35
72
|
|
|
36
|
-
|
|
37
|
-
& > .alert-icon {
|
|
38
|
-
padding-left: 25px;
|
|
39
|
-
font-size: 22px;
|
|
40
|
-
&:after {
|
|
41
|
-
width: 47px;
|
|
42
|
-
}
|
|
73
|
+
.alert-content {
|
|
43
74
|
}
|
|
44
75
|
|
|
45
|
-
|
|
46
|
-
|
|
76
|
+
.alert-action {
|
|
77
|
+
margin-top: $section-padding;
|
|
47
78
|
}
|
|
48
79
|
}
|
|
49
80
|
|
|
50
|
-
|
|
51
|
-
// Icon
|
|
52
81
|
.alert-icon {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
font-size: 20px;
|
|
59
|
-
&:after {
|
|
60
|
-
content: '';
|
|
61
|
-
position: absolute;
|
|
62
|
-
top: 0;
|
|
63
|
-
bottom: 0;
|
|
64
|
-
left: 0;
|
|
65
|
-
z-index: -1;
|
|
66
|
-
width: 34px;
|
|
67
|
-
background: #fafafa;
|
|
82
|
+
& + .alert-content-container {
|
|
83
|
+
.alert-content {
|
|
84
|
+
margin-top: 7px;
|
|
85
|
+
}
|
|
68
86
|
}
|
|
69
87
|
}
|
|
70
88
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
box-sizing: border-box;
|
|
80
|
-
@include media-breakpoint-down(sm) {
|
|
81
|
-
flex-wrap: wrap;
|
|
89
|
+
&.alert-sm {
|
|
90
|
+
.alert-icon {
|
|
91
|
+
width: 18px;
|
|
92
|
+
height: 18px;
|
|
93
|
+
margin-top: $section-padding / 2;
|
|
94
|
+
margin-left: $section-padding / 2;
|
|
95
|
+
margin-right: $section-padding / 4;
|
|
96
|
+
margin-bottom: $section-padding / 2;
|
|
82
97
|
}
|
|
83
98
|
|
|
84
|
-
.alert-content {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
& + .alert-action {
|
|
90
|
-
margin-left: 15px;
|
|
91
|
-
@include media-breakpoint-down(sm) {
|
|
92
|
-
margin-top: 15px;
|
|
93
|
-
margin-left: 0;
|
|
94
|
-
}
|
|
99
|
+
.alert-content-container {
|
|
100
|
+
padding: $section-padding / 2;
|
|
101
|
+
|
|
102
|
+
.alert-action {
|
|
103
|
+
margin-top: $section-padding / 2;
|
|
95
104
|
}
|
|
96
105
|
}
|
|
97
|
-
}
|
|
98
106
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
&:after {
|
|
107
|
-
content: '';
|
|
108
|
-
position: absolute;
|
|
109
|
-
top: 0;
|
|
110
|
-
bottom: 0;
|
|
111
|
-
right: 0;
|
|
112
|
-
z-index: -1;
|
|
113
|
-
width: 30px;
|
|
114
|
-
background: #fafafa;
|
|
115
|
-
padding-left: 15px;
|
|
107
|
+
.alert-icon {
|
|
108
|
+
& + .alert-content-container {
|
|
109
|
+
.alert-content {
|
|
110
|
+
margin-top: 0;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
116
113
|
}
|
|
117
114
|
}
|
|
118
115
|
}
|
package/scss/_badge.scss
CHANGED
|
@@ -1,35 +1,29 @@
|
|
|
1
1
|
// Badge
|
|
2
2
|
// ---------------------------------------------------------------------------------------------------------------
|
|
3
|
-
|
|
4
3
|
.badge {
|
|
5
4
|
display: inline-block;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
vertical-align: middle;
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
position: relative;
|
|
8
|
+
border-radius: $border-radius;
|
|
9
|
+
padding: 0.2em 0.5em;
|
|
10
|
+
overflow: hidden;
|
|
12
11
|
box-sizing: border-box;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
position: relative;
|
|
13
|
+
border: 1px solid theme-color('primary');
|
|
14
|
+
background-color: fade-out(theme-color('primary'), 0.9);
|
|
16
15
|
touch-action: manipulation;
|
|
16
|
+
text-decoration: none;
|
|
17
17
|
user-select: none;
|
|
18
|
-
vertical-align: middle;
|
|
19
18
|
white-space: nowrap;
|
|
19
|
+
color: theme-color('primary');
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
font-weight: $badge-xs-font-weight;
|
|
24
|
-
padding: $badge-xs-padding-y $badge-xs-padding-x;
|
|
25
|
-
line-height: $badge-xs-line-height;
|
|
26
|
-
}
|
|
21
|
+
.alert-icon {
|
|
22
|
+
margin: -0.1em 0.4em 0 0;
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
padding: $badge-sm-padding-y $badge-sm-padding-x;
|
|
32
|
-
line-height: $badge-sm-line-height;
|
|
24
|
+
.icon {
|
|
25
|
+
color: theme-color('primary');
|
|
26
|
+
}
|
|
33
27
|
}
|
|
34
28
|
}
|
|
35
29
|
|
package/scss/_dialog.scss
CHANGED
package/scss/_dropdown.scss
CHANGED