@roadtrip/components 3.11.2 → 3.12.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 (85) hide show
  1. package/dist/cjs/index-12592729.js +4 -4
  2. package/dist/cjs/index-fb57f684.js.map +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/road-phone-number-input.cjs.entry.js +114 -155
  5. package/dist/cjs/road-phone-number-input.cjs.entry.js.map +1 -1
  6. package/dist/cjs/road-progress-indicator-horizontal.cjs.entry.js +3 -2
  7. package/dist/cjs/road-progress-indicator-horizontal.cjs.entry.js.map +1 -1
  8. package/dist/cjs/road-rating.cjs.entry.js +5 -2
  9. package/dist/cjs/road-rating.cjs.entry.js.map +1 -1
  10. package/dist/cjs/road-select.cjs.entry.js +17 -0
  11. package/dist/cjs/road-select.cjs.entry.js.map +1 -1
  12. package/dist/cjs/roadtrip.cjs.js +1 -1
  13. package/dist/collection/components/global-navigation/global-navigation.stories.js +2 -1
  14. package/dist/collection/components/icon/svg/location-pin-outline-color.svg +1 -1
  15. package/dist/collection/components/icon/svg/social-whatsapp-badge.svg +1 -1
  16. package/dist/collection/components/icon/svg/social-whatsapp-color.svg +1 -1
  17. package/dist/collection/components/icon/svg/social-whatsapp-solid.svg +1 -1
  18. package/dist/collection/components/phone-number-input/interfaces/country.interface.js +2 -0
  19. package/dist/collection/components/phone-number-input/interfaces/country.interface.js.map +1 -0
  20. package/dist/collection/components/phone-number-input/interfaces/index.js +3 -0
  21. package/dist/collection/components/phone-number-input/interfaces/index.js.map +1 -0
  22. package/dist/collection/components/phone-number-input/interfaces/phone.interface.js +2 -0
  23. package/dist/collection/components/phone-number-input/interfaces/phone.interface.js.map +1 -0
  24. package/dist/collection/components/phone-number-input/phone-number-input.css +200 -1
  25. package/dist/collection/components/phone-number-input/phone-number-input.js +171 -229
  26. package/dist/collection/components/phone-number-input/phone-number-input.js.map +1 -1
  27. package/dist/collection/components/phone-number-input/phone-number-input.stories.js +30 -28
  28. package/dist/collection/components/progress-indicator-horizontal/progress-indicator-horizontal.js +21 -2
  29. package/dist/collection/components/progress-indicator-horizontal/progress-indicator-horizontal.js.map +1 -1
  30. package/dist/collection/components/progress-indicator-horizontal/progress-indicator-horizontal.stories.js +12 -5
  31. package/dist/collection/components/rating/rating.css +4 -0
  32. package/dist/collection/components/rating/rating.js +40 -1
  33. package/dist/collection/components/rating/rating.js.map +1 -1
  34. package/dist/collection/components/rating/rating.stories.js +17 -0
  35. package/dist/collection/components/select/select.js +18 -1
  36. package/dist/collection/components/select/select.js.map +1 -1
  37. package/dist/collection/components/select/select.stories.js +2 -2
  38. package/dist/esm/index-52302079.js +4 -4
  39. package/dist/esm/index-891decf5.js.map +1 -1
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/road-phone-number-input.entry.js +114 -155
  42. package/dist/esm/road-phone-number-input.entry.js.map +1 -1
  43. package/dist/esm/road-progress-indicator-horizontal.entry.js +3 -2
  44. package/dist/esm/road-progress-indicator-horizontal.entry.js.map +1 -1
  45. package/dist/esm/road-rating.entry.js +5 -2
  46. package/dist/esm/road-rating.entry.js.map +1 -1
  47. package/dist/esm/road-select.entry.js +17 -0
  48. package/dist/esm/road-select.entry.js.map +1 -1
  49. package/dist/esm/roadtrip.js +1 -1
  50. package/dist/html.html-data.json +28 -12
  51. package/dist/icons/icons.svg +1 -1
  52. package/dist/icons/index.js +4 -4
  53. package/dist/roadtrip/{p-4f5e8cc2.entry.js → p-254ba3c4.entry.js} +2 -2
  54. package/dist/roadtrip/p-254ba3c4.entry.js.map +1 -0
  55. package/dist/roadtrip/p-73fe2357.js.map +1 -1
  56. package/dist/roadtrip/{p-995e1e53.entry.js → p-9173eb4b.entry.js} +2 -2
  57. package/dist/roadtrip/p-9173eb4b.entry.js.map +1 -0
  58. package/dist/roadtrip/{p-a2a9a650.entry.js → p-be8aee32.entry.js} +2 -2
  59. package/dist/roadtrip/p-be8aee32.entry.js.map +1 -0
  60. package/dist/roadtrip/p-cbc00bfb.entry.js +2 -0
  61. package/dist/roadtrip/p-cbc00bfb.entry.js.map +1 -0
  62. package/dist/roadtrip/roadtrip.css +1 -1
  63. package/dist/roadtrip/roadtrip.esm.js +1 -1
  64. package/dist/roadtrip/roadtrip.esm.js.map +1 -1
  65. package/dist/roadtrip/svg/location-pin-outline-color.svg +1 -1
  66. package/dist/roadtrip/svg/social-whatsapp-badge.svg +1 -1
  67. package/dist/roadtrip/svg/social-whatsapp-color.svg +1 -1
  68. package/dist/roadtrip/svg/social-whatsapp-solid.svg +1 -1
  69. package/dist/types/components/phone-number-input/interfaces/country.interface.d.ts +13 -0
  70. package/dist/types/components/phone-number-input/interfaces/index.d.ts +2 -0
  71. package/dist/types/components/phone-number-input/interfaces/phone.interface.d.ts +11 -0
  72. package/dist/types/components/phone-number-input/phone-number-input.d.ts +41 -75
  73. package/dist/types/components/progress-indicator-horizontal/progress-indicator-horizontal.d.ts +4 -0
  74. package/dist/types/components/rating/rating.d.ts +8 -0
  75. package/dist/types/components/select/select.d.ts +2 -0
  76. package/dist/types/components.d.ts +75 -44
  77. package/hydrate/index.js +155 -170
  78. package/icons/icons.svg +1 -1
  79. package/icons/index.js +4 -4
  80. package/package.json +2 -2
  81. package/dist/roadtrip/p-39d1c90a.entry.js +0 -2
  82. package/dist/roadtrip/p-39d1c90a.entry.js.map +0 -1
  83. package/dist/roadtrip/p-4f5e8cc2.entry.js.map +0 -1
  84. package/dist/roadtrip/p-995e1e53.entry.js.map +0 -1
  85. package/dist/roadtrip/p-a2a9a650.entry.js.map +0 -1
@@ -1,90 +1,56 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- type CountryType = {
3
- translations: {
4
- [key: string]: string;
5
- };
6
- countryCode: string;
7
- phoneCode: string;
8
- };
9
- interface PhoneReturnType {
10
- phoneNumberType: string;
11
- countryCode: string;
12
- nationalNumber: string;
13
- phoneCode: string;
14
- internationalNumber: string;
15
- }
2
+ import { CountryOption, CountryType, PhoneReturnType, ReturnObject } from './interfaces';
3
+ import { RoadInputCustomEvent } from '../../components';
16
4
  export declare class RoadPhoneNumberInput {
17
- /**
18
- * Emitt object data.
19
- */
5
+ /** Computed phone data */
20
6
  roadPhoneNumberInput: EventEmitter<{
21
7
  isError: boolean;
22
- phone: PhoneReturnType;
8
+ phone: {
9
+ numberType: string;
10
+ countryCode: string;
11
+ nationalNumber: string;
12
+ code: string;
13
+ internationalNumber: string;
14
+ };
23
15
  }>;
24
16
  el: HTMLRoadPhoneNumberInputElement;
25
- /**
26
- * The country data
27
- */
17
+ /** Disable both fields */
18
+ disabled: boolean;
19
+ /** List of countries displayed in the country selection. Countries will be automatically sorted by alphabetical order (see format in example) */
28
20
  countryData: CountryType[];
29
- /**
30
- * The translation language of the countries
31
- */
21
+ /** Used to display countries with the right language */
32
22
  language: string;
33
- /**
34
- * The label display in the select area
35
- */
36
- areaLabel: string;
37
- /**
38
- * The indicatif display in the select area
39
- */
40
- areaValue: string;
41
- /**
42
- * The label display in the input
43
- */
44
- inputLabel: string;
45
- /**
46
- * The value of the input
47
- */
48
- inputValue: string;
49
- /**
50
- * Type of the phone number : FIXED_LINE, MOBILE
51
- */
52
- numberType?: string;
53
- /**
54
- * If `true`, the user must fill in a value before submitting a form.
55
- */
23
+ /** Country selection placeHolder */
24
+ codeLabel: string;
25
+ /** Phone input placeHolder */
26
+ phoneLabel: string;
27
+ /** Value displayed in the phone input */
28
+ phoneValue?: string;
29
+ /** Selected country code */
30
+ countryCode?: string;
31
+ /** Error message (displayed only if ther is a message) */
32
+ errorMessage: string;
33
+ /** Add a star in the phone input */
56
34
  required: boolean;
57
35
  selectedCountry: string;
36
+ selectedCountryCode: string;
58
37
  phoneNumber: string;
59
- inputError: string;
60
- countryOptions: {
61
- value: string;
62
- label: string;
63
- selected: boolean;
64
- }[];
65
- languageChanged(): void;
66
- updateCountryOptions(): void;
38
+ countryOptions: CountryOption[];
39
+ returnObject: ReturnObject;
40
+ updateMessagePosition(): void;
67
41
  componentWillLoad(): void;
68
- getPhoneCountryCode(phoneCode: string): string;
69
- handleSelect(event: any): void;
70
- createReturnObject(): void;
71
- setAndPlaceErrorMessage(message: string): void;
42
+ handleInput(event: RoadInputCustomEvent<{
43
+ value: string | null | undefined;
44
+ }>): void;
45
+ handleSelect(event: Event): void;
46
+ createAndDispatchPhoneData(fromSelect?: boolean): void;
47
+ updateSelectedCountryCode(countryCode: string): void;
48
+ updateSelectedCountry(value: string): void;
49
+ resetPhoneUtilData(): PhoneReturnType;
50
+ isEmptyPhoneNumber(): boolean;
51
+ getPhoneCodeFromCountryCode(countryCode: string): string | undefined;
52
+ updateCountryOptions(): void;
53
+ placeErrorMessage(): void;
72
54
  waitForElementToExist(selector: string): Promise<HTMLElement>;
73
- handleInput(event: any): void;
74
- /**
75
- * Emitted the value and label of the option selected.
76
- */
77
- roadselected: EventEmitter<{
78
- value: string | undefined | null;
79
- label: string;
80
- }>;
81
- /** @internal */
82
- roadSelected: EventEmitter<{
83
- value: string | undefined | null;
84
- label: string;
85
- }>;
86
- extractCallingCode(countryString: string): string;
87
- selectCountry(event: CustomEvent): void;
88
55
  render(): any;
89
56
  }
90
- export {};
@@ -15,6 +15,10 @@ export declare class Stepper {
15
15
  */
16
16
  color?: 'default' | 'header';
17
17
  /**
18
+ * The nombre of steps.
19
+ */
20
+ numberStep?: 3 | 2;
21
+ /**
18
22
  * The color of the first step.
19
23
  */
20
24
  stateFirstStep?: 'default' | 'current' | 'comleted';
@@ -11,6 +11,10 @@ export declare class Rating {
11
11
  * Show reviews
12
12
  */
13
13
  showreviews: boolean;
14
+ /**
15
+ * Read Only
16
+ */
17
+ readonly: boolean;
14
18
  /**
15
19
  * number of reviews
16
20
  */
@@ -19,5 +23,9 @@ export declare class Rating {
19
23
  * Word display next to the number of reviews.
20
24
  */
21
25
  reviewsText: string;
26
+ /**
27
+ * Url.
28
+ */
29
+ url: string;
22
30
  render(): any;
23
31
  }
@@ -72,6 +72,8 @@ export declare class Select {
72
72
  /** @internal */
73
73
  roadBlur: EventEmitter<void>;
74
74
  valueChanged(): void;
75
+ componentWillLoad(): void;
76
+ addSelected(): string | number;
75
77
  private onChange;
76
78
  private onBlur;
77
79
  private onFocus;
@@ -6,7 +6,9 @@
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { AutocompleteTypes, Color, FeedbackColors, TextFieldTypes } from "./interface";
9
+ import { CountryType } from "./components/phone-number-input/interfaces";
9
10
  export { AutocompleteTypes, Color, FeedbackColors, TextFieldTypes } from "./interface";
11
+ export { CountryType } from "./components/phone-number-input/interfaces";
10
12
  export namespace Components {
11
13
  interface RoadAccordion {
12
14
  /**
@@ -926,35 +928,39 @@ export namespace Components {
926
928
  }
927
929
  interface RoadPhoneNumberInput {
928
930
  /**
929
- * The label display in the select area
931
+ * Country selection placeHolder
930
932
  */
931
- "areaLabel": string;
933
+ "codeLabel": string;
932
934
  /**
933
- * The indicatif display in the select area
935
+ * Selected country code
934
936
  */
935
- "areaValue": string;
937
+ "countryCode"?: string;
936
938
  /**
937
- * The country data
939
+ * List of countries displayed in the country selection. Countries will be automatically sorted by alphabetical order (see format in example)
938
940
  */
939
941
  "countryData": CountryType[];
940
942
  /**
941
- * The label display in the input
943
+ * Disable both fields
942
944
  */
943
- "inputLabel": string;
945
+ "disabled": boolean;
944
946
  /**
945
- * The value of the input
947
+ * Error message (displayed only if ther is a message)
946
948
  */
947
- "inputValue": string;
949
+ "errorMessage": string;
948
950
  /**
949
- * The translation language of the countries
951
+ * Used to display countries with the right language
950
952
  */
951
953
  "language": string;
952
954
  /**
953
- * Type of the phone number : FIXED_LINE, MOBILE
955
+ * Phone input placeHolder
954
956
  */
955
- "numberType"?: string;
957
+ "phoneLabel": string;
956
958
  /**
957
- * If `true`, the user must fill in a value before submitting a form.
959
+ * Value displayed in the phone input
960
+ */
961
+ "phoneValue"?: string;
962
+ /**
963
+ * Add a star in the phone input
958
964
  */
959
965
  "required": boolean;
960
966
  }
@@ -1029,6 +1035,10 @@ export namespace Components {
1029
1035
  * The color progress-indicator-horizontal.
1030
1036
  */
1031
1037
  "color"?: 'default' | 'header';
1038
+ /**
1039
+ * The nombre of steps.
1040
+ */
1041
+ "numberStep"?: 3 | 2;
1032
1042
  /**
1033
1043
  * The color of the first step.
1034
1044
  */
@@ -1181,6 +1191,10 @@ export namespace Components {
1181
1191
  * Rate review between 0 and 5
1182
1192
  */
1183
1193
  "rate": number;
1194
+ /**
1195
+ * Read Only
1196
+ */
1197
+ "readonly": boolean;
1184
1198
  /**
1185
1199
  * number of reviews
1186
1200
  */
@@ -1197,6 +1211,10 @@ export namespace Components {
1197
1211
  * The button size.
1198
1212
  */
1199
1213
  "size"?: 'small' | 'medium';
1214
+ /**
1215
+ * Url.
1216
+ */
1217
+ "url": string;
1200
1218
  }
1201
1219
  interface RoadRow {
1202
1220
  }
@@ -2309,15 +2327,13 @@ declare global {
2309
2327
  interface HTMLRoadPhoneNumberInputElementEventMap {
2310
2328
  "roadPhoneNumberInput": {
2311
2329
  isError: boolean;
2312
- phone: PhoneReturnType;
2313
- };
2314
- "roadselected": {
2315
- value: string | undefined | null,
2316
- label: string
2317
- };
2318
- "roadSelected": {
2319
- value: string | undefined | null,
2320
- label: string
2330
+ phone: {
2331
+ numberType: string;
2332
+ countryCode: string;
2333
+ nationalNumber: string;
2334
+ code: string;
2335
+ internationalNumber: string;
2336
+ };
2321
2337
  };
2322
2338
  }
2323
2339
  interface HTMLRoadPhoneNumberInputElement extends Components.RoadPhoneNumberInput, HTMLStencilElement {
@@ -3887,49 +3903,52 @@ declare namespace LocalJSX {
3887
3903
  }
3888
3904
  interface RoadPhoneNumberInput {
3889
3905
  /**
3890
- * The label display in the select area
3906
+ * Country selection placeHolder
3891
3907
  */
3892
- "areaLabel"?: string;
3908
+ "codeLabel"?: string;
3893
3909
  /**
3894
- * The indicatif display in the select area
3910
+ * Selected country code
3895
3911
  */
3896
- "areaValue"?: string;
3912
+ "countryCode"?: string;
3897
3913
  /**
3898
- * The country data
3914
+ * List of countries displayed in the country selection. Countries will be automatically sorted by alphabetical order (see format in example)
3899
3915
  */
3900
3916
  "countryData"?: CountryType[];
3901
3917
  /**
3902
- * The label display in the input
3918
+ * Disable both fields
3903
3919
  */
3904
- "inputLabel"?: string;
3920
+ "disabled"?: boolean;
3905
3921
  /**
3906
- * The value of the input
3922
+ * Error message (displayed only if ther is a message)
3907
3923
  */
3908
- "inputValue"?: string;
3924
+ "errorMessage"?: string;
3909
3925
  /**
3910
- * The translation language of the countries
3926
+ * Used to display countries with the right language
3911
3927
  */
3912
3928
  "language"?: string;
3913
3929
  /**
3914
- * Type of the phone number : FIXED_LINE, MOBILE
3915
- */
3916
- "numberType"?: string;
3917
- /**
3918
- * Emitt object data.
3930
+ * Computed phone data
3919
3931
  */
3920
3932
  "onRoadPhoneNumberInput"?: (event: RoadPhoneNumberInputCustomEvent<{
3921
3933
  isError: boolean;
3922
- phone: PhoneReturnType;
3934
+ phone: {
3935
+ numberType: string;
3936
+ countryCode: string;
3937
+ nationalNumber: string;
3938
+ code: string;
3939
+ internationalNumber: string;
3940
+ };
3923
3941
  }>) => void;
3924
3942
  /**
3925
- * Emitted the value and label of the option selected.
3943
+ * Phone input placeHolder
3926
3944
  */
3927
- "onRoadselected"?: (event: RoadPhoneNumberInputCustomEvent<{
3928
- value: string | undefined | null,
3929
- label: string
3930
- }>) => void;
3945
+ "phoneLabel"?: string;
3931
3946
  /**
3932
- * If `true`, the user must fill in a value before submitting a form.
3947
+ * Value displayed in the phone input
3948
+ */
3949
+ "phoneValue"?: string;
3950
+ /**
3951
+ * Add a star in the phone input
3933
3952
  */
3934
3953
  "required"?: boolean;
3935
3954
  }
@@ -4022,6 +4041,10 @@ declare namespace LocalJSX {
4022
4041
  * The color progress-indicator-horizontal.
4023
4042
  */
4024
4043
  "color"?: 'default' | 'header';
4044
+ /**
4045
+ * The nombre of steps.
4046
+ */
4047
+ "numberStep"?: 3 | 2;
4025
4048
  /**
4026
4049
  * The color of the first step.
4027
4050
  */
@@ -4194,6 +4217,10 @@ declare namespace LocalJSX {
4194
4217
  * Rate review between 0 and 5
4195
4218
  */
4196
4219
  "rate"?: number;
4220
+ /**
4221
+ * Read Only
4222
+ */
4223
+ "readonly"?: boolean;
4197
4224
  /**
4198
4225
  * number of reviews
4199
4226
  */
@@ -4210,6 +4237,10 @@ declare namespace LocalJSX {
4210
4237
  * The button size.
4211
4238
  */
4212
4239
  "size"?: 'small' | 'medium';
4240
+ /**
4241
+ * Url.
4242
+ */
4243
+ "url"?: string;
4213
4244
  }
4214
4245
  interface RoadRow {
4215
4246
  }