nice-elements 1.10.13 → 1.10.15
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/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/bower.json +1 -1
- package/dist/nice.js +55 -7
- package/dist/nice.min.js +1 -1
- package/dist/style.css +10226 -10175
- package/dist/style.css.map +54 -53
- package/dist/style.min.css +2 -2
- package/package.json +1 -1
- package/src/components/nice-date/nice-date.js +1 -1
- package/src/components/nice-no-data/nice-no-data.scss +4 -9
- package/src/components/nice-table/nice-table.scss +3 -3
- package/src/components/nice-tooltip/_nice-tooltip.scss +1 -1
- package/src/components/nice-tooltip/nice-tooltip.js +4 -4
- package/src/components/nice-view/_nice-view.scss +62 -0
- package/src/components/nice-view/nice-view.html +13 -0
- package/src/components/nice-view/nice-view.js +30 -0
- package/src/components/nice-wrapper/nice-wrapper.js +1 -1
- package/src/services/nice-service.js +1 -1
- package/src/styles/_nice.scss +2 -1
- package/src/styles/_variables.scss +2 -1
package/package.json
CHANGED
|
@@ -115,7 +115,7 @@ angular.module('niceElements')
|
|
|
115
115
|
|
|
116
116
|
// ------------------ Time changes ------------------
|
|
117
117
|
$scope.timeChange = function () {
|
|
118
|
-
|
|
118
|
+
let selectedDate = angular.copy($scope.model);
|
|
119
119
|
selectedDate = $scope._removeTime(selectedDate);
|
|
120
120
|
selectedDate.hours($scope.innerDate.hour);
|
|
121
121
|
selectedDate.minutes($scope.innerDate.minute);
|
|
@@ -6,13 +6,7 @@
|
|
|
6
6
|
padding: 2rem 1rem;
|
|
7
7
|
font-size: 0.9em;
|
|
8
8
|
gap: 0.3rem;
|
|
9
|
-
color: var(--nice-font-color);
|
|
10
|
-
opacity: 0.5;
|
|
11
|
-
transition: opacity 0.3s ease;
|
|
12
|
-
|
|
13
|
-
&:hover {
|
|
14
|
-
opacity: 0.7;
|
|
15
|
-
}
|
|
9
|
+
color: var(--nice-font-color-lighter);
|
|
16
10
|
|
|
17
11
|
&.nice-no-data-fulldiv {
|
|
18
12
|
position: absolute;
|
|
@@ -27,5 +21,6 @@
|
|
|
27
21
|
width: 24px;
|
|
28
22
|
}
|
|
29
23
|
|
|
30
|
-
.nice-no-data-message {
|
|
31
|
-
}
|
|
24
|
+
.nice-no-data-message {
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.nice-table-wrapper {
|
|
2
|
-
min-height: .01%;
|
|
2
|
+
min-height: 0.01%;
|
|
3
3
|
overflow-x: auto;
|
|
4
4
|
|
|
5
5
|
.nice-table {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
.nice-table-freeze-right {
|
|
15
15
|
position: sticky;
|
|
16
16
|
background: var(--nice-card-bg-opacity);
|
|
17
|
-
backdrop-filter: blur(3px);
|
|
17
|
+
// backdrop-filter: blur(3px);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.nice-table-freeze-left {
|
|
@@ -109,4 +109,4 @@
|
|
|
109
109
|
margin-top: -1px;
|
|
110
110
|
border-top: 1px solid var(--nice-border-color);
|
|
111
111
|
}
|
|
112
|
-
}
|
|
112
|
+
}
|
|
@@ -10,7 +10,7 @@ angular.module('niceElements')
|
|
|
10
10
|
.directive('niceTooltip', function () {
|
|
11
11
|
return {
|
|
12
12
|
restrict: 'A',
|
|
13
|
-
controller: function ($scope, $element, $attrs) {
|
|
13
|
+
controller: function ($scope, $element, $attrs, $compile) {
|
|
14
14
|
const id = Math.random().toString(36).substring(7);
|
|
15
15
|
const showEvents = ['mouseenter', 'focus'];
|
|
16
16
|
const hideEvents = ['mouseleave', 'blur'];
|
|
@@ -23,9 +23,8 @@ angular.module('niceElements')
|
|
|
23
23
|
tooltipWindow.id = 'nice-tooltip-window-' + id;
|
|
24
24
|
|
|
25
25
|
// Popper body
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
tooltipWindow.append(tooltipWindowBody);
|
|
26
|
+
const content = $compile("<div class='nice-tooltip-body'>" + $attrs.niceTooltip + "</div>")($scope);
|
|
27
|
+
tooltipWindow.append(content[0]);
|
|
29
28
|
|
|
30
29
|
// Popper arrow
|
|
31
30
|
const tooltipWindowArrow = document.createElement('div');
|
|
@@ -58,6 +57,7 @@ angular.module('niceElements')
|
|
|
58
57
|
});
|
|
59
58
|
|
|
60
59
|
function show() {
|
|
60
|
+
if ($attrs.niceTooltipDisabled == true || $attrs.niceTooltipDisabled == "true") return;
|
|
61
61
|
tooltipWindow.setAttribute('data-show', '');
|
|
62
62
|
popper.update();
|
|
63
63
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.nice-view {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100dvh;
|
|
5
|
+
--nice-view-padding: 2rem;
|
|
6
|
+
|
|
7
|
+
&.nice-view-has-header {
|
|
8
|
+
.nice-view-body {
|
|
9
|
+
padding-top: calc(var(--nice-view-padding) / 2);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&.nice-view-has-footer {
|
|
14
|
+
.nice-view-body {
|
|
15
|
+
padding-bottom: calc(var(--nice-view-padding) / 2);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.nice-view-header {
|
|
20
|
+
flex-shrink: 0;
|
|
21
|
+
padding: var(--nice-view-padding);
|
|
22
|
+
padding-bottom: calc(var(--nice-view-padding) / 2);
|
|
23
|
+
|
|
24
|
+
.nice-view-header-wrapper {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
|
|
28
|
+
.nice-icon {
|
|
29
|
+
height: 50px;
|
|
30
|
+
width: 50px;
|
|
31
|
+
margin-right: 1rem;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.nice-view-header-title {
|
|
36
|
+
font-size: 2em;
|
|
37
|
+
line-height: 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.nice-view-header-subtitle {
|
|
41
|
+
text-transform: uppercase;
|
|
42
|
+
color: var(--nice-primary-color);
|
|
43
|
+
margin-bottom: 3px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.nice-view-body {
|
|
48
|
+
flex-grow: 1;
|
|
49
|
+
overflow: auto;
|
|
50
|
+
padding: var(--nice-view-padding);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.nice-view-footer {
|
|
54
|
+
flex-shrink: 0;
|
|
55
|
+
padding: var(--nice-view-padding);
|
|
56
|
+
padding-top: calc(var(--nice-view-padding) / 2);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (max-width: 767px) {
|
|
60
|
+
--nice-view-padding: 1rem;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<form class="nice-view" ng-submit="submit" ng-class="{ 'nice-view-has-header': hasHeader, 'nice-view-has-footer': hasFooter }">
|
|
2
|
+
<div class="nice-view-header" ng-if="hasHeader">
|
|
3
|
+
<div class="nice-view-header-wrapper">
|
|
4
|
+
<nice-icon ng-if="niceIcon" icon="{{ niceIcon }}"></nice-icon>
|
|
5
|
+
<div>
|
|
6
|
+
<div class="nice-view-header-subtitle">{{ niceSubtitle }}</div>
|
|
7
|
+
<div class="nice-view-header-title">{{ niceTitle }}</div>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="nice-view-body" ng-transclude></div>
|
|
12
|
+
<div class="nice-view-footer" ng-if="hasFooter" ng-transclude="footer"></div>
|
|
13
|
+
</form>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @ngdoc directive
|
|
5
|
+
* @name niceElements.directive:niceView
|
|
6
|
+
* @description
|
|
7
|
+
* # niceView
|
|
8
|
+
*/
|
|
9
|
+
angular.module('niceElements')
|
|
10
|
+
.directive('niceView', function () {
|
|
11
|
+
return {
|
|
12
|
+
templateUrl: 'src/components/nice-view/nice-view.html',
|
|
13
|
+
restrict: 'E',
|
|
14
|
+
replace: true,
|
|
15
|
+
transclude: {
|
|
16
|
+
'header': '?niceViewHeader',
|
|
17
|
+
'footer': '?niceViewFooter'
|
|
18
|
+
},
|
|
19
|
+
scope: {
|
|
20
|
+
niceTitle: '@',
|
|
21
|
+
niceSubtitle: '@',
|
|
22
|
+
niceIcon: '@',
|
|
23
|
+
submit: '=',
|
|
24
|
+
},
|
|
25
|
+
controller: function ($scope, $transclude) {
|
|
26
|
+
$scope.hasHeader = $transclude.isSlotFilled('header') || $scope.niceTitle || $scope.niceSubtitle || $scope.niceIcon;
|
|
27
|
+
$scope.hasFooter = $transclude.isSlotFilled('footer');
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
});
|
|
@@ -33,7 +33,7 @@ angular.module('niceElements')
|
|
|
33
33
|
$scope.hasTitle = $transclude.isSlotFilled('title');
|
|
34
34
|
$scope.hasSubtitle = $transclude.isSlotFilled('subtitle');
|
|
35
35
|
$scope.hasFooter = $transclude.isSlotFilled('footer');
|
|
36
|
-
$scope.hasHeader = $scope.hasTitle || $scope.hasSubtitle || $scope.title || $scope.subtitle || $scope.collapsable;
|
|
36
|
+
$scope.hasHeader = $scope.hasTitle || $scope.hasSubtitle || $scope.title || $scope.niceTitle || $scope.subtitle || $scope.collapsable;
|
|
37
37
|
|
|
38
38
|
$scope.toggle = function () {
|
|
39
39
|
if (!$scope.collapsable) return;
|
package/src/styles/_nice.scss
CHANGED
|
@@ -65,4 +65,5 @@
|
|
|
65
65
|
@import "../components/nice-toggle/nice-toggle";
|
|
66
66
|
@import "../components/nice-no-data/nice-no-data";
|
|
67
67
|
@import "../components/nice-table/nice-table";
|
|
68
|
-
@import "../
|
|
68
|
+
@import "../components/nice-view/nice-view";
|
|
69
|
+
@import "../modals/nice-multilangual-modal/nice-multilangual-modal";
|
|
@@ -124,6 +124,7 @@ $nice-table-bg-active: #f5f5f5 !default;
|
|
|
124
124
|
--nice-font-family: #{$nice-font-family};
|
|
125
125
|
--nice-font-weight: #{$nice-font-weight};
|
|
126
126
|
--nice-font-color: #{$nice-font-color};
|
|
127
|
+
--nice-font-color-lighter: #767676;
|
|
127
128
|
|
|
128
129
|
// ---------- Common ----------
|
|
129
130
|
--nice-hover-color: #{$nice-hover-color};
|
|
@@ -177,7 +178,7 @@ $nice-table-bg-active: #f5f5f5 !default;
|
|
|
177
178
|
// ---------- Card ----------
|
|
178
179
|
--nice-card-border: #{$nice-border-color};
|
|
179
180
|
--nice-card-bg: white;
|
|
180
|
-
--nice-card-bg-opacity: rgba(255, 255, 255, 0.
|
|
181
|
+
--nice-card-bg-opacity: rgba(255, 255, 255, 0.9);
|
|
181
182
|
--nice-card-padding: 2rem;
|
|
182
183
|
|
|
183
184
|
// ---------- Input ----------
|