@nmorph/nmorph-ui-kit 2.2.10 → 2.2.12
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/data/nmorph-avatar/NmorphAvatar.css +1 -0
- package/dist/components/data/nmorph-avatar/NmorphAvatar.vue.js +74 -46
- package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +26 -21
- package/dist/components/data/nmorph-carousel/NmorphCarousel.vue2.js +4 -4
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +77 -38
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +31 -30
- package/dist/components/data/nmorph-pagination/NmorphPagination.css +1 -1
- package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +33 -28
- package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +18 -17
- package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +8 -8
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.css +1 -1
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue.js +15 -13
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +8 -8
- package/dist/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue2.js +22 -14
- package/dist/components/form/nmorph-radio/NmorphRadio.css +1 -1
- package/dist/components/form/nmorph-radio/NmorphRadio.vue.js +22 -20
- package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +7 -7
- package/dist/components/form/nmorph-radio-group/NmorphRadioGroup.vue2.js +14 -14
- package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue.js +7 -7
- package/dist/hooks/use-common-styles.js +10 -11
- package/dist/index.es.js +695 -694
- package/dist/index.umd.js +27 -28
- package/dist/nuxt.mjs +36 -7
- package/dist/package.json.js +1 -1
- package/dist/plugin.js +21 -20
- package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-image/NmorphImage.vue.d.ts +3 -3
- package/dist/src/components/data/nmorph-image-preview/NmorphImagePreview.vue.d.ts +14 -2
- package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +3 -0
- package/dist/src/components/form/nmorph-checkbox/NmorphCheckbox.vue.d.ts +1 -0
- package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +4 -3
- package/dist/src/components/form/nmorph-radio/NmorphRadio.vue.d.ts +1 -0
- package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +4 -3
- package/dist/src/types/index.d.ts +9 -2
- package/dist/style.css +1 -1
- package/dist/types/index.js +14 -8
- package/package.json +1 -1
package/dist/nuxt.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineNuxtModule as t, addPluginTemplate as
|
|
2
|
-
const
|
|
1
|
+
import { defineNuxtModule as t, addPluginTemplate as n } from "@nuxt/kit";
|
|
2
|
+
const a = t({
|
|
3
3
|
meta: {
|
|
4
4
|
name: "@nmorph/nmorph-ui-kit",
|
|
5
5
|
configKey: "nmorph",
|
|
@@ -10,15 +10,44 @@ const r = t({
|
|
|
10
10
|
defaults: {
|
|
11
11
|
styles: !1
|
|
12
12
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const { styles:
|
|
15
|
-
e.options.build.transpile.push("@nmorph/nmorph-ui-kit"),
|
|
13
|
+
setup(o, e) {
|
|
14
|
+
const { styles: i, ...s } = o;
|
|
15
|
+
e.options.build.transpile.push("@nmorph/nmorph-ui-kit"), i === "all" && e.options.css.push("@nmorph/nmorph-ui-kit/dist/style.css"), n({
|
|
16
|
+
filename: "nmorph-i18n.mjs",
|
|
17
|
+
getContents: () => `
|
|
18
|
+
import { defineNuxtPlugin } from '#app'
|
|
19
|
+
import { en, ru, zh } from '@nmorph/nmorph-ui-kit/plugin'
|
|
20
|
+
|
|
21
|
+
const options = ${JSON.stringify(s)}
|
|
22
|
+
const libraryMessages = { en, ru, zh }
|
|
23
|
+
|
|
24
|
+
const mergeMessages = (base, overrides = {}) => {
|
|
25
|
+
const result = { ...base }
|
|
26
|
+
Object.entries(overrides).forEach(([locale, messages]) => {
|
|
27
|
+
result[locale] = { ...(result[locale] || {}), ...messages }
|
|
28
|
+
})
|
|
29
|
+
return result
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default defineNuxtPlugin((nuxtApp) => {
|
|
33
|
+
const i18nOptions = { ...(options.i18n || {}) }
|
|
34
|
+
const messages = mergeMessages(libraryMessages, i18nOptions.messages)
|
|
35
|
+
const i18n = nuxtApp.$i18n
|
|
36
|
+
|
|
37
|
+
if (i18n?.mergeLocaleMessage) {
|
|
38
|
+
Object.entries(messages).forEach(([locale, localeMessages]) => {
|
|
39
|
+
i18n.mergeLocaleMessage(locale, localeMessages)
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
`
|
|
44
|
+
}), n({
|
|
16
45
|
filename: "nmorph.client.mjs",
|
|
17
46
|
getContents: () => `
|
|
18
47
|
import { defineNuxtPlugin } from '#app'
|
|
19
48
|
import { NmorphLibrary, en, ru, zh } from '@nmorph/nmorph-ui-kit/plugin'
|
|
20
49
|
|
|
21
|
-
const options = ${JSON.stringify(
|
|
50
|
+
const options = ${JSON.stringify(s)}
|
|
22
51
|
const libraryMessages = { en, ru, zh }
|
|
23
52
|
|
|
24
53
|
const mergeMessages = (base, overrides = {}) => {
|
|
@@ -52,5 +81,5 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
52
81
|
}
|
|
53
82
|
});
|
|
54
83
|
export {
|
|
55
|
-
|
|
84
|
+
a as default
|
|
56
85
|
};
|
package/dist/package.json.js
CHANGED
package/dist/plugin.js
CHANGED
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import { default as
|
|
1
|
+
import { default as T } from "./locales/ru.js";
|
|
2
2
|
import { default as _ } from "./locales/zh.js";
|
|
3
3
|
import { default as w } from "./locales/en.js";
|
|
4
4
|
import { nmorphLog as M } from "./outside-utils/index.js";
|
|
5
|
-
import { AvatarShapeType as E, Locale as
|
|
5
|
+
import { AvatarShapeType as E, Locale as H, NmorphColor as O, NmorphComponentDirection as j, NmorphComponentHeight as A, NmorphComponentPosition as B, NmorphImageFit as F, NmorphRadioStyleType as P, NmorphSelectionControlHeight as R, NmorphSelectionDateType as U, NmorphShadowType as Z, NmorphSortOrder as k } from "./types/index.js";
|
|
6
6
|
import { useNmorphTranslation as h } from "./hooks/use-nmorph-translation.js";
|
|
7
7
|
import { useCommonStyles as i } from "./hooks/use-common-styles.js";
|
|
8
8
|
import { useNmorphTheme as f } from "./outside-hooks/use-nmorph-theme.js";
|
|
9
9
|
import { useNmorphBrowser as c } from "./outside-hooks/use-nmorph-browser.js";
|
|
10
10
|
import { useNmorphZIndex as N } from "./outside-hooks/use-nmorph-z-index.js";
|
|
11
|
-
import { useNmorph as
|
|
12
|
-
import { useNmorphNotification as
|
|
11
|
+
import { useNmorph as G } from "./outside-hooks/use-nmorph.js";
|
|
12
|
+
import { useNmorphNotification as K } from "./outside-hooks/use-nmorph-notification.js";
|
|
13
13
|
const u = {
|
|
14
14
|
install(e, r = {}) {
|
|
15
15
|
if (!r?.i18n?.outsideMessagesMerge) {
|
|
16
16
|
const o = h(r.i18n), m = e.__VUE_I18N__;
|
|
17
|
-
m ? (o.global.messages.value && Object.entries(o.global.messages.value).forEach(([
|
|
18
|
-
m.global.mergeLocaleMessage(
|
|
17
|
+
m ? (o.global.messages.value && Object.entries(o.global.messages.value).forEach(([s, n]) => {
|
|
18
|
+
m.global.mergeLocaleMessage(s, n);
|
|
19
19
|
}), o.global.locale.value && (m.global.locale.value = o.global.locale.value)) : e.use(o);
|
|
20
20
|
}
|
|
21
21
|
i();
|
|
22
|
-
const t = f(r.theme), a = c(), l = N(r.zIndex),
|
|
23
|
-
return e.provide("nmorph",
|
|
22
|
+
const t = f(r.theme), a = c(), l = N(r.zIndex), p = { theme: t, browser: a, zIndex: l };
|
|
23
|
+
return e.provide("nmorph", p), e;
|
|
24
24
|
}
|
|
25
25
|
}, y = u;
|
|
26
26
|
export {
|
|
27
27
|
E as AvatarShapeType,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
H as Locale,
|
|
29
|
+
O as NmorphColor,
|
|
30
|
+
j as NmorphComponentDirection,
|
|
31
|
+
A as NmorphComponentHeight,
|
|
32
|
+
B as NmorphComponentPosition,
|
|
33
|
+
F as NmorphImageFit,
|
|
34
34
|
y as NmorphLibrary,
|
|
35
35
|
P as NmorphRadioStyleType,
|
|
36
|
-
R as
|
|
37
|
-
U as
|
|
38
|
-
Z as
|
|
36
|
+
R as NmorphSelectionControlHeight,
|
|
37
|
+
U as NmorphSelectionDateType,
|
|
38
|
+
Z as NmorphShadowType,
|
|
39
|
+
k as NmorphSortOrder,
|
|
39
40
|
w as en,
|
|
40
41
|
M as nmorphLog,
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
T as ru,
|
|
43
|
+
G as useNmorph,
|
|
43
44
|
c as useNmorphBrowser,
|
|
44
|
-
|
|
45
|
+
K as useNmorphNotification,
|
|
45
46
|
f as useNmorphTheme,
|
|
46
47
|
_ as zh
|
|
47
48
|
};
|
|
@@ -23,12 +23,12 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
23
23
|
color: string;
|
|
24
24
|
disabled: boolean;
|
|
25
25
|
hidden: boolean;
|
|
26
|
+
zIndex: number;
|
|
26
27
|
max: number;
|
|
27
28
|
isDot: boolean;
|
|
28
29
|
isTag: boolean;
|
|
29
30
|
offsetY: number;
|
|
30
31
|
offsetX: number;
|
|
31
|
-
zIndex: number;
|
|
32
32
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, Readonly<{
|
|
33
33
|
default?: (props: Record<string, never>) => unknown;
|
|
34
34
|
value?: (props: NmorphBadgeValueSlotProps) => unknown;
|
|
@@ -12,12 +12,12 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
12
12
|
onError?: (event: Event) => any;
|
|
13
13
|
onLoad?: (event: Event) => any;
|
|
14
14
|
}>, {
|
|
15
|
-
srcSet: string;
|
|
16
|
-
fit: "fill" | "none" | "contain" | "cover" | "scale-down";
|
|
17
15
|
alt: string;
|
|
18
|
-
|
|
16
|
+
fit: "fill" | "none" | "cover" | "contain" | "scale-down";
|
|
19
17
|
loadingText: string;
|
|
20
18
|
loadFailedText: string;
|
|
19
|
+
srcSet: string;
|
|
20
|
+
frameBorder: number;
|
|
21
21
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
22
22
|
error?(_: {}): any;
|
|
23
23
|
loading?(_: {}): any;
|
|
@@ -8,8 +8,9 @@ interface INmorphProps {
|
|
|
8
8
|
minScaleLevel?: number;
|
|
9
9
|
maxScaleLevel?: number;
|
|
10
10
|
zIndex?: number;
|
|
11
|
+
showTrigger?: boolean;
|
|
11
12
|
}
|
|
12
|
-
declare const _default: DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
13
|
+
declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
13
14
|
"update:model-value": (value: boolean) => any;
|
|
14
15
|
}, string, PublicProps, Readonly<INmorphProps> & Readonly<{
|
|
15
16
|
"onUpdate:model-value"?: (value: boolean) => any;
|
|
@@ -20,5 +21,16 @@ declare const _default: DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentO
|
|
|
20
21
|
scaleStep: number;
|
|
21
22
|
minScaleLevel: number;
|
|
22
23
|
maxScaleLevel: number;
|
|
23
|
-
|
|
24
|
+
showTrigger: boolean;
|
|
25
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>, {
|
|
26
|
+
loading?(_: {}): any;
|
|
27
|
+
loading?(_: {}): any;
|
|
28
|
+
error?(_: {}): any;
|
|
29
|
+
error?(_: {}): any;
|
|
30
|
+
}>;
|
|
24
31
|
export default _default;
|
|
32
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NmorphComponentHeight } from '../../../types';
|
|
1
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
3
|
interface INmorphProps {
|
|
3
4
|
totalElementsQuantity: number;
|
|
@@ -7,12 +8,14 @@ interface INmorphProps {
|
|
|
7
8
|
hideOnSinglePage?: boolean;
|
|
8
9
|
maxVisiblePages?: number;
|
|
9
10
|
fastForwardStep?: number;
|
|
11
|
+
height?: keyof typeof NmorphComponentHeight;
|
|
10
12
|
}
|
|
11
13
|
declare const _default: DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
12
14
|
"update:model-value": (currentPage: number) => any;
|
|
13
15
|
}, string, PublicProps, Readonly<INmorphProps> & Readonly<{
|
|
14
16
|
"onUpdate:model-value"?: (currentPage: number) => any;
|
|
15
17
|
}>, {
|
|
18
|
+
height: "thick" | "basic" | "thin";
|
|
16
19
|
disabled: boolean;
|
|
17
20
|
modelValue: number;
|
|
18
21
|
elementsQuantityOnPage: number;
|
|
@@ -13,6 +13,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphCheckbox
|
|
|
13
13
|
modelValue: boolean;
|
|
14
14
|
design: NmorphCheckboxDesignType;
|
|
15
15
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
16
|
+
default?(_: {}): any;
|
|
16
17
|
default?(_: {}): any;
|
|
17
18
|
label?(_: {}): any;
|
|
18
19
|
}>;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { INmorphCheckboxOption, INmorphCommonInputProps, NmorphCheckboxDesignType, NmorphComponentDirection } from '../../../types';
|
|
1
|
+
import { INmorphCheckboxOption, INmorphCommonInputProps, NmorphCheckboxDesignType, NmorphComponentDirection, NmorphSelectionControlHeightType } from '../../../types';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
-
interface INmorphProps extends INmorphCommonInputProps {
|
|
3
|
+
interface INmorphProps extends Omit<INmorphCommonInputProps, 'height'> {
|
|
4
4
|
modelValue: string[];
|
|
5
5
|
options?: INmorphCheckboxOption[];
|
|
6
6
|
design?: NmorphCheckboxDesignType;
|
|
7
7
|
direction?: keyof typeof NmorphComponentDirection;
|
|
8
|
+
height?: NmorphSelectionControlHeightType;
|
|
8
9
|
}
|
|
9
10
|
declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
10
11
|
"update:model-value": (val: string[]) => any;
|
|
11
12
|
}, string, PublicProps, Readonly<INmorphProps> & Readonly<{
|
|
12
13
|
"onUpdate:model-value"?: (val: string[]) => any;
|
|
13
14
|
}>, {
|
|
14
|
-
height: "thick" | "basic" | "thin";
|
|
15
|
+
height: "thick" | "basic" | "thin" | "extra-thin";
|
|
15
16
|
disabled: boolean;
|
|
16
17
|
modelValue: string[];
|
|
17
18
|
design: NmorphCheckboxDesignType;
|
|
@@ -17,6 +17,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
17
17
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
18
18
|
label?(_: {}): any;
|
|
19
19
|
label?(_: {}): any;
|
|
20
|
+
default?(_: {}): any;
|
|
20
21
|
}>;
|
|
21
22
|
export default _default;
|
|
22
23
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { INmorphCommonInputProps, INmorphRadioOption, NmorphComponentDirection, NmorphRadioStyleType } from '../../../types';
|
|
1
|
+
import { INmorphCommonInputProps, INmorphRadioOption, NmorphComponentDirection, NmorphRadioStyleType, NmorphSelectionControlHeightType } from '../../../types';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
type NmorphListRadioOptionElementType = Omit<INmorphRadioOption, 'checked'>;
|
|
4
|
-
interface INmorphProps extends INmorphCommonInputProps {
|
|
4
|
+
interface INmorphProps extends Omit<INmorphCommonInputProps, 'height'> {
|
|
5
5
|
modelValue: string;
|
|
6
6
|
options?: NmorphListRadioOptionElementType[];
|
|
7
7
|
styleType?: keyof typeof NmorphRadioStyleType;
|
|
8
8
|
direction?: keyof typeof NmorphComponentDirection;
|
|
9
|
+
height?: NmorphSelectionControlHeightType;
|
|
9
10
|
}
|
|
10
11
|
declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
11
12
|
"update:model-value": (val: string) => any;
|
|
@@ -13,7 +14,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
|
|
|
13
14
|
"onUpdate:model-value"?: (val: string) => any;
|
|
14
15
|
}>, {
|
|
15
16
|
styleType: "button" | "radio-style";
|
|
16
|
-
height: "thick" | "basic" | "thin";
|
|
17
|
+
height: "thick" | "basic" | "thin" | "extra-thin";
|
|
17
18
|
disabled: boolean;
|
|
18
19
|
modelValue: string;
|
|
19
20
|
options: NmorphListRadioOptionElementType[];
|
|
@@ -15,6 +15,13 @@ export declare enum NmorphComponentHeight {
|
|
|
15
15
|
basic = "basic-component",
|
|
16
16
|
thin = "thin-component"
|
|
17
17
|
}
|
|
18
|
+
export declare const NmorphSelectionControlHeight: {
|
|
19
|
+
readonly 'extra-thin': "extra-thin-component";
|
|
20
|
+
readonly thick: NmorphComponentHeight.thick;
|
|
21
|
+
readonly basic: NmorphComponentHeight.basic;
|
|
22
|
+
readonly thin: NmorphComponentHeight.thin;
|
|
23
|
+
};
|
|
24
|
+
export type NmorphSelectionControlHeightType = keyof typeof NmorphSelectionControlHeight;
|
|
18
25
|
export type NmorphSortOrderType = keyof typeof NmorphSortOrder | undefined;
|
|
19
26
|
export declare enum AvatarShapeType {
|
|
20
27
|
circle = "circle",
|
|
@@ -169,7 +176,7 @@ export interface INmorphCheckboxOption {
|
|
|
169
176
|
modelValue?: boolean;
|
|
170
177
|
label?: string;
|
|
171
178
|
design?: NmorphCheckboxDesignType;
|
|
172
|
-
height?:
|
|
179
|
+
height?: NmorphSelectionControlHeightType;
|
|
173
180
|
}
|
|
174
181
|
export type NmorphCheckboxDesignType = 'button' | 'checkbox';
|
|
175
182
|
export type NmorphCheckboxGroupSelectedValueInjectionType = Ref<string[]>;
|
|
@@ -179,7 +186,7 @@ export interface INmorphRadioOption {
|
|
|
179
186
|
label?: string;
|
|
180
187
|
value: string;
|
|
181
188
|
tabindex?: number;
|
|
182
|
-
height?:
|
|
189
|
+
height?: NmorphSelectionControlHeightType;
|
|
183
190
|
}
|
|
184
191
|
export declare enum NmorphRadioStyleType {
|
|
185
192
|
'radio-style' = "radio-style",
|