@finqu/cool 1.1.8 → 1.2.0

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 (71) hide show
  1. package/dist/css/cool-grid.css +1 -1
  2. package/dist/css/cool-grid.css.map +1 -1
  3. package/dist/css/cool-grid.min.css.map +1 -1
  4. package/dist/css/cool-reboot.css +5 -1
  5. package/dist/css/cool-reboot.css.map +8 -4
  6. package/dist/css/cool-reboot.min.css +1 -1
  7. package/dist/css/cool-reboot.min.css.map +1 -1
  8. package/dist/css/cool.css +199 -56
  9. package/dist/css/cool.css.map +28 -20
  10. package/dist/css/cool.min.css +1 -1
  11. package/dist/css/cool.min.css.map +1 -1
  12. package/dist/js/cool.bundle.js +565 -178
  13. package/dist/js/cool.bundle.js.map +1 -1
  14. package/dist/js/cool.bundle.min.js +2 -2
  15. package/dist/js/cool.bundle.min.js.map +1 -1
  16. package/dist/js/cool.esm.js +565 -178
  17. package/dist/js/cool.esm.js.map +1 -1
  18. package/dist/js/cool.esm.min.js +2 -2
  19. package/dist/js/cool.esm.min.js.map +1 -1
  20. package/dist/js/cool.js +565 -178
  21. package/dist/js/cool.js.map +1 -1
  22. package/dist/js/cool.min.js +2 -2
  23. package/dist/js/cool.min.js.map +1 -1
  24. package/html/index.html +846 -4
  25. package/js/dist/collapse.js +1043 -629
  26. package/js/dist/collapse.js.map +1 -1
  27. package/js/dist/common.js +520 -282
  28. package/js/dist/common.js.map +1 -1
  29. package/js/dist/dropdown.js +273 -58
  30. package/js/dist/dropdown.js.map +1 -1
  31. package/js/dist/popover.js +273 -58
  32. package/js/dist/popover.js.map +1 -1
  33. package/js/dist/sectiontabs.js +273 -58
  34. package/js/dist/sectiontabs.js.map +1 -1
  35. package/js/dist/select.js +9904 -3726
  36. package/js/dist/select.js.map +1 -1
  37. package/js/dist/tooltip.js +1703 -1434
  38. package/js/dist/tooltip.js.map +1 -1
  39. package/js/src/abstract-ui-component.js +16 -5
  40. package/js/src/collapse.js +24 -10
  41. package/js/src/common.js +18 -0
  42. package/js/src/dialog.js +6 -17
  43. package/js/src/dropdown.js +2 -2
  44. package/js/src/popover.js +2 -2
  45. package/js/src/section-tabs.js +2 -2
  46. package/js/src/select.js +578 -177
  47. package/js/src/toast.js +2 -2
  48. package/js/src/tooltip.js +7 -2
  49. package/js/src/util/index.js +10 -0
  50. package/package.json +1 -1
  51. package/scss/_button-group.scss +4 -0
  52. package/scss/_buttons.scss +3 -3
  53. package/scss/_custom-forms.scss +14 -12
  54. package/scss/_dialog.scss +16 -5
  55. package/scss/_frame.scss +1 -0
  56. package/scss/_images.scss +45 -1
  57. package/scss/_input-group.scss +12 -6
  58. package/scss/_mixins.scss +2 -0
  59. package/scss/_notification.scss +13 -0
  60. package/scss/_reboot.scss +4 -0
  61. package/scss/_section.scss +15 -3
  62. package/scss/_select.scss +10 -1
  63. package/scss/_tables.scss +2 -1
  64. package/scss/_utilities.scss +2 -1
  65. package/scss/_variables.scss +2 -2
  66. package/scss/cool.scss +2 -1
  67. package/scss/mixins/_notification-variant.scss +7 -0
  68. package/scss/mixins/_visibility.scss +7 -0
  69. package/scss/utilities/_collapse.scss +2 -2
  70. package/scss/utilities/_cursor.scss +12 -0
  71. package/scss/utilities/_visibility.scss +10 -0
package/js/src/toast.js CHANGED
@@ -546,9 +546,9 @@ if (typeof $ !== 'undefined') {
546
546
 
547
547
  $.fn[NAME].noConflict = () => {
548
548
 
549
- $.fn[NAME] = JQUERY_NO_CONFLICT
549
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
550
550
 
551
- return Toast._jQueryInterface
551
+ return Toast._jQueryInterface;
552
552
  }
553
553
 
554
554
  $.fn[NAME].defaults = {
package/js/src/tooltip.js CHANGED
@@ -78,6 +78,11 @@ class Tooltip extends AbstractUIComponent {
78
78
  this.close();
79
79
  });
80
80
 
81
+ this.$el.on('destroyed'+'.'+NAME, () => {
82
+
83
+ this.close();
84
+ });
85
+
81
86
  $(window).on('resize', debounce(() => {
82
87
 
83
88
  if (this.$tooltip) {
@@ -550,9 +555,9 @@ if (typeof $ !== 'undefined') {
550
555
 
551
556
  $.fn[NAME].noConflict = () => {
552
557
 
553
- $.fn[NAME] = JQUERY_NO_CONFLICT
558
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
554
559
 
555
- return Tooltip._jQueryInterface
560
+ return Tooltip._jQueryInterface;
556
561
  }
557
562
 
558
563
  $.fn[NAME].defaults = {
@@ -105,6 +105,16 @@ const touchEvents = function () {
105
105
  return result;
106
106
  };
107
107
 
108
+ $.event.special.destroyed = {
109
+
110
+ remove: function(obj) {
111
+
112
+ if (obj.handler) {
113
+ obj.handler();
114
+ }
115
+ }
116
+ }
117
+
108
118
  export {
109
119
  debounce,
110
120
  touchEvents,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finqu/cool",
3
- "version": "1.1.8",
3
+ "version": "1.2.0",
4
4
  "description": "Finqu UI package",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -115,6 +115,10 @@
115
115
  > .btn-group > .btn {
116
116
  margin-bottom: 0;
117
117
 
118
+ &.active {
119
+ z-index: 3;
120
+ }
121
+
118
122
  input[type="radio"],
119
123
  input[type="checkbox"] {
120
124
  position: absolute;
@@ -47,7 +47,7 @@ html.dom-ready .btn {
47
47
  }
48
48
 
49
49
  .btn-secondary {
50
- @include button-variant(color('grey-lightest'), lighten(color('blue-grey'), 60%), color('blue-grey'), color('grey-lighter'), lighten(color('blue-grey'), 55%), $body-color);
50
+ @include button-variant(color('grey-lightest'), lighten(color('blue-grey'), 60%), color('blue-grey'), color('grey-lighter'), lighten(color('blue-grey'), 55%), $body-color, color('grey-lighter'), lighten(color('blue-grey'), 50%));
51
51
  }
52
52
 
53
53
  .btn-outline-primary {
@@ -55,7 +55,7 @@ html.dom-ready .btn {
55
55
  }
56
56
 
57
57
  .btn-outline-secondary {
58
- @include button-outline-variant(lighten(color('blue-grey'), 60%), $body-color, color('grey-lightest'), $body-color);
58
+ @include button-outline-variant(lighten(color('blue-grey'), 60%), $body-color, color('grey-lightest'), $body-color, $body-color, color('grey-lightest'), theme-color('primary'));
59
59
  }
60
60
 
61
61
 
@@ -101,7 +101,7 @@ html.dom-ready .btn {
101
101
 
102
102
  &:not(.disabled):not([disabled]):not(.disable-hover) {
103
103
  background-color: transparent;
104
- transition: all 0.5s ease;
104
+ transition: opacity 0.5s ease, scale 0.5s ease;
105
105
 
106
106
  &:before {
107
107
  position: absolute;
@@ -18,7 +18,7 @@
18
18
  user-select: none;
19
19
  cursor: pointer;
20
20
 
21
- span {
21
+ > span {
22
22
  display: inline-block;
23
23
  vertical-align: middle;
24
24
 
@@ -62,6 +62,7 @@
62
62
  }
63
63
 
64
64
  &.checkbox-label {
65
+ width: 100%;
65
66
  padding-left: 8px;
66
67
  overflow: hidden;
67
68
  text-overflow: ellipsis;
@@ -69,7 +70,7 @@
69
70
  }
70
71
  }
71
72
 
72
- &:hover span:first-child {
73
+ &:hover > span:first-child {
73
74
  border-color: color('blue');
74
75
  }
75
76
  }
@@ -79,7 +80,7 @@
79
80
  }
80
81
 
81
82
  input[type="checkbox"]:checked + label {
82
- span {
83
+ > span {
83
84
  &:first-child {
84
85
  background: color('blue');
85
86
  border-color: color('blue');
@@ -100,7 +101,7 @@
100
101
 
101
102
  input[type="checkbox"]:disabled + label,
102
103
  input[type="checkbox"].disabled + label {
103
- span {
104
+ > span {
104
105
  &:first-child {
105
106
  cursor: not-allowed;
106
107
  background-color: color('grey-lightest');
@@ -110,7 +111,7 @@
110
111
  }
111
112
 
112
113
  &:hover {
113
- span {
114
+ > span {
114
115
  &:first-child {
115
116
  border: 1px solid #9098A9;
116
117
  }
@@ -131,7 +132,7 @@
131
132
  user-select: none;
132
133
  cursor: pointer;
133
134
 
134
- span {
135
+ > span {
135
136
  display: inline-block;
136
137
  vertical-align: middle;
137
138
 
@@ -175,6 +176,7 @@
175
176
  }
176
177
 
177
178
  &.radio-label {
179
+ width: 100%;
178
180
  padding-left: 8px;
179
181
  overflow: hidden;
180
182
  text-overflow: ellipsis;
@@ -182,7 +184,7 @@
182
184
  }
183
185
  }
184
186
 
185
- &:hover span:first-child {
187
+ &:hover > span:first-child {
186
188
  border-color: color('blue');
187
189
  }
188
190
  }
@@ -192,7 +194,7 @@
192
194
  }
193
195
 
194
196
  input[type="radio"]:checked + label {
195
- span {
197
+ > span {
196
198
  &:first-child {
197
199
  background: color('blue');
198
200
  border-color: color('blue');
@@ -213,7 +215,7 @@
213
215
 
214
216
  input[type="radio"]:disabled + label,
215
217
  input[type="radio"].disabled + label {
216
- span {
218
+ > span {
217
219
  &:first-child {
218
220
  cursor: not-allowed;
219
221
  background-color: color('grey-lightest');
@@ -223,7 +225,7 @@
223
225
  }
224
226
 
225
227
  &:hover {
226
- span {
228
+ > span {
227
229
  &:first-child {
228
230
  border: 1px solid #9098A9;
229
231
  }
@@ -276,8 +278,8 @@
276
278
  border-radius: 15px;
277
279
  background-color: #79868C;
278
280
  margin-bottom: 0;
279
- transition: all 0.3s ease-in;
280
281
  box-sizing: content-box;
282
+ transition: background-color 0.3s ease-in, border-color 0.3s ease-in;
281
283
 
282
284
  &:before {
283
285
  content: '';
@@ -291,7 +293,7 @@
291
293
  bottom: 0;
292
294
  border: 2px solid #79868C;
293
295
  border-radius: 15px;
294
- transition: all 0.3s ease-in 0s;
296
+ transition: background-color 0.3s ease-in, border-color 0.3s ease-in, right 0.3s ease-in;
295
297
  box-sizing: content-box;
296
298
  }
297
299
  }
package/scss/_dialog.scss CHANGED
@@ -57,6 +57,7 @@
57
57
  background-color: transparent;
58
58
  border: 0;
59
59
  opacity: 0.75;
60
+ color: color('blue-grey');
60
61
 
61
62
  &:hover,
62
63
  &:focus {
@@ -71,6 +72,11 @@
71
72
  flex: 1 1 auto;
72
73
  padding: 16px;
73
74
  overflow-y: auto;
75
+
76
+ .content-full-width {
77
+ margin-left: -16px;
78
+ margin-right: -16px;
79
+ }
74
80
  }
75
81
 
76
82
  .dialog-footer {
@@ -139,11 +145,16 @@
139
145
  }
140
146
 
141
147
  .dialog-overflow-visible {
142
- overflow-x: visible;
143
- overflow-y: visible;
148
+ overflow: visible;
144
149
 
145
- .dialog-body {
146
- overflow-x: visible;
147
- overflow-y: visible;
150
+ .dialog-container {
151
+
152
+ .dialog-content {
153
+ overflow: visible;
154
+
155
+ .dialog-body {
156
+ overflow-y: visible;
157
+ }
158
+ }
148
159
  }
149
160
  }
package/scss/_frame.scss CHANGED
@@ -95,6 +95,7 @@
95
95
  .content-inner {
96
96
  position: relative;
97
97
  margin: 10px 0;
98
+ overflow: visible;
98
99
 
99
100
  @include media-breakpoint-up(md) {
100
101
  margin: 20px 0;
package/scss/_images.scss CHANGED
@@ -138,8 +138,48 @@ html.dom-ready {
138
138
  }
139
139
  }
140
140
 
141
- // 120x120
141
+ // 90x90
142
142
  &.img-lg {
143
+ width: 90px;
144
+ height: 90px;
145
+ min-width: 90px;
146
+ text-align: center;
147
+
148
+ &.img-placeholder {
149
+ &:before {
150
+ width: 15px;
151
+ height: 15px;
152
+ }
153
+ }
154
+
155
+ &.img-thumbnail {
156
+ .icon {
157
+ width: 25px;
158
+ height: 25px;
159
+ }
160
+ }
161
+
162
+ .icon {
163
+ width: 46px;
164
+ height: 46px;
165
+ color: $icon-color;
166
+ }
167
+
168
+ img {
169
+ vertical-align: middle;
170
+ max-width: 90px;
171
+ max-height: 90px;
172
+
173
+ &.cover {
174
+ width: 90px;
175
+ height: 90px;
176
+ @include object-fit(cover, 50% 50%);
177
+ }
178
+ }
179
+ }
180
+
181
+ // 120x120
182
+ &.img-xl {
143
183
  width: 120px;
144
184
  height: 120px;
145
185
  min-width: 120px;
@@ -224,6 +264,10 @@ html.dom-ready {
224
264
  background-color: #fafafa;
225
265
  color: #bbb;
226
266
 
267
+ &.img-inline {
268
+ display: inline-flex;
269
+ }
270
+
227
271
  &:before,
228
272
  &:after {
229
273
  content: '';
@@ -26,7 +26,8 @@ html.dom-ready {
26
26
  margin-bottom: 0;
27
27
 
28
28
  + .form-control {
29
- margin-left: -$input-border-width;
29
+ // Add extra 0.5px to border rendering bug on chrome
30
+ margin-left: calc(-#{$input-border-width + 0.5});
30
31
  }
31
32
  }
32
33
 
@@ -80,23 +81,28 @@ html.dom-ready {
80
81
  .input-group-dropdown + .btn,
81
82
  .input-group-dropdown + .input-group-text,
82
83
  .input-group-dropdown + .input-group-dropdown {
83
- margin-left: -$input-border-width;
84
+ // Add extra 0.5px to border rendering bug on chrome
85
+ margin-left: calc(-#{$input-border-width + 0.5});
84
86
  }
85
87
  }
86
88
 
87
89
  .input-group-prepend {
88
- margin-right: -$input-border-width;
90
+ // Add extra 0.5px to border rendering bug on chrome
91
+ margin-right: calc(-#{$input-border-width + 0.5});
89
92
 
90
93
  .input-group-text > span {
91
- margin-right: $input-border-width;
94
+ // Add extra 0.5px to border rendering bug on chrome
95
+ margin-right: calc(#{$input-border-width + 0.5});
92
96
  }
93
97
  }
94
98
 
95
99
  .input-group-append {
96
- margin-left: -$input-border-width;
100
+ // Add extra 0.5px to border rendering bug on chrome
101
+ margin-left: calc(-#{$input-border-width + 0.5});
97
102
 
98
103
  .input-group-text > span {
99
- margin-left: $input-border-width;
104
+ // Add extra 0.5px to border rendering bug on chrome
105
+ margin-left: calc(#{$input-border-width + 0.5});
100
106
  }
101
107
  }
102
108
 
package/scss/_mixins.scss CHANGED
@@ -9,6 +9,7 @@
9
9
  @import "mixins/text-emphasis";
10
10
  @import "mixins/text-hide";
11
11
  @import "mixins/text-truncate";
12
+ @import "mixins/visibility";
12
13
 
13
14
 
14
15
  // Components
@@ -18,6 +19,7 @@
18
19
  @import "mixins/nav-divider";
19
20
  @import "mixins/caret";
20
21
  @import "mixins/forms";
22
+ @import "mixins/notification-variant";
21
23
 
22
24
 
23
25
  // Styling
@@ -0,0 +1,13 @@
1
+ // Notification
2
+ // ---------------------------------------------------------------------------------------------------------------
3
+
4
+ .notification {
5
+ border-radius: $border-radius;
6
+ padding: spacer(3);
7
+ }
8
+
9
+ @each $color, $value in $theme-colors {
10
+ .notification-#{$color} {
11
+ @include notification-variant($value);
12
+ }
13
+ }
package/scss/_reboot.scss CHANGED
@@ -276,4 +276,8 @@ label {
276
276
  display: inline-block;
277
277
  font-size: $label-font-size;
278
278
  margin-bottom: $label-margin-bottom;
279
+
280
+ &[for] {
281
+ cursor: pointer;
282
+ }
279
283
  }
@@ -29,7 +29,7 @@
29
29
  margin-bottom: $section-spacer-mobile;
30
30
  }
31
31
 
32
- &:last-child:not([class^="order-"]),
32
+ &:not([class*="order-"]):last-child,
33
33
  &.last-child {
34
34
  margin-bottom: 0;
35
35
  }
@@ -588,7 +588,7 @@
588
588
  padding-top: 0;
589
589
  }
590
590
 
591
- & + .section-collapse.visible:not([style*="display:none"]):not([style*="display: none"]):not(.hidden):not(.d-none) {
591
+ & + .section-collapse.show:not([style*="display:none"]):not([style*="display: none"]):not(.hidden):not(.d-none) {
592
592
  padding-top: 0;
593
593
  }
594
594
 
@@ -645,6 +645,7 @@
645
645
 
646
646
  .title {
647
647
  display: flex;
648
+ flex-direction: column;
648
649
  }
649
650
 
650
651
  .actions {
@@ -682,9 +683,20 @@
682
683
  }
683
684
 
684
685
  &.section-collapse {
686
+ position: relative;
685
687
  transition: padding .35s ease, margin .35s ease;
686
688
 
687
- &:not(.visible) {
689
+ .collapse {
690
+ left: $section-padding;
691
+ right: $section-padding;
692
+
693
+ &.show {
694
+ left: auto;
695
+ right: auto;
696
+ }
697
+ }
698
+
699
+ &:not(.show) {
688
700
  margin-top: 0;
689
701
  padding-top: 0;
690
702
  padding-bottom: 0;
package/scss/_select.scss CHANGED
@@ -11,7 +11,16 @@
11
11
  height: $input-height;
12
12
  vertical-align: top;
13
13
  border-radius: $select-border-radius;
14
- -webkit-font-smoothing: subpixel-antialiased;
14
+
15
+ &.form-control {
16
+ border: 0;
17
+ padding: 0;
18
+ }
19
+
20
+ svg,
21
+ .icon {
22
+ pointer-events: none;
23
+ }
15
24
 
16
25
  .select {
17
26
  position: absolute;
package/scss/_tables.scss CHANGED
@@ -21,7 +21,8 @@
21
21
  .col-img-xs { width: 24px; }
22
22
  .col-img-sm { width: 32px; }
23
23
  .col-img-md { width: 50px; }
24
- .col-img-lg { width: 120px; }
24
+ .col-img-lg { width: 90px; }
25
+ .col-img-xl { width: 120px; }
25
26
  .col-select { width: 45px; }
26
27
 
27
28
  thead,
@@ -18,4 +18,5 @@
18
18
  @import "utilities/sizing";
19
19
  @import "utilities/spacing";
20
20
  @import "utilities/text";
21
- @import "utilities/collapse";
21
+ @import "utilities/collapse";
22
+ @import "utilities/visibility";
@@ -392,7 +392,7 @@ $input-bg: color('white') !default;
392
392
  $input-disabled-bg: color('grey-lighter') !default;
393
393
 
394
394
  $input-color: $body-color !default;
395
- $input-border-color: $border-color !default;
395
+ $input-border-color: $border-color !default;
396
396
  $input-border-width: $input-btn-border-width !default;
397
397
 
398
398
  $input-border-radius: $border-radius !default;
@@ -517,7 +517,7 @@ $table-accent-bg: color('grey-lighter') !default;
517
517
  $table-link-color: $link-color !default;
518
518
  $table-link-hover-color: $link-hover-color !default;
519
519
 
520
- $table-head-bg: transparent !default;
520
+ $table-head-bg: color('grey-lightest') !default;
521
521
  $table-head-color: color('grey-darker') !default;
522
522
 
523
523
  $table-icon-color: color('grey-darker') !default;
package/scss/cool.scss CHANGED
@@ -33,4 +33,5 @@
33
33
  @import "utilities";
34
34
  @import "select";
35
35
  @import "toast";
36
- @import "list-group";
36
+ @import "list-group";
37
+ @import "notification";
@@ -0,0 +1,7 @@
1
+ // Notification
2
+ // ---------------------------------------------------------------------------------------------------------------
3
+
4
+ @mixin notification-variant($color) {
5
+ background: transparentize($color, 0.95);
6
+ border: 1px solid $color;
7
+ }
@@ -0,0 +1,7 @@
1
+ // Visiblity
2
+ // ---------------------------------------------------------------------------------------------------------------
3
+
4
+ @mixin invisible($visibility) {
5
+
6
+ visibility: $visibility !important;
7
+ }
@@ -4,7 +4,7 @@
4
4
  [data-collapse-indicator] {
5
5
  display: inline-block;
6
6
 
7
- &.visible {
7
+ &.show {
8
8
  > .icon {
9
9
  transform: rotate(180deg);
10
10
  }
@@ -16,7 +16,7 @@
16
16
  visibility: hidden;
17
17
  transition: height .35s ease;
18
18
 
19
- &.visible {
19
+ &.show {
20
20
  position: relative;
21
21
  visibility: visible;
22
22
  transition: height .35s ease;
@@ -7,4 +7,16 @@
7
7
 
8
8
  .c-pointer {
9
9
  cursor: pointer;
10
+ }
11
+
12
+ .c-sortable {
13
+ cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABF0lEQ…%2BX%2BvObByYdEkFh8%2F6qXFrrfeocIk8x2VrNl9A%2F0l7Ib3y%2F5wAAAAAElFTkSuQmCC),move;
14
+ cursor: -webkit-grab;
15
+ cursor: grab;
16
+ }
17
+
18
+ .c-sortable-chosen {
19
+ cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAA8ElEQ…MaIrswx%2FYOXKRSUsXsh8s3Y91rlQK%2FF8IiOx%2B3vxAooqZGlRhljTAAAAAElFTkSuQmCC),move;
20
+ cursor: -webkit-grabbing;
21
+ cursor: grabbing;
10
22
  }
@@ -0,0 +1,10 @@
1
+ // Visiblity
2
+ // ---------------------------------------------------------------------------------------------------------------
3
+
4
+ .visible {
5
+ visibility: visible !important;
6
+ }
7
+
8
+ .invisible {
9
+ visibility: hidden !important;
10
+ }