@esportsplus/ui 0.2.3 → 0.2.9
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/accordion/index.d.ts +15 -0
- package/build/components/accordion/index.js +27 -0
- package/build/components/aurora/index.d.ts +8 -0
- package/build/components/aurora/index.js +12 -0
- package/build/components/clipboard/index.d.ts +4 -0
- package/build/components/clipboard/index.js +2 -0
- package/build/components/clipboard/write.d.ts +2 -0
- package/build/components/clipboard/write.js +9 -0
- package/build/components/ellipsis/index.d.ts +2 -0
- package/build/components/ellipsis/index.js +8 -0
- package/build/components/field/description.d.ts +1 -1
- package/build/components/field/error.d.ts +1 -1
- package/build/components/field/index.d.ts +65 -180
- package/build/components/field/optional.d.ts +7 -87
- package/build/components/field/select.js +4 -2
- package/build/components/field/title.d.ts +1 -1
- package/build/components/form/action.js +1 -2
- package/build/components/form/index.d.ts +5 -5
- package/build/components/form/input.d.ts +1 -1
- package/build/components/form/types.d.ts +0 -1
- package/build/components/json/index.d.ts +4 -0
- package/build/components/json/index.js +2 -0
- package/build/components/scrollbar/index.d.ts +3 -3
- package/build/components/scrollbar/index.js +3 -5
- package/build/components/site/index.d.ts +2 -3
- package/build/components/site/index.js +6 -5
- package/build/components/tooltip/index.d.ts +2 -27
- package/build/components/tooltip/index.js +2 -13
- package/build/index.d.ts +5 -2
- package/build/index.js +5 -2
- package/components/styles.css +14 -14
- package/components/variables.css +18 -19
- package/package.json +5 -5
- package/src/components/accordion/index.ts +34 -0
- package/src/components/accordion/scss/variables.scss +6 -1
- package/src/components/anchor/scss/variables.scss +0 -1
- package/src/components/aurora/index.ts +22 -0
- package/src/components/aurora/scss/index.scss +60 -0
- package/src/components/banner/scss/index.scss +1 -1
- package/src/components/banner/scss/variables.scss +4 -0
- package/src/components/button/scss/index.scss +25 -3
- package/src/components/button/scss/variables.scss +3 -6
- package/src/components/card/scss/variables.scss +0 -1
- package/src/components/clipboard/index.ts +4 -0
- package/src/components/clipboard/write.ts +9 -0
- package/src/components/container/scss/index.scss +2 -4
- package/src/components/container/scss/variables.scss +2 -2
- package/src/components/ellipsis/index.ts +10 -0
- package/src/components/ellipsis/scss/index.scss +19 -63
- package/src/components/ellipsis/scss/variables.scss +3 -1
- package/src/components/field/scss/index.scss +2 -2
- package/src/components/field/scss/variables.scss +0 -1
- package/src/components/field/select.ts +4 -2
- package/src/components/form/action.ts +3 -2
- package/src/components/form/types.ts +1 -1
- package/src/components/grid/scss/index.scss +6 -0
- package/src/components/grid/scss/variables.scss +6 -0
- package/src/components/group/scss/index.scss +4 -4
- package/src/components/icon/scss/index.scss +0 -1
- package/src/components/json/index.ts +4 -0
- package/src/components/link/scss/variables.scss +0 -1
- package/src/components/loading/scss/index.scss +9 -16
- package/src/components/loading/scss/variables.scss +3 -28
- package/src/components/modal/scss/index.scss +7 -4
- package/src/components/modal/scss/variables.scss +3 -7
- package/src/components/page/scss/variables.scss +0 -12
- package/src/components/root/onclick.ts +1 -1
- package/src/components/root/scss/variables.scss +2 -5
- package/src/components/scrollbar/index.ts +3 -5
- package/src/components/scrollbar/scss/index.scss +2 -1
- package/src/components/scrollbar/scss/variables.scss +1 -1
- package/src/components/sidebar/scss/index.scss +5 -6
- package/src/components/sidebar/scss/variables.scss +4 -5
- package/src/components/site/index.ts +9 -8
- package/src/components/text/scss/variables.scss +0 -1
- package/src/components/tooltip/index.ts +4 -17
- package/src/components/tooltip/scss/variables.scss +0 -1
- package/src/css-utilities/absolute/scss/index.scss +11 -34
- package/src/css-utilities/hidden/scss/index.scss +1 -1
- package/src/css-utilities/squircle/scss/index.scss +5 -0
- package/src/css-utilities/text/scss/index.scss +2 -6
- package/src/css-utilities/text/scss/variables.scss +7 -7
- package/src/index.ts +5 -2
- package/src/lib/scss/breakpoint.scss +3 -3
- package/src/lib/scss/position.scss +25 -49
- package/src/tokens/scss/box-shadow.scss +17 -12
- package/src/tokens/scss/transition-duration.scss +1 -5
- package/tsconfig.json +1 -9
- package/utilities/styles.css +4 -4
- package/utilities/variables.css +1 -3
- package/build/components/alert/index.d.ts +0 -10
- package/build/components/alert/index.js +0 -122
- package/build/components/export/clipboard.d.ts +0 -2
- package/build/components/export/clipboard.js +0 -8
- package/build/components/export/index.d.ts +0 -5
- package/build/components/export/index.js +0 -3
- package/build/components/tooltip/menu.d.ts +0 -25
- package/build/components/tooltip/menu.js +0 -44
- package/src/components/alert/index.ts +0 -157
- package/src/components/alert/scss/index.scss +0 -55
- package/src/components/alert/scss/variables.scss +0 -8
- package/src/components/export/clipboard.ts +0 -12
- package/src/components/export/index.ts +0 -5
- package/src/components/processing/scss/index.scss +0 -47
- package/src/components/processing/scss/variables.scss +0 -11
- package/src/components/tooltip/menu.ts +0 -71
- package/src/css-utilities/slide/scss/index.scss +0 -21
- package/src/css-utilities/slide/scss/variables.scss +0 -10
- package/src/css-utilities/transition/scss/variables.scss +0 -14
- /package/build/components/{export/json.d.ts → json/download.d.ts} +0 -0
- /package/build/components/{export/json.js → json/download.js} +0 -0
- /package/src/components/{export/json.ts → json/download.ts} +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: () => {
|
|
2
|
+
attributes: {
|
|
3
|
+
class: () => false | 0 | "--active";
|
|
4
|
+
onrender: (element: HTMLElement & Record<PropertyKey, unknown>) => void;
|
|
5
|
+
style: (element: HTMLElement) => string | false | 0;
|
|
6
|
+
};
|
|
7
|
+
state: {
|
|
8
|
+
active: boolean | number;
|
|
9
|
+
dispose: () => void;
|
|
10
|
+
nodes: {
|
|
11
|
+
active: import("@esportsplus/reactivity").Signal<number> | import("@esportsplus/reactivity").Signal<false> | import("@esportsplus/reactivity").Signal<true>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { reactive } from '@esportsplus/reactivity';
|
|
2
|
+
let key = Symbol();
|
|
3
|
+
export default () => {
|
|
4
|
+
let state = reactive({
|
|
5
|
+
active: 0
|
|
6
|
+
});
|
|
7
|
+
return {
|
|
8
|
+
attributes: {
|
|
9
|
+
class: () => {
|
|
10
|
+
return state.active && '--active';
|
|
11
|
+
},
|
|
12
|
+
onrender: (element) => {
|
|
13
|
+
element[key] = state;
|
|
14
|
+
},
|
|
15
|
+
style: (element) => {
|
|
16
|
+
if (state.active) {
|
|
17
|
+
let parent = element.closest('accordion');
|
|
18
|
+
if (parent && key in parent) {
|
|
19
|
+
parent[key].active = (+parent[key].active) + 1;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return state.active && `--max-height: ${element.scrollHeight}`;
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
state
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type Options = {
|
|
2
|
+
backgrounds: [string, string, string, string];
|
|
3
|
+
blur?: string;
|
|
4
|
+
opacity?: number;
|
|
5
|
+
scale?: number;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: ({ backgrounds, blur, opacity, scale }: Options) => import("@esportsplus/template").Renderable;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { html } from '@esportsplus/template';
|
|
2
|
+
export default ({ backgrounds, blur, opacity, scale }) => html `
|
|
3
|
+
<div class="aurora" ${{
|
|
4
|
+
style: {
|
|
5
|
+
'--blur': blur || '50px',
|
|
6
|
+
'--opacity': opacity || 0.8,
|
|
7
|
+
'--scale': scale || 1
|
|
8
|
+
}
|
|
9
|
+
}}>
|
|
10
|
+
${backgrounds.map((bg) => html `<div style='${`--background-color: ${bg}`}'></div>`)}
|
|
11
|
+
</div>
|
|
12
|
+
`;
|
|
@@ -1,222 +1,107 @@
|
|
|
1
|
+
import checkbox from './checkbox';
|
|
2
|
+
import select from './select';
|
|
3
|
+
import s from './switch';
|
|
4
|
+
import text from './text';
|
|
1
5
|
declare const _default: {
|
|
2
6
|
checkbox: (data: {
|
|
3
|
-
class?: string
|
|
7
|
+
class?: string;
|
|
4
8
|
field?: {
|
|
5
9
|
content?: any;
|
|
6
|
-
}
|
|
10
|
+
};
|
|
7
11
|
mask?: {
|
|
8
|
-
class?: string
|
|
9
|
-
style?: string
|
|
10
|
-
}
|
|
11
|
-
name?: string
|
|
12
|
-
style?: string
|
|
12
|
+
class?: string;
|
|
13
|
+
style?: string;
|
|
14
|
+
};
|
|
15
|
+
name?: string;
|
|
16
|
+
style?: string;
|
|
13
17
|
title: string;
|
|
14
18
|
value?: any;
|
|
15
19
|
} & {
|
|
16
|
-
description?: string
|
|
20
|
+
description?: string;
|
|
17
21
|
}) => import("@esportsplus/template").Renderable;
|
|
18
22
|
file: (data: {
|
|
19
|
-
accept?: string
|
|
20
|
-
class?: string
|
|
23
|
+
accept?: string;
|
|
24
|
+
class?: string;
|
|
21
25
|
mask?: {
|
|
22
|
-
class?: string
|
|
26
|
+
class?: string;
|
|
23
27
|
content?: any;
|
|
24
|
-
style?: string
|
|
25
|
-
}
|
|
26
|
-
name?: string
|
|
27
|
-
placeholder?: string
|
|
28
|
-
style?: string
|
|
29
|
-
type?: string
|
|
28
|
+
style?: string;
|
|
29
|
+
};
|
|
30
|
+
name?: string;
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
style?: string;
|
|
33
|
+
type?: string;
|
|
30
34
|
value?: unknown;
|
|
31
35
|
} & {
|
|
32
|
-
description?: string
|
|
36
|
+
description?: string;
|
|
33
37
|
} & {
|
|
34
|
-
required?: boolean
|
|
35
|
-
title?: string
|
|
38
|
+
required?: boolean;
|
|
39
|
+
title?: string;
|
|
36
40
|
}) => import("@esportsplus/template").Renderable;
|
|
37
41
|
optional: {
|
|
38
|
-
select: (data: {
|
|
39
|
-
|
|
40
|
-
field?: {
|
|
41
|
-
content?: any;
|
|
42
|
-
} | undefined;
|
|
43
|
-
mask?: {
|
|
44
|
-
class?: string | undefined;
|
|
45
|
-
style?: string | undefined;
|
|
46
|
-
} | undefined;
|
|
47
|
-
name?: string | undefined;
|
|
48
|
-
style?: string | undefined;
|
|
49
|
-
title: string;
|
|
50
|
-
value?: any;
|
|
51
|
-
} & {
|
|
52
|
-
description?: string | undefined;
|
|
53
|
-
} & {
|
|
54
|
-
field: {
|
|
55
|
-
class?: string | undefined;
|
|
56
|
-
effect?: ((selected: string | number) => void) | undefined;
|
|
57
|
-
mask?: {
|
|
58
|
-
class?: string | undefined;
|
|
59
|
-
content?: any;
|
|
60
|
-
style?: string | undefined;
|
|
61
|
-
} | undefined;
|
|
62
|
-
name?: string | undefined;
|
|
63
|
-
options: Record<string | number, string | number>;
|
|
64
|
-
option?: {
|
|
65
|
-
class?: string | undefined;
|
|
66
|
-
style?: string | undefined;
|
|
67
|
-
} | undefined;
|
|
68
|
-
selected?: any;
|
|
69
|
-
scrollbar?: {
|
|
70
|
-
style?: string | undefined;
|
|
71
|
-
} | undefined;
|
|
72
|
-
style?: string | undefined;
|
|
73
|
-
text?: {
|
|
74
|
-
class?: string | undefined;
|
|
75
|
-
} | undefined;
|
|
76
|
-
tooltip?: {
|
|
77
|
-
class?: string | undefined;
|
|
78
|
-
direction?: any;
|
|
79
|
-
style?: string | undefined;
|
|
80
|
-
} | undefined;
|
|
81
|
-
} & {
|
|
82
|
-
description?: string | undefined;
|
|
83
|
-
} & {
|
|
84
|
-
required?: boolean | undefined;
|
|
85
|
-
title?: string | undefined;
|
|
86
|
-
};
|
|
42
|
+
select: (data: Parameters<typeof s>[0] & {
|
|
43
|
+
field: Parameters<typeof select>[0];
|
|
87
44
|
}) => import("@esportsplus/template").Renderable;
|
|
88
|
-
text: (data: {
|
|
89
|
-
|
|
90
|
-
field?: {
|
|
91
|
-
content?: any;
|
|
92
|
-
} | undefined;
|
|
93
|
-
mask?: {
|
|
94
|
-
class?: string | undefined;
|
|
95
|
-
style?: string | undefined;
|
|
96
|
-
} | undefined;
|
|
97
|
-
name?: string | undefined;
|
|
98
|
-
style?: string | undefined;
|
|
99
|
-
title: string;
|
|
100
|
-
value?: any;
|
|
101
|
-
} & {
|
|
102
|
-
description?: string | undefined;
|
|
103
|
-
} & {
|
|
104
|
-
field: {
|
|
105
|
-
class?: string | undefined;
|
|
106
|
-
mask?: {
|
|
107
|
-
class?: string | undefined;
|
|
108
|
-
content?: any;
|
|
109
|
-
style?: string | undefined;
|
|
110
|
-
} | undefined;
|
|
111
|
-
name?: string | undefined;
|
|
112
|
-
placeholder?: string | undefined;
|
|
113
|
-
style?: string | undefined;
|
|
114
|
-
tag?: {
|
|
115
|
-
class?: string | undefined;
|
|
116
|
-
} | undefined;
|
|
117
|
-
textarea?: boolean | undefined;
|
|
118
|
-
type?: string | undefined;
|
|
119
|
-
value?: unknown;
|
|
120
|
-
} & {
|
|
121
|
-
description?: string | undefined;
|
|
122
|
-
} & {
|
|
123
|
-
required?: boolean | undefined;
|
|
124
|
-
title?: string | undefined;
|
|
125
|
-
};
|
|
45
|
+
text: (data: Parameters<typeof s>[0] & {
|
|
46
|
+
field: Parameters<typeof text>[0];
|
|
126
47
|
}) => import("@esportsplus/template").Renderable;
|
|
127
48
|
};
|
|
128
49
|
select: (data: {
|
|
129
|
-
class?: string
|
|
130
|
-
effect?: (
|
|
50
|
+
class?: string;
|
|
51
|
+
effect?: (selected: number | string) => void;
|
|
131
52
|
mask?: {
|
|
132
|
-
class?: string
|
|
53
|
+
class?: string;
|
|
133
54
|
content?: any;
|
|
134
|
-
style?: string
|
|
135
|
-
}
|
|
136
|
-
name?: string
|
|
137
|
-
options: Record<
|
|
55
|
+
style?: string;
|
|
56
|
+
};
|
|
57
|
+
name?: string;
|
|
58
|
+
options: Record<number | string, number | string>;
|
|
138
59
|
option?: {
|
|
139
|
-
class?: string
|
|
140
|
-
style?: string
|
|
141
|
-
}
|
|
60
|
+
class?: string;
|
|
61
|
+
style?: string;
|
|
62
|
+
};
|
|
142
63
|
selected?: any;
|
|
143
64
|
scrollbar?: {
|
|
144
|
-
style?: string
|
|
145
|
-
}
|
|
146
|
-
style?: string
|
|
65
|
+
style?: string;
|
|
66
|
+
};
|
|
67
|
+
style?: string;
|
|
147
68
|
text?: {
|
|
148
|
-
class?: string
|
|
149
|
-
}
|
|
69
|
+
class?: string;
|
|
70
|
+
};
|
|
150
71
|
tooltip?: {
|
|
151
|
-
class?: string
|
|
72
|
+
class?: string;
|
|
152
73
|
direction?: any;
|
|
153
|
-
style?: string
|
|
154
|
-
}
|
|
74
|
+
style?: string;
|
|
75
|
+
};
|
|
155
76
|
} & {
|
|
156
|
-
description?: string
|
|
77
|
+
description?: string;
|
|
157
78
|
} & {
|
|
158
|
-
required?: boolean
|
|
159
|
-
title?: string
|
|
160
|
-
}) => import("@esportsplus/template").Renderable;
|
|
161
|
-
switch: (data: {
|
|
162
|
-
class?: string | undefined;
|
|
163
|
-
field?: {
|
|
164
|
-
content?: any;
|
|
165
|
-
} | undefined;
|
|
166
|
-
mask?: {
|
|
167
|
-
class?: string | undefined;
|
|
168
|
-
style?: string | undefined;
|
|
169
|
-
} | undefined;
|
|
170
|
-
name?: string | undefined;
|
|
171
|
-
style?: string | undefined;
|
|
172
|
-
title: string;
|
|
173
|
-
value?: any;
|
|
174
|
-
} & {
|
|
175
|
-
description?: string | undefined;
|
|
176
|
-
}) => import("@esportsplus/template").Renderable;
|
|
177
|
-
textarea: (data: {
|
|
178
|
-
class?: string | undefined;
|
|
179
|
-
mask?: {
|
|
180
|
-
class?: string | undefined;
|
|
181
|
-
content?: any;
|
|
182
|
-
style?: string | undefined;
|
|
183
|
-
} | undefined;
|
|
184
|
-
name?: string | undefined;
|
|
185
|
-
placeholder?: string | undefined;
|
|
186
|
-
style?: string | undefined;
|
|
187
|
-
tag?: {
|
|
188
|
-
class?: string | undefined;
|
|
189
|
-
} | undefined;
|
|
190
|
-
textarea?: boolean | undefined;
|
|
191
|
-
type?: string | undefined;
|
|
192
|
-
value?: unknown;
|
|
193
|
-
} & {
|
|
194
|
-
description?: string | undefined;
|
|
195
|
-
} & {
|
|
196
|
-
required?: boolean | undefined;
|
|
197
|
-
title?: string | undefined;
|
|
79
|
+
required?: boolean;
|
|
80
|
+
title?: string;
|
|
198
81
|
}) => import("@esportsplus/template").Renderable;
|
|
82
|
+
switch: (data: Parameters<typeof checkbox>[0]) => import("@esportsplus/template").Renderable;
|
|
83
|
+
textarea: (data: Parameters<typeof text>[0]) => import("@esportsplus/template").Renderable;
|
|
199
84
|
text: (data: {
|
|
200
|
-
class?: string
|
|
85
|
+
class?: string;
|
|
201
86
|
mask?: {
|
|
202
|
-
class?: string
|
|
87
|
+
class?: string;
|
|
203
88
|
content?: any;
|
|
204
|
-
style?: string
|
|
205
|
-
}
|
|
206
|
-
name?: string
|
|
207
|
-
placeholder?: string
|
|
208
|
-
style?: string
|
|
89
|
+
style?: string;
|
|
90
|
+
};
|
|
91
|
+
name?: string;
|
|
92
|
+
placeholder?: string;
|
|
93
|
+
style?: string;
|
|
209
94
|
tag?: {
|
|
210
|
-
class?: string
|
|
211
|
-
}
|
|
212
|
-
textarea?: boolean
|
|
213
|
-
type?: string
|
|
95
|
+
class?: string;
|
|
96
|
+
};
|
|
97
|
+
textarea?: boolean;
|
|
98
|
+
type?: string;
|
|
214
99
|
value?: unknown;
|
|
215
100
|
} & {
|
|
216
|
-
description?: string
|
|
101
|
+
description?: string;
|
|
217
102
|
} & {
|
|
218
|
-
required?: boolean
|
|
219
|
-
title?: string
|
|
103
|
+
required?: boolean;
|
|
104
|
+
title?: string;
|
|
220
105
|
}) => import("@esportsplus/template").Renderable;
|
|
221
106
|
};
|
|
222
107
|
export default _default;
|
|
@@ -1,92 +1,12 @@
|
|
|
1
|
+
import sel from './select';
|
|
2
|
+
import s from './switch';
|
|
3
|
+
import tex from './text';
|
|
1
4
|
declare const _default: {
|
|
2
|
-
select: (data: {
|
|
3
|
-
|
|
4
|
-
field?: {
|
|
5
|
-
content?: any;
|
|
6
|
-
} | undefined;
|
|
7
|
-
mask?: {
|
|
8
|
-
class?: string | undefined;
|
|
9
|
-
style?: string | undefined;
|
|
10
|
-
} | undefined;
|
|
11
|
-
name?: string | undefined;
|
|
12
|
-
style?: string | undefined;
|
|
13
|
-
title: string;
|
|
14
|
-
value?: any;
|
|
15
|
-
} & {
|
|
16
|
-
description?: string | undefined;
|
|
17
|
-
} & {
|
|
18
|
-
field: {
|
|
19
|
-
class?: string | undefined;
|
|
20
|
-
effect?: ((selected: string | number) => void) | undefined;
|
|
21
|
-
mask?: {
|
|
22
|
-
class?: string | undefined;
|
|
23
|
-
content?: any;
|
|
24
|
-
style?: string | undefined;
|
|
25
|
-
} | undefined;
|
|
26
|
-
name?: string | undefined;
|
|
27
|
-
options: Record<string | number, string | number>;
|
|
28
|
-
option?: {
|
|
29
|
-
class?: string | undefined;
|
|
30
|
-
style?: string | undefined;
|
|
31
|
-
} | undefined;
|
|
32
|
-
selected?: any;
|
|
33
|
-
scrollbar?: {
|
|
34
|
-
style?: string | undefined;
|
|
35
|
-
} | undefined;
|
|
36
|
-
style?: string | undefined;
|
|
37
|
-
text?: {
|
|
38
|
-
class?: string | undefined;
|
|
39
|
-
} | undefined;
|
|
40
|
-
tooltip?: {
|
|
41
|
-
class?: string | undefined;
|
|
42
|
-
direction?: any;
|
|
43
|
-
style?: string | undefined;
|
|
44
|
-
} | undefined;
|
|
45
|
-
} & {
|
|
46
|
-
description?: string | undefined;
|
|
47
|
-
} & {
|
|
48
|
-
required?: boolean | undefined;
|
|
49
|
-
title?: string | undefined;
|
|
50
|
-
};
|
|
5
|
+
select: (data: Parameters<typeof s>[0] & {
|
|
6
|
+
field: Parameters<typeof sel>[0];
|
|
51
7
|
}) => import("@esportsplus/template").Renderable;
|
|
52
|
-
text: (data: {
|
|
53
|
-
|
|
54
|
-
field?: {
|
|
55
|
-
content?: any;
|
|
56
|
-
} | undefined;
|
|
57
|
-
mask?: {
|
|
58
|
-
class?: string | undefined;
|
|
59
|
-
style?: string | undefined;
|
|
60
|
-
} | undefined;
|
|
61
|
-
name?: string | undefined;
|
|
62
|
-
style?: string | undefined;
|
|
63
|
-
title: string;
|
|
64
|
-
value?: any;
|
|
65
|
-
} & {
|
|
66
|
-
description?: string | undefined;
|
|
67
|
-
} & {
|
|
68
|
-
field: {
|
|
69
|
-
class?: string | undefined;
|
|
70
|
-
mask?: {
|
|
71
|
-
class?: string | undefined;
|
|
72
|
-
content?: any;
|
|
73
|
-
style?: string | undefined;
|
|
74
|
-
} | undefined;
|
|
75
|
-
name?: string | undefined;
|
|
76
|
-
placeholder?: string | undefined;
|
|
77
|
-
style?: string | undefined;
|
|
78
|
-
tag?: {
|
|
79
|
-
class?: string | undefined;
|
|
80
|
-
} | undefined;
|
|
81
|
-
textarea?: boolean | undefined;
|
|
82
|
-
type?: string | undefined;
|
|
83
|
-
value?: unknown;
|
|
84
|
-
} & {
|
|
85
|
-
description?: string | undefined;
|
|
86
|
-
} & {
|
|
87
|
-
required?: boolean | undefined;
|
|
88
|
-
title?: string | undefined;
|
|
89
|
-
};
|
|
8
|
+
text: (data: Parameters<typeof s>[0] & {
|
|
9
|
+
field: Parameters<typeof tex>[0];
|
|
90
10
|
}) => import("@esportsplus/template").Renderable;
|
|
91
11
|
};
|
|
92
12
|
export default _default;
|
|
@@ -19,8 +19,10 @@ function parse(keys, selected) {
|
|
|
19
19
|
}
|
|
20
20
|
function template(data, state) {
|
|
21
21
|
let { attributes: a, html: h } = scrollbar({
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
attributes: {
|
|
23
|
+
style: data?.scrollbar?.style || '--background-default: var(--color-black-400);'
|
|
24
|
+
},
|
|
25
|
+
fixed: true
|
|
24
26
|
});
|
|
25
27
|
return html `
|
|
26
28
|
<div
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import response from '@esportsplus/action';
|
|
2
|
-
import alert from '../../components/alert';
|
|
3
2
|
import input from './input';
|
|
4
3
|
function parse(input) {
|
|
5
4
|
let data = {};
|
|
@@ -27,7 +26,7 @@ export default function (action) {
|
|
|
27
26
|
event.preventDefault();
|
|
28
27
|
event?.submitter?.classList.add('button--processing');
|
|
29
28
|
let { errors } = await action({
|
|
30
|
-
alert,
|
|
29
|
+
alert: null,
|
|
31
30
|
input: parse(Object.fromEntries(new FormData(this)?.entries())),
|
|
32
31
|
response
|
|
33
32
|
});
|
|
@@ -5,18 +5,18 @@ declare const _default: {
|
|
|
5
5
|
attributes: (reactive: {
|
|
6
6
|
error: string;
|
|
7
7
|
}) => (element: HTMLInputElement | HTMLSelectElement) => void;
|
|
8
|
-
get: (element?: HTMLInputElement | HTMLSelectElement
|
|
8
|
+
get: (element?: HTMLInputElement | HTMLSelectElement) => {
|
|
9
9
|
error: string;
|
|
10
10
|
} | undefined;
|
|
11
11
|
};
|
|
12
12
|
layout: (data: {
|
|
13
13
|
action?: any;
|
|
14
14
|
button?: {
|
|
15
|
-
class?: string
|
|
15
|
+
class?: string;
|
|
16
16
|
content?: any;
|
|
17
|
-
style?: string
|
|
18
|
-
}
|
|
19
|
-
class?: string
|
|
17
|
+
style?: string;
|
|
18
|
+
};
|
|
19
|
+
class?: string;
|
|
20
20
|
content?: any;
|
|
21
21
|
}) => import("@esportsplus/template").Renderable;
|
|
22
22
|
};
|
|
@@ -2,7 +2,7 @@ declare const _default: {
|
|
|
2
2
|
attributes: (reactive: {
|
|
3
3
|
error: string;
|
|
4
4
|
}) => (element: HTMLInputElement | HTMLSelectElement) => void;
|
|
5
|
-
get: (element?: HTMLInputElement | HTMLSelectElement
|
|
5
|
+
get: (element?: HTMLInputElement | HTMLSelectElement) => {
|
|
6
6
|
error: string;
|
|
7
7
|
} | undefined;
|
|
8
8
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
declare const _default: ({
|
|
1
|
+
declare const _default: ({ attributes, fixed }?: {
|
|
2
|
+
attributes?: Record<string, unknown>;
|
|
2
3
|
fixed?: boolean;
|
|
3
|
-
style?: string;
|
|
4
4
|
}) => {
|
|
5
5
|
attributes: {
|
|
6
|
-
class:
|
|
6
|
+
class: string;
|
|
7
7
|
onscroll: (this: HTMLElement) => void;
|
|
8
8
|
};
|
|
9
9
|
html: import("@esportsplus/template").Renderable;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { reactive } from '@esportsplus/reactivity';
|
|
2
2
|
import { html } from '@esportsplus/template';
|
|
3
3
|
let root = document.body, width;
|
|
4
|
-
export default ({
|
|
4
|
+
export default ({ attributes, fixed } = {}) => {
|
|
5
5
|
let state = reactive({
|
|
6
6
|
height: 100,
|
|
7
7
|
translate: 0
|
|
8
8
|
});
|
|
9
9
|
return {
|
|
10
10
|
attributes: {
|
|
11
|
-
class:
|
|
12
|
-
return '--scrollbar-content';
|
|
13
|
-
},
|
|
11
|
+
class: '--scrollbar-content',
|
|
14
12
|
onscroll: function () {
|
|
15
13
|
if (width === undefined) {
|
|
16
14
|
width = this.offsetWidth - this.clientWidth;
|
|
@@ -26,10 +24,10 @@ export default ({ fixed, style } = {}) => {
|
|
|
26
24
|
<div
|
|
27
25
|
class='scrollbar ${fixed ? 'scrollbar--fixed' : ''} ${() => state.height >= 100 ? 'scrollbar--hidden' : ''}'
|
|
28
26
|
style='${() => `
|
|
29
|
-
${style || ''}
|
|
30
27
|
--translate: translate3d(0, ${state.translate}%, 0);
|
|
31
28
|
--height: ${state.height}%;
|
|
32
29
|
`}'
|
|
30
|
+
${attributes}
|
|
33
31
|
></div>
|
|
34
32
|
`
|
|
35
33
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import scrollbar from '../../components/scrollbar';
|
|
1
2
|
type Data = {
|
|
2
3
|
class?: string;
|
|
3
4
|
content?: any;
|
|
4
|
-
scrollbar?:
|
|
5
|
-
style?: string;
|
|
6
|
-
};
|
|
5
|
+
scrollbar?: Parameters<typeof scrollbar>[0];
|
|
7
6
|
};
|
|
8
7
|
declare const _default: (data: Data) => import("@esportsplus/template").Renderable;
|
|
9
8
|
export default _default;
|