cja-phoenix 1.2.15 → 1.2.17

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.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cja-phoenix",
3
3
  "configKey": "cja-phoenix",
4
- "version": "1.2.15",
4
+ "version": "1.2.17",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -3,6 +3,16 @@ type __VLS_Props = {
3
3
  description?: string;
4
4
  tooltip?: string;
5
5
  };
6
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare var __VLS_1: {};
7
+ type __VLS_Slots = {} & {
8
+ description?: (props: typeof __VLS_1) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
12
  declare const _default: typeof __VLS_export;
8
13
  export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -2,14 +2,13 @@
2
2
  <div class="funnel-header">
3
3
  <div class="header-container">
4
4
  <h2>{{ title }}</h2>
5
- <span
6
- v-if="tooltip"
7
- v-tippy="tooltip"
8
- class="m-cgg-icon--question"
9
- />
5
+ <span v-if="tooltip" v-tippy="tooltip" class="m-cgg-icon--question" />
10
6
  </div>
11
- <p v-if="description">
12
- {{ description }}
7
+ <p v-if="description || $slots.description">
8
+ <slot name="description" v-if="$slots.description" />
9
+ <scaffold v-else>
10
+ {{ description }}
11
+ </scaffold>
13
12
  </p>
14
13
  </div>
15
14
  </template>
@@ -24,11 +23,13 @@ defineProps({
24
23
 
25
24
  <style lang="scss" scoped>
26
25
  .funnel-header {
26
+ display: grid;
27
+ gap: 16px;
28
+ margin-bottom: 32px;
27
29
  text-align: center;
28
- margin: 0 0 32px;
29
30
 
30
31
  .header-container {
31
- display: flex;
32
+ display: grid;
32
33
  gap: 12px;
33
34
  justify-content: center;
34
35
  align-items: center;
@@ -53,14 +54,9 @@ defineProps({
53
54
  }
54
55
 
55
56
  p {
56
- font-size: 14px;
57
- line-height: 18px;
58
- margin: 24px 0 0;
59
-
60
- @media screen and (min-width: $break-lg-min) {
61
- font-size: 16px;
62
- line-height: 20px;
63
- }
57
+ font-size: 16px;
58
+ line-height: 20px;
59
+ margin: 0;
64
60
  }
65
61
  }
66
62
  </style>
@@ -3,6 +3,16 @@ type __VLS_Props = {
3
3
  description?: string;
4
4
  tooltip?: string;
5
5
  };
6
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare var __VLS_1: {};
7
+ type __VLS_Slots = {} & {
8
+ description?: (props: typeof __VLS_1) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
12
  declare const _default: typeof __VLS_export;
8
13
  export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -1,7 +1,7 @@
1
1
  import { type Ref } from 'vue';
2
2
  export declare const useValidateForm: (options: {
3
3
  fields?: Ref[];
4
- onSubmit?: () => void;
4
+ onSubmit?: () => void | Promise<void>;
5
5
  onError?: () => void;
6
6
  forceValidation?: boolean;
7
7
  submitLock?: boolean;
@@ -7,11 +7,11 @@ export const useValidateForm = (options) => {
7
7
  fields?.forEach(async (f) => await f.value.validate());
8
8
  validForm.value = fields?.every((f) => f.value.meta.valid) ?? true;
9
9
  };
10
- const executeCallback = () => {
10
+ const executeCallback = async () => {
11
11
  if (validForm.value) {
12
12
  if (options.submitLock && !submitLock.value || !options.submitLock) {
13
13
  submitLock.value = true;
14
- options.onSubmit?.();
14
+ await options.onSubmit?.();
15
15
  submitLock.value = false;
16
16
  }
17
17
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cja-phoenix",
3
- "version": "1.2.15",
3
+ "version": "1.2.17",
4
4
  "description": "Phoenix utility",
5
5
  "repository": "comparaja/phoenix",
6
6
  "license": "MIT",