@wlcm/angular 1.1.2 → 17.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.
Files changed (65) hide show
  1. package/core/esm2022/lib/components/calendar-icon/calendar-icon.component.mjs +12 -0
  2. package/core/esm2022/lib/constants/icon.contants.mjs +3 -1
  3. package/core/esm2022/lib/directives/icon.directive.mjs +21 -6
  4. package/core/esm2022/lib/models/icon.models.mjs +2 -1
  5. package/core/fesm2022/wlcm-angular-core.mjs +30 -6
  6. package/core/fesm2022/wlcm-angular-core.mjs.map +1 -1
  7. package/core/lib/components/calendar-icon/calendar-icon.component.d.ts +5 -0
  8. package/core/lib/directives/icon.directive.d.ts +4 -2
  9. package/core/lib/models/icon.models.d.ts +1 -0
  10. package/date-range-picker/README.md +7 -0
  11. package/date-range-picker/esm2022/index.mjs +7 -0
  12. package/date-range-picker/esm2022/lib/components/calendar-header/calendar-header.component.mjs +62 -0
  13. package/date-range-picker/esm2022/lib/components/date-range-picker/date-range-picker.component.mjs +158 -0
  14. package/date-range-picker/esm2022/lib/components/date-range-picker-bottom-panel/date-range-picker-bottom-panel.component.mjs +19 -0
  15. package/date-range-picker/esm2022/lib/components/date-range-picker-input/date-range-picker-input.component.mjs +122 -0
  16. package/date-range-picker/esm2022/lib/constants/date-range-selection-model.constants.mjs +10 -0
  17. package/date-range-picker/esm2022/lib/constants/date-range-trigger-selection-model.constants.mjs +10 -0
  18. package/date-range-picker/esm2022/lib/date-range-picker.module.mjs +64 -0
  19. package/date-range-picker/esm2022/lib/directives/date-range-picker-input-base.directive.mjs +92 -0
  20. package/date-range-picker/esm2022/lib/directives/date-range-picker-input-end.directive.mjs +65 -0
  21. package/date-range-picker/esm2022/lib/directives/date-range-picker-input-start.directive.mjs +65 -0
  22. package/date-range-picker/esm2022/lib/directives/date-range-picker-trigger.directive.mjs +80 -0
  23. package/date-range-picker/esm2022/lib/directives/left-calendar.directive.mjs +50 -0
  24. package/date-range-picker/esm2022/lib/directives/right-calendar.directive.mjs +59 -0
  25. package/date-range-picker/esm2022/lib/models/data-range-calendar.models.mjs +43 -0
  26. package/date-range-picker/esm2022/lib/models/date-range-validation.models.mjs +5 -0
  27. package/date-range-picker/esm2022/lib/utils/date-range-input.validators.mjs +16 -0
  28. package/date-range-picker/esm2022/lib/utils/date-range-picker-errors.mjs +9 -0
  29. package/date-range-picker/esm2022/wlcm-angular-date-range-picker.mjs +5 -0
  30. package/date-range-picker/fesm2022/wlcm-angular-date-range-picker.mjs +822 -0
  31. package/date-range-picker/fesm2022/wlcm-angular-date-range-picker.mjs.map +1 -0
  32. package/date-range-picker/index.d.ts +6 -0
  33. package/date-range-picker/lib/components/calendar-header/calendar-header.component.d.ts +20 -0
  34. package/date-range-picker/lib/components/date-range-picker/date-range-picker.component.d.ts +37 -0
  35. package/date-range-picker/lib/components/date-range-picker-bottom-panel/date-range-picker-bottom-panel.component.d.ts +8 -0
  36. package/date-range-picker/lib/components/date-range-picker-input/date-range-picker-input.component.d.ts +35 -0
  37. package/date-range-picker/lib/constants/date-range-selection-model.constants.d.ts +5 -0
  38. package/date-range-picker/lib/constants/date-range-trigger-selection-model.constants.d.ts +5 -0
  39. package/date-range-picker/lib/date-range-picker.module.d.ts +10 -0
  40. package/date-range-picker/lib/directives/date-range-picker-input-base.directive.d.ts +32 -0
  41. package/date-range-picker/lib/directives/date-range-picker-input-end.directive.d.ts +16 -0
  42. package/date-range-picker/lib/directives/date-range-picker-input-start.directive.d.ts +17 -0
  43. package/date-range-picker/lib/directives/date-range-picker-trigger.directive.d.ts +26 -0
  44. package/date-range-picker/lib/directives/left-calendar.directive.d.ts +15 -0
  45. package/date-range-picker/lib/directives/right-calendar.directive.d.ts +18 -0
  46. package/date-range-picker/lib/models/data-range-calendar.models.d.ts +21 -0
  47. package/date-range-picker/lib/models/date-range-validation.models.d.ts +3 -0
  48. package/date-range-picker/lib/utils/date-range-input.validators.d.ts +2 -0
  49. package/date-range-picker/lib/utils/date-range-picker-errors.d.ts +4 -0
  50. package/forms/esm2022/lib/forms/components/form-field/form-field.component.mjs +8 -5
  51. package/forms/esm2022/lib/forms/components/select/select.component.mjs +1 -1
  52. package/forms/esm2022/lib/forms/directives/form-field-prefix.directive.mjs +12 -4
  53. package/forms/fesm2022/wlcm-angular-forms.mjs +18 -7
  54. package/forms/fesm2022/wlcm-angular-forms.mjs.map +1 -1
  55. package/forms/lib/forms/components/form-field/form-field.component.d.ts +4 -3
  56. package/forms/lib/forms/directives/form-field-prefix.directive.d.ts +1 -0
  57. package/package.json +2 -1
  58. package/styles/components/date-range-picker/_date-range-picker-body.scss +117 -0
  59. package/styles/components/date-range-picker/_date-range-picker-header.scss +59 -0
  60. package/styles/components/date-range-picker/_date-range-picker-input.scss +38 -0
  61. package/styles/components/date-range-picker/_date-range-picker-panel.scss +21 -0
  62. package/styles/components/date-range-picker/index.scss +11 -0
  63. package/styles/components/forms/_form-field.scss +4 -0
  64. package/styles/core/_all-theme.scss +2 -0
  65. package/styles/core/_utils.scss +2 -0
@@ -0,0 +1,117 @@
1
+ @use 'sass:map';
2
+ @use '../../core/utils' as utils;
3
+
4
+ @mixin theme($theme-config) {
5
+ $theme: utils.using-theme($theme_config);
6
+
7
+ .wlcm-date-range-picker-body {
8
+ display: grid;
9
+ align-items: flex-start;
10
+ grid-auto-flow: column;
11
+ grid-gap: 32px;
12
+
13
+ .mat-calendar {
14
+ width: 224px;
15
+ font-size: 16px;
16
+
17
+ &.wlcm-calendar-disabled {
18
+ opacity: 0.5;
19
+ position: relative;
20
+ pointer-events: none;
21
+
22
+ &::before {
23
+ content: '';
24
+ display: block;
25
+ position: absolute;
26
+ top: 0;
27
+ left: 0;
28
+ right: 0;
29
+ bottom: 0;
30
+ }
31
+ }
32
+ }
33
+
34
+ mat-year-view {
35
+ .mat-calendar-body-label {
36
+ display: none;
37
+ }
38
+ }
39
+
40
+ .mat-calendar-body-label {
41
+ opacity: 0;
42
+
43
+ &[colspan='7'] {
44
+ display: none;
45
+ }
46
+ }
47
+
48
+ .mat-calendar-content {
49
+ padding: 0 !important;
50
+ min-height: 220px;
51
+ }
52
+
53
+ .mat-calendar-table-header-divider {
54
+ display: none;
55
+ }
56
+
57
+ .mat-calendar-table-header th {
58
+ color: #a4a3a3;
59
+ font-size: 16px;
60
+ }
61
+
62
+ .mat-calendar-body-cell-content {
63
+ font-size: 16px;
64
+ border-radius: 8px;
65
+ color: map-get($theme, text-black-color);
66
+ }
67
+
68
+ .mat-calendar-body-selected {
69
+ background-color: map-get($theme, selected-option-color);
70
+ }
71
+
72
+ .mat-calendar-body-today {
73
+ border: none;
74
+ color: map-get($theme, primary-color);
75
+ font-family: map-get($theme, bold-font-family);
76
+ }
77
+
78
+ .mat-calendar-body-in-range {
79
+ &::before {
80
+ background: map-get($theme, selected-option-color);
81
+ }
82
+
83
+ .mat-calendar-body-cell-content {
84
+ color: map-get($theme, primary-color);
85
+ }
86
+ }
87
+
88
+ .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover
89
+ > .mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(
90
+ .mat-calendar-body-comparison-identical
91
+ ) {
92
+ background: map-get($theme, selected-option-color);
93
+ }
94
+
95
+ .mat-calendar-body-in-preview {
96
+ .mat-calendar-body-cell-preview {
97
+ border: none;
98
+ background: map-get($theme, selected-option-color);
99
+ }
100
+ }
101
+
102
+ .mat-calendar-body-selected.mat-calendar-body-today {
103
+ box-shadow: none;
104
+ }
105
+ }
106
+
107
+ .wlcm-date-range-picker-body {
108
+ .cdk-program-focused
109
+ .mat-calendar-body-active
110
+ > .mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(
111
+ .mat-calendar-body-comparison-identical
112
+ ) {
113
+ background-color: transparent;
114
+ border: 1px solid map-get($theme, primary-color);
115
+ }
116
+ }
117
+ }
@@ -0,0 +1,59 @@
1
+ @use 'sass:map';
2
+ @use '../../core/utils' as utils;
3
+
4
+ @mixin theme($theme-config) {
5
+ $theme: utils.using-theme($theme_config);
6
+
7
+ .wlcm-calendar-header {
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: space-between;
11
+ padding-bottom: 12px;
12
+
13
+ .wlcm-calendar-header-change-view-button {
14
+ display: grid;
15
+ align-items: center;
16
+ grid-auto-flow: column;
17
+ cursor: pointer;
18
+ background: none;
19
+ outline: none;
20
+ grid-gap: 8px;
21
+ border: none;
22
+ padding: 0;
23
+ }
24
+
25
+ .wlcm-calendar-header-period-label {
26
+ font-size: 16px;
27
+ line-height: 24px;
28
+ font-family: map-get($theme, bold-font-family);
29
+ color: map-get($theme, text-black-color);
30
+ }
31
+
32
+ .wlcm-calendar-header-button-container {
33
+ width: 24px;
34
+ height: 24px;
35
+ }
36
+
37
+ .wlcm-calendar-header-button {
38
+ width: 24px;
39
+ height: 24px;
40
+ border: none;
41
+ outline: none;
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ background-color: map-get($theme, selected-option-color);
46
+ border-radius: 8px;
47
+ cursor: pointer;
48
+ padding: 0;
49
+
50
+ &-left {
51
+ transform: rotate(90deg);
52
+ }
53
+
54
+ &-right {
55
+ transform: rotate(-90deg);
56
+ }
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,38 @@
1
+ @use 'sass:map';
2
+ @use '../../core/utils' as utils;
3
+
4
+ @mixin theme($theme-config) {
5
+ $theme: utils.using-theme($theme_config);
6
+
7
+ .wlcm-date-range-picker-input-field-wrapper {
8
+ position: relative;
9
+ }
10
+
11
+ .wlcm-date-range-picker-input-field {
12
+ width: 98px;
13
+ border: none;
14
+ outline: none;
15
+ height: 18px;
16
+ padding: 0;
17
+ font-family: map-get($theme, regular-font-family);
18
+ color: map-get($theme, field-text-color);
19
+ max-width: 120px;
20
+
21
+ &::placeholder {
22
+ color: map-get($theme, placeholder-color);
23
+ }
24
+ }
25
+
26
+ .wlcm-date-range-picker-input-field-mirror {
27
+ position: absolute;
28
+ visibility: hidden;
29
+ pointer-events: none;
30
+ }
31
+
32
+ .wlcm-date-range-picker-input-dash {
33
+ width: 12px;
34
+ height: 1px;
35
+ margin: 0 4px;
36
+ background: map-get($theme, field-text-color);
37
+ }
38
+ }
@@ -0,0 +1,21 @@
1
+ @use 'sass:map';
2
+ @use '../../core/utils' as utils;
3
+
4
+ @mixin theme($theme-config) {
5
+ $theme: utils.using-theme($theme_config);
6
+
7
+ .wlcm-date-range-picker-panel {
8
+ background: #ffffff;
9
+ box-shadow: 0 4px 32px 0 rgba(0, 0, 0, 0.16);
10
+ border-radius: 12px;
11
+ padding: 16px;
12
+ }
13
+
14
+ .wlcm-date-range-picker-bottom-panel {
15
+ display: grid;
16
+ grid-auto-flow: column;
17
+ justify-content: flex-end;
18
+ align-items: center;
19
+ grid-gap: 24px;
20
+ }
21
+ }
@@ -0,0 +1,11 @@
1
+ @use 'date-range-picker-input' as input;
2
+ @use 'date-range-picker-panel' as panel;
3
+ @use 'date-range-picker-header' as header;
4
+ @use 'date-range-picker-body' as body;
5
+
6
+ @mixin theme($theme-config) {
7
+ @include input.theme($theme-config);
8
+ @include panel.theme($theme-config);
9
+ @include header.theme($theme-config);
10
+ @include body.theme($theme-config);
11
+ }
@@ -4,6 +4,10 @@
4
4
  @mixin theme($theme-config) {
5
5
  $theme: utils.using-theme($theme_config);
6
6
 
7
+ input {
8
+ color: map-get($theme, field-text-color);
9
+ }
10
+
7
11
  .wlcm-form-field {
8
12
  display: block;
9
13
 
@@ -5,6 +5,7 @@
5
5
  @use '../components/filters/index' as filters;
6
6
  @use '../components/button/index' as button;
7
7
  @use '../components/search-field/index' as searchField;
8
+ @use '../components/date-range-picker/index' as dateRangePicker;
8
9
 
9
10
  @mixin all-component-themes($theme-config) {
10
11
  @include common.theme($theme-config);
@@ -12,4 +13,5 @@
12
13
  @include filters.theme($theme-config);
13
14
  @include button.theme($theme-config);
14
15
  @include searchField.theme($theme-config);
16
+ @include dateRangePicker.theme($theme-config);
15
17
  }
@@ -37,6 +37,7 @@
37
37
  accent-color: map-get($color-config, accent),
38
38
  warn-color: map-get($color-config, warn),
39
39
  // Specific Color
40
+ text-black-color: map-get($specific-color-config, text-black-color),
40
41
  field-outline-color: map-get($specific-color-config, field-outline-color),
41
42
  focus-field-outline-color:
42
43
  map-get($specific-color-config, focus-field-outline-color),
@@ -44,6 +45,7 @@
44
45
  map-get($specific-color-config, hover-field-outline-color),
45
46
  selected-option-color:
46
47
  map-get($specific-color-config, selected-option-color),
48
+ field-text-color: map-get($specific-color-config, field-text-color),
47
49
  placeholder-color: map-get($specific-color-config, placeholder-color),
48
50
  // Typography
49
51
  bold-font-family: get-bold-typography($typography-config),