@net7/components 3.12.1 → 3.12.3

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.
@@ -1,4 +1,4 @@
1
- import { Button, Icon } from 'dv-components-lib';
1
+ import { Button, Icon } from '../../shared-interfaces';
2
2
  import * as i0 from "@angular/core";
3
3
  export interface ButtonData extends Button {
4
4
  isDisabled?: boolean;
@@ -1,4 +1,32 @@
1
1
  import * as i0 from "@angular/core";
2
+ export interface InputSelectOption {
3
+ /**
4
+ * The rendered text for the <option> element
5
+ */
6
+ label: string;
7
+ /**
8
+ * The event value for the <option> element.
9
+ * If the value is empty string, the option will
10
+ * be rendered as placeholder.
11
+ */
12
+ value: string | number;
13
+ /**
14
+ * Sets the option as default (selected)
15
+ */
16
+ selected?: boolean;
17
+ /**
18
+ * Prevents the user from selecting this option
19
+ */
20
+ disabled?: boolean;
21
+ /**
22
+ * Prevents the option from appearing in the list
23
+ */
24
+ hidden?: boolean;
25
+ /**
26
+ * Additional HTML classes for the option
27
+ */
28
+ classes?: string;
29
+ }
2
30
  /**
3
31
  * Interface for InputSelect
4
32
  *
@@ -19,24 +47,7 @@ export interface InputSelectData {
19
47
  /**
20
48
  * The array of <option> elements
21
49
  */
22
- options: Array<{
23
- /**
24
- * The rendered text for the <option> element
25
- */
26
- label: string;
27
- /**
28
- * The event value for the <option> element
29
- */
30
- value: string | number;
31
- /**
32
- * Sets the option as default (selected)
33
- */
34
- selected?: boolean;
35
- /**
36
- * Prevents the user from selecting this option
37
- */
38
- disabled?: boolean;
39
- }>;
50
+ options: Array<InputSelectOption>;
40
51
  /**
41
52
  * Label for the <select> element
42
53
  */
@@ -45,6 +56,10 @@ export interface InputSelectData {
45
56
  * Prevents the user from changing any option
46
57
  */
47
58
  disabled?: boolean;
59
+ /**
60
+ * Forces the user to select an option
61
+ */
62
+ required?: boolean;
48
63
  /**
49
64
  * Payload for the select's change event
50
65
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@net7/components",
3
- "version": "3.12.1",
3
+ "version": "3.12.3",
4
4
  "dependencies": {
5
5
  "apexcharts": "^3.8.5",
6
6
  "d3": "^7.1.1",
@@ -11,31 +11,24 @@
11
11
  .n7-btn {
12
12
  display: inline-flex;
13
13
  align-items: center;
14
+ justify-content: center;
14
15
  }
15
16
 
16
17
  .n7-btn.is-loading {
17
18
  min-width: 80px;
18
- display: flex;
19
- align-items: center;
20
- justify-content: center;
21
19
 
22
- .n7-btn__loader {
23
- width: 10px !important;
24
- height: 10px !important;
25
- border-width: 3px;
20
+ .n7-loader {
21
+ width: 18px;
22
+ height: 18px;
23
+ border: 3px solid $loader-color-back;
24
+ border-bottom-color: $loader-color-front;
26
25
  }
27
26
  }
28
27
 
29
- .n7-btn-cta {
30
- .n7-btn__loader {
31
- width: 10px !important;
32
- height: 10px !important;
33
- position: relative;
34
- border-top: 1.1em solid rgb(200 212 255 / 30%);
35
- border-right: 1.1em solid rgb(200 212 255 / 30%);
36
- border-bottom: 1.1em solid rgb(200 212 255 / 30%);
37
- border-left: 1.1em solid #ffffff;
38
- border-width: 3px;
28
+ .n7-btn.n7-btn-cta {
29
+ .n7-loader {
30
+ border: 3px solid rgb(200 212 255 / 30%);
31
+ border-bottom-color: $color-gray-00;
39
32
  }
40
33
  }
41
34
 
@@ -49,6 +42,10 @@
49
42
  margin: 0 $space * 0.5;
50
43
  }
51
44
 
45
+ n7-loader {
46
+ display: inline-flex;
47
+ }
48
+
52
49
 
53
50
 
54
51
  /* ------------------------------------ *\
@@ -1,13 +1,27 @@
1
1
  /* ------------------------------------ *\
2
2
  #SELECT
3
3
  \* ------------------------------------ */
4
+
4
5
  .n7-input-select {
5
- display: inline-block;
6
- margin-bottom: calc($space/2);
7
- margin-right: $space;
6
+
7
+ select:required:invalid {
8
+ color: $color-gray-04;
9
+ }
10
+ option[value=""][disabled] {
11
+ display: none;
12
+ }
13
+ option {
14
+ color: $color-gray-05;
15
+ }
16
+
17
+ option[disabled] {
18
+ background-color: $color-gray-03;
19
+ color: $color-gray-04;
20
+ }
8
21
  }
9
22
 
10
23
 
24
+
11
25
  /* ------------------------------------ *\
12
26
  #MEDIA-QUERIES
13
27
  \* ------------------------------------ */
@@ -7,48 +7,26 @@
7
7
  /* ------------------------------------ *\
8
8
  LOADER
9
9
  \* ------------------------------------ */
10
- .n7-loader {
11
- position: relative;
12
- text-indent: -9999em;
13
- border-top: 1.1em solid $loader-color-back;
14
- border-right: 1.1em solid $loader-color-back;
15
- border-bottom: 1.1em solid $loader-color-back;
16
- border-left: 1.1em solid $loader-color-front;
17
- border-width: $loader-thickness;
18
- -webkit-transform: translateZ(0);
19
- -ms-transform: translateZ(0);
20
- transform: translateZ(0);
21
- -webkit-animation: load8 1s infinite linear;
22
- animation: load8 1s infinite linear;
23
10
 
24
- &, &:after {
25
- border-radius: 50%;
26
- width: $loader-size !important;
27
- height: $loader-size !important;
28
- }
11
+ .n7-loader {
12
+ width: $loader-size;
13
+ height: $loader-size;
14
+ border: 5px solid $loader-color-back;
15
+ border-bottom-color: $loader-color-front;
16
+ border-radius: 50%;
17
+ display: inline-block;
18
+ box-sizing: border-box;
19
+ animation: rotation 1s linear infinite;
29
20
  }
30
21
 
31
-
32
22
  /* ------------------------------------ *\
33
23
  ANIMATION
34
24
  \* ------------------------------------ */
35
- @-webkit-keyframes load8 {
36
- 0% {
37
- -webkit-transform: rotate(0deg);
38
- transform: rotate(0deg);
39
- }
40
- 100% {
41
- -webkit-transform: rotate(360deg);
42
- transform: rotate(360deg);
43
- }
44
- }
45
- @keyframes load8 {
25
+ @keyframes rotation {
46
26
  0% {
47
- -webkit-transform: rotate(0deg);
48
27
  transform: rotate(0deg);
49
28
  }
50
29
  100% {
51
- -webkit-transform: rotate(360deg);
52
30
  transform: rotate(360deg);
53
31
  }
54
- }
32
+ }