@maltjoy/core-vue 5.14.0-alpha.0 → 5.15.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 maltcommunity / apps
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -2,5 +2,5 @@ import { TGenericVariants, TPositions, TSizes } from '../../types';
2
2
  export type TJoyDefaultButtonVariants = TGenericVariants | 'main' | 'admin' | 'ghost';
3
3
  export type TJoyAIButtonVariants = `${TJoyDefaultButtonVariants}-ai`;
4
4
  export type TJoyButtonVariants = TJoyDefaultButtonVariants | Exclude<TJoyAIButtonVariants, 'admin-ai'>;
5
- export type TJoyButtonSizes = Exclude<TSizes, 'xlarge'>;
5
+ export type TJoyButtonSizes = Extract<TSizes, 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large'>;
6
6
  export type TJoyButtonIconPositions = TPositions;
@@ -0,0 +1,13 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<{
2
+ /** Use it to render the content of the form group. Most of the time JoyLabel, any form component, and JoyFormError. */
3
+ default?: (() => any) | undefined;
4
+ }> & {
5
+ /** Use it to render the content of the form group. Most of the time JoyLabel, any form component, and JoyFormError. */
6
+ default?: (() => any) | undefined;
7
+ }>;
8
+ export default _default;
9
+ type __VLS_WithTemplateSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -1,5 +1,5 @@
1
1
  import type { JoyIconsId } from '@maltjoy/icons';
2
2
  import { TSizes, TLevels } from '../../types';
3
3
  export type TJoyIconsColors = TLevels | 'neutral-50' | 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'brand-primary' | 'brand-secondary' | 'white';
4
- export type TJoyIconSizes = TSizes;
4
+ export type TJoyIconSizes = Extract<TSizes, 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'>;
5
5
  export type TJoyIconsNames = JoyIconsId;
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- import { TJoyIconsColors } from './JoyIcon.types';
2
+ import { TJoyIconsColors, TJoyIconSizes } from './JoyIcon.types';
3
3
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
4
  ariaLabel: {
5
5
  type: StringConstructor;
@@ -24,7 +24,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
24
24
  };
25
25
  /** Use `TJoyIconSizes` */
26
26
  size: {
27
- type: PropType<import("../../types").TSizes>;
27
+ type: PropType<TJoyIconSizes>;
28
28
  default: string;
29
29
  };
30
30
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -51,12 +51,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
51
51
  };
52
52
  /** Use `TJoyIconSizes` */
53
53
  size: {
54
- type: PropType<import("../../types").TSizes>;
54
+ type: PropType<TJoyIconSizes>;
55
55
  default: string;
56
56
  };
57
57
  }>> & Readonly<{}>, {
58
58
  color: TJoyIconsColors;
59
59
  tabIndex: number;
60
- size: import("../../types").TSizes;
60
+ size: TJoyIconSizes;
61
61
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
62
62
  export default _default;
@@ -24,6 +24,10 @@ export interface VJoyInputProps {
24
24
  /** Add a JoyIcon / joy-icon with given name on left-side. */
25
25
  icon?: TJoyIconsNames;
26
26
  size?: TJoyInputSizes;
27
+ /**
28
+ * @deprecated Password mode is deprecated on VJoyInput.
29
+ * Use VJoyInputPassword for password fields and toggle behavior.
30
+ */
27
31
  type?: string;
28
32
  /** Adds a legend like symbol on the right of the component. Made for number based values */
29
33
  unit?: string;
@@ -13,7 +13,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<VJ
13
13
  required: boolean;
14
14
  disabled: boolean;
15
15
  autofocus: boolean;
16
- labelSize: import("../components.types.js").TJoyLabelSizes;
16
+ labelSize: import("../JoyLabel/JoyLabel.types").TJoyLabelSizes;
17
17
  requiredMark: boolean;
18
18
  modelModifiers: Partial<Record<"number" | "trim" | "lazy", boolean>>;
19
19
  clearable: boolean;
@@ -22,9 +22,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<VJ
22
22
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, Readonly<{
23
23
  /** DEPRECATED. Default slot to display a label on top of the element. You can use label property as well */
24
24
  default?: (() => any) | undefined;
25
+ /** Slot used to inject a custom action on the right side of the input wrapper. */
26
+ 'right-action'?: (() => any) | undefined;
25
27
  }> & {
26
28
  /** DEPRECATED. Default slot to display a label on top of the element. You can use label property as well */
27
29
  default?: (() => any) | undefined;
30
+ /** Slot used to inject a custom action on the right side of the input wrapper. */
31
+ 'right-action'?: (() => any) | undefined;
28
32
  }>;
29
33
  export default _default;
30
34
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -0,0 +1,31 @@
1
+ import type { VJoyInputProps } from '../JoyInput/JoyInput.types';
2
+ type VJoyInputPasswordProps = Omit<VJoyInputProps, 'type' | 'clearable' | 'clearAriaLabel' | 'readonly'>;
3
+ declare function focus(): void;
4
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<VJoyInputPasswordProps, {
5
+ focus: typeof focus;
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:modelValue": (value: string) => any;
8
+ }, string, import("vue").PublicProps, Readonly<VJoyInputPasswordProps> & Readonly<{
9
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
10
+ }>, {
11
+ invalid: boolean;
12
+ name: string;
13
+ required: boolean;
14
+ disabled: boolean;
15
+ autofocus: boolean;
16
+ labelSize: import("../components.types.js").TJoyLabelSizes;
17
+ requiredMark: boolean;
18
+ modelModifiers: Partial<Record<"number" | "trim" | "lazy", boolean>>;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, Readonly<{
20
+ /** Slot used to inject password requirements. Use VJoyPasswordRequirement component to display the requirements. */
21
+ 'password-requirements'?: (() => any) | undefined;
22
+ }> & {
23
+ /** Slot used to inject password requirements. Use VJoyPasswordRequirement component to display the requirements. */
24
+ 'password-requirements'?: (() => any) | undefined;
25
+ }>;
26
+ export default _default;
27
+ type __VLS_WithTemplateSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -1,2 +1,3 @@
1
1
  import { TSizes } from '@/types';
2
2
  export type TJoyLabelSizes = Extract<TSizes, 'small' | 'medium' | 'large'>;
3
+ export declare const JoyFormElementContext = "JoyFormElementContext";
@@ -0,0 +1,7 @@
1
+ import type { TLevels } from '../../types';
2
+ /**
3
+ * - neutral : The password field is focused but not this rule is not valid
4
+ * - valid : This rule is valid
5
+ * - invalid : This field is not focused and this rule is invalid
6
+ */
7
+ export type TVJoyPasswordRequirementStatus = Extract<TLevels, 'success' | 'error' | 'neutral'>;
@@ -0,0 +1,13 @@
1
+ import type { TVJoyPasswordRequirementStatus } from './JoyPasswordRequirement.types';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ /** Label of the password strength rule */
4
+ label: string;
5
+ /** Status of the password requirement */
6
+ status?: TVJoyPasswordRequirementStatus | undefined;
7
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
8
+ /** Label of the password strength rule */
9
+ label: string;
10
+ /** Status of the password requirement */
11
+ status?: TVJoyPasswordRequirementStatus | undefined;
12
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -21,6 +21,7 @@ export * from './JoyLink/JoyLink.types';
21
21
  export * from './JoyMenu/JoyMenu.types';
22
22
  export * from './JoyMenuItem/JoyMenuItem.types';
23
23
  export * from './JoyPanel/JoyPanel.types';
24
+ export * from './JoyPasswordRequirement/JoyPasswordRequirement.types';
24
25
  export * from './JoyProgressBar/JoyProgressBar.types';
25
26
  export * from './JoyProductTour/JoyProductTour.types';
26
27
  export * from './JoyRadio/JoyRadio.types';
@@ -24,6 +24,7 @@ import { default as VJoyFilterBar } from './JoyFilterBar/VJoyFilterBar.vue';
24
24
  import { default as VJoyFilterBarButton } from './JoyFilterBarButton/VJoyFilterBarButton.vue';
25
25
  import { default as VJoyFormError } from './JoyFormError/VJoyFormError.vue';
26
26
  import { default as VJoyFormFieldSkeleton } from './JoyFormFieldSkeleton/VJoyFormFieldSkeleton.vue';
27
+ import { default as VJoyFormGroup } from './JoyFormGroup/VJoyFormGroup.vue';
27
28
  import { default as VJoyFunnel } from './JoyFunnel/VJoyFunnel.vue';
28
29
  import { default as VJoyFunnelFooter } from './JoyFunnelFooter/VJoyFunnelFooter.vue';
29
30
  import { default as VJoyFunnelHeader } from './JoyFunnelHeader/VJoyFunnelHeader.vue';
@@ -33,6 +34,7 @@ import { default as VJoyIndicator } from './JoyIndicator/VJoyIndicator.vue';
33
34
  import { default as VJoyIndicators } from './JoyIndicators/VJoyIndicators.vue';
34
35
  import { default as VJoyInput } from './JoyInput/VJoyInput.vue';
35
36
  import { default as VJoyInputDigit } from './JoyInputDigit/VJoyInputDigit.vue';
37
+ import { default as VJoyInputPassword } from './JoyInputPassword/VJoyInputPassword.vue';
36
38
  import { default as VJoyLabel } from './JoyLabel/VJoyLabel.vue';
37
39
  import { default as VJoyLink } from './JoyLink/VJoyLink.vue';
38
40
  import { default as VJoyListItem } from './JoyListItem/VJoyListItem.vue';
@@ -42,6 +44,7 @@ import { default as VJoyMultiCheckbox } from './JoyMultiCheckbox/VJoyMultiCheckb
42
44
  import { default as VJoyPagination } from './JoyPagination/VJoyPagination.vue';
43
45
  import { default as VJoyPanel } from './JoyPanel/VJoyPanel.vue';
44
46
  import { default as VJoyPanelSection } from './JoyPanelSection/VJoyPanelSection.vue';
47
+ import { default as VJoyPasswordRequirement } from './JoyPasswordRequirement/VJoyPasswordRequirement.vue';
45
48
  import { default as VJoyProductTour } from './JoyProductTour/VJoyProductTour.vue';
46
49
  import { default as VJoyProductTourTrigger } from './JoyProductTourTrigger/VJoyProductTourTrigger.vue';
47
50
  import { default as VJoyProgressBar } from './JoyProgressBar/VJoyProgressBar.vue';
@@ -73,4 +76,4 @@ import { default as VJoyUserCard } from './JoyUserCard/VJoyUserCard.vue';
73
76
  import { default as VJoyWalkthrough } from './JoyWalkthrough/VJoyWalkthrough.vue';
74
77
  import { default as VJoyWalkthroughTrigger } from './JoyWalkthroughTrigger/VJoyWalkthroughTrigger.vue';
75
78
  import { default as VJoyWrapper } from './JoyWrapper/VJoyWrapper.vue';
76
- export { VJoyAdminBanner, VJoyAvailability, VJoyAvatar, VJoyAvatarsList, VJoyBadge, VJoyBadgeLevel, VJoyBlockSkeleton, VJoyBottomSheet, VJoyBottomSheetTrigger, VJoyButton, VJoyCheckbox, VJoyCollapse, VJoyCollapseItem, VJoyCompanyAvatar, VJoyDialog, VJoyDialogTrigger, VJoyDot, VJoyDrawer, VJoyDrawerTrigger, VJoyDropdown, VJoyDropdownList, VJoyDropzone, VJoyFilterBar, VJoyFilterBarButton, VJoyFormError, VJoyFormFieldSkeleton, VJoyFunnel, VJoyFunnelFooter, VJoyFunnelHeader, VJoyHighlight, VJoyIcon, VJoyIndicator, VJoyIndicators, VJoyInput, VJoyInputDigit, VJoyLabel, VJoyLink, VJoyListItem, VJoyMenu, VJoyMenuItem, VJoyMultiCheckbox, VJoyPagination, VJoyPanel, VJoyPanelSection, VJoyProductTour, VJoyProductTourTrigger, VJoyProgressBar, VJoyRadio, VJoyRadioGroup, VJoyRatingStars, VJoyScreenLoader, VJoySelect, VJoySelectableItem, VJoySelectableItemGroup, VJoySeparator, VJoySnackbar, VJoySpinner, VJoyStep, VJoyStepper, VJoyTab, VJoyTabs, VJoyTag, VJoyTagsInput, VJoyTagsList, VJoyTemplate, VJoyTemplateShape, VJoyText, VJoyTextarea, VJoyTitleBrand, VJoyToggle, VJoyTooltip, VJoyUserCard, VJoyWalkthrough, VJoyWalkthroughTrigger, VJoyWrapper, };
79
+ export { VJoyAdminBanner, VJoyAvailability, VJoyAvatar, VJoyAvatarsList, VJoyBadge, VJoyBadgeLevel, VJoyBlockSkeleton, VJoyBottomSheet, VJoyBottomSheetTrigger, VJoyButton, VJoyCheckbox, VJoyCollapse, VJoyCollapseItem, VJoyCompanyAvatar, VJoyDialog, VJoyDialogTrigger, VJoyDot, VJoyDrawer, VJoyDrawerTrigger, VJoyDropdown, VJoyDropdownList, VJoyDropzone, VJoyFilterBar, VJoyFilterBarButton, VJoyFormError, VJoyFormFieldSkeleton, VJoyFormGroup, VJoyFunnel, VJoyFunnelFooter, VJoyFunnelHeader, VJoyHighlight, VJoyIcon, VJoyIndicator, VJoyIndicators, VJoyInput, VJoyInputDigit, VJoyInputPassword, VJoyLabel, VJoyLink, VJoyListItem, VJoyMenu, VJoyMenuItem, VJoyMultiCheckbox, VJoyPagination, VJoyPanel, VJoyPanelSection, VJoyPasswordRequirement, VJoyProductTour, VJoyProductTourTrigger, VJoyProgressBar, VJoyRadio, VJoyRadioGroup, VJoyRatingStars, VJoyScreenLoader, VJoySelect, VJoySelectableItem, VJoySelectableItemGroup, VJoySeparator, VJoySnackbar, VJoySpinner, VJoyStep, VJoyStepper, VJoyTab, VJoyTabs, VJoyTag, VJoyTagsInput, VJoyTagsList, VJoyTemplate, VJoyTemplateShape, VJoyText, VJoyTextarea, VJoyTitleBrand, VJoyToggle, VJoyTooltip, VJoyUserCard, VJoyWalkthrough, VJoyWalkthroughTrigger, VJoyWrapper, };