@cloudparker/moldex.js 4.1.6 → 4.1.8
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/actions/ripple.js +1 -1
- package/dist/services/date/date-service.d.ts +11 -11
- package/dist/services/dialog/dialog-service.d.ts +6 -22
- package/dist/services/dialog/dialog-service.js +2 -9
- package/dist/services/navigation/navigation-service.d.ts +1 -1
- package/dist/services/navigation/navigation-service.js +3 -3
- package/dist/services/screen/screen-service.d.ts +3 -3
- package/dist/services/screen/screen-service.js +2 -2
- package/dist/services/toast/toast-service.d.ts +1 -1
- package/dist/services/toast/toast-service.js +1 -1
- package/dist/services/utils/image-service.d.ts +4 -4
- package/dist/services/utils/image-service.js +8 -8
- package/dist/services/utils/utils-service.js +1 -1
- package/dist/stores/screen-size/screen-size-store.svelte.d.ts +1 -1
- package/dist/views/core/button/components/button/button.svelte +3 -51
- package/dist/views/core/button/components/button/button.svelte.d.ts +1 -39
- package/dist/views/core/button/components/button-close/button-close.svelte +2 -1
- package/dist/views/core/button/components/button-close/button-close.svelte.d.ts +1 -1
- package/dist/views/core/button/components/button-dropdown/button-dropdown.svelte +2 -5
- package/dist/views/core/button/components/button-dropdown/button-dropdown.svelte.d.ts +1 -1
- package/dist/views/core/button/components/button-list-item/button-list-item.svelte +6 -54
- package/dist/views/core/button/components/button-list-item/button-list-item.svelte.d.ts +1 -45
- package/dist/views/core/button/components/button-menu/button-menu.svelte +3 -20
- package/dist/views/core/button/components/button-menu/button-menu.svelte.d.ts +1 -12
- package/dist/views/core/button/components/button-ok/button-ok.svelte +3 -1
- package/dist/views/core/button/components/button-ok/button-ok.svelte.d.ts +1 -1
- package/dist/views/core/button/components/button-search/button-search.svelte +5 -8
- package/dist/views/core/button/components/button-search/button-search.svelte.d.ts +2 -1
- package/dist/views/core/button/components/switch/switch.svelte +3 -11
- package/dist/views/core/button/components/switch/switch.svelte.d.ts +1 -8
- package/dist/views/core/button/index.d.ts +2 -6
- package/dist/views/core/button/index.js +2 -1
- package/dist/views/core/button/types.d.ts +100 -0
- package/dist/views/core/button/types.js +1 -0
- package/dist/views/core/dialog/components/cropper-dialog/cropper-dialog.svelte +3 -15
- package/dist/views/core/dialog/components/cropper-dialog/cropper-dialog.svelte.d.ts +2 -12
- package/dist/views/core/dialog/components/dialog/dialog.svelte +15 -100
- package/dist/views/core/dialog/components/dialog/dialog.svelte.d.ts +1 -74
- package/dist/views/core/dialog/components/loading-dialog/loading-dialog.svelte +3 -3
- package/dist/views/core/dialog/components/loading-dialog/loading-dialog.svelte.d.ts +1 -1
- package/dist/views/core/dialog/components/msg-dialog/msg-dialog.svelte +1 -1
- package/dist/views/core/dialog/components/msg-dialog/msg-dialog.svelte.d.ts +1 -1
- package/dist/views/core/dialog/components/number-field-dialog/number-field-dialog.svelte +2 -2
- package/dist/views/core/dialog/components/number-field-dialog/number-field-dialog.svelte.d.ts +1 -1
- package/dist/views/core/dialog/components/picker-dialog/picker-dialog.svelte +9 -35
- package/dist/views/core/dialog/components/picker-dialog/picker-dialog.svelte.d.ts +1 -28
- package/dist/views/core/dialog/components/text-field-dialog/text-field-dialog.svelte +4 -4
- package/dist/views/core/dialog/components/text-field-dialog/text-field-dialog.svelte.d.ts +2 -2
- package/dist/views/core/dialog/components/textarea-field-dialog/textarea-field-dialog.svelte +4 -4
- package/dist/views/core/dialog/components/textarea-field-dialog/textarea-field-dialog.svelte.d.ts +2 -2
- package/dist/views/core/dialog/index.d.ts +9 -4
- package/dist/views/core/dialog/index.js +9 -2
- package/dist/views/core/dialog/types.d.ts +105 -0
- package/dist/views/core/dialog/types.js +1 -0
- package/dist/views/core/input/components/checkbox-field/checkbox-field.svelte.d.ts +2 -2
- package/dist/views/core/input/components/color-field/color-field.svelte +2 -3
- package/dist/views/core/input/components/color-field/color-field.svelte.d.ts +1 -1
- package/dist/views/core/input/components/combobox-field/combobox-field.svelte +5 -55
- package/dist/views/core/input/components/combobox-field/combobox-field.svelte.d.ts +1 -50
- package/dist/views/core/input/components/date-field/date-field.svelte +2 -5
- package/dist/views/core/input/components/date-field/date-field.svelte.d.ts +1 -1
- package/dist/views/core/input/components/datetime-field/datetime-field.svelte +2 -1
- package/dist/views/core/input/components/datetime-field/datetime-field.svelte.d.ts +1 -1
- package/dist/views/core/input/components/email-field/email-field.svelte +2 -1
- package/dist/views/core/input/components/email-field/email-field.svelte.d.ts +1 -1
- package/dist/views/core/input/components/file-field/file-field.svelte +2 -1
- package/dist/views/core/input/components/file-field/file-field.svelte.d.ts +1 -1
- package/dist/views/core/input/components/input-field/input-field.svelte +3 -83
- package/dist/views/core/input/components/input-field/input-field.svelte.d.ts +4 -64
- package/dist/views/core/input/components/number-field/number-field.svelte +2 -1
- package/dist/views/core/input/components/number-field/number-field.svelte.d.ts +1 -1
- package/dist/views/core/input/components/password-field/password-field.svelte +2 -5
- package/dist/views/core/input/components/password-field/password-field.svelte.d.ts +1 -1
- package/dist/views/core/input/components/phone-field/phone-field.svelte +10 -30
- package/dist/views/core/input/components/phone-field/phone-field.svelte.d.ts +1 -22
- package/dist/views/core/input/components/radio-field/radio-field.svelte +3 -27
- package/dist/views/core/input/components/radio-field/radio-field.svelte.d.ts +1 -29
- package/dist/views/core/input/components/range-field/range-field.svelte +2 -1
- package/dist/views/core/input/components/range-field/range-field.svelte.d.ts +4 -4
- package/dist/views/core/input/components/search-field/search-field.svelte +2 -1
- package/dist/views/core/input/components/search-field/search-field.svelte.d.ts +1 -1
- package/dist/views/core/input/components/text-field/text-field.svelte +2 -1
- package/dist/views/core/input/components/text-field/text-field.svelte.d.ts +1 -1
- package/dist/views/core/input/components/textarea-field/textarea-field.svelte +2 -1
- package/dist/views/core/input/components/textarea-field/textarea-field.svelte.d.ts +1 -1
- package/dist/views/core/input/components/time-field/time-field.svelte +2 -1
- package/dist/views/core/input/components/time-field/time-field.svelte.d.ts +1 -1
- package/dist/views/core/input/index.d.ts +1 -4
- package/dist/views/core/input/index.js +1 -1
- package/dist/views/core/input/types.d.ts +159 -0
- package/dist/views/core/input/types.js +1 -0
- package/dist/views/core/navbar/components/navbar/navbar.svelte +2 -39
- package/dist/views/core/navbar/components/navbar/navbar.svelte.d.ts +1 -35
- package/dist/views/core/navbar/index.d.ts +2 -4
- package/dist/views/core/navbar/index.js +2 -3
- package/dist/views/core/navbar/types.d.ts +35 -0
- package/dist/views/core/navbar/types.js +1 -0
- package/dist/views/core/toast/components/toast/toast.svelte +3 -21
- package/dist/views/core/toast/components/toast/toast.svelte.d.ts +1 -8
- package/dist/views/core/toast/index.d.ts +3 -2
- package/dist/views/core/toast/index.js +3 -1
- package/dist/views/core/toast/types.d.ts +8 -0
- package/dist/views/core/toast/types.js +1 -0
- package/dist/views/extra/index.d.ts +2 -2
- package/dist/views/extra/index.js +2 -1
- package/dist/views/extra/loaders/country-loader.svelte +2 -8
- package/dist/views/extra/loaders/country-loader.svelte.d.ts +1 -5
- package/dist/views/extra/texts/text-country.svelte +2 -1
- package/dist/views/extra/types.d.ts +5 -0
- package/dist/views/extra/types.js +1 -0
- package/package.json +6 -4
- package/dist/views/core/common/index.d.ts +0 -4
- package/dist/views/core/sidebar/index.d.ts +0 -2
package/dist/actions/ripple.js
CHANGED
|
@@ -31,22 +31,22 @@ export declare function daysDiff(startDate: Date, endDate?: Date): number;
|
|
|
31
31
|
export declare function hoursDiff(startDate: Date, endDate?: Date): number;
|
|
32
32
|
export declare function minutesDiff(startDate: Date, endDate?: Date): number;
|
|
33
33
|
export declare function getPeriodDates(period: PeriodEnum, currentDate?: Date): {
|
|
34
|
-
startDate:
|
|
35
|
-
endDate:
|
|
34
|
+
startDate: any;
|
|
35
|
+
endDate: any;
|
|
36
36
|
};
|
|
37
37
|
export declare function padTo2Digits(num: number): string;
|
|
38
38
|
export declare function millisToTimeString(milliseconds: number): string;
|
|
39
|
-
export declare function timestampToMillis(timestamp: any): number
|
|
40
|
-
export declare function timestampToDate(timestamp: FirestoreTimestamp): Date
|
|
41
|
-
export declare function timestampToDateString(timestamp: FirestoreTimestamp): string
|
|
42
|
-
export declare function timestampToAgo(timestamp: FirestoreTimestamp): string
|
|
39
|
+
export declare function timestampToMillis(timestamp: any): number;
|
|
40
|
+
export declare function timestampToDate(timestamp: FirestoreTimestamp): Date;
|
|
41
|
+
export declare function timestampToDateString(timestamp: FirestoreTimestamp): string;
|
|
42
|
+
export declare function timestampToAgo(timestamp: FirestoreTimestamp): string;
|
|
43
43
|
export declare function dateToTimestamp(date: Date): {
|
|
44
44
|
seconds: number;
|
|
45
45
|
nanoseconds: number;
|
|
46
46
|
};
|
|
47
|
-
export declare function dateToAgo(date: Date): string
|
|
48
|
-
export declare function millisToDateString(millis: number): string
|
|
49
|
-
export declare function millisToDate(millis: number): Date
|
|
50
|
-
export declare function dateFormat(date: Date, format?: 'MM-DD-YYYY hh:mm a' | 'MM-DD-YYYY' | 'YYYY-MM-DD' | 'YYYY-MM-DDTHH:MM' | string): string
|
|
47
|
+
export declare function dateToAgo(date: Date): string;
|
|
48
|
+
export declare function millisToDateString(millis: number): string;
|
|
49
|
+
export declare function millisToDate(millis: number): Date;
|
|
50
|
+
export declare function dateFormat(date: Date, format?: 'MM-DD-YYYY hh:mm a' | 'MM-DD-YYYY' | 'YYYY-MM-DD' | 'YYYY-MM-DDTHH:MM' | string): string;
|
|
51
51
|
export declare function isDateBetween(date: Date, startDate: Date, endDate: Date): boolean;
|
|
52
|
-
export declare function toDate(value: any): Date
|
|
52
|
+
export declare function toDate(value: any): Date;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type
|
|
3
|
-
import type { PickerDialogProps } from '../../views/core/dialog/components/picker-dialog/picker-dialog.svelte';
|
|
4
|
-
import { ImageCapttureEnum, type ImageCapttures, type OutputImageFormats } from '../utils/image-service';
|
|
1
|
+
import { ImageCaptureEnum, type ImageCaptures, type OutputImageFormats } from '../utils/image-service';
|
|
2
|
+
import { type CropperDialogProps, type DialogProps, type DialogSize, type InputFieldProps, type PickerDialogProps } from '../../views/index.js';
|
|
5
3
|
export declare enum DialogSizeEnum {
|
|
6
4
|
XS = "xs",
|
|
7
5
|
SM = "sm",
|
|
@@ -51,27 +49,13 @@ export declare function openLoadingDialog({ msg, loadingDialogContainerClassName
|
|
|
51
49
|
loadingDialogClassName?: string;
|
|
52
50
|
loadingDialogSpinnerClassName?: string;
|
|
53
51
|
loadingDialogMsgClassName?: string;
|
|
54
|
-
}): Promise<
|
|
55
|
-
toggleDialog: () => void;
|
|
56
|
-
openDialog: () => void;
|
|
57
|
-
closeDialog: (value?: any) => Promise<any>;
|
|
58
|
-
setResult: (value: any) => void;
|
|
59
|
-
setOkEnabled: (value: boolean) => void;
|
|
60
|
-
setOkSpinner: (value: boolean) => void;
|
|
61
|
-
setOnData: (listener: (data: any) => void) => void;
|
|
62
|
-
setOnOkClick: (onclick: (event: MouseEvent | TouchEvent, options: import("../../views").DialogExports) => void) => void;
|
|
63
|
-
setOnCloseClick: (onclick: (ev: MouseEvent | TouchEvent) => Promise<boolean>) => void;
|
|
64
|
-
postData: (data: any) => void;
|
|
65
|
-
setHeaderSnippet: (snippet: import("svelte").Snippet) => void;
|
|
66
|
-
setFooterSnippet: (snippet: import("svelte").Snippet) => void;
|
|
67
|
-
setDialogTitle: (dialogTitle: string) => void;
|
|
68
|
-
}>;
|
|
52
|
+
}): Promise<any>;
|
|
69
53
|
/**
|
|
70
54
|
* Return Cropped Image DataUrl
|
|
71
55
|
* @param props
|
|
72
56
|
* @returns
|
|
73
57
|
*/
|
|
74
|
-
export declare function openCropperDialog<T, R>({ outputWidth, outputFormat, outputQuality, outputType, inputImageFile, className, outputAspectRatio, ...params }: DialogProps &
|
|
58
|
+
export declare function openCropperDialog<T, R>({ outputWidth, outputFormat, outputQuality, outputType, inputImageFile, className, outputAspectRatio, ...params }: DialogProps & CropperDialogProps): Promise<R | string | File>;
|
|
75
59
|
/**
|
|
76
60
|
* Opens a file picker dialog and returns the selected file or files.
|
|
77
61
|
* This function uses native browser APIs to ensure compatibility across different browsers.
|
|
@@ -91,7 +75,7 @@ export declare function openFilePickerDialog<T extends File | File[]>(accepts?:
|
|
|
91
75
|
*/
|
|
92
76
|
export declare function openImagePickerDialog<T extends File | File[]>(accepts?: string | string[], options?: {
|
|
93
77
|
multiple?: boolean;
|
|
94
|
-
capture?:
|
|
78
|
+
capture?: ImageCaptures;
|
|
95
79
|
maxWidth?: number;
|
|
96
80
|
maxHeight?: number;
|
|
97
81
|
maxSizeInBytes?: number;
|
|
@@ -104,7 +88,7 @@ export declare function openImagePickerDialogWithCropper({ outputFormat, outputW
|
|
|
104
88
|
outputQuality?: number;
|
|
105
89
|
outputAspectRatio?: number;
|
|
106
90
|
dialogSize?: DialogSize;
|
|
107
|
-
capture?:
|
|
91
|
+
capture?: ImageCaptureEnum;
|
|
108
92
|
maxWidth?: number;
|
|
109
93
|
maxHeight?: number;
|
|
110
94
|
maxSizeInBytes?: number;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import { Dialog } from '../../views';
|
|
2
|
-
import CropperDialog, {} from '../../views/core/dialog/components/cropper-dialog/cropper-dialog.svelte';
|
|
3
|
-
import LoadingDialog from '../../views/core/dialog/components/loading-dialog/loading-dialog.svelte';
|
|
4
|
-
import MsgDialog from '../../views/core/dialog/components/msg-dialog/msg-dialog.svelte';
|
|
5
|
-
import NumberFieldDialog from '../../views/core/dialog/components/number-field-dialog/number-field-dialog.svelte';
|
|
6
|
-
import PickerDialog from '../../views/core/dialog/components/picker-dialog/picker-dialog.svelte';
|
|
7
|
-
import TextFieldDialog from '../../views/core/dialog/components/text-field-dialog/text-field-dialog.svelte';
|
|
8
|
-
import TextareaFieldDialog from '../../views/core/dialog/components/textarea-field-dialog/textarea-field-dialog.svelte';
|
|
9
1
|
import { mount } from 'svelte';
|
|
2
|
+
import { cropImageFile, FilePickerAccepts, ImageCaptureEnum, OutputImageFormatEnum, processImageFile } from '../utils/image-service';
|
|
3
|
+
import { CropperDialog, Dialog, LoadingDialog, MsgDialog, NumberFieldDialog, PickerDialog, TextareaFieldDialog, TextFieldDialog } from '../../views/index.js';
|
|
10
4
|
import { getDialogSize, isMobileScreen } from '../screen/screen-service';
|
|
11
|
-
import { cropImageFile, FilePickerAccepts, ImageCapttureEnum, OutputImageFormatEnum, processImageFile } from '../utils/image-service';
|
|
12
5
|
export var DialogSizeEnum;
|
|
13
6
|
(function (DialogSizeEnum) {
|
|
14
7
|
DialogSizeEnum["XS"] = "xs";
|
|
@@ -22,7 +22,7 @@ export declare const referrer: {
|
|
|
22
22
|
export declare const pushBackState: (obj: BackStateType) => void;
|
|
23
23
|
export declare const popBackState: () => BackStateType | undefined;
|
|
24
24
|
export declare const registerBackPress: (state: BackStateType) => void;
|
|
25
|
-
export declare const addBackKeyListener: (callback: (event?: PopStateEvent) => boolean) => (
|
|
25
|
+
export declare const addBackKeyListener: (callback: (event?: PopStateEvent) => boolean) => (event: PopStateEvent) => void;
|
|
26
26
|
export declare const removeBackKeyListener: (listener: () => boolean) => void;
|
|
27
27
|
export declare function goBack(): void;
|
|
28
28
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// import { goto, pushState } from '$app/navigation';
|
|
2
|
-
import { createRefererStore } from '../../stores/referrer-store/referrer-store.svelte';
|
|
3
2
|
import { BROWSER } from 'esm-env';
|
|
4
|
-
import { playMelody } from '../utils/melody-service';
|
|
5
3
|
import { goto } from '$app/navigation';
|
|
6
|
-
import {
|
|
4
|
+
import { createRefererStore } from '../../stores/referrer-store/referrer-store.svelte.js';
|
|
5
|
+
import { vibrate } from '../utils/utils-service.js';
|
|
6
|
+
import { playMelody } from '../utils/melody-service.js';
|
|
7
7
|
export const referrer = createRefererStore();
|
|
8
8
|
let backStateArray = [];
|
|
9
9
|
export const pushBackState = (obj) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScreenSizeEnum } from "../../stores/screen-size/screen-size-store.svelte";
|
|
2
|
-
import { DialogSizeEnum } from "../dialog/dialog-service";
|
|
1
|
+
import { ScreenSizeEnum } from "../../stores/screen-size/screen-size-store.svelte.js";
|
|
2
|
+
import { DialogSizeEnum } from "../dialog/dialog-service.js";
|
|
3
3
|
export declare const screenSize: {
|
|
4
4
|
size: ScreenSizeEnum;
|
|
5
5
|
readonly isXXL: boolean;
|
|
@@ -8,7 +8,7 @@ export declare const screenSize: {
|
|
|
8
8
|
readonly isMd: boolean;
|
|
9
9
|
readonly isSm: boolean;
|
|
10
10
|
readonly isXs: boolean;
|
|
11
|
-
readonly isMobileScreen:
|
|
11
|
+
readonly isMobileScreen: any;
|
|
12
12
|
};
|
|
13
13
|
export declare const handleScreenSizeUpdate: (size: number) => void;
|
|
14
14
|
export declare function isSmallScreen(): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createScreenSizeStore, ScreenSizeEnum } from "../../stores/screen-size/screen-size-store.svelte";
|
|
1
|
+
import { createScreenSizeStore, ScreenSizeEnum } from "../../stores/screen-size/screen-size-store.svelte.js";
|
|
2
2
|
import { BROWSER } from "esm-env";
|
|
3
|
-
import { DialogSizeEnum } from "../dialog/dialog-service";
|
|
3
|
+
import { DialogSizeEnum } from "../dialog/dialog-service.js";
|
|
4
4
|
export const screenSize = createScreenSizeStore();
|
|
5
5
|
export const handleScreenSizeUpdate = (size) => {
|
|
6
6
|
// console.log('screenSizeChanged', size)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ToastPropsType } from "../../views";
|
|
2
2
|
export declare function showToast(props: ToastPropsType | string): void;
|
|
3
3
|
export declare function showSuccessToast(): void;
|
|
4
4
|
export declare function showFailedToast(): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
export type
|
|
3
|
-
export declare enum
|
|
1
|
+
import { DialogSizeEnum } from "../dialog/dialog-service.js";
|
|
2
|
+
export type ImageCaptures = ImageCaptureEnum.USER | ImageCaptureEnum.ENVIRONMENT;
|
|
3
|
+
export declare enum ImageCaptureEnum {
|
|
4
4
|
USER = "user",
|
|
5
5
|
ENVIRONMENT = "environment"
|
|
6
6
|
}
|
|
@@ -103,5 +103,5 @@ export declare function cropImageFile({ inputImageFile, outputFormat, outputWidt
|
|
|
103
103
|
outputWidth?: number;
|
|
104
104
|
outputQuality?: number;
|
|
105
105
|
outputAspectRatio?: number;
|
|
106
|
-
dialogSize?:
|
|
106
|
+
dialogSize?: DialogSizeEnum;
|
|
107
107
|
}): Promise<File | null>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DialogSizeEnum, openCropperDialog } from "../dialog/dialog-service";
|
|
2
|
-
import { getExtFromFileType, readFileAsDataURL } from "./file-service";
|
|
3
|
-
import { nanoid } from
|
|
4
|
-
export var
|
|
5
|
-
(function (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
})(
|
|
1
|
+
import { DialogSizeEnum, openCropperDialog } from "../dialog/dialog-service.js";
|
|
2
|
+
import { getExtFromFileType, readFileAsDataURL } from "./file-service.js";
|
|
3
|
+
import { nanoid } from "nanoid";
|
|
4
|
+
export var ImageCaptureEnum;
|
|
5
|
+
(function (ImageCaptureEnum) {
|
|
6
|
+
ImageCaptureEnum["USER"] = "user";
|
|
7
|
+
ImageCaptureEnum["ENVIRONMENT"] = "environment";
|
|
8
|
+
})(ImageCaptureEnum || (ImageCaptureEnum = {}));
|
|
9
9
|
export var OutputImageFormatEnum;
|
|
10
10
|
(function (OutputImageFormatEnum) {
|
|
11
11
|
OutputImageFormatEnum["WEBP"] = "image/webp";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toDate } from '../date/date-service';
|
|
2
1
|
import { customAlphabet } from 'nanoid';
|
|
2
|
+
import { toDate } from '../date/date-service.js';
|
|
3
3
|
/**
|
|
4
4
|
* Generates a random number between the specified minimum and maximum values (inclusive of the minimum and exclusive of the maximum).
|
|
5
5
|
*
|
|
@@ -1,59 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
export type ButtonAppearance =
|
|
3
|
-
| 'none'
|
|
4
|
-
| 'primary'
|
|
5
|
-
| 'neutral'
|
|
6
|
-
| 'border'
|
|
7
|
-
| 'border-neutral'
|
|
8
|
-
| 'border-primary';
|
|
9
|
-
|
|
10
|
-
export type ButtonSize = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
11
|
-
|
|
12
|
-
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
13
|
-
|
|
14
|
-
export type ButtonProps = {
|
|
15
|
-
title?: string;
|
|
16
|
-
id?: string;
|
|
17
|
-
type?: ButtonType;
|
|
18
|
-
appearance?: ButtonAppearance;
|
|
19
|
-
size?: ButtonSize;
|
|
20
|
-
form?: string | null;
|
|
21
|
-
className?: string;
|
|
22
|
-
iconPath?: string;
|
|
23
|
-
iconClassName?: string;
|
|
24
|
-
label?: string;
|
|
25
|
-
rightIconPath?: string;
|
|
26
|
-
rightIconClassName?: string;
|
|
27
|
-
spinner?: boolean;
|
|
28
|
-
disabled?: boolean;
|
|
29
|
-
spinnerClassName?: string;
|
|
30
|
-
onlySpinner?: boolean;
|
|
31
|
-
children?: Snippet;
|
|
32
|
-
hasRipple?: boolean;
|
|
33
|
-
rippleColor?: string | 'light' | 'dark';
|
|
34
|
-
url?: string;
|
|
35
|
-
target?: string;
|
|
36
|
-
hasOpenInNew?: boolean;
|
|
37
|
-
openInNewIconClassName?: string;
|
|
38
|
-
openInNewIcon?: string;
|
|
39
|
-
onClick?: (ev: MouseEvent) => void;
|
|
40
|
-
onDblClick?: (ev: MouseEvent) => void;
|
|
41
|
-
onContextMenu?: (ev: MouseEvent) => void;
|
|
42
|
-
onDrop?: (ev: DragEvent) => void;
|
|
43
|
-
onDragStart?: (ev: DragEvent) => void;
|
|
44
|
-
onDragEnd?: (ev: DragEvent) => void;
|
|
45
|
-
onDragEnter?: (ev: DragEvent) => void;
|
|
46
|
-
onDragLeave?: (ev: DragEvent) => void;
|
|
47
|
-
onDragOver?: (ev: DragEvent) => void;
|
|
48
|
-
};
|
|
49
|
-
</script>
|
|
50
|
-
|
|
1
|
+
|
|
51
2
|
<script lang="ts">
|
|
52
3
|
import { ripple, type RipplePropsType } from '../../../../../actions/ripple.js';
|
|
53
4
|
import Icon from '../../../icon/components/icon/icon.svelte';
|
|
54
5
|
import { mdiOpenInNew } from '../../../icon/index.js';
|
|
55
6
|
import Spinner from '../../../spinner/components/spinner/spinner.svelte';
|
|
56
|
-
import type {
|
|
7
|
+
import type { ButtonProps } from '../../types';
|
|
8
|
+
|
|
57
9
|
|
|
58
10
|
let {
|
|
59
11
|
title,
|
|
@@ -1,42 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export type ButtonSize = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
3
|
-
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
4
|
-
export type ButtonProps = {
|
|
5
|
-
title?: string;
|
|
6
|
-
id?: string;
|
|
7
|
-
type?: ButtonType;
|
|
8
|
-
appearance?: ButtonAppearance;
|
|
9
|
-
size?: ButtonSize;
|
|
10
|
-
form?: string | null;
|
|
11
|
-
className?: string;
|
|
12
|
-
iconPath?: string;
|
|
13
|
-
iconClassName?: string;
|
|
14
|
-
label?: string;
|
|
15
|
-
rightIconPath?: string;
|
|
16
|
-
rightIconClassName?: string;
|
|
17
|
-
spinner?: boolean;
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
spinnerClassName?: string;
|
|
20
|
-
onlySpinner?: boolean;
|
|
21
|
-
children?: Snippet;
|
|
22
|
-
hasRipple?: boolean;
|
|
23
|
-
rippleColor?: string | 'light' | 'dark';
|
|
24
|
-
url?: string;
|
|
25
|
-
target?: string;
|
|
26
|
-
hasOpenInNew?: boolean;
|
|
27
|
-
openInNewIconClassName?: string;
|
|
28
|
-
openInNewIcon?: string;
|
|
29
|
-
onClick?: (ev: MouseEvent) => void;
|
|
30
|
-
onDblClick?: (ev: MouseEvent) => void;
|
|
31
|
-
onContextMenu?: (ev: MouseEvent) => void;
|
|
32
|
-
onDrop?: (ev: DragEvent) => void;
|
|
33
|
-
onDragStart?: (ev: DragEvent) => void;
|
|
34
|
-
onDragEnd?: (ev: DragEvent) => void;
|
|
35
|
-
onDragEnter?: (ev: DragEvent) => void;
|
|
36
|
-
onDragLeave?: (ev: DragEvent) => void;
|
|
37
|
-
onDragOver?: (ev: DragEvent) => void;
|
|
38
|
-
};
|
|
39
|
-
import type { Snippet } from 'svelte';
|
|
1
|
+
import type { ButtonProps } from '../../types';
|
|
40
2
|
declare const Button: import("svelte").Component<ButtonProps, {}, "">;
|
|
41
3
|
type Button = ReturnType<typeof Button>;
|
|
42
4
|
export default Button;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { DropdownStateEnum } from '../../../../../types.js';
|
|
3
|
-
import Button, {
|
|
4
|
-
type ButtonAppearance,
|
|
5
|
-
type ButtonSize,
|
|
6
|
-
type ButtonType
|
|
7
|
-
} from '../button/button.svelte';
|
|
8
3
|
import { onMount, type Snippet } from 'svelte';
|
|
4
|
+
import type { ButtonAppearance, ButtonSize, ButtonType } from '../../types';
|
|
5
|
+
import Button from '../button/button.svelte';
|
|
9
6
|
|
|
10
7
|
export type ButtonDropdownProps = {
|
|
11
8
|
appearance?: ButtonAppearance;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ButtonAppearance, type ButtonSize, type ButtonType } from '../button/button.svelte';
|
|
2
1
|
import { type Snippet } from 'svelte';
|
|
2
|
+
import type { ButtonAppearance, ButtonSize, ButtonType } from '../../types';
|
|
3
3
|
export type ButtonDropdownProps = {
|
|
4
4
|
appearance?: ButtonAppearance;
|
|
5
5
|
size?: ButtonSize;
|
|
@@ -1,60 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
export type ButtonListItemProps = {
|
|
3
|
-
appearance?: ButtonAppearance;
|
|
4
|
-
size?: ButtonSize;
|
|
5
|
-
index?: number;
|
|
6
|
-
id?: string;
|
|
7
|
-
className?: string;
|
|
8
|
-
checkboxIconPath?: string;
|
|
9
|
-
uncheckboxIconPath?: string;
|
|
10
|
-
checkboxIconClassName?: string;
|
|
11
|
-
uncheckboxIconClassName?: string;
|
|
12
|
-
hasIcon?: boolean;
|
|
13
|
-
iconClassName?: string;
|
|
14
|
-
hasImg?: boolean;
|
|
15
|
-
imgClassName?: string;
|
|
16
|
-
hasArrow?: boolean;
|
|
17
|
-
arrowIconPath?: string;
|
|
18
|
-
arrowClassName?: string;
|
|
19
|
-
title?: string;
|
|
20
|
-
subtitle?: string;
|
|
21
|
-
titleClassName?: string;
|
|
22
|
-
subtitleClassName?: string;
|
|
23
|
-
url?: string;
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
iconPath?: string;
|
|
26
|
-
isCircularIcon?: boolean;
|
|
27
|
-
circularIconClassName?: string;
|
|
28
|
-
imgSrc?: string;
|
|
29
|
-
hasCheckbox?: boolean;
|
|
30
|
-
checkboxClassName?: string;
|
|
31
|
-
isChecked?: boolean;
|
|
32
|
-
hasMenu?: boolean;
|
|
33
|
-
menus?: Menu[] | string[];
|
|
34
|
-
menuIconPath?: string;
|
|
35
|
-
menuIconClassName?: string;
|
|
36
|
-
menuButtonClassName?: string;
|
|
37
|
-
menuButtonLabel?: string;
|
|
38
|
-
hasDivider?: boolean;
|
|
39
|
-
dividerClassName?: string;
|
|
40
|
-
onMenu?: (ev: Event, menu: Menu | string) => void;
|
|
41
|
-
onClick?: (ev: MouseEvent) => void;
|
|
42
|
-
children?: Snippet;
|
|
43
|
-
};
|
|
44
|
-
</script>
|
|
45
|
-
|
|
1
|
+
|
|
46
2
|
<script lang="ts">
|
|
47
|
-
|
|
48
|
-
Icon,
|
|
49
|
-
mdiCheckCircle,
|
|
50
|
-
mdiCheckCircleOutline,
|
|
51
|
-
mdiChevronRight
|
|
52
|
-
} from '../../../icon';
|
|
53
|
-
import type { Snippet } from 'svelte';
|
|
54
|
-
import Button, { type ButtonAppearance, type ButtonSize } from '../button/button.svelte';
|
|
55
|
-
import type { Menu } from '../button-menu/button-menu.svelte';
|
|
3
|
+
|
|
56
4
|
import ButtonMenu from '../button-menu/button-menu.svelte';
|
|
57
5
|
import IconCircle from '../../../icon/components/icon-circle/icon-circle.svelte';
|
|
6
|
+
import { mdiCheckCircle, mdiCheckCircleOutline, mdiChevronRight } from '../../../icon/index.js';
|
|
7
|
+
import Icon from '../../../icon/components/icon/icon.svelte';
|
|
8
|
+
import type { ButtonListItemProps } from '../../types';
|
|
9
|
+
import Button from '../button/button.svelte';
|
|
58
10
|
|
|
59
11
|
let {
|
|
60
12
|
appearance,
|
|
@@ -1,48 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
appearance?: ButtonAppearance;
|
|
3
|
-
size?: ButtonSize;
|
|
4
|
-
index?: number;
|
|
5
|
-
id?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
checkboxIconPath?: string;
|
|
8
|
-
uncheckboxIconPath?: string;
|
|
9
|
-
checkboxIconClassName?: string;
|
|
10
|
-
uncheckboxIconClassName?: string;
|
|
11
|
-
hasIcon?: boolean;
|
|
12
|
-
iconClassName?: string;
|
|
13
|
-
hasImg?: boolean;
|
|
14
|
-
imgClassName?: string;
|
|
15
|
-
hasArrow?: boolean;
|
|
16
|
-
arrowIconPath?: string;
|
|
17
|
-
arrowClassName?: string;
|
|
18
|
-
title?: string;
|
|
19
|
-
subtitle?: string;
|
|
20
|
-
titleClassName?: string;
|
|
21
|
-
subtitleClassName?: string;
|
|
22
|
-
url?: string;
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
iconPath?: string;
|
|
25
|
-
isCircularIcon?: boolean;
|
|
26
|
-
circularIconClassName?: string;
|
|
27
|
-
imgSrc?: string;
|
|
28
|
-
hasCheckbox?: boolean;
|
|
29
|
-
checkboxClassName?: string;
|
|
30
|
-
isChecked?: boolean;
|
|
31
|
-
hasMenu?: boolean;
|
|
32
|
-
menus?: Menu[] | string[];
|
|
33
|
-
menuIconPath?: string;
|
|
34
|
-
menuIconClassName?: string;
|
|
35
|
-
menuButtonClassName?: string;
|
|
36
|
-
menuButtonLabel?: string;
|
|
37
|
-
hasDivider?: boolean;
|
|
38
|
-
dividerClassName?: string;
|
|
39
|
-
onMenu?: (ev: Event, menu: Menu | string) => void;
|
|
40
|
-
onClick?: (ev: MouseEvent) => void;
|
|
41
|
-
children?: Snippet;
|
|
42
|
-
};
|
|
43
|
-
import type { Snippet } from 'svelte';
|
|
44
|
-
import { type ButtonAppearance, type ButtonSize } from '../button/button.svelte';
|
|
45
|
-
import type { Menu } from '../button-menu/button-menu.svelte';
|
|
1
|
+
import type { ButtonListItemProps } from '../../types';
|
|
46
2
|
declare const ButtonListItem: import("svelte").Component<ButtonListItemProps, {}, "">;
|
|
47
3
|
type ButtonListItem = ReturnType<typeof ButtonListItem>;
|
|
48
4
|
export default ButtonListItem;
|
|
@@ -1,30 +1,13 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
export type Menu = {
|
|
3
|
-
_id?: string;
|
|
4
|
-
title?: string;
|
|
5
|
-
subtitle?: string;
|
|
6
|
-
hasIcon?: boolean;
|
|
7
|
-
iconPath?: string;
|
|
8
|
-
iconClassName?: string;
|
|
9
|
-
hasCheckbox?: boolean;
|
|
10
|
-
checkboxClassName?: string;
|
|
11
|
-
isChecked?: boolean;
|
|
12
|
-
};
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
1
|
<script lang="ts">
|
|
16
|
-
import {
|
|
17
|
-
mdiDotsHorizontal,
|
|
18
|
-
type ButtonAppearance,
|
|
19
|
-
type ButtonProps,
|
|
20
|
-
type ButtonSize
|
|
21
|
-
} from '../../../../..';
|
|
22
2
|
import ButtonDropdown, {
|
|
23
3
|
type ButtonDropdownProps
|
|
24
4
|
} from '../button-dropdown/button-dropdown.svelte';
|
|
25
5
|
import Icon from '../../../icon/components/icon/icon.svelte';
|
|
26
6
|
import type { Snippet } from 'svelte';
|
|
27
7
|
import ButtonListItem from '../button-list-item/button-list-item.svelte';
|
|
8
|
+
|
|
9
|
+
import { mdiDotsHorizontal } from '../../../icon/index.js';
|
|
10
|
+
import type { ButtonAppearance, ButtonProps, ButtonSize, Menu } from '../../types';
|
|
28
11
|
type Props = {
|
|
29
12
|
label?: string;
|
|
30
13
|
className?: string;
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
export type Menu = {
|
|
2
|
-
_id?: string;
|
|
3
|
-
title?: string;
|
|
4
|
-
subtitle?: string;
|
|
5
|
-
hasIcon?: boolean;
|
|
6
|
-
iconPath?: string;
|
|
7
|
-
iconClassName?: string;
|
|
8
|
-
hasCheckbox?: boolean;
|
|
9
|
-
checkboxClassName?: string;
|
|
10
|
-
isChecked?: boolean;
|
|
11
|
-
};
|
|
12
|
-
import { type ButtonAppearance, type ButtonProps, type ButtonSize } from '../../../../..';
|
|
13
1
|
import { type ButtonDropdownProps } from '../button-dropdown/button-dropdown.svelte';
|
|
14
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ButtonAppearance, ButtonProps, ButtonSize, Menu } from '../../types';
|
|
15
4
|
type Props = {
|
|
16
5
|
label?: string;
|
|
17
6
|
className?: string;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
mdiMagnify,
|
|
4
|
-
type ButtonAppearance,
|
|
5
|
-
type ButtonProps,
|
|
6
|
-
type ButtonSize,
|
|
7
|
-
type InputFieldAppearance,
|
|
8
|
-
type InputFieldSize
|
|
9
|
-
} from '../../../../..';
|
|
10
2
|
import ButtonDropdown from '../button-dropdown/button-dropdown.svelte';
|
|
11
3
|
import Icon from '../../../icon/components/icon/icon.svelte';
|
|
12
4
|
import SearchField from '../../../input/components/search-field/search-field.svelte';
|
|
13
5
|
import type { Snippet } from 'svelte';
|
|
6
|
+
|
|
7
|
+
import { mdiMagnify } from '../../../icon/index.js';
|
|
8
|
+
import type { ButtonAppearance, ButtonProps, ButtonSize } from '../../types';
|
|
9
|
+
import type { InputFieldAppearance, InputFieldSize } from '../../../input/types';
|
|
10
|
+
|
|
14
11
|
type Props = {
|
|
15
12
|
searchAppearance?: InputFieldAppearance;
|
|
16
13
|
searchClassName?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type ButtonAppearance, type ButtonProps, type ButtonSize, type InputFieldAppearance, type InputFieldSize } from '../../../../..';
|
|
2
1
|
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { ButtonAppearance, ButtonProps, ButtonSize } from '../../types';
|
|
3
|
+
import type { InputFieldAppearance, InputFieldSize } from '../../../input/types';
|
|
3
4
|
type Props = {
|
|
4
5
|
searchAppearance?: InputFieldAppearance;
|
|
5
6
|
searchClassName?: string;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export type SwitchProps = {
|
|
3
|
-
id?: string;
|
|
4
|
-
checked?: boolean;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
className?: string;
|
|
7
|
-
size?: 'sm' | 'md' | 'lg';
|
|
8
|
-
onChange?: (checked: boolean) => void;
|
|
9
|
-
};
|
|
10
|
-
</script>
|
|
11
|
-
|
|
1
|
+
|
|
12
2
|
<script lang="ts">
|
|
3
|
+
import type { SwitchProps } from "../../types";
|
|
4
|
+
|
|
13
5
|
let {
|
|
14
6
|
id = '',
|
|
15
7
|
checked = false,
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
id?: string;
|
|
3
|
-
checked?: boolean;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
className?: string;
|
|
6
|
-
size?: 'sm' | 'md' | 'lg';
|
|
7
|
-
onChange?: (checked: boolean) => void;
|
|
8
|
-
};
|
|
1
|
+
import type { SwitchProps } from "../../types";
|
|
9
2
|
declare const Switch: import("svelte").Component<SwitchProps, {}, "">;
|
|
10
3
|
type Switch = ReturnType<typeof Switch>;
|
|
11
4
|
export default Switch;
|