@maltjoy/core-vue 3.25.0 → 3.27.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.
@@ -42,7 +42,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
42
42
  validator(variant: TJoyButtonSizes): boolean;
43
43
  };
44
44
  }, {
45
- randomId: string;
45
+ randomId: import("vue").Ref<string | undefined>;
46
46
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
47
47
  /**
48
48
  * If you only need a button with an icon. To keep your component accessible, you can give a text as slot, it will be used as title and aria-label.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * TEMP: maybe we can make it a shared composable. No need for now
3
+ */
4
+ export declare function useRandomId(): {
5
+ randomId: import("vue").Ref<string | undefined>;
6
+ };
@@ -13,7 +13,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
13
13
  type: PropType<TJoyDialogSizes>;
14
14
  default: string;
15
15
  };
16
- /** By default a focus-trap is activated. It means you can loop over all interactive elements within the open dialog. */
16
+ /** Allows to set a focus-trap within the dialog. It means you can loop over all interactive elements within the open dialog. */
17
17
  focusTrap: {
18
18
  type: BooleanConstructor;
19
19
  default: boolean;
@@ -46,6 +46,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
46
46
  type: BooleanConstructor;
47
47
  default: boolean;
48
48
  };
49
+ /**
50
+ * EXPERIMENTAL: activates a new centered layout and display decorative colored shapes. Shapes can't be disabled.
51
+ */
52
+ patternBrand: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
49
56
  /** Use this property to directly create a cancel CTA (VJoyButton), if you don't need to customize the CTA. */
50
57
  cancelText: {
51
58
  type: StringConstructor;
@@ -91,7 +98,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
91
98
  type: PropType<TJoyDialogSizes>;
92
99
  default: string;
93
100
  };
94
- /** By default a focus-trap is activated. It means you can loop over all interactive elements within the open dialog. */
101
+ /** Allows to set a focus-trap within the dialog. It means you can loop over all interactive elements within the open dialog. */
95
102
  focusTrap: {
96
103
  type: BooleanConstructor;
97
104
  default: boolean;
@@ -124,6 +131,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
124
131
  type: BooleanConstructor;
125
132
  default: boolean;
126
133
  };
134
+ /**
135
+ * EXPERIMENTAL: activates a new centered layout and display decorative colored shapes. Shapes can't be disabled.
136
+ */
137
+ patternBrand: {
138
+ type: BooleanConstructor;
139
+ default: boolean;
140
+ };
127
141
  /** Use this property to directly create a cancel CTA (VJoyButton), if you don't need to customize the CTA. */
128
142
  cancelText: {
129
143
  type: StringConstructor;
@@ -163,9 +177,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
163
177
  teleport: string | import("vue").RendererElement | null | undefined;
164
178
  focusTrap: boolean;
165
179
  patternConfirm: boolean;
180
+ patternBrand: boolean;
166
181
  buttonSize: TJoyButtonSizes;
167
182
  bannerHeight: number;
168
183
  }, {}>, {
184
+ "dialog-preheader"?(_: {}): any;
169
185
  "dialog-header"?(_: {}): any;
170
186
  "dialog-subheader"?(_: {}): any;
171
187
  "dialog-body"?(_: {}): any;
@@ -11,6 +11,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
11
11
  teleport: string | import("vue").RendererElement | null | undefined;
12
12
  focusTrap: boolean;
13
13
  patternConfirm: boolean;
14
+ patternBrand: boolean;
14
15
  buttonSize: import("../components.types").TJoyButtonSizes;
15
16
  bannerHeight: number;
16
17
  }> & Omit<{
@@ -21,6 +22,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
21
22
  readonly teleport: string | import("vue").RendererElement | null | undefined;
22
23
  readonly focusTrap: boolean;
23
24
  readonly patternConfirm: boolean;
25
+ readonly patternBrand: boolean;
24
26
  readonly buttonSize: import("../components.types").TJoyButtonSizes;
25
27
  readonly bannerHeight: number;
26
28
  readonly id?: string | undefined;
@@ -66,6 +68,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
66
68
  type: BooleanConstructor;
67
69
  default: boolean;
68
70
  };
71
+ patternBrand: {
72
+ type: BooleanConstructor;
73
+ default: boolean;
74
+ };
69
75
  cancelText: {
70
76
  type: StringConstructor;
71
77
  };
@@ -93,7 +99,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
93
99
  "onDialog:after-hide"?: (() => any) | undefined;
94
100
  "onDialog:before-unmount"?: (() => any) | undefined;
95
101
  "onDialog:confirm"?: (() => any) | undefined;
96
- }, "size" | "closeLabel" | "open" | "preventBodyScroll" | "teleport" | "focusTrap" | "patternConfirm" | "buttonSize" | "bannerHeight">;
102
+ }, "size" | "closeLabel" | "open" | "preventBodyScroll" | "teleport" | "focusTrap" | "patternConfirm" | "patternBrand" | "buttonSize" | "bannerHeight">;
97
103
  $attrs: {
98
104
  [x: string]: unknown;
99
105
  };
@@ -139,6 +145,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
139
145
  type: BooleanConstructor;
140
146
  default: boolean;
141
147
  };
148
+ patternBrand: {
149
+ type: BooleanConstructor;
150
+ default: boolean;
151
+ };
142
152
  cancelText: {
143
153
  type: StringConstructor;
144
154
  };
@@ -189,6 +199,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
189
199
  teleport: string | import("vue").RendererElement | null | undefined;
190
200
  focusTrap: boolean;
191
201
  patternConfirm: boolean;
202
+ patternBrand: boolean;
192
203
  buttonSize: import("../components.types").TJoyButtonSizes;
193
204
  bannerHeight: number;
194
205
  }, {}, string, {}> & {
@@ -243,6 +254,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
243
254
  type: BooleanConstructor;
244
255
  default: boolean;
245
256
  };
257
+ patternBrand: {
258
+ type: BooleanConstructor;
259
+ default: boolean;
260
+ };
246
261
  cancelText: {
247
262
  type: StringConstructor;
248
263
  };
@@ -280,6 +295,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
280
295
  show: () => Promise<void>;
281
296
  }> & {} & import("vue").ComponentCustomProperties & {} & {
282
297
  $slots: {
298
+ "dialog-preheader"?(_: {}): any;
283
299
  "dialog-header"?(_: {}): any;
284
300
  "dialog-subheader"?(_: {}): any;
285
301
  "dialog-body"?(_: {}): any;
@@ -303,6 +319,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
303
319
  teleport: string | import("vue").RendererElement | null | undefined;
304
320
  focusTrap: boolean;
305
321
  patternConfirm: boolean;
322
+ patternBrand: boolean;
306
323
  buttonSize: import("../components.types").TJoyButtonSizes;
307
324
  bannerHeight: number;
308
325
  }> & Omit<{
@@ -313,6 +330,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
313
330
  readonly teleport: string | import("vue").RendererElement | null | undefined;
314
331
  readonly focusTrap: boolean;
315
332
  readonly patternConfirm: boolean;
333
+ readonly patternBrand: boolean;
316
334
  readonly buttonSize: import("../components.types").TJoyButtonSizes;
317
335
  readonly bannerHeight: number;
318
336
  readonly id?: string | undefined;
@@ -358,6 +376,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
358
376
  type: BooleanConstructor;
359
377
  default: boolean;
360
378
  };
379
+ patternBrand: {
380
+ type: BooleanConstructor;
381
+ default: boolean;
382
+ };
361
383
  cancelText: {
362
384
  type: StringConstructor;
363
385
  };
@@ -385,7 +407,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
385
407
  "onDialog:after-hide"?: (() => any) | undefined;
386
408
  "onDialog:before-unmount"?: (() => any) | undefined;
387
409
  "onDialog:confirm"?: (() => any) | undefined;
388
- }, "size" | "closeLabel" | "open" | "preventBodyScroll" | "teleport" | "focusTrap" | "patternConfirm" | "buttonSize" | "bannerHeight">;
410
+ }, "size" | "closeLabel" | "open" | "preventBodyScroll" | "teleport" | "focusTrap" | "patternConfirm" | "patternBrand" | "buttonSize" | "bannerHeight">;
389
411
  $attrs: {
390
412
  [x: string]: unknown;
391
413
  };
@@ -431,6 +453,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
431
453
  type: BooleanConstructor;
432
454
  default: boolean;
433
455
  };
456
+ patternBrand: {
457
+ type: BooleanConstructor;
458
+ default: boolean;
459
+ };
434
460
  cancelText: {
435
461
  type: StringConstructor;
436
462
  };
@@ -481,6 +507,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
481
507
  teleport: string | import("vue").RendererElement | null | undefined;
482
508
  focusTrap: boolean;
483
509
  patternConfirm: boolean;
510
+ patternBrand: boolean;
484
511
  buttonSize: import("../components.types").TJoyButtonSizes;
485
512
  bannerHeight: number;
486
513
  }, {}, string, {}> & {
@@ -535,6 +562,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
535
562
  type: BooleanConstructor;
536
563
  default: boolean;
537
564
  };
565
+ patternBrand: {
566
+ type: BooleanConstructor;
567
+ default: boolean;
568
+ };
538
569
  cancelText: {
539
570
  type: StringConstructor;
540
571
  };
@@ -572,6 +603,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
572
603
  show: () => Promise<void>;
573
604
  }> & {} & import("vue").ComponentCustomProperties & {} & {
574
605
  $slots: {
606
+ "dialog-preheader"?(_: {}): any;
575
607
  "dialog-header"?(_: {}): any;
576
608
  "dialog-subheader"?(_: {}): any;
577
609
  "dialog-body"?(_: {}): any;
@@ -14,7 +14,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
14
14
  id: {
15
15
  type: StringConstructor;
16
16
  };
17
- /** By default a focus-trap is activated. It means you can loop over all interactive elements within the open drawer. */
17
+ /** Allows to set a focus-trap within the drawer. It means you can loop over all interactive elements within the open drawer. */
18
18
  focusTrap: {
19
19
  type: BooleanConstructor;
20
20
  default: boolean;
@@ -61,6 +61,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
61
61
  type: PropType<TJoyButtonSizes>;
62
62
  default: string;
63
63
  };
64
+ /** Called just before you close the drawer. Returning false will cancel the closing.
65
+ * This is useful when you need confirmation from the user to close the drawer. */
66
+ onBeforeHide: {
67
+ type: PropType<() => boolean | Promise<boolean>>;
68
+ };
64
69
  }, {
65
70
  focusTrapReturn: import("@vueuse/integrations/useFocusTrap").UseFocusTrapReturn;
66
71
  hasFooterSlots: import("vue").ComputedRef<boolean>;
@@ -78,7 +83,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
78
83
  id: {
79
84
  type: StringConstructor;
80
85
  };
81
- /** By default a focus-trap is activated. It means you can loop over all interactive elements within the open drawer. */
86
+ /** Allows to set a focus-trap within the drawer. It means you can loop over all interactive elements within the open drawer. */
82
87
  focusTrap: {
83
88
  type: BooleanConstructor;
84
89
  default: boolean;
@@ -125,6 +130,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
125
130
  type: PropType<TJoyButtonSizes>;
126
131
  default: string;
127
132
  };
133
+ /** Called just before you close the drawer. Returning false will cancel the closing.
134
+ * This is useful when you need confirmation from the user to close the drawer. */
135
+ onBeforeHide: {
136
+ type: PropType<() => boolean | Promise<boolean>>;
137
+ };
128
138
  }>> & {
129
139
  "onDrawer:open"?: (() => any) | undefined;
130
140
  "onDrawer:after-open"?: (() => any) | undefined;
@@ -24,6 +24,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
24
24
  readonly id?: string | undefined;
25
25
  readonly cancelText?: string | undefined;
26
26
  readonly confirmText?: string | undefined;
27
+ readonly onBeforeHide?: (() => boolean | Promise<boolean>) | undefined;
27
28
  "onDrawer:open"?: (() => any) | undefined;
28
29
  "onDrawer:after-open"?: (() => any) | undefined;
29
30
  "onDrawer:hide"?: (() => any) | undefined;
@@ -72,6 +73,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
72
73
  type: import("vue").PropType<import("../components.types").TJoyButtonSizes>;
73
74
  default: string;
74
75
  };
76
+ onBeforeHide: {
77
+ type: import("vue").PropType<() => boolean | Promise<boolean>>;
78
+ };
75
79
  }>> & {
76
80
  "onDrawer:open"?: (() => any) | undefined;
77
81
  "onDrawer:after-open"?: (() => any) | undefined;
@@ -135,6 +139,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
135
139
  type: import("vue").PropType<import("../components.types").TJoyButtonSizes>;
136
140
  default: string;
137
141
  };
142
+ onBeforeHide: {
143
+ type: import("vue").PropType<() => boolean | Promise<boolean>>;
144
+ };
138
145
  }>> & {
139
146
  "onDrawer:open"?: (() => any) | undefined;
140
147
  "onDrawer:after-open"?: (() => any) | undefined;
@@ -228,6 +235,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
228
235
  type: import("vue").PropType<import("../components.types").TJoyButtonSizes>;
229
236
  default: string;
230
237
  };
238
+ onBeforeHide: {
239
+ type: import("vue").PropType<() => boolean | Promise<boolean>>;
240
+ };
231
241
  }>> & {
232
242
  "onDrawer:open"?: (() => any) | undefined;
233
243
  "onDrawer:after-open"?: (() => any) | undefined;
@@ -281,6 +291,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
281
291
  readonly id?: string | undefined;
282
292
  readonly cancelText?: string | undefined;
283
293
  readonly confirmText?: string | undefined;
294
+ readonly onBeforeHide?: (() => boolean | Promise<boolean>) | undefined;
284
295
  "onDrawer:open"?: (() => any) | undefined;
285
296
  "onDrawer:after-open"?: (() => any) | undefined;
286
297
  "onDrawer:hide"?: (() => any) | undefined;
@@ -329,6 +340,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
329
340
  type: import("vue").PropType<import("../components.types").TJoyButtonSizes>;
330
341
  default: string;
331
342
  };
343
+ onBeforeHide: {
344
+ type: import("vue").PropType<() => boolean | Promise<boolean>>;
345
+ };
332
346
  }>> & {
333
347
  "onDrawer:open"?: (() => any) | undefined;
334
348
  "onDrawer:after-open"?: (() => any) | undefined;
@@ -392,6 +406,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
392
406
  type: import("vue").PropType<import("../components.types").TJoyButtonSizes>;
393
407
  default: string;
394
408
  };
409
+ onBeforeHide: {
410
+ type: import("vue").PropType<() => boolean | Promise<boolean>>;
411
+ };
395
412
  }>> & {
396
413
  "onDrawer:open"?: (() => any) | undefined;
397
414
  "onDrawer:after-open"?: (() => any) | undefined;
@@ -485,6 +502,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
485
502
  type: import("vue").PropType<import("../components.types").TJoyButtonSizes>;
486
503
  default: string;
487
504
  };
505
+ onBeforeHide: {
506
+ type: import("vue").PropType<() => boolean | Promise<boolean>>;
507
+ };
488
508
  }>> & {
489
509
  "onDrawer:open"?: (() => any) | undefined;
490
510
  "onDrawer:after-open"?: (() => any) | undefined;
@@ -56,6 +56,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
56
56
  isInvalid: import("vue").Ref<boolean>;
57
57
  valueOverMaxlength: import("vue").ComputedRef<boolean>;
58
58
  valueUnderMinlength: import("vue").ComputedRef<boolean>;
59
+ triggerResize: () => void;
60
+ eventHandlers: {
61
+ onInput: (e: Event) => void;
62
+ onChange: (e: Event) => void;
63
+ onBlur: () => void;
64
+ onFocus: () => void;
65
+ /**
66
+ * Here we store the function in an object to more easily test it with vitest.
67
+ * There is an issue when we try to use spyOn vm object directly.
68
+ * */
69
+ triggerResize: () => void;
70
+ };
59
71
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
60
72
  "update:modelValue": (value: string) => void;
61
73
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -125,8 +137,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
125
137
  lazy: boolean;
126
138
  };
127
139
  autogrow: boolean;
128
- }, {}>, {
129
- default?(_: {}): any;
140
+ }, {}>, Readonly<{
141
+ /** @slot Default slot if you need to render a custom label. */
142
+ default: () => any;
143
+ }> & {
144
+ /** @slot Default slot if you need to render a custom label. */
145
+ default: () => any;
130
146
  }>;
131
147
  export default _default;
132
148
  type __VLS_WithTemplateSlots<T, S> = T & {