nice-elements 1.9.14 → 1.9.16
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 +17 -17
- package/CHANGELOG.md +401 -390
- package/LICENSE.md +21 -21
- package/README.md +93 -93
- package/bower.json +10 -10
- package/dist/nice.js +7930 -7954
- package/dist/nice.min.js +1 -1
- package/dist/style.css +7 -7
- package/dist/style.min.css +7 -7
- package/package.json +40 -40
- package/src/components/nice-button/nice-button.html +4 -4
- package/src/components/nice-button/nice-button.js +41 -41
- package/src/components/nice-button/nice-button.scss +16 -16
- package/src/components/nice-button-toggle/nice-button-toggle.html +9 -9
- package/src/components/nice-button-toggle/nice-button-toggle.js +23 -23
- package/src/components/nice-button-toggle/nice-button-toggle.scss +2 -2
- package/src/components/nice-calendar/nice-calendar.html +91 -91
- package/src/components/nice-calendar/nice-calendar.js +334 -334
- package/src/components/nice-calendar/nice-calendar.scss +285 -285
- package/src/components/nice-checkbox/nice-checkbox.html +5 -5
- package/src/components/nice-checkbox/nice-checkbox.js +33 -33
- package/src/components/nice-checkbox/nice-checkbox.scss +91 -91
- package/src/components/nice-choice/nice-choice.html +18 -18
- package/src/components/nice-choice/nice-choice.js +210 -210
- package/src/components/nice-choice/nice-choice.scss +110 -110
- package/src/components/nice-click-outside/nice-click-outside.js +105 -105
- package/src/components/nice-comment/nice-comment.html +10 -10
- package/src/components/nice-comment/nice-comment.js +69 -69
- package/src/components/nice-comment/nice-comment.scss +39 -39
- package/src/components/nice-date/nice-date.html +74 -74
- package/src/components/nice-date/nice-date.js +327 -327
- package/src/components/nice-date/nice-date.scss +302 -302
- package/src/components/nice-date-input/nice-date-input.html +41 -41
- package/src/components/nice-date-input/nice-date-input.js +109 -109
- package/src/components/nice-date-input/nice-date-input.scss +45 -45
- package/src/components/nice-date-range/nice-date-range.html +15 -15
- package/src/components/nice-date-range/nice-date-range.js +76 -76
- package/src/components/nice-date-range/nice-date-range.scss +390 -390
- package/src/components/nice-datetime-picker/nice-datetime-picker.html +29 -29
- package/src/components/nice-datetime-picker/nice-datetime-picker.js +87 -87
- package/src/components/nice-datetime-picker/nice-datetime-picker.scss +428 -428
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +55 -55
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.js +246 -246
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.scss +73 -73
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +44 -44
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.js +172 -172
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.scss +127 -127
- package/src/components/nice-dropdown/nice-dropdown.html +60 -60
- package/src/components/nice-dropdown/nice-dropdown.js +489 -489
- package/src/components/nice-dropdown/nice-dropdown.scss +249 -249
- package/src/components/nice-dropdown-date/nice-dropdown-date.html +28 -28
- package/src/components/nice-dropdown-date/nice-dropdown-date.js +126 -126
- package/src/components/nice-dropdown-date/nice-dropdown-date.scss +82 -82
- package/src/components/nice-dropdown-old/nice-dropdown-old.html +44 -44
- package/src/components/nice-dropdown-old/nice-dropdown-old.js +330 -330
- package/src/components/nice-dropdown-old/nice-dropdown-old.scss +129 -129
- package/src/components/nice-dtp/nice-dtp.html +91 -91
- package/src/components/nice-dtp/nice-dtp.js +833 -833
- package/src/components/nice-help/nice-help.html +6 -6
- package/src/components/nice-help/nice-help.js +55 -55
- package/src/components/nice-help/nice-help.scss +78 -78
- package/src/components/nice-input/nice-input.html +48 -48
- package/src/components/nice-input/nice-input.js +244 -231
- package/src/components/nice-input/nice-input.scss +130 -130
- package/src/components/nice-label/nice-label.html +10 -10
- package/src/components/nice-label/nice-label.js +30 -30
- package/src/components/nice-loader/nice-loader.html +6 -6
- package/src/components/nice-loader/nice-loader.js +28 -28
- package/src/components/nice-loader/nice-loader.scss +47 -47
- package/src/components/nice-notification/nice-notification.html +3 -3
- package/src/components/nice-notification/nice-notification.js +124 -124
- package/src/components/nice-notification/nice-notification.scss +66 -66
- package/src/components/nice-number/nice-number.html +40 -40
- package/src/components/nice-number/nice-number.js +169 -166
- package/src/components/nice-number/nice-number.scss +18 -18
- package/src/components/nice-percent/nice-percent.html +24 -24
- package/src/components/nice-percent/nice-percent.js +94 -94
- package/src/components/nice-pill/nice-pill.html +3 -3
- package/src/components/nice-pill/nice-pill.js +29 -29
- package/src/components/nice-pill/nice-pill.scss +25 -25
- package/src/components/nice-popup/nice-popup.html +6 -6
- package/src/components/nice-popup/nice-popup.js +122 -122
- package/src/components/nice-popup/nice-popup.scss +43 -43
- package/src/components/nice-progress-bar/nice-progress-bar.html +15 -15
- package/src/components/nice-progress-bar/nice-progress-bar.js +54 -54
- package/src/components/nice-progress-bar/nice-progress-bar.scss +47 -47
- package/src/components/nice-quantity/nice-quantity.html +22 -22
- package/src/components/nice-quantity/nice-quantity.js +55 -55
- package/src/components/nice-quantity/nice-quantity.scss +51 -51
- package/src/components/nice-search/nice-search.html +44 -44
- package/src/components/nice-search/nice-search.js +239 -239
- package/src/components/nice-search/nice-search.scss +90 -90
- package/src/components/nice-search2/nice-search2.html +32 -32
- package/src/components/nice-search2/nice-search2.js +264 -264
- package/src/components/nice-search2/nice-search2.scss +80 -80
- package/src/components/nice-slot/nice-slot.html +10 -10
- package/src/components/nice-slot/nice-slot.js +29 -29
- package/src/components/nice-steps/nice-steps.scss +81 -81
- package/src/components/nice-svgs/nice-svgs.html +1262 -1262
- package/src/components/nice-svgs/nice-svgs.js +16 -16
- package/src/components/nice-time-picker/nice-time-picker.html +43 -43
- package/src/components/nice-time-picker/nice-time-picker.js +83 -83
- package/src/components/nice-time-picker/nice-time-picker.scss +37 -37
- package/src/components/nice-title/nice-title.html +3 -3
- package/src/components/nice-title/nice-title.js +21 -21
- package/src/components/nice-toast/nice-toast.html +2 -2
- package/src/components/nice-toast/nice-toast.js +56 -56
- package/src/components/nice-toast/nice-toast.scss +74 -74
- package/src/components/nice-toggle/nice-toggle.html +12 -12
- package/src/components/nice-toggle/nice-toggle.js +95 -95
- package/src/components/nice-toggle/nice-toggle.scss +67 -67
- package/src/components/nice-tooltip/_nice-tooltip.scss +71 -71
- package/src/components/nice-tooltip/nice-tooltip.js +23 -23
- package/src/components/nice-upload/nice-upload.html +22 -22
- package/src/components/nice-upload/nice-upload.js +157 -157
- package/src/components/nice-upload/nice-upload.scss +85 -85
- package/src/components/nice-wrapper/_nice-wrapper.scss +87 -87
- package/src/components/nice-wrapper/nice-wrapper.html +12 -12
- package/src/components/nice-wrapper/nice-wrapper.js +43 -43
- package/src/components/nice-yesno/nice-yesno.html +14 -14
- package/src/components/nice-yesno/nice-yesno.js +109 -109
- package/src/components/nice-yesno/nice-yesno.scss +95 -95
- package/src/filters/nice-date.js +17 -17
- package/src/filters/nice-highlight.js +16 -16
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.html +30 -30
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.js +67 -67
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.scss +19 -19
- package/src/nice.js +2 -2
- package/src/services/nice-service.js +19 -19
- package/src/styles/_bootstrap-variables.scss +178 -178
- package/src/styles/_nice-buttons.scss +403 -403
- package/src/styles/_nice-common.scss +471 -471
- package/src/styles/_nice-ngdialog.scss +85 -85
- package/src/styles/_nice-spacing.scss +283 -283
- package/src/styles/_nice.scss +65 -65
- package/src/styles/_variables.scss +195 -195
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
.nice-toasts {
|
|
2
|
-
z-index: 9999999;
|
|
3
|
-
position: fixed;
|
|
4
|
-
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
|
|
9
|
-
gap: 0.5rem;
|
|
10
|
-
padding: 1rem;
|
|
11
|
-
|
|
12
|
-
&.top {
|
|
13
|
-
top: $nice-navbar-height;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&.bottom {
|
|
17
|
-
bottom: 0;
|
|
18
|
-
flex-direction: column-reverse;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&.center {
|
|
22
|
-
right: 50%;
|
|
23
|
-
transform: translateX(50%);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&.left {
|
|
27
|
-
left: 0;
|
|
28
|
-
align-items: flex-start;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&.right {
|
|
32
|
-
right: 0;
|
|
33
|
-
align-items: flex-end;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.nice-toast {
|
|
37
|
-
background: $nice-hover-color;
|
|
38
|
-
padding: 0.3rem 1.2rem;
|
|
39
|
-
border-radius: 30px;
|
|
40
|
-
font-size: 0.8em;
|
|
41
|
-
font-weight: bold;
|
|
42
|
-
box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
|
|
43
|
-
max-width: 500px;
|
|
44
|
-
|
|
45
|
-
&.success {
|
|
46
|
-
color: white;
|
|
47
|
-
background: $nice-notification-success-bg;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&.error {
|
|
51
|
-
color: white;
|
|
52
|
-
background: $nice-notification-danger-color-bg;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.toast-enter-active {
|
|
58
|
-
animation: bounce-in .5s;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.toast-leave-active {
|
|
62
|
-
animation: bounce-in .5s reverse;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@keyframes bounce-in {
|
|
66
|
-
from {
|
|
67
|
-
transform: translateY(100%);
|
|
68
|
-
opacity: 1;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
to {
|
|
72
|
-
transform: translateY(0);
|
|
73
|
-
opacity: 1;
|
|
74
|
-
}
|
|
1
|
+
.nice-toasts {
|
|
2
|
+
z-index: 9999999;
|
|
3
|
+
position: fixed;
|
|
4
|
+
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
|
|
9
|
+
gap: 0.5rem;
|
|
10
|
+
padding: 1rem;
|
|
11
|
+
|
|
12
|
+
&.top {
|
|
13
|
+
top: $nice-navbar-height;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&.bottom {
|
|
17
|
+
bottom: 0;
|
|
18
|
+
flex-direction: column-reverse;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.center {
|
|
22
|
+
right: 50%;
|
|
23
|
+
transform: translateX(50%);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.left {
|
|
27
|
+
left: 0;
|
|
28
|
+
align-items: flex-start;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.right {
|
|
32
|
+
right: 0;
|
|
33
|
+
align-items: flex-end;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.nice-toast {
|
|
37
|
+
background: $nice-hover-color;
|
|
38
|
+
padding: 0.3rem 1.2rem;
|
|
39
|
+
border-radius: 30px;
|
|
40
|
+
font-size: 0.8em;
|
|
41
|
+
font-weight: bold;
|
|
42
|
+
box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
|
|
43
|
+
max-width: 500px;
|
|
44
|
+
|
|
45
|
+
&.success {
|
|
46
|
+
color: white;
|
|
47
|
+
background: $nice-notification-success-bg;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.error {
|
|
51
|
+
color: white;
|
|
52
|
+
background: $nice-notification-danger-color-bg;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.toast-enter-active {
|
|
58
|
+
animation: bounce-in .5s;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.toast-leave-active {
|
|
62
|
+
animation: bounce-in .5s reverse;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@keyframes bounce-in {
|
|
66
|
+
from {
|
|
67
|
+
transform: translateY(100%);
|
|
68
|
+
opacity: 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
to {
|
|
72
|
+
transform: translateY(0);
|
|
73
|
+
opacity: 1;
|
|
74
|
+
}
|
|
75
75
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<div class="nice-component nice-toggle" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }" ng-form="formToggle">
|
|
2
|
-
<div class="row">
|
|
3
|
-
<!------------------------- Title ------------------------->
|
|
4
|
-
<nice-title text="title" help="help" required="required" label-width="labelWidth"></nice-title>
|
|
5
|
-
|
|
6
|
-
<!------------------------- Field ------------------------->
|
|
7
|
-
<div class="nice-field col-xs-12" ng-class="[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]">
|
|
8
|
-
<button type="button" class="nice-toggle-field" ng-click="switch()" ng-disabled="isDisabled">
|
|
9
|
-
<div class="nice-toggle-field-handle" ng-class="{ 'active': model }">{{ state }}</div>
|
|
10
|
-
</button>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
1
|
+
<div class="nice-component nice-toggle" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }" ng-form="formToggle">
|
|
2
|
+
<div class="row">
|
|
3
|
+
<!------------------------- Title ------------------------->
|
|
4
|
+
<nice-title text="title" help="help" required="required" label-width="labelWidth"></nice-title>
|
|
5
|
+
|
|
6
|
+
<!------------------------- Field ------------------------->
|
|
7
|
+
<div class="nice-field col-xs-12" ng-class="[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]">
|
|
8
|
+
<button type="button" class="nice-toggle-field" ng-click="switch()" ng-disabled="isDisabled">
|
|
9
|
+
<div class="nice-toggle-field-handle" ng-class="{ 'active': model }">{{ state }}</div>
|
|
10
|
+
</button>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
13
|
</div>
|
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @ngdoc directive
|
|
5
|
-
* @name niceElements.directive:niceToggle
|
|
6
|
-
* @description
|
|
7
|
-
* # niceToggle
|
|
8
|
-
*/
|
|
9
|
-
angular.module('niceElements')
|
|
10
|
-
.directive('niceToggle', function () {
|
|
11
|
-
return {
|
|
12
|
-
templateUrl: 'src/components/nice-toggle/nice-toggle.html',
|
|
13
|
-
restrict: 'E',
|
|
14
|
-
scope: {
|
|
15
|
-
model: '=',
|
|
16
|
-
title: '@',
|
|
17
|
-
isDisabled: '=',
|
|
18
|
-
fieldWidth: '@',
|
|
19
|
-
labelWidth: '@',
|
|
20
|
-
defaultFalse: '@',
|
|
21
|
-
noMargin: '@',
|
|
22
|
-
onChange: '&?',
|
|
23
|
-
isInline: '=',
|
|
24
|
-
help: '@'
|
|
25
|
-
},
|
|
26
|
-
controller: function ($scope) {
|
|
27
|
-
if (!$scope.title) { $scope.title = ''; }
|
|
28
|
-
if (!$scope.fieldWidth) { $scope.fieldWidth = 'col-sm-8'; }
|
|
29
|
-
if (!$scope.labelWidth) { $scope.labelWidth = 'col-sm-4'; }
|
|
30
|
-
|
|
31
|
-
// ------------------------- Set overlay button position based on passed state in $scope.model -------------------------
|
|
32
|
-
$scope.setButtonPosition = function (state) {
|
|
33
|
-
if (state) {
|
|
34
|
-
$scope.buttonClass = "yesno-button-yes";
|
|
35
|
-
} else {
|
|
36
|
-
$scope.buttonClass = "yesno-button-no";
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
// ------------------------- Watch for changes from outside -------------------------
|
|
41
|
-
$scope.$watch('model', function (value_new, value_old) {
|
|
42
|
-
if (angular.isDefined($scope.model)) {
|
|
43
|
-
$scope.setButtonLabel($scope.model);
|
|
44
|
-
$scope.setButtonPosition($scope.model);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
// ------------------------- Watch for model value -------------------------
|
|
49
|
-
$scope.$watch('modelValue', function (value_new, value_old) {
|
|
50
|
-
if ($scope.options) {
|
|
51
|
-
$scope.model = $scope.modelValue == $scope.options[0];
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
// ------------------------- Set button label -------------------------
|
|
56
|
-
$scope.setButtonLabel = function (state) {
|
|
57
|
-
if (state) {
|
|
58
|
-
$scope.state = $scope.yes;
|
|
59
|
-
} else {
|
|
60
|
-
$scope.state = $scope.no;
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
// ------------------------- Set width -------------------------
|
|
65
|
-
$scope.setWidth = function (width, el) {
|
|
66
|
-
el.style.width = width;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
// ------------------------- Switch -------------------------
|
|
71
|
-
$scope.switch = function () {
|
|
72
|
-
if (!$scope.isDisabled) {
|
|
73
|
-
$scope.model = !$scope.model;
|
|
74
|
-
|
|
75
|
-
if ($scope.options) {
|
|
76
|
-
if ($scope.model) {
|
|
77
|
-
$scope.modelValue = $scope.options[0];
|
|
78
|
-
} else {
|
|
79
|
-
$scope.modelValue = $scope.options[1];
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
84
|
-
$scope.
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
// Call it first time
|
|
89
|
-
$scope.setButtonPosition($scope.model);
|
|
90
|
-
|
|
91
|
-
// Set label based on state passed in $scope.model
|
|
92
|
-
$scope.setButtonLabel($scope.model);
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
});
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @ngdoc directive
|
|
5
|
+
* @name niceElements.directive:niceToggle
|
|
6
|
+
* @description
|
|
7
|
+
* # niceToggle
|
|
8
|
+
*/
|
|
9
|
+
angular.module('niceElements')
|
|
10
|
+
.directive('niceToggle', function () {
|
|
11
|
+
return {
|
|
12
|
+
templateUrl: 'src/components/nice-toggle/nice-toggle.html',
|
|
13
|
+
restrict: 'E',
|
|
14
|
+
scope: {
|
|
15
|
+
model: '=',
|
|
16
|
+
title: '@',
|
|
17
|
+
isDisabled: '=',
|
|
18
|
+
fieldWidth: '@',
|
|
19
|
+
labelWidth: '@',
|
|
20
|
+
defaultFalse: '@',
|
|
21
|
+
noMargin: '@',
|
|
22
|
+
onChange: '&?',
|
|
23
|
+
isInline: '=',
|
|
24
|
+
help: '@'
|
|
25
|
+
},
|
|
26
|
+
controller: function ($scope) {
|
|
27
|
+
if (!$scope.title) { $scope.title = ''; }
|
|
28
|
+
if (!$scope.fieldWidth) { $scope.fieldWidth = 'col-sm-8'; }
|
|
29
|
+
if (!$scope.labelWidth) { $scope.labelWidth = 'col-sm-4'; }
|
|
30
|
+
|
|
31
|
+
// ------------------------- Set overlay button position based on passed state in $scope.model -------------------------
|
|
32
|
+
$scope.setButtonPosition = function (state) {
|
|
33
|
+
if (state) {
|
|
34
|
+
$scope.buttonClass = "yesno-button-yes";
|
|
35
|
+
} else {
|
|
36
|
+
$scope.buttonClass = "yesno-button-no";
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// ------------------------- Watch for changes from outside -------------------------
|
|
41
|
+
$scope.$watch('model', function (value_new, value_old) {
|
|
42
|
+
if (angular.isDefined($scope.model)) {
|
|
43
|
+
$scope.setButtonLabel($scope.model);
|
|
44
|
+
$scope.setButtonPosition($scope.model);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// ------------------------- Watch for model value -------------------------
|
|
49
|
+
$scope.$watch('modelValue', function (value_new, value_old) {
|
|
50
|
+
if ($scope.options) {
|
|
51
|
+
$scope.model = $scope.modelValue == $scope.options[0];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// ------------------------- Set button label -------------------------
|
|
56
|
+
$scope.setButtonLabel = function (state) {
|
|
57
|
+
if (state) {
|
|
58
|
+
$scope.state = $scope.yes;
|
|
59
|
+
} else {
|
|
60
|
+
$scope.state = $scope.no;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// ------------------------- Set width -------------------------
|
|
65
|
+
$scope.setWidth = function (width, el) {
|
|
66
|
+
el.style.width = width;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
// ------------------------- Switch -------------------------
|
|
71
|
+
$scope.switch = function () {
|
|
72
|
+
if (!$scope.isDisabled) {
|
|
73
|
+
$scope.model = !$scope.model;
|
|
74
|
+
|
|
75
|
+
if ($scope.options) {
|
|
76
|
+
if ($scope.model) {
|
|
77
|
+
$scope.modelValue = $scope.options[0];
|
|
78
|
+
} else {
|
|
79
|
+
$scope.modelValue = $scope.options[1];
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
84
|
+
$scope.formToggle.$setDirty();
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// Call it first time
|
|
89
|
+
$scope.setButtonPosition($scope.model);
|
|
90
|
+
|
|
91
|
+
// Set label based on state passed in $scope.model
|
|
92
|
+
$scope.setButtonLabel($scope.model);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
});
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
.nice-toggle {
|
|
2
|
-
&:focus-within {
|
|
3
|
-
.nice-toggle-field {
|
|
4
|
-
@extend .nice-focus;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.nice-title {
|
|
9
|
-
min-height: 27px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&.nice-component-inline {
|
|
13
|
-
.row {
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
margin: 0;
|
|
17
|
-
|
|
18
|
-
nice-title {
|
|
19
|
-
order: 2;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.nice-title {
|
|
23
|
-
margin: 0;
|
|
24
|
-
padding: 0;
|
|
25
|
-
margin-left: 1rem;
|
|
26
|
-
line-height: 25px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.nice-field {
|
|
30
|
-
margin: 0;
|
|
31
|
-
padding: 0;
|
|
32
|
-
width: auto;
|
|
33
|
-
order: 1;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.nice-toggle-field {
|
|
39
|
-
border: 1px solid var(--nice-border-color);
|
|
40
|
-
background: var(--nice-input-bg);
|
|
41
|
-
border-radius: 1rem;
|
|
42
|
-
position: relative;
|
|
43
|
-
width: 50px;
|
|
44
|
-
height: 25px;
|
|
45
|
-
|
|
46
|
-
// &:hover {
|
|
47
|
-
// .nice-toggle-field-handle {
|
|
48
|
-
// background: var(--nice-primary-color-darker);
|
|
49
|
-
// }
|
|
50
|
-
// }
|
|
51
|
-
|
|
52
|
-
.nice-toggle-field-handle {
|
|
53
|
-
position: absolute;
|
|
54
|
-
top: 2px;
|
|
55
|
-
left: 2px;
|
|
56
|
-
width: 19px;
|
|
57
|
-
height: 19px;
|
|
58
|
-
background: var(--nice-border-color);
|
|
59
|
-
border-radius: 50%;
|
|
60
|
-
transition: left 0.3s ease-in-out;
|
|
61
|
-
|
|
62
|
-
&.active {
|
|
63
|
-
background: var(--nice-primary-color);
|
|
64
|
-
left: calc(100% - 22px);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
1
|
+
.nice-toggle {
|
|
2
|
+
&:focus-within {
|
|
3
|
+
.nice-toggle-field {
|
|
4
|
+
@extend .nice-focus;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.nice-title {
|
|
9
|
+
min-height: 27px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&.nice-component-inline {
|
|
13
|
+
.row {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
margin: 0;
|
|
17
|
+
|
|
18
|
+
nice-title {
|
|
19
|
+
order: 2;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.nice-title {
|
|
23
|
+
margin: 0;
|
|
24
|
+
padding: 0;
|
|
25
|
+
margin-left: 1rem;
|
|
26
|
+
line-height: 25px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.nice-field {
|
|
30
|
+
margin: 0;
|
|
31
|
+
padding: 0;
|
|
32
|
+
width: auto;
|
|
33
|
+
order: 1;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.nice-toggle-field {
|
|
39
|
+
border: 1px solid var(--nice-border-color);
|
|
40
|
+
background: var(--nice-input-bg);
|
|
41
|
+
border-radius: 1rem;
|
|
42
|
+
position: relative;
|
|
43
|
+
width: 50px;
|
|
44
|
+
height: 25px;
|
|
45
|
+
|
|
46
|
+
// &:hover {
|
|
47
|
+
// .nice-toggle-field-handle {
|
|
48
|
+
// background: var(--nice-primary-color-darker);
|
|
49
|
+
// }
|
|
50
|
+
// }
|
|
51
|
+
|
|
52
|
+
.nice-toggle-field-handle {
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 2px;
|
|
55
|
+
left: 2px;
|
|
56
|
+
width: 19px;
|
|
57
|
+
height: 19px;
|
|
58
|
+
background: var(--nice-border-color);
|
|
59
|
+
border-radius: 50%;
|
|
60
|
+
transition: left 0.3s ease-in-out;
|
|
61
|
+
|
|
62
|
+
&.active {
|
|
63
|
+
background: var(--nice-primary-color);
|
|
64
|
+
left: calc(100% - 22px);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
68
|
}
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
.nice-tooltip {
|
|
2
|
-
$nice-help-popup-color: #3e3e3e;
|
|
3
|
-
position: relative;
|
|
4
|
-
display: inline-block;
|
|
5
|
-
cursor: help;
|
|
6
|
-
|
|
7
|
-
&:hover{
|
|
8
|
-
.nice-tooltip-window {
|
|
9
|
-
display: block;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&:before {
|
|
13
|
-
display: block;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// &:before {
|
|
18
|
-
// content: attr(nice-tooltip) " ";
|
|
19
|
-
// display: none;
|
|
20
|
-
// position: absolute;
|
|
21
|
-
// background: $nice-help-popup-color;
|
|
22
|
-
// color: white;
|
|
23
|
-
// max-width: 200px;
|
|
24
|
-
// width: max-content;
|
|
25
|
-
// bottom: 100%;
|
|
26
|
-
// left: 50%;
|
|
27
|
-
// border-radius: $nice-border-radius;
|
|
28
|
-
// font-size: 12px;
|
|
29
|
-
// z-index: 99999;
|
|
30
|
-
// transform: translate(-50%, -5px);
|
|
31
|
-
// line-height: 1.3;
|
|
32
|
-
// padding: 7px 10px;
|
|
33
|
-
// font-weight: normal;
|
|
34
|
-
// text-align: center;
|
|
35
|
-
// text-transform: none;
|
|
36
|
-
// }
|
|
37
|
-
|
|
38
|
-
.nice-tooltip-window {
|
|
39
|
-
display: none;
|
|
40
|
-
position: absolute;
|
|
41
|
-
background: $nice-help-popup-color;
|
|
42
|
-
color: white;
|
|
43
|
-
max-width: 200px;
|
|
44
|
-
width: max-content;
|
|
45
|
-
bottom: 100%;
|
|
46
|
-
left: 50%;
|
|
47
|
-
border-radius: $nice-border-radius;
|
|
48
|
-
font-size: 12px;
|
|
49
|
-
z-index: 99999;
|
|
50
|
-
transform: translate(-50%, -5px);
|
|
51
|
-
line-height: 1.3;
|
|
52
|
-
padding: 7px 10px;
|
|
53
|
-
font-weight: normal;
|
|
54
|
-
text-align: center;
|
|
55
|
-
text-transform: none;
|
|
56
|
-
|
|
57
|
-
&:before {
|
|
58
|
-
content: "";
|
|
59
|
-
width: 0;
|
|
60
|
-
height: 0;
|
|
61
|
-
position: absolute;
|
|
62
|
-
bottom: -3px;
|
|
63
|
-
left: 50%;
|
|
64
|
-
margin-left: -5px;
|
|
65
|
-
|
|
66
|
-
border-bottom: 0px solid transparent;
|
|
67
|
-
border-left: 5px solid transparent;
|
|
68
|
-
border-right: 5px solid transparent;
|
|
69
|
-
border-top: 3px solid $nice-help-popup-color;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
1
|
+
.nice-tooltip {
|
|
2
|
+
$nice-help-popup-color: #3e3e3e;
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-block;
|
|
5
|
+
cursor: help;
|
|
6
|
+
|
|
7
|
+
&:hover{
|
|
8
|
+
.nice-tooltip-window {
|
|
9
|
+
display: block;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&:before {
|
|
13
|
+
display: block;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// &:before {
|
|
18
|
+
// content: attr(nice-tooltip) " ";
|
|
19
|
+
// display: none;
|
|
20
|
+
// position: absolute;
|
|
21
|
+
// background: $nice-help-popup-color;
|
|
22
|
+
// color: white;
|
|
23
|
+
// max-width: 200px;
|
|
24
|
+
// width: max-content;
|
|
25
|
+
// bottom: 100%;
|
|
26
|
+
// left: 50%;
|
|
27
|
+
// border-radius: $nice-border-radius;
|
|
28
|
+
// font-size: 12px;
|
|
29
|
+
// z-index: 99999;
|
|
30
|
+
// transform: translate(-50%, -5px);
|
|
31
|
+
// line-height: 1.3;
|
|
32
|
+
// padding: 7px 10px;
|
|
33
|
+
// font-weight: normal;
|
|
34
|
+
// text-align: center;
|
|
35
|
+
// text-transform: none;
|
|
36
|
+
// }
|
|
37
|
+
|
|
38
|
+
.nice-tooltip-window {
|
|
39
|
+
display: none;
|
|
40
|
+
position: absolute;
|
|
41
|
+
background: $nice-help-popup-color;
|
|
42
|
+
color: white;
|
|
43
|
+
max-width: 200px;
|
|
44
|
+
width: max-content;
|
|
45
|
+
bottom: 100%;
|
|
46
|
+
left: 50%;
|
|
47
|
+
border-radius: $nice-border-radius;
|
|
48
|
+
font-size: 12px;
|
|
49
|
+
z-index: 99999;
|
|
50
|
+
transform: translate(-50%, -5px);
|
|
51
|
+
line-height: 1.3;
|
|
52
|
+
padding: 7px 10px;
|
|
53
|
+
font-weight: normal;
|
|
54
|
+
text-align: center;
|
|
55
|
+
text-transform: none;
|
|
56
|
+
|
|
57
|
+
&:before {
|
|
58
|
+
content: "";
|
|
59
|
+
width: 0;
|
|
60
|
+
height: 0;
|
|
61
|
+
position: absolute;
|
|
62
|
+
bottom: -3px;
|
|
63
|
+
left: 50%;
|
|
64
|
+
margin-left: -5px;
|
|
65
|
+
|
|
66
|
+
border-bottom: 0px solid transparent;
|
|
67
|
+
border-left: 5px solid transparent;
|
|
68
|
+
border-right: 5px solid transparent;
|
|
69
|
+
border-top: 3px solid $nice-help-popup-color;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
72
|
}
|