@esportsplus/ui 0.33.0 → 0.33.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/build/components/checkbox/index.js +1 -1
- package/build/components/input/index.d.ts +4 -3
- package/build/components/input/index.js +5 -3
- package/build/components/range/index.d.ts +1 -1
- package/build/components/range/index.js +1 -1
- package/build/components/scrollbar/index.js +3 -3
- package/build/components/select/index.js +3 -3
- package/build/components/textarea/index.js +1 -1
- package/package.json +1 -1
- package/src/components/checkbox/index.ts +1 -1
- package/src/components/input/index.ts +6 -2
- package/src/components/range/index.ts +2 -2
- package/src/components/scrollbar/index.ts +3 -3
- package/src/components/select/index.ts +3 -3
- package/src/components/textarea/index.ts +1 -1
|
@@ -16,7 +16,7 @@ const factory = (type) => {
|
|
|
16
16
|
return html `
|
|
17
17
|
<div
|
|
18
18
|
class='${type} ${() => state.active && '--active'}'
|
|
19
|
-
${this
|
|
19
|
+
${this?.attributes && omit(this.attributes, OMIT)}
|
|
20
20
|
${attributes && omit(attributes, OMIT)}
|
|
21
21
|
>
|
|
22
22
|
<input
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type Attributes } from '@esportsplus/template';
|
|
2
2
|
import './scss/index.scss';
|
|
3
|
-
|
|
3
|
+
export default function (this: {
|
|
4
|
+
attributes?: Attributes;
|
|
5
|
+
}, attributes: Attributes & {
|
|
4
6
|
state?: {
|
|
5
7
|
active: boolean;
|
|
6
8
|
error: string;
|
|
7
9
|
};
|
|
8
|
-
})
|
|
9
|
-
export default _default;
|
|
10
|
+
}): Node;
|
|
@@ -2,7 +2,7 @@ import { reactive } from '@esportsplus/reactivity';
|
|
|
2
2
|
import { html } from '@esportsplus/template';
|
|
3
3
|
import form from '../../components/form/index.js';
|
|
4
4
|
import './scss/index.scss';
|
|
5
|
-
export default (attributes)
|
|
5
|
+
export default function (attributes) {
|
|
6
6
|
let state = attributes.state || reactive({
|
|
7
7
|
active: false,
|
|
8
8
|
error: ''
|
|
@@ -10,6 +10,8 @@ export default (attributes) => {
|
|
|
10
10
|
return html `
|
|
11
11
|
<input
|
|
12
12
|
class='input'
|
|
13
|
+
${this?.attributes}
|
|
14
|
+
${attributes}
|
|
13
15
|
${{
|
|
14
16
|
class: () => state.active && '--active',
|
|
15
17
|
onfocusin: () => {
|
|
@@ -21,7 +23,7 @@ export default (attributes) => {
|
|
|
21
23
|
onrender: form.input.onrender(state),
|
|
22
24
|
type: (attributes.type || 'text')
|
|
23
25
|
}}
|
|
24
|
-
${attributes}
|
|
25
26
|
/>
|
|
26
27
|
`;
|
|
27
|
-
}
|
|
28
|
+
}
|
|
29
|
+
;
|
|
@@ -13,12 +13,12 @@ export default template.factory(function (attributes, content) {
|
|
|
13
13
|
return html `
|
|
14
14
|
<div
|
|
15
15
|
class='scrollbar-container'
|
|
16
|
-
${this
|
|
16
|
+
${this?.attributes && omit(this.attributes, OMIT)}
|
|
17
17
|
${omit(attributes, OMIT)}
|
|
18
18
|
>
|
|
19
19
|
<div
|
|
20
20
|
class='scrollbar-container-content'
|
|
21
|
-
${this
|
|
21
|
+
${this?.attributes?.['scrollbar-container-content']}
|
|
22
22
|
${attributes['scrollbar-container-content']}
|
|
23
23
|
${{
|
|
24
24
|
onscroll: function () {
|
|
@@ -38,7 +38,7 @@ export default template.factory(function (attributes, content) {
|
|
|
38
38
|
|
|
39
39
|
<div
|
|
40
40
|
class='scrollbar'
|
|
41
|
-
${this
|
|
41
|
+
${this?.attributes?.scrollbar}
|
|
42
42
|
${attributes.scrollbar}
|
|
43
43
|
${{
|
|
44
44
|
class: () => state.height >= 100 && 'scrollbar--hidden',
|
|
@@ -51,7 +51,7 @@ const select = template.factory(function (attributes, content) {
|
|
|
51
51
|
return html `
|
|
52
52
|
<div
|
|
53
53
|
class='select tooltip ${() => state.active && '--active'}'
|
|
54
|
-
${this
|
|
54
|
+
${this?.attributes && omit(this.attributes, OMIT)}
|
|
55
55
|
${omit(attributes, OMIT)}
|
|
56
56
|
onclick=${() => {
|
|
57
57
|
if (state.render) {
|
|
@@ -62,7 +62,7 @@ const select = template.factory(function (attributes, content) {
|
|
|
62
62
|
>
|
|
63
63
|
${content || (() => options[state.selected] || '-')}
|
|
64
64
|
|
|
65
|
-
<div class='select-arrow' ${this
|
|
65
|
+
<div class='select-arrow' ${this?.attributes?.arrow} ${attributes.arrow}></div>
|
|
66
66
|
|
|
67
67
|
<input class='select-tag'
|
|
68
68
|
${{
|
|
@@ -103,7 +103,7 @@ const select = template.factory(function (attributes, content) {
|
|
|
103
103
|
}, keys.map((key) => html `
|
|
104
104
|
<div
|
|
105
105
|
class='link select-option ${() => selected[key] && '--active'}'
|
|
106
|
-
${this
|
|
106
|
+
${this?.attributes?.option}
|
|
107
107
|
${option}
|
|
108
108
|
data-key='${key}'
|
|
109
109
|
>
|
|
@@ -12,7 +12,7 @@ export default function (attributes) {
|
|
|
12
12
|
return html `
|
|
13
13
|
<textarea
|
|
14
14
|
class='textarea'
|
|
15
|
-
${this
|
|
15
|
+
${this?.attributes && omit(this.attributes, OMIT)}
|
|
16
16
|
${omit(attributes, OMIT)}
|
|
17
17
|
${{
|
|
18
18
|
class: () => state.active && '--active',
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ const factory = (type: string) => {
|
|
|
25
25
|
return html`
|
|
26
26
|
<div
|
|
27
27
|
class='${type} ${() => state.active && '--active'}'
|
|
28
|
-
${this
|
|
28
|
+
${this?.attributes && omit(this.attributes, OMIT)}
|
|
29
29
|
${attributes && omit(attributes, OMIT)}
|
|
30
30
|
>
|
|
31
31
|
<input
|
|
@@ -4,7 +4,10 @@ import form from '~/components/form';
|
|
|
4
4
|
import './scss/index.scss';
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
export default (
|
|
7
|
+
export default function (
|
|
8
|
+
this: { attributes?: Attributes },
|
|
9
|
+
attributes: Attributes & { state?: { active: boolean, error: string } }
|
|
10
|
+
) {
|
|
8
11
|
let state = attributes.state || reactive({
|
|
9
12
|
active: false,
|
|
10
13
|
error: ''
|
|
@@ -13,6 +16,8 @@ export default (attributes: Attributes & { state?: { active: boolean, error: str
|
|
|
13
16
|
return html`
|
|
14
17
|
<input
|
|
15
18
|
class='input'
|
|
19
|
+
${this?.attributes}
|
|
20
|
+
${attributes}
|
|
16
21
|
${{
|
|
17
22
|
class: () => state.active && '--active',
|
|
18
23
|
onfocusin: () => {
|
|
@@ -24,7 +29,6 @@ export default (attributes: Attributes & { state?: { active: boolean, error: str
|
|
|
24
29
|
onrender: form.input.onrender(state),
|
|
25
30
|
type: (attributes.type || 'text') as string
|
|
26
31
|
}}
|
|
27
|
-
${attributes}
|
|
28
32
|
/>
|
|
29
33
|
`;
|
|
30
34
|
};
|
|
@@ -5,7 +5,7 @@ import './scss/index.scss';
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export default function(
|
|
8
|
-
this: { attributes
|
|
8
|
+
this: { attributes?: Attributes },
|
|
9
9
|
attributes: Attributes & { state?: { active: boolean, error: string, value: number } }
|
|
10
10
|
) {
|
|
11
11
|
let state = attributes.state || reactive({
|
|
@@ -22,7 +22,7 @@ export default function(
|
|
|
22
22
|
<input
|
|
23
23
|
class='range --border-state --border-black'
|
|
24
24
|
type='range'
|
|
25
|
-
${this
|
|
25
|
+
${this?.attributes}
|
|
26
26
|
${attributes}
|
|
27
27
|
${{
|
|
28
28
|
class: () => state.active && '--active',
|
|
@@ -25,12 +25,12 @@ export default template.factory<A>(
|
|
|
25
25
|
return html`
|
|
26
26
|
<div
|
|
27
27
|
class='scrollbar-container'
|
|
28
|
-
${this
|
|
28
|
+
${this?.attributes && omit(this.attributes, OMIT)}
|
|
29
29
|
${omit(attributes, OMIT)}
|
|
30
30
|
>
|
|
31
31
|
<div
|
|
32
32
|
class='scrollbar-container-content'
|
|
33
|
-
${this
|
|
33
|
+
${this?.attributes?.['scrollbar-container-content']}
|
|
34
34
|
${attributes['scrollbar-container-content']}
|
|
35
35
|
${{
|
|
36
36
|
onscroll: function() {
|
|
@@ -52,7 +52,7 @@ export default template.factory<A>(
|
|
|
52
52
|
|
|
53
53
|
<div
|
|
54
54
|
class='scrollbar'
|
|
55
|
-
${this
|
|
55
|
+
${this?.attributes?.scrollbar}
|
|
56
56
|
${attributes.scrollbar}
|
|
57
57
|
${{
|
|
58
58
|
class: () => state.height >= 100 && 'scrollbar--hidden',
|
|
@@ -86,7 +86,7 @@ const select = template.factory<A>(
|
|
|
86
86
|
return html`
|
|
87
87
|
<div
|
|
88
88
|
class='select tooltip ${() => state.active && '--active'}'
|
|
89
|
-
${this
|
|
89
|
+
${this?.attributes && omit(this.attributes, OMIT)}
|
|
90
90
|
${omit(attributes, OMIT)}
|
|
91
91
|
onclick=${() => {
|
|
92
92
|
if (state.render) {
|
|
@@ -98,7 +98,7 @@ const select = template.factory<A>(
|
|
|
98
98
|
>
|
|
99
99
|
${content || (() => options[ state.selected! ] || '-')}
|
|
100
100
|
|
|
101
|
-
<div class='select-arrow' ${this
|
|
101
|
+
<div class='select-arrow' ${this?.attributes?.arrow} ${attributes.arrow}></div>
|
|
102
102
|
|
|
103
103
|
<input class='select-tag'
|
|
104
104
|
${{
|
|
@@ -150,7 +150,7 @@ const select = template.factory<A>(
|
|
|
150
150
|
keys.map((key) => html`
|
|
151
151
|
<div
|
|
152
152
|
class='link select-option ${() => selected[key] && '--active'}'
|
|
153
|
-
${this
|
|
153
|
+
${this?.attributes?.option}
|
|
154
154
|
${option}
|
|
155
155
|
data-key='${key}'
|
|
156
156
|
>
|
|
@@ -20,7 +20,7 @@ export default function(
|
|
|
20
20
|
return html`
|
|
21
21
|
<textarea
|
|
22
22
|
class='textarea'
|
|
23
|
-
${this
|
|
23
|
+
${this?.attributes && omit(this.attributes, OMIT)}
|
|
24
24
|
${omit(attributes, OMIT)}
|
|
25
25
|
${{
|
|
26
26
|
class: () => state.active && '--active',
|