@esportsplus/ui 0.14.2 → 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.
@@ -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,5 +1,6 @@
1
1
  import './scss/index.scss';
2
- declare const _default: (data: Record<string, unknown> & {
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 (data, content) => {
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(data, ['scrollbar'])}
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
- ${data.scrollbar}
42
+ ${attributes.scrollbar}
42
43
  >
43
44
  </div>
44
45
  </div>
package/package.json CHANGED
@@ -47,7 +47,7 @@
47
47
  "private": false,
48
48
  "sideEffects": false,
49
49
  "type": "module",
50
- "version": "0.14.2",
50
+ "version": "0.15.0",
51
51
  "scripts": {
52
52
  "build": "run-s build:vite build:ts",
53
53
  "build:ts": "tsc && tsc-alias",
@@ -9,7 +9,7 @@ let root = document.body,
9
9
 
10
10
 
11
11
  // TODO: Look into scrollbar customization options
12
- export default (data: Record<string, unknown> & { scrollbar?: Record<string, unknown> }, content: unknown) => {
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(data, ['scrollbar'])}
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
- ${data.scrollbar}
51
+ ${attributes.scrollbar}
51
52
  >
52
53
  </div>
53
54
  </div>