@progressio_resources/gravity-design-system 1.0.11 → 1.1.0

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,6 +1,18 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { PrettyCheckBoxChange } from "ngx-pretty-checkbox/lib/model";
1
3
  import * as i0 from "@angular/core";
2
- export declare class GravitySwitchComponent {
3
- disabled: boolean;
4
+ export declare class GravitySwitchComponent implements OnInit {
5
+ data: {
6
+ currentLang?: string;
7
+ customCheck?: boolean;
8
+ cypressTag?: string;
9
+ label: string;
10
+ required?: boolean;
11
+ state?: 'readonly' | 'disabled' | 'enabled';
12
+ };
13
+ switchResponse: EventEmitter<boolean>;
14
+ ngOnInit(): void;
15
+ toggleSwitchHandler($event: PrettyCheckBoxChange): void;
4
16
  static ɵfac: i0.ɵɵFactoryDeclaration<GravitySwitchComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<GravitySwitchComponent, "gravity-switch", never, { "disabled": "disabled"; }, {}, never, ["*"], false, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<GravitySwitchComponent, "gravity-switch", never, { "data": "data"; }, { "switchResponse": "response"; }, never, ["*"], false, never>;
6
18
  }
@@ -25,12 +25,13 @@ export declare class GravityTextFieldComponent implements AfterViewInit, OnInit
25
25
  private inputElement;
26
26
  focusInput: boolean;
27
27
  inputValue: string;
28
+ private readonly placeholders;
28
29
  ngOnInit(): void;
29
30
  ngAfterViewInit(): void;
30
- private readonly placeholders;
31
31
  getPlaceholder(): string;
32
- changeInputValue(): void;
33
32
  clearInput(): void;
33
+ onInputKeyup(): void;
34
+ private changeInputValue;
34
35
  static ɵfac: i0.ɵɵFactoryDeclaration<GravityTextFieldComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<GravityTextFieldComponent, "gravity-text-field", never, { "data": "data"; }, { "textFieldValueResponse": "textFieldValueResponse"; }, never, never, false, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<GravityTextFieldComponent, "gravity-text-field", never, { "data": "data"; }, { "textFieldValueResponse": "response"; }, never, never, false, never>;
36
37
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@progressio_resources/gravity-design-system",
3
3
  "description": "Gravity Design System",
4
- "version": "1.0.11",
4
+ "version": "1.1.0",
5
5
  "license": "SEE LICENSE IN LIBRARY-LICENSE",
6
6
  "peerDependencies": {
7
7
  "@angular/common": "^15.1.0",
8
8
  "@angular/core": "^15.1.0",
9
- "@angular/localize": "^15.1.5",
9
+ "@angular/localize": "^15.2.9",
10
10
  "@ng-bootstrap/ng-bootstrap": "^14.2.0",
11
11
  "@ng-select/ng-select": "^10.0.4",
12
12
  "@popperjs/core": "^2.11.6",
@@ -17,51 +17,58 @@ ngb-datepicker.gravity-datepicker-dialog {
17
17
  padding: 10px;
18
18
 
19
19
  ngb-datepicker-navigation {
20
- .ngb-dp-arrow button {
21
- @extend .hr-label, .sm-regular;
22
-
23
- border-radius: 50%;
24
- color: var(--arrow-calendar-active-primary);
25
- cursor: pointer;
26
- height: 32px;
27
- margin: 0;
28
- outline: none;
29
- padding: 0;
30
- width: 32px;
31
-
32
- span {
33
- border: none;
34
- display: inline-block;
35
- font-size: 28px;
36
- height: 100%;
37
- line-height: 30px;
20
+ .ngb-dp-arrow {
21
+ button {
22
+ @extend .hr-label, .sm-regular;
23
+
24
+ border-radius: 50%;
25
+ color: var(--arrow-calendar-active-primary);
26
+ cursor: pointer;
27
+ height: 32px;
38
28
  margin: 0;
39
- position: relative;
40
- transform: none;
41
- width: 100%;
29
+ outline: none;
30
+ padding: 0;
31
+ width: 32px;
32
+
33
+ span {
34
+ border: none;
35
+ display: inline-block;
36
+ font-size: 28px;
37
+ height: 100%;
38
+ line-height: 30px;
39
+ margin: 0;
40
+ position: relative;
41
+ transform: none;
42
+ width: 100%;
43
+ }
44
+
45
+ &:not([disabled]):hover {
46
+ background-color: var(--bg-arrow-calendar-hover-primary);
47
+ color: var(--arrow-calendar-hover-primary);
48
+ }
49
+
50
+ &[disabled] {
51
+ color: var(--arrow-calendar-disabled-primary);
52
+ }
42
53
  }
43
54
 
44
- &:not([disabled]):hover {
45
- background-color: var(--bg-arrow-calendar-hover-primary);
46
- color: var(--arrow-calendar-hover-primary);
47
- }
48
-
49
- &[disabled] {
50
- color: var(--arrow-calendar-disabled-primary);
55
+ &:has(button[disabled]) {
51
56
  cursor: not-allowed;
52
57
  }
53
- }
54
58
 
55
- .ngb-dp-arrow:not(.right) button span:before {
56
- content: "‹";
57
- }
59
+ &:not(.right) button span:before {
60
+ content: "‹";
61
+ }
58
62
 
59
- .ngb-dp-arrow.right button span:after {
60
- content: "›";
63
+ &.right button span:after {
64
+ content: "›";
65
+ }
61
66
  }
62
67
 
63
68
  .ngb-dp-month-name {
64
69
  @extend .hr-label, .md-regular;
70
+
71
+ background-color: var(--bg-calendar-nav-primary);
65
72
  }
66
73
  }
67
74
  }
@@ -73,6 +80,20 @@ ngb-datepicker.gravity-datepicker-dialog {
73
80
  min-width: 264px;
74
81
  padding: 10px;
75
82
 
83
+ .ngb-dp-weekdays {
84
+ background-color: var(--bg-calender-primary);
85
+ border: none;
86
+
87
+ .ngb-dp-weekday {
88
+ @extend .hr-label, .sm-regular;
89
+ color: var(--on-bg-calender-primary);
90
+ }
91
+ }
92
+
93
+ .ngb-dp-week-number {
94
+ @extend .hr-label, .sm-regular;
95
+ }
96
+
76
97
  .ngb-dp-day {
77
98
  border-radius: 50%;
78
99
  color: var(--number-calender-active-primary);
@@ -92,8 +113,8 @@ ngb-datepicker.gravity-datepicker-dialog {
92
113
  }
93
114
 
94
115
  &.bg-primary.text-white {
95
- background-color: var(--bg-number-calendar-pressed-primary);
96
- color: var(--number-calendar-pressed-primary);
116
+ background-color: var(--bg-number-calendar-pressed-primary) !important;
117
+ color: var(--number-calendar-pressed-primary) !important;
97
118
  }
98
119
  }
99
120
  }
@@ -30,9 +30,7 @@ $pretty--colors: (primary, $pretty--color-primary), (info, $pretty--color-info),
30
30
 
31
31
  // position
32
32
  $pretty-top: 7;
33
- $pretty-top-switch: ($pretty-top * 2) * 1%;
34
33
  $pretty-top-offset: calc((0% - (100% - 1em)) - #{$pretty-top * 1%});
35
- $pretty-top-offset-switch: calc((0% - (100% - 1em)) - #{$pretty-top-switch});
36
34
 
37
35
  // dev
38
36
  $pretty--debug: false !default;
@@ -1,14 +1,14 @@
1
1
  @use 'mixin';
2
2
 
3
3
  .#{$pretty--class-name}.p-switch {
4
- input{
5
- min-width:2em;
4
+ input {
6
5
  &:checked ~ .state, &:disabled ~ .state {
7
6
  @include mixin.switchColor(bg-switch-disabled-primary);
8
7
  }
9
8
  }
10
9
 
11
10
  .state {
11
+ height: 100%;
12
12
  position: relative;
13
13
 
14
14
  &:before {
@@ -16,12 +16,11 @@
16
16
  border: 1px solid var(--bg-switch-off-primary);
17
17
  background-color: var(--bg-switch-off-primary);
18
18
  border-radius: 60px;
19
- width: 2em;
19
+ width: 3.125rem;
20
20
  box-sizing: unset;
21
- height: $pretty--box-size;
21
+ height: calc(100% - 2px);
22
22
  position: absolute;
23
23
  top: 0;
24
- top: $pretty-top-offset-switch;
25
24
  z-index: $pretty--z-index-back;
26
25
  transition: all 0.5s ease;
27
26
  }
@@ -33,12 +32,15 @@
33
32
  &:after {
34
33
  transition: all 0.5s ease;
35
34
  border-radius: 100%;
36
- left: 0;
35
+ left: 5%;
37
36
  border-color: transparent;
38
37
  transform: scale(0.8);
38
+ height: 1.375rem;
39
+ top: 9%;
40
+ width: 1.375rem;
39
41
  }
40
42
 
41
- &:before{
43
+ &:before {
42
44
  border: 1px solid var(--on-bg-switch-off-primary);
43
45
  background-color: var(--on-bg-switch-off-primary);
44
46
  }
@@ -10,6 +10,6 @@
10
10
 
11
11
  label:after {
12
12
  background-color: var(--on-#{$varColorName}) !important;
13
- left: 1em;
13
+ left: 55%;
14
14
  }
15
15
  }