@nmorph/nmorph-ui-kit 2.2.42 → 2.2.44

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.
Files changed (48) hide show
  1. package/dist/assets/icons/chevron-up.svg.js +4 -4
  2. package/dist/assets/icons/download.svg.js +5 -5
  3. package/dist/assets/icons/open.svg.js +2 -2
  4. package/dist/assets/icons/search.svg.js +1 -1
  5. package/dist/assets/icons/smile.svg.js +4 -4
  6. package/dist/components/basic/nmorph-button/NmorphButton.vue.js +16 -16
  7. package/dist/components/basic/nmorph-icon/NmorphIcon.css +1 -1
  8. package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.css +1 -0
  9. package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.vue.js +207 -0
  10. package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.vue3.js +6 -0
  11. package/dist/components/data/nmorph-emoji-picker/NmorphEmojiPicker.css +1 -0
  12. package/dist/components/data/nmorph-emoji-picker/NmorphEmojiPicker.vue.js +371 -0
  13. package/dist/components/data/nmorph-emoji-picker/NmorphEmojiPicker.vue3.js +6 -0
  14. package/dist/components/data/nmorph-file-card/NmorphFileCard.css +1 -0
  15. package/dist/components/data/nmorph-file-card/NmorphFileCard.vue.js +124 -0
  16. package/dist/components/data/nmorph-file-card/NmorphFileCard.vue3.js +6 -0
  17. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +164 -150
  18. package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue.js +8 -8
  19. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.css +1 -0
  20. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue.js +147 -0
  21. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue3.js +6 -0
  22. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.css +1 -1
  23. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue.js +154 -125
  24. package/dist/components/form/nmorph-file-upload/types.js +9 -9
  25. package/dist/hooks/use-common-styles.js +73 -22
  26. package/dist/index.es.js +861 -849
  27. package/dist/index.umd.js +76 -25
  28. package/dist/package.json.js +1 -1
  29. package/dist/src/components/data/index.d.ts +8 -0
  30. package/dist/src/components/data/nmorph-audio-preview/NmorphAudioPreview.vue.d.ts +38 -0
  31. package/dist/src/components/data/nmorph-audio-preview/types.d.ts +20 -0
  32. package/dist/src/components/data/nmorph-calendar/NmorphCalendar.vue.d.ts +1 -1
  33. package/dist/src/components/data/nmorph-emoji-picker/NmorphEmojiPicker.vue.d.ts +25 -0
  34. package/dist/src/components/data/nmorph-emoji-picker/types.d.ts +50 -0
  35. package/dist/src/components/data/nmorph-file-card/NmorphFileCard.vue.d.ts +30 -0
  36. package/dist/src/components/data/nmorph-file-card/types.d.ts +18 -0
  37. package/dist/src/components/data/nmorph-media-tile/NmorphMediaTile.vue.d.ts +1 -1
  38. package/dist/src/components/data/nmorph-video-preview/NmorphVideoPreview.vue.d.ts +41 -0
  39. package/dist/src/components/data/nmorph-video-preview/types.d.ts +27 -0
  40. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue.d.ts +1 -1
  41. package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +1 -1
  42. package/dist/src/components/form/nmorph-file-upload/types.d.ts +4 -0
  43. package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +1 -1
  44. package/dist/src/components/form/nmorph-slider/NmorphSlider.vue.d.ts +1 -1
  45. package/dist/src/utils/file-types.d.ts +8 -1
  46. package/dist/style.css +1 -1
  47. package/dist/utils/file-types.js +28 -21
  48. package/package.json +23 -24
@@ -1,4 +1,4 @@
1
- const a = "2.2.42", e = {
1
+ const a = "2.2.44", e = {
2
2
  version: a
3
3
  };
4
4
  export {
@@ -1,6 +1,8 @@
1
1
  export { default as NmorphAvatar } from './nmorph-avatar/NmorphAvatar.vue';
2
2
  export { default as NmorphAudioMeter } from './nmorph-audio-meter/NmorphAudioMeter.vue';
3
3
  export * from './nmorph-audio-meter/types';
4
+ export { default as NmorphAudioPreview } from './nmorph-audio-preview/NmorphAudioPreview.vue';
5
+ export * from './nmorph-audio-preview/types';
4
6
  export { default as NmorphBadge } from './nmorph-badge/NmorphBadge.vue';
5
7
  export { default as NmorphCalendar } from './nmorph-calendar/NmorphCalendar.vue';
6
8
  export * from './nmorph-calendar/types';
@@ -14,6 +16,10 @@ export { default as NmorphCollapse } from './nmorph-collapse/NmorphCollapse.vue'
14
16
  export { default as NmorphCollapseItem } from './nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue';
15
17
  export * from './nmorph-collapse/types';
16
18
  export { default as NmorphEmpty } from './nmorph-empty/NmorphEmpty.vue';
19
+ export { default as NmorphEmojiPicker } from './nmorph-emoji-picker/NmorphEmojiPicker.vue';
20
+ export * from './nmorph-emoji-picker/types';
21
+ export { default as NmorphFileCard } from './nmorph-file-card/NmorphFileCard.vue';
22
+ export * from './nmorph-file-card/types';
17
23
  export { default as NmorphImage } from './nmorph-image/NmorphImage.vue';
18
24
  export { default as NmorphImagePreview } from './nmorph-image-preview/NmorphImagePreview.vue';
19
25
  export * from './nmorph-image-preview/types';
@@ -36,3 +42,5 @@ export { default as NmorphTagItem } from './nmorph-tag-list/components/nmorph-ta
36
42
  export * from './nmorph-tag-list/types';
37
43
  export { default as NmorphVirtualList } from './nmorph-virtual-list/NmorphVirtualList.vue';
38
44
  export * from './nmorph-virtual-list/types';
45
+ export { default as NmorphVideoPreview } from './nmorph-video-preview/NmorphVideoPreview.vue';
46
+ export * from './nmorph-video-preview/types';
@@ -0,0 +1,38 @@
1
+ import { INmorphAudioPreviewProps } from './types';
2
+ import { DefineComponent, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphAudioPreviewProps, {
4
+ audioRef: Ref<HTMLAudioElement, HTMLAudioElement>;
5
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
6
+ error: (val: Event) => any;
7
+ pause: (val: Event) => any;
8
+ play: (val: Event) => any;
9
+ open: () => any;
10
+ download: () => any;
11
+ }, string, PublicProps, Readonly<INmorphAudioPreviewProps> & Readonly<{
12
+ onError?: (val: Event) => any;
13
+ onPause?: (val: Event) => any;
14
+ onPlay?: (val: Event) => any;
15
+ onOpen?: () => any;
16
+ onDownload?: () => any;
17
+ }>, {
18
+ name: string;
19
+ loading: boolean;
20
+ error: boolean;
21
+ width: string | number;
22
+ durationMs: number;
23
+ compact: boolean;
24
+ preload: "metadata" | "auto" | "none";
25
+ downloadHref: string;
26
+ errorText: string;
27
+ showDefaultActions: boolean;
28
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
29
+ audioRef: HTMLAudioElement;
30
+ }, HTMLDivElement>, {
31
+ actions?(_: {}): any;
32
+ }>;
33
+ export default _default;
34
+ type __VLS_WithTemplateSlots<T, S> = T & {
35
+ new (): {
36
+ $slots: S;
37
+ };
38
+ };
@@ -0,0 +1,20 @@
1
+ export interface INmorphAudioPreviewProps {
2
+ src: string;
3
+ name?: string;
4
+ durationMs?: number;
5
+ width?: number | string;
6
+ compact?: boolean;
7
+ preload?: 'none' | 'metadata' | 'auto';
8
+ downloadHref?: string;
9
+ loading?: boolean;
10
+ error?: boolean;
11
+ errorText?: string;
12
+ showDefaultActions?: boolean;
13
+ }
14
+ export interface INmorphAudioPreviewEmit {
15
+ (e: 'play', val: Event): void;
16
+ (e: 'pause', val: Event): void;
17
+ (e: 'open'): void;
18
+ (e: 'download'): void;
19
+ (e: 'error', val: Event): void;
20
+ }
@@ -10,9 +10,9 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphCalendar
10
10
  }>, {
11
11
  type: "date" | "dates" | "daterange";
12
12
  modelValue: NmorphSelectedDateModelType;
13
+ range: [Date, Date];
13
14
  markToday: boolean;
14
15
  initialDate: Date;
15
- range: [Date, Date];
16
16
  cellHeight: string | number;
17
17
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>, {
18
18
  header?(_: {}): any;
@@ -0,0 +1,25 @@
1
+ import { INmorphEmojiPickerI18n, INmorphEmojiPickerProps } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ import { NmorphEmojiPickerDataSource } from '../..';
4
+ declare const _default: DefineComponent<INmorphEmojiPickerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
5
+ select: (val: string) => any;
6
+ expand: () => any;
7
+ collapse: () => any;
8
+ }, string, PublicProps, Readonly<INmorphEmojiPickerProps> & Readonly<{
9
+ onSelect?: (val: string) => any;
10
+ onExpand?: () => any;
11
+ onCollapse?: () => any;
12
+ }>, {
13
+ height: string | number;
14
+ disabled: boolean;
15
+ width: string | number;
16
+ i18n: INmorphEmojiPickerI18n;
17
+ language: string;
18
+ dataSource: NmorphEmojiPickerDataSource;
19
+ quickList: string[];
20
+ initialExpanded: boolean;
21
+ columns: number;
22
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {
23
+ gridRef: HTMLDivElement;
24
+ }, HTMLDivElement>;
25
+ export default _default;
@@ -0,0 +1,50 @@
1
+ export type NmorphEmojiPickerGroupKey = string | number;
2
+ export interface INmorphEmojiPickerSkinToneVariant {
3
+ emoji: string;
4
+ annotation?: string;
5
+ tags?: string[];
6
+ tone?: string;
7
+ }
8
+ export interface INmorphEmojiPickerItem {
9
+ emoji: string;
10
+ annotation?: string;
11
+ tags?: string[];
12
+ group?: NmorphEmojiPickerGroupKey;
13
+ order?: number;
14
+ skinToneVariants?: Array<string | INmorphEmojiPickerSkinToneVariant>;
15
+ }
16
+ export interface INmorphEmojiPickerGroup {
17
+ group: NmorphEmojiPickerGroupKey;
18
+ label?: string;
19
+ emojis: Array<string | INmorphEmojiPickerItem>;
20
+ order?: number;
21
+ }
22
+ export type NmorphEmojiPickerDataSource = Array<string | INmorphEmojiPickerItem | INmorphEmojiPickerGroup> | Record<string, Array<string | INmorphEmojiPickerItem> | INmorphEmojiPickerGroup | unknown>;
23
+ export interface INmorphEmojiPickerI18n {
24
+ searchPlaceholder?: string;
25
+ searchLabel?: string;
26
+ quickLabel?: string;
27
+ expandLabel?: string;
28
+ collapseLabel?: string;
29
+ noResults?: string;
30
+ categoryLabel?: string;
31
+ resultsLabel?: string;
32
+ categories?: Record<string, string>;
33
+ categoryLabels?: Record<string, string>;
34
+ }
35
+ export interface INmorphEmojiPickerProps {
36
+ language?: string;
37
+ dataSource?: NmorphEmojiPickerDataSource;
38
+ i18n?: INmorphEmojiPickerI18n;
39
+ quickList?: string[];
40
+ initialExpanded?: boolean;
41
+ width?: number | string;
42
+ height?: number | string;
43
+ columns?: number;
44
+ disabled?: boolean;
45
+ }
46
+ export interface INmorphEmojiPickerEmit {
47
+ (e: 'select', val: string): void;
48
+ (e: 'expand'): void;
49
+ (e: 'collapse'): void;
50
+ }
@@ -0,0 +1,30 @@
1
+ import { INmorphFileCardProps } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphFileCardProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
4
+ error: () => any;
5
+ open: () => any;
6
+ download: () => any;
7
+ }, string, PublicProps, Readonly<INmorphFileCardProps> & Readonly<{
8
+ onError?: () => any;
9
+ onOpen?: () => any;
10
+ onDownload?: () => any;
11
+ }>, {
12
+ loading: boolean;
13
+ error: boolean;
14
+ size: number;
15
+ previewSrc: string;
16
+ compact: boolean;
17
+ downloadHref: string;
18
+ errorText: string;
19
+ showDefaultActions: boolean;
20
+ extension: string;
21
+ mimeType: string;
22
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>, {
23
+ actions?(_: {}): any;
24
+ }>;
25
+ export default _default;
26
+ type __VLS_WithTemplateSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1,18 @@
1
+ export interface INmorphFileCardProps {
2
+ name: string;
3
+ extension?: string;
4
+ mimeType?: string;
5
+ size?: number;
6
+ previewSrc?: string;
7
+ downloadHref?: string;
8
+ compact?: boolean;
9
+ loading?: boolean;
10
+ error?: boolean;
11
+ errorText?: string;
12
+ showDefaultActions?: boolean;
13
+ }
14
+ export interface INmorphFileCardEmit {
15
+ (e: 'open'): void;
16
+ (e: 'download'): void;
17
+ (e: 'error'): void;
18
+ }
@@ -9,6 +9,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphMediaTil
9
9
  error: boolean;
10
10
  src: string;
11
11
  fit: NmorphMediaTileFit;
12
+ errorText: string;
12
13
  srcObject: MediaStream;
13
14
  mirrored: boolean;
14
15
  muted: boolean;
@@ -21,7 +22,6 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphMediaTil
21
22
  speaking: boolean;
22
23
  selected: boolean;
23
24
  pinned: boolean;
24
- errorText: string;
25
25
  }, {}, {}, {}, string, ComponentProvideOptions, true, {
26
26
  videoRef: HTMLVideoElement;
27
27
  }, HTMLDivElement>, {
@@ -0,0 +1,41 @@
1
+ import { INmorphVideoPreviewProps } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ import { NmorphVideoPreviewFit } from '../..';
4
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphVideoPreviewProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
5
+ error: (val: Event) => any;
6
+ pause: (val: Event) => any;
7
+ play: (val: Event) => any;
8
+ open: () => any;
9
+ download: () => any;
10
+ }, string, PublicProps, Readonly<INmorphVideoPreviewProps> & Readonly<{
11
+ onError?: (val: Event) => any;
12
+ onPause?: (val: Event) => any;
13
+ onPlay?: (val: Event) => any;
14
+ onOpen?: () => any;
15
+ onDownload?: () => any;
16
+ }>, {
17
+ name: string;
18
+ loading: boolean;
19
+ height: string | number;
20
+ error: boolean;
21
+ width: string | number;
22
+ fit: NmorphVideoPreviewFit;
23
+ durationMs: number;
24
+ compact: boolean;
25
+ preload: "metadata" | "auto" | "none";
26
+ downloadHref: string;
27
+ errorText: string;
28
+ showDefaultActions: boolean;
29
+ muted: boolean;
30
+ playsinline: boolean;
31
+ poster: string;
32
+ controls: boolean;
33
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>, {
34
+ actions?(_: {}): any;
35
+ }>;
36
+ export default _default;
37
+ type __VLS_WithTemplateSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -0,0 +1,27 @@
1
+ export type NmorphVideoPreviewFit = 'cover' | 'contain';
2
+ export interface INmorphVideoPreviewProps {
3
+ src: string;
4
+ poster?: string;
5
+ name?: string;
6
+ width?: number | string;
7
+ height?: number | string;
8
+ durationMs?: number;
9
+ compact?: boolean;
10
+ controls?: boolean;
11
+ muted?: boolean;
12
+ playsinline?: boolean;
13
+ preload?: 'none' | 'metadata' | 'auto';
14
+ fit?: NmorphVideoPreviewFit;
15
+ downloadHref?: string;
16
+ loading?: boolean;
17
+ error?: boolean;
18
+ errorText?: string;
19
+ showDefaultActions?: boolean;
20
+ }
21
+ export interface INmorphVideoPreviewEmit {
22
+ (e: 'play', val: Event): void;
23
+ (e: 'pause', val: Event): void;
24
+ (e: 'open'): void;
25
+ (e: 'download'): void;
26
+ (e: 'error', val: Event): void;
27
+ }
@@ -9,6 +9,6 @@ declare const _default: DefineComponent<INmorphYearMonthPickerProps, {}, {}, {},
9
9
  "onUpdate-month"?: (val: string) => any;
10
10
  "onBack-to-years"?: () => any;
11
11
  }>, {
12
- type: "year" | "month";
12
+ type: "month" | "year";
13
13
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
14
14
  export default _default;
@@ -14,11 +14,11 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphFileUplo
14
14
  }>, {
15
15
  modelValue: INmorphCustomFileData[];
16
16
  disabled: boolean;
17
+ compact: boolean;
17
18
  allowedTypes: string[];
18
19
  multiple: boolean;
19
20
  photoWithPreview: boolean;
20
21
  buttonText: string;
21
- compact: boolean;
22
22
  layout: "list" | "grid" | "inline";
23
23
  fileNameWidth: string | number;
24
24
  }, {}, {}, {}, string, ComponentProvideOptions, true, {
@@ -24,7 +24,9 @@ export declare enum NmorphDocResolution {
24
24
  pdf = "application/pdf",
25
25
  msword = "application/msword",
26
26
  docx = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
27
+ xls = "application/vnd.ms-excel",
27
28
  xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
29
+ ppt = "application/vnd.ms-powerpoint",
28
30
  pptx = "application/vnd.openxmlformats-officedocument.presentationml.presentation",
29
31
  json = "application/json",
30
32
  xml = "application/xml"
@@ -41,7 +43,9 @@ export declare const resolution: {
41
43
  pdf: NmorphDocResolution.pdf;
42
44
  msword: NmorphDocResolution.msword;
43
45
  docx: NmorphDocResolution.docx;
46
+ xls: NmorphDocResolution.xls;
44
47
  xlsx: NmorphDocResolution.xlsx;
48
+ ppt: NmorphDocResolution.ppt;
45
49
  pptx: NmorphDocResolution.pptx;
46
50
  json: NmorphDocResolution.json;
47
51
  xml: NmorphDocResolution.xml;
@@ -10,8 +10,8 @@ declare const _default: DefineComponent<INmorphNumberInputProps, {
10
10
  modelValue: number;
11
11
  height: "basic" | "thick" | "thin";
12
12
  disabled: boolean;
13
- max: number;
14
13
  min: number;
14
+ max: number;
15
15
  step: number;
16
16
  actionBtnPositionRight: boolean;
17
17
  }, {}, {}, {}, string, ComponentProvideOptions, true, {
@@ -11,8 +11,8 @@ declare const _default: DefineComponent<INmorphSliderProps, {}, {}, {}, {}, Comp
11
11
  fill: boolean;
12
12
  modelValue: number;
13
13
  disabled: boolean;
14
- max: number;
15
14
  min: number;
15
+ max: number;
16
16
  step: number;
17
17
  showTooltip: boolean;
18
18
  thumbWidth: number;
@@ -1,8 +1,15 @@
1
1
  import { NmorphResolutionType } from '../components/form/nmorph-file-upload/types';
2
2
  export declare const getPlainFileType: (mimeType: string) => string;
3
3
  export declare const getFileExtension: (fileName: string) => string;
4
- export declare const getKnownResolutionByMime: (mimeType: string) => "" | "zip" | "rar" | "7z" | "pdf" | "msword" | "docx" | "xlsx" | "pptx" | "json" | "xml" | "mpeg" | "audio-ogg" | "wav" | "mp4" | "webm" | "video-ogg" | "wideo-ogg" | "jpeg" | "jpg" | "png" | "gif" | "svg-xml" | "webp";
4
+ export declare const getKnownResolutionByMime: (mimeType: string) => "" | "zip" | "rar" | "7z" | "pdf" | "msword" | "docx" | "xls" | "xlsx" | "ppt" | "pptx" | "json" | "xml" | "mpeg" | "audio-ogg" | "wav" | "mp4" | "webm" | "video-ogg" | "wideo-ogg" | "jpeg" | "jpg" | "png" | "gif" | "svg-xml" | "webp";
5
+ export declare const getTypeCandidates: (mimeType: string, fileName?: string) => string[];
5
6
  export declare const getFileTypeCandidates: (file: File) => string[];
6
7
  export declare const isKnownFileType: <T extends Record<string, string>>(fileType: string, fileTypeMap: T) => any;
8
+ export declare const fileMatchesKnownTypes: <T extends Record<string, string>>(file: File, fileTypeMap: T) => boolean;
9
+ export declare const isImageFile: (file: File) => boolean;
10
+ export declare const isAudioFile: (file: File) => boolean;
11
+ export declare const isVideoFile: (file: File) => boolean;
12
+ export declare const isArchiveFile: (file: File) => boolean;
13
+ export declare const isDocumentFile: (file: File) => boolean;
7
14
  export declare const isFileAllowedByTypes: (file: File, allowedTypes: Array<NmorphResolutionType | string>) => boolean;
8
15
  export declare const getFileAcceptValue: (allowedTypes: Array<NmorphResolutionType | string>) => string;