@maltjoy/core-vue 3.24.0 → 3.26.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;
@@ -78,7 +78,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
78
78
  id: {
79
79
  type: StringConstructor;
80
80
  };
81
- /** By default a focus-trap is activated. It means you can loop over all interactive elements within the open drawer. */
81
+ /** Allows to set a focus-trap within the drawer. It means you can loop over all interactive elements within the open drawer. */
82
82
  focusTrap: {
83
83
  type: BooleanConstructor;
84
84
  default: boolean;
@@ -1,3 +1,5 @@
1
1
  import { LEVELS } from '../../types';
2
2
  export type TJoyHighlightLevels = (typeof LEVELS)[number];
3
3
  export declare const HIGHLIGHT_LEVELS: ("neutral" | "success" | "info" | "warning" | "error")[];
4
+ export type TJoyHighlightVariants = 'ai' | 'default';
5
+ export declare const HIGHLIGHT_VARIANTS: string[];
@@ -1,4 +1,5 @@
1
1
  import { PropType } from 'vue';
2
+ import { TJoyHighlightVariants } from './JoyHighlight.types';
2
3
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
3
4
  accent: {
4
5
  type: BooleanConstructor;
@@ -16,6 +17,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
16
17
  default: string;
17
18
  validator(level: "neutral" | "success" | "info" | "warning" | "error"): boolean;
18
19
  };
20
+ /** Please note that 'default' variant has no effect. This property is meant to completely override "level" prop style */
21
+ variant: {
22
+ type: PropType<TJoyHighlightVariants>;
23
+ default: string;
24
+ };
19
25
  }, {
20
26
  getRelevantIcon: import("vue").ComputedRef<import("@maltjoy/icons").JoyIconsId>;
21
27
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -35,11 +41,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
35
41
  default: string;
36
42
  validator(level: "neutral" | "success" | "info" | "warning" | "error"): boolean;
37
43
  };
44
+ /** Please note that 'default' variant has no effect. This property is meant to completely override "level" prop style */
45
+ variant: {
46
+ type: PropType<TJoyHighlightVariants>;
47
+ default: string;
48
+ };
38
49
  }>>, {
50
+ variant: TJoyHighlightVariants;
39
51
  level: "neutral" | "success" | "info" | "warning" | "error";
40
52
  accent: boolean;
41
53
  displayIcon: boolean;
42
54
  }, {}>, {
55
+ "highlight-decorator"?(_: {}): any;
43
56
  "highlight-title"?(_: {}): any;
44
57
  default?(_: {}): any;
45
58
  }>;
@@ -1,6 +1,6 @@
1
1
  import { SIZES } from '../../types';
2
2
  import VJoyTag from './VJoyTag.vue';
3
- export declare const TAG_VARIANTS: readonly ["important", "inactive", "pending", "pricing", "special", "primary", "secondary"];
3
+ export declare const TAG_VARIANTS: readonly ["important", "inactive", "pending", "pricing", "special", "primary", "secondary", "ai-primary", "ai-secondary"];
4
4
  export type TJoyTagVariants = (typeof TAG_VARIANTS)[number];
5
5
  export type TJoyTagSizes = Exclude<(typeof SIZES)[number], 'xlarge' | 'xxsmall'>;
6
6
  export declare const TAG_SIZES: TJoyTagSizes[];
@@ -35,7 +35,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
35
35
  }, {
36
36
  link: boolean;
37
37
  size: TJoyTagSizes;
38
- variant: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special";
38
+ variant: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | "ai-primary" | "ai-secondary";
39
39
  value: string | number;
40
40
  draggable: boolean;
41
41
  removable: boolean;
@@ -4,7 +4,7 @@ import type { TJoyTagSizes } from '../JoyTag/JoyTag.types';
4
4
  declare const _default: <T extends string>(__VLS_props: {
5
5
  size?: TJoyTagSizes | undefined;
6
6
  name?: string | undefined;
7
- variant?: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | undefined;
7
+ variant?: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | "ai-primary" | "ai-secondary" | undefined;
8
8
  invalid?: boolean | undefined;
9
9
  modelValue?: T[] | undefined;
10
10
  "onUpdate:modelValue"?: ((values: T[]) => any) | undefined;
@@ -32,7 +32,7 @@ declare const _default: <T extends string>(__VLS_props: {
32
32
  props: {
33
33
  size?: TJoyTagSizes | undefined;
34
34
  name?: string | undefined;
35
- variant?: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | undefined;
35
+ variant?: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | "ai-primary" | "ai-secondary" | undefined;
36
36
  invalid?: boolean | undefined;
37
37
  modelValue?: T[] | undefined;
38
38
  "onUpdate:modelValue"?: ((values: T[]) => any) | undefined;
@@ -64,7 +64,7 @@ declare const _default: <T extends string>(__VLS_props: {
64
64
  props: {
65
65
  size?: TJoyTagSizes | undefined;
66
66
  name?: string | undefined;
67
- variant?: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | undefined;
67
+ variant?: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | "ai-primary" | "ai-secondary" | undefined;
68
68
  invalid?: boolean | undefined;
69
69
  modelValue?: T[] | undefined;
70
70
  "onUpdate:modelValue"?: ((values: T[]) => any) | undefined;
@@ -26,7 +26,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
26
26
  };
27
27
  /** Apply variant for all VJoyTag. Can be overriden by setting a variant property in specific tags entry. */
28
28
  variant: {
29
- type: PropType<"primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special">;
29
+ type: PropType<"primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | "ai-primary" | "ai-secondary">;
30
30
  default: string;
31
31
  };
32
32
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -57,14 +57,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
57
57
  };
58
58
  /** Apply variant for all VJoyTag. Can be overriden by setting a variant property in specific tags entry. */
59
59
  variant: {
60
- type: PropType<"primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special">;
60
+ type: PropType<"primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | "ai-primary" | "ai-secondary">;
61
61
  default: string;
62
62
  };
63
63
  }>> & {
64
64
  "onUpdate:modelValue"?: ((tags: TJoyTagsListModel) => any) | undefined;
65
65
  onRemoveTag?: ((tagValue: string | number | undefined) => any) | undefined;
66
66
  }, {
67
- variant: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special";
67
+ variant: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | "ai-primary" | "ai-secondary";
68
68
  align: "left" | "right" | "center";
69
69
  removable: boolean;
70
70
  selectable: boolean;
@@ -76,7 +76,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
76
76
  removable: boolean;
77
77
  link?: boolean | undefined;
78
78
  size?: import("../JoyTag/JoyTag.types").TJoyTagSizes | undefined;
79
- variant?: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | undefined;
79
+ variant?: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | "ai-primary" | "ai-secondary" | undefined;
80
80
  value?: string | number | undefined;
81
81
  draggable?: boolean | undefined;
82
82
  key?: string | number | symbol | 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 & {