@nmorph/nmorph-ui-kit 0.0.2 → 0.0.5
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/index.es.js +1158 -1161
- package/dist/style.css +1 -1
- package/dist/styles/base/_basic.scss +3 -3
- package/dist/styles/base/_colors.scss +22 -30
- package/dist/styles/base/_dimensions.scss +1 -1
- package/dist/styles/base/_histoire.scss +1 -1
- package/dist/styles/base/_theme-mixin.scss +4 -4
- package/dist/types/components/inputs/checkbox/nmorph-checkbox/NmorphCheckbox.vue.d.ts +8 -8
- package/dist/types/components/inputs/checkbox/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +8 -8
- package/dist/types/components/inputs/checkbox/types.d.ts +6 -3
- package/dist/types/components/inputs/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +14 -14
- package/dist/types/components/inputs/nmorph-autocomplete/types.d.ts +2 -2
- package/dist/types/components/inputs/nmorph-date-picker/NmorphDatePicker.vue.d.ts +11 -11
- package/dist/types/components/inputs/nmorph-date-picker/components/nmorph-date-picker-content/NmorphDatePickerContent.vue.d.ts +7 -7
- package/dist/types/components/inputs/nmorph-date-picker/components/nmorph-date-picker-header/NmorphDatePickerHeader.vue.d.ts +3 -3
- package/dist/types/components/inputs/nmorph-date-picker/components/nmorph-year-month-picker/NmorphYearMonthPicker.vue.d.ts +3 -3
- package/dist/types/components/inputs/nmorph-date-picker/components/types.d.ts +1 -0
- package/dist/types/components/inputs/nmorph-file-upload/NmorphFileUpload.vue.d.ts +10 -14
- package/dist/types/components/inputs/nmorph-file-upload/types.d.ts +32 -28
- package/dist/types/components/inputs/nmorph-number-input/NmorphNumberInput.vue.d.ts +8 -8
- package/dist/types/components/inputs/nmorph-select/NmorphSelect.vue.d.ts +15 -15
- package/dist/types/components/inputs/{nmorph-select-option → nmorph-select/components/nmorph-select-option}/NmorphSelectOption.vue.d.ts +5 -5
- package/dist/types/components/inputs/nmorph-select/types.d.ts +4 -0
- package/dist/types/components/inputs/nmorph-slider/NmorphSlider.vue.d.ts +5 -5
- package/dist/types/components/inputs/nmorph-switch/NmorphSwitch.vue.d.ts +8 -8
- package/dist/types/components/inputs/nmorph-text-input/NmorphTextInput.vue.d.ts +10 -10
- package/dist/types/components/inputs/nmorph-time-picker/NmorphTimePicker.vue.d.ts +15 -15
- package/dist/types/components/inputs/nmorph-time-picker/components/NmorphTimeRoller.vue.d.ts +3 -3
- package/dist/types/components/inputs/nmorph-time-picker/types.d.ts +3 -3
- package/dist/types/components/inputs/nmorph-time-picker/utils.d.ts +2 -2
- package/dist/types/components/inputs/radio/nmorph-radio/NmorphRadio.vue.d.ts +9 -9
- package/dist/types/components/inputs/radio/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +9 -9
- package/dist/types/components/inputs/radio/types.d.ts +5 -2
- package/dist/types/components/nmorph-alert/NmorphAlert.vue.d.ts +3 -3
- package/dist/types/components/nmorph-avatar/NmorphAvatar.vue.d.ts +5 -5
- package/dist/types/components/nmorph-backtop/NmorphBacktop.vue.d.ts +3 -3
- package/dist/types/components/nmorph-badge/NmorphBadge.vue.d.ts +4 -4
- package/dist/types/components/nmorph-breadcrumb/NmorphBreadcrumb.vue.d.ts +3 -3
- package/dist/types/components/nmorph-breadcrumb/components/nmorph-breadcrumb-item/NmorphBreadcrumbItem.vue.d.ts +4 -4
- package/dist/types/components/nmorph-breadcrumb/types.d.ts +2 -2
- package/dist/types/components/nmorph-button/NmorphButton.vue.d.ts +7 -7
- package/dist/types/components/nmorph-calendar/NmorphCalendar.vue.d.ts +11 -11
- package/dist/types/components/nmorph-calendar/components/nmorph-calendar-header/NmorphCalendarHeader.vue.d.ts +3 -3
- package/dist/types/components/nmorph-calendar/types.d.ts +5 -5
- package/dist/types/components/nmorph-calendar/utils.d.ts +4 -4
- package/dist/types/components/nmorph-card/NmorphCard.vue.d.ts +3 -3
- package/dist/types/components/nmorph-carousel/NmorphCarousel.vue.d.ts +3 -3
- package/dist/types/components/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue.d.ts +2 -2
- package/dist/types/components/nmorph-carousel/types.d.ts +1 -1
- package/dist/types/components/nmorph-collapse/NmorphCollapse.vue.d.ts +7 -7
- package/dist/types/components/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +5 -5
- package/dist/types/components/nmorph-collapse/types.d.ts +5 -2
- package/dist/types/components/nmorph-dialog/NmorphDialog.vue.d.ts +4 -4
- package/dist/types/components/nmorph-divider/NmorphDivider.vue.d.ts +6 -6
- package/dist/types/components/nmorph-divider/types.d.ts +1 -1
- package/dist/types/components/nmorph-dropdown/NmorphDropdown.vue.d.ts +7 -7
- package/dist/types/components/{form/nmorph-form → nmorph-form}/NmorphForm.vue.d.ts +5 -5
- package/dist/types/components/{form/nmorph-form → nmorph-form}/components/nmorph-form-item/NmorphFormItem.vue.d.ts +4 -4
- package/dist/types/components/{form/nmorph-form → nmorph-form}/components/nmorph-form-item/components/nmorph-error-box/NmorphErrorBox.vue.d.ts +4 -4
- package/dist/types/components/{form/nmorph-form → nmorph-form}/components/nmorph-form-item/components/nmorph-validation-icon/NmorphValidationIcon.vue.d.ts +3 -3
- package/dist/types/components/nmorph-form/types.d.ts +7 -0
- package/dist/types/components/nmorph-icon/NmorphIcon.vue.d.ts +4 -4
- package/dist/types/components/nmorph-image/NmorphImage.vue.d.ts +5 -5
- package/dist/types/components/nmorph-image-preview/NmorphImagePreview.vue.d.ts +3 -3
- package/dist/types/components/nmorph-image-preview/types.d.ts +5 -0
- package/dist/types/components/nmorph-link/NmorphLink.vue.d.ts +7 -12
- package/dist/types/components/nmorph-link/types.d.ts +6 -0
- package/dist/types/components/nmorph-overlay/NmorphOverlay.vue.d.ts +3 -3
- package/dist/types/components/nmorph-pagination/NmorphPagination.vue.d.ts +4 -4
- package/dist/types/components/nmorph-progress/NmorphProgress.vue.d.ts +3 -3
- package/dist/types/components/nmorph-scroll/NmorphScroll.vue.d.ts +8 -14
- package/dist/types/components/nmorph-scroll/types.d.ts +7 -0
- package/dist/types/components/nmorph-skeleton/NmorphSkeleton.vue.d.ts +3 -3
- package/dist/types/components/nmorph-skeleton/components/NmorphSkeletonItem.vue.d.ts +3 -3
- package/dist/types/components/nmorph-sort-button/NmorphSortButton.vue.d.ts +3 -3
- package/dist/types/components/{table/nmorph-table → nmorph-table}/NmorphTable.vue.d.ts +4 -4
- package/dist/types/components/{table/nmorph-table → nmorph-table}/components/nmorph-table-cell/NmorphTableCell.vue.d.ts +2 -2
- package/dist/types/components/{table/nmorph-table → nmorph-table}/components/nmorph-table-column/NmorphTableColumn.vue.d.ts +6 -6
- package/dist/types/components/nmorph-table/types.d.ts +21 -0
- package/dist/types/components/nmorph-tabs/NmorphTabs.vue.d.ts +3 -3
- package/dist/types/components/nmorph-tabs/components/nmorph-tab-pane/NmorphTabPane.vue.d.ts +5 -5
- package/dist/types/components/nmorph-tabs/type.d.ts +3 -3
- package/dist/types/components/nmorph-tag/NmorphTag.vue.d.ts +3 -3
- package/dist/types/components/nmorph-tooltip/NmorphTooltip.vue.d.ts +7 -7
- package/dist/types/components.d.ts +50 -52
- package/dist/types/histoire.setup.d.ts +0 -2
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useEventManager.d.ts +1 -0
- package/dist/types/hooks/useFieldValidation.d.ts +21 -21
- package/dist/types/hooks/useFormValidation.d.ts +2 -2
- package/dist/types/hooks/usePlacement.d.ts +6 -6
- package/dist/types/types/common.d.ts +5 -5
- package/package.json +5 -24
- package/dist/fonts/Inter-Bold.woff +0 -0
- package/dist/fonts/Inter-Bold.woff2 +0 -0
- package/dist/fonts/Inter-Regular.woff +0 -0
- package/dist/fonts/Inter-Regular.woff2 +0 -0
- package/dist/fonts/Inter-SemiBold.woff +0 -0
- package/dist/fonts/Inter-SemiBold.woff2 +0 -0
- package/dist/types/components/form/types.d.ts +0 -7
- package/dist/types/components/inputs/nmorph-select-option/types.d.ts +0 -1
- package/dist/types/components/table/types.d.ts +0 -19
- /package/dist/types/components/{form/nmorph-form → nmorph-form}/components/nmorph-form-item/components/index.d.ts +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import { NmorphComponentHeight } from '../../types/common';
|
|
3
|
-
interface
|
|
3
|
+
interface INmorphProps {
|
|
4
4
|
value: string;
|
|
5
5
|
text: string;
|
|
6
6
|
removable?: boolean;
|
|
7
7
|
height?: keyof typeof NmorphComponentHeight;
|
|
8
8
|
transparent?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<
|
|
10
|
+
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<INmorphProps>, {
|
|
11
11
|
height: string;
|
|
12
12
|
removable: boolean;
|
|
13
13
|
transparent: boolean;
|
|
14
14
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
15
15
|
close: (val: string) => void;
|
|
16
|
-
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<
|
|
16
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<INmorphProps>, {
|
|
17
17
|
height: string;
|
|
18
18
|
removable: boolean;
|
|
19
19
|
transparent: boolean;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
interface
|
|
2
|
+
import { INmorphCoords, NmorphPlacementType } from '../../types/common';
|
|
3
|
+
interface INmorphProps {
|
|
4
4
|
text?: string;
|
|
5
|
-
position?:
|
|
5
|
+
position?: NmorphPlacementType;
|
|
6
6
|
forceShow?: boolean;
|
|
7
|
-
forceCoordinate?: Partial<
|
|
7
|
+
forceCoordinate?: Partial<INmorphCoords<string>> | null;
|
|
8
8
|
}
|
|
9
|
-
declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<
|
|
9
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<INmorphProps>, {
|
|
10
10
|
text: string;
|
|
11
11
|
position: string;
|
|
12
12
|
forceShow: boolean;
|
|
13
13
|
forceCoordinate: null;
|
|
14
|
-
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<
|
|
14
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<INmorphProps>, {
|
|
15
15
|
text: string;
|
|
16
16
|
position: string;
|
|
17
17
|
forceShow: boolean;
|
|
@@ -20,7 +20,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
20
20
|
text: string;
|
|
21
21
|
position: "left" | "right" | "top" | "bottom";
|
|
22
22
|
forceShow: boolean;
|
|
23
|
-
forceCoordinate: Partial<
|
|
23
|
+
forceCoordinate: Partial<INmorphCoords<string>> | null;
|
|
24
24
|
}, {}>, {
|
|
25
25
|
default?(_: {}): any;
|
|
26
26
|
content?(_: {}): any;
|
|
@@ -1,52 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
import NmorphAutocomplete from './components/inputs/nmorph-autocomplete/NmorphAutocomplete.vue';
|
|
52
|
-
export { NmorphForm, NmorphTextInput, NmorphImage, NmorphIcon, NmorphButton, NmorphRadio, NmorphRadioGroup, NmorphCheckbox, NmorphCheckboxGroup, NmorphCarousel, NmorphCarouselItem, NmorphNumberInput, NmorphSwitch, NmorphTimePicker, NmorphDatePicker, NmorphYearMonthPicker, NmorphFormItem, NmorphSelect, NmorphSelectOption, NmorphFileUpload, NmorphCard, NmorphLink, NmorphSlider, NmorphTooltip, NmorphOverlay, NmorphImagePreview, NmorphScroll, NmorphTag, NmorphDropdown, NmorphCalendar, NmorphTable, NmorphTableColumn, NmorphTableCell, NmorphSortButton, NmorphDivider, NmorphCollapse, NmorphCollapseItem, NmorphProgress, NmorphBacktop, NmorphBadge, NmorphAvatar, NmorphTabs, NmorphTabPane, NmorphBreadcrumb, NmorphBreadcrumbItem, NmorphAlert, NmorphDialog, NmorphSkeleton, NmorphSkeletonItem, NmorphPagination, NmorphAutocomplete, };
|
|
1
|
+
export { default as NmorphTextInput } from './components/inputs/nmorph-text-input/NmorphTextInput.vue';
|
|
2
|
+
export { default as NmorphCheckbox } from './components/inputs/checkbox/nmorph-checkbox/NmorphCheckbox.vue';
|
|
3
|
+
export { default as NmorphCheckboxGroup } from './components/inputs/checkbox/nmorph-checkbox-group/NmorphCheckboxGroup.vue';
|
|
4
|
+
export { default as NmorphRadio } from './components/inputs/radio/nmorph-radio/NmorphRadio.vue';
|
|
5
|
+
export { default as NmorphRadioGroup } from './components/inputs/radio/nmorph-radio-group/NmorphRadioGroup.vue';
|
|
6
|
+
export { default as NmorphNumberInput } from './components/inputs/nmorph-number-input/NmorphNumberInput.vue';
|
|
7
|
+
export { default as NmorphSlider } from './components/inputs/nmorph-slider/NmorphSlider.vue';
|
|
8
|
+
export { default as NmorphSwitch } from './components/inputs/nmorph-switch/NmorphSwitch.vue';
|
|
9
|
+
export { default as NmorphSelect } from './components/inputs/nmorph-select/NmorphSelect.vue';
|
|
10
|
+
export { default as NmorphSelectOption } from './components/inputs/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue';
|
|
11
|
+
export { default as NmorphFileUpload } from './components/inputs/nmorph-file-upload/NmorphFileUpload.vue';
|
|
12
|
+
export { default as NmorphTimePicker } from './components/inputs/nmorph-time-picker/NmorphTimePicker.vue';
|
|
13
|
+
export { default as NmorphDatePicker } from './components/inputs/nmorph-date-picker/NmorphDatePicker.vue';
|
|
14
|
+
export { default as NmorphYearMonthPicker } from './components/inputs/nmorph-date-picker/components/nmorph-year-month-picker/NmorphYearMonthPicker.vue';
|
|
15
|
+
export { default as NmorphAutocomplete } from './components/inputs/nmorph-autocomplete/NmorphAutocomplete.vue';
|
|
16
|
+
export { default as NmorphIcon } from './components/nmorph-icon/NmorphIcon.vue';
|
|
17
|
+
export { default as NmorphButton } from './components/nmorph-button/NmorphButton.vue';
|
|
18
|
+
export { default as NmorphCard } from './components/nmorph-card/NmorphCard.vue';
|
|
19
|
+
export { default as NmorphLink } from './components/nmorph-link/NmorphLink.vue';
|
|
20
|
+
export { default as NmorphTooltip } from './components/nmorph-tooltip/NmorphTooltip.vue';
|
|
21
|
+
export { default as NmorphTag } from './components/nmorph-tag/NmorphTag.vue';
|
|
22
|
+
export { default as NmorphOverlay } from './components/nmorph-overlay/NmorphOverlay.vue';
|
|
23
|
+
export { default as NmorphImage } from './components/nmorph-image/NmorphImage.vue';
|
|
24
|
+
export { default as NmorphImagePreview } from './components/nmorph-image-preview/NmorphImagePreview.vue';
|
|
25
|
+
export { default as NmorphCarousel } from './components/nmorph-carousel/NmorphCarousel.vue';
|
|
26
|
+
export { default as NmorphCarouselItem } from './components/nmorph-carousel/components/nmorph-carousel-item/NmorphCarouselItem.vue';
|
|
27
|
+
export { default as NmorphFormItem } from './components/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue';
|
|
28
|
+
export { default as NmorphForm } from './components/nmorph-form/NmorphForm.vue';
|
|
29
|
+
export { default as NmorphScroll } from './components/nmorph-scroll/NmorphScroll.vue';
|
|
30
|
+
export { default as NmorphDropdown } from './components/nmorph-dropdown/NmorphDropdown.vue';
|
|
31
|
+
export { default as NmorphCalendar } from './components/nmorph-calendar/NmorphCalendar.vue';
|
|
32
|
+
export { default as NmorphTable } from './components/nmorph-table/NmorphTable.vue';
|
|
33
|
+
export { default as NmorphTableColumn } from './components/nmorph-table/components/nmorph-table-column/NmorphTableColumn.vue';
|
|
34
|
+
export { default as NmorphTableCell } from './components/nmorph-table/components/nmorph-table-cell/NmorphTableCell.vue';
|
|
35
|
+
export { default as NmorphDivider } from './components/nmorph-divider/NmorphDivider.vue';
|
|
36
|
+
export { default as NmorphCollapse } from './components/nmorph-collapse/NmorphCollapse.vue';
|
|
37
|
+
export { default as NmorphCollapseItem } from './components/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue';
|
|
38
|
+
export { default as NmorphProgress } from './components/nmorph-progress/NmorphProgress.vue';
|
|
39
|
+
export { default as NmorphBacktop } from './components/nmorph-backtop/NmorphBacktop.vue';
|
|
40
|
+
export { default as NmorphBadge } from './components/nmorph-badge/NmorphBadge.vue';
|
|
41
|
+
export { default as NmorphAvatar } from './components/nmorph-avatar/NmorphAvatar.vue';
|
|
42
|
+
export { default as NmorphTabs } from './components/nmorph-tabs/NmorphTabs.vue';
|
|
43
|
+
export { default as NmorphTabPane } from './components/nmorph-tabs/components/nmorph-tab-pane/NmorphTabPane.vue';
|
|
44
|
+
export { default as NmorphBreadcrumb } from './components/nmorph-breadcrumb/NmorphBreadcrumb.vue';
|
|
45
|
+
export { default as NmorphBreadcrumbItem } from './components/nmorph-breadcrumb/components/nmorph-breadcrumb-item/NmorphBreadcrumbItem.vue';
|
|
46
|
+
export { default as NmorphAlert } from './components/nmorph-alert/NmorphAlert.vue';
|
|
47
|
+
export { default as NmorphDialog } from './components/nmorph-dialog/NmorphDialog.vue';
|
|
48
|
+
export { default as NmorphSkeleton } from './components/nmorph-skeleton/NmorphSkeleton.vue';
|
|
49
|
+
export { default as NmorphSkeletonItem } from './components/nmorph-skeleton/components/NmorphSkeletonItem.vue';
|
|
50
|
+
export { default as NmorphPagination } from './components/nmorph-pagination/NmorphPagination.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useEventManager: () => void;
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import { Ref, ComputedRef } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
export declare const enum
|
|
2
|
+
import { NmorphAvailableFormValueType } from '../components/nmorph-form/types';
|
|
3
|
+
export declare const enum NmorphArrayValidationOperator {
|
|
4
4
|
'contains-one' = "contains-one",
|
|
5
5
|
'not-contains' = "not-contains",
|
|
6
6
|
'full-eq' = "full-eq"
|
|
7
7
|
}
|
|
8
|
-
export declare enum
|
|
8
|
+
export declare enum NmorphNumberCompareOperator {
|
|
9
9
|
'eq' = "eq",
|
|
10
10
|
'gte' = "gte",
|
|
11
11
|
'lte' = "lte",
|
|
12
12
|
'gt' = "gt",
|
|
13
13
|
'lt' = "lt"
|
|
14
14
|
}
|
|
15
|
-
export declare enum
|
|
15
|
+
export declare enum NmorphBooleanCompareOperator {
|
|
16
16
|
'eq' = "eq",
|
|
17
17
|
'not-eq' = "not-eq"
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface INmorphRule {
|
|
20
20
|
pattern?: RegExp;
|
|
21
|
-
numberCompareType?: keyof typeof
|
|
22
|
-
booleanCompareType?: keyof typeof
|
|
23
|
-
arrayCompareType?: keyof typeof
|
|
21
|
+
numberCompareType?: keyof typeof NmorphNumberCompareOperator;
|
|
22
|
+
booleanCompareType?: keyof typeof NmorphBooleanCompareOperator;
|
|
23
|
+
arrayCompareType?: keyof typeof NmorphArrayValidationOperator;
|
|
24
24
|
compareValue?: number | string | string[];
|
|
25
25
|
error: string;
|
|
26
26
|
}
|
|
27
|
-
export type
|
|
28
|
-
export type
|
|
29
|
-
export interface
|
|
30
|
-
inputValue:
|
|
31
|
-
rules:
|
|
27
|
+
export type NmorphValidationInputValueType = NmorphAvailableFormValueType | null;
|
|
28
|
+
export type NmorphRulesType = INmorphRule[];
|
|
29
|
+
export interface INmorphUseValidationPayload {
|
|
30
|
+
inputValue: NmorphValidationInputValueType;
|
|
31
|
+
rules: NmorphRulesType | [];
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
33
|
+
export interface INmorphTextValidationRule extends INmorphRule {
|
|
34
34
|
pattern: RegExp;
|
|
35
35
|
}
|
|
36
|
-
export interface
|
|
37
|
-
numberCompareType: keyof typeof
|
|
36
|
+
export interface INmorphNumberValidationRule extends INmorphRule {
|
|
37
|
+
numberCompareType: keyof typeof NmorphNumberCompareOperator;
|
|
38
38
|
compareValue: number;
|
|
39
39
|
}
|
|
40
|
-
export interface
|
|
41
|
-
booleanCompareType:
|
|
40
|
+
export interface INmorphRadioGroupValidationRule extends INmorphRule {
|
|
41
|
+
booleanCompareType: NmorphBooleanCompareOperator;
|
|
42
42
|
compareValue: string;
|
|
43
43
|
}
|
|
44
|
-
export interface
|
|
45
|
-
arrayCompareType: keyof typeof
|
|
44
|
+
export interface INmorphCheckboxGroupValidationRule extends INmorphRule {
|
|
45
|
+
arrayCompareType: keyof typeof NmorphArrayValidationOperator;
|
|
46
46
|
compareValue: string[];
|
|
47
47
|
}
|
|
48
|
-
export declare const useFieldValidation: (data:
|
|
48
|
+
export declare const useFieldValidation: (data: INmorphUseValidationPayload) => {
|
|
49
49
|
touched: Ref<boolean>;
|
|
50
50
|
valid: ComputedRef<boolean>;
|
|
51
51
|
errors: Ref<string[]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref, ComputedRef } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
export declare const useFormValidation: (formData:
|
|
2
|
+
import { NmorphFormValueType } from '../components/nmorph-form/types';
|
|
3
|
+
export declare const useFormValidation: (formData: NmorphFormValueType, validateFormOnLoad?: boolean) => {
|
|
4
4
|
fields: Record<string, {
|
|
5
5
|
touched: Ref<boolean>;
|
|
6
6
|
valid: ComputedRef<boolean>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NmorphDomElementType, NmorphPlacementType } from '../types/common';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
|
-
interface
|
|
4
|
-
initialPlacement:
|
|
5
|
-
contentDOMElement: Ref<
|
|
6
|
-
relativeElement:
|
|
3
|
+
interface INmorphUsePlacementPayload {
|
|
4
|
+
initialPlacement: NmorphPlacementType;
|
|
5
|
+
contentDOMElement: Ref<NmorphDomElementType>;
|
|
6
|
+
relativeElement: NmorphDomElementType | Ref<NmorphDomElementType>;
|
|
7
7
|
yOffset?: number;
|
|
8
8
|
xOffset?: number;
|
|
9
9
|
}
|
|
10
|
-
export declare const usePlacement: (data:
|
|
10
|
+
export declare const usePlacement: (data: INmorphUsePlacementPayload) => {
|
|
11
11
|
placement: Ref<"left" | "right" | "top" | "bottom">;
|
|
12
12
|
placementCoords: Ref<{
|
|
13
13
|
x: string;
|
|
@@ -12,7 +12,7 @@ export declare enum NmorphComponentDirection {
|
|
|
12
12
|
row = "row",
|
|
13
13
|
column = "column"
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface INmorphCommonInputProps {
|
|
16
16
|
height?: keyof typeof NmorphComponentHeight;
|
|
17
17
|
fill?: boolean;
|
|
18
18
|
disabled?: boolean;
|
|
@@ -62,13 +62,13 @@ export declare enum NmorphComponentPosition {
|
|
|
62
62
|
top = "top",
|
|
63
63
|
bottom = "bottom"
|
|
64
64
|
}
|
|
65
|
-
export type
|
|
66
|
-
export type
|
|
67
|
-
export interface
|
|
65
|
+
export type NmorphPlacementType = keyof typeof NmorphComponentPosition;
|
|
66
|
+
export type NmorphDomElementType = HTMLElement | null;
|
|
67
|
+
export interface INmorphCoords<T> {
|
|
68
68
|
x: T;
|
|
69
69
|
y: T;
|
|
70
70
|
}
|
|
71
|
-
export declare enum
|
|
71
|
+
export declare enum NmorphImageFit {
|
|
72
72
|
fill = "fill",
|
|
73
73
|
contain = "contain",
|
|
74
74
|
cover = "cover",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@nmorph/nmorph-ui-kit",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.5",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": "18.13.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"./dist/styles/main.scss": "./dist/styles/main.scss"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
|
-
"build": "
|
|
41
|
+
"build": "npm run build:types && vite build",
|
|
42
42
|
"lint:es:check": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src/",
|
|
43
43
|
"lint:es": "eslint --ext .js,.ts,.vue --ignore-path .gitignore --fix src/",
|
|
44
44
|
"lint:style:check": "stylelint ./src/**/*.{scss,vue}",
|
|
@@ -52,35 +52,23 @@
|
|
|
52
52
|
"story:dev": "histoire dev",
|
|
53
53
|
"story:build": "histoire build",
|
|
54
54
|
"story:preview": "histoire preview",
|
|
55
|
-
"test:dev": "npx vitest"
|
|
55
|
+
"test:dev": "npx vitest",
|
|
56
|
+
"build:types": "vue-tsc --declaration --emitDeclarationOnly --outDir dist"
|
|
56
57
|
},
|
|
57
58
|
"dependencies": {
|
|
58
|
-
"@element-plus/icons-vue": "^2.3.1",
|
|
59
|
-
"@faker-js/faker": "^8.3.1",
|
|
60
59
|
"@types/vue-router": "^2.0.0",
|
|
61
|
-
"element-plus": "^2.5.0",
|
|
62
|
-
"libphonenumber-js": "^1.10.53",
|
|
63
|
-
"lodash": "^4.17.21",
|
|
64
|
-
"maska": "^2.1.11",
|
|
65
|
-
"maz-ui": "^3.31.5",
|
|
66
60
|
"normalize.css": "^8.0.1",
|
|
67
|
-
"pinia": "^2.1.7",
|
|
68
|
-
"uuid": "^9.0.1",
|
|
69
61
|
"vue": "^3.4.7",
|
|
70
62
|
"vue-i18n": "^9.9.0",
|
|
71
|
-
"vue-template-es2015-compiler": "^1.9.1"
|
|
72
|
-
"vuescroll": "^5.1.1"
|
|
63
|
+
"vue-template-es2015-compiler": "^1.9.1"
|
|
73
64
|
},
|
|
74
65
|
"devDependencies": {
|
|
75
66
|
"@histoire/plugin-vue": "^0.17.6",
|
|
76
|
-
"@types/js-cookie": "^3.0.6",
|
|
77
67
|
"@types/node": "^20.10.8",
|
|
78
|
-
"@types/uuid": "^9.0.7",
|
|
79
68
|
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
80
69
|
"@typescript-eslint/parser": "^6.18.1",
|
|
81
70
|
"@vitejs/plugin-vue": "^4.4.0",
|
|
82
71
|
"@vue/test-utils": "^2.4.3",
|
|
83
|
-
"ajv": "^8.12.0",
|
|
84
72
|
"eslint": "^8.56.0",
|
|
85
73
|
"eslint-config-prettier": "^9.1.0",
|
|
86
74
|
"eslint-plugin-prettier": "^5.1.3",
|
|
@@ -89,7 +77,6 @@
|
|
|
89
77
|
"happy-dom": "^13.1.0",
|
|
90
78
|
"histoire": "^0.17.6",
|
|
91
79
|
"husky": "^8.0.3",
|
|
92
|
-
"js-cookie": "^3.0.5",
|
|
93
80
|
"mitt": "^3.0.1",
|
|
94
81
|
"prettier": "^3.1.1",
|
|
95
82
|
"sass": "^1.69.7",
|
|
@@ -110,12 +97,6 @@
|
|
|
110
97
|
"vite-svg-loader": "^5.1.0",
|
|
111
98
|
"vitest": "^1.2.0",
|
|
112
99
|
"vue-eslint-parser": "^9.4.0",
|
|
113
|
-
"vue-final-modal": "^4.5.3",
|
|
114
100
|
"vue-tsc": "^1.8.27"
|
|
115
|
-
},
|
|
116
|
-
"peerDependencies": {
|
|
117
|
-
"ajv": "^8.12.0",
|
|
118
|
-
"js-cookie": "^3.0.5",
|
|
119
|
-
"vue-final-modal": "^4.4.5"
|
|
120
101
|
}
|
|
121
102
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Rules, useFormValidation } from '../../hooks';
|
|
2
|
-
export type AvailableFormValueType = string | string[] | number;
|
|
3
|
-
export type FormValue = Record<string, {
|
|
4
|
-
value: AvailableFormValueType;
|
|
5
|
-
rules: Rules;
|
|
6
|
-
}>;
|
|
7
|
-
export type FormValidationData = ReturnType<typeof useFormValidation>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type SelectModelValue = string | string[];
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { NmorphSortOrderType } from '../../types/common';
|
|
2
|
-
import { Ref } from 'vue';
|
|
3
|
-
export type NmorphTableSortType = Record<string, NmorphSortOrderType>;
|
|
4
|
-
export type NmorphDataTableElRecord = Record<string, unknown>;
|
|
5
|
-
export type CellAlignment = 'left' | 'center' | 'right';
|
|
6
|
-
export type NmorphTableDataType = NmorphDataTableElRecord[];
|
|
7
|
-
export interface NmorphTableColumnProps {
|
|
8
|
-
label?: string;
|
|
9
|
-
width?: string;
|
|
10
|
-
alignment?: CellAlignment;
|
|
11
|
-
prop: string;
|
|
12
|
-
}
|
|
13
|
-
export interface NmorphTableColumnData extends NmorphTableColumnProps {
|
|
14
|
-
id?: number;
|
|
15
|
-
}
|
|
16
|
-
export interface NmorphTableDataInjection {
|
|
17
|
-
rows: Ref<NmorphDataTableElRecord[]>;
|
|
18
|
-
columns: Ref<NmorphTableColumnData[]>;
|
|
19
|
-
}
|
|
File without changes
|