@maltjoy/core-vue 5.0.1 → 5.2.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.
@@ -21,6 +21,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
21
21
  type: BooleanConstructor;
22
22
  default: boolean;
23
23
  };
24
+ /**
25
+ * Invalid state of the component
26
+ *
27
+ * Note: A checked checkbox cannot be invalid (the `checked` state takes priority over `invalid` state).
28
+ */
24
29
  invalid: {
25
30
  type: BooleanConstructor;
26
31
  default: boolean;
@@ -74,6 +79,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
74
79
  type: BooleanConstructor;
75
80
  default: boolean;
76
81
  };
82
+ /**
83
+ * Invalid state of the component
84
+ *
85
+ * Note: A checked checkbox cannot be invalid (the `checked` state takes priority over `invalid` state).
86
+ */
77
87
  invalid: {
78
88
  type: BooleanConstructor;
79
89
  default: boolean;
@@ -1,9 +1,17 @@
1
+ import { PropType } from 'vue';
1
2
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
3
  /** In some cases you'll need to inject the error in the DOM but hide it. Visible by default */
3
4
  visible: {
4
5
  type: BooleanConstructor;
5
6
  default: boolean;
6
7
  };
8
+ /**
9
+ * Display a list of errors without the need of a slot
10
+ */
11
+ errors: {
12
+ type: PropType<string[]>;
13
+ required: false;
14
+ };
7
15
  /** Error message to display. If you need a list of errors, use the slot instead */
8
16
  noHtmlErrorText: StringConstructor;
9
17
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -12,6 +20,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
12
20
  type: BooleanConstructor;
13
21
  default: boolean;
14
22
  };
23
+ /**
24
+ * Display a list of errors without the need of a slot
25
+ */
26
+ errors: {
27
+ type: PropType<string[]>;
28
+ required: false;
29
+ };
15
30
  /** Error message to display. If you need a list of errors, use the slot instead */
16
31
  noHtmlErrorText: StringConstructor;
17
32
  }>> & Readonly<{}>, {
@@ -29,7 +29,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
29
29
  type: BooleanConstructor;
30
30
  default: boolean;
31
31
  };
32
- /** Display a label on top of the element. */
32
+ /** Display a label on top of the element. Handy if you only need to pass a string. If you need more, use the VJoyLabel. */
33
33
  label: StringConstructor;
34
34
  /** Overrides the default label size. See JoyLabel stories */
35
35
  labelSize: {
@@ -104,7 +104,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
104
104
  type: BooleanConstructor;
105
105
  default: boolean;
106
106
  };
107
- /** Display a label on top of the element. */
107
+ /** Display a label on top of the element. Handy if you only need to pass a string. If you need more, use the VJoyLabel. */
108
108
  label: StringConstructor;
109
109
  /** Overrides the default label size. See JoyLabel stories */
110
110
  labelSize: {
@@ -163,10 +163,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
163
163
  clearable: boolean;
164
164
  readonly: boolean;
165
165
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<{
166
- /** Default slot to display a label on top of the element. You can use label property as well */
166
+ /** DEPRECATED. Default slot to display a label on top of the element. You can use label property as well */
167
167
  default?: (() => any) | undefined;
168
168
  }> & {
169
- /** Default slot to display a label on top of the element. You can use label property as well */
169
+ /** DEPRECATED. Default slot to display a label on top of the element. You can use label property as well */
170
170
  default?: (() => any) | undefined;
171
171
  }>;
172
172
  export default _default;
@@ -41,9 +41,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
41
41
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<{
42
42
  /** Label text here */
43
43
  default: () => any;
44
+ 'label-legend'?: (() => any) | undefined;
45
+ 'label-tooltip'?: (() => any) | undefined;
44
46
  }> & {
45
47
  /** Label text here */
46
48
  default: () => any;
49
+ 'label-legend'?: (() => any) | undefined;
50
+ 'label-tooltip'?: (() => any) | undefined;
47
51
  }>;
48
52
  export default _default;
49
53
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -20,6 +20,7 @@ interface MulticheckboxProps {
20
20
  /** TODO: better typings */
21
21
  value?: any[];
22
22
  required?: boolean;
23
+ /** Use VJoyLabel if you need to customize the label HTML. */
23
24
  label?: string;
24
25
  labelSize?: TJoyLabelSizes;
25
26
  optionalLabel?: string;
@@ -9,7 +9,7 @@ export declare const productTourState: {
9
9
  readonly icon?: import("@maltjoy/icons").JoyIconsId | undefined;
10
10
  readonly steps?: number | undefined;
11
11
  readonly step?: number | undefined;
12
- readonly position?: "left" | "right" | "bottom" | "top" | undefined;
12
+ readonly position?: "left" | "right" | "top" | "bottom" | undefined;
13
13
  readonly open?: boolean | undefined;
14
14
  readonly maxWidth?: number | undefined;
15
15
  readonly disableOverlay?: boolean | undefined;
@@ -42,10 +42,10 @@ export declare const productTourState: {
42
42
  "product-tour:hide": () => any;
43
43
  }, string, {
44
44
  open: boolean;
45
+ maxWidth: number;
46
+ position: "left" | "right" | "top" | "bottom";
45
47
  step: number;
46
48
  steps: number;
47
- position: "left" | "right" | "bottom" | "top";
48
- maxWidth: number;
49
49
  disableOverlay: boolean;
50
50
  spotlightPadding: number;
51
51
  closeButton: boolean;
@@ -71,16 +71,16 @@ export declare const productTourState: {
71
71
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R, args_2: import("@vue/reactivity").OnCleanup) => any : (args_0: any, args_1: any, args_2: import("@vue/reactivity").OnCleanup) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
72
72
  } & Readonly<{
73
73
  open: boolean;
74
+ maxWidth: number;
75
+ position: "left" | "right" | "top" | "bottom";
74
76
  step: number;
75
77
  steps: number;
76
- position: "left" | "right" | "bottom" | "top";
77
- maxWidth: number;
78
78
  disableOverlay: boolean;
79
79
  spotlightPadding: number;
80
80
  closeButton: boolean;
81
81
  }> & Omit<Readonly<import("./JoyProductTour.types.js").VJoyProductTourProps> & Readonly<{
82
82
  "onProduct-tour:hide"?: (() => any) | undefined;
83
- }>, "isOpen" | "hide" | "show" | ("open" | "step" | "steps" | "position" | "maxWidth" | "disableOverlay" | "spotlightPadding" | "closeButton")> & import("vue").ShallowUnwrapRef<{
83
+ }>, "isOpen" | "hide" | "show" | ("open" | "maxWidth" | "position" | "step" | "steps" | "disableOverlay" | "spotlightPadding" | "closeButton")> & import("vue").ShallowUnwrapRef<{
84
84
  hide: () => void;
85
85
  show: () => void;
86
86
  isOpen: import("vue").Ref<boolean, boolean>;
@@ -93,7 +93,7 @@ export declare const productTourState: {
93
93
  readonly icon?: import("@maltjoy/icons").JoyIconsId | undefined;
94
94
  readonly steps?: number | undefined;
95
95
  readonly step?: number | undefined;
96
- readonly position?: "left" | "right" | "bottom" | "top" | undefined;
96
+ readonly position?: "left" | "right" | "top" | "bottom" | undefined;
97
97
  readonly open?: boolean | undefined;
98
98
  readonly maxWidth?: number | undefined;
99
99
  readonly disableOverlay?: boolean | undefined;
@@ -126,10 +126,10 @@ export declare const productTourState: {
126
126
  "product-tour:hide": () => any;
127
127
  }, string, {
128
128
  open: boolean;
129
+ maxWidth: number;
130
+ position: "left" | "right" | "top" | "bottom";
129
131
  step: number;
130
132
  steps: number;
131
- position: "left" | "right" | "bottom" | "top";
132
- maxWidth: number;
133
133
  disableOverlay: boolean;
134
134
  spotlightPadding: number;
135
135
  closeButton: boolean;
@@ -155,16 +155,16 @@ export declare const productTourState: {
155
155
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R, args_2: import("@vue/reactivity").OnCleanup) => any : (args_0: any, args_1: any, args_2: import("@vue/reactivity").OnCleanup) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
156
156
  } & Readonly<{
157
157
  open: boolean;
158
+ maxWidth: number;
159
+ position: "left" | "right" | "top" | "bottom";
158
160
  step: number;
159
161
  steps: number;
160
- position: "left" | "right" | "bottom" | "top";
161
- maxWidth: number;
162
162
  disableOverlay: boolean;
163
163
  spotlightPadding: number;
164
164
  closeButton: boolean;
165
165
  }> & Omit<Readonly<import("./JoyProductTour.types.js").VJoyProductTourProps> & Readonly<{
166
166
  "onProduct-tour:hide"?: (() => any) | undefined;
167
- }>, "isOpen" | "hide" | "show" | ("open" | "step" | "steps" | "position" | "maxWidth" | "disableOverlay" | "spotlightPadding" | "closeButton")> & import("vue").ShallowUnwrapRef<{
167
+ }>, "isOpen" | "hide" | "show" | ("open" | "maxWidth" | "position" | "step" | "steps" | "disableOverlay" | "spotlightPadding" | "closeButton")> & import("vue").ShallowUnwrapRef<{
168
168
  hide: () => void;
169
169
  show: () => void;
170
170
  isOpen: import("vue").Ref<boolean, boolean>;
@@ -11,10 +11,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<VJ
11
11
  "onProduct-tour:hide"?: (() => any) | undefined;
12
12
  }>, {
13
13
  open: boolean;
14
+ maxWidth: number;
15
+ position: "left" | "right" | "top" | "bottom";
14
16
  step: number;
15
17
  steps: number;
16
- position: "left" | "right" | "bottom" | "top";
17
- maxWidth: number;
18
18
  disableOverlay: boolean;
19
19
  spotlightPadding: number;
20
20
  closeButton: boolean;
@@ -7,7 +7,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
7
7
  readonly icon?: import("@maltjoy/icons").JoyIconsId | undefined;
8
8
  readonly steps?: number | undefined;
9
9
  readonly step?: number | undefined;
10
- readonly position?: "left" | "right" | "bottom" | "top" | undefined;
10
+ readonly position?: "left" | "right" | "top" | "bottom" | undefined;
11
11
  readonly open?: boolean | undefined;
12
12
  readonly maxWidth?: number | undefined;
13
13
  readonly disableOverlay?: boolean | undefined;
@@ -84,7 +84,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
84
84
  readonly icon?: import("@maltjoy/icons").JoyIconsId | undefined;
85
85
  readonly steps?: number | undefined;
86
86
  readonly step?: number | undefined;
87
- readonly position?: "left" | "right" | "bottom" | "top" | undefined;
87
+ readonly position?: "left" | "right" | "top" | "bottom" | undefined;
88
88
  readonly open?: boolean | undefined;
89
89
  readonly maxWidth?: number | undefined;
90
90
  readonly disableOverlay?: boolean | undefined;
@@ -24,6 +24,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
24
24
  type: BooleanConstructor;
25
25
  default: boolean;
26
26
  };
27
+ /** Display a label on top of the element. Handy if you only need to pass a string. If you need more, use the VJoyLabel. */
27
28
  label: StringConstructor;
28
29
  labelSize: {
29
30
  type: PropType<TJoyLabelSizes>;
@@ -69,6 +70,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
69
70
  type: BooleanConstructor;
70
71
  default: boolean;
71
72
  };
73
+ /** Display a label on top of the element. Handy if you only need to pass a string. If you need more, use the VJoyLabel. */
72
74
  label: StringConstructor;
73
75
  labelSize: {
74
76
  type: PropType<TJoyLabelSizes>;
@@ -101,14 +103,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
101
103
  default(): VNode<import("vue").RendererNode, import("vue").RendererElement, {
102
104
  [key: string]: any;
103
105
  }>[];
104
- /** Label above the select */
106
+ /** DEPRECATED. Label above the select. You can use a simple text node or the VJoyLabel component. */
105
107
  'select-label'?: (() => any) | undefined;
106
108
  }> & {
107
109
  /** Use native <option> tags here */
108
110
  default(): VNode<import("vue").RendererNode, import("vue").RendererElement, {
109
111
  [key: string]: any;
110
112
  }>[];
111
- /** Label above the select */
113
+ /** DEPRECATED. Label above the select. You can use a simple text node or the VJoyLabel component. */
112
114
  'select-label'?: (() => any) | undefined;
113
115
  }>;
114
116
  export default _default;
@@ -16,14 +16,14 @@ declare const _default: <T extends string>(__VLS_props: {
16
16
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
17
17
  attrs: any;
18
18
  slots: Readonly<{
19
- /** Label of the component */
19
+ /** DEPRECATED. Label of the component. Use VJoyLabel */
20
20
  default?: (() => any) | undefined;
21
21
  /** Customize the inner content of each VJoyTag */
22
22
  tag?: ((tag: {
23
23
  name: T;
24
24
  }) => any) | undefined;
25
25
  }> & {
26
- /** Label of the component */
26
+ /** DEPRECATED. Label of the component. Use VJoyLabel */
27
27
  default?: (() => any) | undefined;
28
28
  /** Customize the inner content of each VJoyTag */
29
29
  tag?: ((tag: {
@@ -57,14 +57,14 @@ declare const _default: <T extends string>(__VLS_props: {
57
57
  }>): void;
58
58
  attrs: any;
59
59
  slots: Readonly<{
60
- /** Label of the component */
60
+ /** DEPRECATED. Label of the component. Use VJoyLabel */
61
61
  default?: (() => any) | undefined;
62
62
  /** Customize the inner content of each VJoyTag */
63
63
  tag?: ((tag: {
64
64
  name: T;
65
65
  }) => any) | undefined;
66
66
  }> & {
67
- /** Label of the component */
67
+ /** DEPRECATED. Label of the component. Use VJoyLabel */
68
68
  default?: (() => any) | undefined;
69
69
  /** Customize the inner content of each VJoyTag */
70
70
  tag?: ((tag: {
@@ -98,14 +98,14 @@ declare const _default: <T extends string>(__VLS_props: {
98
98
  }>): void;
99
99
  attrs: any;
100
100
  slots: Readonly<{
101
- /** Label of the component */
101
+ /** DEPRECATED. Label of the component. Use VJoyLabel */
102
102
  default?: (() => any) | undefined;
103
103
  /** Customize the inner content of each VJoyTag */
104
104
  tag?: ((tag: {
105
105
  name: T;
106
106
  }) => any) | undefined;
107
107
  }> & {
108
- /** Label of the component */
108
+ /** DEPRECATED. Label of the component. Use VJoyLabel */
109
109
  default?: (() => any) | undefined;
110
110
  /** Customize the inner content of each VJoyTag */
111
111
  tag?: ((tag: {
@@ -1,3 +1,4 @@
1
1
  import { PRIMARY_FONT_SIZES, SECONDARY_FONT_SIZES, PRIMARY_FONT_SIZES_BOLD, FontsFamilies } from '../../types';
2
2
  export declare const JOY_TEXT_FONT_PRESET: (string | 150 | 250 | 350 | 450 | 650 | 850)[];
3
3
  export type TJoyTextFontPreset = `${FontsFamilies.PRIMARY}-${(typeof PRIMARY_FONT_SIZES)[number]}` | `${FontsFamilies.SECONDARY}-${(typeof SECONDARY_FONT_SIZES)[number]}` | `${FontsFamilies.PRIMARY}-${(typeof PRIMARY_FONT_SIZES_BOLD)[number]}`;
4
+ export type TJoyTextTagName = 'p' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'strong';
@@ -1,9 +1,9 @@
1
1
  import { PropType } from 'vue';
2
- import { TJoyTextFontPreset } from './JoyText.types';
2
+ import { TJoyTextFontPreset, TJoyTextTagName } from './JoyText.types';
3
3
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
4
  /** Defines the tag name of the Node you want to create. By default it's a simple P tag. Lowercase only */
5
5
  tagName: {
6
- type: PropType<number | "trim" | typeof Symbol.iterator | "length" | "concat" | "slice" | "indexOf" | "lastIndexOf" | "includes" | "at" | "toString" | "link" | "search" | "small" | "sub" | "sup" | "big" | "blink" | "strike" | "charAt" | "charCodeAt" | "localeCompare" | "match" | "replace" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "substr" | "codePointAt" | "endsWith" | "normalize" | "repeat" | "startsWith" | "anchor" | "bold" | "fixed" | "fontcolor" | "fontsize" | "italics" | "padStart" | "padEnd" | "trimEnd" | "trimStart" | "trimLeft" | "trimRight" | "matchAll" | "replaceAll" | "valueOf">;
6
+ type: PropType<TJoyTextTagName>;
7
7
  default: string;
8
8
  };
9
9
  /** Choose a pre-configured set of CSS rules : font-family, font-size, line-height, font-weight. */
@@ -14,7 +14,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
14
14
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
15
  /** Defines the tag name of the Node you want to create. By default it's a simple P tag. Lowercase only */
16
16
  tagName: {
17
- type: PropType<number | "trim" | typeof Symbol.iterator | "length" | "concat" | "slice" | "indexOf" | "lastIndexOf" | "includes" | "at" | "toString" | "link" | "search" | "small" | "sub" | "sup" | "big" | "blink" | "strike" | "charAt" | "charCodeAt" | "localeCompare" | "match" | "replace" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "substr" | "codePointAt" | "endsWith" | "normalize" | "repeat" | "startsWith" | "anchor" | "bold" | "fixed" | "fontcolor" | "fontsize" | "italics" | "padStart" | "padEnd" | "trimEnd" | "trimStart" | "trimLeft" | "trimRight" | "matchAll" | "replaceAll" | "valueOf">;
17
+ type: PropType<TJoyTextTagName>;
18
18
  default: string;
19
19
  };
20
20
  /** Choose a pre-configured set of CSS rules : font-family, font-size, line-height, font-weight. */
@@ -23,7 +23,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
23
23
  default: string;
24
24
  };
25
25
  }>> & Readonly<{}>, {
26
- tagName: number | "trim" | typeof Symbol.iterator | "length" | "concat" | "slice" | "indexOf" | "lastIndexOf" | "includes" | "at" | "toString" | "link" | "search" | "small" | "sub" | "sup" | "big" | "blink" | "strike" | "charAt" | "charCodeAt" | "localeCompare" | "match" | "replace" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "substr" | "codePointAt" | "endsWith" | "normalize" | "repeat" | "startsWith" | "anchor" | "bold" | "fixed" | "fontcolor" | "fontsize" | "italics" | "padStart" | "padEnd" | "trimEnd" | "trimStart" | "trimLeft" | "trimRight" | "matchAll" | "replaceAll" | "valueOf";
26
+ tagName: TJoyTextTagName;
27
27
  preset: TJoyTextFontPreset;
28
28
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<{
29
29
  /** Main content */
@@ -23,6 +23,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
23
23
  type: BooleanConstructor;
24
24
  default: boolean;
25
25
  };
26
+ /** Use it to render a basic string label. Otherwise use VJoyLabel like the WithLabel story. */
26
27
  label: StringConstructor;
27
28
  labelSize: {
28
29
  type: PropType<TJoyLabelSizes>;
@@ -94,6 +95,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
94
95
  type: BooleanConstructor;
95
96
  default: boolean;
96
97
  };
98
+ /** Use it to render a basic string label. Otherwise use VJoyLabel like the WithLabel story. */
97
99
  label: StringConstructor;
98
100
  labelSize: {
99
101
  type: PropType<TJoyLabelSizes>;
@@ -139,10 +141,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
139
141
  };
140
142
  autogrow: boolean;
141
143
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<{
142
- /** Default slot if you need to render a custom label. */
144
+ /** DEPRECATED. Use VJoyLabel or label property. */
143
145
  default: () => any;
144
146
  }> & {
145
- /** Default slot if you need to render a custom label. */
147
+ /** DEPRECATED. Use VJoyLabel or label property. */
146
148
  default: () => any;
147
149
  }>;
148
150
  export default _default;