@esportsplus/ui 0.0.72 → 0.0.73
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.
|
@@ -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 };
|
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
|
|