cja-phoenix 1.2.39 → 1.2.41

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 (184) hide show
  1. package/dist/module.d.mts +6 -2
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +29 -16
  4. package/dist/runtime/assets/iconia/fonts/CGG-icomoon.svg +94 -0
  5. package/dist/runtime/assets/iconia/fonts/CGG-icomoon.ttf +0 -0
  6. package/dist/runtime/assets/iconia/fonts/CGG-icomoon.woff +0 -0
  7. package/dist/runtime/assets/iconia/selection.json +1 -0
  8. package/dist/runtime/assets/iconia/style.css +281 -0
  9. package/dist/runtime/assets/scss/main.scss +6 -0
  10. package/dist/runtime/assets/scss/mixins/_funnel.scss +15 -0
  11. package/dist/runtime/assets/scss/mixins/_index.scss +46 -0
  12. package/dist/runtime/assets/scss/mixins/_media-queries.scss +109 -0
  13. package/dist/runtime/assets/scss/mixins/_results.scss +235 -0
  14. package/dist/runtime/assets/scss/tippy.scss +31 -0
  15. package/dist/runtime/assets/scss/variables/_breakpoints.scss +18 -0
  16. package/dist/runtime/assets/scss/variables/_colors.scss +100 -0
  17. package/dist/runtime/assets/scss/variables/_forms.scss +121 -0
  18. package/dist/runtime/assets/scss/variables/_grid.scss +12 -0
  19. package/dist/runtime/assets/scss/variables/_index.scss +6 -0
  20. package/dist/runtime/assets/scss/variables/_shadows.scss +7 -0
  21. package/dist/runtime/assets/scss/variables/_z-index.scss +6 -0
  22. package/dist/runtime/components/CjaButton.d.vue.ts +33 -0
  23. package/dist/runtime/components/CjaButton.vue +437 -0
  24. package/dist/runtime/components/CjaButton.vue.d.ts +33 -0
  25. package/dist/runtime/components/CollapseContainer.d.vue.ts +35 -0
  26. package/dist/runtime/components/CollapseContainer.vue +112 -0
  27. package/dist/runtime/components/CollapseContainer.vue.d.ts +35 -0
  28. package/dist/runtime/components/ContentTabs.d.vue.ts +23 -0
  29. package/dist/runtime/components/ContentTabs.vue +103 -0
  30. package/dist/runtime/components/ContentTabs.vue.d.ts +23 -0
  31. package/dist/runtime/components/Drawer.d.vue.ts +52 -0
  32. package/dist/runtime/components/Drawer.vue +169 -0
  33. package/dist/runtime/components/Drawer.vue.d.ts +52 -0
  34. package/dist/runtime/components/FixedContainer.d.vue.ts +37 -0
  35. package/dist/runtime/components/FixedContainer.vue +95 -0
  36. package/dist/runtime/components/FixedContainer.vue.d.ts +37 -0
  37. package/dist/runtime/components/GridContainer.d.vue.ts +13 -0
  38. package/dist/runtime/components/GridContainer.vue +37 -0
  39. package/dist/runtime/components/GridContainer.vue.d.ts +13 -0
  40. package/dist/runtime/components/GridItem.d.vue.ts +29 -0
  41. package/dist/runtime/components/GridItem.vue +93 -0
  42. package/dist/runtime/components/GridItem.vue.d.ts +29 -0
  43. package/dist/runtime/components/InfoMessage.d.vue.ts +28 -0
  44. package/dist/runtime/components/InfoMessage.vue +141 -0
  45. package/dist/runtime/components/InfoMessage.vue.d.ts +28 -0
  46. package/dist/runtime/components/LoadingSpinner.d.vue.ts +10 -0
  47. package/dist/runtime/components/LoadingSpinner.vue +39 -0
  48. package/dist/runtime/components/LoadingSpinner.vue.d.ts +10 -0
  49. package/dist/runtime/components/Modal.d.vue.ts +39 -0
  50. package/dist/runtime/components/Modal.vue +195 -0
  51. package/dist/runtime/components/Modal.vue.d.ts +39 -0
  52. package/dist/runtime/components/Scaffold.d.vue.ts +13 -0
  53. package/dist/runtime/components/Scaffold.vue +3 -0
  54. package/dist/runtime/components/Scaffold.vue.d.ts +13 -0
  55. package/dist/runtime/components/StickyContainer.d.vue.ts +21 -0
  56. package/dist/runtime/components/StickyContainer.vue +57 -0
  57. package/dist/runtime/components/StickyContainer.vue.d.ts +21 -0
  58. package/dist/runtime/components/form/CheckboxInput.d.vue.ts +42 -0
  59. package/dist/runtime/components/form/CheckboxInput.vue +163 -0
  60. package/dist/runtime/components/form/CheckboxInput.vue.d.ts +42 -0
  61. package/dist/runtime/components/form/CheckboxInputList.d.vue.ts +37 -0
  62. package/dist/runtime/components/form/CheckboxInputList.vue +84 -0
  63. package/dist/runtime/components/form/CheckboxInputList.vue.d.ts +37 -0
  64. package/dist/runtime/components/form/CurrencyInput.d.vue.ts +37 -0
  65. package/dist/runtime/components/form/CurrencyInput.vue +134 -0
  66. package/dist/runtime/components/form/CurrencyInput.vue.d.ts +37 -0
  67. package/dist/runtime/components/form/DateInput.d.vue.ts +40 -0
  68. package/dist/runtime/components/form/DateInput.vue +325 -0
  69. package/dist/runtime/components/form/DateInput.vue.d.ts +40 -0
  70. package/dist/runtime/components/form/FileInput.d.vue.ts +46 -0
  71. package/dist/runtime/components/form/FileInput.vue +202 -0
  72. package/dist/runtime/components/form/FileInput.vue.d.ts +46 -0
  73. package/dist/runtime/components/form/NumberInput.d.vue.ts +41 -0
  74. package/dist/runtime/components/form/NumberInput.vue +162 -0
  75. package/dist/runtime/components/form/NumberInput.vue.d.ts +41 -0
  76. package/dist/runtime/components/form/PhoneInput.d.vue.ts +44 -0
  77. package/dist/runtime/components/form/PhoneInput.vue +143 -0
  78. package/dist/runtime/components/form/PhoneInput.vue.d.ts +44 -0
  79. package/dist/runtime/components/form/RadioInput.d.vue.ts +42 -0
  80. package/dist/runtime/components/form/RadioInput.vue +181 -0
  81. package/dist/runtime/components/form/RadioInput.vue.d.ts +42 -0
  82. package/dist/runtime/components/form/RadioInputList.d.vue.ts +57 -0
  83. package/dist/runtime/components/form/RadioInputList.vue +130 -0
  84. package/dist/runtime/components/form/RadioInputList.vue.d.ts +57 -0
  85. package/dist/runtime/components/form/SelectInput.d.vue.ts +46 -0
  86. package/dist/runtime/components/form/SelectInput.vue +362 -0
  87. package/dist/runtime/components/form/SelectInput.vue.d.ts +46 -0
  88. package/dist/runtime/components/form/SelectionTiles.d.vue.ts +44 -0
  89. package/dist/runtime/components/form/SelectionTiles.vue +329 -0
  90. package/dist/runtime/components/form/SelectionTiles.vue.d.ts +44 -0
  91. package/dist/runtime/components/form/SliderInput.d.vue.ts +51 -0
  92. package/dist/runtime/components/form/SliderInput.vue +175 -0
  93. package/dist/runtime/components/form/SliderInput.vue.d.ts +51 -0
  94. package/dist/runtime/components/form/TextInput.d.vue.ts +56 -0
  95. package/dist/runtime/components/form/TextInput.vue +227 -0
  96. package/dist/runtime/components/form/TextInput.vue.d.ts +56 -0
  97. package/dist/runtime/components/form/TextareaInput.d.vue.ts +37 -0
  98. package/dist/runtime/components/form/TextareaInput.vue +76 -0
  99. package/dist/runtime/components/form/TextareaInput.vue.d.ts +37 -0
  100. package/dist/runtime/components/form/TileCheckboxInput.d.vue.ts +40 -0
  101. package/dist/runtime/components/form/TileCheckboxInput.vue +108 -0
  102. package/dist/runtime/components/form/TileCheckboxInput.vue.d.ts +40 -0
  103. package/dist/runtime/components/form/ToggleInput.d.vue.ts +43 -0
  104. package/dist/runtime/components/form/ToggleInput.vue +119 -0
  105. package/dist/runtime/components/form/ToggleInput.vue.d.ts +43 -0
  106. package/dist/runtime/components/form/structure/Container.d.vue.ts +16 -0
  107. package/dist/runtime/components/form/structure/Container.vue +31 -0
  108. package/dist/runtime/components/form/structure/Container.vue.d.ts +16 -0
  109. package/dist/runtime/components/form/structure/Description.d.vue.ts +9 -0
  110. package/dist/runtime/components/form/structure/Description.vue +26 -0
  111. package/dist/runtime/components/form/structure/Description.vue.d.ts +9 -0
  112. package/dist/runtime/components/form/structure/Error.d.vue.ts +9 -0
  113. package/dist/runtime/components/form/structure/Error.vue +23 -0
  114. package/dist/runtime/components/form/structure/Error.vue.d.ts +9 -0
  115. package/dist/runtime/components/form/structure/Title.d.vue.ts +12 -0
  116. package/dist/runtime/components/form/structure/Title.vue +43 -0
  117. package/dist/runtime/components/form/structure/Title.vue.d.ts +12 -0
  118. package/dist/runtime/components/funnel/Header.d.vue.ts +18 -0
  119. package/dist/runtime/components/funnel/Header.vue +62 -0
  120. package/dist/runtime/components/funnel/Header.vue.d.ts +18 -0
  121. package/dist/runtime/composables/useCjaGtm.d.ts +19 -0
  122. package/dist/runtime/composables/useCjaGtm.js +164 -0
  123. package/dist/runtime/composables/useFunnelConfig.d.ts +11 -0
  124. package/dist/runtime/composables/useFunnelConfig.js +51 -0
  125. package/dist/runtime/composables/useFunnelSummary.d.ts +14 -0
  126. package/dist/runtime/composables/useFunnelSummary.js +16 -0
  127. package/dist/runtime/composables/useHeaderHeight.d.ts +3 -0
  128. package/dist/runtime/composables/useHeaderHeight.js +24 -0
  129. package/dist/runtime/composables/useJourneyConfig.d.ts +11 -0
  130. package/dist/runtime/composables/useJourneyConfig.js +13 -0
  131. package/dist/runtime/composables/useValidateForm.d.ts +11 -0
  132. package/dist/runtime/composables/useValidateForm.js +33 -0
  133. package/dist/runtime/data/dialCodes.d.ts +7 -0
  134. package/dist/runtime/data/dialCodes.js +1466 -0
  135. package/dist/runtime/data/phoneDigits.d.ts +2 -0
  136. package/dist/runtime/data/phoneDigits.js +231 -0
  137. package/dist/runtime/plugins/tippy.d.ts +4 -0
  138. package/dist/runtime/plugins/tippy.js +12 -0
  139. package/dist/runtime/plugins/v-calendar.d.ts +3 -0
  140. package/dist/runtime/plugins/v-calendar.js +6 -0
  141. package/dist/runtime/server/tsconfig.json +3 -0
  142. package/dist/runtime/types/Form.d.ts +34 -0
  143. package/dist/runtime/types/Form.js +20 -0
  144. package/dist/runtime/types/Grid.d.ts +4 -0
  145. package/dist/runtime/types/Grid.js +0 -0
  146. package/dist/runtime/types/Icon.d.ts +2 -0
  147. package/dist/runtime/types/Icon.js +85 -0
  148. package/dist/runtime/types/JourneyConfig.d.ts +9 -0
  149. package/dist/runtime/types/JourneyConfig.js +0 -0
  150. package/dist/runtime/types/index.d.ts +4 -0
  151. package/dist/runtime/types/index.js +4 -0
  152. package/dist/runtime/utils/applyProductData.d.ts +10 -0
  153. package/dist/runtime/utils/applyProductData.js +22 -0
  154. package/dist/runtime/utils/convertDate.d.ts +5 -0
  155. package/dist/runtime/utils/convertDate.js +17 -0
  156. package/dist/runtime/utils/findScrollAncestor.d.ts +1 -0
  157. package/dist/runtime/utils/findScrollAncestor.js +14 -0
  158. package/dist/runtime/utils/formValidations.d.ts +78 -0
  159. package/dist/runtime/utils/formValidations.js +180 -0
  160. package/dist/runtime/utils/formatValue.d.ts +4 -0
  161. package/dist/runtime/utils/formatValue.js +20 -0
  162. package/dist/runtime/utils/getAbTestVersion.d.ts +9 -0
  163. package/dist/runtime/utils/getAbTestVersion.js +48 -0
  164. package/dist/runtime/utils/getCalendarUrl.d.ts +8 -0
  165. package/dist/runtime/utils/getCalendarUrl.js +24 -0
  166. package/dist/runtime/utils/getFromUrl.d.ts +2 -0
  167. package/dist/runtime/utils/getFromUrl.js +25 -0
  168. package/dist/runtime/utils/getStoryblokUrl.d.ts +71 -0
  169. package/dist/runtime/utils/getStoryblokUrl.js +35 -0
  170. package/dist/runtime/utils/jsonReviver.d.ts +1 -0
  171. package/dist/runtime/utils/jsonReviver.js +18 -0
  172. package/dist/runtime/utils/mediaBreakpoints.d.ts +28 -0
  173. package/dist/runtime/utils/mediaBreakpoints.js +28 -0
  174. package/dist/runtime/utils/toggleScroll.d.ts +1 -0
  175. package/dist/runtime/utils/toggleScroll.js +6 -0
  176. package/dist/runtime/utils/updateForm.d.ts +11 -0
  177. package/dist/runtime/utils/updateForm.js +74 -0
  178. package/dist/runtime/utils/updateMarketingConsent.d.ts +4 -0
  179. package/dist/runtime/utils/updateMarketingConsent.js +13 -0
  180. package/dist/runtime/utils/uploadFile.d.ts +8 -0
  181. package/dist/runtime/utils/uploadFile.js +13 -0
  182. package/dist/types.d.mts +6 -10
  183. package/package.json +9 -8
  184. package/dist/module.d.cts +0 -2
@@ -0,0 +1,93 @@
1
+ <template>
2
+ <div
3
+ :class="{
4
+ [`grid-item-sm-${sizeSm}`]: sizeSm,
5
+ [`grid-item-sm-offset-${offsetSm}`]: offsetSm,
6
+ [`grid-item-md-${sizeMd}`]: sizeMd,
7
+ [`grid-item-md-offset-${offsetMd}`]: offsetMd,
8
+ [`grid-item-lg-${sizeLg}`]: sizeLg,
9
+ [`grid-item-lg-offset-${offsetLg}`]: offsetLg,
10
+ [`grid-item-xl-${sizeXl}`]: sizeXl,
11
+ [`grid-item-xl-offset-${offsetXl}`]: offsetXl
12
+ }"
13
+ >
14
+ <slot />
15
+ </div>
16
+ </template>
17
+
18
+ <script setup>
19
+ defineProps({
20
+ sizeSm: { type: Number, required: false, default: 4 },
21
+ offsetSm: { type: Number, required: false },
22
+ sizeMd: { type: Number, required: false, default: 4 },
23
+ offsetMd: { type: Number, required: false },
24
+ sizeLg: { type: Number, required: false, default: 12 },
25
+ offsetLg: { type: Number, required: false },
26
+ sizeXl: { type: Number, required: false, default: 12 },
27
+ offsetXl: { type: Number, required: false }
28
+ });
29
+ </script>
30
+
31
+ <style lang="scss" scoped>
32
+ @for $i from 1 to 5 {
33
+ .grid-item-sm-#{$i} {
34
+ @include screen-sm-max {
35
+ grid-column-end: span #{$i};
36
+ }
37
+ }
38
+ }
39
+
40
+ @for $i from 1 to 4 {
41
+ .grid-item-sm-offset-#{$i} {
42
+ grid-column-start: #{$i + 1};
43
+ }
44
+ }
45
+
46
+ @for $i from 1 to 5 {
47
+ .grid-item-md-#{$i} {
48
+ @include screen-md-only {
49
+ grid-column-end: span #{$i};
50
+ }
51
+ }
52
+ }
53
+
54
+ @for $i from 1 to 4 {
55
+ .grid-item-md-offset-#{$i} {
56
+ @include screen-md-only {
57
+ grid-column-start: #{$i + 1};
58
+ }
59
+ }
60
+ }
61
+
62
+ @for $i from 1 to 13 {
63
+ .grid-item-lg-#{$i} {
64
+ @include screen-lg-only {
65
+ grid-column-end: span #{$i};
66
+ }
67
+ }
68
+ }
69
+
70
+ @for $i from 1 to 12 {
71
+ .grid-item-lg-offset-#{$i} {
72
+ @include screen-lg-only {
73
+ grid-column-start: #{$i + 1};
74
+ }
75
+ }
76
+ }
77
+
78
+ @for $i from 1 to 13 {
79
+ .grid-item-xl-#{$i} {
80
+ @include screen-xl-min {
81
+ grid-column-end: span #{$i};
82
+ }
83
+ }
84
+ }
85
+
86
+ @for $i from 1 to 12 {
87
+ .grid-item-xl-offset-#{$i} {
88
+ @include screen-xl-min {
89
+ grid-column-start: #{$i + 1};
90
+ }
91
+ }
92
+ }
93
+ </style>
@@ -0,0 +1,29 @@
1
+ import type { GridItemOffsetDesktop, GridItemOffsetMobile, GridItemSizeDesktop, GridItemSizeMobile } from "../types/Grid.js";
2
+ type __VLS_Props = {
3
+ sizeSm?: GridItemSizeMobile;
4
+ offsetSm?: GridItemOffsetMobile;
5
+ sizeMd?: GridItemSizeMobile;
6
+ offsetMd?: GridItemOffsetMobile;
7
+ sizeLg?: GridItemSizeDesktop;
8
+ offsetLg?: GridItemOffsetDesktop;
9
+ sizeXl?: GridItemSizeDesktop;
10
+ offsetXl?: GridItemOffsetDesktop;
11
+ };
12
+ declare var __VLS_1: {};
13
+ type __VLS_Slots = {} & {
14
+ default?: (props: typeof __VLS_1) => any;
15
+ };
16
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
17
+ sizeSm: GridItemSizeMobile;
18
+ sizeMd: GridItemSizeMobile;
19
+ sizeLg: GridItemSizeDesktop;
20
+ sizeXl: GridItemSizeDesktop;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,28 @@
1
+ type __VLS_Props = {
2
+ toggle?: boolean;
3
+ color: "blue" | "green" | "red" | "yellow" | "dark-white";
4
+ border?: boolean;
5
+ };
6
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
7
+ type __VLS_Slots = {} & {
8
+ icon?: (props: typeof __VLS_1) => any;
9
+ } & {
10
+ title?: (props: typeof __VLS_3) => any;
11
+ } & {
12
+ description?: (props: typeof __VLS_5) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ "btn:close": (...args: any[]) => void;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ "onBtn:close"?: ((...args: any[]) => any) | undefined;
18
+ }>, {
19
+ border: boolean;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_WithSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -0,0 +1,141 @@
1
+ <template>
2
+ <div
3
+ v-if="showMessage && toggle || !toggle"
4
+ class="info-message"
5
+ :class="[
6
+ `color-${color}`,
7
+ { 'has-icon': $slots.icon, 'has-toggle': toggle, 'has-border': border }
8
+ ]"
9
+ >
10
+ <slot name="icon" />
11
+ <div class="text-container">
12
+ <div v-if="$slots.title" class="title">
13
+ <slot name="title" />
14
+ </div>
15
+ <div v-if="$slots.description" class="description">
16
+ <slot name="description" />
17
+ </div>
18
+ </div>
19
+ <div v-if="toggle" class="btn-container">
20
+ <button
21
+ class="m-cgg-icon--cross"
22
+ aria-label="Fechar"
23
+ @click="showMessage = false;
24
+ $emit('btn:close')"
25
+ />
26
+ </div>
27
+ </div>
28
+ </template>
29
+
30
+ <script setup>
31
+ import { ref } from "vue";
32
+ defineProps({
33
+ toggle: { type: Boolean, required: false },
34
+ color: { type: String, required: true },
35
+ border: { type: Boolean, required: false, default: true }
36
+ });
37
+ const showMessage = ref(true);
38
+ defineEmits(["btn:close"]);
39
+ </script>
40
+
41
+ <style lang="scss" scoped>
42
+ .info-message {
43
+ display: grid;
44
+ grid-template-columns: 1fr;
45
+ gap: 16px;
46
+ padding: 8px 16px;
47
+ border-radius: 8px;
48
+
49
+ @include screen-md-min {
50
+ padding: 12px 16px;
51
+ }
52
+
53
+ &.has-border {
54
+ border-width: 1px;
55
+ border-style: solid;
56
+ }
57
+
58
+ &.has-icon {
59
+ grid-template-columns: auto 1fr;
60
+ }
61
+
62
+ &.has-toggle {
63
+ grid-template-columns: 1fr 18px;
64
+
65
+ &.has-icon {
66
+ grid-template-columns: auto 1fr 18px;
67
+ }
68
+ }
69
+
70
+ &.color-green {
71
+ background-color: $alert-bg-green;
72
+
73
+ &.has-border {
74
+ border-color: $alert-green;
75
+ }
76
+ }
77
+
78
+ &.color-blue {
79
+ background-color: $extra-light-blue;
80
+
81
+ &.has-border {
82
+ border-color: $main-blue;
83
+ }
84
+ }
85
+
86
+ &.color-red {
87
+ background-color: $alert-bg-red;
88
+
89
+ &.has-border {
90
+ border-color: $alert-red;
91
+ }
92
+ }
93
+
94
+ &.color-yellow {
95
+ background-color: $alert-bg-yellow;
96
+
97
+ &.has-border {
98
+ border-color: $alert-yellow;
99
+ }
100
+ }
101
+
102
+ &.color-dark-white {
103
+ background-color: $dark-white;
104
+
105
+ &.has-border {
106
+ border-color: $light-grey;
107
+ }
108
+ }
109
+
110
+ .text-container {
111
+ display: flex;
112
+ flex-direction: column;
113
+ gap: 16px;
114
+
115
+ .title {
116
+ font-weight: 700;
117
+ font-size: 16px;
118
+ line-height: 20px;
119
+ margin: 0;
120
+ }
121
+
122
+ .description {
123
+ font-size: 13px;
124
+ line-height: 17px;
125
+ margin: 0;
126
+ }
127
+ }
128
+
129
+ .btn-container {
130
+ button {
131
+ padding: 0;
132
+ border: none;
133
+ font-size: 12px;
134
+ line-height: 18px;
135
+ color: inherit;
136
+ cursor: pointer;
137
+ background: none;
138
+ }
139
+ }
140
+ }
141
+ </style>
@@ -0,0 +1,28 @@
1
+ type __VLS_Props = {
2
+ toggle?: boolean;
3
+ color: "blue" | "green" | "red" | "yellow" | "dark-white";
4
+ border?: boolean;
5
+ };
6
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
7
+ type __VLS_Slots = {} & {
8
+ icon?: (props: typeof __VLS_1) => any;
9
+ } & {
10
+ title?: (props: typeof __VLS_3) => any;
11
+ } & {
12
+ description?: (props: typeof __VLS_5) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ "btn:close": (...args: any[]) => void;
16
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ "onBtn:close"?: ((...args: any[]) => any) | undefined;
18
+ }>, {
19
+ border: boolean;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_WithSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ size?: number;
3
+ border?: number;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ size: number;
7
+ border: number;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <div
3
+ class="spinner"
4
+ :style="{
5
+ width: `${size}px`,
6
+ height: `${size}px`,
7
+ borderWidth: `${border}px`
8
+ }"
9
+ />
10
+ </template>
11
+
12
+ <script setup>
13
+ defineProps({
14
+ size: { type: Number, required: false, default: 80 },
15
+ border: { type: Number, required: false, default: 7 }
16
+ });
17
+ </script>
18
+
19
+ <style lang="scss" scoped>
20
+ .spinner {
21
+ width: 80px;
22
+ height: 80px;
23
+ border: 7px solid $bright-green;
24
+ border-top: 7px solid rgba(255, 255, 255, 0);
25
+ border-radius: 50%;
26
+ animation: spin 1s infinite;
27
+ animation-timing-function: linear;
28
+ }
29
+
30
+ @keyframes spin {
31
+ from {
32
+ transform: rotate(0deg);
33
+ }
34
+
35
+ to {
36
+ transform: rotate(360deg);
37
+ }
38
+ }
39
+ </style>
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ size?: number;
3
+ border?: number;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ size: number;
7
+ border: number;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,39 @@
1
+ type __VLS_Props = {
2
+ maxWidth?: {
3
+ md?: string;
4
+ lg?: string;
5
+ xl?: string;
6
+ };
7
+ closeEnabled?: boolean;
8
+ forceMobileFull?: boolean;
9
+ };
10
+ declare var __VLS_13: {}, __VLS_15: {}, __VLS_17: {};
11
+ type __VLS_Slots = {} & {
12
+ header?: (props: typeof __VLS_13) => any;
13
+ } & {
14
+ body?: (props: typeof __VLS_15) => any;
15
+ } & {
16
+ footer?: (props: typeof __VLS_17) => any;
17
+ };
18
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
19
+ active: import("vue").Ref<boolean, boolean>;
20
+ openModal: () => void;
21
+ closeModal: () => void;
22
+ toggleModal: () => void;
23
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ "modal:open": (...args: any[]) => void;
25
+ "modal:close": (...args: any[]) => void;
26
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
27
+ "onModal:open"?: ((...args: any[]) => any) | undefined;
28
+ "onModal:close"?: ((...args: any[]) => any) | undefined;
29
+ }>, {
30
+ closeEnabled: boolean;
31
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
35
+ type __VLS_WithSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
@@ -0,0 +1,195 @@
1
+ <template>
2
+ <Teleport to="body">
3
+ <Transition name="modal">
4
+ <div
5
+ v-if="active"
6
+ class="modal-backdrop"
7
+ @click.self="closeEnabled && closeModal()"
8
+ >
9
+ <div
10
+ ref="modalContainer"
11
+ class="modal-container"
12
+ :class="[
13
+ $attrs.class,
14
+ {
15
+ 'mobile-full': mobileFull
16
+ }
17
+ ]"
18
+ :style="{ ...cssVars }"
19
+ >
20
+ <div class="modal-header" :class="{ 'has-title': $slots.header }">
21
+ <div class="modal-header-wrapper">
22
+ <slot name="header" />
23
+ </div>
24
+ <button
25
+ v-if="closeEnabled"
26
+ type="button"
27
+ class="btn-close m-cgg-icon--cross"
28
+ aria-label="Fechar"
29
+ @click="closeModal"
30
+ />
31
+ </div>
32
+ <div class="modal-body">
33
+ <slot name="body" />
34
+ </div>
35
+ <div v-if="$slots.footer" class="modal-footer">
36
+ <slot name="footer" />
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </Transition>
41
+ </Teleport>
42
+ </template>
43
+
44
+ <script setup>
45
+ import { toggleScroll } from "../utils/toggleScroll";
46
+ import { computed, nextTick, ref, watch } from "vue";
47
+ const props = defineProps({
48
+ maxWidth: { type: Object, required: false },
49
+ closeEnabled: { type: Boolean, required: false, default: true },
50
+ forceMobileFull: { type: Boolean, required: false }
51
+ });
52
+ const active = ref(false);
53
+ const mobileFull = ref(false);
54
+ const modalContainer = ref();
55
+ const cssVars = computed(() => ({
56
+ "--md-max-width": props.maxWidth?.md,
57
+ "--lg-max-width": props.maxWidth?.lg,
58
+ "--xl-max-width": props.maxWidth?.xl
59
+ }));
60
+ const emit = defineEmits(["modal:open", "modal:close"]);
61
+ watch(() => active.value, toggleScroll);
62
+ const openModal = () => {
63
+ active.value = true;
64
+ emit("modal:open");
65
+ };
66
+ const closeModal = () => {
67
+ active.value = false;
68
+ emit("modal:close");
69
+ };
70
+ const toggleModal = () => {
71
+ active.value = !active.value;
72
+ emit(`modal:${active.value ? "open" : "close"}`);
73
+ };
74
+ watch(active, () => {
75
+ nextTick(() => {
76
+ mobileFull.value = active.value ? props.forceMobileFull || modalContainer.value.clientHeight >= window.innerHeight * 0.75 : false;
77
+ });
78
+ });
79
+ defineExpose({ active, openModal, closeModal, toggleModal });
80
+ </script>
81
+
82
+ <style lang="scss" scoped>
83
+ .modal-backdrop {
84
+ @include backdrop;
85
+ display: flex;
86
+ align-items: flex-end;
87
+ z-index: $level-modal;
88
+
89
+ @include screen-md-min {
90
+ justify-content: center;
91
+ align-items: center;
92
+ padding: 24px;
93
+ }
94
+
95
+ .modal-container {
96
+ display: grid;
97
+ grid-template-rows: auto 1fr auto;
98
+ background: $white;
99
+ padding: 16px 24px 24px;
100
+ border-radius: 16px 16px 0 0;
101
+ width: 100%;
102
+ max-height: 100%;
103
+ transition: 0.4s ease-in-out;
104
+
105
+ @include screen-md-min {
106
+ border-radius: 16px;
107
+ max-width: min(100%, var(--md-max-width, 768px));
108
+ }
109
+
110
+ @include screen-lg-min {
111
+ max-width: min(100%, var(--lg-max-width, var(--md-max-width, 1024px)));
112
+ }
113
+
114
+ @include screen-xl-min {
115
+ max-width: min(
116
+ 100%,
117
+ var(--xl-max-width, var(--lg-max-width, var(--md-max-width, 1024px)))
118
+ );
119
+ }
120
+
121
+ &.mobile-full {
122
+ @include screen-sm-max {
123
+ height: 100%;
124
+ border-radius: 0;
125
+ transition: none;
126
+ }
127
+ }
128
+
129
+ .modal-header {
130
+ display: grid;
131
+ align-items: center;
132
+ grid-template-columns: 1fr 36px;
133
+ margin-bottom: 12px;
134
+
135
+ &.has-title {
136
+ padding-bottom: 8px;
137
+ border-bottom: 1px solid $disabled-grey;
138
+ }
139
+
140
+ .modal-header-wrapper {
141
+ font-size: 16px;
142
+ line-height: 20px;
143
+ font-weight: 700;
144
+ }
145
+
146
+ .btn-close {
147
+ background: none;
148
+ border: none;
149
+ padding: 0;
150
+ outline: 0;
151
+ height: 36px;
152
+ width: 36px;
153
+ cursor: pointer;
154
+ font-size: 12px;
155
+ line-height: 20px;
156
+ font-weight: 700;
157
+
158
+ &:focus {
159
+ outline: 0;
160
+ }
161
+ }
162
+ }
163
+
164
+ .modal-body {
165
+ overflow: hidden auto;
166
+ }
167
+
168
+ .modal-footer {
169
+ padding-top: 24px;
170
+ }
171
+ }
172
+ }
173
+
174
+ .modal-enter-from,
175
+ .modal-leave-to {
176
+ opacity: 0;
177
+ }
178
+
179
+ .modal-enter-from .modal-container {
180
+ @include screen-sm-max {
181
+ transform: translateY(100%);
182
+ }
183
+ }
184
+
185
+ .modal-enter-to,
186
+ .modal-leave-from {
187
+ opacity: 1;
188
+ }
189
+
190
+ .modal-enter-to .modal-container {
191
+ @include screen-sm-max {
192
+ transform: translateY(0);
193
+ }
194
+ }
195
+ </style>
@@ -0,0 +1,39 @@
1
+ type __VLS_Props = {
2
+ maxWidth?: {
3
+ md?: string;
4
+ lg?: string;
5
+ xl?: string;
6
+ };
7
+ closeEnabled?: boolean;
8
+ forceMobileFull?: boolean;
9
+ };
10
+ declare var __VLS_13: {}, __VLS_15: {}, __VLS_17: {};
11
+ type __VLS_Slots = {} & {
12
+ header?: (props: typeof __VLS_13) => any;
13
+ } & {
14
+ body?: (props: typeof __VLS_15) => any;
15
+ } & {
16
+ footer?: (props: typeof __VLS_17) => any;
17
+ };
18
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
19
+ active: import("vue").Ref<boolean, boolean>;
20
+ openModal: () => void;
21
+ closeModal: () => void;
22
+ toggleModal: () => void;
23
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ "modal:open": (...args: any[]) => void;
25
+ "modal:close": (...args: any[]) => void;
26
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
27
+ "onModal:open"?: ((...args: any[]) => any) | undefined;
28
+ "onModal:close"?: ((...args: any[]) => any) | undefined;
29
+ }>, {
30
+ closeEnabled: boolean;
31
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
35
+ type __VLS_WithSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <slot />
3
+ </template>
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };