@nmorph/nmorph-ui-kit 2.2.36 → 2.2.38
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/dist/components/basic/nmorph-button/NmorphButton.vue2.js +8 -8
- package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +3 -3
- package/dist/components/basic/nmorph-layout/NmorphLayout.vue2.js +14 -13
- package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +1 -1
- package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -0
- package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +6 -4
- package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +1 -0
- package/dist/components/basic/nmorph-space/NmorphSpace.vue2.js +15 -19
- package/dist/components/data/nmorph-avatar/NmorphAvatar.css +1 -1
- package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +5 -5
- package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +37 -36
- package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +41 -40
- package/dist/components/data/nmorph-card/NmorphCard.vue2.js +19 -15
- package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +5 -9
- package/dist/components/data/nmorph-empty/NmorphEmpty.vue.js +3 -3
- package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +17 -14
- package/dist/components/data/nmorph-image/NmorphImage.css +1 -0
- package/dist/components/data/nmorph-image/NmorphImage.vue.js +14 -12
- package/dist/components/data/nmorph-image/NmorphImage.vue2.js +3 -2
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +36 -35
- package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +1 -1
- package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +19 -18
- package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue2.js +20 -19
- package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +1 -1
- package/dist/components/data/nmorph-table/NmorphTable.vue2.js +39 -43
- package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue2.js +34 -33
- package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +1 -1
- package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +7 -6
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.css +1 -1
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue.js +25 -20
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue2.js +37 -37
- package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +22 -21
- package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +26 -25
- package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +65 -71
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.css +1 -1
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +30 -28
- package/dist/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue2.js +25 -20
- package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +43 -42
- package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +53 -40
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue.js +20 -16
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +113 -86
- package/dist/components/form/nmorph-form/NmorphForm.vue2.js +9 -9
- package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue2.js +33 -24
- package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue2.js +1 -1
- package/dist/components/form/nmorph-form/use-form-item-input.js +29 -8
- package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue2.js +42 -39
- package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +66 -62
- package/dist/components/form/nmorph-radio/NmorphRadio.css +1 -1
- package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +1 -1
- package/dist/components/form/nmorph-radio-group/NmorphRadioGroup.vue2.js +24 -22
- package/dist/components/form/nmorph-select/NmorphSelect.css +1 -1
- package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +83 -81
- package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +4 -4
- package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +28 -25
- package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue2.js +1 -1
- package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +51 -49
- package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +35 -33
- package/dist/components/form/nmorph-text-input/NmorphTextInput.css +1 -0
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +5 -3
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +37 -35
- package/dist/components/form/nmorph-textarea/NmorphTextarea.vue.js +1 -1
- package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +30 -26
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +1 -1
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +68 -66
- package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue2.js +1 -1
- package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +32 -31
- package/dist/components/navigation/nmorph-tabs/NmorphTabs.vue2.js +1 -1
- package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +1 -1
- package/dist/hooks/use-common-styles.js +18 -278
- package/dist/hooks/use-field-validation.js +71 -42
- package/dist/hooks/use-form-validation.js +62 -24
- package/dist/hooks/use-virtual-list.js +38 -32
- package/dist/index.umd.js +26 -286
- package/dist/package.json.js +1 -1
- package/dist/src/components/basic/nmorph-button/NmorphButton.vue.d.ts +2 -2
- package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-avatar/NmorphAvatar.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-empty/NmorphEmpty.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-progress/NmorphProgress.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.d.ts +1 -1
- package/dist/src/components/feedback/nmorph-callout/NmorphCallout.vue.d.ts +1 -1
- package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +4 -4
- package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +3 -3
- package/dist/src/components/form/nmorph-color-picker/NmorphColorPicker.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +3 -3
- package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +6 -3
- package/dist/src/components/form/nmorph-file-upload/types.d.ts +4 -0
- package/dist/src/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-form/types.d.ts +15 -5
- package/dist/src/components/form/nmorph-form/use-form-item-input.d.ts +10 -0
- package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-otp-input/NmorphOTPInput.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +3 -3
- package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +1 -1
- package/dist/src/hooks/use-field-validation.d.ts +15 -0
- package/dist/src/hooks/use-form-validation.d.ts +5 -0
- package/dist/src/hooks/use-virtual-list.d.ts +6 -0
- package/dist/src/types/index.d.ts +2 -1
- package/dist/src/utils/common.d.ts +5 -0
- package/dist/src/utils/create-modifiers.d.ts +4 -2
- package/dist/style.css +1 -1
- package/dist/utils/common.js +9 -3
- package/dist/utils/create-modifiers.js +6 -6
- package/package.json +1 -1
package/dist/package.json.js
CHANGED
|
@@ -17,16 +17,16 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
17
17
|
buttonDOMElement: Ref<HTMLElement, HTMLElement>;
|
|
18
18
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<INmorphProps> & Readonly<{}>, {
|
|
19
19
|
fill: boolean;
|
|
20
|
+
type: "submit" | "reset" | "button";
|
|
20
21
|
styleType: "default" | "transparent";
|
|
21
22
|
color: string;
|
|
22
23
|
loading: boolean;
|
|
23
24
|
ripple: boolean;
|
|
24
|
-
type: "submit" | "reset" | "button";
|
|
25
25
|
text: string | number;
|
|
26
26
|
accentBgOnHover: boolean;
|
|
27
27
|
shape: "default" | "square" | "round" | "circle";
|
|
28
28
|
tabindex: number;
|
|
29
|
-
height: "
|
|
29
|
+
height: "basic" | "thick" | "thin";
|
|
30
30
|
disabled: boolean;
|
|
31
31
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
32
32
|
buttonDOMElement: HTMLButtonElement;
|
|
@@ -12,8 +12,8 @@ interface INmorphProps {
|
|
|
12
12
|
iconName?: string;
|
|
13
13
|
}
|
|
14
14
|
declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<INmorphProps> & Readonly<{}>, {
|
|
15
|
-
color: string;
|
|
16
15
|
type: "error" | "accent" | "success" | "warning";
|
|
16
|
+
color: string;
|
|
17
17
|
text: string;
|
|
18
18
|
disabled: boolean;
|
|
19
19
|
target: "self" | "blank" | "parent" | "top";
|
|
@@ -22,9 +22,9 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
22
22
|
onError?: (event: Event) => any;
|
|
23
23
|
onLoad?: (event: Event) => any;
|
|
24
24
|
}>, {
|
|
25
|
+
name: string;
|
|
25
26
|
size: number;
|
|
26
27
|
shape: "square" | "circle";
|
|
27
|
-
name: string;
|
|
28
28
|
src: string | string[];
|
|
29
29
|
frameBorder: number;
|
|
30
30
|
imagePadding: number;
|
|
@@ -31,9 +31,9 @@ type NmorphBadgeValueSlotProps = {
|
|
|
31
31
|
};
|
|
32
32
|
declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<INmorphProps> & Readonly<{}>, {
|
|
33
33
|
size: NmorphBadgeSize;
|
|
34
|
+
type: NmorphBadgeType;
|
|
34
35
|
value: string | number;
|
|
35
36
|
color: string;
|
|
36
|
-
type: NmorphBadgeType;
|
|
37
37
|
disabled: boolean;
|
|
38
38
|
hidden: boolean;
|
|
39
39
|
zIndex: number;
|
|
@@ -18,7 +18,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
18
18
|
}) => any;
|
|
19
19
|
}>, {
|
|
20
20
|
block: boolean;
|
|
21
|
-
height: "
|
|
21
|
+
height: "basic" | "thick" | "thin";
|
|
22
22
|
disabled: boolean;
|
|
23
23
|
title: string;
|
|
24
24
|
transitionSpeed: string | number;
|
|
@@ -15,9 +15,9 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
15
15
|
minHeight: string | number;
|
|
16
16
|
design: NmorphElementDesignType;
|
|
17
17
|
shadowType: "inset" | "outset" | "combined" | "not-defined";
|
|
18
|
+
padding: string | number;
|
|
18
19
|
description: string;
|
|
19
20
|
iconSize: string | number;
|
|
20
|
-
padding: string | number;
|
|
21
21
|
hideIcon: boolean;
|
|
22
22
|
role: string;
|
|
23
23
|
ariaLabel: string;
|
|
@@ -15,7 +15,7 @@ declare const _default: DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentO
|
|
|
15
15
|
}, string, PublicProps, Readonly<INmorphProps> & Readonly<{
|
|
16
16
|
"onUpdate:model-value"?: (currentPage: number) => any;
|
|
17
17
|
}>, {
|
|
18
|
-
height: "
|
|
18
|
+
height: "basic" | "thick" | "thin";
|
|
19
19
|
disabled: boolean;
|
|
20
20
|
modelValue: number;
|
|
21
21
|
elementsQuantityOnPage: number;
|
|
@@ -13,8 +13,8 @@ interface INmorphProps {
|
|
|
13
13
|
indeterminateAnimation?: string;
|
|
14
14
|
}
|
|
15
15
|
declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<INmorphProps> & Readonly<{}>, {
|
|
16
|
-
color: NmorphProgressColorType;
|
|
17
16
|
type: NmorphProgressType;
|
|
17
|
+
color: NmorphProgressColorType;
|
|
18
18
|
height: string | number;
|
|
19
19
|
valueInside: boolean;
|
|
20
20
|
valueRightSide: boolean;
|
|
@@ -16,8 +16,8 @@ interface INmorphProps {
|
|
|
16
16
|
rowHoverBackground?: string;
|
|
17
17
|
}
|
|
18
18
|
declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<INmorphProps> & Readonly<{}>, {
|
|
19
|
-
sort: NmorphTableSortType;
|
|
20
19
|
data: NmorphTableDataType;
|
|
20
|
+
sort: NmorphTableSortType;
|
|
21
21
|
cellHeight: string | number;
|
|
22
22
|
bordered: boolean;
|
|
23
23
|
design: "nmorph" | "common";
|
package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ declare const _default: DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentO
|
|
|
8
8
|
}, string, PublicProps, Readonly<INmorphProps> & Readonly<{
|
|
9
9
|
onClose?: (val: string) => any;
|
|
10
10
|
}>, {
|
|
11
|
-
height: "
|
|
11
|
+
height: "basic" | "thick" | "thin";
|
|
12
12
|
design: NmorphElementDesignType;
|
|
13
13
|
removable: boolean;
|
|
14
14
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -13,8 +13,8 @@ interface INmorphProps {
|
|
|
13
13
|
contentFontSize?: number | string;
|
|
14
14
|
}
|
|
15
15
|
declare const _default: DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<INmorphProps> & Readonly<{}>, {
|
|
16
|
-
color: string;
|
|
17
16
|
type: NmorphCalloutType;
|
|
17
|
+
color: string;
|
|
18
18
|
title: string;
|
|
19
19
|
padding: string | number;
|
|
20
20
|
borderRadius: string | number;
|
|
@@ -6,6 +6,9 @@ interface INmorphProps {
|
|
|
6
6
|
maxHeight?: string;
|
|
7
7
|
openDelay?: number;
|
|
8
8
|
closeDelay?: number;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use `closeOnOverlay` instead.
|
|
11
|
+
*/
|
|
9
12
|
closeOnClickModal?: boolean;
|
|
10
13
|
showClose?: boolean;
|
|
11
14
|
zIndex?: number;
|
|
@@ -30,10 +33,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
30
33
|
closeOnClickModal: boolean;
|
|
31
34
|
showClose: boolean;
|
|
32
35
|
closeOnOverlay: boolean;
|
|
33
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>,
|
|
34
|
-
header?(_: {}): any;
|
|
35
|
-
default?(_: {}): any;
|
|
36
|
-
}>;
|
|
36
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, any>;
|
|
37
37
|
export default _default;
|
|
38
38
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
39
39
|
new (): {
|
|
@@ -21,7 +21,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
21
21
|
onSelect?: (value: unknown) => any;
|
|
22
22
|
"onUpdate:model-value"?: (value: string) => any;
|
|
23
23
|
}>, {
|
|
24
|
-
height: "
|
|
24
|
+
height: "basic" | "thick" | "thin";
|
|
25
25
|
disabled: boolean;
|
|
26
26
|
placeholder: string;
|
|
27
27
|
modelValue: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { INmorphCheckboxOption, INmorphCommonInputProps, NmorphCheckboxDesignType, NmorphComponentDirection, NmorphSelectionControlHeightType } from '../../../types';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
interface INmorphProps extends Omit<INmorphCommonInputProps, 'height'> {
|
|
4
|
-
modelValue
|
|
4
|
+
modelValue?: string[];
|
|
5
5
|
options?: INmorphCheckboxOption[];
|
|
6
6
|
design?: NmorphCheckboxDesignType;
|
|
7
7
|
direction?: keyof typeof NmorphComponentDirection;
|
|
@@ -12,13 +12,13 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
12
12
|
}, string, PublicProps, Readonly<INmorphProps> & Readonly<{
|
|
13
13
|
"onUpdate:model-value"?: (val: string[]) => any;
|
|
14
14
|
}>, {
|
|
15
|
-
height: "
|
|
15
|
+
height: "basic" | "thick" | "thin" | "extra-thin";
|
|
16
16
|
disabled: boolean;
|
|
17
17
|
modelValue: string[];
|
|
18
18
|
direction: "row" | "column";
|
|
19
19
|
design: NmorphCheckboxDesignType;
|
|
20
20
|
options: INmorphCheckboxOption[];
|
|
21
|
-
}, {}, {}, {}, string, ComponentProvideOptions,
|
|
21
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>, {
|
|
22
22
|
default?(_: {}): any;
|
|
23
23
|
}>;
|
|
24
24
|
export default _default;
|
|
@@ -16,7 +16,7 @@ declare const _default: DefineComponent<INmorphProps, {
|
|
|
16
16
|
onFocus?: () => any;
|
|
17
17
|
"onUpdate:model-value"?: (val: string) => any;
|
|
18
18
|
}>, {
|
|
19
|
-
height: "
|
|
19
|
+
height: "basic" | "thick" | "thin";
|
|
20
20
|
disabled: boolean;
|
|
21
21
|
modelValue: string;
|
|
22
22
|
showValue: boolean;
|
|
@@ -3,7 +3,7 @@ import { NmorphDateFormatterType, NmorphSelectedDateModelType } from '../..';
|
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
4
|
interface INmorphProps extends INmorphCommonInputProps {
|
|
5
5
|
placeholder?: string;
|
|
6
|
-
modelValue
|
|
6
|
+
modelValue?: NmorphSelectedDateModelType;
|
|
7
7
|
type?: keyof typeof NmorphSelectionDateType;
|
|
8
8
|
textSeparator?: string;
|
|
9
9
|
initialDate?: Date;
|
|
@@ -23,7 +23,7 @@ declare const _default: DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentO
|
|
|
23
23
|
"onUpdate:model-value"?: (modelValue: NmorphSelectedDateModelType) => any;
|
|
24
24
|
}>, {
|
|
25
25
|
type: "date" | "dates" | "daterange";
|
|
26
|
-
height: "
|
|
26
|
+
height: "basic" | "thick" | "thin";
|
|
27
27
|
disabled: boolean;
|
|
28
28
|
width: string | number;
|
|
29
29
|
placeholder: string;
|
|
@@ -38,7 +38,7 @@ declare const _default: DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentO
|
|
|
38
38
|
valueSeparator: string;
|
|
39
39
|
rangeSeparator: string;
|
|
40
40
|
calendarCellHeight: string | number;
|
|
41
|
-
}, {}, {}, {}, string, ComponentProvideOptions,
|
|
41
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
42
42
|
nmorphInputDOMRef: HTMLDivElement;
|
|
43
43
|
}, HTMLDivElement>;
|
|
44
44
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { INmorphCustomFileData, NmorphResolutionType } from '../..';
|
|
1
|
+
import { INmorphCustomFileData, INmorphFileUploadValidationError, NmorphResolutionType } from '../..';
|
|
2
|
+
import { INmorphCommonInputProps } from '../../../types';
|
|
2
3
|
import { DefineComponent, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
-
interface INmorphProps {
|
|
4
|
+
interface INmorphProps extends Pick<INmorphCommonInputProps, 'id' | 'name' | 'autocomplete' | 'tabindex'> {
|
|
4
5
|
modelValue?: INmorphCustomFileData[];
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
multiple?: boolean;
|
|
@@ -13,14 +14,16 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
13
14
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
14
15
|
"update:model-value": (val: INmorphCustomFileData[]) => any;
|
|
15
16
|
"on-unsupported-file-type-error": (val: string) => any;
|
|
17
|
+
"on-file-validation-error": (val: INmorphFileUploadValidationError) => any;
|
|
16
18
|
}, string, PublicProps, Readonly<INmorphProps> & Readonly<{
|
|
17
19
|
"onUpdate:model-value"?: (val: INmorphCustomFileData[]) => any;
|
|
18
20
|
"onOn-unsupported-file-type-error"?: (val: string) => any;
|
|
21
|
+
"onOn-file-validation-error"?: (val: INmorphFileUploadValidationError) => any;
|
|
19
22
|
}>, {
|
|
23
|
+
allowedTypes: string[];
|
|
20
24
|
disabled: boolean;
|
|
21
25
|
modelValue: INmorphCustomFileData[];
|
|
22
26
|
multiple: boolean;
|
|
23
|
-
allowedTypes: string[];
|
|
24
27
|
photoWithPreview: boolean;
|
|
25
28
|
buttonText: string;
|
|
26
29
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
package/dist/src/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ interface INmorphProps {
|
|
|
12
12
|
declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<INmorphProps> & Readonly<{}>, {
|
|
13
13
|
name: string;
|
|
14
14
|
autocomplete: string;
|
|
15
|
-
height: "
|
|
15
|
+
height: "basic" | "thick" | "thin";
|
|
16
16
|
label: string;
|
|
17
17
|
showValidationIcon: boolean;
|
|
18
18
|
staticErrorBoxSpace: boolean;
|
|
@@ -6,7 +6,7 @@ interface INmorphProps {
|
|
|
6
6
|
staticHeight?: boolean;
|
|
7
7
|
}
|
|
8
8
|
declare const _default: DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<INmorphProps> & Readonly<{}>, {
|
|
9
|
-
height: "
|
|
9
|
+
height: "basic" | "thick" | "thin";
|
|
10
10
|
errors: string[] | Ref<string[], string[]>;
|
|
11
11
|
staticHeight: boolean;
|
|
12
12
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { INmorphUseFormValidation, NmorphRulesType } from '../../../hooks';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
|
|
2
|
+
import { INmorphCustomFileData } from '../nmorph-file-upload/types';
|
|
3
|
+
import { ComputedRef, Ref } from 'vue';
|
|
4
|
+
export type NmorphFileFormValueType = File | File[] | INmorphCustomFileData[];
|
|
5
|
+
export type NmorphAvailableFormValueType<TCustomValue = never> = string | string[] | number | number[] | boolean | boolean[] | Date | Date[] | null | NmorphFileFormValueType | TCustomValue;
|
|
6
|
+
export type NmorphFormFieldType<TValue = NmorphAvailableFormValueType> = {
|
|
7
|
+
value: TValue;
|
|
6
8
|
rules: NmorphRulesType;
|
|
7
|
-
}
|
|
9
|
+
};
|
|
10
|
+
export type NmorphFormValueType<TValue = NmorphAvailableFormValueType> = Record<string, NmorphFormFieldType<TValue>>;
|
|
8
11
|
export type NmorphFormValidationDataType = INmorphUseFormValidation;
|
|
9
12
|
export interface NmorphFormItemInputDataType {
|
|
10
13
|
id: Ref<string>;
|
|
11
14
|
name: Ref<string>;
|
|
12
15
|
autocomplete: Ref<string | undefined>;
|
|
16
|
+
value: ComputedRef<NmorphAvailableFormValueType | undefined>;
|
|
17
|
+
rules: ComputedRef<NmorphRulesType>;
|
|
18
|
+
errors: ComputedRef<string[]>;
|
|
19
|
+
valid: ComputedRef<boolean>;
|
|
20
|
+
touched: ComputedRef<boolean>;
|
|
21
|
+
updateValue: (value: NmorphAvailableFormValueType) => void;
|
|
22
|
+
validate: (value?: NmorphAvailableFormValueType) => void;
|
|
13
23
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { INmorphCommonInputProps } from '../../../types';
|
|
2
|
+
import { NmorphAvailableFormValueType, NmorphFormItemInputDataType } from './types';
|
|
2
3
|
import { ComputedRef } from 'vue';
|
|
3
4
|
export declare const nmorphFormItemInputDataKey = "nmorph-form-item-input-data";
|
|
4
5
|
export declare const useFormItemInput: (props: Pick<INmorphCommonInputProps, 'id' | 'name' | 'tabindex' | 'autocomplete'>) => {
|
|
@@ -7,3 +8,12 @@ export declare const useFormItemInput: (props: Pick<INmorphCommonInputProps, 'id
|
|
|
7
8
|
autocomplete: ComputedRef<string>;
|
|
8
9
|
tabindex: ComputedRef<number>;
|
|
9
10
|
};
|
|
11
|
+
export declare const useFormItemModel: <T extends NmorphAvailableFormValueType>(props: {
|
|
12
|
+
modelValue?: T;
|
|
13
|
+
}, emitUpdate: (value: T) => void, fallbackValue: T) => {
|
|
14
|
+
formItemInputData: NmorphFormItemInputDataType;
|
|
15
|
+
modelValue: ComputedRef<T>;
|
|
16
|
+
modelValueIsControlled: ComputedRef<any>;
|
|
17
|
+
updateModelValue: (value: T) => void;
|
|
18
|
+
validateModelValue: (value?: T) => void;
|
|
19
|
+
};
|
|
@@ -14,7 +14,7 @@ declare const _default: DefineComponent<INmorphProps, {
|
|
|
14
14
|
}, string, PublicProps, Readonly<INmorphProps> & Readonly<{
|
|
15
15
|
"onUpdate:model-value"?: (val: number) => any;
|
|
16
16
|
}>, {
|
|
17
|
-
height: "
|
|
17
|
+
height: "basic" | "thick" | "thin";
|
|
18
18
|
disabled: boolean;
|
|
19
19
|
modelValue: number;
|
|
20
20
|
max: number;
|
|
@@ -24,7 +24,7 @@ declare const _default: DefineComponent<INmorphProps, {
|
|
|
24
24
|
onComplete?: (val: string) => any;
|
|
25
25
|
}>, {
|
|
26
26
|
length: number;
|
|
27
|
-
height: "
|
|
27
|
+
height: "basic" | "thick" | "thin";
|
|
28
28
|
disabled: boolean;
|
|
29
29
|
modelValue: string;
|
|
30
30
|
mode: NmorphOtpInputMode;
|
|
@@ -2,7 +2,7 @@ import { INmorphCommonInputProps, INmorphRadioOption, NmorphComponentDirection,
|
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
type NmorphListRadioOptionElementType = Omit<INmorphRadioOption, 'checked'>;
|
|
4
4
|
interface INmorphProps extends Omit<INmorphCommonInputProps, 'height'> {
|
|
5
|
-
modelValue
|
|
5
|
+
modelValue?: string;
|
|
6
6
|
options?: NmorphListRadioOptionElementType[];
|
|
7
7
|
styleType?: keyof typeof NmorphRadioStyleType;
|
|
8
8
|
direction?: keyof typeof NmorphComponentDirection;
|
|
@@ -14,12 +14,12 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
14
14
|
"onUpdate:model-value"?: (val: string) => any;
|
|
15
15
|
}>, {
|
|
16
16
|
styleType: "button" | "radio-style";
|
|
17
|
-
height: "
|
|
17
|
+
height: "basic" | "thick" | "thin" | "extra-thin";
|
|
18
18
|
disabled: boolean;
|
|
19
19
|
modelValue: string;
|
|
20
20
|
direction: "row" | "column";
|
|
21
21
|
options: NmorphListRadioOptionElementType[];
|
|
22
|
-
}, {}, {}, {}, string, ComponentProvideOptions,
|
|
22
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>, {
|
|
23
23
|
default?(_: {}): any;
|
|
24
24
|
}>;
|
|
25
25
|
export default _default;
|
|
@@ -26,7 +26,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
26
26
|
}>, {
|
|
27
27
|
fill: boolean;
|
|
28
28
|
loading: boolean;
|
|
29
|
-
height: "
|
|
29
|
+
height: "basic" | "thick" | "thin";
|
|
30
30
|
disabled: boolean;
|
|
31
31
|
width: string | number;
|
|
32
32
|
modelValue: NmorphSelectModelValueType;
|
|
@@ -15,7 +15,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
15
15
|
"onUpdate:model-value"?: (val: string) => any;
|
|
16
16
|
}>, {
|
|
17
17
|
fill: boolean;
|
|
18
|
-
height: "
|
|
18
|
+
height: "basic" | "thick" | "thin";
|
|
19
19
|
disabled: boolean;
|
|
20
20
|
modelValue: string;
|
|
21
21
|
options: INmorphSelectButtonOption[];
|
|
@@ -26,7 +26,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
26
26
|
"onUpdate:model-value"?: (val: string) => any;
|
|
27
27
|
"onOn-enter"?: () => any;
|
|
28
28
|
}>, {
|
|
29
|
-
height: "
|
|
29
|
+
height: "basic" | "thick" | "thin";
|
|
30
30
|
disabled: boolean;
|
|
31
31
|
placeholder: string;
|
|
32
32
|
modelValue: string;
|
|
@@ -31,7 +31,7 @@ declare const _default: DefineComponent<INmorphProps, {
|
|
|
31
31
|
"onUpdate:model-value"?: (val: string) => any;
|
|
32
32
|
"onOn-enter"?: () => any;
|
|
33
33
|
}>, {
|
|
34
|
-
height: "
|
|
34
|
+
height: "basic" | "thick" | "thin";
|
|
35
35
|
disabled: boolean;
|
|
36
36
|
resize: NmorphTextareaResizeType;
|
|
37
37
|
placeholder: string;
|
|
@@ -25,7 +25,7 @@ declare const _default: DefineComponent<INmorphProps, {
|
|
|
25
25
|
onFocus?: () => any;
|
|
26
26
|
"onUpdate:model-value"?: (val: string) => any;
|
|
27
27
|
}>, {
|
|
28
|
-
height: "
|
|
28
|
+
height: "basic" | "thick" | "thin";
|
|
29
29
|
disabled: boolean;
|
|
30
30
|
width: string | number;
|
|
31
31
|
placeholder: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NmorphAvailableFormValueType } from '../components/form/nmorph-form/types';
|
|
2
|
+
import { NmorphResolutionType } from '../components/form/nmorph-file-upload/types';
|
|
2
3
|
import { Ref } from 'vue';
|
|
3
4
|
export declare const enum NmorphArrayValidationOperator {
|
|
4
5
|
'contains-one' = "contains-one",
|
|
@@ -22,6 +23,12 @@ export interface INmorphRule {
|
|
|
22
23
|
booleanCompareType?: keyof typeof NmorphBooleanCompareOperator;
|
|
23
24
|
arrayCompareType?: keyof typeof NmorphArrayValidationOperator;
|
|
24
25
|
compareValue?: boolean | number | string | string[];
|
|
26
|
+
maxFileSize?: number;
|
|
27
|
+
fileMaxSize?: number;
|
|
28
|
+
allowedTypes?: Array<NmorphResolutionType | string>;
|
|
29
|
+
fileAllowedTypes?: Array<NmorphResolutionType | string>;
|
|
30
|
+
maxFiles?: number;
|
|
31
|
+
fileMaxCount?: number;
|
|
25
32
|
error: string;
|
|
26
33
|
}
|
|
27
34
|
export type NmorphValidationInputValueType = NmorphAvailableFormValueType | null;
|
|
@@ -45,6 +52,14 @@ export interface INmorphCheckboxGroupValidationRule extends INmorphRule {
|
|
|
45
52
|
arrayCompareType: keyof typeof NmorphArrayValidationOperator;
|
|
46
53
|
compareValue: string[];
|
|
47
54
|
}
|
|
55
|
+
export interface INmorphFileValidationRule extends INmorphRule {
|
|
56
|
+
maxFileSize?: number;
|
|
57
|
+
fileMaxSize?: number;
|
|
58
|
+
allowedTypes?: Array<NmorphResolutionType | string>;
|
|
59
|
+
fileAllowedTypes?: Array<NmorphResolutionType | string>;
|
|
60
|
+
maxFiles?: number;
|
|
61
|
+
fileMaxCount?: number;
|
|
62
|
+
}
|
|
48
63
|
export declare const useFieldValidation: (data: INmorphUseValidationPayload) => {
|
|
49
64
|
touched: Ref<boolean, boolean>;
|
|
50
65
|
valid: Ref<boolean, boolean>;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
+
import { useFieldValidation } from '.';
|
|
2
3
|
import { NmorphFormValueType } from '../components/form/nmorph-form/types';
|
|
4
|
+
import { NmorphValidationInputValueType } from './use-field-validation';
|
|
3
5
|
export interface INmorphUseFormValidation {
|
|
6
|
+
formValue: NmorphFormValueType;
|
|
4
7
|
fields: Record<string, {
|
|
5
8
|
touched: Ref<boolean>;
|
|
6
9
|
valid: Ref<boolean>;
|
|
7
10
|
errors: Ref<string[]>;
|
|
8
11
|
validate: () => void;
|
|
9
12
|
}>;
|
|
13
|
+
updateFieldValue: (fieldName: string, value: NmorphValidationInputValueType) => void;
|
|
14
|
+
validateField: (fieldName: string, inputValue?: NmorphValidationInputValueType) => ReturnType<typeof useFieldValidation> | undefined;
|
|
10
15
|
isFormValid: Ref<boolean>;
|
|
11
16
|
isAnyTouched: Ref<boolean>;
|
|
12
17
|
}
|
|
@@ -7,12 +7,18 @@ interface INmorphVirtualListOptions {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const useVirtualList: <T>(items: Readonly<Ref<T[], T[]>>, options: INmorphVirtualListOptions) => {
|
|
9
9
|
containerRef: Ref<HTMLElement, HTMLElement>;
|
|
10
|
+
contentStyle: ComputedRef<{
|
|
11
|
+
transform: string;
|
|
12
|
+
}>;
|
|
10
13
|
endIndex: ComputedRef<number>;
|
|
11
14
|
offsetTop: ComputedRef<number>;
|
|
12
15
|
refresh: () => void;
|
|
13
16
|
measureElement: (index: number, element?: Element | null) => void;
|
|
14
17
|
scrollHandler: () => void;
|
|
15
18
|
scrollToIndex: (index: number) => void;
|
|
19
|
+
spacerStyle: ComputedRef<{
|
|
20
|
+
height: string;
|
|
21
|
+
}>;
|
|
16
22
|
startIndex: ComputedRef<number>;
|
|
17
23
|
totalHeight: ComputedRef<number>;
|
|
18
24
|
viewportHeight: Ref<number, number>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
1
|
+
import { CSSProperties, Ref } from 'vue';
|
|
2
2
|
import { I18n } from 'vue-i18n';
|
|
3
3
|
import { NmorphFormValidationDataType } from '../components';
|
|
4
4
|
import { useNmorphBrowser, useNmorphTheme, useNmorphZIndex } from '../outside-hooks';
|
|
@@ -166,6 +166,7 @@ export interface INmorphDimensions {
|
|
|
166
166
|
width: number;
|
|
167
167
|
height: number;
|
|
168
168
|
}
|
|
169
|
+
export type NmorphCSSProperties = CSSProperties & Record<`--${string}`, string | number | undefined>;
|
|
169
170
|
export interface INmorphImage {
|
|
170
171
|
src?: string;
|
|
171
172
|
srcSet?: string;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export declare const capitalizeFirstChar: (str: string) => string;
|
|
2
2
|
export declare const deepClone: <T>(obj: T) => T;
|
|
3
|
+
export declare const toCssSize: (value?: number | string) => string;
|
|
4
|
+
type NmorphOptionHeightType = 'basic' | 'thick' | 'thin';
|
|
5
|
+
export declare const getNmorphOptionHeight: (height?: NmorphOptionHeightType) => number;
|
|
6
|
+
export declare const resolveDomElement: (element: unknown) => Element | null;
|
|
3
7
|
export declare const generateUUID: () => string;
|
|
8
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type NmorphModifierValue = string | number | false | null | undefined;
|
|
2
|
+
export type NmorphModifierInput = NmorphModifierValue[] | Record<string, boolean | null | undefined>;
|
|
3
|
+
export declare const createBlockModifiers: (block: string, modifiers: NmorphModifierInput) => string;
|
|
2
4
|
export declare const useModifiers: (data: {
|
|
3
|
-
[key: string]:
|
|
5
|
+
[key: string]: NmorphModifierInput;
|
|
4
6
|
}) => string;
|