@juspay/svelte-ui-components 1.34.1 → 1.34.2
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/Accordion/Accordion.svelte +17 -30
- package/dist/Accordion/Accordion.svelte.d.ts +6 -20
- package/dist/Animations/ModalAnimation.svelte +44 -30
- package/dist/Animations/ModalAnimation.svelte.d.ts +9 -21
- package/dist/Animations/OverlayAnimation.svelte +9 -2
- package/dist/Animations/OverlayAnimation.svelte.d.ts +6 -28
- package/dist/Badge/Badge.svelte +9 -8
- package/dist/Badge/Badge.svelte.d.ts +3 -18
- package/dist/Banner/Banner.svelte +20 -19
- package/dist/Banner/Banner.svelte.d.ts +3 -23
- package/dist/Banner/properties.d.ts +6 -2
- package/dist/BrandLoader/BrandLoader.svelte +11 -12
- package/dist/BrandLoader/BrandLoader.svelte.d.ts +3 -19
- package/dist/BrandLoader/properties.d.ts +1 -4
- package/dist/BrandLoader/properties.js +1 -7
- package/dist/Button/Button.svelte +38 -27
- package/dist/Button/Button.svelte.d.ts +4 -23
- package/dist/Button/properties.d.ts +9 -5
- package/dist/Button/properties.js +1 -7
- package/dist/Carousel/Carousel.svelte +132 -108
- package/dist/Carousel/Carousel.svelte.d.ts +3 -20
- package/dist/Carousel/properties.d.ts +6 -12
- package/dist/Carousel/properties.js +1 -7
- package/dist/CheckListItem/CheckListItem.svelte +18 -12
- package/dist/CheckListItem/CheckListItem.svelte.d.ts +4 -23
- package/dist/CheckListItem/properties.d.ts +7 -0
- package/dist/CheckListItem/properties.js +1 -0
- package/dist/GridItem/GridItem.svelte +17 -11
- package/dist/GridItem/GridItem.svelte.d.ts +4 -24
- package/dist/GridItem/properties.d.ts +8 -0
- package/dist/GridItem/properties.js +1 -0
- package/dist/Icon/Icon.svelte +8 -6
- package/dist/Icon/Icon.svelte.d.ts +3 -21
- package/dist/Icon/properties.d.ts +3 -2
- package/dist/Icon/properties.js +1 -4
- package/dist/IconStack/IconStack.svelte +5 -3
- package/dist/IconStack/IconStack.svelte.d.ts +4 -19
- package/dist/IconStack/properties.d.ts +4 -1
- package/dist/Img/Img.svelte +13 -9
- package/dist/Img/Img.svelte.d.ts +4 -20
- package/dist/Img/properties.d.ts +2 -2
- package/dist/Input/Input.svelte +172 -139
- package/dist/Input/Input.svelte.d.ts +6 -32
- package/dist/Input/properties.d.ts +23 -22
- package/dist/Input/properties.js +1 -23
- package/dist/InputButton/InputButton.svelte +76 -78
- package/dist/InputButton/InputButton.svelte.d.ts +6 -35
- package/dist/InputButton/properties.d.ts +6 -4
- package/dist/InputButton/properties.js +1 -18
- package/dist/ListItem/ListItem.svelte +87 -64
- package/dist/ListItem/ListItem.svelte.d.ts +4 -35
- package/dist/ListItem/properties.d.ts +21 -7
- package/dist/ListItem/properties.js +1 -8
- package/dist/Loader/Loader.svelte +1 -4
- package/dist/Loader/Loader.svelte.d.ts +24 -15
- package/dist/Modal/Modal.svelte +117 -95
- package/dist/Modal/Modal.svelte.d.ts +3 -29
- package/dist/Modal/properties.d.ts +21 -13
- package/dist/Modal/properties.js +1 -14
- package/dist/Select/Select.svelte +170 -142
- package/dist/Select/Select.svelte.d.ts +3 -26
- package/dist/Select/properties.d.ts +19 -10
- package/dist/Status/Status.svelte +15 -15
- package/dist/Status/Status.svelte.d.ts +3 -21
- package/dist/Status/properties.d.ts +2 -2
- package/dist/Status/properties.js +1 -6
- package/dist/Stepper/Step.svelte +13 -13
- package/dist/Stepper/Step.svelte.d.ts +4 -23
- package/dist/Stepper/Stepper.svelte +10 -7
- package/dist/Stepper/Stepper.svelte.d.ts +3 -20
- package/dist/Stepper/properties.d.ts +12 -0
- package/dist/Table/Table.svelte +73 -47
- package/dist/Table/Table.svelte.d.ts +3 -20
- package/dist/Table/properties.d.ts +5 -5
- package/dist/Toast/Toast.svelte +144 -76
- package/dist/Toast/Toast.svelte.d.ts +24 -23
- package/dist/Toast/properties.d.ts +10 -11
- package/dist/Toast/properties.js +1 -4
- package/dist/Toggle/Toggle.svelte +12 -11
- package/dist/Toggle/Toggle.svelte.d.ts +4 -21
- package/dist/Toggle/properties.d.ts +5 -0
- package/dist/Toggle/properties.js +1 -0
- package/dist/Toolbar/Toolbar.svelte +27 -20
- package/dist/Toolbar/Toolbar.svelte.d.ts +3 -26
- package/dist/Toolbar/properties.d.ts +10 -4
- package/dist/Toolbar/properties.js +1 -5
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -11
- package/package.json +29 -29
package/dist/Img/Img.svelte.d.ts
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
alt: string;
|
|
6
|
-
fallback?: string | null;
|
|
7
|
-
};
|
|
8
|
-
events: {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
};
|
|
11
|
-
slots: {};
|
|
12
|
-
exports?: {} | undefined;
|
|
13
|
-
bindings?: string | undefined;
|
|
14
|
-
};
|
|
15
|
-
export type ImgProps = typeof __propDef.props;
|
|
16
|
-
export type ImgEvents = typeof __propDef.events;
|
|
17
|
-
export type ImgSlots = typeof __propDef.slots;
|
|
18
|
-
export default class Img extends SvelteComponent<ImgProps, ImgEvents, ImgSlots> {
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
1
|
+
import type { ImgProperties } from './properties';
|
|
2
|
+
declare const Img: import("svelte").Component<ImgProperties, {}, "">;
|
|
3
|
+
type Img = ReturnType<typeof Img>;
|
|
4
|
+
export default Img;
|
package/dist/Img/properties.d.ts
CHANGED
package/dist/Input/Input.svelte
CHANGED
|
@@ -1,171 +1,203 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { validateInput } from '../utils';
|
|
3
|
+
import type { InputProperties } from './properties';
|
|
4
|
+
import type { ValidationState } from '../types';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
value = $bindable(''),
|
|
8
|
+
placeholder = '',
|
|
9
|
+
dataType = 'text',
|
|
10
|
+
label = '',
|
|
11
|
+
onErrorMessage = '',
|
|
12
|
+
infoMessage = '',
|
|
13
|
+
validators = [],
|
|
14
|
+
disable = false,
|
|
15
|
+
validationPattern = null,
|
|
16
|
+
inProgressPattern = null,
|
|
17
|
+
addFocusColor = false,
|
|
18
|
+
maxLength = 1000,
|
|
19
|
+
minLength = 0,
|
|
20
|
+
actionInput = false,
|
|
21
|
+
useTextArea = false,
|
|
22
|
+
autoComplete = 'on',
|
|
23
|
+
name = '',
|
|
24
|
+
testId = '',
|
|
25
|
+
textTransformers = [],
|
|
26
|
+
onFocusout = () => {},
|
|
27
|
+
onInput = () => {},
|
|
28
|
+
onPaste = () => {},
|
|
29
|
+
onStateChange = () => {},
|
|
30
|
+
onClick = () => {}
|
|
31
|
+
}: InputProperties = $props();
|
|
32
|
+
|
|
33
|
+
export function focus() {
|
|
34
|
+
try {
|
|
35
|
+
inputElement?.focus();
|
|
36
|
+
inputElement?.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
37
|
+
} catch (error) {
|
|
38
|
+
console.error('Error focusing or scrolling inputElement:', error);
|
|
39
|
+
}
|
|
29
40
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
|
|
42
|
+
let inputElement: HTMLInputElement | HTMLTextAreaElement | null = $state(null);
|
|
43
|
+
|
|
44
|
+
let validationState = $derived.by(() => {
|
|
45
|
+
const valueValidation: ValidationState = validateInput(
|
|
46
|
+
value,
|
|
47
|
+
dataType,
|
|
48
|
+
validationPattern,
|
|
49
|
+
inProgressPattern,
|
|
50
|
+
validators
|
|
51
|
+
);
|
|
52
|
+
if (
|
|
53
|
+
valueValidation === 'InProgress' &&
|
|
54
|
+
value.length > 0 &&
|
|
55
|
+
inputElement &&
|
|
56
|
+
inputElement !== document.activeElement
|
|
57
|
+
) {
|
|
58
|
+
return 'Invalid';
|
|
45
59
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
return valueValidation;
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
let showErrorMessage = $derived(validationState === 'Invalid');
|
|
64
|
+
|
|
65
|
+
function handleOnInput(event: Event) {
|
|
66
|
+
if (inputElement === null) {
|
|
67
|
+
return;
|
|
53
68
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
dispatch("valueChange", { value: currentValue });
|
|
59
|
-
dispatch("input", event);
|
|
60
|
-
}
|
|
61
|
-
function onPaste(event) {
|
|
62
|
-
if (event.clipboardData) {
|
|
63
|
-
if (properties.dataType === "tel") {
|
|
64
|
-
let unfilteredNumber = event.clipboardData.getData("text");
|
|
65
|
-
unfilteredNumber = properties.textTransformers.reduce((prevValue, currIndexFunction) => {
|
|
69
|
+
|
|
70
|
+
let currentValue = inputElement.value;
|
|
71
|
+
if (dataType === 'tel' && currentValue.length > 0) {
|
|
72
|
+
currentValue = textTransformers.reduce((prevValue, currIndexFunction) => {
|
|
66
73
|
let newValue = currIndexFunction(prevValue);
|
|
67
74
|
return newValue;
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
}, currentValue);
|
|
76
|
+
currentValue = currentValue.replace(/\D+|\D/gm, '');
|
|
77
|
+
const numberLength = currentValue.length;
|
|
78
|
+
if (numberLength === 0) {
|
|
79
|
+
inputElement.value = value;
|
|
80
|
+
return;
|
|
74
81
|
}
|
|
75
|
-
if (
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
if (numberLength > maxLength) {
|
|
83
|
+
const existingInput = value;
|
|
84
|
+
if (existingInput.length == maxLength) {
|
|
85
|
+
inputElement.value = value;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
currentValue = currentValue.substring(numberLength - maxLength);
|
|
81
89
|
}
|
|
90
|
+
inputElement.value = currentValue;
|
|
82
91
|
}
|
|
92
|
+
value = inputElement.value;
|
|
93
|
+
onInput(inputElement.value, event);
|
|
83
94
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @param event
|
|
99
|
+
* ENABLED ONLY FOR 'dataType = tel'
|
|
100
|
+
*/
|
|
101
|
+
function handleOnPaste(event: ClipboardEvent) {
|
|
102
|
+
if (inputElement === null) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (event.clipboardData) {
|
|
107
|
+
if (dataType === 'tel') {
|
|
108
|
+
let unfilteredNumber = event.clipboardData.getData('text');
|
|
109
|
+
unfilteredNumber = textTransformers.reduce((prevValue, currIndexFunction) => {
|
|
110
|
+
let newValue = currIndexFunction(prevValue);
|
|
111
|
+
return newValue;
|
|
112
|
+
}, unfilteredNumber);
|
|
113
|
+
/**
|
|
114
|
+
* removes everything except numbers
|
|
115
|
+
*/
|
|
116
|
+
const filteredNumber = unfilteredNumber.replace(/\D+|\D/gm, '');
|
|
117
|
+
const filteredNumberLength = filteredNumber.length;
|
|
118
|
+
/**
|
|
119
|
+
* pasted text is non numeric
|
|
120
|
+
*/
|
|
121
|
+
if (filteredNumber.length === 0) {
|
|
122
|
+
event.preventDefault();
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* user pasted 10+ digit number , overrides all cases
|
|
126
|
+
*/
|
|
127
|
+
if (filteredNumber.length > maxLength) {
|
|
128
|
+
/**
|
|
129
|
+
* choose last max length number of digits if length is bigger than max length passed in props
|
|
130
|
+
*/
|
|
131
|
+
const finalValue = filteredNumber.substring(filteredNumberLength - maxLength);
|
|
132
|
+
// Adding reactivity
|
|
133
|
+
value = finalValue;
|
|
134
|
+
onPaste(event);
|
|
135
|
+
event.preventDefault(); // prevent bubble and let finalValue be entered
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* if numeric pasted text has length less than max length, bubble to onInput.
|
|
139
|
+
*/
|
|
140
|
+
}
|
|
141
|
+
}
|
|
97
142
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
143
|
+
|
|
144
|
+
$effect(() => {
|
|
145
|
+
onStateChange(validationState);
|
|
146
|
+
});
|
|
103
147
|
</script>
|
|
104
148
|
|
|
105
149
|
<div class="input-container">
|
|
106
|
-
{#if
|
|
107
|
-
<label class="label" for={
|
|
108
|
-
{
|
|
150
|
+
{#if typeof label === 'string' && label !== '' && !actionInput}
|
|
151
|
+
<label class="label" for={name}>
|
|
152
|
+
{label}
|
|
109
153
|
</label>
|
|
110
154
|
{/if}
|
|
111
155
|
|
|
112
|
-
{#if
|
|
156
|
+
{#if useTextArea}
|
|
157
|
+
<!-- svelte-ignore element_invalid_self_closing_tag -->
|
|
113
158
|
<textarea
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
autocomplete={
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
on:click={onClick}
|
|
126
|
-
class="
|
|
127
|
-
{properties.actionInput ? 'action-input' : ''}
|
|
128
|
-
"
|
|
129
|
-
style="--focus-border: {properties.addFocusColor ? 1 : 0}px;"
|
|
130
|
-
disabled={properties.disable}
|
|
159
|
+
{value}
|
|
160
|
+
{placeholder}
|
|
161
|
+
autocomplete={autoComplete}
|
|
162
|
+
{name}
|
|
163
|
+
onfocusout={onFocusout}
|
|
164
|
+
oninput={handleOnInput}
|
|
165
|
+
onpaste={handleOnPaste}
|
|
166
|
+
onclick={onClick}
|
|
167
|
+
class:action-input={actionInput}
|
|
168
|
+
style="--focus-border: {addFocusColor ? 1 : 0}px;"
|
|
169
|
+
disabled={disable}
|
|
131
170
|
bind:this={inputElement}
|
|
132
|
-
maxlength={
|
|
133
|
-
minlength={
|
|
171
|
+
maxlength={dataType === 'tel' ? undefined : maxLength}
|
|
172
|
+
minlength={minLength}
|
|
134
173
|
/>
|
|
135
174
|
{:else}
|
|
136
175
|
<input
|
|
137
|
-
type={
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
autocomplete={
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
on:paste={onPaste}
|
|
149
|
-
on:click={onClick}
|
|
150
|
-
data-pw={properties.testId}
|
|
151
|
-
class="
|
|
152
|
-
{properties.actionInput ? 'action-input' : ''}
|
|
153
|
-
"
|
|
154
|
-
disabled={properties.disable}
|
|
176
|
+
type={dataType}
|
|
177
|
+
{value}
|
|
178
|
+
{placeholder}
|
|
179
|
+
autocomplete={autoComplete}
|
|
180
|
+
{name}
|
|
181
|
+
onfocusout={onFocusout}
|
|
182
|
+
oninput={handleOnInput}
|
|
183
|
+
onpaste={onPaste}
|
|
184
|
+
data-pw={testId}
|
|
185
|
+
class:action-input={actionInput}
|
|
186
|
+
disabled={disable}
|
|
155
187
|
bind:this={inputElement}
|
|
156
|
-
maxlength={
|
|
157
|
-
minlength={
|
|
188
|
+
maxlength={dataType === 'tel' ? undefined : maxLength}
|
|
189
|
+
minlength={minLength}
|
|
158
190
|
/>
|
|
159
191
|
{/if}
|
|
160
192
|
|
|
161
|
-
{#if
|
|
193
|
+
{#if onErrorMessage !== '' && showErrorMessage && !actionInput}
|
|
162
194
|
<div class="error-message">
|
|
163
|
-
{
|
|
195
|
+
{onErrorMessage}
|
|
164
196
|
</div>
|
|
165
197
|
{/if}
|
|
166
|
-
{#if
|
|
198
|
+
{#if infoMessage !== '' && !actionInput}
|
|
167
199
|
<div class="info-message">
|
|
168
|
-
{
|
|
200
|
+
{infoMessage}
|
|
169
201
|
</div>
|
|
170
202
|
{/if}
|
|
171
203
|
</div>
|
|
@@ -184,6 +216,7 @@ $: {
|
|
|
184
216
|
font-weight: var(--input-font-weight, 500);
|
|
185
217
|
width: var(--input-width, fit-content);
|
|
186
218
|
margin: var(--input-margin, 0px 0px 12px 0px);
|
|
219
|
+
appearance: none !important;
|
|
187
220
|
-webkit-appearance: none !important; /* For Safari MWeb */
|
|
188
221
|
box-shadow: var(--input-box-shadow, 0px 1px 8px #2f537733);
|
|
189
222
|
border: var(--input-border, none);
|
|
@@ -1,32 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
events: {
|
|
9
|
-
keydown: KeyboardEvent;
|
|
10
|
-
keyup: KeyboardEvent;
|
|
11
|
-
keypress: KeyboardEvent;
|
|
12
|
-
focus: FocusEvent;
|
|
13
|
-
valueChange: CustomEvent<any>;
|
|
14
|
-
input: CustomEvent<any>;
|
|
15
|
-
paste: CustomEvent<any>;
|
|
16
|
-
focusout: CustomEvent<any>;
|
|
17
|
-
click: CustomEvent<any>;
|
|
18
|
-
stateChange: CustomEvent<any>;
|
|
19
|
-
} & {
|
|
20
|
-
[evt: string]: CustomEvent<any>;
|
|
21
|
-
};
|
|
22
|
-
slots: {};
|
|
23
|
-
exports?: {} | undefined;
|
|
24
|
-
bindings?: string | undefined;
|
|
25
|
-
};
|
|
26
|
-
export type InputProps = typeof __propDef.props;
|
|
27
|
-
export type InputEvents = typeof __propDef.events;
|
|
28
|
-
export type InputSlots = typeof __propDef.slots;
|
|
29
|
-
export default class Input extends SvelteComponent<InputProps, InputEvents, InputSlots> {
|
|
30
|
-
get focus(): () => void;
|
|
31
|
-
}
|
|
32
|
-
export {};
|
|
1
|
+
import type { InputProperties } from './properties';
|
|
2
|
+
declare const Input: import("svelte").Component<InputProperties, {
|
|
3
|
+
focus: () => void;
|
|
4
|
+
}, "value">;
|
|
5
|
+
type Input = ReturnType<typeof Input>;
|
|
6
|
+
export default Input;
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import type { AutoCompleteType, CustomValidator, InputDataType, TextTransformer } from '../types';
|
|
1
|
+
import type { AutoCompleteType, CustomValidator, InputDataType, TextTransformer, ValidationState } from '../types';
|
|
2
2
|
export type InputProperties = {
|
|
3
3
|
value: string;
|
|
4
|
-
placeholder
|
|
5
|
-
dataType
|
|
6
|
-
label
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
autoComplete: AutoCompleteType;
|
|
22
|
-
name: string;
|
|
23
|
-
textTransformers: TextTransformer[];
|
|
4
|
+
placeholder?: string | null;
|
|
5
|
+
dataType?: InputDataType;
|
|
6
|
+
label?: string | null;
|
|
7
|
+
onErrorMessage?: string | null;
|
|
8
|
+
infoMessage?: string | null;
|
|
9
|
+
validators?: CustomValidator[];
|
|
10
|
+
disable?: boolean;
|
|
11
|
+
validationPattern?: RegExp | null;
|
|
12
|
+
inProgressPattern?: RegExp | null;
|
|
13
|
+
addFocusColor?: boolean;
|
|
14
|
+
maxLength?: number;
|
|
15
|
+
minLength?: number;
|
|
16
|
+
actionInput?: boolean;
|
|
17
|
+
useTextArea?: boolean;
|
|
18
|
+
autoComplete?: AutoCompleteType;
|
|
19
|
+
name?: string;
|
|
20
|
+
textTransformers?: TextTransformer[];
|
|
24
21
|
testId?: string;
|
|
22
|
+
onInput?: (value: string, event: Event) => void;
|
|
23
|
+
onFocusout?: (event: FocusEvent) => void;
|
|
24
|
+
onPaste?: (event: ClipboardEvent) => void;
|
|
25
|
+
onClick?: (event: MouseEvent) => void;
|
|
26
|
+
onStateChange?: (state: ValidationState) => void;
|
|
25
27
|
};
|
|
26
|
-
export declare const defaultInputProperties: InputProperties;
|
package/dist/Input/properties.js
CHANGED
|
@@ -1,23 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
value: '',
|
|
3
|
-
placeholder: '',
|
|
4
|
-
dataType: 'text',
|
|
5
|
-
label: '',
|
|
6
|
-
message: {
|
|
7
|
-
onError: 'error',
|
|
8
|
-
info: ''
|
|
9
|
-
},
|
|
10
|
-
validators: [],
|
|
11
|
-
focus: true,
|
|
12
|
-
disable: false,
|
|
13
|
-
validationPattern: null,
|
|
14
|
-
inProgressPattern: null,
|
|
15
|
-
addFocusColor: false,
|
|
16
|
-
maxLength: 1000,
|
|
17
|
-
minLength: 0,
|
|
18
|
-
actionInput: false,
|
|
19
|
-
useTextArea: false,
|
|
20
|
-
autoComplete: 'on',
|
|
21
|
-
name: '',
|
|
22
|
-
textTransformers: []
|
|
23
|
-
};
|
|
1
|
+
export {};
|