@grayscale-dev/dragon 0.1.7 → 0.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/README.md +5 -3
- package/dist/components/dui-input.d.ts +2 -2
- package/dist/index.js +2462 -184
- package/dist/manifest.json +3 -3
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -146,10 +146,12 @@ dui-input::part(input) {
|
|
|
146
146
|
|
|
147
147
|
**Masking**
|
|
148
148
|
|
|
149
|
-
`regex`
|
|
149
|
+
`regex` uses the IMask regex engine with full JavaScript `RegExp` syntax.
|
|
150
150
|
|
|
151
|
-
- Example
|
|
152
|
-
-
|
|
151
|
+
- Example single digit: `\d`
|
|
152
|
+
- Example unlimited digits: `\d*`
|
|
153
|
+
- Example phone validation shape: `^\(\d{3}\)\s\d{3}-\d{4}$`
|
|
154
|
+
- As the user types, input is constrained by the regex.
|
|
153
155
|
- `regex-placeholder` provides explicit placeholder text for regex mode.
|
|
154
156
|
- If `regex-placeholder` is empty, no regex placeholder is shown.
|
|
155
157
|
- With `label-position="floating"`, regex placeholder appears only while focused.
|
|
@@ -16,7 +16,7 @@ export declare class DuiInput extends LitElement {
|
|
|
16
16
|
private inputEl?;
|
|
17
17
|
private internals?;
|
|
18
18
|
private defaultValue?;
|
|
19
|
-
private
|
|
19
|
+
private compiledRegex;
|
|
20
20
|
private isFocused;
|
|
21
21
|
constructor();
|
|
22
22
|
connectedCallback(): void;
|
|
@@ -27,7 +27,7 @@ export declare class DuiInput extends LitElement {
|
|
|
27
27
|
formResetCallback(): void;
|
|
28
28
|
formStateRestoreCallback(state: unknown): void;
|
|
29
29
|
formDisabledCallback(disabled: boolean): void;
|
|
30
|
-
private
|
|
30
|
+
private normalizeWithRegex;
|
|
31
31
|
private syncFormValue;
|
|
32
32
|
private handleInput;
|
|
33
33
|
private handleChange;
|