@finqu/cool 1.2.4 → 1.2.6
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 +2 -2
- 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 +2 -2
- package/dist/css/cool-reboot.min.css +1 -1
- package/dist/css/cool-reboot.min.css.map +1 -1
- package/dist/css/cool.css +78 -45
- package/dist/css/cool.css.map +5 -5
- package/dist/css/cool.min.css +2 -2
- package/dist/css/cool.min.css.map +1 -1
- package/dist/js/cool.bundle.js +22 -13
- 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 +22 -13
- 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 +22 -13
- 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/index.html +80 -0
- package/js/dist/collapse.js +1 -1
- package/js/dist/common.js +1 -1
- package/js/dist/dropdown.js +860 -772
- 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 +3508 -3448
- package/js/dist/select.js.map +1 -1
- package/js/dist/tooltip.js +1 -1
- package/js/src/dropdown.js +19 -9
- package/js/src/select.js +8 -4
- package/package.json +1 -1
- package/scss/_frame.scss +1 -0
- package/scss/_section.scss +32 -0
- package/scss/_variables.scss +1 -1
- package/scss/cool-grid.scss +1 -1
- package/scss/cool-reboot.scss +1 -1
- package/scss/cool.scss +1 -1
package/js/dist/tooltip.js
CHANGED
package/js/src/dropdown.js
CHANGED
|
@@ -294,21 +294,31 @@ class Dropdown extends AbstractUIComponent {
|
|
|
294
294
|
dropdownPosY += parseInt(offsetY, 10);
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
if (this.positionObserver) {
|
|
297
|
+
if (this.positionObserver && this.$container.length > 0) {
|
|
298
298
|
|
|
299
299
|
// this is not set during init so we have to fetch it
|
|
300
300
|
// and let's assume that this containing parent fits and is inside
|
|
301
301
|
// viewport
|
|
302
|
-
let $containingParent =
|
|
302
|
+
let $containingParent = this.$container.parent();
|
|
303
|
+
let index = 0;
|
|
304
|
+
while (
|
|
305
|
+
$containingParent.css('overflow-x') !== 'hidden' &&
|
|
306
|
+
$containingParent.css('overflow') !== 'hidden' &&
|
|
307
|
+
($containingParent.prop('tagName') || '').toLowerCase() !== 'body' &&
|
|
308
|
+
index < 100
|
|
309
|
+
) {
|
|
310
|
+
$containingParent = $containingParent.parent();
|
|
311
|
+
|
|
312
|
+
if (!$containingParent.get(0)) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
303
315
|
|
|
304
|
-
|
|
305
|
-
|
|
316
|
+
++index;
|
|
317
|
+
}
|
|
306
318
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}
|
|
311
|
-
} while ($containingParent.css('overflow-x') !== 'hidden' && $containingParent.css('overflow') !== 'hidden' && ($containingParent.prop('tagName') ? $containingParent.prop('tagName').toLowerCase() !== 'body' : false));
|
|
319
|
+
if (!$containingParent.get(0)) {
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
312
322
|
|
|
313
323
|
const containingBoundingRect = $containingParent.get(0).getBoundingClientRect();
|
|
314
324
|
const containerBoundingRect = this.$container.get(0).getBoundingClientRect();
|
package/js/src/select.js
CHANGED
|
@@ -130,6 +130,7 @@ class Select extends AbstractUIComponent {
|
|
|
130
130
|
this.allowNoneOnRadioSelect = this.$el.data('allowNoneOnRadioSelect') ? this.$el.data('allowNoneOnRadioSelect') : this.opts.allowNoneOnRadioSelect;
|
|
131
131
|
this.showValidStateIcon = this.$el.data('showValidStateIcon') ? this.$el.data('showValidStateIcon') : this.opts.showValidStateIcon;
|
|
132
132
|
this.itemsToExclude = this.$el.data('itemsToExclude') ? this.$el.data('itemsToExclude').replace(/\s/g, '').split(',') : this.opts.itemsToExclude;
|
|
133
|
+
this.primaryKeyword = this.$el.data('primaryKeyword') ? this.$el.data('primaryKeyword') : this.opts.primaryKeyword;
|
|
133
134
|
this.preventClose = false;
|
|
134
135
|
|
|
135
136
|
if (this.itemsToExclude.length > 0) {
|
|
@@ -568,7 +569,7 @@ class Select extends AbstractUIComponent {
|
|
|
568
569
|
|
|
569
570
|
let items = data.map(item => {
|
|
570
571
|
|
|
571
|
-
item.id = item.
|
|
572
|
+
item.id = item[self.primaryKeyword].toString();
|
|
572
573
|
|
|
573
574
|
return item;
|
|
574
575
|
});
|
|
@@ -681,7 +682,7 @@ class Select extends AbstractUIComponent {
|
|
|
681
682
|
|
|
682
683
|
let items = data.map(item => {
|
|
683
684
|
|
|
684
|
-
item.id = item.
|
|
685
|
+
item.id = item[self.primaryKeyword].toString();
|
|
685
686
|
|
|
686
687
|
return item;
|
|
687
688
|
});
|
|
@@ -836,7 +837,9 @@ class Select extends AbstractUIComponent {
|
|
|
836
837
|
|
|
837
838
|
if (typeof onSelect === 'function') {
|
|
838
839
|
|
|
839
|
-
|
|
840
|
+
let data = this.getItem('id', el.value);
|
|
841
|
+
|
|
842
|
+
onSelect.call(el, data, this);
|
|
840
843
|
}
|
|
841
844
|
}
|
|
842
845
|
|
|
@@ -1228,7 +1231,8 @@ if (typeof $ !== 'undefined') {
|
|
|
1228
1231
|
allowNoneOnRadioSelect: true,
|
|
1229
1232
|
preventUncheck: false,
|
|
1230
1233
|
showValidStateIcon: true,
|
|
1231
|
-
itemsToExclude: []
|
|
1234
|
+
itemsToExclude: [],
|
|
1235
|
+
primaryKeyword: 'id'
|
|
1232
1236
|
}
|
|
1233
1237
|
}
|
|
1234
1238
|
|
package/package.json
CHANGED
package/scss/_frame.scss
CHANGED
package/scss/_section.scss
CHANGED
|
@@ -710,6 +710,38 @@
|
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
712
|
|
|
713
|
+
.collapsing {
|
|
714
|
+
left: auto;
|
|
715
|
+
right: auto;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.collapse,
|
|
719
|
+
.collapsing {
|
|
720
|
+
|
|
721
|
+
> .section-hr {
|
|
722
|
+
width: 100%;
|
|
723
|
+
padding-top: 0;
|
|
724
|
+
padding-bottom: $section-padding;
|
|
725
|
+
|
|
726
|
+
&:after {
|
|
727
|
+
margin-left: 0;
|
|
728
|
+
margin-right: 0;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
&.content-full-width {
|
|
732
|
+
position: relative;
|
|
733
|
+
margin-left: 0;
|
|
734
|
+
margin-right: 0;
|
|
735
|
+
|
|
736
|
+
&:after {
|
|
737
|
+
position: absolute;
|
|
738
|
+
left: -$section-padding;
|
|
739
|
+
right: -$section-padding;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
|
|
713
745
|
&:not(.show) {
|
|
714
746
|
margin-top: 0;
|
|
715
747
|
padding-top: 0;
|
package/scss/_variables.scss
CHANGED
|
@@ -629,7 +629,7 @@ $section-font-size: $font-size-base !default;
|
|
|
629
629
|
$section-border-radius: $border-radius !default;
|
|
630
630
|
$section-spacer: spacer(4) !default;
|
|
631
631
|
$section-spacer-mobile: spacer(2) !default;
|
|
632
|
-
$section-padding: spacer(
|
|
632
|
+
$section-padding: spacer(4) !default;
|
|
633
633
|
|
|
634
634
|
$section-bg: color('white') !default;
|
|
635
635
|
$section-color: $body-color !default;
|
package/scss/cool-grid.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cool UI - Grid v1.2.
|
|
2
|
+
* Cool UI - Grid v1.2.6 (https://finqu.fi)
|
|
3
3
|
* Copyright 2019 Finqu Oy.
|
|
4
4
|
* Licensed under the ISC license - (http://opensource.org/licenses/ISC)
|
|
5
5
|
* Forked from Bootstrap, licensed MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
package/scss/cool-reboot.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cool UI - Reboot v1.2.
|
|
2
|
+
* Cool UI - Reboot v1.2.6 (https://finqu.fi)
|
|
3
3
|
* Copyright 2019 Finqu Oy.
|
|
4
4
|
* Licensed under the ISC license - (http://opensource.org/licenses/ISC)
|
|
5
5
|
* Forked from Bootstrap, licensed MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
package/scss/cool.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cool UI v1.2.
|
|
2
|
+
* Cool UI v1.2.6 (https://finqu.fi)
|
|
3
3
|
* Copyright 2019 Finqu Oy.
|
|
4
4
|
* Licensed under the ISC license - (http://opensource.org/licenses/ISC)
|
|
5
5
|
* Forked from Bootstrap, licensed MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|