@maltjoy/core-vue 5.4.0 → 5.5.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.
@@ -1,5 +1,5 @@
1
1
  import { TJoyAvatarSizes } from './JoyAvatar.types';
2
- declare const _default: import("vue").DefineComponent<{
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
3
3
  size?: TJoyAvatarSizes | undefined;
4
4
  /** Display the initials based on Firstname and Lastname */
5
5
  fullName?: string | undefined;
@@ -56,5 +56,16 @@ declare const _default: import("vue").DefineComponent<{
56
56
  square: boolean;
57
57
  placeholder: import("@maltjoy/icons").JoyIconsId;
58
58
  showLetters: boolean;
59
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
59
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, Readonly<{
60
+ /** Inject the image here. Use any Nuxt or custom wrapper to better handle performances. */
61
+ default(): any;
62
+ }> & {
63
+ /** Inject the image here. Use any Nuxt or custom wrapper to better handle performances. */
64
+ default(): any;
65
+ }>;
60
66
  export default _default;
67
+ type __VLS_WithTemplateSlots<T, S> = T & {
68
+ new (): {
69
+ $slots: S;
70
+ };
71
+ };
@@ -1,2 +1,32 @@
1
1
  import { TSizes } from '../../types';
2
+ import { TJoyIconsNames } from '../JoyIcon/JoyIcon.types';
3
+ import { TJoyLabelSizes } from '../JoyLabel/JoyLabel.types';
2
4
  export type TJoyInputSizes = Extract<TSizes, 'small' | 'medium' | 'large'>;
5
+ export interface VJoyInputProps {
6
+ autofocus?: boolean;
7
+ modelValue?: string | number | null;
8
+ disabled?: boolean;
9
+ id?: string;
10
+ invalid?: boolean;
11
+ name: string;
12
+ required?: boolean;
13
+ /** Display a label on top of the element. Handy if you only need to pass a string. If you need more, use the VJoyLabel. */
14
+ label?: string;
15
+ /** Overrides the default label size. See JoyLabel stories */
16
+ labelSize?: TJoyLabelSizes;
17
+ /** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
18
+ optionalLabel?: string;
19
+ /** Depending on context, we can add a "*" after the label to specify it's mandatory. */
20
+ requiredMark?: boolean;
21
+ modelModifiers?: Partial<Record<'number' | 'trim' | 'lazy', boolean>>;
22
+ /** Display a cross icon on the right that enables to clear the field */
23
+ clearable?: boolean;
24
+ /** Add a JoyIcon / joy-icon with given name on left-side. */
25
+ icon?: TJoyIconsNames;
26
+ size?: TJoyInputSizes;
27
+ type?: string;
28
+ /** Adds a legend like symbol on the right of the component. Made for number based values */
29
+ unit?: string;
30
+ /** Activates the readonly mode for the input */
31
+ readonly?: boolean;
32
+ }
@@ -1,34 +1,4 @@
1
- import { TJoyIconsNames } from '../JoyIcon/JoyIcon.types';
2
- import { TJoyInputSizes } from './JoyInput.types';
3
- import { TJoyLabelSizes } from '../JoyLabel/JoyLabel.types';
4
- export interface VJoyInputProps {
5
- autofocus?: boolean;
6
- modelValue?: string | number | null;
7
- disabled?: boolean;
8
- id?: string;
9
- invalid?: boolean;
10
- name: string;
11
- required?: boolean;
12
- /** Display a label on top of the element. Handy if you only need to pass a string. If you need more, use the VJoyLabel. */
13
- label?: string;
14
- /** Overrides the default label size. See JoyLabel stories */
15
- labelSize?: TJoyLabelSizes;
16
- /** If your component is not required, we can add a label to explicitely tell that it's not mandatory */
17
- optionalLabel?: string;
18
- /** Depending on context, we can add a "*" after the label to specify it's mandatory. */
19
- requiredMark?: boolean;
20
- modelModifiers?: Partial<Record<'number' | 'trim' | 'lazy', boolean>>;
21
- /** Display a cross icon on the right that enables to clear the field */
22
- clearable?: boolean;
23
- /** Add a JoyIcon / joy-icon with given name on left-side. */
24
- icon?: TJoyIconsNames;
25
- size?: TJoyInputSizes;
26
- type?: string;
27
- /** Adds a legend like symbol on the right of the component. Made for number based values */
28
- unit?: string;
29
- /** Activates the readonly mode for the input */
30
- readonly?: boolean;
31
- }
1
+ import { VJoyInputProps } from './JoyInput.types';
32
2
  declare function focus(): void;
33
3
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<VJoyInputProps, {
34
4
  focus: typeof focus;
@@ -39,11 +9,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<VJ
39
9
  }>, {
40
10
  invalid: boolean;
41
11
  type: string;
42
- size: TJoyInputSizes;
12
+ size: import("./JoyInput.types").TJoyInputSizes;
43
13
  required: boolean;
44
14
  disabled: boolean;
45
15
  autofocus: boolean;
46
- labelSize: TJoyLabelSizes;
16
+ labelSize: import("../components.types.js").TJoyLabelSizes;
47
17
  requiredMark: boolean;
48
18
  modelModifiers: Partial<Record<"number" | "trim" | "lazy", boolean>>;
49
19
  clearable: boolean;
package/dist/core-vue.js CHANGED
@@ -452,21 +452,24 @@ const Go = { class: "joy-admin-banner" }, Yo = { class: "joy-admin-banner__label
452
452
  color: "neutral-50",
453
453
  size: i.value
454
454
  }, null, 8, ["name", "size"])) : w("", !0),
455
- u.photoUrl ? (c(), v("img", {
456
- key: 1,
457
- src: u.photoUrl,
458
- title: u.fullName,
459
- alt: u.fullName || "",
460
- loading: u.loading
461
- }, null, 8, Qo)) : w("", !0),
462
- u.fullName && u.showLetters ? (c(), v(H, { key: 2 }, [
455
+ _(u.$slots, "default", {}, () => [
456
+ u.photoUrl ? (c(), v("img", {
457
+ key: 0,
458
+ class: "joy-avatar__img",
459
+ src: u.photoUrl,
460
+ title: u.fullName,
461
+ alt: u.fullName || "",
462
+ loading: u.loading
463
+ }, null, 8, Qo)) : w("", !0)
464
+ ], !0),
465
+ u.fullName && u.showLetters ? (c(), v(H, { key: 1 }, [
463
466
  F(J(d.value), 1)
464
467
  ], 64)) : w("", !0),
465
- u.totalNumber ? (c(), v(H, { key: 3 }, [
468
+ u.totalNumber ? (c(), v(H, { key: 2 }, [
466
469
  F(J("+" + u.totalNumber), 1)
467
470
  ], 64)) : w("", !0)
468
471
  ]),
469
- _: 1
472
+ _: 3
470
473
  }, 16, ["title", "class"])),
471
474
  u.profile === "strategy" ? (c(), v("span", en, [
472
475
  (c(), v("svg", {
@@ -484,7 +487,7 @@ const Go = { class: "joy-admin-banner" }, Yo = { class: "joy-admin-banner__label
484
487
  ])) : w("", !0)
485
488
  ], 2));
486
489
  }
487
- }), nn = /* @__PURE__ */ x(on, [["__scopeId", "data-v-f4bfc432"]]), ln = /* @__PURE__ */ B({
490
+ }), nn = /* @__PURE__ */ x(on, [["__scopeId", "data-v-d71c0a84"]]), ln = /* @__PURE__ */ B({
488
491
  __name: "VJoyAvatarsList",
489
492
  props: {
490
493
  /** Renders a compact list of avatars */
@@ -4696,7 +4699,7 @@ const Ra = ["aria-describedby"], Na = ["id"], qa = /* @__PURE__ */ B({
4696
4699
  ], 2)
4697
4700
  ], 2));
4698
4701
  }
4699
- }), uu = /* @__PURE__ */ x(er, [["__scopeId", "data-v-d68bafa2"]]), tr = { class: "joy-link__text" }, or = /* @__PURE__ */ B({
4702
+ }), uu = /* @__PURE__ */ x(er, [["__scopeId", "data-v-c233e6e6"]]), tr = { class: "joy-link__text" }, or = /* @__PURE__ */ B({
4700
4703
  __name: "VJoyLink",
4701
4704
  props: {
4702
4705
  href: {