@maltjoy/core-vue 1.0.0-beta.2 → 1.0.0-beta.3

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/README.md CHANGED
@@ -15,3 +15,5 @@ Then import the CSS :
15
15
  ```css
16
16
  @use '@maltjoy/themes/dist/themes/default.css';
17
17
  ```
18
+
19
+
@@ -0,0 +1,2 @@
1
+ export declare const VARIANTS: readonly ["info", "gray", "green", "orange", "red", "teal", "turquoise", "pink", "dark-blue", "yellow"];
2
+ export type VariantsTypes = (typeof VARIANTS)[number];
@@ -0,0 +1,43 @@
1
+ import { PropType } from 'vue';
2
+ import { VariantsTypes } from './JoyBadge.types';
3
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
4
+ /**
5
+ * Use label or slot in order to inject the text.
6
+ */
7
+ label: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ /**
12
+ * Color of the badge. Override the color with `--badge-bg-color` and `--badge-circle-color` if needed
13
+ */
14
+ variant: {
15
+ type: PropType<"info" | "gray" | "green" | "orange" | "red" | "teal" | "turquoise" | "dark-blue" | "pink" | "yellow">;
16
+ validator(variant: VariantsTypes): boolean;
17
+ };
18
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
+ /**
20
+ * Use label or slot in order to inject the text.
21
+ */
22
+ label: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ /**
27
+ * Color of the badge. Override the color with `--badge-bg-color` and `--badge-circle-color` if needed
28
+ */
29
+ variant: {
30
+ type: PropType<"info" | "gray" | "green" | "orange" | "red" | "teal" | "turquoise" | "dark-blue" | "pink" | "yellow">;
31
+ validator(variant: VariantsTypes): boolean;
32
+ };
33
+ }>>, {
34
+ label: string;
35
+ }>, {
36
+ default: (_: {}) => any;
37
+ }>;
38
+ export default _default;
39
+ type __VLS_WithTemplateSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -58,8 +58,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
58
58
  };
59
59
  }>>, {
60
60
  circle: boolean;
61
- loading: boolean;
62
61
  variant: "main" | "ghost" | "secondary" | "primary" | "admin";
62
+ loading: boolean;
63
63
  size: ButtonSizes;
64
64
  }>, {
65
65
  default: (_: {}) => any;
@@ -4,6 +4,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
4
4
  type: BooleanConstructor;
5
5
  default: boolean;
6
6
  };
7
+ /**
8
+ * Internal purpose in order to prevent double focus mark on selectable-item
9
+ * @internal
10
+ */
11
+ displayFocus: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
7
15
  /** Use it to replace the default slot */
8
16
  label: {
9
17
  type: StringConstructor;
@@ -37,12 +45,24 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
37
45
  isIndeterminate: import("vue").Ref<boolean>;
38
46
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
39
47
  "update:checked": (value: boolean) => void;
48
+ } & {
49
+ focus: () => void;
50
+ } & {
51
+ blur: () => void;
40
52
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
41
53
  /** Can't be used in addition of v-model. See usage : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes */
42
54
  indeterminate: {
43
55
  type: BooleanConstructor;
44
56
  default: boolean;
45
57
  };
58
+ /**
59
+ * Internal purpose in order to prevent double focus mark on selectable-item
60
+ * @internal
61
+ */
62
+ displayFocus: {
63
+ type: BooleanConstructor;
64
+ default: boolean;
65
+ };
46
66
  /** Use it to replace the default slot */
47
67
  label: {
48
68
  type: StringConstructor;
@@ -73,11 +93,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
73
93
  default: boolean;
74
94
  };
75
95
  }>> & {
96
+ onFocus?: (() => any) | undefined;
97
+ onBlur?: (() => any) | undefined;
76
98
  "onUpdate:checked"?: ((value: boolean) => any) | undefined;
77
99
  }, {
78
100
  checked: boolean;
79
101
  disabled: boolean;
80
102
  indeterminate: boolean;
103
+ displayFocus: boolean;
81
104
  value: string;
82
105
  required: boolean;
83
106
  }>, {
@@ -1,4 +1,4 @@
1
1
  export declare const DROPDOWN_DIRECTIONS: readonly ["up", "down"];
2
- export type DropdownDirections = typeof DROPDOWN_DIRECTIONS[number];
2
+ export type DropdownDirections = (typeof DROPDOWN_DIRECTIONS)[number];
3
3
  export declare const DROPDOWN_JUSTIFY: readonly ["left", "right"];
4
- export type DropdownJustify = typeof DROPDOWN_JUSTIFY[number];
4
+ export type DropdownJustify = (typeof DROPDOWN_JUSTIFY)[number];
@@ -1,3 +1,3 @@
1
- import { SIZES } from "@/types";
1
+ import { SIZES } from '@/types';
2
2
  export type DropdownListSizes = Extract<(typeof SIZES)[number], 'small' | 'medium'>;
3
3
  export declare const DROPDOWNLIST_SIZES: DropdownListSizes[];
@@ -1,3 +1,3 @@
1
1
  import { LEVELS } from '@/types';
2
2
  export type HighlightLevels = (typeof LEVELS)[number];
3
- export declare const HIGHLIGHT_LEVELS: ("error" | "neutral" | "success" | "info" | "warning")[];
3
+ export declare const HIGHLIGHT_LEVELS: ("info" | "error" | "neutral" | "success" | "warning")[];
@@ -11,7 +11,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
11
11
  };
12
12
  icon: StringConstructor;
13
13
  level: {
14
- type: PropType<"error" | "neutral" | "success" | "info" | "warning">;
14
+ type: PropType<"info" | "error" | "neutral" | "success" | "warning">;
15
15
  default: string;
16
16
  validator(level: HighlightLevels): boolean;
17
17
  };
@@ -28,14 +28,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
28
28
  };
29
29
  icon: StringConstructor;
30
30
  level: {
31
- type: PropType<"error" | "neutral" | "success" | "info" | "warning">;
31
+ type: PropType<"info" | "error" | "neutral" | "success" | "warning">;
32
32
  default: string;
33
33
  validator(level: HighlightLevels): boolean;
34
34
  };
35
35
  }>>, {
36
36
  accent: boolean;
37
37
  displayIcon: boolean;
38
- level: "error" | "neutral" | "success" | "info" | "warning";
38
+ level: "info" | "error" | "neutral" | "success" | "warning";
39
39
  }>, {
40
40
  'highlight-title': (_: {}) => any;
41
41
  default: (_: {}) => any;
@@ -1,3 +1,4 @@
1
+ import VJoyBadge from '@/components/JoyBadge/VJoyBadge.vue';
1
2
  import VJoyButton from '@/components/JoyButton/VJoyButton.vue';
2
3
  import VJoyCheckbox from '@/components/JoyCheckbox/VJoyCheckbox.vue';
3
4
  import VJoyCounter from '@/components/JoyCounter/VJoyCounter.vue';
@@ -21,4 +22,4 @@ import VJoyWrapper from '@/components/JoyWrapper/VJoyWrapper.vue';
21
22
  import VJoyTemplate from '@/components/JoyTemplate/VJoyTemplate.vue';
22
23
  import VJoyTextarea from '@/components/JoyTextarea/VJoyTextarea.vue';
23
24
  import VJoyToggle from '@/components/JoyToggle/VJoyToggle.vue';
24
- export { VJoyButton, VJoyCheckbox, VJoyCounter, VJoyDropdown, VJoyDropdownList, VJoyFormError, VJoyHighlight, VJoyInput, VJoyLabel, VJoyLink, VJoyMultiCheckbox, VJoyPanel, VJoyPanelSection, VJoyRadio, VJoyRadioGroup, VJoySelect, VJoySelectableItem, VJoySelectableItemGroup, VJoySpinner, VJoyTemplate, VJoyTextarea, VJoyToggle, VJoyWrapper, };
25
+ export { VJoyBadge, VJoyButton, VJoyCheckbox, VJoyCounter, VJoyDropdown, VJoyDropdownList, VJoyFormError, VJoyHighlight, VJoyInput, VJoyLabel, VJoyLink, VJoyMultiCheckbox, VJoyPanel, VJoyPanelSection, VJoyRadio, VJoyRadioGroup, VJoySelect, VJoySelectableItem, VJoySelectableItemGroup, VJoySpinner, VJoyTemplate, VJoyTextarea, VJoyToggle, VJoyWrapper, };