@esportsplus/ui 0.14.1 → 0.15.0
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 +1 -0
- package/build/components/modal/scss/index.scss +1 -1
- package/build/components/scrollbar/index.d.ts +2 -1
- package/build/components/scrollbar/index.js +4 -3
- package/package.json +1 -1
- package/src/components/modal/scss/index.scss +1 -5
- package/src/components/modal/scss/variables.scss +1 -2
- package/src/components/scrollbar/index.ts +4 -3
|
@@ -58,6 +58,7 @@ declare const _default: {
|
|
|
58
58
|
content?: Record<string, unknown>;
|
|
59
59
|
} & Record<string, unknown>;
|
|
60
60
|
} & Record<string, unknown> & {
|
|
61
|
+
content?: Record<string, unknown>;
|
|
61
62
|
scrollbar?: Record<string, unknown>;
|
|
62
63
|
}) => import("@esportsplus/template/build/types").RenderableTemplate;
|
|
63
64
|
switch: (data: Parameters<typeof checkbox>[0]) => import("@esportsplus/template/build/types").RenderableTemplate;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components {.modal{--margin-horizontal:0px;--margin-vertical:0px;--max-
|
|
1
|
+
@layer components {.modal{--margin-horizontal:0px;--margin-vertical:0px;--max-width:480px;transition:opacity var(--transition-duration)ease-in-out,transform var(--transition-duration)ease-in-out;transform-origin:50%;width:min(var(--max-width),100svw - var(--margin-horizontal)*2);z-index:9}.modal:not(.--active){opacity:0;pointer-events:none;transform:translate(50%,50%)scale(.8)}.modal:not(.--active) input[type=password]{display:none}.modal-frame{transition:opacity var(--transition-duration)ease-in-out,transform var(--transition-duration)ease-in-out;transform-origin:50%}.modal-frame:not(.--active){display:none}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import './scss/index.scss';
|
|
2
|
-
declare const _default: (
|
|
2
|
+
declare const _default: (attributes: Record<string, unknown> & {
|
|
3
|
+
content?: Record<string, unknown>;
|
|
3
4
|
scrollbar?: Record<string, unknown>;
|
|
4
5
|
}, content: unknown) => import("@esportsplus/template/build/types").RenderableTemplate;
|
|
5
6
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import { html } from '@esportsplus/template';
|
|
|
3
3
|
import { omit } from '@esportsplus/utilities';
|
|
4
4
|
import './scss/index.scss';
|
|
5
5
|
let root = document.body, width;
|
|
6
|
-
export default (
|
|
6
|
+
export default (attributes, content) => {
|
|
7
7
|
let state = reactive({
|
|
8
8
|
height: 100,
|
|
9
9
|
translate: 0
|
|
@@ -11,7 +11,7 @@ export default (data, content) => {
|
|
|
11
11
|
return html `
|
|
12
12
|
<div
|
|
13
13
|
class='scrollbar-container'
|
|
14
|
-
${omit(
|
|
14
|
+
${omit(attributes, ['content', 'scrollbar'])}
|
|
15
15
|
>
|
|
16
16
|
<div
|
|
17
17
|
class='scrollbar-container-content'
|
|
@@ -25,6 +25,7 @@ export default (data, content) => {
|
|
|
25
25
|
state.height = (this.clientHeight / this.scrollHeight) * 100;
|
|
26
26
|
state.translate = (this.scrollTop / this.clientHeight) * 100;
|
|
27
27
|
}}'
|
|
28
|
+
${attributes.content}
|
|
28
29
|
>
|
|
29
30
|
${content}
|
|
30
31
|
</div>
|
|
@@ -38,7 +39,7 @@ export default (data, content) => {
|
|
|
38
39
|
--translate: translate3d(0, ${state.translate}%, 0);
|
|
39
40
|
--height: ${state.height}%;
|
|
40
41
|
`}'
|
|
41
|
-
${
|
|
42
|
+
${attributes.scrollbar}
|
|
42
43
|
>
|
|
43
44
|
</div>
|
|
44
45
|
</div>
|
package/package.json
CHANGED
|
@@ -3,16 +3,12 @@
|
|
|
3
3
|
@use './variables.scss';
|
|
4
4
|
|
|
5
5
|
.modal {
|
|
6
|
-
@include lib.position(fixed, center);
|
|
7
|
-
height: auto;
|
|
8
|
-
max-height: var(--max-height);
|
|
9
|
-
overflow: hidden;
|
|
10
6
|
transition:
|
|
11
7
|
opacity var(--transition-duration) ease-in-out,
|
|
12
8
|
transform var(--transition-duration) ease-in-out;
|
|
13
9
|
transform-origin: center;
|
|
14
10
|
width: min(var(--max-width), calc(100svw - (var(--margin-horizontal) * 2)));
|
|
15
|
-
z-index:
|
|
11
|
+
z-index: 9;
|
|
16
12
|
|
|
17
13
|
@include tokens.state(inactive) {
|
|
18
14
|
opacity: 0;
|
|
@@ -9,7 +9,7 @@ let root = document.body,
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
// TODO: Look into scrollbar customization options
|
|
12
|
-
export default (
|
|
12
|
+
export default (attributes: Record<string, unknown> & { content?: Record<string, unknown>, scrollbar?: Record<string, unknown> }, content: unknown) => {
|
|
13
13
|
let state = reactive({
|
|
14
14
|
height: 100,
|
|
15
15
|
translate: 0
|
|
@@ -18,7 +18,7 @@ export default (data: Record<string, unknown> & { scrollbar?: Record<string, unk
|
|
|
18
18
|
return html`
|
|
19
19
|
<div
|
|
20
20
|
class='scrollbar-container'
|
|
21
|
-
${omit(
|
|
21
|
+
${omit(attributes, ['content', 'scrollbar'])}
|
|
22
22
|
>
|
|
23
23
|
<div
|
|
24
24
|
class='scrollbar-container-content'
|
|
@@ -34,6 +34,7 @@ export default (data: Record<string, unknown> & { scrollbar?: Record<string, unk
|
|
|
34
34
|
state.height = (this.clientHeight / this.scrollHeight) * 100;
|
|
35
35
|
state.translate = (this.scrollTop / this.clientHeight) * 100;
|
|
36
36
|
}}'
|
|
37
|
+
${attributes.content}
|
|
37
38
|
>
|
|
38
39
|
${content}
|
|
39
40
|
</div>
|
|
@@ -47,7 +48,7 @@ export default (data: Record<string, unknown> & { scrollbar?: Record<string, unk
|
|
|
47
48
|
--translate: translate3d(0, ${state.translate}%, 0);
|
|
48
49
|
--height: ${state.height}%;
|
|
49
50
|
`}'
|
|
50
|
-
${
|
|
51
|
+
${attributes.scrollbar}
|
|
51
52
|
>
|
|
52
53
|
</div>
|
|
53
54
|
</div>
|