@net7/components 3.12.2 → 3.12.4

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.
@@ -15,6 +15,10 @@ export interface InputCheckbox {
15
15
  * Unique ID for the checkbox
16
16
  */
17
17
  id: string;
18
+ /**
19
+ * The name of the control.
20
+ */
21
+ name?: string;
18
22
  /**
19
23
  * Label for the checkbox
20
24
  */
@@ -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
  *
@@ -16,27 +44,14 @@ export interface InputSelectData {
16
44
  * A unique ID for the select item
17
45
  */
18
46
  id: string;
47
+ /**
48
+ * The name of the control.
49
+ */
50
+ name?: string;
19
51
  /**
20
52
  * The array of <option> elements
21
53
  */
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
- }>;
54
+ options: Array<InputSelectOption>;
40
55
  /**
41
56
  * Label for the <select> element
42
57
  */
@@ -45,6 +60,10 @@ export interface InputSelectData {
45
60
  * Prevents the user from changing any option
46
61
  */
47
62
  disabled?: boolean;
63
+ /**
64
+ * Forces the user to select an option
65
+ */
66
+ required?: boolean;
48
67
  /**
49
68
  * Payload for the select's change event
50
69
  */
@@ -1,3 +1,4 @@
1
+ import { OnOff } from '../../shared-interfaces';
1
2
  import * as i0 from "@angular/core";
2
3
  /**
3
4
  * Interface for InputTextData
@@ -24,7 +25,11 @@ export interface InputTextData {
24
25
  */
25
26
  type?: 'text' | 'number';
26
27
  /**
27
- * Placeholder text inside the input box
28
+ * The name of the control.
29
+ */
30
+ name?: string;
31
+ /**
32
+ * A hint to the user of what can be entered in the control.
28
33
  */
29
34
  placeholder?: string;
30
35
  /**
@@ -63,6 +68,19 @@ export interface InputTextData {
63
68
  * Input maximun allowed value (only for type=number)
64
69
  */
65
70
  max?: number;
71
+ /**
72
+ * The maximum number of characters (UTF-16 code units) that the user can enter.
73
+ * If this value isn't specified, the user can enter an unlimited number of characters.
74
+ */
75
+ maxlength?: number;
76
+ /**
77
+ * The minimum number of characters (UTF-16 code units) required that the user should enter.
78
+ */
79
+ minlength?: number;
80
+ /** Indicates whether the value of the control can be automatically completed by the browser. */
81
+ autocomplete?: OnOff;
82
+ /** Specifies that the user must fill in a value before submitting a form. */
83
+ required?: boolean;
66
84
  /**
67
85
  * Additional HTML Classes
68
86
  */
@@ -1,16 +1,52 @@
1
+ import { OnOff } from '../../shared-interfaces';
1
2
  import * as i0 from "@angular/core";
2
3
  export declare type InputTextareaData = {
3
4
  /** Unique ID for the text input element */
4
5
  id: string;
5
- /** Placeholder text inside the textarea */
6
+ /** A hint to the user of what can be entered in the control. */
6
7
  placeholder?: string;
7
8
  /** Default value of the textarea */
8
9
  value?: string | number | null;
9
10
  /** Label for the textarea */
10
11
  label?: string;
11
- /** Prevents the user from changing the input's value */
12
+ /**
13
+ * Indicates that the user cannot interact with the control.
14
+ * If this attribute is not specified, the control inherits its setting
15
+ * from the containing element.
16
+ */
12
17
  disabled?: boolean;
13
- /** Optional icon to render inside the textarea (eg. n7-icon-search) */
18
+ /** Indicates whether the value of the control can be automatically completed by the browser. */
19
+ autocomplete?: OnOff;
20
+ /**
21
+ * Lets you specify that a form control should have input focus when the page loads.
22
+ * Only one form-associated element in a document can have this attribute specified.
23
+ */
24
+ autofocus?: boolean;
25
+ /**
26
+ * The maximum number of characters (UTF-16 code units) that the user can enter.
27
+ * If this value isn't specified, the user can enter an unlimited number of characters.
28
+ */
29
+ maxlength?: number;
30
+ /**
31
+ * The minimum number of characters (UTF-16 code units) required that the user should enter.
32
+ */
33
+ minlength?: number;
34
+ /** The name of the control. */
35
+ name?: string;
36
+ /** Specifies that the user must fill in a value before submitting a form. */
37
+ required?: boolean;
38
+ /**
39
+ * The number of visible text lines for the control.
40
+ * If it is specified, it must be a positive integer.
41
+ * @defaultValue 2
42
+ */
43
+ rows?: number;
44
+ /**
45
+ * The visible width of the text control, in average character widths.
46
+ * If it is specified, it must be a positive integer.
47
+ * @defaultValue 20
48
+ */
49
+ cols?: number;
14
50
  /** Payload that is sent when the user changes the value */
15
51
  inputPayload?: any;
16
52
  /** Payload that is sent when the user presses the "Enter" key */
@@ -65,3 +65,4 @@ export declare type Image = {
65
65
  /** Optional classes */
66
66
  classes?: string;
67
67
  };
68
+ export declare type OnOff = 'on' | 'off';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@net7/components",
3
- "version": "3.12.2",
3
+ "version": "3.12.4",
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
+ }