softable-pixels-web 1.1.19 → 1.1.21
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/{BasePopover-UzOryrTn.js → BasePopover-BVeMpuWR.js} +2 -2
- package/dist/{BasePopover-UzOryrTn.js.map → BasePopover-BVeMpuWR.js.map} +1 -1
- package/dist/{Button-DiBsoNFU.js → Button-Cbt1knrt.js} +4 -4
- package/dist/Button-Cbt1knrt.js.map +1 -0
- package/dist/{ContextMenu-vFIUXgP8.js → ContextMenu-B94eRUm7.js} +3 -3
- package/dist/{ContextMenu-vFIUXgP8.js.map → ContextMenu-B94eRUm7.js.map} +1 -1
- package/dist/{IconButton-DAZvE8i5.js → IconButton-B_yAoSQR.js} +11 -9
- package/dist/IconButton-B_yAoSQR.js.map +1 -0
- package/dist/{Input-B6a6mXsZ.js → Input-7z9sFjK3.js} +8 -3
- package/dist/Input-7z9sFjK3.js.map +1 -0
- package/dist/MaskModule-DBNrJACG.js +704 -0
- package/dist/MaskModule-DBNrJACG.js.map +1 -0
- package/dist/{Popover-C-NRJlWf.js → Popover-BDNQO09F.js} +3 -5
- package/dist/Popover-BDNQO09F.js.map +1 -0
- package/dist/{Select-CVcQGxjv.js → Select-Bad465DY.js} +4 -3
- package/dist/Select-Bad465DY.js.map +1 -0
- package/dist/{TextArea-Oqw0zh_x.js → TextArea-DHUTFFOU.js} +1 -1
- package/dist/{TextArea-Oqw0zh_x.js.map → TextArea-DHUTFFOU.js.map} +1 -1
- package/dist/base-popover.d.ts +3 -3
- package/dist/base-popover.js +3 -3
- package/dist/button.d.ts +2 -2
- package/dist/button.js +1 -1
- package/dist/check-item.d.ts +1 -1
- package/dist/checkbox.d.ts +2 -2
- package/dist/context-menu.d.ts +1 -1
- package/dist/context-menu.js +4 -4
- package/dist/icon-button.d.ts +1 -1
- package/dist/icon-button.js +1 -1
- package/dist/{index-BD5ThARj.d.ts → index-BNPyjNve.d.ts} +1 -1
- package/dist/{index-B6V8Bhgk.d.ts → index-BY84CAyh.d.ts} +2 -2
- package/dist/{index-CzB15994.d.ts → index-BeZYjWoj.d.ts} +1 -1
- package/dist/{index-BymgvkBq.d.ts → index-BhxcqGNw.d.ts} +2 -2
- package/dist/index-BjwQCXWj.d.ts +145 -0
- package/dist/{index-aQIW73fh.d.ts → index-CEk3W9fj.d.ts} +1 -1
- package/dist/{index-BszVk1Tx.d.ts → index-Chi8TU12.d.ts} +25 -4
- package/dist/{index-BD5Vr9sw.d.ts → index-Cl2z9ftU.d.ts} +2 -2
- package/dist/{index-9BlZnPff.d.ts → index-ClqTlRGD.d.ts} +6 -5
- package/dist/{index-DH6rpwqM.d.ts → index-CyvNJW2l.d.ts} +2 -2
- package/dist/{index-DK9_OGgn.d.ts → index-DEKll7zF.d.ts} +2 -2
- package/dist/{index-E0ifwXgE.d.ts → index-DVE8mV5m.d.ts} +5 -6
- package/dist/{index-B1QUSkjv.d.ts → index-Dp4TTO2D.d.ts} +5 -3
- package/dist/{index-D-9XHxWM.d.ts → index-modFVzpZ.d.ts} +4 -4
- package/dist/index.d.ts +15 -15
- package/dist/index.js +10 -9
- package/dist/input.d.ts +1 -1
- package/dist/input.js +2 -1
- package/dist/mask-modules.d.ts +2 -144
- package/dist/mask-modules.js +2 -704
- package/dist/popover.d.ts +2 -2
- package/dist/popover.js +2 -2
- package/dist/select.d.ts +2 -2
- package/dist/select.js +4 -4
- package/dist/{styleProps-B2pBEf9N.d.ts → styleProps-CWZn-ouw.d.ts} +1 -1
- package/dist/switch.d.ts +1 -1
- package/dist/tab-switch.d.ts +1 -1
- package/dist/text-area.d.ts +1 -1
- package/dist/text-area.js +1 -1
- package/dist/theme-context.d.ts +1 -1
- package/dist/{types-rPQapqo2.d.ts → types-BIJRqScJ.d.ts} +1 -1
- package/dist/{types-Ck6jQYTO.d.ts → types-BM6zJmu5.d.ts} +3 -3
- package/dist/{types-699enaOL.d.ts → types-CRA-1_6O.d.ts} +4 -3
- package/dist/typography.d.ts +3 -3
- package/dist/use-floating.d.ts +1 -1
- package/dist/use-floating.js +1 -1
- package/dist/{useFloating-DCxblHIR.js → useFloating-DRwB71jG.js} +2 -1
- package/dist/{useFloating-DCxblHIR.js.map → useFloating-DRwB71jG.js.map} +1 -1
- package/dist/{useThemedStyles-C23Tevdv.d.ts → useThemedStyles-BUR6rDGs.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/Button-DiBsoNFU.js.map +0 -1
- package/dist/IconButton-DAZvE8i5.js.map +0 -1
- package/dist/Input-B6a6mXsZ.js.map +0 -1
- package/dist/Popover-C-NRJlWf.js.map +0 -1
- package/dist/Select-CVcQGxjv.js.map +0 -1
- package/dist/mask-modules.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as TextProps, n as LayoutProps, r as MarginProps } from "./styleProps-
|
|
2
|
-
import { n as StylesOf } from "./useThemedStyles-
|
|
3
|
-
import { t as FloatingOptions } from "./types-
|
|
4
|
-
import { t as PopoverProps } from "./types-
|
|
1
|
+
import { a as TextProps, n as LayoutProps, r as MarginProps } from "./styleProps-CWZn-ouw.js";
|
|
2
|
+
import { n as StylesOf } from "./useThemedStyles-BUR6rDGs.js";
|
|
3
|
+
import { t as FloatingOptions } from "./types-BIJRqScJ.js";
|
|
4
|
+
import { t as PopoverProps } from "./types-CRA-1_6O.js";
|
|
5
5
|
import React$1 from "react";
|
|
6
6
|
|
|
7
7
|
//#region src/components/commons/inputs/Select/styles.d.ts
|
|
@@ -67,6 +67,7 @@ interface SelectProps extends LayoutProps, MarginProps {
|
|
|
67
67
|
options: SelectOption[];
|
|
68
68
|
portalId?: PopoverProps['portalId'];
|
|
69
69
|
strategy?: FloatingOptions['strategy'];
|
|
70
|
+
scrollContainerId?: FloatingOptions['scrollContainerId'];
|
|
70
71
|
absoluteReference?: FloatingOptions['absoluteReference'];
|
|
71
72
|
canClear?: boolean;
|
|
72
73
|
multiple?: boolean;
|
|
@@ -90,4 +91,4 @@ interface SelectOption {
|
|
|
90
91
|
declare const Select: React$1.FC<SelectProps>;
|
|
91
92
|
//#endregion
|
|
92
93
|
export { types_d_exports as n, Select as t };
|
|
93
|
-
//# sourceMappingURL=index-
|
|
94
|
+
//# sourceMappingURL=index-ClqTlRGD.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PopoverProps } from "./types-
|
|
1
|
+
import { t as PopoverProps } from "./types-CRA-1_6O.js";
|
|
2
2
|
import React, { PropsWithChildren } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/commons/structure/BasePopover/types.d.ts
|
|
@@ -19,4 +19,4 @@ interface BasePopoverProps extends Omit<PopoverProps, 'content' | 'hideShadow'>,
|
|
|
19
19
|
declare const BasePopover: React.FC<BasePopoverProps>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { BasePopover as t };
|
|
22
|
-
//# sourceMappingURL=index-
|
|
22
|
+
//# sourceMappingURL=index-CyvNJW2l.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PopoverProps } from "./types-
|
|
1
|
+
import { t as PopoverProps } from "./types-CRA-1_6O.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/commons/toolkit/Popover/index.d.ts
|
|
@@ -6,4 +6,4 @@ import React from "react";
|
|
|
6
6
|
declare const Popover: React.FC<PopoverProps>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { Popover as t };
|
|
9
|
-
//# sourceMappingURL=index-
|
|
9
|
+
//# sourceMappingURL=index-DEKll7zF.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as PaddingProps } from "./styleProps-
|
|
2
|
-
import { r as TypeStyles } from "./useThemedStyles-
|
|
3
|
-
import { n as TypographyVariant } from "./types-
|
|
1
|
+
import { i as PaddingProps } from "./styleProps-CWZn-ouw.js";
|
|
2
|
+
import { r as TypeStyles } from "./useThemedStyles-BUR6rDGs.js";
|
|
3
|
+
import { n as TypographyVariant } from "./types-BM6zJmu5.js";
|
|
4
4
|
import React, { MouseEvent, ReactNode } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/components/commons/buttons/Button/styles.d.ts
|
|
@@ -8,7 +8,6 @@ declare function createButtonStyles({
|
|
|
8
8
|
size,
|
|
9
9
|
color,
|
|
10
10
|
variant,
|
|
11
|
-
disabled,
|
|
12
11
|
fullWidth,
|
|
13
12
|
textAlign,
|
|
14
13
|
outlineColor
|
|
@@ -26,7 +25,7 @@ declare function createButtonStyles({
|
|
|
26
25
|
transition: "background-color 0.5s";
|
|
27
26
|
border: string;
|
|
28
27
|
backgroundColor: string;
|
|
29
|
-
boxShadow: "none" | "
|
|
28
|
+
boxShadow: "none" | "var(--px-shadow-xs)";
|
|
30
29
|
__rules: {
|
|
31
30
|
'&:hover': {
|
|
32
31
|
opacity: "0.85 !important";
|
|
@@ -116,4 +115,4 @@ interface ButtonProps extends PaddingProps {
|
|
|
116
115
|
declare const Button: React.FC<ButtonProps>;
|
|
117
116
|
//#endregion
|
|
118
117
|
export { Button as t };
|
|
119
|
-
//# sourceMappingURL=index-
|
|
118
|
+
//# sourceMappingURL=index-DVE8mV5m.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { a as TextProps, n as LayoutProps, r as MarginProps } from "./styleProps-
|
|
2
|
-
import { n as StylesOf } from "./useThemedStyles-
|
|
1
|
+
import { a as TextProps, n as LayoutProps, r as MarginProps } from "./styleProps-CWZn-ouw.js";
|
|
2
|
+
import { n as StylesOf } from "./useThemedStyles-BUR6rDGs.js";
|
|
3
|
+
import { r as MaskType } from "./index-BjwQCXWj.js";
|
|
3
4
|
import * as react0 from "react";
|
|
4
5
|
import { HTMLInputTypeAttribute, ReactNode } from "react";
|
|
5
6
|
|
|
@@ -79,6 +80,7 @@ interface InputProps extends LayoutProps, MarginProps {
|
|
|
79
80
|
value?: string;
|
|
80
81
|
placeholder?: string;
|
|
81
82
|
type?: HTMLInputTypeAttribute;
|
|
83
|
+
mask?: MaskType;
|
|
82
84
|
required?: boolean;
|
|
83
85
|
disabled?: boolean;
|
|
84
86
|
minLength?: number;
|
|
@@ -101,4 +103,4 @@ interface InputMethods {
|
|
|
101
103
|
declare const Input: react0.ForwardRefExoticComponent<InputProps & react0.RefAttributes<InputMethods>>;
|
|
102
104
|
//#endregion
|
|
103
105
|
export { Input as t };
|
|
104
|
-
//# sourceMappingURL=index-
|
|
106
|
+
//# sourceMappingURL=index-Dp4TTO2D.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as CommonStyleProps } from "./styleProps-
|
|
1
|
+
import { t as CommonStyleProps } from "./styleProps-CWZn-ouw.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/commons/toolkit/TabSwitch/styles.d.ts
|
|
6
6
|
declare function createTabSwitchStyles<T>(props: TabSwitchProps<T>): {
|
|
@@ -41,7 +41,7 @@ interface TabSwitchProps<T> extends CommonStyleProps {
|
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/components/commons/toolkit/TabSwitch/index.d.ts
|
|
44
|
-
declare const TabSwitch: <T>(props: TabSwitchProps<T>) =>
|
|
44
|
+
declare const TabSwitch: <T>(props: TabSwitchProps<T>) => react_jsx_runtime2.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
46
|
export { SwitchOption as n, TabSwitchProps as r, TabSwitch as t };
|
|
47
|
-
//# sourceMappingURL=index-
|
|
47
|
+
//# sourceMappingURL=index-modFVzpZ.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import "./types-
|
|
2
|
-
import { t as Button } from "./index-
|
|
3
|
-
import { t as IconButton } from "./index-
|
|
4
|
-
import { t as Input } from "./index-
|
|
5
|
-
import { n as types_d_exports$2, t as Select } from "./index-
|
|
6
|
-
import { n as types_d_exports$1 } from "./types-
|
|
7
|
-
import { t as TextArea } from "./index-
|
|
8
|
-
import { t as Popover } from "./index-
|
|
9
|
-
import { t as BasePopover } from "./index-
|
|
10
|
-
import { t as CheckItem } from "./index-
|
|
11
|
-
import { t as Checkbox } from "./index-
|
|
12
|
-
import { n as types_d_exports, t as ContextMenu } from "./index-
|
|
1
|
+
import "./types-BM6zJmu5.js";
|
|
2
|
+
import { t as Button } from "./index-DVE8mV5m.js";
|
|
3
|
+
import { t as IconButton } from "./index-Chi8TU12.js";
|
|
4
|
+
import { t as Input } from "./index-Dp4TTO2D.js";
|
|
5
|
+
import { n as types_d_exports$2, t as Select } from "./index-ClqTlRGD.js";
|
|
6
|
+
import { n as types_d_exports$1 } from "./types-CRA-1_6O.js";
|
|
7
|
+
import { t as TextArea } from "./index-Cl2z9ftU.js";
|
|
8
|
+
import { t as Popover } from "./index-DEKll7zF.js";
|
|
9
|
+
import { t as BasePopover } from "./index-CyvNJW2l.js";
|
|
10
|
+
import { t as CheckItem } from "./index-BeZYjWoj.js";
|
|
11
|
+
import { t as Checkbox } from "./index-BhxcqGNw.js";
|
|
12
|
+
import { n as types_d_exports, t as ContextMenu } from "./index-BY84CAyh.js";
|
|
13
13
|
import { InfoSummary, InfoSummaryItem, InfoSummaryProps } from "./info-summary.js";
|
|
14
|
-
import { t as Switch } from "./index-
|
|
15
|
-
import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-
|
|
14
|
+
import { t as Switch } from "./index-CEk3W9fj.js";
|
|
15
|
+
import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-modFVzpZ.js";
|
|
16
16
|
import { Typography } from "./typography.js";
|
|
17
|
-
import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-
|
|
17
|
+
import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-BNPyjNve.js";
|
|
18
18
|
import { useDismiss } from "./use-dismiss.js";
|
|
19
19
|
import { AnchorLike, useFloating } from "./use-floating.js";
|
|
20
20
|
import { useVirtualAnchor } from "./use-virtual-anchor.js";
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./useThemedStyles-CrarDyWc.js";
|
|
2
2
|
import { t as Switch } from "./Switch-DJNZbvzy.js";
|
|
3
3
|
import { t as useDismiss } from "./useDismiss-CAEk_GV-.js";
|
|
4
|
-
import { t as useFloating } from "./useFloating-
|
|
5
|
-
import { n as types_exports$1, t as Popover } from "./Popover-
|
|
4
|
+
import { t as useFloating } from "./useFloating-DRwB71jG.js";
|
|
5
|
+
import { n as types_exports$1, t as Popover } from "./Popover-BDNQO09F.js";
|
|
6
6
|
import "./Icon-KzwFJI_k.js";
|
|
7
7
|
import { t as Typography } from "./Typography-BkFV7BhK.js";
|
|
8
8
|
import { t as Checkbox } from "./Checkbox-j9ZnSxT7.js";
|
|
@@ -10,14 +10,15 @@ import { n as useTheme, t as ThemeProvider } from "./ThemeContext-DhXvmWKO.js";
|
|
|
10
10
|
import { t as TabSwitch } from "./TabSwitch-DlXdgLPc.js";
|
|
11
11
|
import { t as CheckItem } from "./CheckItem-CJqWCE1W.js";
|
|
12
12
|
import { t as InfoSummary } from "./InfoSummary-Cf2ein9V.js";
|
|
13
|
-
import { n as types_exports, t as ContextMenu } from "./ContextMenu-
|
|
14
|
-
import { t as BasePopover } from "./BasePopover-
|
|
15
|
-
import { t as Button } from "./Button-
|
|
16
|
-
import { t as IconButton } from "./IconButton-
|
|
13
|
+
import { n as types_exports, t as ContextMenu } from "./ContextMenu-B94eRUm7.js";
|
|
14
|
+
import { t as BasePopover } from "./BasePopover-BVeMpuWR.js";
|
|
15
|
+
import { t as Button } from "./Button-Cbt1knrt.js";
|
|
16
|
+
import { t as IconButton } from "./IconButton-B_yAoSQR.js";
|
|
17
17
|
import "./Label-BHq2knad.js";
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import { t as
|
|
18
|
+
import "./MaskModule-DBNrJACG.js";
|
|
19
|
+
import { t as Input } from "./Input-7z9sFjK3.js";
|
|
20
|
+
import { n as types_exports$2, t as Select } from "./Select-Bad465DY.js";
|
|
21
|
+
import { t as TextArea } from "./TextArea-DHUTFFOU.js";
|
|
21
22
|
import { useVirtualAnchor } from "./use-virtual-anchor.js";
|
|
22
23
|
|
|
23
24
|
export { BasePopover, Button, CheckItem, Checkbox, ContextMenu, types_exports as ContextMenuTypes, IconButton, InfoSummary, Input, Popover, types_exports$1 as PopoverTypes, Select, types_exports$2 as SelectTypes, Switch, TabSwitch, TextArea, ThemeProvider, Typography, useDismiss, useFloating, useTheme, useVirtualAnchor };
|
package/dist/input.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Input } from "./index-
|
|
1
|
+
import { t as Input } from "./index-Dp4TTO2D.js";
|
|
2
2
|
export { Input };
|
package/dist/input.js
CHANGED
|
@@ -2,6 +2,7 @@ import "./useThemedStyles-CrarDyWc.js";
|
|
|
2
2
|
import "./Icon-KzwFJI_k.js";
|
|
3
3
|
import "./Typography-BkFV7BhK.js";
|
|
4
4
|
import "./Label-BHq2knad.js";
|
|
5
|
-
import
|
|
5
|
+
import "./MaskModule-DBNrJACG.js";
|
|
6
|
+
import { t as Input } from "./Input-7z9sFjK3.js";
|
|
6
7
|
|
|
7
8
|
export { Input };
|
package/dist/mask-modules.d.ts
CHANGED
|
@@ -1,144 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Supported locales (country + language region).
|
|
4
|
-
*
|
|
5
|
-
* Extend this enum as needed for new countries.
|
|
6
|
-
*/
|
|
7
|
-
declare enum Locale {
|
|
8
|
-
BR = "pt-BR",
|
|
9
|
-
// Brazil
|
|
10
|
-
US = "en-US",
|
|
11
|
-
// United States
|
|
12
|
-
AR = "es-AR",
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Types of masks supported in the system.
|
|
16
|
-
*
|
|
17
|
-
* Add new types as needed for different data formats.
|
|
18
|
-
*/
|
|
19
|
-
declare enum MaskType {
|
|
20
|
-
CPF = "CPF",
|
|
21
|
-
CNPJ = "CNPJ",
|
|
22
|
-
DOCUMENT = "DOCUMENT",
|
|
23
|
-
PHONE = "PHONE",
|
|
24
|
-
DATE = "DATE",
|
|
25
|
-
FLOAT = "FLOAT",
|
|
26
|
-
INTEGER = "INTEGER",
|
|
27
|
-
MONEY = "MONEY",
|
|
28
|
-
ZIP_CODE = "ZIP_CODE",
|
|
29
|
-
NUMERIC_SYMBOL = "NUMERIC_SYMBOL",
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/services/MaskModule/types.d.ts
|
|
33
|
-
/**
|
|
34
|
-
* Represents a generic mask.
|
|
35
|
-
*
|
|
36
|
-
* A mask is responsible for formatting and unformatting (removing formatting) from a value.
|
|
37
|
-
*/
|
|
38
|
-
interface Mask {
|
|
39
|
-
/**
|
|
40
|
-
* Optional minimum length of the masked string.
|
|
41
|
-
*/
|
|
42
|
-
minLength?: number;
|
|
43
|
-
/**
|
|
44
|
-
* Optional maximum length of the masked string.
|
|
45
|
-
*/
|
|
46
|
-
maxLength?: number;
|
|
47
|
-
/**
|
|
48
|
-
* Formats a plain string into a masked format.
|
|
49
|
-
* @param value - Raw string (e.g., "12345678901").
|
|
50
|
-
* @returns Masked string (e.g., "123.456.789-01").
|
|
51
|
-
*/
|
|
52
|
-
format(value: string): string;
|
|
53
|
-
/**
|
|
54
|
-
* Removes all mask characters from a formatted string.
|
|
55
|
-
* @param value - Masked string (e.g., "123.456.789-01").
|
|
56
|
-
* @returns Unmasked string (e.g., "12345678901").
|
|
57
|
-
*/
|
|
58
|
-
unmask(value: string): string;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Represents a validator for a masked value.
|
|
62
|
-
*
|
|
63
|
-
* A validator checks whether a masked value is valid based on rules.
|
|
64
|
-
*/
|
|
65
|
-
interface Validator {
|
|
66
|
-
/**
|
|
67
|
-
* Validates whether the input value is valid.
|
|
68
|
-
* @param value - Masked string.
|
|
69
|
-
* @returns `true` if valid, `false` otherwise.
|
|
70
|
-
*/
|
|
71
|
-
validate(value: string): boolean;
|
|
72
|
-
}
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region src/services/MaskModule/base/BaseMask.d.ts
|
|
75
|
-
/**
|
|
76
|
-
* Abstract class that provides default behavior for most masks.
|
|
77
|
-
* - Implements unmask() by removing all non-numeric characters.
|
|
78
|
-
* - Supports optional maxLength and minLength constraints.
|
|
79
|
-
*/
|
|
80
|
-
declare abstract class BaseMask implements Mask {
|
|
81
|
-
/**
|
|
82
|
-
* Maximum length of the masked string (optional).
|
|
83
|
-
*/
|
|
84
|
-
maxLength?: number;
|
|
85
|
-
/**
|
|
86
|
-
* Minimum length of the masked string (optional).
|
|
87
|
-
*/
|
|
88
|
-
minLength?: number;
|
|
89
|
-
constructor(minLength?: number, maxLength?: number);
|
|
90
|
-
/**
|
|
91
|
-
* Removes all non-numeric characters from a string.
|
|
92
|
-
* @param value - Masked or unmasked string.
|
|
93
|
-
* @returns Plain string with digits only.
|
|
94
|
-
*/
|
|
95
|
-
unmask(value: string): string;
|
|
96
|
-
/**
|
|
97
|
-
* Must be implemented by each concrete mask class.
|
|
98
|
-
* Applies the mask format to the input string.
|
|
99
|
-
* @param value - Raw string.
|
|
100
|
-
* @returns Masked string.
|
|
101
|
-
*/
|
|
102
|
-
abstract format(value: string): string;
|
|
103
|
-
}
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region src/services/MaskModule/base/BaseValidator.d.ts
|
|
106
|
-
/**
|
|
107
|
-
* Abstract class providing common validation utilities.
|
|
108
|
-
* - Supports regex validation.
|
|
109
|
-
* - Supports min and max length validation.
|
|
110
|
-
*/
|
|
111
|
-
declare abstract class BaseValidator implements Validator {
|
|
112
|
-
protected pattern?: RegExp;
|
|
113
|
-
protected minLength?: number;
|
|
114
|
-
protected maxLength?: number;
|
|
115
|
-
constructor(options?: {
|
|
116
|
-
pattern?: RegExp;
|
|
117
|
-
minLength?: number;
|
|
118
|
-
maxLength?: number;
|
|
119
|
-
});
|
|
120
|
-
/**
|
|
121
|
-
* Validates the input value based on:
|
|
122
|
-
* - Pattern matching (if defined)
|
|
123
|
-
* - Min length (if defined)
|
|
124
|
-
* - Max length (if defined)
|
|
125
|
-
*
|
|
126
|
-
* Override this method if you need custom validation logic.
|
|
127
|
-
*
|
|
128
|
-
* @param value - Value to validate (usually masked string)
|
|
129
|
-
* @returns true if valid, false otherwise
|
|
130
|
-
*/
|
|
131
|
-
validate(value: string): boolean;
|
|
132
|
-
}
|
|
133
|
-
//#endregion
|
|
134
|
-
//#region src/services/MaskModule/MaskModule.d.ts
|
|
135
|
-
declare const MaskModule: {
|
|
136
|
-
registerMask(locale: Locale, type: MaskType, mask: BaseMask): void;
|
|
137
|
-
registerValidator(locale: Locale, type: MaskType, validator: BaseValidator): void;
|
|
138
|
-
getMask(locale: Locale, type: MaskType): BaseMask | undefined;
|
|
139
|
-
getValidator(locale: Locale, type: MaskType): BaseValidator | undefined;
|
|
140
|
-
reset(): void;
|
|
141
|
-
};
|
|
142
|
-
//#endregion
|
|
143
|
-
export { Locale, MaskModule, MaskType };
|
|
144
|
-
//# sourceMappingURL=mask-modules.d.ts.map
|
|
1
|
+
import { n as Locale, r as MaskType, t as MaskModule } from "./index-BjwQCXWj.js";
|
|
2
|
+
export { Locale, MaskModule, MaskType };
|