@esportsplus/ui 0.0.72 → 0.0.74
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/build/components/field/index.d.ts +6 -0
- package/build/components/field/optional.d.ts +3 -0
- package/build/components/field/optional.js +6 -10
- package/build/components/field/text.d.ts +3 -0
- package/build/components/field/text.js +2 -2
- package/package.json +1 -1
- package/src/components/field/optional.ts +14 -12
- package/src/components/field/text.ts +5 -2
|
@@ -123,6 +123,9 @@ declare const _default: {
|
|
|
123
123
|
name?: string | undefined;
|
|
124
124
|
placeholder?: string | undefined;
|
|
125
125
|
style?: string | undefined;
|
|
126
|
+
tag?: {
|
|
127
|
+
class?: string | undefined;
|
|
128
|
+
} | undefined;
|
|
126
129
|
type?: string | undefined;
|
|
127
130
|
value?: unknown;
|
|
128
131
|
} & {
|
|
@@ -204,6 +207,9 @@ declare const _default: {
|
|
|
204
207
|
name?: string | undefined;
|
|
205
208
|
placeholder?: string | undefined;
|
|
206
209
|
style?: string | undefined;
|
|
210
|
+
tag?: {
|
|
211
|
+
class?: string | undefined;
|
|
212
|
+
} | undefined;
|
|
207
213
|
type?: string | undefined;
|
|
208
214
|
value?: unknown;
|
|
209
215
|
} & {
|
|
@@ -2,19 +2,15 @@ import sel from './select';
|
|
|
2
2
|
import s from './switch';
|
|
3
3
|
import tex from './text';
|
|
4
4
|
const select = (data) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class: `field--optional ${data?.class || ''}`,
|
|
8
|
-
content: sel(data.field)
|
|
9
|
-
}
|
|
5
|
+
data.field.content = sel(Object.assign(data.field || {}, {
|
|
6
|
+
class: `field--optional ${data?.field?.class || ''}`
|
|
10
7
|
}));
|
|
8
|
+
return s(data);
|
|
11
9
|
};
|
|
12
10
|
const text = (data) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class: `field--optional ${data?.class || ''}`,
|
|
16
|
-
content: tex(data.field)
|
|
17
|
-
}
|
|
11
|
+
data.field.content = tex(Object.assign(data.field || {}, {
|
|
12
|
+
class: `field--optional ${data?.field?.class || ''}`
|
|
18
13
|
}));
|
|
14
|
+
return s(data);
|
|
19
15
|
};
|
|
20
16
|
export default { select, text };
|
|
@@ -23,11 +23,11 @@ export default (data) => {
|
|
|
23
23
|
${title(data)}
|
|
24
24
|
|
|
25
25
|
<label
|
|
26
|
-
class='field-mask field-mask--input --flex-row ${data?.mask?.class || ''} ${(data?.title || (data?.class || '').indexOf('field--optional') !== -1)
|
|
26
|
+
class='field-mask field-mask--input --flex-row ${data?.mask?.class || ''} ${(data?.title || (data?.class || '').indexOf('field--optional') !== -1) ? '--margin-top' : ''} --margin-300'
|
|
27
27
|
style='${data?.mask?.style || ''}'
|
|
28
28
|
>
|
|
29
29
|
<input
|
|
30
|
-
class='field-tag --padding-400'
|
|
30
|
+
class='field-tag --padding-400 ${data?.tag?.class || ''}'
|
|
31
31
|
name='${data?.name || ''}'
|
|
32
32
|
placeholder='${data?.placeholder || ''}'
|
|
33
33
|
onrender='${form.input.attributes(state)}'
|
package/package.json
CHANGED
|
@@ -4,21 +4,23 @@ import tex from './text';
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
const select = (data: Parameters<typeof s>[0] & { field: Parameters<typeof sel>[0] }) => {
|
|
7
|
-
|
|
8
|
-
field
|
|
9
|
-
class: `field--optional ${data?.class || ''}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
data.field.content = sel(
|
|
8
|
+
Object.assign(data.field || {}, {
|
|
9
|
+
class: `field--optional ${data?.field?.class || ''}`
|
|
10
|
+
})
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
return s(data);
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
const text = (data: Parameters<typeof s>[0] & { field: Parameters<typeof tex>[0] }) => {
|
|
16
|
-
|
|
17
|
-
field
|
|
18
|
-
class: `field--optional ${data?.class || ''}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
data.field.content = tex(
|
|
18
|
+
Object.assign(data.field || {}, {
|
|
19
|
+
class: `field--optional ${data?.field?.class || ''}`
|
|
20
|
+
})
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
return s(data);
|
|
22
24
|
};
|
|
23
25
|
|
|
24
26
|
|
|
@@ -16,6 +16,9 @@ type Data = {
|
|
|
16
16
|
name?: string;
|
|
17
17
|
placeholder?: string;
|
|
18
18
|
style?: string;
|
|
19
|
+
tag?: {
|
|
20
|
+
class?: string;
|
|
21
|
+
};
|
|
19
22
|
type?: string;
|
|
20
23
|
value?: unknown;
|
|
21
24
|
} & Parameters<typeof description>[0] & Parameters<typeof title>[0];
|
|
@@ -41,11 +44,11 @@ export default (data: Data) => {
|
|
|
41
44
|
${title(data)}
|
|
42
45
|
|
|
43
46
|
<label
|
|
44
|
-
class='field-mask field-mask--input --flex-row ${data?.mask?.class || ''} ${(data?.title || (data?.class || '').indexOf('field--optional') !== -1)
|
|
47
|
+
class='field-mask field-mask--input --flex-row ${data?.mask?.class || ''} ${(data?.title || (data?.class || '').indexOf('field--optional') !== -1) ? '--margin-top' : ''} --margin-300'
|
|
45
48
|
style='${data?.mask?.style || ''}'
|
|
46
49
|
>
|
|
47
50
|
<input
|
|
48
|
-
class='field-tag --padding-400'
|
|
51
|
+
class='field-tag --padding-400 ${data?.tag?.class || ''}'
|
|
49
52
|
name='${data?.name || ''}'
|
|
50
53
|
placeholder='${data?.placeholder || ''}'
|
|
51
54
|
onrender='${form.input.attributes(state)}'
|