@testgorilla/tgo-ui 2.2.2 → 2.3.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 (37) hide show
  1. package/components/autocomplete/autocomplete.component.d.ts +15 -4
  2. package/components/checkbox/checkbox.component.d.ts +8 -1
  3. package/components/field/field.component.d.ts +24 -1
  4. package/components/field/field.model.d.ts +1 -1
  5. package/components/icon/icon.config.d.ts +2 -2
  6. package/components/password-criteria/password.component.d.ts +2 -1
  7. package/components/phone-input/join-strings.pipe.d.ts +7 -0
  8. package/components/phone-input/phone-input.component.d.ts +129 -0
  9. package/components/phone-input/phone-input.component.module.d.ts +18 -0
  10. package/components/phone-input/phone-input.model.d.ts +8 -0
  11. package/components/radio-button/radio-button.component.d.ts +8 -1
  12. package/esm2022/assets/i18n/en.json +2 -1
  13. package/esm2022/components/autocomplete/autocomplete.component.mjs +34 -19
  14. package/esm2022/components/checkbox/checkbox.component.mjs +13 -4
  15. package/esm2022/components/confirm-dialog/confirm-dialog.component.mjs +3 -3
  16. package/esm2022/components/dialog/dialog.service.mjs +2 -2
  17. package/esm2022/components/dropdown/dropdown.component.mjs +3 -3
  18. package/esm2022/components/field/field.component.mjs +48 -8
  19. package/esm2022/components/field/field.model.mjs +1 -1
  20. package/esm2022/components/icon/icon.config.mjs +6 -1
  21. package/esm2022/components/password-criteria/password.component.mjs +7 -3
  22. package/esm2022/components/phone-input/join-strings.pipe.mjs +14 -0
  23. package/esm2022/components/phone-input/phone-input.component.mjs +324 -0
  24. package/esm2022/components/phone-input/phone-input.component.module.mjs +56 -0
  25. package/esm2022/components/phone-input/phone-input.model.mjs +2 -0
  26. package/esm2022/components/radio-button/radio-button.component.mjs +12 -3
  27. package/esm2022/public-api.mjs +5 -1
  28. package/fesm2022/testgorilla-tgo-ui.mjs +487 -45
  29. package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
  30. package/package.json +7 -3
  31. package/public-api.d.ts +3 -0
  32. package/src/assets/i18n/en.json +2 -1
  33. package/src/assets/icons/Google.svg +6 -0
  34. package/src/assets/icons/rebrand/Google-filled.svg +6 -0
  35. package/src/assets/icons/rebrand/Google-in-line.svg +6 -0
  36. package/src/theme/_input.scss +37 -0
  37. package/src/theme/theme.scss +25 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testgorilla/tgo-ui",
3
- "version": "2.2.2",
3
+ "version": "2.3.0",
4
4
  "lint-staged": {
5
5
  "src/**/*.ts": [
6
6
  "eslint --fix",
@@ -29,10 +29,14 @@
29
29
  "@angular/router": "~16.2.12",
30
30
  "ngx-skeleton-loader": "^8.1.0",
31
31
  "rxjs": "~7.8.0",
32
- "zone.js": "^0.13.1"
32
+ "zone.js": "^0.13.1",
33
+ "libphonenumber-js": "^1.10.59",
34
+ "ngx-mat-select-search": "^7.0.6",
35
+ "svg-country-flags": "^1.2.10"
33
36
  },
34
37
  "overrides": {
35
- "crypto-js": "4.2.0"
38
+ "crypto-js": "4.2.0",
39
+ "webpack-dev-middleware": "^6.1.2"
36
40
  },
37
41
  "module": "fesm2022/testgorilla-tgo-ui.mjs",
38
42
  "typings": "index.d.ts",
package/public-api.d.ts CHANGED
@@ -127,3 +127,6 @@ export * from './components/segmented-button/segmented-button.model';
127
127
  export * from './components/segmented-button/segmented-button.component.module';
128
128
  export * from './components/password-criteria/password.component';
129
129
  export * from './components/password-criteria/password.component.module';
130
+ export * from './components/phone-input/phone-input.component';
131
+ export * from './components/phone-input/phone-input.component.module';
132
+ export * from './components/phone-input/phone-input.model';
@@ -54,7 +54,8 @@
54
54
  "NO_RESULTS": "No results",
55
55
  "MAX": "Max",
56
56
  "MIN": "Min",
57
- "CLEAR": "Clear"
57
+ "CLEAR": "Clear",
58
+ "PHONE_NUMBER": "Phone number"
58
59
  },
59
60
  "DIALOG": {
60
61
  "CLOSE_LABEL": "Close dialog"
@@ -0,0 +1,6 @@
1
+ <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M20.9999 13.2001C20.9999 12.4601 20.9386 11.9201 20.806 11.3601H12.1836V14.7001H17.2448C17.1428 15.5301 16.5918 16.7801 15.3672 17.6201L15.3501 17.7319L18.0763 19.8016L18.2652 19.8201C19.9999 18.2501 20.9999 15.9401 20.9999 13.2001Z" fill="#4285F4"/>
3
+ <path d="M12.1836 22C14.6632 22 16.7448 21.2 18.2652 19.82L15.3672 17.62C14.5918 18.15 13.5509 18.52 12.1836 18.52C9.75504 18.52 7.69383 16.95 6.95907 14.78L6.85137 14.789L4.01656 16.939L3.97949 17.04C5.48968 19.98 8.59173 22 12.1836 22Z" fill="#34A853"/>
4
+ <path d="M6.95914 14.7801C6.76527 14.2201 6.65307 13.62 6.65307 13.0001C6.65307 12.38 6.76527 11.7801 6.94894 11.2201L6.94381 11.1008L4.07348 8.91626L3.97957 8.96004C3.35715 10.1801 3 11.5501 3 13.0001C3 14.4501 3.35715 15.82 3.97957 17.04L6.95914 14.7801Z" fill="#FBBC05"/>
5
+ <path d="M12.1836 7.47998C13.9081 7.47998 15.0713 8.20997 15.7346 8.82002L18.3264 6.34C16.7346 4.89 14.6632 4 12.1836 4C8.59173 4 5.48968 6.01998 3.97949 8.95996L6.94887 11.22C7.69383 9.05 9.75504 7.47998 12.1836 7.47998Z" fill="#EB4335"/>
6
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M20.9999 13.2001C20.9999 12.4601 20.9386 11.9201 20.806 11.3601H12.1836V14.7001H17.2448C17.1428 15.5301 16.5918 16.7801 15.3672 17.6201L15.3501 17.7319L18.0763 19.8016L18.2652 19.8201C19.9999 18.2501 20.9999 15.9401 20.9999 13.2001Z" fill="#4285F4"/>
3
+ <path d="M12.1836 22C14.6632 22 16.7448 21.2 18.2652 19.82L15.3672 17.62C14.5918 18.15 13.5509 18.52 12.1836 18.52C9.75504 18.52 7.69383 16.95 6.95907 14.78L6.85137 14.789L4.01656 16.939L3.97949 17.04C5.48968 19.98 8.59173 22 12.1836 22Z" fill="#34A853"/>
4
+ <path d="M6.95914 14.7801C6.76527 14.2201 6.65307 13.62 6.65307 13.0001C6.65307 12.38 6.76527 11.7801 6.94894 11.2201L6.94381 11.1008L4.07348 8.91626L3.97957 8.96004C3.35715 10.1801 3 11.5501 3 13.0001C3 14.4501 3.35715 15.82 3.97957 17.04L6.95914 14.7801Z" fill="#FBBC05"/>
5
+ <path d="M12.1836 7.47998C13.9081 7.47998 15.0713 8.20997 15.7346 8.82002L18.3264 6.34C16.7346 4.89 14.6632 4 12.1836 4C8.59173 4 5.48968 6.01998 3.97949 8.95996L6.94887 11.22C7.69383 9.05 9.75504 7.47998 12.1836 7.47998Z" fill="#EB4335"/>
6
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M20.9999 13.2001C20.9999 12.4601 20.9386 11.9201 20.806 11.3601H12.1836V14.7001H17.2448C17.1428 15.5301 16.5918 16.7801 15.3672 17.6201L15.3501 17.7319L18.0763 19.8016L18.2652 19.8201C19.9999 18.2501 20.9999 15.9401 20.9999 13.2001Z" fill="#4285F4"/>
3
+ <path d="M12.1836 22C14.6632 22 16.7448 21.2 18.2652 19.82L15.3672 17.62C14.5918 18.15 13.5509 18.52 12.1836 18.52C9.75504 18.52 7.69383 16.95 6.95907 14.78L6.85137 14.789L4.01656 16.939L3.97949 17.04C5.48968 19.98 8.59173 22 12.1836 22Z" fill="#34A853"/>
4
+ <path d="M6.95914 14.7801C6.76527 14.2201 6.65307 13.62 6.65307 13.0001C6.65307 12.38 6.76527 11.7801 6.94894 11.2201L6.94381 11.1008L4.07348 8.91626L3.97957 8.96004C3.35715 10.1801 3 11.5501 3 13.0001C3 14.4501 3.35715 15.82 3.97957 17.04L6.95914 14.7801Z" fill="#FBBC05"/>
5
+ <path d="M12.1836 7.47998C13.9081 7.47998 15.0713 8.20997 15.7346 8.82002L18.3264 6.34C16.7346 4.89 14.6632 4 12.1836 4C8.59173 4 5.48968 6.01998 3.97949 8.95996L6.94887 11.22C7.69383 9.05 9.75504 7.47998 12.1836 7.47998Z" fill="#EB4335"/>
6
+ </svg>
@@ -20,6 +20,13 @@
20
20
  }
21
21
 
22
22
  *[theme="classic"] {
23
+ .mat-mdc-form-field {
24
+ .mat-mdc-form-field-hint.error,
25
+ .mat-mdc-form-field-hint.error svg {
26
+ color: $tgo-error-default;
27
+ }
28
+ }
29
+
23
30
  .mat-mdc-form-field:not(.mat-warn) {
24
31
  &.mat-form-field-appearance-outline {
25
32
  .mat-mdc-text-field-wrapper {
@@ -147,6 +154,11 @@
147
154
  .mat-mdc-form-field, .autocomplete-wrapper .mat-mdc-form-field {
148
155
  &.mat-form-field-appearance-outline, &.mat-text-field-outlined {
149
156
 
157
+ .mat-mdc-form-field-hint.error,
158
+ .mat-mdc-form-field-hint.error svg {
159
+ color: $error-50;
160
+ }
161
+
150
162
  input, .mat-text-field__input {
151
163
  caret-color: $black !important;
152
164
  }
@@ -337,3 +349,28 @@
337
349
  }
338
350
  }
339
351
  }
352
+
353
+ .mat-mdc-form-field {
354
+ .mat-mdc-form-field-hint-wrapper {
355
+ padding: 0;
356
+ }
357
+
358
+ .mat-mdc-form-field-hint:before {
359
+ height: 2px;
360
+ }
361
+
362
+ .mat-mdc-form-field-hint.error {
363
+ display: flex;
364
+ flex-flow: column;
365
+ row-gap: 4px;
366
+
367
+ .errors {
368
+ ui-icon {
369
+ margin-right: 8px;
370
+ }
371
+
372
+ align-items: center;
373
+ display: flex;
374
+ }
375
+ }
376
+ }
@@ -21,6 +21,31 @@
21
21
  .mat-mdc-elevation-specific.mat-elevation-z8 {
22
22
  box-shadow: $box-shadow-modal!important;
23
23
  }
24
+
25
+ .phone-number-select {
26
+ margin-top: 8px;
27
+ border-radius: 10px!important;
28
+ box-shadow: $box-shadow-hover-state;
29
+
30
+ .mat-mdc-option {
31
+ --mat-option-selected-state-layer-color: #{$grayscale-10};
32
+ --mat-option-selected-state-label-text-color: #{$black};
33
+
34
+ .mdc-list-item__primary-text small {
35
+ font-size: 14px;
36
+ }
37
+
38
+ .mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after {
39
+ color: $black;
40
+ width: 12px;
41
+ height: 5px;
42
+ }
43
+ }
44
+
45
+ .mat-divider {
46
+ display: none;
47
+ }
48
+ }
24
49
  };
25
50
  }
26
51