cja-phoenix 0.14.21 → 0.14.23

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.
@@ -1,10 +1,15 @@
1
1
  <template>
2
2
  <Teleport to="body">
3
3
  <Transition name="fade">
4
- <div v-if="active" class="modal-backdrop" :style="{ ...cssVars }">
4
+ <div
5
+ v-if="active"
6
+ class="modal-backdrop"
7
+ :class="{ 'overlap-menu': overlapMenu }"
8
+ :style="{ ...cssVars }"
9
+ >
5
10
  <div
6
11
  class="modal-overlay"
7
- @click.self="closeModal"
12
+ @click.self="closeEnabled && closeModal"
8
13
  :style="overlayStyles"
9
14
  >
10
15
  <div class="modal-container" ref="modalContainer">
@@ -13,6 +18,7 @@
13
18
  <slot name="header" />
14
19
  </div>
15
20
  <button
21
+ v-if="closeEnabled"
16
22
  type="button"
17
23
  class="btn-close m-cgg-icon--cross"
18
24
  aria-label="Close"
@@ -43,6 +49,8 @@ const props = withDefaults(
43
49
  lg?: string;
44
50
  xl?: string;
45
51
  };
52
+ closeEnabled?: boolean;
53
+ overlapMenu?: boolean;
46
54
  }>(),
47
55
  {
48
56
  maxWidth: () => ({
@@ -50,6 +58,7 @@ const props = withDefaults(
50
58
  lg: "min(calc(100% - 48px), 1024px)",
51
59
  xl: "1024px",
52
60
  }),
61
+ closeEnabled: true,
53
62
  }
54
63
  );
55
64
 
@@ -75,8 +84,8 @@ watch(
75
84
  );
76
85
 
77
86
  const overlayStyles = computed(() => ({
78
- height: `calc(100% - ${headerHeight.value}px)`,
79
- top: `${headerHeight.value}px`,
87
+ height: !props.overlapMenu ? `calc(100% - ${headerHeight.value}px)` : "100%",
88
+ top: !props.overlapMenu ? `${headerHeight.value}px` : "",
80
89
  }));
81
90
 
82
91
  const openModal = () => {
@@ -100,6 +109,10 @@ defineExpose({ active, openModal, closeModal, toggleModal });
100
109
  <style lang="scss" scoped>
101
110
  .modal-backdrop {
102
111
  @include backdrop;
112
+
113
+ &.overlap-menu {
114
+ z-index: 1004;
115
+ }
103
116
  }
104
117
 
105
118
  .modal-overlay {
@@ -121,7 +134,7 @@ defineExpose({ active, openModal, closeModal, toggleModal });
121
134
  box-sizing: border-box;
122
135
  display: flex;
123
136
  flex-direction: column;
124
- gap: 16px;
137
+ gap: 32px;
125
138
 
126
139
  @media screen and (min-width: $break-md-min) {
127
140
  top: 50%;
@@ -101,7 +101,7 @@ export const phone = (messages: { required?: string; phone: string }) => {
101
101
  .string()
102
102
  .transform((value) => ("" ? undefined : value))
103
103
  .test("phoneTest", messages.phone, (v) =>
104
- v ? /^2\d{1}|(9(1|2|3|6))/.test(v) : true
104
+ v ? /^2\d{1}|(9(1|2|3|6))\d{7}/.test(v) : true
105
105
  )
106
106
  .min(9, messages.phone);
107
107