@ghentcdh/ui 0.0.2-18

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 (55) hide show
  1. package/README.md +85 -0
  2. package/button/btn-badge.vue.d.ts +38 -0
  3. package/button/btn.vue.d.ts +44 -0
  4. package/button/const.d.ts +9 -0
  5. package/button/index.d.ts +2 -0
  6. package/card/card.vue.d.ts +20 -0
  7. package/const/colors.d.ts +8 -0
  8. package/const/index.d.ts +2 -0
  9. package/const/size.d.ts +3 -0
  10. package/directives/click-outside.directive.d.ts +6 -0
  11. package/form/AutoComplete.vue.d.ts +33 -0
  12. package/form/MultiSelect.vue.d.ts +31 -0
  13. package/form/SelectComponent.vue.d.ts +32 -0
  14. package/form/core/ControlWrapper.vue.d.ts +30 -0
  15. package/form/core/emits.d.ts +5 -0
  16. package/form/core/properties.d.ts +32 -0
  17. package/form/core/styles.d.ts +7 -0
  18. package/form/core/utils/style.d.ts +2 -0
  19. package/form/index.d.ts +7 -0
  20. package/icons/icon-list.d.ts +18 -0
  21. package/icons/icon.vue.d.ts +8 -0
  22. package/icons/index.d.ts +2 -0
  23. package/index.css +1 -0
  24. package/index.d.ts +13 -0
  25. package/index.js +40 -0
  26. package/index.mjs +3797 -0
  27. package/menu/dropdown.vue.d.ts +6 -0
  28. package/menu/index.d.ts +4 -0
  29. package/menu/menu-item.vue.d.ts +5 -0
  30. package/menu/menu.type.d.ts +15 -0
  31. package/menu/menu.vue.d.ts +7 -0
  32. package/menu/sub-menu.vue.d.ts +7 -0
  33. package/modal/confirmModal.vue.d.ts +10 -0
  34. package/modal/index.d.ts +5 -0
  35. package/modal/modal.model.d.ts +17 -0
  36. package/modal/modal.service.d.ts +15 -0
  37. package/modal/modal.vue.d.ts +39 -0
  38. package/modal/modalWrapper.vue.d.ts +2 -0
  39. package/package.json +16 -0
  40. package/shell/menu.type.d.ts +11 -0
  41. package/shell/shell.component.vue.d.ts +28 -0
  42. package/table/cells/text.cell.vue.d.ts +30 -0
  43. package/table/header/sort.header.vue.d.ts +12 -0
  44. package/table/index.d.ts +4 -0
  45. package/table/pagination-button.component.vue.d.ts +17 -0
  46. package/table/pagination.component.vue.d.ts +38 -0
  47. package/table/table.model.d.ts +10 -0
  48. package/table/table.vue.d.ts +28 -0
  49. package/toast/index.d.ts +3 -0
  50. package/toast/notification-message.d.ts +7 -0
  51. package/toast/notification-message.vue.d.ts +7 -0
  52. package/toast/notification.service.d.ts +24 -0
  53. package/toast/notifications.vue.d.ts +2 -0
  54. package/utils/hasCustomEventListener.d.ts +1 -0
  55. package/utils/index.d.ts +1 -0
@@ -0,0 +1,6 @@
1
+ import { MenuWithItems } from './menu.type';
2
+ type __VLS_Props = {
3
+ items: Array<MenuWithItems>;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
6
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export { default as Menu } from './menu.vue';
2
+ export * from './menu.type';
3
+ export { default as SubMenu } from './sub-menu.vue';
4
+ export { default as Dropdown } from './dropdown.vue';
@@ -0,0 +1,5 @@
1
+ import { MenuWithItems } from './menu.type';
2
+ declare const _default: import('vue').DefineComponent<MenuWithItems, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MenuWithItems> & Readonly<{}>, {
3
+ disabled: boolean;
4
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
@@ -0,0 +1,15 @@
1
+ export type MenuAction = () => void | {
2
+ routerLink: string;
3
+ params?: Record<string, string>;
4
+ };
5
+ export type MenuWithItems = {
6
+ label: string;
7
+ items?: MenuWithItems[];
8
+ action?: MenuAction;
9
+ disabled?: boolean;
10
+ };
11
+ export type Breadcrumb = {
12
+ label: string;
13
+ routerLink?: string;
14
+ params?: Record<string, string>;
15
+ };
@@ -0,0 +1,7 @@
1
+ import { Breadcrumb, MenuWithItems } from './menu.type';
2
+ type __VLS_Props = {
3
+ menu: Array<MenuWithItems>;
4
+ breadcrumbs?: Array<Breadcrumb>;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { MenuWithItems } from './menu.type';
2
+ type __VLS_Props = MenuWithItems & {
3
+ btnClass: string;
4
+ disableArrow?: boolean;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
7
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { ConfirmModalProps, ConfirmResult } from './modal.model';
2
+ declare const _default: import('vue').DefineComponent<ConfirmModalProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
+ closeModal: (args_0: ConfirmResult) => any;
4
+ }, string, import('vue').PublicProps, Readonly<ConfirmModalProps> & Readonly<{
5
+ onCloseModal?: ((args_0: ConfirmResult) => any) | undefined;
6
+ }>, {
7
+ confirmLabel: string;
8
+ cancelLabel: string;
9
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDialogElement>;
10
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export { default as ConfirmModal } from './confirmModal.vue';
2
+ export { default as Modal } from './modal.vue';
3
+ export { default as ModalWrapper } from './modalWrapper.vue';
4
+ export * from './modal.service';
5
+ export * from './modal.model';
@@ -0,0 +1,17 @@
1
+ export type ModalWrapperModel<PROPS extends CloseProps<RESULT>, RESULT> = {
2
+ id: string;
3
+ component: any;
4
+ props: PROPS;
5
+ };
6
+ export type CloseProps<RESULT> = {
7
+ onClose: (result: RESULT) => void;
8
+ };
9
+ export type ConfirmResult = {
10
+ confirmed: boolean;
11
+ };
12
+ export type ConfirmModalProps = {
13
+ title: string;
14
+ message: string;
15
+ confirmLabel?: string;
16
+ cancelLabel?: string;
17
+ };
@@ -0,0 +1,15 @@
1
+ import { CloseProps, ConfirmModalProps, ConfirmResult, ModalWrapperModel } from './modal.model';
2
+ type ModalUnknown = ModalWrapperModel<CloseProps<unknown>, unknown>;
3
+ export declare class ModalService {
4
+ private static instance;
5
+ showModal: import('vue').Ref<number | boolean, number | boolean>;
6
+ modals: ModalUnknown[];
7
+ private openModal;
8
+ private closeModal;
9
+ static showConfirm<PROPS extends ConfirmModalProps & CloseProps<ConfirmResult>>(props: PROPS): void;
10
+ static openModal<PROPS extends CloseProps<RESULT>, RESULT>(modal: Omit<ModalWrapperModel<PROPS, RESULT>, 'id'>): void;
11
+ static getInstance(): ModalService;
12
+ static closeAll(): void;
13
+ private closeAll;
14
+ }
15
+ export {};
@@ -0,0 +1,39 @@
1
+ import { Size } from '../const';
2
+ type __VLS_Props = {
3
+ modalTitle: string;
4
+ buttonLabel?: string;
5
+ buttonSaveLabel?: string;
6
+ data?: any;
7
+ open: boolean;
8
+ disableClose?: boolean;
9
+ width?: Size;
10
+ };
11
+ declare function __VLS_template(): {
12
+ attrs: Partial<{}>;
13
+ slots: {
14
+ content?(_: {}): any;
15
+ actions?(_: {}): any;
16
+ };
17
+ refs: {};
18
+ rootEl: HTMLDialogElement;
19
+ };
20
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
21
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
22
+ closeModal: () => void;
23
+ openModal: () => void;
24
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
25
+ closeModal: () => any;
26
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
27
+ onCloseModal?: (() => any) | undefined;
28
+ }>, {
29
+ open: boolean;
30
+ disableClose: boolean;
31
+ width: Size;
32
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDialogElement>;
33
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
34
+ export default _default;
35
+ type __VLS_WithTemplateSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "@ghentcdh/ui",
3
+ "version": "0.0.2-18",
4
+ "main": "./index.js",
5
+ "types": "./index.d.ts",
6
+ "exports": {
7
+ ".": {
8
+ "import": "./index.mjs",
9
+ "require": "./index.js"
10
+ }
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/GhentCDH/ghentcdh-monorepo.git"
15
+ }
16
+ }
@@ -0,0 +1,11 @@
1
+ export type MenuItem = {
2
+ label: string;
3
+ routerLink: string;
4
+ params?: Record<string, string>;
5
+ };
6
+ export type ShellMenu = MenuItem[];
7
+ export type User = {
8
+ name: string;
9
+ email: string;
10
+ avatar: string;
11
+ };
@@ -0,0 +1,28 @@
1
+ import { ShellMenu, User } from './menu.type';
2
+ type __VLS_Props = {
3
+ title: string;
4
+ menu: ShellMenu;
5
+ user: User | undefined;
6
+ version: string;
7
+ };
8
+ declare function __VLS_template(): {
9
+ attrs: Partial<{}>;
10
+ slots: {
11
+ default?(_: {}): any;
12
+ };
13
+ refs: {};
14
+ rootEl: any;
15
+ };
16
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ logout: () => any;
19
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
20
+ onLogout?: (() => any) | undefined;
21
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
+ export default _default;
24
+ type __VLS_WithTemplateSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -0,0 +1,30 @@
1
+ export default renderer;
2
+ declare const renderer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
+ data: {
4
+ type: ObjectConstructor;
5
+ required: boolean;
6
+ };
7
+ column: {
8
+ type: ObjectConstructor;
9
+ required: boolean;
10
+ };
11
+ options: {
12
+ type: ObjectConstructor;
13
+ required: boolean;
14
+ };
15
+ }>, {}, {}, {
16
+ value(): any;
17
+ }, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
18
+ data: {
19
+ type: ObjectConstructor;
20
+ required: boolean;
21
+ };
22
+ column: {
23
+ type: ObjectConstructor;
24
+ required: boolean;
25
+ };
26
+ options: {
27
+ type: ObjectConstructor;
28
+ required: boolean;
29
+ };
30
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,12 @@
1
+ import { ColumnDef } from '../../../../core/types/src/index.ts';
2
+ type __VLS_Props = {
3
+ column: ColumnDef;
4
+ sortColumn?: string;
5
+ sortDirection?: 'asc' | 'desc';
6
+ };
7
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ sort: (column: string) => any;
9
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ onSort?: ((column: string) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
12
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export { default as PaginationComponent } from './pagination.component.vue';
2
+ export { default as Table } from './table.vue';
3
+ export { default as TextCell } from './cells/text.cell.vue';
4
+ export * from './table.model';
@@ -0,0 +1,17 @@
1
+ export interface PageProps {
2
+ currentPage: number;
3
+ page: number;
4
+ label: string;
5
+ neverActive?: boolean;
6
+ disabled?: boolean;
7
+ }
8
+ declare const _default: import('vue').DefineComponent<PageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ updatePage: (...args: any[]) => void;
10
+ updatePageSize: (...args: any[]) => void;
11
+ }, string, import('vue').PublicProps, Readonly<PageProps> & Readonly<{
12
+ onUpdatePage?: ((...args: any[]) => any) | undefined;
13
+ onUpdatePageSize?: ((...args: any[]) => any) | undefined;
14
+ }>, {
15
+ neverActive: boolean;
16
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
+ export default _default;
@@ -0,0 +1,38 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ totalItems: {
3
+ type: NumberConstructor;
4
+ default: number;
5
+ };
6
+ itemsPerPage: {
7
+ type: NumberConstructor;
8
+ default: number;
9
+ };
10
+ currentPage: {
11
+ type: NumberConstructor;
12
+ default: number;
13
+ };
14
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
+ updatePage: (...args: any[]) => void;
16
+ updatePageSize: (...args: any[]) => void;
17
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
18
+ totalItems: {
19
+ type: NumberConstructor;
20
+ default: number;
21
+ };
22
+ itemsPerPage: {
23
+ type: NumberConstructor;
24
+ default: number;
25
+ };
26
+ currentPage: {
27
+ type: NumberConstructor;
28
+ default: number;
29
+ };
30
+ }>> & Readonly<{
31
+ onUpdatePage?: ((...args: any[]) => any) | undefined;
32
+ onUpdatePageSize?: ((...args: any[]) => any) | undefined;
33
+ }>, {
34
+ currentPage: number;
35
+ totalItems: number;
36
+ itemsPerPage: number;
37
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
38
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { ColumnDef } from '../../../core/types/src/index.ts';
2
+ import { IconEnum } from '../icons';
3
+ export type TableAction = {
4
+ label?: string;
5
+ icon?: IconEnum;
6
+ action: <T>(data: T) => void;
7
+ };
8
+ export type DisplayColumn = ColumnDef & {
9
+ component: any;
10
+ };
@@ -0,0 +1,28 @@
1
+ import { DisplayColumn, TableAction } from './table.model';
2
+ type __VLS_Props = {
3
+ loading?: boolean;
4
+ actions?: TableAction[];
5
+ data?: any[];
6
+ displayColumns: Array<DisplayColumn>;
7
+ page?: {
8
+ count: number;
9
+ pageSize: number;
10
+ page: number;
11
+ };
12
+ sort?: {
13
+ sortColumn: string;
14
+ sortDirection: 'asc' | 'desc';
15
+ };
16
+ };
17
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ sort: (id: string) => any;
19
+ updatePage: (page: number) => any;
20
+ delete: (data: any) => any;
21
+ edit: (data: any) => any;
22
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
23
+ onSort?: ((id: string) => any) | undefined;
24
+ onUpdatePage?: ((page: number) => any) | undefined;
25
+ onDelete?: ((data: any) => any) | undefined;
26
+ onEdit?: ((data: any) => any) | undefined;
27
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
28
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export * from './notification.service';
2
+ export { default as NotificationMessage } from './notification-message.vue';
3
+ export { default as Notifications } from './notifications.vue';
@@ -0,0 +1,7 @@
1
+ export type NotificationType = 'success' | 'error' | 'info' | 'warning';
2
+ export type NotificationMessage = {
3
+ id: string;
4
+ message: string;
5
+ type: NotificationType;
6
+ duration: number;
7
+ };
@@ -0,0 +1,7 @@
1
+ import { NotificationType } from './notification-message.ts';
2
+ type __VLS_Props = {
3
+ message: string;
4
+ type: NotificationType;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
7
+ export default _default;
@@ -0,0 +1,24 @@
1
+ import { NotificationMessage, NotificationType } from './notification-message.ts';
2
+ export declare class NotificationService {
3
+ private static instance;
4
+ notifications: import('vue').Ref<{
5
+ id: string;
6
+ message: string;
7
+ type: NotificationType;
8
+ duration: number;
9
+ }[], NotificationMessage[] | {
10
+ id: string;
11
+ message: string;
12
+ type: NotificationType;
13
+ duration: number;
14
+ }[]>;
15
+ private addNotification;
16
+ private removeNotificationAfterDuration;
17
+ private removeNotification;
18
+ static getInstance(): NotificationService;
19
+ static info(message: string): void;
20
+ static success(message: string): void;
21
+ static warning(message: string): void;
22
+ static error(message: string): void;
23
+ static removeNotification(id: string): void;
24
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare function hasCustomEventListener(eventName: string): boolean;
@@ -0,0 +1 @@
1
+ export * from './hasCustomEventListener';