monkey-style-guide 2.0.81 → 2.0.85

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 (198) hide show
  1. package/README.md +1 -1
  2. package/assets/scss/partials/_forms.scss +1 -1
  3. package/assets/scss/partials/components/_buttons.scss +5 -5
  4. package/assets/scss/partials/components/_date-range-picker.scss +205 -0
  5. package/assets/scss/partials/components/_index.scss +1 -0
  6. package/bundles/monkey-style-guide.umd.js +249 -7
  7. package/bundles/monkey-style-guide.umd.js.map +1 -1
  8. package/esm2015/lib/components/badge/badge.component.ngfactory.js +17 -0
  9. package/esm2015/lib/components/badge/badge.component.ngsummary.json +1 -0
  10. package/esm2015/lib/components/badge/badge.module.ngfactory.js +12 -0
  11. package/esm2015/lib/components/badge/badge.module.ngsummary.json +1 -0
  12. package/esm2015/lib/components/badge/index.ngsummary.json +1 -0
  13. package/esm2015/lib/components/button/button-avatar.component.ngfactory.js +19 -0
  14. package/esm2015/lib/components/button/button-avatar.component.ngsummary.json +1 -0
  15. package/esm2015/lib/components/button/button-dropdown.component.ngfactory.js +39 -0
  16. package/esm2015/lib/components/button/button-dropdown.component.ngsummary.json +1 -0
  17. package/esm2015/lib/components/button/button.component.ngfactory.js +31 -0
  18. package/esm2015/lib/components/button/button.component.ngsummary.json +1 -0
  19. package/esm2015/lib/components/button/button.module.ngfactory.js +14 -0
  20. package/esm2015/lib/components/button/button.module.ngsummary.json +1 -0
  21. package/esm2015/lib/components/button/index.ngsummary.json +1 -0
  22. package/esm2015/lib/components/checkbox/checkbox.component.ngfactory.js +38 -0
  23. package/esm2015/lib/components/checkbox/checkbox.component.ngsummary.json +1 -0
  24. package/esm2015/lib/components/checkbox/checkbox.module.ngfactory.js +13 -0
  25. package/esm2015/lib/components/checkbox/checkbox.module.ngsummary.json +1 -0
  26. package/esm2015/lib/components/checkbox/index.ngsummary.json +1 -0
  27. package/esm2015/lib/components/date-range-picker/date-range-picker.component.js +323 -0
  28. package/esm2015/lib/components/date-range-picker/date-range-picker.component.ngfactory.js +75 -0
  29. package/esm2015/lib/components/date-range-picker/date-range-picker.component.ngsummary.json +1 -0
  30. package/esm2015/lib/components/date-range-picker/date-range-picker.module.js +17 -0
  31. package/esm2015/lib/components/date-range-picker/date-range-picker.module.ngfactory.js +15 -0
  32. package/esm2015/lib/components/date-range-picker/date-range-picker.module.ngsummary.json +1 -0
  33. package/esm2015/lib/components/date-range-picker/index.js +3 -0
  34. package/esm2015/lib/components/date-range-picker/index.ngsummary.json +1 -0
  35. package/esm2015/lib/components/expansion/expansion.component.ngfactory.js +35 -0
  36. package/esm2015/lib/components/expansion/expansion.component.ngsummary.json +1 -0
  37. package/esm2015/lib/components/expansion/expansion.module.ngfactory.js +13 -0
  38. package/esm2015/lib/components/expansion/expansion.module.ngsummary.json +1 -0
  39. package/esm2015/lib/components/expansion/index.ngsummary.json +1 -0
  40. package/esm2015/lib/components/file-upload/file-upload.component.ngfactory.js +39 -0
  41. package/esm2015/lib/components/file-upload/file-upload.component.ngsummary.json +1 -0
  42. package/esm2015/lib/components/file-upload/file-upload.module.ngfactory.js +15 -0
  43. package/esm2015/lib/components/file-upload/file-upload.module.ngsummary.json +1 -0
  44. package/esm2015/lib/components/file-upload/index.ngsummary.json +1 -0
  45. package/esm2015/lib/components/icon/icon.component.ngfactory.js +88 -0
  46. package/esm2015/lib/components/icon/icon.component.ngsummary.json +1 -0
  47. package/esm2015/lib/components/icon/icon.module.ngfactory.js +12 -0
  48. package/esm2015/lib/components/icon/icon.module.ngsummary.json +1 -0
  49. package/esm2015/lib/components/icon/icons.component.ngfactory.js +465 -0
  50. package/esm2015/lib/components/icon/icons.component.ngsummary.json +1 -0
  51. package/esm2015/lib/components/icon/index.ngsummary.json +1 -0
  52. package/esm2015/lib/components/image-crop/image-crop.component.ngfactory.js +108 -0
  53. package/esm2015/lib/components/image-crop/image-crop.component.ngsummary.json +1 -0
  54. package/esm2015/lib/components/image-crop/image-crop.module.ngfactory.js +17 -0
  55. package/esm2015/lib/components/image-crop/image-crop.module.ngsummary.json +1 -0
  56. package/esm2015/lib/components/image-crop/index.ngsummary.json +1 -0
  57. package/esm2015/lib/components/index.js +2 -1
  58. package/esm2015/lib/components/index.ngsummary.json +1 -0
  59. package/esm2015/lib/components/input/index.ngsummary.json +1 -0
  60. package/esm2015/lib/components/input/input-filter.component.ngfactory.js +129 -0
  61. package/esm2015/lib/components/input/input-filter.component.ngsummary.json +1 -0
  62. package/esm2015/lib/components/input/input.component.js +12 -3
  63. package/esm2015/lib/components/input/input.component.ngfactory.js +139 -0
  64. package/esm2015/lib/components/input/input.component.ngsummary.json +1 -0
  65. package/esm2015/lib/components/input/input.module.ngfactory.js +15 -0
  66. package/esm2015/lib/components/input/input.module.ngsummary.json +1 -0
  67. package/esm2015/lib/components/modal/index.ngsummary.json +1 -0
  68. package/esm2015/lib/components/modal/modal.component.ngfactory.js +61 -0
  69. package/esm2015/lib/components/modal/modal.component.ngsummary.json +1 -0
  70. package/esm2015/lib/components/modal/modal.module.ngfactory.js +15 -0
  71. package/esm2015/lib/components/modal/modal.module.ngsummary.json +1 -0
  72. package/esm2015/lib/components/option/index.ngsummary.json +1 -0
  73. package/esm2015/lib/components/option/option.component.ngfactory.js +24 -0
  74. package/esm2015/lib/components/option/option.component.ngsummary.json +1 -0
  75. package/esm2015/lib/components/option/option.module.ngfactory.js +12 -0
  76. package/esm2015/lib/components/option/option.module.ngsummary.json +1 -0
  77. package/esm2015/lib/components/radiobutton/index.ngsummary.json +1 -0
  78. package/esm2015/lib/components/radiobutton/radiobutton.component.ngfactory.js +18 -0
  79. package/esm2015/lib/components/radiobutton/radiobutton.component.ngsummary.json +1 -0
  80. package/esm2015/lib/components/radiobutton/radiobutton.module.ngfactory.js +13 -0
  81. package/esm2015/lib/components/radiobutton/radiobutton.module.ngsummary.json +1 -0
  82. package/esm2015/lib/components/select/index.ngsummary.json +1 -0
  83. package/esm2015/lib/components/select/select-filter.component.ngfactory.js +30 -0
  84. package/esm2015/lib/components/select/select-filter.component.ngsummary.json +1 -0
  85. package/esm2015/lib/components/select/select-multiple.component.ngfactory.js +33 -0
  86. package/esm2015/lib/components/select/select-multiple.component.ngsummary.json +1 -0
  87. package/esm2015/lib/components/select/select-search.component.ngfactory.js +48 -0
  88. package/esm2015/lib/components/select/select-search.component.ngsummary.json +1 -0
  89. package/esm2015/lib/components/select/select.component.ngfactory.js +33 -0
  90. package/esm2015/lib/components/select/select.component.ngsummary.json +1 -0
  91. package/esm2015/lib/components/select/select.module.ngfactory.js +17 -0
  92. package/esm2015/lib/components/select/select.module.ngsummary.json +1 -0
  93. package/esm2015/lib/components/stepper/index.ngsummary.json +1 -0
  94. package/esm2015/lib/components/stepper/stepper.component.ngfactory.js +18 -0
  95. package/esm2015/lib/components/stepper/stepper.component.ngsummary.json +1 -0
  96. package/esm2015/lib/components/stepper/stepper.module.ngfactory.js +13 -0
  97. package/esm2015/lib/components/stepper/stepper.module.ngsummary.json +1 -0
  98. package/esm2015/lib/components/tab/index.ngsummary.json +1 -0
  99. package/esm2015/lib/components/tab/tab.component.ngfactory.js +18 -0
  100. package/esm2015/lib/components/tab/tab.component.ngsummary.json +1 -0
  101. package/esm2015/lib/components/tab/tab.module.ngfactory.js +14 -0
  102. package/esm2015/lib/components/tab/tab.module.ngsummary.json +1 -0
  103. package/esm2015/lib/components/table/index.ngsummary.json +1 -0
  104. package/esm2015/lib/components/table/table-column.component.ngfactory.js +17 -0
  105. package/esm2015/lib/components/table/table-column.component.ngsummary.json +1 -0
  106. package/esm2015/lib/components/table/table.component.ngfactory.js +33 -0
  107. package/esm2015/lib/components/table/table.component.ngsummary.json +1 -0
  108. package/esm2015/lib/components/table/table.module.ngfactory.js +15 -0
  109. package/esm2015/lib/components/table/table.module.ngsummary.json +1 -0
  110. package/esm2015/lib/components/toggle/index.ngsummary.json +1 -0
  111. package/esm2015/lib/components/toggle/toggle.component.ngfactory.js +20 -0
  112. package/esm2015/lib/components/toggle/toggle.component.ngsummary.json +1 -0
  113. package/esm2015/lib/components/toggle/toggle.module.ngfactory.js +12 -0
  114. package/esm2015/lib/components/toggle/toggle.module.ngsummary.json +1 -0
  115. package/esm2015/lib/components/wizard/index.ngsummary.json +1 -0
  116. package/esm2015/lib/components/wizard/wizard.component.ngfactory.js +18 -0
  117. package/esm2015/lib/components/wizard/wizard.component.ngsummary.json +1 -0
  118. package/esm2015/lib/components/wizard/wizard.module.ngfactory.js +13 -0
  119. package/esm2015/lib/components/wizard/wizard.module.ngsummary.json +1 -0
  120. package/esm2015/lib/core/index.ngsummary.json +1 -0
  121. package/esm2015/lib/core/interfaces/index.ngsummary.json +1 -0
  122. package/esm2015/lib/core/interfaces/monkey-modal-settings.ngsummary.json +1 -0
  123. package/esm2015/lib/core/interfaces/monkey-style-settings.ngsummary.json +1 -0
  124. package/esm2015/lib/core/services/index.ngsummary.json +1 -0
  125. package/esm2015/lib/core/services/modal/index.ngsummary.json +1 -0
  126. package/esm2015/lib/core/services/modal/monkey-style-guide-modal-fixed.service.ngsummary.json +1 -0
  127. package/esm2015/lib/core/services/modal/monkey-style-guide-modal.service.ngsummary.json +1 -0
  128. package/esm2015/lib/core/services/monkey-style-guide.service.js +3 -3
  129. package/esm2015/lib/core/services/monkey-style-guide.service.ngsummary.json +1 -0
  130. package/esm2015/lib/core/services/settings/index.ngsummary.json +1 -0
  131. package/esm2015/lib/core/services/settings/monkey-style-guide-settings.service.js +2 -2
  132. package/esm2015/lib/core/services/settings/monkey-style-guide-settings.service.ngsummary.json +1 -0
  133. package/esm2015/lib/core/services/settings/monkey-style-guide-theme-settings.service.ngsummary.json +1 -0
  134. package/esm2015/lib/core/services/snackbar/index.ngsummary.json +1 -0
  135. package/esm2015/lib/core/services/snackbar/mokey-style-guide-snackbar.service.ngsummary.json +1 -0
  136. package/esm2015/lib/core/utils/index.ngsummary.json +1 -0
  137. package/esm2015/lib/core/utils/utils.ngsummary.json +1 -0
  138. package/esm2015/lib/monkey-style-guide.module.ngfactory.js +17 -0
  139. package/esm2015/lib/monkey-style-guide.module.ngsummary.json +1 -0
  140. package/esm2015/monkey-style-guide.ngsummary.json +1 -0
  141. package/esm2015/public-api.ngsummary.json +1 -0
  142. package/fesm2015/monkey-style-guide.js +343 -5
  143. package/fesm2015/monkey-style-guide.js.map +1 -1
  144. package/lib/components/badge/badge.component.ngfactory.d.ts +1 -0
  145. package/lib/components/badge/badge.module.ngfactory.d.ts +3 -0
  146. package/lib/components/button/button-avatar.component.ngfactory.d.ts +1 -0
  147. package/lib/components/button/button-dropdown.component.ngfactory.d.ts +1 -0
  148. package/lib/components/button/button.component.ngfactory.d.ts +1 -0
  149. package/lib/components/button/button.module.ngfactory.d.ts +3 -0
  150. package/lib/components/checkbox/checkbox.component.ngfactory.d.ts +1 -0
  151. package/lib/components/checkbox/checkbox.module.ngfactory.d.ts +3 -0
  152. package/lib/components/date-range-picker/date-range-picker.component.d.ts +50 -0
  153. package/lib/components/date-range-picker/date-range-picker.component.ngfactory.d.ts +1 -0
  154. package/lib/components/date-range-picker/date-range-picker.module.d.ts +2 -0
  155. package/lib/components/date-range-picker/date-range-picker.module.ngfactory.d.ts +3 -0
  156. package/lib/components/date-range-picker/index.d.ts +2 -0
  157. package/lib/components/expansion/expansion.component.ngfactory.d.ts +1 -0
  158. package/lib/components/expansion/expansion.module.ngfactory.d.ts +3 -0
  159. package/lib/components/file-upload/file-upload.component.ngfactory.d.ts +1 -0
  160. package/lib/components/file-upload/file-upload.module.ngfactory.d.ts +3 -0
  161. package/lib/components/icon/icon.component.ngfactory.d.ts +1 -0
  162. package/lib/components/icon/icon.module.ngfactory.d.ts +3 -0
  163. package/lib/components/icon/icons.component.ngfactory.d.ts +1 -0
  164. package/lib/components/image-crop/image-crop.component.ngfactory.d.ts +1 -0
  165. package/lib/components/image-crop/image-crop.module.ngfactory.d.ts +3 -0
  166. package/lib/components/index.d.ts +1 -0
  167. package/lib/components/input/input-filter.component.ngfactory.d.ts +1 -0
  168. package/lib/components/input/input.component.d.ts +1 -0
  169. package/lib/components/input/input.component.ngfactory.d.ts +1 -0
  170. package/lib/components/input/input.module.ngfactory.d.ts +3 -0
  171. package/lib/components/modal/modal.component.ngfactory.d.ts +1 -0
  172. package/lib/components/modal/modal.module.ngfactory.d.ts +3 -0
  173. package/lib/components/option/option.component.ngfactory.d.ts +1 -0
  174. package/lib/components/option/option.module.ngfactory.d.ts +3 -0
  175. package/lib/components/radiobutton/radiobutton.component.ngfactory.d.ts +1 -0
  176. package/lib/components/radiobutton/radiobutton.module.ngfactory.d.ts +3 -0
  177. package/lib/components/select/select-filter.component.ngfactory.d.ts +1 -0
  178. package/lib/components/select/select-multiple.component.ngfactory.d.ts +1 -0
  179. package/lib/components/select/select-search.component.ngfactory.d.ts +1 -0
  180. package/lib/components/select/select.component.ngfactory.d.ts +1 -0
  181. package/lib/components/select/select.module.ngfactory.d.ts +3 -0
  182. package/lib/components/stepper/stepper.component.ngfactory.d.ts +1 -0
  183. package/lib/components/stepper/stepper.module.ngfactory.d.ts +3 -0
  184. package/lib/components/tab/tab.component.ngfactory.d.ts +1 -0
  185. package/lib/components/tab/tab.module.ngfactory.d.ts +3 -0
  186. package/lib/components/table/table-column.component.ngfactory.d.ts +1 -0
  187. package/lib/components/table/table.component.ngfactory.d.ts +1 -0
  188. package/lib/components/table/table.module.ngfactory.d.ts +3 -0
  189. package/lib/components/toggle/toggle.component.ngfactory.d.ts +1 -0
  190. package/lib/components/toggle/toggle.module.ngfactory.d.ts +3 -0
  191. package/lib/components/wizard/wizard.component.ngfactory.d.ts +1 -0
  192. package/lib/components/wizard/wizard.module.ngfactory.d.ts +3 -0
  193. package/lib/core/services/monkey-style-guide.service.d.ts +2 -2
  194. package/lib/monkey-style-guide.module.ngfactory.d.ts +3 -0
  195. package/monkey-style-guide-2.0.85.tgz +0 -0
  196. package/monkey-style-guide.metadata.json +1 -1
  197. package/package.json +2 -1
  198. package/monkey-style-guide-2.0.81.tgz +0 -0
package/README.md CHANGED
@@ -1071,7 +1071,7 @@ export class AppComponent {
1071
1071
  [icon-screenshot1]: https://user-images.githubusercontent.com/10110065/111643849-0ddcdd80-87de-11eb-8161-fc5a20a1d237.png
1072
1072
  [icons-screenshot1]: https://user-images.githubusercontent.com/12416871/112203694-90580980-8bf1-11eb-969f-2ac21a7b9dee.png
1073
1073
  [radiobutton-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/radiobutton.png
1074
- [buttons-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/buttons.png
1074
+ [buttons-screenshot]: https://user-images.githubusercontent.com/10110065/142933460-7a84ad76-b57f-40a0-b809-292af31c1e8f.png
1075
1075
  [settings-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/style-settings-json.png
1076
1076
  [table-screenshot]: https://user-images.githubusercontent.com/12416871/119574643-29d79f00-bd8c-11eb-9747-2e6dc86410da.png
1077
1077
  [modal-screenshot]: https://user-images.githubusercontent.com/12416871/119838920-2c480f00-beda-11eb-9e44-e42262f39c34.png
@@ -108,7 +108,7 @@ mecx-form-field {
108
108
  font-weight: normal;
109
109
  font-size: 14px;
110
110
  line-height: 17px;
111
- color: #4b4a53;
111
+ color: #9c9ca6;
112
112
  }
113
113
  }
114
114
 
@@ -297,7 +297,7 @@ monkey-button[disabled] {
297
297
 
298
298
  &__theme {
299
299
  background-color: inherit;
300
- color: map-get($mecx-theme, main);
300
+ color: map-get($mecx-theme, 500);
301
301
  box-sizing: border-box;
302
302
  background-position: center;
303
303
 
@@ -317,7 +317,7 @@ monkey-button[disabled] {
317
317
 
318
318
  &__error {
319
319
  background-color: inherit;
320
- color: map-get($mecx-error, main);
320
+ color: map-get($mecx-error, 500);
321
321
  box-sizing: border-box;
322
322
  background-position: center;
323
323
 
@@ -337,7 +337,7 @@ monkey-button[disabled] {
337
337
 
338
338
  &__warning {
339
339
  background-color: inherit;
340
- color: map-get($mecx-warning, main);
340
+ color: map-get($mecx-warning, 500);
341
341
  box-sizing: border-box;
342
342
  background-position: center;
343
343
 
@@ -357,7 +357,7 @@ monkey-button[disabled] {
357
357
 
358
358
  &__success {
359
359
  background-color: inherit;
360
- color: map-get($mecx-success, main);
360
+ color: map-get($mecx-success, 500);
361
361
  box-sizing: border-box;
362
362
  background-position: center;
363
363
 
@@ -377,7 +377,7 @@ monkey-button[disabled] {
377
377
 
378
378
  &__question {
379
379
  background-color: inherit;
380
- color: map-get($mecx-question, 700);
380
+ color: map-get($mecx-question, 500);
381
381
  box-sizing: border-box;
382
382
  background-position: center;
383
383
 
@@ -0,0 +1,205 @@
1
+ /**************************
2
+ * Copyright Monkey Exchange. All Rights Reserved
3
+ * This style guide was developed by Monkey Exchange Team
4
+ * MIT Licence
5
+ **************************/
6
+ @import '../variables';
7
+ @import '../breakpoints.scss';
8
+
9
+ monkey-date-range-picker {
10
+ background: #fafafa;
11
+ border-radius: 8px;
12
+ display: flex;
13
+ justify-content: space-between;
14
+ width: 100%;
15
+ padding: 32px 36px;
16
+
17
+ @include media-breakpoint('xs') {
18
+ padding: 16px;
19
+ }
20
+
21
+ mecx-date-range-picker-group {
22
+ display: flex;
23
+ flex-direction: column;
24
+ width: 100%;
25
+
26
+ &.error {
27
+ border: 1px solid #fa3838;
28
+ padding: 4px;
29
+ }
30
+
31
+ mecx-date-range-picker-group-body {
32
+ display: flex;
33
+ width: 100%;
34
+ justify-content: space-between;
35
+
36
+ .first-date-range {
37
+ .calendar-next {
38
+ display: none;
39
+ }
40
+ }
41
+
42
+ @include media-breakpoint('xs') {
43
+ flex-direction: column;
44
+
45
+ .first-date-range {
46
+ .calendar-next {
47
+ display: inline-block;
48
+ }
49
+ }
50
+
51
+ .second-date-range {
52
+ display: none;
53
+ }
54
+ }
55
+ }
56
+
57
+ mecx-date-range-picker-group-info {
58
+ width: 100%;
59
+ display: flex;
60
+ flex-direction: column;
61
+ justify-content: flex-start;
62
+ align-items: flex-start;
63
+ color: #4b4a53;
64
+ font-size: 12px;
65
+ line-height: 16px;
66
+ height: 30px;
67
+
68
+ info {
69
+ color: #4b4a53;
70
+ text-align: left;
71
+ }
72
+ error {
73
+ color: map-get($mecx-error, main);
74
+ text-align: left;
75
+ }
76
+ }
77
+
78
+ mecx-date-range-picker-group-action {
79
+ display: flex;
80
+ justify-content: space-between;
81
+ border-top: 1px solid #d6d6d6;
82
+ padding-top: 16px;
83
+ align-items: flex-end;
84
+
85
+ .action-days > * {
86
+ margin-right: 24px;
87
+ }
88
+
89
+ .action-days > * :last-child {
90
+ margin-top: 8px;
91
+ }
92
+ }
93
+ }
94
+
95
+ mecx-date-range-picker-header {
96
+ display: flex;
97
+ flex-direction: column;
98
+
99
+ .calendar-title {
100
+ align-items: center;
101
+ color: #4b4a53;
102
+ display: flex;
103
+ font-size: 18px;
104
+ font-style: normal;
105
+ font-weight: 500;
106
+ line-height: 21px;
107
+ margin-bottom: 8px;
108
+ text-align: center;
109
+
110
+ .month-year-title {
111
+ width: 100%;
112
+ display: flex;
113
+ justify-content: center;
114
+ }
115
+ }
116
+
117
+ .week {
118
+ display: flex;
119
+ justify-content: center;
120
+
121
+ .week-day {
122
+ align-items: center;
123
+ color: #4b4a53;
124
+ display: flex;
125
+ font-size: 14px;
126
+ font-style: normal;
127
+ font-weight: normal;
128
+ justify-content: center;
129
+ line-height: 16px;
130
+ margin-bottom: 8px;
131
+ text-align: center;
132
+ height: 16px;
133
+ width: 40px;
134
+
135
+ @include media-breakpoint('xs') {
136
+ height: 42px;
137
+ width: 42px;
138
+ }
139
+ }
140
+ }
141
+ }
142
+
143
+ mecx-date-range-picker-body {
144
+ display: flex;
145
+ flex-direction: column;
146
+ justify-content: center;
147
+ align-items: center;
148
+
149
+ .month-week {
150
+ display: flex;
151
+ }
152
+
153
+ .month-day {
154
+ align-items: center;
155
+ color: #4b4a53;
156
+ cursor: pointer;
157
+ display: flex;
158
+ font-size: 14px;
159
+ font-style: normal;
160
+ font-weight: normal;
161
+ justify-content: center;
162
+ line-height: 16px;
163
+ margin-bottom: 8px;
164
+ text-align: center;
165
+ width: 40px;
166
+ height: 16px;
167
+
168
+ @include media-breakpoint('xs') {
169
+ height: 42px;
170
+ width: 42px;
171
+ }
172
+
173
+ &.inactive {
174
+ opacity: 0.5;
175
+ }
176
+
177
+ &.today {
178
+ color: map-get($mecx-theme, main);
179
+ font-weight: 700;
180
+ }
181
+ }
182
+
183
+ .selected {
184
+ background: #ebebeb;
185
+ color: map-get($mecx-theme, main);
186
+ }
187
+
188
+ .first-selected {
189
+ border-top-left-radius: 8px;
190
+ border-bottom-left-radius: 8px;
191
+ }
192
+
193
+ .last-selected {
194
+ border-top-right-radius: 8px;
195
+ border-bottom-right-radius: 8px;
196
+ }
197
+ }
198
+
199
+ monkey-button.calendar-previous,
200
+ monkey-button.calendar-next {
201
+ monkey-icon {
202
+ margin: 0;
203
+ }
204
+ }
205
+ }
@@ -8,6 +8,7 @@
8
8
  @import 'select';
9
9
  @import 'buttons';
10
10
  @import 'checkbox';
11
+ @import 'date-range-picker';
11
12
  @import 'radiobutton';
12
13
  @import 'wizard';
13
14
  @import 'snackbar';
@@ -1,8 +1,30 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('rxjs'), require('@angular/common'), require('@angular/forms'), require('rxjs/operators'), require('ngx-mask'), require('@angular/platform-browser')) :
3
- typeof define === 'function' && define.amd ? define('monkey-style-guide', ['exports', '@angular/core', '@angular/common/http', 'rxjs', '@angular/common', '@angular/forms', 'rxjs/operators', 'ngx-mask', '@angular/platform-browser'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['monkey-style-guide'] = {}, global.ng.core, global.ng.common.http, global.rxjs, global.ng.common, global.ng.forms, global.rxjs.operators, global['ngx-mask'], global.ng.platformBrowser));
5
- }(this, (function (exports, core, http, rxjs, common, forms, operators, ngxMask, platformBrowser) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('rxjs'), require('@angular/common'), require('@angular/forms'), require('rxjs/operators'), require('moment'), require('ngx-mask'), require('@angular/platform-browser')) :
3
+ typeof define === 'function' && define.amd ? define('monkey-style-guide', ['exports', '@angular/core', '@angular/common/http', 'rxjs', '@angular/common', '@angular/forms', 'rxjs/operators', 'moment', 'ngx-mask', '@angular/platform-browser'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['monkey-style-guide'] = {}, global.ng.core, global.ng.common.http, global.rxjs, global.ng.common, global.ng.forms, global.rxjs.operators, global.moment, global['ngx-mask'], global.ng.platformBrowser));
5
+ }(this, (function (exports, core, http, rxjs, common, forms, operators, moment_, ngxMask, platformBrowser) { 'use strict';
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () {
17
+ return e[k];
18
+ }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n['default'] = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var moment___namespace = /*#__PURE__*/_interopNamespace(moment_);
6
28
 
7
29
  var MonkeyStyleGuideService = /** @class */ (function () {
8
30
  function MonkeyStyleGuideService(http) {
@@ -407,7 +429,7 @@
407
429
  * Copyright Monkey Exchange. All Rights Reserved
408
430
  * This style guide was developed by Monkey Exchange Team
409
431
  * MIT Licence
410
- **************************/
432
+ **************************/
411
433
  var MonkeyStyleGuideSettingsService = /** @class */ (function () {
412
434
  function MonkeyStyleGuideSettingsService(monkeySGService, monkeySGThemeConfigService) {
413
435
  this.monkeySGService = monkeySGService;
@@ -2224,6 +2246,214 @@
2224
2246
  },] }
2225
2247
  ];
2226
2248
 
2249
+ var moment = moment___namespace;
2250
+ var ɵ0 = function () {
2251
+ var isMobileWidth = window.screen.width <= 640 ||
2252
+ (window.matchMedia && window.matchMedia('only screen and (max-width: 640px)').matches);
2253
+ return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile/i.test(navigator.userAgent) || isMobileWidth);
2254
+ };
2255
+ var isMobile = (ɵ0)();
2256
+ var MonkeyDateRangePickerComponent = /** @class */ (function () {
2257
+ function MonkeyDateRangePickerComponent(fb, cdr) {
2258
+ this.fb = fb;
2259
+ this.cdr = cdr;
2260
+ this.onChange = new core.EventEmitter();
2261
+ this.today = moment().format('YYYY-MM-DD');
2262
+ this.onModelChange = function (value) { };
2263
+ this.onModelTouched = function (value) { };
2264
+ this._dateFirst = moment();
2265
+ this._dateSecond = moment().add(1, 'M');
2266
+ this._id = "mecx-date-range-picker-" + MonkeyUtils.getRandomString(10);
2267
+ this._daysArrFirst = [];
2268
+ this._daysArrSecond = [];
2269
+ this.initDateRange();
2270
+ }
2271
+ MonkeyDateRangePickerComponent.prototype.initDateRange = function () {
2272
+ return (this._dateForm = this.fb.group({
2273
+ startDate: [null, forms.Validators.required],
2274
+ endDate: [null, forms.Validators.required],
2275
+ }));
2276
+ };
2277
+ MonkeyDateRangePickerComponent.prototype.createCalendar = function (month) {
2278
+ var firstDay = moment(month).startOf('M');
2279
+ var lastDay = moment(month).endOf('M');
2280
+ var days = Array.apply(null, { length: month.daysInMonth() })
2281
+ .map(Number.call, Number)
2282
+ .map(function (n) {
2283
+ return moment(firstDay).add(n, 'd');
2284
+ });
2285
+ var n = 0;
2286
+ while (n < firstDay.weekday()) {
2287
+ days.unshift(null);
2288
+ n++;
2289
+ }
2290
+ n = 0;
2291
+ while (n < 7 - lastDay.weekday()) {
2292
+ days.push(null);
2293
+ n++;
2294
+ }
2295
+ var index = 1;
2296
+ var group = [];
2297
+ var grouped = [];
2298
+ Object.entries(days).map(function (_a) {
2299
+ var _b = __read(_a, 2), key = _b[0], value = _b[1];
2300
+ if (index > 7) {
2301
+ index = 1;
2302
+ grouped.push(group);
2303
+ group = [];
2304
+ }
2305
+ group.push(value);
2306
+ index++;
2307
+ });
2308
+ grouped.push(group);
2309
+ return grouped;
2310
+ };
2311
+ MonkeyDateRangePickerComponent.prototype.build = function () {
2312
+ this._daysArrFirst = this.createCalendar(this._dateFirst);
2313
+ if (!isMobile) {
2314
+ this._daysArrSecond = this.createCalendar(this._dateSecond);
2315
+ }
2316
+ };
2317
+ MonkeyDateRangePickerComponent.prototype.navigateToToday = function () {
2318
+ this._dateFirst = moment();
2319
+ this._dateSecond = moment().add(1, 'M');
2320
+ this.build();
2321
+ };
2322
+ MonkeyDateRangePickerComponent.prototype.ngOnInit = function () {
2323
+ this.build();
2324
+ };
2325
+ MonkeyDateRangePickerComponent.prototype.registerOnChange = function (fn) {
2326
+ this.onModelChange = fn;
2327
+ };
2328
+ MonkeyDateRangePickerComponent.prototype.registerOnTouched = function (fn) {
2329
+ this.onModelTouched = fn;
2330
+ };
2331
+ Object.defineProperty(MonkeyDateRangePickerComponent.prototype, "value", {
2332
+ get: function () {
2333
+ return this._dateForm.value;
2334
+ },
2335
+ set: function (value) {
2336
+ this._dateForm.setValue(value);
2337
+ this.cdr.detectChanges();
2338
+ this.onModelChange(this._dateForm.value);
2339
+ this.onModelTouched(this._dateForm.value);
2340
+ },
2341
+ enumerable: false,
2342
+ configurable: true
2343
+ });
2344
+ MonkeyDateRangePickerComponent.prototype.writeValue = function (value) {
2345
+ this.value = value;
2346
+ this.onChange.next(value);
2347
+ };
2348
+ MonkeyDateRangePickerComponent.prototype.nextMonth = function () {
2349
+ this._dateFirst.add(1, 'M');
2350
+ this._dateSecond.add(1, 'M');
2351
+ this._daysArrFirst = this.createCalendar(this._dateFirst);
2352
+ this._daysArrSecond = this.createCalendar(this._dateSecond);
2353
+ };
2354
+ MonkeyDateRangePickerComponent.prototype.previousMonth = function () {
2355
+ this._dateFirst.subtract(1, 'M');
2356
+ this._dateSecond.subtract(1, 'M');
2357
+ this._daysArrFirst = this.createCalendar(this._dateFirst);
2358
+ this._daysArrSecond = this.createCalendar(this._dateSecond);
2359
+ };
2360
+ MonkeyDateRangePickerComponent.prototype.todayCheck = function (day) {
2361
+ if (!day) {
2362
+ return false;
2363
+ }
2364
+ return moment().format('L') === day.format('L');
2365
+ };
2366
+ MonkeyDateRangePickerComponent.prototype.isSelected = function (day) {
2367
+ if (!day) {
2368
+ return false;
2369
+ }
2370
+ var startDateMoment = moment(this._dateForm.value.startDate, 'YYYY-MM-DD');
2371
+ var endDateMoment = moment(this._dateForm.value.endDate, 'YYYY-MM-DD');
2372
+ if (this._dateForm.valid) {
2373
+ return startDateMoment.isSameOrBefore(day) && endDateMoment.isSameOrAfter(day);
2374
+ }
2375
+ if (this._dateForm.get('startDate').valid) {
2376
+ return startDateMoment.isSame(day);
2377
+ }
2378
+ };
2379
+ MonkeyDateRangePickerComponent.prototype.isFirstSelected = function (day) {
2380
+ var _dateForm = this._dateForm;
2381
+ var startDate = _dateForm.value.startDate;
2382
+ return day === null || day === void 0 ? void 0 : day.isSame(startDate);
2383
+ };
2384
+ MonkeyDateRangePickerComponent.prototype.isLastSelected = function (day) {
2385
+ var _dateForm = this._dateForm;
2386
+ var endDate = _dateForm.value.endDate;
2387
+ return day === null || day === void 0 ? void 0 : day.isSame(endDate);
2388
+ };
2389
+ MonkeyDateRangePickerComponent.prototype.selectedDate = function (day) {
2390
+ var _dateForm = this._dateForm;
2391
+ var dayFormatted = day.format('YYYY-MM-DD');
2392
+ if (_dateForm.valid) {
2393
+ _dateForm.setValue({ startDate: null, endDate: null });
2394
+ this.writeValue(null);
2395
+ return;
2396
+ }
2397
+ if (!_dateForm.get('startDate').value) {
2398
+ _dateForm.get('startDate').patchValue(dayFormatted);
2399
+ }
2400
+ else {
2401
+ _dateForm.get('endDate').patchValue(dayFormatted);
2402
+ this.writeValue(_dateForm.value);
2403
+ }
2404
+ };
2405
+ MonkeyDateRangePickerComponent.prototype.selectRangeOfDays = function (days) {
2406
+ var _a = this, _dateForm = _a._dateForm, today = _a.today;
2407
+ var startDate = _dateForm.value.startDate;
2408
+ var firstDay = startDate || today;
2409
+ var lastDay = moment(firstDay).add(days, 'day').format('YYYY-MM-DD');
2410
+ _dateForm.get('startDate').patchValue(firstDay);
2411
+ _dateForm.get('endDate').patchValue(lastDay);
2412
+ this.writeValue(_dateForm.value);
2413
+ };
2414
+ return MonkeyDateRangePickerComponent;
2415
+ }());
2416
+ MonkeyDateRangePickerComponent.decorators = [
2417
+ { type: core.Component, args: [{
2418
+ selector: 'monkey-date-range-picker',
2419
+ template: "\n <mecx-date-range-picker-group [class.error]=\"errorMessage?.trim()\">\n <mecx-date-range-picker-group-body>\n <mecx-date-range-picker class=\"first-date-range\">\n <mecx-date-range-picker-header>\n <div class=\"calendar-title\">\n <monkey-button\n class=\"calendar-previous\"\n color=\"theme\"\n icon=\"arrow-left-16\"\n type=\"tertiary\"\n (click)=\"previousMonth()\"\n size=\"sm\"\n >\n </monkey-button>\n <div class=\"month-year-title\">\n {{ i18n?.months?.[_dateFirst.format('M')] }}\n {{ _dateFirst.format('YYYY') }}\n </div>\n <monkey-button\n class=\"calendar-next\"\n color=\"theme\"\n icon=\"arrow-right-16\"\n type=\"tertiary\"\n (click)=\"nextMonth()\"\n size=\"sm\"\n >\n </monkey-button>\n </div>\n <div class=\"week\">\n <span class=\"week-day\" *ngFor=\"let day of [1, 2, 3, 4, 5, 6, 7]\">\n {{ i18n?.days?.[day]}}\n </span>\n </div>\n </mecx-date-range-picker-header>\n <mecx-date-range-picker-body>\n <div class=\"month-week\" *ngFor=\"let week of _daysArrFirst\">\n <div\n class=\"month-day\"\n (click)=\"selectedDate(day)\"\n [ngClass]=\"{\n inactive: !day,\n selected: isSelected(day),\n today: todayCheck(day),\n 'first-selected': isFirstSelected(day),\n 'last-selected': isLastSelected(day)\n }\"\n *ngFor=\"let day of week\"\n #divOne\n >\n {{ day?.date() }}\n </div>\n </div>\n </mecx-date-range-picker-body>\n </mecx-date-range-picker>\n\n <mecx-date-range-picker class=\"second-date-range\" *ngIf=\"_daysArrSecond?.length\">\n <mecx-date-range-picker-header>\n <div class=\"calendar-title\">\n <div class=\"month-year-title\">\n {{ i18n?.months?.[_dateSecond.format('M')] }}\n {{ _dateSecond.format('YYYY') }}\n </div>\n <monkey-button\n class=\"calendar-previous\"\n color=\"theme\"\n icon=\"arrow-right-16\"\n type=\"tertiary\"\n (click)=\"nextMonth()\"\n size=\"sm\"\n >\n </monkey-button>\n </div>\n <div class=\"week\">\n <span class=\"week-day\" *ngFor=\"let day of [1, 2, 3, 4, 5, 6, 7]\">\n {{ i18n?.days?.[day]}}\n </span>\n </div>\n </mecx-date-range-picker-header>\n <mecx-date-range-picker-body>\n <div class=\"month-week\" *ngFor=\"let week of _daysArrSecond\">\n <div\n class=\"month-day\"\n (click)=\"selectedDate(day)\"\n [ngClass]=\"{\n inactive: !day,\n selected: isSelected(day),\n today: todayCheck(day),\n 'first-selected': isFirstSelected(day),\n 'last-selected': isLastSelected(day)\n }\"\n *ngFor=\"let day of week\"\n >\n {{ day?.date() }}\n </div>\n </div>\n </mecx-date-range-picker-body>\n </mecx-date-range-picker>\n </mecx-date-range-picker-group-body>\n <mecx-date-range-picker-group-info>\n <info>\n {{ infoMessage }}\n </info>\n <error>\n {{ errorMessage }}\n </error>\n </mecx-date-range-picker-group-info>\n <mecx-date-range-picker-group-action>\n <div class=\"action-days\">\n <monkey-button color=\"theme\" type=\"secondary\" (click)=\"selectRangeOfDays(30)\">\n {{ i18n?.actions?.['30'] }}\n </monkey-button>\n <monkey-button color=\"theme\" type=\"secondary\" (click)=\"selectRangeOfDays(60)\">\n {{ i18n?.actions?.['60'] }}\n </monkey-button>\n <monkey-button color=\"theme\" type=\"secondary\" (click)=\"selectRangeOfDays(90)\">\n {{ i18n?.actions?.['90'] }}\n </monkey-button>\n </div>\n <monkey-button color=\"theme\" type=\"primary\" (click)=\"navigateToToday()\">\n {{ i18n?.today }}\n </monkey-button>\n </mecx-date-range-picker-group-action>\n </mecx-date-range-picker-group>\n ",
2420
+ encapsulation: core.ViewEncapsulation.None,
2421
+ providers: [
2422
+ {
2423
+ provide: forms.NG_VALUE_ACCESSOR,
2424
+ useExisting: core.forwardRef(function () { return MonkeyDateRangePickerComponent; }),
2425
+ multi: true,
2426
+ },
2427
+ common.CurrencyPipe,
2428
+ ]
2429
+ },] }
2430
+ ];
2431
+ MonkeyDateRangePickerComponent.ctorParameters = function () { return [
2432
+ { type: forms.FormBuilder },
2433
+ { type: core.ChangeDetectorRef }
2434
+ ]; };
2435
+ MonkeyDateRangePickerComponent.propDecorators = {
2436
+ i18n: [{ type: core.Input }],
2437
+ infoMessage: [{ type: core.Input }],
2438
+ errorMessage: [{ type: core.Input }],
2439
+ onChange: [{ type: core.Output }],
2440
+ value: [{ type: core.Input }]
2441
+ };
2442
+
2443
+ var MonkeyDateRangePickerModule = /** @class */ (function () {
2444
+ function MonkeyDateRangePickerModule() {
2445
+ }
2446
+ return MonkeyDateRangePickerModule;
2447
+ }());
2448
+ MonkeyDateRangePickerModule.decorators = [
2449
+ { type: core.NgModule, args: [{
2450
+ declarations: [MonkeyDateRangePickerComponent],
2451
+ imports: [common.CommonModule, forms.FormsModule, forms.ReactiveFormsModule, MonkeyButtonModule, MonkeyIconModule],
2452
+ exports: [MonkeyDateRangePickerComponent],
2453
+ schemas: [core.NO_ERRORS_SCHEMA],
2454
+ },] }
2455
+ ];
2456
+
2227
2457
  /**************************
2228
2458
  * Copyright Monkey Exchange. All Rights Reserved
2229
2459
  * This style guide was developed by Monkey Exchange Team
@@ -2265,12 +2495,15 @@
2265
2495
  }
2266
2496
  return value;
2267
2497
  };
2498
+ MonkeyInputComponent.prototype.replaceZero = function (value) {
2499
+ return ("" + value).replace(new RegExp(/0/, 'g'), '');
2500
+ };
2268
2501
  MonkeyInputComponent.prototype.formatValue = function (value) {
2269
2502
  var _a, _b;
2270
2503
  var settings = this.settings;
2271
2504
  if (this.currency) {
2272
- if (!value)
2273
- value = 0;
2505
+ if (!value || !this.replaceZero(value))
2506
+ return '';
2274
2507
  return this.currencyPipe.transform(value, ((_a = settings === null || settings === void 0 ? void 0 : settings.currency) === null || _a === void 0 ? void 0 : _a.code) || 'BRL', '', '1.2-2', ((_b = settings === null || settings === void 0 ? void 0 : settings.currency) === null || _b === void 0 ? void 0 : _b.locale) || 'pt-BR');
2275
2508
  }
2276
2509
  else if (this.percent) {
@@ -2342,10 +2575,16 @@
2342
2575
  (_c = (_b = (_a = document === null || document === void 0 ? void 0 : document.getElementById(this._id)) === null || _a === void 0 ? void 0 : _a.getElementsByTagName('input')) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.focus();
2343
2576
  };
2344
2577
  MonkeyInputComponent.prototype.onKeyPress = function (event) {
2578
+ var _a;
2345
2579
  var pattern = null;
2580
+ var cmp = (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value;
2346
2581
  var inputChar = String.fromCharCode(event.charCode);
2347
2582
  if (this.currency || this.onlyNumber || this.percent) {
2348
2583
  pattern = /[0-9]/;
2584
+ if (inputChar === '0' && !this.replaceZero(cmp)) {
2585
+ event.preventDefault();
2586
+ return;
2587
+ }
2349
2588
  }
2350
2589
  else if (this.onlyAlphaNumeric) {
2351
2590
  pattern = /[^0-9A-Za-z]/;
@@ -4661,6 +4900,8 @@
4661
4900
  exports.MonkeyButtonModule = MonkeyButtonModule;
4662
4901
  exports.MonkeyCheckboxComponent = MonkeyCheckboxComponent;
4663
4902
  exports.MonkeyCheckboxModule = MonkeyCheckboxModule;
4903
+ exports.MonkeyDateRangePickerComponent = MonkeyDateRangePickerComponent;
4904
+ exports.MonkeyDateRangePickerModule = MonkeyDateRangePickerModule;
4664
4905
  exports.MonkeyExpansionComponent = MonkeyExpansionComponent;
4665
4906
  exports.MonkeyExpansionModule = MonkeyExpansionModule;
4666
4907
  exports.MonkeyFileUploadComponent = MonkeyFileUploadComponent;
@@ -4765,6 +5006,7 @@
4765
5006
  exports.MonkeyUtils = MonkeyUtils;
4766
5007
  exports.MonkeyWizardComponent = MonkeyWizardComponent;
4767
5008
  exports.MonkeyWizardModule = MonkeyWizardModule;
5009
+ exports.ɵ0 = ɵ0;
4768
5010
  exports.ɵa = MonkeyStyleGuideService;
4769
5011
  exports.ɵb = MonkeyStyleGuideSettingsService;
4770
5012
  exports.ɵc = MonkeyStyleGuideThemeSettingsService;