@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.
Files changed (43) hide show
  1. package/dist/css/cool-grid.css +2 -2
  2. package/dist/css/cool-grid.css.map +2 -2
  3. package/dist/css/cool-grid.min.css +1 -1
  4. package/dist/css/cool-grid.min.css.map +1 -1
  5. package/dist/css/cool-reboot.css +2 -2
  6. package/dist/css/cool-reboot.css.map +2 -2
  7. package/dist/css/cool-reboot.min.css +1 -1
  8. package/dist/css/cool-reboot.min.css.map +1 -1
  9. package/dist/css/cool.css +78 -45
  10. package/dist/css/cool.css.map +5 -5
  11. package/dist/css/cool.min.css +2 -2
  12. package/dist/css/cool.min.css.map +1 -1
  13. package/dist/js/cool.bundle.js +22 -13
  14. package/dist/js/cool.bundle.js.map +1 -1
  15. package/dist/js/cool.bundle.min.js +2 -2
  16. package/dist/js/cool.bundle.min.js.map +1 -1
  17. package/dist/js/cool.esm.js +22 -13
  18. package/dist/js/cool.esm.js.map +1 -1
  19. package/dist/js/cool.esm.min.js +2 -2
  20. package/dist/js/cool.esm.min.js.map +1 -1
  21. package/dist/js/cool.js +22 -13
  22. package/dist/js/cool.js.map +1 -1
  23. package/dist/js/cool.min.js +2 -2
  24. package/dist/js/cool.min.js.map +1 -1
  25. package/html/index.html +80 -0
  26. package/js/dist/collapse.js +1 -1
  27. package/js/dist/common.js +1 -1
  28. package/js/dist/dropdown.js +860 -772
  29. package/js/dist/dropdown.js.map +1 -1
  30. package/js/dist/popover.js +1 -1
  31. package/js/dist/sectiontabs.js +1 -1
  32. package/js/dist/select.js +3508 -3448
  33. package/js/dist/select.js.map +1 -1
  34. package/js/dist/tooltip.js +1 -1
  35. package/js/src/dropdown.js +19 -9
  36. package/js/src/select.js +8 -4
  37. package/package.json +1 -1
  38. package/scss/_frame.scss +1 -0
  39. package/scss/_section.scss +32 -0
  40. package/scss/_variables.scss +1 -1
  41. package/scss/cool-grid.scss +1 -1
  42. package/scss/cool-reboot.scss +1 -1
  43. package/scss/cool.scss +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Cool UI tooltip.js v1.2.3 (https://finqu.fi)
2
+ * Cool UI tooltip.js v1.2.5 (https://finqu.fi)
3
3
  * Copyright 2011-2019 Finqu Oy
4
4
  * Licensed under the ISC license - (http://opensource.org/licenses/ISC)
5
5
  */
@@ -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 = null;
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
- do {
305
- $containingParent = $containingParent ? $containingParent.parent() : this.$container.parent();
316
+ ++index;
317
+ }
306
318
 
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));
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.id.toString();
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.id.toString();
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
- onSelect.call(el);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finqu/cool",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Finqu UI package",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/scss/_frame.scss CHANGED
@@ -315,6 +315,7 @@
315
315
  font-size: $frame-sidebar-nav-icon-size;
316
316
  margin: 0 auto;
317
317
  color: $frame-sidebar-nav-icon-color;
318
+ min-width: 23px;
318
319
 
319
320
  & + span {
320
321
  margin-left: 20px;
@@ -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;
@@ -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(3) !default;
632
+ $section-padding: spacer(4) !default;
633
633
 
634
634
  $section-bg: color('white') !default;
635
635
  $section-color: $body-color !default;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Cool UI - Grid v1.2.4 (https://finqu.fi)
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)
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Cool UI - Reboot v1.2.4 (https://finqu.fi)
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.4 (https://finqu.fi)
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)