nice-elements 1.4.9 → 1.4.10
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/.vscode/settings.json +4 -1
- package/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/bower.json +1 -1
- package/dist/nice.js +43 -4
- package/dist/nice.min.js +1 -1
- package/dist/style.css +37 -19
- package/dist/style.css.map +1 -1
- package/dist/style.min.css +1 -1
- package/package.json +1 -1
- package/src/components/nice-help/nice-help.html +7 -4
- package/src/components/nice-help/nice-help.js +36 -0
- package/src/components/nice-help/nice-help.scss +37 -21
package/.vscode/settings.json
CHANGED
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
package/bower.json
CHANGED
package/dist/nice.js
CHANGED
|
@@ -3409,6 +3409,42 @@ angular.module('niceElements')
|
|
|
3409
3409
|
restrict: 'E',
|
|
3410
3410
|
scope: {
|
|
3411
3411
|
text: '@'
|
|
3412
|
+
},
|
|
3413
|
+
controller: function ($scope, $element, $timeout) {
|
|
3414
|
+
// Setup popper
|
|
3415
|
+
// https://popper.js.org/docs/v2/constructors/
|
|
3416
|
+
$scope.setupPopper = function () {
|
|
3417
|
+
var button = $element[0].getElementsByClassName('nice-help-button')[0];
|
|
3418
|
+
var tooltip = $element[0].getElementsByClassName('nice-help-popup')[0];
|
|
3419
|
+
$scope.popper = Popper.createPopper(button, tooltip, {
|
|
3420
|
+
strategy: 'fixed',
|
|
3421
|
+
placement: 'top',
|
|
3422
|
+
scroll: true,
|
|
3423
|
+
resize: true,
|
|
3424
|
+
modifiers: [
|
|
3425
|
+
{
|
|
3426
|
+
name: 'offset',
|
|
3427
|
+
options: {
|
|
3428
|
+
offset: [0, 5],
|
|
3429
|
+
},
|
|
3430
|
+
},
|
|
3431
|
+
{
|
|
3432
|
+
name: 'arrow',
|
|
3433
|
+
options: {
|
|
3434
|
+
padding: 2,
|
|
3435
|
+
},
|
|
3436
|
+
}
|
|
3437
|
+
],
|
|
3438
|
+
});
|
|
3439
|
+
};
|
|
3440
|
+
|
|
3441
|
+
// $timeout(function () {
|
|
3442
|
+
// $scope.setupPopper();
|
|
3443
|
+
// });
|
|
3444
|
+
|
|
3445
|
+
$scope.onHover = function () {
|
|
3446
|
+
$scope.setupPopper();
|
|
3447
|
+
}
|
|
3412
3448
|
}
|
|
3413
3449
|
};
|
|
3414
3450
|
});
|
|
@@ -5568,10 +5604,13 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
5568
5604
|
|
|
5569
5605
|
|
|
5570
5606
|
$templateCache.put('src/components/nice-help/nice-help.html',
|
|
5571
|
-
"<div class=\"nice-help\">\n" +
|
|
5572
|
-
"<i class=\"fa fa-question-circle\"></i>\n" +
|
|
5573
|
-
"<div class=\"help-
|
|
5574
|
-
"</
|
|
5607
|
+
"<div class=\"nice-help\" ng-mouseover=\"onHover()\">\n" +
|
|
5608
|
+
"<i class=\"fa fa-question-circle nice-help-button\" aria-label=\"\"></i>\n" +
|
|
5609
|
+
"<div class=\"nice-help-popup\">\n" +
|
|
5610
|
+
"<span ng-bind-html=\"text\">{{ text }}</span>\n" +
|
|
5611
|
+
"<div data-popper-arrow class=\"nice-help-arrow\"></div>\n" +
|
|
5612
|
+
"</div>\n" +
|
|
5613
|
+
"</div>"
|
|
5575
5614
|
);
|
|
5576
5615
|
|
|
5577
5616
|
|