cja-phoenix 0.2.3 → 0.2.4

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 (34) hide show
  1. package/dist/cja-phoenix.es.js +1753 -1588
  2. package/dist/style.css +1 -1
  3. package/dist/types/components/composite/CjaMenuBar.vue.d.ts +39 -0
  4. package/dist/types/components/composite/FunnelLayout.vue.d.ts +35 -0
  5. package/dist/types/components/composite/FunnelSummary.vue.d.ts +5 -3
  6. package/dist/types/components/composite/JourneyMacroSteps.vue.d.ts +16 -0
  7. package/dist/types/components/forms/PhoneInput.vue.d.ts +2 -2
  8. package/dist/types/components/index.d.ts +5 -2
  9. package/dist/types/index.d.ts +1 -0
  10. package/dist/types/types/MacroStep.d.ts +5 -0
  11. package/dist/types/types/index.d.ts +5 -0
  12. package/package.json +3 -3
  13. package/src/assets/iconia/demo.html +57 -1
  14. package/src/assets/iconia/fonts/CGG-icomoon.eot +0 -0
  15. package/src/assets/iconia/fonts/CGG-icomoon.svg +4 -0
  16. package/src/assets/iconia/fonts/CGG-icomoon.ttf +0 -0
  17. package/src/assets/iconia/fonts/CGG-icomoon.woff +0 -0
  18. package/src/assets/iconia/selection.json +1 -1
  19. package/src/assets/iconia/style.css +17 -5
  20. package/src/assets/iconia/style.scss +25 -5
  21. package/src/assets/iconia/variables.scss +4 -0
  22. package/src/components/composite/CjaMenuBar.vue +166 -0
  23. package/src/components/composite/FunnelLayout.vue +194 -0
  24. package/src/components/composite/FunnelSubmit.vue +20 -11
  25. package/src/components/composite/FunnelSummary.vue +16 -10
  26. package/src/components/composite/JourneyMacroSteps.vue +73 -0
  27. package/src/components/composite/ProductDetails.vue +4 -2
  28. package/src/components/forms/PhoneInput.vue +15 -6
  29. package/src/components/forms/SelectionTiles.vue +18 -5
  30. package/src/components/index.ts +7 -1
  31. package/src/components/structural/CjaButton.vue +14 -9
  32. package/src/index.ts +1 -0
  33. package/src/types/MacroStep.ts +5 -0
  34. package/src/types/index.ts +6 -0
@@ -15,7 +15,10 @@
15
15
  :value="value"
16
16
  :autocomplete="autocomplete"
17
17
  @input="
18
- emit('update:modelValue', (<HTMLInputElement>$event.target).value)
18
+ emit(
19
+ 'update:modelValue',
20
+ Number((<HTMLInputElement>$event.target).value)
21
+ )
19
22
  "
20
23
  />
21
24
  </div>
@@ -46,7 +49,7 @@ const props = withDefaults(
46
49
  modelValue: InputHTMLAttributes["value"];
47
50
  id?: InputHTMLAttributes["id"];
48
51
  disabled?: InputHTMLAttributes["disabled"];
49
- phoneCountryCode: number;
52
+ phoneCountryCode?: number;
50
53
  autocomplete?: InputHTMLAttributes["autocomplete"];
51
54
  }>(),
52
55
  {
@@ -73,14 +76,20 @@ onMounted(() => {
73
76
  inputEl.value.addEventListener("countrychange", () =>
74
77
  emit(
75
78
  "update:phoneCountryCode",
76
- window.intlTelInputGlobals
77
- .getInstance(inputEl.value)
78
- .getSelectedCountryData().dialCode
79
+ Number(
80
+ window.intlTelInputGlobals
81
+ .getInstance(inputEl.value)
82
+ .getSelectedCountryData().dialCode
83
+ )
79
84
  )
80
85
  );
81
86
 
82
87
  intlTelInput(inputEl.value, {
83
- initialCountry: "pt",
88
+ initialCountry: props.phoneCountryCode
89
+ ? window.intlTelInputGlobals
90
+ .getCountryData()
91
+ .find((c) => Number(c.dialCode) == props.phoneCountryCode)?.iso2
92
+ : "pt",
84
93
  preferredCountries: ["pt"],
85
94
  separateDialCode: true,
86
95
  });
@@ -7,8 +7,8 @@
7
7
  class="tile"
8
8
  :class="{
9
9
  active: multiselect
10
- ? modelValue.includes(option.value)
11
- : option.value == modelValue,
10
+ ? value.includes(option.value)
11
+ : option.value == value,
12
12
  }"
13
13
  @click="$emit('update:modelValue', option.value)"
14
14
  v-tippy="option.tooltip ? option.tooltip : ''"
@@ -72,6 +72,8 @@ defineEmits(["update:modelValue"]);
72
72
  </script>
73
73
 
74
74
  <style lang="scss" scoped>
75
+ @import "../../assets/shadows.scss";
76
+
75
77
  .tiles-container {
76
78
  display: grid;
77
79
  width: 100%;
@@ -95,10 +97,20 @@ defineEmits(["update:modelValue"]);
95
97
  padding-right: 20px;
96
98
  }
97
99
 
98
- &:hover,
100
+ @mixin activeStyle {
101
+ box-shadow: $box-shadow-m;
102
+ background-color: #f4f9fc;
103
+ border-color: #076b9c;
104
+ }
105
+
99
106
  &.active {
100
- color: #076b9c;
101
- box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.1);
107
+ @include activeStyle;
108
+ }
109
+
110
+ @media (any-hover: hover) {
111
+ &:hover {
112
+ @include activeStyle;
113
+ }
102
114
  }
103
115
 
104
116
  .text-wrapper {
@@ -167,6 +179,7 @@ defineEmits(["update:modelValue"]);
167
179
  &.layout-image {
168
180
  .tile {
169
181
  justify-content: center;
182
+ text-align: center;
170
183
 
171
184
  .image-container img {
172
185
  display: block;
@@ -17,10 +17,13 @@ import InputToggle from "./forms/InputToggle.vue";
17
17
  import CollapseContainer from "./structural/CollapseContainer.vue";
18
18
  import SelectionTiles from "./forms/SelectionTiles.vue";
19
19
 
20
- import ProductDetails from "./composite/ProductDetails.vue";
20
+ import JourneyMacroSteps from "./composite/JourneyMacroSteps.vue";
21
+ import FunnelLayout from "./composite/FunnelLayout.vue";
21
22
  import FunnelSubmit from "./composite/FunnelSubmit.vue";
22
23
  import FunnelSummary from "./composite/FunnelSummary.vue";
23
24
  import FunnelTitle from "./composite/FunnelTitle.vue";
25
+ import ProductDetails from "./composite/ProductDetails.vue";
26
+ import CjaMenuBar from "./composite/CjaMenuBar.vue";
24
27
 
25
28
  export {
26
29
  Modal,
@@ -41,7 +44,10 @@ export {
41
44
  CollapseContainer,
42
45
  GridContainer,
43
46
  GridItem,
47
+ FunnelLayout,
44
48
  FunnelSubmit,
45
49
  FunnelSummary,
46
50
  FunnelTitle,
51
+ JourneyMacroSteps,
52
+ CjaMenuBar,
47
53
  };
@@ -6,6 +6,7 @@
6
6
  `btn-size-${size}`,
7
7
  `btn-color-${color}`,
8
8
  `icon-${iconPosition}`,
9
+ { ['btn-loading']: loading },
9
10
  ]"
10
11
  >
11
12
  <Scaffold v-if="!loading">
@@ -135,7 +136,7 @@ withDefaults(
135
136
  cursor: auto;
136
137
  }
137
138
 
138
- .spinner {
139
+ &.btn-loading .spinner {
139
140
  border-color: #fff;
140
141
  border-top-color: rgba(255, 255, 255, 0.2);
141
142
  }
@@ -165,14 +166,18 @@ withDefaults(
165
166
  flex-direction: row-reverse;
166
167
  }
167
168
 
168
- .spinner {
169
- width: 20px;
170
- height: 20px;
171
- border-width: 2px;
172
- border-style: solid;
173
- border-radius: 50%;
174
- animation: spin 1s infinite;
175
- animation-timing-function: linear;
169
+ &.btn-loading {
170
+ cursor: auto;
171
+
172
+ .spinner {
173
+ width: 20px;
174
+ height: 20px;
175
+ border-width: 2px;
176
+ border-style: solid;
177
+ border-radius: 50%;
178
+ animation: spin 1s infinite;
179
+ animation-timing-function: linear;
180
+ }
176
181
  }
177
182
  }
178
183
 
package/src/index.ts CHANGED
@@ -18,6 +18,7 @@ import "./assets/iconia/style.scss";
18
18
 
19
19
  export default { install };
20
20
 
21
+ export * from "./types";
21
22
  export * from "./components";
22
23
  export * from "./constants";
23
24
  export * from "./utils";
@@ -0,0 +1,5 @@
1
+ export interface MacroStep {
2
+ label: string;
3
+ icon: string;
4
+ status: "past" | "current" | "future";
5
+ }
@@ -0,0 +1,6 @@
1
+ import { MacroStep } from "./MacroStep";
2
+ import { Tab } from "./Tab";
3
+ import { SelectOption } from "./SelectOption";
4
+ import { TileOption } from "./TileOption";
5
+
6
+ export type { MacroStep, Tab, SelectOption, TileOption };