@mw-kit/mw-ui 1.8.14 → 1.8.16

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.
@@ -0,0 +1,14 @@
1
+ export declare const alluraLatinExt: string;
2
+ export declare const alluraLatin: string;
3
+ export declare const alluraVietnamese: string;
4
+ export declare const greatVibesCyrillicExt: string;
5
+ export declare const greatVibesCyrillic: string;
6
+ export declare const greatVibesGreekExt: string;
7
+ export declare const greatVibesLatinExt: string;
8
+ export declare const greatVibesLatin: string;
9
+ export declare const greatVibesVietnamese: string;
10
+ export declare const pacificoCyrillicExt: string;
11
+ export declare const pacificoCyrillic: string;
12
+ export declare const pacificoLatinExt: string;
13
+ export declare const pacificoLatin: string;
14
+ export declare const pacificoVietnamese: string;
@@ -0,0 +1,2 @@
1
+ export declare const assetUrl: (asset: string) => string;
2
+ export declare const ensureFontLoaded: (fontFamily: string, fontSize?: number, text?: string) => Promise<boolean>;
@@ -0,0 +1,17 @@
1
+ import type { SignatureCanvasProps } from 'react-signature-canvas';
2
+ import SignatureCanvas from 'react-signature-canvas';
3
+ import type { ReactNode, ThemeInterface } from '../../interfaces';
4
+ type SignatureInputProps = {
5
+ setValue: (base64: string) => void;
6
+ value: string;
7
+ penColor?: keyof ThemeInterface['colors'];
8
+ backgroundColor?: keyof ThemeInterface['colors'];
9
+ invalid?: boolean;
10
+ label?: ReactNode;
11
+ inputPlaceholder?: string;
12
+ canvasPlaceholder?: string;
13
+ onBegin?: (event: MouseEvent, ref: SignatureCanvas | null) => void;
14
+ onEnd?: (event: MouseEvent, ref: SignatureCanvas | null) => void;
15
+ } & Omit<SignatureCanvasProps, 'penColor' | 'backgroundColor' | 'onBegin' | 'onEnd'>;
16
+ declare const SignatureInput: ({ setValue, value, penColor, backgroundColor, invalid, label, inputPlaceholder, canvasPlaceholder, onBegin, onEnd, ...props }: SignatureInputProps) => import("react/jsx-runtime").JSX.Element;
17
+ export default SignatureInput;
@@ -0,0 +1,4 @@
1
+ export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
+ export declare const CanvasContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
+ $invalid?: boolean;
4
+ }>> & string;
@@ -1,9 +1,9 @@
1
1
  export { default as MwAbsoluteContainer } from './AbsoluteContainer';
2
- export { default as MwAppliedFilters } from './Filters/AppliedFilters';
3
2
  export { default as MwButton } from './Button';
4
3
  export { default as MwCalendar } from './Calendar';
5
4
  export { default as MwCard } from './Card';
6
5
  export { default as MwEllipsisContainer } from './EllipsisContainer';
6
+ export { default as MwAppliedFilters } from './Filters/AppliedFilters';
7
7
  export { default as MwFilters } from './Filters/Filters';
8
8
  export { default as MwForm } from './Form';
9
9
  export { default as MwGrid } from './Grid';
@@ -17,9 +17,9 @@ export { default as MwModal } from './Modal';
17
17
  export { default as MwPlaceholder } from './Placeholder';
18
18
  export { default as MwProgressBar } from './ProgressBar';
19
19
  export { default as MwScrollContainer } from './ScrollContainer';
20
+ export { default as MwSignature } from './Signature';
20
21
  export { default as MwTabs } from './Tabs';
21
22
  export { default as MwTextArea } from './TextArea';
22
23
  export { default as MwToast } from './Toast';
23
- export { default as MwTransition } from './Transition';
24
+ export { default as MwTransition, useTransition as useMwTransition, } from './Transition';
24
25
  export { default as MwZoom } from './Zoom';
25
- export { useTransition as useMwTransition } from './Transition';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Creates a debounced function that delays invoking the provided function
3
+ * until 'ms' milliseconds have elapsed since the last time it was invoked.
4
+ *
5
+ * @param fn The function to debounce.
6
+ * @param ms The number of milliseconds to delay.
7
+ * @returns A new, debounced function.
8
+ */
9
+ export declare const debounce: <F extends (...args: any[]) => any>(fn: F, ms?: number) => (this: ThisParameterType<F>, ...args: Parameters<F>) => void;
package/dist/index.d.mts CHANGED
@@ -4,6 +4,7 @@ import * as React$1 from 'react';
4
4
  import React__default, { TextareaHTMLAttributes } from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { PopupProps, SemanticICONS } from 'semantic-ui-react';
7
+ import SignatureCanvas, { SignatureCanvasProps } from 'react-signature-canvas';
7
8
 
8
9
  type TransitionFunction = 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear' | 'step-start' | 'step-end' | `cubic-bezier(${number}, ${number}, ${number}, ${number})` | `frames(${number})` | `steps(${number})` | `steps(${number}, ${'jump-start' | 'jump-end' | 'jump-none' | 'jump-both' | 'start' | 'end'})`;
9
10
  interface Transition$1<P extends string> {
@@ -875,24 +876,6 @@ declare const AbsoluteContainer: React__default.ForwardRefExoticComponent<(Omit<
875
876
  transition?: Partial<Omit<Transition$1<"width" | "max-width" | "height" | "max-height">, "active">>;
876
877
  }, "ref">) & React__default.RefAttributes<HTMLDivElement>>;
877
878
 
878
- interface Common$3 {
879
- appliedFilters: [
880
- AppliedFilter[],
881
- React__default.Dispatch<React__default.SetStateAction<AppliedFilter[]>>
882
- ];
883
- containerProps?: Omit<AbsoluteContainerProps, 'open'>;
884
- }
885
- type AppliedFiltersProps = Common$3 & Omit<ButtonProps$1, 'getContent' | 'gap'>;
886
-
887
- interface AppliedFiltersMenuProps extends Common$3 {
888
- open: boolean;
889
- close: () => void;
890
- }
891
-
892
- declare const AppliedFilters: ((props: AppliedFiltersProps) => react_jsx_runtime.JSX.Element) & {
893
- Menu: (props: AppliedFiltersMenuProps) => react_jsx_runtime.JSX.Element;
894
- };
895
-
896
879
  type Size = 'tiny' | 'mini' | 'small' | 'large' | 'big';
897
880
  interface CommonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {
898
881
  /**
@@ -947,7 +930,7 @@ interface CalendarInterface {
947
930
  weeks: Date[][];
948
931
  }
949
932
  type DayAppearance = 'active' | 'highlight' | 'disabled';
950
- interface Common$2 extends React__default.HTMLAttributes<HTMLDivElement> {
933
+ interface Common$3 extends React__default.HTMLAttributes<HTMLDivElement> {
951
934
  label?: ReactNode;
952
935
  initialMonth?: Date;
953
936
  max?: Date;
@@ -970,15 +953,15 @@ interface Common$2 extends React__default.HTMLAttributes<HTMLDivElement> {
970
953
  ];
971
954
  paddingless?: true;
972
955
  }
973
- type BasicCalendarProps = (Common$2 & {
956
+ type BasicCalendarProps = (Common$3 & {
974
957
  absolute?: undefined;
975
- }) | (Common$2 & {
958
+ }) | (Common$3 & {
976
959
  absolute: true;
977
960
  } & AbsoluteContainerProps);
978
961
 
979
962
  type Value$2 = Date | null;
980
963
  type InputTimeProps$1 = Omit<TimeProps, 'type' | 'value' | 'setValue' | 'minWidth'>;
981
- interface Common$1 extends Pick<BasicCalendarProps, 'initialMonth' | 'max' | 'min' | 'onChangeMonth' | 'label' | 'calendar' | 'paddingless'>, Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit'> {
964
+ interface Common$2 extends Pick<BasicCalendarProps, 'initialMonth' | 'max' | 'min' | 'onChangeMonth' | 'label' | 'calendar' | 'paddingless'>, Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit'> {
982
965
  initialValue?: Value$2;
983
966
  value?: [Value$2, (value: Value$2) => void];
984
967
  time?: true | InputTimeProps$1 | ((value: Value$2) => InputTimeProps$1 | undefined);
@@ -989,13 +972,13 @@ interface Common$1 extends Pick<BasicCalendarProps, 'initialMonth' | 'max' | 'mi
989
972
  invalid?: [boolean, (invalid: boolean) => void];
990
973
  getDay?: (day: Date) => Partial<ReturnType<BasicCalendarProps['getDay']>>;
991
974
  }
992
- type AbsoluteSingleCalendarProps = Common$1 & Omit<AbsoluteContainerProps, 'onSubmit'>;
975
+ type AbsoluteSingleCalendarProps = Common$2 & Omit<AbsoluteContainerProps, 'onSubmit'>;
993
976
 
994
977
  type Value$1 = [Date | null, Date | null];
995
978
  type InputTimeProps = Omit<TimeProps, 'type' | 'value' | 'setValue' | 'minWidth'>;
996
979
  type GetInputTimeProps = (value: Date | null) => InputTimeProps | undefined;
997
980
  type OnChangeMonth = Exclude<BasicCalendarProps['onChangeMonth'], undefined>;
998
- interface Common extends Pick<BasicCalendarProps, 'initialMonth' | 'max' | 'min'>, Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit'> {
981
+ interface Common$1 extends Pick<BasicCalendarProps, 'initialMonth' | 'max' | 'min'>, Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit'> {
999
982
  initialValue?: Value$1;
1000
983
  value?: [Value$1, (value: Value$1) => void];
1001
984
  time?: true | [
@@ -1009,21 +992,21 @@ interface Common extends Pick<BasicCalendarProps, 'initialMonth' | 'max' | 'min'
1009
992
  onChangeMonth?: (calendar: Parameters<OnChangeMonth>[0], side: 'left' | 'right') => ReturnType<OnChangeMonth>;
1010
993
  getDay?: (day: Date, side: 'left' | 'right') => Partial<ReturnType<BasicCalendarProps['getDay']>>;
1011
994
  }
1012
- type AbsoluteIntervalCalendarProps = Common & Omit<AbsoluteContainerProps, 'onSubmit'>;
995
+ type AbsoluteIntervalCalendarProps = Common$1 & Omit<AbsoluteContainerProps, 'onSubmit'>;
1013
996
 
1014
- declare const Calendar: React__default.ForwardRefExoticComponent<((Common$2 & {
997
+ declare const Calendar: React__default.ForwardRefExoticComponent<((Common$3 & {
1015
998
  absolute?: undefined;
1016
999
  } & {
1017
1000
  type: "basic";
1018
- }) | (Common & {
1001
+ }) | (Common$1 & {
1019
1002
  absolute?: undefined;
1020
1003
  } & {
1021
1004
  type: "interval";
1022
1005
  }) | ({
1023
1006
  absolute?: undefined;
1024
- } & Common$1 & {
1007
+ } & Common$2 & {
1025
1008
  type: "single";
1026
- }) | Omit<Common$2 & {
1009
+ }) | Omit<Common$3 & {
1027
1010
  absolute: true;
1028
1011
  } & Omit<React__default.HTMLAttributes<HTMLDivElement>, "content" | "children"> & {
1029
1012
  width?: string | number;
@@ -1053,7 +1036,7 @@ declare const Calendar: React__default.ForwardRefExoticComponent<((Common$2 & {
1053
1036
  transition?: Partial<Omit<Transition$1<"width" | "max-width" | "height" | "max-height">, "active">>;
1054
1037
  } & {
1055
1038
  type: "basic";
1056
- }, "ref"> | Omit<Common$2 & {
1039
+ }, "ref"> | Omit<Common$3 & {
1057
1040
  absolute: true;
1058
1041
  } & Omit<React__default.HTMLAttributes<HTMLDivElement>, "content" | "children"> & {
1059
1042
  width?: string | number;
@@ -1083,13 +1066,13 @@ declare const Calendar: React__default.ForwardRefExoticComponent<((Common$2 & {
1083
1066
  transition?: Partial<Omit<Transition$1<"width" | "max-width" | "height" | "max-height">, "active">>;
1084
1067
  } & {
1085
1068
  type: "basic";
1086
- }, "ref"> | Omit<Common & Omit<AbsoluteContainerProps, "onSubmit"> & {
1069
+ }, "ref"> | Omit<Common$1 & Omit<AbsoluteContainerProps, "onSubmit"> & {
1087
1070
  absolute: true;
1088
1071
  } & {
1089
1072
  type: "interval";
1090
1073
  }, "ref"> | Omit<{
1091
1074
  absolute: true;
1092
- } & Common$1 & Omit<AbsoluteContainerProps, "onSubmit"> & {
1075
+ } & Common$2 & Omit<AbsoluteContainerProps, "onSubmit"> & {
1093
1076
  type: "single";
1094
1077
  }, "ref">) & React__default.RefAttributes<HTMLDivElement>>;
1095
1078
 
@@ -1107,6 +1090,24 @@ type EllipsisContainerProps = React.HTMLAttributes<HTMLDivElement> & {
1107
1090
 
1108
1091
  declare const EllipsisContainer: (props: EllipsisContainerProps) => react_jsx_runtime.JSX.Element;
1109
1092
 
1093
+ interface Common {
1094
+ appliedFilters: [
1095
+ AppliedFilter[],
1096
+ React__default.Dispatch<React__default.SetStateAction<AppliedFilter[]>>
1097
+ ];
1098
+ containerProps?: Omit<AbsoluteContainerProps, 'open'>;
1099
+ }
1100
+ type AppliedFiltersProps = Common & Omit<ButtonProps$1, 'getContent' | 'gap'>;
1101
+
1102
+ interface AppliedFiltersMenuProps extends Common {
1103
+ open: boolean;
1104
+ close: () => void;
1105
+ }
1106
+
1107
+ declare const AppliedFilters: ((props: AppliedFiltersProps) => react_jsx_runtime.JSX.Element) & {
1108
+ Menu: (props: AppliedFiltersMenuProps) => react_jsx_runtime.JSX.Element;
1109
+ };
1110
+
1110
1111
  interface FiltersMenuProps extends Common$4 {
1111
1112
  open: boolean;
1112
1113
  close: () => void;
@@ -1513,6 +1514,20 @@ declare const ProgressBar: ({ type, value, ...props }: ProgressBarProps) => reac
1513
1514
 
1514
1515
  declare const ScrollContainer: React__default.ForwardRefExoticComponent<ScrollContainerProps & React__default.RefAttributes<HTMLDivElement>>;
1515
1516
 
1517
+ type SignatureInputProps = {
1518
+ setValue: (base64: string) => void;
1519
+ value: string;
1520
+ penColor?: keyof ThemeInterface['colors'];
1521
+ backgroundColor?: keyof ThemeInterface['colors'];
1522
+ invalid?: boolean;
1523
+ label?: ReactNode;
1524
+ inputPlaceholder?: string;
1525
+ canvasPlaceholder?: string;
1526
+ onBegin?: (event: MouseEvent, ref: SignatureCanvas | null) => void;
1527
+ onEnd?: (event: MouseEvent, ref: SignatureCanvas | null) => void;
1528
+ } & Omit<SignatureCanvasProps, 'penColor' | 'backgroundColor' | 'onBegin' | 'onEnd'>;
1529
+ declare const SignatureInput: ({ setValue, value, penColor, backgroundColor, invalid, label, inputPlaceholder, canvasPlaceholder, onBegin, onEnd, ...props }: SignatureInputProps) => react_jsx_runtime.JSX.Element;
1530
+
1516
1531
  declare const Tabs: TabsComponent & {
1517
1532
  mapComponents: <C extends string, T = EmptyObject>(obj: { [K in C]: TabComponent<T>; }) => TabComponents<T, C>;
1518
1533
  buildComponent: <T = EmptyObject>(component: TabComponent<T>, provider?: TabProvider<T>) => TabComponent<T>;
@@ -1563,4 +1578,4 @@ declare const ThemeProvider: (props: {
1563
1578
  children: JSX.Element | string | (JSX.Element | string)[];
1564
1579
  }) => react_jsx_runtime.JSX.Element;
1565
1580
 
1566
- export { AbsoluteContainer as MwAbsoluteContainer, AppliedFilters as MwAppliedFilters, Button as MwButton, Calendar as MwCalendar, Card as MwCard, EllipsisContainer as MwEllipsisContainer, Filters as MwFilters, Form as MwForm, Grid as MwGrid, Icon as MwIcon, Indicator as MwIndicator, Input as MwInput, Link as MwLink, Loader as MwLoader, Menu as MwMenu, Modal as MwModal, Placeholder as MwPlaceholder, ProgressBar as MwProgressBar, ScrollContainer as MwScrollContainer, Tabs as MwTabs, TextArea as MwTextArea, Toast as MwToast, Transition as MwTransition, Zoom as MwZoom, ThemeProvider, theme, useTransition as useMwTransition };
1581
+ export { AbsoluteContainer as MwAbsoluteContainer, AppliedFilters as MwAppliedFilters, Button as MwButton, Calendar as MwCalendar, Card as MwCard, EllipsisContainer as MwEllipsisContainer, Filters as MwFilters, Form as MwForm, Grid as MwGrid, Icon as MwIcon, Indicator as MwIndicator, Input as MwInput, Link as MwLink, Loader as MwLoader, Menu as MwMenu, Modal as MwModal, Placeholder as MwPlaceholder, ProgressBar as MwProgressBar, ScrollContainer as MwScrollContainer, SignatureInput as MwSignature, Tabs as MwTabs, TextArea as MwTextArea, Toast as MwToast, Transition as MwTransition, Zoom as MwZoom, ThemeProvider, theme, useTransition as useMwTransition };